@wisemen/vue-core-custom-views 0.1.0
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/LICENSE.md +59 -0
- package/dist/actions/customViewCreateView.action.d.ts +1 -0
- package/dist/actions/customViewDeleteView.action.d.ts +1 -0
- package/dist/actions/customViewEditView.action.d.ts +1 -0
- package/dist/actions/customViewSaveToCurrentView.action.d.ts +1 -0
- package/dist/adapters/state/customViewFilterStateAdapter.d.ts +2 -0
- package/dist/adapters/state/customViewSearchStateAdapter.d.ts +2 -0
- package/dist/adapters/state/customViewTableColumnsStateAdapter.d.ts +2 -0
- package/dist/adapters/storage/customViewLocalStorageAdapter.d.ts +2 -0
- package/dist/components/CustomViewColorPicker.d.ts +7 -0
- package/dist/components/CustomViewCreateDialog.d.ts +7 -0
- package/dist/components/CustomViewIconPicker.d.ts +7 -0
- package/dist/components/CustomViewUpdateDialog.d.ts +10 -0
- package/dist/components/views/CustomViewViews.d.ts +2 -0
- package/dist/components/views/CustomViewViewsItem.d.ts +12 -0
- package/dist/composables/context.composable.d.ts +8 -0
- package/dist/composables/customViewManager.composable.d.ts +22 -0
- package/dist/context/customViewManager.context.d.ts +5 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +2063 -0
- package/dist/locales/en-US.json.d.ts +27 -0
- package/dist/locales/nl-BE.json.d.ts +27 -0
- package/dist/locales.cjs +1 -0
- package/dist/locales.d.ts +50 -0
- package/dist/locales.js +54 -0
- package/dist/style.css +2 -0
- package/dist/types/customView.type.d.ts +20 -0
- package/dist/types/customViewColor.type.d.ts +10 -0
- package/dist/types/customViewIcon.type.d.ts +38 -0
- package/dist/types/customViewStateAdapter.type.d.ts +13 -0
- package/dist/types/customViewStorageAdapter.type.d.ts +5 -0
- package/dist/utils/customViewColor.util.d.ts +3 -0
- package/dist/utils/customViewIcon.util.d.ts +4 -0
- package/package.json +103 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# PolyForm Strict License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/strict/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
8
|
+
|
|
9
|
+
## Copyright License
|
|
10
|
+
|
|
11
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose, other than distributing the software or making changes or new works based on the software.
|
|
12
|
+
|
|
13
|
+
## Patent License
|
|
14
|
+
|
|
15
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
16
|
+
|
|
17
|
+
## Noncommercial Purposes
|
|
18
|
+
|
|
19
|
+
Any noncommercial purpose is a permitted purpose.
|
|
20
|
+
|
|
21
|
+
## Personal Uses
|
|
22
|
+
|
|
23
|
+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
24
|
+
|
|
25
|
+
## Noncommercial Organizations
|
|
26
|
+
|
|
27
|
+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
28
|
+
|
|
29
|
+
## Fair Use
|
|
30
|
+
|
|
31
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
32
|
+
|
|
33
|
+
## No Other Rights
|
|
34
|
+
|
|
35
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
36
|
+
|
|
37
|
+
## Patent Defense
|
|
38
|
+
|
|
39
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
40
|
+
|
|
41
|
+
## Violations
|
|
42
|
+
|
|
43
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
44
|
+
|
|
45
|
+
## No Liability
|
|
46
|
+
|
|
47
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
48
|
+
|
|
49
|
+
## Definitions
|
|
50
|
+
|
|
51
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
52
|
+
|
|
53
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
54
|
+
|
|
55
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
56
|
+
|
|
57
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
58
|
+
|
|
59
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useCustomViewCreateViewAction(): import('@wisemen/vue-core-actions').Action<import('@wisemen/vue-core-actions').ActionContext<Record<string, import('@wisemen/vue-core-actions').ActionModel>, any[], any>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useCustomViewDeleteViewAction(): import('@wisemen/vue-core-actions').Action<import('@wisemen/vue-core-actions').ActionContext<Record<string, import('@wisemen/vue-core-actions').ActionModel>, any[], any>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useCustomViewEditViewAction(): import('@wisemen/vue-core-actions').Action<import('@wisemen/vue-core-actions').ActionContext<Record<string, import('@wisemen/vue-core-actions').ActionModel>, any[], any>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useCustomViewSaveToCurrentViewAction(): import('@wisemen/vue-core-actions').Action<import('@wisemen/vue-core-actions').ActionContext<Record<string, import('@wisemen/vue-core-actions').ActionModel>, any[], any>>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Filter, FilterValues, useFilters } from '@wisemen/vue-core-filters';
|
|
2
|
+
export declare function createCustomViewFilterStateAdapter<TFilters extends Filter[]>(filters: ReturnType<typeof useFilters<TFilters>>, defaultFilterValues: FilterValues<TFilters>): import('../../types/customViewStateAdapter.type').CustomViewStateAdapter<"filters", FilterValues<TFilters>>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { useTableCustomizeColumns } from '@wisemen/vue-core-design-system';
|
|
2
|
+
export declare function createCustomViewTableColumnsStateAdapter<T, TKey extends string>(customizeColumns: ReturnType<typeof useTableCustomizeColumns<T, TKey>>): import('../../types/customViewStateAdapter.type').CustomViewStateAdapter<"columns", TKey[]>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Field } from 'formango';
|
|
2
|
+
import { CustomViewColor } from '../types/customViewColor.type';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
field: Field<CustomViewColor, CustomViewColor> | Field<CustomViewColor>;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CreateCustomViewMeta } from '../types/customView.type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
+
save: (values: CreateCustomViewMeta) => any;
|
|
4
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
5
|
+
onSave?: ((values: CreateCustomViewMeta) => any) | undefined;
|
|
6
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Field } from 'formango';
|
|
2
|
+
import { CustomViewIcon } from '../types/customViewIcon.type';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
field: Field<CustomViewIcon, CustomViewIcon>;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CustomView, UpdateCustomViewMeta } from '../types/customView.type';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
view: CustomView;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
save: (values: UpdateCustomViewMeta) => any;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onSave?: ((values: UpdateCustomViewMeta) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CustomView } from '../../types/customView.type';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
isSelected: boolean;
|
|
4
|
+
view: CustomView;
|
|
5
|
+
viewIndex: number;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
select: (viewId: string) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onSelect?: ((viewId: string) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
export declare function useContext<TContext>(contextName: string): readonly [(context: TContext) => TContext, <TFallback extends TContext | null = TContext>(fallback?: TFallback) => TFallback extends null ? TContext | null : TContext];
|
|
3
|
+
type IsFunction<T> = T extends (...args: any[]) => any ? true : false;
|
|
4
|
+
export type PropsToComputed<T> = {
|
|
5
|
+
[K in keyof Required<T>]: IsFunction<Exclude<T[K], undefined>> extends true ? T[K] : ComputedRef<Exclude<T[K], undefined>>;
|
|
6
|
+
};
|
|
7
|
+
export declare function toComputedRefs<T>(props: T): PropsToComputed<T>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ActionGroup } from '@wisemen/vue-core-actions';
|
|
2
|
+
import { CreateCustomViewMeta, CustomView, UpdateCustomViewMeta } from '../types/customView.type';
|
|
3
|
+
import { AdaptersToState, CustomViewStateAdapter } from '../types/customViewStateAdapter.type';
|
|
4
|
+
import { CustomViewStorageAdapter } from '../types/customViewStorageAdapter.type';
|
|
5
|
+
interface Options<TAdapters extends CustomViewStateAdapter<string, any>[]> {
|
|
6
|
+
seedViews: CustomView<AdaptersToState<TAdapters>>[];
|
|
7
|
+
state: TAdapters;
|
|
8
|
+
storageAdapter: CustomViewStorageAdapter;
|
|
9
|
+
}
|
|
10
|
+
export declare function useCustomViewManager<TAdapters extends CustomViewStateAdapter<string, any>[]>({ seedViews, state, storageAdapter, }: Options<TAdapters>): {
|
|
11
|
+
isDirty: import('vue').ComputedRef<boolean>;
|
|
12
|
+
actionGroup: ActionGroup<any>;
|
|
13
|
+
activeView: import('vue').ComputedRef<CustomView<AdaptersToState<TAdapters>>>;
|
|
14
|
+
createView: (viewMeta: CreateCustomViewMeta) => void;
|
|
15
|
+
deleteView: (viewId: string) => void;
|
|
16
|
+
reorderViews: (orderedViews: CustomView<AdaptersToState<TAdapters>>[]) => void;
|
|
17
|
+
saveToCurrentView: () => void;
|
|
18
|
+
setActiveView: (viewId: string) => void;
|
|
19
|
+
updateViewMeta: (viewId: string, meta: UpdateCustomViewMeta) => void;
|
|
20
|
+
views: import('vue').ComputedRef<CustomView<AdaptersToState<TAdapters>>[]>;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { useCustomViewManager } from '../composables/customViewManager.composable';
|
|
2
|
+
interface CustomViewManagerContext extends ReturnType<typeof useCustomViewManager> {
|
|
3
|
+
}
|
|
4
|
+
export declare const useProvideCustomViewManagerContext: (context: CustomViewManagerContext) => CustomViewManagerContext, useInjectCustomViewManagerContext: <TFallback extends CustomViewManagerContext | null = CustomViewManagerContext>(fallback?: TFallback | undefined) => TFallback extends null ? CustomViewManagerContext | null : CustomViewManagerContext;
|
|
5
|
+
export {};
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("temporal-polyfill"),l=require("@vueuse/core"),u=require("vue"),d=require("@wisemen/vue-core-design-system"),f=require("@wisemen/vue-core-icons"),p=require("reka-ui"),m=require("vue-i18n"),h=require("formango"),g=require("zod");g=s(g,1);let _=require("@wisemen/vue-core-actions"),v=require("@tanstack/vue-hotkeys"),y=require("@vueuse/router"),b=require("@wisemen/vue-core-utils");function x(e){return e}function S(e){return typeof e!=`object`||!e?!1:`from`in e&&`until`in e}function ee(e){return S(e)?{from:e.from?.toString()??null,until:e.until?.toString()??null}:e}function C(e){return S(e)?{from:typeof e.from==`string`?c.Temporal.PlainDate.from(e.from):null,until:typeof e.until==`string`?c.Temporal.PlainDate.from(e.until):null}:e}function w(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,ee(t)]))}function te(e,t){return x({isDirty:(e,n)=>{let r=w(e??t),i=w(n);return Object.keys(r).some(e=>JSON.stringify(i[e])!==JSON.stringify(r[e]))},apply:n=>{e.values.value={...t,...n}},deserialize:e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,C(t)])),getCurrentState:()=>e.values.value,getDefaultState:()=>({...t}),key:`filters`,serialize:e=>w(e)})}function ne(e){return x({isDirty:(e,t)=>(e??``).trim()!==t.trim(),apply:t=>e.updateSearch(t??``,!0),deserialize:e=>e,getCurrentState:()=>e.search.value,getDefaultState:()=>``,key:`search`,serialize:e=>e})}function T(e){let t=e.customizedColumns.value.map(e=>e.key);return x({isDirty:(e,n)=>JSON.stringify(e??t)!==JSON.stringify(n),apply:n=>{e.setState(n??t)},deserialize:e=>[...e],getCurrentState:()=>e.customizedColumns.value.map(e=>e.key),getDefaultState:()=>t,key:`columns`,serialize:e=>e})}function re(e){let t=(0,l.useLocalStorage)(e,[],{deep:!0});return{load:()=>{try{return t.value??[]}catch{return[]}},save:e=>{t.value=e}}}var E={CYAN:`cyan`,DEFAULT:`default`,GREEN:`green`,PINK:`pink`,PURPLE:`purple`,RED:`red`,YELLOW:`yellow`},ie=new Map([[E.DEFAULT,`var(--fg-secondary)`],[E.PURPLE,`oklch(0.44 0.17 287)`],[E.CYAN,`oklch(0.71 0.12 213)`],[E.GREEN,`oklch(0.70 0.13 159)`],[E.YELLOW,`oklch(0.82 0.18 91)`],[E.PINK,`oklch(0.87 0.05 22)`],[E.RED,`oklch(0.58 0.19 25)`]]);function ae(e){return ie.get(e)??`var(--fg-secondary)`}var oe=(0,u.defineComponent)({__name:`CustomViewColorPicker`,props:{field:{}},setup(e){let t=e,n=(0,m.useI18n)(),r=(0,p.useId)();return(i,a)=>((0,u.openBlock)(),(0,u.createBlock)((0,u.unref)(d.UIInputWrapper),{for:(0,u.unref)(r),label:(0,u.unref)(n).t(`component.custom_view_color_picker.label`)},{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(p.RadioGroupRoot),{id:(0,u.unref)(r),"model-value":t.field.value.value,"onUpdate:modelValue":a[0]||=t=>e.field.setValue(t)},{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UIRowLayout),{class:`flex-wrap`},{default:(0,u.withCtx)(()=>[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)((0,u.unref)(ie),([e])=>((0,u.openBlock)(),(0,u.createBlock)((0,u.unref)(d.UIClickableElement),{key:e},{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(p.RadioGroupItem),{value:e,style:(0,u.normalizeStyle)({backgroundColor:(0,u.unref)(ae)(e)}),class:`flex size-6.5 items-center justify-center rounded-md! ring-offset-1`},{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(p.RadioGroupIndicator),null,{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(f.CheckIcon),{class:`size-4 text-white dark:text-black`})]),_:1})]),_:1},8,[`value`,`style`])]),_:2},1024))),128))]),_:1})]),_:1},8,[`id`,`model-value`])]),_:1},8,[`for`,`label`]))}}),D={ACTIVITY:`activity`,ALERT_TRIANGLE:`alertTriangle`,BOOKMARK:`bookmark`,CALENDAR:`calendar`,CHECK_CIRCLE:`checkCircle`,CHECK_SQUARE:`checkSquare`,CLOCK:`clock`,CLOCK_REWIND:`clockRewind`,CUBE:`cube`,DATABASE:`database`,EDIT:`edit`,FLAG:`flag`,HEART:`heart`,HOME:`home`,HOURGLASS:`hourglass`,INFO_SQUARE:`infoSquare`,LAYERS:`layers`,LINK_04:`link04`,LOCK:`lock`,MAGIC_WAND:`magicWand`,MAIL_01:`mail01`,MAIL_04:`mail04`,MARKER_PIN:`markerPin`,PIN:`pin`,PLACEHOLDER:`placeholder`,PLANE:`plane`,ROUTE:`route`,STAR:`star`,STARS:`stars`,TRASH:`trash`,TREND_DOWN:`trendDown`,TREND_UP:`trendUp`,UNLOCK:`unlock`,USER:`user`,ZAP:`zap`},se=new Map([[D.LAYERS,f.LayersTwo01Icon],[D.ACTIVITY,f.ActivityIcon],[D.ALERT_TRIANGLE,f.AlertTriangleIcon],[D.BOOKMARK,f.BookmarkIcon],[D.CALENDAR,f.CalendarIcon],[D.CHECK_CIRCLE,f.CheckCircleIcon],[D.CHECK_SQUARE,f.CheckSquareIcon],[D.CLOCK,f.ClockIcon],[D.CLOCK_REWIND,f.ClockRewindIcon],[D.CUBE,f.Cube01Icon],[D.DATABASE,f.Database01Icon],[D.EDIT,f.Edit01Icon],[D.FLAG,f.Flag01Icon],[D.HEART,f.HeartIcon],[D.HOME,f.Home01Icon],[D.HOURGLASS,f.Hourglass01Icon],[D.INFO_SQUARE,f.InfoSquareIcon],[D.LINK_04,f.Link04Icon],[D.LOCK,f.Lock01Icon],[D.MAGIC_WAND,f.MagicWand01Icon],[D.MAIL_01,f.Mail01Icon],[D.MAIL_04,f.Mail04Icon],[D.MARKER_PIN,f.MarkerPin01Icon],[D.UNLOCK,f.LockUnlocked01Icon],[D.PLANE,f.PlaneIcon],[D.PIN,f.Pin01Icon],[D.PLACEHOLDER,f.PlaceholderIcon],[D.ROUTE,f.RouteIcon],[D.STAR,f.Star01Icon],[D.STARS,f.Stars01Icon],[D.TRASH,f.Trash01Icon],[D.TREND_DOWN,f.TrendDown01Icon],[D.TREND_UP,f.TrendUp01Icon],[D.USER,f.User01Icon],[D.ZAP,f.ZapIcon]]);function ce(e){return se.get(e)??f.LayersTwo01Icon}var le={class:`p-sm`},ue={class:`grid grid-cols-8 gap-xxs`},de=[`onClick`],fe=(0,u.defineComponent)({__name:`CustomViewIconPicker`,props:{field:{}},setup(e){let t=e,n=(0,m.useI18n)(),r=(0,u.ref)(!1);function i(e){t.field.setValue(e),r.value=!1}return(e,a)=>((0,u.openBlock)(),(0,u.createBlock)((0,u.unref)(d.UIPopover),{"is-open":r.value,"onUpdate:isOpen":a[0]||=e=>r.value=e,"popover-side-offset":4,"popover-align":`start`,"popover-side":`bottom`},{trigger:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UIInputWrapper),{label:(0,u.unref)(n).t(`component.custom_view_icon_picker.label`)},{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UIIconButton),{icon:(0,u.unref)(ce)(t.field.value.value),"is-tooltip-disabled":!0,label:(0,u.unref)(n).t(`component.custom_view_icon_picker.view_icon_label`),variant:`secondary`},null,8,[`icon`,`label`])]),_:1},8,[`label`])]),content:(0,u.withCtx)(()=>[(0,u.createElementVNode)(`div`,le,[(0,u.createElementVNode)(`ul`,ue,[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)((0,u.unref)(se),([e,n])=>((0,u.openBlock)(),(0,u.createElementBlock)(`li`,{key:e},[(0,u.createVNode)((0,u.unref)(d.UIClickableElement),null,{default:(0,u.withCtx)(()=>[(0,u.createElementVNode)(`button`,{class:(0,u.normalizeClass)([{"bg-tertiary":e===t.field.value.value,"hover:bg-secondary":e!==t.field.value.value},`p-md`]),type:`button`,onClick:t=>i(e)},[((0,u.openBlock)(),(0,u.createBlock)((0,u.resolveDynamicComponent)(n),{class:`size-4 text-tertiary`}))],10,de)]),_:2},1024)]))),128))])])]),_:1},8,[`is-open`]))}}),pe=(0,u.defineComponent)({__name:`CustomViewCreateDialog`,emits:[`save`],setup(e,{emit:t}){let n=t,r=(0,m.useI18n)(),i=(0,h.useForm)({schema:g.default.object({name:g.default.string().min(1).max(20),color:g.default.enum(E),icon:g.default.enum(D)}),onSubmit:e=>{n(`save`,e)}}),a=i.register(`name`,`Untitled`),o=i.register(`icon`,D.LAYERS),s=i.register(`color`,E.DEFAULT);return(e,t)=>((0,u.openBlock)(),(0,u.createBlock)((0,u.unref)(d.UIFormDialog),{form:(0,u.unref)(i),size:`xs`},{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UIDialogHeader),{title:(0,u.unref)(r).t(`component.custom_view_create_dialog.title`),description:(0,u.unref)(r).t(`component.custom_view_create_dialog.description`),"hide-description":!0},null,8,[`title`,`description`]),(0,u.createVNode)((0,u.unref)(d.UIDialogBody),null,{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UIFormLayout),null,{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UITextField),(0,u.mergeProps)((0,u.unref)(d.toFormField)((0,u.unref)(a)),{"is-required":!0,placeholder:(0,u.unref)(r).t(`component.custom_view_create_dialog.name_placeholder`),label:(0,u.unref)(r).t(`component.custom_view_create_dialog.name_label`)}),null,16,[`placeholder`,`label`]),(0,u.createVNode)((0,u.unref)(d.UIRowLayout),{gap:`2xl`},{default:(0,u.withCtx)(()=>[(0,u.createVNode)(fe,{field:(0,u.unref)(o)},null,8,[`field`]),(0,u.createVNode)(oe,{field:(0,u.unref)(s)},null,8,[`field`])]),_:1})]),_:1})]),_:1}),(0,u.createVNode)((0,u.unref)(d.UIDialogFooter),null,{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UIDialogFooterCancel)),(0,u.createVNode)((0,u.unref)(d.UIDialogFooterSubmit),{label:(0,u.unref)(r).t(`component.custom_view_create_dialog.submit`)},null,8,[`label`])]),_:1})]),_:1},8,[`form`]))}}),me=(0,u.defineComponent)({__name:`CustomViewUpdateDialog`,props:{view:{}},emits:[`save`],setup(e,{emit:t}){let n=e,r=t,i=(0,h.useForm)({initialState:()=>({...n.view,icon:n.view.icon??D.ACTIVITY}),schema:g.default.object({name:g.default.string().min(1).max(20),color:g.default.enum(E),icon:g.default.enum(D)}),onSubmit:e=>{r(`save`,e)}}),a=(0,m.useI18n)(),o=i.register(`name`),s=i.register(`icon`,D.ACTIVITY),c=i.register(`color`);return(e,t)=>((0,u.openBlock)(),(0,u.createBlock)((0,u.unref)(d.UIFormDialog),{form:(0,u.unref)(i),size:`xs`},{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UIDialogHeader),{"hide-description":!0,title:(0,u.unref)(a).t(`component.custom_view_update_dialog.title`),description:(0,u.unref)(a).t(`component.custom_view_update_dialog.description`)},null,8,[`title`,`description`]),(0,u.createVNode)((0,u.unref)(d.UIDialogBody),null,{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UIFormLayout),null,{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UITextField),(0,u.mergeProps)((0,u.unref)(d.toFormField)((0,u.unref)(o)),{"is-required":!0,placeholder:(0,u.unref)(a).t(`component.custom_view_update_dialog.name_placeholder`),label:(0,u.unref)(a).t(`component.custom_view_update_dialog.name_label`)}),null,16,[`placeholder`,`label`]),(0,u.createVNode)((0,u.unref)(d.UIRowLayout),{gap:`2xl`},{default:(0,u.withCtx)(()=>[(0,u.createVNode)(fe,{field:(0,u.unref)(s)},null,8,[`field`]),(0,u.createVNode)(oe,{field:(0,u.unref)(c)},null,8,[`field`])]),_:1})]),_:1})]),_:1}),(0,u.createVNode)((0,u.unref)(d.UIDialogFooter),null,{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UIDialogFooterCancel)),(0,u.createVNode)((0,u.unref)(d.UIDialogFooterSubmit),{label:(0,u.unref)(a).t(`component.custom_view_update_dialog.submit`)},null,8,[`label`])]),_:1})]),_:1},8,[`form`]))}}),he=Object.defineProperty,ge=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,ye=(e,t,n)=>t in e?he(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,be=(e,t)=>{for(var n in t||={})_e.call(t,n)&&ye(e,n,t[n]);if(ge)for(var n of ge(t))ve.call(t,n)&&ye(e,n,t[n]);return e},xe=(e,t)=>{var n={};for(var r in e)_e.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ge)for(var r of ge(e))t.indexOf(r)<0&&ve.call(e,r)&&(n[r]=e[r]);return n},Se=`[vue-draggable-plus]: `;function Ce(e){console.warn(Se+e)}function we(e){console.error(Se+e)}function Te(e,t,n){return n>=0&&n<e.length&&e.splice(n,0,e.splice(t,1)[0]),e}function Ee(e){return e.replace(/-(\w)/g,(e,t)=>t?t.toUpperCase():``)}function De(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[Ee(n)]=e[n]),t),{})}function Oe(e,t){return Array.isArray(e)&&e.splice(t,1),e}function ke(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function Ae(e){return e===void 0}function je(e){return typeof e==`string`}function Me(e,t,n){let r=e.children[n];e.insertBefore(t,r)}function Ne(e){e.parentNode&&e.parentNode.removeChild(e)}function Pe(e,t=document){let n=null;return n=typeof t?.querySelector==`function`?(t?.querySelector)?.call(t,e):document.querySelector(e),n||Ce(`Element not found: ${e}`),n}function Fe(e,t,n=null){return function(...r){return e.apply(n,r),t.apply(n,r)}}function Ie(e,t){let n=be({},e);return Object.keys(t).forEach(r=>{n[r]?n[r]=Fe(e[r],t[r]):n[r]=t[r]}),n}function Le(e){return e instanceof HTMLElement}function Re(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}function ze(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}var Be=Object.assign;function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ve(Object(n),!0).forEach(function(t){Ue(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function He(e){"@babel/helpers - typeof";return He=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},He(e)}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k.apply(this,arguments)}function We(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ge(e,t){if(e==null)return{};var n=We(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var Ke=`1.15.2`;function A(e){if(typeof window<`u`&&window.navigator)return!!navigator.userAgent.match(e)}var j=A(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),qe=A(/Edge/i),Je=A(/firefox/i),Ye=A(/safari/i)&&!A(/chrome/i)&&!A(/android/i),Xe=A(/iP(ad|od|hone)/i),Ze=A(/chrome/i)&&A(/android/i),Qe={capture:!1,passive:!1};function M(e,t,n){e.addEventListener(t,n,!j&&Qe)}function N(e,t,n){e.removeEventListener(t,n,!j&&Qe)}function $e(e,t){if(t){if(t[0]===`>`&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function et(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function P(e,t,n,r){if(e){n||=document;do{if(t!=null&&(t[0]===`>`?e.parentNode===n&&$e(e,t):$e(e,t))||r&&e===n)return e;if(e===n)break}while(e=et(e))}return null}var tt=/\s+/g;function F(e,t,n){e&&t&&(e.classList?e.classList[n?`add`:`remove`](t):e.className=((` `+e.className+` `).replace(tt,` `).replace(` `+t+` `,` `)+(n?` `+t:``)).replace(tt,` `))}function I(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,``):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf(`webkit`)===-1&&(t=`-webkit-`+t),r[t]=n+(typeof n==`string`?``:`px`)}}function nt(e,t){var n=``;if(typeof e==`string`)n=e;else do{var r=I(e,`transform`);r&&r!==`none`&&(n=r+` `+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function rt(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i<a;i++)n(r[i],i);return r}return[]}function L(){return document.scrollingElement||document.documentElement}function R(e,t,n,r,i){if(!(!e.getBoundingClientRect&&e!==window)){var a,o,s,c,l,u,d;if(e!==window&&e.parentNode&&e!==L()?(a=e.getBoundingClientRect(),o=a.top,s=a.left,c=a.bottom,l=a.right,u=a.height,d=a.width):(o=0,s=0,c=window.innerHeight,l=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(i||=e.parentNode,!j))do if(i&&i.getBoundingClientRect&&(I(i,`transform`)!==`none`||n&&I(i,`position`)!==`static`)){var f=i.getBoundingClientRect();o-=f.top+parseInt(I(i,`border-top-width`)),s-=f.left+parseInt(I(i,`border-left-width`)),c=o+a.height,l=s+a.width;break}while(i=i.parentNode);if(r&&e!==window){var p=nt(i||e),m=p&&p.a,h=p&&p.d;p&&(o/=h,s/=m,d/=m,u/=h,c=o+u,l=s+d)}return{top:o,left:s,bottom:c,right:l,width:d,height:u}}}function it(e,t,n){for(var r=lt(e,!0),i=R(e)[t];r;){var a=R(r)[n],o=void 0;if(o=i>=a,!o)return r;if(r===L())break;r=lt(r,!1)}return!1}function at(e,t,n,r){for(var i=0,a=0,o=e.children;a<o.length;){if(o[a].style.display!==`none`&&o[a]!==Q.ghost&&(r||o[a]!==Q.dragged)&&P(o[a],n.draggable,e,!1)){if(i===t)return o[a];i++}a++}return null}function ot(e,t){for(var n=e.lastElementChild;n&&(n===Q.ghost||I(n,`display`)===`none`||t&&!$e(n,t));)n=n.previousElementSibling;return n||null}function z(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!==`TEMPLATE`&&e!==Q.clone&&(!t||$e(e,t))&&n++;return n}function st(e){var t=0,n=0,r=L();if(e)do{var i=nt(e),a=i.a,o=i.d;t+=e.scrollLeft*a,n+=e.scrollTop*o}while(e!==r&&(e=e.parentNode));return[t,n]}function ct(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n)}return-1}function lt(e,t){if(!e||!e.getBoundingClientRect)return L();var n=e,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=I(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX==`auto`||i.overflowX==`scroll`)||n.clientHeight<n.scrollHeight&&(i.overflowY==`auto`||i.overflowY==`scroll`)){if(!n.getBoundingClientRect||n===document.body)return L();if(r||t)return n;r=!0}}while(n=n.parentNode);return L()}function ut(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function dt(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var ft;function pt(e,t){return function(){if(!ft){var n=arguments,r=this;n.length===1?e.call(r,n[0]):e.apply(r,n),ft=setTimeout(function(){ft=void 0},t)}}}function mt(){clearTimeout(ft),ft=void 0}function ht(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function gt(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function _t(e,t,n){var r={};return Array.from(e.children).forEach(function(i){if(!(!P(i,t.draggable,e,!1)||i.animated||i===n)){var a=R(i);r.left=Math.min(r.left??1/0,a.left),r.top=Math.min(r.top??1/0,a.top),r.right=Math.max(r.right??-1/0,a.right),r.bottom=Math.max(r.bottom??-1/0,a.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var B=`Sortable`+new Date().getTime();function vt(){var e=[],t;return{captureAnimationState:function(){e=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(t){if(!(I(t,`display`)===`none`||t===Q.ghost)){e.push({target:t,rect:R(t)});var n=O({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=nt(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}})},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(ct(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation){clearTimeout(t),typeof n==`function`&&n();return}var i=!1,a=0;e.forEach(function(e){var t=0,n=e.target,o=n.fromRect,s=R(n),c=n.prevFromRect,l=n.prevToRect,u=e.rect,d=nt(n,!0);d&&(s.top-=d.f,s.left-=d.e),n.toRect=s,n.thisAnimationDuration&&dt(c,s)&&!dt(o,s)&&(u.top-s.top)/(u.left-s.left)===(o.top-s.top)/(o.left-s.left)&&(t=bt(u,c,l,r.options)),dt(s,o)||(n.prevFromRect=o,n.prevToRect=s,t||=r.options.animation,r.animate(n,u,s,t)),t&&(i=!0,a=Math.max(a,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},t),n.thisAnimationDuration=t)}),clearTimeout(t),i?t=setTimeout(function(){typeof n==`function`&&n()},a):typeof n==`function`&&n(),e=[]},animate:function(e,t,n,r){if(r){I(e,`transition`,``),I(e,`transform`,``);var i=nt(this.el),a=i&&i.a,o=i&&i.d,s=(t.left-n.left)/(a||1),c=(t.top-n.top)/(o||1);e.animatingX=!!s,e.animatingY=!!c,I(e,`transform`,`translate3d(`+s+`px,`+c+`px,0)`),this.forRepaintDummy=yt(e),I(e,`transition`,`transform `+r+`ms`+(this.options.easing?` `+this.options.easing:``)),I(e,`transform`,`translate3d(0,0,0)`),typeof e.animated==`number`&&clearTimeout(e.animated),e.animated=setTimeout(function(){I(e,`transition`,``),I(e,`transform`,``),e.animated=!1,e.animatingX=!1,e.animatingY=!1},r)}}}}function yt(e){return e.offsetWidth}function bt(e,t,n,r){return Math.sqrt((t.top-e.top)**2+(t.left-e.left)**2)/Math.sqrt((t.top-n.top)**2+(t.left-n.left)**2)*r.animation}var xt=[],St={initializeByDefault:!0},Ct={mount:function(e){for(var t in St)St.hasOwnProperty(t)&&!(t in e)&&(e[t]=St[t]);xt.forEach(function(t){if(t.pluginName===e.pluginName)throw`Sortable: Cannot mount plugin ${e.pluginName} more than once`}),xt.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=e+`Global`;xt.forEach(function(r){t[r.pluginName]&&(t[r.pluginName][i]&&t[r.pluginName][i](O({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](O({sortable:t},n)))})},initializePlugins:function(e,t,n,r){for(var i in xt.forEach(function(r){var i=r.pluginName;if(!(!e.options[i]&&!r.initializeByDefault)){var a=new r(e,t,e.options);a.sortable=e,a.options=e.options,e[i]=a,k(n,a.defaults)}}),e.options)if(e.options.hasOwnProperty(i)){var a=this.modifyOption(e,i,e.options[i]);a!==void 0&&(e.options[i]=a)}},getEventProperties:function(e,t){var n={};return xt.forEach(function(r){typeof r.eventProperties==`function`&&k(n,r.eventProperties.call(t[r.pluginName],e))}),n},modifyOption:function(e,t,n){var r;return xt.forEach(function(i){e[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[t]==`function`&&(r=i.optionListeners[t].call(e[i.pluginName],n))}),r}};function wt(e){var t=e.sortable,n=e.rootEl,r=e.name,i=e.targetEl,a=e.cloneEl,o=e.toEl,s=e.fromEl,c=e.oldIndex,l=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,f=e.originalEvent,p=e.putSortable,m=e.extraEventProperties;if(t||=n&&n[B],t){var h,g=t.options,_=`on`+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!j&&!qe?h=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(h=document.createEvent(`Event`),h.initEvent(r,!0,!0)),h.to=o||n,h.from=s||n,h.item=i||n,h.clone=a,h.oldIndex=c,h.newIndex=l,h.oldDraggableIndex=u,h.newDraggableIndex=d,h.originalEvent=f,h.pullMode=p?p.lastPutMode:void 0;var v=O(O({},m),Ct.getEventProperties(r,t));for(var y in v)h[y]=v[y];n&&n.dispatchEvent(h),g[_]&&g[_].call(t,h)}}var Tt=[`evt`],V=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,i=Ge(n,Tt);Ct.pluginEvent.bind(Q)(e,t,O({dragEl:U,parentEl:W,ghostEl:G,rootEl:K,nextEl:Et,lastDownEl:Dt,cloneEl:q,cloneHidden:Ot,dragStarted:Vt,putSortable:Y,activeSortable:Q.active,originalEvent:r,oldIndex:kt,oldDraggableIndex:At,newIndex:J,newDraggableIndex:jt,hideGhostForTarget:on,unhideGhostForTarget:sn,cloneNowHidden:function(){Ot=!0},cloneNowShown:function(){Ot=!1},dispatchSortableEvent:function(e){H({sortable:t,name:e,originalEvent:r})}},i))};function H(e){wt(O({putSortable:Y,cloneEl:q,targetEl:U,rootEl:K,oldIndex:kt,oldDraggableIndex:At,newIndex:J,newDraggableIndex:jt},e))}var U,W,G,K,Et,Dt,q,Ot,kt,J,At,jt,Mt,Y,Nt=!1,Pt=!1,Ft=[],It,X,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt=!1,Gt=!1,Kt,Z,qt=[],Jt=!1,Yt=[],Xt=typeof document<`u`,Zt=Xe,Qt=qe||j?`cssFloat`:`float`,$t=Xt&&!Ze&&!Xe&&`draggable`in document.createElement(`div`),en=function(){if(Xt){if(j)return!1;var e=document.createElement(`x`);return e.style.cssText=`pointer-events:auto`,e.style.pointerEvents===`auto`}}(),tn=function(e,t){var n=I(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=at(e,0,t),a=at(e,1,t),o=i&&I(i),s=a&&I(a),c=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+R(i).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+R(a).width;if(n.display===`flex`)return n.flexDirection===`column`||n.flexDirection===`column-reverse`?`vertical`:`horizontal`;if(n.display===`grid`)return n.gridTemplateColumns.split(` `).length<=1?`vertical`:`horizontal`;if(i&&o.float&&o.float!==`none`){var u=o.float===`left`?`left`:`right`;return a&&(s.clear===`both`||s.clear===u)?`vertical`:`horizontal`}return i&&(o.display===`block`||o.display===`flex`||o.display===`table`||o.display===`grid`||c>=r&&n[Qt]===`none`||a&&n[Qt]===`none`&&c+l>r)?`vertical`:`horizontal`},nn=function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,a=n?e.width:e.height,o=n?t.left:t.top,s=n?t.right:t.bottom,c=n?t.width:t.height;return r===o||i===s||r+a/2===o+c/2},rn=function(e,t){var n;return Ft.some(function(r){var i=r[B].options.emptyInsertThreshold;if(!(!i||ot(r))){var a=R(r),o=e>=a.left-i&&e<=a.right+i,s=t>=a.top-i&&t<=a.bottom+i;if(o&&s)return n=r}}),n},an=function(e){function t(e,n){return function(r,i,a,o){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(e==null&&(n||s))return!0;if(e==null||e===!1)return!1;if(n&&e===`clone`)return e;if(typeof e==`function`)return t(e(r,i,a,o),n)(r,i,a,o);var c=(n?r:i).options.group.name;return e===!0||typeof e==`string`&&e===c||e.join&&e.indexOf(c)>-1}}var n={},r=e.group;(!r||He(r)!=`object`)&&(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},on=function(){!en&&G&&I(G,`display`,`none`)},sn=function(){!en&&G&&I(G,`display`,``)};Xt&&!Ze&&document.addEventListener(`click`,function(e){if(Pt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Pt=!1,!1},!0);var cn=function(e){if(U){e=e.touches?e.touches[0]:e;var t=rn(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[B]._onDragOver(n)}}},ln=function(e){U&&U.parentNode[B]._isOutsideThisEl(e.target)};function Q(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw`Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;this.el=e,this.options=t=k({},t),e[B]=this;var n={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 tn(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(e,t){e.setData(`Text`,t.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:Q.supportPointer!==!1&&`PointerEvent`in window&&!Ye,emptyInsertThreshold:5};for(var r in Ct.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var i in an(t),this)i.charAt(0)===`_`&&typeof this[i]==`function`&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:$t,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?M(e,`pointerdown`,this._onTapStart):(M(e,`mousedown`,this._onTapStart),M(e,`touchstart`,this._onTapStart)),this.nativeDraggable&&(M(e,`dragover`,this),M(e,`dragenter`,this)),Ft.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),k(this,vt())}Q.prototype={constructor:Q,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ht=null)},_getDirection:function(e,t){return typeof this.options.direction==`function`?this.options.direction.call(this,e,t,U):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,a=e.type,o=e.touches&&e.touches[0]||e.pointerType&&e.pointerType===`touch`&&e,s=(o||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,l=r.filter;if(yn(n),!U&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Ye&&s&&s.tagName.toUpperCase()===`SELECT`)&&(s=P(s,r.draggable,n,!1),!(s&&s.animated)&&Dt!==s)){if(kt=z(s),At=z(s,r.draggable),typeof l==`function`){if(l.call(this,e,s,this)){H({sortable:t,rootEl:c,name:`filter`,targetEl:s,toEl:n,fromEl:n}),V(`filter`,t,{evt:e}),i&&e.cancelable&&e.preventDefault();return}}else if(l&&(l=l.split(`,`).some(function(r){if(r=P(c,r.trim(),n,!1),r)return H({sortable:t,rootEl:r,name:`filter`,targetEl:s,fromEl:n,toEl:n}),V(`filter`,t,{evt:e}),!0}),l)){i&&e.cancelable&&e.preventDefault();return}r.handle&&!P(c,r.handle,n,!1)||this._prepareDragStart(e,o,s)}}},_prepareDragStart:function(e,t,n){var r=this,i=r.el,a=r.options,o=i.ownerDocument,s;if(n&&!U&&n.parentNode===i){var c=R(n);if(K=i,U=n,W=U.parentNode,Et=U.nextSibling,Dt=n,Mt=a.group,Q.dragged=U,It={target:U,clientX:(t||e).clientX,clientY:(t||e).clientY},zt=It.clientX-c.left,Bt=It.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,U.style[`will-change`]=`all`,s=function(){if(V(`delayEnded`,r,{evt:e}),Q.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Je&&r.nativeDraggable&&(U.draggable=!0),r._triggerDragStart(e,t),H({sortable:r,name:`choose`,originalEvent:e}),F(U,a.chosenClass,!0)},a.ignore.split(`,`).forEach(function(e){rt(U,e.trim(),fn)}),M(o,`dragover`,cn),M(o,`mousemove`,cn),M(o,`touchmove`,cn),M(o,`mouseup`,r._onDrop),M(o,`touchend`,r._onDrop),M(o,`touchcancel`,r._onDrop),Je&&this.nativeDraggable&&(this.options.touchStartThreshold=4,U.draggable=!0),V(`delayStart`,this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(qe||j))){if(Q.eventCanceled){this._onDrop();return}M(o,`mouseup`,r._disableDelayedDrag),M(o,`touchend`,r._disableDelayedDrag),M(o,`touchcancel`,r._disableDelayedDrag),M(o,`mousemove`,r._delayedDragTouchMoveHandler),M(o,`touchmove`,r._delayedDragTouchMoveHandler),a.supportPointer&&M(o,`pointermove`,r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){U&&fn(U),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;N(e,`mouseup`,this._disableDelayedDrag),N(e,`touchend`,this._disableDelayedDrag),N(e,`touchcancel`,this._disableDelayedDrag),N(e,`mousemove`,this._delayedDragTouchMoveHandler),N(e,`touchmove`,this._delayedDragTouchMoveHandler),N(e,`pointermove`,this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t||=e.pointerType==`touch`&&e,!this.nativeDraggable||t?this.options.supportPointer?M(document,`pointermove`,this._onTouchMove):t?M(document,`touchmove`,this._onTouchMove):M(document,`mousemove`,this._onTouchMove):(M(U,`dragend`,this),M(K,`dragstart`,this._onDragStart));try{document.selection?bn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Nt=!1,K&&U){V(`dragStarted`,this,{evt:t}),this.nativeDraggable&&M(document,`dragover`,ln);var n=this.options;!e&&F(U,n.dragClass,!1),F(U,n.ghostClass,!0),Q.active=this,e&&this._appendGhost(),H({sortable:this,name:`start`,originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(X){this._lastX=X.clientX,this._lastY=X.clientY,on();for(var e=document.elementFromPoint(X.clientX,X.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(X.clientX,X.clientY),e!==t);)t=e;if(U.parentNode[B]._isOutsideThisEl(e),t)do{if(t[B]){var n=void 0;if(n=t[B]._onDragOver({clientX:X.clientX,clientY:X.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);sn()}},_onTouchMove:function(e){if(It){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,a=G&&nt(G,!0),o=G&&a&&a.a,s=G&&a&&a.d,c=Zt&&Z&&st(Z),l=(i.clientX-It.clientX+r.x)/(o||1)+(c?c[0]-qt[0]:0)/(o||1),u=(i.clientY-It.clientY+r.y)/(s||1)+(c?c[1]-qt[1]:0)/(s||1);if(!Q.active&&!Nt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(G){a?(a.e+=l-(Lt||0),a.f+=u-(Rt||0)):a={a:1,b:0,c:0,d:1,e:l,f:u};var d=`matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;I(G,`webkitTransform`,d),I(G,`mozTransform`,d),I(G,`msTransform`,d),I(G,`transform`,d),Lt=l,Rt=u,X=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!G){var e=this.options.fallbackOnBody?document.body:K,t=R(U,!0,Zt,!0,e),n=this.options;if(Zt){for(Z=e;I(Z,`position`)===`static`&&I(Z,`transform`)===`none`&&Z!==document;)Z=Z.parentNode;Z!==document.body&&Z!==document.documentElement?(Z===document&&(Z=L()),t.top+=Z.scrollTop,t.left+=Z.scrollLeft):Z=L(),qt=st(Z)}G=U.cloneNode(!0),F(G,n.ghostClass,!1),F(G,n.fallbackClass,!0),F(G,n.dragClass,!0),I(G,`transition`,``),I(G,`transform`,``),I(G,`box-sizing`,`border-box`),I(G,`margin`,0),I(G,`top`,t.top),I(G,`left`,t.left),I(G,`width`,t.width),I(G,`height`,t.height),I(G,`opacity`,`0.8`),I(G,`position`,Zt?`absolute`:`fixed`),I(G,`zIndex`,`100000`),I(G,`pointerEvents`,`none`),Q.ghost=G,e.appendChild(G),I(G,`transform-origin`,zt/parseInt(G.style.width)*100+`% `+Bt/parseInt(G.style.height)*100+`%`)}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,i=n.options;if(V(`dragStart`,this,{evt:e}),Q.eventCanceled){this._onDrop();return}V(`setupClone`,this),Q.eventCanceled||(q=gt(U),q.removeAttribute(`id`),q.draggable=!1,q.style[`will-change`]=``,this._hideClone(),F(q,this.options.chosenClass,!1),Q.clone=q),n.cloneId=bn(function(){V(`clone`,n),!Q.eventCanceled&&(n.options.removeCloneOnHide||K.insertBefore(q,U),n._hideClone(),H({sortable:n,name:`clone`}))}),!t&&F(U,i.dragClass,!0),t?(Pt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(N(document,`mouseup`,n._onDrop),N(document,`touchend`,n._onDrop),N(document,`touchcancel`,n._onDrop),r&&(r.effectAllowed=`move`,i.setData&&i.setData.call(n,r,U)),M(document,`drop`,n),I(U,`transform`,`translateZ(0)`)),Nt=!0,n._dragStartId=bn(n._dragStarted.bind(n,t,e)),M(document,`selectstart`,n),Vt=!0,Ye&&I(document.body,`user-select`,`none`)},_onDragOver:function(e){var t=this.el,n=e.target,r,i,a,o=this.options,s=o.group,c=Q.active,l=Mt===s,u=o.sort,d=Y||c,f,p=this,m=!1;if(Jt)return;function h(o,s){V(o,p,O({evt:e,isOwner:l,axis:f?`vertical`:`horizontal`,revert:a,dragRect:r,targetRect:i,canSort:u,fromSortable:d,target:n,completed:_,onMove:function(n,i){return dn(K,t,U,r,n,R(n),e,i)},changed:v},s))}function g(){h(`dragOverAnimationCapture`),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function _(r){return h(`dragOverCompleted`,{insertion:r}),r&&(l?c._hideClone():c._showClone(p),p!==d&&(F(U,Y?Y.options.ghostClass:c.options.ghostClass,!1),F(U,o.ghostClass,!0)),Y!==p&&p!==Q.active?Y=p:p===Q.active&&Y&&(Y=null),d===p&&(p._ignoreWhileAnimating=n),p.animateAll(function(){h(`dragOverAnimationComplete`),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(n===U&&!U.animated||n===t&&!n.animated)&&(Ht=null),!o.dragoverBubble&&!e.rootEl&&n!==document&&(U.parentNode[B]._isOutsideThisEl(e.target),!r&&cn(e)),!o.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function v(){J=z(U),jt=z(U,o.draggable),H({sortable:p,name:`change`,toEl:t,newIndex:J,newDraggableIndex:jt,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=P(n,o.draggable,t,!0),h(`dragOver`),Q.eventCanceled)return m;if(U.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||p._ignoreWhileAnimating===n)return _(!1);if(Pt=!1,c&&!o.disabled&&(l?u||(a=W!==K):Y===this||(this.lastPutMode=Mt.checkPull(this,c,U,e))&&s.checkPut(this,c,U,e))){if(f=this._getDirection(e,n)===`vertical`,r=R(U),h(`dragOverValid`),Q.eventCanceled)return m;if(a)return W=K,g(),this._hideClone(),h(`revert`),Q.eventCanceled||(Et?K.insertBefore(U,Et):K.appendChild(U)),_(!0);var y=ot(t,o.draggable);if(!y||hn(e,f,this)&&!y.animated){if(y===U)return _(!1);if(y&&t===e.target&&(n=y),n&&(i=R(n)),dn(K,t,U,r,n,i,e,!!n)!==!1)return g(),y&&y.nextSibling?t.insertBefore(U,y.nextSibling):t.appendChild(U),W=t,v(),_(!0)}else if(y&&mn(e,f,this)){var b=at(t,0,o,!0);if(b===U)return _(!1);if(n=b,i=R(n),dn(K,t,U,r,n,i,e,!1)!==!1)return g(),t.insertBefore(U,b),W=t,v(),_(!0)}else if(n.parentNode===t){i=R(n);var x=0,S,ee=U.parentNode!==t,C=!nn(U.animated&&U.toRect||r,n.animated&&n.toRect||i,f),w=f?`top`:`left`,te=it(n,`top`,`top`)||it(U,`top`,`top`),ne=te?te.scrollTop:void 0;Ht!==n&&(S=i[w],Wt=!1,Gt=!C&&o.invertSwap||ee),x=gn(e,n,i,f,C?1:o.swapThreshold,o.invertedSwapThreshold==null?o.swapThreshold:o.invertedSwapThreshold,Gt,Ht===n);var T;if(x!==0){var re=z(U);do re-=x,T=W.children[re];while(T&&(I(T,`display`)===`none`||T===G))}if(x===0||T===n)return _(!1);Ht=n,Ut=x;var E=n.nextElementSibling,ie=!1;ie=x===1;var ae=dn(K,t,U,r,n,i,e,ie);if(ae!==!1)return(ae===1||ae===-1)&&(ie=ae===1),Jt=!0,setTimeout(pn,30),g(),ie&&!E?t.appendChild(U):n.parentNode.insertBefore(U,ie?E:n),te&&ht(te,0,ne-te.scrollTop),W=U.parentNode,S!==void 0&&!Gt&&(Kt=Math.abs(S-R(n)[w])),v(),_(!0)}if(t.contains(U))return _(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){N(document,`mousemove`,this._onTouchMove),N(document,`touchmove`,this._onTouchMove),N(document,`pointermove`,this._onTouchMove),N(document,`dragover`,cn),N(document,`mousemove`,cn),N(document,`touchmove`,cn)},_offUpEvents:function(){var e=this.el.ownerDocument;N(e,`mouseup`,this._onDrop),N(e,`touchend`,this._onDrop),N(e,`pointerup`,this._onDrop),N(e,`touchcancel`,this._onDrop),N(document,`selectstart`,this)},_onDrop:function(e){var t=this.el,n=this.options;if(J=z(U),jt=z(U,n.draggable),V(`drop`,this,{evt:e}),W=U&&U.parentNode,J=z(U),jt=z(U,n.draggable),Q.eventCanceled){this._nulling();return}Nt=!1,Gt=!1,Wt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),xn(this.cloneId),xn(this._dragStartId),this.nativeDraggable&&(N(document,`drop`,this),N(t,`dragstart`,this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ye&&I(document.body,`user-select`,``),I(U,`transform`,``),e&&(Vt&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),G&&G.parentNode&&G.parentNode.removeChild(G),(K===W||Y&&Y.lastPutMode!==`clone`)&&q&&q.parentNode&&q.parentNode.removeChild(q),U&&(this.nativeDraggable&&N(U,`dragend`,this),fn(U),U.style[`will-change`]=``,Vt&&!Nt&&F(U,Y?Y.options.ghostClass:this.options.ghostClass,!1),F(U,this.options.chosenClass,!1),H({sortable:this,name:`unchoose`,toEl:W,newIndex:null,newDraggableIndex:null,originalEvent:e}),K===W?J!==kt&&J>=0&&(H({sortable:this,name:`update`,toEl:W,originalEvent:e}),H({sortable:this,name:`sort`,toEl:W,originalEvent:e})):(J>=0&&(H({rootEl:W,name:`add`,toEl:W,fromEl:K,originalEvent:e}),H({sortable:this,name:`remove`,toEl:W,originalEvent:e}),H({rootEl:W,name:`sort`,toEl:W,fromEl:K,originalEvent:e}),H({sortable:this,name:`sort`,toEl:W,originalEvent:e})),Y&&Y.save()),Q.active&&((J==null||J===-1)&&(J=kt,jt=At),H({sortable:this,name:`end`,toEl:W,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){V(`nulling`,this),K=U=W=G=Et=q=Dt=Ot=It=X=Vt=J=jt=kt=At=Ht=Ut=Y=Mt=Q.dragged=Q.ghost=Q.clone=Q.active=null,Yt.forEach(function(e){e.checked=!0}),Yt.length=Lt=Rt=0},handleEvent:function(e){switch(e.type){case`drop`:case`dragend`:this._onDrop(e);break;case`dragenter`:case`dragover`:U&&(this._onDragOver(e),un(e));break;case`selectstart`:e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,r=0,i=n.length,a=this.options;r<i;r++)t=n[r],P(t,a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||vn(t));return e},sort:function(e,t){var n={},r=this.el;this.toArray().forEach(function(e,t){var i=r.children[t];P(i,this.options.draggable,r,!1)&&(n[e]=i)},this),t&&this.captureAnimationState(),e.forEach(function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return P(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var r=Ct.modifyOption(this,e,t);r===void 0?n[e]=t:n[e]=r,e===`group`&&an(n)},destroy:function(){V(`destroy`,this);var e=this.el;e[B]=null,N(e,`mousedown`,this._onTapStart),N(e,`touchstart`,this._onTapStart),N(e,`pointerdown`,this._onTapStart),this.nativeDraggable&&(N(e,`dragover`,this),N(e,`dragenter`,this)),Array.prototype.forEach.call(e.querySelectorAll(`[draggable]`),function(e){e.removeAttribute(`draggable`)}),this._onDrop(),this._disableDelayedDragEvents(),Ft.splice(Ft.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Ot){if(V(`hideClone`,this),Q.eventCanceled)return;I(q,`display`,`none`),this.options.removeCloneOnHide&&q.parentNode&&q.parentNode.removeChild(q),Ot=!0}},_showClone:function(e){if(e.lastPutMode!==`clone`){this._hideClone();return}if(Ot){if(V(`showClone`,this),Q.eventCanceled)return;U.parentNode==K&&!this.options.group.revertClone?K.insertBefore(q,U):Et?K.insertBefore(q,Et):K.appendChild(q),this.options.group.revertClone&&this.animate(U,q),I(q,`display`,``),Ot=!1}}};function un(e){e.dataTransfer&&(e.dataTransfer.dropEffect=`move`),e.cancelable&&e.preventDefault()}function dn(e,t,n,r,i,a,o,s){var c,l=e[B],u=l.options.onMove,d;return window.CustomEvent&&!j&&!qe?c=new CustomEvent(`move`,{bubbles:!0,cancelable:!0}):(c=document.createEvent(`Event`),c.initEvent(`move`,!0,!0)),c.to=t,c.from=e,c.dragged=n,c.draggedRect=r,c.related=i||t,c.relatedRect=a||R(t),c.willInsertAfter=s,c.originalEvent=o,e.dispatchEvent(c),u&&(d=u.call(l,c,o)),d}function fn(e){e.draggable=!1}function pn(){Jt=!1}function mn(e,t,n){var r=R(at(n.el,0,n.options,!0)),i=_t(n.el,n.options,G),a=10;return t?e.clientX<i.left-a||e.clientY<r.top&&e.clientX<r.right:e.clientY<i.top-a||e.clientY<r.bottom&&e.clientX<r.left}function hn(e,t,n){var r=R(ot(n.el,n.options.draggable)),i=_t(n.el,n.options,G),a=10;return t?e.clientX>i.right+a||e.clientY>r.bottom&&e.clientX>r.left:e.clientY>i.bottom+a||e.clientX>r.right&&e.clientY>r.top}function gn(e,t,n,r,i,a,o,s){var c=r?e.clientY:e.clientX,l=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,f=!1;if(!o){if(s&&Kt<l*i){if(!Wt&&(Ut===1?c>u+l*a/2:c<d-l*a/2)&&(Wt=!0),Wt)f=!0;else if(Ut===1?c<u+Kt:c>d-Kt)return-Ut}else if(c>u+l*(1-i)/2&&c<d-l*(1-i)/2)return _n(t)}return f||=o,f&&(c<u+l*a/2||c>d-l*a/2)?c>u+l/2?1:-1:0}function _n(e){return z(U)<z(e)?1:-1}function vn(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function yn(e){Yt.length=0;for(var t=e.getElementsByTagName(`input`),n=t.length;n--;){var r=t[n];r.checked&&Yt.push(r)}}function bn(e){return setTimeout(e,0)}function xn(e){return clearTimeout(e)}Xt&&M(document,`touchmove`,function(e){(Q.active||Nt)&&e.cancelable&&e.preventDefault()}),Q.utils={on:M,off:N,css:I,find:rt,is:function(e,t){return!!P(e,t,e,!1)},extend:ut,throttle:pt,closest:P,toggleClass:F,clone:gt,index:z,nextTick:bn,cancelNextTick:xn,detectDirection:tn,getChild:at},Q.get=function(e){return e[B]},Q.mount=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(e){if(!e.prototype||!e.prototype.constructor)throw`Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;e.utils&&(Q.utils=O(O({},Q.utils),e.utils)),Ct.mount(e)})},Q.create=function(e,t){return new Q(e,t)},Q.version=Ke;var $=[],Sn,Cn,wn=!1,Tn,En,Dn,On;function kn(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)e.charAt(0)===`_`&&typeof this[e]==`function`&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?M(document,`dragover`,this._handleAutoScroll):this.options.supportPointer?M(document,`pointermove`,this._handleFallbackAutoScroll):t.touches?M(document,`touchmove`,this._handleFallbackAutoScroll):M(document,`mousemove`,this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?N(document,`dragover`,this._handleAutoScroll):(N(document,`pointermove`,this._handleFallbackAutoScroll),N(document,`touchmove`,this._handleFallbackAutoScroll),N(document,`mousemove`,this._handleFallbackAutoScroll)),jn(),An(),mt()},nulling:function(){Dn=Cn=Sn=wn=On=Tn=En=null,$.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(r,i);if(Dn=e,t||this.options.forceAutoScrollFallback||qe||j||Ye){Mn(e,this.options,a,t);var o=lt(a,!0);wn&&(!On||r!==Tn||i!==En)&&(On&&jn(),On=setInterval(function(){var a=lt(document.elementFromPoint(r,i),!0);a!==o&&(o=a,An()),Mn(e,n.options,a,t)},10),Tn=r,En=i)}else{if(!this.options.bubbleScroll||lt(a,!0)===L()){An();return}Mn(e,this.options,lt(a,!1),!1)}}},k(e,{pluginName:`scroll`,initializeByDefault:!0})}function An(){$.forEach(function(e){clearInterval(e.pid)}),$=[]}function jn(){clearInterval(On)}var Mn=pt(function(e,t,n,r){if(t.scroll){var i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,o=t.scrollSensitivity,s=t.scrollSpeed,c=L(),l=!1,u;Cn!==n&&(Cn=n,An(),Sn=t.scroll,u=t.scrollFn,Sn===!0&&(Sn=lt(n,!0)));var d=0,f=Sn;do{var p=f,m=R(p),h=m.top,g=m.bottom,_=m.left,v=m.right,y=m.width,b=m.height,x=void 0,S=void 0,ee=p.scrollWidth,C=p.scrollHeight,w=I(p),te=p.scrollLeft,ne=p.scrollTop;p===c?(x=y<ee&&(w.overflowX===`auto`||w.overflowX===`scroll`||w.overflowX===`visible`),S=b<C&&(w.overflowY===`auto`||w.overflowY===`scroll`||w.overflowY===`visible`)):(x=y<ee&&(w.overflowX===`auto`||w.overflowX===`scroll`),S=b<C&&(w.overflowY===`auto`||w.overflowY===`scroll`));var T=x&&(Math.abs(v-i)<=o&&te+y<ee)-(Math.abs(_-i)<=o&&!!te),re=S&&(Math.abs(g-a)<=o&&ne+b<C)-(Math.abs(h-a)<=o&&!!ne);if(!$[d])for(var E=0;E<=d;E++)$[E]||($[E]={});($[d].vx!=T||$[d].vy!=re||$[d].el!==p)&&($[d].el=p,$[d].vx=T,$[d].vy=re,clearInterval($[d].pid),(T!=0||re!=0)&&(l=!0,$[d].pid=setInterval(function(){r&&this.layer===0&&Q.active._onTouchMove(Dn);var t=$[this.layer].vy?$[this.layer].vy*s:0,n=$[this.layer].vx?$[this.layer].vx*s:0;typeof u==`function`&&u.call(Q.dragged.parentNode[B],n,t,e,Dn,$[this.layer].el)!==`continue`||ht($[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&f!==c&&(f=lt(f,!1)));wn=l}},30),Nn=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,i=e.activeSortable,a=e.dispatchSortableEvent,o=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var c=n||i;o();var l=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(l.clientX,l.clientY);s(),c&&!c.el.contains(u)&&(a(`spill`),this.onSpill({dragEl:r,putSortable:n}))}};function Pn(){}Pn.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=at(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Nn},k(Pn,{pluginName:`revertOnSpill`});function Fn(){}Fn.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:Nn},k(Fn,{pluginName:`removeOnSpill`}),Q.mount(new kn),Q.mount(Fn,Pn);function In(e){return e==null?e:JSON.parse(JSON.stringify(e))}function Ln(e){(0,u.getCurrentInstance)()&&(0,u.onUnmounted)(e)}function Rn(e){(0,u.getCurrentInstance)()?(0,u.onMounted)(e):(0,u.nextTick)(e)}var zn=null,Bn=null;function Vn(e=null,t=null){zn=e,Bn=t}function Hn(){return{data:zn,clonedData:Bn}}var Un=Symbol(`cloneElement`);function Wn(...e){let t=(0,u.getCurrentInstance)()?.proxy,n=null,r=e[0],[,i,a]=e;Array.isArray((0,u.unref)(i))||(a=i,i=null);let o=null,{immediate:s=!0,clone:c=In,forceFallback:l,fallbackOnBody:d,customUpdate:f}=(0,u.unref)(a)??{};function p(e){let{from:t,oldIndex:r,item:a}=e,o=Array.from(t.childNodes);n=l&&!d?o.slice(0,-1):o;let s=(0,u.unref)((0,u.unref)(i)?.[r]),f=c(s);Vn(s,f),a[Un]=f}function m(e){let t=e.item[Un];if(!Ae(t)){if(Ne(e.item),(0,u.isRef)(i)){let n=[...(0,u.unref)(i)];i.value=ke(n,e.newDraggableIndex,t);return}ke((0,u.unref)(i),e.newDraggableIndex,t)}}function h(e){let{from:t,item:n,oldIndex:r,oldDraggableIndex:a,pullMode:o,clone:s}=e;if(Me(t,n,r),o===`clone`){Ne(s);return}if((0,u.isRef)(i)){let e=[...(0,u.unref)(i)];i.value=Oe(e,a);return}Oe((0,u.unref)(i),a)}function g(e){if(f){f(e);return}let{from:t,item:n,oldIndex:r,oldDraggableIndex:a,newDraggableIndex:o}=e;if(Ne(n),Me(t,n,r),(0,u.isRef)(i)){let e=[...(0,u.unref)(i)];i.value=Te(e,a,o);return}Te((0,u.unref)(i),a,o)}function _(e){let{newIndex:t,oldIndex:r,from:i,to:a}=e,o=null,s=t===r&&i===a;try{if(s){let e=null;n?.some((t,r)=>{if(e&&n?.length!==a.childNodes.length)return i.insertBefore(e,t.nextSibling),!0;let o=a.childNodes[r];e=a?.replaceChild(t,o)})}}catch(e){o=e}finally{n=null}(0,u.nextTick)(()=>{if(Vn(),o)throw o})}let v={onUpdate:g,onStart:p,onAdd:m,onRemove:h,onEnd:_};function y(e){let n=(0,u.unref)(r);return e||=je(n)?Pe(n,t?.$el):n,e&&!Le(e)&&(e=e.$el),e||we(`Root element not found`),e}function b(){let e=(0,u.unref)(a)??{},{immediate:t,clone:n}=e,r=xe(e,[`immediate`,`clone`]);return Re(r,(e,t)=>{ze(e)&&(r[e]=(e,...n)=>(Be(e,Hn()),t(e,...n)))}),Ie(i===null?{}:v,r)}let x=e=>{e=y(e),o&&S.destroy(),o=new Q(e,b())};(0,u.watch)(()=>a,()=>{o&&Re(b(),(e,t)=>{o?.option(e,t)})},{deep:!0});let S={option:(e,t)=>o?.option(e,t),destroy:()=>{o?.destroy(),o=null},save:()=>o?.save(),toArray:()=>o?.toArray(),closest:(...e)=>o?.closest(...e)};return Rn(()=>{s&&x()}),Ln(S.destroy),be({start:x,pause:()=>S?.option(`disabled`,!0),resume:()=>S?.option(`disabled`,!1)},S)}var Gn=[`update`,`start`,`add`,`remove`,`choose`,`unchoose`,`end`,`sort`,`filter`,`clone`,`move`,`change`],Kn=(0,u.defineComponent)({name:`VueDraggable`,model:{prop:`modelValue`,event:`update:modelValue`},props:[`clone`,`animation`,`ghostClass`,`group`,`sort`,`disabled`,`store`,`handle`,`draggable`,`swapThreshold`,`invertSwap`,`invertedSwapThreshold`,`removeCloneOnHide`,`direction`,`chosenClass`,`dragClass`,`ignore`,`filter`,`preventOnFilter`,`easing`,`setData`,`dropBubble`,`dragoverBubble`,`dataIdAttr`,`delay`,`delayOnTouchOnly`,`touchStartThreshold`,`forceFallback`,`fallbackClass`,`fallbackOnBody`,`fallbackTolerance`,`fallbackOffset`,`supportPointer`,`emptyInsertThreshold`,`scroll`,`forceAutoScrollFallback`,`scrollSensitivity`,`scrollSpeed`,`bubbleScroll`,`modelValue`,`tag`,`target`,`customUpdate`,...Gn.map(e=>`on${e.replace(/^\S/,e=>e.toUpperCase())}`)],emits:[`update:modelValue`,...Gn],setup(e,{slots:t,emit:n,expose:r,attrs:i}){let a=Gn.reduce((e,t)=>{let r=`on${t.replace(/^\S/,e=>e.toUpperCase())}`;return e[r]=(...e)=>n(t,...e),e},{}),o=(0,u.computed)(()=>{let t=(0,u.toRefs)(e),{modelValue:n}=t,r=xe(t,[`modelValue`]),o=Object.entries(r).reduce((e,[t,n])=>{let r=(0,u.unref)(n);return r!==void 0&&(e[t]=r),e},{});return be(be({},a),De(be(be({},i),o)))}),s=(0,u.computed)({get:()=>e.modelValue,set:e=>n(`update:modelValue`,e)}),c=(0,u.ref)(),l=(0,u.reactive)(Wn(e.target||c,s,o));return r(l),()=>(0,u.h)(e.tag||`div`,{ref:c},(t?.default)?.call(t,l))}}),qn={mounted:`mounted`,unmounted:`unmounted`};qn.mounted,qn.unmounted;function Jn(e){let t=Symbol(e);function n(e){return(0,u.provide)(t,e),e}function r(n){let r=(0,u.inject)(t,n??void 0);if(r===void 0&&n===void 0)throw Error(`${e} context is not provided.`);return r??null}return[n,r]}var[Yn,Xn]=Jn(`customViewManagerContext`);function Zn(){let e=(0,m.useI18n)(),t=(0,d.useOverlay)().create(pe),n=Xn();return(0,_.createAction)({id:`custom-view-save-to-new-view`,name:()=>e.t(`action.custom_view.create`),execute:()=>{t.open({onSave:e=>{n.createView(e),t.close()}})},group:n.actionGroup,icon:()=>f.BookmarkAddIcon})}function Qn(){let e=(0,m.useI18n)(),t=Xn();return(0,_.createAction)({id:`custom-view-save-to-current-view`,isApplicable:()=>t.activeView.value.isEditable,name:()=>e.t(`action.custom_view.save_to_current`),execute:()=>{t.saveToCurrentView()},group:t.actionGroup,icon:()=>f.BookmarkCheckIcon})}function $n(){let e=(0,m.useI18n)(),t=(0,d.useOverlay)().create(d.UIConfirmDialog),n=Xn();return(0,_.createAction)({id:`custom-view-delete-view`,isApplicable:e=>{if(n.views.value.length===1)return!1;let t=e.targetedModelOfType(`CustomView`);return t===null?!1:t.isEditable},name:()=>e.t(`action.custom_view.delete`),execute:r=>{let i=r.targetedModelOfTypeOrThrow(`CustomView`);t.open({title:e.t(`action.custom_view.delete_confirm_title`),isDestructive:!0,confirmLabel:e.t(`action.custom_view.delete_confirm_label`),description:e.t(`action.custom_view.delete_confirm_description`,{name:i.name}),onConfirm:()=>{n.deleteView(i.id),t.close()}})},group:n.actionGroup,icon:()=>f.Trash01Icon,separatorGroup:`delete`})}function er(){let e=(0,m.useI18n)(),t=(0,d.useOverlay)().create(me),n=Xn();return(0,_.createAction)({id:`custom-view-edit-view`,isApplicable:e=>{let t=e.targetedModelOfType(`CustomView`);return t===null?!1:t.isEditable},name:()=>e.t(`action.custom_view.edit`),execute:e=>{let r=e.targetedModelOfTypeOrThrow(`CustomView`);t.open({view:r,onSave:e=>{n.updateViewMeta(r.id,e),t.close()}})},group:n.actionGroup,icon:()=>f.Edit01Icon})}var tr={class:`flex h-6 items-center overflow-hidden rounded-sm border border-secondary duration-100 hover:bg-secondary`},nr={class:`text-xs text-primary`},rr=(0,u.defineComponent)({__name:`CustomViewViewsItem`,props:{isSelected:{type:Boolean},view:{},viewIndex:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=er(),a=$n();return(t,o)=>((0,u.openBlock)(),(0,u.createBlock)((0,u.unref)(d.UIActionTooltip),{label:n.view.name,"keyboard-shortcut":e.viewIndex<9?{key:`${e.viewIndex+1}`}:null},{default:(0,u.withCtx)(()=>[(0,u.createElementVNode)(`div`,tr,[(0,u.createVNode)((0,u.unref)(d.UIActionContextMenu),{"current-context-only":!0,actions:[(0,u.unref)(i),(0,u.unref)(a)],models:[{modelName:`CustomView`,...n.view,key:n.view.id}]},{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UIClickableElement),{class:`h-full rounded-none`},{default:(0,u.withCtx)(()=>[(0,u.createElementVNode)(`button`,{class:(0,u.normalizeClass)({"bg-tertiary":n.isSelected}),onClick:o[0]||=e=>r(`select`,n.view.id)},[(0,u.createVNode)((0,u.unref)(d.UIRowLayout),{gap:`none`,class:`duration-100 active:scale-98 active:will-change-transform`},{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UIRowLayout),{gap:`xs`,class:`px-sm`},{default:(0,u.withCtx)(()=>[n.view.icon===null?(0,u.createCommentVNode)(``,!0):((0,u.openBlock)(),(0,u.createBlock)((0,u.resolveDynamicComponent)((0,u.unref)(ce)(n.view.icon)),{key:0,style:(0,u.normalizeStyle)({color:(0,u.unref)(ae)(n.view.color)}),class:`size-3`},null,8,[`style`])),(0,u.createElementVNode)(`span`,nr,(0,u.toDisplayString)(n.view.name),1)]),_:1})]),_:1})],2)]),_:1})]),_:1},8,[`actions`,`models`])])]),_:1},8,[`label`,`keyboard-shortcut`]))}}),ir=(0,u.defineComponent)({__name:`CustomViewViews`,setup(e){let t=(0,m.useI18n)(),n=Xn(),r=Zn(),i=Qn(),a=(0,u.ref)([...n.views.value]);(0,u.watch)(()=>n.views.value,e=>{a.value=[...e]});function o(){n.reorderViews(a.value)}return(e,s)=>((0,u.openBlock)(),(0,u.createBlock)((0,u.unref)(d.UIRowLayout),null,{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(Kn),{modelValue:a.value,"onUpdate:modelValue":s[0]||=e=>a.value=e,animation:150,class:`flex flex-row items-center gap-1`,onEnd:o},{default:(0,u.withCtx)(()=>[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)(a.value,(e,t)=>((0,u.openBlock)(),(0,u.createBlock)(rr,{key:e.id,view:e,"is-selected":e.id===(0,u.unref)(n).activeView.value.id,"view-index":t,onSelect:(0,u.unref)(n).setActiveView},null,8,[`view`,`is-selected`,`view-index`,`onSelect`]))),128))]),_:1},8,[`modelValue`]),(0,u.unref)(n).isDirty.value?((0,u.openBlock)(),(0,u.createElementBlock)(u.Fragment,{key:0},[(0,u.createVNode)((0,u.unref)(d.UISeparator),{class:`h-5`,orientation:`vertical`}),(0,u.createVNode)((0,u.unref)(d.UIActionDropdownMenu),{"current-context-only":!1,actions:[(0,u.unref)(i),(0,u.unref)(r)],"popover-side":`bottom`,"popover-align":`end`},{default:(0,u.withCtx)(()=>[(0,u.createVNode)((0,u.unref)(d.UIButton),{"icon-right":(0,u.unref)(f.ChevronDownIcon),label:(0,u.unref)(t).t(`component.custom_view_list.save`),size:`sm`,variant:`secondary`},null,8,[`icon-right`,`label`])]),_:1},8,[`actions`])],64)):(0,u.createCommentVNode)(``,!0)]),_:1}))}});function ar({seedViews:e,state:t,storageAdapter:n}){let r=(0,m.useI18n)(),i=(0,u.shallowRef)(d());(0,b.assert)(i.value.length>0,`At least 1 view is required`);let a=(0,y.useRouteQuery)(`view`,null),o={name:()=>r.t(`action.custom_view.group_name`),priority:_.GroupPriority.VIEW},s=(0,u.computed)(()=>i.value.find(e=>e.id===a.value)??i.value[0]),c=(0,u.computed)(()=>t.some(e=>{let t=s.value.state[e.key],n=t==null?null:e.deserialize(t);return e.isDirty(n,e.getCurrentState())}));function l(e,t){return t.some(t=>t.id===e.id)}function d(){let t=n.load();return[...e.filter(e=>!l(e,t)),...t]}function f(e){let t=new Set(i.value.map(e=>e.id)),n=b.StringUtil.slugify(e.name),r=n,a=1;for(;t.has(r);)r=`${n}-${a}`,a++;let o={id:r,isEditable:!0,name:e.name,color:e.color,icon:e.icon,state:ee()};i.value=[...i.value,o],C(),g(r)}function p(){let e=s.value;e.isEditable&&(i.value=i.value.map(t=>t.id===e.id?{...t,state:ee()}:t),C())}function h(e){a.value===e&&(a.value=null),i.value=i.value.filter(t=>t.id!==e),C()}function g(e){a.value=e}function x(e,t){i.value=i.value.map(n=>n.id===e?{...n,...t}:n),C()}function S(e){i.value=e,C()}function ee(){let e={};for(let n of t){let t=n.getCurrentState();e[n.key]=n.serialize(t)}return e}function C(){n.save(i.value)}function w(e){te(e)}function te(e){for(let n of t){let t=e.state[n.key],r=t==null?null:n.deserialize(t);n.apply(r)}}(0,u.watch)(s,w,{immediate:!0});for(let e=0;e<9;e+=1)(0,v.useHotkey)({key:`${e+1}`,shift:!0},()=>{let t=i.value[e]??null;t!==null&&g(t.id)},{conflictBehavior:`replace`}),(0,v.useHotkey)({key:`${e+1}`},()=>{let t=i.value[e]??null;t!==null&&g(t.id)},{conflictBehavior:`replace`});let ne={isDirty:c,actionGroup:o,activeView:s,createView:f,deleteView:h,reorderViews:S,saveToCurrentView:p,setActiveView:g,updateViewMeta:x,views:(0,u.computed)(()=>i.value)};return Yn(ne),ne}exports.CUSTOM_VIEW_COLOR=E,exports.CUSTOM_VIEW_COLORS_MAP=ie,exports.CUSTOM_VIEW_ICON=D,exports.CUSTOM_VIEW_ICONS_MAP=se,exports.CustomViewColorPicker=oe,exports.CustomViewCreateDialog=pe,exports.CustomViewIconPicker=fe,exports.CustomViewList=ir,exports.CustomViewUpdateDialog=me,exports.createCustomViewFilterStateAdapter=te,exports.createCustomViewLocalStorageAdapter=re,exports.createCustomViewSearchStateAdapter=ne,exports.createCustomViewStateAdapter=x,exports.createCustomViewTableColumnsStateAdapter=T,exports.getCustomViewColor=ae,exports.getCustomViewIconComponent=ce,exports.useCustomViewManager=ar,exports.useInjectCustomViewManagerContext=Xn,exports.useProvideCustomViewManagerContext=Yn;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './adapters/state/customViewFilterStateAdapter';
|
|
2
|
+
export * from './adapters/state/customViewSearchStateAdapter';
|
|
3
|
+
export * from './adapters/state/customViewTableColumnsStateAdapter';
|
|
4
|
+
export * from './adapters/storage/customViewLocalStorageAdapter';
|
|
5
|
+
export { default as CustomViewColorPicker } from './components/CustomViewColorPicker';
|
|
6
|
+
export { default as CustomViewCreateDialog } from './components/CustomViewCreateDialog';
|
|
7
|
+
export { default as CustomViewIconPicker } from './components/CustomViewIconPicker';
|
|
8
|
+
export { default as CustomViewUpdateDialog } from './components/CustomViewUpdateDialog';
|
|
9
|
+
export { default as CustomViewList } from './components/views/CustomViewViews';
|
|
10
|
+
export * from './composables/customViewManager.composable';
|
|
11
|
+
export * from './context/customViewManager.context';
|
|
12
|
+
export * from './types/customView.type';
|
|
13
|
+
export * from './types/customViewColor.type';
|
|
14
|
+
export * from './types/customViewIcon.type';
|
|
15
|
+
export * from './types/customViewStateAdapter.type';
|
|
16
|
+
export * from './types/customViewStorageAdapter.type';
|
|
17
|
+
export * from './utils/customViewColor.util';
|
|
18
|
+
export * from './utils/customViewIcon.util';
|