@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1 lines • 169 kB
JavaScript
(function(te,K){typeof exports=="object"&&typeof module<"u"?K(exports,require("../../components/common/index.umd.js"),require("../../components/dynamic-resolver/index.umd.js"),require("../../components/radio-group/index.umd.js"),require("vue"),require("lodash-es"),require("../../components/designer-canvas/index.umd.js"),require("vue-i18n"),require("../../components/locale/index.umd.js"),require("@vueuse/core"),require("../../components/data-view/index.umd.js"),require("../../components/property-panel/index.umd.js"),require("../../components/accordion/index.umd.js"),require("../../components/avatar/index.umd.js"),require("../button-edit/index.umd.js"),require("../../components/button-group/index.umd.js"),require("../../components/calendar/index.umd.js"),require("../../components/capsule/index.umd.js"),require("../checkbox/index.umd.js"),require("../checkbox-group/index.umd.js"),require("../../components/combo-list/index.umd.js"),require("../../components/combo-tree/index.umd.js"),require("../../components/component/index.umd.js"),require("../../components/color-picker/index.umd.js"),require("../../components/content-container/index.umd.js"),require("../../components/date-picker/index.umd.js"),require("../data-grid/index.umd.js"),require("../../components/dropdown/index.umd.js"),require("../../components/dynamic-form/index.umd.js"),require("../../components/events-editor/index.umd.js"),require("../../components/filter-bar/index.umd.js"),require("../../components/field-selector/index.umd.js"),require("../../components/binding-selector/index.umd.js"),require("../../components/image-cropper/index.umd.js"),require("../input-group/index.umd.js"),require("../../components/layout/index.umd.js"),require("../../components/list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../../components/lookup/index.umd.js"),require("../../components/mapping-editor/index.umd.js"),require("../../components/nav/index.umd.js"),require("../../components/number-range/index.umd.js"),require("../../components/number-spinner/index.umd.js"),require("../../components/order/index.umd.js"),require("../../components/page-header/index.umd.js"),require("../../components/page-footer/index.umd.js"),require("../../components/pagination/index.umd.js"),require("../../components/progress/index.umd.js"),require("../../components/query-solution/index.umd.js"),require("../radio-group/index.umd.js"),require("../../components/rate/index.umd.js"),require("../../components/response-toolbar/index.umd.js"),require("../../components/response-layout/index.umd.js"),require("../../components/response-layout-editor/index.umd.js"),require("../../components/search-box/index.umd.js"),require("../../components/section/index.umd.js"),require("../../components/smoke-detector/index.umd.js"),require("../../components/splitter/index.umd.js"),require("../../components/step/index.umd.js"),require("../../components/switch/index.umd.js"),require("../../components/tabs/index.umd.js"),require("../../components/tags/index.umd.js"),require("../../components/text/index.umd.js"),require("../../components/time-picker/index.umd.js"),require("../../components/transfer/index.umd.js"),require("../../components/tree-view/index.umd.js"),require("../../components/uploader/index.umd.js"),require("../../components/verify-detail/index.umd.js"),require("../../components/video/index.umd.js"),require("../../components/textarea/index.umd.js"),require("../../components/schema-selector/index.umd.js"),require("../tree-grid/index.umd.js"),require("../../components/event-parameter/index.umd.js"),require("../../components/filter-condition-editor/index.umd.js"),require("../../components/fieldset/index.umd.js"),require("../../components/sort-condition-editor/index.umd.js"),require("../../components/menu-lookup/index.umd.js"),require("../drawer/index.umd.js"),require("../../components/json-editor/index.umd.js"),require("../../components/property-editor/index.umd.js"),require("../../components/expression-editor/index.umd.js"),require("../../components/code-editor/index.umd.js"),require("../../components/html-template/index.umd.js"),require("../../components/collection-property-editor/index.umd.js"),require("../../components/modal/index.umd.js"),require("../../components/external-container/index.umd.js"),require("../../components/language-textbox/index.umd.js"),require("../../components/notify/index.umd.js"),require("../../components/popover/index.umd.js"),require("../../components/data-grid/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","../../components/common/index.umd.js","../../components/dynamic-resolver/index.umd.js","../../components/radio-group/index.umd.js","vue","lodash-es","../../components/designer-canvas/index.umd.js","vue-i18n","../../components/locale/index.umd.js","@vueuse/core","../../components/data-view/index.umd.js","../../components/property-panel/index.umd.js","../../components/accordion/index.umd.js","../../components/avatar/index.umd.js","../button-edit/index.umd.js","../../components/button-group/index.umd.js","../../components/calendar/index.umd.js","../../components/capsule/index.umd.js","../checkbox/index.umd.js","../checkbox-group/index.umd.js","../../components/combo-list/index.umd.js","../../components/combo-tree/index.umd.js","../../components/component/index.umd.js","../../components/color-picker/index.umd.js","../../components/content-container/index.umd.js","../../components/date-picker/index.umd.js","../data-grid/index.umd.js","../../components/dropdown/index.umd.js","../../components/dynamic-form/index.umd.js","../../components/events-editor/index.umd.js","../../components/filter-bar/index.umd.js","../../components/field-selector/index.umd.js","../../components/binding-selector/index.umd.js","../../components/image-cropper/index.umd.js","../input-group/index.umd.js","../../components/layout/index.umd.js","../../components/list-nav/index.umd.js","../list-view/index.umd.js","../../components/lookup/index.umd.js","../../components/mapping-editor/index.umd.js","../../components/nav/index.umd.js","../../components/number-range/index.umd.js","../../components/number-spinner/index.umd.js","../../components/order/index.umd.js","../../components/page-header/index.umd.js","../../components/page-footer/index.umd.js","../../components/pagination/index.umd.js","../../components/progress/index.umd.js","../../components/query-solution/index.umd.js","../radio-group/index.umd.js","../../components/rate/index.umd.js","../../components/response-toolbar/index.umd.js","../../components/response-layout/index.umd.js","../../components/response-layout-editor/index.umd.js","../../components/search-box/index.umd.js","../../components/section/index.umd.js","../../components/smoke-detector/index.umd.js","../../components/splitter/index.umd.js","../../components/step/index.umd.js","../../components/switch/index.umd.js","../../components/tabs/index.umd.js","../../components/tags/index.umd.js","../../components/text/index.umd.js","../../components/time-picker/index.umd.js","../../components/transfer/index.umd.js","../../components/tree-view/index.umd.js","../../components/uploader/index.umd.js","../../components/verify-detail/index.umd.js","../../components/video/index.umd.js","../../components/textarea/index.umd.js","../../components/schema-selector/index.umd.js","../tree-grid/index.umd.js","../../components/event-parameter/index.umd.js","../../components/filter-condition-editor/index.umd.js","../../components/fieldset/index.umd.js","../../components/sort-condition-editor/index.umd.js","../../components/menu-lookup/index.umd.js","../drawer/index.umd.js","../../components/json-editor/index.umd.js","../../components/property-editor/index.umd.js","../../components/expression-editor/index.umd.js","../../components/code-editor/index.umd.js","../../components/html-template/index.umd.js","../../components/collection-property-editor/index.umd.js","../../components/modal/index.umd.js","../../components/external-container/index.umd.js","../../components/language-textbox/index.umd.js","../../components/notify/index.umd.js","../../components/popover/index.umd.js","../../components/data-grid/index.umd.js"],K):(te=typeof globalThis<"u"?globalThis:te||self,K(te["radio-group"]={},te.common,te.dynamicResolver,te.FRadioGroup,te.Vue,te.LodashES,te.designerCanvas,te.vueI18n,te.locale,te.VueUseCore,te.dataView,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,te.FTags,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,te.notify,te.FPopover,te.FDataGrid))})(this,function(te,K,Se,$t,o,me,Dt,yt,at,un,Y,Ei,Bi,ki,Ni,Vi,ji,Ii,Pi,Oi,$i,Di,qi,Ri,Li,Ai,Hi,zi,Ui,Gi,Wi,_i,Xi,Yi,Ji,Qi,Zi,Ki,er,tr,nr,or,ir,rr,ar,lr,sr,cr,ur,dr,fr,pr,mr,gr,hr,yr,vr,br,Cr,wr,xr,dn,Sr,Fr,Tr,Mr,Er,Br,kr,Nr,Vr,jr,Ir,Pr,Or,$r,Dr,qr,Rr,Lr,Ar,Hr,zr,Ur,Gr,Wr,_r,fn,pn,mn){"use strict";var Ti=Object.defineProperty;var Mi=(te,K,Se)=>K in te?Ti(te,K,{enumerable:!0,configurable:!0,writable:!0,value:Se}):te[K]=Se;var W=(te,K,Se)=>Mi(te,typeof K!="symbol"?K+"":K,Se);const gn={...K.radioCheckboxCommonProps,id:String,disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},enumData:{type:Array},data:{type:Array},modelValue:{type:String,default:""},name:{type:String,default:""},tabIndex:{type:Number,default:-1},textField:{type:String,default:"name"},valueField:{type:String,default:"value"}};function hn(e,t,n){const i=o.computed(()=>!e.disabled),r=o.computed(()=>e.data||e.enumData||e.options||[]);function a(s){return s[e.valueField]}function l(s){return s[e.textField]}function d(s,u){if(i.value){const m=a(s);n.value!==m&&(n.value=m,t.emit("changeValue",m),t.emit("update:modelValue",m))}u.stopPropagation()}return{enumData:r,getValue:a,getText:l,onClickRadio:d}}const P={button:{type:"button",name:"按钮"},"response-toolbar":{type:"response-toolbar",name:"工具栏"},"response-toolbar-item":{type:"response-toolbar-item",name:"按钮"},"content-container":{type:"content-container",name:"容器"},"input-group":{type:"input-group",name:"文本"},textarea:{type:"textarea",name:"多行文本"},lookup:{type:"lookup",name:"帮助"},"number-spinner":{type:"number-spinner",name:"数值"},"date-picker":{type:"date-picker",name:"日期"},switch:{type:"switch",name:"开关"},"radio-group":{type:"radio-group",name:"单选组"},"check-box":{type:"check-box",name:"复选框"},"check-group":{type:"check-group",name:"复选框组"},"combo-list":{type:"combo-list",name:"下拉列表"},"response-form":{type:"response-form",name:"卡片面板"},"response-layout":{type:"response-layout",name:"布局容器",icon:"response-layout-3"},"response-layout-item":{type:"response-layout-item",name:"布局",icon:"response-layout-1"},"tree-grid":{type:"tree-grid",name:"树表格"},"tree-grid-column":{type:"tree-grid-column",name:"树表格列"},"data-grid":{type:"data-grid",name:"表格"},"data-grid-column":{type:"data-grid-column",name:"表格列"},module:{type:"Module",name:"模块"},component:{type:"component",name:"组件"},tabs:{type:"tabs",name:"标签页"},"tab-page":{type:"tab-page",name:"标签页项",dependentParentControl:"Tab"},"tab-toolbar-item":{type:"tab-toolbar-item",name:"标签页工具栏按钮"},"html-template":{type:"html-template",name:"模板容器"},"time-picker":{type:"time-picker",name:"时间选择"},section:{type:"section",name:"分组面板"},"section-toolbar":{type:"section-toolbar",name:"分组面板工具栏"},"section-toolbar-item":{type:"section-toolbar-item",name:"分组面板按钮"},splitter:{type:"splitter",name:"分栏面板"},"splitter-pane":{type:"splitter-pane",name:"分栏面板项",dependentParentControl:"Splitter"},"component-ref":{type:"component-ref",name:"组件引用节点"},uploader:{type:"uploader",name:"附件上传"},"page-header":{type:"page-header",name:"页头"},"page-footer":{type:"page-footer",name:"页脚"},"tab-toolbar":{type:"tab-toolbar",name:"标签页工具栏"},fieldset:{type:"fieldset",name:"分组"},"query-solution":{type:"query-solution",name:"筛选方案"},drawer:{type:"drawer",name:"抽屉"},"external-container":{type:"external-container",name:"外部容器",icon:"content-container"},"list-nav":{type:"list-nav",name:"列表导航"},"list-view":{type:"list-view",name:"列表"},"filter-bar":{type:"filter-bar",name:"筛选条"},"language-textbox":{type:"language-textbox",name:"多语输入框"}};function qt(e,t,n){var v;const i=n&&n.getStyles&&n.getStyles()||"",r=n&&n.getDesignerClass&&n.getDesignerClass()||"",a=o.ref();let l;function d(){return(t==null?void 0:t.schema.componentType)==="frame"?!1:n&&n.checkCanMoveComponent?n.checkCanMoveComponent():!0}function s(){return!1}function u(){return(t==null?void 0:t.schema.componentType)==="frame"?!1:n&&n.checkCanDeleteComponent?n.checkCanDeleteComponent():!0}function m(){return(t==null?void 0:t.schema.componentType)==="frame"?!0:n&&n.hideNestedPaddingInDesginerView?n.hideNestedPaddingInDesginerView():!1}function c(F){if(!F||!F.value)return null;if(F.value.schema&&F.value.schema.type==="component")return F.value;const N=o.ref(F==null?void 0:F.value.parent),V=c(N);return V||null}function g(F=t){var U;if(n!=null&&n.getDraggableDesignItemElement)return n.getDraggableDesignItemElement(F);const{componentInstance:N,designerItemElementRef:V}=F;if(!N||!N.value)return null;const{getCustomButtons:O}=N.value;return N.value.canMove||O&&((U=O())!=null&&U.length)?V:g(F.parent)}function f(F){return!!n&&n.canAccepts(F)}function p(){return(t==null?void 0:t.schema.label)||(t==null?void 0:t.schema.title)||(t==null?void 0:t.schema.name)}function h(){}function w(F,N){var V;!F||!N||(n!=null&&n.onAcceptMovedChildElement&&n.onAcceptMovedChildElement(F,N),(V=t==null?void 0:t.setupContext)==null||V.emit("dragEnd"))}function T(F,N){const{componentType:V}=F;let O=Se.getSchemaByTypeForDesigner(V,F,N);n&&n.onResolveNewComponentSchema&&(O=n.onResolveNewComponentSchema(F,O));const U=V.toLowerCase().replace(/-/g,"_");return O&&!O.id&&O.type===V&&(O.id=`${U}_${Math.random().toString().slice(2,6)}`),O}function M(F){F&&n!=null&&n.onChildElementMovedOut&&n.onChildElementMovedOut(F)}function q(...F){if(n&&n.getPropsConfig)return n.getPropsConfig(...F)}function C(F){if(!F)return;const N=t==null?void 0:t.schema,{formSchemaUtils:V}=F;if(N&&V.getExpressions().length){const O=V.getExpressions().findIndex(U=>U.target===N.id);O>-1&&V.getExpressions().splice(O,1)}}function y(F){if(!F||!(t!=null&&t.schema))return;const N=t.schema,{formSchemaUtils:V}=F;V.removeCommunicationInComponent(N)}function b(F){n&&n.onRemoveComponent&&n.onRemoveComponent(),C(F),y(F),t!=null&&t.schema.contents&&t.schema.contents.map(N=>{let V=N.id;N.type==="component-ref"&&(V=N.component);const O=e.value.querySelectorAll(`#${V}-design-item`);O!=null&&O.length&&Array.from(O).map(U=>{var ee;(ee=U==null?void 0:U.componentInstance)!=null&&ee.value.onRemoveComponent&&U.componentInstance.value.onRemoveComponent(F)})})}function B(){if(n&&n.getCustomButtons)return n.getCustomButtons()}function E(F){var V,O;if(!((V=t==null?void 0:t.schema)!=null&&V.id))return;if(!l&&F&&(l=F.formSchemaUtils),n!=null&&n.setComponentBasicInfoMap){n.setComponentBasicInfoMap();return}let N="";if(n!=null&&n.getComponentTitle)N=n.getComponentTitle();else{const{text:U,title:ee,label:$,mainTitle:I,name:G,type:L}=t.schema;N=U||ee||$||I||G||((O=P[L])==null?void 0:O.name)}N&&l.getControlBasicInfoMap().set(t.schema.id,{componentTitle:N,parentPathName:N})}function x(F){var U;const{changeObject:N}=F,{propertyID:V,propertyValue:O}=N;if(["text","title","label","name","mainTitle"].includes((U=F==null?void 0:F.changeObject)==null?void 0:U.propertyID)&&V&&O&&(E(),l)){const ee=l.getControlBasicInfoMap(),$=ee.keys().toArray().filter(I=>{var G,L;return((G=ee.get(I))==null?void 0:G.reliedComponentId)===((L=t==null?void 0:t.schema)==null?void 0:L.id)});$!=null&&$.length&&$.forEach(I=>{const G=ee.get(I).parentPathName.split(" > ");G[0]=O,ee.get(I).parentPathName=G.join(" > ")})}}function k(F){if(x(F),n&&n.onPropertyChanged)return n.onPropertyChanged(F)}return a.value={canMove:d(),canSelectParent:s(),canDelete:u(),canNested:!m(),contents:t==null?void 0:t.schema.contents,elementRef:e,parent:(v=t==null?void 0:t.parent)==null?void 0:v.componentInstance,schema:t==null?void 0:t.schema,styles:i,designerClass:r,canAccepts:f,getBelongedComponentInstance:c,getDraggableDesignItemElement:g,getDraggingDisplayText:p,getPropConfig:q,getDragScopeElement:h,onAcceptMovedChildElement:w,onChildElementMovedOut:M,addNewChildComponentSchema:T,triggerBelongedComponentToMoveWhenMoved:!!n&&n.triggerBelongedComponentToMoveWhenMoved||o.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!n&&n.triggerBelongedComponentToDeleteWhenDeleted||o.ref(!1),onRemoveComponent:b,getCustomButtons:B,onPropertyChanged:k,setComponentBasicInfoMap:E,updateContextSchema:t==null?void 0:t.updateContextSchema},a}const yn=o.ref(0);function vn(){yn.value++}const lt=o.ref(0);function bn(e){const{formSchemaUtils:t,formStateMachineUtils:n}=e;function i(s,u=""){return{path:u+s.code,field:s.id,fullPath:s.code}}function r(s,u=""){return t.getViewModelById(s).states.map(c=>i(c,u))}function a(s){const u=t.getRootViewModelId(),m=r(s);if(s===u)return m;const c=r(u,"root-component.");return[...m,...c]}function l(s){return s.binding&&s.binding.path||s.id||""}function d(){return n&&n.getRenderStates()||[]}return{getVariables:a,getControlName:l,getStateMachines:d}}class Rt{constructor(t){W(this,"sessionVariables",[{key:"CurrentSysOrgName",name:"当前组织Name",description:"当前组织Name"},{key:"CurrentSysOrgId",name:"当前组织Id",description:"当前组织Id"},{key:"CurrentUserName",name:"当前用户Name",description:"当前用户Name"},{key:"CurrentUserCode",name:"当前用户Code",description:"当前用户Code"},{key:"CurrentUserId",name:"当前用户Id",description:"当前用户Id"},{key:"CurrentLanguage",name:"当前语言编号",description:"当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"}]);W(this,"expressionNames",{compute:"计算表达式",dependency:"依赖表达式",validate:"验证表达式",dataPicking:"帮助前表达式",visible:"可见表达式",readonly:"只读表达式",required:"必填表达式"});W(this,"getExpressionConverter",(t,n)=>({convertFrom:(i,r,a,l)=>{const d=a.getExpressionRuleValue(t,n||r);return d&&d.value||""},convertTo:(i,r,a,l,d)=>{var s;if(r==="dataPicking"&&(a!=null&&a.target)){const u=`${a.target}_dataPicking`;((s=a.rules)==null?void 0:s.some(c=>c.id===u&&c.value))?i.dictPickingExpressionId=u:delete i.dictPickingExpressionId}l.updateExpression(a)}}));this.formSchemaService=t}getExpressionRule(t,n){const i=this.formSchemaService.getExpressions();if(!i)return"";const r=i.find(l=>l.target===t);if(!r)return"";const a=r.rules.find(l=>l.type===n);return a||""}getContextFormVariables(){const{module:t}=this.formSchemaService.getFormSchema();if(!t.viewmodels||t.viewmodels.length===0)return[];const n=this.formSchemaService.getRootViewModelId(),i=this.formSchemaService.getViewModelById(n);if(!i||!i.states||i.states.length===0)return[];const r=[];return i.states.forEach(a=>{r.push({key:a.code,name:a.name,description:a.name,category:a.category})}),r}createTreeNode(t,n,i="label"){return{id:t.id,name:t.name,bindingPath:t[i],parents:n,type:"field"}}buildEntityFieldsTreeData(t=null,n){const i=[];return t==null||t.forEach(r=>{var d;const a=this.createTreeNode(r,n);let l=[];(d=r.type)!=null&&d.fields&&(l=this.buildEntityFieldsTreeData(r.type.fields,[...n,r.label])),i.push({data:a,children:l,expanded:!0})}),i}buildChildEntityTreeData(t=null,n){const i=[];return t==null||t.forEach(r=>{var s,u;const a=this.createTreeNode(r,n);a.type="entity";const l=this.buildEntityFieldsTreeData((s=r.type)==null?void 0:s.fields,[...n,r.label]),d=this.buildChildEntityTreeData((u=r.type)==null?void 0:u.entities,[...n,r.label]);d!=null&&d.length&&(l==null||l.push(...d)),i.push({data:a,children:l||[],expanded:!0})}),i}getEntitiesTreeData(){const t=this.formSchemaService.getSchemaEntities();if(!(t!=null&&t.length))return[];const n=t[0];if(!(n!=null&&n.type))return[];const i=this.buildEntityFieldsTreeData(n.type.fields,[n.code]),r=this.buildChildEntityTreeData(n.type.entities,[n.code]);return r!=null&&r.length&&(i==null||i.push(...r)),{entityCode:n.code,fields:[{data:this.createTreeNode(n,[],"code"),children:i||[]}]}}getEntitiesAndVariables(){return{entities:this.getEntitiesTreeData(),variables:{session:{name:"系统变量",items:this.sessionVariables,visible:!1},forms:{name:"表单变量",items:this.getContextFormVariables(),visible:!0}}}}onBeforeOpenExpression(t,n,i){const r=i==="Field"?t.binding.field:t.id,a=this.getExpressionRule(r,n),l=this.getEntitiesAndVariables(),d={message:["validate","required","dataPicking"].includes(n)&&a?a.message:"",...l};return a.messageType!=null&&(d.messageType=a.messageType),d}buildRule(t,n,i,r){const{expression:a,message:l,messageType:d}=n,s={id:`${t}_${i}`,type:i,value:a};return(i==="validate"||i==="dataPicking"||i==="required")&&(s.message=l),i==="dataPicking"&&(s.messageType=d),i==="validate"&&r&&(s.elementId=r),s}getExpressionData(){const{expressions:t}=this.formSchemaService.getFormSchema().module;return t||[]}updateExpression(t,n,i,r){const a=n==="Field"?t.binding.field:t.id,l=this.buildRule(a,i,r,t.type==="form-group"?t.id:"");let s=this.getExpressionData().find(m=>m.targetType===n&&m.target===a);const u=m=>m.value.trim()==="";if(s){const m=s.rules.find(c=>c.id===l.id);if(m)u(l)?s.rules=s.rules.filter(c=>c.id!==l.id):(Object.assign(m,l),r==="validate"&&t.type==="form-group"&&(m.elementId=t.id));else{if(u(l))return null;s.rules=s.rules||[],s.rules.push(l)}}else{if(u(l))return null;s={target:`${a}`,rules:[l],targetType:n}}return s}getExpressionEditorOptions(t,n,i,r){return i.reduce((a,l)=>{var s,u;const d=n==="Field"?(s=t==null?void 0:t.binding)==null?void 0:s.field:t.id;return a[l]={hide:n==="Field"?!!((u=t==null?void 0:t.binding)!=null&&u.field):!1,description:"",title:this.expressionNames[l],type:"string",$converter:this.getExpressionConverter(d),refreshPanelAfterChanged:!0,editor:{type:"expression-editor",singleExpand:!1,dialogTitle:`${this.expressionNames[l]}编辑器`,showMessage:l==="validate"||l==="dataPicking"||l==="required",showMessageType:l==="dataPicking",beforeOpen:()=>this.onBeforeOpenExpression(t,l,n),onSubmitModal:m=>{const c=this.updateExpression(t,n,m,l);if(r){const g=this.buildRule(d,m,l);r(g)}return c}}},a},{})}getExpressionInfo(t,n,i){const r=n==="Field"?t.binding.field:t.id,a=this.getExpressionRule(r,i),l={value:a&&a.value,targetId:r,targetType:n,expressionType:i};return a&&a.message&&(l.message=a.message),l}getExpressionConfig(t,n,i=["compute","dependency","validate"],r){return{description:"表达式",title:"表达式",hide:!t.binding,properties:{...this.getExpressionEditorOptions(t,n,i,r)}}}getExpressionOptions(t,n,i){const r=this.getExpressionInfo(t,n,i);return{dialogTitle:`${this.expressionNames[i]}编辑器`,singleExpand:!1,showMessage:i==="required",beforeOpen:()=>this.onBeforeOpenExpression(t,i,n),expressionInfo:r}}}class Cn{constructor(t,n){W(this,"componentId");W(this,"viewModelId");W(this,"eventsEditorUtils");W(this,"formSchemaUtils");W(this,"formMetadataConverter");W(this,"designViewModelUtils");W(this,"designViewModelField");W(this,"controlCreatorUtils");W(this,"designerHostService");W(this,"designerContext");W(this,"schemaService",null);W(this,"metadataService",null);W(this,"propertyConfig",{type:"object",categories:{}});var i;this.componentId=t,this.designerHostService=n,this.eventsEditorUtils=n.eventsEditorUtils,this.formSchemaUtils=n.formSchemaUtils,this.formMetadataConverter=n.formMetadataConverter,this.viewModelId=((i=this.formSchemaUtils)==null?void 0:i.getViewModelIdByComponentId(t))||"",this.designViewModelUtils=n.designViewModelUtils,this.controlCreatorUtils=n.controlCreatorUtils,this.metadataService=n.metadataService,this.schemaService=n.schemaService,this.designerContext=n.designerContext}getFormDesignerInstance(){var t,n;return(n=(t=this.designerContext)==null?void 0:t.instances)==null?void 0:n.formDesigner.value}getTableInfo(){var t;return(t=this.schemaService)==null?void 0:t.getTableInfoByViewModelId(this.viewModelId)}setDesignViewModelField(t){var i;const n=t.binding&&t.binding.type==="Form"&&t.binding.field;if(n){if(!this.designViewModelField){const r=this.designViewModelUtils.getDgViewModel(this.viewModelId);this.designViewModelField=r.fields.find(a=>a.id===n)}t.updateOn=(i=this.designViewModelField)==null?void 0:i.updateOn}}getBasicPropConfig(t){return{description:"Basic Information",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"combo-list",textField:"name",valueField:"value",idField:"value",editable:!1,data:[{value:t.type,name:P[t.type]&&P[t.type].name}]}}}}}getAppearanceConfig(t=null,n={},i){const r={title:"外观",description:"Appearance"},a={class:{title:"class样式",type:"string",description:"组件的CSS样式",$converter:"/converter/appearance.converter",parentPropertyID:"appearance"},style:{title:"style样式",type:"string",description:"组件的样式",$converter:"/converter/appearance.converter",parentPropertyID:"appearance"}};for(const l in n)a[l]=Object.assign(a[l]||{},n[l]);return{...r,properties:{...a},setPropertyRelates(l,d){if(l){switch(l&&l.propertyID){case"class":case"style":{lt.value++;break}}i&&i(l,t,d)}}}}getPropertyEditorParams(t,n=[],i="visible",r={},a={}){const{getVariables:l,getControlName:d,getStateMachines:s}=bn(this.designerHostService),u=this.getRealTargetType(t),m=n&&n.length>0?n:["Const","Variable","StateMachine","Expression"],c={type:"property-editor",propertyTypes:m};return m.map(g=>{switch(g){case"Const":Object.assign(c,{constType:"enum",constEnums:[{id:!0,name:"是"},{id:!1,name:"否"}]},r);break;case"Expression":c.expressionConfig=this.getExpressionOptions(t,u,i);break;case"StateMachine":c.stateMachines=s();break;case"Variable":Object.assign(c,{controlName:d(t),newVariablePrefix:"is",newVariableType:"Boolean",variables:l(this.viewModelId),onBeforeOpenVariables:f=>{f.value=l(this.viewModelId)}},a);break}}),c}getVisibleProperty(t,n=""){var a;let i=["Const","Variable","StateMachine","Expression"];return n==="gridFieldEditor"?i=["Const","Expression"]:n==="form-group"&&!((a=t.binding)!=null&&a.field)&&(i=["Const","Variable","StateMachine"]),{visible:{title:"是否可见",type:"boolean",description:"运行时组件是否可见",editor:this.getPropertyEditorParams(t,i,"visible")}}}getBehaviorConfig(t,n="",i={},r){const a={title:"行为",description:""},l=this.getVisibleProperty(t,n);for(const s in i)l[s]=Object.assign(l[s]||{},i[s]);const d=this;return{...a,properties:{...l},setPropertyRelates(s,u){if(s){switch(s.propertyID){case"disabled":case"readonly":case"visible":d.afterMutilEditorChanged(t,s);break}r&&r(s,u)}}}}afterMutilEditorChanged(t,n){this.addNewVariableToViewModel(n,this.viewModelId),this.updateExpressionValue(n),this.clearExpression(n,t)}updateElementByParentContainer(t,n){const i=n&&n.parent&&n.parent.schema;if(!i)return;const r=i.contents.findIndex(l=>l.id===t),a=me.cloneDeep(i.contents[r]);i.contents.splice(r,1),i.contents.splice(r,0,a),vn()}addNewVariableToViewModel(t,n){const i=t.propertyValue;if(!(i&&typeof i=="object")||!(i.type==="Variable"&&i.isNewVariable))return;const l={id:i.field,category:"locale",code:i.fullPath,name:i.fullPath,type:i.newVariableType||"String"};delete i.newVariableType,delete i.isNewVariable,this.formSchemaUtils.getVariableByCode(l.code)||this.formSchemaUtils.getViewModelById(n).states.push(l)}updateExpressionValue(t){const n=t.propertyValue;if(!((n&&n.type)==="Expression"&&n.expressionInfo))return;const{expressionId:a,expressionInfo:l}=n,{targetId:d,targetType:s,expressionType:u,value:m,message:c}=l,g=this.formSchemaUtils.getModule();g.expressions=g.expressions||[];const{expressions:f}=g;let p=f.find(w=>w.target===d);p||(p={target:d,rules:[],targetType:s},f.push(p));const h=p.rules.find(w=>w.type===u);if(h)h.value=m,h.message=c;else{const w={id:a,type:u,value:m,message:c};p.rules.push(w)}delete n.expressionInfo}clearExpression(t,n){const i=t.propertyValue;if(i&&i.type==="Expression")return;const a=t.propertyID,l=this.formSchemaUtils.getExpressions(),d=n.binding?n.binding.field:n.id,s=l.find(u=>u.target===d);!s||!s.rules||(s.rules=s.rules.filter(u=>u.type!==a))}getExpressionOptions(t,n,i){return new Rt(this.formSchemaUtils).getExpressionOptions(t,n,i)}getRealTargetType(t){return["response-toolbar-item","tab-toolbar-item","section-toolbar-item"].indexOf(t.type)>-1?"Button":t.binding&&t.binding.field?"Field":"Container"}createBaseEventProperty(t){const n={};return n[this.viewModelId]={type:"events-editor",editor:{initialData:t,viewSourceHandle:i=>{var r;((r=i.controller)==null?void 0:r.label.indexOf(this.formSchemaUtils.getModule().code))>-1&&this.eventsEditorUtils.jumpToMethod(i)}}},n}}const Ye=class Ye{static getEditorTypesByMDataType(t,n=!1,i=""){if(n)return[{key:P["language-textbox"].type,value:P["language-textbox"].name}];let r=Ye.fieldControlTypeMapping[t];if(i==="data-grid-column"&&(r!=null&&r.length)){const a=[P["check-group"].type,P["radio-group"].type];r=r.filter(l=>!a.includes(l.key))}return r}static getAllInputTypes(){const t=[];for(const n in Ye.fieldControlTypeMapping)Ye.fieldControlTypeMapping[n].forEach(i=>{t.find(r=>r.key===i.key&&r.value===i.value)||t.push({key:i.key,value:i.value})});return t}static mappingDomPropAndSchemaProp(t,n){var a;const i=(a=t.editor)==null?void 0:a.type,r=[];return(t.type===P["data-grid-column"].type||t.type===P["tree-grid-column"].type)&&n&&n.categoryId&&n.categoryId.indexOf("gridFieldEditor")<0&&r.push({domField:"title",schemaField:"name"}),r.push({domField:"label",schemaField:"name"}),r.push({domField:"editor.required",schemaField:"require"}),r.push({domField:"editor.readonly",schemaField:"readonly"}),(i===P["input-group"].type||i===P.textarea.type||i===P["number-spinner"].type)&&r.push({domField:"editor.maxLength",schemaField:"type.length"}),i===P["number-spinner"].type&&r.push({domField:"editor.precision",schemaField:"type.precision"}),(t.type===P["data-grid-column"].type||t.type===P["tree-grid-column"].type)&&r.push({domField:"formatter.precision",schemaField:"type.precision"}),(i===P["combo-list"].type||i===P["radio-group"].type)&&r.push({domField:"editor.data",schemaField:"type.enumValues"}),(t.type===P["data-grid-column"].type||t.type===P["tree-grid-column"].type)&&r.push({domField:"formatter.data",schemaField:"type.enumValues"}),i===P["date-picker"].type&&(r.push({domField:"editor.displayFormat",schemaField:"editor.format"}),r.push({domField:"editor.fieldType",schemaField:"type.name"})),i===P["number-spinner"].type&&(r.push({domField:"editor.max",schemaField:"editor.maxValue"}),r.push({domField:"editor.min",schemaField:"editor.minValue"})),i===P.lookup.type&&(r.push({domField:"editor.dataSource",schemaField:"editor.dataSource"}),r.push({domField:"editor.valueField",schemaField:"editor.valueField"}),r.push({domField:"editor.textField",schemaField:"editor.textField"}),r.push({domField:"editor.displayType",schemaField:"editor.displayType"}),r.push({domField:"editor.mapFields",schemaField:"editor.mapFields"}),r.push({domField:"editor.helpId",schemaField:"editor.helpId"})),r.push({domField:"path",schemaField:"bindingPath"}),r.push({domField:"binding.path",schemaField:"bindingField"}),r.push({domField:"binding.fullPath",schemaField:"path"}),(t.type===P["data-grid-column"].type||t.type===P["tree-grid-column"].type)&&r.push({domField:"field",schemaField:"bindingPath"}),r}};W(Ye,"fieldControlTypeMapping",{String:[{key:P["input-group"].type,value:P["input-group"].name},{key:P.lookup.type,value:P.lookup.name},{key:P["date-picker"].type,value:P["date-picker"].name},{key:P.switch.type,value:P.switch.name},{key:P["check-box"].type,value:P["check-box"].name},{key:P["check-group"].type,value:P["check-group"].name},{key:P["radio-group"].type,value:P["radio-group"].name},{key:P["combo-list"].type,value:P["combo-list"].name},{key:P.textarea.type,value:P.textarea.name},{key:P["time-picker"].type,value:P["time-picker"].name}],Text:[{key:P.textarea.type,value:P.textarea.name},{key:P.lookup.type,value:P.lookup.name}],Decimal:[{key:P["number-spinner"].type,value:P["number-spinner"].name}],Integer:[{key:P["number-spinner"].type,value:P["number-spinner"].name}],Number:[{key:P["number-spinner"].type,value:P["number-spinner"].name},{key:P.switch.type,value:P.switch.name},{key:P["check-box"].type,value:P["check-box"].name}],BigNumber:[{key:P["number-spinner"].type,value:P["number-spinner"].name}],Date:[{key:P["date-picker"].type,value:P["date-picker"].name}],DateTime:[{key:P["date-picker"].type,value:P["date-picker"].name}],Boolean:[{key:P.switch.type,value:P.switch.name},{key:P["check-box"].type,value:P["check-box"].name}],Enum:[{key:P["combo-list"].type,value:P["combo-list"].name},{key:P["radio-group"].type,value:P["radio-group"].name}],Object:[{key:P.lookup.type,value:P.lookup.name},{key:P["combo-list"].type,value:P["combo-list"].name},{key:P["radio-group"].type,value:P["radio-group"].name}]});let st=Ye;var ct=(e=>(e.Form="Form",e.Variable="Variable",e))(ct||{});class wn{constructor(){W(this,"label","");W(this,"id","");W(this,"columnInSM",12);W(this,"columnInMD",6);W(this,"columnInLG",3);W(this,"columnInEL",2);W(this,"displayWidthInSM",1);W(this,"displayWidthInMD",1);W(this,"displayWidthInLG",1);W(this,"displayWidthInEL",1);W(this,"displayColumnCountAtBreakPoint","md");W(this,"tagRow",0);W(this,"showTopBorder",0);W(this,"group",1);W(this,"isSupportedClass",!0);W(this,"fieldSetId","")}}function xn(e){let t,n;const i=new Map;let r=[];function a(m,c){const f=m.split(" ").filter(M=>M.startsWith("col-"));if(f.length===0){c.isSupportedClass=!1;return}let p=f.find(M=>/^col-([1-9]|10|11|12)$/.test(M)),h=f.find(M=>/^col-md-([1-9]|10|11|12)$/.test(M)),w=f.find(M=>/^col-xl-([1-9]|10|11|12)$/.test(M)),T=f.find(M=>/^col-el-([1-9]|10|11|12)$/.test(M));p=p||"col-12",c.columnInSM=parseInt(p.replace("col-",""),10),c.displayWidthInSM=c.columnInSM/12,c.displayWidthInSM!==1&&(c.isSupportedClass=!1),h=h||"col-md-"+c.columnInSM,c.columnInMD=parseInt(h.replace("col-md-",""),10),c.displayWidthInMD=c.columnInMD/6,[1,2].includes(c.displayWidthInMD)||(c.isSupportedClass=!1),w=w||"col-xl-"+c.columnInMD,c.columnInLG=parseInt(w.replace("col-xl-",""),10),c.displayWidthInLG=c.columnInLG/3,[1,2,3,4].includes(c.displayWidthInLG)||(c.isSupportedClass=!1),T=T||"col-el-"+c.columnInLG,c.columnInEL=parseInt(T.replace("col-el-",""),10),c.displayWidthInEL=c.columnInEL/2,[1,2,3,4,5,6].includes(c.displayWidthInEL)||(c.isSupportedClass=!1)}function l(m,c,g,f=!1){let p=!1;m.contents.forEach(h=>{if(h.type==="fieldset"){g+=1,l(h,c,g,!0),p=!0;return}p&&(g+=1,p=!1);const w=h.appearance&&h.appearance.class,T=new wn;w?a(w,T):T.isSupportedClass=!1,T.label=h.label||h.id,T.id=h.id,T.group=g,f&&(T.fieldSetId=m.id),n===h.id&&(t=g),i.set(h.id,h),c.push(T)})}function d(m){const c=e.getComponentById(m);if(!c||!c.componentType||!c.componentType.startsWith("form"))return{result:!1,message:"只可以在响应式表单组件中调整响应式布局配置"};const g=e.selectNode(c,f=>f.type===Dt.DgControl["response-form"].type);return!g||!g.contents||g.contents.length===0?{result:!1,message:"Form区域内没有控件,请先添加控件"}:{result:!0,message:"",formNode:g}}function s(m,c){c=c||m.id;const{result:g,message:f,formNode:p}=d(c);if(!g)return{result:g,message:f};n=m.id,r=[],i.clear();const h=p.contents[0].type===Dt.DgControl.fieldset.type?0:1;l(p,r,h);const w=r.find(M=>!M.isSupportedClass);return{defaultState:{defaultGroupNumber:t||1,model:w?"customize":"standard"},importData:r}}function u(m,c){c=c;const{result:g,formNode:f}=d(c);if(!g)return"";const p=[];return m.forEach(h=>{var M;const w=i.get(h.id),T=w.appearance&&w.appearance.class;if(T){const C=T.split(" ").filter(k=>!k.startsWith("col-")),y="col-"+h.columnInSM,b="col-md-"+h.columnInMD,B="col-xl-"+h.columnInLG,E="col-el-"+h.columnInEL,x=[y,b,B,E].concat(C);w.appearance.class=x.join(" ")}if(h.fieldSetId){const q=f.contents.find(y=>y.id===h.fieldSetId),C=p.find(y=>y.id===h.fieldSetId);C?(M=C.contents)==null||M.push(w):(p.push(q),q.contents=[w])}else p.push(w)}),f.contents=p,f.id}return{checkCanFindFormNode:d,checkCanOpenLayoutEditor:s,changeFormControlsByResponseLayoutConfig:u,getResonseFormLayoutConfig:l}}var Ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ut(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 Sn={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){return function(){function n(i,r,a){function l(u,m){if(!r[u]){if(!i[u]){var c=typeof ut=="function"&&ut;if(!m&&c)return c(u,!0);if(d)return d(u,!0);var g=new Error("Cannot find module '"+u+"'");throw g.code="MODULE_NOT_FOUND",g}var f=r[u]={exports:{}};i[u][0].call(f.exports,function(p){var h=i[u][1][p];return l(h||p)},f,f.exports,n,i,r,a)}return r[u].exports}for(var d=typeof ut=="function"&&ut,s=0;s<a.length;s++)l(a[s]);return l}return n}()({1:[function(n,i,r){var a={},l="(?:^|\\s)",d="(?:\\s|$)";function s(c){var g=a[c];return g?g.lastIndex=0:a[c]=g=new RegExp(l+c+d,"g"),g}function u(c,g){var f=c.className;f.length?s(g).test(f)||(c.className+=" "+g):c.className=g}function m(c,g){c.className=c.className.replace(s(g)," ").trim()}i.exports={add:u,rm:m}},{}],2:[function(n,i,r){(function(a){var l=n("contra/emitter"),d=n("crossvent"),s=n("./classes"),u=document,m=u.documentElement;function c(v,F){var N=arguments.length;N===1&&Array.isArray(v)===!1&&(F=v,v=[]);var V,O,U,ee,$,I,G,L,ne,ye=null,ve,X,re=!1,ce=0,oe,H=F||{};H.moves===void 0&&(H.moves=M),H.accepts===void 0&&(H.accepts=M),H.invalid===void 0&&(H.invalid=et),H.containers===void 0&&(H.containers=v||[]),H.isContainer===void 0&&(H.isContainer=T),H.copy===void 0&&(H.copy=!1),H.copySortSource===void 0&&(H.copySortSource=!1),H.revertOnSpill===void 0&&(H.revertOnSpill=!1),H.removeOnSpill===void 0&&(H.removeOnSpill=!1),H.direction===void 0&&(H.direction="vertical"),H.ignoreInputTextSelection===void 0&&(H.ignoreInputTextSelection=!0),H.mirrorContainer===void 0&&(H.mirrorContainer=u.body);var ie=l({containers:H.containers,start:Pe,end:Ue,cancel:J,remove:j,destroy:He,canMove:Ie,dragging:!1});return H.removeOnSpill===!0&&ie.on("over",Tt).on("out",Mt),je(),ie;function Ae(S){return ie.containers.indexOf(S)!==-1||H.isContainer(S)}function je(S){var D=S?"remove":"add";p(m,D,"mousedown",ue),p(m,D,"mouseup",$e)}function Me(S){var D=S?"remove":"add";p(m,D,"mousemove",Ke)}function Je(S){var D=S?"remove":"add";d[D](m,"selectstart",ze),d[D](m,"click",ze)}function He(){je(!0),$e({})}function ze(S){ve&&S.preventDefault()}function ue(S){ee=S.clientX,$=S.clientY;var D=h(S)!==1||S.metaKey||S.ctrlKey;if(!D){var R=S.target,z=Ee(R);z&&(ve=z,Me(),S.type==="mousedown"&&(b(R)?R.focus():S.preventDefault()))}}function Ke(S){if(ve){if(h(S)===0){$e({});return}if(!(S.clientX!==void 0&&Math.abs(S.clientX-ee)<=(H.slideFactorX||0)&&S.clientY!==void 0&&Math.abs(S.clientY-$)<=(H.slideFactorY||0))){if(H.ignoreInputTextSelection){var D=k("clientX",S)||0,R=k("clientY",S)||0,z=u.elementFromPoint(D,R);if(b(z))return}var Q=ve;Me(!0),Je(),Ue(),Oe(Q),s.add(L||U,"gu-transit"),Bt(),Et(),ce=0,tt(S)}}}function Ee(S){if(!(ie.dragging&&V)&&!Ae(S)){for(var D=S;y(S)&&Ae(y(S))===!1;)if(H.invalid(S,D)||(S=y(S),!S))return;var R=y(S);if(R&&!H.invalid(S,D)){var z=H.moves(S,R,D,E(S));if(z)return{item:S,source:R}}}}function Ie(S){return!!Ee(S)}function Pe(S){var D=Ee(S);D&&Oe(D)}function Oe(S){Ot(S.item,S.source)&&(L=S.item.cloneNode(!0),ie.emit("cloned",L,S.item,"copy")),O=S.source,U=S.item,I=G=E(S.item),ie.dragging=!0,ie.emit("drag",U,O)}function et(){return!1}function Ue(){if(ie.dragging){var S=L||U;Qe(S,y(S))}}function Ne(){ve=!1,Me(!0),Je(!0)}function $e(S){if(Ne(),!!ie.dragging){var D=L||U,R=k("clientX",S)||0,z=k("clientY",S)||0,Q=w(V,R,z),Z=De(Q,R,z);Z&&(L&&H.copySortSource||!L||Z!==O)?Qe(D,Z):H.removeOnSpill?j():J()}}function Qe(S,D){var R=y(S);L&&H.copySortSource&&D===O&&R.removeChild(U),se(D)?ie.emit("cancel",S,O):ie.emit("drop",S,D,O,G),le()}function j(){if(ie.dragging){var S=L||U,D=y(S);D&&D.removeChild(S),ie.emit(L?"cancel":"remove",S,D,O),le()}}function J(S){if(ie.dragging){var D=arguments.length>0?S:H.revertOnSpill,R=L||U,z=y(R),Q=se(z);Q===!1&&D&&(L?z&&z.removeChild(L):O.insertBefore(R,I)),Q||D?ie.emit("cancel",R,O,O):ie.emit("drop",R,z,O,G),le()}}function le(){var S=L||U;Ne(),kt(),Nt(),S&&s.rm(S,"gu-transit"),ne&&clearTimeout(ne),ie.dragging=!1,ye&&ie.emit("out",S,ye,O),ie.emit("dragend",S,ce),O=U=L=I=G=ne=ye=null}function se(S,D){var R;return D!==void 0?R=D:V?R=G:R=E(L||U),S===O&&R===I}function De(S,D,R){for(var z=S;z&&!Q();)z=y(z);return z;function Q(){var Z=Ae(z);if(Z===!1)return!1;var Fe=gt(z,S),be=ht(z,Fe,D,R),Ce=se(z,be);return Ce?!0:H.accepts(U,z,O,be)}}function tt(S){if(!V)return;S.preventDefault();var D=k("clientX",S)||0,R=k("clientY",S)||0;V.style.left=D-2+"px",V.style.top=R-2+"px";var z=L||U,Q=w(V,D,R),Z=De(Q,D,R),Fe=Z!==null&&Z!==ye;(Fe||Z===null)&&(we(),ye=Z,ke()),Pt(Q,R);var be=y(z);if(Z===O&&L&&!H.copySortSource){be&&be.removeChild(z);return}var Ce,Be=gt(Z,Q);if(re=nt(Be,Z),Be!==null)Ce=ht(Z,Be,D,R);else if(H.revertOnSpill===!0&&!L)Ce=I,Z=O;else{L&&be&&be.removeChild(z),L&&X&&(X.style.display="none");return}X.style.display="block",Ft(Ce,z,Fe),Ce?jt(Be,Ce):It(Z);function de(ge){ie.emit(ge,z,ye,O)}function ke(){Fe&&de("over")}function we(){ye&&de("out")}}function Ft(S,D,R){(S===D||S===E(D))&&(G=E(D)),(S===null&&R||S!==D&&S!==E(D))&&(G=S)}function Tt(S){s.rm(S,"gu-hide")}function Mt(S){ie.dragging&&s.add(S,"gu-hide")}function Et(){V||(V=document.createElement("div"),V.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;",V.innerHTML=H.getMirrorText&&H.getMirrorText(U)||"控件",s.add(V,"gu-mirror"),H.mirrorContainer.appendChild(V),p(m,"add","mousemove",tt),s.add(H.mirrorContainer,"gu-unselectable"),ie.emit("cloned",V,U,"mirror"))}function Bt(){if(X=document.createElement("div"),s.add(X,"gu-insertion"),U){var S=U.getBoundingClientRect();X.style.left=S.left+"px",X.style.top=S.top+"px"}re=!1,H.mirrorContainer.appendChild(X)}function kt(){V&&(s.rm(H.mirrorContainer,"gu-unselectable"),p(m,"remove","mousemove",tt),y(V).removeChild(V),V=null)}function Nt(){X&&(y(X).removeChild(X),X=null)}function gt(S,D){for(var R=D;R!==S&&y(R)!==S;)R=y(R);return R===m?null:R}function nt(S,D){if(!D)return re;var R=S||D&&D.lastElementChild;if(!R)return!0;var z=getComputedStyle(S),Q=/^inline/.test(z.getPropertyValue("display"))||/^(left|right)$/.test(z.getPropertyValue("float"));if(Q)return!0;if(D){var Z=getComputedStyle(D),Fe=Z.getPropertyValue("display");if(/flex$/.test(Fe)){var be=Z.getPropertyValue("flex-direction")||"row";if(be==="row"||be==="row-reverse")return!Vt(D)}return!1}return!0}function Vt(S){if(!S.children||!S.children.length)return!1;for(const D of Array.from(S.children)){const z=(D.className&&D.className.split(" ")||[]).filter(Q=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(Q));if(!z.length)return!1;for(const Q of z){const Z=Q.slice(Q.lastIndexOf("-")+1);if(parseInt(Z,10)!==12)return!1}}return!0}function jt(S,D){const R=D.getBoundingClientRect();if(X.style.left=R.left+"px",X.style.top=R.top+"px",re){if(X.style.height=R.height+"px",X.style.width="4px",S){const z=S.getBoundingClientRect();z.top!==R.top&&(X.style.left=z.right+"px",X.style.top=z.top+"px",X.style.height=z.height+"px")}}else if(X.style.height="4px",X.style.width=R.width+"px",oe){const z=oe.getBoundingClientRect();R.top<z.top&&(X.style.display="none")}D===U&&U&&(X.style.display="none")}function It(S){G=null;var D=S.lastElementChild;if(D){var R=D.getBoundingClientRect();re?(X.style.left=R.right+"px",X.style.top=R.top+"px",X.style.height=R.height+"px",X.style.width="4px"):(X.style.left=R.left+"px",X.style.top=R.bottom+"px",X.style.height="4px",X.style.width=R.width+"px"),D===U&&U&&(X.style.display="none")}else X.style.display="none"}function Pt(S,D){if(!H.mirrorContainer.contains(S)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(oe=g(S),!oe||!oe.contains(S)))return;const R=document.querySelector(".dgComponentSelected"),z=oe.getBoundingClientRect();if(D-30<z.top&&oe.scrollTop>0){let Q=oe.scrollTop<10?oe.scrollTop:10;oe.scrollBy(0,-1*Q),R&&oe.contains(R)&&(ce=ce+-1*Q)}if(D+30>z.bottom&&oe.scrollTop<oe.scrollHeight-oe.clientHeight){const Q=oe.scrollHeight-oe.clientHeight-oe.scrollTop;let Z=Q<10?Q:10;oe.scrollBy(0,Z),R&&oe.contains(R)&&(ce=ce+Z)}}function ht(S,D,R,z){var Q=H.direction==="horizontal",Z=H.direction==="mixed",Fe=D!==S?Ce():be();return Fe;function be(){var de=S.children.length,ke,we,ge;for(ke=0;ke<de;ke++)if(we=S.children[ke],ge=we.getBoundingClientRect(),Q&&ge.left+ge.width/2>R||!Z&&!Q&&ge.top+ge.height/2>z||Z&&ge.left+ge.width>R&&ge.top+ge.height>z)return we;return null}function Ce(){var de=D.getBoundingClientRect();if(Z){var ke=z-de.top,we=R-de.left,ge=de.bottom-z,ot=de.right-R,it=Math.min(we,ot,ke,ge),rt;return re?rt=ot<we:rt=ge===it||ot===it||we===it,Be(rt)}return Be(Q?R>de.left+q(de)/2:z>de.top+C(de)/2)}function Be(de){return de?E(D):D}}function Ot(S,D){return typeof H.copy=="boolean"?H.copy:H.copy(S,D)}}function g(v){const F=Array.from(window.scrollContainerList);if(F.length===1){const V=Array.from(window.scrollContainerList)[0];return document.getElementById(V)}const N=f(F);for(const V of N)if(V.contains(v))return V;return null}function f(v){const F=[];return v.forEach(N=>{const V=document.getElementById(N);V&&F.push(V)}),F.sort((N,V)=>N.contains(V)?1:V.contains(N)?-1:0),F}function p(v,F,N,V){var O={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},U={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},ee={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};a.navigator.pointerEnabled?d[F](v,U[N],V):a.navigator.msPointerEnabled?d[F](v,ee[N],V):(d[F](v,O[N],V),d[F](v,N,V))}function h(v){if(v.touches!==void 0)return v.touches.length;if(v.which!==void 0&&v.which!==0)return v.which;if(v.buttons!==void 0)return v.buttons;var F=v.button;if(F!==void 0)return F&1?1:F&2?3:F&4?2:0}function w(v,F,N){v=v||{};var V=v.className||"",O;return v.className+=" gu-hide",O=u.elementFromPoint(F,N),v.className=V,O}function T(){return!1}function M(){return!0}function q(v){return v.width||v.right-v.left}function C(v){return v.height||v.bottom-v.top}function y(v){return v.parentNode===u?null:v.parentNode}function b(v){return v.tagName==="INPUT"||v.tagName==="TEXTAREA"||v.tagName==="SELECT"||B(v)}function B(v){return!v||v.contentEditable==="false"?!1:v.contentEditable==="true"?!0:B(y(v))}function E(v){return v.nextElementSibling||F();function F(){var N=v;do N=N.nextSibling;while(N&&N.nodeType!==1);return N}}function x(v){return v.targetTouches&&v.targetTouches.length?v.targetTouches[0]:v.changedTouches&&v.changedTouches.length?v.changedTouches[0]:v}function k(v,F){var N=x(F),V={pageX:"clientX",pageY:"clientY"};return v in V&&!(v in N)&&V[v]in N&&(v=V[v]),N[v]}i.exports=c}).call(this,typeof Ve<"u"?Ve:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(n,i,r){i.exports=function(l,d){return Array.prototype.slice.call(l,d)}},{}],4:[function(n,i,r){var a=n("ticky");i.exports=function(d,s,u){d&&a(function(){d.apply(u||null,s||[])})}},{ticky:10}],5:[function(n,i,r){var a=n("atoa"),l=n("./debounce");i.exports=function(s,u){var m=u||{},c={};return s===void 0&&(s={}),s.on=function(g,f){return c[g]?c[g].push(f):c[g]=[f],s},s.once=function(g,f){return f._once=!0,s.on(g,f),s},s.off=function(g,f){var p=arguments.length;if(p===1)delete c[g];else if(p===0)c={};else{var h=c[g];if(!h)return s;h.splice(h.indexOf(f),1)}return s},s.emit=function(){var g=a(arguments);return s.emitterSnapshot(g.shift()).apply(this,g)},s.emitterSnapshot=function(g){var f=(c[g]||[]).slice(0);return function(){var p=a(arguments),h=this||s;if(g==="error"&&m.throws!==!1&&!f.length)throw p.length===1?p[0]:p;return f.forEach(function(T){m.async?l(T,p,h):T.apply(h,p),T._once&&s.off(g,T)}),s}},s}},{"./debounce":4,atoa:3}],6:[function(n,i,r){(function(a){var l=n("custom-event"),d=n("./eventmap"),s=a.document,u=g,m=p,c=[];a.addEventListener||(u=f,m=h),i.exports={add:u,remove:m,fabricate:w};function g(y,b,B,E){return y.addEventListener(b,B,E)}function f(y,b,B){return y.attachEvent("on"+b,M(y,b,B))}function p(y,b,B,E){return y.removeEventListener(b,B,E)}function h(y,b,B){var E=q(y,b,B);if(E)return y.detachEvent("on"+b,E)}function w(y,b,B){var E=d.indexOf(b)===-1?k():x();y.dispatchEvent?y.dispatchEvent(E):y.fireEvent("on"+b,E);function x(){var v;return s.createEvent?(v=s.createEvent("Event"),v.initEvent(b,!0,!0)):s.createEventObject&&(v=s.createEventObject()),v}function k(){return new l(b,{detail:B})}}function T(y,b,B){return function(x){var k=x||a.event;k.target=k.target||k.srcElement,k.preventDefault=k.preventDefault||function(){k.returnValue=!1},k.stopPropagation=k.stopPropagation||function(){k.cancelBubble=!0},k.which=k.which||k.keyCode,B.call(y,k)}}function M(y,b,B){var E=q(y,b,B)||T(y,b,B);return c.push({wrapper:E,element:y,type:b,fn:B}),E}function q(y,b,B){var E=C(y,b,B);if(E){var x=c[E].wrapper;return c.splice(E,1),x}}function C(y,b,B){var E,x;for(E=0;E<c.length;E++)if(x=c[E],x.element===y&&x.type===b&&x.fn===B)return E}}).call(this,typeof Ve<"u"?Ve:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(n,i,r){(function(a){var l=[],d="",s=/^on/;for(d in a)s.test(d)&&l.push(d.slice(2));i.exports=l}).call(this,typeof Ve<"u"?Ve:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(n,i,r){(function(a){var l=a.CustomEvent;function d(){try{var s=new l("cat",{detail:{foo:"bar"}});return s.type==="cat"&&s.detail.foo==="bar"}catch{}return!1}i.exports=d()?l:typeof document<"u"&&typeof document.createEvent=="function"?function(u,m){var c=document.createEvent("CustomEvent");return m?c.initCustomEvent(u,m.bubbles,m.cancelable,m.detail):c.initCustomEvent(u,!1,!1,void 0),c}:function(u,m){var c=document.createEventObject();return c