@principal-ade/panels 1.0.58 → 1.0.59

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.
@@ -1,6 +1,30 @@
1
1
  import { default as React, ReactNode } from 'react';
2
2
  import { Theme } from '@principal-ade/industry-theme';
3
3
  import { PanelLayout } from './PanelConfigurator';
4
+ /**
5
+ * Imperative handle for ConfigurablePanelLayout
6
+ * Allows programmatic control of panel sizes without remounting
7
+ */
8
+ export interface ConfigurablePanelLayoutHandle {
9
+ /**
10
+ * Set panel sizes programmatically without remounting
11
+ * @param sizes - Object with left, middle, and right sizes (0-100, should sum to 100)
12
+ */
13
+ setLayout: (sizes: {
14
+ left: number;
15
+ middle: number;
16
+ right: number;
17
+ }) => void;
18
+ /**
19
+ * Get current panel sizes
20
+ * @returns Object with left, middle, and right sizes
21
+ */
22
+ getLayout: () => {
23
+ left: number;
24
+ middle: number;
25
+ right: number;
26
+ };
27
+ }
4
28
  export interface PanelDefinitionWithContent {
5
29
  id: string;
6
30
  label: string;
@@ -82,6 +106,13 @@ export interface ConfigurablePanelLayoutProps {
82
106
  * - For three panels: define all positions (e.g., { left: 'panel1', middle: 'panel2', right: 'panel3' })
83
107
  *
84
108
  * The component automatically adjusts sizing and behavior based on active panels.
109
+ *
110
+ * @example
111
+ * // Using the imperative API to set sizes without remounting
112
+ * const layoutRef = useRef<ConfigurablePanelLayoutHandle>(null);
113
+ *
114
+ * // Later, to change sizes:
115
+ * layoutRef.current?.setLayout({ left: 0, middle: 50, right: 50 });
85
116
  */
86
- export declare const ConfigurablePanelLayout: React.FC<ConfigurablePanelLayoutProps>;
117
+ export declare const ConfigurablePanelLayout: React.ForwardRefExoticComponent<ConfigurablePanelLayoutProps & React.RefAttributes<ConfigurablePanelLayoutHandle>>;
87
118
  //# sourceMappingURL=ConfigurablePanelLayout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurablePanelLayout.d.ts","sourceRoot":"","sources":["../../src/components/ConfigurablePanelLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA4C,MAAM,OAAO,CAAC;AAUnF,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAuD,MAAM,qBAAqB,CAAC;AAGvG,OAAO,+BAA+B,CAAC;AAEvC,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,4BAA4B;IAC3C,0CAA0C;IAC1C,MAAM,EAAE,0BAA0B,EAAE,CAAC;IAErC,mGAAmG;IACnG,MAAM,EAAE,WAAW,CAAC;IAEpB,qEAAqE;IACrE,kBAAkB,CAAC,EAAE;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC9B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAChC,CAAC;IAEF,oEAAoE;IACpE,iBAAiB,CAAC,EAAE;QAClB,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;IAEF,iHAAiH;IACjH,YAAY,CAAC,EAAE;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF,0FAA0F;IAC1F,QAAQ,CAAC,EAAE;QACT,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,yCAAyC;IACzC,SAAS,CAAC,EAAE;QACV,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;IAEF,kDAAkD;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,qDAAqD;IACrD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,yCAAyC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,0CAA0C;IAC1C,KAAK,EAAE,KAAK,CAAC;IAEb,iCAAiC;IACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAClF;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAqgC1E,CAAC"}
1
+ {"version":3,"file":"ConfigurablePanelLayout.d.ts","sourceRoot":"","sources":["../../src/components/ConfigurablePanelLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA6E,MAAM,OAAO,CAAC;AAUpH,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAuD,MAAM,qBAAqB,CAAC;AAGvG,OAAO,+BAA+B,CAAC;AAEvC;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAE5E;;;OAGG;IACH,SAAS,EAAE,MAAM;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAClE;AAED,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,4BAA4B;IAC3C,0CAA0C;IAC1C,MAAM,EAAE,0BAA0B,EAAE,CAAC;IAErC,mGAAmG;IACnG,MAAM,EAAE,WAAW,CAAC;IAEpB,qEAAqE;IACrE,kBAAkB,CAAC,EAAE;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC9B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAChC,CAAC;IAEF,oEAAoE;IACpE,iBAAiB,CAAC,EAAE;QAClB,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;IAEF,iHAAiH;IACjH,YAAY,CAAC,EAAE;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF,0FAA0F;IAC1F,QAAQ,CAAC,EAAE;QACT,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,yCAAyC;IACzC,SAAS,CAAC,EAAE;QACV,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;IAEF,kDAAkD;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,qDAAqD;IACrD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,yCAAyC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,0CAA0C;IAC1C,KAAK,EAAE,KAAK,CAAC;IAEb,iCAAiC;IACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAClF;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,oHAmjClC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
- import { ConfigurablePanelLayoutProps } from './ConfigurablePanelLayout';
2
+ import { ConfigurablePanelLayoutProps, ConfigurablePanelLayoutHandle } from './ConfigurablePanelLayout';
3
3
  import { PanelLayout, PanelDefinition } from './PanelConfigurator';
4
+ export type { ConfigurablePanelLayoutHandle } from './ConfigurablePanelLayout';
4
5
  export interface EditableConfigurablePanelLayoutProps extends ConfigurablePanelLayoutProps {
5
6
  /** Whether edit mode is enabled (controlled) */
6
7
  isEditMode: boolean;
@@ -12,6 +13,13 @@ export interface EditableConfigurablePanelLayoutProps extends ConfigurablePanelL
12
13
  /**
13
14
  * EditableConfigurablePanelLayout - Wrapper component that adds iPhone-style edit mode
14
15
  * Allows dragging entire slot sections (left/middle/right) to rearrange them
16
+ *
17
+ * @example
18
+ * // Using the imperative API to set sizes without remounting
19
+ * const layoutRef = useRef<ConfigurablePanelLayoutHandle>(null);
20
+ *
21
+ * // Later, to change sizes:
22
+ * layoutRef.current?.setLayout({ left: 0, middle: 50, right: 50 });
15
23
  */
16
- export declare const EditableConfigurablePanelLayout: React.FC<EditableConfigurablePanelLayoutProps>;
24
+ export declare const EditableConfigurablePanelLayout: React.ForwardRefExoticComponent<EditableConfigurablePanelLayoutProps & React.RefAttributes<ConfigurablePanelLayoutHandle>>;
17
25
  //# sourceMappingURL=EditableConfigurablePanelLayout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditableConfigurablePanelLayout.d.ts","sourceRoot":"","sources":["../../src/components/EditableConfigurablePanelLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAa3E,OAAO,EAA2B,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,2BAA2B,CAAC;AAEnC,MAAM,WAAW,oCAAqC,SAAQ,4BAA4B;IACxF,gDAAgD;IAChD,UAAU,EAAE,OAAO,CAAC;IAEpB,gDAAgD;IAChD,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAE/C,yCAAyC;IACzC,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;CACrC;AAgED;;;GAGG;AACH,eAAO,MAAM,+BAA+B,EAAE,KAAK,CAAC,EAAE,CAAC,oCAAoC,CA+H1F,CAAC"}
1
+ {"version":3,"file":"EditableConfigurablePanelLayout.d.ts","sourceRoot":"","sources":["../../src/components/EditableConfigurablePanelLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;AAavF,OAAO,EAA2B,4BAA4B,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AACjI,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,2BAA2B,CAAC;AAGnC,YAAY,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAE/E,MAAM,WAAW,oCAAqC,SAAQ,4BAA4B;IACxF,gDAAgD;IAChD,UAAU,EAAE,OAAO,CAAC;IAEpB,gDAAgD;IAChD,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAE/C,yCAAyC;IACzC,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;CACrC;AAgED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,+BAA+B,4HAgI1C,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { AnimatedResizableLayout, type AnimatedResizableLayoutProps } from './components/AnimatedResizableLayout';
2
2
  export { AnimatedVerticalLayout, type AnimatedVerticalLayoutProps } from './components/AnimatedVerticalLayout';
3
3
  export { CollapsibleSplitPane, type CollapsibleSplitPaneProps, type CollapsedHeaderConfig } from './components/CollapsibleSplitPane';
4
- export { ConfigurablePanelLayout, type ConfigurablePanelLayoutProps, type PanelDefinitionWithContent } from './components/ConfigurablePanelLayout';
4
+ export { ConfigurablePanelLayout, type ConfigurablePanelLayoutProps, type ConfigurablePanelLayoutHandle, type PanelDefinitionWithContent } from './components/ConfigurablePanelLayout';
5
5
  export { ResponsiveConfigurablePanelLayout, type ResponsiveConfigurablePanelLayoutProps } from './components/ResponsiveConfigurablePanelLayout';
6
- export { EditableConfigurablePanelLayout, type EditableConfigurablePanelLayoutProps } from './components/EditableConfigurablePanelLayout';
6
+ export { EditableConfigurablePanelLayout, type EditableConfigurablePanelLayoutProps, type ConfigurablePanelLayoutHandle as EditableConfigurablePanelLayoutHandle } from './components/EditableConfigurablePanelLayout';
7
7
  export { PanelConfigurator, type PanelConfiguratorProps, type PanelDefinition, type PanelLayout, type PanelSlot, type PanelGroup, type TabsConfig, type TilesConfig } from './components/PanelConfigurator';
8
8
  export { TabGroup, type TabGroupProps } from './components/TabGroup';
9
9
  export { SnapCarousel, type SnapCarouselProps, type SnapCarouselRef } from './components/SnapCarousel';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,0CAA0C,CAAC;AAClD,OAAO,yCAAyC,CAAC;AACjD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,0CAA0C,CAAC;AAClD,OAAO,sCAAsC,CAAC;AAC9C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,2BAA2B,CAAC;AACnC,OAAO,+BAA+B,CAAC;AACvC,OAAO,+BAA+B,CAAC;AACvC,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAClH,OAAO,EAAE,sBAAsB,EAAE,KAAK,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,KAAK,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AACrI,OAAO,EAAE,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,KAAK,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AACnJ,OAAO,EAAE,iCAAiC,EAAE,KAAK,sCAAsC,EAAE,MAAM,gDAAgD,CAAC;AAChJ,OAAO,EAAE,+BAA+B,EAAE,KAAK,oCAAoC,EAAE,MAAM,8CAA8C,CAAC;AAC1I,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC5M,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGvG,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,cAAc,EAEd,iBAAiB,EACjB,WAAW,EACX,uBAAuB,GACxB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,GAC1B,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,0CAA0C,CAAC;AAClD,OAAO,yCAAyC,CAAC;AACjD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,0CAA0C,CAAC;AAClD,OAAO,sCAAsC,CAAC;AAC9C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,2BAA2B,CAAC;AACnC,OAAO,+BAA+B,CAAC;AACvC,OAAO,+BAA+B,CAAC;AACvC,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAClH,OAAO,EAAE,sBAAsB,EAAE,KAAK,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,KAAK,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AACrI,OAAO,EAAE,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,KAAK,6BAA6B,EAAE,KAAK,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AACvL,OAAO,EAAE,iCAAiC,EAAE,KAAK,sCAAsC,EAAE,MAAM,gDAAgD,CAAC;AAChJ,OAAO,EAAE,+BAA+B,EAAE,KAAK,oCAAoC,EAAE,KAAK,6BAA6B,IAAI,qCAAqC,EAAE,MAAM,8CAA8C,CAAC;AACvN,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC5M,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGvG,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,cAAc,EAEd,iBAAiB,EACjB,WAAW,EACX,uBAAuB,GACxB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,GAC1B,MAAM,wBAAwB,CAAC"}
package/dist/index.esm.js CHANGED
@@ -1,12 +1,12 @@
1
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import r,{useState as o,useRef as i,useCallback as a,useEffect as l,createContext as s,useContext as c,forwardRef as d,useImperativeHandle as u,useMemo as p,useLayoutEffect as h,memo as m,useReducer as f}from"react";import{Group as g,Panel as v,Separator as b}from"react-resizable-panels";import{flushSync as y,unstable_batchedUpdates as w,createPortal as x}from"react-dom";import{useTheme as C}from"@principal-ade/industry-theme";import './index.css';function S(e){return{"--panel-background":e.colors.background,"--panel-border":e.colors.border,"--panel-handle":e.colors.backgroundSecondary,"--panel-handle-hover":e.colors.backgroundHover,"--panel-handle-active":e.colors.primary,"--panel-button-bg":e.colors.surface,"--panel-button-hover":e.colors.backgroundHover,"--panel-button-border":e.colors.border,"--panel-button-icon":e.colors.textSecondary,"--panel-accent-bg":e.colors.primary+"15"}}function R(e){return{"--tab-list-bg":e.colors.backgroundSecondary,"--tab-border":e.colors.border,"--tab-bg":e.colors.surface,"--tab-bg-hover":e.colors.backgroundHover,"--tab-bg-active":e.colors.primary,"--tab-text":e.colors.textSecondary,"--tab-text-hover":e.colors.text,"--tab-text-active":e.colors.background,"--tab-icon-color":e.colors.textTertiary,"--tab-icon-active":e.colors.background,"--tab-border-hover":e.colors.textSecondary,"--tab-border-active":e.colors.primary,"--tab-focus":e.colors.primary,"--tab-content-bg":e.colors.background,"--tab-empty-text":e.colors.textMuted,"--tab-font-family":e.fonts.body,"--tab-font-size":"11px","--tab-font-weight":String(e.fontWeights.medium),"--mobile-tab-text-active":e.colors.primary,"--mobile-tab-icon-active":e.colors.primary}}const N=({leftPanel:n,rightPanel:r,collapsibleSide:s="left",defaultSize:c=25,minSize:d=5,className:u="",collapsed:p=!1,style:h,showCollapseButton:m=!1,animationDuration:f=300,animationEasing:y="cubic-bezier(0.4, 0, 0.2, 1)",onCollapseStart:w,onCollapseComplete:x,onExpandStart:C,onExpandComplete:R,theme:N})=>{const[E,z]=o(p),[D,M]=o(!1),[T,A]=o(!1),[k,L]=o(p),[$,P]=o(p?0:c),F=i(null),B=i(void 0),O=i(void 0),I=i(void 0),q=a((e,t,n)=>{if(!F.current)return;B.current&&cancelAnimationFrame(B.current),O.current=performance.now();const r=o=>{if(!O.current||!F.current)return;const i=o-O.current,a=Math.min(i/f,1),l=a<.5?4*a*a*a:1-Math.pow(-2*a+2,3)/2,s=e+(t-e)*l;F.current.resize(s),a<1?B.current=requestAnimationFrame(r):(0===t?F.current.collapse():F.current.resize(t),M(!1),n&&n())};B.current=requestAnimationFrame(r)},[f]),W=a(()=>{D||T||(M(!0),z(!0),w&&w(),q($,0,()=>{P(0),L(!0),x&&x()}))},[D,T,$,q,w,x]),H=a(()=>{D||T||(M(!0),z(!1),L(!1),C&&C(),q(0,c,()=>{P(c),R&&R()}))},[D,T,c,q,C,R]),j=a(()=>{E?H():W()},[E,W,H]),K=a(e=>{if(!D){const t=e.asPercentage;P(t),t>0&&z(!1)}},[D]),U=a(()=>{D||A(!0)},[D]),X=a(()=>{A(!1)},[]);l(()=>{p!==E&&(p?W():H())},[p]),l(()=>{p&&!D?L(!0):p||D||L(!1)},[p,D]),l(()=>{const e=B.current,t=I.current;return()=>{e&&cancelAnimationFrame(e),t&&clearTimeout(t)}},[]);const Y="left"===s,V=E?Y?"▸":"◂":Y?"◂":"▸",J=S(N),G=D&&!T?{transition:`flex ${f}ms ${y}`}:void 0,_=e=>{let t="hybrid-panel";return e&&(t+=" collapsible-panel",D&&!T&&(t+=" animating"),E&&(t+=" collapsed")),t};/* @__PURE__ */
1
+ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import r,{useState as o,useRef as i,useCallback as a,useEffect as l,createContext as s,useContext as c,forwardRef as d,useImperativeHandle as u,useMemo as p,useLayoutEffect as h,memo as m,useReducer as f}from"react";import{Group as g,Panel as v,Separator as b}from"react-resizable-panels";import{flushSync as y,unstable_batchedUpdates as w,createPortal as x}from"react-dom";import{useTheme as C}from"@principal-ade/industry-theme";import './index.css';function S(e){return{"--panel-background":e.colors.background,"--panel-border":e.colors.border,"--panel-handle":e.colors.backgroundSecondary,"--panel-handle-hover":e.colors.backgroundHover,"--panel-handle-active":e.colors.primary,"--panel-button-bg":e.colors.surface,"--panel-button-hover":e.colors.backgroundHover,"--panel-button-border":e.colors.border,"--panel-button-icon":e.colors.textSecondary,"--panel-accent-bg":e.colors.primary+"15"}}function R(e){return{"--tab-list-bg":e.colors.backgroundSecondary,"--tab-border":e.colors.border,"--tab-bg":e.colors.surface,"--tab-bg-hover":e.colors.backgroundHover,"--tab-bg-active":e.colors.primary,"--tab-text":e.colors.textSecondary,"--tab-text-hover":e.colors.text,"--tab-text-active":e.colors.background,"--tab-icon-color":e.colors.textTertiary,"--tab-icon-active":e.colors.background,"--tab-border-hover":e.colors.textSecondary,"--tab-border-active":e.colors.primary,"--tab-focus":e.colors.primary,"--tab-content-bg":e.colors.background,"--tab-empty-text":e.colors.textMuted,"--tab-font-family":e.fonts.body,"--tab-font-size":"11px","--tab-font-weight":String(e.fontWeights.medium),"--mobile-tab-text-active":e.colors.primary,"--mobile-tab-icon-active":e.colors.primary}}const N=({leftPanel:n,rightPanel:r,collapsibleSide:s="left",defaultSize:c=25,minSize:d=5,className:u="",collapsed:p=!1,style:h,showCollapseButton:m=!1,animationDuration:f=300,animationEasing:y="cubic-bezier(0.4, 0, 0.2, 1)",onCollapseStart:w,onCollapseComplete:x,onExpandStart:C,onExpandComplete:R,theme:N})=>{const[z,E]=o(p),[D,M]=o(!1),[T,A]=o(!1),[k,L]=o(p),[$,P]=o(p?0:c),F=i(null),B=i(void 0),O=i(void 0),I=i(void 0),q=a((e,t,n)=>{if(!F.current)return;B.current&&cancelAnimationFrame(B.current),O.current=performance.now();const r=o=>{if(!O.current||!F.current)return;const i=o-O.current,a=Math.min(i/f,1),l=a<.5?4*a*a*a:1-Math.pow(-2*a+2,3)/2,s=e+(t-e)*l;F.current.resize(s),a<1?B.current=requestAnimationFrame(r):(0===t?F.current.collapse():F.current.resize(t),M(!1),n&&n())};B.current=requestAnimationFrame(r)},[f]),W=a(()=>{D||T||(M(!0),E(!0),w&&w(),q($,0,()=>{P(0),L(!0),x&&x()}))},[D,T,$,q,w,x]),H=a(()=>{D||T||(M(!0),E(!1),L(!1),C&&C(),q(0,c,()=>{P(c),R&&R()}))},[D,T,c,q,C,R]),j=a(()=>{z?H():W()},[z,W,H]),K=a(e=>{if(!D){const t=e.asPercentage;P(t),t>0&&E(!1)}},[D]),U=a(()=>{D||A(!0)},[D]),X=a(()=>{A(!1)},[]);l(()=>{p!==z&&(p?W():H())},[p]),l(()=>{p&&!D?L(!0):p||D||L(!1)},[p,D]),l(()=>{const e=B.current,t=I.current;return()=>{e&&cancelAnimationFrame(e),t&&clearTimeout(t)}},[]);const Y="left"===s,V=z?Y?"▸":"◂":Y?"◂":"▸",J=S(N),G=D&&!T?{transition:`flex ${f}ms ${y}`}:void 0,_=e=>{let t="hybrid-panel";return e&&(t+=" collapsible-panel",D&&!T&&(t+=" animating"),z&&(t+=" collapsed")),t};/* @__PURE__ */
2
2
  return e("div",{className:`animated-resizable-layout ${u}`,style:{...J,...h},children:/* @__PURE__ */t(g,{orientation:"horizontal",onLayoutChange:U,onLayoutChanged:X,children:[
3
- /* @__PURE__ */e(v,{panelRef:Y?F:void 0,collapsible:Y,defaultSize:Y?p?"0%":`${c}%`:void 0,minSize:Y?`${d}%`:"30%",collapsedSize:"0%",onResize:Y?K:void 0,className:_(Y),style:Y?G:void 0,children:/* @__PURE__ */e("div",{className:"panel-content-wrapper",style:{opacity:Y&&E?0:1,transition:D?`opacity ${.5*f}ms ${y}`:"none"},children:n})}),
4
- /* @__PURE__ */e(b,{className:"resize-handle "+(k?"collapsed":""),style:k?{visibility:"hidden",width:0}:void 0,children:m&&/* @__PURE__ */e("div",{className:"handle-bar",children:/* @__PURE__ */e("button",{onClick:j,className:"collapse-toggle",disabled:D,"aria-label":E?"Expand panel":"Collapse panel",children:V})})}),
5
- /* @__PURE__ */e(v,{panelRef:Y?void 0:F,collapsible:!Y,defaultSize:Y?void 0:p?"0%":`${c}%`,minSize:Y?"30%":`${d}%`,collapsedSize:"0%",onResize:Y?void 0:K,className:_(!Y),style:Y?void 0:G,children:/* @__PURE__ */e("div",{className:"panel-content-wrapper",style:{opacity:!Y&&E?0:1,transition:D?`opacity ${.5*f}ms ${y}`:"none"},children:r})})]})})},E=({topPanel:n,bottomPanel:r,collapsiblePanels:s={top:!0,bottom:!0},defaultSizes:c={top:30,bottom:30},minSizes:d={top:5,bottom:5},className:u="",collapsed:p={top:!1,bottom:!1},style:h,showCollapseButtons:m=!1,animationDuration:f=300,animationEasing:y="cubic-bezier(0.4, 0, 0.2, 1)",theme:w,onTopCollapseStart:x,onTopCollapseComplete:C,onTopExpandStart:R,onTopExpandComplete:N,onBottomCollapseStart:E,onBottomCollapseComplete:z,onBottomExpandStart:D,onBottomExpandComplete:M,onPanelResize:T})=>{const[A,k]=o(p.top||!1),[L,$]=o(!1),[P,F]=o(p.top?0:c.top),B=i(null),O=i(void 0),I=i(void 0),[q,W]=o(p.bottom||!1),[H,j]=o(!1),[K,U]=o(p.bottom?0:c.bottom),X=i(null),Y=i(void 0),V=i(void 0),[J,G]=o(!1),_=a((e,t,n)=>{if(!B.current)return;O.current&&cancelAnimationFrame(O.current),I.current=performance.now();const r=o=>{if(!I.current||!B.current)return;const i=o-I.current,a=Math.min(i/f,1),l=a<.5?4*a*a*a:1-Math.pow(-2*a+2,3)/2,s=e+(t-e)*l;B.current.resize(s),a<1?O.current=requestAnimationFrame(r):(0===t?B.current.collapse():B.current.resize(t),$(!1),n&&n())};O.current=requestAnimationFrame(r)},[f]),Q=a((e,t,n)=>{if(!X.current)return;Y.current&&cancelAnimationFrame(Y.current),V.current=performance.now();const r=o=>{if(!V.current||!X.current)return;const i=o-V.current,a=Math.min(i/f,1),l=a<.5?4*a*a*a:1-Math.pow(-2*a+2,3)/2,s=e+(t-e)*l;X.current.resize(s),a<1?Y.current=requestAnimationFrame(r):(0===t?X.current.collapse():X.current.resize(t),j(!1),n&&n())};Y.current=requestAnimationFrame(r)},[f]),Z=a(()=>{L||J||!s.top||($(!0),k(!0),x&&x(),_(P,0,()=>{F(0),C&&C()}))},[L,J,P,s.top,_,x,C]),ee=a(()=>{L||J||!s.top||($(!0),k(!1),R&&R(),_(0,c.top,()=>{F(c.top),N&&N()}))},[L,J,c.top,s.top,_,R,N]),te=a(()=>{A?ee():Z()},[A,Z,ee]),ne=a(()=>{H||J||!s.bottom||(j(!0),W(!0),E&&E(),Q(K,0,()=>{U(0),z&&z()}))},[H,J,K,s.bottom,Q,E,z]),re=a(()=>{H||J||!s.bottom||(j(!0),W(!1),D&&D(),Q(0,c.bottom,()=>{U(c.bottom),M&&M()}))},[H,J,c.bottom,s.bottom,Q,D,M]),oe=a(()=>{q?re():ne()},[q,ne,re]),ie=a(e=>{if(!L){const t=e.asPercentage;F(t),t>0&&k(!1)}},[L]),ae=a(e=>{if(!H){const t=e.asPercentage;U(t),t>0&&W(!1)}},[H]),le=a(()=>{L||H||G(!0)},[L,H]),se=a(()=>{G(!1),T&&T({top:P,bottom:K})},[P,K,T]);l(()=>{void 0!==p.top&&p.top!==A&&(p.top?Z():ee())},[p.top]),l(()=>{void 0!==p.bottom&&p.bottom!==q&&(p.bottom?ne():re())},[p.bottom]),l(()=>()=>{O.current&&cancelAnimationFrame(O.current),Y.current&&cancelAnimationFrame(Y.current)},[]);const ce=S(w),de=L&&!J?{transition:`flex ${f}ms ${y}`}:void 0,ue=H&&!J?{transition:`flex ${f}ms ${y}`}:void 0;/* @__PURE__ */
3
+ /* @__PURE__ */e(v,{panelRef:Y?F:void 0,collapsible:Y,defaultSize:Y?p?"0%":`${c}%`:void 0,minSize:Y?`${d}%`:"30%",collapsedSize:"0%",onResize:Y?K:void 0,className:_(Y),style:Y?G:void 0,children:/* @__PURE__ */e("div",{className:"panel-content-wrapper",style:{opacity:Y&&z?0:1,transition:D?`opacity ${.5*f}ms ${y}`:"none"},children:n})}),
4
+ /* @__PURE__ */e(b,{className:"resize-handle "+(k?"collapsed":""),style:k?{visibility:"hidden",width:0}:void 0,children:m&&/* @__PURE__ */e("div",{className:"handle-bar",children:/* @__PURE__ */e("button",{onClick:j,className:"collapse-toggle",disabled:D,"aria-label":z?"Expand panel":"Collapse panel",children:V})})}),
5
+ /* @__PURE__ */e(v,{panelRef:Y?void 0:F,collapsible:!Y,defaultSize:Y?void 0:p?"0%":`${c}%`,minSize:Y?"30%":`${d}%`,collapsedSize:"0%",onResize:Y?void 0:K,className:_(!Y),style:Y?void 0:G,children:/* @__PURE__ */e("div",{className:"panel-content-wrapper",style:{opacity:!Y&&z?0:1,transition:D?`opacity ${.5*f}ms ${y}`:"none"},children:r})})]})})},z=({topPanel:n,bottomPanel:r,collapsiblePanels:s={top:!0,bottom:!0},defaultSizes:c={top:30,bottom:30},minSizes:d={top:5,bottom:5},className:u="",collapsed:p={top:!1,bottom:!1},style:h,showCollapseButtons:m=!1,animationDuration:f=300,animationEasing:y="cubic-bezier(0.4, 0, 0.2, 1)",theme:w,onTopCollapseStart:x,onTopCollapseComplete:C,onTopExpandStart:R,onTopExpandComplete:N,onBottomCollapseStart:z,onBottomCollapseComplete:E,onBottomExpandStart:D,onBottomExpandComplete:M,onPanelResize:T})=>{const[A,k]=o(p.top||!1),[L,$]=o(!1),[P,F]=o(p.top?0:c.top),B=i(null),O=i(void 0),I=i(void 0),[q,W]=o(p.bottom||!1),[H,j]=o(!1),[K,U]=o(p.bottom?0:c.bottom),X=i(null),Y=i(void 0),V=i(void 0),[J,G]=o(!1),_=a((e,t,n)=>{if(!B.current)return;O.current&&cancelAnimationFrame(O.current),I.current=performance.now();const r=o=>{if(!I.current||!B.current)return;const i=o-I.current,a=Math.min(i/f,1),l=a<.5?4*a*a*a:1-Math.pow(-2*a+2,3)/2,s=e+(t-e)*l;B.current.resize(s),a<1?O.current=requestAnimationFrame(r):(0===t?B.current.collapse():B.current.resize(t),$(!1),n&&n())};O.current=requestAnimationFrame(r)},[f]),Q=a((e,t,n)=>{if(!X.current)return;Y.current&&cancelAnimationFrame(Y.current),V.current=performance.now();const r=o=>{if(!V.current||!X.current)return;const i=o-V.current,a=Math.min(i/f,1),l=a<.5?4*a*a*a:1-Math.pow(-2*a+2,3)/2,s=e+(t-e)*l;X.current.resize(s),a<1?Y.current=requestAnimationFrame(r):(0===t?X.current.collapse():X.current.resize(t),j(!1),n&&n())};Y.current=requestAnimationFrame(r)},[f]),Z=a(()=>{L||J||!s.top||($(!0),k(!0),x&&x(),_(P,0,()=>{F(0),C&&C()}))},[L,J,P,s.top,_,x,C]),ee=a(()=>{L||J||!s.top||($(!0),k(!1),R&&R(),_(0,c.top,()=>{F(c.top),N&&N()}))},[L,J,c.top,s.top,_,R,N]),te=a(()=>{A?ee():Z()},[A,Z,ee]),ne=a(()=>{H||J||!s.bottom||(j(!0),W(!0),z&&z(),Q(K,0,()=>{U(0),E&&E()}))},[H,J,K,s.bottom,Q,z,E]),re=a(()=>{H||J||!s.bottom||(j(!0),W(!1),D&&D(),Q(0,c.bottom,()=>{U(c.bottom),M&&M()}))},[H,J,c.bottom,s.bottom,Q,D,M]),oe=a(()=>{q?re():ne()},[q,ne,re]),ie=a(e=>{if(!L){const t=e.asPercentage;F(t),t>0&&k(!1)}},[L]),ae=a(e=>{if(!H){const t=e.asPercentage;U(t),t>0&&W(!1)}},[H]),le=a(()=>{L||H||G(!0)},[L,H]),se=a(()=>{G(!1),T&&T({top:P,bottom:K})},[P,K,T]);l(()=>{void 0!==p.top&&p.top!==A&&(p.top?Z():ee())},[p.top]),l(()=>{void 0!==p.bottom&&p.bottom!==q&&(p.bottom?ne():re())},[p.bottom]),l(()=>()=>{O.current&&cancelAnimationFrame(O.current),Y.current&&cancelAnimationFrame(Y.current)},[]);const ce=S(w),de=L&&!J?{transition:`flex ${f}ms ${y}`}:void 0,ue=H&&!J?{transition:`flex ${f}ms ${y}`}:void 0;/* @__PURE__ */
6
6
  return e("div",{className:`animated-vertical-layout ${u}`,style:{...ce,...h},children:/* @__PURE__ */t(g,{orientation:"vertical",onLayoutChange:le,onLayoutChanged:se,children:[
7
7
  /* @__PURE__ */e(v,{panelRef:B,collapsible:s.top,defaultSize:p.top?"0%":`${c.top}%`,minSize:`${d.top}%`,collapsedSize:"0%",onResize:ie,className:(()=>{let e="vertical-panel collapsible-panel";return L&&!J&&(e+=" animating"),A&&(e+=" collapsed"),e})(),style:de,children:/* @__PURE__ */e("div",{className:"panel-content-wrapper",style:{opacity:A?0:1,transition:L?`opacity ${.5*f}ms ${y}`:"none"},children:n})}),
8
8
  /* @__PURE__ */e(b,{className:"vertical-resize-handle",children:m&&/* @__PURE__ */t("div",{className:"handle-bar",children:[s.top&&/* @__PURE__ */e("button",{onClick:te,className:"collapse-toggle collapse-toggle-top",disabled:L,"aria-label":A?"Expand top panel":"Collapse top panel",children:A?"▾":"▴"}),s.bottom&&/* @__PURE__ */e("button",{onClick:oe,className:"collapse-toggle collapse-toggle-bottom",disabled:H,"aria-label":q?"Expand bottom panel":"Collapse bottom panel",children:q?"▴":"▾"})]})}),
9
- /* @__PURE__ */e(v,{panelRef:X,collapsible:s.bottom,defaultSize:p.bottom?"0%":`${c.bottom}%`,minSize:`${d.bottom}%`,collapsedSize:"0%",onResize:ae,className:(()=>{let e="vertical-panel collapsible-panel";return H&&!J&&(e+=" animating"),q&&(e+=" collapsed"),e})(),style:ue,children:/* @__PURE__ */e("div",{className:"panel-content-wrapper",style:{opacity:q?0:1,transition:H?`opacity ${.5*f}ms ${y}`:"none"},children:r})})]})})},z=({primaryContent:t,secondaryContent:n,collapsedHeader:r,collapsed:o=!0,onCollapsedChange:i,ratio:a=.3,onRatioChange:l,maxRatio:s=.8,collapsedHeight:c=28,theme:d,className:u="",style:p,animationDuration:h=200,onCollapseStart:m,onCollapseComplete:f,onExpandStart:g,onExpandComplete:v})=>{const b=S(d);return n?/* @__PURE__ */e(D,{primaryContent:t,secondaryContent:n,collapsedHeader:r??{title:"Content"},collapsed:o,onCollapsedChange:i??(()=>{}),ratio:a,onRatioChange:l??(()=>{}),maxRatio:s,collapsedHeight:c,theme:d,className:u,style:p,animationDuration:h,onCollapseStart:m,onCollapseComplete:f,onExpandStart:g,onExpandComplete:v}):/* @__PURE__ */e("div",{className:`collapsible-split-pane ${u}`,style:{...b,...p},children:/* @__PURE__ */e("div",{className:"csp-primary-content-full",children:t})})},D=({primaryContent:n,secondaryContent:r,collapsedHeader:s,collapsed:c,onCollapsedChange:d,ratio:u,onRatioChange:p,maxRatio:h=.8,collapsedHeight:m=28,theme:f,className:y="",style:w,animationDuration:x=200,onCollapseStart:C,onCollapseComplete:R,onExpandStart:N,onExpandComplete:E})=>{const[z,D]=o(!1),[M,T]=o(!1),A=i(null),k=i(void 0),L=i(void 0),$=i(u),P=i(!1),F=i(c),B=e=>100*e;l(()=>{F.current=c},[c]),l(()=>{!c&&u>0&&($.current=u)},[c,u]);const O=a((e,t,n)=>{if(!A.current)return;k.current&&cancelAnimationFrame(k.current),L.current=performance.now();const r=o=>{if(!L.current||!A.current)return;const i=o-L.current,a=Math.min(i/x,1),l=a<.5?4*a*a*a:1-Math.pow(-2*a+2,3)/2,s=e+(t-e)*l;A.current.resize(`${s}%`),a<1?k.current=requestAnimationFrame(r):(A.current.resize(`${t}%`),n&&n(),P.current=!1,D(!1))};k.current=requestAnimationFrame(r)},[x]),I=a(()=>{if(z||M||!A.current)return;u>0&&($.current=u),P.current=!0,D(!0),C?.();const e=B(u);O(e,0,()=>{F.current=!0,d(!0),R?.()})},[z,M,u,O,d,C,R]),q=a(()=>{if(z||M||!A.current)return;P.current=!0,D(!0),N?.();const e=$.current||u||.3,t=B(e);O(0,t,()=>{F.current=!1,d(!1),p(e),E?.()})},[z,M,u,O,d,p,N,E]),W=a(()=>{c?q():I()},[c,I,q]),H=a(e=>{if(P.current)return;const t=e.asPercentage/100;t<=.01&&!F.current?($.current=.4,F.current=!0,d(!0)):t>.01&&F.current&&(F.current=!1,d(!1)),F.current||p(t)},[p,d]),j=a(()=>{z||T(!0)},[z]),K=a(()=>{T(!1)},[]);l(()=>{if(c&&!z&&A.current){A.current.getSize().asPercentage>0&&I()}else if(!c&&!z&&A.current){0===A.current.getSize().asPercentage&&q()}},[c]),l(()=>()=>{k.current&&cancelAnimationFrame(k.current)},[]);const U=S(f),X=["csp-secondary-panel",z&&!M?"csp-animating":"",c?"csp-collapsed":""].filter(Boolean).join(" ");/* @__PURE__ */
9
+ /* @__PURE__ */e(v,{panelRef:X,collapsible:s.bottom,defaultSize:p.bottom?"0%":`${c.bottom}%`,minSize:`${d.bottom}%`,collapsedSize:"0%",onResize:ae,className:(()=>{let e="vertical-panel collapsible-panel";return H&&!J&&(e+=" animating"),q&&(e+=" collapsed"),e})(),style:ue,children:/* @__PURE__ */e("div",{className:"panel-content-wrapper",style:{opacity:q?0:1,transition:H?`opacity ${.5*f}ms ${y}`:"none"},children:r})})]})})},E=({primaryContent:t,secondaryContent:n,collapsedHeader:r,collapsed:o=!0,onCollapsedChange:i,ratio:a=.3,onRatioChange:l,maxRatio:s=.8,collapsedHeight:c=28,theme:d,className:u="",style:p,animationDuration:h=200,onCollapseStart:m,onCollapseComplete:f,onExpandStart:g,onExpandComplete:v})=>{const b=S(d);return n?/* @__PURE__ */e(D,{primaryContent:t,secondaryContent:n,collapsedHeader:r??{title:"Content"},collapsed:o,onCollapsedChange:i??(()=>{}),ratio:a,onRatioChange:l??(()=>{}),maxRatio:s,collapsedHeight:c,theme:d,className:u,style:p,animationDuration:h,onCollapseStart:m,onCollapseComplete:f,onExpandStart:g,onExpandComplete:v}):/* @__PURE__ */e("div",{className:`collapsible-split-pane ${u}`,style:{...b,...p},children:/* @__PURE__ */e("div",{className:"csp-primary-content-full",children:t})})},D=({primaryContent:n,secondaryContent:r,collapsedHeader:s,collapsed:c,onCollapsedChange:d,ratio:u,onRatioChange:p,maxRatio:h=.8,collapsedHeight:m=28,theme:f,className:y="",style:w,animationDuration:x=200,onCollapseStart:C,onCollapseComplete:R,onExpandStart:N,onExpandComplete:z})=>{const[E,D]=o(!1),[M,T]=o(!1),A=i(null),k=i(void 0),L=i(void 0),$=i(u),P=i(!1),F=i(c),B=e=>100*e;l(()=>{F.current=c},[c]),l(()=>{!c&&u>0&&($.current=u)},[c,u]);const O=a((e,t,n)=>{if(!A.current)return;k.current&&cancelAnimationFrame(k.current),L.current=performance.now();const r=o=>{if(!L.current||!A.current)return;const i=o-L.current,a=Math.min(i/x,1),l=a<.5?4*a*a*a:1-Math.pow(-2*a+2,3)/2,s=e+(t-e)*l;A.current.resize(`${s}%`),a<1?k.current=requestAnimationFrame(r):(A.current.resize(`${t}%`),n&&n(),P.current=!1,D(!1))};k.current=requestAnimationFrame(r)},[x]),I=a(()=>{if(E||M||!A.current)return;u>0&&($.current=u),P.current=!0,D(!0),C?.();const e=B(u);O(e,0,()=>{F.current=!0,d(!0),R?.()})},[E,M,u,O,d,C,R]),q=a(()=>{if(E||M||!A.current)return;P.current=!0,D(!0),N?.();const e=$.current||u||.3,t=B(e);O(0,t,()=>{F.current=!1,d(!1),p(e),z?.()})},[E,M,u,O,d,p,N,z]),W=a(()=>{c?q():I()},[c,I,q]),H=a(e=>{if(P.current)return;const t=e.asPercentage/100;t<=.01&&!F.current?($.current=.4,F.current=!0,d(!0)):t>.01&&F.current&&(F.current=!1,d(!1)),F.current||p(t)},[p,d]),j=a(()=>{E||T(!0)},[E]),K=a(()=>{T(!1)},[]);l(()=>{if(c&&!E&&A.current){A.current.getSize().asPercentage>0&&I()}else if(!c&&!E&&A.current){0===A.current.getSize().asPercentage&&q()}},[c]),l(()=>()=>{k.current&&cancelAnimationFrame(k.current)},[]);const U=S(f),X=["csp-secondary-panel",E&&!M?"csp-animating":"",c?"csp-collapsed":""].filter(Boolean).join(" ");/* @__PURE__ */
10
10
  return t("div",{className:`collapsible-split-pane ${y}`,style:{...U,...w},children:[
11
11
  /* @__PURE__ */t("div",{className:"csp-header "+(c?"csp-header-collapsed":""),style:{height:m,backgroundColor:f.colors.backgroundSecondary,borderBottom:`1px solid ${f.colors.border}`},onClick:c?W:void 0,role:c?"button":void 0,tabIndex:c?0:void 0,onKeyDown:c?e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),W())}:void 0,"aria-expanded":!c,"aria-label":c?`Expand ${s.title}`:s.title,children:[s.icon&&/* @__PURE__ */e("span",{className:"csp-header-icon",style:{color:f.colors.textSecondary},children:s.icon}),
12
12
  /* @__PURE__ */e("span",{className:"csp-header-title",style:{color:f.colors.text,fontFamily:f.fonts.body,fontSize:f.fontSizes[1],fontWeight:f.fontWeights.medium},children:s.title}),
@@ -17,28 +17,28 @@ return t("div",{className:`collapsible-split-pane ${y}`,style:{...U,...w},childr
17
17
  /* @__PURE__ */e(v,{className:"csp-primary-panel",minSize:"20%",children:/* @__PURE__ */e("div",{className:"csp-panel-content",children:n})})]})})]})},M=({panelIds:r,panels:i,config:a={},className:s="",theme:c})=>{const{defaultActiveTab:d=0,tabPosition:u="top",centered:p=!0,hideTabList:h=!1,activeTabIndex:m,onTabChange:f}=a,[g,v]=o(d),b=void 0!==m,y=b?m:g;l(()=>{b||v(d)},[d,b]);const w=R(c),x=r.map(e=>i.find(t=>t.id===e)).filter(e=>void 0!==e),C=Math.min(y,x.length-1),S=x[C];if(0===x.length)/* @__PURE__ */
18
18
  return e("div",{className:"tab-group-empty",children:"No panels available"});const N=/* @__PURE__ */e("div",{className:"tab-list "+("top"===u||"bottom"===u||p?"centered":""),role:"tablist",children:x.map((r,o)=>/* @__PURE__ */e("button",{role:"tab","aria-selected":o===C,"aria-controls":`tabpanel-${r.id}`,id:`tab-${r.id}`,className:"tab-button "+(o===C?"active":""),onClick:()=>(e=>{b||v(e),f?.(e)})(o),title:r.icon?r.label:void 0,children:r.icon?/* @__PURE__ */t(n,{children:[
19
19
  /* @__PURE__ */e("span",{className:"tab-icon",children:r.icon}),
20
- /* @__PURE__ */e("span",{className:"tab-label",children:r.label})]}):r.label},r.id))}),E=S?/* @__PURE__ */e("div",{className:"tab-content",role:"tabpanel",id:`tabpanel-${S.id}`,"aria-labelledby":`tab-${S.id}`,children:S.content}):null;/* @__PURE__ */
21
- return t("div",{className:`tab-group tab-position-${u} ${s}`,style:w,children:[!h&&("top"===u||"left"===u)&&N,E,!h&&("bottom"===u||"right"===u)&&N]})},T={x:0,y:0,width:0,height:0},A=s(null),k=({slot:t,children:n})=>{const r=i(null),[s,c]=o(T),d=a(()=>{if(r.current){const e=r.current.getBoundingClientRect();c({x:e.left,y:e.top,width:e.width,height:e.height})}},[]);l(()=>{const e=r.current;if(!e)return;d();const t=new ResizeObserver(()=>{d()});return t.observe(e),window.addEventListener("resize",d),window.addEventListener("scroll",d,!0),()=>{t.disconnect(),window.removeEventListener("resize",d),window.removeEventListener("scroll",d,!0)}},[d]);const u={slot:t,bounds:s};/* @__PURE__ */
22
- return e(A.Provider,{value:u,children:/* @__PURE__ */e("div",{ref:r,className:"panel-bounds-container",style:{width:"100%",height:"100%"},children:n})})};function L(){const e=c(A);return e?{slot:e.slot,bounds:e.bounds,isInPanel:!0}:{slot:null,bounds:T,isInPanel:!1}}function $(){const{bounds:e}=L();return{offsetX:e.x,offsetY:e.y}}const P=({panels:n,layout:r,slotDataAttributes:s={},collapsiblePanels:c={left:!0,middle:!1,right:!0},defaultSizes:d={left:20,middle:60,right:20},minSizes:u={left:5,middle:10,right:5},className:p="",collapsed:h={left:!1,middle:!1,right:!1},style:m,showCollapseButtons:f=!1,animationDuration:w=300,animationEasing:x="cubic-bezier(0.4, 0, 0.2, 1)",theme:C,onLeftCollapseStart:R,onLeftCollapseComplete:N,onLeftExpandStart:E,onLeftExpandComplete:z,onMiddleCollapseStart:D,onMiddleCollapseComplete:T,onMiddleExpandStart:A,onMiddleExpandComplete:L,onRightCollapseStart:$,onRightCollapseComplete:P,onRightExpandStart:F,onRightExpandComplete:B,onPanelResize:O})=>{const I=null!==r.left&&void 0!==r.left,q=null!==r.middle&&void 0!==r.middle,W=null!==r.right&&void 0!==r.right,H=[I,q,W].filter(Boolean).length,j={left:I?d?.left??(2===H?50:3===H?20:100):0,middle:q?d?.middle??(2===H?50:3===H?60:100):0,right:W?d?.right??(2===H?50:3===H?20:100):0},K=u?.left??5,U=u?.middle??10,X=u?.right??5,[Y,V]=o(h.left||!I),[J,G]=o(h.middle||!q),[_,Q]=o(h.right||!W),[Z,ee]=o(!1),[te,ne]=o(!1),[re,oe]=o(!1),[ie,ae]=o(!1),le=Y&&!Z,se=J&&!te,ce=_&&!re,de=a(e=>{if(!e)return null;const t=n.find(t=>t.id===e);return t?.content||null},[n]),ue=a(t=>{if(null===t)return null;if("object"==typeof t&&"type"in t){const r=t;return"tabs"===r.type?/* @__PURE__ */e(M,{panelIds:r.panels,panels:n,config:r.config,theme:C}):null}return de(t)},[n,de,C]),pe=ue(r.left??null),he=ue(r.middle??null),me=ue(r.right??null),[fe,ge]=o(h.left||!I?0:j.left),[ve,be]=o(h.middle||!q?0:j.middle),[ye,we]=o(h.right||!W?0:j.right),[xe,Ce]=o(j.left),[Se,Re]=o(j.middle),[Ne,Ee]=o(j.right),ze=i(null),De=i(null),Me=i(null),Te=i(null),Ae=i(void 0),ke=i(void 0),Le=i(void 0),$e=i(void 0),Pe=i(void 0),Fe=i(void 0),Be=a((e,t)=>{const n=e.filter(e=>e.panelRef.current);if(0===n.length)return;n.forEach(e=>{e.animationFrameRef.current&&cancelAnimationFrame(e.animationFrameRef.current)});let r=0;const o=()=>{r++;const e=r/10;if(e>=1)return n.forEach(e=>{e.panelRef.current&&(0===e.toSize?e.panelRef.current.collapse():e.panelRef.current.resize(e.toSize))}),void(t&&t());const i=e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2;n.forEach(e=>{if(e.panelRef.current){const t=e.fromSize+(e.toSize-e.fromSize)*i;e.panelRef.current.resize(t)}}),n[0].animationFrameRef.current=requestAnimationFrame(()=>{setTimeout(o,w/10)})};o()},[w]),Oe=a(()=>{Z||ie||!c.left||(y(()=>{ee(!0),ne(!0),oe(!0),V(!0)}),R&&R(),Ae.current&&cancelAnimationFrame(Ae.current),Ae.current=requestAnimationFrame(()=>{const e=ze.current?.getLayout(),t=Math.round(1e3*(e?.left??fe))/1e3,n=Math.round(1e3*(e?.middle??ve))/1e3,r=Math.round(1e3*(e?.right??ye))/1e3,o=n+r,i=o>0?n/o*100:q?50:0,a=o>0?r/o*100:W?50:0;i>0&&Re(i),a>0&&Ee(a),Be([{panelRef:De,fromSize:t,toSize:0,animationFrameRef:Ae,startTimeRef:$e},{panelRef:Me,fromSize:n,toSize:i,animationFrameRef:ke,startTimeRef:Pe},{panelRef:Te,fromSize:r,toSize:a,animationFrameRef:Le,startTimeRef:Fe}],()=>{ge(0),be(i),we(a),ee(!1),ne(!1),oe(!1),N&&N()})}))},[Z,ie,fe,ve,ye,q,W,c.left,Be,R,N]),Ie=a(()=>{Z||ie||!c.left||(y(()=>{ee(!0),ne(!0),oe(!0),V(!1)}),E&&E(),Ae.current&&cancelAnimationFrame(Ae.current),Ae.current=requestAnimationFrame(()=>{const e=ze.current?.getLayout(),t=Math.round(1e3*(e?.left??0))/1e3,n=Math.round(1e3*(e?.middle??ve))/1e3,r=Math.round(1e3*(e?.right??ye))/1e3,o=xe||j.left,i=100-o,a=n+r,l=a>0?n/a*i:q?i/2:0,s=a>0?r/a*i:W?i/2:0;l>0&&Re(l),s>0&&Ee(s),Be([{panelRef:De,fromSize:t,toSize:o,animationFrameRef:Ae,startTimeRef:$e},{panelRef:Me,fromSize:n,toSize:l,animationFrameRef:ke,startTimeRef:Pe},{panelRef:Te,fromSize:r,toSize:s,animationFrameRef:Le,startTimeRef:Fe}],()=>{ge(o),be(l),we(s),ee(!1),ne(!1),oe(!1),z&&z()})}))},[Z,ie,ve,ye,j.left,xe,q,W,c.left,Be,E,z]),qe=a(()=>{re||ie||!c.right||(y(()=>{ee(!0),ne(!0),oe(!0),Q(!0)}),$&&$(),Le.current&&cancelAnimationFrame(Le.current),Le.current=requestAnimationFrame(()=>{const e=ze.current?.getLayout(),t=Math.round(1e3*(e?.left??fe))/1e3,n=Math.round(1e3*(e?.middle??ve))/1e3,r=Math.round(1e3*(e?.right??ye))/1e3,o=t+n,i=o>0?t/o*100:I?50:0,a=o>0?n/o*100:q?50:0;i>0&&Ce(i),a>0&&Re(a),Be([{panelRef:De,fromSize:t,toSize:i,animationFrameRef:Ae,startTimeRef:$e},{panelRef:Me,fromSize:n,toSize:a,animationFrameRef:ke,startTimeRef:Pe},{panelRef:Te,fromSize:r,toSize:0,animationFrameRef:Le,startTimeRef:Fe}],()=>{ge(i),be(a),we(0),ee(!1),ne(!1),oe(!1),P&&P()})}))},[re,ie,fe,ve,ye,I,q,c.right,Be,$,P]),We=a(()=>{re||ie||!c.right||(y(()=>{ee(!0),ne(!0),oe(!0),Q(!1)}),F&&F(),Le.current&&cancelAnimationFrame(Le.current),Le.current=requestAnimationFrame(()=>{const e=ze.current?.getLayout(),t=Math.round(1e3*(e?.left??fe))/1e3,n=Math.round(1e3*(e?.middle??ve))/1e3,r=Math.round(1e3*(e?.right??0))/1e3,o=Ne||j.right,i=100-o,a=t+n,l=a>0?t/a*i:I?i/2:0,s=a>0?n/a*i:q?i/2:0;l>0&&Ce(l),s>0&&Re(s),Be([{panelRef:De,fromSize:t,toSize:l,animationFrameRef:Ae,startTimeRef:$e},{panelRef:Me,fromSize:n,toSize:s,animationFrameRef:ke,startTimeRef:Pe},{panelRef:Te,fromSize:r,toSize:o,animationFrameRef:Le,startTimeRef:Fe}],()=>{ge(l),be(s),we(o),ee(!1),ne(!1),oe(!1),B&&B()})}))},[re,ie,fe,ve,j.right,Ne,I,q,c.right,Be,F,B]),He=a(()=>{Y?Ie():Oe()},[Y,Oe,Ie]),je=a(()=>{te||ie||!c.middle||(y(()=>{ee(!0),ne(!0),oe(!0),G(!0)}),D&&D(),ke.current&&cancelAnimationFrame(ke.current),ke.current=requestAnimationFrame(()=>{const e=ze.current?.getLayout(),t=Math.round(1e3*(e?.left??fe))/1e3,n=Math.round(1e3*(e?.middle??ve))/1e3,r=Math.round(1e3*(e?.right??ye))/1e3,o=t+r,i=o>0?t/o*100:I?50:0,a=o>0?r/o*100:W?50:0;i>0&&Ce(i),a>0&&Ee(a),Be([{panelRef:De,fromSize:t,toSize:i,animationFrameRef:Ae,startTimeRef:$e},{panelRef:Me,fromSize:n,toSize:0,animationFrameRef:ke,startTimeRef:Pe},{panelRef:Te,fromSize:r,toSize:a,animationFrameRef:Le,startTimeRef:Fe}],()=>{ge(i),be(0),we(a),ee(!1),ne(!1),oe(!1),T&&T()})}))},[te,ie,fe,ve,ye,I,W,c.middle,Be,D,T]),Ke=a(()=>{te||ie||!c.middle||(y(()=>{ee(!0),ne(!0),oe(!0),G(!1)}),A&&A(),ke.current&&cancelAnimationFrame(ke.current),ke.current=requestAnimationFrame(()=>{const e=ze.current?.getLayout(),t=Math.round(1e3*(e?.left??fe))/1e3,n=Math.round(1e3*(e?.middle??0))/1e3,r=Math.round(1e3*(e?.right??ye))/1e3,o=Se||j.middle,i=100-o,a=t+r,l=a>0?t/a*i:I?i/2:0,s=a>0?r/a*i:W?i/2:0;l>0&&Ce(l),s>0&&Ee(s),Be([{panelRef:De,fromSize:t,toSize:l,animationFrameRef:Ae,startTimeRef:$e},{panelRef:Me,fromSize:n,toSize:o,animationFrameRef:ke,startTimeRef:Pe},{panelRef:Te,fromSize:r,toSize:s,animationFrameRef:Le,startTimeRef:Fe}],()=>{ge(l),be(o),we(s),ee(!1),ne(!1),oe(!1),L&&L()})}))},[te,ie,fe,ye,j.middle,Se,I,W,c.middle,Be,A,L]),Ue=a(()=>{_?We():qe()},[_,qe,We]),Xe=a(e=>{if(!Z&&!te&&!re){const t=e.asPercentage;ge(t),t>0&&(Ce(t),V(!1))}},[Z,te,re]),Ye=a(e=>{if(!Z&&!te&&!re){const t=e.asPercentage;be(t),t>0&&(Re(t),G(!1))}},[Z,te,re]),Ve=a(e=>{if(!Z&&!te&&!re){const t=e.asPercentage;we(t),t>0&&(Ee(t),Q(!1))}},[Z,te,re]),Je=a(()=>{if(O){O({left:Y?xe:fe,middle:J?Se:ve,right:_?Ne:ye})}},[fe,ve,ye,Y,J,_,xe,Se,Ne,O]),Ge=a(()=>{Z||te||re||ae(!0)},[Z,te,re]),_e=a(()=>{ae(!1),Je()},[Je]);l(()=>{void 0!==h.left&&h.left!==Y&&queueMicrotask(()=>{h.left?Oe():Ie()})},[h.left,Y,Oe,Ie]),l(()=>{void 0!==h.middle&&h.middle!==J&&queueMicrotask(()=>{h.middle?je():Ke()})},[h.middle,J,je,Ke]),l(()=>{void 0!==h.right&&h.right!==_&&queueMicrotask(()=>{h.right?qe():We()})},[h.right,_,qe,We]),l(()=>()=>{Ae.current&&cancelAnimationFrame(Ae.current),ke.current&&cancelAnimationFrame(ke.current),Le.current&&cancelAnimationFrame(Le.current)},[]);const Qe=e=>{let t="three-panel-item";return"left"===e?!c.left&&I||(t+=" collapsible-panel",Z&&!ie&&(t+=" animating"),le&&(t+=" collapsed")):"middle"===e?(t+=" middle-panel",!c.middle&&q||(t+=" collapsible-panel",te&&!ie&&(t+=" animating"),se&&(t+=" collapsed"))):"right"===e&&(!c.right&&W||(t+=" collapsible-panel",re&&!ie&&(t+=" animating"),ce&&(t+=" collapsed"))),t},Ze=Z&&!ie?{transition:`width ${w}ms ${x}`,width:Y?"0%":`${j.left}%`}:void 0,et=te&&!ie?{transition:`width ${w}ms ${x}`,width:J?"0%":`${j.middle}%`}:void 0,tt=re&&!ie?{transition:`width ${w}ms ${x}`,width:_?"0%":`${j.right}%`}:void 0,nt=S(C),rt=`${Z||te||re?0:K}%`,ot=`${Z||te||re?0:U}%`,it=`${Z||te||re?0:X}%`;/* @__PURE__ */
23
- return e("div",{className:`three-panel-layout ${p}`,style:{...nt,...m},children:/* @__PURE__ */t(g,{groupRef:ze,orientation:"horizontal",onLayoutChange:Ge,onLayoutChanged:_e,children:[
24
- /* @__PURE__ */e(v,{id:"left",panelRef:De,collapsible:c.left||!I,defaultSize:h.left||!I?"0%":`${j.left}%`,minSize:rt,collapsedSize:"0%",onResize:Xe,className:Qe("left"),style:Ze,...s.left||{},children:/* @__PURE__ */e("div",{className:"panel-content-wrapper",style:{opacity:Y?0:1,transition:Z?`opacity ${.5*w}ms ${x}`:"none"},children:/* @__PURE__ */e(k,{slot:"left",children:pe})})}),
25
- /* @__PURE__ */e(b,{className:"resize-handle left-handle "+(!le&&I&&q?"":"collapsed"),disabled:le||!I||!q,children:f&&c.left&&/* @__PURE__ */e("div",{className:"handle-bar",children:/* @__PURE__ */e("button",{onClick:He,className:"collapse-toggle",disabled:Z,"aria-label":Y?"Expand left panel":"Collapse left panel",children:Y?"▸":"◂"})})}),
26
- /* @__PURE__ */e(v,{id:"middle",panelRef:Me,collapsible:c.middle||!q,defaultSize:h.middle||!q?"0%":`${j.middle}%`,minSize:ot,collapsedSize:"0%",onResize:Ye,className:Qe("middle"),style:et,...s.middle||{},children:/* @__PURE__ */e("div",{className:"panel-content-wrapper",style:{opacity:J?0:1,transition:te?`opacity ${.5*w}ms ${x}`:"none"},children:/* @__PURE__ */e(k,{slot:"middle",children:he})})}),
27
- /* @__PURE__ */e(b,{className:"resize-handle right-handle "+(ce||!W||!q&&!I?"collapsed":""),disabled:ce||!W||!q&&!I,children:f&&c.right&&/* @__PURE__ */e("div",{className:"handle-bar",children:/* @__PURE__ */e("button",{onClick:Ue,className:"collapse-toggle",disabled:re,"aria-label":_?"Expand right panel":"Collapse right panel",children:_?"◂":"▸"})})}),
28
- /* @__PURE__ */e(v,{id:"right",panelRef:Te,collapsible:c.right||!W,defaultSize:h.right||!W?"0%":`${j.right}%`,minSize:it,collapsedSize:"0%",onResize:Ve,className:Qe("right"),style:tt,...s.right||{},children:/* @__PURE__ */e("div",{className:"panel-content-wrapper",style:{opacity:_?0:1,transition:re?`opacity ${.5*w}ms ${x}`:"none"},children:/* @__PURE__ */e(k,{slot:"right",children:me})})})]})})},F=d(({panels:o,className:a="",style:s,theme:c,minPanelWidth:d=350,idealPanelWidth:p=.333,showSeparator:h=!1,onPanelChange:m,preventKeyboardScroll:f=!0,disableSwipe:g=!1},v)=>{const b=i(null),y=i(!1),w=i(null),x=S(c);u(v,()=>({scrollToPanel:e=>{if(!b.current)return;const t=b.current,n=t.children[e];if(n){y.current=!0,w.current&&clearTimeout(w.current);const e=n.offsetLeft;t.scrollTo({left:e,behavior:"smooth"}),w.current=setTimeout(()=>{y.current=!1},500)}},getCurrentPanel:()=>{if(!b.current||0===b.current.children.length)return 0;const e=b.current,t=e.getBoundingClientRect().left;let n=0,r=1/0;for(let o=0;o<e.children.length;o++){const i=e.children[o].getBoundingClientRect(),a=Math.abs(i.left-t);a<r&&(r=a,n=o)}return n}}));l(()=>{if(!f||!b.current)return;const e=b.current,t=e=>{const t=e.target;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||t.isContentEditable||null!==t.closest(".xterm")||null!==t.closest('[contenteditable="true"]'))return;[" ","Space","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown"].includes(e.key)&&e.preventDefault()};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},[f]),l(()=>()=>{w.current&&clearTimeout(w.current)},[]);const C=o.length,R=2*d;let N;N=1===C||2===C?"100%":`max(${d}px, ${100*p}%)`;const E=r.useId().replace(/:/g,"_");/* @__PURE__ */
29
- return t(n,{children:[2===C&&/* @__PURE__ */e("style",{children:`\n .snap-carousel-container[data-carousel-id="${E}"][data-panel-count="2"] .snap-carousel-panel {\n width: 100%;\n }\n @container (min-width: ${R}px) {\n .snap-carousel-container[data-carousel-id="${E}"][data-panel-count="2"] .snap-carousel-panel {\n width: 50%;\n }\n }\n `}),
30
- /* @__PURE__ */e("div",{ref:b,className:`snap-carousel-container ${g?"swipe-disabled":""} ${a}`,style:{...x,...s,"--snap-carousel-min-width":`${d}px`,"--snap-carousel-ideal-width":100*p+"%","--snap-carousel-gap":h?"1px":"0px","--snap-carousel-panel-width":N,"--snap-carousel-panel-count":C,"--snap-carousel-two-panel-threshold":`${R}px`},onScroll:e=>{if(!m||!b.current||0===b.current.children.length)return;if(y.current)return;const t=b.current,n=t.getBoundingClientRect().left;let r=0,o=1/0;for(let i=0;i<t.children.length;i++){const e=t.children[i].getBoundingClientRect(),a=Math.abs(e.left-n);a<o&&(o=a,r=i)}m(r)},"data-panel-count":C,"data-carousel-id":E,children:o.map((t,n)=>/* @__PURE__ */e("div",{className:"snap-carousel-panel",children:t},n))})]})});function B(e){const[t,n]=o(()=>"undefined"!=typeof window&&window.matchMedia(e).matches);return l(()=>{if("undefined"==typeof window)return;const t=window.matchMedia(e),r=e=>{n(e.matches)};return n(t.matches),t.addEventListener?(t.addEventListener("change",r),()=>t.removeEventListener("change",r)):(t.addListener(r),()=>t.removeListener(r))},[e]),t}F.displayName="SnapCarousel";const O=({mobileBreakpoint:n="(max-width: 768px)",mobileCarouselProps:r,onMobilePanelChange:a,theme:l,layout:s,panels:c,...d})=>{const u=B(n),h=i(null),[m,f]=o(0),g=p(()=>[s?.left,s?.middle,s?.right],[s]),v=["left","middle","right"],b=p(()=>{const t=e=>{if(!e)return null;const t=c.find(t=>t.id===e);return t?.content??null},n=e=>{const t=c.find(t=>t.id===e);return t?.label??e},r=e=>{const t=c.find(t=>t.id===e);return t?.icon??null};return g.map((o,i)=>((o,i)=>{if(null==o)return null;if("object"==typeof o&&"type"in o){const t=o;if("tabs"===t.type){const o=t.panels[0],a=t.panels.length>0?n(o):"Tab Group",s=t.panels.length>0?r(o):null;return{content:/* @__PURE__ */e(M,{panelIds:t.panels,panels:c,config:t.config,theme:l}),label:a,icon:s,slot:i}}return null}return{content:t(o),label:n(o),icon:r(o),slot:i}})(o,v[i])).filter(e=>null!==e)},[g,c,l]),y=e=>{f(e),r?.onPanelChange?.(e);const t=b[e]?.slot;t&&a?.(e,t)},{onPanelChange:w,...x}=r??{},C=R(l);if(u){if(0===b.length)return null;const n=b.map(e=>e.content);/* @__PURE__ */
20
+ /* @__PURE__ */e("span",{className:"tab-label",children:r.label})]}):r.label},r.id))}),z=S?/* @__PURE__ */e("div",{className:"tab-content",role:"tabpanel",id:`tabpanel-${S.id}`,"aria-labelledby":`tab-${S.id}`,children:S.content}):null;/* @__PURE__ */
21
+ return t("div",{className:`tab-group tab-position-${u} ${s}`,style:w,children:[!h&&("top"===u||"left"===u)&&N,z,!h&&("bottom"===u||"right"===u)&&N]})},T={x:0,y:0,width:0,height:0},A=s(null),k=({slot:t,children:n})=>{const r=i(null),[s,c]=o(T),d=a(()=>{if(r.current){const e=r.current.getBoundingClientRect();c({x:e.left,y:e.top,width:e.width,height:e.height})}},[]);l(()=>{const e=r.current;if(!e)return;d();const t=new ResizeObserver(()=>{d()});return t.observe(e),window.addEventListener("resize",d),window.addEventListener("scroll",d,!0),()=>{t.disconnect(),window.removeEventListener("resize",d),window.removeEventListener("scroll",d,!0)}},[d]);const u={slot:t,bounds:s};/* @__PURE__ */
22
+ return e(A.Provider,{value:u,children:/* @__PURE__ */e("div",{ref:r,className:"panel-bounds-container",style:{width:"100%",height:"100%"},children:n})})};function L(){const e=c(A);return e?{slot:e.slot,bounds:e.bounds,isInPanel:!0}:{slot:null,bounds:T,isInPanel:!1}}function $(){const{bounds:e}=L();return{offsetX:e.x,offsetY:e.y}}const P=d(({panels:n,layout:r,slotDataAttributes:s={},collapsiblePanels:c={left:!0,middle:!1,right:!0},defaultSizes:d={left:20,middle:60,right:20},minSizes:p={left:5,middle:10,right:5},className:h="",collapsed:m={left:!1,middle:!1,right:!1},style:f,showCollapseButtons:w=!1,animationDuration:x=300,animationEasing:C="cubic-bezier(0.4, 0, 0.2, 1)",theme:R,onLeftCollapseStart:N,onLeftCollapseComplete:z,onLeftExpandStart:E,onLeftExpandComplete:D,onMiddleCollapseStart:T,onMiddleCollapseComplete:A,onMiddleExpandStart:L,onMiddleExpandComplete:$,onRightCollapseStart:P,onRightCollapseComplete:F,onRightExpandStart:B,onRightExpandComplete:O,onPanelResize:I},q)=>{const W=null!==r.left&&void 0!==r.left,H=null!==r.middle&&void 0!==r.middle,j=null!==r.right&&void 0!==r.right,K=[W,H,j].filter(Boolean).length,U={left:W?d?.left??(2===K?50:3===K?20:100):0,middle:H?d?.middle??(2===K?50:3===K?60:100):0,right:j?d?.right??(2===K?50:3===K?20:100):0},X=p?.left??5,Y=p?.middle??10,V=p?.right??5,[J,G]=o(m.left||!W),[_,Q]=o(m.middle||!H),[Z,ee]=o(m.right||!j),[te,ne]=o(!1),[re,oe]=o(!1),[ie,ae]=o(!1),[le,se]=o(!1),ce=J&&!te,de=_&&!re,ue=Z&&!ie,pe=a(e=>{if(!e)return null;const t=n.find(t=>t.id===e);return t?.content||null},[n]),he=a(t=>{if(null===t)return null;if("object"==typeof t&&"type"in t){const r=t;return"tabs"===r.type?/* @__PURE__ */e(M,{panelIds:r.panels,panels:n,config:r.config,theme:R}):null}return pe(t)},[n,pe,R]),me=he(r.left??null),fe=he(r.middle??null),ge=he(r.right??null),[ve,be]=o(m.left||!W?0:U.left),[ye,we]=o(m.middle||!H?0:U.middle),[xe,Ce]=o(m.right||!j?0:U.right),[Se,Re]=o(U.left),[Ne,ze]=o(U.middle),[Ee,De]=o(U.right),Me=i(null),Te=i(null),Ae=i(null),ke=i(null);u(q,()=>({setLayout:e=>{Te.current&&(0===e.left?(Te.current.collapse(),G(!0)):(Te.current.resize(e.left),G(!1),Re(e.left)),be(e.left)),Ae.current&&(0===e.middle?(Ae.current.collapse(),Q(!0)):(Ae.current.resize(e.middle),Q(!1),ze(e.middle)),we(e.middle)),ke.current&&(0===e.right?(ke.current.collapse(),ee(!0)):(ke.current.resize(e.right),ee(!1),De(e.right)),Ce(e.right))},getLayout:()=>({left:ve,middle:ye,right:xe})}),[ve,ye,xe]);const Le=i(void 0),$e=i(void 0),Pe=i(void 0),Fe=i(void 0),Be=i(void 0),Oe=i(void 0),Ie=a((e,t)=>{const n=e.filter(e=>e.panelRef.current);if(0===n.length)return;n.forEach(e=>{e.animationFrameRef.current&&cancelAnimationFrame(e.animationFrameRef.current)});let r=0;const o=()=>{r++;const e=r/10;if(e>=1)return n.forEach(e=>{e.panelRef.current&&(0===e.toSize?e.panelRef.current.collapse():e.panelRef.current.resize(e.toSize))}),void(t&&t());const i=e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2;n.forEach(e=>{if(e.panelRef.current){const t=e.fromSize+(e.toSize-e.fromSize)*i;e.panelRef.current.resize(t)}}),n[0].animationFrameRef.current=requestAnimationFrame(()=>{setTimeout(o,x/10)})};o()},[x]),qe=a(()=>{te||le||!c.left||(y(()=>{ne(!0),oe(!0),ae(!0),G(!0)}),N&&N(),Le.current&&cancelAnimationFrame(Le.current),Le.current=requestAnimationFrame(()=>{const e=Me.current?.getLayout(),t=Math.round(1e3*(e?.left??ve))/1e3,n=Math.round(1e3*(e?.middle??ye))/1e3,r=Math.round(1e3*(e?.right??xe))/1e3,o=n+r,i=o>0?n/o*100:H?50:0,a=o>0?r/o*100:j?50:0;i>0&&ze(i),a>0&&De(a),Ie([{panelRef:Te,fromSize:t,toSize:0,animationFrameRef:Le,startTimeRef:Fe},{panelRef:Ae,fromSize:n,toSize:i,animationFrameRef:$e,startTimeRef:Be},{panelRef:ke,fromSize:r,toSize:a,animationFrameRef:Pe,startTimeRef:Oe}],()=>{be(0),we(i),Ce(a),ne(!1),oe(!1),ae(!1),z&&z()})}))},[te,le,ve,ye,xe,H,j,c.left,Ie,N,z]),We=a(()=>{te||le||!c.left||(y(()=>{ne(!0),oe(!0),ae(!0),G(!1)}),E&&E(),Le.current&&cancelAnimationFrame(Le.current),Le.current=requestAnimationFrame(()=>{const e=Me.current?.getLayout(),t=Math.round(1e3*(e?.left??0))/1e3,n=Math.round(1e3*(e?.middle??ye))/1e3,r=Math.round(1e3*(e?.right??xe))/1e3,o=Se||U.left,i=100-o,a=n+r,l=a>0?n/a*i:H?i/2:0,s=a>0?r/a*i:j?i/2:0;l>0&&ze(l),s>0&&De(s),Ie([{panelRef:Te,fromSize:t,toSize:o,animationFrameRef:Le,startTimeRef:Fe},{panelRef:Ae,fromSize:n,toSize:l,animationFrameRef:$e,startTimeRef:Be},{panelRef:ke,fromSize:r,toSize:s,animationFrameRef:Pe,startTimeRef:Oe}],()=>{be(o),we(l),Ce(s),ne(!1),oe(!1),ae(!1),D&&D()})}))},[te,le,ye,xe,U.left,Se,H,j,c.left,Ie,E,D]),He=a(()=>{ie||le||!c.right||(y(()=>{ne(!0),oe(!0),ae(!0),ee(!0)}),P&&P(),Pe.current&&cancelAnimationFrame(Pe.current),Pe.current=requestAnimationFrame(()=>{const e=Me.current?.getLayout(),t=Math.round(1e3*(e?.left??ve))/1e3,n=Math.round(1e3*(e?.middle??ye))/1e3,r=Math.round(1e3*(e?.right??xe))/1e3,o=t+n,i=o>0?t/o*100:W?50:0,a=o>0?n/o*100:H?50:0;i>0&&Re(i),a>0&&ze(a),Ie([{panelRef:Te,fromSize:t,toSize:i,animationFrameRef:Le,startTimeRef:Fe},{panelRef:Ae,fromSize:n,toSize:a,animationFrameRef:$e,startTimeRef:Be},{panelRef:ke,fromSize:r,toSize:0,animationFrameRef:Pe,startTimeRef:Oe}],()=>{be(i),we(a),Ce(0),ne(!1),oe(!1),ae(!1),F&&F()})}))},[ie,le,ve,ye,xe,W,H,c.right,Ie,P,F]),je=a(()=>{ie||le||!c.right||(y(()=>{ne(!0),oe(!0),ae(!0),ee(!1)}),B&&B(),Pe.current&&cancelAnimationFrame(Pe.current),Pe.current=requestAnimationFrame(()=>{const e=Me.current?.getLayout(),t=Math.round(1e3*(e?.left??ve))/1e3,n=Math.round(1e3*(e?.middle??ye))/1e3,r=Math.round(1e3*(e?.right??0))/1e3,o=Ee||U.right,i=100-o,a=t+n,l=a>0?t/a*i:W?i/2:0,s=a>0?n/a*i:H?i/2:0;l>0&&Re(l),s>0&&ze(s),Ie([{panelRef:Te,fromSize:t,toSize:l,animationFrameRef:Le,startTimeRef:Fe},{panelRef:Ae,fromSize:n,toSize:s,animationFrameRef:$e,startTimeRef:Be},{panelRef:ke,fromSize:r,toSize:o,animationFrameRef:Pe,startTimeRef:Oe}],()=>{be(l),we(s),Ce(o),ne(!1),oe(!1),ae(!1),O&&O()})}))},[ie,le,ve,ye,U.right,Ee,W,H,c.right,Ie,B,O]),Ke=a(()=>{J?We():qe()},[J,qe,We]),Ue=a(()=>{re||le||!c.middle||(y(()=>{ne(!0),oe(!0),ae(!0),Q(!0)}),T&&T(),$e.current&&cancelAnimationFrame($e.current),$e.current=requestAnimationFrame(()=>{const e=Me.current?.getLayout(),t=Math.round(1e3*(e?.left??ve))/1e3,n=Math.round(1e3*(e?.middle??ye))/1e3,r=Math.round(1e3*(e?.right??xe))/1e3,o=t+r,i=o>0?t/o*100:W?50:0,a=o>0?r/o*100:j?50:0;i>0&&Re(i),a>0&&De(a),Ie([{panelRef:Te,fromSize:t,toSize:i,animationFrameRef:Le,startTimeRef:Fe},{panelRef:Ae,fromSize:n,toSize:0,animationFrameRef:$e,startTimeRef:Be},{panelRef:ke,fromSize:r,toSize:a,animationFrameRef:Pe,startTimeRef:Oe}],()=>{be(i),we(0),Ce(a),ne(!1),oe(!1),ae(!1),A&&A()})}))},[re,le,ve,ye,xe,W,j,c.middle,Ie,T,A]),Xe=a(()=>{re||le||!c.middle||(y(()=>{ne(!0),oe(!0),ae(!0),Q(!1)}),L&&L(),$e.current&&cancelAnimationFrame($e.current),$e.current=requestAnimationFrame(()=>{const e=Me.current?.getLayout(),t=Math.round(1e3*(e?.left??ve))/1e3,n=Math.round(1e3*(e?.middle??0))/1e3,r=Math.round(1e3*(e?.right??xe))/1e3,o=Ne||U.middle,i=100-o,a=t+r,l=a>0?t/a*i:W?i/2:0,s=a>0?r/a*i:j?i/2:0;l>0&&Re(l),s>0&&De(s),Ie([{panelRef:Te,fromSize:t,toSize:l,animationFrameRef:Le,startTimeRef:Fe},{panelRef:Ae,fromSize:n,toSize:o,animationFrameRef:$e,startTimeRef:Be},{panelRef:ke,fromSize:r,toSize:s,animationFrameRef:Pe,startTimeRef:Oe}],()=>{be(l),we(o),Ce(s),ne(!1),oe(!1),ae(!1),$&&$()})}))},[re,le,ve,xe,U.middle,Ne,W,j,c.middle,Ie,L,$]),Ye=a(()=>{Z?je():He()},[Z,He,je]),Ve=a(e=>{if(!te&&!re&&!ie){const t=e.asPercentage;be(t),t>0&&(Re(t),G(!1))}},[te,re,ie]),Je=a(e=>{if(!te&&!re&&!ie){const t=e.asPercentage;we(t),t>0&&(ze(t),Q(!1))}},[te,re,ie]),Ge=a(e=>{if(!te&&!re&&!ie){const t=e.asPercentage;Ce(t),t>0&&(De(t),ee(!1))}},[te,re,ie]),_e=a(()=>{if(I){I({left:J?Se:ve,middle:_?Ne:ye,right:Z?Ee:xe})}},[ve,ye,xe,J,_,Z,Se,Ne,Ee,I]),Qe=a(()=>{te||re||ie||se(!0)},[te,re,ie]),Ze=a(()=>{se(!1),_e()},[_e]);l(()=>{void 0!==m.left&&m.left!==J&&queueMicrotask(()=>{m.left?qe():We()})},[m.left,J,qe,We]),l(()=>{void 0!==m.middle&&m.middle!==_&&queueMicrotask(()=>{m.middle?Ue():Xe()})},[m.middle,_,Ue,Xe]),l(()=>{void 0!==m.right&&m.right!==Z&&queueMicrotask(()=>{m.right?He():je()})},[m.right,Z,He,je]),l(()=>()=>{Le.current&&cancelAnimationFrame(Le.current),$e.current&&cancelAnimationFrame($e.current),Pe.current&&cancelAnimationFrame(Pe.current)},[]);const et=e=>{let t="three-panel-item";return"left"===e?!c.left&&W||(t+=" collapsible-panel",te&&!le&&(t+=" animating"),ce&&(t+=" collapsed")):"middle"===e?(t+=" middle-panel",!c.middle&&H||(t+=" collapsible-panel",re&&!le&&(t+=" animating"),de&&(t+=" collapsed"))):"right"===e&&(!c.right&&j||(t+=" collapsible-panel",ie&&!le&&(t+=" animating"),ue&&(t+=" collapsed"))),t},tt=te&&!le?{transition:`width ${x}ms ${C}`,width:J?"0%":`${U.left}%`}:void 0,nt=re&&!le?{transition:`width ${x}ms ${C}`,width:_?"0%":`${U.middle}%`}:void 0,rt=ie&&!le?{transition:`width ${x}ms ${C}`,width:Z?"0%":`${U.right}%`}:void 0,ot=S(R),it=`${te||re||ie?0:X}%`,at=`${te||re||ie?0:Y}%`,lt=`${te||re||ie?0:V}%`;/* @__PURE__ */
23
+ return e("div",{className:`three-panel-layout ${h}`,style:{...ot,...f},children:/* @__PURE__ */t(g,{groupRef:Me,orientation:"horizontal",onLayoutChange:Qe,onLayoutChanged:Ze,children:[
24
+ /* @__PURE__ */e(v,{id:"left",panelRef:Te,collapsible:c.left||!W,defaultSize:m.left||!W?"0%":`${U.left}%`,minSize:it,collapsedSize:"0%",onResize:Ve,className:et("left"),style:tt,...s.left||{},children:/* @__PURE__ */e("div",{className:"panel-content-wrapper",style:{opacity:J?0:1,transition:te?`opacity ${.5*x}ms ${C}`:"none"},children:/* @__PURE__ */e(k,{slot:"left",children:me})})}),
25
+ /* @__PURE__ */e(b,{className:"resize-handle left-handle "+(!ce&&W&&H?"":"collapsed"),disabled:ce||!W||!H,children:w&&c.left&&/* @__PURE__ */e("div",{className:"handle-bar",children:/* @__PURE__ */e("button",{onClick:Ke,className:"collapse-toggle",disabled:te,"aria-label":J?"Expand left panel":"Collapse left panel",children:J?"▸":"◂"})})}),
26
+ /* @__PURE__ */e(v,{id:"middle",panelRef:Ae,collapsible:c.middle||!H,defaultSize:m.middle||!H?"0%":`${U.middle}%`,minSize:at,collapsedSize:"0%",onResize:Je,className:et("middle"),style:nt,...s.middle||{},children:/* @__PURE__ */e("div",{className:"panel-content-wrapper",style:{opacity:_?0:1,transition:re?`opacity ${.5*x}ms ${C}`:"none"},children:/* @__PURE__ */e(k,{slot:"middle",children:fe})})}),
27
+ /* @__PURE__ */e(b,{className:"resize-handle right-handle "+(ue||!j||!H&&!W?"collapsed":""),disabled:ue||!j||!H&&!W,children:w&&c.right&&/* @__PURE__ */e("div",{className:"handle-bar",children:/* @__PURE__ */e("button",{onClick:Ye,className:"collapse-toggle",disabled:ie,"aria-label":Z?"Expand right panel":"Collapse right panel",children:Z?"◂":"▸"})})}),
28
+ /* @__PURE__ */e(v,{id:"right",panelRef:ke,collapsible:c.right||!j,defaultSize:m.right||!j?"0%":`${U.right}%`,minSize:lt,collapsedSize:"0%",onResize:Ge,className:et("right"),style:rt,...s.right||{},children:/* @__PURE__ */e("div",{className:"panel-content-wrapper",style:{opacity:Z?0:1,transition:ie?`opacity ${.5*x}ms ${C}`:"none"},children:/* @__PURE__ */e(k,{slot:"right",children:ge})})})]})})});P.displayName="ConfigurablePanelLayout";const F=d(({panels:o,className:a="",style:s,theme:c,minPanelWidth:d=350,idealPanelWidth:p=.333,showSeparator:h=!1,onPanelChange:m,preventKeyboardScroll:f=!0,disableSwipe:g=!1},v)=>{const b=i(null),y=i(!1),w=i(null),x=S(c);u(v,()=>({scrollToPanel:e=>{if(!b.current)return;const t=b.current,n=t.children[e];if(n){y.current=!0,w.current&&clearTimeout(w.current);const e=n.offsetLeft;t.scrollTo({left:e,behavior:"smooth"}),w.current=setTimeout(()=>{y.current=!1},500)}},getCurrentPanel:()=>{if(!b.current||0===b.current.children.length)return 0;const e=b.current,t=e.getBoundingClientRect().left;let n=0,r=1/0;for(let o=0;o<e.children.length;o++){const i=e.children[o].getBoundingClientRect(),a=Math.abs(i.left-t);a<r&&(r=a,n=o)}return n}}));l(()=>{if(!f||!b.current)return;const e=b.current,t=e=>{const t=e.target;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||t.isContentEditable||null!==t.closest(".xterm")||null!==t.closest('[contenteditable="true"]'))return;[" ","Space","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown"].includes(e.key)&&e.preventDefault()};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},[f]),l(()=>()=>{w.current&&clearTimeout(w.current)},[]);const C=o.length,R=2*d;let N;N=1===C||2===C?"100%":`max(${d}px, ${100*p}%)`;const z=r.useId().replace(/:/g,"_");/* @__PURE__ */
29
+ return t(n,{children:[2===C&&/* @__PURE__ */e("style",{children:`\n .snap-carousel-container[data-carousel-id="${z}"][data-panel-count="2"] .snap-carousel-panel {\n width: 100%;\n }\n @container (min-width: ${R}px) {\n .snap-carousel-container[data-carousel-id="${z}"][data-panel-count="2"] .snap-carousel-panel {\n width: 50%;\n }\n }\n `}),
30
+ /* @__PURE__ */e("div",{ref:b,className:`snap-carousel-container ${g?"swipe-disabled":""} ${a}`,style:{...x,...s,"--snap-carousel-min-width":`${d}px`,"--snap-carousel-ideal-width":100*p+"%","--snap-carousel-gap":h?"1px":"0px","--snap-carousel-panel-width":N,"--snap-carousel-panel-count":C,"--snap-carousel-two-panel-threshold":`${R}px`},onScroll:e=>{if(!m||!b.current||0===b.current.children.length)return;if(y.current)return;const t=b.current,n=t.getBoundingClientRect().left;let r=0,o=1/0;for(let i=0;i<t.children.length;i++){const e=t.children[i].getBoundingClientRect(),a=Math.abs(e.left-n);a<o&&(o=a,r=i)}m(r)},"data-panel-count":C,"data-carousel-id":z,children:o.map((t,n)=>/* @__PURE__ */e("div",{className:"snap-carousel-panel",children:t},n))})]})});function B(e){const[t,n]=o(()=>"undefined"!=typeof window&&window.matchMedia(e).matches);return l(()=>{if("undefined"==typeof window)return;const t=window.matchMedia(e),r=e=>{n(e.matches)};return n(t.matches),t.addEventListener?(t.addEventListener("change",r),()=>t.removeEventListener("change",r)):(t.addListener(r),()=>t.removeListener(r))},[e]),t}F.displayName="SnapCarousel";const O=({mobileBreakpoint:n="(max-width: 768px)",mobileCarouselProps:r,onMobilePanelChange:a,theme:l,layout:s,panels:c,...d})=>{const u=B(n),h=i(null),[m,f]=o(0),g=p(()=>[s?.left,s?.middle,s?.right],[s]),v=["left","middle","right"],b=p(()=>{const t=e=>{if(!e)return null;const t=c.find(t=>t.id===e);return t?.content??null},n=e=>{const t=c.find(t=>t.id===e);return t?.label??e},r=e=>{const t=c.find(t=>t.id===e);return t?.icon??null};return g.map((o,i)=>((o,i)=>{if(null==o)return null;if("object"==typeof o&&"type"in o){const t=o;if("tabs"===t.type){const o=t.panels[0],a=t.panels.length>0?n(o):"Tab Group",s=t.panels.length>0?r(o):null;return{content:/* @__PURE__ */e(M,{panelIds:t.panels,panels:c,config:t.config,theme:l}),label:a,icon:s,slot:i}}return null}return{content:t(o),label:n(o),icon:r(o),slot:i}})(o,v[i])).filter(e=>null!==e)},[g,c,l]),y=e=>{f(e),r?.onPanelChange?.(e);const t=b[e]?.slot;t&&a?.(e,t)},{onPanelChange:w,...x}=r??{},C=R(l);if(u){if(0===b.length)return null;const n=b.map(e=>e.content);/* @__PURE__ */
31
31
  return t("div",{className:"mobile-tab-layout",style:C,children:[
32
32
  /* @__PURE__ */e("div",{className:"mobile-tab-content",children:/* @__PURE__ */e(F,{ref:h,theme:l,panels:n,minPanelWidth:0,idealPanelWidth:1,disableSwipe:!0,onPanelChange:y,...x})}),
33
33
  /* @__PURE__ */e("nav",{className:"mobile-tab-nav",role:"tablist",children:b.map((n,r)=>/* @__PURE__ */t("button",{role:"tab","aria-selected":r===m,className:"mobile-tab-button "+(r===m?"active":""),onClick:()=>(e=>{f(e),h.current?.scrollToPanel(e);const t=b[e]?.slot;t&&a?.(e,t)})(r),children:[n.icon&&/* @__PURE__ */e("span",{className:"tab-icon",children:n.icon}),
34
34
  /* @__PURE__ */e("span",{className:"tab-label",children:n.label})]},r))})]})}/* @__PURE__ */
35
- return e(P,{theme:l,layout:s,panels:c,...d})},I="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function q(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function W(e){return"nodeType"in e}function H(e){var t,n;return e?q(e)?e:W(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function j(e){const{Document:t}=H(e);return e instanceof t}function K(e){return!q(e)&&e instanceof H(e).HTMLElement}function U(e){return e instanceof H(e).SVGElement}function X(e){return e?q(e)?e.document:W(e)?j(e)?e:K(e)||U(e)?e.ownerDocument:document:document:document}const Y=I?h:l;function V(e){const t=i(e);return Y(()=>{t.current=e}),a(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function J(e,t){void 0===t&&(t=[e]);const n=i(e);return Y(()=>{n.current!==e&&(n.current=e)},t),n}function G(e,t){const n=i();return p(()=>{const t=e(n.current);return n.current=t,t},[...t])}function _(e){const t=V(e),n=i(null),r=a(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function Q(e){const t=i();return l(()=>{t.current=e},[e]),t.current}let Z={};function ee(e,t){return p(()=>{if(t)return t;const n=null==Z[e]?0:Z[e]+1;return Z[e]=n,e+"-"+n},[e,t])}function te(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[o,i]of r){const n=t[o];null!=n&&(t[o]=n+e*i)}return t},{...t})}}const ne=/* @__PURE__ */te(1),re=/* @__PURE__ */te(-1);function oe(e){if(!e)return!1;const{KeyboardEvent:t}=H(e.target);return t&&e instanceof t}function ie(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=H(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const ae="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function le(e){return e.matches(ae)?e:e.querySelector(ae)}const se={display:"none"};function ce(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:se},n)}function de(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;return r.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":o,"aria-atomic":!0},n)}const ue=/* @__PURE__ */s(null);const pe={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},he={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function me(e){let{announcements:t=he,container:n,hiddenTextDescribedById:i,screenReaderInstructions:s=pe}=e;const{announce:d,announcement:u}=function(){const[e,t]=o("");return{announce:a(e=>{null!=e&&t(e)},[]),announcement:e}}(),h=ee("DndLiveRegion"),[m,f]=o(!1);if(l(()=>{f(!0)},[]),function(e){const t=c(ue);l(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(p(()=>({onDragStart(e){let{active:n}=e;d(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&d(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;d(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;d(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;d(t.onDragCancel({active:n,over:r}))}}),[d,t])),!m)return null;const g=r.createElement(r.Fragment,null,r.createElement(ce,{id:i,value:s.draggable}),r.createElement(de,{id:h,announcement:u}));return n?x(g,n):g}var fe,ge;function ve(){}(ge=fe||(fe={})).DragStart="dragStart",ge.DragMove="dragMove",ge.DragEnd="dragEnd",ge.DragCancel="dragCancel",ge.DragOver="dragOver",ge.RegisterDroppable="registerDroppable",ge.SetDroppableDisabled="setDroppableDisabled",ge.UnregisterDroppable="unregisterDroppable";const be=/* @__PURE__ */Object.freeze({x:0,y:0});function ye(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function we(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function xe(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Ce(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Se=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Ce(t,t.left,t.top),i=[];for(const a of r){const{id:e}=a,t=n.get(e);if(t){const n=ye(Ce(t),o);i.push({id:e,data:{droppableContainer:a,value:n}})}}return i.sort(we)};function Re(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*l;return Number((o/(n+r-o)).toFixed(4))}return 0}const Ne=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:e}=i,r=n.get(e);if(r){const n=Re(r,t);n>0&&o.push({id:e,data:{droppableContainer:i,value:n}})}}return o.sort(xe)};function Ee(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:be}function ze(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const De=/* @__PURE__ */ze(1);const Me={ignoreTransform:!1};function Te(e,t){void 0===t&&(t=Me);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=H(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,s=e.left-a-(1-o)*parseFloat(n),c=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,u=i?e.height/i:e.height;return{width:d,height:u,top:c,right:s+d,bottom:c+u,left:s}}(n,t,r))}const{top:r,left:o,width:i,height:a,bottom:l,right:s}=n;return{top:r,left:o,width:i,height:a,bottom:l,right:s}}function Ae(e){return Te(e,{ignoreTransform:!0})}function ke(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(j(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!K(o)||U(o))return n;if(n.includes(o))return n;const i=H(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=H(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=H(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function Le(e){const[t]=ke(e,1);return null!=t?t:null}function $e(e){return I&&e?q(e)?e:W(e)?j(e)||e===X(e).scrollingElement?window:K(e)?e:null:null:null}function Pe(e){return q(e)?e.scrollX:e.scrollLeft}function Fe(e){return q(e)?e.scrollY:e.scrollTop}function Be(e){return{x:Pe(e),y:Fe(e)}}var Oe,Ie;function qe(e){return!(!I||!e)&&e===document.scrollingElement}function We(e){const t={x:0,y:0},n=qe(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}(Ie=Oe||(Oe={}))[Ie.Forward=1]="Forward",Ie[Ie.Backward=-1]="Backward";const He={x:.2,y:.2};function je(e,t,n,r,o){let{top:i,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=He);const{isTop:c,isBottom:d,isLeft:u,isRight:p}=We(e),h={x:0,y:0},m={x:0,y:0},f=t.height*o.y,g=t.width*o.x;return!c&&i<=t.top+f?(h.y=Oe.Backward,m.y=r*Math.abs((t.top+f-i)/f)):!d&&s>=t.bottom-f&&(h.y=Oe.Forward,m.y=r*Math.abs((t.bottom-f-s)/f)),!p&&l>=t.right-g?(h.x=Oe.Forward,m.x=r*Math.abs((t.right-g-l)/g)):!u&&a<=t.left+g&&(h.x=Oe.Backward,m.x=r*Math.abs((t.left+g-a)/g)),{direction:h,speed:m}}function Ke(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Ue(e){return e.reduce((e,t)=>ne(e,Be(t)),be)}const Xe=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Pe(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Fe(t),0)}]];class Ye{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=ke(t),r=Ue(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[o,i,a]of Xe)for(const e of i)Object.defineProperty(this,e,{get:()=>{const t=a(n),i=r[o]-t;return this.rect[e]+i},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ve{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Je(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var Ge,_e,Qe,Ze;function et(e){e.preventDefault()}function tt(e){e.stopPropagation()}(_e=Ge||(Ge={})).Click="click",_e.DragStart="dragstart",_e.Keydown="keydown",_e.ContextMenu="contextmenu",_e.Resize="resize",_e.SelectionChange="selectionchange",_e.VisibilityChange="visibilitychange",(Ze=Qe||(Qe={})).Space="Space",Ze.Down="ArrowDown",Ze.Right="ArrowRight",Ze.Left="ArrowLeft",Ze.Up="ArrowUp",Ze.Esc="Escape",Ze.Enter="Enter",Ze.Tab="Tab";const nt={start:[Qe.Space,Qe.Enter],cancel:[Qe.Esc],end:[Qe.Space,Qe.Enter,Qe.Tab]},rt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Qe.Right:return{...n,x:n.x+25};case Qe.Left:return{...n,x:n.x-25};case Qe.Down:return{...n,y:n.y+25};case Qe.Up:return{...n,y:n.y-25}}};class ot{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Ve(X(t)),this.windowListeners=new Ve(H(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ge.Resize,this.handleCancel),this.windowListeners.add(Ge.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ge.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Te),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);Le(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(be)}handleKeyDown(e){if(oe(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=nt,coordinateGetter:i=rt,scrollBehavior:a="smooth"}=r,{code:l}=e;if(o.end.includes(l))return void this.handleEnd(e);if(o.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:s}=n.current,c=s?{x:s.left,y:s.top}:be;this.referenceCoordinates||(this.referenceCoordinates=c);const d=i(e,{active:t,context:n.current,currentCoordinates:c});if(d){const t=re(d,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:l,isLeft:s,isBottom:c,maxScroll:u,minScroll:p}=We(n),h=Ke(n),m={x:Math.min(o===Qe.Right?h.right-h.width/2:h.right,Math.max(o===Qe.Right?h.left:h.left+h.width/2,d.x)),y:Math.min(o===Qe.Down?h.bottom-h.height/2:h.bottom,Math.max(o===Qe.Down?h.top:h.top+h.height/2,d.y))},f=o===Qe.Right&&!l||o===Qe.Left&&!s,g=o===Qe.Down&&!c||o===Qe.Up&&!i;if(f&&m.x!==d.x){const e=n.scrollLeft+t.x,i=o===Qe.Right&&e<=u.x||o===Qe.Left&&e>=p.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===Qe.Right?n.scrollLeft-u.x:n.scrollLeft-p.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(g&&m.y!==d.y){const e=n.scrollTop+t.y,i=o===Qe.Down&&e<=u.y||o===Qe.Up&&e>=p.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===Qe.Down?n.scrollTop-u.y:n.scrollTop-p.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,ne(re(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function it(e){return Boolean(e&&"distance"in e)}function at(e){return Boolean(e&&"delay"in e)}ot.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=nt,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==o||o({event:e.nativeEvent}),!0)}return!1}}];class lt{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=H(e);return e instanceof t?e:X(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=X(i),this.documentListeners=new Ve(this.document),this.listeners=new Ve(n),this.windowListeners=new Ve(H(i)),this.initialCoordinates=null!=(r=ie(o))?r:be,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Ge.Resize,this.handleCancel),this.windowListeners.add(Ge.DragStart,et),this.windowListeners.add(Ge.VisibilityChange,this.handleCancel),this.windowListeners.add(Ge.ContextMenu,et),this.documentListeners.add(Ge.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(at(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(it(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Ge.Click,tt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ge.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const l=null!=(t=ie(e))?t:be,s=re(r,l);if(!n&&a){if(it(a)){if(null!=a.tolerance&&Je(s,a.tolerance))return this.handleCancel();if(Je(s,a.distance))return this.handleStart()}return at(a)&&Je(s,a.tolerance)?this.handleCancel():void this.handlePending(a,s)}e.cancelable&&e.preventDefault(),i(l)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Qe.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const st={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ct extends lt{constructor(e){const{event:t}=e,n=X(t.target);super(e,st,n)}}ct.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const dt={move:{name:"mousemove"},end:{name:"mouseup"}};var ut,pt;(pt=ut||(ut={}))[pt.RightClick=2]="RightClick";(class extends lt{constructor(e){super(e,dt,X(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==ut.RightClick&&(null==r||r({event:n}),!0)}}];const ht={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var mt,ft,gt,vt;function bt(e){let{acceleration:t,activator:n=mt.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:c=5,order:d=gt.TreeOrder,pointerCoordinates:u,scrollableAncestors:h,scrollableAncestorRects:m,delta:f,threshold:g}=e;const v=function(e){let{delta:t,disabled:n}=e;const r=Q(t);return G(e=>{if(n||!r||!e)return yt;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Oe.Backward]:e.x[Oe.Backward]||-1===o.x,[Oe.Forward]:e.x[Oe.Forward]||1===o.x},y:{[Oe.Backward]:e.y[Oe.Backward]||-1===o.y,[Oe.Forward]:e.y[Oe.Forward]||1===o.y}}},[n,t,r])}({delta:f,disabled:!s}),[b,y]=function(){const e=i(null);return[a((t,n)=>{e.current=setInterval(t,n)},[]),a(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),w=i({x:0,y:0}),x=i({x:0,y:0}),C=p(()=>{switch(n){case mt.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case mt.DraggableRect:return o}},[n,o,u]),S=i(null),R=a(()=>{const e=S.current;if(!e)return;const t=w.current.x*x.current.x,n=w.current.y*x.current.y;e.scrollBy(t,n)},[]),N=p(()=>d===gt.TreeOrder?[...h].reverse():h,[d,h]);l(()=>{if(s&&h.length&&C){for(const e of N){if(!1===(null==r?void 0:r(e)))continue;const n=h.indexOf(e),o=m[n];if(!o)continue;const{direction:i,speed:a}=je(e,o,C,t,g);for(const e of["x","y"])v[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return y(),S.current=e,b(R,c),w.current=a,void(x.current=i)}w.current={x:0,y:0},x.current={x:0,y:0},y()}else y()},[t,R,r,y,s,c,JSON.stringify(C),JSON.stringify(v),b,h,N,m,JSON.stringify(g)])}(class extends lt{constructor(e){super(e,ht)}static setup(){return window.addEventListener(ht.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ht.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1)&&(null==r||r({event:n}),!0)}}],(ft=mt||(mt={}))[ft.Pointer=0]="Pointer",ft[ft.DraggableRect=1]="DraggableRect",(vt=gt||(gt={}))[vt.TreeOrder=0]="TreeOrder",vt[vt.ReversedTreeOrder=1]="ReversedTreeOrder";const yt={x:{[Oe.Backward]:!1,[Oe.Forward]:!1},y:{[Oe.Backward]:!1,[Oe.Forward]:!1}};var wt,xt,Ct;(xt=wt||(wt={}))[xt.Always=0]="Always",xt[xt.BeforeDragging=1]="BeforeDragging",xt[xt.WhileDragging=2]="WhileDragging",(Ct||(Ct={})).Optimized="optimized";const St=/* @__PURE__ */new Map;function Rt(e,t){return G(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Nt(e){let{callback:t,disabled:n}=e;const r=V(t),o=p(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return l(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function Et(e){return new Ye(Te(e),e)}function zt(e,t,n){void 0===t&&(t=Et);const[r,i]=o(null);function a(){i(r=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}const s=function(e){let{callback:t,disabled:n}=e;const r=V(t),o=p(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return l(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),c=Nt({callback:a});return Y(()=>{a(),e?(null==c||c.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==c||c.disconnect(),null==s||s.disconnect())},[e]),r}const Dt=[];function Mt(e,t){void 0===t&&(t=[]);const n=i(null);return l(()=>{n.current=null},t),l(()=>{const t=e!==be;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?re(e,n.current):be}function Tt(e){return p(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const At=[];function kt(e){let{measure:t}=e;const[n,r]=o(null),i=Nt({callback:a(e=>{for(const{target:n}of e)if(K(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),l=a(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return K(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)},[t,i]),[s,c]=_(l);return p(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}const Lt=[{sensor:ct,options:{}},{sensor:ot,options:{}}],$t={current:{}},Pt={draggable:{measure:Ae},droppable:{measure:Ae,strategy:wt.WhileDragging,frequency:Ct.Optimized},dragOverlay:{measure:Te}};class Ft extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Bt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:/* @__PURE__ */new Map,droppableRects:/* @__PURE__ */new Map,droppableContainers:/* @__PURE__ */new Ft,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ve},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Pt,measureDroppableContainers:ve,windowRect:null,measuringScheduled:!1},Ot=/* @__PURE__ */s({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ve,draggableNodes:/* @__PURE__ */new Map,over:null,measureDroppableContainers:ve}),It=/* @__PURE__ */s(Bt);function qt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:/* @__PURE__ */new Map,translate:{x:0,y:0}},droppable:{containers:new Ft}}}function Wt(e,t){switch(t.type){case fe.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case fe.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case fe.DragEnd:case fe.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case fe.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Ft(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case fe.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Ft(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case fe.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Ft(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Ht(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=c(Ot),i=Q(r),a=Q(null==n?void 0:n.id);return l(()=>{if(!t&&!r&&i&&null!=a){if(!oe(i))return;if(document.activeElement===i.target)return;const e=o.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=le(e);if(t){t.focus();break}}})}},[r,t,o,a,i]),null}const jt=/* @__PURE__ */s({...be,scaleX:1,scaleY:1});var Kt,Ut;(Ut=Kt||(Kt={}))[Ut.Uninitialized=0]="Uninitialized",Ut[Ut.Initializing=1]="Initializing",Ut[Ut.Initialized=2]="Initialized";const Xt=/* @__PURE__ */m(function(e){var t,n,s,c;let{id:d,accessibility:u,autoScroll:h=!0,children:m,sensors:g=Lt,collisionDetection:v=Ne,measuring:b,modifiers:y,...x}=e;const C=f(Wt,void 0,qt),[S,R]=C,[N,E]=function(){const[e]=o(()=>/* @__PURE__ */new Set),t=a(t=>(e.add(t),()=>e.delete(t)),[e]);return[a(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[z,D]=o(Kt.Uninitialized),M=z===Kt.Initialized,{draggable:{active:T,nodes:A,translate:k},droppable:{containers:L}}=S,$=null!=T?A.get(T):null,P=i({initial:null,translated:null}),F=p(()=>{var e;return null!=T?{id:T,data:null!=(e=null==$?void 0:$.data)?e:$t,rect:P}:null},[T,$]),B=i(null),[O,q]=o(null),[W,j]=o(null),K=J(x,Object.values(x)),U=ee("DndDescribedBy",d),X=p(()=>L.getEnabled(),[L]),V=p(()=>({draggable:{...Pt.draggable,...null==_?void 0:_.draggable},droppable:{...Pt.droppable,...null==_?void 0:_.droppable},dragOverlay:{...Pt.dragOverlay,...null==_?void 0:_.dragOverlay}}),[null==(_=b)?void 0:_.draggable,null==_?void 0:_.droppable,null==_?void 0:_.dragOverlay]);var _;const{droppableRects:Q,measureDroppableContainers:Z,measuringScheduled:te}=function(e,t){let{dragging:n,dependencies:r,config:s}=t;const[c,d]=o(null),{frequency:u,measure:p,strategy:h}=s,m=i(e),f=function(){switch(h){case wt.Always:return!1;case wt.BeforeDragging:return n;default:return!n}}(),g=J(f),v=a(function(e){void 0===e&&(e=[]),g.current||d(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[g]),b=i(null),y=G(t=>{if(f&&!n)return St;if(!t||t===St||m.current!==e||null!=c){const t=/* @__PURE__ */new Map;for(let n of e){if(!n)continue;if(c&&c.length>0&&!c.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new Ye(p(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,c,n,f,p]);return l(()=>{m.current=e},[e]),l(()=>{f||v()},[n,f]),l(()=>{c&&c.length>0&&d(null)},[JSON.stringify(c)]),l(()=>{f||"number"!=typeof u||null!==b.current||(b.current=setTimeout(()=>{v(),b.current=null},u))},[u,f,v,...r]),{droppableRects:y,measureDroppableContainers:v,measuringScheduled:null!=c}}(X,{dragging:M,dependencies:[k.x,k.y],config:V.droppable}),re=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return G(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(A,T),oe=p(()=>W?ie(W):null,[W]),ae=function(){const e=!1===(null==O?void 0:O.autoScrollEnabled),t="object"==typeof h?!1===h.enabled:!1===h,n=M&&!e&&!t;if("object"==typeof h)return{...h,enabled:n};return{enabled:n}}(),le=function(e,t){return Rt(e,t)}(re,V.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=i(!1),{x:l,y:s}="boolean"==typeof o?{x:o,y:o}:o;Y(()=>{if(!l&&!s||!t)return void(a.current=!1);if(a.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=Ee(n(e),r);if(l||(o.x=0),s||(o.y=0),a.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=Le(e);t&&t.scrollBy({top:o.y,left:o.x})}},[t,l,s,r,n])}({activeNode:null!=T?A.get(T):null,config:ae.layoutShiftCompensation,initialRect:le,measure:V.draggable.measure});const se=zt(re,V.draggable.measure,le),ce=zt(re?re.parentElement:null),de=i({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:Q,draggableNodes:A,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),pe=L.getNodeFor(null==(t=de.current.over)?void 0:t.id),he=kt({measure:V.dragOverlay.measure}),ge=null!=(n=he.nodeRef.current)?n:re,ve=M?null!=(s=he.rect)?s:se:null,ye=Boolean(he.nodeRef.current&&he.rect),we=Ee(xe=ye?null:se,Rt(xe));var xe;const Ce=Tt(ge?H(ge):null),Se=function(e){const t=i(e),n=G(n=>e?n&&n!==Dt&&e&&t.current&&e.parentNode===t.current.parentNode?n:ke(e):Dt,[e]);return l(()=>{t.current=e},[e]),n}(M?null!=pe?pe:re:null),Re=function(e,t){void 0===t&&(t=Te);const[n]=e,r=Tt(n?H(n):null),[i,a]=o(At);function l(){a(()=>e.length?e.map(e=>qe(e)?r:new Ye(t(e),e)):At)}const s=Nt({callback:l});return Y(()=>{null==s||s.disconnect(),l(),e.forEach(e=>null==s?void 0:s.observe(e))},[e]),i}(Se),ze=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}(y,{transform:{x:k.x-we.x,y:k.y-we.y,scaleX:1,scaleY:1},activatorEvent:W,active:F,activeNodeRect:se,containerNodeRect:ce,draggingNodeRect:ve,over:de.current.over,overlayNodeRect:he.rect,scrollableAncestors:Se,scrollableAncestorRects:Re,windowRect:Ce}),Me=oe?ne(oe,k):null,Ae=function(e){const[t,n]=o(null),r=i(e),s=a(e=>{const t=$e(e.target);t&&n(e=>e?(e.set(t,Be(t)),new Map(e)):null)},[]);return l(()=>{const t=r.current;if(e!==t){o(t);const i=e.map(e=>{const t=$e(e);return t?(t.addEventListener("scroll",s,{passive:!0}),[t,Be(t)]):null}).filter(e=>null!=e);n(i.length?new Map(i):null),r.current=e}return()=>{o(e),o(t)};function o(e){e.forEach(e=>{const t=$e(e);null==t||t.removeEventListener("scroll",s)})}},[s,e]),p(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>ne(e,t),be):Ue(e):be,[e,t])}(Se),Pe=Mt(Ae),Fe=Mt(Ae,[se]),Oe=ne(ze,Pe),Ie=ve?De(ve,ze):null,We=F&&Ie?v({active:F,collisionRect:Ie,droppableRects:Q,droppableContainers:X,pointerCoordinates:Me}):null,He=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(We,"id"),[je,Ke]=o(null),Xe=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ye?ze:ne(ze,Fe),null!=(c=null==je?void 0:je.rect)?c:null,se),Ve=i(null),Je=a((e,t)=>{let{sensor:n,options:r}=t;if(null==B.current)return;const o=A.get(B.current);if(!o)return;const i=e.nativeEvent,a=new n({active:B.current,activeNode:o,event:i,options:r,context:de,onAbort(e){if(!A.get(e))return;const{onDragAbort:t}=K.current,n={id:e};null==t||t(n),N({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!A.get(e))return;const{onDragPending:o}=K.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),N({type:"onDragPending",event:i})},onStart(e){const t=B.current;if(null==t)return;const n=A.get(t);if(!n)return;const{onDragStart:r}=K.current,o={activatorEvent:i,active:{id:t,data:n.data,rect:P}};w(()=>{null==r||r(o),D(Kt.Initializing),R({type:fe.DragStart,initialCoordinates:e,active:t}),N({type:"onDragStart",event:o}),q(Ve.current),j(i)})},onMove(e){R({type:fe.DragMove,coordinates:e})},onEnd:l(fe.DragEnd),onCancel:l(fe.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=de.current;let a=null;if(t&&o){const{cancelDrop:l}=K.current;if(a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===fe.DragEnd&&"function"==typeof l){await Promise.resolve(l(a))&&(e=fe.DragCancel)}}B.current=null,w(()=>{R({type:e}),D(Kt.Uninitialized),Ke(null),q(null),j(null),Ve.current=null;const t=e===fe.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=K.current[t];null==e||e(a),N({type:t,event:a})}})}}Ve.current=a},[A]),Ge=function(e,t){return p(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(g,a((e,t)=>(n,r)=>{const o=n.nativeEvent,i=A.get(r);if(null!==B.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},B.current=r,Je(n,t))},[A,Je]));!function(e){l(()=>{if(!I)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(g),Y(()=>{se&&z===Kt.Initializing&&D(Kt.Initialized)},[se,z]),l(()=>{const{onDragMove:e}=K.current,{active:t,activatorEvent:n,collisions:r,over:o}=de.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:Oe.x,y:Oe.y},over:o};w(()=>{null==e||e(i),N({type:"onDragMove",event:i})})},[Oe.x,Oe.y]),l(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=de.current;if(!e||null==B.current||!t||!o)return;const{onDragOver:i}=K.current,a=r.get(He),l=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:l};w(()=>{Ke(l),null==i||i(s),N({type:"onDragOver",event:s})})},[He]),Y(()=>{de.current={activatorEvent:W,active:F,activeNode:re,collisionRect:Ie,collisions:We,droppableRects:Q,draggableNodes:A,draggingNode:ge,draggingNodeRect:ve,droppableContainers:L,over:je,scrollableAncestors:Se,scrollAdjustedTranslate:Oe},P.current={initial:ve,translated:Ie}},[F,re,We,Ie,A,ge,ve,Q,L,je,Se,Oe]),bt({...ae,delta:k,draggingRect:Ie,pointerCoordinates:Me,scrollableAncestors:Se,scrollableAncestorRects:Re});const _e=p(()=>({active:F,activeNode:re,activeNodeRect:se,activatorEvent:W,collisions:We,containerNodeRect:ce,dragOverlay:he,draggableNodes:A,droppableContainers:L,droppableRects:Q,over:je,measureDroppableContainers:Z,scrollableAncestors:Se,scrollableAncestorRects:Re,measuringConfiguration:V,measuringScheduled:te,windowRect:Ce}),[F,re,se,W,We,ce,he,A,L,Q,je,Z,Se,Re,V,te,Ce]),Qe=p(()=>({activatorEvent:W,activators:Ge,active:F,activeNodeRect:se,ariaDescribedById:{draggable:U},dispatch:R,draggableNodes:A,over:je,measureDroppableContainers:Z}),[W,Ge,F,se,R,U,A,je,Z]);return r.createElement(ue.Provider,{value:E},r.createElement(Ot.Provider,{value:Qe},r.createElement(It.Provider,{value:_e},r.createElement(jt.Provider,{value:Xe},m)),r.createElement(Ht,{disabled:!1===(null==u?void 0:u.restoreFocus)})),r.createElement(me,{...u,hiddenTextDescribedById:U}))}),Yt=/* @__PURE__ */s(null),Vt="button";function Jt(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=ee("Draggable"),{activators:a,activatorEvent:l,active:s,activeNodeRect:d,ariaDescribedById:u,draggableNodes:h,over:m}=c(Ot),{role:f=Vt,roleDescription:g="draggable",tabIndex:v=0}=null!=o?o:{},b=(null==s?void 0:s.id)===t,y=c(b?jt:Yt),[w,x]=_(),[C,S]=_(),R=function(e,t){return p(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(a,t),N=J(n);Y(()=>(h.set(t,{id:t,key:i,node:w,activatorNode:C,data:N}),()=>{const e=h.get(t);e&&e.key===i&&h.delete(t)}),[h,t]);return{active:s,activatorEvent:l,activeNodeRect:d,attributes:p(()=>({role:f,tabIndex:v,"aria-disabled":r,"aria-pressed":!(!b||f!==Vt)||void 0,"aria-roledescription":g,"aria-describedby":u.draggable}),[r,f,v,b,g,u.draggable]),isDragging:b,listeners:r?void 0:R,node:w,over:m,setNodeRef:x,setActivatorNodeRef:S,transform:y}}const Gt={timeout:25};const _t=({slotPosition:n,isEditing:r,isDragging:o,children:s})=>{const{attributes:d,listeners:u,setNodeRef:p,transform:h}=Jt({id:`slot-${n}`,data:{slotPosition:n},disabled:!r}),{setNodeRef:m,isOver:f}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=ee("Droppable"),{active:d,dispatch:u,over:p,measureDroppableContainers:h}=c(Ot),m=i({disabled:n}),f=i(!1),g=i(null),v=i(null),{disabled:b,updateMeasurementsFor:y,timeout:w}={...Gt,...o},x=J(null!=y?y:r),C=Nt({callback:a(()=>{f.current?(null!=v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{h(Array.isArray(x.current)?x.current:[x.current]),v.current=null},w)):f.current=!0},[w]),disabled:b||!d}),S=a((e,t)=>{C&&(t&&(C.unobserve(t),f.current=!1),e&&C.observe(e))},[C]),[R,N]=_(S),E=J(t);return l(()=>{C&&R.current&&(C.disconnect(),f.current=!1,C.observe(R.current))},[R,C]),l(()=>(u({type:fe.RegisterDroppable,element:{id:r,key:s,disabled:n,node:R,rect:g,data:E}}),()=>u({type:fe.UnregisterDroppable,key:s,id:r})),[r]),l(()=>{n!==m.current.disabled&&(u({type:fe.SetDroppableDisabled,id:r,key:s,disabled:n}),m.current.disabled=n)},[r,s,n,u]),{active:d,rect:g,isOver:(null==p?void 0:p.id)===r,node:R,over:p,setNodeRef:N}}({id:`drop-${n}`,data:{slotPosition:n}}),g={position:"relative",height:"100%",width:"100%",transform:h?`translate3d(${h.x}px, ${h.y}px, 0)`:void 0},v=a(e=>{p(e),m(e)},[p,m]);/* @__PURE__ */
35
+ return e(P,{theme:l,layout:s,panels:c,...d})},I="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function q(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function W(e){return"nodeType"in e}function H(e){var t,n;return e?q(e)?e:W(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function j(e){const{Document:t}=H(e);return e instanceof t}function K(e){return!q(e)&&e instanceof H(e).HTMLElement}function U(e){return e instanceof H(e).SVGElement}function X(e){return e?q(e)?e.document:W(e)?j(e)?e:K(e)||U(e)?e.ownerDocument:document:document:document}const Y=I?h:l;function V(e){const t=i(e);return Y(()=>{t.current=e}),a(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function J(e,t){void 0===t&&(t=[e]);const n=i(e);return Y(()=>{n.current!==e&&(n.current=e)},t),n}function G(e,t){const n=i();return p(()=>{const t=e(n.current);return n.current=t,t},[...t])}function _(e){const t=V(e),n=i(null),r=a(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function Q(e){const t=i();return l(()=>{t.current=e},[e]),t.current}let Z={};function ee(e,t){return p(()=>{if(t)return t;const n=null==Z[e]?0:Z[e]+1;return Z[e]=n,e+"-"+n},[e,t])}function te(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[o,i]of r){const n=t[o];null!=n&&(t[o]=n+e*i)}return t},{...t})}}const ne=/* @__PURE__ */te(1),re=/* @__PURE__ */te(-1);function oe(e){if(!e)return!1;const{KeyboardEvent:t}=H(e.target);return t&&e instanceof t}function ie(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=H(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const ae="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function le(e){return e.matches(ae)?e:e.querySelector(ae)}const se={display:"none"};function ce(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:se},n)}function de(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;return r.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":o,"aria-atomic":!0},n)}const ue=/* @__PURE__ */s(null);const pe={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},he={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function me(e){let{announcements:t=he,container:n,hiddenTextDescribedById:i,screenReaderInstructions:s=pe}=e;const{announce:d,announcement:u}=function(){const[e,t]=o("");return{announce:a(e=>{null!=e&&t(e)},[]),announcement:e}}(),h=ee("DndLiveRegion"),[m,f]=o(!1);if(l(()=>{f(!0)},[]),function(e){const t=c(ue);l(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(p(()=>({onDragStart(e){let{active:n}=e;d(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&d(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;d(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;d(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;d(t.onDragCancel({active:n,over:r}))}}),[d,t])),!m)return null;const g=r.createElement(r.Fragment,null,r.createElement(ce,{id:i,value:s.draggable}),r.createElement(de,{id:h,announcement:u}));return n?x(g,n):g}var fe,ge;function ve(){}(ge=fe||(fe={})).DragStart="dragStart",ge.DragMove="dragMove",ge.DragEnd="dragEnd",ge.DragCancel="dragCancel",ge.DragOver="dragOver",ge.RegisterDroppable="registerDroppable",ge.SetDroppableDisabled="setDroppableDisabled",ge.UnregisterDroppable="unregisterDroppable";const be=/* @__PURE__ */Object.freeze({x:0,y:0});function ye(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function we(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function xe(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Ce(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Se=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Ce(t,t.left,t.top),i=[];for(const a of r){const{id:e}=a,t=n.get(e);if(t){const n=ye(Ce(t),o);i.push({id:e,data:{droppableContainer:a,value:n}})}}return i.sort(we)};function Re(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*l;return Number((o/(n+r-o)).toFixed(4))}return 0}const Ne=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:e}=i,r=n.get(e);if(r){const n=Re(r,t);n>0&&o.push({id:e,data:{droppableContainer:i,value:n}})}}return o.sort(xe)};function ze(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:be}function Ee(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const De=/* @__PURE__ */Ee(1);const Me={ignoreTransform:!1};function Te(e,t){void 0===t&&(t=Me);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=H(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,s=e.left-a-(1-o)*parseFloat(n),c=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,u=i?e.height/i:e.height;return{width:d,height:u,top:c,right:s+d,bottom:c+u,left:s}}(n,t,r))}const{top:r,left:o,width:i,height:a,bottom:l,right:s}=n;return{top:r,left:o,width:i,height:a,bottom:l,right:s}}function Ae(e){return Te(e,{ignoreTransform:!0})}function ke(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(j(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!K(o)||U(o))return n;if(n.includes(o))return n;const i=H(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=H(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=H(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function Le(e){const[t]=ke(e,1);return null!=t?t:null}function $e(e){return I&&e?q(e)?e:W(e)?j(e)||e===X(e).scrollingElement?window:K(e)?e:null:null:null}function Pe(e){return q(e)?e.scrollX:e.scrollLeft}function Fe(e){return q(e)?e.scrollY:e.scrollTop}function Be(e){return{x:Pe(e),y:Fe(e)}}var Oe,Ie;function qe(e){return!(!I||!e)&&e===document.scrollingElement}function We(e){const t={x:0,y:0},n=qe(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}(Ie=Oe||(Oe={}))[Ie.Forward=1]="Forward",Ie[Ie.Backward=-1]="Backward";const He={x:.2,y:.2};function je(e,t,n,r,o){let{top:i,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=He);const{isTop:c,isBottom:d,isLeft:u,isRight:p}=We(e),h={x:0,y:0},m={x:0,y:0},f=t.height*o.y,g=t.width*o.x;return!c&&i<=t.top+f?(h.y=Oe.Backward,m.y=r*Math.abs((t.top+f-i)/f)):!d&&s>=t.bottom-f&&(h.y=Oe.Forward,m.y=r*Math.abs((t.bottom-f-s)/f)),!p&&l>=t.right-g?(h.x=Oe.Forward,m.x=r*Math.abs((t.right-g-l)/g)):!u&&a<=t.left+g&&(h.x=Oe.Backward,m.x=r*Math.abs((t.left+g-a)/g)),{direction:h,speed:m}}function Ke(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Ue(e){return e.reduce((e,t)=>ne(e,Be(t)),be)}const Xe=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Pe(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Fe(t),0)}]];class Ye{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=ke(t),r=Ue(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[o,i,a]of Xe)for(const e of i)Object.defineProperty(this,e,{get:()=>{const t=a(n),i=r[o]-t;return this.rect[e]+i},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ve{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Je(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var Ge,_e,Qe,Ze;function et(e){e.preventDefault()}function tt(e){e.stopPropagation()}(_e=Ge||(Ge={})).Click="click",_e.DragStart="dragstart",_e.Keydown="keydown",_e.ContextMenu="contextmenu",_e.Resize="resize",_e.SelectionChange="selectionchange",_e.VisibilityChange="visibilitychange",(Ze=Qe||(Qe={})).Space="Space",Ze.Down="ArrowDown",Ze.Right="ArrowRight",Ze.Left="ArrowLeft",Ze.Up="ArrowUp",Ze.Esc="Escape",Ze.Enter="Enter",Ze.Tab="Tab";const nt={start:[Qe.Space,Qe.Enter],cancel:[Qe.Esc],end:[Qe.Space,Qe.Enter,Qe.Tab]},rt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Qe.Right:return{...n,x:n.x+25};case Qe.Left:return{...n,x:n.x-25};case Qe.Down:return{...n,y:n.y+25};case Qe.Up:return{...n,y:n.y-25}}};class ot{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Ve(X(t)),this.windowListeners=new Ve(H(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ge.Resize,this.handleCancel),this.windowListeners.add(Ge.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ge.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Te),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);Le(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(be)}handleKeyDown(e){if(oe(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=nt,coordinateGetter:i=rt,scrollBehavior:a="smooth"}=r,{code:l}=e;if(o.end.includes(l))return void this.handleEnd(e);if(o.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:s}=n.current,c=s?{x:s.left,y:s.top}:be;this.referenceCoordinates||(this.referenceCoordinates=c);const d=i(e,{active:t,context:n.current,currentCoordinates:c});if(d){const t=re(d,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:l,isLeft:s,isBottom:c,maxScroll:u,minScroll:p}=We(n),h=Ke(n),m={x:Math.min(o===Qe.Right?h.right-h.width/2:h.right,Math.max(o===Qe.Right?h.left:h.left+h.width/2,d.x)),y:Math.min(o===Qe.Down?h.bottom-h.height/2:h.bottom,Math.max(o===Qe.Down?h.top:h.top+h.height/2,d.y))},f=o===Qe.Right&&!l||o===Qe.Left&&!s,g=o===Qe.Down&&!c||o===Qe.Up&&!i;if(f&&m.x!==d.x){const e=n.scrollLeft+t.x,i=o===Qe.Right&&e<=u.x||o===Qe.Left&&e>=p.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===Qe.Right?n.scrollLeft-u.x:n.scrollLeft-p.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(g&&m.y!==d.y){const e=n.scrollTop+t.y,i=o===Qe.Down&&e<=u.y||o===Qe.Up&&e>=p.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===Qe.Down?n.scrollTop-u.y:n.scrollTop-p.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,ne(re(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function it(e){return Boolean(e&&"distance"in e)}function at(e){return Boolean(e&&"delay"in e)}ot.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=nt,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==o||o({event:e.nativeEvent}),!0)}return!1}}];class lt{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=H(e);return e instanceof t?e:X(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=X(i),this.documentListeners=new Ve(this.document),this.listeners=new Ve(n),this.windowListeners=new Ve(H(i)),this.initialCoordinates=null!=(r=ie(o))?r:be,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Ge.Resize,this.handleCancel),this.windowListeners.add(Ge.DragStart,et),this.windowListeners.add(Ge.VisibilityChange,this.handleCancel),this.windowListeners.add(Ge.ContextMenu,et),this.documentListeners.add(Ge.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(at(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(it(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Ge.Click,tt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ge.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const l=null!=(t=ie(e))?t:be,s=re(r,l);if(!n&&a){if(it(a)){if(null!=a.tolerance&&Je(s,a.tolerance))return this.handleCancel();if(Je(s,a.distance))return this.handleStart()}return at(a)&&Je(s,a.tolerance)?this.handleCancel():void this.handlePending(a,s)}e.cancelable&&e.preventDefault(),i(l)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Qe.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const st={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ct extends lt{constructor(e){const{event:t}=e,n=X(t.target);super(e,st,n)}}ct.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const dt={move:{name:"mousemove"},end:{name:"mouseup"}};var ut,pt;(pt=ut||(ut={}))[pt.RightClick=2]="RightClick";(class extends lt{constructor(e){super(e,dt,X(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==ut.RightClick&&(null==r||r({event:n}),!0)}}];const ht={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var mt,ft,gt,vt;function bt(e){let{acceleration:t,activator:n=mt.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:c=5,order:d=gt.TreeOrder,pointerCoordinates:u,scrollableAncestors:h,scrollableAncestorRects:m,delta:f,threshold:g}=e;const v=function(e){let{delta:t,disabled:n}=e;const r=Q(t);return G(e=>{if(n||!r||!e)return yt;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Oe.Backward]:e.x[Oe.Backward]||-1===o.x,[Oe.Forward]:e.x[Oe.Forward]||1===o.x},y:{[Oe.Backward]:e.y[Oe.Backward]||-1===o.y,[Oe.Forward]:e.y[Oe.Forward]||1===o.y}}},[n,t,r])}({delta:f,disabled:!s}),[b,y]=function(){const e=i(null);return[a((t,n)=>{e.current=setInterval(t,n)},[]),a(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),w=i({x:0,y:0}),x=i({x:0,y:0}),C=p(()=>{switch(n){case mt.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case mt.DraggableRect:return o}},[n,o,u]),S=i(null),R=a(()=>{const e=S.current;if(!e)return;const t=w.current.x*x.current.x,n=w.current.y*x.current.y;e.scrollBy(t,n)},[]),N=p(()=>d===gt.TreeOrder?[...h].reverse():h,[d,h]);l(()=>{if(s&&h.length&&C){for(const e of N){if(!1===(null==r?void 0:r(e)))continue;const n=h.indexOf(e),o=m[n];if(!o)continue;const{direction:i,speed:a}=je(e,o,C,t,g);for(const e of["x","y"])v[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return y(),S.current=e,b(R,c),w.current=a,void(x.current=i)}w.current={x:0,y:0},x.current={x:0,y:0},y()}else y()},[t,R,r,y,s,c,JSON.stringify(C),JSON.stringify(v),b,h,N,m,JSON.stringify(g)])}(class extends lt{constructor(e){super(e,ht)}static setup(){return window.addEventListener(ht.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ht.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1)&&(null==r||r({event:n}),!0)}}],(ft=mt||(mt={}))[ft.Pointer=0]="Pointer",ft[ft.DraggableRect=1]="DraggableRect",(vt=gt||(gt={}))[vt.TreeOrder=0]="TreeOrder",vt[vt.ReversedTreeOrder=1]="ReversedTreeOrder";const yt={x:{[Oe.Backward]:!1,[Oe.Forward]:!1},y:{[Oe.Backward]:!1,[Oe.Forward]:!1}};var wt,xt,Ct;(xt=wt||(wt={}))[xt.Always=0]="Always",xt[xt.BeforeDragging=1]="BeforeDragging",xt[xt.WhileDragging=2]="WhileDragging",(Ct||(Ct={})).Optimized="optimized";const St=/* @__PURE__ */new Map;function Rt(e,t){return G(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Nt(e){let{callback:t,disabled:n}=e;const r=V(t),o=p(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return l(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function zt(e){return new Ye(Te(e),e)}function Et(e,t,n){void 0===t&&(t=zt);const[r,i]=o(null);function a(){i(r=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}const s=function(e){let{callback:t,disabled:n}=e;const r=V(t),o=p(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return l(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),c=Nt({callback:a});return Y(()=>{a(),e?(null==c||c.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==c||c.disconnect(),null==s||s.disconnect())},[e]),r}const Dt=[];function Mt(e,t){void 0===t&&(t=[]);const n=i(null);return l(()=>{n.current=null},t),l(()=>{const t=e!==be;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?re(e,n.current):be}function Tt(e){return p(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const At=[];function kt(e){let{measure:t}=e;const[n,r]=o(null),i=Nt({callback:a(e=>{for(const{target:n}of e)if(K(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),l=a(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return K(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)},[t,i]),[s,c]=_(l);return p(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}const Lt=[{sensor:ct,options:{}},{sensor:ot,options:{}}],$t={current:{}},Pt={draggable:{measure:Ae},droppable:{measure:Ae,strategy:wt.WhileDragging,frequency:Ct.Optimized},dragOverlay:{measure:Te}};class Ft extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Bt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:/* @__PURE__ */new Map,droppableRects:/* @__PURE__ */new Map,droppableContainers:/* @__PURE__ */new Ft,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ve},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Pt,measureDroppableContainers:ve,windowRect:null,measuringScheduled:!1},Ot=/* @__PURE__ */s({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ve,draggableNodes:/* @__PURE__ */new Map,over:null,measureDroppableContainers:ve}),It=/* @__PURE__ */s(Bt);function qt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:/* @__PURE__ */new Map,translate:{x:0,y:0}},droppable:{containers:new Ft}}}function Wt(e,t){switch(t.type){case fe.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case fe.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case fe.DragEnd:case fe.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case fe.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Ft(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case fe.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Ft(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case fe.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Ft(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Ht(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=c(Ot),i=Q(r),a=Q(null==n?void 0:n.id);return l(()=>{if(!t&&!r&&i&&null!=a){if(!oe(i))return;if(document.activeElement===i.target)return;const e=o.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=le(e);if(t){t.focus();break}}})}},[r,t,o,a,i]),null}const jt=/* @__PURE__ */s({...be,scaleX:1,scaleY:1});var Kt,Ut;(Ut=Kt||(Kt={}))[Ut.Uninitialized=0]="Uninitialized",Ut[Ut.Initializing=1]="Initializing",Ut[Ut.Initialized=2]="Initialized";const Xt=/* @__PURE__ */m(function(e){var t,n,s,c;let{id:d,accessibility:u,autoScroll:h=!0,children:m,sensors:g=Lt,collisionDetection:v=Ne,measuring:b,modifiers:y,...x}=e;const C=f(Wt,void 0,qt),[S,R]=C,[N,z]=function(){const[e]=o(()=>/* @__PURE__ */new Set),t=a(t=>(e.add(t),()=>e.delete(t)),[e]);return[a(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[E,D]=o(Kt.Uninitialized),M=E===Kt.Initialized,{draggable:{active:T,nodes:A,translate:k},droppable:{containers:L}}=S,$=null!=T?A.get(T):null,P=i({initial:null,translated:null}),F=p(()=>{var e;return null!=T?{id:T,data:null!=(e=null==$?void 0:$.data)?e:$t,rect:P}:null},[T,$]),B=i(null),[O,q]=o(null),[W,j]=o(null),K=J(x,Object.values(x)),U=ee("DndDescribedBy",d),X=p(()=>L.getEnabled(),[L]),V=p(()=>({draggable:{...Pt.draggable,...null==_?void 0:_.draggable},droppable:{...Pt.droppable,...null==_?void 0:_.droppable},dragOverlay:{...Pt.dragOverlay,...null==_?void 0:_.dragOverlay}}),[null==(_=b)?void 0:_.draggable,null==_?void 0:_.droppable,null==_?void 0:_.dragOverlay]);var _;const{droppableRects:Q,measureDroppableContainers:Z,measuringScheduled:te}=function(e,t){let{dragging:n,dependencies:r,config:s}=t;const[c,d]=o(null),{frequency:u,measure:p,strategy:h}=s,m=i(e),f=function(){switch(h){case wt.Always:return!1;case wt.BeforeDragging:return n;default:return!n}}(),g=J(f),v=a(function(e){void 0===e&&(e=[]),g.current||d(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[g]),b=i(null),y=G(t=>{if(f&&!n)return St;if(!t||t===St||m.current!==e||null!=c){const t=/* @__PURE__ */new Map;for(let n of e){if(!n)continue;if(c&&c.length>0&&!c.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new Ye(p(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,c,n,f,p]);return l(()=>{m.current=e},[e]),l(()=>{f||v()},[n,f]),l(()=>{c&&c.length>0&&d(null)},[JSON.stringify(c)]),l(()=>{f||"number"!=typeof u||null!==b.current||(b.current=setTimeout(()=>{v(),b.current=null},u))},[u,f,v,...r]),{droppableRects:y,measureDroppableContainers:v,measuringScheduled:null!=c}}(X,{dragging:M,dependencies:[k.x,k.y],config:V.droppable}),re=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return G(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(A,T),oe=p(()=>W?ie(W):null,[W]),ae=function(){const e=!1===(null==O?void 0:O.autoScrollEnabled),t="object"==typeof h?!1===h.enabled:!1===h,n=M&&!e&&!t;if("object"==typeof h)return{...h,enabled:n};return{enabled:n}}(),le=function(e,t){return Rt(e,t)}(re,V.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=i(!1),{x:l,y:s}="boolean"==typeof o?{x:o,y:o}:o;Y(()=>{if(!l&&!s||!t)return void(a.current=!1);if(a.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=ze(n(e),r);if(l||(o.x=0),s||(o.y=0),a.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=Le(e);t&&t.scrollBy({top:o.y,left:o.x})}},[t,l,s,r,n])}({activeNode:null!=T?A.get(T):null,config:ae.layoutShiftCompensation,initialRect:le,measure:V.draggable.measure});const se=Et(re,V.draggable.measure,le),ce=Et(re?re.parentElement:null),de=i({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:Q,draggableNodes:A,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),pe=L.getNodeFor(null==(t=de.current.over)?void 0:t.id),he=kt({measure:V.dragOverlay.measure}),ge=null!=(n=he.nodeRef.current)?n:re,ve=M?null!=(s=he.rect)?s:se:null,ye=Boolean(he.nodeRef.current&&he.rect),we=ze(xe=ye?null:se,Rt(xe));var xe;const Ce=Tt(ge?H(ge):null),Se=function(e){const t=i(e),n=G(n=>e?n&&n!==Dt&&e&&t.current&&e.parentNode===t.current.parentNode?n:ke(e):Dt,[e]);return l(()=>{t.current=e},[e]),n}(M?null!=pe?pe:re:null),Re=function(e,t){void 0===t&&(t=Te);const[n]=e,r=Tt(n?H(n):null),[i,a]=o(At);function l(){a(()=>e.length?e.map(e=>qe(e)?r:new Ye(t(e),e)):At)}const s=Nt({callback:l});return Y(()=>{null==s||s.disconnect(),l(),e.forEach(e=>null==s?void 0:s.observe(e))},[e]),i}(Se),Ee=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}(y,{transform:{x:k.x-we.x,y:k.y-we.y,scaleX:1,scaleY:1},activatorEvent:W,active:F,activeNodeRect:se,containerNodeRect:ce,draggingNodeRect:ve,over:de.current.over,overlayNodeRect:he.rect,scrollableAncestors:Se,scrollableAncestorRects:Re,windowRect:Ce}),Me=oe?ne(oe,k):null,Ae=function(e){const[t,n]=o(null),r=i(e),s=a(e=>{const t=$e(e.target);t&&n(e=>e?(e.set(t,Be(t)),new Map(e)):null)},[]);return l(()=>{const t=r.current;if(e!==t){o(t);const i=e.map(e=>{const t=$e(e);return t?(t.addEventListener("scroll",s,{passive:!0}),[t,Be(t)]):null}).filter(e=>null!=e);n(i.length?new Map(i):null),r.current=e}return()=>{o(e),o(t)};function o(e){e.forEach(e=>{const t=$e(e);null==t||t.removeEventListener("scroll",s)})}},[s,e]),p(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>ne(e,t),be):Ue(e):be,[e,t])}(Se),Pe=Mt(Ae),Fe=Mt(Ae,[se]),Oe=ne(Ee,Pe),Ie=ve?De(ve,Ee):null,We=F&&Ie?v({active:F,collisionRect:Ie,droppableRects:Q,droppableContainers:X,pointerCoordinates:Me}):null,He=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}(We,"id"),[je,Ke]=o(null),Xe=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ye?Ee:ne(Ee,Fe),null!=(c=null==je?void 0:je.rect)?c:null,se),Ve=i(null),Je=a((e,t)=>{let{sensor:n,options:r}=t;if(null==B.current)return;const o=A.get(B.current);if(!o)return;const i=e.nativeEvent,a=new n({active:B.current,activeNode:o,event:i,options:r,context:de,onAbort(e){if(!A.get(e))return;const{onDragAbort:t}=K.current,n={id:e};null==t||t(n),N({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!A.get(e))return;const{onDragPending:o}=K.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),N({type:"onDragPending",event:i})},onStart(e){const t=B.current;if(null==t)return;const n=A.get(t);if(!n)return;const{onDragStart:r}=K.current,o={activatorEvent:i,active:{id:t,data:n.data,rect:P}};w(()=>{null==r||r(o),D(Kt.Initializing),R({type:fe.DragStart,initialCoordinates:e,active:t}),N({type:"onDragStart",event:o}),q(Ve.current),j(i)})},onMove(e){R({type:fe.DragMove,coordinates:e})},onEnd:l(fe.DragEnd),onCancel:l(fe.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=de.current;let a=null;if(t&&o){const{cancelDrop:l}=K.current;if(a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===fe.DragEnd&&"function"==typeof l){await Promise.resolve(l(a))&&(e=fe.DragCancel)}}B.current=null,w(()=>{R({type:e}),D(Kt.Uninitialized),Ke(null),q(null),j(null),Ve.current=null;const t=e===fe.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=K.current[t];null==e||e(a),N({type:t,event:a})}})}}Ve.current=a},[A]),Ge=function(e,t){return p(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(g,a((e,t)=>(n,r)=>{const o=n.nativeEvent,i=A.get(r);if(null!==B.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},B.current=r,Je(n,t))},[A,Je]));!function(e){l(()=>{if(!I)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(g),Y(()=>{se&&E===Kt.Initializing&&D(Kt.Initialized)},[se,E]),l(()=>{const{onDragMove:e}=K.current,{active:t,activatorEvent:n,collisions:r,over:o}=de.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:Oe.x,y:Oe.y},over:o};w(()=>{null==e||e(i),N({type:"onDragMove",event:i})})},[Oe.x,Oe.y]),l(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=de.current;if(!e||null==B.current||!t||!o)return;const{onDragOver:i}=K.current,a=r.get(He),l=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:l};w(()=>{Ke(l),null==i||i(s),N({type:"onDragOver",event:s})})},[He]),Y(()=>{de.current={activatorEvent:W,active:F,activeNode:re,collisionRect:Ie,collisions:We,droppableRects:Q,draggableNodes:A,draggingNode:ge,draggingNodeRect:ve,droppableContainers:L,over:je,scrollableAncestors:Se,scrollAdjustedTranslate:Oe},P.current={initial:ve,translated:Ie}},[F,re,We,Ie,A,ge,ve,Q,L,je,Se,Oe]),bt({...ae,delta:k,draggingRect:Ie,pointerCoordinates:Me,scrollableAncestors:Se,scrollableAncestorRects:Re});const _e=p(()=>({active:F,activeNode:re,activeNodeRect:se,activatorEvent:W,collisions:We,containerNodeRect:ce,dragOverlay:he,draggableNodes:A,droppableContainers:L,droppableRects:Q,over:je,measureDroppableContainers:Z,scrollableAncestors:Se,scrollableAncestorRects:Re,measuringConfiguration:V,measuringScheduled:te,windowRect:Ce}),[F,re,se,W,We,ce,he,A,L,Q,je,Z,Se,Re,V,te,Ce]),Qe=p(()=>({activatorEvent:W,activators:Ge,active:F,activeNodeRect:se,ariaDescribedById:{draggable:U},dispatch:R,draggableNodes:A,over:je,measureDroppableContainers:Z}),[W,Ge,F,se,R,U,A,je,Z]);return r.createElement(ue.Provider,{value:z},r.createElement(Ot.Provider,{value:Qe},r.createElement(It.Provider,{value:_e},r.createElement(jt.Provider,{value:Xe},m)),r.createElement(Ht,{disabled:!1===(null==u?void 0:u.restoreFocus)})),r.createElement(me,{...u,hiddenTextDescribedById:U}))}),Yt=/* @__PURE__ */s(null),Vt="button";function Jt(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=ee("Draggable"),{activators:a,activatorEvent:l,active:s,activeNodeRect:d,ariaDescribedById:u,draggableNodes:h,over:m}=c(Ot),{role:f=Vt,roleDescription:g="draggable",tabIndex:v=0}=null!=o?o:{},b=(null==s?void 0:s.id)===t,y=c(b?jt:Yt),[w,x]=_(),[C,S]=_(),R=function(e,t){return p(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(a,t),N=J(n);Y(()=>(h.set(t,{id:t,key:i,node:w,activatorNode:C,data:N}),()=>{const e=h.get(t);e&&e.key===i&&h.delete(t)}),[h,t]);return{active:s,activatorEvent:l,activeNodeRect:d,attributes:p(()=>({role:f,tabIndex:v,"aria-disabled":r,"aria-pressed":!(!b||f!==Vt)||void 0,"aria-roledescription":g,"aria-describedby":u.draggable}),[r,f,v,b,g,u.draggable]),isDragging:b,listeners:r?void 0:R,node:w,over:m,setNodeRef:x,setActivatorNodeRef:S,transform:y}}const Gt={timeout:25};const _t=({slotPosition:n,isEditing:r,isDragging:o,children:s})=>{const{attributes:d,listeners:u,setNodeRef:p,transform:h}=Jt({id:`slot-${n}`,data:{slotPosition:n},disabled:!r}),{setNodeRef:m,isOver:f}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=ee("Droppable"),{active:d,dispatch:u,over:p,measureDroppableContainers:h}=c(Ot),m=i({disabled:n}),f=i(!1),g=i(null),v=i(null),{disabled:b,updateMeasurementsFor:y,timeout:w}={...Gt,...o},x=J(null!=y?y:r),C=Nt({callback:a(()=>{f.current?(null!=v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{h(Array.isArray(x.current)?x.current:[x.current]),v.current=null},w)):f.current=!0},[w]),disabled:b||!d}),S=a((e,t)=>{C&&(t&&(C.unobserve(t),f.current=!1),e&&C.observe(e))},[C]),[R,N]=_(S),z=J(t);return l(()=>{C&&R.current&&(C.disconnect(),f.current=!1,C.observe(R.current))},[R,C]),l(()=>(u({type:fe.RegisterDroppable,element:{id:r,key:s,disabled:n,node:R,rect:g,data:z}}),()=>u({type:fe.UnregisterDroppable,key:s,id:r})),[r]),l(()=>{n!==m.current.disabled&&(u({type:fe.SetDroppableDisabled,id:r,key:s,disabled:n}),m.current.disabled=n)},[r,s,n,u]),{active:d,rect:g,isOver:(null==p?void 0:p.id)===r,node:R,over:p,setNodeRef:N}}({id:`drop-${n}`,data:{slotPosition:n}}),g={position:"relative",height:"100%",width:"100%",transform:h?`translate3d(${h.x}px, ${h.y}px, 0)`:void 0},v=a(e=>{p(e),m(e)},[p,m]);/* @__PURE__ */
36
36
  return t("div",{ref:v,style:g,className:`slot-with-overlay ${r?"edit-mode":""} ${o?"dragging":""} ${f?"drag-over":""}`,children:[s,r&&/* @__PURE__ */t("div",{className:"slot-edit-overlay",...d,...u,children:[
37
37
  /* @__PURE__ */e("div",{className:"drag-indicator",children:"⋮⋮"}),
38
- /* @__PURE__ */e("div",{className:"slot-position-label",children:n.toUpperCase()})]})]})},Qt=({isEditMode:n,onLayoutChange:r,panels:i,layout:s,...c})=>{const[d,u]=o(null),[h,m]=o({x:0,y:0}),f=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return p(()=>[...t].filter(e=>null!=e),[...t])}(p(()=>({sensor:g,options:null!=v?v:{}}),[g=ct,v={activationConstraint:{distance:8}}]));var g,v;const b=a(e=>{const t=e.active.id;if(t.startsWith("slot-")){const e=t.replace("slot-","");u(e),m({x:0,y:0})}},[]),y=a(e=>{const{delta:t}=e;m({x:t.x,y:t.y})},[]),w=a(e=>{const{active:t,over:n}=e;if(u(null),m({x:0,y:0}),!n)return;const o=t.id,i=n.id,a=o.replace("slot-",""),l=i.replace("drop-","");if(a===l)return;const c={...s},d=c[a];c[a]=c[l],c[l]=d,r&&r(c)},[s,r]);l(()=>{if(!d||!n)return;const e=document.querySelector(`[data-slot="${d}"]`);return e&&(e.setAttribute("data-dragging","true"),e.style.setProperty("transform",`scale(0.95) translate(${h.x}px, ${h.y}px)`,"important"),e.style.setProperty("z-index","1000","important"),e.style.setProperty("transition","none","important"),e.style.setProperty("opacity","0.95","important"),e.style.setProperty("box-shadow","0 12px 24px rgba(0, 0, 0, 0.25)","important")),()=>{e&&(e.removeAttribute("data-dragging"),e.style.removeProperty("transform"),e.style.removeProperty("z-index"),e.style.removeProperty("transition"),e.style.removeProperty("opacity"),e.style.removeProperty("box-shadow"))}},[d,h,n]);/* @__PURE__ */
39
- return e(Xt,{sensors:f,collisionDetection:Se,onDragStart:b,onDragMove:y,onDragEnd:w,children:/* @__PURE__ */t("div",{className:"editable-panel-layout "+(n?"edit-mode-active":""),children:[
40
- /* @__PURE__ */e(P,{...c,panels:i,layout:s,slotDataAttributes:{left:{"data-slot":"left","data-edit-mode":n?"true":"false"},middle:{"data-slot":"middle","data-edit-mode":n?"true":"false"},right:{"data-slot":"right","data-edit-mode":n?"true":"false"}}}),n&&/* @__PURE__ */e(Zt,{layout:s,activeSlot:d,onDragStart:()=>{},onDragEnd:()=>{}})]})})},Zt=({layout:t,activeSlot:n})=>{const[i,a]=o(/* @__PURE__ */new Map);return r.useEffect(()=>{const e=()=>{const e=/* @__PURE__ */new Map;["left","middle","right"].forEach(t=>{const n=document.querySelector(`[data-slot="${t}"]`);if(n){const r=n.getBoundingClientRect();e.set(t,r)}}),a(e)};e(),window.addEventListener("resize",e);const t=setInterval(e,100);return()=>{window.removeEventListener("resize",e),clearInterval(t)}},[t]),/* @__PURE__ */e("div",{style:{pointerEvents:"none",position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:999},children:["left","middle","right"].map(r=>{if(!t[r])return null;const o=i.get(r);if(!o)return null;const a=n===r;/* @__PURE__ */
41
- return e("div",{style:{position:"fixed",top:o.top,left:o.left,width:o.width,height:o.height,pointerEvents:"auto"},children:/* @__PURE__ */e(_t,{slotPosition:r,isEditing:!0,isDragging:a,children:/* @__PURE__ */e("div",{style:{height:"100%"}})})},r)})})},en=e=>null!=e&&"object"==typeof e&&"type"in e,tn=e=>null==e?[]:"string"==typeof e?[e]:en(e)?e.panels:[],nn=({availablePanels:r,currentLayout:i,onChange:l,className:s="",theme:c})=>{const d=C(),u=c||d.theme,[p,h]=o(null),m=a(e=>e&&r.find(t=>t.id===e)||null,[r]),f=a(()=>[...r].sort((e,t)=>e.label.localeCompare(t.label)),[r]),g=a(e=>{const t=tn(i.left),n=tn(i.middle),r=tn(i.right);return t.includes(e)||n.includes(e)||r.includes(e)},[i]),v=a((e,t)=>{const n={...e};return["left","middle","right"].forEach(e=>{const r=n[e];if(r===t)n[e]=null;else if(null!=r&&en(r)){const o=r.panels.filter(e=>e!==t);0===o.length?n[e]=null:1===o.length?n[e]=o[0]:n[e]={...r,panels:o}}}),n},[]),b=a((e,t)=>{const n=i[e];if(!en(n)||"tabs"!==n.type)return;const r=n.panels.filter(e=>e!==t),o={...i};o[e]={...n,panels:r},l(o)},[i,l]),y=a((e,t)=>{t.stopPropagation();const n=i[e];if(en(n)&&"tabs"===n.type){const t={...i};t[e]=n.panels.length>0?n.panels[0]:null,l(t),h(null)}else{const t=n&&"string"==typeof n?[n]:[],r={...i};r[e]={type:"tabs",panels:t,config:{defaultActiveTab:0,tabPosition:"top"}},l(r),h({type:"slot",position:e})}},[i,l]),w=a(e=>{if(p)if("slot"===p.type){if(p.position===e)return;const t={...i},n=t[p.position];t[p.position]=t[e],t[e]=n,l(t),h(null)}else{const t=i[e];if(en(t)&&"tabs"===t.type){if(t.panels.includes(p.id))return void b(e,p.id);const n=t,r=v(i,p.id);return r[e]={...n,panels:[...n.panels,p.id]},void l(r)}{const t=v(i,p.id);t[e]=p.id,l(t),h(null)}}else h({type:"slot",position:e})},[p,i,l,v,b]),x=a(e=>{if(p)if("slot"===p.type){const t=i[p.position];if(en(t)&&"tabs"===t.type){if(t.panels.includes(e))return void b(p.position,e);const n=t,r=v(i,e);return r[p.position]={...n,panels:[...n.panels,e]},void l(r)}{const t=v(i,e);t[p.position]=e,l(t),h(null)}}else h({type:"panel",id:e});else h({type:"panel",id:e})},[p,i,l,v,b]),S=a((e,t)=>{t.stopPropagation();const n={...i};n[e]=null,l(n),h(null)},[i,l]),R=a((e,t,n)=>{n.stopPropagation();const r=i[e];if(!en(r)||"tabs"!==r.type)return;const o=r.panels.filter(e=>e!==t),a={...i};a[e]={...r,panels:o},l(a)},[i,l]),N=a((e,t)=>{const n=i[e];if(!en(n)||"tabs"!==n.type)return;const r={...i};r[e]={...n,config:{...n.config,...t}},l(r)},[i,l]),E=f(),z=e=>{const t=i[e];return en(t)&&"tabs"===t.type},D={"--configurator-bg":u.colors.background,"--configurator-title":u.colors.textSecondary,"--slot-bg":u.colors.backgroundSecondary,"--slot-border":u.colors.border,"--slot-border-hover":u.colors.textTertiary,"--slot-border-selected":u.colors.primary,"--slot-bg-selected":u.colors.backgroundLight,"--slot-label":u.colors.textTertiary,"--slot-content-text":u.colors.text,"--slot-preview-bg":u.colors.backgroundTertiary,"--slot-preview-border":u.colors.border,"--slot-preview-text":u.colors.textMuted,"--slot-empty-text":u.colors.textMuted,"--panel-bg":u.colors.backgroundSecondary,"--panel-border":u.colors.border,"--panel-border-hover":u.colors.textSecondary,"--panel-border-selected":u.colors.primary,"--panel-bg-selected":u.colors.backgroundLight,"--panel-label-text":u.colors.text,"--panel-preview-bg":u.colors.backgroundTertiary,"--panel-preview-text":u.colors.textMuted,"--clear-btn-bg":u.colors.error,"--clear-btn-text":u.colors.background,"--clear-btn-hover":u.colors.error,"--hint-bg":u.colors.backgroundLight,"--hint-border":u.colors.primary,"--hint-text":u.colors.text};/* @__PURE__ */
38
+ /* @__PURE__ */e("div",{className:"slot-position-label",children:n.toUpperCase()})]})]})},Qt=d(({isEditMode:n,onLayoutChange:r,panels:i,layout:s,...c},d)=>{const[u,h]=o(null),[m,f]=o({x:0,y:0}),g=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return p(()=>[...t].filter(e=>null!=e),[...t])}(p(()=>({sensor:v,options:null!=b?b:{}}),[v=ct,b={activationConstraint:{distance:8}}]));var v,b;const y=a(e=>{const t=e.active.id;if(t.startsWith("slot-")){const e=t.replace("slot-","");h(e),f({x:0,y:0})}},[]),w=a(e=>{const{delta:t}=e;f({x:t.x,y:t.y})},[]),x=a(e=>{const{active:t,over:n}=e;if(h(null),f({x:0,y:0}),!n)return;const o=t.id,i=n.id,a=o.replace("slot-",""),l=i.replace("drop-","");if(a===l)return;const c={...s},d=c[a];c[a]=c[l],c[l]=d,r&&r(c)},[s,r]);l(()=>{if(!u||!n)return;const e=document.querySelector(`[data-slot="${u}"]`);return e&&(e.setAttribute("data-dragging","true"),e.style.setProperty("transform",`scale(0.95) translate(${m.x}px, ${m.y}px)`,"important"),e.style.setProperty("z-index","1000","important"),e.style.setProperty("transition","none","important"),e.style.setProperty("opacity","0.95","important"),e.style.setProperty("box-shadow","0 12px 24px rgba(0, 0, 0, 0.25)","important")),()=>{e&&(e.removeAttribute("data-dragging"),e.style.removeProperty("transform"),e.style.removeProperty("z-index"),e.style.removeProperty("transition"),e.style.removeProperty("opacity"),e.style.removeProperty("box-shadow"))}},[u,m,n]);/* @__PURE__ */
39
+ return e(Xt,{sensors:g,collisionDetection:Se,onDragStart:y,onDragMove:w,onDragEnd:x,children:/* @__PURE__ */t("div",{className:"editable-panel-layout "+(n?"edit-mode-active":""),children:[
40
+ /* @__PURE__ */e(P,{ref:d,...c,panels:i,layout:s,slotDataAttributes:{left:{"data-slot":"left","data-edit-mode":n?"true":"false"},middle:{"data-slot":"middle","data-edit-mode":n?"true":"false"},right:{"data-slot":"right","data-edit-mode":n?"true":"false"}}}),n&&/* @__PURE__ */e(Zt,{layout:s,activeSlot:u,onDragStart:()=>{},onDragEnd:()=>{}})]})})});Qt.displayName="EditableConfigurablePanelLayout";const Zt=({layout:t,activeSlot:n})=>{const[i,a]=o(/* @__PURE__ */new Map);return r.useEffect(()=>{const e=()=>{const e=/* @__PURE__ */new Map;["left","middle","right"].forEach(t=>{const n=document.querySelector(`[data-slot="${t}"]`);if(n){const r=n.getBoundingClientRect();e.set(t,r)}}),a(e)};e(),window.addEventListener("resize",e);const t=setInterval(e,100);return()=>{window.removeEventListener("resize",e),clearInterval(t)}},[t]),/* @__PURE__ */e("div",{style:{pointerEvents:"none",position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:999},children:["left","middle","right"].map(r=>{if(!t[r])return null;const o=i.get(r);if(!o)return null;const a=n===r;/* @__PURE__ */
41
+ return e("div",{style:{position:"fixed",top:o.top,left:o.left,width:o.width,height:o.height,pointerEvents:"auto"},children:/* @__PURE__ */e(_t,{slotPosition:r,isEditing:!0,isDragging:a,children:/* @__PURE__ */e("div",{style:{height:"100%"}})})},r)})})},en=e=>null!=e&&"object"==typeof e&&"type"in e,tn=e=>null==e?[]:"string"==typeof e?[e]:en(e)?e.panels:[],nn=({availablePanels:r,currentLayout:i,onChange:l,className:s="",theme:c})=>{const d=C(),u=c||d.theme,[p,h]=o(null),m=a(e=>e&&r.find(t=>t.id===e)||null,[r]),f=a(()=>[...r].sort((e,t)=>e.label.localeCompare(t.label)),[r]),g=a(e=>{const t=tn(i.left),n=tn(i.middle),r=tn(i.right);return t.includes(e)||n.includes(e)||r.includes(e)},[i]),v=a((e,t)=>{const n={...e};return["left","middle","right"].forEach(e=>{const r=n[e];if(r===t)n[e]=null;else if(null!=r&&en(r)){const o=r.panels.filter(e=>e!==t);0===o.length?n[e]=null:1===o.length?n[e]=o[0]:n[e]={...r,panels:o}}}),n},[]),b=a((e,t)=>{const n=i[e];if(!en(n)||"tabs"!==n.type)return;const r=n.panels.filter(e=>e!==t),o={...i};o[e]={...n,panels:r},l(o)},[i,l]),y=a((e,t)=>{t.stopPropagation();const n=i[e];if(en(n)&&"tabs"===n.type){const t={...i};t[e]=n.panels.length>0?n.panels[0]:null,l(t),h(null)}else{const t=n&&"string"==typeof n?[n]:[],r={...i};r[e]={type:"tabs",panels:t,config:{defaultActiveTab:0,tabPosition:"top"}},l(r),h({type:"slot",position:e})}},[i,l]),w=a(e=>{if(p)if("slot"===p.type){if(p.position===e)return;const t={...i},n=t[p.position];t[p.position]=t[e],t[e]=n,l(t),h(null)}else{const t=i[e];if(en(t)&&"tabs"===t.type){if(t.panels.includes(p.id))return void b(e,p.id);const n=t,r=v(i,p.id);return r[e]={...n,panels:[...n.panels,p.id]},void l(r)}{const t=v(i,p.id);t[e]=p.id,l(t),h(null)}}else h({type:"slot",position:e})},[p,i,l,v,b]),x=a(e=>{if(p)if("slot"===p.type){const t=i[p.position];if(en(t)&&"tabs"===t.type){if(t.panels.includes(e))return void b(p.position,e);const n=t,r=v(i,e);return r[p.position]={...n,panels:[...n.panels,e]},void l(r)}{const t=v(i,e);t[p.position]=e,l(t),h(null)}}else h({type:"panel",id:e});else h({type:"panel",id:e})},[p,i,l,v,b]),S=a((e,t)=>{t.stopPropagation();const n={...i};n[e]=null,l(n),h(null)},[i,l]),R=a((e,t,n)=>{n.stopPropagation();const r=i[e];if(!en(r)||"tabs"!==r.type)return;const o=r.panels.filter(e=>e!==t),a={...i};a[e]={...r,panels:o},l(a)},[i,l]),N=a((e,t)=>{const n=i[e];if(!en(n)||"tabs"!==n.type)return;const r={...i};r[e]={...n,config:{...n.config,...t}},l(r)},[i,l]),z=f(),E=e=>{const t=i[e];return en(t)&&"tabs"===t.type},D={"--configurator-bg":u.colors.background,"--configurator-title":u.colors.textSecondary,"--slot-bg":u.colors.backgroundSecondary,"--slot-border":u.colors.border,"--slot-border-hover":u.colors.textTertiary,"--slot-border-selected":u.colors.primary,"--slot-bg-selected":u.colors.backgroundLight,"--slot-label":u.colors.textTertiary,"--slot-content-text":u.colors.text,"--slot-preview-bg":u.colors.backgroundTertiary,"--slot-preview-border":u.colors.border,"--slot-preview-text":u.colors.textMuted,"--slot-empty-text":u.colors.textMuted,"--panel-bg":u.colors.backgroundSecondary,"--panel-border":u.colors.border,"--panel-border-hover":u.colors.textSecondary,"--panel-border-selected":u.colors.primary,"--panel-bg-selected":u.colors.backgroundLight,"--panel-label-text":u.colors.text,"--panel-preview-bg":u.colors.backgroundTertiary,"--panel-preview-text":u.colors.textMuted,"--clear-btn-bg":u.colors.error,"--clear-btn-text":u.colors.background,"--clear-btn-hover":u.colors.error,"--hint-bg":u.colors.backgroundLight,"--hint-border":u.colors.primary,"--hint-text":u.colors.text};/* @__PURE__ */
42
42
  return t("div",{className:`panel-configurator ${s}`,style:D,children:[
43
43
  /* @__PURE__ */t("div",{className:"configurator-section",children:[
44
44
  /* @__PURE__ */e("h3",{className:"section-title",children:"Panel Layout (3 Slots)"}),
@@ -57,10 +57,10 @@ return t("div",{"data-position":n,className:`slot ${o?"selected":""} ${null!==r?
57
57
  /* @__PURE__ */e("button",{className:"slot-clear-btn",onClick:e=>S(n,e),"aria-label":`Remove ${"string"==typeof r?m(r)?.label:"panel"} from ${n} slot`,children:"×"})]})]},n)})})]}),
58
58
  /* @__PURE__ */t("div",{className:"configurator-section",children:[
59
59
  /* @__PURE__ */e("h3",{className:"section-title",children:"Available Panels"}),
60
- /* @__PURE__ */e("div",{className:"available-panels",children:E.map(n=>{const r=(o=n.id,"panel"===p?.type&&p.id===o);var o;const i=g(n.id);/* @__PURE__ */
60
+ /* @__PURE__ */e("div",{className:"available-panels",children:z.map(n=>{const r=(o=n.id,"panel"===p?.type&&p.id===o);var o;const i=g(n.id);/* @__PURE__ */
61
61
  return t("div",{className:`available-panel ${r?"selected":""} ${i?"in-use":""}`,onClick:()=>x(n.id),children:[
62
- /* @__PURE__ */e("div",{className:"panel-label",children:n.label}),n.preview&&/* @__PURE__ */e("div",{className:"panel-preview",children:n.preview})]},n.id)})})]}),p&&/* @__PURE__ */e("div",{className:"selection-hint",children:"slot"===p.type?z(p.position)?/* @__PURE__ */t(n,{children:["Selected: ",p.position," slot (Tab Mode). Click panels to add them to the tab group."]}):/* @__PURE__ */t(n,{children:["Selected: ",p.position," slot. Click another slot to swap, or click a panel to assign."]}):/* @__PURE__ */t(n,{children:["Selected: ",m(p.id)?.label,". Click a slot to assign",z("left")||z("middle")||z("right")?" (or add to tab group)":"","."]})}),
62
+ /* @__PURE__ */e("div",{className:"panel-label",children:n.label}),n.preview&&/* @__PURE__ */e("div",{className:"panel-preview",children:n.preview})]},n.id)})})]}),p&&/* @__PURE__ */e("div",{className:"selection-hint",children:"slot"===p.type?E(p.position)?/* @__PURE__ */t(n,{children:["Selected: ",p.position," slot (Tab Mode). Click panels to add them to the tab group."]}):/* @__PURE__ */t(n,{children:["Selected: ",p.position," slot. Click another slot to swap, or click a panel to assign."]}):/* @__PURE__ */t(n,{children:["Selected: ",m(p.id)?.label,". Click a slot to assign",E("left")||E("middle")||E("right")?" (or add to tab group)":"","."]})}),
63
63
  /* @__PURE__ */t("div",{className:"usage-hint",children:[
64
64
  /* @__PURE__ */e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",style:{verticalAlign:"text-bottom",marginRight:"4px"},children:/* @__PURE__ */e("path",{d:"M8 1a7 7 0 100 14A7 7 0 008 1zm0 1a6 6 0 110 12A6 6 0 018 2zm.5 3.5v3h-1v-3h1zm0 4v1h-1v-1h1z"})}),
65
- /* @__PURE__ */e("strong",{children:"Tip:"})," Toggle the tab icon on a slot to enable tab mode, then click panels to add multiple tabs."]})]})};export{N as AnimatedResizableLayout,E as AnimatedVerticalLayout,z as CollapsibleSplitPane,P as ConfigurablePanelLayout,Qt as EditableConfigurablePanelLayout,k as PanelBoundsProvider,nn as PanelConfigurator,O as ResponsiveConfigurablePanelLayout,F as SnapCarousel,M as TabGroup,S as mapThemeToPanelVars,R as mapThemeToTabVars,B as useMediaQuery,L as usePanelBounds,$ as usePanelOffset};
65
+ /* @__PURE__ */e("strong",{children:"Tip:"})," Toggle the tab icon on a slot to enable tab mode, then click panels to add multiple tabs."]})]})};export{N as AnimatedResizableLayout,z as AnimatedVerticalLayout,E as CollapsibleSplitPane,P as ConfigurablePanelLayout,Qt as EditableConfigurablePanelLayout,k as PanelBoundsProvider,nn as PanelConfigurator,O as ResponsiveConfigurablePanelLayout,F as SnapCarousel,M as TabGroup,S as mapThemeToPanelVars,R as mapThemeToTabVars,B as useMediaQuery,L as usePanelBounds,$ as usePanelOffset};
66
66
  //# sourceMappingURL=index.esm.js.map