doph-js 0.3.2 → 0.3.3
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/dophJs.js +1 -1
- package/dist/dophJs.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/dophJs.js
CHANGED
|
@@ -1010,7 +1010,7 @@ const q = Lo(), v = {
|
|
|
1010
1010
|
for (let y = 0; y < n.items.length; y++)
|
|
1011
1011
|
n.items[y].id === p && v.actions.toggleItem(r, n.items[y]), n.items[y].expanded = !0;
|
|
1012
1012
|
}, g = (p = null) => {
|
|
1013
|
-
|
|
1013
|
+
v.mutations.setItemSelect(r, p.model), n.doubleClickExpand || v.actions.toggleItem(r, p.model), o("select", p);
|
|
1014
1014
|
}, _ = (p = null) => {
|
|
1015
1015
|
n.doubleClickExpand && v.actions.toggleItem(r, p.model), o("doubleclick", p);
|
|
1016
1016
|
}, D = (p = null) => {
|
package/dist/dophJs.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h.DophJs={},h.Vue))})(this,function(h,e){"use strict";const qn="",Gn="",Zn="",Kn="",Jn="",j={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String,className:String},setup(o){const t=o,n=e.useSlots(),l=e.computed(()=>{const{className:c}=t;return c===void 0?"icon":["icon",c].join(" ")}),s=e.computed(()=>{const{color:c}=t;return c===void 0?null:c}),a=e.computed(()=>{const c=t.size??null;if(c!==void 0)return typeof c=="number"||/^\d+$/.test(c)?`${c}px`:c}),i=e.computed(()=>e.h("i",{class:l.value,style:{color:s.value,fontSize:a.value}},t.component?e.h(t.component):n));return(c,r)=>(e.openBlock(),e.createBlock(e.unref(i)))}},O={state:{},getters:{getIcon(o){return O.state[o]},getIcons(){return O.state}},mutations:{addIcon(o,t){O.state.name=t},addIcons(o){for(const t in o)o.hasOwnProperty(t)&&(O.state[t]=o[t])}}};function be(o){const t=o.value.getBoundingClientRect();let n=o.value,l=0,s=0;for(;n&&!isNaN(n.offsetLeft)&&!isNaN(n.offsetTop);)l+=n.offsetLeft-n.scrollLeft,s+=n.offsetTop-n.scrollTop,n=n.offsetParent;return{top:s,left:l,x:t.x,y:t.y,width:t.width,height:t.height}}function ct(){function o(s){return s*Math.random()|0}function t(){return o(16).toString(16)}function n(s){let a="";for(let i=0;i<s;++i)a+=t();return a}function l(){return(o(16)&3|8).toString(16)}return n(8)+"-"+n(4)+"-4"+n(3)+"-"+l()+n(3)+"-"+n(12)}const Qn="",F=(o,t)=>{const n=o.__vccOpts||o;for(const[l,s]of t)n[l]=s;return n},dt={key:0,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},pt=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],mt={key:1},ft={key:2,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},ut=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],H=F({__name:"DButton",props:{class:String,style:[String,Object],icon:String,scale:String,type:String,outline:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click","contextmenu"],setup(o,{expose:t,emit:n}){const l=o,s=e.useSlots(),a=e.ref(null),i=e.computed(()=>l.icon?O.getters.getIcon(l.icon):null),c=k=>{n("click",k)},r=k=>{n("contextmenu",k)},d=e.computed(()=>l.scale==="large"?"button-lg":l.scale==="small"?"button-sm":""),p=e.computed(()=>l.disabled?"disabled":""),u=k=>!!s[k],_=e.computed(()=>u("default")?"":l.scale==="large"?"d-button-lg-icon":l.scale==="small"?"d-button-sm-icon":"d-button-icon"),B=e.computed(()=>{const k=l.outline?"-outline":"";return l.type==="primary"?`button${k}-blue`:l.type==="success"?`button${k}-green`:l.type==="error"?`button${k}-red`:l.type==="warning"?`button${k}-orange`:l.type==="wait"?`button${k}-violet`:l.outline?`button${k}`:""});return t({elementSize:()=>be(a)}),(k,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button",[l.class,d.value,B.value,p.value].join(" ")])},[e.renderSlot(k.$slots,"default",{},void 0,!0),l.loading?(e.openBlock(),e.createElementBlock("svg",dt,pt)):e.createCommentVNode("",!0)],34)),i.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button button-ext",[l.class,d.value,_.value,B.value,p.value].join(" ")]),style:e.normalizeStyle(l.style)},[l.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j),{key:0,component:i.value,color:"inherit"},null,8,["component"])):e.createCommentVNode("",!0),e.unref(s).default?(e.openBlock(),e.createElementBlock("div",mt,[e.renderSlot(k.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),l.loading?(e.openBlock(),e.createElementBlock("svg",ft,ut)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-e5cd6ccd"]]),ol="",ht={key:0,class:"d-input"},gt={key:0,class:"label"},yt=["type","placeholder"],_t={key:1,class:"d-input",style:{display:"flex","flex-direction":"column"}},kt={key:0,class:"label"},bt={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},Bt={style:{flex:"1"}},St=["type","placeholder"],xt={key:2,class:"d-input",style:{display:"flex","flex-direction":"column"}},wt={key:0,class:"label"},Dt={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},Ct={style:{flex:"1"}},$t=["type","placeholder"],Et=F({__name:"DInput",props:{label:String,placeholder:String,scale:String,modelValue:String,password:Boolean,pre:Object,post:Object,focus:Boolean},emits:["update:modelValue"],setup(o,{expose:t,emit:n}){const l=o,s=e.ref(null),a=e.computed(()=>l.scale==="small"?"d-input-small":l.scale==="large"?"d-input-large":""),i=e.computed({get:()=>l.modelValue,set:r=>{n("update:modelValue",r)}});e.onMounted(()=>{l.focus&&c()});const c=()=>{s.value.focus()};return t({focus:c}),(r,d)=>!l.post&&!l.pre?(e.openBlock(),e.createElementBlock("div",ht,[l.label?(e.openBlock(),e.createElementBlock("div",gt,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":d[0]||(d[0]=p=>i.value=p),type:l.password?"password":"text",class:e.normalizeClass(a.value),placeholder:l.placeholder,style:{width:"100%"}},null,10,yt),[[e.vModelDynamic,i.value]])])):l.post&&l.post.click&&!l.pre?(e.openBlock(),e.createElementBlock("div",_t,[l.label?(e.openBlock(),e.createElementBlock("div",kt,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",bt,[e.createElementVNode("div",Bt,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:s,class:e.normalizeClass(["d-input-post-field",a.value]),"onUpdate:modelValue":d[1]||(d[1]=p=>i.value=p),type:l.password?"password":"text",placeholder:l.placeholder,style:{width:"100%"}},null,10,St),[[e.vModelDynamic,i.value]])]),l.post.label?(e.openBlock(),e.createBlock(H,{key:0,scale:l.scale,class:e.normalizeClass(["d-input-post-button",l.post.class]),onClick:l.post.click,icon:l.post.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.post.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:l.scale,class:e.normalizeClass(["d-input-post-button",l.post.class]),onClick:l.post.click,icon:l.post.icon},null,8,["scale","onClick","icon","class"]))])])):!l.post&&l.pre&&l.pre.click?(e.openBlock(),e.createElementBlock("div",xt,[l.label?(e.openBlock(),e.createElementBlock("div",wt,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Dt,[l.pre.label?(e.openBlock(),e.createBlock(H,{key:0,scale:l.scale,class:e.normalizeClass(["d-input-pre-button",l.pre.class]),onClick:l.pre.click,icon:l.pre.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.pre.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:l.scale,class:e.normalizeClass(["d-input-pre-button",l.pre.class]),onClick:l.pre.click,icon:l.pre.icon},null,8,["scale","onClick","icon","class"])),e.createElementVNode("div",Ct,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:s,class:e.normalizeClass(["d-input-pre-field",a.value]),"onUpdate:modelValue":d[2]||(d[2]=p=>i.value=p),type:l.password?"password":"text",placeholder:l.placeholder,style:{width:"100%"}},null,10,$t),[[e.vModelDynamic,i.value]])])])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-a972038a"]]),Be={__name:"DBadge",props:{scale:String,type:String,class:String,stress:{type:Boolean,default:!1}},setup(o){const t=o,n=e.computed(()=>t.scale==="large"?"badge-lg":t.scale==="small"?"badge-sm":""),l=e.computed(()=>{const s=t.stress?"-stress":"";return t.type==="primary"?`badge${s}-blue`:t.type==="success"?`badge${s}-green`:t.type==="error"?`badge${s}-red`:t.type==="warning"?`badge${s}-orange`:t.type==="wait"?`badge${s}-violet`:t.stress?`badge${s}-gray`:""});return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",[t.class,n.value,l.value].join(" ")])},[e.renderSlot(s.$slots,"default")],2))}},X="0px",Se={__name:"DCollapse",props:{duration:{type:Number,default:200},easingEnter:{type:String,default:"ease-in-out"},easingLeave:{type:String,default:"ease-in-out"},opacityClosed:{type:Number,default:0},opacityOpened:{type:Number,default:1}},setup(o){const t=o,n=r=>({height:r==null?void 0:r.style.height,width:r==null?void 0:r.style.width,position:r==null?void 0:r.style.position,visibility:r==null?void 0:r.style.visibility,overflow:r==null?void 0:r.style.overflow,paddingTop:r==null?void 0:r.style.paddingTop,paddingBottom:r==null?void 0:r.style.paddingBottom,borderTopWidth:r==null?void 0:r.style.borderTopWidth,borderBottomWidth:r==null?void 0:r.style.borderBottomWidth,marginTop:r==null?void 0:r.style.marginTop,marginBottom:r==null?void 0:r.style.marginBottom}),l=(r,d)=>{const{width:p}=getComputedStyle(r);r.style.width=p,r.style.position="absolute",r.style.visibility="hidden",r.style.height="";let{height:u}=getComputedStyle(r);return r.style.width=d.width,r.style.position=d.position,r.style.visibility=d.visibility,r.style.height=X,r.style.overflow="hidden",d.height&&d.height!==X?d.height:u},s=(r,d,p,u,_)=>{const B=r.animate(u,_);r.style.height=d.height,B.onfinish=()=>{r.style.overflow=d.overflow,p()}},a=(r,d)=>[{height:X,opacity:t.opacityClosed,paddingTop:X,paddingBottom:X,borderTopWidth:X,borderBottomWidth:X,marginTop:X,marginBottom:X},{height:r,opacity:t.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom}],i=(r,d)=>{const p=r,u=n(p),_=l(p,u),B=a(_,u),C={duration:t.duration,easing:t.easingEnter};s(p,u,d,B,C)},c=(r,d)=>{const p=r,u=n(p),{height:_}=getComputedStyle(p);p.style.height=_,p.style.overflow="hidden";const B=a(_,u).reverse(),C={duration:t.duration,easing:t.easingLeave};s(p,u,d,B,C)};return(r,d)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:i,onLeave:c},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3}))}},K={data:void 0},re=o=>o.reduce((t,n)=>(t[n]=n)&&t,{}),I=re(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),Tt=re(["copy","move","link","none"]),Nt=re(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),ie={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:o=>o in Tt},effectAllowed:{validator:o=>o in Nt},image:String,imageXOffset:{type:Number,default:0},imageYOffset:{type:Number,default:0},hideImageHtml:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(o){const t=o,n=e.useSlots(),l=e.ref(!1),s=e.computed(()=>l&&t.transferData),a=e.computed(()=>({position:"fixed",top:"-1000px"})),i=(c,r)=>{const d=r.dataTransfer;if([I.dragenter,I.dragover].includes(c)&&t.dropEffect&&(d.dropEffect=t.dropEffect),c===I.dragstart){if(t.effectAllowed&&(d.effectAllowed=t.effectAllowed),t.image||n.image){let p;t.image?(p=new Image,p.src=t.image):n.image&&(p=n.image[0].elm),d.setDragImage&&d.setDragImage(p,t.imageXOffset,t.imageYOffset)}t.transferData!==void 0&&(K.data=t.transferData,r.dataTransfer.setData("text","")),l.value=!0}};return(c,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{draggable:t.draggable,onDrag:r[0]||(r[0]=d=>i(e.unref(I).drag,d)),onDragstart:r[1]||(r[1]=e.withModifiers(d=>i(e.unref(I).dragstart,d),["stop"])),onDragenter:r[2]||(r[2]=d=>i(e.unref(I).dragenter,d)),onDragleave:r[3]||(r[3]=d=>i(e.unref(I).dragleave,d)),onDragend:r[4]||(r[4]=d=>i(e.unref(I).dragend,d))},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{transferData:s.value}),o.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(a.value)},[e.renderSlot(c.$slots,"image",{transferData:s.value})],4)):e.renderSlot(c.$slots,"image",{key:1,transferData:s.value})]),_:3},40,["draggable"]))}},ll="",Vt=o=>(e.pushScopeId("data-v-9da49c73"),o=o(),e.popScopeId(),o),Lt={key:0,style:{display:"none"}},It={key:1},Mt=[Vt(()=>e.createElementVNode("div",{class:"tree-divider"},null,-1))],zt={key:2},Rt={class:"tree-divider-header"},Ot={class:"item-title"},At={key:0,class:"tree-divider"},Ft={key:1},Ht={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},Pt={key:0,class:"sub-menu"},xe=F({__name:"DTreeItem",props:{model:Object,treeId:[String,Number],items:Array,search:String,component:Object},emits:["nodedrop","nodedragover","nodedragleave","nodeclick","nodecontext","nodedoubleclick","nodefoldericonclick"],setup(o,{emit:t}){const n=o,l=e.ref(null),s=e.ref(!1),a=e.ref(!1),i=e.ref(!1),c=e.computed(()=>n.model.children&&n.model.children.length),r=e.computed(()=>(g.actions.isTreeExpanded(n.treeId)&&(n.model.expanded=n.model.expanded===void 0?!0:n.model.expanded),n.model.expanded)),d=D=>{t("nodeclick",{event:D,model:n.model})},p=D=>{t("nodefoldericonclick",{event:D,model:n.model})},u=D=>{t("nodefoldericonclick",D)},_=D=>{t("nodeclick",D)},B=D=>{t("nodedoubleclick",D)},C=D=>{t("nodedrop",D)},k=D=>{t("nodecontext",D)},E=e.computed(()=>[g.actions.isItemSelected(n.treeId,n.model.id)?"selected":"",s.value?"node-over ":"",a.value?"node-top ":"",i.value?"node-bottom ":""]),M=e.computed(()=>n.search?!1:n.model.draggable===!0),w=D=>{var L;let b=K.data;if(b===void 0||b.model===void 0)return s.value=!1,!1;if(b.model.id===n.model.id||g.actions.isChildOfParent(n.treeId,n.items,n.model.id,b.model.id)||g.actions.isParentOfChild(n.treeId,n.items,b.model.id,n.model.id))return s.value=!1,a.value=!1,i.value=!1,!1;if(!g.state.trees[n.treeId].transfer&&b.id!==n.treeId||!g.state.trees[n.treeId].dropInside&&!i.value&&!a.value)return!1;let T="";a.value?T="before":i.value?T="after":T="inside",t("nodedrop",{e:D,model:n.model,place:T}),g.actions.moveTreeNode(b.id,n.treeId,n.items,b.model.id,n.model.id,T,(L=b.model)==null?void 0:L.transfer),s.value=!1,a.value=!1,i.value=!1},x=D=>{t("nodedragover",{e:D,model:n.model});let b=K.data;if(!n.model.droppable)return!1;if(b===void 0||b.model===void 0)return s.value=!0,!1;if(b.model.id===n.model.id||g.actions.isChildOfParent(n.treeId,n.items,n.model.id,b.model.id)||g.actions.isParentOfChild(n.treeId,n.items,b.model.id,n.model.id))return!1;const T=D.y,L=l.value.getBoundingClientRect().top,f=l.value.getBoundingClientRect().height,m=f/3;T>L&&T<=L+m?(s.value=!1,a.value=!0,i.value=!1):T<L+f&&T>=L+f-m?(s.value=!1,a.value=!1,i.value=!0):(s.value=g.state.trees[n.treeId].dropInside,a.value=!1,i.value=!1)},N=()=>{s.value=!1,a.value=!1,i.value=!1},S=e.computed(()=>n.model.title.startsWith("-")),V=e.computed(()=>{if(n.model.title.startsWith("-")){let[D,...b]=n.model.title.split(" ");return b=b.join(" "),b}return null});return(D,b)=>{const T=e.resolveComponent("d-tree-item",!0),L=e.resolveDirective("touch");return e.unref(g).actions.beforeItem(n.treeId,o.model)?S.value&&!V.value?(e.openBlock(),e.createElementBlock("li",It,Mt)):S.value&&V.value?(e.openBlock(),e.createElementBlock("li",zt,[e.createElementVNode("div",Rt,e.toDisplayString(e.unref(g).actions.renderTitle(n.treeId,V.value)),1)])):n.model.component?(e.openBlock(),e.createBlock(ie,{key:3,tag:"li",class:"tree-item-component","transfer-data":{id:n.treeId,model:n.model},draggable:M.value,onDrop:e.withModifiers(w,["stop"]),onDragenter:b[1]||(b[1]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(x,["prevent","stop"]),onDragleave:e.withModifiers(N,["prevent"])},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"node",ref:l,class:e.normalizeClass(E.value),onContextmenu:b[0]||(b[0]=e.withModifiers(f=>t("nodecontext",{e:f,model:n.model}),["prevent"]))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(G).getters.getComponent(n.model.component).component),e.normalizeProps(e.guardReactiveProps(e.unref(G).getters.getComponent(n.model.component).props)),null,16))],34)),[[L,d,"press"]])]),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])):(e.openBlock(),e.createBlock(ie,{key:4,tag:"li",class:"tree-item","transfer-data":{id:n.treeId,model:n.model},draggable:M.value,onDrop:e.withModifiers(w,["stop"]),onDragenter:b[4]||(b[4]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(x,["prevent","stop"]),onDragleave:e.withModifiers(N,["prevent"])},{default:e.withCtx(()=>{var f,m;return[e.createElementVNode("div",{ref_key:"node",ref:l,class:e.normalizeClass(E.value),onPointerdownCapture:d,onDblclick:b[2]||(b[2]=e.withModifiers(y=>t("nodedoubleclick",{e:y,model:n.model}),["prevent"])),onContextmenu:b[3]||(b[3]=e.withModifiers(y=>t("nodecontext",{e:y,model:n.model}),["prevent"]))},[e.createElementVNode("div",null,[n.model.icons&&n.model.icons.pre&&c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j),{key:0,component:e.unref(O).getters.getIcon(n.model.icons.pre.component),size:18,color:n.model.icons.pre.color?n.model.icons.pre.color:"inherit",class:e.normalizeClass(r.value?"tree-open-pre":""),onPointerdownCapture:p},null,40,["component","color","class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.pre&&!c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j),{key:1,component:e.unref(O).getters.getIcon(n.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(r.value?"tree-open-pre":"")},null,8,["component","class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.icon&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j),{key:2,component:e.unref(O).getters.getIcon(n.model.icons.icon.component),color:n.model.icons.icon.color?n.model.icons.icon.color:"inherit",size:n.model.icons.icon.size?n.model.icons.icon.size:null,className:n.model.icons.icon.class?n.model.icons.icon.class:null},null,8,["component","color","size","className"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ot,[S.value?(e.openBlock(),e.createElementBlock("div",At)):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ft,e.toDisplayString(e.unref(g).actions.renderTitle(n.treeId,n.model.title)),1))])]),e.createElementVNode("div",Ht,[((f=n.model.badge)==null?void 0:f.value)!==void 0&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Be),{key:0,class:e.normalizeClass([(m=n.model.badge)==null?void 0:m.class,"badge-sm"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.model.badge.value),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.post&&c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j),{key:1,component:e.unref(O).getters.getIcon(n.model.icons.post.component),size:20,color:n.model.icons.post.color?n.model.icons.post.color:"inherit",class:e.normalizeClass(r.value?"tree-open-post":""),onPointerdownCapture:p},null,40,["component","color","class"])):e.createCommentVNode("",!0)])],34),e.createVNode(Se,null,{default:e.withCtx(()=>[c.value&&r.value&&!n.search?(e.openBlock(),e.createElementBlock("ul",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.model.children,y=>(e.openBlock(),e.createBlock(T,{key:y.id,model:y,treeId:n.treeId,items:n.items,search:n.search,onNodeclick:_,onNodedoubleclick:B,onNodedrop:C,onNodecontext:k,onNodefoldericonclick:u},null,8,["model","treeId","items","search"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])):(e.openBlock(),e.createElementBlock("li",Lt))}}},[["__scopeId","data-v-9da49c73"]]);function we(o){return o=o||new Map,{all:o,on(t,n){const l=o.get(t);l?l.push(n):o.set(t,[n])},off(t,n){const l=o.get(t);l&&(n?l.splice(l.indexOf(n)>>>0,1):o.set(t,[]))},emit(t,n){let l=o.get(t);l&&l.slice().map(s=>{s(n)}),l=o.get("*"),l&&l.slice().map(s=>{s(t,n)})}}}const z=we(),g={state:e.reactive({trees:{}}),getters:{getItems(o){return g.state.trees[o].items},getItemsSelect(o){return g.state.trees[o].selected},getParentId(o,t,n,l="id",s="children",a={}){return n&&o&&(o.find(i=>i[l]===n?(a.found=t,i):g.getters.getParentId(i[s],i.id,n,l,s,a)),a.found)?a.found:!1}},mutations:{setTreeItems(o,t){g.state.trees[o].items=t},setItemSelect(o,t){g.state.trees[o].noSelect||(g.state.trees[o].multiSelect?g.state.trees[o].selected.includes(t.id)?g.state.trees[o].selected=g.state.trees[o].selected.filter(function(n){return n!==t.id}):g.state.trees[o].selected=[...g.state.trees[o].selected,t.id]:g.state.trees[o].selected=[t.id])}},actions:{initTreeStore(o,t,n,l,s,a,i,c=!0){g.state.trees[o]=[],g.state.trees[o].selected=[],g.state.trees[o].noSelect=t,g.state.trees[o].multiSelect=n,g.state.trees[o].expanded=l,g.state.trees[o].transfer=s,g.state.trees[o].renderTitle=a,g.state.trees[o].beforeItem=i,g.state.trees[o].dropInside=c},renderTitle(o,t){return g.state.trees[o].renderTitle?g.state.trees[o].renderTitle(t):t},beforeItem(o,t){return g.state.trees[o].beforeItem?g.state.trees[o].beforeItem(t):!0},isItemSelected(o,t){return g.state.trees[o].selected.includes(t)},toggleItem(o,t){t.expanded=t.expanded===void 0||!t.expanded,t.children&&t.children.length&&(t.expanded?z.emit(`expand-${o}`,{id:o,model:t}):z.emit(`collapse-${o}`,{id:o,model:t}))},isTreeExpanded(o){return g.state.trees[o].expanded},isChildOfParent(o,t,n,l){const s=g.actions.deepSearch(t,n);if(s&&s.children){for(let a=0;a<s.children.length;a++)if(s.children[a].id===l)return!0}return!1},isParentOfChild(o,t,n,l){const s=g.actions.deepSearch(t,n);return!!(s&&s.children&&g.actions.deepSearch(s.children,l))},deepSearch(o,t,n="id",l="children",s={}){return t&&o&&(o.find(a=>a[n]===t?(s.found=a,a):g.actions.deepSearch(a[l],t,n,l,s)),s.found)?s.found:!1},deepSearchByTitle(o,t,n="title",l="children",s=[]){if(t&&o&&(o.find(a=>{const i=new RegExp(t,"gi");a[n].toString().toLowerCase().match(i)!==null&&s.push(a),g.actions.deepSearchByTitle(a[l],t,n,l,s)}),s)){for(let a=0;a<s.length;a++);return s}return s},moveTreeNode(o,t,n,l,s,a,i=!0){if(i){const c=g.actions.deleteTreeNode(n,l);g.actions.insertTreeNode(n,s,c,a),z.emit(`move-${t}`,{fromTreeId:o,toTreeId:t,moved:c==null?void 0:c.id,target:s,position:a})}else z.emit(`move-${t}`,{fromTreeId:o,toTreeId:t,moved:l,target:s,position:a})},insertTreeNode(o,t,n,l){if(o)for(let s=0;s<o.length;s++){if(o[s].id===t){let i=s;return l==="after"?(i++,o.splice(i,0,n)):l==="before"?o.splice(i,0,n):l==="inside"&&(Object.hasOwn(o[s],"children")||(o[s].children=[],o[s].opened=!0),o[s].children.splice(0,0,n)),o[s]}const a=this.insertTreeNode(o[s].children,t,n,l);if(a)return a}},deleteTreeNode(o,t){if(o)for(let n=0;n<o.length;n++){if(o[n].id===t){const s=o[n];return o.splice(n,1),s}const l=g.actions.deleteTreeNode(o[n].children,t);if(l)return l}}}},De={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(I),setup(o,{expose:t,emit:n}){let l=e.reactive({});const s=e.ref("false"),a=e.ref(null),i=new Set,c=e.computed(()=>s.value&&l),r=(p,u)=>{l=K.data,n(p,u,l),p===I.dragenter&&(i.size||u.target===a.value)&&i.add(u.target),p===I.dragleave&&i.delete(u.target),p===I.drop&&i.clear(),s.value=!!i.size};return t({elementSize:()=>be(a)}),(p,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{ref_key:"el",ref:a,onDragenter:u[0]||(u[0]=_=>r(e.unref(I).dragenter,_)),onDragleave:u[1]||(u[1]=_=>r(e.unref(I).dragleave,_)),onDragover:u[2]||(u[2]=e.withModifiers(_=>r(e.unref(I).dragover,_),["prevent"])),onDrop:u[3]||(u[3]=e.withModifiers(_=>r(e.unref(I).drop,_),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default",{transferData:c.value})]),_:3},544))}},ce={__name:"DMenu",props:{class:String,items:Array,style:[String,Object],noSelect:{type:Boolean,default:!0},renderItemTitle:Function,beforeItem:Function,bodyAsParent:{type:Boolean,default:!0}},emits:["select"],setup(o,{expose:t,emit:n}){const l=o;let s=e.ref(null),a=e.ref(!1);const i=()=>{z.emit("menu-show-request"),a.value=!0},c=()=>{var _;(_=s.value)==null||_.collapseAll(),a.value=!1},r=()=>a.value;z.on("menu-show-request",()=>{c()}),t({show:i,hide:c,elementSize:()=>s.value.elementSize(),isShowed:r,itemsCount:()=>s.value.itemsCount()});const u=_=>{n("select",_),_.model.children||c()};return(_,B)=>{const C=e.resolveDirective("click-outside");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.unref(a)?e.withDirectives((e.openBlock(),e.createBlock(de,{key:0,ref_key:"treeRef",ref:s,items:l.items,"no-select":l.noSelect,class:e.normalizeClass(l.class),style:e.normalizeStyle(l.style),onSelect:u,"render-title":l.renderItemTitle,"before-item":l.beforeItem},null,8,["items","no-select","class","style","render-title","before-item"])),[[C,()=>c()]]):e.createCommentVNode("",!0)])}}},Ce={__name:"DContextMenu",props:{items:Array,renderItemTitle:Function,beforeItem:Function},emits:["select"],setup(o,{expose:t,emit:n}){const l=o,s=e.ref(null),a=e.ref(0),i=e.ref(0),c=e.computed(()=>({left:a.value+"px",top:i.value+"px"})),r=p=>{s.value.show(),e.nextTick(()=>{const u=s.value.elementSize(),_=window.innerWidth,B=window.innerHeight;a.value=_-p.pageX<u.width?p.pageX-u.width:p.pageX,i.value=B-p.pageY<u.height?p.pageY-u.height:p.pageY,s.value.itemsCount()===0&&s.value.hide()})},d=p=>{n("select",p)};return t({show:r}),(p,u)=>(e.openBlock(),e.createBlock(ce,{ref_key:"dMenuRef",ref:s,onSelect:d,items:l.items,style:e.normalizeStyle(c.value),class:"context-menu","no-select":!0,"render-item-title":l.renderItemTitle,"before-item":l.beforeItem},null,8,["items","style","render-item-title","before-item"]))}},de={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:{type:Boolean,default:!0},dropInside:{type:Boolean,default:!0},doubleClickExpand:{type:Boolean,default:!1},renderTitle:Function,beforeItem:Function,search:String,context:Array,contextClick:{type:Function,default:()=>{}},contextBeforeClick:{type:Function,default:()=>!0}},emits:["select","collapse","expand","move","over","drop","doubleclick","foldericonclick"],setup(o,{expose:t,emit:n}){const l=o,s=e.ref(null),a=e.ref(!1),i=e.ref(null),c=e.getCurrentInstance().uid;g.actions.initTreeStore(c,l.noSelect,l.multiSelect,l.expanded,l.transfer,l.renderTitle,l.beforeItem,l.dropInside);const r=(m,y)=>{console.log(m,y)};z.on(`expand-${c}`,m=>{n("expand",m)}),z.on(`collapse-${c}`,m=>{n("collapse",m)}),z.on(`move-${c}`,m=>{n("move",m)});const d=e.computed(()=>l.search?g.actions.deepSearchByTitle(l.items,l.search):l.items),p=m=>{for(let y=0;y<l.items.length;y++)l.items[y].id===m&&g.actions.toggleItem(c,l.items[y]),l.items[y].expanded=!0},u=(m=null)=>{console.log(m.model),g.mutations.setItemSelect(c,m.model),l.doubleClickExpand||g.actions.toggleItem(c,m.model),n("select",m)},_=(m=null)=>{l.doubleClickExpand&&g.actions.toggleItem(c,m.model),n("doubleclick",m)},B=(m=null)=>{l.doubleClickExpand&&g.actions.toggleItem(c,m.model),n("foldericonclick",m)},C=(m=null)=>{n("over",m)},k=(m=null)=>{n("drop",m)},E=()=>s.value.elementSize(),M=()=>{for(let m=0;m<l.items.length;m++)l.items[m].expanded=!0},w=()=>{for(let m=0;m<l.items.length;m++)l.items[m].expanded=!1},x=()=>c,N=m=>g.actions.deepSearch(l.items,m),S=m=>{N(m)&&g.mutations.setItemSelect(c,N(m))},V=m=>{l.contextClick({e:m.e,model:m.model,target:i.value})},D=m=>l.contextBeforeClick({model:m,target:i.value}),b=e.computed(()=>l.context),T=m=>(b.value&&(i.value=m.model,a.value.show(m.e)),!1),L=()=>f(d.value),f=m=>{let y=0;for(let $=0;$<m.length;$++)y+=g.actions.beforeItem(c,m[$])?1:0,m[$].children&&m[$].children.length>0&&(y+=f(m[$].children));return y};return t({elementSize:E,expandAll:M,collapseAll:w,getId:x,getNode:N,selectNode:S,itemsCount:L,expandNode:p}),(m,y)=>(e.openBlock(),e.createBlock(De,{ref_key:"treeRef",ref:s,class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,$=>(e.openBlock(),e.createBlock(xe,{key:$.id,model:$,treeId:e.unref(c),items:l.items,search:l.search,onNodeclick:u,onNodedoubleclick:_,onNodedragover:C,onNodedrop:k,onNodecontext:T,onNodefoldericonclick:B},null,8,["model","treeId","items","search"]))),128)),b.value?(e.openBlock(),e.createBlock(Ce,{key:0,ref_key:"contextTreeRef",ref:a,items:b.value,onSelect:V,"before-item":D},null,8,["items"])):e.createCommentVNode("",!0)]),_:1},8,["onDrop"]))}},rl="",Wt=F({__name:"DAccordion",props:{items:Array,renderTitle:Function,noSelect:{type:Boolean,default:!0}},emits:["move"],setup(o,{emit:t}){const n=o,l=s=>{t("move",s)};return(s,a)=>(e.openBlock(),e.createBlock(de,{class:"accordion",items:n.items,"no-select":n.noSelect,"render-title":n.renderTitle,"drop-inside":!1,onMove:l},null,8,["items","no-select","render-title"]))}},[["__scopeId","data-v-a724c500"]]),$e={__name:"DLayoutHeader",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1001},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const t=o,n=e.computed(()=>{const{fixed:l,zIndex:s,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:d}=t,p=l?"fixed":"static",u=t.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${p};z-index:${s};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${d};`});return(l,s)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Ee={__name:"DLayoutTab",props:{fixed:{type:Boolean,default:!0},top:{type:Number,default:56},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const t=o,n=e.computed(()=>{const{fixed:l,top:s,zIndex:a,minWidth:i,height:c,paddingLeft:r,transitionDuration:d,transitionTimingFunction:p}=t,u=l?"fixed":"static",_=t.useMinWidthLayout?`min-width: ${i}px;`:"";return`position:${u};top:${s}px;z-index:${a};${_}height:${c}px;padding-left:${r}px;transition-duration:${d}ms;transition-timing-function:${p};`});return(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Te={__name:"DLayoutFooter",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const t=o,n=e.computed(()=>{const{fixed:l,zIndex:s,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:d}=t,p=l?"fixed":"static",u=t.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${p};z-index:${s};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${d};`});return(l,s)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Ne={__name:"DLayoutSidebar",props:{zIndex:{type:Number,default:1002},width:{type:Number,default:200},paddingTop:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1}},setup(o){const t=o,n=e.computed(()=>{const{zIndex:l,width:s,paddingTop:a,transitionDuration:i,transitionTimingFunction:c}=t;return`z-index:${l};width:${s}px;padding-top:${a}px;transition-duration:${i}ms;transition-timing-function:${c};`});return(l,s)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Ve={__name:"DLayoutContent",props:{paddingTop:{type:Number,default:0},paddingBottom:{type:Number,default:0},paddingLeft:{type:Number,default:0},overflowHidden:Boolean,transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"}},setup(o){const t=o,n=e.computed(()=>{const{paddingTop:l,paddingBottom:s,paddingLeft:a,transitionDuration:i,transitionTimingFunction:c}=t,r=`overflow:${t.overflowHidden?"hidden":"visible"};`;return`padding-top:${l}px;padding-bottom:${s}px;padding-left:${a}px;${r}transition-duration:${i}ms;transition-timing-function:${c};`});return(l,s)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(n.value),class:"d-layout-content"},[e.renderSlot(l.$slots,"default")],4))}};function jt(o){const t=e.ref(0),n=e.computed(()=>`transform: translateX(${-t.value}px);`);let l=!1;function s(p){t.value=p}function a(){var p;const u=((p=document.scrollingElement)===null||p===void 0?void 0:p.scrollLeft)||0;s(u)}function i(){a()}function c(){document.addEventListener("scroll",a)}function r(){l&&document.removeEventListener("scroll",a)}function d(){i(),c(),l=!0}return e.watch(o,p=>{p?d():r()},{immediate:!0}),e.onUnmounted(()=>{r()}),n}const Xt=1001,Yt=999,Ut=998,qt={__name:"DLayoutAdmin",props:{mode:{type:String,default:"vertical"},isMobile:{type:Boolean,default:!1},useMinWidthLayout:{type:Boolean,default:!1},minWidth:{type:Number,default:1200},headerVisible:{type:Boolean,default:!0},headerHeight:{type:Number,default:56},tabVisible:{type:Boolean,default:!0},tabHeight:{type:Number,default:44},fixedHeaderAndTab:{type:Boolean,default:!0},addMainOverflowHidden:{type:Boolean,default:!1},footerVisible:{type:Boolean,default:!0},footerHeight:{type:Number,default:48},fixedFooter:{type:Boolean,default:!0},sidebarVisible:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:200},sidebarCollapsedWidth:{type:Number,default:0},sidebarCollapse:{type:Boolean,default:!1},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1},maskBg:{type:String,default:"rgba(0,0,0,0.3)"}},emits:["update:sidebar-collapse","sidebar-mask-click"],setup(o,{emit:t}){const n=o,l=e.computed(()=>n.useMinWidthLayout?`min-width:${n.minWidth}px;`:""),s=e.computed(()=>n.useMinWidthLayout&&(n.fixedHeaderAndTab||n.fixedFooter)),a=jt(s),i=e.computed(()=>n.fixedHeaderAndTab?a.value:""),c=e.computed(()=>n.fixedFooter?a.value:""),r=e.computed(()=>{const{transitionDuration:S,transitionTimingFunction:V}=n;return{transitionDuration:S,transitionTimingFunction:V}}),d=e.computed(()=>n.mode==="vertical"),p=e.computed(()=>n.isMobile||d.value?1003:1e3),u=e.computed({get(){return n.sidebarCollapse},set(S){t("update:sidebar-collapse",S)}});function _(){t("sidebar-mask-click")}const B=e.computed(()=>n.isMobile&&!u.value),C=e.computed(()=>{const{transitionDuration:S,transitionTimingFunction:V}=n;return`background-color:${n.maskBg};transition-duration:${S}ms;transition-timing-function:${V};`}),k=e.computed(()=>{const{sidebarWidth:S,sidebarCollapsedWidth:V}=n,D=n.isMobile?0:V,b=u.value?D:S;return n.sidebarVisible?b:0}),E=e.computed(()=>n.isMobile?0:k.value),M=e.computed(()=>d.value?E.value:0),w=e.computed(()=>!n.isMobile&&!d.value&&n.headerVisible?n.headerHeight:0),x=e.computed(()=>{let S=0;return n.fixedHeaderAndTab&&(n.headerVisible&&(S+=n.headerHeight),n.tabVisible&&(S+=n.tabHeight)),S}),N=e.computed(()=>n.fixedFooter&&n.footerVisible?n.footerHeight:0);return(S,V)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(l.value)},[o.headerVisible?(e.openBlock(),e.createBlock($e,e.mergeProps({key:0},r.value,{fixed:o.fixedHeaderAndTab,"z-index":Xt,"min-width":o.minWidth,height:o.headerHeight,"padding-left":M.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(S.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),o.tabVisible?(e.openBlock(),e.createBlock(Ee,e.mergeProps({key:1},r.value,{fixed:o.fixedHeaderAndTab,"z-index":Yt,"min-width":o.minWidth,top:o.headerHeight,height:o.tabHeight,"padding-left":E.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(S.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),o.sidebarVisible?(e.openBlock(),e.createBlock(Ne,e.mergeProps({key:2},r.value,{"z-index":p.value,width:k.value,"padding-top":w.value}),{default:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle(C.value),onClick:_},null,4)):e.createCommentVNode("",!0),e.createVNode(Ve,e.mergeProps(r.value,{"padding-top":x.value,"padding-bottom":N.value,"padding-left":E.value,"overflow-hidden":o.addMainOverflowHidden}),{default:e.withCtx(()=>[e.renderSlot(S.$slots,"default")]),_:3},16,["padding-top","padding-bottom","padding-left","overflow-hidden"]),o.footerVisible?(e.openBlock(),e.createBlock(Te,e.mergeProps({key:4},r.value,{fixed:o.fixedFooter,"z-index":Ut,"min-width":o.minWidth,height:o.footerHeight,"padding-left":E.value,style:c.value}),{default:e.withCtx(()=>[e.renderSlot(S.$slots,"footer")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0)],4))}},U={state:e.reactive({theme:"dark"}),getters:{theme(){return U.state.theme}},mutations:{setTheme(o){U.state.theme=o,document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(o)}},actions:{toggleTheme(){U.state.theme=U.state.theme==="dark"?"light":"dark",document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(U.state.theme)}}},Gt={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(o){const t=o;return U.mutations.setTheme(t.theme),(n,l)=>e.renderSlot(n.$slots,"default")}},cl="",Zt={__name:"DScrollProvider",props:{xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(o){const t=o;e.useCssVars(a=>({e35a6f9a:n.value,e35a6f98:l.value}));const n=e.computed(()=>t.xHide?"hidden":"visible"),l=e.computed(()=>t.yHide?"hidden":"visible"),s=a=>{document.body.classList.add(a),document.documentElement.classList.add(a),document.documentElement.classList.add("d-global-scroll")};return e.onMounted(()=>{s("colored-scroller")}),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(a.$slots,"default")]))}},dl="",Kt=F({__name:"DScroll",props:{autoHide:{type:Boolean,default:!0},xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(o){const t=o;e.useCssVars(s=>({c07fa29a:n.value,c07fa298:l.value}));const n=e.computed(()=>t.xHide?"hidden":"visible"),l=e.computed(()=>t.yHide?"hidden":"visible");return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.autoHide?"d-scroll-hide":"d-scroll")},[e.renderSlot(s.$slots,"default",{},void 0,!0)],2))}},[["__scopeId","data-v-d50b3609"]]),Jt={class:"modal-content"},Qt={class:"modal-header"},vt={class:"modal-title"},eo={class:"modal-body"},to={class:"modal-footer"},pe={__name:"DModal",props:{show:Boolean,width:String,maxWidth:String},emits:["open","close"],setup(o,{expose:t,emit:n}){const l=o,s=e.ref(null),a=e.ref(!1);a.value=l==null?void 0:l.show;const i=()=>{a.value=!0,n("open",s)},c=()=>{a.value=!1,n("close",s)};return t({show:i,hide:c}),(r,d)=>{const p=e.resolveDirective("keydown");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[a.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:s,class:"modal"},[e.createElementVNode("div",{class:"modal-dialog",style:e.normalizeStyle({width:l.width,maxWidth:l.maxWidth})},[e.createElementVNode("div",Jt,[e.createElementVNode("div",Qt,[e.createElementVNode("h5",vt,[e.renderSlot(r.$slots,"modal-title")])]),e.createElementVNode("div",eo,[e.renderSlot(r.$slots,"default")]),e.createElementVNode("div",to,[e.renderSlot(r.$slots,"modal-footer")])])],4)])),[[p,c,"Escape"]]):e.createCommentVNode("",!0)]),_:3})])}}},q=e.shallowRef();function me(o){o===void 0&&(o=q.value.comp.returnValue()),q.value.resolve(o),q.value=null}function Le(o,t,n="default"){return new Promise(l=>{q.value={dialog:o,props:t,wrapper:n,resolve:l}})}var oo=(o,t)=>{const n=o.__vccOpts||o;for(const[l,s]of t)n[l]=s;return n};const no=e.defineComponent({name:"DialogWrapper",components:{},props:{name:{type:String,default:"default"},transitionAttrs:Object},setup(){const o=e.ref();return e.watch(o,()=>{q.value&&(q.value.comp=o.value)}),{dialogRef:q,dialogInstance:o}}});function lo(o,t,n,l,s,a){return e.openBlock(),e.createBlock(e.Transition,e.normalizeProps(e.guardReactiveProps(o.transitionAttrs)),{default:e.withCtx(()=>[o.dialogRef&&o.dialogRef.wrapper===o.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.dialogRef.dialog),e.mergeProps({key:0},o.dialogRef.props,{ref:"dialogInstance"}),null,16)):e.createCommentVNode("",!0)]),_:1},16)}var so=oo(no,[["render",lo]]);const ao={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Ie={__name:"DAlertDialog",props:{title:String,message:String},setup(o,{expose:t}){const n=o;return t({returnValue:()=>!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(pe,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",ao,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(me)())},{default:e.withCtx(()=>[e.createTextVNode("Закрыть")]),_:1})])]),_:1})]))}},ro={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Me={__name:"DConfirmDialog",props:{title:String,message:String},setup(o,{expose:t}){const n=o;return t({returnValue:()=>!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(pe,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",ro,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(me)())},{default:e.withCtx(()=>[e.createTextVNode("Да")]),_:1}),e.createVNode(H,{class:"button-red",onClick:a[1]||(a[1]=i=>e.unref(me)(!1))},{default:e.withCtx(()=>[e.createTextVNode("Нет")]),_:1})])]),_:1})]))}},io={class:"dropdown"},co={__name:"DDropdown",props:{class:String,icon:{type:[String,null],default:null},items:Array,menuStyle:Object,renderItemTitle:Function,beforeItem:Function,type:String,bodyAsParent:{type:Boolean,default:!0}},emits:["select","click"],setup(o,{expose:t,emit:n}){const l=o,s=e.useSlots(),a=e.ref(null),i=e.ref(null),c=e.ref(0),r=e.ref(0),d=B=>{if(n("click",B),a.value.isShowed()){a.value.hide();return}a.value.show(),e.nextTick(()=>{const C=a.value.elementSize(),k=i.value.elementSize(),E=window.innerWidth,M=window.innerHeight;c.value=E-(k.x+k.width)<C.width?k.left-C.width+k.width:k.left,r.value=M-(k.y+k.height)<C.height?k.top-C.height-5:k.height+k.top+5})},p=B=>{n("select",B)},u=e.computed(()=>({left:c.value+"px",top:r.value+"px",position:l.bodyAsParent?"absolute":"fixed",...l.menuStyle}));t({show:d});const _=B=>!!s[B];return(B,C)=>(e.openBlock(),e.createElementBlock("div",io,[_("default")?(e.openBlock(),e.createBlock(H,{key:0,ref_key:"buttonRef",ref:i,class:e.normalizeClass(l.class),icon:l.icon,onClick:e.withModifiers(d,["stop","prevent"]),type:l.type},{default:e.withCtx(()=>[e.renderSlot(B.$slots,"default")]),_:3},8,["class","icon","onClick","type"])):(e.openBlock(),e.createBlock(H,{key:1,ref_key:"buttonRef",ref:i,class:e.normalizeClass(l.class),icon:l.icon,onClick:e.withModifiers(d,["stop","prevent"]),type:l.type},null,8,["class","icon","onClick","type"])),e.createVNode(ce,{ref_key:"dMenuRef",ref:a,items:l.items,class:"dropdown-menu",style:e.normalizeStyle(u.value),"no-select":!0,onSelect:p,"render-item-title":l.renderItemTitle,"before-item":l.beforeItem,"body-as-parent":l.bodyAsParent},null,8,["items","style","render-item-title","before-item","body-as-parent"])]))}},po={},mo={class:"d-panel"};function fo(o,t){return e.openBlock(),e.createElementBlock("div",mo,[e.renderSlot(o.$slots,"default")])}const ze=F(po,[["render",fo]]),uo={class:"card-header"},ho={class:"modal-title"},go={class:"card-body"},yo={class:"card-footer"},_o={__name:"DCard",setup(o){return(t,n)=>(e.openBlock(),e.createBlock(ze,{class:"d-card"},{default:e.withCtx(()=>[e.createElementVNode("div",uo,[e.createElementVNode("h5",ho,[e.renderSlot(t.$slots,"title")])]),e.createElementVNode("div",go,[e.renderSlot(t.$slots,"default")]),e.createElementVNode("div",yo,[e.renderSlot(t.$slots,"footer")])]),_:3}))}},ko=new Map;class bo{constructor(t,n,l){this.remaining=n,this.callback=t,this.notifyItem=l,this.resume()}pause(){clearTimeout(this.notifyItem.timer),this.remaining-=Date.now()-this.start}resume(){this.start=Date.now(),clearTimeout(this.notifyItem.timer),this.notifyItem.timer=setTimeout(this.callback,this.remaining)}}const fe="[-+]?[0-9]*.?[0-9]+",Re=[{name:"px",regexp:new RegExp(`^${fe}px$`)},{name:"%",regexp:new RegExp(`^${fe}%$`)},{name:"px",regexp:new RegExp(`^${fe}$`)}],Bo=o=>{if(o==="auto")return{type:o,value:0};for(let t=0;t<Re.length;t++){const n=Re[t];if(n.regexp.test(o))return{type:n.name,value:parseFloat(o)}}return{type:"",value:o}},So=o=>{switch(typeof o){case"number":return{type:"px",value:o};case"string":return Bo(o);default:return{type:"",value:o}}},Oe={x:new Set(["left","center","right"]),y:new Set(["top","bottom"])},xo=(o=>()=>o++)(0),wo=o=>typeof o!="string"?[]:o.split(/\s+/gi).filter(Boolean),Do=o=>{typeof o=="string"&&(o=wo(o));let t=null,n=null;return o.forEach(l=>{Oe.y.has(l)&&(n=l),Oe.x.has(l)&&(t=l)}),{x:t,y:n}},ue={position:["top","right"],cssAnimation:"fade",velocityAnimation:{enter:o=>({height:[o.clientHeight,0],opacity:[1,0]}),leave:{height:0,opacity:[0,1]}}},Co={__name:"VelocityGroup",emits:["enter","leave","after-leave"],setup(o,{emit:t}){const n=(a,i)=>{t("enter",a,i)},l=(a,i)=>{t("leave",a,i)},s=()=>{t("after-leave")};return(a,i)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",css:!1,onEnter:n,onLeave:l,onAfterLeave:s},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},$o=Object.assign({inheritAttrs:!1},{__name:"CssGroup",props:{name:String},setup(o){const t=o;return(n,l)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",name:t.name},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["name"]))}}),Eo=["data-id"],To=["onClick"],No=["innerHTML"],Vo=["innerHTML"],Lo={key:0,class:"d-notification-title"},Io={class:"notification-content"},Mo={__name:"DNotificationProvider",props:{group:{type:String,default:""},width:{type:[String,Number],default:300},reverse:{type:Boolean,default:!1},position:{type:[String,Array,null],default:ue.position},classes:{type:String,default:"d-notification"},animationType:{type:String,default:"css"},animation:{type:[String,Object],default:ue.velocityAnimation},animationName:{type:String,default:ue.cssAnimation},speed:{type:Number,default:300},duration:{type:Number,default:3e3},delay:{type:Number,default:0},max:{type:Number,default:1/0},ignoreDuplicates:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!0},pauseOnHover:{type:Boolean,default:!1},dangerouslySetInnerHtml:{type:Boolean,default:!1}},emits:["click","destroy","start"],setup(o,{emit:t}){const n=o,l={IDLE:0,DESTROYED:2},s=e.ref([]),a=e.ref(null),i=e.ref(ko.get("velocity")),c=e.computed(()=>n.animationType==="velocity"),r=e.computed(()=>c.value?Co:$o),d=e.computed(()=>s.value.filter(f=>f.state!==l.DESTROYED)),p=e.computed(()=>So(n.width)),u=e.computed(()=>{const{x:f,y:m}=Do(n.position),y=p.value.value,$=p.value.type,Y={width:y+$};return m&&(Y[m]="0px"),f&&(f==="center"?Y.left=`calc(50% - ${+y/2}${$})`:Y[f]="0px"),Y}),_=e.computed(()=>"bottom"in u.value),B=f=>{t("click",f),n.closeOnClick&&N(f)},C=()=>{var f;n.pauseOnHover&&((f=a.value)==null||f.pause())},k=()=>{var f;n.pauseOnHover&&((f=a.value)==null||f.resume())},E=f=>{if(f.group||(f.group=""),f.data||(f.data={}),n.group!==f.group)return;if(f.clean||f.clear){V();return}const m=typeof f.duration=="number"?f.duration:n.duration,y=typeof f.speed=="number"?f.speed:n.speed,$=typeof f.ignoreDuplicates=="boolean"?f.ignoreDuplicates:n.ignoreDuplicates,{title:Y,text:te,type:oe,data:ne,id:le}=f,W={id:le||xo(),title:Y,text:te,type:oe,state:l.IDLE,speed:y,length:m+2*y,data:ne};m>=0&&(a.value=new bo(()=>N(W),W.length,W));const se=n.reverse?!_.value:_.value;let Z=-1;const ae=d.value.some(J=>J.title===f.title&&J.text===f.text);(!$||!ae)&&(se?(s.value.push(W),t("start",W),d.value.length>n.max&&(Z=0)):(s.value.unshift(W),t("start",W),d.value.length>n.max&&(Z=d.value.length-1)),Z!==-1&&N(d.value[Z]))},M=f=>{S(f)},w=f=>["d-notification-template",n.classes,f.type||""],x=f=>c.value?void 0:{transition:`all ${f.speed}ms`},N=f=>{clearTimeout(f.timer),f.state=l.DESTROYED,L(),t("destroy",f)},S=f=>{const m=s.value.find(y=>y.id===f);m&&N(m)},V=()=>{d.value.forEach(N)},D=(f,m)=>{var $;const y=($=n.animation)==null?void 0:$[f];return typeof y=="function"?y(m):y},b=(f,m)=>{if(!c.value)return;const y=D("enter",f);i.value(f,y,{duration:n.speed,complete:m})},T=(f,m)=>{if(!c.value)return;const y=D("leave",f);i.value(f,y,{duration:n.speed,complete:m})};function L(){s.value=s.value.filter(f=>f.state!==l.DESTROYED)}return e.onMounted(()=>{z.on("notification-add",E),z.on("notification-close",M)}),(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"d-notification-group",style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{name:o.animationName,onEnter:b,onLeave:T,onAfterLeave:L},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.id,class:"d-notification-wrapper",style:e.normalizeStyle(x(y)),"data-id":y.id,onMouseenter:C,onMouseleave:k},[e.renderSlot(f.$slots,"body",{class:e.normalizeClass([o.classes,y.type]),item:y,close:()=>N(y)},()=>[e.createElementVNode("div",{class:e.normalizeClass(w(y)),onClick:$=>B(y)},[o.dangerouslySetInnerHtml?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[y.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-notification-title",innerHTML:y.timer},null,8,No)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"notification-content",innerHTML:y.text},null,8,Vo)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[y.title?(e.openBlock(),e.createElementBlock("div",Lo,e.toDisplayString(y.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Io,e.toDisplayString(y.text),1)],64))],10,To)])],44,Eo))),128))]),_:3},40,["name"]))],4))}},zo={class:"d-info-progress-icon-container"},Ro={class:"d-info-progress-icon"},Oo={class:"d-info-progress-data-container"},Ao=["innerHTML"],Fo={__name:"DInfoProgress",props:{style:[String,Object],label:String,progress:Number,icon:String,type:String},emits:["click"],setup(o,{emit:t}){const n=o,l=e.computed(()=>n.icon?O.getters.getIcon(n.icon):null);return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-info-progress",n.type?`d-info-progress-${n.type}`:null]),style:e.normalizeStyle(n.style),onClick:a[0]||(a[0]=i=>{t("click",i)})},[e.createElementVNode("div",zo,[e.createElementVNode("div",Ro,[n.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j),{key:0,component:l.value,color:"inherit",size:17},null,8,["component"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Oo,[e.createElementVNode("div",{class:"d-info-progress-line",style:e.normalizeStyle("width: "+n.progress+"%;")},null,4),e.createElementVNode("div",{class:"d-info-progress-label",innerHTML:o.label},null,8,Ao)])],6))}},Ho={class:"d-checkbox"},Po=["id","checked","disabled"],Wo=["for"],jo={__name:"DCheckbox",props:{label:String,modelValue:Boolean,disabled:{type:Boolean,default:!1},change:Function,checked:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=o,s=e.getCurrentInstance().uid,a=e.computed({get:()=>n.modelValue,set:i=>{t("update:modelValue",i)}});return(i,c)=>(e.openBlock(),e.createElementBlock("div",Ho,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=r=>a.value=r),id:`i-${e.unref(s)}`,type:"checkbox",checked:n.checked,disabled:n.disabled,onChange:c[1]||(c[1]=(...r)=>n.change&&n.change(...r))},null,40,Po),[[e.vModelCheckbox,a.value]]),e.createElementVNode("label",{for:`i-${e.unref(s)}`},e.toDisplayString(n.label),9,Wo)]))}};async function Ae(o,t){return await Le(Me,{title:o,message:t})}async function Fe(o,t){return await Le(Ie,{title:o,message:t})}const Xo={__name:"DDialogProvider",setup(o){return window.alert=Fe,window.confirm=Ae,(t,n)=>(e.openBlock(),e.createBlock(e.unref(so)))}},Yo={class:"d-select"},Uo={key:0,class:"label"},qo=["disabled"],Go=["value","selected","disabled"],Zo={__name:"DSelect",props:{label:String,size:String,options:Array,modelValue:String,scale:String,disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(o,{emit:t}){const n=o,l=e.computed(()=>n.scale?"d-select-"+n.scale:""),s=e.computed({get:()=>n.modelValue,set:a=>{t("update:modelValue",a)}});for(let a=0;a<n.options.length;a++)if(n.options[a].selected){s.value=n.options[a].value;break}return(a,i)=>(e.openBlock(),e.createElementBlock("div",Yo,[n.label?(e.openBlock(),e.createElementBlock("div",Uo,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=c=>s.value=c),class:e.normalizeClass(l.value),style:e.normalizeStyle(n.size==="wide"?"width:100%":""),disabled:n.disabled},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,(c,r)=>(e.openBlock(),e.createElementBlock("option",{key:r,value:c.value,selected:c.selected,disabled:c.disabled},e.toDisplayString(c.label),9,Go))),128))],14,qo),[[e.vModelSelect,s.value]])]))}},ml="",Ko=["title"],Jo={class:"tab-icon"},Qo={class:"tab-label"},vo=["title"],en=["title"],tn=F({__name:"DTabLabel",props:{tab:Object},setup(o){const t=o;return(n,l)=>t.tab.label&&t.tab.icon?(e.openBlock(),e.createElementBlock("span",{key:0,title:t.tab.title?t.tab.title:"",style:{display:"flex","flex-direction":"column"}},[e.createElementVNode("div",Jo,[e.createVNode(e.unref(j),{component:t.tab.icon},null,8,["component"])]),e.createElementVNode("div",Qo,e.toDisplayString(t.tab.label),1)],8,Ko)):t.tab.label?(e.openBlock(),e.createElementBlock("span",{key:1,title:t.tab.title?t.tab.title:""},e.toDisplayString(t.tab.label),9,vo)):t.tab.icon?(e.openBlock(),e.createElementBlock("span",{key:2,title:t.tab.title?t.tab.title:""},[e.createVNode(e.unref(j),{component:t.tab.icon},null,8,["component"])],8,en)):e.createCommentVNode("",!0)}},[["__scopeId","data-v-9262b225"]]),ul="",on={class:"d-tabs"},nn=F({__name:"DTabs",props:{tabs:Array},setup(o,{expose:t}){const n=o,l=e.toRef(n,"tabs"),s=e.ref([]),a=e.ref(0),i=d=>{a.value=d},c=d=>{d&&!s.value.includes(d)&&s.value.push(d)};return t({refs:()=>s.value}),(d,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",on,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(u,_)=>(e.openBlock(),e.createBlock(tn,{index:_,tab:u,class:e.normalizeClass(["d-tab-title",_===a.value?"active":""]),onClick:B=>i(_)},null,8,["index","tab","class","onClick"]))),256))]),(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(u,_)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.component),{ref_for:!0,ref:c},null,512)),[[e.vShow,_===a.value]])]))),256))],1024))],64))}},[["__scopeId","data-v-4b44471a"]]),gl="",ln={class:"d-grid"},sn=F({__name:"DGrid",props:{gap:{type:String,default:"1em"},colXs:{type:String,default:"repeat(1, 1fr)"},colSm:String,colMd:String,colLg:String,colXl:String,colXxl:String},setup(o){const t=o;e.useCssVars(p=>({"09eba472":r[0],"09eba434":r[1],"09eba3f6":r[2],"09eba3b8":r[3],"09eba37a":r[4],"09eba33c":r[5],"898eb2ac":t.gap}));const{colXs:n,colSm:l,colMd:s,colLg:a,colXl:i,colXxl:c}=e.toRefs(t),r=[n.value,l.value,s.value,a.value,i.value,c.value];let d=null;for(let p=0;p<r.length;p++)d||(d=r[0]),p>0&&(r[p]?d=r[p]:r[p]=d);return(p,u)=>(e.openBlock(),e.createElementBlock("div",ln,[e.renderSlot(p.$slots,"default",{},void 0,!0)]))}},[["__scopeId","data-v-b45e8130"]]),an=["src","alt","title"],rn={__name:"DImage",props:{src:String,srcFail:String,alt:String,title:String,width:String,height:String,radius:String},setup(o){const t=o,n=e.ref(null),l=new Image;return l.onload=()=>{n.value=l.src},l.onerror=()=>{n.value=t.srcFail},e.onMounted(()=>{l.src=t.src}),(s,a)=>n.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.value,alt:t.alt,title:t.title,style:e.normalizeStyle({width:t.width,height:t.height,borderRadius:t.radius})},null,12,an)):e.createCommentVNode("",!0)}},_l="",cn={class:"d-textarea"},dn={key:0,class:"label"},pn=["rows","cols","placeholder"],mn=F({__name:"DTextarea",props:{label:String,placeholder:String,scale:String,modelValue:String,rows:{type:Number,default:3},cols:{type:Number,default:null},focus:Boolean},emits:["update:modelValue"],setup(o,{expose:t,emit:n}){const l=o,s=e.ref(null),a=e.computed(()=>l.scale==="small"?"d-textarea-small":l.scale==="large"?"d-textarea-large":""),i=e.computed({get:()=>l.modelValue,set:r=>{n("update:modelValue",r)}});e.onMounted(()=>{l.focus&&c()});const c=()=>{s.value.focus()};return t({focus:c}),(r,d)=>(e.openBlock(),e.createElementBlock("div",cn,[l.label?(e.openBlock(),e.createElementBlock("div",dn,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":d[0]||(d[0]=p=>i.value=p),rows:l.rows,cols:l.cols,placeholder:l.placeholder,class:e.normalizeClass(a.value),style:{width:"100%"}},null,10,pn),[[e.vModelText,i.value]])]))}},[["__scopeId","data-v-0e805d5d"]]);class fn{constructor(t){this.fields=t}validate(){let t=!1;for(let n in this.fields)this.fields[n].ref.value.validate()===!0&&(t=!0);return!t}}class un{validate(t,n="https"){return this._isValidURL(t)||(t=n+"://"+t),this._isValidURL(t)}message(t,n){let l="";switch(t){case"url":l=n;break}return l}_isValidURL(t){try{return new URL(t),!0}catch{return!1}}}const hn=new un;class gn{validate(t=""){return t!==""}message(t){return t}}const yn=new gn;class _n{validate(t="",n=0){return t.length>=n}message(t){return t}}const kn=new _n;class bn{validate(t="",n=0){return t.length<=n}message(t){return t}}const Bn=new bn;class Sn{validate(t){return/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(t)}message(t){return t}}const xn=new Sn;class wn{validate(t){return!isNaN(parseFloat(t))&&!isNaN(t-0)}message(t){return t}}const Dn=new wn,R={RulesUrl:hn,RulesRequired:yn,RulesMin:kn,RulesMax:Bn,RulesEmail:xn,RulesNumber:Dn};class Cn{validate(t,n){var s,a,i,c,r,d,p,u,_,B,C,k,E,M;let l="";if(n){let w=!1;for(let x in n)if(!w)switch(x){case"url":l=R.RulesUrl.validate(t,"https")||t.length===0?"":R.RulesUrl.message("url",(s=n[x])!=null&&s.message?(a=n[x])==null?void 0:a.message:"url_incorrect"),w=l!=="";break;case"required":l=R.RulesRequired.validate(t)?"":R.RulesRequired.message((i=n[x])!=null&&i.message?(c=n[x])==null?void 0:c.message:"required"),w=l!=="";break;case"min":l=R.RulesMin.validate(t,(r=n[x])==null?void 0:r.value)?"":R.RulesMin.message((d=n[x])!=null&&d.message?(p=n[x])==null?void 0:p.message:"very_small"),w=l!=="";break;case"max":l=R.RulesMax.validate(t,(u=n[x])==null?void 0:u.value)?"":R.RulesMax.message((_=n[x])!=null&&_.message?(B=n[x])==null?void 0:B.message:"vary_large"),w=l!=="";break;case"email":l=R.RulesEmail.validate(t)?"":R.RulesMax.message((C=n[x])!=null&&C.message?(k=n[x])==null?void 0:k.message:"email_incorrect"),w=l!=="";break;case"number":l=R.RulesNumber.validate(t)?"":R.RulesNumber.message((E=n[x])!=null&&E.message?(M=n[x])==null?void 0:M.message:"number_incorrect"),w=l!=="";break}}return l}}const $n=new Cn,En={style:{display:"flex","flex-direction":"column"}},Tn={key:0,class:"d-label"},Nn={key:0,class:"text-red"},Vn={style:{display:"flex","flex-direction":"row"}},Ln={style:{flex:"1",position:"relative"}},In=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"})],-1)],Mn=["id","type","placeholder","disabled"],zn=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"})],-1)],Rn={key:1,class:"d-help"},On={key:2,class:"d-error text-red"},An={__name:"DInputString",props:{form:Object,name:String,modelValue:String,label:String,error:String,help:String,placeholder:String,type:{type:String,default:"text"},pre:Object,post:Object,fieldRules:Object,scale:String,focus:Boolean,disabled:Boolean},emits:["update:modelValue","input","blur"],setup(o,{expose:t,emit:n}){const l=o,s=e.ref(l.error),a=ct(),i=e.ref(!1),c=e.ref(null);//!props.form ? ref(null) : props.form.fields[props.name].ref
|
|
1
|
+
(function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h.DophJs={},h.Vue))})(this,function(h,e){"use strict";const qn="",Gn="",Zn="",Kn="",Jn="",j={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String,className:String},setup(o){const t=o,n=e.useSlots(),l=e.computed(()=>{const{className:c}=t;return c===void 0?"icon":["icon",c].join(" ")}),s=e.computed(()=>{const{color:c}=t;return c===void 0?null:c}),a=e.computed(()=>{const c=t.size??null;if(c!==void 0)return typeof c=="number"||/^\d+$/.test(c)?`${c}px`:c}),i=e.computed(()=>e.h("i",{class:l.value,style:{color:s.value,fontSize:a.value}},t.component?e.h(t.component):n));return(c,r)=>(e.openBlock(),e.createBlock(e.unref(i)))}},O={state:{},getters:{getIcon(o){return O.state[o]},getIcons(){return O.state}},mutations:{addIcon(o,t){O.state.name=t},addIcons(o){for(const t in o)o.hasOwnProperty(t)&&(O.state[t]=o[t])}}};function be(o){const t=o.value.getBoundingClientRect();let n=o.value,l=0,s=0;for(;n&&!isNaN(n.offsetLeft)&&!isNaN(n.offsetTop);)l+=n.offsetLeft-n.scrollLeft,s+=n.offsetTop-n.scrollTop,n=n.offsetParent;return{top:s,left:l,x:t.x,y:t.y,width:t.width,height:t.height}}function ct(){function o(s){return s*Math.random()|0}function t(){return o(16).toString(16)}function n(s){let a="";for(let i=0;i<s;++i)a+=t();return a}function l(){return(o(16)&3|8).toString(16)}return n(8)+"-"+n(4)+"-4"+n(3)+"-"+l()+n(3)+"-"+n(12)}const Qn="",F=(o,t)=>{const n=o.__vccOpts||o;for(const[l,s]of t)n[l]=s;return n},dt={key:0,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},pt=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],mt={key:1},ft={key:2,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},ut=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],H=F({__name:"DButton",props:{class:String,style:[String,Object],icon:String,scale:String,type:String,outline:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click","contextmenu"],setup(o,{expose:t,emit:n}){const l=o,s=e.useSlots(),a=e.ref(null),i=e.computed(()=>l.icon?O.getters.getIcon(l.icon):null),c=k=>{n("click",k)},r=k=>{n("contextmenu",k)},d=e.computed(()=>l.scale==="large"?"button-lg":l.scale==="small"?"button-sm":""),p=e.computed(()=>l.disabled?"disabled":""),u=k=>!!s[k],_=e.computed(()=>u("default")?"":l.scale==="large"?"d-button-lg-icon":l.scale==="small"?"d-button-sm-icon":"d-button-icon"),B=e.computed(()=>{const k=l.outline?"-outline":"";return l.type==="primary"?`button${k}-blue`:l.type==="success"?`button${k}-green`:l.type==="error"?`button${k}-red`:l.type==="warning"?`button${k}-orange`:l.type==="wait"?`button${k}-violet`:l.outline?`button${k}`:""});return t({elementSize:()=>be(a)}),(k,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button",[l.class,d.value,B.value,p.value].join(" ")])},[e.renderSlot(k.$slots,"default",{},void 0,!0),l.loading?(e.openBlock(),e.createElementBlock("svg",dt,pt)):e.createCommentVNode("",!0)],34)),i.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button button-ext",[l.class,d.value,_.value,B.value,p.value].join(" ")]),style:e.normalizeStyle(l.style)},[l.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j),{key:0,component:i.value,color:"inherit"},null,8,["component"])):e.createCommentVNode("",!0),e.unref(s).default?(e.openBlock(),e.createElementBlock("div",mt,[e.renderSlot(k.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),l.loading?(e.openBlock(),e.createElementBlock("svg",ft,ut)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-e5cd6ccd"]]),ol="",ht={key:0,class:"d-input"},gt={key:0,class:"label"},yt=["type","placeholder"],_t={key:1,class:"d-input",style:{display:"flex","flex-direction":"column"}},kt={key:0,class:"label"},bt={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},Bt={style:{flex:"1"}},St=["type","placeholder"],xt={key:2,class:"d-input",style:{display:"flex","flex-direction":"column"}},wt={key:0,class:"label"},Dt={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},Ct={style:{flex:"1"}},$t=["type","placeholder"],Et=F({__name:"DInput",props:{label:String,placeholder:String,scale:String,modelValue:String,password:Boolean,pre:Object,post:Object,focus:Boolean},emits:["update:modelValue"],setup(o,{expose:t,emit:n}){const l=o,s=e.ref(null),a=e.computed(()=>l.scale==="small"?"d-input-small":l.scale==="large"?"d-input-large":""),i=e.computed({get:()=>l.modelValue,set:r=>{n("update:modelValue",r)}});e.onMounted(()=>{l.focus&&c()});const c=()=>{s.value.focus()};return t({focus:c}),(r,d)=>!l.post&&!l.pre?(e.openBlock(),e.createElementBlock("div",ht,[l.label?(e.openBlock(),e.createElementBlock("div",gt,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":d[0]||(d[0]=p=>i.value=p),type:l.password?"password":"text",class:e.normalizeClass(a.value),placeholder:l.placeholder,style:{width:"100%"}},null,10,yt),[[e.vModelDynamic,i.value]])])):l.post&&l.post.click&&!l.pre?(e.openBlock(),e.createElementBlock("div",_t,[l.label?(e.openBlock(),e.createElementBlock("div",kt,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",bt,[e.createElementVNode("div",Bt,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:s,class:e.normalizeClass(["d-input-post-field",a.value]),"onUpdate:modelValue":d[1]||(d[1]=p=>i.value=p),type:l.password?"password":"text",placeholder:l.placeholder,style:{width:"100%"}},null,10,St),[[e.vModelDynamic,i.value]])]),l.post.label?(e.openBlock(),e.createBlock(H,{key:0,scale:l.scale,class:e.normalizeClass(["d-input-post-button",l.post.class]),onClick:l.post.click,icon:l.post.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.post.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:l.scale,class:e.normalizeClass(["d-input-post-button",l.post.class]),onClick:l.post.click,icon:l.post.icon},null,8,["scale","onClick","icon","class"]))])])):!l.post&&l.pre&&l.pre.click?(e.openBlock(),e.createElementBlock("div",xt,[l.label?(e.openBlock(),e.createElementBlock("div",wt,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Dt,[l.pre.label?(e.openBlock(),e.createBlock(H,{key:0,scale:l.scale,class:e.normalizeClass(["d-input-pre-button",l.pre.class]),onClick:l.pre.click,icon:l.pre.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.pre.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:l.scale,class:e.normalizeClass(["d-input-pre-button",l.pre.class]),onClick:l.pre.click,icon:l.pre.icon},null,8,["scale","onClick","icon","class"])),e.createElementVNode("div",Ct,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:s,class:e.normalizeClass(["d-input-pre-field",a.value]),"onUpdate:modelValue":d[2]||(d[2]=p=>i.value=p),type:l.password?"password":"text",placeholder:l.placeholder,style:{width:"100%"}},null,10,$t),[[e.vModelDynamic,i.value]])])])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-a972038a"]]),Be={__name:"DBadge",props:{scale:String,type:String,class:String,stress:{type:Boolean,default:!1}},setup(o){const t=o,n=e.computed(()=>t.scale==="large"?"badge-lg":t.scale==="small"?"badge-sm":""),l=e.computed(()=>{const s=t.stress?"-stress":"";return t.type==="primary"?`badge${s}-blue`:t.type==="success"?`badge${s}-green`:t.type==="error"?`badge${s}-red`:t.type==="warning"?`badge${s}-orange`:t.type==="wait"?`badge${s}-violet`:t.stress?`badge${s}-gray`:""});return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",[t.class,n.value,l.value].join(" ")])},[e.renderSlot(s.$slots,"default")],2))}},X="0px",Se={__name:"DCollapse",props:{duration:{type:Number,default:200},easingEnter:{type:String,default:"ease-in-out"},easingLeave:{type:String,default:"ease-in-out"},opacityClosed:{type:Number,default:0},opacityOpened:{type:Number,default:1}},setup(o){const t=o,n=r=>({height:r==null?void 0:r.style.height,width:r==null?void 0:r.style.width,position:r==null?void 0:r.style.position,visibility:r==null?void 0:r.style.visibility,overflow:r==null?void 0:r.style.overflow,paddingTop:r==null?void 0:r.style.paddingTop,paddingBottom:r==null?void 0:r.style.paddingBottom,borderTopWidth:r==null?void 0:r.style.borderTopWidth,borderBottomWidth:r==null?void 0:r.style.borderBottomWidth,marginTop:r==null?void 0:r.style.marginTop,marginBottom:r==null?void 0:r.style.marginBottom}),l=(r,d)=>{const{width:p}=getComputedStyle(r);r.style.width=p,r.style.position="absolute",r.style.visibility="hidden",r.style.height="";let{height:u}=getComputedStyle(r);return r.style.width=d.width,r.style.position=d.position,r.style.visibility=d.visibility,r.style.height=X,r.style.overflow="hidden",d.height&&d.height!==X?d.height:u},s=(r,d,p,u,_)=>{const B=r.animate(u,_);r.style.height=d.height,B.onfinish=()=>{r.style.overflow=d.overflow,p()}},a=(r,d)=>[{height:X,opacity:t.opacityClosed,paddingTop:X,paddingBottom:X,borderTopWidth:X,borderBottomWidth:X,marginTop:X,marginBottom:X},{height:r,opacity:t.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom}],i=(r,d)=>{const p=r,u=n(p),_=l(p,u),B=a(_,u),C={duration:t.duration,easing:t.easingEnter};s(p,u,d,B,C)},c=(r,d)=>{const p=r,u=n(p),{height:_}=getComputedStyle(p);p.style.height=_,p.style.overflow="hidden";const B=a(_,u).reverse(),C={duration:t.duration,easing:t.easingLeave};s(p,u,d,B,C)};return(r,d)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:i,onLeave:c},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3}))}},K={data:void 0},re=o=>o.reduce((t,n)=>(t[n]=n)&&t,{}),I=re(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),Tt=re(["copy","move","link","none"]),Nt=re(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),ie={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:o=>o in Tt},effectAllowed:{validator:o=>o in Nt},image:String,imageXOffset:{type:Number,default:0},imageYOffset:{type:Number,default:0},hideImageHtml:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(o){const t=o,n=e.useSlots(),l=e.ref(!1),s=e.computed(()=>l&&t.transferData),a=e.computed(()=>({position:"fixed",top:"-1000px"})),i=(c,r)=>{const d=r.dataTransfer;if([I.dragenter,I.dragover].includes(c)&&t.dropEffect&&(d.dropEffect=t.dropEffect),c===I.dragstart){if(t.effectAllowed&&(d.effectAllowed=t.effectAllowed),t.image||n.image){let p;t.image?(p=new Image,p.src=t.image):n.image&&(p=n.image[0].elm),d.setDragImage&&d.setDragImage(p,t.imageXOffset,t.imageYOffset)}t.transferData!==void 0&&(K.data=t.transferData,r.dataTransfer.setData("text","")),l.value=!0}};return(c,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{draggable:t.draggable,onDrag:r[0]||(r[0]=d=>i(e.unref(I).drag,d)),onDragstart:r[1]||(r[1]=e.withModifiers(d=>i(e.unref(I).dragstart,d),["stop"])),onDragenter:r[2]||(r[2]=d=>i(e.unref(I).dragenter,d)),onDragleave:r[3]||(r[3]=d=>i(e.unref(I).dragleave,d)),onDragend:r[4]||(r[4]=d=>i(e.unref(I).dragend,d))},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{transferData:s.value}),o.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(a.value)},[e.renderSlot(c.$slots,"image",{transferData:s.value})],4)):e.renderSlot(c.$slots,"image",{key:1,transferData:s.value})]),_:3},40,["draggable"]))}},ll="",Vt=o=>(e.pushScopeId("data-v-9da49c73"),o=o(),e.popScopeId(),o),Lt={key:0,style:{display:"none"}},It={key:1},Mt=[Vt(()=>e.createElementVNode("div",{class:"tree-divider"},null,-1))],zt={key:2},Rt={class:"tree-divider-header"},Ot={class:"item-title"},At={key:0,class:"tree-divider"},Ft={key:1},Ht={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},Pt={key:0,class:"sub-menu"},xe=F({__name:"DTreeItem",props:{model:Object,treeId:[String,Number],items:Array,search:String,component:Object},emits:["nodedrop","nodedragover","nodedragleave","nodeclick","nodecontext","nodedoubleclick","nodefoldericonclick"],setup(o,{emit:t}){const n=o,l=e.ref(null),s=e.ref(!1),a=e.ref(!1),i=e.ref(!1),c=e.computed(()=>n.model.children&&n.model.children.length),r=e.computed(()=>(g.actions.isTreeExpanded(n.treeId)&&(n.model.expanded=n.model.expanded===void 0?!0:n.model.expanded),n.model.expanded)),d=D=>{t("nodeclick",{event:D,model:n.model})},p=D=>{t("nodefoldericonclick",{event:D,model:n.model})},u=D=>{t("nodefoldericonclick",D)},_=D=>{t("nodeclick",D)},B=D=>{t("nodedoubleclick",D)},C=D=>{t("nodedrop",D)},k=D=>{t("nodecontext",D)},E=e.computed(()=>[g.actions.isItemSelected(n.treeId,n.model.id)?"selected":"",s.value?"node-over ":"",a.value?"node-top ":"",i.value?"node-bottom ":""]),M=e.computed(()=>n.search?!1:n.model.draggable===!0),w=D=>{var L;let b=K.data;if(b===void 0||b.model===void 0)return s.value=!1,!1;if(b.model.id===n.model.id||g.actions.isChildOfParent(n.treeId,n.items,n.model.id,b.model.id)||g.actions.isParentOfChild(n.treeId,n.items,b.model.id,n.model.id))return s.value=!1,a.value=!1,i.value=!1,!1;if(!g.state.trees[n.treeId].transfer&&b.id!==n.treeId||!g.state.trees[n.treeId].dropInside&&!i.value&&!a.value)return!1;let T="";a.value?T="before":i.value?T="after":T="inside",t("nodedrop",{e:D,model:n.model,place:T}),g.actions.moveTreeNode(b.id,n.treeId,n.items,b.model.id,n.model.id,T,(L=b.model)==null?void 0:L.transfer),s.value=!1,a.value=!1,i.value=!1},x=D=>{t("nodedragover",{e:D,model:n.model});let b=K.data;if(!n.model.droppable)return!1;if(b===void 0||b.model===void 0)return s.value=!0,!1;if(b.model.id===n.model.id||g.actions.isChildOfParent(n.treeId,n.items,n.model.id,b.model.id)||g.actions.isParentOfChild(n.treeId,n.items,b.model.id,n.model.id))return!1;const T=D.y,L=l.value.getBoundingClientRect().top,f=l.value.getBoundingClientRect().height,m=f/3;T>L&&T<=L+m?(s.value=!1,a.value=!0,i.value=!1):T<L+f&&T>=L+f-m?(s.value=!1,a.value=!1,i.value=!0):(s.value=g.state.trees[n.treeId].dropInside,a.value=!1,i.value=!1)},N=()=>{s.value=!1,a.value=!1,i.value=!1},S=e.computed(()=>n.model.title.startsWith("-")),V=e.computed(()=>{if(n.model.title.startsWith("-")){let[D,...b]=n.model.title.split(" ");return b=b.join(" "),b}return null});return(D,b)=>{const T=e.resolveComponent("d-tree-item",!0),L=e.resolveDirective("touch");return e.unref(g).actions.beforeItem(n.treeId,o.model)?S.value&&!V.value?(e.openBlock(),e.createElementBlock("li",It,Mt)):S.value&&V.value?(e.openBlock(),e.createElementBlock("li",zt,[e.createElementVNode("div",Rt,e.toDisplayString(e.unref(g).actions.renderTitle(n.treeId,V.value)),1)])):n.model.component?(e.openBlock(),e.createBlock(ie,{key:3,tag:"li",class:"tree-item-component","transfer-data":{id:n.treeId,model:n.model},draggable:M.value,onDrop:e.withModifiers(w,["stop"]),onDragenter:b[1]||(b[1]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(x,["prevent","stop"]),onDragleave:e.withModifiers(N,["prevent"])},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"node",ref:l,class:e.normalizeClass(E.value),onContextmenu:b[0]||(b[0]=e.withModifiers(f=>t("nodecontext",{e:f,model:n.model}),["prevent"]))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(G).getters.getComponent(n.model.component).component),e.normalizeProps(e.guardReactiveProps(e.unref(G).getters.getComponent(n.model.component).props)),null,16))],34)),[[L,d,"press"]])]),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])):(e.openBlock(),e.createBlock(ie,{key:4,tag:"li",class:"tree-item","transfer-data":{id:n.treeId,model:n.model},draggable:M.value,onDrop:e.withModifiers(w,["stop"]),onDragenter:b[4]||(b[4]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(x,["prevent","stop"]),onDragleave:e.withModifiers(N,["prevent"])},{default:e.withCtx(()=>{var f,m;return[e.createElementVNode("div",{ref_key:"node",ref:l,class:e.normalizeClass(E.value),onPointerdownCapture:d,onDblclick:b[2]||(b[2]=e.withModifiers(y=>t("nodedoubleclick",{e:y,model:n.model}),["prevent"])),onContextmenu:b[3]||(b[3]=e.withModifiers(y=>t("nodecontext",{e:y,model:n.model}),["prevent"]))},[e.createElementVNode("div",null,[n.model.icons&&n.model.icons.pre&&c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j),{key:0,component:e.unref(O).getters.getIcon(n.model.icons.pre.component),size:18,color:n.model.icons.pre.color?n.model.icons.pre.color:"inherit",class:e.normalizeClass(r.value?"tree-open-pre":""),onPointerdownCapture:p},null,40,["component","color","class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.pre&&!c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j),{key:1,component:e.unref(O).getters.getIcon(n.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(r.value?"tree-open-pre":"")},null,8,["component","class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.icon&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j),{key:2,component:e.unref(O).getters.getIcon(n.model.icons.icon.component),color:n.model.icons.icon.color?n.model.icons.icon.color:"inherit",size:n.model.icons.icon.size?n.model.icons.icon.size:null,className:n.model.icons.icon.class?n.model.icons.icon.class:null},null,8,["component","color","size","className"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ot,[S.value?(e.openBlock(),e.createElementBlock("div",At)):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ft,e.toDisplayString(e.unref(g).actions.renderTitle(n.treeId,n.model.title)),1))])]),e.createElementVNode("div",Ht,[((f=n.model.badge)==null?void 0:f.value)!==void 0&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Be),{key:0,class:e.normalizeClass([(m=n.model.badge)==null?void 0:m.class,"badge-sm"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.model.badge.value),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.post&&c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j),{key:1,component:e.unref(O).getters.getIcon(n.model.icons.post.component),size:20,color:n.model.icons.post.color?n.model.icons.post.color:"inherit",class:e.normalizeClass(r.value?"tree-open-post":""),onPointerdownCapture:p},null,40,["component","color","class"])):e.createCommentVNode("",!0)])],34),e.createVNode(Se,null,{default:e.withCtx(()=>[c.value&&r.value&&!n.search?(e.openBlock(),e.createElementBlock("ul",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.model.children,y=>(e.openBlock(),e.createBlock(T,{key:y.id,model:y,treeId:n.treeId,items:n.items,search:n.search,onNodeclick:_,onNodedoubleclick:B,onNodedrop:C,onNodecontext:k,onNodefoldericonclick:u},null,8,["model","treeId","items","search"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])):(e.openBlock(),e.createElementBlock("li",Lt))}}},[["__scopeId","data-v-9da49c73"]]);function we(o){return o=o||new Map,{all:o,on(t,n){const l=o.get(t);l?l.push(n):o.set(t,[n])},off(t,n){const l=o.get(t);l&&(n?l.splice(l.indexOf(n)>>>0,1):o.set(t,[]))},emit(t,n){let l=o.get(t);l&&l.slice().map(s=>{s(n)}),l=o.get("*"),l&&l.slice().map(s=>{s(t,n)})}}}const z=we(),g={state:e.reactive({trees:{}}),getters:{getItems(o){return g.state.trees[o].items},getItemsSelect(o){return g.state.trees[o].selected},getParentId(o,t,n,l="id",s="children",a={}){return n&&o&&(o.find(i=>i[l]===n?(a.found=t,i):g.getters.getParentId(i[s],i.id,n,l,s,a)),a.found)?a.found:!1}},mutations:{setTreeItems(o,t){g.state.trees[o].items=t},setItemSelect(o,t){g.state.trees[o].noSelect||(g.state.trees[o].multiSelect?g.state.trees[o].selected.includes(t.id)?g.state.trees[o].selected=g.state.trees[o].selected.filter(function(n){return n!==t.id}):g.state.trees[o].selected=[...g.state.trees[o].selected,t.id]:g.state.trees[o].selected=[t.id])}},actions:{initTreeStore(o,t,n,l,s,a,i,c=!0){g.state.trees[o]=[],g.state.trees[o].selected=[],g.state.trees[o].noSelect=t,g.state.trees[o].multiSelect=n,g.state.trees[o].expanded=l,g.state.trees[o].transfer=s,g.state.trees[o].renderTitle=a,g.state.trees[o].beforeItem=i,g.state.trees[o].dropInside=c},renderTitle(o,t){return g.state.trees[o].renderTitle?g.state.trees[o].renderTitle(t):t},beforeItem(o,t){return g.state.trees[o].beforeItem?g.state.trees[o].beforeItem(t):!0},isItemSelected(o,t){return g.state.trees[o].selected.includes(t)},toggleItem(o,t){t.expanded=t.expanded===void 0||!t.expanded,t.children&&t.children.length&&(t.expanded?z.emit(`expand-${o}`,{id:o,model:t}):z.emit(`collapse-${o}`,{id:o,model:t}))},isTreeExpanded(o){return g.state.trees[o].expanded},isChildOfParent(o,t,n,l){const s=g.actions.deepSearch(t,n);if(s&&s.children){for(let a=0;a<s.children.length;a++)if(s.children[a].id===l)return!0}return!1},isParentOfChild(o,t,n,l){const s=g.actions.deepSearch(t,n);return!!(s&&s.children&&g.actions.deepSearch(s.children,l))},deepSearch(o,t,n="id",l="children",s={}){return t&&o&&(o.find(a=>a[n]===t?(s.found=a,a):g.actions.deepSearch(a[l],t,n,l,s)),s.found)?s.found:!1},deepSearchByTitle(o,t,n="title",l="children",s=[]){if(t&&o&&(o.find(a=>{const i=new RegExp(t,"gi");a[n].toString().toLowerCase().match(i)!==null&&s.push(a),g.actions.deepSearchByTitle(a[l],t,n,l,s)}),s)){for(let a=0;a<s.length;a++);return s}return s},moveTreeNode(o,t,n,l,s,a,i=!0){if(i){const c=g.actions.deleteTreeNode(n,l);g.actions.insertTreeNode(n,s,c,a),z.emit(`move-${t}`,{fromTreeId:o,toTreeId:t,moved:c==null?void 0:c.id,target:s,position:a})}else z.emit(`move-${t}`,{fromTreeId:o,toTreeId:t,moved:l,target:s,position:a})},insertTreeNode(o,t,n,l){if(o)for(let s=0;s<o.length;s++){if(o[s].id===t){let i=s;return l==="after"?(i++,o.splice(i,0,n)):l==="before"?o.splice(i,0,n):l==="inside"&&(Object.hasOwn(o[s],"children")||(o[s].children=[],o[s].opened=!0),o[s].children.splice(0,0,n)),o[s]}const a=this.insertTreeNode(o[s].children,t,n,l);if(a)return a}},deleteTreeNode(o,t){if(o)for(let n=0;n<o.length;n++){if(o[n].id===t){const s=o[n];return o.splice(n,1),s}const l=g.actions.deleteTreeNode(o[n].children,t);if(l)return l}}}},De={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(I),setup(o,{expose:t,emit:n}){let l=e.reactive({});const s=e.ref("false"),a=e.ref(null),i=new Set,c=e.computed(()=>s.value&&l),r=(p,u)=>{l=K.data,n(p,u,l),p===I.dragenter&&(i.size||u.target===a.value)&&i.add(u.target),p===I.dragleave&&i.delete(u.target),p===I.drop&&i.clear(),s.value=!!i.size};return t({elementSize:()=>be(a)}),(p,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{ref_key:"el",ref:a,onDragenter:u[0]||(u[0]=_=>r(e.unref(I).dragenter,_)),onDragleave:u[1]||(u[1]=_=>r(e.unref(I).dragleave,_)),onDragover:u[2]||(u[2]=e.withModifiers(_=>r(e.unref(I).dragover,_),["prevent"])),onDrop:u[3]||(u[3]=e.withModifiers(_=>r(e.unref(I).drop,_),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default",{transferData:c.value})]),_:3},544))}},ce={__name:"DMenu",props:{class:String,items:Array,style:[String,Object],noSelect:{type:Boolean,default:!0},renderItemTitle:Function,beforeItem:Function,bodyAsParent:{type:Boolean,default:!0}},emits:["select"],setup(o,{expose:t,emit:n}){const l=o;let s=e.ref(null),a=e.ref(!1);const i=()=>{z.emit("menu-show-request"),a.value=!0},c=()=>{var _;(_=s.value)==null||_.collapseAll(),a.value=!1},r=()=>a.value;z.on("menu-show-request",()=>{c()}),t({show:i,hide:c,elementSize:()=>s.value.elementSize(),isShowed:r,itemsCount:()=>s.value.itemsCount()});const u=_=>{n("select",_),_.model.children||c()};return(_,B)=>{const C=e.resolveDirective("click-outside");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.unref(a)?e.withDirectives((e.openBlock(),e.createBlock(de,{key:0,ref_key:"treeRef",ref:s,items:l.items,"no-select":l.noSelect,class:e.normalizeClass(l.class),style:e.normalizeStyle(l.style),onSelect:u,"render-title":l.renderItemTitle,"before-item":l.beforeItem},null,8,["items","no-select","class","style","render-title","before-item"])),[[C,()=>c()]]):e.createCommentVNode("",!0)])}}},Ce={__name:"DContextMenu",props:{items:Array,renderItemTitle:Function,beforeItem:Function},emits:["select"],setup(o,{expose:t,emit:n}){const l=o,s=e.ref(null),a=e.ref(0),i=e.ref(0),c=e.computed(()=>({left:a.value+"px",top:i.value+"px"})),r=p=>{s.value.show(),e.nextTick(()=>{const u=s.value.elementSize(),_=window.innerWidth,B=window.innerHeight;a.value=_-p.pageX<u.width?p.pageX-u.width:p.pageX,i.value=B-p.pageY<u.height?p.pageY-u.height:p.pageY,s.value.itemsCount()===0&&s.value.hide()})},d=p=>{n("select",p)};return t({show:r}),(p,u)=>(e.openBlock(),e.createBlock(ce,{ref_key:"dMenuRef",ref:s,onSelect:d,items:l.items,style:e.normalizeStyle(c.value),class:"context-menu","no-select":!0,"render-item-title":l.renderItemTitle,"before-item":l.beforeItem},null,8,["items","style","render-item-title","before-item"]))}},de={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:{type:Boolean,default:!0},dropInside:{type:Boolean,default:!0},doubleClickExpand:{type:Boolean,default:!1},renderTitle:Function,beforeItem:Function,search:String,context:Array,contextClick:{type:Function,default:()=>{}},contextBeforeClick:{type:Function,default:()=>!0}},emits:["select","collapse","expand","move","over","drop","doubleclick","foldericonclick"],setup(o,{expose:t,emit:n}){const l=o,s=e.ref(null),a=e.ref(!1),i=e.ref(null),c=e.getCurrentInstance().uid;g.actions.initTreeStore(c,l.noSelect,l.multiSelect,l.expanded,l.transfer,l.renderTitle,l.beforeItem,l.dropInside);const r=(m,y)=>{console.log(m,y)};z.on(`expand-${c}`,m=>{n("expand",m)}),z.on(`collapse-${c}`,m=>{n("collapse",m)}),z.on(`move-${c}`,m=>{n("move",m)});const d=e.computed(()=>l.search?g.actions.deepSearchByTitle(l.items,l.search):l.items),p=m=>{for(let y=0;y<l.items.length;y++)l.items[y].id===m&&g.actions.toggleItem(c,l.items[y]),l.items[y].expanded=!0},u=(m=null)=>{g.mutations.setItemSelect(c,m.model),l.doubleClickExpand||g.actions.toggleItem(c,m.model),n("select",m)},_=(m=null)=>{l.doubleClickExpand&&g.actions.toggleItem(c,m.model),n("doubleclick",m)},B=(m=null)=>{l.doubleClickExpand&&g.actions.toggleItem(c,m.model),n("foldericonclick",m)},C=(m=null)=>{n("over",m)},k=(m=null)=>{n("drop",m)},E=()=>s.value.elementSize(),M=()=>{for(let m=0;m<l.items.length;m++)l.items[m].expanded=!0},w=()=>{for(let m=0;m<l.items.length;m++)l.items[m].expanded=!1},x=()=>c,N=m=>g.actions.deepSearch(l.items,m),S=m=>{N(m)&&g.mutations.setItemSelect(c,N(m))},V=m=>{l.contextClick({e:m.e,model:m.model,target:i.value})},D=m=>l.contextBeforeClick({model:m,target:i.value}),b=e.computed(()=>l.context),T=m=>(b.value&&(i.value=m.model,a.value.show(m.e)),!1),L=()=>f(d.value),f=m=>{let y=0;for(let $=0;$<m.length;$++)y+=g.actions.beforeItem(c,m[$])?1:0,m[$].children&&m[$].children.length>0&&(y+=f(m[$].children));return y};return t({elementSize:E,expandAll:M,collapseAll:w,getId:x,getNode:N,selectNode:S,itemsCount:L,expandNode:p}),(m,y)=>(e.openBlock(),e.createBlock(De,{ref_key:"treeRef",ref:s,class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,$=>(e.openBlock(),e.createBlock(xe,{key:$.id,model:$,treeId:e.unref(c),items:l.items,search:l.search,onNodeclick:u,onNodedoubleclick:_,onNodedragover:C,onNodedrop:k,onNodecontext:T,onNodefoldericonclick:B},null,8,["model","treeId","items","search"]))),128)),b.value?(e.openBlock(),e.createBlock(Ce,{key:0,ref_key:"contextTreeRef",ref:a,items:b.value,onSelect:V,"before-item":D},null,8,["items"])):e.createCommentVNode("",!0)]),_:1},8,["onDrop"]))}},rl="",Wt=F({__name:"DAccordion",props:{items:Array,renderTitle:Function,noSelect:{type:Boolean,default:!0}},emits:["move"],setup(o,{emit:t}){const n=o,l=s=>{t("move",s)};return(s,a)=>(e.openBlock(),e.createBlock(de,{class:"accordion",items:n.items,"no-select":n.noSelect,"render-title":n.renderTitle,"drop-inside":!1,onMove:l},null,8,["items","no-select","render-title"]))}},[["__scopeId","data-v-a724c500"]]),$e={__name:"DLayoutHeader",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1001},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const t=o,n=e.computed(()=>{const{fixed:l,zIndex:s,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:d}=t,p=l?"fixed":"static",u=t.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${p};z-index:${s};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${d};`});return(l,s)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Ee={__name:"DLayoutTab",props:{fixed:{type:Boolean,default:!0},top:{type:Number,default:56},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const t=o,n=e.computed(()=>{const{fixed:l,top:s,zIndex:a,minWidth:i,height:c,paddingLeft:r,transitionDuration:d,transitionTimingFunction:p}=t,u=l?"fixed":"static",_=t.useMinWidthLayout?`min-width: ${i}px;`:"";return`position:${u};top:${s}px;z-index:${a};${_}height:${c}px;padding-left:${r}px;transition-duration:${d}ms;transition-timing-function:${p};`});return(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Te={__name:"DLayoutFooter",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const t=o,n=e.computed(()=>{const{fixed:l,zIndex:s,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:d}=t,p=l?"fixed":"static",u=t.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${p};z-index:${s};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${d};`});return(l,s)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Ne={__name:"DLayoutSidebar",props:{zIndex:{type:Number,default:1002},width:{type:Number,default:200},paddingTop:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1}},setup(o){const t=o,n=e.computed(()=>{const{zIndex:l,width:s,paddingTop:a,transitionDuration:i,transitionTimingFunction:c}=t;return`z-index:${l};width:${s}px;padding-top:${a}px;transition-duration:${i}ms;transition-timing-function:${c};`});return(l,s)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Ve={__name:"DLayoutContent",props:{paddingTop:{type:Number,default:0},paddingBottom:{type:Number,default:0},paddingLeft:{type:Number,default:0},overflowHidden:Boolean,transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"}},setup(o){const t=o,n=e.computed(()=>{const{paddingTop:l,paddingBottom:s,paddingLeft:a,transitionDuration:i,transitionTimingFunction:c}=t,r=`overflow:${t.overflowHidden?"hidden":"visible"};`;return`padding-top:${l}px;padding-bottom:${s}px;padding-left:${a}px;${r}transition-duration:${i}ms;transition-timing-function:${c};`});return(l,s)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(n.value),class:"d-layout-content"},[e.renderSlot(l.$slots,"default")],4))}};function jt(o){const t=e.ref(0),n=e.computed(()=>`transform: translateX(${-t.value}px);`);let l=!1;function s(p){t.value=p}function a(){var p;const u=((p=document.scrollingElement)===null||p===void 0?void 0:p.scrollLeft)||0;s(u)}function i(){a()}function c(){document.addEventListener("scroll",a)}function r(){l&&document.removeEventListener("scroll",a)}function d(){i(),c(),l=!0}return e.watch(o,p=>{p?d():r()},{immediate:!0}),e.onUnmounted(()=>{r()}),n}const Xt=1001,Yt=999,Ut=998,qt={__name:"DLayoutAdmin",props:{mode:{type:String,default:"vertical"},isMobile:{type:Boolean,default:!1},useMinWidthLayout:{type:Boolean,default:!1},minWidth:{type:Number,default:1200},headerVisible:{type:Boolean,default:!0},headerHeight:{type:Number,default:56},tabVisible:{type:Boolean,default:!0},tabHeight:{type:Number,default:44},fixedHeaderAndTab:{type:Boolean,default:!0},addMainOverflowHidden:{type:Boolean,default:!1},footerVisible:{type:Boolean,default:!0},footerHeight:{type:Number,default:48},fixedFooter:{type:Boolean,default:!0},sidebarVisible:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:200},sidebarCollapsedWidth:{type:Number,default:0},sidebarCollapse:{type:Boolean,default:!1},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1},maskBg:{type:String,default:"rgba(0,0,0,0.3)"}},emits:["update:sidebar-collapse","sidebar-mask-click"],setup(o,{emit:t}){const n=o,l=e.computed(()=>n.useMinWidthLayout?`min-width:${n.minWidth}px;`:""),s=e.computed(()=>n.useMinWidthLayout&&(n.fixedHeaderAndTab||n.fixedFooter)),a=jt(s),i=e.computed(()=>n.fixedHeaderAndTab?a.value:""),c=e.computed(()=>n.fixedFooter?a.value:""),r=e.computed(()=>{const{transitionDuration:S,transitionTimingFunction:V}=n;return{transitionDuration:S,transitionTimingFunction:V}}),d=e.computed(()=>n.mode==="vertical"),p=e.computed(()=>n.isMobile||d.value?1003:1e3),u=e.computed({get(){return n.sidebarCollapse},set(S){t("update:sidebar-collapse",S)}});function _(){t("sidebar-mask-click")}const B=e.computed(()=>n.isMobile&&!u.value),C=e.computed(()=>{const{transitionDuration:S,transitionTimingFunction:V}=n;return`background-color:${n.maskBg};transition-duration:${S}ms;transition-timing-function:${V};`}),k=e.computed(()=>{const{sidebarWidth:S,sidebarCollapsedWidth:V}=n,D=n.isMobile?0:V,b=u.value?D:S;return n.sidebarVisible?b:0}),E=e.computed(()=>n.isMobile?0:k.value),M=e.computed(()=>d.value?E.value:0),w=e.computed(()=>!n.isMobile&&!d.value&&n.headerVisible?n.headerHeight:0),x=e.computed(()=>{let S=0;return n.fixedHeaderAndTab&&(n.headerVisible&&(S+=n.headerHeight),n.tabVisible&&(S+=n.tabHeight)),S}),N=e.computed(()=>n.fixedFooter&&n.footerVisible?n.footerHeight:0);return(S,V)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(l.value)},[o.headerVisible?(e.openBlock(),e.createBlock($e,e.mergeProps({key:0},r.value,{fixed:o.fixedHeaderAndTab,"z-index":Xt,"min-width":o.minWidth,height:o.headerHeight,"padding-left":M.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(S.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),o.tabVisible?(e.openBlock(),e.createBlock(Ee,e.mergeProps({key:1},r.value,{fixed:o.fixedHeaderAndTab,"z-index":Yt,"min-width":o.minWidth,top:o.headerHeight,height:o.tabHeight,"padding-left":E.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(S.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),o.sidebarVisible?(e.openBlock(),e.createBlock(Ne,e.mergeProps({key:2},r.value,{"z-index":p.value,width:k.value,"padding-top":w.value}),{default:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle(C.value),onClick:_},null,4)):e.createCommentVNode("",!0),e.createVNode(Ve,e.mergeProps(r.value,{"padding-top":x.value,"padding-bottom":N.value,"padding-left":E.value,"overflow-hidden":o.addMainOverflowHidden}),{default:e.withCtx(()=>[e.renderSlot(S.$slots,"default")]),_:3},16,["padding-top","padding-bottom","padding-left","overflow-hidden"]),o.footerVisible?(e.openBlock(),e.createBlock(Te,e.mergeProps({key:4},r.value,{fixed:o.fixedFooter,"z-index":Ut,"min-width":o.minWidth,height:o.footerHeight,"padding-left":E.value,style:c.value}),{default:e.withCtx(()=>[e.renderSlot(S.$slots,"footer")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0)],4))}},U={state:e.reactive({theme:"dark"}),getters:{theme(){return U.state.theme}},mutations:{setTheme(o){U.state.theme=o,document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(o)}},actions:{toggleTheme(){U.state.theme=U.state.theme==="dark"?"light":"dark",document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(U.state.theme)}}},Gt={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(o){const t=o;return U.mutations.setTheme(t.theme),(n,l)=>e.renderSlot(n.$slots,"default")}},cl="",Zt={__name:"DScrollProvider",props:{xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(o){const t=o;e.useCssVars(a=>({e35a6f9a:n.value,e35a6f98:l.value}));const n=e.computed(()=>t.xHide?"hidden":"visible"),l=e.computed(()=>t.yHide?"hidden":"visible"),s=a=>{document.body.classList.add(a),document.documentElement.classList.add(a),document.documentElement.classList.add("d-global-scroll")};return e.onMounted(()=>{s("colored-scroller")}),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(a.$slots,"default")]))}},dl="",Kt=F({__name:"DScroll",props:{autoHide:{type:Boolean,default:!0},xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(o){const t=o;e.useCssVars(s=>({c07fa29a:n.value,c07fa298:l.value}));const n=e.computed(()=>t.xHide?"hidden":"visible"),l=e.computed(()=>t.yHide?"hidden":"visible");return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.autoHide?"d-scroll-hide":"d-scroll")},[e.renderSlot(s.$slots,"default",{},void 0,!0)],2))}},[["__scopeId","data-v-d50b3609"]]),Jt={class:"modal-content"},Qt={class:"modal-header"},vt={class:"modal-title"},eo={class:"modal-body"},to={class:"modal-footer"},pe={__name:"DModal",props:{show:Boolean,width:String,maxWidth:String},emits:["open","close"],setup(o,{expose:t,emit:n}){const l=o,s=e.ref(null),a=e.ref(!1);a.value=l==null?void 0:l.show;const i=()=>{a.value=!0,n("open",s)},c=()=>{a.value=!1,n("close",s)};return t({show:i,hide:c}),(r,d)=>{const p=e.resolveDirective("keydown");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[a.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:s,class:"modal"},[e.createElementVNode("div",{class:"modal-dialog",style:e.normalizeStyle({width:l.width,maxWidth:l.maxWidth})},[e.createElementVNode("div",Jt,[e.createElementVNode("div",Qt,[e.createElementVNode("h5",vt,[e.renderSlot(r.$slots,"modal-title")])]),e.createElementVNode("div",eo,[e.renderSlot(r.$slots,"default")]),e.createElementVNode("div",to,[e.renderSlot(r.$slots,"modal-footer")])])],4)])),[[p,c,"Escape"]]):e.createCommentVNode("",!0)]),_:3})])}}},q=e.shallowRef();function me(o){o===void 0&&(o=q.value.comp.returnValue()),q.value.resolve(o),q.value=null}function Le(o,t,n="default"){return new Promise(l=>{q.value={dialog:o,props:t,wrapper:n,resolve:l}})}var oo=(o,t)=>{const n=o.__vccOpts||o;for(const[l,s]of t)n[l]=s;return n};const no=e.defineComponent({name:"DialogWrapper",components:{},props:{name:{type:String,default:"default"},transitionAttrs:Object},setup(){const o=e.ref();return e.watch(o,()=>{q.value&&(q.value.comp=o.value)}),{dialogRef:q,dialogInstance:o}}});function lo(o,t,n,l,s,a){return e.openBlock(),e.createBlock(e.Transition,e.normalizeProps(e.guardReactiveProps(o.transitionAttrs)),{default:e.withCtx(()=>[o.dialogRef&&o.dialogRef.wrapper===o.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.dialogRef.dialog),e.mergeProps({key:0},o.dialogRef.props,{ref:"dialogInstance"}),null,16)):e.createCommentVNode("",!0)]),_:1},16)}var so=oo(no,[["render",lo]]);const ao={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Ie={__name:"DAlertDialog",props:{title:String,message:String},setup(o,{expose:t}){const n=o;return t({returnValue:()=>!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(pe,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",ao,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(me)())},{default:e.withCtx(()=>[e.createTextVNode("Закрыть")]),_:1})])]),_:1})]))}},ro={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Me={__name:"DConfirmDialog",props:{title:String,message:String},setup(o,{expose:t}){const n=o;return t({returnValue:()=>!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(pe,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",ro,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(me)())},{default:e.withCtx(()=>[e.createTextVNode("Да")]),_:1}),e.createVNode(H,{class:"button-red",onClick:a[1]||(a[1]=i=>e.unref(me)(!1))},{default:e.withCtx(()=>[e.createTextVNode("Нет")]),_:1})])]),_:1})]))}},io={class:"dropdown"},co={__name:"DDropdown",props:{class:String,icon:{type:[String,null],default:null},items:Array,menuStyle:Object,renderItemTitle:Function,beforeItem:Function,type:String,bodyAsParent:{type:Boolean,default:!0}},emits:["select","click"],setup(o,{expose:t,emit:n}){const l=o,s=e.useSlots(),a=e.ref(null),i=e.ref(null),c=e.ref(0),r=e.ref(0),d=B=>{if(n("click",B),a.value.isShowed()){a.value.hide();return}a.value.show(),e.nextTick(()=>{const C=a.value.elementSize(),k=i.value.elementSize(),E=window.innerWidth,M=window.innerHeight;c.value=E-(k.x+k.width)<C.width?k.left-C.width+k.width:k.left,r.value=M-(k.y+k.height)<C.height?k.top-C.height-5:k.height+k.top+5})},p=B=>{n("select",B)},u=e.computed(()=>({left:c.value+"px",top:r.value+"px",position:l.bodyAsParent?"absolute":"fixed",...l.menuStyle}));t({show:d});const _=B=>!!s[B];return(B,C)=>(e.openBlock(),e.createElementBlock("div",io,[_("default")?(e.openBlock(),e.createBlock(H,{key:0,ref_key:"buttonRef",ref:i,class:e.normalizeClass(l.class),icon:l.icon,onClick:e.withModifiers(d,["stop","prevent"]),type:l.type},{default:e.withCtx(()=>[e.renderSlot(B.$slots,"default")]),_:3},8,["class","icon","onClick","type"])):(e.openBlock(),e.createBlock(H,{key:1,ref_key:"buttonRef",ref:i,class:e.normalizeClass(l.class),icon:l.icon,onClick:e.withModifiers(d,["stop","prevent"]),type:l.type},null,8,["class","icon","onClick","type"])),e.createVNode(ce,{ref_key:"dMenuRef",ref:a,items:l.items,class:"dropdown-menu",style:e.normalizeStyle(u.value),"no-select":!0,onSelect:p,"render-item-title":l.renderItemTitle,"before-item":l.beforeItem,"body-as-parent":l.bodyAsParent},null,8,["items","style","render-item-title","before-item","body-as-parent"])]))}},po={},mo={class:"d-panel"};function fo(o,t){return e.openBlock(),e.createElementBlock("div",mo,[e.renderSlot(o.$slots,"default")])}const ze=F(po,[["render",fo]]),uo={class:"card-header"},ho={class:"modal-title"},go={class:"card-body"},yo={class:"card-footer"},_o={__name:"DCard",setup(o){return(t,n)=>(e.openBlock(),e.createBlock(ze,{class:"d-card"},{default:e.withCtx(()=>[e.createElementVNode("div",uo,[e.createElementVNode("h5",ho,[e.renderSlot(t.$slots,"title")])]),e.createElementVNode("div",go,[e.renderSlot(t.$slots,"default")]),e.createElementVNode("div",yo,[e.renderSlot(t.$slots,"footer")])]),_:3}))}},ko=new Map;class bo{constructor(t,n,l){this.remaining=n,this.callback=t,this.notifyItem=l,this.resume()}pause(){clearTimeout(this.notifyItem.timer),this.remaining-=Date.now()-this.start}resume(){this.start=Date.now(),clearTimeout(this.notifyItem.timer),this.notifyItem.timer=setTimeout(this.callback,this.remaining)}}const fe="[-+]?[0-9]*.?[0-9]+",Re=[{name:"px",regexp:new RegExp(`^${fe}px$`)},{name:"%",regexp:new RegExp(`^${fe}%$`)},{name:"px",regexp:new RegExp(`^${fe}$`)}],Bo=o=>{if(o==="auto")return{type:o,value:0};for(let t=0;t<Re.length;t++){const n=Re[t];if(n.regexp.test(o))return{type:n.name,value:parseFloat(o)}}return{type:"",value:o}},So=o=>{switch(typeof o){case"number":return{type:"px",value:o};case"string":return Bo(o);default:return{type:"",value:o}}},Oe={x:new Set(["left","center","right"]),y:new Set(["top","bottom"])},xo=(o=>()=>o++)(0),wo=o=>typeof o!="string"?[]:o.split(/\s+/gi).filter(Boolean),Do=o=>{typeof o=="string"&&(o=wo(o));let t=null,n=null;return o.forEach(l=>{Oe.y.has(l)&&(n=l),Oe.x.has(l)&&(t=l)}),{x:t,y:n}},ue={position:["top","right"],cssAnimation:"fade",velocityAnimation:{enter:o=>({height:[o.clientHeight,0],opacity:[1,0]}),leave:{height:0,opacity:[0,1]}}},Co={__name:"VelocityGroup",emits:["enter","leave","after-leave"],setup(o,{emit:t}){const n=(a,i)=>{t("enter",a,i)},l=(a,i)=>{t("leave",a,i)},s=()=>{t("after-leave")};return(a,i)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",css:!1,onEnter:n,onLeave:l,onAfterLeave:s},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},$o=Object.assign({inheritAttrs:!1},{__name:"CssGroup",props:{name:String},setup(o){const t=o;return(n,l)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",name:t.name},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["name"]))}}),Eo=["data-id"],To=["onClick"],No=["innerHTML"],Vo=["innerHTML"],Lo={key:0,class:"d-notification-title"},Io={class:"notification-content"},Mo={__name:"DNotificationProvider",props:{group:{type:String,default:""},width:{type:[String,Number],default:300},reverse:{type:Boolean,default:!1},position:{type:[String,Array,null],default:ue.position},classes:{type:String,default:"d-notification"},animationType:{type:String,default:"css"},animation:{type:[String,Object],default:ue.velocityAnimation},animationName:{type:String,default:ue.cssAnimation},speed:{type:Number,default:300},duration:{type:Number,default:3e3},delay:{type:Number,default:0},max:{type:Number,default:1/0},ignoreDuplicates:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!0},pauseOnHover:{type:Boolean,default:!1},dangerouslySetInnerHtml:{type:Boolean,default:!1}},emits:["click","destroy","start"],setup(o,{emit:t}){const n=o,l={IDLE:0,DESTROYED:2},s=e.ref([]),a=e.ref(null),i=e.ref(ko.get("velocity")),c=e.computed(()=>n.animationType==="velocity"),r=e.computed(()=>c.value?Co:$o),d=e.computed(()=>s.value.filter(f=>f.state!==l.DESTROYED)),p=e.computed(()=>So(n.width)),u=e.computed(()=>{const{x:f,y:m}=Do(n.position),y=p.value.value,$=p.value.type,Y={width:y+$};return m&&(Y[m]="0px"),f&&(f==="center"?Y.left=`calc(50% - ${+y/2}${$})`:Y[f]="0px"),Y}),_=e.computed(()=>"bottom"in u.value),B=f=>{t("click",f),n.closeOnClick&&N(f)},C=()=>{var f;n.pauseOnHover&&((f=a.value)==null||f.pause())},k=()=>{var f;n.pauseOnHover&&((f=a.value)==null||f.resume())},E=f=>{if(f.group||(f.group=""),f.data||(f.data={}),n.group!==f.group)return;if(f.clean||f.clear){V();return}const m=typeof f.duration=="number"?f.duration:n.duration,y=typeof f.speed=="number"?f.speed:n.speed,$=typeof f.ignoreDuplicates=="boolean"?f.ignoreDuplicates:n.ignoreDuplicates,{title:Y,text:te,type:oe,data:ne,id:le}=f,W={id:le||xo(),title:Y,text:te,type:oe,state:l.IDLE,speed:y,length:m+2*y,data:ne};m>=0&&(a.value=new bo(()=>N(W),W.length,W));const se=n.reverse?!_.value:_.value;let Z=-1;const ae=d.value.some(J=>J.title===f.title&&J.text===f.text);(!$||!ae)&&(se?(s.value.push(W),t("start",W),d.value.length>n.max&&(Z=0)):(s.value.unshift(W),t("start",W),d.value.length>n.max&&(Z=d.value.length-1)),Z!==-1&&N(d.value[Z]))},M=f=>{S(f)},w=f=>["d-notification-template",n.classes,f.type||""],x=f=>c.value?void 0:{transition:`all ${f.speed}ms`},N=f=>{clearTimeout(f.timer),f.state=l.DESTROYED,L(),t("destroy",f)},S=f=>{const m=s.value.find(y=>y.id===f);m&&N(m)},V=()=>{d.value.forEach(N)},D=(f,m)=>{var $;const y=($=n.animation)==null?void 0:$[f];return typeof y=="function"?y(m):y},b=(f,m)=>{if(!c.value)return;const y=D("enter",f);i.value(f,y,{duration:n.speed,complete:m})},T=(f,m)=>{if(!c.value)return;const y=D("leave",f);i.value(f,y,{duration:n.speed,complete:m})};function L(){s.value=s.value.filter(f=>f.state!==l.DESTROYED)}return e.onMounted(()=>{z.on("notification-add",E),z.on("notification-close",M)}),(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"d-notification-group",style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{name:o.animationName,onEnter:b,onLeave:T,onAfterLeave:L},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.id,class:"d-notification-wrapper",style:e.normalizeStyle(x(y)),"data-id":y.id,onMouseenter:C,onMouseleave:k},[e.renderSlot(f.$slots,"body",{class:e.normalizeClass([o.classes,y.type]),item:y,close:()=>N(y)},()=>[e.createElementVNode("div",{class:e.normalizeClass(w(y)),onClick:$=>B(y)},[o.dangerouslySetInnerHtml?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[y.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-notification-title",innerHTML:y.timer},null,8,No)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"notification-content",innerHTML:y.text},null,8,Vo)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[y.title?(e.openBlock(),e.createElementBlock("div",Lo,e.toDisplayString(y.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Io,e.toDisplayString(y.text),1)],64))],10,To)])],44,Eo))),128))]),_:3},40,["name"]))],4))}},zo={class:"d-info-progress-icon-container"},Ro={class:"d-info-progress-icon"},Oo={class:"d-info-progress-data-container"},Ao=["innerHTML"],Fo={__name:"DInfoProgress",props:{style:[String,Object],label:String,progress:Number,icon:String,type:String},emits:["click"],setup(o,{emit:t}){const n=o,l=e.computed(()=>n.icon?O.getters.getIcon(n.icon):null);return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-info-progress",n.type?`d-info-progress-${n.type}`:null]),style:e.normalizeStyle(n.style),onClick:a[0]||(a[0]=i=>{t("click",i)})},[e.createElementVNode("div",zo,[e.createElementVNode("div",Ro,[n.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j),{key:0,component:l.value,color:"inherit",size:17},null,8,["component"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Oo,[e.createElementVNode("div",{class:"d-info-progress-line",style:e.normalizeStyle("width: "+n.progress+"%;")},null,4),e.createElementVNode("div",{class:"d-info-progress-label",innerHTML:o.label},null,8,Ao)])],6))}},Ho={class:"d-checkbox"},Po=["id","checked","disabled"],Wo=["for"],jo={__name:"DCheckbox",props:{label:String,modelValue:Boolean,disabled:{type:Boolean,default:!1},change:Function,checked:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=o,s=e.getCurrentInstance().uid,a=e.computed({get:()=>n.modelValue,set:i=>{t("update:modelValue",i)}});return(i,c)=>(e.openBlock(),e.createElementBlock("div",Ho,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=r=>a.value=r),id:`i-${e.unref(s)}`,type:"checkbox",checked:n.checked,disabled:n.disabled,onChange:c[1]||(c[1]=(...r)=>n.change&&n.change(...r))},null,40,Po),[[e.vModelCheckbox,a.value]]),e.createElementVNode("label",{for:`i-${e.unref(s)}`},e.toDisplayString(n.label),9,Wo)]))}};async function Ae(o,t){return await Le(Me,{title:o,message:t})}async function Fe(o,t){return await Le(Ie,{title:o,message:t})}const Xo={__name:"DDialogProvider",setup(o){return window.alert=Fe,window.confirm=Ae,(t,n)=>(e.openBlock(),e.createBlock(e.unref(so)))}},Yo={class:"d-select"},Uo={key:0,class:"label"},qo=["disabled"],Go=["value","selected","disabled"],Zo={__name:"DSelect",props:{label:String,size:String,options:Array,modelValue:String,scale:String,disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(o,{emit:t}){const n=o,l=e.computed(()=>n.scale?"d-select-"+n.scale:""),s=e.computed({get:()=>n.modelValue,set:a=>{t("update:modelValue",a)}});for(let a=0;a<n.options.length;a++)if(n.options[a].selected){s.value=n.options[a].value;break}return(a,i)=>(e.openBlock(),e.createElementBlock("div",Yo,[n.label?(e.openBlock(),e.createElementBlock("div",Uo,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=c=>s.value=c),class:e.normalizeClass(l.value),style:e.normalizeStyle(n.size==="wide"?"width:100%":""),disabled:n.disabled},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,(c,r)=>(e.openBlock(),e.createElementBlock("option",{key:r,value:c.value,selected:c.selected,disabled:c.disabled},e.toDisplayString(c.label),9,Go))),128))],14,qo),[[e.vModelSelect,s.value]])]))}},ml="",Ko=["title"],Jo={class:"tab-icon"},Qo={class:"tab-label"},vo=["title"],en=["title"],tn=F({__name:"DTabLabel",props:{tab:Object},setup(o){const t=o;return(n,l)=>t.tab.label&&t.tab.icon?(e.openBlock(),e.createElementBlock("span",{key:0,title:t.tab.title?t.tab.title:"",style:{display:"flex","flex-direction":"column"}},[e.createElementVNode("div",Jo,[e.createVNode(e.unref(j),{component:t.tab.icon},null,8,["component"])]),e.createElementVNode("div",Qo,e.toDisplayString(t.tab.label),1)],8,Ko)):t.tab.label?(e.openBlock(),e.createElementBlock("span",{key:1,title:t.tab.title?t.tab.title:""},e.toDisplayString(t.tab.label),9,vo)):t.tab.icon?(e.openBlock(),e.createElementBlock("span",{key:2,title:t.tab.title?t.tab.title:""},[e.createVNode(e.unref(j),{component:t.tab.icon},null,8,["component"])],8,en)):e.createCommentVNode("",!0)}},[["__scopeId","data-v-9262b225"]]),ul="",on={class:"d-tabs"},nn=F({__name:"DTabs",props:{tabs:Array},setup(o,{expose:t}){const n=o,l=e.toRef(n,"tabs"),s=e.ref([]),a=e.ref(0),i=d=>{a.value=d},c=d=>{d&&!s.value.includes(d)&&s.value.push(d)};return t({refs:()=>s.value}),(d,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",on,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(u,_)=>(e.openBlock(),e.createBlock(tn,{index:_,tab:u,class:e.normalizeClass(["d-tab-title",_===a.value?"active":""]),onClick:B=>i(_)},null,8,["index","tab","class","onClick"]))),256))]),(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(u,_)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.component),{ref_for:!0,ref:c},null,512)),[[e.vShow,_===a.value]])]))),256))],1024))],64))}},[["__scopeId","data-v-4b44471a"]]),gl="",ln={class:"d-grid"},sn=F({__name:"DGrid",props:{gap:{type:String,default:"1em"},colXs:{type:String,default:"repeat(1, 1fr)"},colSm:String,colMd:String,colLg:String,colXl:String,colXxl:String},setup(o){const t=o;e.useCssVars(p=>({"09eba472":r[0],"09eba434":r[1],"09eba3f6":r[2],"09eba3b8":r[3],"09eba37a":r[4],"09eba33c":r[5],"898eb2ac":t.gap}));const{colXs:n,colSm:l,colMd:s,colLg:a,colXl:i,colXxl:c}=e.toRefs(t),r=[n.value,l.value,s.value,a.value,i.value,c.value];let d=null;for(let p=0;p<r.length;p++)d||(d=r[0]),p>0&&(r[p]?d=r[p]:r[p]=d);return(p,u)=>(e.openBlock(),e.createElementBlock("div",ln,[e.renderSlot(p.$slots,"default",{},void 0,!0)]))}},[["__scopeId","data-v-b45e8130"]]),an=["src","alt","title"],rn={__name:"DImage",props:{src:String,srcFail:String,alt:String,title:String,width:String,height:String,radius:String},setup(o){const t=o,n=e.ref(null),l=new Image;return l.onload=()=>{n.value=l.src},l.onerror=()=>{n.value=t.srcFail},e.onMounted(()=>{l.src=t.src}),(s,a)=>n.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.value,alt:t.alt,title:t.title,style:e.normalizeStyle({width:t.width,height:t.height,borderRadius:t.radius})},null,12,an)):e.createCommentVNode("",!0)}},_l="",cn={class:"d-textarea"},dn={key:0,class:"label"},pn=["rows","cols","placeholder"],mn=F({__name:"DTextarea",props:{label:String,placeholder:String,scale:String,modelValue:String,rows:{type:Number,default:3},cols:{type:Number,default:null},focus:Boolean},emits:["update:modelValue"],setup(o,{expose:t,emit:n}){const l=o,s=e.ref(null),a=e.computed(()=>l.scale==="small"?"d-textarea-small":l.scale==="large"?"d-textarea-large":""),i=e.computed({get:()=>l.modelValue,set:r=>{n("update:modelValue",r)}});e.onMounted(()=>{l.focus&&c()});const c=()=>{s.value.focus()};return t({focus:c}),(r,d)=>(e.openBlock(),e.createElementBlock("div",cn,[l.label?(e.openBlock(),e.createElementBlock("div",dn,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":d[0]||(d[0]=p=>i.value=p),rows:l.rows,cols:l.cols,placeholder:l.placeholder,class:e.normalizeClass(a.value),style:{width:"100%"}},null,10,pn),[[e.vModelText,i.value]])]))}},[["__scopeId","data-v-0e805d5d"]]);class fn{constructor(t){this.fields=t}validate(){let t=!1;for(let n in this.fields)this.fields[n].ref.value.validate()===!0&&(t=!0);return!t}}class un{validate(t,n="https"){return this._isValidURL(t)||(t=n+"://"+t),this._isValidURL(t)}message(t,n){let l="";switch(t){case"url":l=n;break}return l}_isValidURL(t){try{return new URL(t),!0}catch{return!1}}}const hn=new un;class gn{validate(t=""){return t!==""}message(t){return t}}const yn=new gn;class _n{validate(t="",n=0){return t.length>=n}message(t){return t}}const kn=new _n;class bn{validate(t="",n=0){return t.length<=n}message(t){return t}}const Bn=new bn;class Sn{validate(t){return/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(t)}message(t){return t}}const xn=new Sn;class wn{validate(t){return!isNaN(parseFloat(t))&&!isNaN(t-0)}message(t){return t}}const Dn=new wn,R={RulesUrl:hn,RulesRequired:yn,RulesMin:kn,RulesMax:Bn,RulesEmail:xn,RulesNumber:Dn};class Cn{validate(t,n){var s,a,i,c,r,d,p,u,_,B,C,k,E,M;let l="";if(n){let w=!1;for(let x in n)if(!w)switch(x){case"url":l=R.RulesUrl.validate(t,"https")||t.length===0?"":R.RulesUrl.message("url",(s=n[x])!=null&&s.message?(a=n[x])==null?void 0:a.message:"url_incorrect"),w=l!=="";break;case"required":l=R.RulesRequired.validate(t)?"":R.RulesRequired.message((i=n[x])!=null&&i.message?(c=n[x])==null?void 0:c.message:"required"),w=l!=="";break;case"min":l=R.RulesMin.validate(t,(r=n[x])==null?void 0:r.value)?"":R.RulesMin.message((d=n[x])!=null&&d.message?(p=n[x])==null?void 0:p.message:"very_small"),w=l!=="";break;case"max":l=R.RulesMax.validate(t,(u=n[x])==null?void 0:u.value)?"":R.RulesMax.message((_=n[x])!=null&&_.message?(B=n[x])==null?void 0:B.message:"vary_large"),w=l!=="";break;case"email":l=R.RulesEmail.validate(t)?"":R.RulesMax.message((C=n[x])!=null&&C.message?(k=n[x])==null?void 0:k.message:"email_incorrect"),w=l!=="";break;case"number":l=R.RulesNumber.validate(t)?"":R.RulesNumber.message((E=n[x])!=null&&E.message?(M=n[x])==null?void 0:M.message:"number_incorrect"),w=l!=="";break}}return l}}const $n=new Cn,En={style:{display:"flex","flex-direction":"column"}},Tn={key:0,class:"d-label"},Nn={key:0,class:"text-red"},Vn={style:{display:"flex","flex-direction":"row"}},Ln={style:{flex:"1",position:"relative"}},In=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"})],-1)],Mn=["id","type","placeholder","disabled"],zn=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"})],-1)],Rn={key:1,class:"d-help"},On={key:2,class:"d-error text-red"},An={__name:"DInputString",props:{form:Object,name:String,modelValue:String,label:String,error:String,help:String,placeholder:String,type:{type:String,default:"text"},pre:Object,post:Object,fieldRules:Object,scale:String,focus:Boolean,disabled:Boolean},emits:["update:modelValue","input","blur"],setup(o,{expose:t,emit:n}){const l=o,s=e.ref(l.error),a=ct(),i=e.ref(!1),c=e.ref(null);//!props.form ? ref(null) : props.form.fields[props.name].ref
|
|
2
2
|
const r=e.computed({get:()=>l.modelValue,set:w=>{n("update:modelValue",w)}}),d=e.computed(()=>l.type==="password"?"password":"text"),p=e.computed(()=>l.scale),u=w=>{n("input",w),_()},_=()=>{if(!(!l.form||!l.form.fields||!l.form.fields[l.name].rules))return s.value=$n.validate(r.value,l.form.fields[l.name].rules),!!s.value};e.onMounted(()=>{B()});const B=()=>{var w;(w=c.value)==null||w.focus()},C=()=>{r.value=""},k=w=>{i.value=w},E=w=>{s.value=w},M=w=>{n("blur",w)};return t({focus:B,setError:E,validate:_}),(w,x)=>{var N,S,V,D,b,T,L,f,m,y,$,Y,te,oe,ne,le,W,se,Z,ae,_e,J,Ue,qe,Ge,Ze,Ke,Je,Qe,ve,et,tt,ot,nt,lt,st,at,rt,it;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-input-string",p.value])},[e.createElementVNode("div",En,[l.label?(e.openBlock(),e.createElementBlock("div",Tn,[e.createTextVNode(e.toDisplayString(l.label),1),(N=l.form)!=null&&N.fields[l.name].rules&&l.form.fields[l.name].rules.hasOwnProperty("required")?(e.openBlock(),e.createElementBlock("span",Nn,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Vn,[(V=(S=l.pre)==null?void 0:S.outside)!=null&&V.component?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["d-pre",l.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((b=(D=l.pre)==null?void 0:D.outside)==null?void 0:b.component)))],2)):(L=(T=l.pre)==null?void 0:T.outside)!=null&&L.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["d-pre",l.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((m=(f=l.pre)==null?void 0:f.outside)==null?void 0:m.text),3)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",Ln,[($=(y=l.pre)==null?void 0:y.inside)!=null&&$.action&&((te=(Y=l.pre)==null?void 0:Y.inside)==null?void 0:te.action)==="clear"&&((oe=r.value)==null?void 0:oe.length)>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-pre-inside-button",onClick:C},In)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{id:e.unref(a),ref_key:"inputRef",ref:c,"onUpdate:modelValue":x[0]||(x[0]=ke=>r.value=ke),style:{width:"100%"},type:d.value,placeholder:l.placeholder,onInput:u,onFocus:x[1]||(x[1]=ke=>k(!0)),onBlur:M,onFocusout:x[2]||(x[2]=ke=>k(!1)),class:e.normalizeClass([(le=(ne=l.pre)==null?void 0:ne.outside)!=null&&le.component||(se=(W=l.pre)==null?void 0:W.outside)!=null&&se.text?"has-pre":"",(ae=(Z=l.post)==null?void 0:Z.outside)!=null&&ae.component||(J=(_e=l.post)==null?void 0:_e.outside)!=null&&J.text?"has-post":"",(qe=(Ue=l.pre)==null?void 0:Ue.inside)!=null&&qe.action?"has-pre-inside-button":"",(Ze=(Ge=l.post)==null?void 0:Ge.inside)!=null&&Ze.action?"has-post-inside-button":"",i.value?"focused":""]),disabled:l.disabled},null,42,Mn),[[e.vModelDynamic,r.value]]),(Je=(Ke=l.post)==null?void 0:Ke.inside)!=null&&Je.action&&((ve=(Qe=l.post)==null?void 0:Qe.inside)==null?void 0:ve.action)==="clear"&&((et=r.value)==null?void 0:et.length)>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"d-post-inside-button",onClick:C},zn)):e.createCommentVNode("",!0)]),(ot=(tt=l.post)==null?void 0:tt.outside)!=null&&ot.component?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["d-post",l.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((lt=(nt=l.post)==null?void 0:nt.outside)==null?void 0:lt.component)))],2)):(at=(st=l.post)==null?void 0:st.outside)!=null&&at.text?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["d-post",l.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((it=(rt=l.post)==null?void 0:rt.outside)==null?void 0:it.text),3)],2)):e.createCommentVNode("",!0)]),l.help?(e.openBlock(),e.createElementBlock("div",Rn,e.toDisplayString(l.help),1)):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",On,e.toDisplayString(s.value),1)):e.createCommentVNode("",!0)])],2)}}},G={state:{},getters:{getComponent(o){return G.state[o]},getComponents(){return G.state}},mutations:{addComponent(o,t){G.state.name=t},addComponents(o){for(const t in o)o.hasOwnProperty(t)&&(G.state[t]=o[t])}}},he=o=>{typeof o=="string"&&(o={title:"",text:o}),typeof o=="object"&&z.emit("notification-add",o)};he.close=o=>{z.emit("notification-close",o)};const Fn=()=>({notify:he}),Hn={mounted:function(o,t){o.clickOutsideEvent=function(n){o===n.target||o.contains(n.target)||t.value(n,o)},document.addEventListener("click",o.clickOutsideEvent)},unmounted:function(o){document.removeEventListener("click",o.clickOutsideEvent)}},Pn={beforeMount(o,t){o._keydownCallback=n=>{n.key===t.arg&&t.value()},document.addEventListener("keydown",o._keydownCallback)},unmounted(o,t){document.removeEventListener("keydown",o._keydownCallback),delete o._keydownCallback}},Wn={beforeMount(o){o.focus()}};function He(o){return o.type.indexOf("mouse")!==-1?o.clientX:o.touches[0].clientX}function Pe(o){return o.type.indexOf("mouse")!==-1?o.clientY:o.touches[0].clientY}var jn=function(){var o=!1;try{var t=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("test",null,t)}catch{}return o}(),Xn={disableClick:!1,tapTolerance:10,swipeTolerance:30,touchHoldTolerance:400,longTapTimeInterval:400,touchClass:"",dragFrequency:100,rollOverFrequency:100};function Q(o){var t=this.$$touchObj,n=o.type.indexOf("touch")>=0,l=o.type.indexOf("mouse")>=0,s=this;n&&(t.lastTouchStartTime=o.timeStamp),!(l&&t.lastTouchStartTime&&o.timeStamp-t.lastTouchStartTime<350)&&(t.touchStarted||(Ye(this),t.touchStarted=!0,t.touchMoved=!1,t.swipeOutBounded=!1,t.startX=He(o),t.startY=Pe(o),t.currentX=0,t.currentY=0,t.touchStartTime=o.timeStamp,t.hasSwipe=A(this,"swipe")||A(this,"swipe.left")||A(this,"swipe.right")||A(this,"swipe.top")||A(this,"swipe.bottom"),A(this,"hold")&&(t.touchHoldTimer=setTimeout(function(){t.touchHoldTimer=null,P(o,s,"hold")},t.options.touchHoldTolerance)),P(o,this,"press")))}function v(o){var t=this.$$touchObj,n=He(o),l=Pe(o),s=t.currentX!==n||t.currentY!==l;if(t.currentX=n,t.currentY=l,t.touchMoved){if(t.hasSwipe&&!t.swipeOutBounded){var i=t.options.swipeTolerance;t.swipeOutBounded=Math.abs(t.startX-t.currentX)>i&&Math.abs(t.startY-t.currentY)>i}}else{var a=t.options.tapTolerance;t.touchMoved=Math.abs(t.startX-t.currentX)>a||Math.abs(t.startY-t.currentY)>a,t.touchMoved&&(ye(t),P(o,this,"drag.once"))}if(A(this,"rollover")&&s){var c=o.timeStamp,r=t.options.rollOverFrequency;(t.touchRollTime==null||c>t.touchRollTime+r)&&(t.touchRollTime=c,P(o,this,"rollover"))}if(A(this,"drag")&&t.touchStarted&&t.touchMoved&&s){var c=o.timeStamp,r=t.options.dragFrequency;(t.touchDragTime==null||c>t.touchDragTime+r)&&(t.touchDragTime=c,P(o,this,"drag"))}}function We(){var o=this.$$touchObj;ye(o),ge(this),o.touchStarted=o.touchMoved=!1,o.startX=o.startY=0}function ee(o){var t=this.$$touchObj,n=o.type.indexOf("touch")>=0,l=o.type.indexOf("mouse")>=0;n&&(t.lastTouchEndTime=o.timeStamp);var s=n&&!t.touchHoldTimer;if(ye(t),t.touchStarted=!1,ge(this),!(l&&t.lastTouchEndTime&&o.timeStamp-t.lastTouchEndTime<350))if(P(o,this,"release"),t.touchMoved){if(t.hasSwipe&&!t.swipeOutBounded){var a=t.options.swipeTolerance,i,c=Math.abs(t.startY-t.currentY),r=Math.abs(t.startX-t.currentX);(c>a||r>a)&&(c>a?i=t.startY>t.currentY?"top":"bottom":i=t.startX>t.currentX?"left":"right",A(this,"swipe."+i)?P(o,this,"swipe."+i,i):P(o,this,"swipe",i))}}else if(A(this,"longtap")&&o.timeStamp-t.touchStartTime>t.options.longTapTimeInterval)o.cancelable&&o.preventDefault(),P(o,this,"longtap");else if(A(this,"hold")&&s){o.cancelable&&o.preventDefault();return}else P(o,this,"tap")}function je(){Ye(this)}function Xe(){ge(this)}function A(o,t){var n=o.$$touchObj.callbacks[t];return n!=null&&n.length>0}function P(o,t,n,l){var s=t.$$touchObj,a=s.callbacks[n];if(a==null||a.length===0)return null;for(var i=0;i<a.length;i++){var c=a[i];c.modifiers.stop&&o.stopPropagation(),c.modifiers.prevent&&o.preventDefault(),!(c.modifiers.self&&o.target!==o.currentTarget)&&typeof c.value=="function"&&(l?c.value(l,o):c.value(o))}}function Ye(o){var t=o.$$touchObj.options.touchClass;t&&o.classList.add(t)}function ge(o){var t=o.$$touchObj.options.touchClass;t&&o.classList.remove(t)}function ye(o){o.touchHoldTimer&&(clearTimeout(o.touchHoldTimer),o.touchHoldTimer=null)}function Yn(o,t){var n=o.$$touchObj||{callbacks:{},hasBindTouchEvents:!1,options:Xn};return t&&(n.options=Object.assign({},n.options,t)),o.$$touchObj=n,o.$$touchObj}const Un={beforeMount:function(o,t){const n=Yn(o);let l=jn?{passive:!0}:!1;const s=t.arg||"tap";switch(s){case"swipe":let a=t.modifiers;if(a.left||a.right||a.top||a.bottom){for(let i in t.modifiers)if(["left","right","top","bottom"].indexOf(i)>=0){let c="swipe."+i;n.callbacks[c]=n.callbacks[c]||[],n.callbacks[c].push(t)}}else n.callbacks.swipe=n.callbacks.swipe||[],n.callbacks.swipe.push(t);break;case"press":case"drag":t.modifiers.disablePassive&&(l=!1);default:n.callbacks[s]=n.callbacks[s]||[],n.callbacks[s].push(t)}n.hasBindTouchEvents||(o.addEventListener("touchstart",Q,l),o.addEventListener("touchmove",v,l),o.addEventListener("touchcancel",We),o.addEventListener("touchend",ee),n.options.disableClick||(o.addEventListener("mousedown",Q),o.addEventListener("mousemove",v),o.addEventListener("mouseup",ee),o.addEventListener("mouseenter",je),o.addEventListener("mouseleave",Xe)),n.hasBindTouchEvents=!0)},unmounted:function(o){o.removeEventListener("touchstart",Q),o.removeEventListener("touchmove",v),o.removeEventListener("touchcancel",We),o.removeEventListener("touchend",ee),o.$$touchObj&&!o.$$touchObj.options.disableClick&&(o.removeEventListener("mousedown",Q),o.removeEventListener("mousemove",v),o.removeEventListener("mouseup",ee),o.removeEventListener("mouseenter",je),o.removeEventListener("mouseleave",Xe)),delete o.$$touchObj}};h.DAccordion=Wt,h.DAlertDialog=Ie,h.DBadge=Be,h.DButton=H,h.DCard=_o,h.DCheckbox=jo,h.DCollapse=Se,h.DComponentStore=G,h.DConfigProvider=Gt,h.DConfirmDialog=Me,h.DContextMenu=Ce,h.DDialogProvider=Xo,h.DDrag=ie,h.DDrop=De,h.DDropdown=co,h.DForm=fn,h.DGlobalStore=U,h.DGrid=sn,h.DIcon=j,h.DIconStore=O,h.DImage=rn,h.DInfoProgress=Fo,h.DInput=Et,h.DInputString=An,h.DLayoutAdmin=qt,h.DLayoutContent=Ve,h.DLayoutFooter=Te,h.DLayoutHeader=$e,h.DLayoutSidebar=Ne,h.DLayoutTab=Ee,h.DMenu=ce,h.DModal=pe,h.DNotificationProvider=Mo,h.DPanel=ze,h.DScroll=Kt,h.DScrollProvider=Zt,h.DSelect=Zo,h.DTabs=nn,h.DTextarea=mn,h.DTransferStore=K,h.DTree=de,h.DTreeItem=xe,h.DTreeStore=g,h.Rules=R,h.alert=Fe,h.clickOutside=Hn,h.confirm=Ae,h.emitter=z,h.eventsBus=we,h.focus=Wn,h.keydown=Pn,h.notify=he,h.touch=Un,h.useNotification=Fn,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|