@farris/ui-vue 1.6.5-beta.4 → 1.6.5-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/components/accordion/package.json +1 -1
  2. package/components/avatar/index.esm.js +1 -1
  3. package/components/avatar/index.umd.cjs +1 -1
  4. package/components/avatar/package.json +1 -1
  5. package/components/binding-selector/package.json +1 -1
  6. package/components/border-editor/package.json +1 -1
  7. package/components/button/package.json +1 -1
  8. package/components/button-edit/index.esm.js +170 -170
  9. package/components/button-edit/index.umd.cjs +1 -1
  10. package/components/button-edit/package.json +1 -1
  11. package/components/button-group/package.json +1 -1
  12. package/components/calculator/package.json +1 -1
  13. package/components/calendar/package.json +1 -1
  14. package/components/capsule/package.json +1 -1
  15. package/components/checkbox/package.json +1 -1
  16. package/components/checkbox-group/package.json +1 -1
  17. package/components/code-editor/package.json +1 -1
  18. package/components/collection-property-editor/package.json +1 -1
  19. package/components/color-picker/package.json +1 -1
  20. package/components/combo-list/package.json +1 -1
  21. package/components/combo-tree/package.json +1 -1
  22. package/components/common/package.json +1 -1
  23. package/components/component/index.esm.js +201 -201
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/component/package.json +1 -1
  26. package/components/condition/index.esm.js +1 -1
  27. package/components/condition/index.umd.cjs +1 -1
  28. package/components/condition/package.json +1 -1
  29. package/components/content-container/index.esm.js +1 -1
  30. package/components/content-container/index.umd.cjs +1 -1
  31. package/components/content-container/package.json +1 -1
  32. package/components/data-grid/package.json +1 -1
  33. package/components/data-view/package.json +1 -1
  34. package/components/date-picker/package.json +1 -1
  35. package/components/designer-canvas/index.esm.js +255 -255
  36. package/components/designer-canvas/index.umd.cjs +1 -1
  37. package/components/designer-canvas/package.json +1 -1
  38. package/components/designer-outline/package.json +1 -1
  39. package/components/designer-toolbox/package.json +1 -1
  40. package/components/discussion-editor/package.json +1 -1
  41. package/components/discussion-list/package.json +1 -1
  42. package/components/drawer/package.json +1 -1
  43. package/components/dropdown/package.json +1 -1
  44. package/components/dynamic-form/index.esm.js +1 -1
  45. package/components/dynamic-form/index.umd.cjs +1 -1
  46. package/components/dynamic-form/package.json +1 -1
  47. package/components/dynamic-resolver/package.json +1 -1
  48. package/components/dynamic-view/package.json +1 -1
  49. package/components/enum-editor/package.json +1 -1
  50. package/components/event-parameter/package.json +1 -1
  51. package/components/events-editor/index.esm.js +1 -1
  52. package/components/events-editor/index.umd.cjs +1 -1
  53. package/components/events-editor/package.json +1 -1
  54. package/components/expression-editor/index.esm.js +1 -1
  55. package/components/expression-editor/index.umd.cjs +3 -3
  56. package/components/expression-editor/package.json +1 -1
  57. package/components/external-container/package.json +1 -1
  58. package/components/field-selector/package.json +1 -1
  59. package/components/fieldset/package.json +1 -1
  60. package/components/filter-bar/index.esm.js +1 -1
  61. package/components/filter-bar/index.umd.cjs +1 -1
  62. package/components/filter-bar/package.json +1 -1
  63. package/components/filter-condition-editor/index.esm.js +1 -1
  64. package/components/filter-condition-editor/index.umd.cjs +1 -1
  65. package/components/filter-condition-editor/package.json +1 -1
  66. package/components/flow-canvas/index.esm.js +1 -1
  67. package/components/flow-canvas/index.umd.cjs +1 -1
  68. package/components/flow-canvas/package.json +1 -1
  69. package/components/html-template/package.json +1 -1
  70. package/components/image-cropper/package.json +1 -1
  71. package/components/input-group/package.json +1 -1
  72. package/components/json-editor/package.json +1 -1
  73. package/components/language-textbox/package.json +1 -1
  74. package/components/layout/package.json +1 -1
  75. package/components/list-nav/package.json +1 -1
  76. package/components/list-view/package.json +1 -1
  77. package/components/loading/package.json +1 -1
  78. package/components/locale/package.json +1 -1
  79. package/components/lookup/package.json +1 -1
  80. package/components/mapping-editor/index.esm.js +1 -1
  81. package/components/mapping-editor/index.umd.cjs +1 -1
  82. package/components/mapping-editor/package.json +1 -1
  83. package/components/menu-lookup/package.json +1 -1
  84. package/components/message-box/index.esm.js +1 -1
  85. package/components/message-box/index.umd.cjs +1 -1
  86. package/components/message-box/package.json +1 -1
  87. package/components/modal/index.esm.js +1 -1
  88. package/components/modal/index.umd.cjs +1 -1
  89. package/components/modal/package.json +1 -1
  90. package/components/nav/package.json +1 -1
  91. package/components/notify/package.json +1 -1
  92. package/components/number-range/index.esm.js +1 -1
  93. package/components/number-range/index.umd.cjs +1 -1
  94. package/components/number-range/package.json +1 -1
  95. package/components/number-spinner/index.esm.js +1 -1
  96. package/components/number-spinner/index.umd.cjs +1 -1
  97. package/components/number-spinner/package.json +1 -1
  98. package/components/order/package.json +1 -1
  99. package/components/page-footer/package.json +1 -1
  100. package/components/page-header/package.json +1 -1
  101. package/components/pagination/package.json +1 -1
  102. package/components/popover/package.json +1 -1
  103. package/components/progress/package.json +1 -1
  104. package/components/property-editor/package.json +1 -1
  105. package/components/property-panel/index.esm.js +82 -82
  106. package/components/property-panel/index.umd.cjs +1 -1
  107. package/components/property-panel/package.json +1 -1
  108. package/components/query-solution/index.esm.js +1 -1
  109. package/components/query-solution/index.umd.cjs +4 -4
  110. package/components/query-solution/package.json +1 -1
  111. package/components/radio/package.json +1 -1
  112. package/components/radio-button/package.json +1 -1
  113. package/components/radio-group/package.json +1 -1
  114. package/components/rate/package.json +1 -1
  115. package/components/response-layout/index.esm.js +199 -199
  116. package/components/response-layout/index.umd.cjs +1 -1
  117. package/components/response-layout/package.json +1 -1
  118. package/components/response-layout-editor/index.esm.js +1 -1
  119. package/components/response-layout-editor/index.umd.cjs +1 -1
  120. package/components/response-layout-editor/package.json +1 -1
  121. package/components/response-toolbar/package.json +1 -1
  122. package/components/schema-selector/index.esm.js +1 -1
  123. package/components/schema-selector/index.umd.cjs +1 -1
  124. package/components/schema-selector/package.json +1 -1
  125. package/components/search-box/package.json +1 -1
  126. package/components/section/index.esm.js +1 -1
  127. package/components/section/index.umd.cjs +1 -1
  128. package/components/section/package.json +1 -1
  129. package/components/smoke-detector/package.json +1 -1
  130. package/components/sort-condition-editor/index.esm.js +1 -1
  131. package/components/sort-condition-editor/index.umd.cjs +1 -1
  132. package/components/sort-condition-editor/package.json +1 -1
  133. package/components/spacing-editor/package.json +1 -1
  134. package/components/splitter/package.json +1 -1
  135. package/components/step/package.json +1 -1
  136. package/components/switch/package.json +1 -1
  137. package/components/tabs/index.esm.js +1 -1
  138. package/components/tabs/index.umd.cjs +1 -1
  139. package/components/tabs/package.json +1 -1
  140. package/components/tags/package.json +1 -1
  141. package/components/text/package.json +1 -1
  142. package/components/textarea/index.esm.js +166 -166
  143. package/components/textarea/index.umd.cjs +2 -2
  144. package/components/textarea/package.json +1 -1
  145. package/components/time-picker/index.esm.js +1 -1
  146. package/components/time-picker/index.umd.cjs +1 -1
  147. package/components/time-picker/package.json +1 -1
  148. package/components/tooltip/package.json +1 -1
  149. package/components/transfer/package.json +1 -1
  150. package/components/tree-grid/package.json +1 -1
  151. package/components/tree-view/package.json +1 -1
  152. package/components/uploader/package.json +1 -1
  153. package/components/verify-detail/package.json +1 -1
  154. package/components/video/index.esm.js +1 -1
  155. package/components/video/index.umd.cjs +1 -1
  156. package/components/video/package.json +1 -1
  157. package/components/weather/package.json +1 -1
  158. package/designer/button-edit/index.esm.js +167 -167
  159. package/designer/button-edit/index.umd.cjs +1 -1
  160. package/designer/data-grid/index.esm.js +1 -1
  161. package/designer/data-grid/index.umd.cjs +1 -1
  162. package/designer/farris-designer.all.esm.js +1 -1
  163. package/designer/farris-designer.all.umd.cjs +1 -1
  164. package/designer/radio-group/index.esm.js +1 -1
  165. package/designer/radio-group/index.umd.cjs +1 -1
  166. package/farris.all.esm.js +1 -1
  167. package/farris.all.umd.cjs +1 -1
  168. package/package.json +1 -1
  169. package/types/locale/index.d.ts +1 -1
  170. package/types/step/index.d.ts +1 -0
@@ -1 +1 @@
1
- (function(oe,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("lodash-es"),require("../dynamic-resolver/index.umd.js"),require("vue-i18n"),require("../designer-canvas/index.umd.js"),require("../common/index.umd.js"),require("../locale/index.umd.js"),require("@vueuse/core"),require("../data-view/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","../dynamic-resolver/index.umd.js","vue-i18n","../designer-canvas/index.umd.js","../common/index.umd.js","../locale/index.umd.js","@vueuse/core","../data-view/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"],r):(oe=typeof globalThis<"u"?globalThis:oe||self,r(oe.avatar={},oe.Vue,oe.LodashES,oe.dynamicResolver,oe.vueI18n,oe.designerCanvas,oe.common,oe.locale,oe.VueUseCore,oe.dataView))})(this,function(oe,r,ie,Ye,at,yt,xe,st,rn,X){"use strict";var Yo=Object.defineProperty;var Zo=(oe,r,ie)=>r in oe?Yo(oe,r,{enumerable:!0,configurable:!0,writable:!0,value:ie}):oe[r]=ie;var G=(oe,r,ie)=>Zo(oe,typeof r!="symbol"?r+"":r,ie);function Ot(n,e){let t;function o(l){const{properties:g,title:f,ignore:p}=l,h=p&&Array.isArray(p),w=Object.keys(g).reduce((T,M)=>((!h||!p.find($=>$===M))&&(T[M]=g[M].type==="object"&&g[M].properties?o(g[M]):ie.cloneDeep(g[M].default)),T),{});if(f&&(!h||!p.find(T=>T==="id"))){const T=f.toLowerCase().replace(/-/g,"_");w.id=`${T}_${Math.random().toString().slice(2,6)}`}return w}function i(l){const{properties:g,title:f,required:p}=l;if(p&&Array.isArray(p)){const h=p.reduce((w,T)=>(w[T]=g[T].type==="object"&&g[T].properties?o(g[T]):ie.cloneDeep(g[T].default),w),{});if(f&&p.find(w=>w==="id")){const w=f.toLowerCase().replace(/-/g,"_");h.id=`${w}_${Math.random().toString().slice(2,6)}`}return h}return{type:f}}function s(l,g={},f){const p=n[l];if(p){let h=i(p);const w=e[l];return h=w?w({getSchemaByType:s},h,g,f):h,t!=null&&t.appendIdentifyForNewControl&&t.appendIdentifyForNewControl(h),h}return null}function a(l,g){const f=o(g);return Object.keys(f).reduce((p,h)=>(Object.prototype.hasOwnProperty.call(l,h)&&(p[h]&&ie.isPlainObject(p[h])&&ie.isPlainObject(l[h]||!l[h])?Object.assign(p[h],l[h]||{}):p[h]=l[h]),p),f),f}function d(l,g){return Object.keys(l).filter(p=>l[p]!=null).reduce((p,h)=>{if(g.has(h)){const w=g.get(h);if(typeof w=="string")p[w]=l[h];else{const T=w(h,l[h],l);Object.assign(p,T)}}else p[h]=l[h];return p},{})}function c(l,g,f=new Map){const p=a(l,g);return d(p,f)}function u(l){var f;const g=l.type;if(g){const p=n[g];if(!p)return l;const h=a(l,p),w=((f=l.editor)==null?void 0:f.type)||"";if(w){const T=n[w],M=a(l.editor,T);h.editor=M}return h}return l}function m(l){t=l}return{getSchemaByType:s,resolveSchemaWithDefaultValue:u,resolveSchemaToProps:c,mappingSchemaToProps:d,setDesignerContext:m}}const Rt={},qt={},{getSchemaByType:Jo,resolveSchemaWithDefaultValue:an,resolveSchemaToProps:sn,mappingSchemaToProps:ln,setDesignerContext:Ko}=Ot(Rt,qt);function cn(n={}){function e(u,m,l,g){if(typeof l=="number")return g[u].length===l;if(typeof l=="object"){const f=Object.keys(l)[0],p=l[f];if(f==="not")return Number(g[u].length)!==Number(p);if(f==="moreThan")return Number(g[u].length)>=Number(p);if(f==="lessThan")return Number(g[u].length)<=Number(p)}return!1}function t(u,m,l,g){return g[u]&&g[u].propertyValue&&String(g[u].propertyValue.value)===String(l)}const o=new Map([["length",e],["getProperty",t]]);Object.keys(n).reduce((u,m)=>(u.set(m,n[m]),u),o);function i(u,m){const l=u;return typeof m=="number"?[{target:l,operator:"length",param:null,value:Number(m)}]:typeof m=="boolean"?[{target:l,operator:"getProperty",param:u,value:!!m}]:typeof m=="object"?Object.keys(m).map(g=>{if(g==="length")return{target:l,operator:"length",param:null,value:m[g]};const f=g,p=m[g];return{target:l,operator:"getProperty",param:f,value:p}}):[]}function s(u){return Object.keys(u).reduce((l,g)=>{const f=i(g,u[g]);return l.push(...f),l},[])}function a(u,m){if(o.has(u.operator)){const l=o.get(u.operator);return l&&l(u.target,u.param,u.value,m)||!1}return!1}function d(u,m){return s(u).reduce((f,p)=>f&&a(p,m),!0)}function c(u,m){const l=Object.keys(u),g=l.includes("allOf"),f=l.includes("anyOf"),p=g||f,T=(p?u[p?g?"allOf":"anyOf":"allOf"]:[u]).map($=>d($,m));return g?!T.includes(!1):T.includes(!0)}return{parseValueSchema:c}}const un={convertTo:(n,e,t,o)=>{n.appearance||(n.appearance={}),n.appearance[e]=t},convertFrom:(n,e,t)=>n.appearance?n.appearance[e]:n[e]},dn={convertFrom:(n,e,t)=>n.buttons&&n.buttons.length?`共 ${n.buttons.length} 项`:"无"},fn={convertTo:(n,e,t,o)=>{n.editor&&(n.editor[e]=t)},convertFrom:(n,e,t)=>n.editor&&Object.prototype.hasOwnProperty.call(n.editor,e)?n.editor[e]:n[e]},I={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:"多语输入框"}},pn={convertFrom:(n,e,t)=>{var i;const o=n.editor&&n.editor[e]?n.editor[e]:n[e];return((i=I[o])==null?void 0:i.name)||o}},mn={convertTo:(n,e,t,o)=>{n[e]=n[e]},convertFrom:(n,e,t)=>n.editor?t.getRealEditorType(n.editor.type):""},gn={convertTo:(n,e,t,o)=>{(n.type==="data-grid-column"||n.type==="tree-grid-column")&&(n.formatter?n.formatter[e]=t:n.formatter={[e]:t})},convertFrom:(n,e,t)=>{if(n.formatter){if(e==="trueText")return n.formatter.trueText;if(e==="falseText")return n.formatter.falseText;if(e==="prefix")return n.formatter.prefix;if(e==="suffix")return n.formatter.suffix;if(e==="precision")return n.formatter.precision;if(e==="decimal")return n.formatter.decimal;if(e==="thousand")return n.formatter.thousand;if(e==="tempDateFormat")return n.formatter.dateFormat==="yyyy年MM月dd日"?"yearMonthDay":n.formatter.dateFormat==="yyyy-MM-dd HH:mm:ss"?"yyyy-MM-ddTHH:mm:ss":n.formatter.dateFormat==="yyyy/MM/dd HH:mm:ss"?"yyyy/MM/ddTHH:mm:ss":n.formatter.dateFormat==="yyyy年MM月dd日 HH时mm分ss秒"?"yearMonthDayHourMinuteSecond":n.formatter.tempDateFormat||n.formatter.dateFormat||"yyyy-MM-dd";if(e==="customFormat")return n.formatter.customFormat;if(e==="type")return n.formatter.type||"none"}return"none"}},hn={convertTo:(n,e,t,o)=>{n.command?n.command[e]=t:n.command={[e]:t},e==="enable"&&t&&(n.command.commands||(n.command.commands=[{text:"编辑",type:"primary",command:"edit"},{text:"删除",type:"danger",command:"remove"}]))},convertFrom:(n,e,t)=>n.command&&e==="enable"?n.command.enable:""},vn={convertTo:(n,e,t,o)=>{n.column?n.column[e]=t:n.column={[e]:t},e==="fitColumns"&&t&&(n.column.fitMode||(n.column.fitMode="average"))},convertFrom:(n,e,t)=>{if(n.column){if(e==="fitColumns")return n.column.fitColumns;if(e==="fitMode")return n.column.fitMode}return""}},yn={convertTo:(n,e,t,o)=>{n.summary?n.summary[e]=t:n.summary={[e]:t},e==="enable"&&t&&(n.summary?n.summary.groupFields||(n.summary.groupFields=[]):n.summary={enable:t,groupFields:[]})},convertFrom:(n,e,t)=>n.summary&&e==="enable"?n.summary.enable:n.type==="data-grid-column"?n.enableSummary===void 0?!1:n.enableSummary:""},bn={convertTo:(n,e,t,o)=>{n.group?n.group[e]=t:n.group={[e]:t},e==="enable"&&t&&(n.group?n.group.groupFields||(n.group.groupFields=[]):n.group={enable:t,groupFields:[],showSummary:!1})},convertFrom:(n,e,t)=>{if(n.group){if(e==="enable")return n.group.enable;if(e==="showSummary")return n.group.showSummary}}},Cn={convertFrom:(n,e)=>n.binding?n.binding.path:"",convertTo:(n,e,t)=>{if(t&&t.length>0){const o=t[0];n.binding||(n.binding={}),n.binding.type="Form",n.binding.path=o.bindingField,n.binding.field=o.id,n.binding.fullPath=o.path,n.path=o.bindingPath}}},wn={convertTo:(n,e,t,o)=>{n.pagination||(n.pagination={}),n.pagination[e]=t},convertFrom:(n,e,t)=>n.pagination?n.pagination[e]:n[e]},xn={convertTo:(n,e,t,o)=>{n.rowNumber||(n.rowNumber={}),n.rowNumber[e]=t},convertFrom:(n,e,t)=>n.rowNumber?n.rowNumber[e]:n[e]},Sn={convertTo:(n,e,t,o)=>{n.selection||(n.selection={}),n.selection[e]=t},convertFrom:(n,e,t)=>n.selection?n.selection[e]:n[e]},An={convertFrom:(n,e,t)=>n[e]&&n[e].length?`共 ${n[e].length} 项`:""},Tn={convertFrom:(n,e)=>n[e]||"",convertTo:(n,e,t)=>{n[e]=t}},Fn={convertTo:(n,e,t,o)=>{n.size||(n.size={}),n.size[e]=t},convertFrom:(n,e,t)=>n.size?n.size[e]:n[e]},Mn={convertFrom:(n,e,t)=>{var o,i;return(o=n.formatter)!=null&&o.data&&e==="formatterEnumData"&&!n.formatterEnumData?(i=n.formatter)==null?void 0:i.data:n.formatterEnumData}},En={convertTo:(n,e,t,o)=>{n.sort||(n.sort={}),n.sort[e]=t},convertFrom:(n,e,t)=>{var o,i;if(e==="mode")return((o=n.sort)==null?void 0:o.mode)||"client";if(e==="multiSort")return!!((i=n.sort)!=null&&i.multiSort)}},jn={convertTo:(n,e,t,o)=>{n.filter||(n.filter={}),n.filter[e]=t},convertFrom:(n,e,t)=>{var o;if(e==="mode")return((o=n.filter)==null?void 0:o.mode)||"client"}},Nn={convertTo:(n,e,t,o)=>{n.rowOption?n.rowOption[e]=t:n.rowOption={[e]:t}},convertFrom:(n,e,t)=>{if(n.rowOption){if(e==="customRowStyle")return n.rowOption.customRowStyle;if(e==="customCellStyle")return n.rowOption.customCellStyle}return""}};function $t(n,e,t){const o=new Map([["/converter/appearance.converter",un],["/converter/buttons.converter",dn],["/converter/property-editor.converter",fn],["/converter/items-count.converter",An],["/converter/type.converter",pn],["/converter/change-editor.converter",mn],["/converter/change-formatter.converter",gn],["/converter/column-command.converter",hn],["/converter/column-option.converter",vn],["/converter/summary.converter",yn],["/converter/group.converter",bn],["/converter/form-group-label.converter",Tn],["/converter/field-selector.converter",Cn],["/converter/pagination.converter",wn],["/converter/row-number.converter",xn],["/converter/grid-selection.converter",Sn],["/converter/size.converter",Fn],["/converter/change-formatter-enum.converter",Mn],["/converter/grid-sort.converter",En],["/converter/grid-filter.converter",jn],["/converter/row-option.converter",Nn]]),i=new Map([["string",{type:"input-group",enableClear:!1}],["boolean",{type:"combo-list",textField:"name",valueField:"value",idField:"value",enableClear:!1,editable:!1,data:[{value:!0,name:"是"},{value:!1,name:"否"}]}],["enum",{type:"combo-list",maxHeight:128,enableClear:!1,editable:!1}],["array",{type:"button-edit"}],["number",{type:"number-spinner",placeholder:""}],["events-editor",{type:"events-editor",hide:!0}]]),s=cn();function a(p,h){return()=>s.parseValueSchema(p,h)}function d(p,h,w){return p.includes("visible")&&h.visible!==void 0?typeof h.visible=="boolean"?()=>!!h.visible:h.visible===void 0?!0:a(h.visible,w):()=>!0}function c(p,h,w){return p.includes("readonly")&&h.readonly!==void 0?typeof h.readonly=="boolean"?()=>!!h.readonly:a(h.readonly,w):()=>!1}function u(p,h){const w=p.$converter||h;return typeof w=="string"&&w&&o.has(w)?o.get(w)||null:w||null}function m(p,h,w,T,M,$="",S=""){return Object.keys(p).map(y=>{const F=r.ref(1),A=y,x=p[y],N=Object.keys(x),C=x.title,E=x.type,k=i.get(E)||{type:"input-group",enableClear:!1},V=x.editor?Object.assign({},k,x.editor):Object.assign({},k),R=d(N,x,h),U=c(N,x,h);V.readonly=V.readonly===void 0?U():V.readonly;const K=x.type==="cascade"?m(x.properties,h,w,T,M,$,S):[],P=!0;let B=u(x,S);const W=r.computed({get(){if(F.value){if(["class","style"].find(ce=>ce===A)&&!B&&(B=o.get("/converter/appearance.converter")||null),B&&B.convertFrom)return B.convertFrom(w,y,M,$);const re=w[y];return Object.prototype.hasOwnProperty.call(x,"defaultValue")&&(re===void 0||typeof re=="string"&&re==="")?x.type==="boolean"?x.defaultValue:x.defaultValue||"":re}return null},set(re){F.value+=1,B&&B.convertTo?(B.convertTo(T,y,re,M,$),B.convertTo(w,y,re,M,$)):(T[y]=re,w[y]=re)}}),{refreshPanelAfterChanged:D,description:ee,isExpand:he,parentPropertyID:ve}=x,_={propertyID:A,propertyName:C,propertyType:E,propertyValue:W,editor:V,visible:R,readonly:U,cascadeConfig:K,hideCascadeTitle:P,refreshPanelAfterChanged:D,description:ee,isExpand:he,parentPropertyID:ve};return h[A]=_,_})}function l(p,h,w={}){const T={},M=n[p];return M&&M.categories?Object.keys(M.categories).map(S=>{const v=M.categories[S],y=v==null?void 0:v.title,F=m(v.properties||{},T,{},w,h);return{categoryId:S,categoryName:y,properties:F}}):[]}function g(p,h,w,T,M=""){const $=h.$ref.schema,S=h.$ref.converter,v=w[$],y=v.type,F=t(v),A={},x=n[y];if(x&&x.categories){const N=x.categories[p],C=N==null?void 0:N.title;S&&Object.keys(N.properties).forEach(V=>{N.properties[V].$converter=S});const E=(N==null?void 0:N.properties)||{},k=m(E,A,F,v,T,M);return{categoryId:p,categoryName:C,properties:k}}return{categoryId:p,categoryName:"",properties:[]}}function f(p,h,w,T,M){const $=p.type,S=t(p),v={};let y=M||n[$];if(y&&Object.keys(y).length===0&&w&&w.getPropConfig&&(y=w.getPropConfig(T)),y&&y.categories){const F=[];return Object.keys(y.categories).map(A=>{const x=y.categories[A];if(x.$ref){F.push(g(A,x,p,h,T));return}const N=x==null?void 0:x.title,C=x==null?void 0:x.tabId,E=x==null?void 0:x.tabName,k=x==null?void 0:x.hide,V=x==null?void 0:x.hideTitle,R=m(x.properties||{},v,S,p,h,T,x.$converter),{setPropertyRelates:U}=x,K=x==null?void 0:x.parentPropertyID;F.push({categoryId:A,categoryName:N,tabId:C,tabName:E,hide:k,properties:R,hideTitle:V,setPropertyRelates:U,parentPropertyID:K})}),F}return[]}return{getPropertyConfigBySchema:f,getPropertyConfigByType:l,propertyConverterMap:o}}const Dt={},Ht={};$t(Dt,Ht,an);const Lt={},zt={},{getSchemaByType:er,resolveSchemaWithDefaultValue:Bn,resolveSchemaToProps:tr,mappingSchemaToProps:nr,setDesignerContext:or}=Ot(Lt,zt),Ut={},Wt={};$t(Ut,Wt,Bn);function Ze(n,e,t=new Map,o=(a,d,c,u)=>d,i={},s=a=>a){return Rt[e.title]=e,qt[e.title]=o,Dt[e.title]=i,Ht[e.title]=s,Lt[e.title]=e,zt[e.title]=o,Ut[e.title]=i,Wt[e.title]=s,(a={},d=!0)=>{if(!d)return ln(a,t);const c=sn(a,e,t),u=Object.keys(n).reduce((m,l)=>(m[l]=n[l].default,m),{});return Object.assign(u,c)}}function kn(n,e,t){return e}const Vn=new Map([["appearance",Ye.resolveAppearance]]),In={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/avatar.schema.json",title:"avatar",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for avatar",type:"string"},type:{description:"The type string of avatar",type:"string",default:"avatar"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disabled:{type:"boolean",default:!1},avatarWidth:{description:"",type:"number",default:100},avatarHeight:{description:"",type:"number",default:100},readonly:{description:"",type:"boolean",default:!1},cover:{description:"",type:"string",default:""},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"],ignore:["id","appearance","binding","visible"]},lt={avatarWidth:{type:Number,default:100},avatarHeight:{type:Number,default:100},cover:{type:String},readonly:{type:Boolean,default:!1},shape:{type:String,default:"circle"},maxSize:{type:Number,default:1},modelValue:{type:String,default:""},title:{type:String,default:""},imageType:{type:Array,default:["jpeg"]}},bt=Ze(lt,In,Vn,kn);function Gt(n,e,t,o){const i="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAwICQoJBwwKCQoNDAwOER0TERAQESMZGxUdKiUsKyklKCguNEI4LjE/MigoOk46P0RHSktKLTdRV1FIVkJJSkf/2wBDAQwNDREPESITEyJHMCgwR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAEsASwDASIAAhEBAxEB/8QAGgABAQEBAQEBAAAAAAAAAAAAAAECAwQFB//EADMQAQEAAQEECAQGAgMBAAAAAAABAhEDITFBBBRRUmFxgaESkcHwEyIysdHhM3IjQvE0/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAXEQEBAQEAAAAAAAAAAAAAAAAAEQEh/9oADAMBAAIRAxEAPwD9BBYqCiyAGhougIqyGgEhIui6AyuixdATQ0WQA0BdA4houhoCaGgugMrouhoCaJoum80BNDRdDQGTRbEBNCxdDQGTRUBE0asQGRTQGTT71WxNPP5AugqyACyAC6dpIsgGgshoBISKAiroQDQ0OSyAgoBoaABoaABomigJTRQGV0XRATRGizUGRSwGdEsaqAljLQDOiNWJQZNJ4KffEFIRYAsFkAkFkAJFFkAkNCLIAAAC6AguhoCCl3TW2TzugIHx4S788Z6wmWN4ZY3ysoA1pu+qAgpYCAAaIoDIoCaJZvVAQ03LUBlGqWAzYmimn3vAaRYA1IkWASKKACgirIgAsgBoBdJNbZNN9t3aeIHNw2vSccbZhPxLN27dJ68/Rx222u1/LjbNn8vi/ieHPm58N03SKN5bfa58c7jOzHd78XOyXfd98bqoCaScp8jSdk+SgLjlljdccssfK12w6TlN2cmXjN1/iuAD34Z47Sa43XTjLus82nz5bjl8WNss4WPXsNtNpNLuzk3zlZ2wHUsBBF5CAFgAhouiUGRUBErSAyffFamgKqKCqkUBYcgBpADiuhoAKeYA8fStp8WX4WPCfq8b2eT1bXObPZZZ8bJrJ23lHz5rpvutu+3tvOqAAAAAAAACy3HKZY3Sy6yoA+hs85tMJlN2vGdlaeTomem0+C/9pu849SAKlARQERrkgJUWoCUVKDIqb/ugqxFBVRQFFBFABRAUAHn6bl+XDGc7bfT/ANeV26XddvJ2Yz3tcVAAAAAAAAAAFxy+HKZTjLq+l+z5j6Gzuuywt54z9jRoEQAARSoCCoCIqAIJQaCLzBZxCAKC8wIAChOIAADxdL/+i/6z6uTt0yabfXtxnta4qAAAAAAAAAAD37H/AAbP/WPBwfQ2c02WE7MYaNAIIoAhzCggHMEqaNIDNPviHoAsRqcAFSKC8iIoHNUAUAAAHl6ZPzbPLtln1ed7el467DXu2X0+68SgAAAAAAAAABpru7bo+npy7Po8HR8fi2+M46XW+Ue4ABAAAQAQUvAEvBL6BQS8U3feqpv7fcFnBUUBUUBScQFRUBQAAATKTLG43nLL6vnaWWy8ZdL5x9J4ulY/DtrZwymvrzUcgAAAAAAAANdwPT0LH9Wd8MZ+9elnY4fh7HHG8prfOtIAABQAQAKi1AE5KlBD09hPl7gKjUAVFBeYTiAqKgKAAAA5dKw+PY2ya5Y/mn19nVQfMG9th+HtbjOF3zyrCgAAAAAA6dHw+PbSWfln5r6Ob29Gw+DZS2fmy33y5T6g7cbreaAgAAAAgqAcgqfIBOapQSnr7lPS/IEaScAFVFgKIoKioCgAABgADj0nZ/HstZvyx3zxnN4+T6b52ePw7TLGcJbIoyAAAAADex2f4m1mN1+Gb75Tl9H0PbweboeOmGWXO3T0n/r0AAIAAAACKgHJFpyBEpyARFT74gKnNQVeaRQF5IoKTiigCKAAACZWY4/FlZMZxt3SAvnuna+dnlM8885wyts8nXb9I/Elw2e7G7rleN8J4ePNxUAAAAAAeroeUuFx7LrPKvQ+djlcMpljdLHs2W3x2k0/Tl2W8fLtB1C8ewQAAEUBDmt4oBeJeCAIUARFvBN3gByVAFUIChzWcAOSpGdpnjs5rnlMdeHbfKcwb58x5c+l23TZ7P1y3e0+rldvtcuO0snZjJFHvtmM1ysnjbpHHLpOyx3TK5eGM1eKyW63W3tt1UHfPpeV3YYTGduW+/JwyuWd1zyuVnDXhPKcgAAAAAAAAAAB0w2+0w3TKZTsy3+7tj0vG/rxyxvbN8eUB9DDa7PP9OeNvZrpfdu8OD5mkvGNY55Y/pzyx8ruIPePJj0nazj8OU8ZpfZ1w6Ts8rJlrhfHfPmg7FKgAF4AgVARPW/NanoAsZaBVlZUFVF4g57fbfhY7pLld0l/e+EeO23K5ZW5ZXjb97o1tcvj22WXHS/DPKMqAAAAAAAAAAAAAAAAAAAAAAOux212d0ttwvGdnjHr3ceMfPevo2XxbLTu3T0B1TmHJAZVOYF4p98xPviBFScQGlRZxBdS3TG3slvsibS/8WX+t/YHhx/TPGaqk4TyVQAAAAAAAAAAAAAAAAAAAAAAd+iX82c7ZL9/Nwdui/5b/rfoD00vARAQqAhfvcVNfL3A1WMqDSxmVQVNr/iz4/pv7LDOXLDLGcbNPDeDxTh6DtOjZaafFju816tlf+2Puo4Dv1bPvY+51bLvY+5RwHfq2Xex9zquXex9yjgO/Vcu9j7nVc+9j7lHAd+q597H3Oq597H3BwHfqufex9zqufex9yjgO/Vc+9j7nVc+9j7lHAd+q597H3Oq597H3KOA79Vz72PudVz72PuUcB36rl3sfc6rn3sfco4DvejZd7H3OrZd7H3KOA79Wy72PudWz72PuDg7dG/y3/W/Q6tl3sfdvY7K7PO25S6yzSdoOqWlEBmhaBamt+6J6AnmqaqDQy0CxYyoNCKC6m/VAGhPJdQBOSgKi6+QGu41QBRAF1LUABbUABNdAVOYUC0tE13gIWloCcTXeloFQLQTmffMtT74gixOa6gqysrzBVSVQVdWdQGpRNV1BV10SUlBYIvIF1E1Ne0F5iAKIAohaCmqWgBaapqC2ohqC6pqWoC2paa70tAqCACACa+F+RanyAWJ/a8vkAuqT6fVf7AVOz0X+AXVYh2egNSifx9T+wVWefyX+PqCyrqn807PQFEn0+p/YKH9H37gAc/kC6onL0P5BRP6OV8vqC2of2l/gAOSAuqan9J/AKmon9AUtL9PqnP1oCWl5ehfv5gh635nP1qWg//Z",s=r.ref(n.readonly);function a(f){return f.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/)!=null}function d(f){return f.indexOf("data:image/")>-1}function c(f){return f?"data:image/jpeg;base64,"+f:""}const u=r.computed(()=>{var p;if(!n.imageType||!n.imageType.length)return"";const f=(p=n.imageType)==null?void 0:p.map(h=>(h==="jpg"&&(h="jpeg"),`image/${h}`));return!f||!f.length?"image/*":f.join(",")}),m=r.computed(()=>{const f=o.value||n.cover||i;return a(f)||d(f)?f:c(f)}),l=r.computed(()=>s.value?"":n.title);function g(){s.value||t&&t.value&&t.value.click()}return{acceptTypes:u,imageSource:m,imageTitle:l,onClickImage:g}}const Je=r.defineComponent({name:"FAvatar",props:lt,emits:["change","update:modelValue"],setup(n,e){at.useI18n();const t=r.computed(()=>({"f-avatar":!0,"f-avatar-readonly":n.readonly,"f-avatar-circle":n.shape==="circle","f-avatar-square":n.shape==="square"})),o=r.ref(n.modelValue),i=r.computed(()=>({width:n.avatarWidth+"px",height:n.avatarHeight+"px"})),s=!1;function a(){return""}function d(){}const c=r.ref(null),{acceptTypes:u,imageSource:m,onClickImage:l}=Gt(n,e,c,o);return()=>r.createVNode("div",{class:t.value,style:i.value,onClick:l},[s,r.createVNode("img",{title:n.title,class:"f-avatar-image",src:m.value,onError:a},null),!n.readonly&&r.createVNode("div",{class:"f-avatar-icon"},[r.createVNode("span",{class:"f-icon f-icon-camera"},null)]),r.createVNode("input",{ref:"file",name:"file-input",type:"file",class:"f-avatar-upload",accept:u.value,onChange:d,style:"display: none;"},null)])}}),Pn=r.ref(0);function On(){Pn.value++}const ct=r.ref(0);function Rn(n){const{formSchemaUtils:e,formStateMachineUtils:t}=n;function o(c,u=""){return{path:u+c.code,field:c.id,fullPath:c.code}}function i(c,u=""){return e.getViewModelById(c).states.map(l=>o(l,u))}function s(c){const u=e.getRootViewModelId(),m=i(c);if(c===u)return m;const l=i(u,"root-component.");return[...m,...l]}function a(c){return c.binding&&c.binding.path||c.id||""}function d(){return t&&t.getRenderStates()||[]}return{getVariables:s,getControlName:a,getStateMachines:d}}class Qt{constructor(e){G(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'"}]);G(this,"expressionNames",{compute:"计算表达式",dependency:"依赖表达式",validate:"验证表达式",dataPicking:"帮助前表达式",visible:"可见表达式",readonly:"只读表达式",required:"必填表达式"});G(this,"getExpressionConverter",(e,t)=>({convertFrom:(o,i,s,a)=>{const d=s.getExpressionRuleValue(e,t||i);return d&&d.value||""},convertTo:(o,i,s,a,d)=>{var c;if(i==="dataPicking"&&(s!=null&&s.target)){const u=`${s.target}_dataPicking`;((c=s.rules)==null?void 0:c.some(l=>l.id===u&&l.value))?o.dictPickingExpressionId=u:delete o.dictPickingExpressionId}a.updateExpression(s)}}));this.formSchemaService=e}getExpressionRule(e,t){const o=this.formSchemaService.getExpressions();if(!o)return"";const i=o.find(a=>a.target===e);if(!i)return"";const s=i.rules.find(a=>a.type===t);return s||""}getContextFormVariables(){const{module:e}=this.formSchemaService.getFormSchema();if(!e.viewmodels||e.viewmodels.length===0)return[];const t=this.formSchemaService.getRootViewModelId(),o=this.formSchemaService.getViewModelById(t);if(!o||!o.states||o.states.length===0)return[];const i=[];return o.states.forEach(s=>{i.push({key:s.code,name:s.name,description:s.name,category:s.category})}),i}createTreeNode(e,t,o="label"){return{id:e.id,name:e.name,bindingPath:e[o],parents:t,type:"field"}}buildEntityFieldsTreeData(e=null,t){const o=[];return e==null||e.forEach(i=>{var d;const s=this.createTreeNode(i,t);let a=[];(d=i.type)!=null&&d.fields&&(a=this.buildEntityFieldsTreeData(i.type.fields,[...t,i.label])),o.push({data:s,children:a,expanded:!0})}),o}buildChildEntityTreeData(e=null,t){const o=[];return e==null||e.forEach(i=>{var c,u;const s=this.createTreeNode(i,t);s.type="entity";const a=this.buildEntityFieldsTreeData((c=i.type)==null?void 0:c.fields,[...t,i.label]),d=this.buildChildEntityTreeData((u=i.type)==null?void 0:u.entities,[...t,i.label]);d!=null&&d.length&&(a==null||a.push(...d)),o.push({data:s,children:a||[],expanded:!0})}),o}getEntitiesTreeData(){const e=this.formSchemaService.getSchemaEntities();if(!(e!=null&&e.length))return[];const t=e[0];if(!(t!=null&&t.type))return[];const o=this.buildEntityFieldsTreeData(t.type.fields,[t.code]),i=this.buildChildEntityTreeData(t.type.entities,[t.code]);return i!=null&&i.length&&(o==null||o.push(...i)),{entityCode:t.code,fields:[{data:this.createTreeNode(t,[],"code"),children:o||[]}]}}getEntitiesAndVariables(){return{entities:this.getEntitiesTreeData(),variables:{session:{name:"系统变量",items:this.sessionVariables,visible:!1},forms:{name:"表单变量",items:this.getContextFormVariables(),visible:!0}}}}onBeforeOpenExpression(e,t,o){const i=o==="Field"?e.binding.field:e.id,s=this.getExpressionRule(i,t),a=this.getEntitiesAndVariables(),d={message:["validate","required","dataPicking"].includes(t)&&s?s.message:"",...a};return s.messageType!=null&&(d.messageType=s.messageType),d}buildRule(e,t,o,i){const{expression:s,message:a,messageType:d}=t,c={id:`${e}_${o}`,type:o,value:s};return(o==="validate"||o==="dataPicking"||o==="required")&&(c.message=a),o==="dataPicking"&&(c.messageType=d),o==="validate"&&i&&(c.elementId=i),c}getExpressionData(){const{expressions:e}=this.formSchemaService.getFormSchema().module;return e||[]}updateExpression(e,t,o,i){const s=t==="Field"?e.binding.field:e.id,a=this.buildRule(s,o,i,e.type==="form-group"?e.id:"");let c=this.getExpressionData().find(m=>m.targetType===t&&m.target===s);const u=m=>m.value.trim()==="";if(c){const m=c.rules.find(l=>l.id===a.id);if(m)u(a)?c.rules=c.rules.filter(l=>l.id!==a.id):(Object.assign(m,a),i==="validate"&&e.type==="form-group"&&(m.elementId=e.id));else{if(u(a))return null;c.rules=c.rules||[],c.rules.push(a)}}else{if(u(a))return null;c={target:`${s}`,rules:[a],targetType:t}}return c}getExpressionEditorOptions(e,t,o,i){return o.reduce((s,a)=>{var c,u;const d=t==="Field"?(c=e==null?void 0:e.binding)==null?void 0:c.field:e.id;return s[a]={hide:t==="Field"?!!((u=e==null?void 0:e.binding)!=null&&u.field):!1,description:"",title:this.expressionNames[a],type:"string",$converter:this.getExpressionConverter(d),refreshPanelAfterChanged:!0,editor:{type:"expression-editor",singleExpand:!1,dialogTitle:`${this.expressionNames[a]}编辑器`,showMessage:a==="validate"||a==="dataPicking"||a==="required",showMessageType:a==="dataPicking",beforeOpen:()=>this.onBeforeOpenExpression(e,a,t),onSubmitModal:m=>{const l=this.updateExpression(e,t,m,a);if(i){const g=this.buildRule(d,m,a);i(g)}return l}}},s},{})}getExpressionInfo(e,t,o){const i=t==="Field"?e.binding.field:e.id,s=this.getExpressionRule(i,o),a={value:s&&s.value,targetId:i,targetType:t,expressionType:o};return s&&s.message&&(a.message=s.message),a}getExpressionConfig(e,t,o=["compute","dependency","validate"],i){return{description:"表达式",title:"表达式",hide:!e.binding,properties:{...this.getExpressionEditorOptions(e,t,o,i)}}}getExpressionOptions(e,t,o){const i=this.getExpressionInfo(e,t,o);return{dialogTitle:`${this.expressionNames[o]}编辑器`,singleExpand:!1,showMessage:o==="required",beforeOpen:()=>this.onBeforeOpenExpression(e,o,t),expressionInfo:i}}}class qn{constructor(e,t){G(this,"componentId");G(this,"viewModelId");G(this,"eventsEditorUtils");G(this,"formSchemaUtils");G(this,"formMetadataConverter");G(this,"designViewModelUtils");G(this,"designViewModelField");G(this,"controlCreatorUtils");G(this,"designerHostService");G(this,"designerContext");G(this,"schemaService",null);G(this,"metadataService",null);G(this,"propertyConfig",{type:"object",categories:{}});var o;this.componentId=e,this.designerHostService=t,this.eventsEditorUtils=t.eventsEditorUtils,this.formSchemaUtils=t.formSchemaUtils,this.formMetadataConverter=t.formMetadataConverter,this.viewModelId=((o=this.formSchemaUtils)==null?void 0:o.getViewModelIdByComponentId(e))||"",this.designViewModelUtils=t.designViewModelUtils,this.controlCreatorUtils=t.controlCreatorUtils,this.metadataService=t.metadataService,this.schemaService=t.schemaService,this.designerContext=t.designerContext}getFormDesignerInstance(){var e,t;return(t=(e=this.designerContext)==null?void 0:e.instances)==null?void 0:t.formDesigner.value}getTableInfo(){var e;return(e=this.schemaService)==null?void 0:e.getTableInfoByViewModelId(this.viewModelId)}setDesignViewModelField(e){var o;const t=e.binding&&e.binding.type==="Form"&&e.binding.field;if(t){if(!this.designViewModelField){const i=this.designViewModelUtils.getDgViewModel(this.viewModelId);this.designViewModelField=i.fields.find(s=>s.id===t)}e.updateOn=(o=this.designViewModelField)==null?void 0:o.updateOn}}getBasicPropConfig(e){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:e.type,name:I[e.type]&&I[e.type].name}]}}}}}getAppearanceConfig(e=null,t={},o){const i={title:"外观",description:"Appearance"},s={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 a in t)s[a]=Object.assign(s[a]||{},t[a]);return{...i,properties:{...s},setPropertyRelates(a,d){if(a){switch(a&&a.propertyID){case"class":case"style":{ct.value++;break}}o&&o(a,e,d)}}}}getPropertyEditorParams(e,t=[],o="visible",i={},s={}){const{getVariables:a,getControlName:d,getStateMachines:c}=Rn(this.designerHostService),u=this.getRealTargetType(e),m=t&&t.length>0?t:["Const","Variable","StateMachine","Expression"],l={type:"property-editor",propertyTypes:m};return m.map(g=>{switch(g){case"Const":Object.assign(l,{constType:"enum",constEnums:[{id:!0,name:"是"},{id:!1,name:"否"}]},i);break;case"Expression":l.expressionConfig=this.getExpressionOptions(e,u,o);break;case"StateMachine":l.stateMachines=c();break;case"Variable":Object.assign(l,{controlName:d(e),newVariablePrefix:"is",newVariableType:"Boolean",variables:a(this.viewModelId),onBeforeOpenVariables:f=>{f.value=a(this.viewModelId)}},s);break}}),l}getVisibleProperty(e,t=""){var s;let o=["Const","Variable","StateMachine","Expression"];return t==="gridFieldEditor"?o=["Const","Expression"]:t==="form-group"&&!((s=e.binding)!=null&&s.field)&&(o=["Const","Variable","StateMachine"]),{visible:{title:"是否可见",type:"boolean",description:"运行时组件是否可见",editor:this.getPropertyEditorParams(e,o,"visible")}}}getBehaviorConfig(e,t="",o={},i){const s={title:"行为",description:""},a=this.getVisibleProperty(e,t);for(const c in o)a[c]=Object.assign(a[c]||{},o[c]);const d=this;return{...s,properties:{...a},setPropertyRelates(c,u){if(c){switch(c.propertyID){case"disabled":case"readonly":case"visible":d.afterMutilEditorChanged(e,c);break}i&&i(c,u)}}}}afterMutilEditorChanged(e,t){this.addNewVariableToViewModel(t,this.viewModelId),this.updateExpressionValue(t),this.clearExpression(t,e)}updateElementByParentContainer(e,t){const o=t&&t.parent&&t.parent.schema;if(!o)return;const i=o.contents.findIndex(a=>a.id===e),s=ie.cloneDeep(o.contents[i]);o.contents.splice(i,1),o.contents.splice(i,0,s),On()}addNewVariableToViewModel(e,t){const o=e.propertyValue;if(!(o&&typeof o=="object")||!(o.type==="Variable"&&o.isNewVariable))return;const a={id:o.field,category:"locale",code:o.fullPath,name:o.fullPath,type:o.newVariableType||"String"};delete o.newVariableType,delete o.isNewVariable,this.formSchemaUtils.getVariableByCode(a.code)||this.formSchemaUtils.getViewModelById(t).states.push(a)}updateExpressionValue(e){const t=e.propertyValue;if(!((t&&t.type)==="Expression"&&t.expressionInfo))return;const{expressionId:s,expressionInfo:a}=t,{targetId:d,targetType:c,expressionType:u,value:m,message:l}=a,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:c},f.push(p));const h=p.rules.find(w=>w.type===u);if(h)h.value=m,h.message=l;else{const w={id:s,type:u,value:m,message:l};p.rules.push(w)}delete t.expressionInfo}clearExpression(e,t){const o=e.propertyValue;if(o&&o.type==="Expression")return;const s=e.propertyID,a=this.formSchemaUtils.getExpressions(),d=t.binding?t.binding.field:t.id,c=a.find(u=>u.target===d);!c||!c.rules||(c.rules=c.rules.filter(u=>u.type!==s))}getExpressionOptions(e,t,o){return new Qt(this.formSchemaUtils).getExpressionOptions(e,t,o)}getRealTargetType(e){return["response-toolbar-item","tab-toolbar-item","section-toolbar-item"].indexOf(e.type)>-1?"Button":e.binding&&e.binding.field?"Field":"Container"}createBaseEventProperty(e){const t={};return t[this.viewModelId]={type:"events-editor",editor:{initialData:e,viewSourceHandle:o=>{var i;((i=o.controller)==null?void 0:i.label.indexOf(this.formSchemaUtils.getModule().code))>-1&&this.eventsEditorUtils.jumpToMethod(o)}}},t}}const Qe=class Qe{static getEditorTypesByMDataType(e,t=!1,o=""){if(t)return[{key:I["language-textbox"].type,value:I["language-textbox"].name}];let i=Qe.fieldControlTypeMapping[e];if(o==="data-grid-column"&&(i!=null&&i.length)){const s=[I["check-group"].type,I["radio-group"].type];i=i.filter(a=>!s.includes(a.key))}return i}static getAllInputTypes(){const e=[];for(const t in Qe.fieldControlTypeMapping)Qe.fieldControlTypeMapping[t].forEach(o=>{e.find(i=>i.key===o.key&&i.value===o.value)||e.push({key:o.key,value:o.value})});return e}static mappingDomPropAndSchemaProp(e,t){var s;const o=(s=e.editor)==null?void 0:s.type,i=[];return(e.type===I["data-grid-column"].type||e.type===I["tree-grid-column"].type)&&t&&t.categoryId&&t.categoryId.indexOf("gridFieldEditor")<0&&i.push({domField:"title",schemaField:"name"}),i.push({domField:"label",schemaField:"name"}),i.push({domField:"editor.required",schemaField:"require"}),i.push({domField:"editor.readonly",schemaField:"readonly"}),(o===I["input-group"].type||o===I.textarea.type||o===I["number-spinner"].type)&&i.push({domField:"editor.maxLength",schemaField:"type.length"}),o===I["number-spinner"].type&&i.push({domField:"editor.precision",schemaField:"type.precision"}),(e.type===I["data-grid-column"].type||e.type===I["tree-grid-column"].type)&&i.push({domField:"formatter.precision",schemaField:"type.precision"}),(o===I["combo-list"].type||o===I["radio-group"].type)&&i.push({domField:"editor.data",schemaField:"type.enumValues"}),(e.type===I["data-grid-column"].type||e.type===I["tree-grid-column"].type)&&i.push({domField:"formatter.data",schemaField:"type.enumValues"}),o===I["date-picker"].type&&(i.push({domField:"editor.displayFormat",schemaField:"editor.format"}),i.push({domField:"editor.fieldType",schemaField:"type.name"})),o===I["number-spinner"].type&&(i.push({domField:"editor.max",schemaField:"editor.maxValue"}),i.push({domField:"editor.min",schemaField:"editor.minValue"})),o===I.lookup.type&&(i.push({domField:"editor.dataSource",schemaField:"editor.dataSource"}),i.push({domField:"editor.valueField",schemaField:"editor.valueField"}),i.push({domField:"editor.textField",schemaField:"editor.textField"}),i.push({domField:"editor.displayType",schemaField:"editor.displayType"}),i.push({domField:"editor.mapFields",schemaField:"editor.mapFields"}),i.push({domField:"editor.helpId",schemaField:"editor.helpId"})),i.push({domField:"path",schemaField:"bindingPath"}),i.push({domField:"binding.path",schemaField:"bindingField"}),i.push({domField:"binding.fullPath",schemaField:"path"}),(e.type===I["data-grid-column"].type||e.type===I["tree-grid-column"].type)&&i.push({domField:"field",schemaField:"bindingPath"}),i}};G(Qe,"fieldControlTypeMapping",{String:[{key:I["input-group"].type,value:I["input-group"].name},{key:I.lookup.type,value:I.lookup.name},{key:I["date-picker"].type,value:I["date-picker"].name},{key:I.switch.type,value:I.switch.name},{key:I["check-box"].type,value:I["check-box"].name},{key:I["check-group"].type,value:I["check-group"].name},{key:I["radio-group"].type,value:I["radio-group"].name},{key:I["combo-list"].type,value:I["combo-list"].name},{key:I.textarea.type,value:I.textarea.name},{key:I["time-picker"].type,value:I["time-picker"].name}],Text:[{key:I.textarea.type,value:I.textarea.name},{key:I.lookup.type,value:I.lookup.name}],Decimal:[{key:I["number-spinner"].type,value:I["number-spinner"].name}],Integer:[{key:I["number-spinner"].type,value:I["number-spinner"].name}],Number:[{key:I["number-spinner"].type,value:I["number-spinner"].name},{key:I.switch.type,value:I.switch.name},{key:I["check-box"].type,value:I["check-box"].name}],BigNumber:[{key:I["number-spinner"].type,value:I["number-spinner"].name}],Date:[{key:I["date-picker"].type,value:I["date-picker"].name}],DateTime:[{key:I["date-picker"].type,value:I["date-picker"].name}],Boolean:[{key:I.switch.type,value:I.switch.name},{key:I["check-box"].type,value:I["check-box"].name}],Enum:[{key:I["combo-list"].type,value:I["combo-list"].name},{key:I["radio-group"].type,value:I["radio-group"].name}],Object:[{key:I.lookup.type,value:I.lookup.name},{key:I["combo-list"].type,value:I["combo-list"].name},{key:I["radio-group"].type,value:I["radio-group"].name}]});let ut=Qe;var dt=(n=>(n.Form="Form",n.Variable="Variable",n))(dt||{});class $n{constructor(){G(this,"label","");G(this,"id","");G(this,"columnInSM",12);G(this,"columnInMD",6);G(this,"columnInLG",3);G(this,"columnInEL",2);G(this,"displayWidthInSM",1);G(this,"displayWidthInMD",1);G(this,"displayWidthInLG",1);G(this,"displayWidthInEL",1);G(this,"displayColumnCountAtBreakPoint","md");G(this,"tagRow",0);G(this,"showTopBorder",0);G(this,"group",1);G(this,"isSupportedClass",!0);G(this,"fieldSetId","")}}function Dn(n){let e,t;const o=new Map;let i=[];function s(m,l){const f=m.split(" ").filter(M=>M.startsWith("col-"));if(f.length===0){l.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",l.columnInSM=parseInt(p.replace("col-",""),10),l.displayWidthInSM=l.columnInSM/12,l.displayWidthInSM!==1&&(l.isSupportedClass=!1),h=h||"col-md-"+l.columnInSM,l.columnInMD=parseInt(h.replace("col-md-",""),10),l.displayWidthInMD=l.columnInMD/6,[1,2].includes(l.displayWidthInMD)||(l.isSupportedClass=!1),w=w||"col-xl-"+l.columnInMD,l.columnInLG=parseInt(w.replace("col-xl-",""),10),l.displayWidthInLG=l.columnInLG/3,[1,2,3,4].includes(l.displayWidthInLG)||(l.isSupportedClass=!1),T=T||"col-el-"+l.columnInLG,l.columnInEL=parseInt(T.replace("col-el-",""),10),l.displayWidthInEL=l.columnInEL/2,[1,2,3,4,5,6].includes(l.displayWidthInEL)||(l.isSupportedClass=!1)}function a(m,l,g,f=!1){let p=!1;m.contents.forEach(h=>{if(h.type==="fieldset"){g+=1,a(h,l,g,!0),p=!0;return}p&&(g+=1,p=!1);const w=h.appearance&&h.appearance.class,T=new $n;w?s(w,T):T.isSupportedClass=!1,T.label=h.label||h.id,T.id=h.id,T.group=g,f&&(T.fieldSetId=m.id),t===h.id&&(e=g),o.set(h.id,h),l.push(T)})}function d(m){const l=n.getComponentById(m);if(!l||!l.componentType||!l.componentType.startsWith("form"))return{result:!1,message:"只可以在响应式表单组件中调整响应式布局配置"};const g=n.selectNode(l,f=>f.type===yt.DgControl["response-form"].type);return!g||!g.contents||g.contents.length===0?{result:!1,message:"Form区域内没有控件,请先添加控件"}:{result:!0,message:"",formNode:g}}function c(m,l){l=l||m.id;const{result:g,message:f,formNode:p}=d(l);if(!g)return{result:g,message:f};t=m.id,i=[],o.clear();const h=p.contents[0].type===yt.DgControl.fieldset.type?0:1;a(p,i,h);const w=i.find(M=>!M.isSupportedClass);return{defaultState:{defaultGroupNumber:e||1,model:w?"customize":"standard"},importData:i}}function u(m,l){l=l;const{result:g,formNode:f}=d(l);if(!g)return"";const p=[];return m.forEach(h=>{var M;const w=o.get(h.id),T=w.appearance&&w.appearance.class;if(T){const S=T.split(" ").filter(N=>!N.startsWith("col-")),v="col-"+h.columnInSM,y="col-md-"+h.columnInMD,F="col-xl-"+h.columnInLG,A="col-el-"+h.columnInEL,x=[v,y,F,A].concat(S);w.appearance.class=x.join(" ")}if(h.fieldSetId){const $=f.contents.find(v=>v.id===h.fieldSetId),S=p.find(v=>v.id===h.fieldSetId);S?(M=S.contents)==null||M.push(w):(p.push($),$.contents=[w])}else p.push(w)}),f.contents=p,f.id}return{checkCanFindFormNode:d,checkCanOpenLayoutEditor:c,changeFormControlsByResponseLayoutConfig:u,getResonseFormLayoutConfig:a}}var Ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ft(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Hn={exports:{}};(function(n,e){(function(t){n.exports=t()})(function(){return function(){function t(o,i,s){function a(u,m){if(!i[u]){if(!o[u]){var l=typeof ft=="function"&&ft;if(!m&&l)return l(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=i[u]={exports:{}};o[u][0].call(f.exports,function(p){var h=o[u][1][p];return a(h||p)},f,f.exports,t,o,i,s)}return i[u].exports}for(var d=typeof ft=="function"&&ft,c=0;c<s.length;c++)a(s[c]);return a}return t}()({1:[function(t,o,i){var s={},a="(?:^|\\s)",d="(?:\\s|$)";function c(l){var g=s[l];return g?g.lastIndex=0:s[l]=g=new RegExp(a+l+d,"g"),g}function u(l,g){var f=l.className;f.length?c(g).test(f)||(l.className+=" "+g):l.className=g}function m(l,g){l.className=l.className.replace(c(g)," ").trim()}o.exports={add:u,rm:m}},{}],2:[function(t,o,i){(function(s){var a=t("contra/emitter"),d=t("crossvent"),c=t("./classes"),u=document,m=u.documentElement;function l(C,E){var k=arguments.length;k===1&&Array.isArray(C)===!1&&(E=C,C=[]);var V,R,U,K,P,B,W,D,ee,he=null,ve,_,re=!1,ce=0,te,L=E||{};L.moves===void 0&&(L.moves=M),L.accepts===void 0&&(L.accepts=M),L.invalid===void 0&&(L.invalid=et),L.containers===void 0&&(L.containers=C||[]),L.isContainer===void 0&&(L.isContainer=T),L.copy===void 0&&(L.copy=!1),L.copySortSource===void 0&&(L.copySortSource=!1),L.revertOnSpill===void 0&&(L.revertOnSpill=!1),L.removeOnSpill===void 0&&(L.removeOnSpill=!1),L.direction===void 0&&(L.direction="vertical"),L.ignoreInputTextSelection===void 0&&(L.ignoreInputTextSelection=!0),L.mirrorContainer===void 0&&(L.mirrorContainer=u.body);var ne=a({containers:L.containers,start:Ve,end:Le,cancel:Y,remove:j,destroy:De,canMove:ke,dragging:!1});return L.removeOnSpill===!0&&ne.on("over",Tt).on("out",Ft),Be(),ne;function $e(b){return ne.containers.indexOf(b)!==-1||L.isContainer(b)}function Be(b){var O=b?"remove":"add";p(m,O,"mousedown",ue),p(m,O,"mouseup",Pe)}function Te(b){var O=b?"remove":"add";p(m,O,"mousemove",Ke)}function _e(b){var O=b?"remove":"add";d[O](m,"selectstart",He),d[O](m,"click",He)}function De(){Be(!0),Pe({})}function He(b){ve&&b.preventDefault()}function ue(b){K=b.clientX,P=b.clientY;var O=h(b)!==1||b.metaKey||b.ctrlKey;if(!O){var q=b.target,z=Fe(q);z&&(ve=z,Te(),b.type==="mousedown"&&(y(q)?q.focus():b.preventDefault()))}}function Ke(b){if(ve){if(h(b)===0){Pe({});return}if(!(b.clientX!==void 0&&Math.abs(b.clientX-K)<=(L.slideFactorX||0)&&b.clientY!==void 0&&Math.abs(b.clientY-P)<=(L.slideFactorY||0))){if(L.ignoreInputTextSelection){var O=N("clientX",b)||0,q=N("clientY",b)||0,z=u.elementFromPoint(O,q);if(y(z))return}var Z=ve;Te(!0),_e(),Le(),Ie(Z),c.add(D||U,"gu-transit"),Et(),Mt(),ce=0,tt(b)}}}function Fe(b){if(!(ne.dragging&&V)&&!$e(b)){for(var O=b;v(b)&&$e(v(b))===!1;)if(L.invalid(b,O)||(b=v(b),!b))return;var q=v(b);if(q&&!L.invalid(b,O)){var z=L.moves(b,q,O,A(b));if(z)return{item:b,source:q}}}}function ke(b){return!!Fe(b)}function Ve(b){var O=Fe(b);O&&Ie(O)}function Ie(b){Pt(b.item,b.source)&&(D=b.item.cloneNode(!0),ne.emit("cloned",D,b.item,"copy")),R=b.source,U=b.item,B=W=A(b.item),ne.dragging=!0,ne.emit("drag",U,R)}function et(){return!1}function Le(){if(ne.dragging){var b=D||U;Xe(b,v(b))}}function je(){ve=!1,Te(!0),_e(!0)}function Pe(b){if(je(),!!ne.dragging){var O=D||U,q=N("clientX",b)||0,z=N("clientY",b)||0,Z=w(V,q,z),J=Oe(Z,q,z);J&&(D&&L.copySortSource||!D||J!==R)?Xe(O,J):L.removeOnSpill?j():Y()}}function Xe(b,O){var q=v(b);D&&L.copySortSource&&O===R&&q.removeChild(U),le(O)?ne.emit("cancel",b,R):ne.emit("drop",b,O,R,W),se()}function j(){if(ne.dragging){var b=D||U,O=v(b);O&&O.removeChild(b),ne.emit(D?"cancel":"remove",b,O,R),se()}}function Y(b){if(ne.dragging){var O=arguments.length>0?b:L.revertOnSpill,q=D||U,z=v(q),Z=le(z);Z===!1&&O&&(D?z&&z.removeChild(D):R.insertBefore(q,B)),Z||O?ne.emit("cancel",q,R,R):ne.emit("drop",q,z,R,W),se()}}function se(){var b=D||U;je(),jt(),Nt(),b&&c.rm(b,"gu-transit"),ee&&clearTimeout(ee),ne.dragging=!1,he&&ne.emit("out",b,he,R),ne.emit("dragend",b,ce),R=U=D=B=W=ee=he=null}function le(b,O){var q;return O!==void 0?q=O:V?q=W:q=A(D||U),b===R&&q===B}function Oe(b,O,q){for(var z=b;z&&!Z();)z=v(z);return z;function Z(){var J=$e(z);if(J===!1)return!1;var Se=ht(z,b),ye=vt(z,Se,O,q),be=le(z,ye);return be?!0:L.accepts(U,z,R,ye)}}function tt(b){if(!V)return;b.preventDefault();var O=N("clientX",b)||0,q=N("clientY",b)||0;V.style.left=O-2+"px",V.style.top=q-2+"px";var z=D||U,Z=w(V,O,q),J=Oe(Z,O,q),Se=J!==null&&J!==he;(Se||J===null)&&(Ce(),he=J,Ee()),It(Z,q);var ye=v(z);if(J===R&&D&&!L.copySortSource){ye&&ye.removeChild(z);return}var be,Me=ht(J,Z);if(re=nt(Me,J),Me!==null)be=vt(J,Me,O,q);else if(L.revertOnSpill===!0&&!D)be=B,J=R;else{D&&ye&&ye.removeChild(z),D&&_&&(_.style.display="none");return}_.style.display="block",At(be,z,Se),be?kt(Me,be):Vt(J);function de(me){ne.emit(me,z,he,R)}function Ee(){Se&&de("over")}function Ce(){he&&de("out")}}function At(b,O,q){(b===O||b===A(O))&&(W=A(O)),(b===null&&q||b!==O&&b!==A(O))&&(W=b)}function Tt(b){c.rm(b,"gu-hide")}function Ft(b){ne.dragging&&c.add(b,"gu-hide")}function Mt(){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=L.getMirrorText&&L.getMirrorText(U)||"控件",c.add(V,"gu-mirror"),L.mirrorContainer.appendChild(V),p(m,"add","mousemove",tt),c.add(L.mirrorContainer,"gu-unselectable"),ne.emit("cloned",V,U,"mirror"))}function Et(){if(_=document.createElement("div"),c.add(_,"gu-insertion"),U){var b=U.getBoundingClientRect();_.style.left=b.left+"px",_.style.top=b.top+"px"}re=!1,L.mirrorContainer.appendChild(_)}function jt(){V&&(c.rm(L.mirrorContainer,"gu-unselectable"),p(m,"remove","mousemove",tt),v(V).removeChild(V),V=null)}function Nt(){_&&(v(_).removeChild(_),_=null)}function ht(b,O){for(var q=O;q!==b&&v(q)!==b;)q=v(q);return q===m?null:q}function nt(b,O){if(!O)return re;var q=b||O&&O.lastElementChild;if(!q)return!0;var z=getComputedStyle(b),Z=/^inline/.test(z.getPropertyValue("display"))||/^(left|right)$/.test(z.getPropertyValue("float"));if(Z)return!0;if(O){var J=getComputedStyle(O),Se=J.getPropertyValue("display");if(/flex$/.test(Se)){var ye=J.getPropertyValue("flex-direction")||"row";if(ye==="row"||ye==="row-reverse")return!Bt(O)}return!1}return!0}function Bt(b){if(!b.children||!b.children.length)return!1;for(const O of Array.from(b.children)){const z=(O.className&&O.className.split(" ")||[]).filter(Z=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(Z));if(!z.length)return!1;for(const Z of z){const J=Z.slice(Z.lastIndexOf("-")+1);if(parseInt(J,10)!==12)return!1}}return!0}function kt(b,O){const q=O.getBoundingClientRect();if(_.style.left=q.left+"px",_.style.top=q.top+"px",re){if(_.style.height=q.height+"px",_.style.width="4px",b){const z=b.getBoundingClientRect();z.top!==q.top&&(_.style.left=z.right+"px",_.style.top=z.top+"px",_.style.height=z.height+"px")}}else if(_.style.height="4px",_.style.width=q.width+"px",te){const z=te.getBoundingClientRect();q.top<z.top&&(_.style.display="none")}O===U&&U&&(_.style.display="none")}function Vt(b){W=null;var O=b.lastElementChild;if(O){var q=O.getBoundingClientRect();re?(_.style.left=q.right+"px",_.style.top=q.top+"px",_.style.height=q.height+"px",_.style.width="4px"):(_.style.left=q.left+"px",_.style.top=q.bottom+"px",_.style.height="4px",_.style.width=q.width+"px"),O===U&&U&&(_.style.display="none")}else _.style.display="none"}function It(b,O){if(!L.mirrorContainer.contains(b)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(te=g(b),!te||!te.contains(b)))return;const q=document.querySelector(".dgComponentSelected"),z=te.getBoundingClientRect();if(O-30<z.top&&te.scrollTop>0){let Z=te.scrollTop<10?te.scrollTop:10;te.scrollBy(0,-1*Z),q&&te.contains(q)&&(ce=ce+-1*Z)}if(O+30>z.bottom&&te.scrollTop<te.scrollHeight-te.clientHeight){const Z=te.scrollHeight-te.clientHeight-te.scrollTop;let J=Z<10?Z:10;te.scrollBy(0,J),q&&te.contains(q)&&(ce=ce+J)}}function vt(b,O,q,z){var Z=L.direction==="horizontal",J=L.direction==="mixed",Se=O!==b?be():ye();return Se;function ye(){var de=b.children.length,Ee,Ce,me;for(Ee=0;Ee<de;Ee++)if(Ce=b.children[Ee],me=Ce.getBoundingClientRect(),Z&&me.left+me.width/2>q||!J&&!Z&&me.top+me.height/2>z||J&&me.left+me.width>q&&me.top+me.height>z)return Ce;return null}function be(){var de=O.getBoundingClientRect();if(J){var Ee=z-de.top,Ce=q-de.left,me=de.bottom-z,ot=de.right-q,rt=Math.min(Ce,ot,Ee,me),it;return re?it=ot<Ce:it=me===rt||ot===rt||Ce===rt,Me(it)}return Me(Z?q>de.left+$(de)/2:z>de.top+S(de)/2)}function Me(de){return de?A(O):O}}function Pt(b,O){return typeof L.copy=="boolean"?L.copy:L.copy(b,O)}}function g(C){const E=Array.from(window.scrollContainerList);if(E.length===1){const V=Array.from(window.scrollContainerList)[0];return document.getElementById(V)}const k=f(E);for(const V of k)if(V.contains(C))return V;return null}function f(C){const E=[];return C.forEach(k=>{const V=document.getElementById(k);V&&E.push(V)}),E.sort((k,V)=>k.contains(V)?1:V.contains(k)?-1:0),E}function p(C,E,k,V){var R={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},U={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},K={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};s.navigator.pointerEnabled?d[E](C,U[k],V):s.navigator.msPointerEnabled?d[E](C,K[k],V):(d[E](C,R[k],V),d[E](C,k,V))}function h(C){if(C.touches!==void 0)return C.touches.length;if(C.which!==void 0&&C.which!==0)return C.which;if(C.buttons!==void 0)return C.buttons;var E=C.button;if(E!==void 0)return E&1?1:E&2?3:E&4?2:0}function w(C,E,k){C=C||{};var V=C.className||"",R;return C.className+=" gu-hide",R=u.elementFromPoint(E,k),C.className=V,R}function T(){return!1}function M(){return!0}function $(C){return C.width||C.right-C.left}function S(C){return C.height||C.bottom-C.top}function v(C){return C.parentNode===u?null:C.parentNode}function y(C){return C.tagName==="INPUT"||C.tagName==="TEXTAREA"||C.tagName==="SELECT"||F(C)}function F(C){return!C||C.contentEditable==="false"?!1:C.contentEditable==="true"?!0:F(v(C))}function A(C){return C.nextElementSibling||E();function E(){var k=C;do k=k.nextSibling;while(k&&k.nodeType!==1);return k}}function x(C){return C.targetTouches&&C.targetTouches.length?C.targetTouches[0]:C.changedTouches&&C.changedTouches.length?C.changedTouches[0]:C}function N(C,E){var k=x(E),V={pageX:"clientX",pageY:"clientY"};return C in V&&!(C in k)&&V[C]in k&&(C=V[C]),k[C]}o.exports=l}).call(this,typeof Ne<"u"?Ne:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(t,o,i){o.exports=function(a,d){return Array.prototype.slice.call(a,d)}},{}],4:[function(t,o,i){var s=t("ticky");o.exports=function(d,c,u){d&&s(function(){d.apply(u||null,c||[])})}},{ticky:10}],5:[function(t,o,i){var s=t("atoa"),a=t("./debounce");o.exports=function(c,u){var m=u||{},l={};return c===void 0&&(c={}),c.on=function(g,f){return l[g]?l[g].push(f):l[g]=[f],c},c.once=function(g,f){return f._once=!0,c.on(g,f),c},c.off=function(g,f){var p=arguments.length;if(p===1)delete l[g];else if(p===0)l={};else{var h=l[g];if(!h)return c;h.splice(h.indexOf(f),1)}return c},c.emit=function(){var g=s(arguments);return c.emitterSnapshot(g.shift()).apply(this,g)},c.emitterSnapshot=function(g){var f=(l[g]||[]).slice(0);return function(){var p=s(arguments),h=this||c;if(g==="error"&&m.throws!==!1&&!f.length)throw p.length===1?p[0]:p;return f.forEach(function(T){m.async?a(T,p,h):T.apply(h,p),T._once&&c.off(g,T)}),c}},c}},{"./debounce":4,atoa:3}],6:[function(t,o,i){(function(s){var a=t("custom-event"),d=t("./eventmap"),c=s.document,u=g,m=p,l=[];s.addEventListener||(u=f,m=h),o.exports={add:u,remove:m,fabricate:w};function g(v,y,F,A){return v.addEventListener(y,F,A)}function f(v,y,F){return v.attachEvent("on"+y,M(v,y,F))}function p(v,y,F,A){return v.removeEventListener(y,F,A)}function h(v,y,F){var A=$(v,y,F);if(A)return v.detachEvent("on"+y,A)}function w(v,y,F){var A=d.indexOf(y)===-1?N():x();v.dispatchEvent?v.dispatchEvent(A):v.fireEvent("on"+y,A);function x(){var C;return c.createEvent?(C=c.createEvent("Event"),C.initEvent(y,!0,!0)):c.createEventObject&&(C=c.createEventObject()),C}function N(){return new a(y,{detail:F})}}function T(v,y,F){return function(x){var N=x||s.event;N.target=N.target||N.srcElement,N.preventDefault=N.preventDefault||function(){N.returnValue=!1},N.stopPropagation=N.stopPropagation||function(){N.cancelBubble=!0},N.which=N.which||N.keyCode,F.call(v,N)}}function M(v,y,F){var A=$(v,y,F)||T(v,y,F);return l.push({wrapper:A,element:v,type:y,fn:F}),A}function $(v,y,F){var A=S(v,y,F);if(A){var x=l[A].wrapper;return l.splice(A,1),x}}function S(v,y,F){var A,x;for(A=0;A<l.length;A++)if(x=l[A],x.element===v&&x.type===y&&x.fn===F)return A}}).call(this,typeof Ne<"u"?Ne:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(t,o,i){(function(s){var a=[],d="",c=/^on/;for(d in s)c.test(d)&&a.push(d.slice(2));o.exports=a}).call(this,typeof Ne<"u"?Ne:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(t,o,i){(function(s){var a=s.CustomEvent;function d(){try{var c=new a("cat",{detail:{foo:"bar"}});return c.type==="cat"&&c.detail.foo==="bar"}catch{}return!1}o.exports=d()?a:typeof document<"u"&&typeof document.createEvent=="function"?function(u,m){var l=document.createEvent("CustomEvent");return m?l.initCustomEvent(u,m.bubbles,m.cancelable,m.detail):l.initCustomEvent(u,!1,!1,void 0),l}:function(u,m){var l=document.createEventObject();return l.type=u,m?(l.bubbles=!!m.bubbles,l.cancelable=!!m.cancelable,l.detail=m.detail):(l.bubbles=!1,l.cancelable=!1,l.detail=void 0),l}}).call(this,typeof Ne<"u"?Ne:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(t,o,i){var s=o.exports={},a,d;function c(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=c}catch{a=c}try{typeof clearTimeout=="function"?d=clearTimeout:d=u}catch{d=u}})();function m(S){if(a===setTimeout)return setTimeout(S,0);if((a===c||!a)&&setTimeout)return a=setTimeout,setTimeout(S,0);try{return a(S,0)}catch{try{return a.call(null,S,0)}catch{return a.call(this,S,0)}}}function l(S){if(d===clearTimeout)return clearTimeout(S);if((d===u||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(S);try{return d(S)}catch{try{return d.call(null,S)}catch{return d.call(this,S)}}}var g=[],f=!1,p,h=-1;function w(){!f||!p||(f=!1,p.length?g=p.concat(g):h=-1,g.length&&T())}function T(){if(!f){var S=m(w);f=!0;for(var v=g.length;v;){for(p=g,g=[];++h<v;)p&&p[h].run();h=-1,v=g.length}p=null,f=!1,l(S)}}s.nextTick=function(S){var v=new Array(arguments.length-1);if(arguments.length>1)for(var y=1;y<arguments.length;y++)v[y-1]=arguments[y];g.push(new M(S,v)),g.length===1&&!f&&m(T)};function M(S,v){this.fun=S,this.array=v}M.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={};function $(){}s.on=$,s.addListener=$,s.once=$,s.off=$,s.removeListener=$,s.removeAllListeners=$,s.emit=$,s.prependListener=$,s.prependOnceListener=$,s.listeners=function(S){return[]},s.binding=function(S){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(S){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],10:[function(t,o,i){(function(s){var a=typeof s=="function",d;a?d=function(c){s(c)}:d=function(c){setTimeout(c,0)},o.exports=d}).call(this,t("timers").setImmediate)},{timers:11}],11:[function(t,o,i){(function(s,a){var d=t("process/browser.js").nextTick,c=Function.prototype.apply,u=Array.prototype.slice,m={},l=0;i.setTimeout=function(){return new g(c.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new g(c.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(f){f.close()};function g(f,p){this._id=f,this._clearFn=p}g.prototype.unref=g.prototype.ref=function(){},g.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(f,p){clearTimeout(f._idleTimeoutId),f._idleTimeout=p},i.unenroll=function(f){clearTimeout(f._idleTimeoutId),f._idleTimeout=-1},i._unrefActive=i.active=function(f){clearTimeout(f._idleTimeoutId);var p=f._idleTimeout;p>=0&&(f._idleTimeoutId=setTimeout(function(){f._onTimeout&&f._onTimeout()},p))},i.setImmediate=typeof s=="function"?s:function(f){var p=l++,h=arguments.length<2?!1:u.call(arguments,1);return m[p]=!0,d(function(){m[p]&&(h?f.apply(null,h):f.call(null),i.clearImmediate(p))}),p},i.clearImmediate=typeof a=="function"?a:function(f){delete m[f]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Hn);const Ln={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}},zn={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},Ct=r.defineComponent({name:"Toast",props:zn,emits:["close","click"],setup:(n,e)=>{const{locale:t,t:o}=at.useI18n(),i=r.ref(n.animate),s="fadeOut",a=r.computed(()=>n.options),d=r.ref(!1),c=r.computed(()=>a.value.title&&a.value.message),u=r.computed(()=>!a.value.title&&a.value.message),m=r.computed(()=>{const S={animated:d.value,toast:!0,"toast--only-content":u.value};return S[n.animate]=!1,S[s]=d.value,S["toasty-type-"+a.value.type]=!0,a.value.theme&&(S[a.value.theme]=!0),S}),l=r.computed(()=>{const y=`f-icon-${a.value&&a.value.type?a.value.type.replace("toasty-type-",""):"default"}`,F={"f-icon":!0};return F[y]=!0,F}),g=r.computed(()=>a.value.title||a.value.message),f=r.computed(()=>n.showCloseButton),p=r.computed(()=>!!a.value.buttons||!!e.slots.default),h=r.computed(()=>t.value==="en"?{wordBreak:"keep-all",overflowWrap:"break-word"}:{});function w(S){S.stopPropagation(),S.preventDefault(),d.value=!1,setTimeout(()=>{e.emit("close",a.value)},200)}function T(S,v){}function M(S){return`f-preten-link ${S.customClass?S.customClass:""}`}r.watch(i,()=>{i.value});const $=()=>{var S;return r.createVNode(r.Fragment,null,[r.createVNode("div",{class:"after-toast-msg text-right"},[!e.slots.default&&((S=a.value.buttons)==null?void 0:S.map(v=>r.createVNode("span",{class:M(v),onClick:y=>void 0},[v.text]))),e.slots.default&&e.slots.default()])])};return()=>r.createVNode("div",{class:m.value,style:"min-height:44px"},[f.value&&r.createVNode("button",{title:o("messageBox.close"),class:"toast-close f-btn-icon f-bare",onClick:w},[r.createVNode("span",{class:"f-icon modal_close"},null)]),g.value&&r.createVNode("section",{class:"modal-tips"},[r.createVNode("div",{class:"float-left modal-tips-iconwrap"},[r.createVNode("span",{class:l.value},null)]),r.createVNode("div",{class:"modal-tips-content"},[c.value&&r.createVNode(r.Fragment,null,[r.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:a.value.title},null),r.createVNode("p",{class:"toast-msg",innerHTML:a.value.message,style:h.value},null),p.value&&$()]),u.value&&(a.value.buttons?r.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[r.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:h.value,innerHTML:a.value.message},null),r.createVNode("div",{class:"after-toast-title text-right ml-auto"},[$()])]):r.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:h.value,innerHTML:a.value.message},null))])])])}}),pt=r.defineComponent({name:"Notify",props:Ln,emits:["close","empty"],setup(n,e){const t=r.computed(()=>({"farris-notify":!0})),o={left:12,right:12,top:20,bottom:12},i=r.ref(),s=r.ref(n.options),a=r.ref(n.showCloseButton),d=r.computed(()=>n.position||"bottom-right"),c=r.computed(()=>n.timeout!=null?n.timeout:3e3),u=r.computed(()=>{const g=n.bottom?n.bottom:o.bottom,f=n.top?n.top:o.top,p={transition:"all 0.2s ease",left:d.value.indexOf("left")>-1?`${n.left?n.left:o.left}px`:"",right:d.value.indexOf("right")>-1?`${n.right?n.right:o.right}px`:"",top:d.value.indexOf("top")>-1?`${f}px`:"",bottom:d.value.indexOf("bottom")>-1?`${g}px`:""};return d.value.indexOf("center")>-1&&(p.left="50%",p.marginLeft="calc(-24rem / 2)",d.value==="center-center"&&(p.top="50%",p.transform="translate(-50%, -50%)")),p});function m(g){e.emit("close")}c.value&&setTimeout(()=>{m()},c.value),e.expose({closeToast:m,container:i,notifyPosition:d});function l(g,f){m()}return()=>r.createVNode("div",{class:t.value,style:u.value,ref:i},[r.createVNode(Ct,{options:s.value,showCloseButton:a.value,animate:n.animate,onClose:g=>l(g,s.value)},null)])}});class Un{constructor(){G(this,"notifyRefs",[]);G(this,"globalConfig",r.reactive({}))}escapeAllHtml(e){if(typeof e!="string"||!e)return"";const t=document.createElement("div");return t.textContent=e||"",t.innerHTML.replace(/\\n/g,"<br>").replace(/\\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\\r/g,"")}createNotifyInstance(e){const t=this,i=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0,safeHtml:!0},this.globalConfig,{...e}),s=document.createElement("div");s.style.display="contents";const a=r.createApp({setup(){var u;const d=r.ref();function c(){d.value.container.style.transform="scale(0)",setTimeout(()=>{t.updateNotifyPositionForClose(i,d),a.unmount()},220)}if(i.position.indexOf("top")>-1){const m=t.getNotifyInstances(i.position),l=m[m.length-1];if(l){const g=l.value.container.getBoundingClientRect();i.top=g.bottom}}return i.safeHtml&&((u=i.options)!=null&&u.message)&&(i.options.message=t.escapeAllHtml(i.options.message)),r.onUnmounted(()=>{document.body.removeChild(s)}),r.onMounted(()=>{t.updateNotifyPositionForCreate(i,d)}),()=>r.createVNode(r.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[r.createVNode(pt,r.mergeProps({ref:d},i,{onClose:c}),null)]})}});return a.provide("NotifyService",this),document.body.appendChild(s),a.use(st.LocaleService.i18n),a.mount(s),a}getNotifyInstances(e){return this.notifyRefs.filter(t=>t.value.notifyPosition===e)}updateNotifyPositionForCreate(e,t){if(this.notifyRefs&&this.notifyRefs.length){const o=window.innerHeight;e.position.indexOf("bottom")>-1&&this.getNotifyInstances(e.position).forEach(i=>{const s=i.value.container.getBoundingClientRect();i.value.container.style.bottom=s.height+o-s.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,t]}updateNotifyPositionForClose(e,t){const o=this.notifyRefs.indexOf(t);if(e.position.indexOf("top")>-1){const i=this.getNotifyInstances(e.position),s=i.indexOf(t);i.slice(s+1).forEach(a=>{a.value.container.style.top=a.value.container.offsetTop-a.value.container.offsetHeight+"px"})}o>-1&&this.notifyRefs.splice(o,1)}show(e){return this.createNotifyInstance(e)}buildNotifyProps(e,t){let o="",i="",s,a,d;typeof t=="string"?o=t:t&&(o=t.message||"",i=t.title||"",a=t.position||null,d=t.showCloseButton!=null?t.showCloseButton:null,s=t.timeout!=null?t.timeout:null);const u={options:{type:e,message:o,title:i}};return a!=null&&(u.position=a),d!=null&&(u.showCloseButton=d),s!=null&&(u.timeout=s),u}info(e){const t=this.buildNotifyProps("info",e);return this.show(t)}success(e){const t=this.buildNotifyProps("success",e);return this.show(t)}warning(e){const t=this.buildNotifyProps("warning",e);return this.show(t)}error(e){const t=this.buildNotifyProps("error",e);return this.show(t)}close(e){e&&e.unmount()}closeAll(){this.notifyRefs.forEach(e=>{e==null||e.value.closeToast()}),this.notifyRefs.length=0}}const Wn=Symbol("NOTIFY_SERVICE_TOKEN");pt.install=n=>{n.component(pt.name,pt),n.component(Ct.name,Ct);const e=new Un;n.provide(Wn,e),n.provide("FNotifyService",e)},`${st.LocaleService.getLocaleValue("datagrid.loadingMessage")}`;const Gn={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:st.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 Qn(n,e,t,o,i,s,a,d,c,u,m,l,g,f,p,h,w){const{calculateCellPositionInRow:T}=s,{columnContext:M,hasLeftFixedColumn:$,hasRightFixedColumn:S}=a,{gridDataStyle:v,leftFixedGridDataStyle:y,rightFixedGridDataStyle:F}=f,{renderDataRow:A}=X.getHierarchyRow(n,e,M,w,d,c,u,m,l,g,f,p,h),x=[A];function N(R,U){const K=T(R);return w.value.filter(P=>P.visible!==!1).map((P,B)=>x[P.type](P,K,U,B))}function C(){return r.createVNode("div",{ref:o,class:"fv-grid-content-left-fixed"},[r.createVNode("div",{class:"fv-grid-data",style:y.value},[N(M.value.leftColumns.filter(R=>R.visible),"left")])])}function E(){return r.createVNode("div",{ref:t,class:"fv-grid-content-primary"},[r.createVNode("div",{class:"fv-grid-data",style:v.value},[N(M.value.primaryColumns.filter(R=>R.visible),"primary")])])}function k(){return r.createVNode("div",{ref:i,class:"fv-grid-content-right-fixed"},[r.createVNode("div",{class:"fv-grid-data",style:F.value},[N(M.value.rightColumns.filter(R=>R.visible),"right")])])}function V(){const R=[];return $.value&&R.push(C()),R.push(E()),S.value&&R.push(k()),R}return{renderDataArea:V}}const _n=r.defineComponent({name:"FTreeGrid",props:Gn,emits:["selectionChange","clickRow","expandNode","unSelectItem","dblclickNode","doubleClickRow","unSelectItem","selectItem","filterChanged","sortChanged"],setup(n,e){var tn,nn;const o=((tn=n.rowOption)==null?void 0:tn.height)||28,i=r.ref(20),s=r.ref(n.columns),a=X.useIdentify(n),{idField:d}=a,c=r.ref(),u=r.ref(),m=r.ref(),l=r.ref(),g=r.ref(),f=r.ref([]),p=r.ref(!1),h=r.ref(((nn=n.rowOption)==null?void 0:nn.wrapContent)||!1),w=X.useGroupData(n,a),T=X.useFilter(n,e),M=X.useHierarchy(n),{collapseField:$}=M,{showLoading:S,renderLoading:v}=X.useLoading(n,c),y=X.useDataView(n,new Map,T,M,a),{dataView:F}=y,A=X.useSelection(n,y,a,f,e),{showSelection:x,selectedValues:N}=A,C=X.useSelectHierarchyItem(n,f,y,a,A,e),E=r.computed(()=>n.disabled),k=r.computed(()=>n.virtualized?Math.min(y.dataView.value.length,i.value):y.dataView.value.length),V=X.usePagination(n,y),{shouldRenderPagination:R}=V,{containerStyleObject:U}=X.useDataViewContainerStyle(n),K=X.useCommandColumn(n),{applyCommands:P}=K;P(s);const{applyColumnSetting:B,removeColumnSetting:W}=X.useSettingColumn(n);n.showSetting&&B(s);const D=X.useColumn(n,e),ee=X.useSort(n),{applyColumnSorter:he,columnContext:ve,updateColumnRenderContext:_}=D;he(y,ee);const re=X.useGroupColumn(n,ve),ce=X.useRow(n,e,A,a),te=X.useEdit(n,e,a,ce,f),L=X.useVisualDataBound(n),ne=X.useVisualDataCell(n,te,L),$e=X.useVisualDataRow(n,y,te,M,a,L,ne),Be=X.useVisualData(n,s,y,k,0,$e),{getVisualData:Te}=Be,_e=X.useCellPosition(n,ve),De=X.useSidebar(n,A),{sidebarWidth:He}=De,ue=X.useVirtualScroll(n,y,f,ve,Be,k,0,He),{onWheel:Ke,dataGridWidth:Fe,viewPortHeight:ke,viewPortWidth:Ve,resetScroll:Ie,updateVisibleRowsOnLatestVisibleScope:et}=ue,Le=X.useFitColumn(n,ve,u,Ve,re),{calculateColumnsSize:je}=Le,Pe=X.useFilterHistory(),Xe=X.useColumnFilter(u,g,y,Pe,ue),j=X.useDragColumn(n,e,D,y,re,w,ue),Y=r.computed(()=>{const H={"fv-grid":!0,"fv-grid-bordered":n.showBorder,"fv-grid-horizontal-bordered":n.showHorizontalLines,"fv-datagrid-strip":n.showStripe};return xe.getCustomClass(H,n.customClass)}),se=r.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":p.value,"fv-grid-wrap-content":h.value})),{renderDataArea:le}=Qn(n,e,m,l,g,_e,D,y,te,M,ce,A,C,ue,Be,L,f),{renderGridHeader:Oe,renderGridColumnResizeOverlay:tt,shouldShowHeader:At}=X.getColumnHeader(n,e,u,l,g,D,y,j,Xe,T,Pe,Le,re,A,De,ee,ue,Ve,f),{renderDataGridSidebar:Tt}=X.getSidebar(n,ce,A,De,ue),{renderDisableMask:Ft}=X.getDisableMask(),{renderHorizontalScrollbar:Mt}=X.getHorizontalScrollbar(n,u,ue),{renderVerticalScrollbar:Et}=X.getVerticalScrollbar(n,u,ue);function jt(){var H,Q,fe;if(u.value&&u.value.clientHeight>0&&((H=u.value)==null?void 0:H.clientWidth)>0){const ge=Math.ceil(u.value.clientHeight/o);ge>i.value&&(i.value=ge,et()),ke.value=((Q=m.value)==null?void 0:Q.clientHeight)||0,Fe.value=((fe=u.value)==null?void 0:fe.clientWidth)||0,je()}}r.onMounted(()=>{u.value&&(i.value=Math.max(Math.ceil(u.value.clientHeight/o),i.value),f.value=Te(0,k.value+0-1),rn.useResizeObserver(u.value,jt),je(),r.nextTick(()=>{u.value&&(Fe.value=u.value.clientWidth),m.value&&(Ve.value=m.value.clientWidth,ke.value=m.value.clientHeight)})),S.value&&v()}),r.onUnmounted(()=>{}),r.watch(Ve,()=>{u.value&&je()});function Nt(H){y.collapseTo(H),y.reOrderVisibleIndex(),Ie()}function ht(H){y.expandTo(H),y.reOrderVisibleIndex(),Ie()}function nt(){const H=A.getSelectionRow();return H?H.dataIndex-1:-1}function Bt(){const H=nt();y.insertNewDataItem(H),f.value=Te(0,k.value+0-1)}function kt(){const H=nt();y.insertNewChildDataItem(H),f.value=Te(0,k.value+0-1)}function Vt(H,Q){const fe=f.value.find(we=>we.raw[d.value]===Q),ge=fe?fe.dataIndex-1:-1;y.insertNewChildDataItems(H,ge)}function It(){const H=nt(),Q=C.getNextSelectableHierarchyItemId(H);y.removeHierarchyDataItem(H),f.value=Te(0,k.value+0-1),Q&&A.selectItemById(Q)}function vt(H){te.onEditingRow(H)}function Pt(H){te.acceptEditingRow(H)}function b(H){te.cancelEditingRow(H)}function O(H){H&&(s.value=H,P(s),_(s.value),he(y,ee),je())}r.watch(()=>n.columns,H=>{O(H)});function q(H,Q){H&&(y.load(H),y.reOrderVisibleIndex(),Q!=null&&Q.keepScrollPosition?ue.scrollTo(ue.offsetY.value):Ie())}function z(H){A.selectItemById(H)}function Z(H){const Q=f.value.find(fe=>fe.raw[a.idField.value]===H);Q&&ce.clickRowItem(Q)}function J(H){ce.activeRowById(H)}function Se(H){A.selectItemByIds(H)}function ye(){return A.getSelectedItems()}function be(){A.clearSelection()}const Me=r.computed(()=>!f.value||!f.value.length),{renderEmpty:de}=X.getEmpty(n,e);function Ee(){return A.getSelectionRow()}function Ce(H){A.unSelectItemByIds(H)}function me(){return A.currentSelectedDataId.value}function ot(H,Q,fe){const ge=F.value.find(we=>we[d.value]===H);if(ge){if(Object.keys(ge).forEach(pe=>{Object.prototype.hasOwnProperty.call(Q,pe)&&(ge[pe]=Q[pe])}),fe){const{collapseField:pe,disabledField:ze,checkedField:Ue,visibleField:We}=fe;pe&&!ie.isUndefined(Q[pe])&&(ge.__fv_collapse__=Q[pe]),Ue&&!ie.isUndefined(Q[Ue])&&(ge.__fv_checked__=Q[Ue]),ze&&!ie.isUndefined(Q[ze])&&(ge.__fv_disabled__=Q[ze]),We&&!ie.isUndefined(Q[We])&&(ge.__fv_visible__=Q[We])}const we=f.value.find(pe=>pe.raw[d.value]===H),on=f.value.findIndex(pe=>pe.raw[d.value]===H);if(we){if(we.raw=ge,Object.keys(we.data).forEach(pe=>{we.data[pe].updateData(ge)}),fe){const{collapseField:pe,disabledField:ze,checkedField:Ue,visibleField:We}=fe;pe&&!ie.isUndefined(Q[pe])&&(we.collapse=Q[pe]),Ue&&!ie.isUndefined(Q[Ue])&&(we.checked=Q[Ue]),ze&&!ie.isUndefined(Q[ze])&&(we.disabled=Q[ze]),We&&!ie.isUndefined(Q[We])&&(we.visible=Q[We])}f.value=[...f.value.slice(0,on),we,...f.value.slice(on+1)],y.updateSummary()}}}function rt(H){return Object.prototype.hasOwnProperty.call(H,"raw")?y.hasRealChildren(H.raw):y.hasRealChildren(H)}function it(H){const Q=y.dataView.value.find(fe=>fe[d.value]===H);return Q?Q[$.value]:""}function Ho(){return $.value}r.watch(()=>n.showSetting,(H,Q)=>{H!==Q&&(H?B(s):W(s),O(s.value))});function Lo(H){return f.value.filter(Q=>H.includes(Q.raw[n.idField]))}function zo(H){const Q=a.idField.value,fe=f.value.find(ge=>ge.raw[Q]===H);fe&&ce.selectRow(fe)}function Uo(){A.keepSelectingOnPaging.value||be(),y.updateVisibleDataSummary(f.value)}e.expose({activeRowById:J,addNewDataItem:Bt,addNewChildDataItem:kt,addChildrenToNode:Vt,collapseTo:Nt,expandTo:ht,removeDataItem:It,editDataItem:vt,acceptDataItem:Pt,cancelDataItem:b,updateColumns:O,updateDataSource:q,selectItemById:z,selectItemByIds:Se,getSelectedItems:ye,clearSelection:be,getSelectionRow:Ee,clickRowItemById:Z,unSelectItemByIds:Ce,getCurrentRowId:me,reassignRowData:ot,hasChildren:rt,getCollapseField:Ho,getCollapseStatusById:it,getVisibleDataByIds:Lo,selectRowById:zo,updateDerivedData:Uo});const Wo=r.computed(()=>{const H={};return ue.shouldShowHorizontalScrollbar.value&&(H.paddingBottom="10px"),ue.shouldShowVirticalScrollbar.value&&(H.paddingRight="10px"),H}),Go=r.computed(()=>({...U.value,borderRadius:"5px"}));X.getPagination(n,e,y,ue,V,A);const Qo=r.computed(()=>({"d-flex":!0,"justify-content-between":R.value&&x.value,"justify-content-end":R.value&&!x.value,"position-relative":!0})),_o=r.computed(()=>({"d-flex":!0,"align-items-center":!0})),{renderDataGridSummary:Xo}=X.getSummary(n,y,D);return()=>r.createVNode("div",{ref:c,class:Y.value,style:Go.value,onWheel:Ke},[u.value&&At.value&&Oe(),r.createVNode("div",{ref:u,class:se.value,onMouseover:()=>p.value=!0,onMouseleave:()=>p.value=!1,style:Wo.value},[u.value&&Tt(f),u.value&&le(),u.value&&Me.value&&de(),u.value&&Mt(),u.value&&Et()]),u.value&&Xo(),x.value&&r.createVNode("div",{class:Qo.value},[x.value&&r.createVNode("div",{class:_o.value},[r.createVNode("div",null,["已选:"+N.value.length,r.createTextVNode(" 条")])])]),tt(),E.value&&Ft()])}});xe.withInstall(_n);function _t(n,e){return{customClass:e.class,customStyle:e.style}}const Xn=new Map([["appearance",_t]]);function Yn(n,e,t){return e}const Zn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/step.schema.json",title:"step",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for step",type:"string"},type:{description:"The type string of step",type:"string",default:"step"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Jn={title:"step",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},wt={direction:{type:String,default:"horizontal"},fill:{type:Boolean,default:!1},height:{type:Number,default:0},clickable:{type:Boolean,default:!0},steps:{type:Array,default:[{id:"1",title:"审批中(示例)",description:"正在审批"},{id:"2",title:"复核中(示例)",description:"等待复核"}]},activeIndex:{type:Number,default:0},onClick:{type:Function,default:()=>{}}},Xt=Ze(wt,Zn,Xn,Yn,Jn),Ge=r.defineComponent({name:"FStep",props:wt,emits:["click"],setup(n,e){const t=r.ref(n.direction),o=r.ref(n.fill),i=r.ref(n.height),s=r.ref(n.steps),a=r.ref(n.activeIndex),d=r.computed(()=>({"f-progress-step-list":t.value==="horizontal","f-progress-step-list-block":t.value==="vertical","f-progress-step-horizontal-fill":t.value==="horizontal"&&o.value,"f-progress-step-vertical-fill":t.value==="vertical"&&o.value})),c=r.computed(()=>({height:t.value==="vertical"?`${i.value}px`:""}));function u(S,v){const y={step:!0,active:v===a.value,clickable:n.clickable,current:v===a.value,finish:v<a.value};return S.status&&(y[S.status]=!0),xe.getCustomClass(y,S.class||"")}function m(S,v){if(!n.clickable)return;const y={step:S,stepIndex:v};e.emit("click",y)}function l(S,v){const y={"f-progressstep-row":!0,"step-active":v===a.value,"step-current":v===a.value,"step-finish":v<a.value};return S.status&&(y["step-"+S.status]=!0),y}function g(S,v){const y={"step-icon":!0,"step-success":v,"f-icon":v,"f-icon-check":v};return xe.getCustomClass(y,S.icon||"")}function f(S,v){const y=[];return S.icon?y.push(r.createVNode("span",{class:g(S,!1)},null)):v>=a.value?y.push(r.createVNode("span",{class:"step-icon"},[v+1])):y.push(r.createVNode("span",{class:g(S,!0)},null)),y}function p(S,v){return{"step-name":!0,"step-name-success":v<a.value}}function h(S,v){return r.createVNode("div",{class:"f-progress-step-title"},[r.createVNode("p",{class:p(S,v)},[S.title])])}function w(S,v){return{"f-progress-step-line":!0,"f-progress-step-line-success":v===a.value}}function T(S,v){return v!==s.value.length-1}const M=r.computed(()=>({triangle:!0,"":t.value==="vertical"}));function $(){return s.value.map((S,v)=>r.createVNode("li",{class:u(S,v),onClick:y=>m(S,v)},[r.createVNode("div",{class:l(S,v)},[r.createVNode("div",{class:"f-progress-step-content"},[f(S,v),h(S,v)]),T(S,v)&&r.createVNode("div",{class:w(S,v)},[r.createVNode("span",{class:M.value},null)])])]))}return r.watch(()=>n.activeIndex,()=>{n.activeIndex>-1&&n.activeIndex<=s.value.length&&(a.value=n.activeIndex,$())}),()=>r.createVNode("div",{class:"f-progress-step"},[r.createVNode("ul",{class:d.value,style:c.value},[$()])])}});function Kn(n,e,t){var C;const o="",i="",s=r.ref();let a;function d(){return(e==null?void 0:e.schema.componentType)!=="frame"}function c(){return!1}function u(){return(e==null?void 0:e.schema.componentType)!=="frame"}function m(){return(e==null?void 0:e.schema.componentType)==="frame"}function l(E){if(!E||!E.value)return null;if(E.value.schema&&E.value.schema.type==="component")return E.value;const k=r.ref(E==null?void 0:E.value.parent),V=l(k);return V||null}function g(E=e){var U;const{componentInstance:k,designerItemElementRef:V}=E;if(!k||!k.value)return null;const{getCustomButtons:R}=k.value;return k.value.canMove||R&&((U=R())!=null&&U.length)?V:g(E.parent)}function f(E){return!!t}function p(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function h(){}function w(E,k){var V;!E||!k||(V=e==null?void 0:e.setupContext)==null||V.emit("dragEnd")}function T(E,k){const{componentType:V}=E;let R=Ye.getSchemaByTypeForDesigner(V,E,k);const U=V.toLowerCase().replace(/-/g,"_");return R&&!R.id&&R.type===V&&(R.id=`${U}_${Math.random().toString().slice(2,6)}`),R}function M(E){}function $(...E){}function S(E){if(!E)return;const k=e==null?void 0:e.schema,{formSchemaUtils:V}=E;if(k&&V.getExpressions().length){const R=V.getExpressions().findIndex(U=>U.target===k.id);R>-1&&V.getExpressions().splice(R,1)}}function v(E){if(!E||!(e!=null&&e.schema))return;const k=e.schema,{formSchemaUtils:V}=E;V.removeCommunicationInComponent(k)}function y(E){S(E),v(E),e!=null&&e.schema.contents&&e.schema.contents.map(k=>{let V=k.id;k.type==="component-ref"&&(V=k.component);const R=n.value.querySelectorAll(`#${V}-design-item`);R!=null&&R.length&&Array.from(R).map(U=>{var K;(K=U==null?void 0:U.componentInstance)!=null&&K.value.onRemoveComponent&&U.componentInstance.value.onRemoveComponent(E)})})}function F(){}function A(E){var V,R;if(!((V=e==null?void 0:e.schema)!=null&&V.id))return;!a&&E&&(a=E.formSchemaUtils);let k="";{const{text:U,title:K,label:P,mainTitle:B,name:W,type:D}=e.schema;k=U||K||P||B||W||((R=I[D])==null?void 0:R.name)}k&&a.getControlBasicInfoMap().set(e.schema.id,{componentTitle:k,parentPathName:k})}function x(E){var U;const{changeObject:k}=E,{propertyID:V,propertyValue:R}=k;if(["text","title","label","name","mainTitle"].includes((U=E==null?void 0:E.changeObject)==null?void 0:U.propertyID)&&V&&R&&(A(),a)){const K=a.getControlBasicInfoMap(),P=K.keys().toArray().filter(B=>{var W,D;return((W=K.get(B))==null?void 0:W.reliedComponentId)===((D=e==null?void 0:e.schema)==null?void 0:D.id)});P!=null&&P.length&&P.forEach(B=>{const W=K.get(B).parentPathName.split(" > ");W[0]=R,K.get(B).parentPathName=W.join(" > ")})}}function N(E){x(E)}return s.value={canMove:d(),canSelectParent:c(),canDelete:u(),canNested:!m(),contents:e==null?void 0:e.schema.contents,elementRef:n,parent:(C=e==null?void 0:e.parent)==null?void 0:C.componentInstance,schema:e==null?void 0:e.schema,styles:o,designerClass:i,canAccepts:f,getBelongedComponentInstance:l,getDraggableDesignItemElement:g,getDraggingDisplayText:p,getPropConfig:$,getDragScopeElement:h,onAcceptMovedChildElement:w,onChildElementMovedOut:M,addNewChildComponentSchema:T,triggerBelongedComponentToMoveWhenMoved:r.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:r.ref(!1),onRemoveComponent:y,getCustomButtons:F,onPropertyChanged:N,setComponentBasicInfoMap:A,updateContextSchema:e==null?void 0:e.updateContextSchema},s}const eo=r.defineComponent({name:"FStepDesign",props:wt,emits:[],setup(n,e){const t=r.ref(n.direction),o=r.ref(n.fill),i=r.ref(n.height),s=r.ref(n.steps),a=r.ref(0),d=r.ref(n.clickable),c=r.ref(0),u=r.ref(),m=r.inject("design-item-context"),l=Kn(u,m);r.onMounted(()=>{u.value.componentInstance=l}),e.expose(l.value);const g=r.computed(()=>({"f-progress-step-list":t.value==="horizontal","f-progress-step-list-block":t.value==="vertical","f-progress-step-horizontal-fill":t.value==="horizontal"&&o.value,"f-progress-step-vertical-fill":t.value==="vertical"&&o.value})),f=r.computed(()=>({height:t.value==="vertical"?`${i.value}px`:""}));function p(x,N){const C={step:!0,active:N===a.value,clickable:d.value,"click-disable":x.disable,current:N===a.value};return N<a.value&&(C.finish=!0),x.status&&(C[x.status]=!0),x.hasOwnProperty("class")&&x.class.split(" ").reduce((E,k)=>(E[k]=!0,E),C),C}function h(x,N){}function w(x,N){const C={"f-progressstep-row":!0,"step-active":N===a.value,"step-current":N===a.value};return N<a.value&&(C["step-finish"]=!0),x.status&&(C["step-"+x.status]=!0),C}function T(x,N){const C={"step-icon":!0,"step-success":N,"k-icon":N,"k-i-check":N};return x.hasOwnProperty("icon")&&x.class.split(" ").reduce((E,k)=>(E[k]=!0,E),C),C}function M(x,N){const C=[];return x.icon?C.push(r.createVNode("span",{class:T(x,!1)},null)):N>=a.value||N===c.value?C.push(r.createVNode("span",{class:"step-icon"},[N+1])):C.push(r.createVNode("span",{class:T(x,!0)},null)),C}function $(x,N){return{"step-name":!0,"step-name-success":N<a.value}}function S(x,N){return r.createVNode("div",{class:"f-progress-step-title"},[r.createVNode("p",{class:$(x,N)},[x.title])])}function v(x,N){return{"f-progress-step-line":!0,"f-progress-step-line-success":N===a.value}}function y(x,N){return N!==s.value.length-1}const F=r.computed(()=>({triangle:!0,"":t.value==="vertical"}));function A(){return s.value.map((x,N)=>r.createVNode("li",{class:p(x,N),onClick:C=>void 0},[r.createVNode("div",{class:w(x,N)},[r.createVNode("div",{class:"f-progress-step-content"},[M(x,N),S(x,N)]),y(x,N)&&r.createVNode("div",{class:v(x,N)},[r.createVNode("span",{class:F.value},null)])])]))}return()=>r.createVNode("div",{ref:u,class:"f-progress-step"},[r.createVNode("ul",{class:g.value,style:f.value},[A()])])}});Ge.install=n=>{n.component(Ge.name,Ge)},Ge.register=(n,e,t,o)=>{n.step=Ge,e.step=Xt},Ge.registerDesigner=(n,e,t)=>{n.step=eo,e.step=Xt};const xt=new Map([["appearance",_t]]),to=new Map([]),no="root-viewmodel";class oo{constructor(e,t){G(this,"formSchemaUtils");G(this,"controlCreatorUtils");G(this,"designViewModelUtils");this.resolver=e,this.designerHostService=t,this.formSchemaUtils=this.designerHostService.formSchemaUtils,this.controlCreatorUtils=this.designerHostService.controlCreatorUtils,this.designViewModelUtils=this.designerHostService.designViewModelUtils}createComponent(e){const t=this.createComponentRefNode(e),o=this.createComponentNode(e),i=this.createViewModeNode(e),s=this.formSchemaUtils.getFormSchema();return s.module.viewmodels.push(i),s.module.components.push(o),this.designViewModelUtils.assembleDesignViewModel(),t}createComponentRefNode(e){const t=this.resolver.getSchemaByType("component-ref");return Object.assign(t,{id:`${e.componentId}-component-ref`,component:`${e.componentId}-component`}),t}createComponentNode(e){const t=this.resolver.getSchemaByType("component"),o=this.createFormComponentContents(e);return Object.assign(t,{id:`${e.componentId}-component`,viewModel:`${e.componentId}-component-viewmodel`,componentType:e.componentType,appearance:{class:this.getFormComponentClass()},formColumns:e.formColumns,contents:o}),t}getFormComponentClass(){const{templateId:e}=this.formSchemaUtils.getFormSchema().module;return e==="double-list-in-tab-template"?"f-struct-wrapper f-utils-fill-flex-column":"f-struct-wrapper"}createFormComponentContents(e){const t=this.resolver.getSchemaByType("section");Object.assign(t,{id:e.componentId+"-form-section",appearance:{class:"f-section-form f-section-in-mainsubcard"},mainTitle:e.componentName});const o=this.resolver.getSchemaByType("response-form"),i=[];Object.assign(o,{id:e.componentId+"-form",appearance:{class:"f-form-layout farris-form farris-form-controls-inline"},contents:i}),t.contents=[o];const{selectedFields:s}=e;s==null||s.forEach(d=>{if(d.$type===xe.FormSchemaEntityField$Type.SimpleField){const c=ie.cloneDeep(d),u=this.resolveControlClassByFormColumns(e),m=this.controlCreatorUtils.setFormFieldProperty(c,"",u);m&&i.push(m)}});const{templateId:a}=this.formSchemaUtils.getFormSchema().module;return a==="double-list-in-tab-template"&&(t.appearance.class="f-section-grid f-section-in-main px-0 pt-0",t.fill=!0),[t]}resolveControlClassByFormColumns(e){let t="";switch(e.formColumns){case 1:{t="col-12";break}case 2:{t="col-12 col-md-6 col-xl-6 col-el-6";break}case 3:{t="col-12 col-md-6 col-xl-4 col-el-4";break}case 4:{t="col-12 col-md-6 col-xl-3 col-el-2";break}}return t}createViewModeNode(e){return{id:`${e.componentId}-component-viewmodel`,code:`${e.componentId}-component-viewmodel`,name:e.componentName,bindTo:e.bindTo,parent:no,fields:this.assembleViewModelFields(e),commands:[],states:[],enableValidation:!0}}assembleViewModelFields(e){const t=[],{selectedFields:o}=e;return o==null||o.forEach(i=>{if(i.$type===xe.FormSchemaEntityField$Type.SimpleField){let s="blur";const a=i.type.name;(a===xe.FormSchemaEntityFieldTypeName.Enum||a===xe.FormSchemaEntityFieldTypeName.Boolean)&&(s="change"),t.push({type:"Form",id:i.id,fieldName:i.bindingField,groupId:null,groupName:null,updateOn:s,fieldSchema:{}})}}),t}}function ro(n,e,t,o){var s,a,d,c,u,m;const i=t.parentComponentInstance;if(i&&o){const l=(s=i.schema)==null?void 0:s.type,f={componentId:`form-${Math.random().toString(36).slice(2,6)}`,componentName:((a=t.bindingSourceContext)==null?void 0:a.entityTitle)||((c=(d=t.bindingSourceContext)==null?void 0:d.bindingEntity)==null?void 0:c.name)||"标题",componentType:"form",formColumns:l==="splitter-pane"?1:4,parentContainerId:i.schema.id,bindTo:((u=t.bindingSourceContext)==null?void 0:u.bindTo)||"/",selectedFields:(m=t.bindingSourceContext)==null?void 0:m.bindingEntityFields};return new oo(n,o).createComponent(f)}else return e}function io(n,e,t){return e}Ze({customClass:{type:String,default:""},customStyle:{type:String,defaut:""},visible:{type:Boolean,default:!0},adaptForLanguage:{type:Boolean,default:!0}},{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-form.schema.json",title:"response-form",description:"A Farris Data Collection Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"response-form"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},visible:{description:"",type:"boolean",default:!0},labelAutoOverflow:{description:"",type:"boolean",default:!1},adaptForLanguage:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},xt,ro);const Yt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/form-group.schema.json",title:"form-group",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"form-group"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},enableLinkLabel:{description:"",type:"boolean",default:!1},editor:{description:"",type:"obejct",default:null},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},binding:{description:"",type:"object",default:{}},visible:{description:"",type:"boolean",default:!0},required:{description:"",type:"boolean",default:!1},errors:{description:"",type:"object",default:null},name:{description:"The name string of form group component",type:"string",default:"form group"},showLabelType:{description:"",type:"string",default:"visible"}},required:["id","type","editor"]};Ze({id:{type:String,default:""},customClass:{type:String,default:""},customStyle:{type:String,default:""},editor:{type:Object,default:{}},label:{type:String,default:""},modelValue:{type:[String,Boolean,Array,Number]},visible:{type:Boolean,default:!0},required:{type:Boolean,default:!1},showLabel:{type:Boolean,default:!0},showLabelType:{type:String,default:"visible"},type:{type:String,default:"input-group"},componentId:{type:String,default:""},errors:{type:Object,default:null}},Yt,xt,void 0),Ze({id:{type:String,default:""},editor:{type:Object,default:{}},modelValue:{type:[String,Boolean,Array,Number]},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1}},Yt,xt,void 0);const ao={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/grid-field-editor.schema.json",title:"response-form-layout-setting",description:"A Farris Data Grid Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"response-form-layout-setting"},initialState:{description:"",type:"object"}},required:["id","type"]},so={initialState:{type:Object,default:{uniqueColClassInSM:12,uniqueColClassInMD:6,uniqueColClassInLG:3,uniqueColClassInEL:2}}};Ye.createPropsResolver(so,ao,to,io);const lo={width:{Type:Number,default:400},type:{Type:String,default:"info"},title:{Type:String,default:""},detail:{Type:String,default:""},okButtonText:{Type:String,default:"确定"},showOkButton:{Type:Boolean,default:!0},showCancelButton:{Type:Boolean,default:!0},cancelButtonText:{Type:String,default:"取消"},exceptionInfo:{Type:Object,default:null},promptEditorType:{Type:String,default:"text-area"},buttons:{type:Object,default:[]}};function St(){return new DOMException("The request is not allowed","NotAllowedError")}async function co(n){if(!navigator.clipboard)throw St();return navigator.clipboard.writeText(n)}async function uo(n){const e=document.createElement("span");e.textContent=n,e.style.whiteSpace="pre",e.style.webkitUserSelect="auto",e.style.userSelect="all",document.body.appendChild(e);const t=window.getSelection(),o=window.document.createRange();t==null||t.removeAllRanges(),o.selectNode(e),t==null||t.addRange(o);let i=!1;try{i=window.document.execCommand("copy")}finally{t==null||t.removeAllRanges(),window.document.body.removeChild(e)}if(!i)throw St()}async function fo(n){try{await co(n)}catch(e){try{await uo(n)}catch(t){throw t||e||St()}}}function po(){async function n(e){await fo(e)}return{onCopy:n}}function mo(n,e,t,o){const i=r.ref(14),s=r.ref(140),a=r.ref(""),d=r.ref(o.value.length),c=r.computed(()=>o.value),u=r.computed(()=>({"font-size":`${i.value}px`,height:"100%"}));function m(l){if(l.currentTarget){const g=l.currentTarget.value||"";d.value=g.length}}return()=>r.createVNode(r.Fragment,null,[r.createVNode("textarea",{title:"promptMessage",name:"promptMessage",class:"form-control",style:u.value,rows:"4",maxlength:s.value,onInput:l=>m(l)},[c.value]),r.createVNode("span",{class:"textarea-wordcount",title:a.value,style:"position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"},[d.value+" / "+s.value])])}function go(n,e,t,o){const i=mo(n,e,t,o),s=new Map([["text-area",i]]);function a(d){return s.get(d)||null}return{getEditorRender:a}}function ho(){const n=r.ref(!1),e=r.ref("复制成功");return{feedbackStyle:r.computed(()=>{const o={position:"absolute",left:"50%",top:"50%","min-width":"100px",height:"40px",background:"#303C53","line-height":"40px","text-align":"center","margin-left":"-30px","margin-top":"-50px","border-radius":"10px","box-shadow":"0px 2px 8px 0px",color:"#fff",transition:"all .3s ease",padding:"0 10px"};return o.opacity=n.value?"0.8":"0",o.display=n.value?"":"none",o}),feedbackMessage:e,toShowFeedback:n}}function vo(n,e){const t=e.getEditorRender(n.promptEditorType);return()=>t&&t()}function yo(n,e){function t(f){if(f==null)return 0;let p=0;for(let h=0;h<f.length;h++){const w=f.charCodeAt(h);w>=0&&w<=128?p++:p=p+2}return p}function o(f,p){if(f!==""&&f!==void 0&&f!==null){f=""+f;const h=f.length;let w="",T=0;for(let M=0;M<h;M++){const $=f.charAt(M);if(T++,encodeURI($).length>4&&T++,w=w.concat($),T>=p)return w=w.concat("..."),w}if(T<p)return f}return""}const i=r.computed(()=>!!n.value&&!!n.value.date),s=r.computed(()=>{const f=n.value&&n.value.date||"";return`${e.exception.happend} : ${f}`}),a=r.computed(()=>!!n.value&&!!n.value.detail),d=r.computed(()=>n.value?t(n.value.detail)>160:!1),c=r.ref(!1),u=r.computed(()=>c.value?e.exception.collapse:e.exception.expand),m=r.computed(()=>{const f=e.exception.detail+" : "+(n.value&&n.value.detail)||"";return c.value?f:o(f,160)}),l=r.computed(()=>({position:"absolute",right:0,bottom:c.value?0:"2px",color:"#2A87FF",cursor:"pointer"}));function g(){c.value=!c.value}return()=>r.createVNode("div",{class:"toast-msg-detail"},[i.value&&r.createVNode("div",null,[s.value]),a.value&&r.createVNode("div",{class:"exception_wrap"},[r.createVNode("div",{class:"exception_error_msg"},[r.createVNode("div",{innerHTML:m.value},null),d.value&&r.createVNode("span",{style:l.value,onClick:g},[u.value])])])])}function bo(n){return()=>r.createVNode("p",{class:"toast-msg-detail",innerHTML:n.value},null)}function Co(n,e,t,o,i){const s=r.ref(n.exceptionInfo),a=r.computed(()=>{const p=e.value==="question"?"warning":e.value,h={"f-icon":!0},w=`f-icon-${p}`;return h[w]=!0,h}),d=r.computed(()=>t.value||s.value&&s.value.message),c=r.computed(()=>o.value),u=r.computed(()=>!!o.value),m=r.computed(()=>!!s.value);function l(){return m.value?yo(s,i):u.value?bo(c):()=>null}const g=l(),f=r.computed(()=>i.locale==="en"?{wordBreak:"keep-all",overflowWrap:"break-word"}:{});return()=>r.createVNode(r.Fragment,null,[r.createVNode("div",{class:"float-left modal-tips-iconwrap"},[r.createVNode("span",{class:a.value},null)]),r.createVNode("div",{class:"modal-tips-content"},[r.createVNode("p",{class:"toast-msg-title",innerHTML:d.value,style:f.value},null),g()])])}function wo(n,e,t,o){const{onCopy:i}=e,{toShowFeedback:s}=t,a=r.ref(o.exception.copySuccess||"复制成功"),d=r.ref(o.exception.copy||"复制详细信息"),c=r.ref(n.exceptionInfo||{date:"",message:"",detail:""}),u=r.computed(()=>c.value&&c.value.detail||"");function m(l){i(u.value).catch(g=>{a.value=o.exception.copyFailed||"复制失败"}).finally(()=>{s.value=!0,setTimeout(()=>{s.value=!1},700)})}return()=>r.createVNode("span",{style:"width: 100%;color: #2A87FF;padding-left: 37px;"},[r.createVNode("span",{onClick:m,style:"cursor: pointer;"},[d.value])])}function xo(n,e,t,o,i){const s=r.ref(n.type),a=r.ref(n.buttons),d=r.ref(n.exceptionInfo),c=r.ref(i.ok||n.okButtonText),u=r.ref(i.cancel||n.cancelButtonText),m=r.ref(n.showCancelButton),l=r.ref(n.showOkButton),g=r.computed(()=>!!(a.value&&a.value.length)),f=r.computed(()=>d.value&&d.value.message&&d.value.detail),p=r.computed(()=>!(a.value&&a.value.length)&&(l.value||m.value)),h=wo(n,t,o,i);c.value==="关闭"?c.value=i.close:c.value==="知道了"&&(c.value=i.exception.roger);function w(M){s.value==="question"&&e.emit("reject"),e.emit("close")}function T(M){s.value==="question"&&e.emit("accept"),e.emit("close")}return()=>r.createVNode("div",{class:"modal-footer"},[f.value&&h(),p.value&&m.value&&r.createVNode("button",{type:"button",class:"btn btn-secondary btn-lg",onClick:w},[u.value]),p.value&&l.value&&r.createVNode("button",{type:"button",class:"btn btn-primary btn-lg",onClick:T},[c.value]),g.value&&a.value.length&&a.value.map(M=>r.createVNode("button",{type:"button",onClick:M.handle,class:M.class},[M.iconClass&&r.createVNode("span",{class:M.iconClass},null),M.text]))])}function So(n){const{t:e,locale:t}=at.useI18n();function o(i,s,a){return s===a?e(i):s}return{yes:o("messageBox.yes")||"是",no:o("messageBox.no")||"否",close:o("messageBox.close")||"关闭",ok:o("messageBox.ok",n.okButtonText,"确定")||"确定",cancel:o("messageBox.cancel",n.cancelButtonText,"取消")||"取消",title:o("messageBox.title")||"系统提示",errorTitle:o("messageBox.errorTitle")||"错误提示",exception:{expand:o("messageBox.exception.expand")||"展开",collapse:o("messageBox.exception.collapse")||"收起",happend:o("messageBox.exception.happend")||"发生时间",detail:o("messageBox.exception.detail")||"详细信息",copy:o("messageBox.exception.copy")||"复制详细信息",copySuccess:o("messageBox.exception.copySuccess")||"复制成功",copyFailed:o("messageBox.exception.copyFailed")||"复制失败",roger:o("messageBox.exception.roger")||"知道了"},locale:t.value}}const mt=r.defineComponent({name:"FMessageBox",props:lo,emits:["accept","reject","close"],setup(n,e){const t=So(n),o=r.ref(n.type),i=r.ref(n.title),s=r.ref(n.detail),a=r.computed(()=>{const T={"modal-tips":!0,"d-flex":!0,"flex-row":!0},M=`messager-type-${o.value}`;return T[M]=!0,T}),d=r.computed(()=>{const T={cursor:"default"};return o.value==="prompt"?T.padding="0.5rem 0.5rem 1rem 1.5rem":o.value==="error"&&(T.padding="0.5rem 1.5rem 1rem 1.5rem"),T}),c=po(),u=go(n,o,i,s),m=ho(),{feedbackStyle:l,feedbackMessage:g}=m;g.value=t.exception.copySuccess;function f(){return r.createVNode("div",{style:l.value},[g.value])}function p(){switch(o.value){case"prompt":return vo(n,u);default:return Co(n,o,i,s,t)}}const h=p(),w=xo(n,e,c,m,t);return()=>r.createVNode("div",{class:"farris-messager"},[!n.exceptionInfo&&r.createVNode("div",{style:"height: 30px;width: 100%;position: absolute;",class:"messager-draggable"},null),r.createVNode("section",{class:a.value,style:d.value},[h()]),w(),f()])}}),Ao={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/modal.schema.json",title:"modal",description:"弹窗组件",type:"object",properties:{id:{description:"组件唯一标识",type:"string"},type:{description:"组件类型",type:"string",default:"modal"},appearance:{description:"组件外观",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},name:{description:"名称",type:"string",default:null},title:{description:"标题",type:"string"},width:{description:"窗口宽度",type:"number",default:900},height:{description:"窗口高度",type:"number",default:600},contents:{description:"弹窗子组件集合",type:"array",default:[]},modelValue:{description:"是否显示",type:"boolean",default:!1},showCloseButton:{description:"显示关闭按钮",type:"boolean",default:!0},showMaxButton:{description:"显示最大化按钮",type:"boolean",default:!0},enableEsc:{description:"允许ESC关闭",type:"boolean",default:!0},resizeable:{description:"允许调整窗口尺寸",type:"boolean",default:!0},fitContent:{description:"是否自适应",type:"boolean",default:!1},showButtons:{description:"是否显示底部按钮",type:"boolean",default:!0},mask:{description:"是否模态",type:"boolean",default:!0},draggable:{description:"是否允许拖拽调整位置",type:"boolean",default:!0},onAccept:{description:"确定事件",type:"object",default:null},onCancel:{description:"取消事件",type:"object",default:null},beforeClose:{description:"关闭前回调",type:"object",default:null}},required:["id","type"],events:{onAccept:"确定事件",onCancel:"取消事件",beforeClose:"关闭前回调"}},To=new Map([["appearance",Ye.resolveAppearance]]);function Fo(n,e,t){return e}function Mo(){function n(e,t){const o={};return o.beforeClose=i=>t.call("beforeClose",[i,e]),o}return{resolve:n}}const Zt={allowClickMaskToClose:{type:Boolean,default:!1},beforeClose:{type:Function,default:()=>!0},class:{type:String,default:""},maskClass:{type:String,default:""},title:{type:String,default:""},width:{type:Number,default:500},height:{type:Number,default:320},buttons:{type:Array,default:[]},modelValue:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!0},fitContent:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},showMaxButton:{type:Boolean,default:!1},minHeight:{type:Number},maxHeight:{type:Number},minWidth:{type:Number},maxWidth:{type:Number},containment:{type:Object,default:null},resizeable:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},dragHandle:{type:Object,default:null},closedCallback:{type:Function,default:null},resizeHandle:{type:Function,default:null},render:{type:Function,default:null},acceptCallback:{type:Function,default:null},rejectCallback:{type:Function,default:null},enableEsc:{type:Boolean,default:!0},enableEnter:{type:Boolean,default:!1},dialogType:{type:String,default:""},src:{type:String,default:""},footerHeight:{type:Number,default:60},host:{type:Object,default:"body"}},Eo=Ye.createPropsResolver(Zt,Ao,To,Fo),jo=Mo();class ae{constructor(e,t){this.x=e,this.y=t}static getTransformInfo(e){const o=window.getComputedStyle(e).getPropertyValue("transform").replace(/[^-\d,]/g,"").split(",");if(o.length>=6){const i=parseInt(o[4],10),s=parseInt(o[5],10);return{x:i,y:s}}return{x:0,y:0}}static fromEvent(e,t=null){if(this.isMouseEvent(e))return new ae(e.clientX,e.clientY);if(t===null||e.changedTouches.length===1)return new ae(e.changedTouches[0].clientX,e.changedTouches[0].clientY);for(let o=0;o<e.changedTouches.length;o++)if(e.changedTouches[o].target===t)return new ae(e.changedTouches[o].clientX,e.changedTouches[o].clientY)}static isMouseEvent(e){return Object.prototype.toString.apply(e).indexOf("MouseEvent")===8}static isIPosition(e){return!!e&&"x"in e&&"y"in e}static getCurrent(e){const t=new ae(0,0);if(window){const o=window.getComputedStyle(e);if(o){const i=parseInt(o.getPropertyValue("left"),10),s=parseInt(o.getPropertyValue("top"),10);t.x=isNaN(i)?0:i,t.y=isNaN(s)?0:s}return t}return null}static copy(e){return new ae(0,0).set(e)}get value(){return{x:this.x,y:this.y}}add(e){return this.x+=e.x,this.y+=e.y,this}subtract(e){return this.x-=e.x,this.y-=e.y,this}multiply(e){this.x*=e,this.y*=e}divide(e){this.x/=e,this.y/=e}reset(){return this.x=0,this.y=0,this}set(e){return this.x=e.x,this.y=e.y,this}}class Re{constructor(e,t){this.width=e,this.height=t}static getCurrent(e){const t=new Re(0,0);if(window){const o=window.getComputedStyle(e);return o&&(t.width=parseInt(o.getPropertyValue("width"),10),t.height=parseInt(o.getPropertyValue("height"),10)),t}return null}static copy(e){return new Re(0,0).set(e)}set(e){return this.width=e.width,this.height=e.height,this}}function No(n,e){const t=r.ref(),o=r.ref(),i=r.ref(),s=r.ref(),a=r.ref(),d=r.ref(),c=r.ref(),u=r.ref(),m=r.ref(),l=r.ref(),g=r.ref(),f=r.ref(n.resizeable),p=r.ref(),h=r.ref(n.draggable),w=r.ref(!1);function T(){const P=o.value||document.body,B=window.getComputedStyle(P);if(!B||!t.value)return;const W=ae.getTransformInfo(t.value),D={};c.value&&(D.deltaL=t.value.offsetLeft-c.value.x,D.deltaT=t.value.offsetTop-c.value.y);const ee=B.getPropertyValue("position");D.width=P.clientWidth,D.height=P.clientHeight,D.pr=parseInt(B.getPropertyValue("padding-right"),10),D.pb=parseInt(B.getPropertyValue("padding-bottom"),10),D.position=B.getPropertyValue("position"),ee==="static"&&(P.style.position="relative"),D.translateX=W.x,D.translateY=W.y,l.value=D}function M(P){if(t.value){s.value=Re.getCurrent(t.value),a.value=ae.getCurrent(t.value),d.value=s.value?Re.copy(s.value):null,c.value=a.value?ae.copy(a.value):null,T();const B=P.target.getAttribute("type")||"";u.value={n:!!B.match(/n/),s:!!B.match(/s/),w:!!B.match(/w/),e:!!B.match(/e/)}}}function $(){var P,B,W,D;if(t.value){const ee=t.value;u.value&&((u.value.n||u.value.s)&&((P=d.value)!=null&&P.height)&&(ee.style.height=d.value.height+"px"),(u.value.w||u.value.e)&&((B=d.value)!=null&&B.width)&&(ee.style.width=d.value.width+"px"),c.value&&((W=c.value)!=null&&W.x&&(ee.style.left=c.value.x+"px"),(D=c.value)!=null&&D.y&&(ee.style.top=c.value.y+"px")))}}function S(){const P=n.minHeight?n.minHeight:1,B=n.minWidth?n.minWidth:1;d.value&&c.value&&u.value&&s.value&&(d.value.height<P&&(d.value.height=P,u.value.n&&a.value&&(c.value.y=a.value.y+(s.value.height-P))),d.value.width<B&&(d.value.width=B,u.value.w&&a.value&&(c.value.x=a.value.x+(s.value.width-B))),n.maxHeight&&d.value.height>n.maxHeight&&(d.value.height=n.maxHeight,a.value&&u.value.n&&(c.value.y=a.value.y+(s.value.height-n.maxHeight))),n.maxWidth&&d.value.width>n.maxWidth&&(d.value.width=n.maxWidth,u.value.w&&a.value&&(c.value.x=a.value.x+(s.value.width-n.maxWidth))))}function v(){if(o.value){const P=l.value;if(c.value&&d.value&&u.value&&s.value){const B=P.width-P.pr-P.deltaL-P.translateX-c.value.x,W=P.height-P.pb-P.deltaT-P.translateY-c.value.y;u.value.n&&c.value.y+P.translateY<0&&a.value&&(c.value.y=-P.translateY,d.value.height=s.value.height+a.value.y+P.translateY),u.value.w&&c.value.x+P.translateX<0&&a.value&&(c.value.x=-P.translateX,d.value.width=s.value.width+a.value.x+P.translateX),d.value.width>B&&(d.value.width=B),d.value.height>W&&(d.value.height=W)}}}function y(P){if(!i.value||!s.value||!a.value||!u.value)return;P.subtract(i.value);const B=P.x,W=P.y;u.value.n?(c.value.y=a.value.y+W,d.value.height=s.value.height-W):u.value.s&&(d.value.height=s.value.height+W),u.value.e?d.value.width=s.value.width+B:u.value.w&&(d.value.width=s.value.width-B,c.value.x=a.value.x+B),v(),S(),$()}function F(P){if(!m.value)return;const B=ae.fromEvent(P);B&&y(B)}function A(){if(t.value){const{width:P,height:B,x:W,y:D}=t.value.getBoundingClientRect(),ee=ae.getTransformInfo(t.value);return{size:{width:P,height:B},position:{x:W-ee.x,y:D-ee.y}}}return null}function x(P){if(t.value){const B=A();g.value=B}i.value=void 0,s.value=null,a.value=null,d.value=null,c.value=null,u.value=null,m.value=null,document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",x)}function N(){document.addEventListener("mousemove",F),document.addEventListener("mouseup",x)}function C(P){P instanceof MouseEvent&&P.button===2||h.value&&(document.body.click(),P.stopPropagation(),P.preventDefault(),i.value=ae.fromEvent(P),m.value=P.target,M(P),N())}function E(P){return t.value=P,f.value&&r.createVNode(r.Fragment,null,[r.createVNode("div",{class:"fv-resizable-handle fv-resizable-n",type:"n",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-e",type:"e",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-s",type:"s",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-w",type:"w",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-ne",type:"ne",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-se fv-resizable-diagonal",type:"se",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-sw",type:"sw",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-nw",type:"nw",onMousedown:B=>C(B)},null)])}function k(P=!0){document.body.click();const B=o.value||document.body,W=Re.getCurrent(B),D=t.value;P&&D&&(p.value=A(),p.value.transform=D.style.transform),W&&D&&(d.value=W,d.value.height-=14,d.value.width-=14,D.style.height=d.value.height+"px",D.style.width=d.value.width+"px",D.style.left="7px",D.style.top="7px",D.style.transform="",g.value={size:d.value,position:{x:0,y:0}},h.value=!1,w.value=!0)}function V(){var P,B;if(document.body.click(),p.value){const W={width:p.value.size.width||0,height:p.value.size.height||0},D={x:(window.innerWidth-W.width)/2,y:(window.innerHeight-W.height)/2};(P=d.value)==null||P.set(W),(B=c.value)==null||B.set(D);const ee=t.value;ee.style.height=W.height+"px",ee.style.width=W.width+"px",ee.style.left=`${D.x}px`,ee.style.top=`${D.y}px`,ee.style.transform="",g.value={size:W,position:D},h.value=n.draggable,w.value=!1}}function R(){if(t.value){const P=Re.getCurrent(t.value);if(P){const{width:B,height:W}=P;t.value.style.left=`${(window.innerWidth-B)/2}px`,t.value.style.top=`${(window.innerHeight-W)/2}px`,t.value.style.transform=""}}}function U(){const P=()=>{w.value?k(!1):R(),document.body.click()};return window.addEventListener("resize",P),()=>{window.removeEventListener("resize",P)}}const K=U();return{renderResizeBar:E,boundingElement:o,resizedEventParam:g,maximize:k,restore:V,allowDrag:h,isMaximized:w,unWindowResizeHandle:K,moveToCenter:R}}function Bo(n,e,t){const o=r.ref(),i=r.ref(n.draggable),s=r.ref(n.lockAxis),a=r.ref(),d=r.ref(),c=r.ref(!1),u=r.ref(new ae(0,0)),m=r.ref(new ae(0,0)),l=r.ref(new ae(0,0)),g=r.ref(new ae(0,0));r.watch(()=>t.value,F=>{a.value.style.cursor=F?"move":"default"});function f(F,A){if(A.tagName==="BUTTON")return!1;if(A===F)return!0;for(const x in A.children)if(Object.prototype.hasOwnProperty.call(A.children,x)&&f(F,A.children[x]))return!0;return!1}function p(){var N,C;let F=l.value.x+m.value.x,A=l.value.y+m.value.y;s.value==="x"?(F=((N=u.value)==null?void 0:N.x)||0,l.value.x=0):s.value==="y"&&(A=((C=u.value)==null?void 0:C.y)||0,l.value.y=0);const x=`translate3d(${Math.round(F)}px, ${Math.round(A)}px, 0px)`;o.value&&(o.value.style.transform=x),g.value.x=F,g.value.y=A}function h(){if(!d.value||!o.value)return null;const F=d.value.getBoundingClientRect(),A=o.value.getBoundingClientRect(),x={top:F.top<A.top,right:F.right>A.right,bottom:F.bottom>A.bottom,left:F.left<A.left};return x.top||(l.value.y-=A.top-F.top),x.bottom||(l.value.y-=A.bottom-F.bottom),x.right||(l.value.x-=A.right-F.right),x.left||(l.value.x-=A.left-F.left),p(),x}function w(F){F&&(u.value&&F.subtract(u.value),l.value.set(F),p(),h())}function T(F){c.value&&i.value&&(F.stopPropagation(),F.preventDefault(),w(ae.fromEvent(F,a.value)))}function M(){var F;c.value&&(c.value=!1,m.value.add(l.value),l.value.reset(),(F=o.value)==null||F.classList.remove("ng-dragging"),e.emit("stopMove"),document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",M))}function $(){!c.value&&a.value&&(c.value=!0,a.value.classList.add("ng-dragging"),document.addEventListener("mousemove",T),document.addEventListener("mouseup",M))}function S(){if(o.value){const F=ae.getTransformInfo(o.value);m.value.set(F);return}m.value.reset()}function v(F){if(!t.value||F instanceof MouseEvent&&F.button===2)return;const A=F.target||F.srcElement;a.value!==void 0&&A&&!f(A,a.value)||i.value!==!1&&(document.body.click(),F.stopPropagation(),F.preventDefault(),u.value=ae.fromEvent(F,o.value),S(),$())}function y(F,A,x){if(i.value&&A){if(F)a.value=F;else if(n.dragHandle){if(n.dragHandle instanceof HTMLElement)a.value=n.dragHandle;else if(typeof n.dragHandle=="string"){const N=A.querySelector(n.dragHandle);N&&(a.value=N)}}o.value=A,d.value=x,a.value?(a.value.classList.add("ng-draggable"),a.value.addEventListener("mousedown",v)):i.value=!1}}return{registerDraggle:y,resetTranslate:S}}function Jt(n,e){if(n){const t=o=>{o.key.toLowerCase()===n.toLowerCase()&&e({event:o,key:n})};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}}function ko(n,e){const t=r.ref(n.enableEsc);let o=null;return t.value?(o=Jt("Escape",i=>{e.emit("esc",{event:i.event,type:"esc"})}),{remove:o}):null}function Vo(n,e){const t=r.ref(n.enableEnter);let o=null;return t.value?(o=Jt("Enter",i=>{e.emit("enter",{event:i.event,type:"enter"})}),{remove:o}):null}const qe=r.defineComponent({name:"FModal",props:Zt,emits:["update:modelValue","accept","cancel","closed","resize","esc","enter","stopMove"],setup(n,e){const t=r.ref(n.width||300),o=r.ref(n.height||200),i=r.ref(n.modelValue),s=r.ref(""),a=r.ref(n.class),d=r.ref(n.fitContent),c=r.ref(n.showHeader),u=r.ref(""),m=r.ref(n.showCloseButton),l=r.ref(n.showMaxButton),g=r.ref(!1),f=r.ref(n.dialogType),p=r.ref(n.src),h=r.ref(""),w=r.ref(n.showButtons),T=r.ref(n.title),M=r.ref(n.containment||null),$=r.ref(),{t:S}=at.useI18n();T.value==="错误提示"&&(T.value=S("messageBox.errorTitle"));const v=r.ref(!1);function y(j,Y){const se=Y?"accept":"cancel";Promise.resolve().then(()=>{var le;return(le=n.beforeClose)==null?void 0:le.call(n,{closeType:se})}).then(le=>{le&&(i.value=!1,e.emit("update:modelValue",!1),Y!=null&&e.emit(Y?"accept":"cancel"),e.emit("closed",j))})}const F=[{name:"cancel",text:S("messageBox.cancel")||"取消",class:"btn btn-secondary",handle:j=>{y(j,!1)}},{name:"accept",text:S("messageBox.ok")||"确定",class:"btn btn-primary",handle:j=>{y(j,!0)}}],A=r.ref(n.buttons&&n.buttons.length?n.buttons:F),x=r.computed(()=>!!u.value),N=r.computed(()=>!!w.value&&!!A.value),C=r.ref(),E=r.ref(),k=r.ref(!1),{renderResizeBar:V,maximize:R,restore:U,boundingElement:K,resizedEventParam:P,allowDrag:B,unWindowResizeHandle:W,moveToCenter:D}=No(n),{registerDraggle:ee}=Bo(n,e,B);function he(){return!!document.querySelectorAll(".farris-modal").length&&document.body.classList.contains("modal-open")}function ve(){const j=document.querySelectorAll(".farris-modal").length;(!j||j-1<=0)&&document.body.classList.remove("modal-open"),$.value&&$.value.classList.remove("show")}r.watch(()=>n.title,(j,Y)=>{j!==Y&&(T.value=j)}),r.watch(()=>n.modelValue,(j,Y)=>{j!==Y&&(i.value=j,i.value&&n.draggable&&r.nextTick(()=>{E.value&&!M.value&&(M.value=E.value.parentElement,K.value=M.value,ee(C.value,E.value,K.value),D())}),j||(M.value&&(M.value=null),ve())),i.value?v.value=he():(k.value=!1,B.value=n.draggable)}),r.watch(()=>n.showHeader,(j,Y)=>{j!==Y&&(c.value=j)}),r.watch(()=>n.showButtons,(j,Y)=>{j!==Y&&(w.value=j)}),r.watch(()=>P.value,(j,Y)=>{const se=j||{},le=Y||{};JSON.stringify(se)!==JSON.stringify(le)&&e.emit("resize",{newSize:j,oldSize:Y,isMaximized:k.value})});const _=r.computed(()=>(i.value&&document.body.classList.add("modal-open"),i.value)),re=r.computed(()=>{var se;const j={modal:!0,"farris-modal":!0,fade:!0};j["f-modal-fitContent"]=!!d.value,j.show=!!_.value;const Y=(se=n.maskClass)==null?void 0:se.split(" ");return Y==null||Y.reduce((le,Oe)=>(le[Oe]=!0,le),j),j}),ce=r.computed(()=>{var se;const j={"modal-dialog":!0},Y=(se=a.value)==null?void 0:se.split(" ");return Y==null||Y.reduce((le,Oe)=>(le[Oe]=!0,le),j),j}),te=r.computed(()=>{const j={position:"absolute",top:`${(window.innerHeight-o.value)/2}px`,left:`${(window.innerWidth-t.value)/2}px`,width:`${t.value}px`,height:d.value?"auto":`${o.value}px`};return n.mask||(j.pointerEvents="auto"),j}),L=r.computed(()=>{const j={display:"block"};return n.mask||(j.pointerEvents="none",j.backgroundColor="transparent"),v.value&&(j.backgroundColor="transparent"),j}),ne=r.computed(()=>({"modal-content":!0,"modal-content-has-header":c.value})),$e=r.computed(()=>{const j={display:c.value?"":"none"};return j["pointer-events"]=B.value?"auto":"none",j}),Be=r.computed(()=>({"f-icon":!0,modal_maximize:!0,modalrevert:k.value})),Te=r.computed(()=>({"modal-body":!0,"f-utils-flex-column":f.value==="iframe","f-utils-fill":!0}));function _e(){return{height:`${n.footerHeight||60}px`}}const De=r.computed(()=>{const j={textAlgin:h.value},Y=_e();return Object.assign(j,Y)});function He(j){if(j==null||j.stopPropagation(),k.value){k.value=!1,U();return}R(),k.value=!0}async function ue(j,Y){j.handle&&await j.handle(Y,j)&&e.emit("closed",Y)}function Ke(j){j.width&&(t.value=j.width),j.height&&(o.value=j.height),j.buttons&&(A.value=j.buttons),j.title&&(T.value=j.title)}let Fe=null,ke=null;r.onBeforeMount(()=>{v.value=he()}),r.onMounted(()=>{E.value&&!M.value&&(M.value=E.value.parentElement,K.value=M.value,ee(C.value,E.value,K.value)),_.value&&document.body.classList.add("modal-open"),Fe=ko(n,e),ke=Vo(n,e)}),r.onUnmounted(()=>{W&&W(),Fe&&Fe.remove(),ke&&ke.remove()}),e.expose({modalElementRef:E,updateModalOptions:Ke,close:y,maxDialog:He,isMaximized:k});function Ve(){return r.createVNode("ul",null,[g.value&&r.createVNode("li",{class:"f-btn-icon f-bare"},[r.createVNode("span",{class:"f-icon modal_minimize"},null)]),l.value&&r.createVNode("li",{onClick:He,class:"f-btn-icon f-bare",style:"pointer-events: auto;"},[r.createVNode("span",{class:Be.value},null)]),m.value&&r.createVNode("li",{class:"f-btn-icon f-bare",onClick:j=>y(j,!1),style:"pointer-events: auto;"},[r.createVNode("span",{class:"f-icon modal_close"},null)])])}function Ie(){return r.createVNode("div",{class:"modal-footer",style:De.value},[A.value&&A.value.map(j=>{const Y=r.ref(j.disabled);return r.createVNode("button",{name:j.name,type:"button",disabled:Y.value,class:j.class+(j.iconClass?" btn-icontext":""),onClick:se=>{ue(j,se)}},[!!j.iconClass&&r.createVNode("i",{class:j.iconClass},null),j.text])})])}function et(){return r.createVNode("div",{ref:C,class:"modal-header",style:$e.value},[e.slots.headerTemplate?e.slots.headerTemplate():r.createVNode("div",{class:"modal-title"},[x.value&&r.createVNode("span",{class:u.value,style:"margin-right: 8px"},null),r.createVNode("span",{class:"modal-title-label"},[T.value])]),r.createVNode("div",{class:"actions"},[Ve()])])}function Le(){return e.slots.footerTemplate?e.slots.footerTemplate():N.value&&Ie()}function je(j){if(j.stopPropagation(),n.allowClickMaskToClose){if(j.target!==$.value)return;y(j,!1)}}function Pe(){var j,Y;return r.createVNode("div",{id:s.value,class:ce.value,style:te.value,ref:E},[r.createVNode("div",{class:ne.value},[c.value&&et(),r.createVNode("div",{class:Te.value},[(Y=(j=e.slots).default)==null?void 0:Y.call(j),f.value==="iframe"&&r.createVNode("iframe",{title:s.value,class:"f-utils-fill",width:"100%",frameborder:"0",src:p.value},null)]),Le()]),!d.value&&E.value&&!k.value&&V(E.value)])}function Xe(j){return j||"body"}return()=>r.createVNode(r.Teleport,{to:Xe(n.host)},{default:()=>[_.value&&r.createVNode(r.Transition,{name:"fade",appear:!0},{default:()=>[r.createVNode("div",{ref:$,class:re.value,style:L.value,onClick:je},[Pe()])]})]})}});function Kt(n){if(n.content&&n.content.render)return n.content.render;if(n.render&&typeof n.render=="function")return n.render}function Io(n){const e=document.createElement("div");e.style.display="contents";const t=r.createApp({setup(o,i){r.onUnmounted(()=>{document.body.removeChild(e)});const s=r.ref(),a=r.ref(n.class||""),d=r.ref(!!n.showButtons),c=r.ref(!!n.showHeader),u=r.ref(n.showCloseButton==null?!0:n.showCloseButton),m=r.ref(!0),l=r.ref(n.title||""),g=n.acceptCallback||(()=>{}),f=n.rejectCallback||(()=>{}),p=n.closedCallback||($=>{}),h=n.resizeHandle||($=>{}),w=n.stopMoveHandle||($=>{}),T=Kt(n),M=$=>{m.value=!1,t.unmount(),p($)};return r.onMounted(()=>{}),i.expose({modalRef:s}),()=>r.createVNode(qe,{ref:s,class:a.value,modelValue:m.value,"onUpdate:modelValue":$=>m.value=$,title:l.value,width:n.width,height:n.height,buttons:n.buttons,"show-header":c.value,"show-buttons":d.value,"show-close-button":u.value,"show-max-button":!1,onAccept:g,onCancel:f,fitContent:n.fitContent==null?!0:n.fitContent,onClosed:M,onResize:h,onStopMove:w},{default:()=>[T&&T(t)]})}});return document.body.appendChild(e),t.use(st.LocaleService.i18n),t.mount(e),t}class en{constructor(e){G(this,"appContext",null);G(this,"modalRef",r.ref());G(this,"activeModalIndex",r.ref(0));G(this,"modalRefs",{});G(this,"isUseEscCloseModal",r.ref(!1));G(this,"activeModalInstance",r.computed(()=>this.modalRefs[this.activeModalIndex.value]));this.app=e,this.appContext=e?e._context:null}getCurrentModal(){return this.activeModalInstance.value}adaptToWindow(e,t){const{width:o,height:i}={width:window.innerWidth,height:window.innerHeight};return o<e&&(e=o-14),i<t&&(t=i-14),{width:e,height:t}}static show(e){const t=Object.assign({title:"",showButtons:!0,showHeader:!0},e);return Io(t)}close(e){var t,o;e?(o=e.value)==null||o.close():(t=this.getCurrentModal())==null||t.close()}open(e){const t=document.createDocumentFragment();e.showMaxButton&&e.fitContent&&(e.showMaxButton=!1);const o=r.shallowRef(Object.assign({title:"",showButtons:!0,showHeader:!0},e)),i=r.ref(!0),s=o.value.acceptCallback||(()=>{}),a=o.value.rejectCallback||(()=>{}),d=o.value.closedCallback||((v,y)=>{}),c=o.value.resizeHandle||(v=>{}),u=e.stopMoveHandle||(v=>{});let m;const l=Kt(o.value),g=v=>{var F;i.value=!1;const y=(F=v==null?void 0:v.target)==null?void 0:F.classList.contains("modal_close");d(v,this.isUseEscCloseModal.value?"esc":y?"icon":"button")},f=v=>{g(v),m&&r.nextTick(()=>{if(this.modalRefs[this.activeModalIndex.value]&&delete this.modalRefs[this.activeModalIndex.value],r.render(null,t),m=null,this.modalRef.value=null,this.modalRefs){const y=Object.keys(this.modalRefs).map(F=>Number(F));y.length>0?this.activeModalIndex.value=Math.max(...y):this.activeModalIndex.value=0}this.isUseEscCloseModal.value=!1})},p=v=>{var y;this.isUseEscCloseModal.value=!0,this.activeModalInstance&&((y=this.activeModalInstance.value)==null||y.close(v==null?void 0:v.event))},{width:h,height:w}=o.value,T=this.adaptToWindow(h||500,w||320);Object.assign(o.value,T);const M=()=>r.createVNode(qe,r.mergeProps({ref:this.modalRef,modelValue:i.value,"onUpdate:modelValue":v=>i.value=v},o.value,{onAccept:s,onCancel:a,onClosed:f,onResize:c,onEsc:p,onStopMove:u}),{default:()=>[l&&l(this.app)]});return m=(v=>{const y=r.h(M,v);return y.appContext=this.appContext,r.render(y,t),y})({...o.value}),this.activeModalIndex.value++,this.modalRefs[this.activeModalIndex.value]=this.modalRef.value,{update:v=>{o.value={...o.value,...v},m&&r.render(r.cloneVNode(m,{...o}),t)},destroy:f,modalRef:this.activeModalInstance,close:()=>this.close()}}}const Po=Symbol("FModalService");qe.install=n=>{n.component(qe.name,qe);const e=new en(n);n.provide(Po,e),n.provide("FModalService",e)},qe.register=(n,e,t,o)=>{n.modal=qe,e.modal=Eo,o.modal={callbackResolver:jo}};const Ae=class Ae{static show(e){const t=r.reactive({...e}),o=!1,i=t.type==="error"||t.type==="prompt",s=t.type==="error"?"错误提示":t.type==="prompt"&&t.title||"",a=t.acceptCallback||(()=>{}),d=t.rejectCallback||(()=>{});let c=null,u=new en(Ae.app);const m=()=>{c&&(c==null||c.destroy(),u=null)};return c=u==null?void 0:u.open({class:"modal-message modal-message-type-info",title:s,showButtons:o,showHeader:i,width:t.width||400,fitContent:!0,showMaxButton:!1,draggable:!0,dragHandle:".messager-draggable",render:()=>r.createVNode(mt,r.mergeProps(t,{onAccept:a,onReject:d,onClose:m}),null)}),u==null?void 0:u.getCurrentModal()}static info(e,t){const o=r.reactive({type:"info",title:e,detail:t,okButtonText:"知道了",showCancelButton:!1});Ae.show(o)}static warning(e,t){const o=r.reactive({type:"warning",title:e,detail:t,okButtonText:"知道了",showCancelButton:!1});Ae.show(o)}static success(e,t){const o=r.reactive({type:"success",title:e,detail:t,okButtonText:"关闭",showCancelButton:!1});Ae.show(o)}static error(e,t,o){const i=r.reactive({width:500,type:"error",okButtonText:"关闭",showCancelButton:!1,exceptionInfo:{date:o,message:e,detail:t}});Ae.show(i)}static prompt(e,t){const o=r.reactive({type:"prompt",title:e,detail:t,okButtonText:"确定",cancelButtonText:"取消"});Ae.show(o)}static question(e,t,o,i){const s=r.reactive({type:"question",title:e,detail:t,okButtonText:"确定",cancelButtonText:"取消",acceptCallback:o,rejectCallback:i});Ae.show(s)}};G(Ae,"app",null);let gt=Ae;mt.install=n=>{n.component(mt.name,mt),gt.app=n,n.provide("FMessageBoxService",gt)};class Oo extends qn{constructor(t,o){super(t,o);G(this,"responseLayoutEditorFunction");G(this,"bindingVarible");G(this,"numberEditorOptions",{type:"number-spinner",useThousands:!1,keyboard:!1,showButton:!1});this.responseLayoutEditorFunction=Dn(this.formSchemaUtils)}getCommonPropertyConfig(t,o,i="Card"){this.propertyConfig.categories.basic=this.getBasicProperties(t,o,i),this.propertyConfig.categories.appearance=this.getAppearanceProperties(t,o),this.propertyConfig.categories.behavior=this.getBehaviorConfig(t,"form-group")}getPropertyConfig(t,o){return this.getCommonPropertyConfig(t,o,"Card"),this.propertyConfig.categories.editor=this.getEditorProperties(t),this.propertyConfig.categories.expressions=this.getExpressionConfig(t,"Field"),this.propertyConfig}getGridFieldEdtiorPropConfig(t,o){return this.propertyConfig.categories={},this.getCommonPropertyConfig(t,o,"Grid"),this.getGridFieldEdtiorProperties?this.propertyConfig.categories.editor=this.getGridFieldEdtiorProperties(t):this.propertyConfig.categories.editor=this.getEditorProperties(t),this.propertyConfig.categories.expressons=this.getExpressionConfig(t,"Field"),this.propertyConfig.categories}getBasicProperties(t,o,i="Card"){const s=this;this.setDesignViewModelField(t);const{canChangeControlType:a,editorTypeList:d}=this.getAvailableEditorType(t),c={description:"Basic Information",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"编辑器类型",title:"编辑器类型",type:"string",$converter:"/converter/change-editor.converter",parentPropertyID:"editor",editor:{type:"combo-list",textField:"value",valueField:"key",idField:"key",editable:!1,data:d,readonly:!a}},label:{title:"标签",type:"string",$converter:"/converter/form-group-label.converter"},showLabelType:{description:"标签显示方式:1、显示:显示标签 2、占位:保留标签空间,但不显示文本 3、不显示:不显示标签",title:"标签显示",type:"enum",editor:{data:[{id:"visible",name:"显示"},{id:"reserve-space",name:"占位"},{id:"none",name:"不显示"}]}},binding:{description:"绑定的表单字段",title:"绑定",editor:{type:"binding-selector",bindingType:{enable:!1},editorParams:{componentSchema:t,needSyncToViewModel:!0,viewModelId:this.viewModelId,designerHostService:this.designerHostService,disableOccupiedFields:!0},textField:"bindingField"},refreshPanelAfterChanged:!0,readonly:this.formSchemaUtils.designerMode==="PC_RTC"&&!t.isRtcControl}},setPropertyRelates(u,m,l){if(u)switch(u&&u.propertyID){case"type":{s.changeControlType(t,u,o);break}case"label":{u.needRefreshControlTree=!0;break}case"binding":{s.changeBindingField(t,u,l);break}}}};return i.toLocaleLowerCase()!=="card"&&delete c.properties.showLabelType,c}checkCanChangeControlType(t,o){if(!t.binding)return!1;if(t.binding.type==="Variable"){if(this.bindingVarible=this.formSchemaUtils.getVariableById(t.binding.field),!this.bindingVarible)return!1}else if(!this.designViewModelField||this.designViewModelField.$type!==xe.FormSchemaEntityField$Type.SimpleField)return!1;return!0}getAvailableEditorType(t){var s;const o=this.checkCanChangeControlType(t,this.viewModelId);if(!o)return{canChangeControlType:!1,editorTypeList:[{key:t.editor.type,value:((s=I[t.editor.type])==null?void 0:s.name)||t.editor.type}]};let i=[];return this.designViewModelField&&this.designViewModelField.$type===xe.FormSchemaEntityField$Type.SimpleField?i=ut.getEditorTypesByMDataType(this.designViewModelField.type.name,this.designViewModelField.multiLanguage):this.bindingVarible&&(i=ut.getEditorTypesByMDataType(this.bindingVarible.type,this.designViewModelField.multiLanguage)),{canChangeControlType:o,editorTypeList:i}}changeBindingField(t,o,i){o.needRefreshEntityTree=!0}getAppearanceProperties(t,o){const i=this;return{title:"外观",description:"Appearance",properties:{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"},responseLayout:{description:"响应式列宽",title:"响应式列宽",type:"boolean",visible:!0,refreshPanelAfterChanged:!0,editor:{type:"response-layout-editor-setting",beforeOpen:()=>i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(t,i.componentId)}}},setPropertyRelates(s,a){if(s)switch(s&&s.propertyID){case"responseLayout":i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue,i.componentId||t.id),i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId),i.updateElementByParentContainer(t.id,o),delete t.responseLayout;break;case"class":i.updateUnifiedLayoutAfterControlChanged(s.propertyValue,t.id,this.componentId),ct.value++;break;case"style":{ct.value++;break}}}}}getEditorProperties(t){return this.getComponentConfig(t)}changeControlType(t,o,i){const s=o.propertyValue,a=i&&i.parent&&i.parent.schema;if(!a)return;const d=a.contents.findIndex(m=>m.id===t.id);if(d===-1)return;const c=a.contents[d];let u;if(this.designViewModelField){const g=this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find(p=>p.id===this.designViewModelField.id).fieldSchema||{};g.editor||(g.editor={}),g.editor.$type=s,this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id,g,!1),u=this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField,s)}u||(u=this.controlCreatorUtils.createFormGroupWithoutField(s)),Object.assign(u,{id:c.id,appearance:c.appearance,size:c.size,label:c.label,binding:c.binding}),Object.prototype.hasOwnProperty.call(c,"visible")&&Object.assign(u,{visible:c.visible}),c.editor&&["readonly","required","placeholder"].map(m=>{Object.prototype.hasOwnProperty.call(c.editor,m)&&(u.editor[m]=c.editor[m])}),i!=null&&i.updateContextSchema?i.updateContextSchema(u):(i.schema=Object.assign(c,u),Object.assign(t,u)),Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(m=>m.classList.remove("dgComponentSelected")),Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(m=>m.classList.remove("dgComponentFocused")),ct.value++,r.nextTick(()=>{this.getFormDesignerInstance().reloadPropertyPanel()})}getComponentConfig(t,o={},i={},s){var g;const a=Object.assign({description:"编辑器",title:"编辑器",type:"input-group",$converter:"/converter/property-editor.converter",parentPropertyID:"editor"},o),d=(g=t.binding)!=null&&g.field?[]:["Const","Variable","StateMachine"],c=this.getPropertyEditorParams(t,d,"readonly"),u=this.getPropertyEditorParams(t,d,"required"),m={readonly:{description:"",title:"只读",editor:c},required:{description:"",title:"必填",type:"boolean",editor:u},placeholder:{description:"当控件没有值时在输入框中显示的文本",title:"提示文本",type:"string"}};for(const f in i)m[f]=Object.assign(m[f]||{},i[f]);const l=this;return{...a,properties:{...m},setPropertyRelates(f,p){if(f){switch(f.propertyID){case"readonly":case"required":l.afterMutilEditorChanged(t,f);break}s&&s.bind(l)(f,t,p)}}}}updateUnifiedLayoutAfterControlChanged(t,o,i){const s=t.split(" ");let a=s.find(l=>/^col-([1-9]|10|11|12)$/.test(l)),d=s.find(l=>/^col-md-([1-9]|10|11|12)$/.test(l)),c=s.find(l=>/^col-xl-([1-9]|10|11|12)$/.test(l)),u=s.find(l=>/^col-el-([1-9]|10|11|12)$/.test(l));a=a||"col-12",d=d||"col-md-"+a.replace("col-",""),c=c||"col-xl-"+d.replace("col-md-",""),u=u||"col-el-"+c.replace("col-xl-","");const m={id:o,columnInSM:parseInt(a.replace("col-",""),10),columnInMD:parseInt(d.replace("col-md-",""),10),columnInLG:parseInt(c.replace("col-xl-",""),10),columnInEL:parseInt(u.replace("col-el-",""),10)};this.updateUnifiedLayoutAfterResponseLayoutChanged(i,m)}updateUnifiedLayoutAfterResponseLayoutChanged(t,o){const{formNode:i}=this.responseLayoutEditorFunction.checkCanFindFormNode(t);if(!i||!i.unifiedLayout)return;const s=[];if(this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i,s,1),o){const p=s.find(h=>h.id===o.id);Object.assign(p||{},o)}const a=s.map(p=>p.columnInSM),d=s.map(p=>p.columnInMD),c=s.map(p=>p.columnInLG),u=s.map(p=>p.columnInEL),m=this.checkIsUniqueColumn(a)?a[0]:null,l=this.checkIsUniqueColumn(d)?d[0]:null,g=this.checkIsUniqueColumn(c)?c[0]:null,f=this.checkIsUniqueColumn(u)?u[0]:null;Object.assign(i.unifiedLayout,{uniqueColClassInSM:m,uniqueColClassInMD:l,uniqueColClassInLG:g,uniqueColClassInEL:f})}checkIsUniqueColumn(t){const o=new Set(t);return Array.from(o).length===1}getItemCollectionEditor(t,o,i){return o=o||"value",i=i||"name",{editor:{columns:[{field:o,title:"值",dataType:"string"},{field:i,title:"名称",dataType:"string"}],type:"item-collection-editor",valueField:o,nameField:i,requiredFields:[o,i],uniqueFields:[o,i],readonly:this.checkEnumDataReadonly(t)}}}checkEnumDataReadonly(t){return!t.binding||t.binding.type!=="Form"?!1:!!(this.designViewModelField&&this.designViewModelField.type&&this.designViewModelField.type.$type===xe.FormSchemaEntityFieldType$Type.EnumType)}appendFieldValueChangeEvents(t,o){t.binding&&t.binding.type===dt.Form&&t.binding.field?(o.find(a=>a.label==="fieldValueChanging")||o.push({label:"fieldValueChanging",name:"绑定字段值变化前事件"}),o.find(a=>a.label==="fieldValueChanged")||o.push({label:"fieldValueChanged",name:"绑定字段值变化后事件"}),this.designViewModelField&&(t.fieldValueChanging=this.designViewModelField.valueChanging,t.fieldValueChanged=this.designViewModelField.valueChanged)):o=o.filter(i=>i.label!=="fieldValueChanging"&&i.label!=="fieldValueChanged")}getControlMethodType(t){if(!t.binding)return t.type;switch(t.binding.type){case dt.Form:return t.binding.path||t.type;case dt.Variable:return t.binding.fullPath||t.type}return t.type}getEventPropertyConfig(t,o="card",i,s){const a=this;let d=[];i&&(d=d.concat(i)),this.appendFieldValueChangeEvents(t,d);const c=a.eventsEditorUtils.formProperties(t,a.viewModelId,d);return{title:"事件",hideTitle:!0,properties:a.createBaseEventProperty(c),tabId:"commands",tabName:"交互",setPropertyRelates(l,g){const f=l.propertyValue;delete t[a.viewModelId],f&&(f.setPropertyRelates=this.setPropertyRelates,f.controlInfo={type:a.getControlMethodType(t),name:t.title},a.eventsEditorUtils.saveRelatedParameters(t,a.viewModelId,f.events,f)),s&&s(l,g,f);const p=a.designViewModelUtils.getDgViewModel(a.viewModelId);p&&a.designViewModelField&&p.changeField(a.designViewModelField.id,{valueChanging:t.fieldValueChanging,valueChanged:t.fieldValueChanged})}}}getExpressionConfig(t,o,i=["compute","dependency","validate"],s){return new Qt(this.formSchemaUtils).getExpressionConfig(t,o,i,s)}getBindingDataType(){return this.designViewModelField?this.designViewModelField.type.name==="Number"?"number":this.designViewModelField.type.name==="String"?"string":"boolean":"boolean"}getEditor(){return this.getBindingDataType()==="number"?this.numberEditorOptions:{}}updatePropertyValue(t,o,i){var s;t.editor[o]!==i?t.editor[o]=i:(s=this.getFormDesignerInstance())==null||s.reloadPropertyPanel()}setBooleanValue(t,o,i){let s=i;this.getBindingDataType()==="string"&&(s=(s||"").trim()||(o==="trueValue"?"true":"false"));const d=o==="trueValue"?"falseValue":"trueValue";t.editor[d]===s&&(s=s+1),this.updatePropertyValue(t,o,s)}getBooleanValueConverter(){return{convertFrom:(t,o)=>t.editor[o],convertTo:(t,o,i)=>{this.setBooleanValue(t,o,i)}}}}class Ro extends Oo{constructor(e,t){super(e,t)}getEditorProperties(e){return{description:"编辑器",title:"编辑器",type:"avatar",$converter:"/converter/property-editor.converter",parentPropertyID:"editor",properties:{readonly:{description:"",title:"只读",type:"boolean"},avatarWidth:{description:"",title:"头像宽度",type:"number"},avatarHeight:{description:"",title:"头像高度",type:"number"},cover:{description:"",title:"封面",type:"string"}}}}}function qo(n,e){const t=n.schema;function o(i,s){return new Ro(i,e).getPropertyConfig(t,s)}return{getPropsConfig:o}}const $o=r.defineComponent({name:"FAvatarDesign",props:lt,emits:["change","update:modelValue"],setup(n,e){const t=r.ref(),o=r.inject("designer-host-service"),i=r.inject("design-item-context"),s=qo(i,o),a=yt.useDesignerComponent(t,i,s);r.onMounted(()=>{t.value.componentInstance=a}),e.expose(a.value);const d=r.computed(()=>({"f-avatar":!0,"f-avatar-readonly":n.readonly,"f-avatar-circle":n.shape==="circle","f-avatar-square":n.shape==="square"})),c=r.ref(n.modelValue),u=r.computed(()=>({width:n.avatarWidth+"px",height:n.avatarHeight+"px"})),m=!1;function l(){return""}function g(){}const f=r.ref(null),{acceptTypes:p,imageSource:h,onClickImage:w}=Gt(n,e,f,c);return()=>r.createVNode("div",{ref:t,class:d.value,style:u.value,onClick:w},[m,r.createVNode("img",{title:n.title,class:"f-avatar-image",src:h.value,onError:l},null),!n.readonly&&r.createVNode("div",{class:"f-avatar-icon"},[r.createVNode("span",{class:"f-icon f-icon-camera"},null)]),r.createVNode("input",{ref:"file",name:"file-input",type:"file",class:"f-avatar-upload",accept:p.value,onChange:g,style:"display: none;"},null)])}});Je.register=(n,e,t,o)=>{n.avatar=Je,e.avatar=bt},Je.registerDesigner=(n,e,t)=>{n.avatar=$o,e.avatar=bt};const Do=xe.withInstall(Je);oe.FAvatar=Je,oe.avatarProps=lt,oe.default=Do,oe.propsResolver=bt,Object.defineProperties(oe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(oe,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("lodash-es"),require("../dynamic-resolver/index.umd.js"),require("vue-i18n"),require("../designer-canvas/index.umd.js"),require("../common/index.umd.js"),require("../locale/index.umd.js"),require("@vueuse/core"),require("../data-view/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","../dynamic-resolver/index.umd.js","vue-i18n","../designer-canvas/index.umd.js","../common/index.umd.js","../locale/index.umd.js","@vueuse/core","../data-view/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"],r):(oe=typeof globalThis<"u"?globalThis:oe||self,r(oe.avatar={},oe.Vue,oe.LodashES,oe.dynamicResolver,oe.vueI18n,oe.designerCanvas,oe.common,oe.locale,oe.VueUseCore,oe.dataView))})(this,function(oe,r,ie,Ye,at,yt,xe,st,rn,X){"use strict";var Yo=Object.defineProperty;var Zo=(oe,r,ie)=>r in oe?Yo(oe,r,{enumerable:!0,configurable:!0,writable:!0,value:ie}):oe[r]=ie;var G=(oe,r,ie)=>Zo(oe,typeof r!="symbol"?r+"":r,ie);function Ot(n,e){let t;function o(l){const{properties:g,title:f,ignore:p}=l,h=p&&Array.isArray(p),w=Object.keys(g).reduce((T,M)=>((!h||!p.find($=>$===M))&&(T[M]=g[M].type==="object"&&g[M].properties?o(g[M]):ie.cloneDeep(g[M].default)),T),{});if(f&&(!h||!p.find(T=>T==="id"))){const T=f.toLowerCase().replace(/-/g,"_");w.id=`${T}_${Math.random().toString().slice(2,6)}`}return w}function i(l){const{properties:g,title:f,required:p}=l;if(p&&Array.isArray(p)){const h=p.reduce((w,T)=>(w[T]=g[T].type==="object"&&g[T].properties?o(g[T]):ie.cloneDeep(g[T].default),w),{});if(f&&p.find(w=>w==="id")){const w=f.toLowerCase().replace(/-/g,"_");h.id=`${w}_${Math.random().toString().slice(2,6)}`}return h}return{type:f}}function s(l,g={},f){const p=n[l];if(p){let h=i(p);const w=e[l];return h=w?w({getSchemaByType:s},h,g,f):h,t!=null&&t.appendIdentifyForNewControl&&t.appendIdentifyForNewControl(h),h}return null}function a(l,g){const f=o(g);return Object.keys(f).reduce((p,h)=>(Object.prototype.hasOwnProperty.call(l,h)&&(p[h]&&ie.isPlainObject(p[h])&&ie.isPlainObject(l[h]||!l[h])?Object.assign(p[h],l[h]||{}):p[h]=l[h]),p),f),f}function d(l,g){return Object.keys(l).filter(p=>l[p]!=null).reduce((p,h)=>{if(g.has(h)){const w=g.get(h);if(typeof w=="string")p[w]=l[h];else{const T=w(h,l[h],l);Object.assign(p,T)}}else p[h]=l[h];return p},{})}function c(l,g,f=new Map){const p=a(l,g);return d(p,f)}function u(l){var f;const g=l.type;if(g){const p=n[g];if(!p)return l;const h=a(l,p),w=((f=l.editor)==null?void 0:f.type)||"";if(w){const T=n[w],M=a(l.editor,T);h.editor=M}return h}return l}function m(l){t=l}return{getSchemaByType:s,resolveSchemaWithDefaultValue:u,resolveSchemaToProps:c,mappingSchemaToProps:d,setDesignerContext:m}}const Rt={},qt={},{getSchemaByType:Jo,resolveSchemaWithDefaultValue:an,resolveSchemaToProps:sn,mappingSchemaToProps:ln,setDesignerContext:Ko}=Ot(Rt,qt);function cn(n={}){function e(u,m,l,g){if(typeof l=="number")return g[u].length===l;if(typeof l=="object"){const f=Object.keys(l)[0],p=l[f];if(f==="not")return Number(g[u].length)!==Number(p);if(f==="moreThan")return Number(g[u].length)>=Number(p);if(f==="lessThan")return Number(g[u].length)<=Number(p)}return!1}function t(u,m,l,g){return g[u]&&g[u].propertyValue&&String(g[u].propertyValue.value)===String(l)}const o=new Map([["length",e],["getProperty",t]]);Object.keys(n).reduce((u,m)=>(u.set(m,n[m]),u),o);function i(u,m){const l=u;return typeof m=="number"?[{target:l,operator:"length",param:null,value:Number(m)}]:typeof m=="boolean"?[{target:l,operator:"getProperty",param:u,value:!!m}]:typeof m=="object"?Object.keys(m).map(g=>{if(g==="length")return{target:l,operator:"length",param:null,value:m[g]};const f=g,p=m[g];return{target:l,operator:"getProperty",param:f,value:p}}):[]}function s(u){return Object.keys(u).reduce((l,g)=>{const f=i(g,u[g]);return l.push(...f),l},[])}function a(u,m){if(o.has(u.operator)){const l=o.get(u.operator);return l&&l(u.target,u.param,u.value,m)||!1}return!1}function d(u,m){return s(u).reduce((f,p)=>f&&a(p,m),!0)}function c(u,m){const l=Object.keys(u),g=l.includes("allOf"),f=l.includes("anyOf"),p=g||f,T=(p?u[p?g?"allOf":"anyOf":"allOf"]:[u]).map($=>d($,m));return g?!T.includes(!1):T.includes(!0)}return{parseValueSchema:c}}const un={convertTo:(n,e,t,o)=>{n.appearance||(n.appearance={}),n.appearance[e]=t},convertFrom:(n,e,t)=>n.appearance?n.appearance[e]:n[e]},dn={convertFrom:(n,e,t)=>n.buttons&&n.buttons.length?`共 ${n.buttons.length} 项`:"无"},fn={convertTo:(n,e,t,o)=>{n.editor&&(n.editor[e]=t)},convertFrom:(n,e,t)=>n.editor&&Object.prototype.hasOwnProperty.call(n.editor,e)?n.editor[e]:n[e]},I={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:"多语输入框"}},pn={convertFrom:(n,e,t)=>{var i;const o=n.editor&&n.editor[e]?n.editor[e]:n[e];return((i=I[o])==null?void 0:i.name)||o}},mn={convertTo:(n,e,t,o)=>{n[e]=n[e]},convertFrom:(n,e,t)=>n.editor?t.getRealEditorType(n.editor.type):""},gn={convertTo:(n,e,t,o)=>{(n.type==="data-grid-column"||n.type==="tree-grid-column")&&(n.formatter?n.formatter[e]=t:n.formatter={[e]:t})},convertFrom:(n,e,t)=>{if(n.formatter){if(e==="trueText")return n.formatter.trueText;if(e==="falseText")return n.formatter.falseText;if(e==="prefix")return n.formatter.prefix;if(e==="suffix")return n.formatter.suffix;if(e==="precision")return n.formatter.precision;if(e==="decimal")return n.formatter.decimal;if(e==="thousand")return n.formatter.thousand;if(e==="tempDateFormat")return n.formatter.dateFormat==="yyyy年MM月dd日"?"yearMonthDay":n.formatter.dateFormat==="yyyy-MM-dd HH:mm:ss"?"yyyy-MM-ddTHH:mm:ss":n.formatter.dateFormat==="yyyy/MM/dd HH:mm:ss"?"yyyy/MM/ddTHH:mm:ss":n.formatter.dateFormat==="yyyy年MM月dd日 HH时mm分ss秒"?"yearMonthDayHourMinuteSecond":n.formatter.tempDateFormat||n.formatter.dateFormat||"yyyy-MM-dd";if(e==="customFormat")return n.formatter.customFormat;if(e==="type")return n.formatter.type||"none"}return"none"}},hn={convertTo:(n,e,t,o)=>{n.command?n.command[e]=t:n.command={[e]:t},e==="enable"&&t&&(n.command.commands||(n.command.commands=[{text:"编辑",type:"primary",command:"edit"},{text:"删除",type:"danger",command:"remove"}]))},convertFrom:(n,e,t)=>n.command&&e==="enable"?n.command.enable:""},vn={convertTo:(n,e,t,o)=>{n.column?n.column[e]=t:n.column={[e]:t},e==="fitColumns"&&t&&(n.column.fitMode||(n.column.fitMode="average"))},convertFrom:(n,e,t)=>{if(n.column){if(e==="fitColumns")return n.column.fitColumns;if(e==="fitMode")return n.column.fitMode}return""}},yn={convertTo:(n,e,t,o)=>{n.summary?n.summary[e]=t:n.summary={[e]:t},e==="enable"&&t&&(n.summary?n.summary.groupFields||(n.summary.groupFields=[]):n.summary={enable:t,groupFields:[]})},convertFrom:(n,e,t)=>n.summary&&e==="enable"?n.summary.enable:n.type==="data-grid-column"?n.enableSummary===void 0?!1:n.enableSummary:""},bn={convertTo:(n,e,t,o)=>{n.group?n.group[e]=t:n.group={[e]:t},e==="enable"&&t&&(n.group?n.group.groupFields||(n.group.groupFields=[]):n.group={enable:t,groupFields:[],showSummary:!1})},convertFrom:(n,e,t)=>{if(n.group){if(e==="enable")return n.group.enable;if(e==="showSummary")return n.group.showSummary}}},Cn={convertFrom:(n,e)=>n.binding?n.binding.path:"",convertTo:(n,e,t)=>{if(t&&t.length>0){const o=t[0];n.binding||(n.binding={}),n.binding.type="Form",n.binding.path=o.bindingField,n.binding.field=o.id,n.binding.fullPath=o.path,n.path=o.bindingPath}}},wn={convertTo:(n,e,t,o)=>{n.pagination||(n.pagination={}),n.pagination[e]=t},convertFrom:(n,e,t)=>n.pagination?n.pagination[e]:n[e]},xn={convertTo:(n,e,t,o)=>{n.rowNumber||(n.rowNumber={}),n.rowNumber[e]=t},convertFrom:(n,e,t)=>n.rowNumber?n.rowNumber[e]:n[e]},Sn={convertTo:(n,e,t,o)=>{n.selection||(n.selection={}),n.selection[e]=t},convertFrom:(n,e,t)=>n.selection?n.selection[e]:n[e]},An={convertFrom:(n,e,t)=>n[e]&&n[e].length?`共 ${n[e].length} 项`:""},Tn={convertFrom:(n,e)=>n[e]||"",convertTo:(n,e,t)=>{n[e]=t}},Fn={convertTo:(n,e,t,o)=>{n.size||(n.size={}),n.size[e]=t},convertFrom:(n,e,t)=>n.size?n.size[e]:n[e]},Mn={convertFrom:(n,e,t)=>{var o,i;return(o=n.formatter)!=null&&o.data&&e==="formatterEnumData"&&!n.formatterEnumData?(i=n.formatter)==null?void 0:i.data:n.formatterEnumData}},En={convertTo:(n,e,t,o)=>{n.sort||(n.sort={}),n.sort[e]=t},convertFrom:(n,e,t)=>{var o,i;if(e==="mode")return((o=n.sort)==null?void 0:o.mode)||"client";if(e==="multiSort")return!!((i=n.sort)!=null&&i.multiSort)}},jn={convertTo:(n,e,t,o)=>{n.filter||(n.filter={}),n.filter[e]=t},convertFrom:(n,e,t)=>{var o;if(e==="mode")return((o=n.filter)==null?void 0:o.mode)||"client"}},Nn={convertTo:(n,e,t,o)=>{n.rowOption?n.rowOption[e]=t:n.rowOption={[e]:t}},convertFrom:(n,e,t)=>{if(n.rowOption){if(e==="customRowStyle")return n.rowOption.customRowStyle;if(e==="customCellStyle")return n.rowOption.customCellStyle}return""}};function $t(n,e,t){const o=new Map([["/converter/appearance.converter",un],["/converter/buttons.converter",dn],["/converter/property-editor.converter",fn],["/converter/items-count.converter",An],["/converter/type.converter",pn],["/converter/change-editor.converter",mn],["/converter/change-formatter.converter",gn],["/converter/column-command.converter",hn],["/converter/column-option.converter",vn],["/converter/summary.converter",yn],["/converter/group.converter",bn],["/converter/form-group-label.converter",Tn],["/converter/field-selector.converter",Cn],["/converter/pagination.converter",wn],["/converter/row-number.converter",xn],["/converter/grid-selection.converter",Sn],["/converter/size.converter",Fn],["/converter/change-formatter-enum.converter",Mn],["/converter/grid-sort.converter",En],["/converter/grid-filter.converter",jn],["/converter/row-option.converter",Nn]]),i=new Map([["string",{type:"input-group",enableClear:!1}],["boolean",{type:"combo-list",textField:"name",valueField:"value",idField:"value",enableClear:!1,editable:!1,data:[{value:!0,name:"是"},{value:!1,name:"否"}]}],["enum",{type:"combo-list",maxHeight:128,enableClear:!1,editable:!1}],["array",{type:"button-edit"}],["number",{type:"number-spinner",placeholder:""}],["events-editor",{type:"events-editor",hide:!0}]]),s=cn();function a(p,h){return()=>s.parseValueSchema(p,h)}function d(p,h,w){return p.includes("visible")&&h.visible!==void 0?typeof h.visible=="boolean"?()=>!!h.visible:h.visible===void 0?!0:a(h.visible,w):()=>!0}function c(p,h,w){return p.includes("readonly")&&h.readonly!==void 0?typeof h.readonly=="boolean"?()=>!!h.readonly:a(h.readonly,w):()=>!1}function u(p,h){const w=p.$converter||h;return typeof w=="string"&&w&&o.has(w)?o.get(w)||null:w||null}function m(p,h,w,T,M,$="",S=""){return Object.keys(p).map(y=>{const F=r.ref(1),A=y,x=p[y],N=Object.keys(x),C=x.title,E=x.type,k=i.get(E)||{type:"input-group",enableClear:!1},V=x.editor?Object.assign({},k,x.editor):Object.assign({},k),R=d(N,x,h),U=c(N,x,h);V.readonly=V.readonly===void 0?U():V.readonly;const K=x.type==="cascade"?m(x.properties,h,w,T,M,$,S):[],P=!0;let B=u(x,S);const W=r.computed({get(){if(F.value){if(["class","style"].find(ce=>ce===A)&&!B&&(B=o.get("/converter/appearance.converter")||null),B&&B.convertFrom)return B.convertFrom(w,y,M,$);const re=w[y];return Object.prototype.hasOwnProperty.call(x,"defaultValue")&&(re===void 0||typeof re=="string"&&re==="")?x.type==="boolean"?x.defaultValue:x.defaultValue||"":re}return null},set(re){F.value+=1,B&&B.convertTo?(B.convertTo(T,y,re,M,$),B.convertTo(w,y,re,M,$)):(T[y]=re,w[y]=re)}}),{refreshPanelAfterChanged:D,description:ee,isExpand:he,parentPropertyID:ve}=x,_={propertyID:A,propertyName:C,propertyType:E,propertyValue:W,editor:V,visible:R,readonly:U,cascadeConfig:K,hideCascadeTitle:P,refreshPanelAfterChanged:D,description:ee,isExpand:he,parentPropertyID:ve};return h[A]=_,_})}function l(p,h,w={}){const T={},M=n[p];return M&&M.categories?Object.keys(M.categories).map(S=>{const v=M.categories[S],y=v==null?void 0:v.title,F=m(v.properties||{},T,{},w,h);return{categoryId:S,categoryName:y,properties:F}}):[]}function g(p,h,w,T,M=""){const $=h.$ref.schema,S=h.$ref.converter,v=w[$],y=v.type,F=t(v),A={},x=n[y];if(x&&x.categories){const N=x.categories[p],C=N==null?void 0:N.title;S&&Object.keys(N.properties).forEach(V=>{N.properties[V].$converter=S});const E=(N==null?void 0:N.properties)||{},k=m(E,A,F,v,T,M);return{categoryId:p,categoryName:C,properties:k}}return{categoryId:p,categoryName:"",properties:[]}}function f(p,h,w,T,M){const $=p.type,S=t(p),v={};let y=M||n[$];if(y&&Object.keys(y).length===0&&w&&w.getPropConfig&&(y=w.getPropConfig(T)),y&&y.categories){const F=[];return Object.keys(y.categories).map(A=>{const x=y.categories[A];if(x.$ref){F.push(g(A,x,p,h,T));return}const N=x==null?void 0:x.title,C=x==null?void 0:x.tabId,E=x==null?void 0:x.tabName,k=x==null?void 0:x.hide,V=x==null?void 0:x.hideTitle,R=m(x.properties||{},v,S,p,h,T,x.$converter),{setPropertyRelates:U}=x,K=x==null?void 0:x.parentPropertyID;F.push({categoryId:A,categoryName:N,tabId:C,tabName:E,hide:k,properties:R,hideTitle:V,setPropertyRelates:U,parentPropertyID:K})}),F}return[]}return{getPropertyConfigBySchema:f,getPropertyConfigByType:l,propertyConverterMap:o}}const Dt={},Ht={};$t(Dt,Ht,an);const Lt={},zt={},{getSchemaByType:er,resolveSchemaWithDefaultValue:Bn,resolveSchemaToProps:tr,mappingSchemaToProps:nr,setDesignerContext:or}=Ot(Lt,zt),Ut={},Wt={};$t(Ut,Wt,Bn);function Ze(n,e,t=new Map,o=(a,d,c,u)=>d,i={},s=a=>a){return Rt[e.title]=e,qt[e.title]=o,Dt[e.title]=i,Ht[e.title]=s,Lt[e.title]=e,zt[e.title]=o,Ut[e.title]=i,Wt[e.title]=s,(a={},d=!0)=>{if(!d)return ln(a,t);const c=sn(a,e,t),u=Object.keys(n).reduce((m,l)=>(m[l]=n[l].default,m),{});return Object.assign(u,c)}}function kn(n,e,t){return e}const Vn=new Map([["appearance",Ye.resolveAppearance]]),In={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/avatar.schema.json",title:"avatar",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for avatar",type:"string"},type:{description:"The type string of avatar",type:"string",default:"avatar"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disabled:{type:"boolean",default:!1},avatarWidth:{description:"",type:"number",default:100},avatarHeight:{description:"",type:"number",default:100},readonly:{description:"",type:"boolean",default:!1},cover:{description:"",type:"string",default:""},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"],ignore:["id","appearance","binding","visible"]},lt={avatarWidth:{type:Number,default:100},avatarHeight:{type:Number,default:100},cover:{type:String},readonly:{type:Boolean,default:!1},shape:{type:String,default:"circle"},maxSize:{type:Number,default:1},modelValue:{type:String,default:""},title:{type:String,default:""},imageType:{type:Array,default:["jpeg"]}},bt=Ze(lt,In,Vn,kn);function Gt(n,e,t,o){const i="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAwICQoJBwwKCQoNDAwOER0TERAQESMZGxUdKiUsKyklKCguNEI4LjE/MigoOk46P0RHSktKLTdRV1FIVkJJSkf/2wBDAQwNDREPESITEyJHMCgwR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAEsASwDASIAAhEBAxEB/8QAGgABAQEBAQEBAAAAAAAAAAAAAAECAwQFB//EADMQAQEAAQEECAQGAgMBAAAAAAABAhEDITFBBBRRUmFxgaESkcHwEyIysdHhM3IjQvE0/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAXEQEBAQEAAAAAAAAAAAAAAAAAEQEh/9oADAMBAAIRAxEAPwD9BBYqCiyAGhougIqyGgEhIui6AyuixdATQ0WQA0BdA4houhoCaGgugMrouhoCaJoum80BNDRdDQGTRbEBNCxdDQGTRUBE0asQGRTQGTT71WxNPP5AugqyACyAC6dpIsgGgshoBISKAiroQDQ0OSyAgoBoaABoaABomigJTRQGV0XRATRGizUGRSwGdEsaqAljLQDOiNWJQZNJ4KffEFIRYAsFkAkFkAJFFkAkNCLIAAAC6AguhoCCl3TW2TzugIHx4S788Z6wmWN4ZY3ysoA1pu+qAgpYCAAaIoDIoCaJZvVAQ03LUBlGqWAzYmimn3vAaRYA1IkWASKKACgirIgAsgBoBdJNbZNN9t3aeIHNw2vSccbZhPxLN27dJ68/Rx222u1/LjbNn8vi/ieHPm58N03SKN5bfa58c7jOzHd78XOyXfd98bqoCaScp8jSdk+SgLjlljdccssfK12w6TlN2cmXjN1/iuAD34Z47Sa43XTjLus82nz5bjl8WNss4WPXsNtNpNLuzk3zlZ2wHUsBBF5CAFgAhouiUGRUBErSAyffFamgKqKCqkUBYcgBpADiuhoAKeYA8fStp8WX4WPCfq8b2eT1bXObPZZZ8bJrJ23lHz5rpvutu+3tvOqAAAAAAAACy3HKZY3Sy6yoA+hs85tMJlN2vGdlaeTomem0+C/9pu849SAKlARQERrkgJUWoCUVKDIqb/ugqxFBVRQFFBFABRAUAHn6bl+XDGc7bfT/ANeV26XddvJ2Yz3tcVAAAAAAAAAAFxy+HKZTjLq+l+z5j6Gzuuywt54z9jRoEQAARSoCCoCIqAIJQaCLzBZxCAKC8wIAChOIAADxdL/+i/6z6uTt0yabfXtxnta4qAAAAAAAAAAD37H/AAbP/WPBwfQ2c02WE7MYaNAIIoAhzCggHMEqaNIDNPviHoAsRqcAFSKC8iIoHNUAUAAAHl6ZPzbPLtln1ed7el467DXu2X0+68SgAAAAAAAAABpru7bo+npy7Po8HR8fi2+M46XW+Ue4ABAAAQAQUvAEvBL6BQS8U3feqpv7fcFnBUUBUUBScQFRUBQAAATKTLG43nLL6vnaWWy8ZdL5x9J4ulY/DtrZwymvrzUcgAAAAAAAANdwPT0LH9Wd8MZ+9elnY4fh7HHG8prfOtIAABQAQAKi1AE5KlBD09hPl7gKjUAVFBeYTiAqKgKAAAA5dKw+PY2ya5Y/mn19nVQfMG9th+HtbjOF3zyrCgAAAAAA6dHw+PbSWfln5r6Ob29Gw+DZS2fmy33y5T6g7cbreaAgAAAAgqAcgqfIBOapQSnr7lPS/IEaScAFVFgKIoKioCgAABgADj0nZ/HstZvyx3zxnN4+T6b52ePw7TLGcJbIoyAAAAADex2f4m1mN1+Gb75Tl9H0PbweboeOmGWXO3T0n/r0AAIAAAACKgHJFpyBEpyARFT74gKnNQVeaRQF5IoKTiigCKAAACZWY4/FlZMZxt3SAvnuna+dnlM8885wyts8nXb9I/Elw2e7G7rleN8J4ePNxUAAAAAAeroeUuFx7LrPKvQ+djlcMpljdLHs2W3x2k0/Tl2W8fLtB1C8ewQAAEUBDmt4oBeJeCAIUARFvBN3gByVAFUIChzWcAOSpGdpnjs5rnlMdeHbfKcwb58x5c+l23TZ7P1y3e0+rldvtcuO0snZjJFHvtmM1ysnjbpHHLpOyx3TK5eGM1eKyW63W3tt1UHfPpeV3YYTGduW+/JwyuWd1zyuVnDXhPKcgAAAAAAAAAAB0w2+0w3TKZTsy3+7tj0vG/rxyxvbN8eUB9DDa7PP9OeNvZrpfdu8OD5mkvGNY55Y/pzyx8ruIPePJj0nazj8OU8ZpfZ1w6Ts8rJlrhfHfPmg7FKgAF4AgVARPW/NanoAsZaBVlZUFVF4g57fbfhY7pLld0l/e+EeO23K5ZW5ZXjb97o1tcvj22WXHS/DPKMqAAAAAAAAAAAAAAAAAAAAAAOux212d0ttwvGdnjHr3ceMfPevo2XxbLTu3T0B1TmHJAZVOYF4p98xPviBFScQGlRZxBdS3TG3slvsibS/8WX+t/YHhx/TPGaqk4TyVQAAAAAAAAAAAAAAAAAAAAAAd+iX82c7ZL9/Nwdui/5b/rfoD00vARAQqAhfvcVNfL3A1WMqDSxmVQVNr/iz4/pv7LDOXLDLGcbNPDeDxTh6DtOjZaafFju816tlf+2Puo4Dv1bPvY+51bLvY+5RwHfq2Xex9zquXex9yjgO/Vcu9j7nVc+9j7lHAd+q597H3Oq597H3BwHfqufex9zqufex9yjgO/Vc+9j7nVc+9j7lHAd+q597H3Oq597H3KOA79Vz72PudVz72PuUcB36rl3sfc6rn3sfco4DvejZd7H3OrZd7H3KOA79Wy72PudWz72PuDg7dG/y3/W/Q6tl3sfdvY7K7PO25S6yzSdoOqWlEBmhaBamt+6J6AnmqaqDQy0CxYyoNCKC6m/VAGhPJdQBOSgKi6+QGu41QBRAF1LUABbUABNdAVOYUC0tE13gIWloCcTXeloFQLQTmffMtT74gixOa6gqysrzBVSVQVdWdQGpRNV1BV10SUlBYIvIF1E1Ne0F5iAKIAohaCmqWgBaapqC2ohqC6pqWoC2paa70tAqCACACa+F+RanyAWJ/a8vkAuqT6fVf7AVOz0X+AXVYh2egNSifx9T+wVWefyX+PqCyrqn807PQFEn0+p/YKH9H37gAc/kC6onL0P5BRP6OV8vqC2of2l/gAOSAuqan9J/AKmon9AUtL9PqnP1oCWl5ehfv5gh635nP1qWg//Z",s=r.ref(n.readonly);function a(f){return f.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/)!=null}function d(f){return f.indexOf("data:image/")>-1}function c(f){return f?"data:image/jpeg;base64,"+f:""}const u=r.computed(()=>{var p;if(!n.imageType||!n.imageType.length)return"";const f=(p=n.imageType)==null?void 0:p.map(h=>(h==="jpg"&&(h="jpeg"),`image/${h}`));return!f||!f.length?"image/*":f.join(",")}),m=r.computed(()=>{const f=o.value||n.cover||i;return a(f)||d(f)?f:c(f)}),l=r.computed(()=>s.value?"":n.title);function g(){s.value||t&&t.value&&t.value.click()}return{acceptTypes:u,imageSource:m,imageTitle:l,onClickImage:g}}const Je=r.defineComponent({name:"FAvatar",props:lt,emits:["change","update:modelValue"],setup(n,e){at.useI18n();const t=r.computed(()=>({"f-avatar":!0,"f-avatar-readonly":n.readonly,"f-avatar-circle":n.shape==="circle","f-avatar-square":n.shape==="square"})),o=r.ref(n.modelValue),i=r.computed(()=>({width:n.avatarWidth+"px",height:n.avatarHeight+"px"})),s=!1;function a(){return""}function d(){}const c=r.ref(null),{acceptTypes:u,imageSource:m,onClickImage:l}=Gt(n,e,c,o);return()=>r.createVNode("div",{class:t.value,style:i.value,onClick:l},[s,r.createVNode("img",{title:n.title,class:"f-avatar-image",src:m.value,onError:a},null),!n.readonly&&r.createVNode("div",{class:"f-avatar-icon"},[r.createVNode("span",{class:"f-icon f-icon-camera"},null)]),r.createVNode("input",{ref:"file",name:"file-input",type:"file",class:"f-avatar-upload",accept:u.value,onChange:d,style:"display: none;"},null)])}}),Pn=r.ref(0);function On(){Pn.value++}const ct=r.ref(0);function Rn(n){const{formSchemaUtils:e,formStateMachineUtils:t}=n;function o(c,u=""){return{path:u+c.code,field:c.id,fullPath:c.code}}function i(c,u=""){return e.getViewModelById(c).states.map(l=>o(l,u))}function s(c){const u=e.getRootViewModelId(),m=i(c);if(c===u)return m;const l=i(u,"root-component.");return[...m,...l]}function a(c){return c.binding&&c.binding.path||c.id||""}function d(){return t&&t.getRenderStates()||[]}return{getVariables:s,getControlName:a,getStateMachines:d}}class Qt{constructor(e){G(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'"}]);G(this,"expressionNames",{compute:"计算表达式",dependency:"依赖表达式",validate:"验证表达式",dataPicking:"帮助前表达式",visible:"可见表达式",readonly:"只读表达式",required:"必填表达式"});G(this,"getExpressionConverter",(e,t)=>({convertFrom:(o,i,s,a)=>{const d=s.getExpressionRuleValue(e,t||i);return d&&d.value||""},convertTo:(o,i,s,a,d)=>{var c;if(i==="dataPicking"&&(s!=null&&s.target)){const u=`${s.target}_dataPicking`;((c=s.rules)==null?void 0:c.some(l=>l.id===u&&l.value))?o.dictPickingExpressionId=u:delete o.dictPickingExpressionId}a.updateExpression(s)}}));this.formSchemaService=e}getExpressionRule(e,t){const o=this.formSchemaService.getExpressions();if(!o)return"";const i=o.find(a=>a.target===e);if(!i)return"";const s=i.rules.find(a=>a.type===t);return s||""}getContextFormVariables(){const{module:e}=this.formSchemaService.getFormSchema();if(!e.viewmodels||e.viewmodels.length===0)return[];const t=this.formSchemaService.getRootViewModelId(),o=this.formSchemaService.getViewModelById(t);if(!o||!o.states||o.states.length===0)return[];const i=[];return o.states.forEach(s=>{i.push({key:s.code,name:s.name,description:s.name,category:s.category})}),i}createTreeNode(e,t,o="label"){return{id:e.id,name:e.name,bindingPath:e[o],parents:t,type:"field"}}buildEntityFieldsTreeData(e=null,t){const o=[];return e==null||e.forEach(i=>{var d;const s=this.createTreeNode(i,t);let a=[];(d=i.type)!=null&&d.fields&&(a=this.buildEntityFieldsTreeData(i.type.fields,[...t,i.label])),o.push({data:s,children:a,expanded:!0})}),o}buildChildEntityTreeData(e=null,t){const o=[];return e==null||e.forEach(i=>{var c,u;const s=this.createTreeNode(i,t);s.type="entity";const a=this.buildEntityFieldsTreeData((c=i.type)==null?void 0:c.fields,[...t,i.label]),d=this.buildChildEntityTreeData((u=i.type)==null?void 0:u.entities,[...t,i.label]);d!=null&&d.length&&(a==null||a.push(...d)),o.push({data:s,children:a||[],expanded:!0})}),o}getEntitiesTreeData(){const e=this.formSchemaService.getSchemaEntities();if(!(e!=null&&e.length))return[];const t=e[0];if(!(t!=null&&t.type))return[];const o=this.buildEntityFieldsTreeData(t.type.fields,[t.code]),i=this.buildChildEntityTreeData(t.type.entities,[t.code]);return i!=null&&i.length&&(o==null||o.push(...i)),{entityCode:t.code,fields:[{data:this.createTreeNode(t,[],"code"),children:o||[]}]}}getEntitiesAndVariables(){return{entities:this.getEntitiesTreeData(),variables:{session:{name:"系统变量",items:this.sessionVariables,visible:!1},forms:{name:"表单变量",items:this.getContextFormVariables(),visible:!0}}}}onBeforeOpenExpression(e,t,o){const i=o==="Field"?e.binding.field:e.id,s=this.getExpressionRule(i,t),a=this.getEntitiesAndVariables(),d={message:["validate","required","dataPicking"].includes(t)&&s?s.message:"",...a};return s.messageType!=null&&(d.messageType=s.messageType),d}buildRule(e,t,o,i){const{expression:s,message:a,messageType:d}=t,c={id:`${e}_${o}`,type:o,value:s};return(o==="validate"||o==="dataPicking"||o==="required")&&(c.message=a),o==="dataPicking"&&(c.messageType=d),o==="validate"&&i&&(c.elementId=i),c}getExpressionData(){const{expressions:e}=this.formSchemaService.getFormSchema().module;return e||[]}updateExpression(e,t,o,i){const s=t==="Field"?e.binding.field:e.id,a=this.buildRule(s,o,i,e.type==="form-group"?e.id:"");let c=this.getExpressionData().find(m=>m.targetType===t&&m.target===s);const u=m=>m.value.trim()==="";if(c){const m=c.rules.find(l=>l.id===a.id);if(m)u(a)?c.rules=c.rules.filter(l=>l.id!==a.id):(Object.assign(m,a),i==="validate"&&e.type==="form-group"&&(m.elementId=e.id));else{if(u(a))return null;c.rules=c.rules||[],c.rules.push(a)}}else{if(u(a))return null;c={target:`${s}`,rules:[a],targetType:t}}return c}getExpressionEditorOptions(e,t,o,i){return o.reduce((s,a)=>{var c,u;const d=t==="Field"?(c=e==null?void 0:e.binding)==null?void 0:c.field:e.id;return s[a]={hide:t==="Field"?!!((u=e==null?void 0:e.binding)!=null&&u.field):!1,description:"",title:this.expressionNames[a],type:"string",$converter:this.getExpressionConverter(d),refreshPanelAfterChanged:!0,editor:{type:"expression-editor",singleExpand:!1,dialogTitle:`${this.expressionNames[a]}编辑器`,showMessage:a==="validate"||a==="dataPicking"||a==="required",showMessageType:a==="dataPicking",beforeOpen:()=>this.onBeforeOpenExpression(e,a,t),onSubmitModal:m=>{const l=this.updateExpression(e,t,m,a);if(i){const g=this.buildRule(d,m,a);i(g)}return l}}},s},{})}getExpressionInfo(e,t,o){const i=t==="Field"?e.binding.field:e.id,s=this.getExpressionRule(i,o),a={value:s&&s.value,targetId:i,targetType:t,expressionType:o};return s&&s.message&&(a.message=s.message),a}getExpressionConfig(e,t,o=["compute","dependency","validate"],i){return{description:"表达式",title:"表达式",hide:!e.binding,properties:{...this.getExpressionEditorOptions(e,t,o,i)}}}getExpressionOptions(e,t,o){const i=this.getExpressionInfo(e,t,o);return{dialogTitle:`${this.expressionNames[o]}编辑器`,singleExpand:!1,showMessage:o==="required",beforeOpen:()=>this.onBeforeOpenExpression(e,o,t),expressionInfo:i}}}class qn{constructor(e,t){G(this,"componentId");G(this,"viewModelId");G(this,"eventsEditorUtils");G(this,"formSchemaUtils");G(this,"formMetadataConverter");G(this,"designViewModelUtils");G(this,"designViewModelField");G(this,"controlCreatorUtils");G(this,"designerHostService");G(this,"designerContext");G(this,"schemaService",null);G(this,"metadataService",null);G(this,"propertyConfig",{type:"object",categories:{}});var o;this.componentId=e,this.designerHostService=t,this.eventsEditorUtils=t.eventsEditorUtils,this.formSchemaUtils=t.formSchemaUtils,this.formMetadataConverter=t.formMetadataConverter,this.viewModelId=((o=this.formSchemaUtils)==null?void 0:o.getViewModelIdByComponentId(e))||"",this.designViewModelUtils=t.designViewModelUtils,this.controlCreatorUtils=t.controlCreatorUtils,this.metadataService=t.metadataService,this.schemaService=t.schemaService,this.designerContext=t.designerContext}getFormDesignerInstance(){var e,t;return(t=(e=this.designerContext)==null?void 0:e.instances)==null?void 0:t.formDesigner.value}getTableInfo(){var e;return(e=this.schemaService)==null?void 0:e.getTableInfoByViewModelId(this.viewModelId)}setDesignViewModelField(e){var o;const t=e.binding&&e.binding.type==="Form"&&e.binding.field;if(t){if(!this.designViewModelField){const i=this.designViewModelUtils.getDgViewModel(this.viewModelId);this.designViewModelField=i.fields.find(s=>s.id===t)}e.updateOn=(o=this.designViewModelField)==null?void 0:o.updateOn}}getBasicPropConfig(e){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:e.type,name:I[e.type]&&I[e.type].name}]}}}}}getAppearanceConfig(e=null,t={},o){const i={title:"外观",description:"Appearance"},s={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 a in t)s[a]=Object.assign(s[a]||{},t[a]);return{...i,properties:{...s},setPropertyRelates(a,d){if(a){switch(a&&a.propertyID){case"class":case"style":{ct.value++;break}}o&&o(a,e,d)}}}}getPropertyEditorParams(e,t=[],o="visible",i={},s={}){const{getVariables:a,getControlName:d,getStateMachines:c}=Rn(this.designerHostService),u=this.getRealTargetType(e),m=t&&t.length>0?t:["Const","Variable","StateMachine","Expression"],l={type:"property-editor",propertyTypes:m};return m.map(g=>{switch(g){case"Const":Object.assign(l,{constType:"enum",constEnums:[{id:!0,name:"是"},{id:!1,name:"否"}]},i);break;case"Expression":l.expressionConfig=this.getExpressionOptions(e,u,o);break;case"StateMachine":l.stateMachines=c();break;case"Variable":Object.assign(l,{controlName:d(e),newVariablePrefix:"is",newVariableType:"Boolean",variables:a(this.viewModelId),onBeforeOpenVariables:f=>{f.value=a(this.viewModelId)}},s);break}}),l}getVisibleProperty(e,t=""){var s;let o=["Const","Variable","StateMachine","Expression"];return t==="gridFieldEditor"?o=["Const","Expression"]:t==="form-group"&&!((s=e.binding)!=null&&s.field)&&(o=["Const","Variable","StateMachine"]),{visible:{title:"是否可见",type:"boolean",description:"运行时组件是否可见",editor:this.getPropertyEditorParams(e,o,"visible")}}}getBehaviorConfig(e,t="",o={},i){const s={title:"行为",description:""},a=this.getVisibleProperty(e,t);for(const c in o)a[c]=Object.assign(a[c]||{},o[c]);const d=this;return{...s,properties:{...a},setPropertyRelates(c,u){if(c){switch(c.propertyID){case"disabled":case"readonly":case"visible":d.afterMutilEditorChanged(e,c);break}i&&i(c,u)}}}}afterMutilEditorChanged(e,t){this.addNewVariableToViewModel(t,this.viewModelId),this.updateExpressionValue(t),this.clearExpression(t,e)}updateElementByParentContainer(e,t){const o=t&&t.parent&&t.parent.schema;if(!o)return;const i=o.contents.findIndex(a=>a.id===e),s=ie.cloneDeep(o.contents[i]);o.contents.splice(i,1),o.contents.splice(i,0,s),On()}addNewVariableToViewModel(e,t){const o=e.propertyValue;if(!(o&&typeof o=="object")||!(o.type==="Variable"&&o.isNewVariable))return;const a={id:o.field,category:"locale",code:o.fullPath,name:o.fullPath,type:o.newVariableType||"String"};delete o.newVariableType,delete o.isNewVariable,this.formSchemaUtils.getVariableByCode(a.code)||this.formSchemaUtils.getViewModelById(t).states.push(a)}updateExpressionValue(e){const t=e.propertyValue;if(!((t&&t.type)==="Expression"&&t.expressionInfo))return;const{expressionId:s,expressionInfo:a}=t,{targetId:d,targetType:c,expressionType:u,value:m,message:l}=a,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:c},f.push(p));const h=p.rules.find(w=>w.type===u);if(h)h.value=m,h.message=l;else{const w={id:s,type:u,value:m,message:l};p.rules.push(w)}delete t.expressionInfo}clearExpression(e,t){const o=e.propertyValue;if(o&&o.type==="Expression")return;const s=e.propertyID,a=this.formSchemaUtils.getExpressions(),d=t.binding?t.binding.field:t.id,c=a.find(u=>u.target===d);!c||!c.rules||(c.rules=c.rules.filter(u=>u.type!==s))}getExpressionOptions(e,t,o){return new Qt(this.formSchemaUtils).getExpressionOptions(e,t,o)}getRealTargetType(e){return["response-toolbar-item","tab-toolbar-item","section-toolbar-item"].indexOf(e.type)>-1?"Button":e.binding&&e.binding.field?"Field":"Container"}createBaseEventProperty(e){const t={};return t[this.viewModelId]={type:"events-editor",editor:{initialData:e,viewSourceHandle:o=>{var i;((i=o.controller)==null?void 0:i.label.indexOf(this.formSchemaUtils.getModule().code))>-1&&this.eventsEditorUtils.jumpToMethod(o)}}},t}}const Qe=class Qe{static getEditorTypesByMDataType(e,t=!1,o=""){if(t)return[{key:I["language-textbox"].type,value:I["language-textbox"].name}];let i=Qe.fieldControlTypeMapping[e];if(o==="data-grid-column"&&(i!=null&&i.length)){const s=[I["check-group"].type,I["radio-group"].type];i=i.filter(a=>!s.includes(a.key))}return i}static getAllInputTypes(){const e=[];for(const t in Qe.fieldControlTypeMapping)Qe.fieldControlTypeMapping[t].forEach(o=>{e.find(i=>i.key===o.key&&i.value===o.value)||e.push({key:o.key,value:o.value})});return e}static mappingDomPropAndSchemaProp(e,t){var s;const o=(s=e.editor)==null?void 0:s.type,i=[];return(e.type===I["data-grid-column"].type||e.type===I["tree-grid-column"].type)&&t&&t.categoryId&&t.categoryId.indexOf("gridFieldEditor")<0&&i.push({domField:"title",schemaField:"name"}),i.push({domField:"label",schemaField:"name"}),i.push({domField:"editor.required",schemaField:"require"}),i.push({domField:"editor.readonly",schemaField:"readonly"}),(o===I["input-group"].type||o===I.textarea.type||o===I["number-spinner"].type)&&i.push({domField:"editor.maxLength",schemaField:"type.length"}),o===I["number-spinner"].type&&i.push({domField:"editor.precision",schemaField:"type.precision"}),(e.type===I["data-grid-column"].type||e.type===I["tree-grid-column"].type)&&i.push({domField:"formatter.precision",schemaField:"type.precision"}),(o===I["combo-list"].type||o===I["radio-group"].type)&&i.push({domField:"editor.data",schemaField:"type.enumValues"}),(e.type===I["data-grid-column"].type||e.type===I["tree-grid-column"].type)&&i.push({domField:"formatter.data",schemaField:"type.enumValues"}),o===I["date-picker"].type&&(i.push({domField:"editor.displayFormat",schemaField:"editor.format"}),i.push({domField:"editor.fieldType",schemaField:"type.name"})),o===I["number-spinner"].type&&(i.push({domField:"editor.max",schemaField:"editor.maxValue"}),i.push({domField:"editor.min",schemaField:"editor.minValue"})),o===I.lookup.type&&(i.push({domField:"editor.dataSource",schemaField:"editor.dataSource"}),i.push({domField:"editor.valueField",schemaField:"editor.valueField"}),i.push({domField:"editor.textField",schemaField:"editor.textField"}),i.push({domField:"editor.displayType",schemaField:"editor.displayType"}),i.push({domField:"editor.mapFields",schemaField:"editor.mapFields"}),i.push({domField:"editor.helpId",schemaField:"editor.helpId"})),i.push({domField:"path",schemaField:"bindingPath"}),i.push({domField:"binding.path",schemaField:"bindingField"}),i.push({domField:"binding.fullPath",schemaField:"path"}),(e.type===I["data-grid-column"].type||e.type===I["tree-grid-column"].type)&&i.push({domField:"field",schemaField:"bindingPath"}),i}};G(Qe,"fieldControlTypeMapping",{String:[{key:I["input-group"].type,value:I["input-group"].name},{key:I.lookup.type,value:I.lookup.name},{key:I["date-picker"].type,value:I["date-picker"].name},{key:I.switch.type,value:I.switch.name},{key:I["check-box"].type,value:I["check-box"].name},{key:I["check-group"].type,value:I["check-group"].name},{key:I["radio-group"].type,value:I["radio-group"].name},{key:I["combo-list"].type,value:I["combo-list"].name},{key:I.textarea.type,value:I.textarea.name},{key:I["time-picker"].type,value:I["time-picker"].name}],Text:[{key:I.textarea.type,value:I.textarea.name},{key:I.lookup.type,value:I.lookup.name}],Decimal:[{key:I["number-spinner"].type,value:I["number-spinner"].name}],Integer:[{key:I["number-spinner"].type,value:I["number-spinner"].name}],Number:[{key:I["number-spinner"].type,value:I["number-spinner"].name},{key:I.switch.type,value:I.switch.name},{key:I["check-box"].type,value:I["check-box"].name}],BigNumber:[{key:I["number-spinner"].type,value:I["number-spinner"].name}],Date:[{key:I["date-picker"].type,value:I["date-picker"].name}],DateTime:[{key:I["date-picker"].type,value:I["date-picker"].name}],Boolean:[{key:I.switch.type,value:I.switch.name},{key:I["check-box"].type,value:I["check-box"].name}],Enum:[{key:I["combo-list"].type,value:I["combo-list"].name},{key:I["radio-group"].type,value:I["radio-group"].name}],Object:[{key:I.lookup.type,value:I.lookup.name},{key:I["combo-list"].type,value:I["combo-list"].name},{key:I["radio-group"].type,value:I["radio-group"].name}]});let ut=Qe;var dt=(n=>(n.Form="Form",n.Variable="Variable",n))(dt||{});class $n{constructor(){G(this,"label","");G(this,"id","");G(this,"columnInSM",12);G(this,"columnInMD",6);G(this,"columnInLG",3);G(this,"columnInEL",2);G(this,"displayWidthInSM",1);G(this,"displayWidthInMD",1);G(this,"displayWidthInLG",1);G(this,"displayWidthInEL",1);G(this,"displayColumnCountAtBreakPoint","md");G(this,"tagRow",0);G(this,"showTopBorder",0);G(this,"group",1);G(this,"isSupportedClass",!0);G(this,"fieldSetId","")}}function Dn(n){let e,t;const o=new Map;let i=[];function s(m,l){const f=m.split(" ").filter(M=>M.startsWith("col-"));if(f.length===0){l.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",l.columnInSM=parseInt(p.replace("col-",""),10),l.displayWidthInSM=l.columnInSM/12,l.displayWidthInSM!==1&&(l.isSupportedClass=!1),h=h||"col-md-"+l.columnInSM,l.columnInMD=parseInt(h.replace("col-md-",""),10),l.displayWidthInMD=l.columnInMD/6,[1,2].includes(l.displayWidthInMD)||(l.isSupportedClass=!1),w=w||"col-xl-"+l.columnInMD,l.columnInLG=parseInt(w.replace("col-xl-",""),10),l.displayWidthInLG=l.columnInLG/3,[1,2,3,4].includes(l.displayWidthInLG)||(l.isSupportedClass=!1),T=T||"col-el-"+l.columnInLG,l.columnInEL=parseInt(T.replace("col-el-",""),10),l.displayWidthInEL=l.columnInEL/2,[1,2,3,4,5,6].includes(l.displayWidthInEL)||(l.isSupportedClass=!1)}function a(m,l,g,f=!1){let p=!1;m.contents.forEach(h=>{if(h.type==="fieldset"){g+=1,a(h,l,g,!0),p=!0;return}p&&(g+=1,p=!1);const w=h.appearance&&h.appearance.class,T=new $n;w?s(w,T):T.isSupportedClass=!1,T.label=h.label||h.id,T.id=h.id,T.group=g,f&&(T.fieldSetId=m.id),t===h.id&&(e=g),o.set(h.id,h),l.push(T)})}function d(m){const l=n.getComponentById(m);if(!l||!l.componentType||!l.componentType.startsWith("form"))return{result:!1,message:"只可以在响应式表单组件中调整响应式布局配置"};const g=n.selectNode(l,f=>f.type===yt.DgControl["response-form"].type);return!g||!g.contents||g.contents.length===0?{result:!1,message:"Form区域内没有控件,请先添加控件"}:{result:!0,message:"",formNode:g}}function c(m,l){l=l||m.id;const{result:g,message:f,formNode:p}=d(l);if(!g)return{result:g,message:f};t=m.id,i=[],o.clear();const h=p.contents[0].type===yt.DgControl.fieldset.type?0:1;a(p,i,h);const w=i.find(M=>!M.isSupportedClass);return{defaultState:{defaultGroupNumber:e||1,model:w?"customize":"standard"},importData:i}}function u(m,l){l=l;const{result:g,formNode:f}=d(l);if(!g)return"";const p=[];return m.forEach(h=>{var M;const w=o.get(h.id),T=w.appearance&&w.appearance.class;if(T){const S=T.split(" ").filter(N=>!N.startsWith("col-")),v="col-"+h.columnInSM,y="col-md-"+h.columnInMD,F="col-xl-"+h.columnInLG,A="col-el-"+h.columnInEL,x=[v,y,F,A].concat(S);w.appearance.class=x.join(" ")}if(h.fieldSetId){const $=f.contents.find(v=>v.id===h.fieldSetId),S=p.find(v=>v.id===h.fieldSetId);S?(M=S.contents)==null||M.push(w):(p.push($),$.contents=[w])}else p.push(w)}),f.contents=p,f.id}return{checkCanFindFormNode:d,checkCanOpenLayoutEditor:c,changeFormControlsByResponseLayoutConfig:u,getResonseFormLayoutConfig:a}}var Ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ft(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Hn={exports:{}};(function(n,e){(function(t){n.exports=t()})(function(){return function(){function t(o,i,s){function a(u,m){if(!i[u]){if(!o[u]){var l=typeof ft=="function"&&ft;if(!m&&l)return l(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=i[u]={exports:{}};o[u][0].call(f.exports,function(p){var h=o[u][1][p];return a(h||p)},f,f.exports,t,o,i,s)}return i[u].exports}for(var d=typeof ft=="function"&&ft,c=0;c<s.length;c++)a(s[c]);return a}return t}()({1:[function(t,o,i){var s={},a="(?:^|\\s)",d="(?:\\s|$)";function c(l){var g=s[l];return g?g.lastIndex=0:s[l]=g=new RegExp(a+l+d,"g"),g}function u(l,g){var f=l.className;f.length?c(g).test(f)||(l.className+=" "+g):l.className=g}function m(l,g){l.className=l.className.replace(c(g)," ").trim()}o.exports={add:u,rm:m}},{}],2:[function(t,o,i){(function(s){var a=t("contra/emitter"),d=t("crossvent"),c=t("./classes"),u=document,m=u.documentElement;function l(C,E){var k=arguments.length;k===1&&Array.isArray(C)===!1&&(E=C,C=[]);var V,R,U,K,P,B,W,D,ee,he=null,ve,_,re=!1,ce=0,te,L=E||{};L.moves===void 0&&(L.moves=M),L.accepts===void 0&&(L.accepts=M),L.invalid===void 0&&(L.invalid=et),L.containers===void 0&&(L.containers=C||[]),L.isContainer===void 0&&(L.isContainer=T),L.copy===void 0&&(L.copy=!1),L.copySortSource===void 0&&(L.copySortSource=!1),L.revertOnSpill===void 0&&(L.revertOnSpill=!1),L.removeOnSpill===void 0&&(L.removeOnSpill=!1),L.direction===void 0&&(L.direction="vertical"),L.ignoreInputTextSelection===void 0&&(L.ignoreInputTextSelection=!0),L.mirrorContainer===void 0&&(L.mirrorContainer=u.body);var ne=a({containers:L.containers,start:Ve,end:Le,cancel:Y,remove:j,destroy:De,canMove:ke,dragging:!1});return L.removeOnSpill===!0&&ne.on("over",Tt).on("out",Ft),Be(),ne;function $e(b){return ne.containers.indexOf(b)!==-1||L.isContainer(b)}function Be(b){var O=b?"remove":"add";p(m,O,"mousedown",ue),p(m,O,"mouseup",Pe)}function Te(b){var O=b?"remove":"add";p(m,O,"mousemove",Ke)}function _e(b){var O=b?"remove":"add";d[O](m,"selectstart",He),d[O](m,"click",He)}function De(){Be(!0),Pe({})}function He(b){ve&&b.preventDefault()}function ue(b){K=b.clientX,P=b.clientY;var O=h(b)!==1||b.metaKey||b.ctrlKey;if(!O){var q=b.target,z=Fe(q);z&&(ve=z,Te(),b.type==="mousedown"&&(y(q)?q.focus():b.preventDefault()))}}function Ke(b){if(ve){if(h(b)===0){Pe({});return}if(!(b.clientX!==void 0&&Math.abs(b.clientX-K)<=(L.slideFactorX||0)&&b.clientY!==void 0&&Math.abs(b.clientY-P)<=(L.slideFactorY||0))){if(L.ignoreInputTextSelection){var O=N("clientX",b)||0,q=N("clientY",b)||0,z=u.elementFromPoint(O,q);if(y(z))return}var Z=ve;Te(!0),_e(),Le(),Ie(Z),c.add(D||U,"gu-transit"),Et(),Mt(),ce=0,tt(b)}}}function Fe(b){if(!(ne.dragging&&V)&&!$e(b)){for(var O=b;v(b)&&$e(v(b))===!1;)if(L.invalid(b,O)||(b=v(b),!b))return;var q=v(b);if(q&&!L.invalid(b,O)){var z=L.moves(b,q,O,A(b));if(z)return{item:b,source:q}}}}function ke(b){return!!Fe(b)}function Ve(b){var O=Fe(b);O&&Ie(O)}function Ie(b){Pt(b.item,b.source)&&(D=b.item.cloneNode(!0),ne.emit("cloned",D,b.item,"copy")),R=b.source,U=b.item,B=W=A(b.item),ne.dragging=!0,ne.emit("drag",U,R)}function et(){return!1}function Le(){if(ne.dragging){var b=D||U;Xe(b,v(b))}}function je(){ve=!1,Te(!0),_e(!0)}function Pe(b){if(je(),!!ne.dragging){var O=D||U,q=N("clientX",b)||0,z=N("clientY",b)||0,Z=w(V,q,z),J=Oe(Z,q,z);J&&(D&&L.copySortSource||!D||J!==R)?Xe(O,J):L.removeOnSpill?j():Y()}}function Xe(b,O){var q=v(b);D&&L.copySortSource&&O===R&&q.removeChild(U),le(O)?ne.emit("cancel",b,R):ne.emit("drop",b,O,R,W),se()}function j(){if(ne.dragging){var b=D||U,O=v(b);O&&O.removeChild(b),ne.emit(D?"cancel":"remove",b,O,R),se()}}function Y(b){if(ne.dragging){var O=arguments.length>0?b:L.revertOnSpill,q=D||U,z=v(q),Z=le(z);Z===!1&&O&&(D?z&&z.removeChild(D):R.insertBefore(q,B)),Z||O?ne.emit("cancel",q,R,R):ne.emit("drop",q,z,R,W),se()}}function se(){var b=D||U;je(),jt(),Nt(),b&&c.rm(b,"gu-transit"),ee&&clearTimeout(ee),ne.dragging=!1,he&&ne.emit("out",b,he,R),ne.emit("dragend",b,ce),R=U=D=B=W=ee=he=null}function le(b,O){var q;return O!==void 0?q=O:V?q=W:q=A(D||U),b===R&&q===B}function Oe(b,O,q){for(var z=b;z&&!Z();)z=v(z);return z;function Z(){var J=$e(z);if(J===!1)return!1;var Se=ht(z,b),ye=vt(z,Se,O,q),be=le(z,ye);return be?!0:L.accepts(U,z,R,ye)}}function tt(b){if(!V)return;b.preventDefault();var O=N("clientX",b)||0,q=N("clientY",b)||0;V.style.left=O-2+"px",V.style.top=q-2+"px";var z=D||U,Z=w(V,O,q),J=Oe(Z,O,q),Se=J!==null&&J!==he;(Se||J===null)&&(Ce(),he=J,Ee()),It(Z,q);var ye=v(z);if(J===R&&D&&!L.copySortSource){ye&&ye.removeChild(z);return}var be,Me=ht(J,Z);if(re=nt(Me,J),Me!==null)be=vt(J,Me,O,q);else if(L.revertOnSpill===!0&&!D)be=B,J=R;else{D&&ye&&ye.removeChild(z),D&&_&&(_.style.display="none");return}_.style.display="block",At(be,z,Se),be?kt(Me,be):Vt(J);function de(me){ne.emit(me,z,he,R)}function Ee(){Se&&de("over")}function Ce(){he&&de("out")}}function At(b,O,q){(b===O||b===A(O))&&(W=A(O)),(b===null&&q||b!==O&&b!==A(O))&&(W=b)}function Tt(b){c.rm(b,"gu-hide")}function Ft(b){ne.dragging&&c.add(b,"gu-hide")}function Mt(){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=L.getMirrorText&&L.getMirrorText(U)||"控件",c.add(V,"gu-mirror"),L.mirrorContainer.appendChild(V),p(m,"add","mousemove",tt),c.add(L.mirrorContainer,"gu-unselectable"),ne.emit("cloned",V,U,"mirror"))}function Et(){if(_=document.createElement("div"),c.add(_,"gu-insertion"),U){var b=U.getBoundingClientRect();_.style.left=b.left+"px",_.style.top=b.top+"px"}re=!1,L.mirrorContainer.appendChild(_)}function jt(){V&&(c.rm(L.mirrorContainer,"gu-unselectable"),p(m,"remove","mousemove",tt),v(V).removeChild(V),V=null)}function Nt(){_&&(v(_).removeChild(_),_=null)}function ht(b,O){for(var q=O;q!==b&&v(q)!==b;)q=v(q);return q===m?null:q}function nt(b,O){if(!O)return re;var q=b||O&&O.lastElementChild;if(!q)return!0;var z=getComputedStyle(b),Z=/^inline/.test(z.getPropertyValue("display"))||/^(left|right)$/.test(z.getPropertyValue("float"));if(Z)return!0;if(O){var J=getComputedStyle(O),Se=J.getPropertyValue("display");if(/flex$/.test(Se)){var ye=J.getPropertyValue("flex-direction")||"row";if(ye==="row"||ye==="row-reverse")return!Bt(O)}return!1}return!0}function Bt(b){if(!b.children||!b.children.length)return!1;for(const O of Array.from(b.children)){const z=(O.className&&O.className.split(" ")||[]).filter(Z=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(Z));if(!z.length)return!1;for(const Z of z){const J=Z.slice(Z.lastIndexOf("-")+1);if(parseInt(J,10)!==12)return!1}}return!0}function kt(b,O){const q=O.getBoundingClientRect();if(_.style.left=q.left+"px",_.style.top=q.top+"px",re){if(_.style.height=q.height+"px",_.style.width="4px",b){const z=b.getBoundingClientRect();z.top!==q.top&&(_.style.left=z.right+"px",_.style.top=z.top+"px",_.style.height=z.height+"px")}}else if(_.style.height="4px",_.style.width=q.width+"px",te){const z=te.getBoundingClientRect();q.top<z.top&&(_.style.display="none")}O===U&&U&&(_.style.display="none")}function Vt(b){W=null;var O=b.lastElementChild;if(O){var q=O.getBoundingClientRect();re?(_.style.left=q.right+"px",_.style.top=q.top+"px",_.style.height=q.height+"px",_.style.width="4px"):(_.style.left=q.left+"px",_.style.top=q.bottom+"px",_.style.height="4px",_.style.width=q.width+"px"),O===U&&U&&(_.style.display="none")}else _.style.display="none"}function It(b,O){if(!L.mirrorContainer.contains(b)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(te=g(b),!te||!te.contains(b)))return;const q=document.querySelector(".dgComponentSelected"),z=te.getBoundingClientRect();if(O-30<z.top&&te.scrollTop>0){let Z=te.scrollTop<10?te.scrollTop:10;te.scrollBy(0,-1*Z),q&&te.contains(q)&&(ce=ce+-1*Z)}if(O+30>z.bottom&&te.scrollTop<te.scrollHeight-te.clientHeight){const Z=te.scrollHeight-te.clientHeight-te.scrollTop;let J=Z<10?Z:10;te.scrollBy(0,J),q&&te.contains(q)&&(ce=ce+J)}}function vt(b,O,q,z){var Z=L.direction==="horizontal",J=L.direction==="mixed",Se=O!==b?be():ye();return Se;function ye(){var de=b.children.length,Ee,Ce,me;for(Ee=0;Ee<de;Ee++)if(Ce=b.children[Ee],me=Ce.getBoundingClientRect(),Z&&me.left+me.width/2>q||!J&&!Z&&me.top+me.height/2>z||J&&me.left+me.width>q&&me.top+me.height>z)return Ce;return null}function be(){var de=O.getBoundingClientRect();if(J){var Ee=z-de.top,Ce=q-de.left,me=de.bottom-z,ot=de.right-q,rt=Math.min(Ce,ot,Ee,me),it;return re?it=ot<Ce:it=me===rt||ot===rt||Ce===rt,Me(it)}return Me(Z?q>de.left+$(de)/2:z>de.top+S(de)/2)}function Me(de){return de?A(O):O}}function Pt(b,O){return typeof L.copy=="boolean"?L.copy:L.copy(b,O)}}function g(C){const E=Array.from(window.scrollContainerList);if(E.length===1){const V=Array.from(window.scrollContainerList)[0];return document.getElementById(V)}const k=f(E);for(const V of k)if(V.contains(C))return V;return null}function f(C){const E=[];return C.forEach(k=>{const V=document.getElementById(k);V&&E.push(V)}),E.sort((k,V)=>k.contains(V)?1:V.contains(k)?-1:0),E}function p(C,E,k,V){var R={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},U={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},K={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};s.navigator.pointerEnabled?d[E](C,U[k],V):s.navigator.msPointerEnabled?d[E](C,K[k],V):(d[E](C,R[k],V),d[E](C,k,V))}function h(C){if(C.touches!==void 0)return C.touches.length;if(C.which!==void 0&&C.which!==0)return C.which;if(C.buttons!==void 0)return C.buttons;var E=C.button;if(E!==void 0)return E&1?1:E&2?3:E&4?2:0}function w(C,E,k){C=C||{};var V=C.className||"",R;return C.className+=" gu-hide",R=u.elementFromPoint(E,k),C.className=V,R}function T(){return!1}function M(){return!0}function $(C){return C.width||C.right-C.left}function S(C){return C.height||C.bottom-C.top}function v(C){return C.parentNode===u?null:C.parentNode}function y(C){return C.tagName==="INPUT"||C.tagName==="TEXTAREA"||C.tagName==="SELECT"||F(C)}function F(C){return!C||C.contentEditable==="false"?!1:C.contentEditable==="true"?!0:F(v(C))}function A(C){return C.nextElementSibling||E();function E(){var k=C;do k=k.nextSibling;while(k&&k.nodeType!==1);return k}}function x(C){return C.targetTouches&&C.targetTouches.length?C.targetTouches[0]:C.changedTouches&&C.changedTouches.length?C.changedTouches[0]:C}function N(C,E){var k=x(E),V={pageX:"clientX",pageY:"clientY"};return C in V&&!(C in k)&&V[C]in k&&(C=V[C]),k[C]}o.exports=l}).call(this,typeof Ne<"u"?Ne:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(t,o,i){o.exports=function(a,d){return Array.prototype.slice.call(a,d)}},{}],4:[function(t,o,i){var s=t("ticky");o.exports=function(d,c,u){d&&s(function(){d.apply(u||null,c||[])})}},{ticky:10}],5:[function(t,o,i){var s=t("atoa"),a=t("./debounce");o.exports=function(c,u){var m=u||{},l={};return c===void 0&&(c={}),c.on=function(g,f){return l[g]?l[g].push(f):l[g]=[f],c},c.once=function(g,f){return f._once=!0,c.on(g,f),c},c.off=function(g,f){var p=arguments.length;if(p===1)delete l[g];else if(p===0)l={};else{var h=l[g];if(!h)return c;h.splice(h.indexOf(f),1)}return c},c.emit=function(){var g=s(arguments);return c.emitterSnapshot(g.shift()).apply(this,g)},c.emitterSnapshot=function(g){var f=(l[g]||[]).slice(0);return function(){var p=s(arguments),h=this||c;if(g==="error"&&m.throws!==!1&&!f.length)throw p.length===1?p[0]:p;return f.forEach(function(T){m.async?a(T,p,h):T.apply(h,p),T._once&&c.off(g,T)}),c}},c}},{"./debounce":4,atoa:3}],6:[function(t,o,i){(function(s){var a=t("custom-event"),d=t("./eventmap"),c=s.document,u=g,m=p,l=[];s.addEventListener||(u=f,m=h),o.exports={add:u,remove:m,fabricate:w};function g(v,y,F,A){return v.addEventListener(y,F,A)}function f(v,y,F){return v.attachEvent("on"+y,M(v,y,F))}function p(v,y,F,A){return v.removeEventListener(y,F,A)}function h(v,y,F){var A=$(v,y,F);if(A)return v.detachEvent("on"+y,A)}function w(v,y,F){var A=d.indexOf(y)===-1?N():x();v.dispatchEvent?v.dispatchEvent(A):v.fireEvent("on"+y,A);function x(){var C;return c.createEvent?(C=c.createEvent("Event"),C.initEvent(y,!0,!0)):c.createEventObject&&(C=c.createEventObject()),C}function N(){return new a(y,{detail:F})}}function T(v,y,F){return function(x){var N=x||s.event;N.target=N.target||N.srcElement,N.preventDefault=N.preventDefault||function(){N.returnValue=!1},N.stopPropagation=N.stopPropagation||function(){N.cancelBubble=!0},N.which=N.which||N.keyCode,F.call(v,N)}}function M(v,y,F){var A=$(v,y,F)||T(v,y,F);return l.push({wrapper:A,element:v,type:y,fn:F}),A}function $(v,y,F){var A=S(v,y,F);if(A){var x=l[A].wrapper;return l.splice(A,1),x}}function S(v,y,F){var A,x;for(A=0;A<l.length;A++)if(x=l[A],x.element===v&&x.type===y&&x.fn===F)return A}}).call(this,typeof Ne<"u"?Ne:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(t,o,i){(function(s){var a=[],d="",c=/^on/;for(d in s)c.test(d)&&a.push(d.slice(2));o.exports=a}).call(this,typeof Ne<"u"?Ne:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(t,o,i){(function(s){var a=s.CustomEvent;function d(){try{var c=new a("cat",{detail:{foo:"bar"}});return c.type==="cat"&&c.detail.foo==="bar"}catch{}return!1}o.exports=d()?a:typeof document<"u"&&typeof document.createEvent=="function"?function(u,m){var l=document.createEvent("CustomEvent");return m?l.initCustomEvent(u,m.bubbles,m.cancelable,m.detail):l.initCustomEvent(u,!1,!1,void 0),l}:function(u,m){var l=document.createEventObject();return l.type=u,m?(l.bubbles=!!m.bubbles,l.cancelable=!!m.cancelable,l.detail=m.detail):(l.bubbles=!1,l.cancelable=!1,l.detail=void 0),l}}).call(this,typeof Ne<"u"?Ne:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(t,o,i){var s=o.exports={},a,d;function c(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=c}catch{a=c}try{typeof clearTimeout=="function"?d=clearTimeout:d=u}catch{d=u}})();function m(S){if(a===setTimeout)return setTimeout(S,0);if((a===c||!a)&&setTimeout)return a=setTimeout,setTimeout(S,0);try{return a(S,0)}catch{try{return a.call(null,S,0)}catch{return a.call(this,S,0)}}}function l(S){if(d===clearTimeout)return clearTimeout(S);if((d===u||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(S);try{return d(S)}catch{try{return d.call(null,S)}catch{return d.call(this,S)}}}var g=[],f=!1,p,h=-1;function w(){!f||!p||(f=!1,p.length?g=p.concat(g):h=-1,g.length&&T())}function T(){if(!f){var S=m(w);f=!0;for(var v=g.length;v;){for(p=g,g=[];++h<v;)p&&p[h].run();h=-1,v=g.length}p=null,f=!1,l(S)}}s.nextTick=function(S){var v=new Array(arguments.length-1);if(arguments.length>1)for(var y=1;y<arguments.length;y++)v[y-1]=arguments[y];g.push(new M(S,v)),g.length===1&&!f&&m(T)};function M(S,v){this.fun=S,this.array=v}M.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={};function $(){}s.on=$,s.addListener=$,s.once=$,s.off=$,s.removeListener=$,s.removeAllListeners=$,s.emit=$,s.prependListener=$,s.prependOnceListener=$,s.listeners=function(S){return[]},s.binding=function(S){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(S){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],10:[function(t,o,i){(function(s){var a=typeof s=="function",d;a?d=function(c){s(c)}:d=function(c){setTimeout(c,0)},o.exports=d}).call(this,t("timers").setImmediate)},{timers:11}],11:[function(t,o,i){(function(s,a){var d=t("process/browser.js").nextTick,c=Function.prototype.apply,u=Array.prototype.slice,m={},l=0;i.setTimeout=function(){return new g(c.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new g(c.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(f){f.close()};function g(f,p){this._id=f,this._clearFn=p}g.prototype.unref=g.prototype.ref=function(){},g.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(f,p){clearTimeout(f._idleTimeoutId),f._idleTimeout=p},i.unenroll=function(f){clearTimeout(f._idleTimeoutId),f._idleTimeout=-1},i._unrefActive=i.active=function(f){clearTimeout(f._idleTimeoutId);var p=f._idleTimeout;p>=0&&(f._idleTimeoutId=setTimeout(function(){f._onTimeout&&f._onTimeout()},p))},i.setImmediate=typeof s=="function"?s:function(f){var p=l++,h=arguments.length<2?!1:u.call(arguments,1);return m[p]=!0,d(function(){m[p]&&(h?f.apply(null,h):f.call(null),i.clearImmediate(p))}),p},i.clearImmediate=typeof a=="function"?a:function(f){delete m[f]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Hn);const Ln={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}},zn={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},Ct=r.defineComponent({name:"Toast",props:zn,emits:["close","click"],setup:(n,e)=>{const{locale:t,t:o}=at.useI18n(),i=r.ref(n.animate),s="fadeOut",a=r.computed(()=>n.options),d=r.ref(!1),c=r.computed(()=>a.value.title&&a.value.message),u=r.computed(()=>!a.value.title&&a.value.message),m=r.computed(()=>{const S={animated:d.value,toast:!0,"toast--only-content":u.value};return S[n.animate]=!1,S[s]=d.value,S["toasty-type-"+a.value.type]=!0,a.value.theme&&(S[a.value.theme]=!0),S}),l=r.computed(()=>{const y=`f-icon-${a.value&&a.value.type?a.value.type.replace("toasty-type-",""):"default"}`,F={"f-icon":!0};return F[y]=!0,F}),g=r.computed(()=>a.value.title||a.value.message),f=r.computed(()=>n.showCloseButton),p=r.computed(()=>!!a.value.buttons||!!e.slots.default),h=r.computed(()=>t.value==="en"?{wordBreak:"keep-all",overflowWrap:"break-word"}:{});function w(S){S.stopPropagation(),S.preventDefault(),d.value=!1,setTimeout(()=>{e.emit("close",a.value)},200)}function T(S,v){}function M(S){return`f-preten-link ${S.customClass?S.customClass:""}`}r.watch(i,()=>{i.value});const $=()=>{var S;return r.createVNode(r.Fragment,null,[r.createVNode("div",{class:"after-toast-msg text-right"},[!e.slots.default&&((S=a.value.buttons)==null?void 0:S.map(v=>r.createVNode("span",{class:M(v),onClick:y=>void 0},[v.text]))),e.slots.default&&e.slots.default()])])};return()=>r.createVNode("div",{class:m.value,style:"min-height:44px"},[f.value&&r.createVNode("button",{title:o("messageBox.close"),class:"toast-close f-btn-icon f-bare",onClick:w},[r.createVNode("span",{class:"f-icon modal_close"},null)]),g.value&&r.createVNode("section",{class:"modal-tips"},[r.createVNode("div",{class:"float-left modal-tips-iconwrap"},[r.createVNode("span",{class:l.value},null)]),r.createVNode("div",{class:"modal-tips-content"},[c.value&&r.createVNode(r.Fragment,null,[r.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:a.value.title},null),r.createVNode("p",{class:"toast-msg",innerHTML:a.value.message,style:h.value},null),p.value&&$()]),u.value&&(a.value.buttons?r.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[r.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:h.value,innerHTML:a.value.message},null),r.createVNode("div",{class:"after-toast-title text-right ml-auto"},[$()])]):r.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:h.value,innerHTML:a.value.message},null))])])])}}),pt=r.defineComponent({name:"Notify",props:Ln,emits:["close","empty"],setup(n,e){const t=r.computed(()=>({"farris-notify":!0})),o={left:12,right:12,top:20,bottom:12},i=r.ref(),s=r.ref(n.options),a=r.ref(n.showCloseButton),d=r.computed(()=>n.position||"bottom-right"),c=r.computed(()=>n.timeout!=null?n.timeout:3e3),u=r.computed(()=>{const g=n.bottom?n.bottom:o.bottom,f=n.top?n.top:o.top,p={transition:"all 0.2s ease",left:d.value.indexOf("left")>-1?`${n.left?n.left:o.left}px`:"",right:d.value.indexOf("right")>-1?`${n.right?n.right:o.right}px`:"",top:d.value.indexOf("top")>-1?`${f}px`:"",bottom:d.value.indexOf("bottom")>-1?`${g}px`:""};return d.value.indexOf("center")>-1&&(p.left="50%",p.marginLeft="calc(-24rem / 2)",d.value==="center-center"&&(p.top="50%",p.transform="translate(-50%, -50%)")),p});function m(g){e.emit("close")}c.value&&setTimeout(()=>{m()},c.value),e.expose({closeToast:m,container:i,notifyPosition:d});function l(g,f){m()}return()=>r.createVNode("div",{class:t.value,style:u.value,ref:i},[r.createVNode(Ct,{options:s.value,showCloseButton:a.value,animate:n.animate,onClose:g=>l(g,s.value)},null)])}});class Un{constructor(){G(this,"notifyRefs",[]);G(this,"globalConfig",r.reactive({}))}escapeAllHtml(e){if(typeof e!="string"||!e)return"";const t=document.createElement("div");return t.textContent=e||"",t.innerHTML.replace(/\\n/g,"<br>").replace(/\\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\\r/g,"")}createNotifyInstance(e){const t=this,i=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0,safeHtml:!0},this.globalConfig,{...e}),s=document.createElement("div");s.style.display="contents";const a=r.createApp({setup(){var u;const d=r.ref();function c(){d.value.container.style.transform="scale(0)",setTimeout(()=>{t.updateNotifyPositionForClose(i,d),a.unmount()},220)}if(i.position.indexOf("top")>-1){const m=t.getNotifyInstances(i.position),l=m[m.length-1];if(l){const g=l.value.container.getBoundingClientRect();i.top=g.bottom}}return i.safeHtml&&((u=i.options)!=null&&u.message)&&(i.options.message=t.escapeAllHtml(i.options.message)),r.onUnmounted(()=>{document.body.removeChild(s)}),r.onMounted(()=>{t.updateNotifyPositionForCreate(i,d)}),()=>r.createVNode(r.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[r.createVNode(pt,r.mergeProps({ref:d},i,{onClose:c}),null)]})}});return a.provide("NotifyService",this),document.body.appendChild(s),a.use(st.LocaleService.i18n),a.mount(s),a}getNotifyInstances(e){return this.notifyRefs.filter(t=>t.value.notifyPosition===e)}updateNotifyPositionForCreate(e,t){if(this.notifyRefs&&this.notifyRefs.length){const o=window.innerHeight;e.position.indexOf("bottom")>-1&&this.getNotifyInstances(e.position).forEach(i=>{const s=i.value.container.getBoundingClientRect();i.value.container.style.bottom=s.height+o-s.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,t]}updateNotifyPositionForClose(e,t){const o=this.notifyRefs.indexOf(t);if(e.position.indexOf("top")>-1){const i=this.getNotifyInstances(e.position),s=i.indexOf(t);i.slice(s+1).forEach(a=>{a.value.container.style.top=a.value.container.offsetTop-a.value.container.offsetHeight+"px"})}o>-1&&this.notifyRefs.splice(o,1)}show(e){return this.createNotifyInstance(e)}buildNotifyProps(e,t){let o="",i="",s,a,d;typeof t=="string"?o=t:t&&(o=t.message||"",i=t.title||"",a=t.position||null,d=t.showCloseButton!=null?t.showCloseButton:null,s=t.timeout!=null?t.timeout:null);const u={options:{type:e,message:o,title:i}};return a!=null&&(u.position=a),d!=null&&(u.showCloseButton=d),s!=null&&(u.timeout=s),u}info(e){const t=this.buildNotifyProps("info",e);return this.show(t)}success(e){const t=this.buildNotifyProps("success",e);return this.show(t)}warning(e){const t=this.buildNotifyProps("warning",e);return this.show(t)}error(e){const t=this.buildNotifyProps("error",e);return this.show(t)}close(e){e&&e.unmount()}closeAll(){this.notifyRefs.forEach(e=>{e==null||e.value.closeToast()}),this.notifyRefs.length=0}}const Wn=Symbol("NOTIFY_SERVICE_TOKEN");pt.install=n=>{n.component(pt.name,pt),n.component(Ct.name,Ct);const e=new Un;n.provide(Wn,e),n.provide("FNotifyService",e)},`${st.LocaleService.getLocaleValue("datagrid.loadingMessage")}`;const Gn={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:st.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 Qn(n,e,t,o,i,s,a,d,c,u,m,l,g,f,p,h,w){const{calculateCellPositionInRow:T}=s,{columnContext:M,hasLeftFixedColumn:$,hasRightFixedColumn:S}=a,{gridDataStyle:v,leftFixedGridDataStyle:y,rightFixedGridDataStyle:F}=f,{renderDataRow:A}=X.getHierarchyRow(n,e,M,w,d,c,u,m,l,g,f,p,h),x=[A];function N(R,U){const K=T(R);return w.value.filter(P=>P.visible!==!1).map((P,B)=>x[P.type](P,K,U,B))}function C(){return r.createVNode("div",{ref:o,class:"fv-grid-content-left-fixed"},[r.createVNode("div",{class:"fv-grid-data",style:y.value},[N(M.value.leftColumns.filter(R=>R.visible),"left")])])}function E(){return r.createVNode("div",{ref:t,class:"fv-grid-content-primary"},[r.createVNode("div",{class:"fv-grid-data",style:v.value},[N(M.value.primaryColumns.filter(R=>R.visible),"primary")])])}function k(){return r.createVNode("div",{ref:i,class:"fv-grid-content-right-fixed"},[r.createVNode("div",{class:"fv-grid-data",style:F.value},[N(M.value.rightColumns.filter(R=>R.visible),"right")])])}function V(){const R=[];return $.value&&R.push(C()),R.push(E()),S.value&&R.push(k()),R}return{renderDataArea:V}}const _n=r.defineComponent({name:"FTreeGrid",props:Gn,emits:["selectionChange","clickRow","expandNode","unSelectItem","dblclickNode","doubleClickRow","unSelectItem","selectItem","filterChanged","sortChanged"],setup(n,e){var tn,nn;const o=((tn=n.rowOption)==null?void 0:tn.height)||28,i=r.ref(20),s=r.ref(n.columns),a=X.useIdentify(n),{idField:d}=a,c=r.ref(),u=r.ref(),m=r.ref(),l=r.ref(),g=r.ref(),f=r.ref([]),p=r.ref(!1),h=r.ref(((nn=n.rowOption)==null?void 0:nn.wrapContent)||!1),w=X.useGroupData(n,a),T=X.useFilter(n,e),M=X.useHierarchy(n),{collapseField:$}=M,{showLoading:S,renderLoading:v}=X.useLoading(n,c),y=X.useDataView(n,new Map,T,M,a),{dataView:F}=y,A=X.useSelection(n,y,a,f,e),{showSelection:x,selectedValues:N}=A,C=X.useSelectHierarchyItem(n,f,y,a,A,e),E=r.computed(()=>n.disabled),k=r.computed(()=>n.virtualized?Math.min(y.dataView.value.length,i.value):y.dataView.value.length),V=X.usePagination(n,y),{shouldRenderPagination:R}=V,{containerStyleObject:U}=X.useDataViewContainerStyle(n),K=X.useCommandColumn(n),{applyCommands:P}=K;P(s);const{applyColumnSetting:B,removeColumnSetting:W}=X.useSettingColumn(n);n.showSetting&&B(s);const D=X.useColumn(n,e),ee=X.useSort(n),{applyColumnSorter:he,columnContext:ve,updateColumnRenderContext:_}=D;he(y,ee);const re=X.useGroupColumn(n,ve),ce=X.useRow(n,e,A,a),te=X.useEdit(n,e,a,ce,f),L=X.useVisualDataBound(n),ne=X.useVisualDataCell(n,te,L),$e=X.useVisualDataRow(n,y,te,M,a,L,ne),Be=X.useVisualData(n,s,y,k,0,$e),{getVisualData:Te}=Be,_e=X.useCellPosition(n,ve),De=X.useSidebar(n,A),{sidebarWidth:He}=De,ue=X.useVirtualScroll(n,y,f,ve,Be,k,0,He),{onWheel:Ke,dataGridWidth:Fe,viewPortHeight:ke,viewPortWidth:Ve,resetScroll:Ie,updateVisibleRowsOnLatestVisibleScope:et}=ue,Le=X.useFitColumn(n,ve,u,Ve,re),{calculateColumnsSize:je}=Le,Pe=X.useFilterHistory(),Xe=X.useColumnFilter(u,g,y,Pe,ue),j=X.useDragColumn(n,e,D,y,re,w,ue),Y=r.computed(()=>{const H={"fv-grid":!0,"fv-grid-bordered":n.showBorder,"fv-grid-horizontal-bordered":n.showHorizontalLines,"fv-datagrid-strip":n.showStripe};return xe.getCustomClass(H,n.customClass)}),se=r.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":p.value,"fv-grid-wrap-content":h.value})),{renderDataArea:le}=Qn(n,e,m,l,g,_e,D,y,te,M,ce,A,C,ue,Be,L,f),{renderGridHeader:Oe,renderGridColumnResizeOverlay:tt,shouldShowHeader:At}=X.getColumnHeader(n,e,u,l,g,D,y,j,Xe,T,Pe,Le,re,A,De,ee,ue,Ve,f),{renderDataGridSidebar:Tt}=X.getSidebar(n,ce,A,De,ue),{renderDisableMask:Ft}=X.getDisableMask(),{renderHorizontalScrollbar:Mt}=X.getHorizontalScrollbar(n,u,ue),{renderVerticalScrollbar:Et}=X.getVerticalScrollbar(n,u,ue);function jt(){var H,Q,fe;if(u.value&&u.value.clientHeight>0&&((H=u.value)==null?void 0:H.clientWidth)>0){const ge=Math.ceil(u.value.clientHeight/o);ge>i.value&&(i.value=ge,et()),ke.value=((Q=m.value)==null?void 0:Q.clientHeight)||0,Fe.value=((fe=u.value)==null?void 0:fe.clientWidth)||0,je()}}r.onMounted(()=>{u.value&&(i.value=Math.max(Math.ceil(u.value.clientHeight/o),i.value),f.value=Te(0,k.value+0-1),rn.useResizeObserver(u.value,jt),je(),r.nextTick(()=>{u.value&&(Fe.value=u.value.clientWidth),m.value&&(Ve.value=m.value.clientWidth,ke.value=m.value.clientHeight)})),S.value&&v()}),r.onUnmounted(()=>{}),r.watch(Ve,()=>{u.value&&je()});function Nt(H){y.collapseTo(H),y.reOrderVisibleIndex(),Ie()}function ht(H){y.expandTo(H),y.reOrderVisibleIndex(),Ie()}function nt(){const H=A.getSelectionRow();return H?H.dataIndex-1:-1}function Bt(){const H=nt();y.insertNewDataItem(H),f.value=Te(0,k.value+0-1)}function kt(){const H=nt();y.insertNewChildDataItem(H),f.value=Te(0,k.value+0-1)}function Vt(H,Q){const fe=f.value.find(we=>we.raw[d.value]===Q),ge=fe?fe.dataIndex-1:-1;y.insertNewChildDataItems(H,ge)}function It(){const H=nt(),Q=C.getNextSelectableHierarchyItemId(H);y.removeHierarchyDataItem(H),f.value=Te(0,k.value+0-1),Q&&A.selectItemById(Q)}function vt(H){te.onEditingRow(H)}function Pt(H){te.acceptEditingRow(H)}function b(H){te.cancelEditingRow(H)}function O(H){H&&(s.value=H,P(s),_(s.value),he(y,ee),je())}r.watch(()=>n.columns,H=>{O(H)});function q(H,Q){H&&(y.load(H),y.reOrderVisibleIndex(),Q!=null&&Q.keepScrollPosition?ue.scrollTo(ue.offsetY.value):Ie())}function z(H){A.selectItemById(H)}function Z(H){const Q=f.value.find(fe=>fe.raw[a.idField.value]===H);Q&&ce.clickRowItem(Q)}function J(H){ce.activeRowById(H)}function Se(H){A.selectItemByIds(H)}function ye(){return A.getSelectedItems()}function be(){A.clearSelection()}const Me=r.computed(()=>!f.value||!f.value.length),{renderEmpty:de}=X.getEmpty(n,e);function Ee(){return A.getSelectionRow()}function Ce(H){A.unSelectItemByIds(H)}function me(){return A.currentSelectedDataId.value}function ot(H,Q,fe){const ge=F.value.find(we=>we[d.value]===H);if(ge){if(Object.keys(ge).forEach(pe=>{Object.prototype.hasOwnProperty.call(Q,pe)&&(ge[pe]=Q[pe])}),fe){const{collapseField:pe,disabledField:ze,checkedField:Ue,visibleField:We}=fe;pe&&!ie.isUndefined(Q[pe])&&(ge.__fv_collapse__=Q[pe]),Ue&&!ie.isUndefined(Q[Ue])&&(ge.__fv_checked__=Q[Ue]),ze&&!ie.isUndefined(Q[ze])&&(ge.__fv_disabled__=Q[ze]),We&&!ie.isUndefined(Q[We])&&(ge.__fv_visible__=Q[We])}const we=f.value.find(pe=>pe.raw[d.value]===H),on=f.value.findIndex(pe=>pe.raw[d.value]===H);if(we){if(we.raw=ge,Object.keys(we.data).forEach(pe=>{we.data[pe].updateData(ge)}),fe){const{collapseField:pe,disabledField:ze,checkedField:Ue,visibleField:We}=fe;pe&&!ie.isUndefined(Q[pe])&&(we.collapse=Q[pe]),Ue&&!ie.isUndefined(Q[Ue])&&(we.checked=Q[Ue]),ze&&!ie.isUndefined(Q[ze])&&(we.disabled=Q[ze]),We&&!ie.isUndefined(Q[We])&&(we.visible=Q[We])}f.value=[...f.value.slice(0,on),we,...f.value.slice(on+1)],y.updateSummary()}}}function rt(H){return Object.prototype.hasOwnProperty.call(H,"raw")?y.hasRealChildren(H.raw):y.hasRealChildren(H)}function it(H){const Q=y.dataView.value.find(fe=>fe[d.value]===H);return Q?Q[$.value]:""}function Ho(){return $.value}r.watch(()=>n.showSetting,(H,Q)=>{H!==Q&&(H?B(s):W(s),O(s.value))});function Lo(H){return f.value.filter(Q=>H.includes(Q.raw[n.idField]))}function zo(H){const Q=a.idField.value,fe=f.value.find(ge=>ge.raw[Q]===H);fe&&ce.selectRow(fe)}function Uo(){A.keepSelectingOnPaging.value||be(),y.updateVisibleDataSummary(f.value)}e.expose({activeRowById:J,addNewDataItem:Bt,addNewChildDataItem:kt,addChildrenToNode:Vt,collapseTo:Nt,expandTo:ht,removeDataItem:It,editDataItem:vt,acceptDataItem:Pt,cancelDataItem:b,updateColumns:O,updateDataSource:q,selectItemById:z,selectItemByIds:Se,getSelectedItems:ye,clearSelection:be,getSelectionRow:Ee,clickRowItemById:Z,unSelectItemByIds:Ce,getCurrentRowId:me,reassignRowData:ot,hasChildren:rt,getCollapseField:Ho,getCollapseStatusById:it,getVisibleDataByIds:Lo,selectRowById:zo,updateDerivedData:Uo});const Wo=r.computed(()=>{const H={};return ue.shouldShowHorizontalScrollbar.value&&(H.paddingBottom="10px"),ue.shouldShowVirticalScrollbar.value&&(H.paddingRight="10px"),H}),Go=r.computed(()=>({...U.value,borderRadius:"5px"}));X.getPagination(n,e,y,ue,V,A);const Qo=r.computed(()=>({"d-flex":!0,"justify-content-between":R.value&&x.value,"justify-content-end":R.value&&!x.value,"position-relative":!0})),_o=r.computed(()=>({"d-flex":!0,"align-items-center":!0})),{renderDataGridSummary:Xo}=X.getSummary(n,y,D);return()=>r.createVNode("div",{ref:c,class:Y.value,style:Go.value,onWheel:Ke},[u.value&&At.value&&Oe(),r.createVNode("div",{ref:u,class:se.value,onMouseover:()=>p.value=!0,onMouseleave:()=>p.value=!1,style:Wo.value},[u.value&&Tt(f),u.value&&le(),u.value&&Me.value&&de(),u.value&&Mt(),u.value&&Et()]),u.value&&Xo(),x.value&&r.createVNode("div",{class:Qo.value},[x.value&&r.createVNode("div",{class:_o.value},[r.createVNode("div",null,["已选:"+N.value.length,r.createTextVNode(" 条")])])]),tt(),E.value&&Ft()])}});xe.withInstall(_n);function _t(n,e){return{customClass:e.class,customStyle:e.style}}const Xn=new Map([["appearance",_t]]);function Yn(n,e,t){return e}const Zn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/step.schema.json",title:"step",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for step",type:"string"},type:{description:"The type string of step",type:"string",default:"step"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Jn={title:"step",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},wt={direction:{type:String,default:"horizontal"},fill:{type:Boolean,default:!1},height:{type:Number,default:0},clickable:{type:Boolean,default:!0},steps:{type:Array,default:[{id:"1",title:"审批中(示例)",description:"正在审批"},{id:"2",title:"复核中(示例)",description:"等待复核"}]},activeIndex:{type:Number,default:0},onClick:{type:Function,default:()=>{}}},Xt=Ze(wt,Zn,Xn,Yn,Jn),Ge=r.defineComponent({name:"FStep",props:wt,emits:["click"],setup(n,e){const t=r.ref(n.direction),o=r.ref(n.fill),i=r.ref(n.height),s=r.ref(n.steps),a=r.ref(n.activeIndex),d=r.computed(()=>({"f-progress-step-list":t.value==="horizontal","f-progress-step-list-block":t.value==="vertical","f-progress-step-horizontal-fill":t.value==="horizontal"&&o.value,"f-progress-step-vertical-fill":t.value==="vertical"&&o.value})),c=r.computed(()=>({height:t.value==="vertical"?`${i.value}px`:""}));function u(S,v){const y={step:!0,active:v===a.value,clickable:n.clickable,current:v===a.value,finish:v<a.value};return S.status&&(y[S.status]=!0),xe.getCustomClass(y,S.class||"")}function m(S,v){if(!n.clickable)return;const y={step:S,stepIndex:v};e.emit("click",y)}function l(S,v){const y={"f-progressstep-row":!0,"step-active":v===a.value,"step-current":v===a.value,"step-finish":v<a.value};return S.status&&(y["step-"+S.status]=!0),y}function g(S,v){const y={"step-icon":!0,"step-success":v,"f-icon":v,"f-icon-check":v};return xe.getCustomClass(y,S.icon||"")}function f(S,v){const y=[];return S.icon?y.push(r.createVNode("span",{class:g(S,!1)},null)):v>=a.value?y.push(r.createVNode("span",{class:"step-icon"},[v+1])):y.push(r.createVNode("span",{class:g(S,!0)},null)),y}function p(S,v){return{"step-name":!0,"step-name-success":v<a.value}}function h(S,v){return r.createVNode("div",{class:"f-progress-step-title"},[r.createVNode("p",{class:p(S,v)},[S.title])])}function w(S,v){return{"f-progress-step-line":!0,"f-progress-step-line-success":v===a.value}}function T(S,v){return v!==s.value.length-1}const M=r.computed(()=>({triangle:!0,"":t.value==="vertical"}));function $(){return s.value.map((S,v)=>r.createVNode("li",{class:u(S,v),onClick:y=>m(S,v)},[r.createVNode("div",{class:l(S,v)},[r.createVNode("div",{class:"f-progress-step-content"},[f(S,v),h(S,v)]),T(S,v)&&r.createVNode("div",{class:w(S,v)},[r.createVNode("span",{class:M.value},null)])])]))}return r.watch(()=>n.activeIndex,()=>{n.activeIndex>-1&&n.activeIndex<=s.value.length&&(a.value=n.activeIndex,$())}),()=>r.createVNode("div",{class:"f-progress-step"},[r.createVNode("ul",{class:d.value,style:c.value},[$()])])}});function Kn(n,e,t){var C;const o="",i="",s=r.ref();let a;function d(){return(e==null?void 0:e.schema.componentType)!=="frame"}function c(){return!1}function u(){return(e==null?void 0:e.schema.componentType)!=="frame"}function m(){return(e==null?void 0:e.schema.componentType)==="frame"}function l(E){if(!E||!E.value)return null;if(E.value.schema&&E.value.schema.type==="component")return E.value;const k=r.ref(E==null?void 0:E.value.parent),V=l(k);return V||null}function g(E=e){var U;const{componentInstance:k,designerItemElementRef:V}=E;if(!k||!k.value)return null;const{getCustomButtons:R}=k.value;return k.value.canMove||R&&((U=R())!=null&&U.length)?V:g(E.parent)}function f(E){return!!t}function p(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function h(){}function w(E,k){var V;!E||!k||(V=e==null?void 0:e.setupContext)==null||V.emit("dragEnd")}function T(E,k){const{componentType:V}=E;let R=Ye.getSchemaByTypeForDesigner(V,E,k);const U=V.toLowerCase().replace(/-/g,"_");return R&&!R.id&&R.type===V&&(R.id=`${U}_${Math.random().toString().slice(2,6)}`),R}function M(E){}function $(...E){}function S(E){if(!E)return;const k=e==null?void 0:e.schema,{formSchemaUtils:V}=E;if(k&&V.getExpressions().length){const R=V.getExpressions().findIndex(U=>U.target===k.id);R>-1&&V.getExpressions().splice(R,1)}}function v(E){if(!E||!(e!=null&&e.schema))return;const k=e.schema,{formSchemaUtils:V}=E;V.removeCommunicationInComponent(k)}function y(E){S(E),v(E),e!=null&&e.schema.contents&&e.schema.contents.map(k=>{let V=k.id;k.type==="component-ref"&&(V=k.component);const R=n.value.querySelectorAll(`#${V}-design-item`);R!=null&&R.length&&Array.from(R).map(U=>{var K;(K=U==null?void 0:U.componentInstance)!=null&&K.value.onRemoveComponent&&U.componentInstance.value.onRemoveComponent(E)})})}function F(){}function A(E){var V,R;if(!((V=e==null?void 0:e.schema)!=null&&V.id))return;!a&&E&&(a=E.formSchemaUtils);let k="";{const{text:U,title:K,label:P,mainTitle:B,name:W,type:D}=e.schema;k=U||K||P||B||W||((R=I[D])==null?void 0:R.name)}k&&a.getControlBasicInfoMap().set(e.schema.id,{componentTitle:k,parentPathName:k})}function x(E){var U;const{changeObject:k}=E,{propertyID:V,propertyValue:R}=k;if(["text","title","label","name","mainTitle"].includes((U=E==null?void 0:E.changeObject)==null?void 0:U.propertyID)&&V&&R&&(A(),a)){const K=a.getControlBasicInfoMap(),P=K.keys().toArray().filter(B=>{var W,D;return((W=K.get(B))==null?void 0:W.reliedComponentId)===((D=e==null?void 0:e.schema)==null?void 0:D.id)});P!=null&&P.length&&P.forEach(B=>{const W=K.get(B).parentPathName.split(" > ");W[0]=R,K.get(B).parentPathName=W.join(" > ")})}}function N(E){x(E)}return s.value={canMove:d(),canSelectParent:c(),canDelete:u(),canNested:!m(),contents:e==null?void 0:e.schema.contents,elementRef:n,parent:(C=e==null?void 0:e.parent)==null?void 0:C.componentInstance,schema:e==null?void 0:e.schema,styles:o,designerClass:i,canAccepts:f,getBelongedComponentInstance:l,getDraggableDesignItemElement:g,getDraggingDisplayText:p,getPropConfig:$,getDragScopeElement:h,onAcceptMovedChildElement:w,onChildElementMovedOut:M,addNewChildComponentSchema:T,triggerBelongedComponentToMoveWhenMoved:r.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:r.ref(!1),onRemoveComponent:y,getCustomButtons:F,onPropertyChanged:N,setComponentBasicInfoMap:A,updateContextSchema:e==null?void 0:e.updateContextSchema},s}const eo=r.defineComponent({name:"FStepDesign",props:wt,emits:[],setup(n,e){const t=r.ref(n.direction),o=r.ref(n.fill),i=r.ref(n.height),s=r.ref(n.steps),a=r.ref(0),d=r.ref(n.clickable),c=r.ref(0),u=r.ref(),m=r.inject("design-item-context"),l=Kn(u,m);r.onMounted(()=>{u.value.componentInstance=l}),e.expose(l.value);const g=r.computed(()=>({"f-progress-step-list":t.value==="horizontal","f-progress-step-list-block":t.value==="vertical","f-progress-step-horizontal-fill":t.value==="horizontal"&&o.value,"f-progress-step-vertical-fill":t.value==="vertical"&&o.value})),f=r.computed(()=>({height:t.value==="vertical"?`${i.value}px`:""}));function p(x,N){const C={step:!0,active:N===a.value,clickable:d.value,"click-disable":x.disable,current:N===a.value};return N<a.value&&(C.finish=!0),x.status&&(C[x.status]=!0),x.hasOwnProperty("class")&&x.class.split(" ").reduce((E,k)=>(E[k]=!0,E),C),C}function h(x,N){}function w(x,N){const C={"f-progressstep-row":!0,"step-active":N===a.value,"step-current":N===a.value};return N<a.value&&(C["step-finish"]=!0),x.status&&(C["step-"+x.status]=!0),C}function T(x,N){const C={"step-icon":!0,"step-success":N,"k-icon":N,"k-i-check":N};return x.hasOwnProperty("icon")&&x.class.split(" ").reduce((E,k)=>(E[k]=!0,E),C),C}function M(x,N){const C=[];return x.icon?C.push(r.createVNode("span",{class:T(x,!1)},null)):N>=a.value||N===c.value?C.push(r.createVNode("span",{class:"step-icon"},[N+1])):C.push(r.createVNode("span",{class:T(x,!0)},null)),C}function $(x,N){return{"step-name":!0,"step-name-success":N<a.value}}function S(x,N){return r.createVNode("div",{class:"f-progress-step-title"},[r.createVNode("p",{class:$(x,N)},[x.title])])}function v(x,N){return{"f-progress-step-line":!0,"f-progress-step-line-success":N===a.value}}function y(x,N){return N!==s.value.length-1}const F=r.computed(()=>({triangle:!0,"":t.value==="vertical"}));function A(){return s.value.map((x,N)=>r.createVNode("li",{class:p(x,N),onClick:C=>void 0},[r.createVNode("div",{class:w(x,N)},[r.createVNode("div",{class:"f-progress-step-content"},[M(x,N),S(x,N)]),y(x,N)&&r.createVNode("div",{class:v(x,N)},[r.createVNode("span",{class:F.value},null)])])]))}return()=>r.createVNode("div",{ref:u,class:"f-progress-step"},[r.createVNode("ul",{class:g.value,style:f.value},[A()])])}});Ge.install=n=>{n.component(Ge.name,Ge)},Ge.register=(n,e,t,o)=>{n.step=Ge,e.step=Xt},Ge.registerDesigner=(n,e,t)=>{n.step=eo,e.step=Xt};const xt=new Map([["appearance",_t]]),to=new Map([]),no="root-viewmodel";class oo{constructor(e,t){G(this,"formSchemaUtils");G(this,"controlCreatorUtils");G(this,"designViewModelUtils");this.resolver=e,this.designerHostService=t,this.formSchemaUtils=this.designerHostService.formSchemaUtils,this.controlCreatorUtils=this.designerHostService.controlCreatorUtils,this.designViewModelUtils=this.designerHostService.designViewModelUtils}createComponent(e){const t=this.createComponentRefNode(e),o=this.createComponentNode(e),i=this.createViewModeNode(e),s=this.formSchemaUtils.getFormSchema();return s.module.viewmodels.push(i),s.module.components.push(o),this.designViewModelUtils.assembleDesignViewModel(),t}createComponentRefNode(e){const t=this.resolver.getSchemaByType("component-ref");return Object.assign(t,{id:`${e.componentId}-component-ref`,component:`${e.componentId}-component`}),t}createComponentNode(e){const t=this.resolver.getSchemaByType("component"),o=this.createFormComponentContents(e);return Object.assign(t,{id:`${e.componentId}-component`,viewModel:`${e.componentId}-component-viewmodel`,componentType:e.componentType,appearance:{class:this.getFormComponentClass()},formColumns:e.formColumns,contents:o}),t}getFormComponentClass(){const{templateId:e}=this.formSchemaUtils.getFormSchema().module;return e==="double-list-in-tab-template"?"f-struct-wrapper f-utils-fill-flex-column":"f-struct-wrapper"}createFormComponentContents(e){const t=this.resolver.getSchemaByType("section");Object.assign(t,{id:e.componentId+"-form-section",appearance:{class:"f-section-form f-section-in-mainsubcard"},mainTitle:e.componentName});const o=this.resolver.getSchemaByType("response-form"),i=[];Object.assign(o,{id:e.componentId+"-form",appearance:{class:"f-form-layout farris-form farris-form-controls-inline"},contents:i}),t.contents=[o];const{selectedFields:s}=e;s==null||s.forEach(d=>{if(d.$type===xe.FormSchemaEntityField$Type.SimpleField){const c=ie.cloneDeep(d),u=this.resolveControlClassByFormColumns(e),m=this.controlCreatorUtils.setFormFieldProperty(c,"",u);m&&i.push(m)}});const{templateId:a}=this.formSchemaUtils.getFormSchema().module;return a==="double-list-in-tab-template"&&(t.appearance.class="f-section-grid f-section-in-main px-0 pt-0",t.fill=!0),[t]}resolveControlClassByFormColumns(e){let t="";switch(e.formColumns){case 1:{t="col-12";break}case 2:{t="col-12 col-md-6 col-xl-6 col-el-6";break}case 3:{t="col-12 col-md-6 col-xl-4 col-el-4";break}case 4:{t="col-12 col-md-6 col-xl-3 col-el-2";break}}return t}createViewModeNode(e){return{id:`${e.componentId}-component-viewmodel`,code:`${e.componentId}-component-viewmodel`,name:e.componentName,bindTo:e.bindTo,parent:no,fields:this.assembleViewModelFields(e),commands:[],states:[],enableValidation:!0}}assembleViewModelFields(e){const t=[],{selectedFields:o}=e;return o==null||o.forEach(i=>{if(i.$type===xe.FormSchemaEntityField$Type.SimpleField){let s="blur";const a=i.type.name;(a===xe.FormSchemaEntityFieldTypeName.Enum||a===xe.FormSchemaEntityFieldTypeName.Boolean)&&(s="change"),t.push({type:"Form",id:i.id,fieldName:i.bindingField,groupId:null,groupName:null,updateOn:s,fieldSchema:{}})}}),t}}function ro(n,e,t,o){var s,a,d,c,u,m;const i=t.parentComponentInstance;if(i&&o){const l=(s=i.schema)==null?void 0:s.type,f={componentId:`form-${Math.random().toString(36).slice(2,6)}`,componentName:((a=t.bindingSourceContext)==null?void 0:a.entityTitle)||((c=(d=t.bindingSourceContext)==null?void 0:d.bindingEntity)==null?void 0:c.name)||"标题",componentType:"form",formColumns:l==="splitter-pane"?1:4,parentContainerId:i.schema.id,bindTo:((u=t.bindingSourceContext)==null?void 0:u.bindTo)||"/",selectedFields:(m=t.bindingSourceContext)==null?void 0:m.bindingEntityFields};return new oo(n,o).createComponent(f)}else return e}function io(n,e,t){return e}Ze({customClass:{type:String,default:""},customStyle:{type:String,defaut:""},visible:{type:Boolean,default:!0},adaptForLanguage:{type:Boolean,default:!0}},{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-form.schema.json",title:"response-form",description:"A Farris Data Collection Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"response-form"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},visible:{description:"",type:"boolean",default:!0},labelAutoOverflow:{description:"",type:"boolean",default:!1},adaptForLanguage:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},xt,ro);const Yt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/form-group.schema.json",title:"form-group",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"form-group"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},enableLinkLabel:{description:"",type:"boolean",default:!1},editor:{description:"",type:"obejct",default:null},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},binding:{description:"",type:"object",default:{}},visible:{description:"",type:"boolean",default:!0},required:{description:"",type:"boolean",default:!1},errors:{description:"",type:"object",default:null},name:{description:"The name string of form group component",type:"string",default:"form group"},showLabelType:{description:"",type:"string",default:"visible"}},required:["id","type","editor"]};Ze({id:{type:String,default:""},customClass:{type:String,default:""},customStyle:{type:String,default:""},editor:{type:Object,default:{}},label:{type:String,default:""},modelValue:{type:Object},visible:{type:Boolean,default:!0},required:{type:Boolean,default:!1},showLabel:{type:Boolean,default:!0},showLabelType:{type:String,default:"visible"},type:{type:String,default:"input-group"},componentId:{type:String,default:""},errors:{type:Object,default:null}},Yt,xt,void 0),Ze({id:{type:String,default:""},editor:{type:Object,default:{}},modelValue:{type:[String,Boolean,Array,Number]},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1}},Yt,xt,void 0);const ao={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/grid-field-editor.schema.json",title:"response-form-layout-setting",description:"A Farris Data Grid Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"response-form-layout-setting"},initialState:{description:"",type:"object"}},required:["id","type"]},so={initialState:{type:Object,default:{uniqueColClassInSM:12,uniqueColClassInMD:6,uniqueColClassInLG:3,uniqueColClassInEL:2}}};Ye.createPropsResolver(so,ao,to,io);const lo={width:{Type:Number,default:400},type:{Type:String,default:"info"},title:{Type:String,default:""},detail:{Type:String,default:""},okButtonText:{Type:String,default:"确定"},showOkButton:{Type:Boolean,default:!0},showCancelButton:{Type:Boolean,default:!0},cancelButtonText:{Type:String,default:"取消"},exceptionInfo:{Type:Object,default:null},promptEditorType:{Type:String,default:"text-area"},buttons:{type:Object,default:[]}};function St(){return new DOMException("The request is not allowed","NotAllowedError")}async function co(n){if(!navigator.clipboard)throw St();return navigator.clipboard.writeText(n)}async function uo(n){const e=document.createElement("span");e.textContent=n,e.style.whiteSpace="pre",e.style.webkitUserSelect="auto",e.style.userSelect="all",document.body.appendChild(e);const t=window.getSelection(),o=window.document.createRange();t==null||t.removeAllRanges(),o.selectNode(e),t==null||t.addRange(o);let i=!1;try{i=window.document.execCommand("copy")}finally{t==null||t.removeAllRanges(),window.document.body.removeChild(e)}if(!i)throw St()}async function fo(n){try{await co(n)}catch(e){try{await uo(n)}catch(t){throw t||e||St()}}}function po(){async function n(e){await fo(e)}return{onCopy:n}}function mo(n,e,t,o){const i=r.ref(14),s=r.ref(140),a=r.ref(""),d=r.ref(o.value.length),c=r.computed(()=>o.value),u=r.computed(()=>({"font-size":`${i.value}px`,height:"100%"}));function m(l){if(l.currentTarget){const g=l.currentTarget.value||"";d.value=g.length}}return()=>r.createVNode(r.Fragment,null,[r.createVNode("textarea",{title:"promptMessage",name:"promptMessage",class:"form-control",style:u.value,rows:"4",maxlength:s.value,onInput:l=>m(l)},[c.value]),r.createVNode("span",{class:"textarea-wordcount",title:a.value,style:"position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"},[d.value+" / "+s.value])])}function go(n,e,t,o){const i=mo(n,e,t,o),s=new Map([["text-area",i]]);function a(d){return s.get(d)||null}return{getEditorRender:a}}function ho(){const n=r.ref(!1),e=r.ref("复制成功");return{feedbackStyle:r.computed(()=>{const o={position:"absolute",left:"50%",top:"50%","min-width":"100px",height:"40px",background:"#303C53","line-height":"40px","text-align":"center","margin-left":"-30px","margin-top":"-50px","border-radius":"10px","box-shadow":"0px 2px 8px 0px",color:"#fff",transition:"all .3s ease",padding:"0 10px"};return o.opacity=n.value?"0.8":"0",o.display=n.value?"":"none",o}),feedbackMessage:e,toShowFeedback:n}}function vo(n,e){const t=e.getEditorRender(n.promptEditorType);return()=>t&&t()}function yo(n,e){function t(f){if(f==null)return 0;let p=0;for(let h=0;h<f.length;h++){const w=f.charCodeAt(h);w>=0&&w<=128?p++:p=p+2}return p}function o(f,p){if(f!==""&&f!==void 0&&f!==null){f=""+f;const h=f.length;let w="",T=0;for(let M=0;M<h;M++){const $=f.charAt(M);if(T++,encodeURI($).length>4&&T++,w=w.concat($),T>=p)return w=w.concat("..."),w}if(T<p)return f}return""}const i=r.computed(()=>!!n.value&&!!n.value.date),s=r.computed(()=>{const f=n.value&&n.value.date||"";return`${e.exception.happend} : ${f}`}),a=r.computed(()=>!!n.value&&!!n.value.detail),d=r.computed(()=>n.value?t(n.value.detail)>160:!1),c=r.ref(!1),u=r.computed(()=>c.value?e.exception.collapse:e.exception.expand),m=r.computed(()=>{const f=e.exception.detail+" : "+(n.value&&n.value.detail)||"";return c.value?f:o(f,160)}),l=r.computed(()=>({position:"absolute",right:0,bottom:c.value?0:"2px",color:"#2A87FF",cursor:"pointer"}));function g(){c.value=!c.value}return()=>r.createVNode("div",{class:"toast-msg-detail"},[i.value&&r.createVNode("div",null,[s.value]),a.value&&r.createVNode("div",{class:"exception_wrap"},[r.createVNode("div",{class:"exception_error_msg"},[r.createVNode("div",{innerHTML:m.value},null),d.value&&r.createVNode("span",{style:l.value,onClick:g},[u.value])])])])}function bo(n){return()=>r.createVNode("p",{class:"toast-msg-detail",innerHTML:n.value},null)}function Co(n,e,t,o,i){const s=r.ref(n.exceptionInfo),a=r.computed(()=>{const p=e.value==="question"?"warning":e.value,h={"f-icon":!0},w=`f-icon-${p}`;return h[w]=!0,h}),d=r.computed(()=>t.value||s.value&&s.value.message),c=r.computed(()=>o.value),u=r.computed(()=>!!o.value),m=r.computed(()=>!!s.value);function l(){return m.value?yo(s,i):u.value?bo(c):()=>null}const g=l(),f=r.computed(()=>i.locale==="en"?{wordBreak:"keep-all",overflowWrap:"break-word"}:{});return()=>r.createVNode(r.Fragment,null,[r.createVNode("div",{class:"float-left modal-tips-iconwrap"},[r.createVNode("span",{class:a.value},null)]),r.createVNode("div",{class:"modal-tips-content"},[r.createVNode("p",{class:"toast-msg-title",innerHTML:d.value,style:f.value},null),g()])])}function wo(n,e,t,o){const{onCopy:i}=e,{toShowFeedback:s}=t,a=r.ref(o.exception.copySuccess||"复制成功"),d=r.ref(o.exception.copy||"复制详细信息"),c=r.ref(n.exceptionInfo||{date:"",message:"",detail:""}),u=r.computed(()=>c.value&&c.value.detail||"");function m(l){i(u.value).catch(g=>{a.value=o.exception.copyFailed||"复制失败"}).finally(()=>{s.value=!0,setTimeout(()=>{s.value=!1},700)})}return()=>r.createVNode("span",{style:"width: 100%;color: #2A87FF;padding-left: 37px;"},[r.createVNode("span",{onClick:m,style:"cursor: pointer;"},[d.value])])}function xo(n,e,t,o,i){const s=r.ref(n.type),a=r.ref(n.buttons),d=r.ref(n.exceptionInfo),c=r.ref(i.ok||n.okButtonText),u=r.ref(i.cancel||n.cancelButtonText),m=r.ref(n.showCancelButton),l=r.ref(n.showOkButton),g=r.computed(()=>!!(a.value&&a.value.length)),f=r.computed(()=>d.value&&d.value.message&&d.value.detail),p=r.computed(()=>!(a.value&&a.value.length)&&(l.value||m.value)),h=wo(n,t,o,i);c.value==="关闭"?c.value=i.close:c.value==="知道了"&&(c.value=i.exception.roger);function w(M){s.value==="question"&&e.emit("reject"),e.emit("close")}function T(M){s.value==="question"&&e.emit("accept"),e.emit("close")}return()=>r.createVNode("div",{class:"modal-footer"},[f.value&&h(),p.value&&m.value&&r.createVNode("button",{type:"button",class:"btn btn-secondary btn-lg",onClick:w},[u.value]),p.value&&l.value&&r.createVNode("button",{type:"button",class:"btn btn-primary btn-lg",onClick:T},[c.value]),g.value&&a.value.length&&a.value.map(M=>r.createVNode("button",{type:"button",onClick:M.handle,class:M.class},[M.iconClass&&r.createVNode("span",{class:M.iconClass},null),M.text]))])}function So(n){const{t:e,locale:t}=at.useI18n();function o(i,s,a){return s===a?e(i):s}return{yes:o("messageBox.yes")||"是",no:o("messageBox.no")||"否",close:o("messageBox.close")||"关闭",ok:o("messageBox.ok",n.okButtonText,"确定")||"确定",cancel:o("messageBox.cancel",n.cancelButtonText,"取消")||"取消",title:o("messageBox.title")||"系统提示",errorTitle:o("messageBox.errorTitle")||"错误提示",exception:{expand:o("messageBox.exception.expand")||"展开",collapse:o("messageBox.exception.collapse")||"收起",happend:o("messageBox.exception.happend")||"发生时间",detail:o("messageBox.exception.detail")||"详细信息",copy:o("messageBox.exception.copy")||"复制详细信息",copySuccess:o("messageBox.exception.copySuccess")||"复制成功",copyFailed:o("messageBox.exception.copyFailed")||"复制失败",roger:o("messageBox.exception.roger")||"知道了"},locale:t.value}}const mt=r.defineComponent({name:"FMessageBox",props:lo,emits:["accept","reject","close"],setup(n,e){const t=So(n),o=r.ref(n.type),i=r.ref(n.title),s=r.ref(n.detail),a=r.computed(()=>{const T={"modal-tips":!0,"d-flex":!0,"flex-row":!0},M=`messager-type-${o.value}`;return T[M]=!0,T}),d=r.computed(()=>{const T={cursor:"default"};return o.value==="prompt"?T.padding="0.5rem 0.5rem 1rem 1.5rem":o.value==="error"&&(T.padding="0.5rem 1.5rem 1rem 1.5rem"),T}),c=po(),u=go(n,o,i,s),m=ho(),{feedbackStyle:l,feedbackMessage:g}=m;g.value=t.exception.copySuccess;function f(){return r.createVNode("div",{style:l.value},[g.value])}function p(){switch(o.value){case"prompt":return vo(n,u);default:return Co(n,o,i,s,t)}}const h=p(),w=xo(n,e,c,m,t);return()=>r.createVNode("div",{class:"farris-messager"},[!n.exceptionInfo&&r.createVNode("div",{style:"height: 30px;width: 100%;position: absolute;",class:"messager-draggable"},null),r.createVNode("section",{class:a.value,style:d.value},[h()]),w(),f()])}}),Ao={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/modal.schema.json",title:"modal",description:"弹窗组件",type:"object",properties:{id:{description:"组件唯一标识",type:"string"},type:{description:"组件类型",type:"string",default:"modal"},appearance:{description:"组件外观",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},name:{description:"名称",type:"string",default:null},title:{description:"标题",type:"string"},width:{description:"窗口宽度",type:"number",default:900},height:{description:"窗口高度",type:"number",default:600},contents:{description:"弹窗子组件集合",type:"array",default:[]},modelValue:{description:"是否显示",type:"boolean",default:!1},showCloseButton:{description:"显示关闭按钮",type:"boolean",default:!0},showMaxButton:{description:"显示最大化按钮",type:"boolean",default:!0},enableEsc:{description:"允许ESC关闭",type:"boolean",default:!0},resizeable:{description:"允许调整窗口尺寸",type:"boolean",default:!0},fitContent:{description:"是否自适应",type:"boolean",default:!1},showButtons:{description:"是否显示底部按钮",type:"boolean",default:!0},mask:{description:"是否模态",type:"boolean",default:!0},draggable:{description:"是否允许拖拽调整位置",type:"boolean",default:!0},onAccept:{description:"确定事件",type:"object",default:null},onCancel:{description:"取消事件",type:"object",default:null},beforeClose:{description:"关闭前回调",type:"object",default:null}},required:["id","type"],events:{onAccept:"确定事件",onCancel:"取消事件",beforeClose:"关闭前回调"}},To=new Map([["appearance",Ye.resolveAppearance]]);function Fo(n,e,t){return e}function Mo(){function n(e,t){const o={};return o.beforeClose=i=>t.call("beforeClose",[i,e]),o}return{resolve:n}}const Zt={allowClickMaskToClose:{type:Boolean,default:!1},beforeClose:{type:Function,default:()=>!0},class:{type:String,default:""},maskClass:{type:String,default:""},title:{type:String,default:""},width:{type:Number,default:500},height:{type:Number,default:320},buttons:{type:Array,default:[]},modelValue:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!0},fitContent:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},showMaxButton:{type:Boolean,default:!1},minHeight:{type:Number},maxHeight:{type:Number},minWidth:{type:Number},maxWidth:{type:Number},containment:{type:Object,default:null},resizeable:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},dragHandle:{type:Object,default:null},closedCallback:{type:Function,default:null},resizeHandle:{type:Function,default:null},render:{type:Function,default:null},acceptCallback:{type:Function,default:null},rejectCallback:{type:Function,default:null},enableEsc:{type:Boolean,default:!0},enableEnter:{type:Boolean,default:!1},dialogType:{type:String,default:""},src:{type:String,default:""},footerHeight:{type:Number,default:60},host:{type:Object,default:"body"}},Eo=Ye.createPropsResolver(Zt,Ao,To,Fo),jo=Mo();class ae{constructor(e,t){this.x=e,this.y=t}static getTransformInfo(e){const o=window.getComputedStyle(e).getPropertyValue("transform").replace(/[^-\d,]/g,"").split(",");if(o.length>=6){const i=parseInt(o[4],10),s=parseInt(o[5],10);return{x:i,y:s}}return{x:0,y:0}}static fromEvent(e,t=null){if(this.isMouseEvent(e))return new ae(e.clientX,e.clientY);if(t===null||e.changedTouches.length===1)return new ae(e.changedTouches[0].clientX,e.changedTouches[0].clientY);for(let o=0;o<e.changedTouches.length;o++)if(e.changedTouches[o].target===t)return new ae(e.changedTouches[o].clientX,e.changedTouches[o].clientY)}static isMouseEvent(e){return Object.prototype.toString.apply(e).indexOf("MouseEvent")===8}static isIPosition(e){return!!e&&"x"in e&&"y"in e}static getCurrent(e){const t=new ae(0,0);if(window){const o=window.getComputedStyle(e);if(o){const i=parseInt(o.getPropertyValue("left"),10),s=parseInt(o.getPropertyValue("top"),10);t.x=isNaN(i)?0:i,t.y=isNaN(s)?0:s}return t}return null}static copy(e){return new ae(0,0).set(e)}get value(){return{x:this.x,y:this.y}}add(e){return this.x+=e.x,this.y+=e.y,this}subtract(e){return this.x-=e.x,this.y-=e.y,this}multiply(e){this.x*=e,this.y*=e}divide(e){this.x/=e,this.y/=e}reset(){return this.x=0,this.y=0,this}set(e){return this.x=e.x,this.y=e.y,this}}class Re{constructor(e,t){this.width=e,this.height=t}static getCurrent(e){const t=new Re(0,0);if(window){const o=window.getComputedStyle(e);return o&&(t.width=parseInt(o.getPropertyValue("width"),10),t.height=parseInt(o.getPropertyValue("height"),10)),t}return null}static copy(e){return new Re(0,0).set(e)}set(e){return this.width=e.width,this.height=e.height,this}}function No(n,e){const t=r.ref(),o=r.ref(),i=r.ref(),s=r.ref(),a=r.ref(),d=r.ref(),c=r.ref(),u=r.ref(),m=r.ref(),l=r.ref(),g=r.ref(),f=r.ref(n.resizeable),p=r.ref(),h=r.ref(n.draggable),w=r.ref(!1);function T(){const P=o.value||document.body,B=window.getComputedStyle(P);if(!B||!t.value)return;const W=ae.getTransformInfo(t.value),D={};c.value&&(D.deltaL=t.value.offsetLeft-c.value.x,D.deltaT=t.value.offsetTop-c.value.y);const ee=B.getPropertyValue("position");D.width=P.clientWidth,D.height=P.clientHeight,D.pr=parseInt(B.getPropertyValue("padding-right"),10),D.pb=parseInt(B.getPropertyValue("padding-bottom"),10),D.position=B.getPropertyValue("position"),ee==="static"&&(P.style.position="relative"),D.translateX=W.x,D.translateY=W.y,l.value=D}function M(P){if(t.value){s.value=Re.getCurrent(t.value),a.value=ae.getCurrent(t.value),d.value=s.value?Re.copy(s.value):null,c.value=a.value?ae.copy(a.value):null,T();const B=P.target.getAttribute("type")||"";u.value={n:!!B.match(/n/),s:!!B.match(/s/),w:!!B.match(/w/),e:!!B.match(/e/)}}}function $(){var P,B,W,D;if(t.value){const ee=t.value;u.value&&((u.value.n||u.value.s)&&((P=d.value)!=null&&P.height)&&(ee.style.height=d.value.height+"px"),(u.value.w||u.value.e)&&((B=d.value)!=null&&B.width)&&(ee.style.width=d.value.width+"px"),c.value&&((W=c.value)!=null&&W.x&&(ee.style.left=c.value.x+"px"),(D=c.value)!=null&&D.y&&(ee.style.top=c.value.y+"px")))}}function S(){const P=n.minHeight?n.minHeight:1,B=n.minWidth?n.minWidth:1;d.value&&c.value&&u.value&&s.value&&(d.value.height<P&&(d.value.height=P,u.value.n&&a.value&&(c.value.y=a.value.y+(s.value.height-P))),d.value.width<B&&(d.value.width=B,u.value.w&&a.value&&(c.value.x=a.value.x+(s.value.width-B))),n.maxHeight&&d.value.height>n.maxHeight&&(d.value.height=n.maxHeight,a.value&&u.value.n&&(c.value.y=a.value.y+(s.value.height-n.maxHeight))),n.maxWidth&&d.value.width>n.maxWidth&&(d.value.width=n.maxWidth,u.value.w&&a.value&&(c.value.x=a.value.x+(s.value.width-n.maxWidth))))}function v(){if(o.value){const P=l.value;if(c.value&&d.value&&u.value&&s.value){const B=P.width-P.pr-P.deltaL-P.translateX-c.value.x,W=P.height-P.pb-P.deltaT-P.translateY-c.value.y;u.value.n&&c.value.y+P.translateY<0&&a.value&&(c.value.y=-P.translateY,d.value.height=s.value.height+a.value.y+P.translateY),u.value.w&&c.value.x+P.translateX<0&&a.value&&(c.value.x=-P.translateX,d.value.width=s.value.width+a.value.x+P.translateX),d.value.width>B&&(d.value.width=B),d.value.height>W&&(d.value.height=W)}}}function y(P){if(!i.value||!s.value||!a.value||!u.value)return;P.subtract(i.value);const B=P.x,W=P.y;u.value.n?(c.value.y=a.value.y+W,d.value.height=s.value.height-W):u.value.s&&(d.value.height=s.value.height+W),u.value.e?d.value.width=s.value.width+B:u.value.w&&(d.value.width=s.value.width-B,c.value.x=a.value.x+B),v(),S(),$()}function F(P){if(!m.value)return;const B=ae.fromEvent(P);B&&y(B)}function A(){if(t.value){const{width:P,height:B,x:W,y:D}=t.value.getBoundingClientRect(),ee=ae.getTransformInfo(t.value);return{size:{width:P,height:B},position:{x:W-ee.x,y:D-ee.y}}}return null}function x(P){if(t.value){const B=A();g.value=B}i.value=void 0,s.value=null,a.value=null,d.value=null,c.value=null,u.value=null,m.value=null,document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",x)}function N(){document.addEventListener("mousemove",F),document.addEventListener("mouseup",x)}function C(P){P instanceof MouseEvent&&P.button===2||h.value&&(document.body.click(),P.stopPropagation(),P.preventDefault(),i.value=ae.fromEvent(P),m.value=P.target,M(P),N())}function E(P){return t.value=P,f.value&&r.createVNode(r.Fragment,null,[r.createVNode("div",{class:"fv-resizable-handle fv-resizable-n",type:"n",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-e",type:"e",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-s",type:"s",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-w",type:"w",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-ne",type:"ne",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-se fv-resizable-diagonal",type:"se",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-sw",type:"sw",onMousedown:B=>C(B)},null),r.createVNode("div",{class:"fv-resizable-handle fv-resizable-nw",type:"nw",onMousedown:B=>C(B)},null)])}function k(P=!0){document.body.click();const B=o.value||document.body,W=Re.getCurrent(B),D=t.value;P&&D&&(p.value=A(),p.value.transform=D.style.transform),W&&D&&(d.value=W,d.value.height-=14,d.value.width-=14,D.style.height=d.value.height+"px",D.style.width=d.value.width+"px",D.style.left="7px",D.style.top="7px",D.style.transform="",g.value={size:d.value,position:{x:0,y:0}},h.value=!1,w.value=!0)}function V(){var P,B;if(document.body.click(),p.value){const W={width:p.value.size.width||0,height:p.value.size.height||0},D={x:(window.innerWidth-W.width)/2,y:(window.innerHeight-W.height)/2};(P=d.value)==null||P.set(W),(B=c.value)==null||B.set(D);const ee=t.value;ee.style.height=W.height+"px",ee.style.width=W.width+"px",ee.style.left=`${D.x}px`,ee.style.top=`${D.y}px`,ee.style.transform="",g.value={size:W,position:D},h.value=n.draggable,w.value=!1}}function R(){if(t.value){const P=Re.getCurrent(t.value);if(P){const{width:B,height:W}=P;t.value.style.left=`${(window.innerWidth-B)/2}px`,t.value.style.top=`${(window.innerHeight-W)/2}px`,t.value.style.transform=""}}}function U(){const P=()=>{w.value?k(!1):R(),document.body.click()};return window.addEventListener("resize",P),()=>{window.removeEventListener("resize",P)}}const K=U();return{renderResizeBar:E,boundingElement:o,resizedEventParam:g,maximize:k,restore:V,allowDrag:h,isMaximized:w,unWindowResizeHandle:K,moveToCenter:R}}function Bo(n,e,t){const o=r.ref(),i=r.ref(n.draggable),s=r.ref(n.lockAxis),a=r.ref(),d=r.ref(),c=r.ref(!1),u=r.ref(new ae(0,0)),m=r.ref(new ae(0,0)),l=r.ref(new ae(0,0)),g=r.ref(new ae(0,0));r.watch(()=>t.value,F=>{a.value.style.cursor=F?"move":"default"});function f(F,A){if(A.tagName==="BUTTON")return!1;if(A===F)return!0;for(const x in A.children)if(Object.prototype.hasOwnProperty.call(A.children,x)&&f(F,A.children[x]))return!0;return!1}function p(){var N,C;let F=l.value.x+m.value.x,A=l.value.y+m.value.y;s.value==="x"?(F=((N=u.value)==null?void 0:N.x)||0,l.value.x=0):s.value==="y"&&(A=((C=u.value)==null?void 0:C.y)||0,l.value.y=0);const x=`translate3d(${Math.round(F)}px, ${Math.round(A)}px, 0px)`;o.value&&(o.value.style.transform=x),g.value.x=F,g.value.y=A}function h(){if(!d.value||!o.value)return null;const F=d.value.getBoundingClientRect(),A=o.value.getBoundingClientRect(),x={top:F.top<A.top,right:F.right>A.right,bottom:F.bottom>A.bottom,left:F.left<A.left};return x.top||(l.value.y-=A.top-F.top),x.bottom||(l.value.y-=A.bottom-F.bottom),x.right||(l.value.x-=A.right-F.right),x.left||(l.value.x-=A.left-F.left),p(),x}function w(F){F&&(u.value&&F.subtract(u.value),l.value.set(F),p(),h())}function T(F){c.value&&i.value&&(F.stopPropagation(),F.preventDefault(),w(ae.fromEvent(F,a.value)))}function M(){var F;c.value&&(c.value=!1,m.value.add(l.value),l.value.reset(),(F=o.value)==null||F.classList.remove("ng-dragging"),e.emit("stopMove"),document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",M))}function $(){!c.value&&a.value&&(c.value=!0,a.value.classList.add("ng-dragging"),document.addEventListener("mousemove",T),document.addEventListener("mouseup",M))}function S(){if(o.value){const F=ae.getTransformInfo(o.value);m.value.set(F);return}m.value.reset()}function v(F){if(!t.value||F instanceof MouseEvent&&F.button===2)return;const A=F.target||F.srcElement;a.value!==void 0&&A&&!f(A,a.value)||i.value!==!1&&(document.body.click(),F.stopPropagation(),F.preventDefault(),u.value=ae.fromEvent(F,o.value),S(),$())}function y(F,A,x){if(i.value&&A){if(F)a.value=F;else if(n.dragHandle){if(n.dragHandle instanceof HTMLElement)a.value=n.dragHandle;else if(typeof n.dragHandle=="string"){const N=A.querySelector(n.dragHandle);N&&(a.value=N)}}o.value=A,d.value=x,a.value?(a.value.classList.add("ng-draggable"),a.value.addEventListener("mousedown",v)):i.value=!1}}return{registerDraggle:y,resetTranslate:S}}function Jt(n,e){if(n){const t=o=>{o.key.toLowerCase()===n.toLowerCase()&&e({event:o,key:n})};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}}function ko(n,e){const t=r.ref(n.enableEsc);let o=null;return t.value?(o=Jt("Escape",i=>{e.emit("esc",{event:i.event,type:"esc"})}),{remove:o}):null}function Vo(n,e){const t=r.ref(n.enableEnter);let o=null;return t.value?(o=Jt("Enter",i=>{e.emit("enter",{event:i.event,type:"enter"})}),{remove:o}):null}const qe=r.defineComponent({name:"FModal",props:Zt,emits:["update:modelValue","accept","cancel","closed","resize","esc","enter","stopMove"],setup(n,e){const t=r.ref(n.width||300),o=r.ref(n.height||200),i=r.ref(n.modelValue),s=r.ref(""),a=r.ref(n.class),d=r.ref(n.fitContent),c=r.ref(n.showHeader),u=r.ref(""),m=r.ref(n.showCloseButton),l=r.ref(n.showMaxButton),g=r.ref(!1),f=r.ref(n.dialogType),p=r.ref(n.src),h=r.ref(""),w=r.ref(n.showButtons),T=r.ref(n.title),M=r.ref(n.containment||null),$=r.ref(),{t:S}=at.useI18n();T.value==="错误提示"&&(T.value=S("messageBox.errorTitle"));const v=r.ref(!1);function y(j,Y){const se=Y?"accept":"cancel";Promise.resolve().then(()=>{var le;return(le=n.beforeClose)==null?void 0:le.call(n,{closeType:se})}).then(le=>{le&&(i.value=!1,e.emit("update:modelValue",!1),Y!=null&&e.emit(Y?"accept":"cancel"),e.emit("closed",j))})}const F=[{name:"cancel",text:S("messageBox.cancel")||"取消",class:"btn btn-secondary",handle:j=>{y(j,!1)}},{name:"accept",text:S("messageBox.ok")||"确定",class:"btn btn-primary",handle:j=>{y(j,!0)}}],A=r.ref(n.buttons&&n.buttons.length?n.buttons:F),x=r.computed(()=>!!u.value),N=r.computed(()=>!!w.value&&!!A.value),C=r.ref(),E=r.ref(),k=r.ref(!1),{renderResizeBar:V,maximize:R,restore:U,boundingElement:K,resizedEventParam:P,allowDrag:B,unWindowResizeHandle:W,moveToCenter:D}=No(n),{registerDraggle:ee}=Bo(n,e,B);function he(){return!!document.querySelectorAll(".farris-modal").length&&document.body.classList.contains("modal-open")}function ve(){const j=document.querySelectorAll(".farris-modal").length;(!j||j-1<=0)&&document.body.classList.remove("modal-open"),$.value&&$.value.classList.remove("show")}r.watch(()=>n.title,(j,Y)=>{j!==Y&&(T.value=j)}),r.watch(()=>n.modelValue,(j,Y)=>{j!==Y&&(i.value=j,i.value&&n.draggable&&r.nextTick(()=>{E.value&&!M.value&&(M.value=E.value.parentElement,K.value=M.value,ee(C.value,E.value,K.value),D())}),j||(M.value&&(M.value=null),ve())),i.value?v.value=he():(k.value=!1,B.value=n.draggable)}),r.watch(()=>n.showHeader,(j,Y)=>{j!==Y&&(c.value=j)}),r.watch(()=>n.showButtons,(j,Y)=>{j!==Y&&(w.value=j)}),r.watch(()=>P.value,(j,Y)=>{const se=j||{},le=Y||{};JSON.stringify(se)!==JSON.stringify(le)&&e.emit("resize",{newSize:j,oldSize:Y,isMaximized:k.value})});const _=r.computed(()=>(i.value&&document.body.classList.add("modal-open"),i.value)),re=r.computed(()=>{var se;const j={modal:!0,"farris-modal":!0,fade:!0};j["f-modal-fitContent"]=!!d.value,j.show=!!_.value;const Y=(se=n.maskClass)==null?void 0:se.split(" ");return Y==null||Y.reduce((le,Oe)=>(le[Oe]=!0,le),j),j}),ce=r.computed(()=>{var se;const j={"modal-dialog":!0},Y=(se=a.value)==null?void 0:se.split(" ");return Y==null||Y.reduce((le,Oe)=>(le[Oe]=!0,le),j),j}),te=r.computed(()=>{const j={position:"absolute",top:`${(window.innerHeight-o.value)/2}px`,left:`${(window.innerWidth-t.value)/2}px`,width:`${t.value}px`,height:d.value?"auto":`${o.value}px`};return n.mask||(j.pointerEvents="auto"),j}),L=r.computed(()=>{const j={display:"block"};return n.mask||(j.pointerEvents="none",j.backgroundColor="transparent"),v.value&&(j.backgroundColor="transparent"),j}),ne=r.computed(()=>({"modal-content":!0,"modal-content-has-header":c.value})),$e=r.computed(()=>{const j={display:c.value?"":"none"};return j["pointer-events"]=B.value?"auto":"none",j}),Be=r.computed(()=>({"f-icon":!0,modal_maximize:!0,modalrevert:k.value})),Te=r.computed(()=>({"modal-body":!0,"f-utils-flex-column":f.value==="iframe","f-utils-fill":!0}));function _e(){return{height:`${n.footerHeight||60}px`}}const De=r.computed(()=>{const j={textAlgin:h.value},Y=_e();return Object.assign(j,Y)});function He(j){if(j==null||j.stopPropagation(),k.value){k.value=!1,U();return}R(),k.value=!0}async function ue(j,Y){j.handle&&await j.handle(Y,j)&&e.emit("closed",Y)}function Ke(j){j.width&&(t.value=j.width),j.height&&(o.value=j.height),j.buttons&&(A.value=j.buttons),j.title&&(T.value=j.title)}let Fe=null,ke=null;r.onBeforeMount(()=>{v.value=he()}),r.onMounted(()=>{E.value&&!M.value&&(M.value=E.value.parentElement,K.value=M.value,ee(C.value,E.value,K.value)),_.value&&document.body.classList.add("modal-open"),Fe=ko(n,e),ke=Vo(n,e)}),r.onUnmounted(()=>{W&&W(),Fe&&Fe.remove(),ke&&ke.remove()}),e.expose({modalElementRef:E,updateModalOptions:Ke,close:y,maxDialog:He,isMaximized:k});function Ve(){return r.createVNode("ul",null,[g.value&&r.createVNode("li",{class:"f-btn-icon f-bare"},[r.createVNode("span",{class:"f-icon modal_minimize"},null)]),l.value&&r.createVNode("li",{onClick:He,class:"f-btn-icon f-bare",style:"pointer-events: auto;"},[r.createVNode("span",{class:Be.value},null)]),m.value&&r.createVNode("li",{class:"f-btn-icon f-bare",onClick:j=>y(j,!1),style:"pointer-events: auto;"},[r.createVNode("span",{class:"f-icon modal_close"},null)])])}function Ie(){return r.createVNode("div",{class:"modal-footer",style:De.value},[A.value&&A.value.map(j=>{const Y=r.ref(j.disabled);return r.createVNode("button",{name:j.name,type:"button",disabled:Y.value,class:j.class+(j.iconClass?" btn-icontext":""),onClick:se=>{ue(j,se)}},[!!j.iconClass&&r.createVNode("i",{class:j.iconClass},null),j.text])})])}function et(){return r.createVNode("div",{ref:C,class:"modal-header",style:$e.value},[e.slots.headerTemplate?e.slots.headerTemplate():r.createVNode("div",{class:"modal-title"},[x.value&&r.createVNode("span",{class:u.value,style:"margin-right: 8px"},null),r.createVNode("span",{class:"modal-title-label"},[T.value])]),r.createVNode("div",{class:"actions"},[Ve()])])}function Le(){return e.slots.footerTemplate?e.slots.footerTemplate():N.value&&Ie()}function je(j){if(j.stopPropagation(),n.allowClickMaskToClose){if(j.target!==$.value)return;y(j,!1)}}function Pe(){var j,Y;return r.createVNode("div",{id:s.value,class:ce.value,style:te.value,ref:E},[r.createVNode("div",{class:ne.value},[c.value&&et(),r.createVNode("div",{class:Te.value},[(Y=(j=e.slots).default)==null?void 0:Y.call(j),f.value==="iframe"&&r.createVNode("iframe",{title:s.value,class:"f-utils-fill",width:"100%",frameborder:"0",src:p.value},null)]),Le()]),!d.value&&E.value&&!k.value&&V(E.value)])}function Xe(j){return j||"body"}return()=>r.createVNode(r.Teleport,{to:Xe(n.host)},{default:()=>[_.value&&r.createVNode(r.Transition,{name:"fade",appear:!0},{default:()=>[r.createVNode("div",{ref:$,class:re.value,style:L.value,onClick:je},[Pe()])]})]})}});function Kt(n){if(n.content&&n.content.render)return n.content.render;if(n.render&&typeof n.render=="function")return n.render}function Io(n){const e=document.createElement("div");e.style.display="contents";const t=r.createApp({setup(o,i){r.onUnmounted(()=>{document.body.removeChild(e)});const s=r.ref(),a=r.ref(n.class||""),d=r.ref(!!n.showButtons),c=r.ref(!!n.showHeader),u=r.ref(n.showCloseButton==null?!0:n.showCloseButton),m=r.ref(!0),l=r.ref(n.title||""),g=n.acceptCallback||(()=>{}),f=n.rejectCallback||(()=>{}),p=n.closedCallback||($=>{}),h=n.resizeHandle||($=>{}),w=n.stopMoveHandle||($=>{}),T=Kt(n),M=$=>{m.value=!1,t.unmount(),p($)};return r.onMounted(()=>{}),i.expose({modalRef:s}),()=>r.createVNode(qe,{ref:s,class:a.value,modelValue:m.value,"onUpdate:modelValue":$=>m.value=$,title:l.value,width:n.width,height:n.height,buttons:n.buttons,"show-header":c.value,"show-buttons":d.value,"show-close-button":u.value,"show-max-button":!1,onAccept:g,onCancel:f,fitContent:n.fitContent==null?!0:n.fitContent,onClosed:M,onResize:h,onStopMove:w},{default:()=>[T&&T(t)]})}});return document.body.appendChild(e),t.use(st.LocaleService.i18n),t.mount(e),t}class en{constructor(e){G(this,"appContext",null);G(this,"modalRef",r.ref());G(this,"activeModalIndex",r.ref(0));G(this,"modalRefs",{});G(this,"isUseEscCloseModal",r.ref(!1));G(this,"activeModalInstance",r.computed(()=>this.modalRefs[this.activeModalIndex.value]));this.app=e,this.appContext=e?e._context:null}getCurrentModal(){return this.activeModalInstance.value}adaptToWindow(e,t){const{width:o,height:i}={width:window.innerWidth,height:window.innerHeight};return o<e&&(e=o-14),i<t&&(t=i-14),{width:e,height:t}}static show(e){const t=Object.assign({title:"",showButtons:!0,showHeader:!0},e);return Io(t)}close(e){var t,o;e?(o=e.value)==null||o.close():(t=this.getCurrentModal())==null||t.close()}open(e){const t=document.createDocumentFragment();e.showMaxButton&&e.fitContent&&(e.showMaxButton=!1);const o=r.shallowRef(Object.assign({title:"",showButtons:!0,showHeader:!0},e)),i=r.ref(!0),s=o.value.acceptCallback||(()=>{}),a=o.value.rejectCallback||(()=>{}),d=o.value.closedCallback||((v,y)=>{}),c=o.value.resizeHandle||(v=>{}),u=e.stopMoveHandle||(v=>{});let m;const l=Kt(o.value),g=v=>{var F;i.value=!1;const y=(F=v==null?void 0:v.target)==null?void 0:F.classList.contains("modal_close");d(v,this.isUseEscCloseModal.value?"esc":y?"icon":"button")},f=v=>{g(v),m&&r.nextTick(()=>{if(this.modalRefs[this.activeModalIndex.value]&&delete this.modalRefs[this.activeModalIndex.value],r.render(null,t),m=null,this.modalRef.value=null,this.modalRefs){const y=Object.keys(this.modalRefs).map(F=>Number(F));y.length>0?this.activeModalIndex.value=Math.max(...y):this.activeModalIndex.value=0}this.isUseEscCloseModal.value=!1})},p=v=>{var y;this.isUseEscCloseModal.value=!0,this.activeModalInstance&&((y=this.activeModalInstance.value)==null||y.close(v==null?void 0:v.event))},{width:h,height:w}=o.value,T=this.adaptToWindow(h||500,w||320);Object.assign(o.value,T);const M=()=>r.createVNode(qe,r.mergeProps({ref:this.modalRef,modelValue:i.value,"onUpdate:modelValue":v=>i.value=v},o.value,{onAccept:s,onCancel:a,onClosed:f,onResize:c,onEsc:p,onStopMove:u}),{default:()=>[l&&l(this.app)]});return m=(v=>{const y=r.h(M,v);return y.appContext=this.appContext,r.render(y,t),y})({...o.value}),this.activeModalIndex.value++,this.modalRefs[this.activeModalIndex.value]=this.modalRef.value,{update:v=>{o.value={...o.value,...v},m&&r.render(r.cloneVNode(m,{...o}),t)},destroy:f,modalRef:this.activeModalInstance,close:()=>this.close()}}}const Po=Symbol("FModalService");qe.install=n=>{n.component(qe.name,qe);const e=new en(n);n.provide(Po,e),n.provide("FModalService",e)},qe.register=(n,e,t,o)=>{n.modal=qe,e.modal=Eo,o.modal={callbackResolver:jo}};const Ae=class Ae{static show(e){const t=r.reactive({...e}),o=!1,i=t.type==="error"||t.type==="prompt",s=t.type==="error"?"错误提示":t.type==="prompt"&&t.title||"",a=t.acceptCallback||(()=>{}),d=t.rejectCallback||(()=>{});let c=null,u=new en(Ae.app);const m=()=>{c&&(c==null||c.destroy(),u=null)};return c=u==null?void 0:u.open({class:"modal-message modal-message-type-info",title:s,showButtons:o,showHeader:i,width:t.width||400,fitContent:!0,showMaxButton:!1,draggable:!0,dragHandle:".messager-draggable",render:()=>r.createVNode(mt,r.mergeProps(t,{onAccept:a,onReject:d,onClose:m}),null)}),u==null?void 0:u.getCurrentModal()}static info(e,t){const o=r.reactive({type:"info",title:e,detail:t,okButtonText:"知道了",showCancelButton:!1});Ae.show(o)}static warning(e,t){const o=r.reactive({type:"warning",title:e,detail:t,okButtonText:"知道了",showCancelButton:!1});Ae.show(o)}static success(e,t){const o=r.reactive({type:"success",title:e,detail:t,okButtonText:"关闭",showCancelButton:!1});Ae.show(o)}static error(e,t,o){const i=r.reactive({width:500,type:"error",okButtonText:"关闭",showCancelButton:!1,exceptionInfo:{date:o,message:e,detail:t}});Ae.show(i)}static prompt(e,t){const o=r.reactive({type:"prompt",title:e,detail:t,okButtonText:"确定",cancelButtonText:"取消"});Ae.show(o)}static question(e,t,o,i){const s=r.reactive({type:"question",title:e,detail:t,okButtonText:"确定",cancelButtonText:"取消",acceptCallback:o,rejectCallback:i});Ae.show(s)}};G(Ae,"app",null);let gt=Ae;mt.install=n=>{n.component(mt.name,mt),gt.app=n,n.provide("FMessageBoxService",gt)};class Oo extends qn{constructor(t,o){super(t,o);G(this,"responseLayoutEditorFunction");G(this,"bindingVarible");G(this,"numberEditorOptions",{type:"number-spinner",useThousands:!1,keyboard:!1,showButton:!1});this.responseLayoutEditorFunction=Dn(this.formSchemaUtils)}getCommonPropertyConfig(t,o,i="Card"){this.propertyConfig.categories.basic=this.getBasicProperties(t,o,i),this.propertyConfig.categories.appearance=this.getAppearanceProperties(t,o),this.propertyConfig.categories.behavior=this.getBehaviorConfig(t,"form-group")}getPropertyConfig(t,o){return this.getCommonPropertyConfig(t,o,"Card"),this.propertyConfig.categories.editor=this.getEditorProperties(t),this.propertyConfig.categories.expressions=this.getExpressionConfig(t,"Field"),this.propertyConfig}getGridFieldEdtiorPropConfig(t,o){return this.propertyConfig.categories={},this.getCommonPropertyConfig(t,o,"Grid"),this.getGridFieldEdtiorProperties?this.propertyConfig.categories.editor=this.getGridFieldEdtiorProperties(t):this.propertyConfig.categories.editor=this.getEditorProperties(t),this.propertyConfig.categories.expressons=this.getExpressionConfig(t,"Field"),this.propertyConfig.categories}getBasicProperties(t,o,i="Card"){const s=this;this.setDesignViewModelField(t);const{canChangeControlType:a,editorTypeList:d}=this.getAvailableEditorType(t),c={description:"Basic Information",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"编辑器类型",title:"编辑器类型",type:"string",$converter:"/converter/change-editor.converter",parentPropertyID:"editor",editor:{type:"combo-list",textField:"value",valueField:"key",idField:"key",editable:!1,data:d,readonly:!a}},label:{title:"标签",type:"string",$converter:"/converter/form-group-label.converter"},showLabelType:{description:"标签显示方式:1、显示:显示标签 2、占位:保留标签空间,但不显示文本 3、不显示:不显示标签",title:"标签显示",type:"enum",editor:{data:[{id:"visible",name:"显示"},{id:"reserve-space",name:"占位"},{id:"none",name:"不显示"}]}},binding:{description:"绑定的表单字段",title:"绑定",editor:{type:"binding-selector",bindingType:{enable:!1},editorParams:{componentSchema:t,needSyncToViewModel:!0,viewModelId:this.viewModelId,designerHostService:this.designerHostService,disableOccupiedFields:!0},textField:"bindingField"},refreshPanelAfterChanged:!0,readonly:this.formSchemaUtils.designerMode==="PC_RTC"&&!t.isRtcControl}},setPropertyRelates(u,m,l){if(u)switch(u&&u.propertyID){case"type":{s.changeControlType(t,u,o);break}case"label":{u.needRefreshControlTree=!0;break}case"binding":{s.changeBindingField(t,u,l);break}}}};return i.toLocaleLowerCase()!=="card"&&delete c.properties.showLabelType,c}checkCanChangeControlType(t,o){if(!t.binding)return!1;if(t.binding.type==="Variable"){if(this.bindingVarible=this.formSchemaUtils.getVariableById(t.binding.field),!this.bindingVarible)return!1}else if(!this.designViewModelField||this.designViewModelField.$type!==xe.FormSchemaEntityField$Type.SimpleField)return!1;return!0}getAvailableEditorType(t){var s;const o=this.checkCanChangeControlType(t,this.viewModelId);if(!o)return{canChangeControlType:!1,editorTypeList:[{key:t.editor.type,value:((s=I[t.editor.type])==null?void 0:s.name)||t.editor.type}]};let i=[];return this.designViewModelField&&this.designViewModelField.$type===xe.FormSchemaEntityField$Type.SimpleField?i=ut.getEditorTypesByMDataType(this.designViewModelField.type.name,this.designViewModelField.multiLanguage):this.bindingVarible&&(i=ut.getEditorTypesByMDataType(this.bindingVarible.type,this.designViewModelField.multiLanguage)),{canChangeControlType:o,editorTypeList:i}}changeBindingField(t,o,i){o.needRefreshEntityTree=!0}getAppearanceProperties(t,o){const i=this;return{title:"外观",description:"Appearance",properties:{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"},responseLayout:{description:"响应式列宽",title:"响应式列宽",type:"boolean",visible:!0,refreshPanelAfterChanged:!0,editor:{type:"response-layout-editor-setting",beforeOpen:()=>i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(t,i.componentId)}}},setPropertyRelates(s,a){if(s)switch(s&&s.propertyID){case"responseLayout":i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue,i.componentId||t.id),i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId),i.updateElementByParentContainer(t.id,o),delete t.responseLayout;break;case"class":i.updateUnifiedLayoutAfterControlChanged(s.propertyValue,t.id,this.componentId),ct.value++;break;case"style":{ct.value++;break}}}}}getEditorProperties(t){return this.getComponentConfig(t)}changeControlType(t,o,i){const s=o.propertyValue,a=i&&i.parent&&i.parent.schema;if(!a)return;const d=a.contents.findIndex(m=>m.id===t.id);if(d===-1)return;const c=a.contents[d];let u;if(this.designViewModelField){const g=this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find(p=>p.id===this.designViewModelField.id).fieldSchema||{};g.editor||(g.editor={}),g.editor.$type=s,this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id,g,!1),u=this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField,s)}u||(u=this.controlCreatorUtils.createFormGroupWithoutField(s)),Object.assign(u,{id:c.id,appearance:c.appearance,size:c.size,label:c.label,binding:c.binding}),Object.prototype.hasOwnProperty.call(c,"visible")&&Object.assign(u,{visible:c.visible}),c.editor&&["readonly","required","placeholder"].map(m=>{Object.prototype.hasOwnProperty.call(c.editor,m)&&(u.editor[m]=c.editor[m])}),i!=null&&i.updateContextSchema?i.updateContextSchema(u):(i.schema=Object.assign(c,u),Object.assign(t,u)),Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(m=>m.classList.remove("dgComponentSelected")),Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(m=>m.classList.remove("dgComponentFocused")),ct.value++,r.nextTick(()=>{this.getFormDesignerInstance().reloadPropertyPanel()})}getComponentConfig(t,o={},i={},s){var g;const a=Object.assign({description:"编辑器",title:"编辑器",type:"input-group",$converter:"/converter/property-editor.converter",parentPropertyID:"editor"},o),d=(g=t.binding)!=null&&g.field?[]:["Const","Variable","StateMachine"],c=this.getPropertyEditorParams(t,d,"readonly"),u=this.getPropertyEditorParams(t,d,"required"),m={readonly:{description:"",title:"只读",editor:c},required:{description:"",title:"必填",type:"boolean",editor:u},placeholder:{description:"当控件没有值时在输入框中显示的文本",title:"提示文本",type:"string"}};for(const f in i)m[f]=Object.assign(m[f]||{},i[f]);const l=this;return{...a,properties:{...m},setPropertyRelates(f,p){if(f){switch(f.propertyID){case"readonly":case"required":l.afterMutilEditorChanged(t,f);break}s&&s.bind(l)(f,t,p)}}}}updateUnifiedLayoutAfterControlChanged(t,o,i){const s=t.split(" ");let a=s.find(l=>/^col-([1-9]|10|11|12)$/.test(l)),d=s.find(l=>/^col-md-([1-9]|10|11|12)$/.test(l)),c=s.find(l=>/^col-xl-([1-9]|10|11|12)$/.test(l)),u=s.find(l=>/^col-el-([1-9]|10|11|12)$/.test(l));a=a||"col-12",d=d||"col-md-"+a.replace("col-",""),c=c||"col-xl-"+d.replace("col-md-",""),u=u||"col-el-"+c.replace("col-xl-","");const m={id:o,columnInSM:parseInt(a.replace("col-",""),10),columnInMD:parseInt(d.replace("col-md-",""),10),columnInLG:parseInt(c.replace("col-xl-",""),10),columnInEL:parseInt(u.replace("col-el-",""),10)};this.updateUnifiedLayoutAfterResponseLayoutChanged(i,m)}updateUnifiedLayoutAfterResponseLayoutChanged(t,o){const{formNode:i}=this.responseLayoutEditorFunction.checkCanFindFormNode(t);if(!i||!i.unifiedLayout)return;const s=[];if(this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i,s,1),o){const p=s.find(h=>h.id===o.id);Object.assign(p||{},o)}const a=s.map(p=>p.columnInSM),d=s.map(p=>p.columnInMD),c=s.map(p=>p.columnInLG),u=s.map(p=>p.columnInEL),m=this.checkIsUniqueColumn(a)?a[0]:null,l=this.checkIsUniqueColumn(d)?d[0]:null,g=this.checkIsUniqueColumn(c)?c[0]:null,f=this.checkIsUniqueColumn(u)?u[0]:null;Object.assign(i.unifiedLayout,{uniqueColClassInSM:m,uniqueColClassInMD:l,uniqueColClassInLG:g,uniqueColClassInEL:f})}checkIsUniqueColumn(t){const o=new Set(t);return Array.from(o).length===1}getItemCollectionEditor(t,o,i){return o=o||"value",i=i||"name",{editor:{columns:[{field:o,title:"值",dataType:"string"},{field:i,title:"名称",dataType:"string"}],type:"item-collection-editor",valueField:o,nameField:i,requiredFields:[o,i],uniqueFields:[o,i],readonly:this.checkEnumDataReadonly(t)}}}checkEnumDataReadonly(t){return!t.binding||t.binding.type!=="Form"?!1:!!(this.designViewModelField&&this.designViewModelField.type&&this.designViewModelField.type.$type===xe.FormSchemaEntityFieldType$Type.EnumType)}appendFieldValueChangeEvents(t,o){t.binding&&t.binding.type===dt.Form&&t.binding.field?(o.find(a=>a.label==="fieldValueChanging")||o.push({label:"fieldValueChanging",name:"绑定字段值变化前事件"}),o.find(a=>a.label==="fieldValueChanged")||o.push({label:"fieldValueChanged",name:"绑定字段值变化后事件"}),this.designViewModelField&&(t.fieldValueChanging=this.designViewModelField.valueChanging,t.fieldValueChanged=this.designViewModelField.valueChanged)):o=o.filter(i=>i.label!=="fieldValueChanging"&&i.label!=="fieldValueChanged")}getControlMethodType(t){if(!t.binding)return t.type;switch(t.binding.type){case dt.Form:return t.binding.path||t.type;case dt.Variable:return t.binding.fullPath||t.type}return t.type}getEventPropertyConfig(t,o="card",i,s){const a=this;let d=[];i&&(d=d.concat(i)),this.appendFieldValueChangeEvents(t,d);const c=a.eventsEditorUtils.formProperties(t,a.viewModelId,d);return{title:"事件",hideTitle:!0,properties:a.createBaseEventProperty(c),tabId:"commands",tabName:"交互",setPropertyRelates(l,g){const f=l.propertyValue;delete t[a.viewModelId],f&&(f.setPropertyRelates=this.setPropertyRelates,f.controlInfo={type:a.getControlMethodType(t),name:t.title},a.eventsEditorUtils.saveRelatedParameters(t,a.viewModelId,f.events,f)),s&&s(l,g,f);const p=a.designViewModelUtils.getDgViewModel(a.viewModelId);p&&a.designViewModelField&&p.changeField(a.designViewModelField.id,{valueChanging:t.fieldValueChanging,valueChanged:t.fieldValueChanged})}}}getExpressionConfig(t,o,i=["compute","dependency","validate"],s){return new Qt(this.formSchemaUtils).getExpressionConfig(t,o,i,s)}getBindingDataType(){return this.designViewModelField?this.designViewModelField.type.name==="Number"?"number":this.designViewModelField.type.name==="String"?"string":"boolean":"boolean"}getEditor(){return this.getBindingDataType()==="number"?this.numberEditorOptions:{}}updatePropertyValue(t,o,i){var s;t.editor[o]!==i?t.editor[o]=i:(s=this.getFormDesignerInstance())==null||s.reloadPropertyPanel()}setBooleanValue(t,o,i){let s=i;this.getBindingDataType()==="string"&&(s=(s||"").trim()||(o==="trueValue"?"true":"false"));const d=o==="trueValue"?"falseValue":"trueValue";t.editor[d]===s&&(s=s+1),this.updatePropertyValue(t,o,s)}getBooleanValueConverter(){return{convertFrom:(t,o)=>t.editor[o],convertTo:(t,o,i)=>{this.setBooleanValue(t,o,i)}}}}class Ro extends Oo{constructor(e,t){super(e,t)}getEditorProperties(e){return{description:"编辑器",title:"编辑器",type:"avatar",$converter:"/converter/property-editor.converter",parentPropertyID:"editor",properties:{readonly:{description:"",title:"只读",type:"boolean"},avatarWidth:{description:"",title:"头像宽度",type:"number"},avatarHeight:{description:"",title:"头像高度",type:"number"},cover:{description:"",title:"封面",type:"string"}}}}}function qo(n,e){const t=n.schema;function o(i,s){return new Ro(i,e).getPropertyConfig(t,s)}return{getPropsConfig:o}}const $o=r.defineComponent({name:"FAvatarDesign",props:lt,emits:["change","update:modelValue"],setup(n,e){const t=r.ref(),o=r.inject("designer-host-service"),i=r.inject("design-item-context"),s=qo(i,o),a=yt.useDesignerComponent(t,i,s);r.onMounted(()=>{t.value.componentInstance=a}),e.expose(a.value);const d=r.computed(()=>({"f-avatar":!0,"f-avatar-readonly":n.readonly,"f-avatar-circle":n.shape==="circle","f-avatar-square":n.shape==="square"})),c=r.ref(n.modelValue),u=r.computed(()=>({width:n.avatarWidth+"px",height:n.avatarHeight+"px"})),m=!1;function l(){return""}function g(){}const f=r.ref(null),{acceptTypes:p,imageSource:h,onClickImage:w}=Gt(n,e,f,c);return()=>r.createVNode("div",{ref:t,class:d.value,style:u.value,onClick:w},[m,r.createVNode("img",{title:n.title,class:"f-avatar-image",src:h.value,onError:l},null),!n.readonly&&r.createVNode("div",{class:"f-avatar-icon"},[r.createVNode("span",{class:"f-icon f-icon-camera"},null)]),r.createVNode("input",{ref:"file",name:"file-input",type:"file",class:"f-avatar-upload",accept:p.value,onChange:g,style:"display: none;"},null)])}});Je.register=(n,e,t,o)=>{n.avatar=Je,e.avatar=bt},Je.registerDesigner=(n,e,t)=>{n.avatar=$o,e.avatar=bt};const Do=xe.withInstall(Je);oe.FAvatar=Je,oe.avatarProps=lt,oe.default=Do,oe.propsResolver=bt,Object.defineProperties(oe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});