@feedmepos/ui-library 1.3.10 → 1.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +8 -0
- package/dist/components/table/FmTable.vue.d.ts +10 -2
- package/dist/components/table/FmTableHeader.vue.d.ts +5 -1
- package/dist/components.d.ts +44 -2
- package/dist/federation/FmTable.vue_vue_type_script_setup_true_lang-DEmdzYu6.js +4 -0
- package/dist/federation/FmTableHeader.vue_vue_type_script_setup_true_lang-2LwfENRk.js +4 -0
- package/dist/federation/{__federation_expose_FmTable-DYDzzpEW.js → __federation_expose_FmTable-CtQP8r7z.js} +1 -1
- package/dist/federation/{__federation_expose_FmTableHeader-DDVHokQy.js → __federation_expose_FmTableHeader-DTfo4_HR.js} +1 -1
- package/dist/federation/feedmepos-ui-components.js +1 -1
- package/dist/federation/{index-yLRw-J6e.js → index-CJlLo6jn.js} +2 -2
- package/dist/feedmepos-ui-library.js +9787 -9178
- package/dist/feedmepos-ui-library.umd.cjs +35 -32
- package/package.json +2 -1
- package/dist/federation/FmTable.vue_vue_type_script_setup_true_lang-D3ZXOvDn.js +0 -1
- package/dist/federation/FmTableHeader.vue_vue_type_script_setup_true_lang-DeXjRdge.js +0 -4
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# 1.4.0-beta.2 - 2025-02-12
|
|
2
|
+
|
|
3
|
+
- `FmTable`
|
|
4
|
+
- experimental support for virtual scroll, enable it by setting `virtual: true`, and set `virtual-row-height` to the estimated height of a row (default is `48px`). Unsupported features:
|
|
5
|
+
- `table-row` slot
|
|
6
|
+
- dnd
|
|
7
|
+
- sub rows
|
|
8
|
+
|
|
1
9
|
# 1.3.9 - 2025-01-16
|
|
2
10
|
|
|
3
11
|
- `FmMenu`
|
|
@@ -79,6 +79,10 @@ export interface FmTableProps {
|
|
|
79
79
|
component: InstanceType<typeof VueDraggable>;
|
|
80
80
|
};
|
|
81
81
|
}) => boolean;
|
|
82
|
+
/** Enable virtual scrolling */
|
|
83
|
+
virtual?: boolean;
|
|
84
|
+
/** Virtual row height in pixels */
|
|
85
|
+
virtualRowHeight?: number;
|
|
82
86
|
}
|
|
83
87
|
export interface FmTableSlots {
|
|
84
88
|
/**
|
|
@@ -112,6 +116,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
112
116
|
getRowCanExpand: () => true;
|
|
113
117
|
getSubRow: (row: any) => any;
|
|
114
118
|
onVuedraggableMove: () => true;
|
|
119
|
+
virtual: boolean;
|
|
120
|
+
virtualRowHeight: number;
|
|
115
121
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
116
122
|
"sort-change": (value: SortingState) => void;
|
|
117
123
|
"dnd-changed": (value: any[]) => void;
|
|
@@ -135,6 +141,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
135
141
|
getRowCanExpand: () => true;
|
|
136
142
|
getSubRow: (row: any) => any;
|
|
137
143
|
onVuedraggableMove: () => true;
|
|
144
|
+
virtual: boolean;
|
|
145
|
+
virtualRowHeight: number;
|
|
138
146
|
}>>> & {
|
|
139
147
|
"onSort-change"?: ((value: SortingState) => any) | undefined;
|
|
140
148
|
"onDnd-changed"?: ((value: any[]) => any) | undefined;
|
|
@@ -210,7 +218,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
210
218
|
} & {
|
|
211
219
|
itemKey?: string | Function | undefined;
|
|
212
220
|
}>, {
|
|
213
|
-
/** Default is 10 */
|
|
214
221
|
move: Function;
|
|
215
222
|
tag: string;
|
|
216
223
|
clone: Function;
|
|
@@ -258,7 +265,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
258
265
|
onDragMove(evt: any, originalEvent: any): any;
|
|
259
266
|
onDragEnd(): void;
|
|
260
267
|
}, {
|
|
261
|
-
/** Default is 10 */
|
|
262
268
|
move: Function;
|
|
263
269
|
tag: string;
|
|
264
270
|
clone: Function;
|
|
@@ -268,6 +274,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
268
274
|
}>;
|
|
269
275
|
};
|
|
270
276
|
}) => boolean;
|
|
277
|
+
virtual: boolean;
|
|
278
|
+
virtualRowHeight: number;
|
|
271
279
|
}, {}>, Readonly<FmTableSlots> & FmTableSlots>;
|
|
272
280
|
export default _default;
|
|
273
281
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -2,7 +2,11 @@ import { type Table } from '@tanstack/vue-table';
|
|
|
2
2
|
export interface FmTableHeaderProps {
|
|
3
3
|
table: Table<unknown>;
|
|
4
4
|
}
|
|
5
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<FmTableHeaderProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<FmTableHeaderProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:column-widths": (columnWidths: number[]) => void;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<FmTableHeaderProps>>> & {
|
|
8
|
+
"onUpdate:column-widths"?: ((columnWidths: number[]) => any) | undefined;
|
|
9
|
+
}, {}, {}>;
|
|
6
10
|
export default _default;
|
|
7
11
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
12
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
package/dist/components.d.ts
CHANGED
|
@@ -11840,6 +11840,14 @@ export declare const components: {
|
|
|
11840
11840
|
required: true;
|
|
11841
11841
|
default: () => true;
|
|
11842
11842
|
};
|
|
11843
|
+
virtual: {
|
|
11844
|
+
type: import("vue").PropType<boolean>;
|
|
11845
|
+
default: boolean;
|
|
11846
|
+
};
|
|
11847
|
+
virtualRowHeight: {
|
|
11848
|
+
type: import("vue").PropType<number>;
|
|
11849
|
+
default: number;
|
|
11850
|
+
};
|
|
11843
11851
|
}>> & {
|
|
11844
11852
|
"onSort-change"?: ((value: import("./components/table/FmTable.vue").SortingState) => any) | undefined;
|
|
11845
11853
|
"onDnd-changed"?: ((value: any[]) => any) | undefined;
|
|
@@ -12055,6 +12063,14 @@ export declare const components: {
|
|
|
12055
12063
|
required: true;
|
|
12056
12064
|
default: () => true;
|
|
12057
12065
|
};
|
|
12066
|
+
virtual: {
|
|
12067
|
+
type: import("vue").PropType<boolean>;
|
|
12068
|
+
default: boolean;
|
|
12069
|
+
};
|
|
12070
|
+
virtualRowHeight: {
|
|
12071
|
+
type: import("vue").PropType<number>;
|
|
12072
|
+
default: number;
|
|
12073
|
+
};
|
|
12058
12074
|
}>> & {
|
|
12059
12075
|
"onSort-change"?: ((value: import("./components/table/FmTable.vue").SortingState) => any) | undefined;
|
|
12060
12076
|
"onDnd-changed"?: ((value: any[]) => any) | undefined;
|
|
@@ -12186,6 +12202,8 @@ export declare const components: {
|
|
|
12186
12202
|
}>;
|
|
12187
12203
|
};
|
|
12188
12204
|
}) => boolean;
|
|
12205
|
+
virtual: boolean;
|
|
12206
|
+
virtualRowHeight: number;
|
|
12189
12207
|
}, true, {}, {}, {
|
|
12190
12208
|
P: {};
|
|
12191
12209
|
B: {};
|
|
@@ -12398,6 +12416,14 @@ export declare const components: {
|
|
|
12398
12416
|
required: true;
|
|
12399
12417
|
default: () => true;
|
|
12400
12418
|
};
|
|
12419
|
+
virtual: {
|
|
12420
|
+
type: import("vue").PropType<boolean>;
|
|
12421
|
+
default: boolean;
|
|
12422
|
+
};
|
|
12423
|
+
virtualRowHeight: {
|
|
12424
|
+
type: import("vue").PropType<number>;
|
|
12425
|
+
default: number;
|
|
12426
|
+
};
|
|
12401
12427
|
}>> & {
|
|
12402
12428
|
"onSort-change"?: ((value: import("./components/table/FmTable.vue").SortingState) => any) | undefined;
|
|
12403
12429
|
"onDnd-changed"?: ((value: any[]) => any) | undefined;
|
|
@@ -12529,6 +12555,8 @@ export declare const components: {
|
|
|
12529
12555
|
}>;
|
|
12530
12556
|
};
|
|
12531
12557
|
}) => boolean;
|
|
12558
|
+
virtual: boolean;
|
|
12559
|
+
virtualRowHeight: number;
|
|
12532
12560
|
}>;
|
|
12533
12561
|
__isFragment?: undefined;
|
|
12534
12562
|
__isTeleport?: undefined;
|
|
@@ -12738,6 +12766,14 @@ export declare const components: {
|
|
|
12738
12766
|
required: true;
|
|
12739
12767
|
default: () => true;
|
|
12740
12768
|
};
|
|
12769
|
+
virtual: {
|
|
12770
|
+
type: import("vue").PropType<boolean>;
|
|
12771
|
+
default: boolean;
|
|
12772
|
+
};
|
|
12773
|
+
virtualRowHeight: {
|
|
12774
|
+
type: import("vue").PropType<number>;
|
|
12775
|
+
default: number;
|
|
12776
|
+
};
|
|
12741
12777
|
}>> & {
|
|
12742
12778
|
"onSort-change"?: ((value: import("./components/table/FmTable.vue").SortingState) => any) | undefined;
|
|
12743
12779
|
"onDnd-changed"?: ((value: any[]) => any) | undefined;
|
|
@@ -12874,6 +12910,8 @@ export declare const components: {
|
|
|
12874
12910
|
}>;
|
|
12875
12911
|
};
|
|
12876
12912
|
}) => boolean;
|
|
12913
|
+
virtual: boolean;
|
|
12914
|
+
virtualRowHeight: number;
|
|
12877
12915
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
12878
12916
|
$slots: Readonly<import("./components/table/FmTable.vue").FmTableSlots> & import("./components/table/FmTable.vue").FmTableSlots;
|
|
12879
12917
|
});
|
|
@@ -13032,12 +13070,16 @@ export declare const components: {
|
|
|
13032
13070
|
type: import("vue").PropType<import("@tanstack/vue-table").Table<unknown>>;
|
|
13033
13071
|
required: true;
|
|
13034
13072
|
};
|
|
13035
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13073
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13074
|
+
"update:column-widths": (columnWidths: number[]) => void;
|
|
13075
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13036
13076
|
table: {
|
|
13037
13077
|
type: import("vue").PropType<import("@tanstack/vue-table").Table<unknown>>;
|
|
13038
13078
|
required: true;
|
|
13039
13079
|
};
|
|
13040
|
-
}
|
|
13080
|
+
}>> & {
|
|
13081
|
+
"onUpdate:column-widths"?: ((columnWidths: number[]) => any) | undefined;
|
|
13082
|
+
}, {}, {}>;
|
|
13041
13083
|
FmTabs: {
|
|
13042
13084
|
new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
13043
13085
|
disabled: {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{importShared as te,__tla as Ah}from"./__federation_fn_import-CYKgoy9p.js";import{u as Cn,__tla as jh}from"./useProxiedModel-DbArcH0F.js";import{u as Rh,g as zh,a as Ph,b as Fh,c as Nh,d as Bh,F as Nt,_ as xr,__tla as Vh}from"./FmTableHeader.vue_vue_type_script_setup_true_lang-2LwfENRk.js";import Lh,{__tla as $h}from"./__federation_expose_FmIcon-BbkanMuo.js";import{_ as Wh}from"./_plugin-vue_export-helper-DlAUqK2U.js";import Bt,{__tla as Xh}from"./__federation_expose_FmButton-CX_-gqwO.js";import Hh,{__tla as Uh}from"./__federation_expose_FmMenu-BU7Xu_8c.js";import Yh,{__tla as Kh}from"./__federation_expose_FmMenuItem-4xWuTFjJ.js";import Vt,{__tla as qh}from"./__federation_expose_FmSpacer-NyWv__n8.js";import Sr,{__tla as Gh}from"./__federation_expose_FmCircularProgress-BPQ513nn.js";import{u as Zh,__tla as Jh}from"./useBreakpoints-CD9JASJ_.js";import{__tla as Qh}from"./useSnackbar-C7VTRoFB.js";import{__tla as ef}from"./useFormChild-t1_C-yoF.js";import{d as tf}from"./index-geV2sl9x.js";import{c as Lt,g as nf}from"./_commonjsHelpers-Cpj98o6Y.js";import{l as of}from"./lodash-DHyxJ22h.js";let Cr,rf=Promise.all([(()=>{try{return Ah}catch{}})(),(()=>{try{return jh}catch{}})(),(()=>{try{return Vh}catch{}})(),(()=>{try{return $h}catch{}})(),(()=>{try{return Xh}catch{}})(),(()=>{try{return Uh}catch{}})(),(()=>{try{return Kh}catch{}})(),(()=>{try{return qh}catch{}})(),(()=>{try{return Gh}catch{}})(),(()=>{try{return Jh}catch{}})(),(()=>{try{return Qh}catch{}})(),(()=>{try{return ef}catch{}})()]).then(async()=>{const{defineComponent:Er}=await te("vue"),{normalizeClass:Dr,createElementVNode:Or,openBlock:En,createBlock:kr,createCommentVNode:Mr,withModifiers:Ir,createElementBlock:Tr,pushScopeId:af,popScopeId:lf}=await te("vue"),Ar=["checked","disabled","indeterminate"],{computed:jr}=await te("vue"),Rr=Er({__name:"FmTableCheckbox",props:{checked:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean},onChange:{type:Function}},setup(e){const n=e,t=jr(()=>n.indeterminate&&!n.checked?"remove":n.checked?"check_small":"");return(o,r)=>(En(),Tr("div",{class:"fm-checkbox__input--container",onClick:r[0]||(r[0]=Ir((...i)=>o.onChange&&o.onChange(...i),["stop"]))},[Or("input",{checked:o.checked,class:Dr({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":o.checked}),disabled:o.disabled,indeterminate:o.indeterminate,type:"checkbox"},null,10,Ar),o.indeterminate||o.checked?(En(),kr(Lh,{key:0,name:t.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):Mr("",!0)]))}}),Dn=Wh(Rr,[["__scopeId","data-v-dbf1ded4"]]),{defineComponent:zr}=await te("vue"),{createVNode:Pr,renderList:Fr,Fragment:Nr,openBlock:$t,createElementBlock:Br,unref:Vr,createBlock:On,normalizeStyle:Lr,createElementVNode:$r,withCtx:kn}=await te("vue"),Wr=["id"],{ref:Xr}=await te("vue"),Mn=zr({__name:"FmTableSelection",props:{modelValue:{},items:{}},emits:["update:modelValue"],setup(e){const n=Cn(e,"modelValue"),t=Xr(!1);return(o,r)=>($t(),On(Hh,{"max-height":264,shift:"",onMenuChanged:r[0]||(r[0]=i=>t.value=i)},{"menu-button":kn(()=>{var i;return[Pr(Bt,{icon:t.value?"expand_less":"expand_more",label:(i=o.items.find(a=>a.value===o.modelValue))==null?void 0:i.label,"icon-position":"append",size:"md",variant:"tertiary"},null,8,["icon","label"])]}),"menu-wrapper":kn(({maxHeight:i})=>[$r("div",{id:`menu-wrapper-${i}`,style:Lr({maxHeight:`${i}px`}),class:"bg-fm-color-neutral-white flex flex-col overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"},[($t(!0),Br(Nr,null,Fr(o.items,a=>($t(),On(Yh,{key:a.value,label:a.label,"model-value":a.value===Vr(n),value:a.value,"onUpdate:modelValue":l=>n.value=a.value},null,8,["label","model-value","value","onUpdate:modelValue"]))),128))],12,Wr)]),_:1}))}});function In(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function se(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?In(Object(t),!0).forEach(function(o){Hr(e,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):In(Object(t)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(t,o))})}return e}function dt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dt=function(n){return typeof n}:dt=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},dt(e)}function Hr(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function fe(){return fe=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},fe.apply(this,arguments)}function Ur(e,n){if(e==null)return{};var t={},o=Object.keys(e),r,i;for(i=0;i<o.length;i++)r=o[i],!(n.indexOf(r)>=0)&&(t[r]=e[r]);return t}function Yr(e,n){if(e==null)return{};var t=Ur(e,n),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(t[o]=e[o])}return t}var Kr="1.14.0";function pe(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var ge=pe(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),qe=pe(/Edge/i),Tn=pe(/firefox/i),Ge=pe(/safari/i)&&!pe(/chrome/i)&&!pe(/android/i),An=pe(/iP(ad|od|hone)/i),qr=pe(/chrome/i)&&pe(/android/i),jn={capture:!1,passive:!1};function C(e,n,t){e.addEventListener(n,t,!ge&&jn)}function S(e,n,t){e.removeEventListener(n,t,!ge&&jn)}function ht(e,n){if(n){if(n[0]===">"&&(n=n.substring(1)),e)try{if(e.matches)return e.matches(n);if(e.msMatchesSelector)return e.msMatchesSelector(n);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(n)}catch{return!1}return!1}}function Gr(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ce(e,n,t,o){if(e){t=t||document;do{if(n!=null&&(n[0]===">"?e.parentNode===t&&ht(e,n):ht(e,n))||o&&e===t)return e;if(e===t)break}while(e=Gr(e))}return null}var Rn=/\s+/g;function Z(e,n,t){if(e&&n)if(e.classList)e.classList[t?"add":"remove"](n);else{var o=(" "+e.className+" ").replace(Rn," ").replace(" "+n+" "," ");e.className=(o+(t?" "+n:"")).replace(Rn," ")}}function b(e,n,t){var o=e&&e.style;if(o){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(t=e.currentStyle),n===void 0?t:t[n];!(n in o)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),o[n]=t+(typeof t=="string"?"":"px")}}function Re(e,n){var t="";if(typeof e=="string")t=e;else do{var o=b(e,"transform");o&&o!=="none"&&(t=o+" "+t)}while(!n&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function zn(e,n,t){if(e){var o=e.getElementsByTagName(n),r=0,i=o.length;if(t)for(;r<i;r++)t(o[r],r);return o}return[]}function ue(){var e=document.scrollingElement;return e||document.documentElement}function V(e,n,t,o,r){if(!(!e.getBoundingClientRect&&e!==window)){var i,a,l,s,u,h,d;if(e!==window&&e.parentNode&&e!==ue()?(i=e.getBoundingClientRect(),a=i.top,l=i.left,s=i.bottom,u=i.right,h=i.height,d=i.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,h=window.innerHeight,d=window.innerWidth),(n||t)&&e!==window&&(r=r||e.parentNode,!ge))do if(r&&r.getBoundingClientRect&&(b(r,"transform")!=="none"||t&&b(r,"position")!=="static")){var m=r.getBoundingClientRect();a-=m.top+parseInt(b(r,"border-top-width")),l-=m.left+parseInt(b(r,"border-left-width")),s=a+i.height,u=l+i.width;break}while(r=r.parentNode);if(o&&e!==window){var p=Re(r||e),_=p&&p.a,v=p&&p.d;p&&(a/=v,l/=_,d/=_,h/=v,s=a+h,u=l+d)}return{top:a,left:l,bottom:s,right:u,width:d,height:h}}}function Pn(e,n,t){for(var o=ye(e,!0),r=V(e)[n];o;){var i=V(o)[t],a=void 0;if(a=r>=i,!a)return o;if(o===ue())break;o=ye(o,!1)}return!1}function ze(e,n,t,o){for(var r=0,i=0,a=e.children;i<a.length;){if(a[i].style.display!=="none"&&a[i]!==y.ghost&&(o||a[i]!==y.dragged)&&ce(a[i],t.draggable,e,!1)){if(r===n)return a[i];r++}i++}return null}function Wt(e,n){for(var t=e.lastElementChild;t&&(t===y.ghost||b(t,"display")==="none"||n&&!ht(t,n));)t=t.previousElementSibling;return t||null}function ne(e,n){var t=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==y.clone&&(!n||ht(e,n))&&t++;return t}function Fn(e){var n=0,t=0,o=ue();if(e)do{var r=Re(e),i=r.a,a=r.d;n+=e.scrollLeft*i,t+=e.scrollTop*a}while(e!==o&&(e=e.parentNode));return[n,t]}function Zr(e,n){for(var t in e)if(e.hasOwnProperty(t)){for(var o in n)if(n.hasOwnProperty(o)&&n[o]===e[t][o])return Number(t)}return-1}function ye(e,n){if(!e||!e.getBoundingClientRect)return ue();var t=e,o=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=b(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return ue();if(o||n)return t;o=!0}}while(t=t.parentNode);return ue()}function Jr(e,n){if(e&&n)for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function Xt(e,n){return Math.round(e.top)===Math.round(n.top)&&Math.round(e.left)===Math.round(n.left)&&Math.round(e.height)===Math.round(n.height)&&Math.round(e.width)===Math.round(n.width)}var Ze;function Nn(e,n){return function(){if(!Ze){var t=arguments,o=this;t.length===1?e.call(o,t[0]):e.apply(o,t),Ze=setTimeout(function(){Ze=void 0},n)}}}function Qr(){clearTimeout(Ze),Ze=void 0}function Bn(e,n,t){e.scrollLeft+=n,e.scrollTop+=t}function Vn(e){var n=window.Polymer,t=window.jQuery||window.Zepto;return n&&n.dom?n.dom(e).cloneNode(!0):t?t(e).clone(!0)[0]:e.cloneNode(!0)}var J="Sortable"+new Date().getTime();function ei(){var e=[],n;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var t=[].slice.call(this.el.children);t.forEach(function(o){if(!(b(o,"display")==="none"||o===y.ghost)){e.push({target:o,rect:V(o)});var r=se({},e[e.length-1].rect);if(o.thisAnimationDuration){var i=Re(o,!0);i&&(r.top-=i.f,r.left-=i.e)}o.fromRect=r}})}},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(Zr(e,{target:t}),1)},animateAll:function(t){var o=this;if(!this.options.animation){clearTimeout(n),typeof t=="function"&&t();return}var r=!1,i=0;e.forEach(function(a){var l=0,s=a.target,u=s.fromRect,h=V(s),d=s.prevFromRect,m=s.prevToRect,p=a.rect,_=Re(s,!0);_&&(h.top-=_.f,h.left-=_.e),s.toRect=h,s.thisAnimationDuration&&Xt(d,h)&&!Xt(u,h)&&(p.top-h.top)/(p.left-h.left)===(u.top-h.top)/(u.left-h.left)&&(l=ni(p,d,m,o.options)),Xt(h,u)||(s.prevFromRect=u,s.prevToRect=h,l||(l=o.options.animation),o.animate(s,p,h,l)),l&&(r=!0,i=Math.max(i,l),clearTimeout(s.animationResetTimer),s.animationResetTimer=setTimeout(function(){s.animationTime=0,s.prevFromRect=null,s.fromRect=null,s.prevToRect=null,s.thisAnimationDuration=null},l),s.thisAnimationDuration=l)}),clearTimeout(n),r?n=setTimeout(function(){typeof t=="function"&&t()},i):typeof t=="function"&&t(),e=[]},animate:function(t,o,r,i){if(i){b(t,"transition",""),b(t,"transform","");var a=Re(this.el),l=a&&a.a,s=a&&a.d,u=(o.left-r.left)/(l||1),h=(o.top-r.top)/(s||1);t.animatingX=!!u,t.animatingY=!!h,b(t,"transform","translate3d("+u+"px,"+h+"px,0)"),this.forRepaintDummy=ti(t),b(t,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),b(t,"transform","translate3d(0,0,0)"),typeof t.animated=="number"&&clearTimeout(t.animated),t.animated=setTimeout(function(){b(t,"transition",""),b(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},i)}}}}function ti(e){return e.offsetWidth}function ni(e,n,t,o){return Math.sqrt(Math.pow(n.top-e.top,2)+Math.pow(n.left-e.left,2))/Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))*o.animation}var Pe=[],Ht={initializeByDefault:!0},Je={mount:function(e){for(var n in Ht)Ht.hasOwnProperty(n)&&!(n in e)&&(e[n]=Ht[n]);Pe.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Pe.push(e)},pluginEvent:function(e,n,t){var o=this;this.eventCanceled=!1,t.cancel=function(){o.eventCanceled=!0};var r=e+"Global";Pe.forEach(function(i){n[i.pluginName]&&(n[i.pluginName][r]&&n[i.pluginName][r](se({sortable:n},t)),n.options[i.pluginName]&&n[i.pluginName][e]&&n[i.pluginName][e](se({sortable:n},t)))})},initializePlugins:function(e,n,t,o){Pe.forEach(function(a){var l=a.pluginName;if(!(!e.options[l]&&!a.initializeByDefault)){var s=new a(e,n,e.options);s.sortable=e,s.options=e.options,e[l]=s,fe(t,s.defaults)}});for(var r in e.options)if(e.options.hasOwnProperty(r)){var i=this.modifyOption(e,r,e.options[r]);typeof i<"u"&&(e.options[r]=i)}},getEventProperties:function(e,n){var t={};return Pe.forEach(function(o){typeof o.eventProperties=="function"&&fe(t,o.eventProperties.call(n[o.pluginName],e))}),t},modifyOption:function(e,n,t){var o;return Pe.forEach(function(r){e[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[n]=="function"&&(o=r.optionListeners[n].call(e[r.pluginName],t))}),o}};function oi(e){var n=e.sortable,t=e.rootEl,o=e.name,r=e.targetEl,i=e.cloneEl,a=e.toEl,l=e.fromEl,s=e.oldIndex,u=e.newIndex,h=e.oldDraggableIndex,d=e.newDraggableIndex,m=e.originalEvent,p=e.putSortable,_=e.extraEventProperties;if(n=n||t&&t[J],!!n){var v,D=n.options,O="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!ge&&!qe?v=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(v=document.createEvent("Event"),v.initEvent(o,!0,!0)),v.to=a||t,v.from=l||t,v.item=r||t,v.clone=i,v.oldIndex=s,v.newIndex=u,v.oldDraggableIndex=h,v.newDraggableIndex=d,v.originalEvent=m,v.pullMode=p?p.lastPutMode:void 0;var T=se(se({},_),Je.getEventProperties(o,n));for(var B in T)v[B]=T[B];t&&t.dispatchEvent(v),D[O]&&D[O].call(n,v)}}var ri=["evt"],G=function(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=t.evt,r=Yr(t,ri);Je.pluginEvent.bind(y)(e,n,se({dragEl:f,parentEl:R,ghostEl:w,rootEl:I,nextEl:Oe,lastDownEl:ft,cloneEl:z,cloneHidden:we,dragStarted:et,putSortable:X,activeSortable:y.active,originalEvent:o,oldIndex:Fe,oldDraggableIndex:Qe,newIndex:Q,newDraggableIndex:_e,hideGhostForTarget:Yn,unhideGhostForTarget:Kn,cloneNowHidden:function(){we=!0},cloneNowShown:function(){we=!1},dispatchSortableEvent:function(i){q({sortable:n,name:i,originalEvent:o})}},r))};function q(e){oi(se({putSortable:X,cloneEl:z,targetEl:f,rootEl:I,oldIndex:Fe,oldDraggableIndex:Qe,newIndex:Q,newDraggableIndex:_e},e))}var f,R,w,I,Oe,ft,z,we,Fe,Q,Qe,_e,pt,X,Ne=!1,gt=!1,mt=[],ke,re,Ut,Yt,Ln,$n,et,Be,tt,nt=!1,vt=!1,bt,Y,Kt=[],qt=!1,yt=[],wt=typeof document<"u",_t=An,Wn=qe||ge?"cssFloat":"float",ii=wt&&!qr&&!An&&"draggable"in document.createElement("div"),Xn=function(){if(wt){if(ge)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Hn=function(e,n){var t=b(e),o=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),r=ze(e,0,n),i=ze(e,1,n),a=r&&b(r),l=i&&b(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+V(r).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+V(i).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var h=a.float==="left"?"left":"right";return i&&(l.clear==="both"||l.clear===h)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||s>=o&&t[Wn]==="none"||i&&t[Wn]==="none"&&s+u>o)?"vertical":"horizontal"},ai=function(e,n,t){var o=t?e.left:e.top,r=t?e.right:e.bottom,i=t?e.width:e.height,a=t?n.left:n.top,l=t?n.right:n.bottom,s=t?n.width:n.height;return o===a||r===l||o+i/2===a+s/2},li=function(e,n){var t;return mt.some(function(o){var r=o[J].options.emptyInsertThreshold;if(!(!r||Wt(o))){var i=V(o),a=e>=i.left-r&&e<=i.right+r,l=n>=i.top-r&&n<=i.bottom+r;if(a&&l)return t=o}}),t},Un=function(e){function n(r,i){return function(a,l,s,u){var h=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(i||h))return!0;if(r==null||r===!1)return!1;if(i&&r==="clone")return r;if(typeof r=="function")return n(r(a,l,s,u),i)(a,l,s,u);var d=(i?a:l).options.group.name;return r===!0||typeof r=="string"&&r===d||r.join&&r.indexOf(d)>-1}}var t={},o=e.group;(!o||dt(o)!="object")&&(o={name:o}),t.name=o.name,t.checkPull=n(o.pull,!0),t.checkPut=n(o.put),t.revertClone=o.revertClone,e.group=t},Yn=function(){!Xn&&w&&b(w,"display","none")},Kn=function(){!Xn&&w&&b(w,"display","")};wt&&document.addEventListener("click",function(e){if(gt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),gt=!1,!1},!0);var Me=function(e){if(f){e=e.touches?e.touches[0]:e;var n=li(e.clientX,e.clientY);if(n){var t={};for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);t.target=t.rootEl=n,t.preventDefault=void 0,t.stopPropagation=void 0,n[J]._onDragOver(t)}}},si=function(e){f&&f.parentNode[J]._isOutsideThisEl(e.target)};function y(e,n){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=n=fe({},n),e[J]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Hn(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,a){i.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:y.supportPointer!==!1&&"PointerEvent"in window&&!Ge,emptyInsertThreshold:5};Je.initializePlugins(this,e,t);for(var o in t)!(o in n)&&(n[o]=t[o]);Un(n);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=n.forceFallback?!1:ii,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?C(e,"pointerdown",this._onTapStart):(C(e,"mousedown",this._onTapStart),C(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(C(e,"dragover",this),C(e,"dragenter",this)),mt.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),fe(this,ei())}y.prototype={constructor:y,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Be=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,f):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,t=this.el,o=this.options,r=o.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,u=o.filter;if(mi(t),!f&&!(/mousedown|pointerdown/.test(i)&&e.button!==0||o.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&Ge&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=ce(l,o.draggable,t,!1),!(l&&l.animated)&&ft!==l)){if(Fe=ne(l),Qe=ne(l,o.draggable),typeof u=="function"){if(u.call(this,e,l,this)){q({sortable:n,rootEl:s,name:"filter",targetEl:l,toEl:t,fromEl:t}),G("filter",n,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(u&&(u=u.split(",").some(function(h){if(h=ce(s,h.trim(),t,!1),h)return q({sortable:n,rootEl:h,name:"filter",targetEl:l,fromEl:t,toEl:t}),G("filter",n,{evt:e}),!0}),u)){r&&e.cancelable&&e.preventDefault();return}o.handle&&!ce(s,o.handle,t,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,n,t){var o=this,r=o.el,i=o.options,a=r.ownerDocument,l;if(t&&!f&&t.parentNode===r){var s=V(t);if(I=r,f=t,R=f.parentNode,Oe=f.nextSibling,ft=t,pt=i.group,y.dragged=f,ke={target:f,clientX:(n||e).clientX,clientY:(n||e).clientY},Ln=ke.clientX-s.left,$n=ke.clientY-s.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,f.style["will-change"]="all",l=function(){if(G("delayEnded",o,{evt:e}),y.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Tn&&o.nativeDraggable&&(f.draggable=!0),o._triggerDragStart(e,n),q({sortable:o,name:"choose",originalEvent:e}),Z(f,i.chosenClass,!0)},i.ignore.split(",").forEach(function(u){zn(f,u.trim(),Gt)}),C(a,"dragover",Me),C(a,"mousemove",Me),C(a,"touchmove",Me),C(a,"mouseup",o._onDrop),C(a,"touchend",o._onDrop),C(a,"touchcancel",o._onDrop),Tn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),G("delayStart",this,{evt:e}),i.delay&&(!i.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(qe||ge))){if(y.eventCanceled){this._onDrop();return}C(a,"mouseup",o._disableDelayedDrag),C(a,"touchend",o._disableDelayedDrag),C(a,"touchcancel",o._disableDelayedDrag),C(a,"mousemove",o._delayedDragTouchMoveHandler),C(a,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&C(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,i.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){f&&Gt(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;S(e,"mouseup",this._disableDelayedDrag),S(e,"touchend",this._disableDelayedDrag),S(e,"touchcancel",this._disableDelayedDrag),S(e,"mousemove",this._delayedDragTouchMoveHandler),S(e,"touchmove",this._delayedDragTouchMoveHandler),S(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?C(document,"pointermove",this._onTouchMove):n?C(document,"touchmove",this._onTouchMove):C(document,"mousemove",this._onTouchMove):(C(f,"dragend",this),C(I,"dragstart",this._onDragStart));try{document.selection?St(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(Ne=!1,I&&f){G("dragStarted",this,{evt:n}),this.nativeDraggable&&C(document,"dragover",si);var t=this.options;!e&&Z(f,t.dragClass,!1),Z(f,t.ghostClass,!0),y.active=this,e&&this._appendGhost(),q({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(re){this._lastX=re.clientX,this._lastY=re.clientY,Yn();for(var e=document.elementFromPoint(re.clientX,re.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(re.clientX,re.clientY),e!==n);)n=e;if(f.parentNode[J]._isOutsideThisEl(e),n)do{if(n[J]){var t=void 0;if(t=n[J]._onDragOver({clientX:re.clientX,clientY:re.clientY,target:e,rootEl:n}),t&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);Kn()}},_onTouchMove:function(e){if(ke){var n=this.options,t=n.fallbackTolerance,o=n.fallbackOffset,r=e.touches?e.touches[0]:e,i=w&&Re(w,!0),a=w&&i&&i.a,l=w&&i&&i.d,s=_t&&Y&&Fn(Y),u=(r.clientX-ke.clientX+o.x)/(a||1)+(s?s[0]-Kt[0]:0)/(a||1),h=(r.clientY-ke.clientY+o.y)/(l||1)+(s?s[1]-Kt[1]:0)/(l||1);if(!y.active&&!Ne){if(t&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<t)return;this._onDragStart(e,!0)}if(w){i?(i.e+=u-(Ut||0),i.f+=h-(Yt||0)):i={a:1,b:0,c:0,d:1,e:u,f:h};var d="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");b(w,"webkitTransform",d),b(w,"mozTransform",d),b(w,"msTransform",d),b(w,"transform",d),Ut=u,Yt=h,re=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!w){var e=this.options.fallbackOnBody?document.body:I,n=V(f,!0,_t,!0,e),t=this.options;if(_t){for(Y=e;b(Y,"position")==="static"&&b(Y,"transform")==="none"&&Y!==document;)Y=Y.parentNode;Y!==document.body&&Y!==document.documentElement?(Y===document&&(Y=ue()),n.top+=Y.scrollTop,n.left+=Y.scrollLeft):Y=ue(),Kt=Fn(Y)}w=f.cloneNode(!0),Z(w,t.ghostClass,!1),Z(w,t.fallbackClass,!0),Z(w,t.dragClass,!0),b(w,"transition",""),b(w,"transform",""),b(w,"box-sizing","border-box"),b(w,"margin",0),b(w,"top",n.top),b(w,"left",n.left),b(w,"width",n.width),b(w,"height",n.height),b(w,"opacity","0.8"),b(w,"position",_t?"absolute":"fixed"),b(w,"zIndex","100000"),b(w,"pointerEvents","none"),y.ghost=w,e.appendChild(w),b(w,"transform-origin",Ln/parseInt(w.style.width)*100+"% "+$n/parseInt(w.style.height)*100+"%")}},_onDragStart:function(e,n){var t=this,o=e.dataTransfer,r=t.options;if(G("dragStart",this,{evt:e}),y.eventCanceled){this._onDrop();return}G("setupClone",this),y.eventCanceled||(z=Vn(f),z.draggable=!1,z.style["will-change"]="",this._hideClone(),Z(z,this.options.chosenClass,!1),y.clone=z),t.cloneId=St(function(){G("clone",t),!y.eventCanceled&&(t.options.removeCloneOnHide||I.insertBefore(z,f),t._hideClone(),q({sortable:t,name:"clone"}))}),!n&&Z(f,r.dragClass,!0),n?(gt=!0,t._loopId=setInterval(t._emulateDragOver,50)):(S(document,"mouseup",t._onDrop),S(document,"touchend",t._onDrop),S(document,"touchcancel",t._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(t,o,f)),C(document,"drop",t),b(f,"transform","translateZ(0)")),Ne=!0,t._dragStartId=St(t._dragStarted.bind(t,n,e)),C(document,"selectstart",t),et=!0,Ge&&b(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,t=e.target,o,r,i,a=this.options,l=a.group,s=y.active,u=pt===l,h=a.sort,d=X||s,m,p=this,_=!1;if(qt)return;function v(he,je){G(he,p,se({evt:e,isOwner:u,axis:m?"vertical":"horizontal",revert:i,dragRect:o,targetRect:r,canSort:h,fromSortable:d,target:t,completed:O,onMove:function(x,j){return xt(I,n,f,o,x,V(x),e,j)},changed:T},je))}function D(){v("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function O(he){return v("dragOverCompleted",{insertion:he}),he&&(u?s._hideClone():s._showClone(p),p!==d&&(Z(f,X?X.options.ghostClass:s.options.ghostClass,!1),Z(f,a.ghostClass,!0)),X!==p&&p!==y.active?X=p:p===y.active&&X&&(X=null),d===p&&(p._ignoreWhileAnimating=t),p.animateAll(function(){v("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(t===f&&!f.animated||t===n&&!t.animated)&&(Be=null),!a.dragoverBubble&&!e.rootEl&&t!==document&&(f.parentNode[J]._isOutsideThisEl(e.target),!he&&Me(e)),!a.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),_=!0}function T(){Q=ne(f),_e=ne(f,a.draggable),q({sortable:p,name:"change",toEl:n,newIndex:Q,newDraggableIndex:_e,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),t=ce(t,a.draggable,n,!0),v("dragOver"),y.eventCanceled)return _;if(f.contains(e.target)||t.animated&&t.animatingX&&t.animatingY||p._ignoreWhileAnimating===t)return O(!1);if(gt=!1,s&&!a.disabled&&(u?h||(i=R!==I):X===this||(this.lastPutMode=pt.checkPull(this,s,f,e))&&l.checkPut(this,s,f,e))){if(m=this._getDirection(e,t)==="vertical",o=V(f),v("dragOverValid"),y.eventCanceled)return _;if(i)return R=I,D(),this._hideClone(),v("revert"),y.eventCanceled||(Oe?I.insertBefore(f,Oe):I.appendChild(f)),O(!0);var B=Wt(n,a.draggable);if(!B||hi(e,m,this)&&!B.animated){if(B===f)return O(!1);if(B&&n===e.target&&(t=B),t&&(r=V(t)),xt(I,n,f,o,t,r,e,!!t)!==!1)return D(),n.appendChild(f),R=n,T(),O(!0)}else if(B&&di(e,m,this)){var P=ze(n,0,a,!0);if(P===f)return O(!1);if(t=P,r=V(t),xt(I,n,f,o,t,r,e,!1)!==!1)return D(),n.insertBefore(f,P),R=n,T(),O(!0)}else if(t.parentNode===n){r=V(t);var H=0,ve,Te=f.parentNode!==n,Ce=!ai(f.animated&&f.toRect||o,t.animated&&t.toRect||r,m),U=m?"top":"left",de=Pn(t,"top","top")||Pn(f,"top","top"),Ae=de?de.scrollTop:void 0;Be!==t&&(ve=r[U],nt=!1,vt=!Ce&&a.invertSwap||Te),H=fi(e,t,r,m,Ce?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,vt,Be===t);var le;if(H!==0){var c=ne(f);do c-=H,le=R.children[c];while(le&&(b(le,"display")==="none"||le===w))}if(H===0||le===t)return O(!1);Be=t,tt=H;var g=t.nextElementSibling,k=!1;k=H===1;var W=xt(I,n,f,o,t,r,e,k);if(W!==!1)return(W===1||W===-1)&&(k=W===1),qt=!0,setTimeout(ui,30),D(),k&&!g?n.appendChild(f):t.parentNode.insertBefore(f,k?g:t),de&&Bn(de,0,Ae-de.scrollTop),R=f.parentNode,ve!==void 0&&!vt&&(bt=Math.abs(ve-V(t)[U])),T(),O(!0)}if(n.contains(f))return O(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){S(document,"mousemove",this._onTouchMove),S(document,"touchmove",this._onTouchMove),S(document,"pointermove",this._onTouchMove),S(document,"dragover",Me),S(document,"mousemove",Me),S(document,"touchmove",Me)},_offUpEvents:function(){var e=this.el.ownerDocument;S(e,"mouseup",this._onDrop),S(e,"touchend",this._onDrop),S(e,"pointerup",this._onDrop),S(e,"touchcancel",this._onDrop),S(document,"selectstart",this)},_onDrop:function(e){var n=this.el,t=this.options;if(Q=ne(f),_e=ne(f,t.draggable),G("drop",this,{evt:e}),R=f&&f.parentNode,Q=ne(f),_e=ne(f,t.draggable),y.eventCanceled){this._nulling();return}Ne=!1,vt=!1,nt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zt(this.cloneId),Zt(this._dragStartId),this.nativeDraggable&&(S(document,"drop",this),S(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ge&&b(document.body,"user-select",""),b(f,"transform",""),e&&(et&&(e.cancelable&&e.preventDefault(),!t.dropBubble&&e.stopPropagation()),w&&w.parentNode&&w.parentNode.removeChild(w),(I===R||X&&X.lastPutMode!=="clone")&&z&&z.parentNode&&z.parentNode.removeChild(z),f&&(this.nativeDraggable&&S(f,"dragend",this),Gt(f),f.style["will-change"]="",et&&!Ne&&Z(f,X?X.options.ghostClass:this.options.ghostClass,!1),Z(f,this.options.chosenClass,!1),q({sortable:this,name:"unchoose",toEl:R,newIndex:null,newDraggableIndex:null,originalEvent:e}),I!==R?(Q>=0&&(q({rootEl:R,name:"add",toEl:R,fromEl:I,originalEvent:e}),q({sortable:this,name:"remove",toEl:R,originalEvent:e}),q({rootEl:R,name:"sort",toEl:R,fromEl:I,originalEvent:e}),q({sortable:this,name:"sort",toEl:R,originalEvent:e})),X&&X.save()):Q!==Fe&&Q>=0&&(q({sortable:this,name:"update",toEl:R,originalEvent:e}),q({sortable:this,name:"sort",toEl:R,originalEvent:e})),y.active&&((Q==null||Q===-1)&&(Q=Fe,_e=Qe),q({sortable:this,name:"end",toEl:R,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){G("nulling",this),I=f=R=w=Oe=z=ft=we=ke=re=et=Q=_e=Fe=Qe=Be=tt=X=pt=y.dragged=y.ghost=y.clone=y.active=null,yt.forEach(function(e){e.checked=!0}),yt.length=Ut=Yt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":f&&(this._onDragOver(e),ci(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,t=this.el.children,o=0,r=t.length,i=this.options;o<r;o++)n=t[o],ce(n,i.draggable,this.el,!1)&&e.push(n.getAttribute(i.dataIdAttr)||gi(n));return e},sort:function(e,n){var t={},o=this.el;this.toArray().forEach(function(r,i){var a=o.children[i];ce(a,this.options.draggable,o,!1)&&(t[r]=a)},this),n&&this.captureAnimationState(),e.forEach(function(r){t[r]&&(o.removeChild(t[r]),o.appendChild(t[r]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return ce(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var t=this.options;if(n===void 0)return t[e];var o=Je.modifyOption(this,e,n);typeof o<"u"?t[e]=o:t[e]=n,e==="group"&&Un(t)},destroy:function(){G("destroy",this);var e=this.el;e[J]=null,S(e,"mousedown",this._onTapStart),S(e,"touchstart",this._onTapStart),S(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(S(e,"dragover",this),S(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),mt.splice(mt.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!we){if(G("hideClone",this),y.eventCanceled)return;b(z,"display","none"),this.options.removeCloneOnHide&&z.parentNode&&z.parentNode.removeChild(z),we=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(we){if(G("showClone",this),y.eventCanceled)return;f.parentNode==I&&!this.options.group.revertClone?I.insertBefore(z,f):Oe?I.insertBefore(z,Oe):I.appendChild(z),this.options.group.revertClone&&this.animate(f,z),b(z,"display",""),we=!1}}};function ci(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function xt(e,n,t,o,r,i,a,l){var s,u=e[J],h=u.options.onMove,d;return window.CustomEvent&&!ge&&!qe?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=n,s.from=e,s.dragged=t,s.draggedRect=o,s.related=r||n,s.relatedRect=i||V(n),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),h&&(d=h.call(u,s,a)),d}function Gt(e){e.draggable=!1}function ui(){qt=!1}function di(e,n,t){var o=V(ze(t.el,0,t.options,!0)),r=10;return n?e.clientX<o.left-r||e.clientY<o.top&&e.clientX<o.right:e.clientY<o.top-r||e.clientY<o.bottom&&e.clientX<o.left}function hi(e,n,t){var o=V(Wt(t.el,t.options.draggable)),r=10;return n?e.clientX>o.right+r||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+r}function fi(e,n,t,o,r,i,a,l){var s=o?e.clientY:e.clientX,u=o?t.height:t.width,h=o?t.top:t.left,d=o?t.bottom:t.right,m=!1;if(!a){if(l&&bt<u*r){if(!nt&&(tt===1?s>h+u*i/2:s<d-u*i/2)&&(nt=!0),nt)m=!0;else if(tt===1?s<h+bt:s>d-bt)return-tt}else if(s>h+u*(1-r)/2&&s<d-u*(1-r)/2)return pi(n)}return m=m||a,m&&(s<h+u*i/2||s>d-u*i/2)?s>h+u/2?1:-1:0}function pi(e){return ne(f)<ne(e)?1:-1}function gi(e){for(var n=e.tagName+e.className+e.src+e.href+e.textContent,t=n.length,o=0;t--;)o+=n.charCodeAt(t);return o.toString(36)}function mi(e){yt.length=0;for(var n=e.getElementsByTagName("input"),t=n.length;t--;){var o=n[t];o.checked&&yt.push(o)}}function St(e){return setTimeout(e,0)}function Zt(e){return clearTimeout(e)}wt&&C(document,"touchmove",function(e){(y.active||Ne)&&e.cancelable&&e.preventDefault()}),y.utils={on:C,off:S,css:b,find:zn,is:function(e,n){return!!ce(e,n,e,!1)},extend:Jr,throttle:Nn,closest:ce,toggleClass:Z,clone:Vn,index:ne,nextTick:St,cancelNextTick:Zt,detectDirection:Hn,getChild:ze},y.get=function(e){return e[J]},y.mount=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];n[0].constructor===Array&&(n=n[0]),n.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(y.utils=se(se({},y.utils),o.utils)),Je.mount(o)})},y.create=function(e,n){return new y(e,n)},y.version=Kr;var N=[],ot,Jt,Qt=!1,en,tn,Ct,rt;function vi(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return e.prototype={dragStarted:function(n){var t=n.originalEvent;this.sortable.nativeDraggable?C(document,"dragover",this._handleAutoScroll):this.options.supportPointer?C(document,"pointermove",this._handleFallbackAutoScroll):t.touches?C(document,"touchmove",this._handleFallbackAutoScroll):C(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var t=n.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?S(document,"dragover",this._handleAutoScroll):(S(document,"pointermove",this._handleFallbackAutoScroll),S(document,"touchmove",this._handleFallbackAutoScroll),S(document,"mousemove",this._handleFallbackAutoScroll)),qn(),Et(),Qr()},nulling:function(){Ct=Jt=ot=Qt=rt=en=tn=null,N.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,t){var o=this,r=(n.touches?n.touches[0]:n).clientX,i=(n.touches?n.touches[0]:n).clientY,a=document.elementFromPoint(r,i);if(Ct=n,t||this.options.forceAutoScrollFallback||qe||ge||Ge){nn(n,this.options,a,t);var l=ye(a,!0);Qt&&(!rt||r!==en||i!==tn)&&(rt&&qn(),rt=setInterval(function(){var s=ye(document.elementFromPoint(r,i),!0);s!==l&&(l=s,Et()),nn(n,o.options,s,t)},10),en=r,tn=i)}else{if(!this.options.bubbleScroll||ye(a,!0)===ue()){Et();return}nn(n,this.options,ye(a,!1),!1)}}},fe(e,{pluginName:"scroll",initializeByDefault:!0})}function Et(){N.forEach(function(e){clearInterval(e.pid)}),N=[]}function qn(){clearInterval(rt)}var nn=Nn(function(e,n,t,o){if(n.scroll){var r=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,a=n.scrollSensitivity,l=n.scrollSpeed,s=ue(),u=!1,h;Jt!==t&&(Jt=t,Et(),ot=n.scroll,h=n.scrollFn,ot===!0&&(ot=ye(t,!0)));var d=0,m=ot;do{var p=m,_=V(p),v=_.top,D=_.bottom,O=_.left,T=_.right,B=_.width,P=_.height,H=void 0,ve=void 0,Te=p.scrollWidth,Ce=p.scrollHeight,U=b(p),de=p.scrollLeft,Ae=p.scrollTop;p===s?(H=B<Te&&(U.overflowX==="auto"||U.overflowX==="scroll"||U.overflowX==="visible"),ve=P<Ce&&(U.overflowY==="auto"||U.overflowY==="scroll"||U.overflowY==="visible")):(H=B<Te&&(U.overflowX==="auto"||U.overflowX==="scroll"),ve=P<Ce&&(U.overflowY==="auto"||U.overflowY==="scroll"));var le=H&&(Math.abs(T-r)<=a&&de+B<Te)-(Math.abs(O-r)<=a&&!!de),c=ve&&(Math.abs(D-i)<=a&&Ae+P<Ce)-(Math.abs(v-i)<=a&&!!Ae);if(!N[d])for(var g=0;g<=d;g++)N[g]||(N[g]={});(N[d].vx!=le||N[d].vy!=c||N[d].el!==p)&&(N[d].el=p,N[d].vx=le,N[d].vy=c,clearInterval(N[d].pid),(le!=0||c!=0)&&(u=!0,N[d].pid=setInterval((function(){o&&this.layer===0&&y.active._onTouchMove(Ct);var k=N[this.layer].vy?N[this.layer].vy*l:0,W=N[this.layer].vx?N[this.layer].vx*l:0;typeof h=="function"&&h.call(y.dragged.parentNode[J],W,k,e,Ct,N[this.layer].el)!=="continue"||Bn(N[this.layer].el,W,k)}).bind({layer:d}),24))),d++}while(n.bubbleScroll&&m!==s&&(m=ye(m,!1)));Qt=u}},30),Gn=function(e){var n=e.originalEvent,t=e.putSortable,o=e.dragEl,r=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(n){var s=t||r;a();var u=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,h=document.elementFromPoint(u.clientX,u.clientY);l(),s&&!s.el.contains(h)&&(i("spill"),this.onSpill({dragEl:o,putSortable:t}))}};function on(){}on.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,t=e.putSortable;this.sortable.captureAnimationState(),t&&t.captureAnimationState();var o=ze(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),t&&t.animateAll()},drop:Gn},fe(on,{pluginName:"revertOnSpill"});function rn(){}rn.prototype={onSpill:function(e){var n=e.dragEl,t=e.putSortable,o=t||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:Gn},fe(rn,{pluginName:"removeOnSpill"}),y.mount(new vi),y.mount(rn,on);function an(e){e.parentElement!==null&&e.parentElement.removeChild(e)}function Zn(e,n,t){const o=t===0?e.children[0]:e.children[t-1].nextSibling;e.insertBefore(n,o)}function bi(){return typeof window<"u"?window.console:global.console}const yi=bi();function wi(e){const n=Object.create(null);return function(t){return n[t]||(n[t]=e(t))}}const _i=/-(\w)/g,xi=wi(e=>e.replace(_i,(n,t)=>t.toUpperCase())),Jn=["Start","Add","Remove","Update","End"],Qn=["Choose","Unchoose","Sort","Filter","Clone"],eo=["Move"],Si=[eo,Jn,Qn].flatMap(e=>e).map(e=>`on${e}`),ln={manage:eo,manageAndEmit:Jn,emit:Qn};function Ci(e){return Si.indexOf(e)!==-1}const Ei=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function Di(e){return Ei.includes(e)}function Oi(e){return["transition-group","TransitionGroup"].includes(e)}function to(e){return["id","class","role","style"].includes(e)||e.startsWith("data-")||e.startsWith("aria-")||e.startsWith("on")}function no(e){return e.reduce((n,[t,o])=>(n[t]=o,n),{})}function ki({$attrs:e,componentData:n={}}){return{...no(Object.entries(e).filter(([t,o])=>to(t))),...n}}function Mi({$attrs:e,callBackBuilder:n}){const t=no(oo(e));Object.entries(n).forEach(([r,i])=>{ln[r].forEach(a=>{t[`on${a}`]=i(a)})});const o=`[data-draggable]${t.draggable||""}`;return{...t,draggable:o}}function oo(e){return Object.entries(e).filter(([n,t])=>!to(n)).map(([n,t])=>[xi(n),t]).filter(([n,t])=>!Ci(n))}const ro=({el:e})=>e,Ii=(e,n)=>e.__draggable_context=n,io=e=>e.__draggable_context;class Ti{constructor({nodes:{header:n,default:t,footer:o},root:r,realList:i}){this.defaultNodes=t,this.children=[...n,...t,...o],this.externalComponent=r.externalComponent,this.rootTransition=r.transition,this.tag=r.tag,this.realList=i}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(n,t){const{tag:o,children:r,_isRootComponent:i}=this;return n(o,t,i?{default:()=>r}:r)}updated(){const{defaultNodes:n,realList:t}=this;n.forEach((o,r)=>{Ii(ro(o),{element:t[r],index:r})})}getUnderlyingVm(n){return io(n)}getVmIndexFromDomIndex(n,t){const{defaultNodes:o}=this,{length:r}=o,i=t.children,a=i.item(n);if(a===null)return r;const l=io(a);if(l)return l.index;if(r===0)return 0;const s=ro(o[0]),u=[...i].findIndex(h=>h===s);return n<u?0:r}}const{resolveComponent:Ai,TransitionGroup:ji}=await te("vue");function Ri(e,n){const t=e[n];return t?t():[]}function zi({$slots:e,realList:n,getKey:t}){const o=n||[],[r,i]=["header","footer"].map(s=>Ri(e,s)),{item:a}=e;if(!a)throw new Error("draggable element must have an item slot");const l=o.flatMap((s,u)=>a({element:s,index:u}).map(h=>(h.key=t(s),h.props={...h.props||{},"data-draggable":!0},h)));if(l.length!==o.length)throw new Error("Item slot must have only one child");return{header:r,footer:i,default:l}}function Pi(e){const n=Oi(e),t=!Di(e)&&!n;return{transition:n,externalComponent:t,tag:t?Ai(e):n?ji:e}}function Fi({$slots:e,tag:n,realList:t,getKey:o}){const r=zi({$slots:e,realList:t,getKey:o}),i=Pi(n);return new Ti({nodes:r,root:i,realList:t})}const{h:ao,defineComponent:Ni,nextTick:lo}=await te("vue");function so(e,n){lo(()=>this.$emit(e.toLowerCase(),n))}function co(e){return(n,t)=>{if(this.realList!==null)return this[`onDrag${e}`](n,t)}}function Bi(e){const n=co.call(this,e);return(t,o)=>{n.call(this,t,o),so.call(this,e,t)}}let sn=null;const Vi={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Li=["update:modelValue","change",...[...ln.manageAndEmit,...ln.emit].map(e=>e.toLowerCase())],$i=Ni({name:"draggable",inheritAttrs:!1,props:Vi,emits:Li,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:e,$attrs:n,tag:t,componentData:o,realList:r,getKey:i}=this,a=Fi({$slots:e,tag:t,realList:r,getKey:i});this.componentStructure=a;const l=ki({$attrs:n,componentData:o});return a.render(ao,l)}catch(e){return this.error=!0,ao("pre",{style:{color:"red"}},e.stack)}},created(){this.list!==null&&this.modelValue!==null&&yi.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:e,$el:n,componentStructure:t}=this;t.updated();const o=Mi({$attrs:e,callBackBuilder:{manageAndEmit:i=>Bi.call(this,i),emit:i=>so.bind(this,i),manage:i=>co.call(this,i)}}),r=n.nodeType===1?n:n.parentElement;this._sortable=new y(r,o),this.targetDomElement=r,r.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:e}=this;return e||this.modelValue},getKey(){const{itemKey:e}=this;return typeof e=="function"?e:n=>n[e]}},watch:{$attrs:{handler(e){const{_sortable:n}=this;n&&oo(e).forEach(([t,o])=>{n.option(t,o)})},deep:!0}},methods:{getUnderlyingVm(e){return this.componentStructure.getUnderlyingVm(e)||null},getUnderlyingPotencialDraggableComponent(e){return e.__draggable_component__},emitChanges(e){lo(()=>this.$emit("change",e))},alterList(e){if(this.list){e(this.list);return}const n=[...this.modelValue];e(n),this.$emit("update:modelValue",n)},spliceList(){const e=n=>n.splice(...arguments);this.alterList(e)},updatePosition(e,n){const t=o=>o.splice(n,0,o.splice(e,1)[0]);this.alterList(t)},getRelatedContextFromMoveEvent({to:e,related:n}){const t=this.getUnderlyingPotencialDraggableComponent(e);if(!t)return{component:t};const o=t.realList,r={list:o,component:t};return e!==n&&o?{...t.getUnderlyingVm(n)||{},...r}:r},getVmIndexFromDomIndex(e){return this.componentStructure.getVmIndexFromDomIndex(e,this.targetDomElement)},onDragStart(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),sn=e.item},onDragAdd(e){const n=e.item._underlying_vm_;if(n===void 0)return;an(e.item);const t=this.getVmIndexFromDomIndex(e.newIndex);this.spliceList(t,0,n);const o={element:n,newIndex:t};this.emitChanges({added:o})},onDragRemove(e){if(Zn(this.$el,e.item,e.oldIndex),e.pullMode==="clone"){an(e.clone);return}const{index:n,element:t}=this.context;this.spliceList(n,1);const o={element:t,oldIndex:n};this.emitChanges({removed:o})},onDragUpdate(e){an(e.item),Zn(e.from,e.item,e.oldIndex);const n=this.context.index,t=this.getVmIndexFromDomIndex(e.newIndex);this.updatePosition(n,t);const o={element:this.context.element,oldIndex:n,newIndex:t};this.emitChanges({moved:o})},computeFutureIndex(e,n){if(!e.element)return 0;const t=[...n.to.children].filter(i=>i.style.display!=="none"),o=t.indexOf(n.related),r=e.component.getVmIndexFromDomIndex(o);return t.indexOf(sn)!==-1||!n.willInsertAfter?r:r+1},onDragMove(e,n){const{move:t,realList:o}=this;if(!t||!o)return!0;const r=this.getRelatedContextFromMoveEvent(e),i=this.computeFutureIndex(r,e),a={...this.context,futureIndex:i},l={...e,relatedContext:r,draggedContext:a};return t(l,n)},onDragEnd(){sn=null}}});function Wi(){this.__data__=[],this.size=0}var Xi=Wi;function Hi(e,n){return e===n||e!==e&&n!==n}var uo=Hi,Ui=uo;function Yi(e,n){for(var t=e.length;t--;)if(Ui(e[t][0],n))return t;return-1}var Dt=Yi,Ki=Dt,qi=Array.prototype,Gi=qi.splice;function Zi(e){var n=this.__data__,t=Ki(n,e);if(t<0)return!1;var o=n.length-1;return t==o?n.pop():Gi.call(n,t,1),--this.size,!0}var Ji=Zi,Qi=Dt;function ea(e){var n=this.__data__,t=Qi(n,e);return t<0?void 0:n[t][1]}var ta=ea,na=Dt;function oa(e){return na(this.__data__,e)>-1}var ra=oa,ia=Dt;function aa(e,n){var t=this.__data__,o=ia(t,e);return o<0?(++this.size,t.push([e,n])):t[o][1]=n,this}var la=aa,sa=Xi,ca=Ji,ua=ta,da=ra,ha=la;function Ve(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n<t;){var o=e[n];this.set(o[0],o[1])}}Ve.prototype.clear=sa,Ve.prototype.delete=ca,Ve.prototype.get=ua,Ve.prototype.has=da,Ve.prototype.set=ha;var Ot=Ve,fa=Ot;function pa(){this.__data__=new fa,this.size=0}var ga=pa;function ma(e){var n=this.__data__,t=n.delete(e);return this.size=n.size,t}var va=ma;function ba(e){return this.__data__.get(e)}var ya=ba;function wa(e){return this.__data__.has(e)}var _a=wa,xa=typeof Lt=="object"&&Lt&&Lt.Object===Object&&Lt,ho=xa,Sa=ho,Ca=typeof self=="object"&&self&&self.Object===Object&&self,Ea=Sa||Ca||Function("return this")(),me=Ea,Da=me,Oa=Da.Symbol,cn=Oa,fo=cn,po=Object.prototype,ka=po.hasOwnProperty,Ma=po.toString,it=fo?fo.toStringTag:void 0;function Ia(e){var n=ka.call(e,it),t=e[it];try{e[it]=void 0;var o=!0}catch{}var r=Ma.call(e);return o&&(n?e[it]=t:delete e[it]),r}var Ta=Ia,Aa=Object.prototype,ja=Aa.toString;function Ra(e){return ja.call(e)}var za=Ra,go=cn,Pa=Ta,Fa=za,Na="[object Null]",Ba="[object Undefined]",mo=go?go.toStringTag:void 0;function Va(e){return e==null?e===void 0?Ba:Na:mo&&mo in Object(e)?Pa(e):Fa(e)}var kt=Va;function La(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var vo=La,$a=kt,Wa=vo,Xa="[object AsyncFunction]",Ha="[object Function]",Ua="[object GeneratorFunction]",Ya="[object Proxy]";function Ka(e){if(!Wa(e))return!1;var n=$a(e);return n==Ha||n==Ua||n==Xa||n==Ya}var bo=Ka,qa=me,Ga=qa["__core-js_shared__"],Za=Ga,un=Za,yo=function(){var e=/[^.]+$/.exec(un&&un.keys&&un.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ja(e){return!!yo&&yo in e}var Qa=Ja,el=Function.prototype,tl=el.toString;function nl(e){if(e!=null){try{return tl.call(e)}catch{}try{return e+""}catch{}}return""}var wo=nl,ol=bo,rl=Qa,il=vo,al=wo,ll=/[\\^$.*+?()[\]{}|]/g,sl=/^\[object .+?Constructor\]$/,cl=Function.prototype,ul=Object.prototype,dl=cl.toString,hl=ul.hasOwnProperty,fl=RegExp("^"+dl.call(hl).replace(ll,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pl(e){if(!il(e)||rl(e))return!1;var n=ol(e)?fl:sl;return n.test(al(e))}var gl=pl;function ml(e,n){return e==null?void 0:e[n]}var vl=ml,bl=gl,yl=vl;function wl(e,n){var t=yl(e,n);return bl(t)?t:void 0}var Le=wl,_l=Le,xl=me,Sl=_l(xl,"Map"),dn=Sl,Cl=Le,El=Cl(Object,"create"),Mt=El,_o=Mt;function Dl(){this.__data__=_o?_o(null):{},this.size=0}var Ol=Dl;function kl(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Ml=kl,Il=Mt,Tl="__lodash_hash_undefined__",Al=Object.prototype,jl=Al.hasOwnProperty;function Rl(e){var n=this.__data__;if(Il){var t=n[e];return t===Tl?void 0:t}return jl.call(n,e)?n[e]:void 0}var zl=Rl,Pl=Mt,Fl=Object.prototype,Nl=Fl.hasOwnProperty;function Bl(e){var n=this.__data__;return Pl?n[e]!==void 0:Nl.call(n,e)}var Vl=Bl,Ll=Mt,$l="__lodash_hash_undefined__";function Wl(e,n){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=Ll&&n===void 0?$l:n,this}var Xl=Wl,Hl=Ol,Ul=Ml,Yl=zl,Kl=Vl,ql=Xl;function $e(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n<t;){var o=e[n];this.set(o[0],o[1])}}$e.prototype.clear=Hl,$e.prototype.delete=Ul,$e.prototype.get=Yl,$e.prototype.has=Kl,$e.prototype.set=ql;var Gl=$e,xo=Gl,Zl=Ot,Jl=dn;function Ql(){this.size=0,this.__data__={hash:new xo,map:new(Jl||Zl),string:new xo}}var es=Ql;function ts(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}var ns=ts,os=ns;function rs(e,n){var t=e.__data__;return os(n)?t[typeof n=="string"?"string":"hash"]:t.map}var It=rs,is=It;function as(e){var n=is(this,e).delete(e);return this.size-=n?1:0,n}var ls=as,ss=It;function cs(e){return ss(this,e).get(e)}var us=cs,ds=It;function hs(e){return ds(this,e).has(e)}var fs=hs,ps=It;function gs(e,n){var t=ps(this,e),o=t.size;return t.set(e,n),this.size+=t.size==o?0:1,this}var ms=gs,vs=es,bs=ls,ys=us,ws=fs,_s=ms;function We(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n<t;){var o=e[n];this.set(o[0],o[1])}}We.prototype.clear=vs,We.prototype.delete=bs,We.prototype.get=ys,We.prototype.has=ws,We.prototype.set=_s;var So=We,xs=Ot,Ss=dn,Cs=So,Es=200;function Ds(e,n){var t=this.__data__;if(t instanceof xs){var o=t.__data__;if(!Ss||o.length<Es-1)return o.push([e,n]),this.size=++t.size,this;t=this.__data__=new Cs(o)}return t.set(e,n),this.size=t.size,this}var Os=Ds,ks=Ot,Ms=ga,Is=va,Ts=ya,As=_a,js=Os;function Xe(e){var n=this.__data__=new ks(e);this.size=n.size}Xe.prototype.clear=Ms,Xe.prototype.delete=Is,Xe.prototype.get=Ts,Xe.prototype.has=As,Xe.prototype.set=js;var Rs=Xe,zs="__lodash_hash_undefined__";function Ps(e){return this.__data__.set(e,zs),this}var Fs=Ps;function Ns(e){return this.__data__.has(e)}var Bs=Ns,Vs=So,Ls=Fs,$s=Bs;function Tt(e){var n=-1,t=e==null?0:e.length;for(this.__data__=new Vs;++n<t;)this.add(e[n])}Tt.prototype.add=Tt.prototype.push=Ls,Tt.prototype.has=$s;var Ws=Tt;function Xs(e,n){for(var t=-1,o=e==null?0:e.length;++t<o;)if(n(e[t],t,e))return!0;return!1}var Hs=Xs;function Us(e,n){return e.has(n)}var Ys=Us,Ks=Ws,qs=Hs,Gs=Ys,Zs=1,Js=2;function Qs(e,n,t,o,r,i){var a=t&Zs,l=e.length,s=n.length;if(l!=s&&!(a&&s>l))return!1;var u=i.get(e),h=i.get(n);if(u&&h)return u==n&&h==e;var d=-1,m=!0,p=t&Js?new Ks:void 0;for(i.set(e,n),i.set(n,e);++d<l;){var _=e[d],v=n[d];if(o)var D=a?o(v,_,d,n,e,i):o(_,v,d,e,n,i);if(D!==void 0){if(D)continue;m=!1;break}if(p){if(!qs(n,function(O,T){if(!Gs(p,T)&&(_===O||r(_,O,t,o,i)))return p.push(T)})){m=!1;break}}else if(!(_===v||r(_,v,t,o,i))){m=!1;break}}return i.delete(e),i.delete(n),m}var Co=Qs,ec=me,tc=ec.Uint8Array,nc=tc;function oc(e){var n=-1,t=Array(e.size);return e.forEach(function(o,r){t[++n]=[r,o]}),t}var rc=oc;function ic(e){var n=-1,t=Array(e.size);return e.forEach(function(o){t[++n]=o}),t}var ac=ic,Eo=cn,Do=nc,lc=uo,sc=Co,cc=rc,uc=ac,dc=1,hc=2,fc="[object Boolean]",pc="[object Date]",gc="[object Error]",mc="[object Map]",vc="[object Number]",bc="[object RegExp]",yc="[object Set]",wc="[object String]",_c="[object Symbol]",xc="[object ArrayBuffer]",Sc="[object DataView]",Oo=Eo?Eo.prototype:void 0,hn=Oo?Oo.valueOf:void 0;function Cc(e,n,t,o,r,i,a){switch(t){case Sc:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case xc:return!(e.byteLength!=n.byteLength||!i(new Do(e),new Do(n)));case fc:case pc:case vc:return lc(+e,+n);case gc:return e.name==n.name&&e.message==n.message;case bc:case wc:return e==n+"";case mc:var l=cc;case yc:var s=o&dc;if(l||(l=uc),e.size!=n.size&&!s)return!1;var u=a.get(e);if(u)return u==n;o|=hc,a.set(e,n);var h=sc(l(e),l(n),o,r,i,a);return a.delete(e),h;case _c:if(hn)return hn.call(e)==hn.call(n)}return!1}var Ec=Cc;function Dc(e,n){for(var t=-1,o=n.length,r=e.length;++t<o;)e[r+t]=n[t];return e}var Oc=Dc,kc=Array.isArray,fn=kc,Mc=Oc,Ic=fn;function Tc(e,n,t){var o=n(e);return Ic(e)?o:Mc(o,t(e))}var Ac=Tc;function jc(e,n){for(var t=-1,o=e==null?0:e.length,r=0,i=[];++t<o;){var a=e[t];n(a,t,e)&&(i[r++]=a)}return i}var Rc=jc;function zc(){return[]}var Pc=zc,Fc=Rc,Nc=Pc,Bc=Object.prototype,Vc=Bc.propertyIsEnumerable,ko=Object.getOwnPropertySymbols,Lc=ko?function(e){return e==null?[]:(e=Object(e),Fc(ko(e),function(n){return Vc.call(e,n)}))}:Nc,$c=Lc;function Wc(e,n){for(var t=-1,o=Array(e);++t<e;)o[t]=n(t);return o}var Xc=Wc;function Hc(e){return e!=null&&typeof e=="object"}var At=Hc,Uc=kt,Yc=At,Kc="[object Arguments]";function qc(e){return Yc(e)&&Uc(e)==Kc}var Gc=qc,Mo=Gc,Zc=At,Io=Object.prototype,Jc=Io.hasOwnProperty,Qc=Io.propertyIsEnumerable,eu=Mo(function(){return arguments}())?Mo:function(e){return Zc(e)&&Jc.call(e,"callee")&&!Qc.call(e,"callee")},tu=eu,jt={exports:{}};function nu(){return!1}var ou=nu;jt.exports,function(e,n){var t=me,o=ou,r=n&&!n.nodeType&&n,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,l=a?t.Buffer:void 0,s=l?l.isBuffer:void 0,u=s||o;e.exports=u}(jt,jt.exports);var To=jt.exports,ru=9007199254740991,iu=/^(?:0|[1-9]\d*)$/;function au(e,n){var t=typeof e;return n=n??ru,!!n&&(t=="number"||t!="symbol"&&iu.test(e))&&e>-1&&e%1==0&&e<n}var lu=au,su=9007199254740991;function cu(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=su}var Ao=cu,uu=kt,du=Ao,hu=At,fu="[object Arguments]",pu="[object Array]",gu="[object Boolean]",mu="[object Date]",vu="[object Error]",bu="[object Function]",yu="[object Map]",wu="[object Number]",_u="[object Object]",xu="[object RegExp]",Su="[object Set]",Cu="[object String]",Eu="[object WeakMap]",Du="[object ArrayBuffer]",Ou="[object DataView]",ku="[object Float32Array]",Mu="[object Float64Array]",Iu="[object Int8Array]",Tu="[object Int16Array]",Au="[object Int32Array]",ju="[object Uint8Array]",Ru="[object Uint8ClampedArray]",zu="[object Uint16Array]",Pu="[object Uint32Array]",M={};M[ku]=M[Mu]=M[Iu]=M[Tu]=M[Au]=M[ju]=M[Ru]=M[zu]=M[Pu]=!0,M[fu]=M[pu]=M[Du]=M[gu]=M[Ou]=M[mu]=M[vu]=M[bu]=M[yu]=M[wu]=M[_u]=M[xu]=M[Su]=M[Cu]=M[Eu]=!1;function Fu(e){return hu(e)&&du(e.length)&&!!M[uu(e)]}var Nu=Fu;function Bu(e){return function(n){return e(n)}}var Vu=Bu,Rt={exports:{}};Rt.exports,function(e,n){var t=ho,o=n&&!n.nodeType&&n,r=o&&!0&&e&&!e.nodeType&&e,i=r&&r.exports===o,a=i&&t.process,l=function(){try{var s=r&&r.require&&r.require("util").types;return s||a&&a.binding&&a.binding("util")}catch{}}();e.exports=l}(Rt,Rt.exports);var Lu=Rt.exports,$u=Nu,Wu=Vu,jo=Lu,Ro=jo&&jo.isTypedArray,Xu=Ro?Wu(Ro):$u,zo=Xu,Hu=Xc,Uu=tu,Yu=fn,Ku=To,qu=lu,Gu=zo,Zu=Object.prototype,Ju=Zu.hasOwnProperty;function Qu(e,n){var t=Yu(e),o=!t&&Uu(e),r=!t&&!o&&Ku(e),i=!t&&!o&&!r&&Gu(e),a=t||o||r||i,l=a?Hu(e.length,String):[],s=l.length;for(var u in e)(n||Ju.call(e,u))&&!(a&&(u=="length"||r&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||qu(u,s)))&&l.push(u);return l}var ed=Qu,td=Object.prototype;function nd(e){var n=e&&e.constructor,t=typeof n=="function"&&n.prototype||td;return e===t}var od=nd;function rd(e,n){return function(t){return e(n(t))}}var id=rd,ad=id,ld=ad(Object.keys,Object),sd=ld,cd=od,ud=sd,dd=Object.prototype,hd=dd.hasOwnProperty;function fd(e){if(!cd(e))return ud(e);var n=[];for(var t in Object(e))hd.call(e,t)&&t!="constructor"&&n.push(t);return n}var pd=fd,gd=bo,md=Ao;function vd(e){return e!=null&&md(e.length)&&!gd(e)}var bd=vd,yd=ed,wd=pd,_d=bd;function xd(e){return _d(e)?yd(e):wd(e)}var Sd=xd,Cd=Ac,Ed=$c,Dd=Sd;function Od(e){return Cd(e,Dd,Ed)}var kd=Od,Po=kd,Md=1,Id=Object.prototype,Td=Id.hasOwnProperty;function Ad(e,n,t,o,r,i){var a=t&Md,l=Po(e),s=l.length,u=Po(n),h=u.length;if(s!=h&&!a)return!1;for(var d=s;d--;){var m=l[d];if(!(a?m in n:Td.call(n,m)))return!1}var p=i.get(e),_=i.get(n);if(p&&_)return p==n&&_==e;var v=!0;i.set(e,n),i.set(n,e);for(var D=a;++d<s;){m=l[d];var O=e[m],T=n[m];if(o)var B=a?o(T,O,m,n,e,i):o(O,T,m,e,n,i);if(!(B===void 0?O===T||r(O,T,t,o,i):B)){v=!1;break}D||(D=m=="constructor")}if(v&&!D){var P=e.constructor,H=n.constructor;P!=H&&"constructor"in e&&"constructor"in n&&!(typeof P=="function"&&P instanceof P&&typeof H=="function"&&H instanceof H)&&(v=!1)}return i.delete(e),i.delete(n),v}var jd=Ad,Rd=Le,zd=me,Pd=Rd(zd,"DataView"),Fd=Pd,Nd=Le,Bd=me,Vd=Nd(Bd,"Promise"),Ld=Vd,$d=Le,Wd=me,Xd=$d(Wd,"Set"),Hd=Xd,Ud=Le,Yd=me,Kd=Ud(Yd,"WeakMap"),qd=Kd,pn=Fd,gn=dn,mn=Ld,vn=Hd,bn=qd,Fo=kt,He=wo,No="[object Map]",Gd="[object Object]",Bo="[object Promise]",Vo="[object Set]",Lo="[object WeakMap]",$o="[object DataView]",Zd=He(pn),Jd=He(gn),Qd=He(mn),eh=He(vn),th=He(bn),Ie=Fo;(pn&&Ie(new pn(new ArrayBuffer(1)))!=$o||gn&&Ie(new gn)!=No||mn&&Ie(mn.resolve())!=Bo||vn&&Ie(new vn)!=Vo||bn&&Ie(new bn)!=Lo)&&(Ie=function(e){var n=Fo(e),t=n==Gd?e.constructor:void 0,o=t?He(t):"";if(o)switch(o){case Zd:return $o;case Jd:return No;case Qd:return Bo;case eh:return Vo;case th:return Lo}return n});var nh=Ie,yn=Rs,oh=Co,rh=Ec,ih=jd,Wo=nh,Xo=fn,Ho=To,ah=zo,lh=1,Uo="[object Arguments]",Yo="[object Array]",zt="[object Object]",sh=Object.prototype,Ko=sh.hasOwnProperty;function ch(e,n,t,o,r,i){var a=Xo(e),l=Xo(n),s=a?Yo:Wo(e),u=l?Yo:Wo(n);s=s==Uo?zt:s,u=u==Uo?zt:u;var h=s==zt,d=u==zt,m=s==u;if(m&&Ho(e)){if(!Ho(n))return!1;a=!0,h=!1}if(m&&!h)return i||(i=new yn),a||ah(e)?oh(e,n,t,o,r,i):rh(e,n,s,t,o,r,i);if(!(t&lh)){var p=h&&Ko.call(e,"__wrapped__"),_=d&&Ko.call(n,"__wrapped__");if(p||_){var v=p?e.value():e,D=_?n.value():n;return i||(i=new yn),r(v,D,t,o,i)}}return m?(i||(i=new yn),ih(e,n,t,o,r,i)):!1}var uh=ch,dh=uh,qo=At;function Go(e,n,t,o,r){return e===n?!0:e==null||n==null||!qo(e)&&!qo(n)?e!==e&&n!==n:dh(e,n,t,o,Go,r)}var hh=Go,fh=hh;function ph(e,n){return fh(e,n)}var gh=ph;const mh=nf(gh);function Ue(e,n,t){let o=t.initialDeps??[],r;return()=>{var i,a,l,s;let u;t.key&&(i=t.debug)!=null&&i.call(t)&&(u=Date.now());const h=e();if(!(h.length!==o.length||h.some((m,p)=>o[p]!==m)))return r;o=h;let d;if(t.key&&(a=t.debug)!=null&&a.call(t)&&(d=Date.now()),r=n(...h),t.key&&(l=t.debug)!=null&&l.call(t)){const m=Math.round((Date.now()-u)*100)/100,p=Math.round((Date.now()-d)*100)/100,_=p/16,v=(D,O)=>{for(D=String(D);D.length<O;)D=" "+D;return D};console.info(`%c\u23F1 ${v(p,5)} /${v(m,5)} ms`,`
|
|
2
|
+
font-size: .6rem;
|
|
3
|
+
font-weight: bold;
|
|
4
|
+
color: hsl(${Math.max(0,Math.min(120-120*_,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(s=t==null?void 0:t.onChange)==null||s.call(t,r),r}}function wn(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const vh=(e,n)=>Math.abs(e-n)<1,bh=(e,n,t)=>{let o;return function(...r){e.clearTimeout(o),o=e.setTimeout(()=>n.apply(this,r),t)}},yh=e=>e,wh=e=>{const n=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let r=n;r<=t;r++)o.push(r);return o},_h=(e,n)=>{const t=e.scrollElement;if(!t)return;const o=e.targetWindow;if(!o)return;const r=a=>{const{width:l,height:s}=a;n({width:Math.round(l),height:Math.round(s)})};if(r(t.getBoundingClientRect()),!o.ResizeObserver)return()=>{};const i=new o.ResizeObserver(a=>{const l=()=>{const s=a[0];if(s!=null&&s.borderBoxSize){const u=s.borderBoxSize[0];if(u){r({width:u.inlineSize,height:u.blockSize});return}}r(t.getBoundingClientRect())};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},Zo={passive:!0},Jo=typeof window>"u"?!0:"onscrollend"in window,xh=(e,n)=>{const t=e.scrollElement;if(!t)return;const o=e.targetWindow;if(!o)return;let r=0;const i=e.options.useScrollendEvent&&Jo?()=>{}:bh(o,()=>{n(r,!1)},e.options.isScrollingResetDelay),a=h=>()=>{const{horizontal:d,isRtl:m}=e.options;r=d?t.scrollLeft*(m&&-1||1):t.scrollTop,i(),n(r,h)},l=a(!0),s=a(!1);s(),t.addEventListener("scroll",l,Zo);const u=e.options.useScrollendEvent&&Jo;return u&&t.addEventListener("scrollend",s,Zo),()=>{t.removeEventListener("scroll",l),u&&t.removeEventListener("scrollend",s)}},Sh=(e,n,t)=>{if(n!=null&&n.borderBoxSize){const o=n.borderBoxSize[0];if(o)return Math.round(o[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},Ch=(e,{adjustments:n=0,behavior:t},o)=>{var r,i;const a=e+n;(i=(r=o.scrollElement)==null?void 0:r.scrollTo)==null||i.call(r,{[o.options.horizontal?"left":"top"]:a,behavior:t})};class Eh{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const o=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(r=>{r.forEach(i=>{const a=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var r;(r=o())==null||r.disconnect(),t=null},observe:r=>{var i;return(i=o())==null?void 0:i.observe(r,{box:"border-box"})},unobserve:r=>{var i;return(i=o())==null?void 0:i.unobserve(r)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([o,r])=>{typeof r>"u"&&delete t[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:yh,rangeExtractor:wh,onChange:()=>{},measureElement:Sh,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,useAnimationFrameWithResizeObserver:!1,...t}},this.notify=t=>{var o,r;(r=(o=this.options).onChange)==null||r.call(o,this,t)},this.maybeNotify=Ue(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,o)=>{const r=new Map,i=new Map;for(let a=o-1;a>=0;a--){const l=t[a];if(r.has(l.lane))continue;const s=i.get(l.lane);if(s==null||l.end>s.end?i.set(l.lane,l):l.end<s.end&&r.set(l.lane,!0),r.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((a,l)=>a.end===l.end?a.index-l.index:a.end-l.end)[0]:void 0},this.getMeasurementOptions=Ue(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,o,r,i,a)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:o,scrollMargin:r,getItemKey:i,enabled:a}),{key:!1}),this.getMeasurements=Ue(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:o,scrollMargin:r,getItemKey:i,enabled:a},l)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,s);for(let h=s;h<t;h++){const d=i(h),m=this.options.lanes===1?u[h-1]:this.getFurthestMeasurement(u,h),p=m?m.end+this.options.gap:o+r,_=l.get(d),v=typeof _=="number"?_:this.options.estimateSize(h),D=p+v,O=m?m.lane:h%this.options.lanes;u[h]={index:h,start:p,size:v,end:D,key:d,lane:O}}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ue(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,o,r)=>this.range=t.length>0&&o>0?Dh({measurements:t,outerSize:o,scrollOffset:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Ue(()=>{let t=null,o=null;const r=this.calculateRange();return r&&(t=r.startIndex,o=r.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,o]},(t,o,r,i,a)=>i===null||a===null?[]:t({startIndex:i,endIndex:a,overscan:o,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const o=this.options.indexAttribute,r=t.getAttribute(o);return r?parseInt(r,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(t,o)=>{const r=this.indexFromElement(t),i=this.measurementsCache[r];if(!i)return;const a=i.key,l=this.elementsCache.get(a);l!==t&&(l&&this.observer.unobserve(l),this.observer.observe(t),this.elementsCache.set(a,t)),t.isConnected&&this.resizeItem(r,this.options.measureElement(t,o,this))},this.resizeItem=(t,o)=>{const r=this.measurementsCache[t];if(!r)return;const i=this.itemSizeCache.get(r.key)??r.size,a=o-i;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,a,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,o)),this.notify(!1))},this.measureElement=t=>{if(!t){this.elementsCache.forEach((o,r)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(r))});return}this._measureElement(t,void 0)},this.getVirtualItems=Ue(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,o)=>{const r=[];for(let i=0,a=t.length;i<a;i++){const l=t[i],s=o[l];r.push(s)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const o=this.getMeasurements();if(o.length!==0)return wn(o[Qo(0,o.length-1,r=>wn(o[r]).start,t)])},this.getOffsetForAlignment=(t,o)=>{const r=this.getSize(),i=this.getScrollOffset();o==="auto"&&t>=i+r&&(o="end"),o==="end"&&(t-=r);const a=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[a]:this.scrollElement[a]:0)-r;return Math.max(Math.min(l,t),0)},this.getOffsetForIndex=(t,o="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const r=this.measurementsCache[t];if(!r)return;const i=this.getSize(),a=this.getScrollOffset();if(o==="auto")if(r.end>=a+i-this.options.scrollPaddingEnd)o="end";else if(r.start<=a+this.options.scrollPaddingStart)o="start";else return[a,o];const l=r.start-this.options.scrollPaddingStart+(r.size-i)/2;switch(o){case"center":return[this.getOffsetForAlignment(l,o),o];case"end":return[this.getOffsetForAlignment(r.end+this.options.scrollPaddingEnd,o),o];default:return[this.getOffsetForAlignment(r.start-this.options.scrollPaddingStart,o),o]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:o="start",behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,o),{adjustments:void 0,behavior:r})},this.scrollToIndex=(t,{align:o="auto",behavior:r}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(t,o);if(!i)return;const[a,l]=i;this._scrollToOffset(a,{adjustments:void 0,behavior:r}),r!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[s]=wn(this.getOffsetForIndex(t,l));vh(s,this.getScrollOffset())||this.scrollToIndex(t,{align:l,behavior:r})}else this.scrollToIndex(t,{align:l,behavior:r})}))},this.scrollBy=(t,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var t;const o=this.getMeasurements();let r;return o.length===0?r=this.options.paddingStart:r=this.options.lanes===1?((t=o[o.length-1])==null?void 0:t.end)??0:Math.max(...o.slice(-this.options.lanes).map(i=>i.end)),Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:o,behavior:r})=>{this.options.scrollToFn(t,{behavior:r,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(n)}}const Qo=(e,n,t,o)=>{for(;e<=n;){const r=(e+n)/2|0,i=t(r);if(i<o)e=r+1;else if(i>o)n=r-1;else return r}return e>0?e-1:0};function Dh({measurements:e,outerSize:n,scrollOffset:t}){const o=e.length-1,r=Qo(0,o,a=>e[a].start,t);let i=r;for(;i<o&&e[i].end<t+n;)i++;return{startIndex:r,endIndex:i}}const{computed:Oh,unref:Pt,shallowRef:kh,watch:er,triggerRef:tr,onScopeDispose:Mh}=await te("vue");function Ih(e){const n=new Eh(Pt(e)),t=kh(n),o=n._didMount();return er(()=>Pt(e).getScrollElement(),r=>{r&&n._willUpdate()},{immediate:!0}),er(()=>Pt(e),r=>{n.setOptions({...r,onChange:(i,a)=>{var l;tr(t),(l=r.onChange)==null||l.call(r,i,a)}}),n._willUpdate(),tr(t)},{immediate:!0}),Mh(o),t}function Th(e){return Ih(Oh(()=>({observeElementRect:_h,observeElementOffset:xh,scrollToFn:Ch,...Pt(e)})))}let at,nr,K,Ye,L,xe,A,$,Ke,E,lt,Se,_n,xn,ie,st,ct,or,ut,rr,ir,ar,lr,sr,cr,ur,dr,hr,fr,pr,gr,mr,vr,br,Ft,Sn,yr,oe,ae;({createVNode:at}=await te("vue")),{defineComponent:nr}=await te("vue"),{createVNode:K,renderSlot:Ye,createElementVNode:L,normalizeStyle:xe,openBlock:A,createElementBlock:$,createCommentVNode:Ke,unref:E,renderList:lt,Fragment:Se,mergeProps:_n,resolveComponent:xn,normalizeClass:ie,withCtx:st,createBlock:ct,normalizeProps:or,toDisplayString:ut}=await te("vue"),rr={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},ir=L("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),ar=["onClick"],lr={key:0},sr={class:"fm-typo-en-body-md-400 line-clamp-2 w-full"},cr={key:1,class:"w-full"},ur={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},dr=L("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),hr=["onClick"],fr={class:"fm-typo-en-body-md-400 line-clamp-2 w-full"},pr=["onClick"],gr={class:"fm-typo-en-body-md-400 line-clamp-2 w-full"},mr={class:"flex gap-8 items-center"},vr=L("span",{class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"}," Items per page: ",-1),br={class:"flex gap-8"},{computed:Ft,h:Sn,onMounted:yr,ref:oe,watch:ae}=await te("vue"),Cr=nr({__name:"FmTable",props:{modelValue:{default:{}},selection:{default:void 0},rowData:{default:()=>[]},columnDefs:{default:()=>[]},columnFilter:{default:void 0},searchValue:{default:""},pageCount:{default:0},rowCount:{default:void 0},fetchFn:{type:Function,default:void 0},pageSize:{default:10},loading:{type:Boolean,default:void 0},pinHeaderRow:{type:Boolean,default:!0},hideHeaderRow:{type:Boolean},rowClassName:{},onRowClick:{type:Function,default:void 0},autoResetPageIndex:{type:Boolean},shrinkAt:{type:[String,Number,Boolean],default:"sm"},hideFooter:{type:Boolean},forceMobileFooter:{type:Boolean},columnVisibility:{},draggable:{type:Boolean},wholeRowDraggable:{type:Boolean},expandedState:{type:[Boolean,Object]},getRowCanExpand:{type:Function,default:()=>!0},getSubRow:{type:Function,default:e=>e.subRows},onVuedraggableMove:{type:Function,default:()=>!0},virtual:{type:Boolean,default:!1},virtualRowHeight:{default:48}},emits:["sort-change","dnd-changed","update:expanded-state","update:dragging"],setup(e,{emit:n}){const t=e,o=n,r=Cn(t,"modelValue"),i=Cn(t,"searchValue"),a=oe(t.rowData),l=oe(!1);ae(()=>l.value,c=>{o("update:dragging",c),c&&o("update:expanded-state",{})});const s=()=>{let c=[];return t.selection&&c.push({id:"row-selection",header:({table:g})=>at(Dn,{checked:g.getIsAllPageRowsSelected(),indeterminate:g.getIsSomePageRowsSelected(),onChange:g.getToggleAllPageRowsSelectedHandler()},null),cell:({row:g})=>g.depth===0?at(Dn,{checked:g==null?void 0:g.getIsSelected(),disabled:!(g!=null&&g.getCanSelect()),onChange:g==null?void 0:g.getToggleSelectedHandler()},null):at("div",null,null),enableResizing:!1,meta:{headerClass:"py-[2px] pl-4 pr-16",cellClass:"pl-4 pr-16",width:"60px"},size:60}),t.draggable&&!t.wholeRowDraggable&&c.push({id:"row-drag",header:"",cell:({row:g})=>g.depth===0?Sn("div",{class:["w-full flex",t.selection?"justify-end":"justify-start"]},Sn(Bt,{prependIcon:"drag_handle",variant:"tertiary",class:"cursor-move",type:"button",onMousedown:()=>{l.value=!0},onMouseup:()=>{l.value=!1}})):at("div",null,null),enableResizing:!1,meta:{cellClass:"dnd-handler",width:"60px"},size:60}),[...c,...t.columnDefs]},u=oe([]);ae(()=>u.value,c=>{o("sort-change",c)}),ae(()=>t.rowData,c=>{a.value=[...c]},{deep:!0});const h=oe({pageIndex:0,pageSize:t.pageSize}),d=Rh({get enableRowSelection(){return!!t.selection},get enableMultiRowSelection(){return t.selection==="multiple"},get columns(){return s()},get data(){return a.value},state:{get pagination(){return typeof t.fetchFn=="function"?h.value:void 0},get globalFilter(){return i.value},get rowSelection(){return r.value},get sorting(){return u.value},get columnVisibility(){return t.columnVisibility},get expanded(){return t.expandedState}},getCoreRowModel:zh(),getSortedRowModel:Ph(),getFilteredRowModel:Fh(),getPaginationRowModel:Nh(),getRowCanExpand:t.getRowCanExpand,onExpandedChange:c=>{if(!t.expandedState)return;const g=typeof c=="function"?c(t.expandedState):c;o("update:expanded-state",g)},onRowSelectionChange:c=>{if(!v.value)return r.value=typeof c=="function"?c(r.value):c},onSortingChange:c=>{u.value=typeof c=="function"?c(u.value):c},onGlobalFilterChange:c=>{i.value=typeof c=="function"?c(i.value):c},autoResetPageIndex:t.autoResetPageIndex,manualPagination:typeof t.fetchFn=="function",...typeof t.fetchFn=="function"&&{onPaginationChange:c=>h.value=typeof c=="function"?c(h.value):c},pageCount:typeof t.fetchFn=="function"?t.pageCount:void 0,getSubRows:c=>t.getSubRow(c),getExpandedRowModel:Bh(),get enableHiding(){return!0}});ae(()=>h.value,c=>{_(c)}),ae(()=>t.selection,()=>{d.setOptions(c=>({...c,get enableRowSelection(){return!!t.selection},get enableMultiRowSelection(){return t.selection==="multiple"},get columns(){return s()}}))});const m=oe(""),p=oe(!1);async function _(c){if(!t.fetchFn)return;p.value=!0;const g=`${Math.random()}`;m.value=g;try{await t.fetchFn(c)}catch{}finally{m.value===g&&(p.value=!1)}}const v=Ft(()=>{const c=p.value;return typeof t.loading=="boolean"?t.loading:c});ae(()=>t.rowData,()=>{d.setOptions(c=>({...c,get data(){return a.value}}))}),ae([()=>t.pageCount,()=>t.rowCount],()=>{d.setOptions(c=>({...c,pageCount:t.pageCount,rowCount:t.rowCount}))}),ae(()=>t.pageSize,()=>{d.setPageSize(t.pageSize)}),ae([()=>t.columnFilter],([c])=>{d.setColumnFilters(()=>c??[])}),ae(()=>t.columnDefs,()=>{d.setOptions(c=>({...c,get columns(){return s()}}))}),yr(()=>{t.fetchFn&&t.fetchFn(d.getState().pagination),d.setPageSize(t.pageSize)});const D=oe(380);function O(c){var k;const g=((k=c.el)==null?void 0:k.scrollHeight)??0;D.value=Math.max(100,g)}const T=Zh(),B=oe(),P=oe(typeof t.shrinkAt=="boolean"&&!t.shrinkAt?!1:T.isBreakpointKeyword(t.shrinkAt)&&T.isAtMost(t.shrinkAt)),H=Ft(()=>{const c=[...Array.from(Array(Math.min(5,Math.floor(t.rowData.length/10))),(k,W)=>(W+1)*10).map(k=>({label:k.toString(),value:k}))],g={label:"All",value:t.rowData.length};return t.pageSize&&t.pageSize>0&&(c.some(k=>k.value===t.pageSize)||(c.push({label:t.pageSize.toString(),value:t.pageSize}),c.sort((k,W)=>k.value-W.value))),[...c,g]});function ve(c){const g=c.el;if(!g||typeof t.shrinkAt>"u"||typeof t.shrinkAt=="boolean"&&!t.shrinkAt)return;const k=tf(function(){if(B.value=g.clientWidth,T.isBreakpointKeyword(t.shrinkAt)){P.value=T.isAtMost(t.shrinkAt);return}const W=Number(t.shrinkAt);if(isNaN(W)){P.value=!1;return}P.value=g.scrollWidth>=W},200);g.resizeTable??(g.resizeTable=function(){P.value=T.isBreakpointKeyword(t.shrinkAt)&&T.isAtMost(t.shrinkAt),k()}),window.addEventListener("resize",g.resizeTable),g.resizeTable()}function Te(c){const g=c.el;!g||typeof t.shrinkAt>"u"||typeof t.shrinkAt=="boolean"&&!t.shrinkAt||g.resizeTable&&window.removeEventListener("resize",g.resizeTable)}function Ce(c){const g=Math.min(...c.map(j=>j.index)),k=Math.max(...c.map(j=>j.index)),W=a.value.slice(0,g),he=a.value.slice(k+1),je=c.map(j=>j.original),x=a.value.slice(g,k+1);mh(je,x)||o("dnd-changed",[...W,...je,...he])}const U=oe(),de=Ft(()=>!t.virtual||!U.value?null:Th({count:d.getRowModel().rows.length,getScrollElement:()=>U.value??null,estimateSize:()=>t.virtualRowHeight,overscan:5})),Ae=oe([]);function le(c){Ae.value=c}return(c,g)=>{var he,je;const k=xn("FmListItem"),W=xn("FmList");return A(),$("div",{class:"flex flex-col h-full relative",onVnodeMounted:ve,onVnodeUnmounted:Te},[L("div",{class:"overflow-y-auto",ref_key:"parentRef",ref:U},[P.value?(A(),$(Se,{key:0},[v.value?(A(),$("div",{key:0,style:xe({height:`${D.value}px`}),class:"pointer-events-none"},[L("div",rr,[K(Vt),K(Sr,{size:"xl"}),L("div",null,[Ye(c.$slots,"loading-text",{},()=>[ir])]),K(Vt)])],4)):(A(),ct(W,{key:1,onVnodeMounted:O},{default:st(()=>[(A(!0),$(Se,null,lt(E(d).getRowModel().rows,x=>Ye(c.$slots,"list-row",_n({key:x.id,ref_for:!0},x),()=>[K(k,{class:ie([{"bg-fm-color-neutral-gray-100":x.getIsSelected(),"cursor-pointer":typeof c.onRowClick=="function"}]),style:{padding:"0"},tag:"label"},{prepend:st(()=>{var j,Ee,F,ee,De;return[K(E(Nt),{props:(Ee=(j=x.getVisibleCells().find(be=>be.column.id==="row-selection"))==null?void 0:j.getContext)==null?void 0:Ee.call(j),render:(De=(ee=(F=x.getVisibleCells().find(be=>be.column.id==="row-selection"))==null?void 0:F.column)==null?void 0:ee.columnDef)==null?void 0:De.cell},null,8,["props","render"])]}),default:st(()=>[L("div",{class:"flex flex-col gap-4 grow p-8",onClick:j=>{var Ee;return(Ee=c.onRowClick)==null?void 0:Ee.call(c,x)}},[(A(!0),$(Se,null,lt(x.getVisibleCells(),j=>(A(),$(Se,{key:j.id},[j.column.id!=="row-selection"?(A(),$("div",lr,[L("span",sr,[K(E(Nt),{props:j.getContext(),render:j.column.columnDef.cell},null,8,["props","render"])])])):Ke("",!0)],64))),128))],8,ar)]),_:2},1032,["class"])])),128))]),_:3},512))],64)):(A(),$("table",cr,[!c.pinHeaderRow&&!c.hideHeaderRow?(A(),ct(xr,{key:0,table:E(d)},null,8,["table"])):Ke("",!0),Ye(c.$slots,"pin-top"),v.value?(A(),$("tbody",{key:1,onVnodeMounted:O},[L("div",{style:xe({height:`${D.value}px`}),class:"pointer-events-none"},[L("div",ur,[K(Vt),K(Sr,{size:"xl"}),L("div",null,[Ye(c.$slots,"loading-text",{},()=>[dr])]),K(Vt)])],4)],512)):(A(),ct(E($i),{key:2,clone:E(of.clone),handle:Object.keys(t.expandedState??{}).length>0?".dnd-handler-disabled":".dnd-handler","model-value":c.virtual?((je=(he=de.value)==null?void 0:he.value)==null?void 0:je.getVirtualItems())??E(d).getRowModel().rows:E(d).getRowModel().rows,move:c.onVuedraggableMove,"item-key":"id",tag:"tbody",style:xe(c.virtual?{height:`${E(d).getRowModel().rows.length*t.virtualRowHeight}px`,position:"relative"}:void 0),onDragend:g[0]||(g[0]=x=>l.value=!1),onDragstart:g[1]||(g[1]=x=>l.value=!0),"onUpdate:modelValue":Ce,onVnodeMounted:O},{item:st(({element:x})=>{var j,Ee;return[c.$slots["table-row"]?Ye(c.$slots,"table-row",or(_n({key:0},x))):(A(),$(Se,{key:1},[c.virtual?(A(),$("tr",{key:0,style:xe({height:`${t.virtualRowHeight}px`,transform:`translateY(${x.start}px)`,position:"absolute",top:0,left:0,width:"100%"}),class:ie([[{"bg-fm-color-neutral-gray-100":(j=E(d).getRowModel().rows[x.index])==null?void 0:j.getIsSelected(),"cursor-pointer":typeof c.onRowClick=="function","dnd-handler":c.draggable&&c.wholeRowDraggable,"border-b border-fm-color-neutral-gray-100":!0},c.rowClassName],"hover:bg-fm-color-opacity-sm"]),onClick:F=>{var ee;return(ee=c.onRowClick)==null?void 0:ee.call(c,E(d).getRowModel().rows[x.index])}},[(A(!0),$(Se,null,lt(((Ee=E(d).getRowModel().rows[x.index])==null?void 0:Ee.getVisibleCells())||[],(F,ee)=>{var De,be;return A(),$("td",{key:F.id,class:ie([v.value?"hidden":"","h-[48px] text-fm-color-typo-primary",((De=F.column.columnDef.meta)==null?void 0:De.cellClass)??"px-16"]),style:xe({width:`${Ae.value[ee]}px`,textAlign:((be=F.column.columnDef.meta)==null?void 0:be.textAlign)??"left"})},[L("span",fr,[K(E(Nt),{props:F.getContext(),render:F.column.columnDef.cell},null,8,["props","render"])])],6)}),128))],14,hr)):(A(),$("tr",{key:1,class:ie([[{"bg-fm-color-neutral-gray-100":x.getIsSelected(),"cursor-pointer":typeof c.onRowClick=="function","dnd-handler":c.draggable&&c.wholeRowDraggable,"border-b border-fm-color-neutral-gray-100":x.subRows.length===0&&x.depth===0?!0:x.depth===0?!x.getIsExpanded():x.index+1===x.getParentRow().subRows.length},c.rowClassName],"hover:bg-fm-color-opacity-sm"]),onClick:F=>{var ee;return(ee=c.onRowClick)==null?void 0:ee.call(c,x)}},[(A(!0),$(Se,null,lt(x.getVisibleCells(),F=>{var ee,De,be,wr,_r;return A(),$("td",{key:F.id,class:ie([v.value?"hidden":"","h-[48px] text-fm-color-typo-primary",((ee=F.column.columnDef.meta)==null?void 0:ee.cellClass)??"px-16"]),style:xe({width:(De=F.column.columnDef.meta)!=null&&De.width?(be=F.column.columnDef.meta)==null?void 0:be.width:F.column.getSize()!==0?`${F.column.getSize()}px`:void 0,maxWidth:(wr=F.column.columnDef.meta)==null?void 0:wr.maxWidth,textAlign:((_r=F.column.columnDef.meta)==null?void 0:_r.textAlign)??"left"})},[L("span",gr,[K(E(Nt),{props:F.getContext(),render:F.column.columnDef.cell},null,8,["props","render"])])],6)}),128))],10,pr))],64))]}),_:3},8,["clone","handle","model-value","move","style"])),c.pinHeaderRow&&!c.hideHeaderRow?(A(),ct(xr,{key:3,table:E(d),class:ie(["bg-fm-color-neutral-gray-100 top-0",{sticky:!l.value}]),"onUpdate:columnWidths":le},null,8,["table","class"])):Ke("",!0)]))],512),c.hideFooter?Ke("",!0):(A(),$("div",{key:0,style:xe({maxWidth:B.value?`${B.value}px`:void 0}),class:"basis-72 bg-white flex items-center justify-between px-24"},[P.value?Ke("",!0):(A(),$("div",{key:0,class:ie([{"hidden invisible":c.forceMobileFooter},"flex gap-24 items-center justify-between xs:hidden xs:invisible"])},[L("div",mr,[vr,K(Mn,{items:H.value,"model-value":E(d).getState().pagination.pageSize,"onUpdate:modelValue":g[2]||(g[2]=x=>E(d).setPageSize(x))},null,8,["items","model-value"])]),L("span",{class:ie([{"hidden invisible":c.forceMobileFooter},"fm-typo-en-body-lg-400 text-fm-color-typo-secondary xs:hidden xs:invisible"])},ut(t.rowData.length<E(d).getState().pagination.pageSize?t.rowData.length:E(d).getState().pagination.pageIndex*E(d).getState().pagination.pageSize+1)+" - "+ut((E(d).getState().pagination.pageIndex+1)*E(d).getState().pagination.pageSize)+" of "+ut(t.rowCount??t.rowData.length)+" items ",3)],2)),L("div",{class:ie(["flex gap-8 items-center",{"w-full justify-between":P.value||c.forceMobileFooter,"xs:w-full xs:justify-between":!P.value}])},[K(Mn,{items:Array.from(Array(E(d).getPageCount()),(x,j)=>j+1).map(x=>({label:x.toString(),value:x})),"model-value":E(d).getState().pagination.pageIndex+1,"onUpdate:modelValue":g[3]||(g[3]=x=>E(d).setPageIndex(x?x-1:0))},null,8,["items","model-value"]),L("span",{class:ie([{"mr-auto":P.value||c.forceMobileFooter},"fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto"])}," of "+ut(E(d).getPageCount())+" pages ",3),L("div",br,[K(Bt,{disabled:!E(d).getCanPreviousPage(),icon:"chevron_left","icon-color":"neutral-black",variant:"tertiary",onClick:g[4]||(g[4]=()=>E(d).previousPage())},null,8,["disabled"]),K(Bt,{disabled:!E(d).getCanNextPage(),icon:"chevron_right","icon-color":"neutral-black",variant:"tertiary",onClick:g[5]||(g[5]=()=>E(d).nextPage())},null,8,["disabled"])])],2)],4))],512)}}})});export{Cr as _,rf as __tla};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{importShared as k,__tla as Nt}from"./__federation_fn_import-CYKgoy9p.js";let de,Oe,Te,Be,ke,qe,Ne,je,jt=Promise.all([(()=>{try{return Nt}catch{}})()]).then(async()=>{function P(e,l){return typeof e=="function"?e(l):e}function F(e,l){return t=>{l.setState(n=>({...n,[e]:P(t,n[e])}))}}function L(e){return e instanceof Function}function Ue(e){return Array.isArray(e)&&e.every(l=>typeof l=="number")}function $e(e,l){const t=[],n=o=>{o.forEach(i=>{t.push(i);const r=l(i);r!=null&&r.length&&n(r)})};return n(e),t}function w(e,l,t){let n=[],o;return i=>{let r;t.key&&t.debug&&(r=Date.now());const u=e(i);if(!(u.length!==n.length||u.some((d,c)=>n[c]!==d)))return o;n=u;let s;if(t.key&&t.debug&&(s=Date.now()),o=l(...u),t==null||t.onChange==null||t.onChange(o),t.key&&t.debug&&t!=null&&t.debug()){const d=Math.round((Date.now()-r)*100)/100,c=Math.round((Date.now()-s)*100)/100,g=c/16,p=(a,f)=>{for(a=String(a);a.length<f;)a=" "+a;return a};console.info(`%c\u23F1 ${p(c,5)} /${p(d,5)} ms`,`
|
|
2
|
+
font-size: .6rem;
|
|
3
|
+
font-weight: bold;
|
|
4
|
+
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,t==null?void 0:t.key)}return o}}function h(e,l,t,n){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[l]},key:!1,onChange:n}}function Xe(e,l,t,n){const o=()=>{var r;return(r=i.getValue())!=null?r:e.options.renderFallbackValue},i={id:`${l.id}_${t.id}`,row:l,column:t,getValue:()=>l.getValue(n),renderValue:o,getContext:w(()=>[e,t,l,i],(r,u,s,d)=>({table:r,column:u,row:s,cell:d,getValue:d.getValue,renderValue:d.renderValue}),h(e.options,"debugCells"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(i,t,l,e)},{}),i}function Ke(e,l,t,n){var o,i;const r={...e._getDefaultColumnDef(),...l},u=r.accessorKey;let s=(o=(i=r.id)!=null?i:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?o:typeof r.header=="string"?r.header:void 0,d;if(r.accessorFn?d=r.accessorFn:u&&(u.includes(".")?d=g=>{let p=g;for(const f of u.split(".")){var a;p=(a=p)==null?void 0:a[f]}return p}:d=g=>g[r.accessorKey]),!s)throw new Error;let c={id:`${String(s)}`,accessorFn:d,parent:n,depth:t,columnDef:r,columns:[],getFlatColumns:w(()=>[!0],()=>{var g;return[c,...(g=c.columns)==null?void 0:g.flatMap(p=>p.getFlatColumns())]},h(e.options,"debugColumns")),getLeafColumns:w(()=>[e._getOrderColumnsFn()],g=>{var p;if((p=c.columns)!=null&&p.length){let a=c.columns.flatMap(f=>f.getLeafColumns());return g(a)}return[c]},h(e.options,"debugColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(c,e);return c}const v="debugHeaders";function ce(e,l,t){var n;let o={id:(n=t.id)!=null?n:l.id,column:l,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],r=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(r),i.push(u)};return r(o),i},getContext:()=>({table:e,header:o,column:l})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(o,e)}),o}const We={createTable:e=>{e.getHeaderGroups=w(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(l,t,n,o)=>{var i,r;const u=(i=n==null?void 0:n.map(c=>t.find(g=>g.id===c)).filter(Boolean))!=null?i:[],s=(r=o==null?void 0:o.map(c=>t.find(g=>g.id===c)).filter(Boolean))!=null?r:[],d=t.filter(c=>!(n!=null&&n.includes(c.id))&&!(o!=null&&o.includes(c.id)));return H(l,[...u,...d,...s],e)},h(e.options,v)),e.getCenterHeaderGroups=w(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(l,t,n,o)=>(t=t.filter(i=>!(n!=null&&n.includes(i.id))&&!(o!=null&&o.includes(i.id))),H(l,t,e,"center")),h(e.options,v)),e.getLeftHeaderGroups=w(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(l,t,n)=>{var o;const i=(o=n==null?void 0:n.map(r=>t.find(u=>u.id===r)).filter(Boolean))!=null?o:[];return H(l,i,e,"left")},h(e.options,v)),e.getRightHeaderGroups=w(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(l,t,n)=>{var o;const i=(o=n==null?void 0:n.map(r=>t.find(u=>u.id===r)).filter(Boolean))!=null?o:[];return H(l,i,e,"right")},h(e.options,v)),e.getFooterGroups=w(()=>[e.getHeaderGroups()],l=>[...l].reverse(),h(e.options,v)),e.getLeftFooterGroups=w(()=>[e.getLeftHeaderGroups()],l=>[...l].reverse(),h(e.options,v)),e.getCenterFooterGroups=w(()=>[e.getCenterHeaderGroups()],l=>[...l].reverse(),h(e.options,v)),e.getRightFooterGroups=w(()=>[e.getRightHeaderGroups()],l=>[...l].reverse(),h(e.options,v)),e.getFlatHeaders=w(()=>[e.getHeaderGroups()],l=>l.map(t=>t.headers).flat(),h(e.options,v)),e.getLeftFlatHeaders=w(()=>[e.getLeftHeaderGroups()],l=>l.map(t=>t.headers).flat(),h(e.options,v)),e.getCenterFlatHeaders=w(()=>[e.getCenterHeaderGroups()],l=>l.map(t=>t.headers).flat(),h(e.options,v)),e.getRightFlatHeaders=w(()=>[e.getRightHeaderGroups()],l=>l.map(t=>t.headers).flat(),h(e.options,v)),e.getCenterLeafHeaders=w(()=>[e.getCenterFlatHeaders()],l=>l.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),h(e.options,v)),e.getLeftLeafHeaders=w(()=>[e.getLeftFlatHeaders()],l=>l.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),h(e.options,v)),e.getRightLeafHeaders=w(()=>[e.getRightFlatHeaders()],l=>l.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),h(e.options,v)),e.getLeafHeaders=w(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(l,t,n)=>{var o,i,r,u,s,d;return[...(o=(i=l[0])==null?void 0:i.headers)!=null?o:[],...(r=(u=t[0])==null?void 0:u.headers)!=null?r:[],...(s=(d=n[0])==null?void 0:d.headers)!=null?s:[]].map(c=>c.getLeafHeaders()).flat()},h(e.options,v))}};function H(e,l,t,n){var o,i;let r=0;const u=function(p,a){a===void 0&&(a=1),r=Math.max(r,a),p.filter(f=>f.getIsVisible()).forEach(f=>{var m;(m=f.columns)!=null&&m.length&&u(f.columns,a+1)},0)};u(e);let s=[];const d=(p,a)=>{const f={depth:a,id:[n,`${a}`].filter(Boolean).join("_"),headers:[]},m=[];p.forEach(C=>{const S=[...m].reverse()[0],R=C.column.depth===f.depth;let b,M=!1;if(R&&C.column.parent?b=C.column.parent:(b=C.column,M=!0),S&&(S==null?void 0:S.column)===b)S.subHeaders.push(C);else{const I=ce(t,b,{id:[n,a,b.id,C==null?void 0:C.id].filter(Boolean).join("_"),isPlaceholder:M,placeholderId:M?`${m.filter(G=>G.column===b).length}`:void 0,depth:a,index:m.length});I.subHeaders.push(C),m.push(I)}f.headers.push(C),C.headerGroup=f}),s.push(f),a>0&&d(m,a-1)},c=l.map((p,a)=>ce(t,p,{depth:r,index:a}));d(c,r-1),s.reverse();const g=p=>p.filter(a=>a.column.getIsVisible()).map(a=>{let f=0,m=0,C=[0];a.subHeaders&&a.subHeaders.length?(C=[],g(a.subHeaders).forEach(R=>{let{colSpan:b,rowSpan:M}=R;f+=b,C.push(M)})):f=1;const S=Math.min(...C);return m=m+S,a.colSpan=f,a.rowSpan=m,{colSpan:f,rowSpan:m}});return g((o=(i=s[0])==null?void 0:i.headers)!=null?o:[]),s}const q=(e,l,t,n,o,i,r)=>{let u={id:l,index:n,original:t,depth:o,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:s=>{if(u._valuesCache.hasOwnProperty(s))return u._valuesCache[s];const d=e.getColumn(s);if(d!=null&&d.accessorFn)return u._valuesCache[s]=d.accessorFn(u.original,n),u._valuesCache[s]},getUniqueValues:s=>{if(u._uniqueValuesCache.hasOwnProperty(s))return u._uniqueValuesCache[s];const d=e.getColumn(s);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(u._uniqueValuesCache[s]=d.columnDef.getUniqueValues(u.original,n),u._uniqueValuesCache[s]):(u._uniqueValuesCache[s]=[u.getValue(s)],u._uniqueValuesCache[s])},renderValue:s=>{var d;return(d=u.getValue(s))!=null?d:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>$e(u.subRows,s=>s.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId,!0):void 0,getParentRows:()=>{let s=[],d=u;for(;;){const c=d.getParentRow();if(!c)break;s.push(c),d=c}return s.reverse()},getAllCells:w(()=>[e.getAllLeafColumns()],s=>s.map(d=>Xe(e,u,d,d.id)),h(e.options,"debugRows")),_getAllCellsByColumnId:w(()=>[u.getAllCells()],s=>s.reduce((d,c)=>(d[c.column.id]=c,d),{}),h(e.options,"debugRows"))};for(let s=0;s<e._features.length;s++){const d=e._features[s];d==null||d.createRow==null||d.createRow(u,e)}return u},Je={createColumn:(e,l)=>{e._getFacetedRowModel=l.options.getFacetedRowModel&&l.options.getFacetedRowModel(l,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():l.getPreFilteredRowModel(),e._getFacetedUniqueValues=l.options.getFacetedUniqueValues&&l.options.getFacetedUniqueValues(l,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=l.options.getFacetedMinMaxValues&&l.options.getFacetedMinMaxValues(l,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},pe=(e,l,t)=>{var n;const o=t.toLowerCase();return!!(!((n=e.getValue(l))==null||(n=n.toString())==null||(n=n.toLowerCase())==null)&&n.includes(o))};pe.autoRemove=e=>V(e);const fe=(e,l,t)=>{var n;return!!(!((n=e.getValue(l))==null||(n=n.toString())==null)&&n.includes(t))};fe.autoRemove=e=>V(e);const me=(e,l,t)=>{var n;return((n=e.getValue(l))==null||(n=n.toString())==null?void 0:n.toLowerCase())===(t==null?void 0:t.toLowerCase())};me.autoRemove=e=>V(e);const we=(e,l,t)=>{var n;return(n=e.getValue(l))==null?void 0:n.includes(t)};we.autoRemove=e=>V(e)||!(e!=null&&e.length);const he=(e,l,t)=>!t.some(n=>{var o;return!((o=e.getValue(l))!=null&&o.includes(n))});he.autoRemove=e=>V(e)||!(e!=null&&e.length);const Se=(e,l,t)=>t.some(n=>{var o;return(o=e.getValue(l))==null?void 0:o.includes(n)});Se.autoRemove=e=>V(e)||!(e!=null&&e.length);const Ce=(e,l,t)=>e.getValue(l)===t;Ce.autoRemove=e=>V(e);const be=(e,l,t)=>e.getValue(l)==t;be.autoRemove=e=>V(e);const N=(e,l,t)=>{let[n,o]=t;const i=e.getValue(l);return i>=n&&i<=o};N.resolveFilterValue=e=>{let[l,t]=e,n=typeof l!="number"?parseFloat(l):l,o=typeof t!="number"?parseFloat(t):t,i=l===null||Number.isNaN(n)?-1/0:n,r=t===null||Number.isNaN(o)?1/0:o;if(i>r){const u=i;i=r,r=u}return[i,r]},N.autoRemove=e=>V(e)||V(e[0])&&V(e[1]);const x={includesString:pe,includesStringSensitive:fe,equalsString:me,arrIncludes:we,arrIncludesAll:he,arrIncludesSome:Se,equals:Ce,weakEquals:be,inNumberRange:N};function V(e){return e==null||e===""}const Qe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:F("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,l)=>{e.getAutoFilterFn=()=>{const t=l.getCoreRowModel().flatRows[0],n=t==null?void 0:t.getValue(e.id);return typeof n=="string"?x.includesString:typeof n=="number"?x.inNumberRange:typeof n=="boolean"||n!==null&&typeof n=="object"?x.equals:Array.isArray(n)?x.arrIncludes:x.weakEquals},e.getFilterFn=()=>{var t,n;return L(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(n=l.options.filterFns)==null?void 0:n[e.columnDef.filterFn])!=null?t:x[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,n,o;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((n=l.options.enableColumnFilters)!=null?n:!0)&&((o=l.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=l.getState().columnFilters)==null||(t=t.find(n=>n.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,n;return(t=(n=l.getState().columnFilters)==null?void 0:n.findIndex(o=>o.id===e.id))!=null?t:-1},e.setFilterValue=t=>{l.setColumnFilters(n=>{const o=e.getFilterFn(),i=n==null?void 0:n.find(c=>c.id===e.id),r=P(t,i?i.value:void 0);if(Re(o,r,e)){var u;return(u=n==null?void 0:n.filter(c=>c.id!==e.id))!=null?u:[]}const s={id:e.id,value:r};if(i){var d;return(d=n==null?void 0:n.map(c=>c.id===e.id?s:c))!=null?d:[]}return n!=null&&n.length?[...n,s]:[s]})}},createRow:(e,l)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=l=>{const t=e.getAllLeafColumns(),n=o=>{var i;return(i=P(l,o))==null?void 0:i.filter(r=>{const u=t.find(s=>s.id===r.id);if(u){const s=u.getFilterFn();if(Re(s,r.value,u))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(n)},e.resetColumnFilters=l=>{var t,n;e.setColumnFilters(l?[]:(t=(n=e.initialState)==null?void 0:n.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Re(e,l,t){return(e&&e.autoRemove?e.autoRemove(l,t):!1)||typeof l>"u"||typeof l=="string"&&!l}const Ye=(e,l,t)=>t.reduce((n,o)=>{const i=o.getValue(e);return n+(typeof i=="number"?i:0)},0),Ze=(e,l,t)=>{let n;return t.forEach(o=>{const i=o.getValue(e);i!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}),n},et=(e,l,t)=>{let n;return t.forEach(o=>{const i=o.getValue(e);i!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}),n},tt=(e,l,t)=>{let n,o;return t.forEach(i=>{const r=i.getValue(e);r!=null&&(n===void 0?r>=r&&(n=o=r):(n>r&&(n=r),o<r&&(o=r)))}),[n,o]},nt=(e,l)=>{let t=0,n=0;if(l.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++t,n+=i)}),t)return n/t},lt=(e,l)=>{if(!l.length)return;const t=l.map(i=>i.getValue(e));if(!Ue(t))return;if(t.length===1)return t[0];const n=Math.floor(t.length/2),o=t.sort((i,r)=>i-r);return t.length%2!==0?o[n]:(o[n-1]+o[n])/2},ot=(e,l)=>Array.from(new Set(l.map(t=>t.getValue(e))).values()),it=(e,l)=>new Set(l.map(t=>t.getValue(e))).size,rt=(e,l)=>l.length,j={sum:Ye,min:Ze,max:et,extent:tt,mean:nt,median:lt,unique:ot,uniqueCount:it,count:rt},at={getDefaultColumnDef:()=>({aggregatedCell:e=>{var l,t;return(l=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?l:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:F("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,l)=>{e.toggleGrouping=()=>{l.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(n=>n!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,n;return((t=e.columnDef.enableGrouping)!=null?t:!0)&&((n=l.options.enableGrouping)!=null?n:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var t;return(t=l.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=l.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=l.getCoreRowModel().flatRows[0],n=t==null?void 0:t.getValue(e.id);if(typeof n=="number")return j.sum;if(Object.prototype.toString.call(n)==="[object Date]")return j.extent},e.getAggregationFn=()=>{var t,n;if(!e)throw new Error;return L(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(n=l.options.aggregationFns)==null?void 0:n[e.columnDef.aggregationFn])!=null?t:j[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=l=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(l),e.resetGrouping=l=>{var t,n;e.setGrouping(l?[]:(t=(n=e.initialState)==null?void 0:n.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,l)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const n=l.getColumn(t);return n!=null&&n.columnDef.getGroupingValue?(e._groupingValuesCache[t]=n.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,l,t,n)=>{e.getIsGrouped=()=>l.getIsGrouped()&&l.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&l.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=t.subRows)!=null&&o.length)}}};function ut(e,l,t){if(!(l!=null&&l.length)||!t)return e;const n=e.filter(o=>!l.includes(o.id));return t==="remove"?n:[...l.map(o=>e.find(i=>i.id===o)).filter(Boolean),...n]}const st={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:F("columnOrder",e)}),createColumn:(e,l)=>{e.getIndex=w(t=>[A(l,t)],t=>t.findIndex(n=>n.id===e.id),h(l.options,"debugColumns")),e.getIsFirstColumn=t=>{var n;return((n=A(l,t)[0])==null?void 0:n.id)===e.id},e.getIsLastColumn=t=>{var n;const o=A(l,t);return((n=o[o.length-1])==null?void 0:n.id)===e.id}},createTable:e=>{e.setColumnOrder=l=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(l),e.resetColumnOrder=l=>{var t;e.setColumnOrder(l?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=w(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(l,t,n)=>o=>{let i=[];if(!(l!=null&&l.length))i=o;else{const r=[...l],u=[...o];for(;u.length&&r.length;){const s=r.shift(),d=u.findIndex(c=>c.id===s);d>-1&&i.push(u.splice(d,1)[0])}i=[...i,...u]}return ut(i,t,n)},h(e.options,"debugTable"))}},U=()=>({left:[],right:[]}),gt={getInitialState:e=>({columnPinning:U(),...e}),getDefaultOptions:e=>({onColumnPinningChange:F("columnPinning",e)}),createColumn:(e,l)=>{e.pin=t=>{const n=e.getLeafColumns().map(o=>o.id).filter(Boolean);l.setColumnPinning(o=>{var i,r;if(t==="right"){var u,s;return{left:((u=o==null?void 0:o.left)!=null?u:[]).filter(g=>!(n!=null&&n.includes(g))),right:[...((s=o==null?void 0:o.right)!=null?s:[]).filter(g=>!(n!=null&&n.includes(g))),...n]}}if(t==="left"){var d,c;return{left:[...((d=o==null?void 0:o.left)!=null?d:[]).filter(g=>!(n!=null&&n.includes(g))),...n],right:((c=o==null?void 0:o.right)!=null?c:[]).filter(g=>!(n!=null&&n.includes(g)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(g=>!(n!=null&&n.includes(g))),right:((r=o==null?void 0:o.right)!=null?r:[]).filter(g=>!(n!=null&&n.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(t=>{var n,o,i;return((n=t.columnDef.enablePinning)!=null?n:!0)&&((o=(i=l.options.enableColumnPinning)!=null?i:l.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(u=>u.id),{left:n,right:o}=l.getState().columnPinning,i=t.some(u=>n==null?void 0:n.includes(u)),r=t.some(u=>o==null?void 0:o.includes(u));return i?"left":r?"right":!1},e.getPinnedIndex=()=>{var t,n;const o=e.getIsPinned();return o?(t=(n=l.getState().columnPinning)==null||(n=n[o])==null?void 0:n.indexOf(e.id))!=null?t:-1:0}},createRow:(e,l)=>{e.getCenterVisibleCells=w(()=>[e._getAllVisibleCells(),l.getState().columnPinning.left,l.getState().columnPinning.right],(t,n,o)=>{const i=[...n??[],...o??[]];return t.filter(r=>!i.includes(r.column.id))},h(l.options,"debugRows")),e.getLeftVisibleCells=w(()=>[e._getAllVisibleCells(),l.getState().columnPinning.left],(t,n)=>(n??[]).map(o=>t.find(i=>i.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),h(l.options,"debugRows")),e.getRightVisibleCells=w(()=>[e._getAllVisibleCells(),l.getState().columnPinning.right],(t,n)=>(n??[]).map(o=>t.find(i=>i.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),h(l.options,"debugRows"))},createTable:e=>{e.setColumnPinning=l=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(l),e.resetColumnPinning=l=>{var t,n;return e.setColumnPinning(l?U():(t=(n=e.initialState)==null?void 0:n.columnPinning)!=null?t:U())},e.getIsSomeColumnsPinned=l=>{var t;const n=e.getState().columnPinning;if(!l){var o,i;return!!((o=n.left)!=null&&o.length||(i=n.right)!=null&&i.length)}return!!((t=n[l])!=null&&t.length)},e.getLeftLeafColumns=w(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(l,t)=>(t??[]).map(n=>l.find(o=>o.id===n)).filter(Boolean),h(e.options,"debugColumns")),e.getRightLeafColumns=w(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(l,t)=>(t??[]).map(n=>l.find(o=>o.id===n)).filter(Boolean),h(e.options,"debugColumns")),e.getCenterLeafColumns=w(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(l,t,n)=>{const o=[...t??[],...n??[]];return l.filter(i=>!o.includes(i.id))},h(e.options,"debugColumns"))}},O={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},$=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),dt={getDefaultColumnDef:()=>O,getInitialState:e=>({columnSizing:{},columnSizingInfo:$(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:F("columnSizing",e),onColumnSizingInfoChange:F("columnSizingInfo",e)}),createColumn:(e,l)=>{e.getSize=()=>{var t,n,o;const i=l.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:O.minSize,(n=i??e.columnDef.size)!=null?n:O.size),(o=e.columnDef.maxSize)!=null?o:O.maxSize)},e.getStart=w(t=>[t,A(l,t),l.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((o,i)=>o+i.getSize(),0),h(l.options,"debugColumns")),e.getAfter=w(t=>[t,A(l,t),l.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((o,i)=>o+i.getSize(),0),h(l.options,"debugColumns")),e.resetSize=()=>{l.setColumnSizing(t=>{let{[e.id]:n,...o}=t;return o})},e.getCanResize=()=>{var t,n;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((n=l.options.enableColumnResizing)!=null?n:!0)},e.getIsResizing=()=>l.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,l)=>{e.getSize=()=>{let t=0;const n=o=>{if(o.subHeaders.length)o.subHeaders.forEach(n);else{var i;t+=(i=o.column.getSize())!=null?i:0}};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=t=>{const n=l.getColumn(e.column.id),o=n==null?void 0:n.getCanResize();return i=>{if(!n||!o||(i.persist==null||i.persist(),X(i)&&i.touches&&i.touches.length>1))return;const r=e.getSize(),u=e?e.getLeafHeaders().map(S=>[S.column.id,S.column.getSize()]):[[n.id,n.getSize()]],s=X(i)?Math.round(i.touches[0].clientX):i.clientX,d={},c=(S,R)=>{typeof R=="number"&&(l.setColumnSizingInfo(b=>{var M,I;const G=l.options.columnResizeDirection==="rtl"?-1:1,De=(R-((M=b==null?void 0:b.startOffset)!=null?M:0))*G,Le=Math.max(De/((I=b==null?void 0:b.startSize)!=null?I:0),-.999999);return b.columnSizingStart.forEach(kt=>{let[qt,He]=kt;d[qt]=Math.round(Math.max(He+He*Le,0)*100)/100}),{...b,deltaOffset:De,deltaPercentage:Le}}),(l.options.columnResizeMode==="onChange"||S==="end")&&l.setColumnSizing(b=>({...b,...d})))},g=S=>c("move",S),p=S=>{c("end",S),l.setColumnSizingInfo(R=>({...R,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},a=t||typeof document<"u"?document:null,f={moveHandler:S=>g(S.clientX),upHandler:S=>{a==null||a.removeEventListener("mousemove",f.moveHandler),a==null||a.removeEventListener("mouseup",f.upHandler),p(S.clientX)}},m={moveHandler:S=>(S.cancelable&&(S.preventDefault(),S.stopPropagation()),g(S.touches[0].clientX),!1),upHandler:S=>{var R;a==null||a.removeEventListener("touchmove",m.moveHandler),a==null||a.removeEventListener("touchend",m.upHandler),S.cancelable&&(S.preventDefault(),S.stopPropagation()),p((R=S.touches[0])==null?void 0:R.clientX)}},C=ct()?{passive:!1}:!1;X(i)?(a==null||a.addEventListener("touchmove",m.moveHandler,C),a==null||a.addEventListener("touchend",m.upHandler,C)):(a==null||a.addEventListener("mousemove",f.moveHandler,C),a==null||a.addEventListener("mouseup",f.upHandler,C)),l.setColumnSizingInfo(S=>({...S,startOffset:s,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:u,isResizingColumn:n.id}))}}},createTable:e=>{e.setColumnSizing=l=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(l),e.setColumnSizingInfo=l=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(l),e.resetColumnSizing=l=>{var t;e.setColumnSizing(l?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=l=>{var t;e.setColumnSizingInfo(l?$():(t=e.initialState.columnSizingInfo)!=null?t:$())},e.getTotalSize=()=>{var l,t;return(l=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((n,o)=>n+o.getSize(),0))!=null?l:0},e.getLeftTotalSize=()=>{var l,t;return(l=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((n,o)=>n+o.getSize(),0))!=null?l:0},e.getCenterTotalSize=()=>{var l,t;return(l=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((n,o)=>n+o.getSize(),0))!=null?l:0},e.getRightTotalSize=()=>{var l,t;return(l=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((n,o)=>n+o.getSize(),0))!=null?l:0}}};let T=null;function ct(){if(typeof T=="boolean")return T;let e=!1;try{const l={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,l),window.removeEventListener("test",t)}catch{e=!1}return T=e,T}function X(e){return e.type==="touchstart"}const pt={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:F("columnVisibility",e)}),createColumn:(e,l)=>{e.toggleVisibility=t=>{e.getCanHide()&&l.setColumnVisibility(n=>({...n,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,n;const o=e.columns;return(t=o.length?o.some(i=>i.getIsVisible()):(n=l.getState().columnVisibility)==null?void 0:n[e.id])!=null?t:!0},e.getCanHide=()=>{var t,n;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((n=l.options.enableHiding)!=null?n:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,l)=>{e._getAllVisibleCells=w(()=>[e.getAllCells(),l.getState().columnVisibility],t=>t.filter(n=>n.column.getIsVisible()),h(l.options,"debugRows")),e.getVisibleCells=w(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,n,o)=>[...t,...n,...o],h(l.options,"debugRows"))},createTable:e=>{const l=(t,n)=>w(()=>[n(),n().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),h(e.options,"debugColumns"));e.getVisibleFlatColumns=l("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=l("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=l("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=l("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=l("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:(n=e.initialState.columnVisibility)!=null?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=(n=t)!=null?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:t||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible((n=t.target)==null?void 0:n.checked)}}};function A(e,l){return l?l==="center"?e.getCenterVisibleLeafColumns():l==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const ft={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},mt={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:F("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:l=>{var t;const n=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[l.id])==null?void 0:t.getValue();return typeof n=="string"||typeof n=="number"}}),createColumn:(e,l)=>{e.getCanGlobalFilter=()=>{var t,n,o,i;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((n=l.options.enableGlobalFilter)!=null?n:!0)&&((o=l.options.enableFilters)!=null?o:!0)&&((i=l.options.getColumnCanGlobalFilter==null?void 0:l.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>x.includesString,e.getGlobalFilterFn=()=>{var l,t;const{globalFilterFn:n}=e.options;return L(n)?n:n==="auto"?e.getGlobalAutoFilterFn():(l=(t=e.options.filterFns)==null?void 0:t[n])!=null?l:x[n]},e.setGlobalFilter=l=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(l)},e.resetGlobalFilter=l=>{e.setGlobalFilter(l?void 0:e.initialState.globalFilter)}}},wt={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:F("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let l=!1,t=!1;e._autoResetExpanded=()=>{var n,o;if(!l){e._queue(()=>{l=!0});return}if((n=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?n:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=n=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(n),e.toggleAllRowsExpanded=n=>{n??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=n=>{var o,i;e.setExpanded(n?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(n=>n.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>n=>{n.persist==null||n.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const n=e.getState().expanded;return n===!0||Object.values(n).some(Boolean)},e.getIsAllRowsExpanded=()=>{const n=e.getState().expanded;return typeof n=="boolean"?n===!0:!(!Object.keys(n).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let n=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const i=o.split(".");n=Math.max(n,i.length)}),n},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,l)=>{e.toggleExpanded=t=>{l.setExpanded(n=>{var o;const i=n===!0?!0:!!(n!=null&&n[e.id]);let r={};if(n===!0?Object.keys(l.getRowModel().rowsById).forEach(u=>{r[u]=!0}):r=n,t=(o=t)!=null?o:!i,!i&&t)return{...r,[e.id]:!0};if(i&&!t){const{[e.id]:u,...s}=r;return s}return n})},e.getIsExpanded=()=>{var t;const n=l.getState().expanded;return!!((t=l.options.getIsRowExpanded==null?void 0:l.options.getIsRowExpanded(e))!=null?t:n===!0||n!=null&&n[e.id])},e.getCanExpand=()=>{var t,n,o;return(t=l.options.getRowCanExpand==null?void 0:l.options.getRowCanExpand(e))!=null?t:((n=l.options.enableExpanding)!=null?n:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let t=!0,n=e;for(;t&&n.parentId;)n=l.getRow(n.parentId,!0),t=n.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},K=0,W=10,J=()=>({pageIndex:K,pageSize:W}),ht={getInitialState:e=>({...e,pagination:{...J(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:F("pagination",e)}),createTable:e=>{let l=!1,t=!1;e._autoResetPageIndex=()=>{var n,o;if(!l){e._queue(()=>{l=!0});return}if((n=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?n:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=n=>{const o=i=>P(n,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=n=>{var o;e.setPagination(n?J():(o=e.initialState.pagination)!=null?o:J())},e.setPageIndex=n=>{e.setPagination(o=>{let i=P(n,o.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,r)),{...o,pageIndex:i}})},e.resetPageIndex=n=>{var o,i;e.setPageIndex(n?K:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:K)},e.resetPageSize=n=>{var o,i;e.setPageSize(n?W:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:W)},e.setPageSize=n=>{e.setPagination(o=>{const i=Math.max(1,P(n,o.pageSize)),r=o.pageSize*o.pageIndex,u=Math.floor(r/i);return{...o,pageIndex:u,pageSize:i}})},e.setPageCount=n=>e.setPagination(o=>{var i;let r=P(n,(i=e.options.pageCount)!=null?i:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...o,pageCount:r}}),e.getPageOptions=w(()=>[e.getPageCount()],n=>{let o=[];return n&&n>0&&(o=[...new Array(n)].fill(null).map((i,r)=>r)),o},h(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:n}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:n<o-1},e.previousPage=()=>e.setPageIndex(n=>n-1),e.nextPage=()=>e.setPageIndex(n=>n+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var n;return(n=e.options.pageCount)!=null?n:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var n;return(n=e.options.rowCount)!=null?n:e.getPrePaginationRowModel().rows.length}}},Q=()=>({top:[],bottom:[]}),St={getInitialState:e=>({rowPinning:Q(),...e}),getDefaultOptions:e=>({onRowPinningChange:F("rowPinning",e)}),createRow:(e,l)=>{e.pin=(t,n,o)=>{const i=n?e.getLeafRows().map(s=>{let{id:d}=s;return d}):[],r=o?e.getParentRows().map(s=>{let{id:d}=s;return d}):[],u=new Set([...r,e.id,...i]);l.setRowPinning(s=>{var d,c;if(t==="bottom"){var g,p;return{top:((g=s==null?void 0:s.top)!=null?g:[]).filter(m=>!(u!=null&&u.has(m))),bottom:[...((p=s==null?void 0:s.bottom)!=null?p:[]).filter(m=>!(u!=null&&u.has(m))),...Array.from(u)]}}if(t==="top"){var a,f;return{top:[...((a=s==null?void 0:s.top)!=null?a:[]).filter(m=>!(u!=null&&u.has(m))),...Array.from(u)],bottom:((f=s==null?void 0:s.bottom)!=null?f:[]).filter(m=>!(u!=null&&u.has(m)))}}return{top:((d=s==null?void 0:s.top)!=null?d:[]).filter(m=>!(u!=null&&u.has(m))),bottom:((c=s==null?void 0:s.bottom)!=null?c:[]).filter(m=>!(u!=null&&u.has(m)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:n,enablePinning:o}=l.options;return typeof n=="function"?n(e):(t=n??o)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:n,bottom:o}=l.getState().rowPinning,i=t.some(u=>n==null?void 0:n.includes(u)),r=t.some(u=>o==null?void 0:o.includes(u));return i?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var t,n;const o=e.getIsPinned();if(!o)return-1;const i=(t=o==="top"?l.getTopRows():l.getBottomRows())==null?void 0:t.map(r=>{let{id:u}=r;return u});return(n=i==null?void 0:i.indexOf(e.id))!=null?n:-1}},createTable:e=>{e.setRowPinning=l=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(l),e.resetRowPinning=l=>{var t,n;return e.setRowPinning(l?Q():(t=(n=e.initialState)==null?void 0:n.rowPinning)!=null?t:Q())},e.getIsSomeRowsPinned=l=>{var t;const n=e.getState().rowPinning;if(!l){var o,i;return!!((o=n.top)!=null&&o.length||(i=n.bottom)!=null&&i.length)}return!!((t=n[l])!=null&&t.length)},e._getPinnedRows=(l,t,n)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(t??[]).map(i=>{const r=e.getRow(i,!0);return r.getIsAllParentsExpanded()?r:null}):(t??[]).map(i=>l.find(r=>r.id===i))).filter(Boolean).map(i=>({...i,position:n}))},e.getTopRows=w(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(l,t)=>e._getPinnedRows(l,t,"top"),h(e.options,"debugRows")),e.getBottomRows=w(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(l,t)=>e._getPinnedRows(l,t,"bottom"),h(e.options,"debugRows")),e.getCenterRows=w(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(l,t,n)=>{const o=new Set([...t??[],...n??[]]);return l.filter(i=>!o.has(i.id))},h(e.options,"debugRows"))}},Ct={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:F("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=l=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(l),e.resetRowSelection=l=>{var t;return e.setRowSelection(l?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=l=>{e.setRowSelection(t=>{l=typeof l<"u"?l:!e.getIsAllRowsSelected();const n={...t},o=e.getPreGroupedRowModel().flatRows;return l?o.forEach(i=>{i.getCanSelect()&&(n[i.id]=!0)}):o.forEach(i=>{delete n[i.id]}),n})},e.toggleAllPageRowsSelected=l=>e.setRowSelection(t=>{const n=typeof l<"u"?l:!e.getIsAllPageRowsSelected(),o={...t};return e.getRowModel().rows.forEach(i=>{Y(o,i.id,n,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=w(()=>[e.getState().rowSelection,e.getCoreRowModel()],(l,t)=>Object.keys(l).length?Z(e,t):{rows:[],flatRows:[],rowsById:{}},h(e.options,"debugTable")),e.getFilteredSelectedRowModel=w(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(l,t)=>Object.keys(l).length?Z(e,t):{rows:[],flatRows:[],rowsById:{}},h(e.options,"debugTable")),e.getGroupedSelectedRowModel=w(()=>[e.getState().rowSelection,e.getSortedRowModel()],(l,t)=>Object.keys(l).length?Z(e,t):{rows:[],flatRows:[],rowsById:{}},h(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const l=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let n=!!(l.length&&Object.keys(t).length);return n&&l.some(o=>o.getCanSelect()&&!t[o.id])&&(n=!1),n},e.getIsAllPageRowsSelected=()=>{const l=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:t}=e.getState();let n=!!l.length;return n&&l.some(o=>!t[o.id])&&(n=!1),n},e.getIsSomeRowsSelected=()=>{var l;const t=Object.keys((l=e.getState().rowSelection)!=null?l:{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const l=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:l.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>l=>{e.toggleAllRowsSelected(l.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>l=>{e.toggleAllPageRowsSelected(l.target.checked)}},createRow:(e,l)=>{e.toggleSelected=(t,n)=>{const o=e.getIsSelected();l.setRowSelection(i=>{var r;if(t=typeof t<"u"?t:!o,e.getCanSelect()&&o===t)return i;const u={...i};return Y(u,e.id,t,(r=n==null?void 0:n.selectChildren)!=null?r:!0,l),u})},e.getIsSelected=()=>{const{rowSelection:t}=l.getState();return ee(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=l.getState();return te(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=l.getState();return te(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof l.options.enableRowSelection=="function"?l.options.enableRowSelection(e):(t=l.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof l.options.enableSubRowSelection=="function"?l.options.enableSubRowSelection(e):(t=l.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof l.options.enableMultiRowSelection=="function"?l.options.enableMultiRowSelection(e):(t=l.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var o;t&&e.toggleSelected((o=n.target)==null?void 0:o.checked)}}}},Y=(e,l,t,n,o)=>{var i;const r=o.getRow(l,!0);t?(r.getCanMultiSelect()||Object.keys(e).forEach(u=>delete e[u]),r.getCanSelect()&&(e[l]=!0)):delete e[l],n&&(i=r.subRows)!=null&&i.length&&r.getCanSelectSubRows()&&r.subRows.forEach(u=>Y(e,u.id,t,n,o))};function Z(e,l){const t=e.getState().rowSelection,n=[],o={},i=function(r,u){return r.map(s=>{var d;const c=ee(s,t);if(c&&(n.push(s),o[s.id]=s),(d=s.subRows)!=null&&d.length&&(s={...s,subRows:i(s.subRows)}),c)return s}).filter(Boolean)};return{rows:i(l.rows),flatRows:n,rowsById:o}}function ee(e,l){var t;return(t=l[e.id])!=null?t:!1}function te(e,l,t){var n;if(!((n=e.subRows)!=null&&n.length))return!1;let o=!0,i=!1;return e.subRows.forEach(r=>{if(!(i&&!o)&&(r.getCanSelect()&&(ee(r,l)?i=!0:o=!1),r.subRows&&r.subRows.length)){const u=te(r,l);u==="all"?i=!0:(u==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const ne=/([0-9]+)/gm,bt=(e,l,t)=>ve(_(e.getValue(t)).toLowerCase(),_(l.getValue(t)).toLowerCase()),Rt=(e,l,t)=>ve(_(e.getValue(t)),_(l.getValue(t))),vt=(e,l,t)=>le(_(e.getValue(t)).toLowerCase(),_(l.getValue(t)).toLowerCase()),Ft=(e,l,t)=>le(_(e.getValue(t)),_(l.getValue(t))),Mt=(e,l,t)=>{const n=e.getValue(t),o=l.getValue(t);return n>o?1:n<o?-1:0},Vt=(e,l,t)=>le(e.getValue(t),l.getValue(t));function le(e,l){return e===l?0:e>l?1:-1}function _(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function ve(e,l){const t=e.split(ne).filter(Boolean),n=l.split(ne).filter(Boolean);for(;t.length&&n.length;){const o=t.shift(),i=n.shift(),r=parseInt(o,10),u=parseInt(i,10),s=[r,u].sort();if(isNaN(s[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(s[1]))return isNaN(r)?-1:1;if(r>u)return 1;if(u>r)return-1}return t.length-n.length}const z={alphanumeric:bt,alphanumericCaseSensitive:Rt,text:vt,textCaseSensitive:Ft,datetime:Mt,basic:Vt},It={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:F("sorting",e),isMultiSortEvent:l=>l.shiftKey}),createColumn:(e,l)=>{e.getAutoSortingFn=()=>{const t=l.getFilteredRowModel().flatRows.slice(10);let n=!1;for(const o of t){const i=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return z.datetime;if(typeof i=="string"&&(n=!0,i.split(ne).length>1))return z.alphanumeric}return n?z.text:z.basic},e.getAutoSortDir=()=>{const t=l.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,n;if(!e)throw new Error;return L(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(n=l.options.sortingFns)==null?void 0:n[e.columnDef.sortingFn])!=null?t:z[e.columnDef.sortingFn]},e.toggleSorting=(t,n)=>{const o=e.getNextSortingOrder(),i=typeof t<"u"&&t!==null;l.setSorting(r=>{const u=r==null?void 0:r.find(a=>a.id===e.id),s=r==null?void 0:r.findIndex(a=>a.id===e.id);let d=[],c,g=i?t:o==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&n?u?c="toggle":c="add":r!=null&&r.length&&s!==r.length-1?c="replace":u?c="toggle":c="replace",c==="toggle"&&(i||o||(c="remove")),c==="add"){var p;d=[...r,{id:e.id,desc:g}],d.splice(0,d.length-((p=l.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else c==="toggle"?d=r.map(a=>a.id===e.id?{...a,desc:g}:a):c==="remove"?d=r.filter(a=>a.id!==e.id):d=[{id:e.id,desc:g}];return d})},e.getFirstSortDir=()=>{var t,n;return((t=(n=e.columnDef.sortDescFirst)!=null?n:l.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var n,o;const i=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==i&&((n=l.options.enableSortingRemoval)==null||n)&&(!(t&&(o=l.options.enableMultiRemove)!=null)||o)?!1:r==="desc"?"asc":"desc":i},e.getCanSort=()=>{var t,n;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((n=l.options.enableSorting)!=null?n:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,n;return(t=(n=e.columnDef.enableMultiSort)!=null?n:l.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const n=(t=l.getState().sorting)==null?void 0:t.find(o=>o.id===e.id);return n?n.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,n;return(t=(n=l.getState().sorting)==null?void 0:n.findIndex(o=>o.id===e.id))!=null?t:-1},e.clearSorting=()=>{l.setSorting(t=>t!=null&&t.length?t.filter(n=>n.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return n=>{t&&(n.persist==null||n.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?l.options.isMultiSortEvent==null?void 0:l.options.isMultiSortEvent(n):!1))}}},createTable:e=>{e.setSorting=l=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(l),e.resetSorting=l=>{var t,n;e.setSorting(l?[]:(t=(n=e.initialState)==null?void 0:n.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Pt=[We,pt,st,gt,Je,Qe,ft,mt,It,at,wt,ht,St,Ct,dt];function xt(e){var l,t;const n=[...Pt,...(l=e._features)!=null?l:[]];let o={_features:n};const i=o._features.reduce((g,p)=>Object.assign(g,p.getDefaultOptions==null?void 0:p.getDefaultOptions(o)),{}),r=g=>o.options.mergeOptions?o.options.mergeOptions(i,g):{...i,...g};let u={...(t=e.initialState)!=null?t:{}};o._features.forEach(g=>{var p;u=(p=g.getInitialState==null?void 0:g.getInitialState(u))!=null?p:u});const s=[];let d=!1;const c={_features:n,options:{...i,...e},initialState:u,_queue:g=>{s.push(g),d||(d=!0,Promise.resolve().then(()=>{for(;s.length;)s.shift()();d=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{o.setState(o.initialState)},setOptions:g=>{const p=P(g,o.options);o.options=r(p)},getState:()=>o.options.state,setState:g=>{o.options.onStateChange==null||o.options.onStateChange(g)},_getRowId:(g,p,a)=>{var f;return(f=o.options.getRowId==null?void 0:o.options.getRowId(g,p,a))!=null?f:`${a?[a.id,p].join("."):p}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(g,p)=>{let a=(p?o.getPrePaginationRowModel():o.getRowModel()).rowsById[g];if(!a&&(a=o.getCoreRowModel().rowsById[g],!a))throw new Error;return a},_getDefaultColumnDef:w(()=>[o.options.defaultColumn],g=>{var p;return g=(p=g)!=null?p:{},{header:a=>{const f=a.header.column.columnDef;return f.accessorKey?f.accessorKey:f.accessorFn?f.id:null},cell:a=>{var f,m;return(f=(m=a.renderValue())==null||m.toString==null?void 0:m.toString())!=null?f:null},...o._features.reduce((a,f)=>Object.assign(a,f.getDefaultColumnDef==null?void 0:f.getDefaultColumnDef()),{}),...g}},h(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:w(()=>[o._getColumnDefs()],g=>{const p=function(a,f,m){return m===void 0&&(m=0),a.map(C=>{const S=Ke(o,C,m,f),R=C;return S.columns=R.columns?p(R.columns,S,m+1):[],S})};return p(g)},h(e,"debugColumns")),getAllFlatColumns:w(()=>[o.getAllColumns()],g=>g.flatMap(p=>p.getFlatColumns()),h(e,"debugColumns")),_getAllFlatColumnsById:w(()=>[o.getAllFlatColumns()],g=>g.reduce((p,a)=>(p[a.id]=a,p),{}),h(e,"debugColumns")),getAllLeafColumns:w(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(g,p)=>{let a=g.flatMap(f=>f.getLeafColumns());return p(a)},h(e,"debugColumns")),getColumn:g=>o._getAllFlatColumnsById()[g]};Object.assign(o,c);for(let g=0;g<o._features.length;g++){const p=o._features[g];p==null||p.createTable==null||p.createTable(o)}return o}Ne=function(){return e=>w(()=>[e.options.data],l=>{const t={rows:[],flatRows:[],rowsById:{}},n=function(o,i,r){i===void 0&&(i=0);const u=[];for(let d=0;d<o.length;d++){const c=q(e,e._getRowId(o[d],d,r),o[d],d,i,void 0,r==null?void 0:r.id);if(t.flatRows.push(c),t.rowsById[c.id]=c,u.push(c),e.options.getSubRows){var s;c.originalSubRows=e.options.getSubRows(o[d],d),(s=c.originalSubRows)!=null&&s.length&&(c.subRows=n(c.originalSubRows,i+1,c))}}return u};return t.rows=n(l),t},h(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))},qe=function(){return e=>w(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(l,t,n)=>!t.rows.length||l!==!0&&!Object.keys(l??{}).length||!n?t:Fe(t),h(e.options,"debugTable"))};function Fe(e){const l=[],t=n=>{var o;l.push(n),(o=n.subRows)!=null&&o.length&&n.getIsExpanded()&&n.subRows.forEach(t)};return e.rows.forEach(t),{rows:l,flatRows:e.flatRows,rowsById:e.rowsById}}function _t(e,l,t){return t.options.filterFromLeafRows?yt(e,l,t):Et(e,l,t)}function yt(e,l,t){var n;const o=[],i={},r=(n=t.options.maxLeafRowFilterDepth)!=null?n:100,u=function(s,d){d===void 0&&(d=0);const c=[];for(let p=0;p<s.length;p++){var g;let a=s[p];const f=q(t,a.id,a.original,a.index,a.depth,void 0,a.parentId);if(f.columnFilters=a.columnFilters,(g=a.subRows)!=null&&g.length&&d<r){if(f.subRows=u(a.subRows,d+1),a=f,l(a)&&!f.subRows.length){c.push(a),i[a.id]=a,o.push(a);continue}if(l(a)||f.subRows.length){c.push(a),i[a.id]=a,o.push(a);continue}}else a=f,l(a)&&(c.push(a),i[a.id]=a,o.push(a))}return c};return{rows:u(e),flatRows:o,rowsById:i}}function Et(e,l,t){var n;const o=[],i={},r=(n=t.options.maxLeafRowFilterDepth)!=null?n:100,u=function(s,d){d===void 0&&(d=0);const c=[];for(let p=0;p<s.length;p++){let a=s[p];if(l(a)){var g;if((g=a.subRows)!=null&&g.length&&d<r){const f=q(t,a.id,a.original,a.index,a.depth,void 0,a.parentId);f.subRows=u(a.subRows,d+1),a=f}c.push(a),o.push(a),i[a.id]=a}}return c};return{rows:u(e),flatRows:o,rowsById:i}}Be=function(){return e=>w(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(l,t,n)=>{if(!l.rows.length||!(t!=null&&t.length)&&!n){for(let p=0;p<l.flatRows.length;p++)l.flatRows[p].columnFilters={},l.flatRows[p].columnFiltersMeta={};return l}const o=[],i=[];(t??[]).forEach(p=>{var a;const f=e.getColumn(p.id);if(!f)return;const m=f.getFilterFn();m&&o.push({id:p.id,filterFn:m,resolvedValue:(a=m.resolveFilterValue==null?void 0:m.resolveFilterValue(p.value))!=null?a:p.value})});const r=(t??[]).map(p=>p.id),u=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter(p=>p.getCanGlobalFilter());n&&u&&s.length&&(r.push("__global__"),s.forEach(p=>{var a;i.push({id:p.id,filterFn:u,resolvedValue:(a=u.resolveFilterValue==null?void 0:u.resolveFilterValue(n))!=null?a:n})}));let d,c;for(let p=0;p<l.flatRows.length;p++){const a=l.flatRows[p];if(a.columnFilters={},o.length)for(let f=0;f<o.length;f++){d=o[f];const m=d.id;a.columnFilters[m]=d.filterFn(a,m,d.resolvedValue,C=>{a.columnFiltersMeta[m]=C})}if(i.length){for(let f=0;f<i.length;f++){c=i[f];const m=c.id;if(c.filterFn(a,m,c.resolvedValue,C=>{a.columnFiltersMeta[m]=C})){a.columnFilters.__global__=!0;break}}a.columnFilters.__global__!==!0&&(a.columnFilters.__global__=!1)}}const g=p=>{for(let a=0;a<r.length;a++)if(p.columnFilters[r[a]]===!1)return!1;return!0};return _t(l.rows,g,e)},h(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))},ke=function(e){return l=>w(()=>[l.getState().pagination,l.getPrePaginationRowModel(),l.options.paginateExpandedRows?void 0:l.getState().expanded],(t,n)=>{if(!n.rows.length)return n;const{pageSize:o,pageIndex:i}=t;let{rows:r,flatRows:u,rowsById:s}=n;const d=o*i,c=d+o;r=r.slice(d,c);let g;l.options.paginateExpandedRows?g={rows:r,flatRows:u,rowsById:s}:g=Fe({rows:r,flatRows:u,rowsById:s}),g.flatRows=[];const p=a=>{g.flatRows.push(a),a.subRows.length&&a.subRows.forEach(p)};return g.rows.forEach(p),g},h(l.options,"debugTable"))},Te=function(){return e=>w(()=>[e.getState().sorting,e.getPreSortedRowModel()],(l,t)=>{if(!t.rows.length||!(l!=null&&l.length))return t;const n=e.getState().sorting,o=[],i=n.filter(s=>{var d;return(d=e.getColumn(s.id))==null?void 0:d.getCanSort()}),r={};i.forEach(s=>{const d=e.getColumn(s.id);d&&(r[s.id]={sortUndefined:d.columnDef.sortUndefined,invertSorting:d.columnDef.invertSorting,sortingFn:d.getSortingFn()})});const u=s=>{const d=s.map(c=>({...c}));return d.sort((c,g)=>{for(let a=0;a<i.length;a+=1){var p;const f=i[a],m=r[f.id],C=m.sortUndefined,S=(p=f==null?void 0:f.desc)!=null?p:!1;let R=0;if(C){const b=c.getValue(f.id),M=g.getValue(f.id),I=b===void 0,G=M===void 0;if(I||G){if(C==="first")return I?-1:1;if(C==="last")return I?1:-1;R=I&&G?0:I?C:-C}}if(R===0&&(R=m.sortingFn(c,g,f.id)),R!==0)return S&&(R*=-1),m.invertSorting&&(R*=-1),R}return c.index-g.index}),d.forEach(c=>{var g;o.push(c),(g=c.subRows)!=null&&g.length&&(c.subRows=u(c.subRows))}),d};return{rows:u(t.rows),flatRows:o,rowsById:t.rowsById}},h(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))};const{defineComponent:Gt,h:At,isRef:zt,watch:Dt,unref:Me,ref:Lt,watchEffect:Ht}=await k("vue");function B(){return!0}const Ot=Symbol("merge-proxy"),Tt={get(e,l,t){return l===Ot?t:e.get(l)},has(e,l){return e.has(l)},set:B,deleteProperty:B,getOwnPropertyDescriptor(e,l){return{configurable:!0,enumerable:!0,get(){return e.get(l)},set:B,deleteProperty:B}},ownKeys(e){return e.keys()}};function oe(e){return"value"in e?e.value:e}function D(){for(var e=arguments.length,l=new Array(e),t=0;t<e;t++)l[t]=arguments[t];return new Proxy({get(n){for(let o=l.length-1;o>=0;o--){const i=oe(l[o])[n];if(i!==void 0)return i}},has(n){for(let o=l.length-1;o>=0;o--)if(n in oe(l[o]))return!0;return!1},keys(){const n=[];for(let o=0;o<l.length;o++)n.push(...Object.keys(oe(l[o])));return[...Array.from(new Set(n))]}},Tt)}de=Gt({props:["render","props"],setup:e=>()=>typeof e.render=="function"||typeof e.render=="object"?At(e.render,e.props):e.render});function Ve(e){return D(e,{data:Me(e.data)})}je=function(e){const l=D({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(o,i){return D(o,i)}},Ve(e)),t=xt(l);zt(e.data)&&Dt(e.data,()=>{t.setState(o=>({...o,data:Me(e.data)}))},{immediate:!0,deep:!0});const n=Lt(t.initialState);return Ht(()=>{t.setOptions(o=>{var i;const r=new Proxy({},{get:(u,s)=>n.value[s]});return D(o,Ve(e),{state:D(r,(i=e.state)!=null?i:{}),onStateChange:u=>{u instanceof Function?n.value=u(n.value):n.value=u,e.onStateChange==null||e.onStateChange(u)}})})}),t};let Ie,ie,re,y,E,Pe,ae,ue,xe,se,_e,ye,Ee,Ge,ge,Ae,Bt,ze;({defineComponent:Ie}=await k("vue")),{renderList:ie,Fragment:re,openBlock:y,createElementBlock:E,unref:Pe,createBlock:ae,createCommentVNode:ue,resolveComponent:xe,normalizeClass:se,createElementVNode:_e,normalizeStyle:ye}=await k("vue"),Ee=["colSpan","onClick"],{ref:Ge,onMounted:ge,onUnmounted:Ae,warn:Bt,watch:ze}=await k("vue"),Oe=Ie({__name:"FmTableHeader",props:{table:{}},emits:["update:column-widths"],setup(e,{emit:l}){const t=l,n=e,o=Ge(new Map);function i(u){return u.column.columnDef.meta}function r(){const u=Array.from(o.value.values()).map(s=>s.offsetWidth);t("update:column-widths",u)}return ge(()=>{r()}),ge(()=>{window.addEventListener("resize",r),Ae(()=>window.removeEventListener("resize",r))}),ze(()=>n.table.getHeaderGroups(),()=>{r()}),(u,s)=>{const d=xe("FmIcon");return y(),E("thead",null,[(y(!0),E(re,null,ie(u.table.getHeaderGroups(),c=>(y(),E("tr",{key:c.id},[(y(!0),E(re,null,ie(c.headers,g=>{var p,a,f,m,C,S,R;return y(),E("th",{key:g.id,ref_for:!0,ref:b=>b&&o.value.set(g.id,b),class:se(["fm-typo-en-body-md-600 text-fm-color-typo-secondary border-b border-fm-color-neutral-gray-100 h-24",g.column.getCanSort()?"cursor-pointer select-none hover:bg-fm-color-opacity-sm":"",((p=i(g))==null?void 0:p.headerClass)??"px-16 py-[13px]"]),colSpan:g.colSpan,style:ye({width:(a=g.column.columnDef.meta)!=null&&a.width?(f=g.column.columnDef.meta)==null?void 0:f.width:g.column.getSize()!==0?`${g.column.getSize()}px`:(m=i(g))==null?void 0:m.width,maxWidth:(C=i(g))==null?void 0:C.maxWidth,textAlign:((S=i(g))==null?void 0:S.textAlign)??"left"}),onClick:b=>{var M;return(M=g.column.getToggleSortingHandler())==null?void 0:M(b)}},[_e("div",{class:se([((R=i(g))==null?void 0:R.headerContentClass)??"flex gap-8 items-center"])},[g.isPlaceholder?ue("",!0):(y(),ae(Pe(de),{key:0,props:g.getContext(),render:g.column.columnDef.header},null,8,["props","render"])),g.column.getCanSort()?(y(),ae(d,{key:1,name:{asc:"arrow_upward",desc:"arrow_downward"}[g.column.getIsSorted()]??"unfold_more",color:"neutral-gray-400",size:"sm"},null,8,["name"])):ue("",!0)],2)],14,Ee)}),128))]))),128))])}}})});export{de as F,Oe as _,jt as __tla,Te as a,Be as b,ke as c,qe as d,Ne as g,je as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,__tla as a}from"./FmTable.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as t,__tla as a}from"./FmTable.vue_vue_type_script_setup_true_lang-DEmdzYu6.js";let _=Promise.all([(()=>{try{return a}catch{}})()]).then(async()=>{});export{_ as __tla,t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,__tla as a}from"./FmTableHeader.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as t,__tla as a}from"./FmTableHeader.vue_vue_type_script_setup_true_lang-2LwfENRk.js";let _=Promise.all([(()=>{try{return a}catch{}})()]).then(async()=>{});export{_ as __tla,t as default};
|