@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1 lines • 167 kB
JavaScript
(function(L,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("lodash-es"),require("vue-i18n"),require("../locale/index.umd.js"),require("../common/index.umd.js"),require("@vueuse/core"),require("../data-view/index.umd.js"),require("../dynamic-resolver/index.umd.js"),require("../designer-canvas/index.umd.js"),require("../property-panel/index.umd.js"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../../designer/button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../../designer/checkbox/index.umd.js"),require("../../designer/checkbox-group/index.umd.js"),require("../combo-list/index.umd.js"),require("../combo-tree/index.umd.js"),require("../component/index.umd.js"),require("../color-picker/index.umd.js"),require("../content-container/index.umd.js"),require("../date-picker/index.umd.js"),require("../../designer/data-grid/index.umd.js"),require("../dropdown/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../events-editor/index.umd.js"),require("../filter-bar/index.umd.js"),require("../field-selector/index.umd.js"),require("../binding-selector/index.umd.js"),require("../image-cropper/index.umd.js"),require("../../designer/input-group/index.umd.js"),require("../layout/index.umd.js"),require("../list-nav/index.umd.js"),require("../../designer/list-view/index.umd.js"),require("../lookup/index.umd.js"),require("../mapping-editor/index.umd.js"),require("../nav/index.umd.js"),require("../number-range/index.umd.js"),require("../number-spinner/index.umd.js"),require("../order/index.umd.js"),require("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../pagination/index.umd.js"),require("../progress/index.umd.js"),require("../query-solution/index.umd.js"),require("../../designer/radio-group/index.umd.js"),require("../rate/index.umd.js"),require("../response-toolbar/index.umd.js"),require("../response-layout/index.umd.js"),require("../response-layout-editor/index.umd.js"),require("../search-box/index.umd.js"),require("../section/index.umd.js"),require("../smoke-detector/index.umd.js"),require("../splitter/index.umd.js"),require("../step/index.umd.js"),require("../switch/index.umd.js"),require("../tabs/index.umd.js"),require("../tags/index.umd.js"),require("../text/index.umd.js"),require("../time-picker/index.umd.js"),require("../transfer/index.umd.js"),require("../tree-view/index.umd.js"),require("../uploader/index.umd.js"),require("../verify-detail/index.umd.js"),require("../video/index.umd.js"),require("../textarea/index.umd.js"),require("../schema-selector/index.umd.js"),require("../../designer/tree-grid/index.umd.js"),require("../event-parameter/index.umd.js"),require("../filter-condition-editor/index.umd.js"),require("../fieldset/index.umd.js"),require("../sort-condition-editor/index.umd.js"),require("../menu-lookup/index.umd.js"),require("../../designer/drawer/index.umd.js"),require("../json-editor/index.umd.js"),require("../property-editor/index.umd.js"),require("../expression-editor/index.umd.js"),require("../code-editor/index.umd.js"),require("../html-template/index.umd.js"),require("../collection-property-editor/index.umd.js"),require("../modal/index.umd.js"),require("../external-container/index.umd.js"),require("../language-textbox/index.umd.js"),require("../notify/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","vue-i18n","../locale/index.umd.js","../common/index.umd.js","@vueuse/core","../data-view/index.umd.js","../dynamic-resolver/index.umd.js","../designer-canvas/index.umd.js","../property-panel/index.umd.js","../accordion/index.umd.js","../avatar/index.umd.js","../../designer/button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../../designer/checkbox/index.umd.js","../../designer/checkbox-group/index.umd.js","../combo-list/index.umd.js","../combo-tree/index.umd.js","../component/index.umd.js","../color-picker/index.umd.js","../content-container/index.umd.js","../date-picker/index.umd.js","../../designer/data-grid/index.umd.js","../dropdown/index.umd.js","../dynamic-form/index.umd.js","../events-editor/index.umd.js","../filter-bar/index.umd.js","../field-selector/index.umd.js","../binding-selector/index.umd.js","../image-cropper/index.umd.js","../../designer/input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../../designer/list-view/index.umd.js","../lookup/index.umd.js","../mapping-editor/index.umd.js","../nav/index.umd.js","../number-range/index.umd.js","../number-spinner/index.umd.js","../order/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../pagination/index.umd.js","../progress/index.umd.js","../query-solution/index.umd.js","../../designer/radio-group/index.umd.js","../rate/index.umd.js","../response-toolbar/index.umd.js","../response-layout/index.umd.js","../response-layout-editor/index.umd.js","../search-box/index.umd.js","../section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../switch/index.umd.js","../tabs/index.umd.js","../tags/index.umd.js","../text/index.umd.js","../time-picker/index.umd.js","../transfer/index.umd.js","../tree-view/index.umd.js","../uploader/index.umd.js","../verify-detail/index.umd.js","../video/index.umd.js","../textarea/index.umd.js","../schema-selector/index.umd.js","../../designer/tree-grid/index.umd.js","../event-parameter/index.umd.js","../filter-condition-editor/index.umd.js","../fieldset/index.umd.js","../sort-condition-editor/index.umd.js","../menu-lookup/index.umd.js","../../designer/drawer/index.umd.js","../json-editor/index.umd.js","../property-editor/index.umd.js","../expression-editor/index.umd.js","../code-editor/index.umd.js","../html-template/index.umd.js","../collection-property-editor/index.umd.js","../modal/index.umd.js","../external-container/index.umd.js","../language-textbox/index.umd.js","../notify/index.umd.js"],t):(L=typeof globalThis<"u"?globalThis:L||self,t(L["flow-canvas"]={},L.Vue,L.LodashES,L.vueI18n,L.locale,L.common,L.VueUseCore,L.dataView,L.dynamicResolver,null,null,L.FAccordion,L.FAvatar,L.FButtonEdit,L.FButtonGroup,L.FCalendar,L.FCapsule,L.FCheckbox,L.FCheckboxGroup,L.FComboList,L.FComboTree,L.FComponent,L.FColorPicker,L.FContentContainer,L.FDatePicker,L.FDataGrid,L.FDropdown,L.FDynamicForm,L.FEventsEditor,L.FFilterBar,L.FFieldSelector,L.FBindingSelector,L.FImageCropper,L.FInputGroup,L.FLayout,L.FListNav,L.FListView,L.FLookup,L.FMappingEditor,L.FNav,L.FNumberRange,L.FNumberSpinner,L.FOrder,L.FPageHeader,L.FPageFooter,L.FPagination,L.FProgress,L.FQuerySolution,L.FRadioGroup,L.FRate,L.FResponseToolbar,L.FResponseLayout,L.FResponseLayoutEditorSetting,L.FSearchBox,L.FSection,L.FSmokeDetector,L.FSplitter,L.FStep,L.FSwitch,L.FTabs,L.FTags,L.FText,L.FTimePicker,L.FTransfer,L.FTreeview,L.FUploader,L.FVerifyDetail,L.FVideo,L.FTextArea,L.FSchemaSelector,L.FTreeGrid$1,L.FEventParameter,L.FFilterConditionEditor,L.FFieldset,L.FSortConditionEditor,L.FMenuLookup,L.FDrawer,L.FJsonEditor,L.FPropertyEditor,L.FExpressionEditor,L.FCodeEditor,L.FHtmlTemplate,L.FCollectionPropertyEditor,L.FModal$1,L.FExternalContainer,L.FLanguageTextbox,L.notify))})(this,function(L,t,he,St,ft,Le,Mo,de,Xe,Ji,Zi,_t,Ut,Wt,Yt,Xt,Gt,Tt,pt,Qt,Bo,Jt,Zt,Kt,en,tn,nn,on,ko,rn,Oo,an,sn,ln,cn,un,dn,fn,Eo,pn,mn,gn,vn,yn,hn,bn,Cn,wn,xn,Sn,Tn,Nn,Fn,jn,Mn,Bn,kn,On,En,Vn,Pn,Dn,In,Rn,$n,qn,Ln,An,zn,Vo,Hn,Po,Do,_n,Io,Ro,Un,$o,qo,Lo,Ao,Wn,zo,Ho,Yn,Xn,_o){"use strict";var Gi=Object.defineProperty;var Qi=(L,t,he)=>t in L?Gi(L,t,{enumerable:!0,configurable:!0,writable:!0,value:he}):L[t]=he;var Ie=(L,t,he)=>Qi(L,typeof t!="symbol"?t+"":t,he);const Gn={modelValue:{type:Object,default:{}}};function Uo(){const r={aroundDirection:"none",left:2,right:2,top:2,bottom:2,x:0,y:0};function i(){const w=document.createElementNS("http://www.w3.org/2000/svg","path");return w.setAttribute("fill","none"),w.setAttribute("stroke","#4d53e8"),w.setAttribute("stroke-width","2"),w.setAttribute("class",""),w}function c(){const w=document.createElementNS("http://www.w3.org/2000/svg","path");return w.setAttribute("fill","none"),w.setAttribute("stroke","#4d53e8"),w.setAttribute("stroke-width","2"),w.setAttribute("stroke-linecap","round"),w}function a(){const w=document.createElementNS("http://www.w3.org/2000/svg","path");return w.setAttribute("fill","none"),w.setAttribute("stroke","#4d53e8"),w.setAttribute("stroke-width","2"),w.setAttribute("stroke-linecap","round"),w}function m(w,T,F,k){const h=v=>{v.key==="Delete"&&(w.indexOf("^"),document.removeEventListener("keydown",h),T.remove())};F.addEventListener("mouseenter",()=>{F.setAttribute("stroke","#37d0ff"),k.setAttribute("stroke","#37d0ff"),F.setAttribute("stroke-width","3"),document.addEventListener("keydown",h)}),F.addEventListener("mouseleave",()=>{F.setAttribute("stroke","#4d53e8"),F.setAttribute("stroke-width","2"),k.setAttribute("stroke","#4d53e8"),document.removeEventListener("keydown",h)})}function y(w){let T=document.getElementById(w);if(T==null){const F=document.createElementNS("http://www.w3.org/2000/svg","svg"),k=i();F.appendChild(k);const h=c();F.appendChild(h);const v=a();F.appendChild(v);const D=a();F.appendChild(D),T=document.createElement("div"),T.id=w,T.style.position="absolute",T.appendChild(F),m(w,T,k,h);const $=document.getElementById("svg-container");return $&&$.appendChild(T),T}return T}function f(w,T,F,k,h){const v={x:0,y:0};return w==="west"&&(T==="north_west"&&(F==="north"&&(v.x=0,v.y=0-h/2),F==="west"&&(v.x=0-k/2,v.y=0)),T==="north_east"&&(F==="north"&&(v.x=-100,v.y=0-h/2),F==="east"&&(v.x=-100,v.y=0-h/2)),T==="south_east"&&(F==="south"&&(v.x=-100,v.y=0+h/2),F==="east"&&(v.x=-100,v.y=0+h/2)),T==="south_west"&&(F==="south"&&(v.x=0,v.y=0+h/2),F==="west"&&(v.x=0-k/2,v.y=0))),w==="east"&&(T==="north_west"&&(F==="north"&&(v.x=-100,v.y=0-h/2),F==="west"&&(v.x=100,v.y=0-h/2)),T==="north_east"&&(F==="north"&&(v.x=0,v.y=0-h/2),F==="east"&&(v.x=0+k/2,v.y=0)),T==="south_east"&&(F==="south"&&(v.x=0,v.y=0+h/2),F==="east"&&(v.x=0+k/2,v.y=0)),T==="south_west"&&(F==="south"&&(v.x=100,v.y=0+h/2),F==="west"&&(v.x=100,v.y=0+h/2))),w==="north"&&(T==="north_west"&&(F==="north"&&(v.x=0,v.y=0-h/2),F==="west"&&(v.x=0-k/2,v.y=0)),T==="north_east"&&(F==="north"&&(v.x=0,v.y=0-h/2),F==="east"&&(v.x=0+k/2,v.y=0)),T==="south_east"&&(F==="south"&&(v.x=0+k/2,v.y=-100),F==="east"&&(v.x=0+k/2,v.y=-100)),T==="south_west"&&(F==="south"&&(v.x=0-k/2,v.y=-100),F==="west"&&(v.x=0-k/2,v.y=-100))),w==="south"&&(T==="north_west"&&(F==="north"&&(v.x=0-k/2,v.y=100),F==="west"&&(v.x=0-k/2,v.y=100)),T==="north_east"&&(F==="north"&&(v.x=0+k/2,v.y=100),F==="east"&&(v.x=0+k/2,v.y=100)),T==="south_east"&&(F==="south"&&(v.x=0,v.y=0+h/2),F==="east"&&(v.x=0+k/2,v.y=0)),T==="south_west"&&(F==="south"&&(v.x=0,v.y=h/2),F==="west"&&(v.x=0-k/2,v.y=0))),v}function C(w,T,F,k){const h={x:0,y:0};return w==="south"&&(T==="west"&&(h.x=-100,h.y=0-k/2),T==="east"&&(h.x=100,h.y=-100),T==="south"&&(h.x=0-F/2,h.y=100),(T==="north"||T==="center")&&(h.x=0,h.y=0-k/2)),w==="north"&&(T==="west"&&(h.x=-100,h.y=100),T==="east"&&(h.x=100,h.y=100),T==="north"&&(h.x=0-F/2,h.y=-100),(T==="south"||T==="center")&&(h.x=0,h.y=k/2)),w==="east"&&(T==="north"&&(h.y=-100,h.x=-100),T==="south"&&(h.y=100,h.x=-100),T==="east"&&(h.x=100,h.y=100),(T==="west"||T==="center")&&(h.x=0-F/2,h.y=0)),w==="west"&&(T==="north"&&(h.y=-100,h.x=100),T==="south"&&(h.y=100,h.x=100),T==="west"&&(h.x=-100,h.y=k/2),(T==="east"||T==="center")&&(h.x=F/2,h.y=0)),h}function p(w,T,F,k,h,v,D){const $=D==="south"||D==="east"?"portrait":"landscape",re=h,H=$==="landscape"?"east":"north",se=D==="center"?$==="landscape"?"west":"south":D,ae=f(re,v,H,w,T),{x:Z,y:_}=ae,ce=C(H,se,w,T),{x:fe,y:ue}=ce;ue<0&&(T+=Math.abs(ue));const we=new Map([["default",0+Z],["portrait",0+Z],["landscape",0+Z]]),me=new Map([["default",T+_],["portrait",T+_],["landscape",T+_]]);Z<0&&(w+=Math.abs(Z)),fe>0&&(w+=fe);const Be=new Map([["default",w+fe],["portrait",w+fe],["landscape",w+fe]]),Ce=new Map([["default",0+ue],["portrait",0+ue],["landscape",0+ue]]),ge=k.left>r.left,be=k.bottom>r.bottom,xe=ge?0:be?w/2:we.get($),Te=be?T+k.bottom:ge?T/2:me.get($),Ne=Be.get($),Fe=Ce.get($);return[{x:xe,y:Te},{x:Ne,y:Fe},{x:fe,y:ue}]}function x(w,T,F,k,h,v,D){const $=D==="south"||D==="west"?"portrait":"landscape",re=h,H=$==="landscape"?"west":"north",se=D,ae=f(re,v,H,w,T),{x:Z,y:_}=ae,ce=C(H,se,w,T),{x:fe,y:ue}=ce;ue<0&&(T+=Math.abs(ue)),Z>0&&(w+=Z),fe<0&&(w+=Math.abs(fe));const we=new Map([["default",w+Z],["portrait",w+Z],["landscape",w+Z]]),me=new Map([["default",T+_],["portrait",T+_],["landscape",T+_]]),Be=new Map([["default",0+fe],["portrait",0+fe],["landscape",0+fe]]),Ce=new Map([["default",0+ue],["portrait",0+ue],["landscape",0+ue]]),ge=k.right>r.right,be=k.bottom>r.bottom,xe=ge?w+k.right:be?w/2:we.get($),Te=be?T+k.bottom:ge?T/2:me.get($),Ne=Be.get($),Fe=Ce.get($);return[{x:xe,y:Te},{x:Ne,y:Fe},{x:fe,y:ue}]}function s(w,T,F,k,h,v,D){const $=D==="north"||D==="east"?"portrait":"landscape",re=h,H=$==="landscape"?"east":"south",se=D,ae=f(re,v,H,w,T),{x:Z,y:_}=ae,ce=C(H,se,w,T),{x:fe,y:ue}=ce,we=new Map([["default",0+Z],["portrait",0+Z],["landscape",0+Z]]),me=new Map([["default",0+_],["portrait",0+_],["landscape",0+_]]);Z<0&&(w+=Math.abs(Z)),_<0&&(T+=Math.abs(_)),fe>0&&(w+=fe),ue>0&&(T+=ue);const Be=new Map([["default",w+fe],["portrait",w+fe],["landscape",w+fe]]),Ce=new Map([["default",T+ue],["portrait",T+ue],["landscape",T+ue]]),ge=k.left>r.left,be=k.top>r.top,xe=ge?0:be?w/2:we.get($),Te=be?0:ge?T/2:me.get($),Ne=Be.get($),Fe=Ce.get($);return[{x:xe,y:Te},{x:Ne,y:Fe},{x:fe,y:ue}]}function l(w,T,F,k,h,v,D){const $=D==="north"||D==="west"?"portrait":"landscape",re=h,H=$==="landscape"?"west":"south",se=D,ae=f(re,v,H,w,T),{x:Z,y:_}=ae,ce=C(H,se,w,T),{x:fe,y:ue}=ce;fe<0&&(w+=Math.abs(fe));const we=new Map([["default",w+Z],["portrait",w+Z],["landscape",w+Z]]),me=new Map([["default",0+_],["portrait",0+_],["landscape",0+_]]);_<0&&(T+=Math.abs(_)),ue>0&&(T+=ue);const Be=new Map([["default",0+fe],["portrait",0+fe],["landscape",0+fe]]),Ce=new Map([["default",T+ue],["portrait",T+ue],["landscape",T+ue]]),ge=k.right>r.right,be=k.top>r.top,xe=ge?w+k.right:be?w/2:we.get($),Te=be?0:ge?T/2:me.get($),Ne=Be.get($),Fe=Ce.get($);return[{x:xe,y:Te},{x:Ne,y:Fe},{x:fe,y:ue}]}const u=new Map([["north_east",p],["north_west",x],["south_east",s],["south_west",l]]),N=new Map([["east",["north_west","south_west"]],["west",["north_east","south_east"]],["north",["south_west","south_east"]],["south",["north_west","north_east"]],["center",[]]]);function S(w,T){return w==="north_west"?{aroundDirection:"north_west",left:T.left,right:100,top:T.top,bottom:T.top}:w==="south_west"?{aroundDirection:"south_west",left:T.left,right:100,top:T.top,bottom:T.bottom}:T}function E(w,T){return w==="north_east"?{left:100,right:T.right,top:T.top,bottom:T.top}:w==="south_east"?{left:100,right:T.right,top:T.top,bottom:T.bottom}:T}function R(w,T){return w==="south_west"?{left:T.left,right:T.right,top:100,bottom:T.top}:w==="south_east"?{left:T.left,right:T.right,top:100,bottom:T.bottom}:T}function b(w,T){return w==="north_west"?{left:T.left,right:T.right,top:T.top,bottom:100}:w==="north_east"?{left:T.left,right:T.right,top:T.top,bottom:100}:T}function d(w,T){return T}const g=new Map([["east",S],["west",E],["north",R],["south",b],["center",d]]);function O(w,T,F,k){const h=T.x-w.x,v=T.y-w.y,D=h>=0?"east":"west",$=v>=0?"south":"north",re=`${$}_${D}`,se=(N.get(F)||[]).includes(re),ae=g.get(F),Z=se?ae(re,r):r,_=Math.abs(h),ce=Math.abs(v),fe=u.get(`${$}_${D}`),[ue,we,me]=fe(_,ce,se,Z,F,re,k),Be=D==="west"?me.x<0?Math.abs(me.x):0:me.x>0?me.x:0,Ce=Z.left+Z.right+_+Be,ge=$==="north"?me.y<0?Math.abs(me.y):0:me.y>0?me.y:0,be=Z.top+Z.bottom+ce+ge,xe=D==="east"?w.x-Z.left:w.x+Z.right-Ce,Te=$==="south"?w.y-Z.top:w.y+Z.bottom-be,Ne=D==="east"?Z.left:Ce-Z.right,Fe=$==="north"?be-Z.bottom:Z.top,et=D==="west"?me.x<0?Math.abs(me.x):0:me.x<0?Ce:Ce-me.x,We=$==="north"?me.y<0?Math.abs(me.y):0:me.y<0?be:be-me.y;return{width:Ce,height:be,left:xe,top:Te,startPoinInBoundray:{x:Ne,y:Fe},firstControlPoint:ue,secondControlPoint:we,endPoinInBoundray:{x:et,y:We}}}function j(w,T,F,k,h){w.style.position="absolute",w.style.alignItems="center",w.style.left=`${T}px`,w.style.top=`${F}px`,w.style.width=k+"px",w.style.height=h+"px"}function M(w,T,F,k,h,v,D){const $=w.childNodes[0];$.setAttribute("width",String(T)),$.setAttribute("height",String(F)),w.appendChild($);const re=$.childNodes[0],H=`${k.x} ${k.y}`,se=`${h.x} ${h.y}`,ae=`${v.x} ${v.y}`,Z=`${D.x} ${D.y}`,_="M ".concat(H).concat(" C ").concat(se).concat(","+ae+",").concat(Z);re.setAttribute("d",_),re.setAttribute("fill","none"),re.setAttribute("stroke","#4d53e8"),re.setAttribute("stroke-width","2"),re.setAttribute("class","")}function V(w,T,F,k,h){const{width:v,height:D,left:$,top:re,startPoinInBoundray:H,firstControlPoint:se,secondControlPoint:ae,endPoinInBoundray:Z}=O(T,F,k,h);j(w,$,re,v,D),M(w,v,D,H,se,ae,Z)}function B(w,T,F,k,h){const v=y(w);V(v,T,F,k,h)}function I(w){return Number(w.replace("px",""))}function q(w){if(w!==null){const T=w.parentNode,F=I(T.style.left),k=I(T.style.top);return{x:F+w.offsetLeft+w.offsetWidth/2,y:k+w.offsetTop+w.offsetHeight/2}}return{x:0,y:0}}function A(w,T){const F=document.getElementById(w),k=document.getElementById(T),h=q(F),v=q(k),D=h.x+2,$=h.y,re=v.x-2,H=v.y;return{startPoint:{x:D,y:$},endPoint:{x:re,y:H}}}function U(w,T,F,k){const{startPoint:h,endPoint:v}=A(w,T);B(`${w}_${T}`,h,v,F,k)}return{connect:U,drawing:B}}function Wo(e){const n=t.ref(),o=t.ref(0),r=t.ref(0),i=t.ref({x:0,y:0}),c=t.ref(),{drawing:a}=e;function m(S){return Number(S.replace("px",""))}function y(S){return(S&&S.className&&S.className.split?S.className.split(" "):[]).includes("f-flow-ancher")}function f(S){switch((S?S.className.split(" "):[]).find(b=>b.startsWith("circle-"))||""){case"circle-left":return"west";case"circle-right":return"east";case"circle-top":return"north";case"circle-bottom":return"south";default:return"center"}}function C(S,E,R){const b=R.getBoundingClientRect();o.value=b.left,r.value=b.top,i.value={x:S,y:E},n.value=f(R)}function p(S){var j;const E=S.clientX-o.value,R=S.clientY-r.value,b=i.value.x+E,d=i.value.y+R,g=S.target,O=g&&typeof g.className=="string"&&y(g)?f(g):"center";a(`${(j=c.value)==null?void 0:j.id}_curve_to`,{x:i.value.x,y:i.value.y},{x:b,y:d},n.value,O)}function x(S){const E=document.getElementById(S);E&&E.remove()}function s(){document.addEventListener("mousemove",p)}function l(){document.removeEventListener("mousemove",p)}function u(S){c.value=void 0,l()}function N(S,E){c.value=document.getElementById(S);const R=c.value.offsetParent,b=c.value.getBoundingClientRect(),d=R.getBoundingClientRect(),g=m(R.style.left)+(b.left-d.left),O=m(R.style.top)+(b.top-d.top),j=g+b.width/2,M=O+b.height/2;C(j,M,c.value),s()}return{drawFrom:N,eraseDrawingLine:x,finishToDraw:u,getAncherPointPosition:f,isAncherPoint:y}}const Yo={id:{type:String,default:""},type:{type:String,default:""},modelValue:{type:Object},x:{type:Number,default:0},y:{type:Number,default:0},connection:{type:Array,default:[]}},rt=t.ref(0);function Xo(){rt.value++}function Go(e,n){const o=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=r.top>=o.top,c=r.top<=o.bottom;return i&&c}function Qo(e){const n=e.querySelector(".component-btn-group");if(!n)return;n.style.display="";const o=n.getBoundingClientRect();if(!(o.top===0&&o.left===0)){const r=n.querySelector("div");if(r){const i=r.getBoundingClientRect();r.style.top=o.top+"px";let c=o.left-i.width;const a=document.querySelector(".editorDiv");if(a){const m=a.getBoundingClientRect();c<m.left&&({left:c}=e.getBoundingClientRect())}r.style.left=c+"px"}}}function Jo(e){if(!window.scrollContainerList)return;const n=Array.from(window.scrollContainerList);if(n.length&&n.length===1){const o=n[0],r=document.querySelector(`[id=${o}]`);if(r&&r.contains(e))return r}}function Qn(e){if(!e)return;const n=e.getBoundingClientRect();if(n.width===0&&n.height===0)return;const o=e.querySelector(".component-btn-group");if(o){let r=!0;const i=Jo(e);if(i&&(r=Go(e,i)),!r){o.style.display="none";return}Qo(e)}}function mt(e){if(!e)return;let n;e.className.includes("dgComponentSelected")?n=e:n=e.querySelector(".dgComponentSelected"),n&&Qn(n)}const Zo={modelValue:{type:Object,default:{}},componentId:{type:String,default:""},components:{type:Array},canvasMode:{type:String,default:"PC"}};var Ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ko(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Jn={exports:{}};(function(e,n){(function(o){e.exports=o()})(function(){return function(){function o(r,i,c){function a(f,C){if(!i[f]){if(!r[f]){var p=typeof gt=="function"&>if(!C&&p)return p(f,!0);if(m)return m(f,!0);var x=new Error("Cannot find module '"+f+"'");throw x.code="MODULE_NOT_FOUND",x}var s=i[f]={exports:{}};r[f][0].call(s.exports,function(l){var u=r[f][1][l];return a(u||l)},s,s.exports,o,r,i,c)}return i[f].exports}for(var m=typeof gt=="function"&>,y=0;y<c.length;y++)a(c[y]);return a}return o}()({1:[function(o,r,i){var c={},a="(?:^|\\s)",m="(?:\\s|$)";function y(p){var x=c[p];return x?x.lastIndex=0:c[p]=x=new RegExp(a+p+m,"g"),x}function f(p,x){var s=p.className;s.length?y(x).test(s)||(p.className+=" "+x):p.className=x}function C(p,x){p.className=p.className.replace(y(x)," ").trim()}r.exports={add:f,rm:C}},{}],2:[function(o,r,i){(function(c){var a=o("contra/emitter"),m=o("crossvent"),y=o("./classes"),f=document,C=f.documentElement;function p(B,I){var q=arguments.length;q===1&&Array.isArray(B)===!1&&(I=B,B=[]);var A,U,w,T,F,k,h,v,D,$=null,re,H,se=!1,ae=0,Z,_=I||{};_.moves===void 0&&(_.moves=E),_.accepts===void 0&&(_.accepts=E),_.invalid===void 0&&(_.invalid=et),_.containers===void 0&&(_.containers=B||[]),_.isContainer===void 0&&(_.isContainer=S),_.copy===void 0&&(_.copy=!1),_.copySortSource===void 0&&(_.copySortSource=!1),_.revertOnSpill===void 0&&(_.revertOnSpill=!1),_.removeOnSpill===void 0&&(_.removeOnSpill=!1),_.direction===void 0&&(_.direction="vertical"),_.ignoreInputTextSelection===void 0&&(_.ignoreInputTextSelection=!0),_.mirrorContainer===void 0&&(_.mirrorContainer=f.body);var ce=a({containers:_.containers,start:Ne,end:We,cancel:pe,remove:z,destroy:Be,canMove:Te,dragging:!1});return _.removeOnSpill===!0&&ce.on("over",Vt).on("out",Pt),ue(),ce;function fe(P){return ce.containers.indexOf(P)!==-1||_.isContainer(P)}function ue(P){var W=P?"remove":"add";l(C,W,"mousedown",ge),l(C,W,"mouseup",Ye)}function we(P){var W=P?"remove":"add";l(C,W,"mousemove",be)}function me(P){var W=P?"remove":"add";m[W](C,"selectstart",Ce),m[W](C,"click",Ce)}function Be(){ue(!0),Ye({})}function Ce(P){re&&P.preventDefault()}function ge(P){T=P.clientX,F=P.clientY;var W=u(P)!==1||P.metaKey||P.ctrlKey;if(!W){var K=P.target,ie=xe(K);ie&&(re=ie,we(),P.type==="mousedown"&&(g(K)?K.focus():P.preventDefault()))}}function be(P){if(re){if(u(P)===0){Ye({});return}if(!(P.clientX!==void 0&&Math.abs(P.clientX-T)<=(_.slideFactorX||0)&&P.clientY!==void 0&&Math.abs(P.clientY-F)<=(_.slideFactorY||0))){if(_.ignoreInputTextSelection){var W=V("clientX",P)||0,K=V("clientY",P)||0,ie=f.elementFromPoint(W,K);if(g(ie))return}var ve=re;we(!0),me(),We(),Fe(ve),y.add(v||w,"gu-transit"),It(),Dt(),ae=0,st(P)}}}function xe(P){if(!(ce.dragging&&A)&&!fe(P)){for(var W=P;d(P)&&fe(d(P))===!1;)if(_.invalid(P,W)||(P=d(P),!P))return;var K=d(P);if(K&&!_.invalid(P,W)){var ie=_.moves(P,K,W,j(P));if(ie)return{item:P,source:K}}}}function Te(P){return!!xe(P)}function Ne(P){var W=xe(P);W&&Fe(W)}function Fe(P){Ht(P.item,P.source)&&(v=P.item.cloneNode(!0),ce.emit("cloned",v,P.item,"copy")),U=P.source,w=P.item,k=h=j(P.item),ce.dragging=!0,ce.emit("drag",w,U)}function et(){return!1}function We(){if(ce.dragging){var P=v||w;at(P,d(P))}}function He(){re=!1,we(!0),me(!0)}function Ye(P){if(He(),!!ce.dragging){var W=v||w,K=V("clientX",P)||0,ie=V("clientY",P)||0,ve=N(A,K,ie),ye=Qe(ve,K,ie);ye&&(v&&_.copySortSource||!v||ye!==U)?at(W,ye):_.removeOnSpill?z():pe()}}function at(P,W){var K=d(P);v&&_.copySortSource&&W===U&&K.removeChild(w),Me(W)?ce.emit("cancel",P,U):ce.emit("drop",P,W,U,h),je()}function z(){if(ce.dragging){var P=v||w,W=d(P);W&&W.removeChild(P),ce.emit(v?"cancel":"remove",P,W,U),je()}}function pe(P){if(ce.dragging){var W=arguments.length>0?P:_.revertOnSpill,K=v||w,ie=d(K),ve=Me(ie);ve===!1&&W&&(v?ie&&ie.removeChild(v):U.insertBefore(K,k)),ve||W?ce.emit("cancel",K,U,U):ce.emit("drop",K,ie,U,h),je()}}function je(){var P=v||w;He(),Rt(),$t(),P&&y.rm(P,"gu-transit"),D&&clearTimeout(D),ce.dragging=!1,$&&ce.emit("out",P,$,U),ce.emit("dragend",P,ae),U=w=v=k=h=D=$=null}function Me(P,W){var K;return W!==void 0?K=W:A?K=h:K=j(v||w),P===U&&K===k}function Qe(P,W,K){for(var ie=P;ie&&!ve();)ie=d(ie);return ie;function ve(){var ye=fe(ie);if(ye===!1)return!1;var Ae=wt(ie,P),De=xt(ie,Ae,W,K),Re=Me(ie,De);return Re?!0:_.accepts(w,ie,U,De)}}function st(P){if(!A)return;P.preventDefault();var W=V("clientX",P)||0,K=V("clientY",P)||0;A.style.left=W-2+"px",A.style.top=K-2+"px";var ie=v||w,ve=N(A,W,K),ye=Qe(ve,W,K),Ae=ye!==null&&ye!==$;(Ae||ye===null)&&($e(),$=ye,Ue()),zt(ve,K);var De=d(ie);if(ye===U&&v&&!_.copySortSource){De&&De.removeChild(ie);return}var Re,_e=wt(ye,ve);if(se=lt(_e,ye),_e!==null)Re=xt(ye,_e,W,K);else if(_.revertOnSpill===!0&&!v)Re=k,ye=U;else{v&&De&&De.removeChild(ie),v&&H&&(H.style.display="none");return}H.style.display="block",Et(Re,ie,Ae),Re?Lt(_e,Re):At(ye);function ke(Ve){ce.emit(Ve,ie,$,U)}function Ue(){Ae&&ke("over")}function $e(){$&&ke("out")}}function Et(P,W,K){(P===W||P===j(W))&&(h=j(W)),(P===null&&K||P!==W&&P!==j(W))&&(h=P)}function Vt(P){y.rm(P,"gu-hide")}function Pt(P){ce.dragging&&y.add(P,"gu-hide")}function Dt(){A||(A=document.createElement("div"),A.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",A.innerHTML=_.getMirrorText&&_.getMirrorText(w)||"控件",y.add(A,"gu-mirror"),_.mirrorContainer.appendChild(A),l(C,"add","mousemove",st),y.add(_.mirrorContainer,"gu-unselectable"),ce.emit("cloned",A,w,"mirror"))}function It(){if(H=document.createElement("div"),y.add(H,"gu-insertion"),w){var P=w.getBoundingClientRect();H.style.left=P.left+"px",H.style.top=P.top+"px"}se=!1,_.mirrorContainer.appendChild(H)}function Rt(){A&&(y.rm(_.mirrorContainer,"gu-unselectable"),l(C,"remove","mousemove",st),d(A).removeChild(A),A=null)}function $t(){H&&(d(H).removeChild(H),H=null)}function wt(P,W){for(var K=W;K!==P&&d(K)!==P;)K=d(K);return K===C?null:K}function lt(P,W){if(!W)return se;var K=P||W&&W.lastElementChild;if(!K)return!0;var ie=getComputedStyle(P),ve=/^inline/.test(ie.getPropertyValue("display"))||/^(left|right)$/.test(ie.getPropertyValue("float"));if(ve)return!0;if(W){var ye=getComputedStyle(W),Ae=ye.getPropertyValue("display");if(/flex$/.test(Ae)){var De=ye.getPropertyValue("flex-direction")||"row";if(De==="row"||De==="row-reverse")return!qt(W)}return!1}return!0}function qt(P){if(!P.children||!P.children.length)return!1;for(const W of Array.from(P.children)){const ie=(W.className&&W.className.split(" ")||[]).filter(ve=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ve));if(!ie.length)return!1;for(const ve of ie){const ye=ve.slice(ve.lastIndexOf("-")+1);if(parseInt(ye,10)!==12)return!1}}return!0}function Lt(P,W){const K=W.getBoundingClientRect();if(H.style.left=K.left+"px",H.style.top=K.top+"px",se){if(H.style.height=K.height+"px",H.style.width="4px",P){const ie=P.getBoundingClientRect();ie.top!==K.top&&(H.style.left=ie.right+"px",H.style.top=ie.top+"px",H.style.height=ie.height+"px")}}else if(H.style.height="4px",H.style.width=K.width+"px",Z){const ie=Z.getBoundingClientRect();K.top<ie.top&&(H.style.display="none")}W===w&&w&&(H.style.display="none")}function At(P){h=null;var W=P.lastElementChild;if(W){var K=W.getBoundingClientRect();se?(H.style.left=K.right+"px",H.style.top=K.top+"px",H.style.height=K.height+"px",H.style.width="4px"):(H.style.left=K.left+"px",H.style.top=K.bottom+"px",H.style.height="4px",H.style.width=K.width+"px"),W===w&&w&&(H.style.display="none")}else H.style.display="none"}function zt(P,W){if(!_.mirrorContainer.contains(P)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(Z=x(P),!Z||!Z.contains(P)))return;const K=document.querySelector(".dgComponentSelected"),ie=Z.getBoundingClientRect();if(W-30<ie.top&&Z.scrollTop>0){let ve=Z.scrollTop<10?Z.scrollTop:10;Z.scrollBy(0,-1*ve),K&&Z.contains(K)&&(ae=ae+-1*ve)}if(W+30>ie.bottom&&Z.scrollTop<Z.scrollHeight-Z.clientHeight){const ve=Z.scrollHeight-Z.clientHeight-Z.scrollTop;let ye=ve<10?ve:10;Z.scrollBy(0,ye),K&&Z.contains(K)&&(ae=ae+ye)}}function xt(P,W,K,ie){var ve=_.direction==="horizontal",ye=_.direction==="mixed",Ae=W!==P?Re():De();return Ae;function De(){var ke=P.children.length,Ue,$e,Ve;for(Ue=0;Ue<ke;Ue++)if($e=P.children[Ue],Ve=$e.getBoundingClientRect(),ve&&Ve.left+Ve.width/2>K||!ye&&!ve&&Ve.top+Ve.height/2>ie||ye&&Ve.left+Ve.width>K&&Ve.top+Ve.height>ie)return $e;return null}function Re(){var ke=W.getBoundingClientRect();if(ye){var Ue=ie-ke.top,$e=K-ke.left,Ve=ke.bottom-ie,ct=ke.right-K,ut=Math.min($e,ct,Ue,Ve),dt;return se?dt=ct<$e:dt=Ve===ut||ct===ut||$e===ut,_e(dt)}return _e(ve?K>ke.left+R(ke)/2:ie>ke.top+b(ke)/2)}function _e(ke){return ke?j(W):W}}function Ht(P,W){return typeof _.copy=="boolean"?_.copy:_.copy(P,W)}}function x(B){const I=Array.from(window.scrollContainerList);if(I.length===1){const A=Array.from(window.scrollContainerList)[0];return document.getElementById(A)}const q=s(I);for(const A of q)if(A.contains(B))return A;return null}function s(B){const I=[];return B.forEach(q=>{const A=document.getElementById(q);A&&I.push(A)}),I.sort((q,A)=>q.contains(A)?1:A.contains(q)?-1:0),I}function l(B,I,q,A){var U={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},w={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},T={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};c.navigator.pointerEnabled?m[I](B,w[q],A):c.navigator.msPointerEnabled?m[I](B,T[q],A):(m[I](B,U[q],A),m[I](B,q,A))}function u(B){if(B.touches!==void 0)return B.touches.length;if(B.which!==void 0&&B.which!==0)return B.which;if(B.buttons!==void 0)return B.buttons;var I=B.button;if(I!==void 0)return I&1?1:I&2?3:I&4?2:0}function N(B,I,q){B=B||{};var A=B.className||"",U;return B.className+=" gu-hide",U=f.elementFromPoint(I,q),B.className=A,U}function S(){return!1}function E(){return!0}function R(B){return B.width||B.right-B.left}function b(B){return B.height||B.bottom-B.top}function d(B){return B.parentNode===f?null:B.parentNode}function g(B){return B.tagName==="INPUT"||B.tagName==="TEXTAREA"||B.tagName==="SELECT"||O(B)}function O(B){return!B||B.contentEditable==="false"?!1:B.contentEditable==="true"?!0:O(d(B))}function j(B){return B.nextElementSibling||I();function I(){var q=B;do q=q.nextSibling;while(q&&q.nodeType!==1);return q}}function M(B){return B.targetTouches&&B.targetTouches.length?B.targetTouches[0]:B.changedTouches&&B.changedTouches.length?B.changedTouches[0]:B}function V(B,I){var q=M(I),A={pageX:"clientX",pageY:"clientY"};return B in A&&!(B in q)&&A[B]in q&&(B=A[B]),q[B]}r.exports=p}).call(this,typeof Ge<"u"?Ge:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(o,r,i){r.exports=function(a,m){return Array.prototype.slice.call(a,m)}},{}],4:[function(o,r,i){var c=o("ticky");r.exports=function(m,y,f){m&&c(function(){m.apply(f||null,y||[])})}},{ticky:10}],5:[function(o,r,i){var c=o("atoa"),a=o("./debounce");r.exports=function(y,f){var C=f||{},p={};return y===void 0&&(y={}),y.on=function(x,s){return p[x]?p[x].push(s):p[x]=[s],y},y.once=function(x,s){return s._once=!0,y.on(x,s),y},y.off=function(x,s){var l=arguments.length;if(l===1)delete p[x];else if(l===0)p={};else{var u=p[x];if(!u)return y;u.splice(u.indexOf(s),1)}return y},y.emit=function(){var x=c(arguments);return y.emitterSnapshot(x.shift()).apply(this,x)},y.emitterSnapshot=function(x){var s=(p[x]||[]).slice(0);return function(){var l=c(arguments),u=this||y;if(x==="error"&&C.throws!==!1&&!s.length)throw l.length===1?l[0]:l;return s.forEach(function(S){C.async?a(S,l,u):S.apply(u,l),S._once&&y.off(x,S)}),y}},y}},{"./debounce":4,atoa:3}],6:[function(o,r,i){(function(c){var a=o("custom-event"),m=o("./eventmap"),y=c.document,f=x,C=l,p=[];c.addEventListener||(f=s,C=u),r.exports={add:f,remove:C,fabricate:N};function x(d,g,O,j){return d.addEventListener(g,O,j)}function s(d,g,O){return d.attachEvent("on"+g,E(d,g,O))}function l(d,g,O,j){return d.removeEventListener(g,O,j)}function u(d,g,O){var j=R(d,g,O);if(j)return d.detachEvent("on"+g,j)}function N(d,g,O){var j=m.indexOf(g)===-1?V():M();d.dispatchEvent?d.dispatchEvent(j):d.fireEvent("on"+g,j);function M(){var B;return y.createEvent?(B=y.createEvent("Event"),B.initEvent(g,!0,!0)):y.createEventObject&&(B=y.createEventObject()),B}function V(){return new a(g,{detail:O})}}function S(d,g,O){return function(M){var V=M||c.event;V.target=V.target||V.srcElement,V.preventDefault=V.preventDefault||function(){V.returnValue=!1},V.stopPropagation=V.stopPropagation||function(){V.cancelBubble=!0},V.which=V.which||V.keyCode,O.call(d,V)}}function E(d,g,O){var j=R(d,g,O)||S(d,g,O);return p.push({wrapper:j,element:d,type:g,fn:O}),j}function R(d,g,O){var j=b(d,g,O);if(j){var M=p[j].wrapper;return p.splice(j,1),M}}function b(d,g,O){var j,M;for(j=0;j<p.length;j++)if(M=p[j],M.element===d&&M.type===g&&M.fn===O)return j}}).call(this,typeof Ge<"u"?Ge:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(o,r,i){(function(c){var a=[],m="",y=/^on/;for(m in c)y.test(m)&&a.push(m.slice(2));r.exports=a}).call(this,typeof Ge<"u"?Ge:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(o,r,i){(function(c){var a=c.CustomEvent;function m(){try{var y=new a("cat",{detail:{foo:"bar"}});return y.type==="cat"&&y.detail.foo==="bar"}catch{}return!1}r.exports=m()?a:typeof document<"u"&&typeof document.createEvent=="function"?function(f,C){var p=document.createEvent("CustomEvent");return C?p.initCustomEvent(f,C.bubbles,C.cancelable,C.detail):p.initCustomEvent(f,!1,!1,void 0),p}:function(f,C){var p=document.createEventObject();return p.type=f,C?(p.bubbles=!!C.bubbles,p.cancelable=!!C.cancelable,p.detail=C.detail):(p.bubbles=!1,p.cancelable=!1,p.detail=void 0),p}}).call(this,typeof Ge<"u"?Ge:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(o,r,i){var c=r.exports={},a,m;function y(){throw new Error("setTimeout has not been defined")}function f(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=y}catch{a=y}try{typeof clearTimeout=="function"?m=clearTimeout:m=f}catch{m=f}})();function C(b){if(a===setTimeout)return setTimeout(b,0);if((a===y||!a)&&setTimeout)return a=setTimeout,setTimeout(b,0);try{return a(b,0)}catch{try{return a.call(null,b,0)}catch{return a.call(this,b,0)}}}function p(b){if(m===clearTimeout)return clearTimeout(b);if((m===f||!m)&&clearTimeout)return m=clearTimeout,clearTimeout(b);try{return m(b)}catch{try{return m.call(null,b)}catch{return m.call(this,b)}}}var x=[],s=!1,l,u=-1;function N(){!s||!l||(s=!1,l.length?x=l.concat(x):u=-1,x.length&&S())}function S(){if(!s){var b=C(N);s=!0;for(var d=x.length;d;){for(l=x,x=[];++u<d;)l&&l[u].run();u=-1,d=x.length}l=null,s=!1,p(b)}}c.nextTick=function(b){var d=new Array(arguments.length-1);if(arguments.length>1)for(var g=1;g<arguments.length;g++)d[g-1]=arguments[g];x.push(new E(b,d)),x.length===1&&!s&&C(S)};function E(b,d){this.fun=b,this.array=d}E.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={};function R(){}c.on=R,c.addListener=R,c.once=R,c.off=R,c.removeListener=R,c.removeAllListeners=R,c.emit=R,c.prependListener=R,c.prependOnceListener=R,c.listeners=function(b){return[]},c.binding=function(b){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(b){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},{}],10:[function(o,r,i){(function(c){var a=typeof c=="function",m;a?m=function(y){c(y)}:m=function(y){setTimeout(y,0)},r.exports=m}).call(this,o("timers").setImmediate)},{timers:11}],11:[function(o,r,i){(function(c,a){var m=o("process/browser.js").nextTick,y=Function.prototype.apply,f=Array.prototype.slice,C={},p=0;i.setTimeout=function(){return new x(y.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new x(y.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(s){s.close()};function x(s,l){this._id=s,this._clearFn=l}x.prototype.unref=x.prototype.ref=function(){},x.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(s,l){clearTimeout(s._idleTimeoutId),s._idleTimeout=l},i.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},i._unrefActive=i.active=function(s){clearTimeout(s._idleTimeoutId);var l=s._idleTimeout;l>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},l))},i.setImmediate=typeof c=="function"?c:function(s){var l=p++,u=arguments.length<2?!1:f.call(arguments,1);return C[l]=!0,m(function(){C[l]&&(u?s.apply(null,u):s.call(null),i.clearImmediate(l))}),l},i.clearImmediate=typeof a=="function"?a:function(s){delete C[s]}}).call(this,o("timers").setImmediate,o("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Jn);var er=Jn.exports;const Zn=Ko(er),tr={showCloseButton:{type:Boolean,default:!0},position:{type:String,default:"top-center"},timeout:{type:Number,default:3e3},theme:{type:String,default:"bootstrap"},left:{type:Number},right:{type:Number},top:{type:Number},bottom:{type:Number},id:{type:String},animate:{type:String,default:"fadeIn"},options:{type:Object},safeHtml:{type:Boolean,default:!0}},nr={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},Nt=t.defineComponent({name:"Toast",props:nr,emits:["close","click"],setup:(e,n)=>{const{locale:o,t:r}=St.useI18n(),i=t.ref(e.animate),c="fadeOut",a=t.computed(()=>e.options),m=t.ref(!1),y=t.computed(()=>a.value.title&&a.value.message),f=t.computed(()=>!a.value.title&&a.value.message),C=t.computed(()=>{const b={animated:m.value,toast:!0,"toast--only-content":f.value};return b[e.animate]=!1,b[c]=m.value,b["toasty-type-"+a.value.type]=!0,a.value.theme&&(b[a.value.theme]=!0),b}),p=t.computed(()=>{const g=`f-icon-${a.value&&a.value.type?a.value.type.replace("toasty-type-",""):"default"}`,O={"f-icon":!0};return O[g]=!0,O}),x=t.computed(()=>a.value.title||a.value.message),s=t.computed(()=>e.showCloseButton),l=t.computed(()=>!!a.value.buttons||!!n.slots.default),u=t.computed(()=>o.value==="en"?{wordBreak:"keep-all",overflowWrap:"break-word"}:{});function N(b){b.stopPropagation(),b.preventDefault(),m.value=!1,setTimeout(()=>{n.emit("close",a.value)},200)}function S(b,d){}function E(b){return`f-preten-link ${b.customClass?b.customClass:""}`}t.watch(i,()=>{i.value});const R=()=>{var b;return t.createVNode(t.Fragment,null,[t.createVNode("div",{class:"after-toast-msg text-right"},[!n.slots.default&&((b=a.value.buttons)==null?void 0:b.map(d=>t.createVNode("span",{class:E(d),onClick:g=>void 0},[d.text]))),n.slots.default&&n.slots.default()])])};return()=>t.createVNode("div",{class:C.value,style:"min-height:44px"},[s.value&&t.createVNode("button",{title:r("messageBox.close"),class:"toast-close f-btn-icon f-bare",onClick:N},[t.createVNode("span",{class:"f-icon modal_close"},null)]),x.value&&t.createVNode("section",{class:"modal-tips"},[t.createVNode("div",{class:"float-left modal-tips-iconwrap"},[t.createVNode("span",{class:p.value},null)]),t.createVNode("div",{class:"modal-tips-content"},[y.value&&t.createVNode(t.Fragment,null,[t.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:a.value.title},null),t.createVNode("p",{class:"toast-msg",innerHTML:a.value.message,style:u.value},null),l.value&&R()]),f.value&&(a.value.buttons?t.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[t.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:u.value,innerHTML:a.value.message},null),t.createVNode("div",{class:"after-toast-title text-right ml-auto"},[R()])]):t.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:u.value,innerHTML:a.value.message},null))])])])}}),vt=t.defineComponent({name:"Notify",props:tr,emits:["close","empty"],setup(e,n){const o=t.computed(()=>({"farris-notify":!0})),r={left:12,right:12,top:20,bottom:12},i=t.ref(),c=t.ref(e.options),a=t.ref(e.showCloseButton),m=t.computed(()=>e.position||"bottom-right"),y=t.computed(()=>e.timeout!=null?e.timeout:3e3),f=t.computed(()=>{const x=e.bottom?e.bottom:r.bottom,s=e.top?e.top:r.top,l={transition:"all 0.2s ease",left:m.value.indexOf("left")>-1?`${e.left?e.left:r.left}px`:"",right:m.value.indexOf("right")>-1?`${e.right?e.right:r.right}px`:"",top:m.value.indexOf("top")>-1?`${s}px`:"",bottom:m.value.indexOf("bottom")>-1?`${x}px`:""};return m.value.indexOf("center")>-1&&(l.left="50%",l.marginLeft="calc(-24rem / 2)",m.value==="center-center"&&(l.top="50%",l.transform="translate(-50%, -50%)")),l});function C(x){n.emit("close")}y.value&&setTimeout(()=>{C()},y.value),n.expose({closeToast:C,container:i,notifyPosition:m});function p(x,s){C()}return()=>t.createVNode("div",{class:o.value,style:f.value,ref:i},[t.createVNode(Nt,{options:c.value,showCloseButton:a.value,animate:e.animate,onClose:x=>p(x,c.value)},null)])}});class Ft{constructor(){Ie(this,"notifyRefs",[]);Ie(this,"globalConfig",t.reactive({}))}escapeAllHtml(n){if(typeof n!="string"||!n)return"";const o=document.createElement("div");return o.textContent=n||"",o.innerHTML.replace(/\\n/g,"<br>").replace(/\\t/g," ").replace(/\\r/g,"")}createNotifyInstance(n){const o=this,i=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0,safeHtml:!0},this.globalConfig,{...n}),c=document.createElement("div");c.style.display="contents";const a=t.createApp({setup(){var f;const m=t.ref();function y(){m.value.container.style.transform="scale(0)",setTimeout(()=>{o.updateNotifyPositionForClose(i,m),a.unmount()},220)}if(i.position.indexOf("top")>-1){const C=o.getNotifyInstances(i.position),p=C[C.length-1];if(p){const x=p.value.container.getBoundingClientRect();i.top=x.bottom}}return i.safeHtml&&((f=i.options)!=null&&f.message)&&(i.options.message=o.escapeAllHtml(i.options.message)),t.onUnmounted(()=>{document.body.removeChild(c)}),t.onMounted(()=>{o.updateNotifyPositionForCreate(i,m)}),()=>t.createVNode(t.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[t.createVNode(vt,t.mergeProps({ref:m},i,{onClose:y}),null)]})}});return a.provide("NotifyService",this),document.body.appendChild(c),a.use(ft.LocaleService.i18n),a.mount(c),a}getNotifyInstances(n){return this.notifyRefs.filter(o=>o.value.notifyPosition===n)}updateNotifyPositionForCreate(n,o){if(this.notifyRefs&&this.notifyRefs.length){const r=window.innerHeight;n.position.indexOf("bottom")>-1&&this.getNotifyInstances(n.position).forEach(i=>{const c=i.value.container.getBoundingClientRect();i.value.container.style.bottom=c.height+r-c.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,o]}updateNotifyPositionForClose(n,o){const r=this.notifyRefs.indexOf(o);if(n.position.indexOf("top")>-1){const i=this.getNotifyInstances(n.position),c=i.indexOf(o);i.slice(c+1).forEach(a=>{a.value.container.style.top=a.value.container.offsetTop-a.value.container.offsetHeight+"px"})}r>-1&&this.notifyRefs.splice(r,1)}show(n){return this.createNotifyInstance(n)}buildNotifyProps(n,o){let r="",i="",c,a,m;typeof o=="string"?r=o:o&&(r=o.message||"",i=o.title||"",a=o.position||null,m=o.showCloseButton!=null?o.showCloseButton:null,c=o.timeout!=null?o.timeout:null);const f={options:{type:n,message:r,title:i}};return a!=null&&(f.position=a),m!=null&&(f.showCloseButton=m),c!=null&&(f.timeout=c),f}info(n){const o=this.buildNotifyProps("info",n);return this.show(o)}success(n){const o=this.buildNotifyProps("success",n);return this.show(o)}warning(n){const o=this.buildNotifyProps("warning",n);return this.show(o)}error(n){const o=this.buildNotifyProps("error",n);return this.show(o)}close(n){n&&n.unmount()}closeAll(){this.notifyRefs.forEach(n=>{n==null||n.value.closeToast()}),this.notifyRefs.length=0}}const or=Symbol("NOTIFY_SERVICE_TOKEN");vt.install=e=>{e.component(vt.name,vt),e.component(Nt.name,Nt);const n=new Ft;e.provide(or,n),e.provide("FNotifyService",n)};const rr={designerHostService:{type:Object,default:{}},componentType:{type:String,default:""},bindingEntityId:{type:String,default:""},steps:{type:Array,default:["selectEntity","selectFields"]}};`${ft.LocaleService.getLocaleValue("datagrid.loadingMessage")}`;const ir={customClass:{type:String,default:""},sort:{type:Object},filter:{type:Object},autoCheckChildren:{type:Boolean,default:!1},columns:{type:Array,default:[]},columnOption:{type:Object},commandOption:{type:Object,default:{enable:!1,commands:[]}},data:{type:Array,default:[]},disabled:{type:Boolean,default:!1},disabledField:{type:String,default:"disabled"},displayField:{type:String,default:"name"},editable:{type:Boolean,default:!1},editOption:{type:Object,default:{selectOnEditing:!1,editMode:"cell"}},fit:{type:Boolean,default:!1},header:{type:Object},height:{type:Number,default:-1},hierarchy:{type:Object,default:{cascadeOption:{autoCancelParent:!0,autoCheckChildren:!1,autoCheckParent:!1,selectionRange:"All"},parentIdField:"parent"}},id:{type:String,default:""},idField:{type:String,default:"id",require:!0},loadData:{type:Function},loading:{type:Boolean,default:!1},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},newDataItem:{type:Function,default:()=>{}},pagination:{type:Object,default:{enable:!1,size:-1}},rowNumber:{type:Object,default:{enable:!0,width:32,heading:ft.LocaleService.getLocaleValue("datagrid.lineNumberTitle")}},rowOption:{type:Object,default:{wrapContent:!1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!1}},selectionValues:{type:Array,default:[]},showBorder:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showHorizontalLines:{type:Boolean,default:!0},showLines:{type:Boolean,default:!1},showOptions:{type:Boolean,default:!1},showScrollBar:{type:String,default:"auto"},showSetting:{type:Boolean,default:!1},showStripe:{type:Boolean,default:!0},showTreeNodeIcons:{type:Boolean,default:!1},showVerticallLines:{type:Boolean,default:!1},treeNodeIconsData:{type:[Object,String],default:{}},width:{type:Number,default:-1},virtualized:{type:Boolean,default:!1},emptyTemplate:{type:Object},summary:{type:Object,default:{enable:!1,groupFields:["numericField1","numericField2"]}}};function ar(e,n,o,r,i,c,a,m,y,f,C,p,x,s,l,u,N){const{calculateCellPositionInRow:S}=c,{columnContext:E,hasLeftFixedColumn:R,hasRightFixedColumn:b}=a,{gridDataStyle:d,leftFixedGridDataStyle:g,rightFixedGridDataStyle:O}=s,{renderDataRow:j}=de.getHierarchyRow(e,n,E,N,m,y,f,C,p,x,s,l,u),M=[j];function V(U,w){const T=S(U);return N.value.filter(F=>F.visible!==!1).map((F,k)=>M[F.type](F,T,w,k))}function B(){return t.createVNode("div",{ref:r,class:"fv-grid-content-left-fixed"},[t.createVNode("div",{class:"fv-grid-data",style:g.value},[V(E.value.leftColumns.filter(U=>U.visible),"left")])])}function I(){return t.createVNode("div",{ref:o,class:"fv-grid-content-primary"},[t.createVNode("div",{class:"fv-grid-data",style:d.value},[V(E.value.primaryColumns.filter(U=>U.visible),"primary")])])}function q(){return t.createVNode("div",{ref:i,class:"fv-grid-content-right-fixed"},[t.createVNode("div",{class:"fv-grid-data",style:O.value},[V(E.value.rightColumns.filter(U=>U.visible),"right")])])}function A(){const U=[];return R.value&&U.push(B()),U.push(I()),b.value&&U.push(q()),U}return{renderDataArea:A}}const jt=t.defineComponent({name:"FTreeGrid",props:ir,emits:["selectionChange","clickRow","expandNode","unSelectItem","dblclickNode","doubleClickRow","unSelectItem","selectItem","filterChanged","sortChanged"],setup(e,n){var No,Fo;const r=((No=e.rowOption)==null?void 0:No.height)||28,i=t.ref(20),c=t.ref(e.columns),a=de.useIdentify(e),{idField:m}=a,y=t.ref(),f=t.ref(),C=t.ref(),p=t.ref(),x=t.ref(),s=t.ref([]),l=t.ref(!1),u=t.ref(((Fo=e.rowOption)==null?void 0:Fo.wrapContent)||!1),N=de.useGroupData(e,a),S=de.useFilter(e,n),E=de.useHierarchy(e),{collapseField:R}=E,{showLoading:b,renderLoading:d}=de.useLoading(e,y),g=de.useDataView(e,new Map,S,E,a),{dataView:O}=g,j=de.useSelection(e,g,a,s,n),{showSelection:M,selectedValues:V}=j,B=de.useSelectHierarchyItem(e,s,g,a,j,n),I=t.computed(()=>e.disabled),q=t.computed(()=>e.virtualized?Math.min(g.dataView.value.length,i.value):g.dataView.value.length),A=de.usePagination(e,g),{shouldRenderPagination:U}=A,{containerStyleObject:w}=de.useDataViewContainerStyle(e),T=de.useCommandColumn(e),{applyCommands:F}=T;F(c);const{applyColumnSetting:k,removeColumnSetting:h}=de.useSettingColumn(e);e.showSetting&&k(c);const v=de.useColumn(e,n),D=de.useSort(e),{applyColumnSorter:$,columnContext:re,updateColumnRenderContext:H}=v;$(g,D);const se=de.useGroupColumn(e,re),ae=de.useRow(e,n,j,a),Z=de.useEdit(e,n,a,ae,s),_=de.useVisualDataBound(e),ce=de.useVisualDataCell(e,Z,_),fe=de.useVisualDataRow(e,g,Z,E,a,_,ce),ue=de.useVisualData(e,c,g,q,0,fe),{getVisualData:we}=ue