@farris/ui-vue 1.2.7 → 1.2.9

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 (246) hide show
  1. package/components/accordion/index.esm.js +136 -136
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +418 -456
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/border-editor/index.esm.js +4 -4
  6. package/components/border-editor/index.umd.cjs +1 -1
  7. package/components/button/index.esm.js +1 -1
  8. package/components/button/index.umd.cjs +1 -1
  9. package/components/button-edit/index.esm.js +363 -436
  10. package/components/button-edit/index.umd.cjs +1 -1
  11. package/components/button-group/index.esm.js +5 -5
  12. package/components/button-group/index.umd.cjs +1 -1
  13. package/components/calendar/index.esm.js +417 -417
  14. package/components/calendar/index.umd.cjs +1 -1
  15. package/components/capsule/index.esm.js +176 -176
  16. package/components/capsule/index.umd.cjs +1 -1
  17. package/components/checkbox/index.esm.js +557 -594
  18. package/components/checkbox/index.umd.cjs +1 -1
  19. package/components/color-picker/index.esm.js +119 -119
  20. package/components/color-picker/index.umd.cjs +2 -2
  21. package/components/combo-list/index.esm.js +502 -535
  22. package/components/combo-list/index.umd.cjs +1 -1
  23. package/components/combo-tree/index.esm.js +69 -69
  24. package/components/combo-tree/index.umd.cjs +1 -1
  25. package/components/component/index.esm.js +387 -275
  26. package/components/component/index.umd.cjs +1 -1
  27. package/components/condition/index.esm.js +1219 -983
  28. package/components/condition/index.umd.cjs +1 -1
  29. package/components/content-container/index.esm.js +292 -219
  30. package/components/content-container/index.umd.cjs +1 -1
  31. package/components/data-grid/index.css +1 -1
  32. package/components/data-grid/index.esm.js +5718 -5546
  33. package/components/data-grid/index.umd.cjs +1 -1
  34. package/components/data-view/index.esm.js +3291 -2930
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.esm.js +2650 -2682
  37. package/components/date-picker/index.umd.cjs +1 -1
  38. package/components/dependent-base/style.js +1 -0
  39. package/components/dependent-fluid/style.js +1 -0
  40. package/components/dependent-icon/style.js +1 -0
  41. package/components/dependent-input/style.js +1 -0
  42. package/components/dependent-table/style.js +1 -0
  43. package/components/designer-canvas/index.css +1 -1
  44. package/components/designer-canvas/index.esm.js +945 -932
  45. package/components/designer-canvas/index.umd.cjs +1 -1
  46. package/components/designer-outline/index.css +1 -1
  47. package/components/designer-outline/index.esm.js +175 -133
  48. package/components/designer-outline/index.umd.cjs +1 -1
  49. package/components/designer-toolbox/index.esm.js +36 -12
  50. package/components/designer-toolbox/index.umd.cjs +1 -1
  51. package/components/discussion-editor/index.esm.js +1 -1
  52. package/components/discussion-editor/index.umd.cjs +1 -1
  53. package/components/dropdown/index.esm.js +246 -246
  54. package/components/dropdown/index.umd.cjs +2 -2
  55. package/components/dynamic-form/index.esm.js +1319 -1172
  56. package/components/dynamic-form/index.umd.cjs +1 -1
  57. package/components/dynamic-resolver/index.esm.js +119 -82
  58. package/components/dynamic-resolver/index.umd.cjs +1 -1
  59. package/components/dynamic-view/index.esm.js +258 -249
  60. package/components/dynamic-view/index.umd.cjs +1 -1
  61. package/components/enum-editor/index.esm.js +3 -3
  62. package/components/enum-editor/index.umd.cjs +1 -1
  63. package/components/events-editor/index.esm.js +569 -514
  64. package/components/events-editor/index.umd.cjs +1 -1
  65. package/components/expression-editor/index.esm.js +104 -104
  66. package/components/expression-editor/index.umd.cjs +1 -1
  67. package/components/external-container/index.css +1 -1
  68. package/components/external-container/index.esm.js +3122 -2686
  69. package/components/external-container/index.umd.cjs +1 -1
  70. package/components/field-selector/index.css +1 -1
  71. package/components/field-selector/index.esm.js +6780 -6608
  72. package/components/field-selector/index.umd.cjs +1 -1
  73. package/components/filter-bar/index.css +1 -1
  74. package/components/filter-bar/index.esm.js +1466 -1523
  75. package/components/filter-bar/index.umd.cjs +1 -1
  76. package/components/flow-canvas/index.css +1 -1
  77. package/components/flow-canvas/index.esm.js +1048 -1035
  78. package/components/flow-canvas/index.umd.cjs +1 -1
  79. package/components/image-cropper/index.esm.js +422 -422
  80. package/components/image-cropper/index.umd.cjs +1 -1
  81. package/components/input-group/index.esm.js +674 -716
  82. package/components/input-group/index.umd.cjs +1 -1
  83. package/components/layout/index.esm.js +291 -291
  84. package/components/layout/index.umd.cjs +1 -1
  85. package/components/list-nav/index.esm.js +303 -230
  86. package/components/list-nav/index.umd.cjs +1 -1
  87. package/components/list-view/index.css +1 -1
  88. package/components/list-view/index.esm.js +2486 -2130
  89. package/components/list-view/index.umd.cjs +1 -1
  90. package/components/lookup/index.css +1 -1
  91. package/components/lookup/index.esm.js +7474 -7272
  92. package/components/lookup/index.umd.cjs +1 -1
  93. package/components/mapping-editor/index.css +1 -1
  94. package/components/mapping-editor/index.esm.js +6139 -5949
  95. package/components/mapping-editor/index.umd.cjs +1 -1
  96. package/components/message-box/index.esm.js +1 -1
  97. package/components/message-box/index.umd.cjs +1 -1
  98. package/components/modal/index.esm.js +1 -1
  99. package/components/modal/index.umd.cjs +1 -1
  100. package/components/nav/index.esm.js +432 -371
  101. package/components/nav/index.umd.cjs +3 -3
  102. package/components/number-range/index.esm.js +1124 -0
  103. package/components/number-range/index.umd.cjs +1 -0
  104. package/components/number-range/package.json +8 -0
  105. package/components/number-range/style.js +6 -0
  106. package/components/number-spinner/index.esm.js +1155 -0
  107. package/components/number-spinner/index.umd.cjs +1 -0
  108. package/components/number-spinner/package.json +8 -0
  109. package/components/number-spinner/style.js +4 -0
  110. package/components/order/index.css +1 -1
  111. package/components/order/index.esm.js +1215 -1178
  112. package/components/order/index.umd.cjs +1 -1
  113. package/components/page-footer/index.esm.js +147 -147
  114. package/components/page-footer/index.umd.cjs +1 -1
  115. package/components/page-header/index.esm.js +1240 -1346
  116. package/components/page-header/index.umd.cjs +1 -1
  117. package/components/pagination/index.esm.js +489 -428
  118. package/components/pagination/index.umd.cjs +1 -1
  119. package/components/progress/index.esm.js +220 -220
  120. package/components/progress/index.umd.cjs +3 -3
  121. package/components/property-editor/index.esm.js +1512 -1540
  122. package/components/property-editor/index.umd.cjs +3 -3
  123. package/components/property-panel/index.css +1 -1
  124. package/components/property-panel/index.esm.js +749 -815
  125. package/components/property-panel/index.umd.cjs +1 -1
  126. package/components/query-solution/index.css +1 -0
  127. package/components/query-solution/index.esm.js +7074 -0
  128. package/components/query-solution/index.umd.cjs +1 -0
  129. package/components/query-solution/package.json +8 -0
  130. package/components/query-solution/style.js +2 -0
  131. package/components/radio-button/index.esm.js +86 -86
  132. package/components/radio-button/index.umd.cjs +1 -1
  133. package/components/radio-group/index.esm.js +442 -479
  134. package/components/radio-group/index.umd.cjs +1 -1
  135. package/components/rate/index.esm.js +213 -208
  136. package/components/rate/index.umd.cjs +1 -1
  137. package/components/response-layout/index.esm.js +116 -116
  138. package/components/response-layout/index.umd.cjs +1 -1
  139. package/components/response-layout-editor/index.esm.js +943 -918
  140. package/components/response-layout-editor/index.umd.cjs +1 -1
  141. package/components/response-toolbar/index.esm.js +1174 -1295
  142. package/components/response-toolbar/index.umd.cjs +1 -1
  143. package/components/schema-selector/index.css +1 -1
  144. package/components/schema-selector/index.esm.js +5383 -5171
  145. package/components/schema-selector/index.umd.cjs +2 -2
  146. package/components/search-box/index.esm.js +201 -201
  147. package/components/search-box/index.umd.cjs +1 -1
  148. package/components/section/index.esm.js +684 -542
  149. package/components/section/index.umd.cjs +1 -1
  150. package/components/smoke-detector/index.esm.js +121 -121
  151. package/components/smoke-detector/index.umd.cjs +1 -1
  152. package/components/spacing-editor/index.esm.js +2 -2
  153. package/components/spacing-editor/index.umd.cjs +1 -1
  154. package/components/splitter/index.esm.js +1158 -382
  155. package/components/splitter/index.umd.cjs +1 -1
  156. package/components/step/index.esm.js +232 -232
  157. package/components/step/index.umd.cjs +1 -1
  158. package/components/switch/index.esm.js +451 -487
  159. package/components/switch/index.umd.cjs +1 -1
  160. package/components/tabs/index.esm.js +2078 -2168
  161. package/components/tabs/index.umd.cjs +1 -1
  162. package/components/tags/index.esm.js +318 -320
  163. package/components/tags/index.umd.cjs +1 -1
  164. package/components/text/index.esm.js +192 -192
  165. package/components/text/index.umd.cjs +1 -1
  166. package/components/textarea/index.esm.js +471 -497
  167. package/components/textarea/index.umd.cjs +1 -1
  168. package/components/time-picker/index.esm.js +1421 -1441
  169. package/components/time-picker/index.umd.cjs +1 -1
  170. package/components/transfer/index.css +1 -1
  171. package/components/transfer/index.esm.js +430 -421
  172. package/components/transfer/index.umd.cjs +1 -1
  173. package/components/tree-grid/index.css +1 -1
  174. package/components/tree-grid/index.esm.js +6806 -6624
  175. package/components/tree-grid/index.umd.cjs +1 -1
  176. package/components/tree-view/index.esm.js +2793 -2433
  177. package/components/tree-view/index.umd.cjs +1 -1
  178. package/components/uploader/index.esm.js +165 -165
  179. package/components/uploader/index.umd.cjs +2 -2
  180. package/components/verify-detail/index.esm.js +255 -255
  181. package/components/verify-detail/index.umd.cjs +1 -1
  182. package/components/video/index.esm.js +413 -334
  183. package/components/video/index.umd.cjs +1 -1
  184. package/components/weather/index.esm.js +902 -902
  185. package/components/weather/index.umd.cjs +4 -4
  186. package/farris.all.esm.js +54155 -52847
  187. package/farris.all.umd.cjs +9 -9
  188. package/index.css +1 -1
  189. package/package.json +1 -1
  190. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  191. package/types/checkbox/index.d.ts +1 -0
  192. package/types/combo-list/src/components/list-container.component.d.ts +3 -0
  193. package/types/combo-list/src/components/list-container.props.d.ts +5 -1
  194. package/types/common/entity/entity-schema.d.ts +258 -0
  195. package/types/component/src/component-ref.props.d.ts +4 -0
  196. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  197. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  198. package/types/data-grid/index.d.ts +5 -2
  199. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  200. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  201. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  202. package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
  203. package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
  204. package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
  205. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  206. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  207. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  208. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  209. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  210. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  211. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  212. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  213. package/types/data-view/composition/types.d.ts +19 -7
  214. package/types/data-view/composition/use-edit.d.ts +2 -1
  215. package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
  216. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  217. package/types/designer-canvas/src/types.d.ts +3 -3
  218. package/types/dynamic-form/index.d.ts +3 -1
  219. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  220. package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
  221. package/types/dynamic-form/src/types.d.ts +1 -1
  222. package/types/dynamic-resolver/index.d.ts +1 -0
  223. package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
  224. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  225. package/types/dynamic-resolver/src/types.d.ts +3 -2
  226. package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
  227. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
  228. package/types/modal/src/modal.props.d.ts +1 -4
  229. package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
  230. package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
  231. package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
  232. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  233. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  234. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  235. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  236. package/types/tabs/src/composition/types.d.ts +2 -2
  237. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  238. package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
  239. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  240. package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
  241. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  242. package/types/tags/index.d.ts +36 -5
  243. package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
  244. package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
  245. package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
  246. package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
@@ -1 +1 @@
1
- (function(E,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue"),require("lodash-es"),require("@farris/ui-vue/components/accordion"),require("@farris/ui-vue/components/avatar"),require("@farris/ui-vue/components/button-edit"),require("@farris/ui-vue/components/button-group"),require("@farris/ui-vue/components/calendar"),require("@farris/ui-vue/components/capsule"),require("@farris/ui-vue/components/checkbox"),require("@farris/ui-vue/components/color-picker"),require("@farris/ui-vue/components/combo-list"),require("@farris/ui-vue/components/content-container"),require("@farris/ui-vue/components/data-grid"),require("@farris/ui-vue/components/date-picker"),require("@farris/ui-vue/components/dropdown"),require("@farris/ui-vue/components/dynamic-form"),require("@farris/ui-vue/components/external-container"),require("@farris/ui-vue/components/events-editor"),require("@farris/ui-vue/components/filter-bar"),require("@farris/ui-vue/components/image-cropper"),require("@farris/ui-vue/components/input-group"),require("@farris/ui-vue/components/layout"),require("@farris/ui-vue/components/list-nav"),require("@farris/ui-vue/components/list-view"),require("@farris/ui-vue/components/lookup"),require("@farris/ui-vue/components/nav"),require("@farris/ui-vue/components/number-spinner"),require("@farris/ui-vue/components/number-range"),require("@farris/ui-vue/components/order"),require("@farris/ui-vue/components/page-header"),require("@farris/ui-vue/components/page-footer"),require("@farris/ui-vue/components/pagination"),require("@farris/ui-vue/components/progress"),require("@farris/ui-vue/components/query-solution"),require("@farris/ui-vue/components/radio-group"),require("@farris/ui-vue/components/rate"),require("@farris/ui-vue/components/response-toolbar"),require("@farris/ui-vue/components/response-layout"),require("@farris/ui-vue/components/response-layout-editor"),require("@farris/ui-vue/components/search-box"),require("@farris/ui-vue/components/section"),require("@farris/ui-vue/components/smoke-detector"),require("@farris/ui-vue/components/splitter"),require("@farris/ui-vue/components/step"),require("@farris/ui-vue/components/switch"),require("@farris/ui-vue/components/tabs"),require("@farris/ui-vue/components/tags"),require("@farris/ui-vue/components/text"),require("@farris/ui-vue/components/time-picker"),require("@farris/ui-vue/components/transfer"),require("@farris/ui-vue/components/tree-view"),require("@farris/ui-vue/components/uploader"),require("@farris/ui-vue/components/verify-detail"),require("@farris/ui-vue/components/weather"),require("@farris/ui-vue/components/component"),require("@farris/ui-vue/components/video"),require("@farris/ui-vue/components/textarea")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","@farris/ui-vue/components/accordion","@farris/ui-vue/components/avatar","@farris/ui-vue/components/button-edit","@farris/ui-vue/components/button-group","@farris/ui-vue/components/calendar","@farris/ui-vue/components/capsule","@farris/ui-vue/components/checkbox","@farris/ui-vue/components/color-picker","@farris/ui-vue/components/combo-list","@farris/ui-vue/components/content-container","@farris/ui-vue/components/data-grid","@farris/ui-vue/components/date-picker","@farris/ui-vue/components/dropdown","@farris/ui-vue/components/dynamic-form","@farris/ui-vue/components/external-container","@farris/ui-vue/components/events-editor","@farris/ui-vue/components/filter-bar","@farris/ui-vue/components/image-cropper","@farris/ui-vue/components/input-group","@farris/ui-vue/components/layout","@farris/ui-vue/components/list-nav","@farris/ui-vue/components/list-view","@farris/ui-vue/components/lookup","@farris/ui-vue/components/nav","@farris/ui-vue/components/number-spinner","@farris/ui-vue/components/number-range","@farris/ui-vue/components/order","@farris/ui-vue/components/page-header","@farris/ui-vue/components/page-footer","@farris/ui-vue/components/pagination","@farris/ui-vue/components/progress","@farris/ui-vue/components/query-solution","@farris/ui-vue/components/radio-group","@farris/ui-vue/components/rate","@farris/ui-vue/components/response-toolbar","@farris/ui-vue/components/response-layout","@farris/ui-vue/components/response-layout-editor","@farris/ui-vue/components/search-box","@farris/ui-vue/components/section","@farris/ui-vue/components/smoke-detector","@farris/ui-vue/components/splitter","@farris/ui-vue/components/step","@farris/ui-vue/components/switch","@farris/ui-vue/components/tabs","@farris/ui-vue/components/tags","@farris/ui-vue/components/text","@farris/ui-vue/components/time-picker","@farris/ui-vue/components/transfer","@farris/ui-vue/components/tree-view","@farris/ui-vue/components/uploader","@farris/ui-vue/components/verify-detail","@farris/ui-vue/components/weather","@farris/ui-vue/components/component","@farris/ui-vue/components/video","@farris/ui-vue/components/textarea"],s):(E=typeof globalThis<"u"?globalThis:E||self,s(E["flow-canvas"]={},E.Vue,E.LodashES,E.FAccordion,E.FAvatar,E.FButtonEdit,E.FButtonGroup,E.FCalendar,E.FCapsule,E.FCheckbox,E.FColorPicker,E.FComboList,E.FContentContainer,E.FDataGrid,E.FDatePicker,E.FDropdown,E.FDynamicForm,E.FExteranlContainer,E.FEventsEditor,E.FFilterBar,E.FImageCropper,E.FInputGroup,E.FLayout,E.FListNav,E.FListView,E.FLookup,E.FNav,E.FNumberSpinner,E.FNumberRange,E.FOrder,E.FPageHeader,E.FPageFooter,E.FPagination,E.FProgress,E.FQuerySolution,E.FRadioGroup,E.FRate,E.FResponseToolbar,E.FResponseLayout,E.FResponseLayoutEditorSetting,E.FSearchBox,E.FSection,E.FSmokeDetector,E.FSplitter,E.FStep,E.FSwitch,E.FTab,E.FTags,E.FText,E.FTimePicker,E.FTransfer,E.FTreeview,E.FUploader,E.FVerifyDetail,E.FWeather,E.FComponent,E.FVideo,E.FTextArea))})(this,function(E,s,Ee,Ke,Qe,Je,Ze,et,tt,nt,ot,rt,it,st,at,ct,ut,lt,ft,dt,pt,mt,vt,gt,yt,ht,Ct,wt,xt,bt,Pt,It,St,Tt,Nt,Ot,Et,Ft,At,Dt,Mt,Bt,_t,Vt,qt,kt,Lt,Rt,jt,Xt,$t,Yt,zt,Ut,Ht,Wt,Gt,Kt){"use strict";const Le={modelValue:{type:Object,default:{}}};function Qt(){const I={aroundDirection:"none",left:2,right:2,top:2,bottom:2,x:0,y:0};function _(){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("fill","none"),e.setAttribute("stroke","#4d53e8"),e.setAttribute("stroke-width","2"),e.setAttribute("class",""),e}function m(){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("fill","none"),e.setAttribute("stroke","#4d53e8"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e}function b(){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("fill","none"),e.setAttribute("stroke","#4d53e8"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e}function C(e,t,c,P){const u=i=>{i.key==="Delete"&&(e.indexOf("^"),document.removeEventListener("keydown",u),t.remove())};c.addEventListener("mouseenter",()=>{c.setAttribute("stroke","#37d0ff"),P.setAttribute("stroke","#37d0ff"),c.setAttribute("stroke-width","3"),document.addEventListener("keydown",u)}),c.addEventListener("mouseleave",()=>{c.setAttribute("stroke","#4d53e8"),c.setAttribute("stroke-width","2"),P.setAttribute("stroke","#4d53e8"),document.removeEventListener("keydown",u)})}function d(e){let t=document.getElementById(e);if(t==null){const c=document.createElementNS("http://www.w3.org/2000/svg","svg"),P=_();c.appendChild(P);const u=m();c.appendChild(u);const i=b();c.appendChild(i);const U=b();c.appendChild(U),t=document.createElement("div"),t.id=e,t.style.position="absolute",t.appendChild(c),C(e,t,P,u);const j=document.getElementById("svg-container");return j&&j.appendChild(t),t}return t}function A(e,t,c,P,u){const i={x:0,y:0};return e==="west"&&(t==="north_west"&&(c==="north"&&(i.x=0,i.y=0-u/2),c==="west"&&(i.x=0-P/2,i.y=0)),t==="north_east"&&(c==="north"&&(i.x=-100,i.y=0-u/2),c==="east"&&(i.x=-100,i.y=0-u/2)),t==="south_east"&&(c==="south"&&(i.x=-100,i.y=0+u/2),c==="east"&&(i.x=-100,i.y=0+u/2)),t==="south_west"&&(c==="south"&&(i.x=0,i.y=0+u/2),c==="west"&&(i.x=0-P/2,i.y=0))),e==="east"&&(t==="north_west"&&(c==="north"&&(i.x=-100,i.y=0-u/2),c==="west"&&(i.x=100,i.y=0-u/2)),t==="north_east"&&(c==="north"&&(i.x=0,i.y=0-u/2),c==="east"&&(i.x=0+P/2,i.y=0)),t==="south_east"&&(c==="south"&&(i.x=0,i.y=0+u/2),c==="east"&&(i.x=0+P/2,i.y=0)),t==="south_west"&&(c==="south"&&(i.x=100,i.y=0+u/2),c==="west"&&(i.x=100,i.y=0+u/2))),e==="north"&&(t==="north_west"&&(c==="north"&&(i.x=0,i.y=0-u/2),c==="west"&&(i.x=0-P/2,i.y=0)),t==="north_east"&&(c==="north"&&(i.x=0,i.y=0-u/2),c==="east"&&(i.x=0+P/2,i.y=0)),t==="south_east"&&(c==="south"&&(i.x=0+P/2,i.y=-100),c==="east"&&(i.x=0+P/2,i.y=-100)),t==="south_west"&&(c==="south"&&(i.x=0-P/2,i.y=-100),c==="west"&&(i.x=0-P/2,i.y=-100))),e==="south"&&(t==="north_west"&&(c==="north"&&(i.x=0-P/2,i.y=100),c==="west"&&(i.x=0-P/2,i.y=100)),t==="north_east"&&(c==="north"&&(i.x=0+P/2,i.y=100),c==="east"&&(i.x=0+P/2,i.y=100)),t==="south_east"&&(c==="south"&&(i.x=0,i.y=0+u/2),c==="east"&&(i.x=0+P/2,i.y=0)),t==="south_west"&&(c==="south"&&(i.x=0,i.y=u/2),c==="west"&&(i.x=0-P/2,i.y=0))),i}function w(e,t,c,P){const u={x:0,y:0};return e==="south"&&(t==="west"&&(u.x=-100,u.y=0-P/2),t==="east"&&(u.x=100,u.y=-100),t==="south"&&(u.x=0-c/2,u.y=100),(t==="north"||t==="center")&&(u.x=0,u.y=0-P/2)),e==="north"&&(t==="west"&&(u.x=-100,u.y=100),t==="east"&&(u.x=100,u.y=100),t==="north"&&(u.x=0-c/2,u.y=-100),(t==="south"||t==="center")&&(u.x=0,u.y=P/2)),e==="east"&&(t==="north"&&(u.y=-100,u.x=-100),t==="south"&&(u.y=100,u.x=-100),t==="east"&&(u.x=100,u.y=100),(t==="west"||t==="center")&&(u.x=0-c/2,u.y=0)),e==="west"&&(t==="north"&&(u.y=-100,u.x=100),t==="south"&&(u.y=100,u.x=100),t==="west"&&(u.x=-100,u.y=P/2),(t==="east"||t==="center")&&(u.x=c/2,u.y=0)),u}function S(e,t,c,P,u,i,U){const j=U==="south"||U==="east"?"portrait":"landscape",ne=u,L=j==="landscape"?"east":"north",ie=U==="center"?j==="landscape"?"west":"south":U,se=A(ne,i,L,e,t),{x:B,y:h}=se,W=w(L,ie,e,t),{x:G,y:Q}=W;Q<0&&(t+=Math.abs(Q));const de=new Map([["default",0+B],["portrait",0+B],["landscape",0+B]]),oe=new Map([["default",t+h],["portrait",t+h],["landscape",t+h]]);B<0&&(e+=Math.abs(B)),G>0&&(e+=G);const ge=new Map([["default",e+G],["portrait",e+G],["landscape",e+G]]),ce=new Map([["default",0+Q],["portrait",0+Q],["landscape",0+Q]]),ue=P.left>I.left,ae=P.bottom>I.bottom,pe=ue?0:ae?e/2:de.get(j),ye=ae?t+P.bottom:ue?t/2:oe.get(j),he=ge.get(j),me=ce.get(j);return[{x:pe,y:ye},{x:he,y:me},{x:G,y:Q}]}function f(e,t,c,P,u,i,U){const j=U==="south"||U==="west"?"portrait":"landscape",ne=u,L=j==="landscape"?"west":"north",ie=U,se=A(ne,i,L,e,t),{x:B,y:h}=se,W=w(L,ie,e,t),{x:G,y:Q}=W;Q<0&&(t+=Math.abs(Q)),B>0&&(e+=B),G<0&&(e+=Math.abs(G));const de=new Map([["default",e+B],["portrait",e+B],["landscape",e+B]]),oe=new Map([["default",t+h],["portrait",t+h],["landscape",t+h]]),ge=new Map([["default",0+G],["portrait",0+G],["landscape",0+G]]),ce=new Map([["default",0+Q],["portrait",0+Q],["landscape",0+Q]]),ue=P.right>I.right,ae=P.bottom>I.bottom,pe=ue?e+P.right:ae?e/2:de.get(j),ye=ae?t+P.bottom:ue?t/2:oe.get(j),he=ge.get(j),me=ce.get(j);return[{x:pe,y:ye},{x:he,y:me},{x:G,y:Q}]}function n(e,t,c,P,u,i,U){const j=U==="north"||U==="east"?"portrait":"landscape",ne=u,L=j==="landscape"?"east":"south",ie=U,se=A(ne,i,L,e,t),{x:B,y:h}=se,W=w(L,ie,e,t),{x:G,y:Q}=W,de=new Map([["default",0+B],["portrait",0+B],["landscape",0+B]]),oe=new Map([["default",0+h],["portrait",0+h],["landscape",0+h]]);B<0&&(e+=Math.abs(B)),h<0&&(t+=Math.abs(h)),G>0&&(e+=G),Q>0&&(t+=Q);const ge=new Map([["default",e+G],["portrait",e+G],["landscape",e+G]]),ce=new Map([["default",t+Q],["portrait",t+Q],["landscape",t+Q]]),ue=P.left>I.left,ae=P.top>I.top,pe=ue?0:ae?e/2:de.get(j),ye=ae?0:ue?t/2:oe.get(j),he=ge.get(j),me=ce.get(j);return[{x:pe,y:ye},{x:he,y:me},{x:G,y:Q}]}function o(e,t,c,P,u,i,U){const j=U==="north"||U==="west"?"portrait":"landscape",ne=u,L=j==="landscape"?"west":"south",ie=U,se=A(ne,i,L,e,t),{x:B,y:h}=se,W=w(L,ie,e,t),{x:G,y:Q}=W;G<0&&(e+=Math.abs(G));const de=new Map([["default",e+B],["portrait",e+B],["landscape",e+B]]),oe=new Map([["default",0+h],["portrait",0+h],["landscape",0+h]]);h<0&&(t+=Math.abs(h)),Q>0&&(t+=Q);const ge=new Map([["default",0+G],["portrait",0+G],["landscape",0+G]]),ce=new Map([["default",t+Q],["portrait",t+Q],["landscape",t+Q]]),ue=P.right>I.right,ae=P.top>I.top,pe=ue?e+P.right:ae?e/2:de.get(j),ye=ae?0:ue?t/2:oe.get(j),he=ge.get(j),me=ce.get(j);return[{x:pe,y:ye},{x:he,y:me},{x:G,y:Q}]}const a=new Map([["north_east",S],["north_west",f],["south_east",n],["south_west",o]]),g=new Map([["east",["north_west","south_west"]],["west",["north_east","south_east"]],["north",["south_west","south_east"]],["south",["north_west","north_east"]],["center",[]]]);function v(e,t){return e==="north_west"?{aroundDirection:"north_west",left:t.left,right:100,top:t.top,bottom:t.top}:e==="south_west"?{aroundDirection:"south_west",left:t.left,right:100,top:t.top,bottom:t.bottom}:t}function Y(e,t){return e==="north_east"?{left:100,right:t.right,top:t.top,bottom:t.top}:e==="south_east"?{left:100,right:t.right,top:t.top,bottom:t.bottom}:t}function z(e,t){return e==="south_west"?{left:t.left,right:t.right,top:100,bottom:t.top}:e==="south_east"?{left:t.left,right:t.right,top:100,bottom:t.bottom}:t}function X(e,t){return e==="north_west"?{left:t.left,right:t.right,top:t.top,bottom:100}:e==="north_east"?{left:t.left,right:t.right,top:t.top,bottom:100}:t}function l(e,t){return t}const D=new Map([["east",v],["west",Y],["north",z],["south",X],["center",l]]);function H(e,t,c,P){const u=t.x-e.x,i=t.y-e.y,U=u>=0?"east":"west",j=i>=0?"south":"north",ne=`${j}_${U}`,ie=(g.get(c)||[]).includes(ne),se=D.get(c),B=ie?se(ne,I):I,h=Math.abs(u),W=Math.abs(i),G=a.get(`${j}_${U}`),[Q,de,oe]=G(h,W,ie,B,c,ne,P),ge=U==="west"?oe.x<0?Math.abs(oe.x):0:oe.x>0?oe.x:0,ce=B.left+B.right+h+ge,ue=j==="north"?oe.y<0?Math.abs(oe.y):0:oe.y>0?oe.y:0,ae=B.top+B.bottom+W+ue,pe=U==="east"?e.x-B.left:e.x+B.right-ce,ye=j==="south"?e.y-B.top:e.y+B.bottom-ae,he=U==="east"?B.left:ce-B.right,me=j==="north"?ae-B.bottom:B.top,Ae=U==="west"?oe.x<0?Math.abs(oe.x):0:oe.x<0?ce:ce-oe.x,Ne=j==="north"?oe.y<0?Math.abs(oe.y):0:oe.y<0?ae:ae-oe.y;return{width:ce,height:ae,left:pe,top:ye,startPoinInBoundray:{x:he,y:me},firstControlPoint:Q,secondControlPoint:de,endPoinInBoundray:{x:Ae,y:Ne}}}function $(e,t,c,P,u){e.style.position="absolute",e.style.alignItems="center",e.style.left=`${t}px`,e.style.top=`${c}px`,e.style.width=P+"px",e.style.height=u+"px"}function re(e,t,c,P,u,i,U){const j=e.childNodes[0];j.setAttribute("width",String(t)),j.setAttribute("height",String(c)),e.appendChild(j);const ne=j.childNodes[0],L=`${P.x} ${P.y}`,ie=`${u.x} ${u.y}`,se=`${i.x} ${i.y}`,B=`${U.x} ${U.y}`,h="M ".concat(L).concat(" C ").concat(ie).concat(","+se+",").concat(B);ne.setAttribute("d",h),ne.setAttribute("fill","none"),ne.setAttribute("stroke","#4d53e8"),ne.setAttribute("stroke-width","2"),ne.setAttribute("class","")}function J(e,t,c,P,u){const{width:i,height:U,left:j,top:ne,startPoinInBoundray:L,firstControlPoint:ie,secondControlPoint:se,endPoinInBoundray:B}=H(t,c,P,u);$(e,j,ne,i,U),re(e,i,U,L,ie,se,B)}function p(e,t,c,P,u){const i=d(e);J(i,t,c,P,u)}function K(e){return Number(e.replace("px",""))}function y(e){if(e!==null){const t=e.parentNode,c=K(t.style.left),P=K(t.style.top);return{x:c+e.offsetLeft+e.offsetWidth/2,y:P+e.offsetTop+e.offsetHeight/2}}return{x:0,y:0}}function T(e,t){const c=document.getElementById(e),P=document.getElementById(t),u=y(c),i=y(P),U=u.x+2,j=u.y,ne=i.x-2,L=i.y;return{startPoint:{x:U,y:j},endPoint:{x:ne,y:L}}}function M(e,t,c,P){const{startPoint:u,endPoint:i}=T(e,t);p(`${e}_${t}`,u,i,c,P)}return{connect:M,drawing:p}}function Jt(F){const Z=s.ref(),O=s.ref(0),I=s.ref(0),_=s.ref({x:0,y:0}),m=s.ref(),{drawing:b}=F;function C(v){return Number(v.replace("px",""))}function d(v){return(v&&v.className&&v.className.split?v.className.split(" "):[]).includes("f-flow-ancher")}function A(v){switch((v?v.className.split(" "):[]).find(X=>X.startsWith("circle-"))||""){case"circle-left":return"west";case"circle-right":return"east";case"circle-top":return"north";case"circle-bottom":return"south";default:return"center"}}function w(v,Y,z){const X=z.getBoundingClientRect();O.value=X.left,I.value=X.top,_.value={x:v,y:Y},Z.value=A(z)}function S(v){var $;const Y=v.clientX-O.value,z=v.clientY-I.value,X=_.value.x+Y,l=_.value.y+z,D=v.target,H=D&&typeof D.className=="string"&&d(D)?A(D):"center";b(`${($=m.value)==null?void 0:$.id}_curve_to`,{x:_.value.x,y:_.value.y},{x:X,y:l},Z.value,H)}function f(v){const Y=document.getElementById(v);Y&&Y.remove()}function n(){document.addEventListener("mousemove",S)}function o(){document.removeEventListener("mousemove",S)}function a(v){m.value=void 0,o()}function g(v,Y){m.value=document.getElementById(v);const z=m.value.offsetParent,X=m.value.getBoundingClientRect(),l=z.getBoundingClientRect(),D=C(z.style.left)+(X.left-l.left),H=C(z.style.top)+(X.top-l.top),$=D+X.width/2,re=H+X.height/2;w($,re,m.value),n()}return{drawFrom:g,eraseDrawingLine:f,finishToDraw:a,getAncherPointPosition:A,isAncherPoint:d}}const Zt={id:{type:String,default:""},type:{type:String,default:""},modelValue:{type:Object},x:{type:Number,default:0},y:{type:Number,default:0},connection:{type:Array,default:[]}},Se=s.ref(0);function en(F,Z){const O=Z.getBoundingClientRect(),I=F.getBoundingClientRect(),_=I.top>=O.top,m=I.top<=O.bottom;return _&&m}function Re(F){if(!F)return;let Z;if(F.className.includes("dgComponentSelected")?Z=F:Z=F.querySelector(".dgComponentSelected"),!Z)return;const O=Z.getBoundingClientRect();if(O.width===0&&O.height===0)return;const I=Z.querySelector(".component-btn-group");if(I){if(!en(Z,F)){I.style.display="none";return}I.style.display="";const m=I.getBoundingClientRect(),b=I.querySelector("div");if(b){const C=b.getBoundingClientRect();b.style.top=m.top+"px",b.style.left=m.left-C.width+"px"}}}const tn={modelValue:{type:Object,default:{}},componentId:{type:String,default:""}};var be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nn(F){return F&&F.__esModule&&Object.prototype.hasOwnProperty.call(F,"default")?F.default:F}function Te(F){throw new Error('Could not dynamically require "'+F+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var je={exports:{}};(function(F,Z){(function(O){F.exports=O()})(function(){return function(){function O(I,_,m){function b(A,w){if(!_[A]){if(!I[A]){var S=typeof Te=="function"&&Te;if(!w&&S)return S(A,!0);if(C)return C(A,!0);var f=new Error("Cannot find module '"+A+"'");throw f.code="MODULE_NOT_FOUND",f}var n=_[A]={exports:{}};I[A][0].call(n.exports,function(o){var a=I[A][1][o];return b(a||o)},n,n.exports,O,I,_,m)}return _[A].exports}for(var C=typeof Te=="function"&&Te,d=0;d<m.length;d++)b(m[d]);return b}return O}()({1:[function(O,I,_){var m={},b="(?:^|\\s)",C="(?:\\s|$)";function d(S){var f=m[S];return f?f.lastIndex=0:m[S]=f=new RegExp(b+S+C,"g"),f}function A(S,f){var n=S.className;n.length?d(f).test(n)||(S.className+=" "+f):S.className=f}function w(S,f){S.className=S.className.replace(d(f)," ").trim()}I.exports={add:A,rm:w}},{}],2:[function(O,I,_){(function(m){var b=O("contra/emitter"),C=O("crossvent"),d=O("./classes"),A=document,w=A.documentElement;function S(p,K){var y=arguments.length;y===1&&Array.isArray(p)===!1&&(K=p,p=[]);var T,M,e,t,c,P,u,i,U,j=null,ne,L,ie=!1,se=0,B,h=K||{};h.moves===void 0&&(h.moves=Y),h.accepts===void 0&&(h.accepts=Y),h.invalid===void 0&&(h.invalid=Ae),h.containers===void 0&&(h.containers=p||[]),h.isContainer===void 0&&(h.isContainer=v),h.copy===void 0&&(h.copy=!1),h.copySortSource===void 0&&(h.copySortSource=!1),h.revertOnSpill===void 0&&(h.revertOnSpill=!1),h.removeOnSpill===void 0&&(h.removeOnSpill=!1),h.direction===void 0&&(h.direction="vertical"),h.ignoreInputTextSelection===void 0&&(h.ignoreInputTextSelection=!0),h.mirrorContainer===void 0&&(h.mirrorContainer=A.body);var W=b({containers:h.containers,start:he,end:Ne,cancel:Ue,remove:ze,destroy:ge,canMove:ye,dragging:!1});return h.removeOnSpill===!0&&W.on("over",gn).on("out",yn),Q(),W;function G(r){return W.containers.indexOf(r)!==-1||h.isContainer(r)}function Q(r){var x=r?"remove":"add";o(w,x,"mousedown",ue),o(w,x,"mouseup",Oe)}function de(r){var x=r?"remove":"add";o(w,x,"mousemove",ae)}function oe(r){var x=r?"remove":"add";C[x](w,"selectstart",ce),C[x](w,"click",ce)}function ge(){Q(!0),Oe({})}function ce(r){ne&&r.preventDefault()}function ue(r){t=r.clientX,c=r.clientY;var x=a(r)!==1||r.metaKey||r.ctrlKey;if(!x){var N=r.target,R=pe(N);R&&(ne=R,de(),r.type==="mousedown"&&(D(N)?N.focus():r.preventDefault()))}}function ae(r){if(ne){if(a(r)===0){Oe({});return}if(!(r.clientX!==void 0&&Math.abs(r.clientX-t)<=(h.slideFactorX||0)&&r.clientY!==void 0&&Math.abs(r.clientY-c)<=(h.slideFactorY||0))){if(h.ignoreInputTextSelection){var x=J("clientX",r)||0,N=J("clientY",r)||0,R=A.elementFromPoint(x,N);if(D(R))return}var ee=ne;de(!0),oe(),Ne(),me(ee),d.add(i||e,"gu-transit"),Cn(),hn(),se=0,_e(r)}}}function pe(r){if(!(W.dragging&&T)&&!G(r)){for(var x=r;l(r)&&G(l(r))===!1;)if(h.invalid(r,x)||(r=l(r),!r))return;var N=l(r);if(N&&!h.invalid(r,x)){var R=h.moves(r,N,x,$(r));if(R)return{item:r,source:N}}}}function ye(r){return!!pe(r)}function he(r){var x=pe(r);x&&me(x)}function me(r){Nn(r.item,r.source)&&(i=r.item.cloneNode(!0),W.emit("cloned",i,r.item,"copy")),M=r.source,e=r.item,P=u=$(r.item),W.dragging=!0,W.emit("drag",e,M)}function Ae(){return!1}function Ne(){if(W.dragging){var r=i||e;Ye(r,l(r))}}function De(){ne=!1,de(!0),oe(!0)}function Oe(r){if(De(),!!W.dragging){var x=i||e,N=J("clientX",r)||0,R=J("clientY",r)||0,ee=g(T,N,R),te=He(ee,N,R);te&&(i&&h.copySortSource||!i||te!==M)?Ye(x,te):h.removeOnSpill?ze():Ue()}}function Ye(r,x){var N=l(r);i&&h.copySortSource&&x===M&&N.removeChild(e),Be(x)?W.emit("cancel",r,M):W.emit("drop",r,x,M,u),Me()}function ze(){if(W.dragging){var r=i||e,x=l(r);x&&x.removeChild(r),W.emit(i?"cancel":"remove",r,x,M),Me()}}function Ue(r){if(W.dragging){var x=arguments.length>0?r:h.revertOnSpill,N=i||e,R=l(N),ee=Be(R);ee===!1&&x&&(i?R&&R.removeChild(i):M.insertBefore(N,P)),ee||x?W.emit("cancel",N,M,M):W.emit("drop",N,R,M,u),Me()}}function Me(){var r=i||e;De(),wn(),xn(),r&&d.rm(r,"gu-transit"),U&&clearTimeout(U),W.dragging=!1,j&&W.emit("out",r,j,M),W.emit("dragend",r,se),M=e=i=P=u=U=j=null}function Be(r,x){var N;return x!==void 0?N=x:T?N=u:N=$(i||e),r===M&&N===P}function He(r,x,N){for(var R=r;R&&!ee();)R=l(R);return R;function ee(){var te=G(R);if(te===!1)return!1;var xe=We(R,r),ve=Ge(R,xe,x,N),we=Be(R,ve);return we?!0:h.accepts(e,R,M,ve)}}function _e(r){if(!T)return;r.preventDefault();var x=J("clientX",r)||0,N=J("clientY",r)||0;T.style.left=x-2+"px",T.style.top=N-2+"px";var R=i||e,ee=g(T,x,N),te=He(ee,x,N),xe=te!==null&&te!==j;(xe||te===null)&&(Ce(),j=te,Ie()),Tn(ee,N);var ve=l(R);if(te===M&&i&&!h.copySortSource){ve&&ve.removeChild(R);return}var we,Pe=We(te,ee);if(ie=bn(Pe,te),Pe!==null)we=Ge(te,Pe,x,N);else if(h.revertOnSpill===!0&&!i)we=P,te=M;else{i&&ve&&ve.removeChild(R),i&&L&&(L.style.display="none");return}L.style.display="block",vn(we,R,xe),we?In(Pe,we):Sn(te);function le(fe){W.emit(fe,R,j,M)}function Ie(){xe&&le("over")}function Ce(){j&&le("out")}}function vn(r,x,N){(r===x||r===$(x))&&(u=$(x)),(r===null&&N||r!==x&&r!==$(x))&&(u=r)}function gn(r){d.rm(r,"gu-hide")}function yn(r){W.dragging&&d.add(r,"gu-hide")}function hn(){T||(T=document.createElement("div"),T.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;",T.innerHTML=h.getMirrorText&&h.getMirrorText(e)||"控件",d.add(T,"gu-mirror"),h.mirrorContainer.appendChild(T),o(w,"add","mousemove",_e),d.add(h.mirrorContainer,"gu-unselectable"),W.emit("cloned",T,e,"mirror"))}function Cn(){if(L=document.createElement("div"),d.add(L,"gu-insertion"),e){var r=e.getBoundingClientRect();L.style.left=r.left+"px",L.style.top=r.top+"px"}ie=!1,h.mirrorContainer.appendChild(L)}function wn(){T&&(d.rm(h.mirrorContainer,"gu-unselectable"),o(w,"remove","mousemove",_e),l(T).removeChild(T),T=null)}function xn(){L&&(l(L).removeChild(L),L=null)}function We(r,x){for(var N=x;N!==r&&l(N)!==r;)N=l(N);return N===w?null:N}function bn(r,x){if(!x)return ie;var N=r||x&&x.lastElementChild;if(!N)return!0;var R=getComputedStyle(r),ee=/^inline/.test(R.getPropertyValue("display"))||/^(left|right)$/.test(R.getPropertyValue("float"));if(ee)return!0;if(x){var te=getComputedStyle(x),xe=te.getPropertyValue("display");if(/flex$/.test(xe)){var ve=te.getPropertyValue("flex-direction")||"row";if(ve==="row"||ve==="row-reverse")return!Pn(x)}return!1}return!0}function Pn(r){if(!r.children||!r.children.length)return!1;for(const x of Array.from(r.children)){const R=(x.className&&x.className.split(" ")||[]).filter(ee=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ee));if(!R.length)return!1;for(const ee of R){const te=ee.slice(ee.lastIndexOf("-")+1);if(parseInt(te,10)!==12)return!1}}return!0}function In(r,x){const N=x.getBoundingClientRect();if(L.style.left=N.left+"px",L.style.top=N.top+"px",ie){if(L.style.height=N.height+"px",L.style.width="4px",r){const R=r.getBoundingClientRect();R.top!==N.top&&(L.style.left=R.right+"px",L.style.top=R.top+"px",L.style.height=R.height+"px")}}else if(L.style.height="4px",L.style.width=N.width+"px",B){const R=B.getBoundingClientRect();N.top<R.top&&(L.style.display="none")}x===e&&e&&(L.style.display="none")}function Sn(r){u=null;var x=r.lastElementChild;if(x){var N=x.getBoundingClientRect();ie?(L.style.left=N.right+"px",L.style.top=N.top+"px",L.style.height=N.height+"px",L.style.width="4px"):(L.style.left=N.left+"px",L.style.top=N.bottom+"px",L.style.height="4px",L.style.width=N.width+"px"),x===e&&e&&(L.style.display="none")}else L.style.display="none"}function Tn(r,x){if(!h.mirrorContainer.contains(r)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(B=f(r),!B||!B.contains(r)))return;const N=document.querySelector(".dgComponentSelected"),R=B.getBoundingClientRect();if(x-30<R.top&&B.scrollTop>0){let ee=B.scrollTop<10?B.scrollTop:10;B.scrollBy(0,-1*ee),N&&B.contains(N)&&(se=se+-1*ee)}if(x+30>R.bottom&&B.scrollTop<B.scrollHeight-B.clientHeight){const ee=B.scrollHeight-B.clientHeight-B.scrollTop;let te=ee<10?ee:10;B.scrollBy(0,te),N&&B.contains(N)&&(se=se+te)}}function Ge(r,x,N,R){var ee=h.direction==="horizontal",te=h.direction==="mixed",xe=x!==r?we():ve();return xe;function ve(){var le=r.children.length,Ie,Ce,fe;for(Ie=0;Ie<le;Ie++)if(Ce=r.children[Ie],fe=Ce.getBoundingClientRect(),ee&&fe.left+fe.width/2>N||!te&&!ee&&fe.top+fe.height/2>R||te&&fe.left+fe.width>N&&fe.top+fe.height>R)return Ce;return null}function we(){var le=x.getBoundingClientRect();if(te){var Ie=R-le.top,Ce=N-le.left,fe=le.bottom-R,Ve=le.right-N,qe=Math.min(Ce,Ve,Ie,fe),ke;return ie?ke=Ve<Ce:ke=fe===qe||Ve===qe||Ce===qe,Pe(ke)}return Pe(ee?N>le.left+z(le)/2:R>le.top+X(le)/2)}function Pe(le){return le?$(x):x}}function Nn(r,x){return typeof h.copy=="boolean"?h.copy:h.copy(r,x)}}function f(p){const K=Array.from(window.scrollContainerList);if(K.length===1){const T=Array.from(window.scrollContainerList)[0];return document.getElementById(T)}const y=n(K);for(const T of y)if(T.contains(p))return T;return null}function n(p){const K=[];return p.forEach(y=>{const T=document.getElementById(y);T&&K.push(T)}),K.sort((y,T)=>y.contains(T)?1:T.contains(y)?-1:0),K}function o(p,K,y,T){var M={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},e={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},t={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};m.navigator.pointerEnabled?C[K](p,e[y],T):m.navigator.msPointerEnabled?C[K](p,t[y],T):(C[K](p,M[y],T),C[K](p,y,T))}function a(p){if(p.touches!==void 0)return p.touches.length;if(p.which!==void 0&&p.which!==0)return p.which;if(p.buttons!==void 0)return p.buttons;var K=p.button;if(K!==void 0)return K&1?1:K&2?3:K&4?2:0}function g(p,K,y){p=p||{};var T=p.className||"",M;return p.className+=" gu-hide",M=A.elementFromPoint(K,y),p.className=T,M}function v(){return!1}function Y(){return!0}function z(p){return p.width||p.right-p.left}function X(p){return p.height||p.bottom-p.top}function l(p){return p.parentNode===A?null:p.parentNode}function D(p){return p.tagName==="INPUT"||p.tagName==="TEXTAREA"||p.tagName==="SELECT"||H(p)}function H(p){return!p||p.contentEditable==="false"?!1:p.contentEditable==="true"?!0:H(l(p))}function $(p){return p.nextElementSibling||K();function K(){var y=p;do y=y.nextSibling;while(y&&y.nodeType!==1);return y}}function re(p){return p.targetTouches&&p.targetTouches.length?p.targetTouches[0]:p.changedTouches&&p.changedTouches.length?p.changedTouches[0]:p}function J(p,K){var y=re(K),T={pageX:"clientX",pageY:"clientY"};return p in T&&!(p in y)&&T[p]in y&&(p=T[p]),y[p]}I.exports=S}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(O,I,_){I.exports=function(b,C){return Array.prototype.slice.call(b,C)}},{}],4:[function(O,I,_){var m=O("ticky");I.exports=function(C,d,A){C&&m(function(){C.apply(A||null,d||[])})}},{ticky:10}],5:[function(O,I,_){var m=O("atoa"),b=O("./debounce");I.exports=function(d,A){var w=A||{},S={};return d===void 0&&(d={}),d.on=function(f,n){return S[f]?S[f].push(n):S[f]=[n],d},d.once=function(f,n){return n._once=!0,d.on(f,n),d},d.off=function(f,n){var o=arguments.length;if(o===1)delete S[f];else if(o===0)S={};else{var a=S[f];if(!a)return d;a.splice(a.indexOf(n),1)}return d},d.emit=function(){var f=m(arguments);return d.emitterSnapshot(f.shift()).apply(this,f)},d.emitterSnapshot=function(f){var n=(S[f]||[]).slice(0);return function(){var o=m(arguments),a=this||d;if(f==="error"&&w.throws!==!1&&!n.length)throw o.length===1?o[0]:o;return n.forEach(function(v){w.async?b(v,o,a):v.apply(a,o),v._once&&d.off(f,v)}),d}},d}},{"./debounce":4,atoa:3}],6:[function(O,I,_){(function(m){var b=O("custom-event"),C=O("./eventmap"),d=m.document,A=f,w=o,S=[];m.addEventListener||(A=n,w=a),I.exports={add:A,remove:w,fabricate:g};function f(l,D,H,$){return l.addEventListener(D,H,$)}function n(l,D,H){return l.attachEvent("on"+D,Y(l,D,H))}function o(l,D,H,$){return l.removeEventListener(D,H,$)}function a(l,D,H){var $=z(l,D,H);if($)return l.detachEvent("on"+D,$)}function g(l,D,H){var $=C.indexOf(D)===-1?J():re();l.dispatchEvent?l.dispatchEvent($):l.fireEvent("on"+D,$);function re(){var p;return d.createEvent?(p=d.createEvent("Event"),p.initEvent(D,!0,!0)):d.createEventObject&&(p=d.createEventObject()),p}function J(){return new b(D,{detail:H})}}function v(l,D,H){return function(re){var J=re||m.event;J.target=J.target||J.srcElement,J.preventDefault=J.preventDefault||function(){J.returnValue=!1},J.stopPropagation=J.stopPropagation||function(){J.cancelBubble=!0},J.which=J.which||J.keyCode,H.call(l,J)}}function Y(l,D,H){var $=z(l,D,H)||v(l,D,H);return S.push({wrapper:$,element:l,type:D,fn:H}),$}function z(l,D,H){var $=X(l,D,H);if($){var re=S[$].wrapper;return S.splice($,1),re}}function X(l,D,H){var $,re;for($=0;$<S.length;$++)if(re=S[$],re.element===l&&re.type===D&&re.fn===H)return $}}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(O,I,_){(function(m){var b=[],C="",d=/^on/;for(C in m)d.test(C)&&b.push(C.slice(2));I.exports=b}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(O,I,_){(function(m){var b=m.CustomEvent;function C(){try{var d=new b("cat",{detail:{foo:"bar"}});return d.type==="cat"&&d.detail.foo==="bar"}catch{}return!1}I.exports=C()?b:typeof document<"u"&&typeof document.createEvent=="function"?function(A,w){var S=document.createEvent("CustomEvent");return w?S.initCustomEvent(A,w.bubbles,w.cancelable,w.detail):S.initCustomEvent(A,!1,!1,void 0),S}:function(A,w){var S=document.createEventObject();return S.type=A,w?(S.bubbles=!!w.bubbles,S.cancelable=!!w.cancelable,S.detail=w.detail):(S.bubbles=!1,S.cancelable=!1,S.detail=void 0),S}}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(O,I,_){var m=I.exports={},b,C;function d(){throw new Error("setTimeout has not been defined")}function A(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?b=setTimeout:b=d}catch{b=d}try{typeof clearTimeout=="function"?C=clearTimeout:C=A}catch{C=A}})();function w(X){if(b===setTimeout)return setTimeout(X,0);if((b===d||!b)&&setTimeout)return b=setTimeout,setTimeout(X,0);try{return b(X,0)}catch{try{return b.call(null,X,0)}catch{return b.call(this,X,0)}}}function S(X){if(C===clearTimeout)return clearTimeout(X);if((C===A||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(X);try{return C(X)}catch{try{return C.call(null,X)}catch{return C.call(this,X)}}}var f=[],n=!1,o,a=-1;function g(){!n||!o||(n=!1,o.length?f=o.concat(f):a=-1,f.length&&v())}function v(){if(!n){var X=w(g);n=!0;for(var l=f.length;l;){for(o=f,f=[];++a<l;)o&&o[a].run();a=-1,l=f.length}o=null,n=!1,S(X)}}m.nextTick=function(X){var l=new Array(arguments.length-1);if(arguments.length>1)for(var D=1;D<arguments.length;D++)l[D-1]=arguments[D];f.push(new Y(X,l)),f.length===1&&!n&&w(v)};function Y(X,l){this.fun=X,this.array=l}Y.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={};function z(){}m.on=z,m.addListener=z,m.once=z,m.off=z,m.removeListener=z,m.removeAllListeners=z,m.emit=z,m.prependListener=z,m.prependOnceListener=z,m.listeners=function(X){return[]},m.binding=function(X){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(X){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},{}],10:[function(O,I,_){(function(m){var b=typeof m=="function",C;b?C=function(d){m(d)}:C=function(d){setTimeout(d,0)},I.exports=C}).call(this,O("timers").setImmediate)},{timers:11}],11:[function(O,I,_){(function(m,b){var C=O("process/browser.js").nextTick,d=Function.prototype.apply,A=Array.prototype.slice,w={},S=0;_.setTimeout=function(){return new f(d.call(setTimeout,window,arguments),clearTimeout)},_.setInterval=function(){return new f(d.call(setInterval,window,arguments),clearInterval)},_.clearTimeout=_.clearInterval=function(n){n.close()};function f(n,o){this._id=n,this._clearFn=o}f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},_.enroll=function(n,o){clearTimeout(n._idleTimeoutId),n._idleTimeout=o},_.unenroll=function(n){clearTimeout(n._idleTimeoutId),n._idleTimeout=-1},_._unrefActive=_.active=function(n){clearTimeout(n._idleTimeoutId);var o=n._idleTimeout;o>=0&&(n._idleTimeoutId=setTimeout(function(){n._onTimeout&&n._onTimeout()},o))},_.setImmediate=typeof m=="function"?m:function(n){var o=S++,a=arguments.length<2?!1:A.call(arguments,1);return w[o]=!0,C(function(){w[o]&&(a?n.apply(null,a):n.call(null),_.clearImmediate(o))}),o},_.clearImmediate=typeof b=="function"?b:function(n){delete w[n]}}).call(this,O("timers").setImmediate,O("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(je);var on=je.exports;const Xe=nn(on);function rn(){let F;function Z(n,o,a){const g={};return g.sourceElement=n,g.sourceContainer=a,g.targetContainer=o,g.sourceType=n.getAttribute("data-sourceType")||"move",g.controlType=n.getAttribute("data-controlType"),g.controlTypeName=n.getAttribute("data-controlTypeName"),g.controlCategory=n.getAttribute("data-category"),g.controlFeature=n.getAttribute("data-feature"),g.parentComponentInstance=o.componentInstance,g.controlCategory==="input"?g.bindingType="field":g.controlCategory==="dataCollection"&&(g.bindingType="entity"),n.componentInstance&&(g.controlType=n.componentInstance.value.schema.type,g.controlCategory=n.componentInstance.value.schema.category),g}function O(n,o,a){if(n.contains(o)||o.classList.contains("no-drop"))return!1;const g=!0;if(n.componentInstance&&n.componentInstance.value.getDragScopeElement){const v=n.componentInstance.value.getDragScopeElement();if(v&&!v.contains(o))return!1}if(o.componentInstance&&o.componentInstance.value.canAccepts){const v=Z(n,o,a);return o.componentInstance.value.canAccepts(v)}return g}function I(n,o){const a=o.getBoundingClientRect(),g=n.getBoundingClientRect(),v=g.top>=a.top,Y=g.top<a.bottom;return v&&Y}function _(n,o){const a=n.querySelector(".dgComponentSelected");if(!(!a||o===0)&&I(a,n)){const g=a.querySelector(".component-btn-group");if(g){const v=g.querySelector("div");if(v&&v.style.top){const Y=Number.parseFloat(v.style.top);v.style.top=Y-o+"px"}}}}function m(n,o,a){n.componentInstance;let g=-1;if(!o)return-1;if(n.componentInstance.value.contents){if(a&&a.componentInstance){if(a.getAttribute("data-noattach"))g=Number(a.getAttribute("data-position"));else{const v=a.componentInstance.value.schema;let Y={id:v.id};v.type==="Component"&&(Y={component:v.id}),g=Ee.findIndex(n.componentInstance.value.contents,Y),g=g===-1?0:g}g!==-1&&n.componentInstance.value.contents.splice(g,0,o)}else n.componentInstance.value.contents.push(o);n.componentInstance.value.updateDragAndDropRules()}return g}function b(n,o){if(!n.componentInstance.value.contents)return-1;if(n.componentInstance.value.contents.length===0)return 0;if(!o||!o.componentInstance)return n.componentInstance.value.contents.length;if(o.getAttribute("data-noattach"))return Number(o.getAttribute("data-position"));const a=o.componentInstance.value.schema;let g;a.type==="Component"?g={component:a.id}:g={id:a.id};let v=Ee.findIndex(n.componentInstance.value.contents,g);return v=v===-1?0:v,v}function C(n,o,a,g){if(o.componentInstance.value.addNewChildComponentSchema){const v=b(o,g),Y=String(n.getAttribute("data-controltype")),z=n.getAttribute("data-feature"),X=String(n.innerText),l=o.componentInstance.value,D={componentType:Y,label:X,parentComponentInstance:l,targetPosition:v},H=z?JSON.parse(z):{},$=Object.assign(D,H),re=o.componentInstance.value.addNewChildComponentSchema($);m(o,re,g)}o.contains(n)&&o.removeChild(n)}function d(n,o,a,g){let v,Y=-1;if(n.componentInstance&&n.componentInstance.value.triggerBelongedComponentToMoveWhenMoved){const l=n.componentInstance.value.getBelongedComponentInstance(n.componentInstance);l&&(n=s.ref(l.elementRef).value.parentElement,a=n.parentElement)}const z=n.componentInstance&&n.componentInstance.value.schema,X={id:z&&z.id};Y=Ee.findIndex(a.componentInstance.value.contents,X),Y!==-1&&a.componentInstance.value.contents&&(v=a.componentInstance.value.contents.splice(Y,1),v=v[0]),m(o,v,g),a.componentInstance&&a.componentInstance.value.onChildElementMovedOut&&a.componentInstance.value.onChildElementMovedOut(n),o.componentInstance&&o.componentInstance.value.onAcceptMovedChildElement&&o.componentInstance.value.onAcceptMovedChildElement(n,a)}function A(n,o,a,g){if(!o||n.contains(o))return;switch(n.getAttribute("data-sourceType")){case"control":case"field":case"entity":{C(n,o,a,g);break}default:a.componentInstance.value.contents?d(n,o,a,g):o.contains(n)&&o.removeChild(n)}Se.value++}function w(n){F&&F.destroy(),Xe&&(F=Xe([],{mirrorContainer:n,direction:"mixed",revertOnSpill:!0,moves(o,a,g){let v=!0;return o.classList.contains("no-drag")&&(v=!1),o.componentInstance&&(v=!!g.getAttribute("data-dragging-icon")),v},copy(o){return o.classList.contains("drag-copy")},getMirrorText(o){return o.componentInstance&&o.componentInstance.value.getDraggingDisplayText?o.componentInstance.value.getDraggingDisplayText():o.innerText||"控件"},accepts(o,a,g){const v=O(o,a,g),Y=n.lastElementChild;return v?Y.className=Y.className.replace("undroppable",""):Y.className.includes("undroppable")||(Y.className+=" undroppable"),v}}).on("over",(o,a)=>{a.className+=" drag-over"}).on("out",(o,a)=>{a.className=a.className.replace("drag-over","").replace(" ","")}).on("drop",(o,a,g,v)=>{A(o,a,g,v)}).on("dragend",(o,a)=>{_(o,a)}))}function S(n,o){if(!n)return;if(o.noDragDrop)return n;const a=n.querySelector(`[data-dragref='${o.id}-container']`)||n;F&&a&&F.containers.push(a)}function f(){if(!F)return;const n=document.getElementsByClassName("controlCategory");n&&(F.containers=F.containers.filter(o=>!o.className.includes("controlCategory")),Array.from(n).forEach(o=>{F.containers.push(o)}))}return{attachComponents:S,attachToolbox:f,initializeDragula:w}}const sn={id:{type:String,default:""},componentId:{type:String,default:""},type:{type:String,default:""},canDelete:{type:Boolean,default:!0},canMove:{type:Boolean,default:!0},canSelectParent:{type:Boolean,default:!0},customButtons:{type:Array,default:[]},customClass:{type:String,default:""},customStyle:{type:String,default:""},modelValue:{type:Object},ignore:{type:Boolean,default:!1}},V={},q={},k={};let $e=!1;function an(){$e||($e=!0,Qe.registerDesigner(V,q,k),Ke.registerDesigner(V,q,k),Je.registerDesigner(V,q,k),Ze.registerDesigner(V,q,k),et.registerDesigner(V,q,k),tt.registerDesigner(V,q,k),nt.registerDesigner(V,q,k),ot.registerDesigner(V,q,k),rt.registerDesigner(V,q,k),it.registerDesigner(V,q,k),st.registerDesigner(V,q,k),at.registerDesigner(V,q,k),ct.registerDesigner(V,q,k),ut.registerDesigner(V,q,k),ft.registerDesigner(V,q,k),lt.registerDesigner(V,q),dt.registerDesigner(V,q,k),pt.registerDesigner(V,q,k),mt.registerDesigner(V,q,k),vt.registerDesigner(V,q,k),yt.registerDesigner(V,q,k),gt.registerDesigner(V,q,k),Ct.registerDesigner(V,q,k),ht.registerDesigner(V,q,k),xt.registerDesigner(V,q,k),wt.registerDesigner(V,q,k),bt.registerDesigner(V,q,k),Pt.registerDesigner(V,q,k),It.registerDesigner(V,q,k),St.registerDesigner(V,q,k),Tt.registerDesigner(V,q,k),Nt.registerDesigner(V,q,k),Ot.registerDesigner(V,q,k),At.registerDesigner(V,q,k),Dt.registerDesigner(V,q,k),Ft.registerDesigner(V,q,k),Et.registerDesigner(V,q,k),Mt.registerDesigner(V,q,k),Bt.registerDesigner(V,q,k),_t.registerDesigner(V,q,k),Vt.registerDesigner(V,q,k),qt.registerDesigner(V,q,k),kt.registerDesigner(V,q,k),Lt.registerDesigner(V,q,k),Rt.registerDesigner(V,q,k),jt.registerDesigner(V,q,k),Ht.registerDesigner(V,q,k),Xt.registerDesigner(V,q,k),$t.registerDesigner(V,q,k),Yt.registerDesigner(V,q,k),zt.registerDesigner(V,q,k),Ut.registerDesigner(V,q,k),Wt.registerDesigner(V,q),Gt.registerDesigner(V,q,k),Kt.registerDesigner(V,q,k))}const cn={id:{type:String}},un=s.defineComponent({name:"FDesignerPlaceholder",props:cn,emits:[],setup(F){const Z=s.computed(()=>({"drag-and-drop-alert":!0,alert:!0,"alert-info":!0,"no-drag":!0,"w-100":!0})),O=s.computed(()=>({height:"60px",display:"flex","justify-content":"center","align-items":"center",margin:0}));return()=>s.createVNode("div",{class:Z.value,style:O.value,role:"alert","data-noattach":"true","data-position":"0"},[s.createTextVNode("拖拽组件到这里")])}});function ln(F){return typeof F=="function"||Object.prototype.toString.call(F)==="[object Object]"&&!s.isVNode(F)}const Fe=s.defineComponent({name:"FDesignerItem",props:sn,emits:["selectionChange"],setup(F,Z){const O=s.ref(`${F.modelValue.id}-component`),I=s.ref(F.canMove),_=s.ref(F.canDelete),m=s.ref(!1),b=s.ref(F.modelValue),C=s.ref(F.componentId||""),d=s.ref(""),A=s.ref(""),w=s.ref(),S=s.inject("canvas-dragula"),f=s.ref(),n=s.inject("design-item-context"),o={designerItemElementRef:w,componentInstance:f,schema:b.value,parent:n,setupContext:Z};s.provide("design-item-context",o);const a=s.inject("useFormSchema"),g=s.computed(()=>{const y=F.modelValue.appearance&&F.modelValue.appearance.class||"",T={"farris-component":!0,"flex-fill":b.value.id=="root-component","position-relative":I.value&&_.value,"farris-nested":m.value,"can-move":I.value,"d-none":w.value&&w.value.classList.contains("d-none")};return T[`farris-component-${b.value.type}`]=!0,y&&y.split(" ").reduce((M,e)=>(M[e]=!0,M),T),A.value&&A.value.split(" ").reduce((M,e)=>(M[e]=!0,M),T),T}),v=s.computed(()=>{const y={},T=F.modelValue.appearance&&F.modelValue.appearance.style||"";return T&&T.split(";").reduce((M,e)=>{const[t,c]=e.split(":");return M[t]=c,M},y),d.value&&d.value.split(";").reduce((M,e)=>{const[t,c]=e.split(":");return t&&(M[t]=c),M},y),y});function Y(y,T){var M,e,t;if(y&&(y.preventDefault(),y.stopPropagation()),f.value.triggerBelongedComponentToDeleteWhenDeleted){const c=f.value.getBelongedComponentInstance(f);if(c&&c.parent){const P=s.ref(c==null?void 0:c.parent),u=P.value.contents.findIndex(i=>i.id===c.schema.id);(e=(M=P.value)==null?void 0:M.contents)==null||e.splice(u,1),(t=P.value)==null||t.updateDragAndDropRules(),Se.value++}return}if(n&&n.schema.contents){const c=n.schema.contents.findIndex(P=>P.id===T.id);n.schema.contents.splice(c,1),n.componentInstance.value.updateDragAndDropRules(),Se.value++}}function z(y){return _.value&&s.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:T=>{Y(T,y)}},[s.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function X(){return I.value&&s.createVNode("div",{role:"button",class:"btn component-settings-button",title:"移动",ref:"moveComponent"},[s.createVNode("i",{"data-dragging-icon":"true",class:"cmp_move f-icon f-icon-yxs_move"},null)])}function l(){return F.customButtons&&!!F.customButtons.length&&F.customButtons.map(y=>s.createVNode("div",{role:"button",class:`btn component-settings-button ${y.class||""}`,title:y.title,ref:y.id},[s.createVNode("i",{class:y.icon},null)]))}function D(y){return s.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[s.createVNode("div",null,[z(y),X(),l()])])}function H(y,T,M,e){Z.emit("selectionChange",y,T,M,e)}function $(y){let T;const M=y.type,e=V[M],t=q[M],c=t?t(y):{};c.customClass=F.ignore?c.customClass:"",c.componentId=C.value;const P=y.contents&&y.contents.length===0;return y.contents&&!!y.contents.length&&e?s.createVNode(e,s.mergeProps({ref:f},c),ln(T=y.contents.map(i=>s.createVNode(Fe,{key:i.id,modelValue:i,"onUpdate:modelValue":U=>i=U,componentId:C.value,onSelectionChange:H},null)))?T:{default:()=>[T]}):e?P?s.createVNode(e,s.mergeProps({ref:f},c),{default:()=>[s.createVNode(un,null,null)]}):s.createVNode(e,s.mergeProps({ref:f},c),null):s.createVNode("div",null,null)}function re(y){if(y.type==="component-ref"){let M=a==null?void 0:a.getFormSchema().module.components.find(e=>e.id===y.component);if(M)return s.createVNode(Fe,{key:M.id,modelValue:M,"onUpdate:modelValue":e=>M=e,componentId:M.id,onSelectionChange:H},null)}}s.watch(()=>F.modelValue,y=>{b.value=y,O.value=`${y.id}-component`});function J(y){const T=y.target;Re(T)}function p(){var y,T;(T=(y=b.value)==null?void 0:y.contents)!=null&&T.length&&w.value&&w.value.addEventListener("scroll",J)}s.onMounted(()=>{if(w.value&&f.value&&f.value.schema){const y=w.value.querySelector(`[data-dragref='${f.value.schema.id}-container']`);S&&y&&S.attachComponents(y,b.value),m.value=f.value.canNested!==void 0?f.value.canNested:m.value,_.value=f.value.canDelete!==void 0?f.value.canDelete:_.value,I.value=f.value.canMove!==void 0?f.value.canMove:I.value,d.value=f.value.styles||"",A.value=f.value.designerClass||"",w.value&&(w.value.componentInstance=f,w.value.designItemContext=o)}p(),Se.value++}),s.onBeforeUnmount(()=>{w.value&&w.value.removeEventListener("scroll",J)});function K(y){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(M=>M.classList.remove("dgComponentFocused")),y&&(y.preventDefault(),y.stopPropagation());const T=w.value;if(T){const M=document.getElementsByClassName("dgComponentSelected");if(!(M&&M.length===1&&M[0]===w.value)&&(Array.from(M).forEach(t=>t.classList.remove("dgComponentSelected")),T.classList.add("dgComponentFocused"),Z.emit("selectionChange",b.value.type,b.value,C.value,f.value),f.value.getDraggableDesignItemElement)){const t=f.value.getDraggableDesignItemElement(o);t&&t.value&&t.value.classList.add("dgComponentSelected")}}J(y)}return()=>b.value.type==="component-ref"?re(b.value):s.createVNode("div",{id:`${b.value.id}-design-item`,ref:w,class:g.value,style:v.value,onClick:K},[D(b.value),$(b.value)])}}),fn=s.defineComponent({name:"FDesignerCanvas",props:tn,emits:["init","selectionChange","canvasChanged"],setup(F,Z){const O=s.ref(),I=s.ref(),_=s.ref(),m=s.ref(),b=s.ref(),C=rn(),d=s.ref(F.componentId);an(),s.provide("canvas-dragula",C),s.provide("design-item-context",{designerItemElementRef:m,componentInstance:b,schema:I.value,parent:void 0}),s.provide("designer-host-service",{eventsEditorUtils:s.inject("eventsEditorUtils"),formSchemaUtils:s.inject("useFormSchema"),formMetadataConverter:s.inject("formMetadataConverter"),designViewModelUtils:s.inject("designViewModelUtils"),controlCreatorUtils:s.inject("controlCreatorUtils"),metadataService:s.inject("Meatdata_Http_Service_Token"),schemaService:s.inject("schemaService")});const A=s.computed(()=>({"d-flex":!0,"flex-fill":!0,"flex-column":!0}));s.onMounted(()=>{_.value&&C.initializeDragula(_.value),O.value=F.modelValue,Z.emit("init",C)}),s.watch(Se,()=>{Re(_.value),Z.emit("canvasChanged")},{flush:"post"});function w(S,f,n,o){Z.emit("selectionChange",S,f,n,o)}return()=>s.createVNode("div",{class:"editorDiv flex-fill h-100"},[s.createVNode("div",{class:"editorPanel d-flex flex-fill flex-column PC"},[s.createVNode("div",{ref:_,class:A.value},[O.value&&s.createVNode(Fe,{modelValue:O.value,"onUpdate:modelValue":S=>O.value=S,onSelectionChange:w,componentId:d.value},null)])])])}}),dn=s.defineComponent({name:"FFlowNodeItem",props:Zt,emits:[],setup(F,Z){const O=s.ref(F.id),I=s.ref(F.modelValue),_=s.ref(),m=s.inject("use-drawing-bezier-composition"),{drawFrom:b,eraseDrawingLine:C,finishToDraw:d,getAncherPointPosition:A,isAncherPoint:w}=m,S=s.inject("use-bezier-curve-composition"),{connect:f}=S,n=s.inject("use-connections-composition"),{addConnection:o,getConnectionsOfNode:a}=n;new Map(F.connection);const g=s.computed(()=>({left:`${F.x}px`,top:`${F.y}px`}));function v(l,D){if(w(l)&&w(D)){const H=A(l),$=A(D);f(l.id,D.id,H,$);const re=l.id,J=D.id,p=re.split(/(-left-point|-right-point|-top-point|-bottom-point)/,1)[0],K=J.split(/(-left-point|-right-point|-top-point|-bottom-point)/,1)[0];o(p,re,K,J)}}function Y(l){var D;document.removeEventListener("mouseup",Y),d(l),C(`${(D=_.value)==null?void 0:D.id}_curve_to`),v(_.value,l.target)}function z(l,D){_.value=document.getElementById(l),b(l,D),document.addEventListener("mouseup",Y),D.stopPropagation()}s.watch([()=>F.x,()=>F.y],()=>{const l=a(O.value);l.length&&l.forEach(D=>{const H=document.getElementById(D.from),$=document.getElementById(D.to);H&&$&&v(H,$)})});const X=s.computed(()=>({"node-content":!0}));return()=>s.createVNode("div",{id:O.value,class:"br-node",style:g.value},[s.createVNode("div",{id:`${O.value}-left-point`,class:"f-flow-ancher circle-left",onMousedown:l=>z(`${O.value}-left-point`,l)},null),s.createVNode("div",{id:`${O.value}-top-point`,class:"f-flow-ancher circle-top",onMousedown:l=>z(`${O.value}-top-point`,l)},null),s.createVNode("div",{id:`${O.value}-content`,class:X.value,style:"min-width:200px;min-height:200px;"},[I.value&&s.createVNode(fn,{modelValue:I.value,"onUpdate:modelValue":l=>I.value=l},null)]),s.createVNode("div",{id:`${O.value}-right-point`,class:"f-flow-ancher circle-right",onMousedown:l=>z(`${O.value}-right-point`,l)},null),s.createVNode("div",{id:`${O.value}-bottom-point`,class:"f-flow-ancher circle-bottom",onMousedown:l=>z(`${O.value}-bottom-point`,l)},null)])}});function pn(F){const Z=new Map,O=new Map;function I(b,C){const d=O.get(b)||[];d.filter(w=>C.from===w.from&&C.to===w.to).length>0||(d.push(C),O.set(b,d))}function _(b,C,d,A){const w=new Set(Z.get(C)||[]);w.add(A),Z.set(C,[...w]);const S={from:C,to:A,type:"Curve"};I(b,S),I(d,S)}function m(b){return O.get(b)||[]}return{addConnection:_,getConnectionsOfNode:m}}const mn=s.defineComponent({name:"FFlowCanvas",props:Le,emits:[],setup(F,Z){const O=s.ref(),I=Qt(),_=Jt(I),m=pn();s.provide("use-bezier-curve-composition",I),s.provide("use-connections-composition",m),s.provide("use-drawing-bezier-composition",_);const b=s.computed(()=>({transition:"transform 0.2s","background-color":"#F2F3F5",height:"100%",width:"100%",position:"relative"}));s.onMounted(()=>{O.value=F.modelValue});const C=s.ref(),d=s.ref(),A=s.ref(),w=s.ref(),S=s.ref();function f(a){const g=a.clientX-w.value,v=a.clientY-S.value;C.value&&C.value.position&&(C.value.position.x=d.value+g,C.value.position.y=A.value+v)}function n(){document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",n),C.value=void 0,w.value=void 0,S.value=void 0}function o(a,g){C.value=a,d.value=a.position.x,A.value=a.position.y,w.value=g.clientX,S.value=g.clientY,document.addEventListener("mousemove",f),document.addEventListener("mouseup",n)}return()=>s.createVNode("div",{class:"f-flow-canvas editorDiv flex-fill h-100"},[s.createVNode("div",{id:"svg-container",class:"f-struct-wrapper flex-fill",style:b.value},[O.value&&O.value.contents.map(a=>s.createVNode(dn,{modelValue:a.content[0],"onUpdate:modelValue":g=>a.content[0]=g,id:a.id,x:a.position.x,y:a.position.y,onMousedown:g=>o(a,g)},null))])])}});E.FFlowCanvas=mn,E.flowCanvasProps=Le,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
1
+ (function(T,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue"),require("lodash-es"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../checkbox/index.umd.js"),require("../color-picker/index.umd.js"),require("../combo-list/index.umd.js"),require("../content-container/index.umd.js"),require("../data-grid/index.umd.js"),require("../date-picker/index.umd.js"),require("../dropdown/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../external-container/index.umd.js"),require("../events-editor/index.umd.js"),require("../filter-bar/index.umd.js"),require("../image-cropper/index.umd.js"),require("../input-group/index.umd.js"),require("../layout/index.umd.js"),require("../list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../lookup/index.umd.js"),require("../nav/index.umd.js"),require("../number-spinner/index.umd.js"),require("../number-range/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("../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("../weather/index.umd.js"),require("../component/index.umd.js"),require("../video/index.umd.js"),require("../textarea/index.umd.js"),require("../tree-grid/index.umd.js"),require("../common/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../accordion/index.umd.js","../avatar/index.umd.js","../button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../checkbox/index.umd.js","../color-picker/index.umd.js","../combo-list/index.umd.js","../content-container/index.umd.js","../data-grid/index.umd.js","../date-picker/index.umd.js","../dropdown/index.umd.js","../dynamic-form/index.umd.js","../external-container/index.umd.js","../events-editor/index.umd.js","../filter-bar/index.umd.js","../image-cropper/index.umd.js","../input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../list-view/index.umd.js","../lookup/index.umd.js","../nav/index.umd.js","../number-spinner/index.umd.js","../number-range/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","../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","../weather/index.umd.js","../component/index.umd.js","../video/index.umd.js","../textarea/index.umd.js","../tree-grid/index.umd.js","../common/index.umd.js"],s):(T=typeof globalThis<"u"?globalThis:T||self,s(T["flow-canvas"]={},T.Vue,T.LodashES,T.FAccordion,T.FAvatar,T.FButtonEdit,T.FButtonGroup,T.FCalendar,T.FCapsule,T.FCheckbox,T.FColorPicker,T.FComboList,T.FContentContainer,T.FDataGrid,T.FDatePicker,T.FDropdown,T.FDynamicForm,T.FExteranlContainer,T.FEventsEditor,T.FFilterBar,T.FImageCropper,T.FInputGroup,T.FLayout,T.FListNav,T.FListView,T.FLookup,T.FNav,T.FNumberSpinner,T.FNumberRange,T.FOrder,T.FPageHeader,T.FPageFooter,T.FPagination,T.FProgress,T.FQuerySolution,T.FRadioGroup,T.FRate,T.FResponseToolbar,T.FResponseLayout,T.FResponseLayoutEditorSetting,T.FSearchBox,T.FSection,T.FSmokeDetector,T.FSplitter,T.FStep,T.FSwitch,T.FTab,T.FTags,T.FText,T.FTimePicker,T.FTransfer,T.FTreeview,T.FUploader,T.FVerifyDetail,T.FWeather,T.FComponent,T.FVideo,T.FTextArea,T.FTreeGrid,T.common))})(this,function(T,s,Oe,Qe,Je,Ze,et,tt,nt,ot,rt,it,st,at,ct,ut,lt,dt,ft,pt,mt,vt,gt,yt,ht,xt,Ct,wt,bt,Pt,jt,It,St,Tt,Nt,Ot,Et,Ft,At,Dt,Mt,Bt,_t,Vt,qt,kt,Lt,Rt,Xt,$t,Yt,zt,Ut,Ht,Wt,Gt,Kt,Qt,Jt,Ee){"use strict";const Le={modelValue:{type:Object,default:{}}};function Zt(){const P={aroundDirection:"none",left:2,right:2,top:2,bottom:2,x:0,y:0};function V(){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("fill","none"),e.setAttribute("stroke","#4d53e8"),e.setAttribute("stroke-width","2"),e.setAttribute("class",""),e}function y(){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("fill","none"),e.setAttribute("stroke","#4d53e8"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e}function C(){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("fill","none"),e.setAttribute("stroke","#4d53e8"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e}function b(e,t,u,g){const a=n=>{n.key==="Delete"&&(e.indexOf("^"),document.removeEventListener("keydown",a),t.remove())};u.addEventListener("mouseenter",()=>{u.setAttribute("stroke","#37d0ff"),g.setAttribute("stroke","#37d0ff"),u.setAttribute("stroke-width","3"),document.addEventListener("keydown",a)}),u.addEventListener("mouseleave",()=>{u.setAttribute("stroke","#4d53e8"),u.setAttribute("stroke-width","2"),g.setAttribute("stroke","#4d53e8"),document.removeEventListener("keydown",a)})}function m(e){let t=document.getElementById(e);if(t==null){const u=document.createElementNS("http://www.w3.org/2000/svg","svg"),g=V();u.appendChild(g);const a=y();u.appendChild(a);const n=C();u.appendChild(n);const z=C();u.appendChild(z),t=document.createElement("div"),t.id=e,t.style.position="absolute",t.appendChild(u),b(e,t,g,a);const q=document.getElementById("svg-container");return q&&q.appendChild(t),t}return t}function N(e,t,u,g,a){const n={x:0,y:0};return e==="west"&&(t==="north_west"&&(u==="north"&&(n.x=0,n.y=0-a/2),u==="west"&&(n.x=0-g/2,n.y=0)),t==="north_east"&&(u==="north"&&(n.x=-100,n.y=0-a/2),u==="east"&&(n.x=-100,n.y=0-a/2)),t==="south_east"&&(u==="south"&&(n.x=-100,n.y=0+a/2),u==="east"&&(n.x=-100,n.y=0+a/2)),t==="south_west"&&(u==="south"&&(n.x=0,n.y=0+a/2),u==="west"&&(n.x=0-g/2,n.y=0))),e==="east"&&(t==="north_west"&&(u==="north"&&(n.x=-100,n.y=0-a/2),u==="west"&&(n.x=100,n.y=0-a/2)),t==="north_east"&&(u==="north"&&(n.x=0,n.y=0-a/2),u==="east"&&(n.x=0+g/2,n.y=0)),t==="south_east"&&(u==="south"&&(n.x=0,n.y=0+a/2),u==="east"&&(n.x=0+g/2,n.y=0)),t==="south_west"&&(u==="south"&&(n.x=100,n.y=0+a/2),u==="west"&&(n.x=100,n.y=0+a/2))),e==="north"&&(t==="north_west"&&(u==="north"&&(n.x=0,n.y=0-a/2),u==="west"&&(n.x=0-g/2,n.y=0)),t==="north_east"&&(u==="north"&&(n.x=0,n.y=0-a/2),u==="east"&&(n.x=0+g/2,n.y=0)),t==="south_east"&&(u==="south"&&(n.x=0+g/2,n.y=-100),u==="east"&&(n.x=0+g/2,n.y=-100)),t==="south_west"&&(u==="south"&&(n.x=0-g/2,n.y=-100),u==="west"&&(n.x=0-g/2,n.y=-100))),e==="south"&&(t==="north_west"&&(u==="north"&&(n.x=0-g/2,n.y=100),u==="west"&&(n.x=0-g/2,n.y=100)),t==="north_east"&&(u==="north"&&(n.x=0+g/2,n.y=100),u==="east"&&(n.x=0+g/2,n.y=100)),t==="south_east"&&(u==="south"&&(n.x=0,n.y=0+a/2),u==="east"&&(n.x=0+g/2,n.y=0)),t==="south_west"&&(u==="south"&&(n.x=0,n.y=a/2),u==="west"&&(n.x=0-g/2,n.y=0))),n}function E(e,t,u,g){const a={x:0,y:0};return e==="south"&&(t==="west"&&(a.x=-100,a.y=0-g/2),t==="east"&&(a.x=100,a.y=-100),t==="south"&&(a.x=0-u/2,a.y=100),(t==="north"||t==="center")&&(a.x=0,a.y=0-g/2)),e==="north"&&(t==="west"&&(a.x=-100,a.y=100),t==="east"&&(a.x=100,a.y=100),t==="north"&&(a.x=0-u/2,a.y=-100),(t==="south"||t==="center")&&(a.x=0,a.y=g/2)),e==="east"&&(t==="north"&&(a.y=-100,a.x=-100),t==="south"&&(a.y=100,a.x=-100),t==="east"&&(a.x=100,a.y=100),(t==="west"||t==="center")&&(a.x=0-u/2,a.y=0)),e==="west"&&(t==="north"&&(a.y=-100,a.x=100),t==="south"&&(a.y=100,a.x=100),t==="west"&&(a.x=-100,a.y=g/2),(t==="east"||t==="center")&&(a.x=u/2,a.y=0)),a}function p(e,t,u,g,a,n,z){const q=z==="south"||z==="east"?"portrait":"landscape",ee=a,R=q==="landscape"?"east":"north",ie=z==="center"?q==="landscape"?"west":"south":z,se=N(ee,n,R,e,t),{x:D,y:x}=se,W=E(R,ie,e,t),{x:G,y:Q}=W;Q<0&&(t+=Math.abs(Q));const fe=new Map([["default",0+D],["portrait",0+D],["landscape",0+D]]),oe=new Map([["default",t+x],["portrait",t+x],["landscape",t+x]]);D<0&&(e+=Math.abs(D)),G>0&&(e+=G);const ge=new Map([["default",e+G],["portrait",e+G],["landscape",e+G]]),ce=new Map([["default",0+Q],["portrait",0+Q],["landscape",0+Q]]),ue=g.left>P.left,ae=g.bottom>P.bottom,pe=ue?0:ae?e/2:fe.get(q),ye=ae?t+g.bottom:ue?t/2:oe.get(q),he=ge.get(q),me=ce.get(q);return[{x:pe,y:ye},{x:he,y:me},{x:G,y:Q}]}function S(e,t,u,g,a,n,z){const q=z==="south"||z==="west"?"portrait":"landscape",ee=a,R=q==="landscape"?"west":"north",ie=z,se=N(ee,n,R,e,t),{x:D,y:x}=se,W=E(R,ie,e,t),{x:G,y:Q}=W;Q<0&&(t+=Math.abs(Q)),D>0&&(e+=D),G<0&&(e+=Math.abs(G));const fe=new Map([["default",e+D],["portrait",e+D],["landscape",e+D]]),oe=new Map([["default",t+x],["portrait",t+x],["landscape",t+x]]),ge=new Map([["default",0+G],["portrait",0+G],["landscape",0+G]]),ce=new Map([["default",0+Q],["portrait",0+Q],["landscape",0+Q]]),ue=g.right>P.right,ae=g.bottom>P.bottom,pe=ue?e+g.right:ae?e/2:fe.get(q),ye=ae?t+g.bottom:ue?t/2:oe.get(q),he=ge.get(q),me=ce.get(q);return[{x:pe,y:ye},{x:he,y:me},{x:G,y:Q}]}function f(e,t,u,g,a,n,z){const q=z==="north"||z==="east"?"portrait":"landscape",ee=a,R=q==="landscape"?"east":"south",ie=z,se=N(ee,n,R,e,t),{x:D,y:x}=se,W=E(R,ie,e,t),{x:G,y:Q}=W,fe=new Map([["default",0+D],["portrait",0+D],["landscape",0+D]]),oe=new Map([["default",0+x],["portrait",0+x],["landscape",0+x]]);D<0&&(e+=Math.abs(D)),x<0&&(t+=Math.abs(x)),G>0&&(e+=G),Q>0&&(t+=Q);const ge=new Map([["default",e+G],["portrait",e+G],["landscape",e+G]]),ce=new Map([["default",t+Q],["portrait",t+Q],["landscape",t+Q]]),ue=g.left>P.left,ae=g.top>P.top,pe=ue?0:ae?e/2:fe.get(q),ye=ae?0:ue?t/2:oe.get(q),he=ge.get(q),me=ce.get(q);return[{x:pe,y:ye},{x:he,y:me},{x:G,y:Q}]}function r(e,t,u,g,a,n,z){const q=z==="north"||z==="west"?"portrait":"landscape",ee=a,R=q==="landscape"?"west":"south",ie=z,se=N(ee,n,R,e,t),{x:D,y:x}=se,W=E(R,ie,e,t),{x:G,y:Q}=W;G<0&&(e+=Math.abs(G));const fe=new Map([["default",e+D],["portrait",e+D],["landscape",e+D]]),oe=new Map([["default",0+x],["portrait",0+x],["landscape",0+x]]);x<0&&(t+=Math.abs(x)),Q>0&&(t+=Q);const ge=new Map([["default",0+G],["portrait",0+G],["landscape",0+G]]),ce=new Map([["default",t+Q],["portrait",t+Q],["landscape",t+Q]]),ue=g.right>P.right,ae=g.top>P.top,pe=ue?e+g.right:ae?e/2:fe.get(q),ye=ae?0:ue?t/2:oe.get(q),he=ge.get(q),me=ce.get(q);return[{x:pe,y:ye},{x:he,y:me},{x:G,y:Q}]}const i=new Map([["north_east",p],["north_west",S],["south_east",f],["south_west",r]]),h=new Map([["east",["north_west","south_west"]],["west",["north_east","south_east"]],["north",["south_west","south_east"]],["south",["north_west","north_east"]],["center",[]]]);function c(e,t){return e==="north_west"?{aroundDirection:"north_west",left:t.left,right:100,top:t.top,bottom:t.top}:e==="south_west"?{aroundDirection:"south_west",left:t.left,right:100,top:t.top,bottom:t.bottom}:t}function F(e,t){return e==="north_east"?{left:100,right:t.right,top:t.top,bottom:t.top}:e==="south_east"?{left:100,right:t.right,top:t.top,bottom:t.bottom}:t}function $(e,t){return e==="south_west"?{left:t.left,right:t.right,top:100,bottom:t.top}:e==="south_east"?{left:t.left,right:t.right,top:100,bottom:t.bottom}:t}function L(e,t){return e==="north_west"?{left:t.left,right:t.right,top:t.top,bottom:100}:e==="north_east"?{left:t.left,right:t.right,top:t.top,bottom:100}:t}function l(e,t){return t}const O=new Map([["east",c],["west",F],["north",$],["south",L],["center",l]]);function H(e,t,u,g){const a=t.x-e.x,n=t.y-e.y,z=a>=0?"east":"west",q=n>=0?"south":"north",ee=`${q}_${z}`,ie=(h.get(u)||[]).includes(ee),se=O.get(u),D=ie?se(ee,P):P,x=Math.abs(a),W=Math.abs(n),G=i.get(`${q}_${z}`),[Q,fe,oe]=G(x,W,ie,D,u,ee,g),ge=z==="west"?oe.x<0?Math.abs(oe.x):0:oe.x>0?oe.x:0,ce=D.left+D.right+x+ge,ue=q==="north"?oe.y<0?Math.abs(oe.y):0:oe.y>0?oe.y:0,ae=D.top+D.bottom+W+ue,pe=z==="east"?e.x-D.left:e.x+D.right-ce,ye=q==="south"?e.y-D.top:e.y+D.bottom-ae,he=z==="east"?D.left:ce-D.right,me=q==="north"?ae-D.bottom:D.top,Ae=z==="west"?oe.x<0?Math.abs(oe.x):0:oe.x<0?ce:ce-oe.x,Te=q==="north"?oe.y<0?Math.abs(oe.y):0:oe.y<0?ae:ae-oe.y;return{width:ce,height:ae,left:pe,top:ye,startPoinInBoundray:{x:he,y:me},firstControlPoint:Q,secondControlPoint:fe,endPoinInBoundray:{x:Ae,y:Te}}}function Y(e,t,u,g,a){e.style.position="absolute",e.style.alignItems="center",e.style.left=`${t}px`,e.style.top=`${u}px`,e.style.width=g+"px",e.style.height=a+"px"}function re(e,t,u,g,a,n,z){const q=e.childNodes[0];q.setAttribute("width",String(t)),q.setAttribute("height",String(u)),e.appendChild(q);const ee=q.childNodes[0],R=`${g.x} ${g.y}`,ie=`${a.x} ${a.y}`,se=`${n.x} ${n.y}`,D=`${z.x} ${z.y}`,x="M ".concat(R).concat(" C ").concat(ie).concat(","+se+",").concat(D);ee.setAttribute("d",x),ee.setAttribute("fill","none"),ee.setAttribute("stroke","#4d53e8"),ee.setAttribute("stroke-width","2"),ee.setAttribute("class","")}function J(e,t,u,g,a){const{width:n,height:z,left:q,top:ee,startPoinInBoundray:R,firstControlPoint:ie,secondControlPoint:se,endPoinInBoundray:D}=H(t,u,g,a);Y(e,q,ee,n,z),re(e,n,z,R,ie,se,D)}function v(e,t,u,g,a){const n=m(e);J(n,t,u,g,a)}function K(e){return Number(e.replace("px",""))}function Z(e){if(e!==null){const t=e.parentNode,u=K(t.style.left),g=K(t.style.top);return{x:u+e.offsetLeft+e.offsetWidth/2,y:g+e.offsetTop+e.offsetHeight/2}}return{x:0,y:0}}function d(e,t){const u=document.getElementById(e),g=document.getElementById(t),a=Z(u),n=Z(g),z=a.x+2,q=a.y,ee=n.x-2,R=n.y;return{startPoint:{x:z,y:q},endPoint:{x:ee,y:R}}}function A(e,t,u,g){const{startPoint:a,endPoint:n}=d(e,t);v(`${e}_${t}`,a,n,u,g)}return{connect:A,drawing:v}}function en(_){const U=s.ref(),I=s.ref(0),P=s.ref(0),V=s.ref({x:0,y:0}),y=s.ref(),{drawing:C}=_;function b(c){return Number(c.replace("px",""))}function m(c){return(c&&c.className&&c.className.split?c.className.split(" "):[]).includes("f-flow-ancher")}function N(c){switch((c?c.className.split(" "):[]).find(L=>L.startsWith("circle-"))||""){case"circle-left":return"west";case"circle-right":return"east";case"circle-top":return"north";case"circle-bottom":return"south";default:return"center"}}function E(c,F,$){const L=$.getBoundingClientRect();I.value=L.left,P.value=L.top,V.value={x:c,y:F},U.value=N($)}function p(c){var Y;const F=c.clientX-I.value,$=c.clientY-P.value,L=V.value.x+F,l=V.value.y+$,O=c.target,H=O&&typeof O.className=="string"&&m(O)?N(O):"center";C(`${(Y=y.value)==null?void 0:Y.id}_curve_to`,{x:V.value.x,y:V.value.y},{x:L,y:l},U.value,H)}function S(c){const F=document.getElementById(c);F&&F.remove()}function f(){document.addEventListener("mousemove",p)}function r(){document.removeEventListener("mousemove",p)}function i(c){y.value=void 0,r()}function h(c,F){y.value=document.getElementById(c);const $=y.value.offsetParent,L=y.value.getBoundingClientRect(),l=$.getBoundingClientRect(),O=b($.style.left)+(L.left-l.left),H=b($.style.top)+(L.top-l.top),Y=O+L.width/2,re=H+L.height/2;E(Y,re,y.value),f()}return{drawFrom:h,eraseDrawingLine:S,finishToDraw:i,getAncherPointPosition:N,isAncherPoint:m}}const tn={id:{type:String,default:""},type:{type:String,default:""},modelValue:{type:Object},x:{type:Number,default:0},y:{type:Number,default:0},connection:{type:Array,default:[]}},Ie=s.ref(0);function nn(_,U){const I=U.getBoundingClientRect(),P=_.getBoundingClientRect(),V=P.top>=I.top,y=P.top<=I.bottom;return V&&y}function Re(_){if(!_)return;let U;if(_.className.includes("dgComponentSelected")?U=_:U=_.querySelector(".dgComponentSelected"),!U)return;const I=U.getBoundingClientRect();if(I.width===0&&I.height===0)return;const P=U.querySelector(".component-btn-group");if(P){if(!nn(U,_)){P.style.display="none";return}P.style.display="";const y=P.getBoundingClientRect(),C=P.querySelector("div");if(C){const b=C.getBoundingClientRect();C.style.top=y.top+"px",C.style.left=y.left-b.width+"px"}}}const on={modelValue:{type:Object,default:{}},componentId:{type:String,default:""}};var be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rn(_){return _&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_}function Se(_){throw new Error('Could not dynamically require "'+_+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Xe={exports:{}};(function(_,U){(function(I){_.exports=I()})(function(){return function(){function I(P,V,y){function C(N,E){if(!V[N]){if(!P[N]){var p=typeof Se=="function"&&Se;if(!E&&p)return p(N,!0);if(b)return b(N,!0);var S=new Error("Cannot find module '"+N+"'");throw S.code="MODULE_NOT_FOUND",S}var f=V[N]={exports:{}};P[N][0].call(f.exports,function(r){var i=P[N][1][r];return C(i||r)},f,f.exports,I,P,V,y)}return V[N].exports}for(var b=typeof Se=="function"&&Se,m=0;m<y.length;m++)C(y[m]);return C}return I}()({1:[function(I,P,V){var y={},C="(?:^|\\s)",b="(?:\\s|$)";function m(p){var S=y[p];return S?S.lastIndex=0:y[p]=S=new RegExp(C+p+b,"g"),S}function N(p,S){var f=p.className;f.length?m(S).test(f)||(p.className+=" "+S):p.className=S}function E(p,S){p.className=p.className.replace(m(S)," ").trim()}P.exports={add:N,rm:E}},{}],2:[function(I,P,V){(function(y){var C=I("contra/emitter"),b=I("crossvent"),m=I("./classes"),N=document,E=N.documentElement;function p(v,K){var Z=arguments.length;Z===1&&Array.isArray(v)===!1&&(K=v,v=[]);var d,A,e,t,u,g,a,n,z,q=null,ee,R,ie=!1,se=0,D,x=K||{};x.moves===void 0&&(x.moves=F),x.accepts===void 0&&(x.accepts=F),x.invalid===void 0&&(x.invalid=Ae),x.containers===void 0&&(x.containers=v||[]),x.isContainer===void 0&&(x.isContainer=c),x.copy===void 0&&(x.copy=!1),x.copySortSource===void 0&&(x.copySortSource=!1),x.revertOnSpill===void 0&&(x.revertOnSpill=!1),x.removeOnSpill===void 0&&(x.removeOnSpill=!1),x.direction===void 0&&(x.direction="vertical"),x.ignoreInputTextSelection===void 0&&(x.ignoreInputTextSelection=!0),x.mirrorContainer===void 0&&(x.mirrorContainer=N.body);var W=C({containers:x.containers,start:he,end:Te,cancel:He,remove:Ue,destroy:ge,canMove:ye,dragging:!1});return x.removeOnSpill===!0&&W.on("over",hn).on("out",xn),Q(),W;function G(o){return W.containers.indexOf(o)!==-1||x.isContainer(o)}function Q(o){var w=o?"remove":"add";r(E,w,"mousedown",ue),r(E,w,"mouseup",Ne)}function fe(o){var w=o?"remove":"add";r(E,w,"mousemove",ae)}function oe(o){var w=o?"remove":"add";b[w](E,"selectstart",ce),b[w](E,"click",ce)}function ge(){Q(!0),Ne({})}function ce(o){ee&&o.preventDefault()}function ue(o){t=o.clientX,u=o.clientY;var w=i(o)!==1||o.metaKey||o.ctrlKey;if(!w){var j=o.target,X=pe(j);X&&(ee=X,fe(),o.type==="mousedown"&&(O(j)?j.focus():o.preventDefault()))}}function ae(o){if(ee){if(i(o)===0){Ne({});return}if(!(o.clientX!==void 0&&Math.abs(o.clientX-t)<=(x.slideFactorX||0)&&o.clientY!==void 0&&Math.abs(o.clientY-u)<=(x.slideFactorY||0))){if(x.ignoreInputTextSelection){var w=J("clientX",o)||0,j=J("clientY",o)||0,X=N.elementFromPoint(w,j);if(O(X))return}var te=ee;fe(!0),oe(),Te(),me(te),m.add(n||e,"gu-transit"),wn(),Cn(),se=0,_e(o)}}}function pe(o){if(!(W.dragging&&d)&&!G(o)){for(var w=o;l(o)&&G(l(o))===!1;)if(x.invalid(o,w)||(o=l(o),!o))return;var j=l(o);if(j&&!x.invalid(o,w)){var X=x.moves(o,j,w,Y(o));if(X)return{item:o,source:j}}}}function ye(o){return!!pe(o)}function he(o){var w=pe(o);w&&me(w)}function me(o){On(o.item,o.source)&&(n=o.item.cloneNode(!0),W.emit("cloned",n,o.item,"copy")),A=o.source,e=o.item,g=a=Y(o.item),W.dragging=!0,W.emit("drag",e,A)}function Ae(){return!1}function Te(){if(W.dragging){var o=n||e;ze(o,l(o))}}function De(){ee=!1,fe(!0),oe(!0)}function Ne(o){if(De(),!!W.dragging){var w=n||e,j=J("clientX",o)||0,X=J("clientY",o)||0,te=h(d,j,X),ne=We(te,j,X);ne&&(n&&x.copySortSource||!n||ne!==A)?ze(w,ne):x.removeOnSpill?Ue():He()}}function ze(o,w){var j=l(o);n&&x.copySortSource&&w===A&&j.removeChild(e),Be(w)?W.emit("cancel",o,A):W.emit("drop",o,w,A,a),Me()}function Ue(){if(W.dragging){var o=n||e,w=l(o);w&&w.removeChild(o),W.emit(n?"cancel":"remove",o,w,A),Me()}}function He(o){if(W.dragging){var w=arguments.length>0?o:x.revertOnSpill,j=n||e,X=l(j),te=Be(X);te===!1&&w&&(n?X&&X.removeChild(n):A.insertBefore(j,g)),te||w?W.emit("cancel",j,A,A):W.emit("drop",j,X,A,a),Me()}}function Me(){var o=n||e;De(),bn(),Pn(),o&&m.rm(o,"gu-transit"),z&&clearTimeout(z),W.dragging=!1,q&&W.emit("out",o,q,A),W.emit("dragend",o,se),A=e=n=g=a=z=q=null}function Be(o,w){var j;return w!==void 0?j=w:d?j=a:j=Y(n||e),o===A&&j===g}function We(o,w,j){for(var X=o;X&&!te();)X=l(X);return X;function te(){var ne=G(X);if(ne===!1)return!1;var we=Ge(X,o),ve=Ke(X,we,w,j),Ce=Be(X,ve);return Ce?!0:x.accepts(e,X,A,ve)}}function _e(o){if(!d)return;o.preventDefault();var w=J("clientX",o)||0,j=J("clientY",o)||0;d.style.left=w-2+"px",d.style.top=j-2+"px";var X=n||e,te=h(d,w,j),ne=We(te,w,j),we=ne!==null&&ne!==q;(we||ne===null)&&(xe(),q=ne,je()),Nn(te,j);var ve=l(X);if(ne===A&&n&&!x.copySortSource){ve&&ve.removeChild(X);return}var Ce,Pe=Ge(ne,te);if(ie=jn(Pe,ne),Pe!==null)Ce=Ke(ne,Pe,w,j);else if(x.revertOnSpill===!0&&!n)Ce=g,ne=A;else{n&&ve&&ve.removeChild(X),n&&R&&(R.style.display="none");return}R.style.display="block",yn(Ce,X,we),Ce?Sn(Pe,Ce):Tn(ne);function le(de){W.emit(de,X,q,A)}function je(){we&&le("over")}function xe(){q&&le("out")}}function yn(o,w,j){(o===w||o===Y(w))&&(a=Y(w)),(o===null&&j||o!==w&&o!==Y(w))&&(a=o)}function hn(o){m.rm(o,"gu-hide")}function xn(o){W.dragging&&m.add(o,"gu-hide")}function Cn(){d||(d=document.createElement("div"),d.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;",d.innerHTML=x.getMirrorText&&x.getMirrorText(e)||"控件",m.add(d,"gu-mirror"),x.mirrorContainer.appendChild(d),r(E,"add","mousemove",_e),m.add(x.mirrorContainer,"gu-unselectable"),W.emit("cloned",d,e,"mirror"))}function wn(){if(R=document.createElement("div"),m.add(R,"gu-insertion"),e){var o=e.getBoundingClientRect();R.style.left=o.left+"px",R.style.top=o.top+"px"}ie=!1,x.mirrorContainer.appendChild(R)}function bn(){d&&(m.rm(x.mirrorContainer,"gu-unselectable"),r(E,"remove","mousemove",_e),l(d).removeChild(d),d=null)}function Pn(){R&&(l(R).removeChild(R),R=null)}function Ge(o,w){for(var j=w;j!==o&&l(j)!==o;)j=l(j);return j===E?null:j}function jn(o,w){if(!w)return ie;var j=o||w&&w.lastElementChild;if(!j)return!0;var X=getComputedStyle(o),te=/^inline/.test(X.getPropertyValue("display"))||/^(left|right)$/.test(X.getPropertyValue("float"));if(te)return!0;if(w){var ne=getComputedStyle(w),we=ne.getPropertyValue("display");if(/flex$/.test(we)){var ve=ne.getPropertyValue("flex-direction")||"row";if(ve==="row"||ve==="row-reverse")return!In(w)}return!1}return!0}function In(o){if(!o.children||!o.children.length)return!1;for(const w of Array.from(o.children)){const X=(w.className&&w.className.split(" ")||[]).filter(te=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(te));if(!X.length)return!1;for(const te of X){const ne=te.slice(te.lastIndexOf("-")+1);if(parseInt(ne,10)!==12)return!1}}return!0}function Sn(o,w){const j=w.getBoundingClientRect();if(R.style.left=j.left+"px",R.style.top=j.top+"px",ie){if(R.style.height=j.height+"px",R.style.width="4px",o){const X=o.getBoundingClientRect();X.top!==j.top&&(R.style.left=X.right+"px",R.style.top=X.top+"px",R.style.height=X.height+"px")}}else if(R.style.height="4px",R.style.width=j.width+"px",D){const X=D.getBoundingClientRect();j.top<X.top&&(R.style.display="none")}w===e&&e&&(R.style.display="none")}function Tn(o){a=null;var w=o.lastElementChild;if(w){var j=w.getBoundingClientRect();ie?(R.style.left=j.right+"px",R.style.top=j.top+"px",R.style.height=j.height+"px",R.style.width="4px"):(R.style.left=j.left+"px",R.style.top=j.bottom+"px",R.style.height="4px",R.style.width=j.width+"px"),w===e&&e&&(R.style.display="none")}else R.style.display="none"}function Nn(o,w){if(!x.mirrorContainer.contains(o)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(D=S(o),!D||!D.contains(o)))return;const j=document.querySelector(".dgComponentSelected"),X=D.getBoundingClientRect();if(w-30<X.top&&D.scrollTop>0){let te=D.scrollTop<10?D.scrollTop:10;D.scrollBy(0,-1*te),j&&D.contains(j)&&(se=se+-1*te)}if(w+30>X.bottom&&D.scrollTop<D.scrollHeight-D.clientHeight){const te=D.scrollHeight-D.clientHeight-D.scrollTop;let ne=te<10?te:10;D.scrollBy(0,ne),j&&D.contains(j)&&(se=se+ne)}}function Ke(o,w,j,X){var te=x.direction==="horizontal",ne=x.direction==="mixed",we=w!==o?Ce():ve();return we;function ve(){var le=o.children.length,je,xe,de;for(je=0;je<le;je++)if(xe=o.children[je],de=xe.getBoundingClientRect(),te&&de.left+de.width/2>j||!ne&&!te&&de.top+de.height/2>X||ne&&de.left+de.width>j&&de.top+de.height>X)return xe;return null}function Ce(){var le=w.getBoundingClientRect();if(ne){var je=X-le.top,xe=j-le.left,de=le.bottom-X,Ve=le.right-j,qe=Math.min(xe,Ve,je,de),ke;return ie?ke=Ve<xe:ke=de===qe||Ve===qe||xe===qe,Pe(ke)}return Pe(te?j>le.left+$(le)/2:X>le.top+L(le)/2)}function Pe(le){return le?Y(w):w}}function On(o,w){return typeof x.copy=="boolean"?x.copy:x.copy(o,w)}}function S(v){const K=Array.from(window.scrollContainerList);if(K.length===1){const d=Array.from(window.scrollContainerList)[0];return document.getElementById(d)}const Z=f(K);for(const d of Z)if(d.contains(v))return d;return null}function f(v){const K=[];return v.forEach(Z=>{const d=document.getElementById(Z);d&&K.push(d)}),K.sort((Z,d)=>Z.contains(d)?1:d.contains(Z)?-1:0),K}function r(v,K,Z,d){var A={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},e={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},t={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};y.navigator.pointerEnabled?b[K](v,e[Z],d):y.navigator.msPointerEnabled?b[K](v,t[Z],d):(b[K](v,A[Z],d),b[K](v,Z,d))}function i(v){if(v.touches!==void 0)return v.touches.length;if(v.which!==void 0&&v.which!==0)return v.which;if(v.buttons!==void 0)return v.buttons;var K=v.button;if(K!==void 0)return K&1?1:K&2?3:K&4?2:0}function h(v,K,Z){v=v||{};var d=v.className||"",A;return v.className+=" gu-hide",A=N.elementFromPoint(K,Z),v.className=d,A}function c(){return!1}function F(){return!0}function $(v){return v.width||v.right-v.left}function L(v){return v.height||v.bottom-v.top}function l(v){return v.parentNode===N?null:v.parentNode}function O(v){return v.tagName==="INPUT"||v.tagName==="TEXTAREA"||v.tagName==="SELECT"||H(v)}function H(v){return!v||v.contentEditable==="false"?!1:v.contentEditable==="true"?!0:H(l(v))}function Y(v){return v.nextElementSibling||K();function K(){var Z=v;do Z=Z.nextSibling;while(Z&&Z.nodeType!==1);return Z}}function re(v){return v.targetTouches&&v.targetTouches.length?v.targetTouches[0]:v.changedTouches&&v.changedTouches.length?v.changedTouches[0]:v}function J(v,K){var Z=re(K),d={pageX:"clientX",pageY:"clientY"};return v in d&&!(v in Z)&&d[v]in Z&&(v=d[v]),Z[v]}P.exports=p}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(I,P,V){P.exports=function(C,b){return Array.prototype.slice.call(C,b)}},{}],4:[function(I,P,V){var y=I("ticky");P.exports=function(b,m,N){b&&y(function(){b.apply(N||null,m||[])})}},{ticky:10}],5:[function(I,P,V){var y=I("atoa"),C=I("./debounce");P.exports=function(m,N){var E=N||{},p={};return m===void 0&&(m={}),m.on=function(S,f){return p[S]?p[S].push(f):p[S]=[f],m},m.once=function(S,f){return f._once=!0,m.on(S,f),m},m.off=function(S,f){var r=arguments.length;if(r===1)delete p[S];else if(r===0)p={};else{var i=p[S];if(!i)return m;i.splice(i.indexOf(f),1)}return m},m.emit=function(){var S=y(arguments);return m.emitterSnapshot(S.shift()).apply(this,S)},m.emitterSnapshot=function(S){var f=(p[S]||[]).slice(0);return function(){var r=y(arguments),i=this||m;if(S==="error"&&E.throws!==!1&&!f.length)throw r.length===1?r[0]:r;return f.forEach(function(c){E.async?C(c,r,i):c.apply(i,r),c._once&&m.off(S,c)}),m}},m}},{"./debounce":4,atoa:3}],6:[function(I,P,V){(function(y){var C=I("custom-event"),b=I("./eventmap"),m=y.document,N=S,E=r,p=[];y.addEventListener||(N=f,E=i),P.exports={add:N,remove:E,fabricate:h};function S(l,O,H,Y){return l.addEventListener(O,H,Y)}function f(l,O,H){return l.attachEvent("on"+O,F(l,O,H))}function r(l,O,H,Y){return l.removeEventListener(O,H,Y)}function i(l,O,H){var Y=$(l,O,H);if(Y)return l.detachEvent("on"+O,Y)}function h(l,O,H){var Y=b.indexOf(O)===-1?J():re();l.dispatchEvent?l.dispatchEvent(Y):l.fireEvent("on"+O,Y);function re(){var v;return m.createEvent?(v=m.createEvent("Event"),v.initEvent(O,!0,!0)):m.createEventObject&&(v=m.createEventObject()),v}function J(){return new C(O,{detail:H})}}function c(l,O,H){return function(re){var J=re||y.event;J.target=J.target||J.srcElement,J.preventDefault=J.preventDefault||function(){J.returnValue=!1},J.stopPropagation=J.stopPropagation||function(){J.cancelBubble=!0},J.which=J.which||J.keyCode,H.call(l,J)}}function F(l,O,H){var Y=$(l,O,H)||c(l,O,H);return p.push({wrapper:Y,element:l,type:O,fn:H}),Y}function $(l,O,H){var Y=L(l,O,H);if(Y){var re=p[Y].wrapper;return p.splice(Y,1),re}}function L(l,O,H){var Y,re;for(Y=0;Y<p.length;Y++)if(re=p[Y],re.element===l&&re.type===O&&re.fn===H)return Y}}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(I,P,V){(function(y){var C=[],b="",m=/^on/;for(b in y)m.test(b)&&C.push(b.slice(2));P.exports=C}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(I,P,V){(function(y){var C=y.CustomEvent;function b(){try{var m=new C("cat",{detail:{foo:"bar"}});return m.type==="cat"&&m.detail.foo==="bar"}catch{}return!1}P.exports=b()?C:typeof document<"u"&&typeof document.createEvent=="function"?function(N,E){var p=document.createEvent("CustomEvent");return E?p.initCustomEvent(N,E.bubbles,E.cancelable,E.detail):p.initCustomEvent(N,!1,!1,void 0),p}:function(N,E){var p=document.createEventObject();return p.type=N,E?(p.bubbles=!!E.bubbles,p.cancelable=!!E.cancelable,p.detail=E.detail):(p.bubbles=!1,p.cancelable=!1,p.detail=void 0),p}}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(I,P,V){var y=P.exports={},C,b;function m(){throw new Error("setTimeout has not been defined")}function N(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?C=setTimeout:C=m}catch{C=m}try{typeof clearTimeout=="function"?b=clearTimeout:b=N}catch{b=N}})();function E(L){if(C===setTimeout)return setTimeout(L,0);if((C===m||!C)&&setTimeout)return C=setTimeout,setTimeout(L,0);try{return C(L,0)}catch{try{return C.call(null,L,0)}catch{return C.call(this,L,0)}}}function p(L){if(b===clearTimeout)return clearTimeout(L);if((b===N||!b)&&clearTimeout)return b=clearTimeout,clearTimeout(L);try{return b(L)}catch{try{return b.call(null,L)}catch{return b.call(this,L)}}}var S=[],f=!1,r,i=-1;function h(){!f||!r||(f=!1,r.length?S=r.concat(S):i=-1,S.length&&c())}function c(){if(!f){var L=E(h);f=!0;for(var l=S.length;l;){for(r=S,S=[];++i<l;)r&&r[i].run();i=-1,l=S.length}r=null,f=!1,p(L)}}y.nextTick=function(L){var l=new Array(arguments.length-1);if(arguments.length>1)for(var O=1;O<arguments.length;O++)l[O-1]=arguments[O];S.push(new F(L,l)),S.length===1&&!f&&E(c)};function F(L,l){this.fun=L,this.array=l}F.prototype.run=function(){this.fun.apply(null,this.array)},y.title="browser",y.browser=!0,y.env={},y.argv=[],y.version="",y.versions={};function $(){}y.on=$,y.addListener=$,y.once=$,y.off=$,y.removeListener=$,y.removeAllListeners=$,y.emit=$,y.prependListener=$,y.prependOnceListener=$,y.listeners=function(L){return[]},y.binding=function(L){throw new Error("process.binding is not supported")},y.cwd=function(){return"/"},y.chdir=function(L){throw new Error("process.chdir is not supported")},y.umask=function(){return 0}},{}],10:[function(I,P,V){(function(y){var C=typeof y=="function",b;C?b=function(m){y(m)}:b=function(m){setTimeout(m,0)},P.exports=b}).call(this,I("timers").setImmediate)},{timers:11}],11:[function(I,P,V){(function(y,C){var b=I("process/browser.js").nextTick,m=Function.prototype.apply,N=Array.prototype.slice,E={},p=0;V.setTimeout=function(){return new S(m.call(setTimeout,window,arguments),clearTimeout)},V.setInterval=function(){return new S(m.call(setInterval,window,arguments),clearInterval)},V.clearTimeout=V.clearInterval=function(f){f.close()};function S(f,r){this._id=f,this._clearFn=r}S.prototype.unref=S.prototype.ref=function(){},S.prototype.close=function(){this._clearFn.call(window,this._id)},V.enroll=function(f,r){clearTimeout(f._idleTimeoutId),f._idleTimeout=r},V.unenroll=function(f){clearTimeout(f._idleTimeoutId),f._idleTimeout=-1},V._unrefActive=V.active=function(f){clearTimeout(f._idleTimeoutId);var r=f._idleTimeout;r>=0&&(f._idleTimeoutId=setTimeout(function(){f._onTimeout&&f._onTimeout()},r))},V.setImmediate=typeof y=="function"?y:function(f){var r=p++,i=arguments.length<2?!1:N.call(arguments,1);return E[r]=!0,b(function(){E[r]&&(i?f.apply(null,i):f.call(null),V.clearImmediate(r))}),r},V.clearImmediate=typeof C=="function"?C:function(f){delete E[f]}}).call(this,I("timers").setImmediate,I("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Xe);var sn=Xe.exports;const $e=rn(sn);function an(_){let U;function I(r,i,h){const c={};return c.sourceElement=r,c.sourceContainer=h,c.targetContainer=i,c.sourceType=r.getAttribute("data-sourceType")||"move",c.controlType=r.getAttribute("data-controlType"),c.controlTypeName=r.getAttribute("data-controlTypeName"),c.controlCategory=r.getAttribute("data-category"),c.controlFeature=r.getAttribute("data-feature"),c.parentComponentInstance=i.componentInstance,c.controlCategory==="input"?c.bindingType="field":c.controlCategory==="dataCollection"&&(c.bindingType="entity"),r.componentInstance&&(c.controlType=r.componentInstance.value.schema.type,c.controlCategory=r.componentInstance.value.schema.category),c}function P(r,i,h){if(r.contains(i)||i.classList.contains("no-drop"))return!1;const c=!0;if(r.componentInstance&&r.componentInstance.value.getDragScopeElement){const F=r.componentInstance.value.getDragScopeElement();if(F&&!F.contains(i))return!1}if(i.componentInstance&&i.componentInstance.value.canAccepts){const F=I(r,i,h);return i.componentInstance.value.canAccepts(F)}return c}function V(r,i){const h=i.getBoundingClientRect(),c=r.getBoundingClientRect(),F=c.top>=h.top,$=c.top<h.bottom;return F&&$}function y(r,i){const h=r.querySelector(".dgComponentSelected");if(!(!h||i===0)&&V(h,r)){const c=h.querySelector(".component-btn-group");if(c){const F=c.querySelector("div");if(F&&F.style.top){const $=Number.parseFloat(F.style.top);F.style.top=$-i+"px"}}}}function C(r,i,h){r.componentInstance;let c=-1;if(!i)return-1;if(r.componentInstance.value.contents){if(h&&h.componentInstance){if(h.getAttribute("data-noattach"))c=Number(h.getAttribute("data-position"));else{const F=h.componentInstance.value.schema;let $={id:F.id};F.type==="Component"&&($={component:F.id}),c=Oe.findIndex(r.componentInstance.value.contents,$),c=c===-1?0:c}c!==-1&&r.componentInstance.value.contents.splice(c,0,i)}else r.componentInstance.value.contents.push(i);r.componentInstance.value.updateDragAndDropRules()}return c}function b(r,i){if(!r.componentInstance.value.contents)return-1;if(r.componentInstance.value.contents.length===0)return 0;if(!i||!i.componentInstance)return r.componentInstance.value.contents.length;if(i.getAttribute("data-noattach"))return Number(i.getAttribute("data-position"));const h=i.componentInstance.value.schema;let c;h.type==="Component"?c={component:h.id}:c={id:h.id};let F=Oe.findIndex(r.componentInstance.value.contents,c);return F=F===-1?0:F,F}function m(r,i,h,c){if(i.componentInstance.value.addNewChildComponentSchema){const F=b(i,c),$=String(r.getAttribute("data-controltype")),L=r.getAttribute("data-feature"),l=String(r.innerText),O=i.componentInstance.value,H={componentType:$,label:l,parentComponentInstance:O,targetPosition:F},Y=L?JSON.parse(L):{},re=Object.assign(H,Y),J=i.componentInstance.value.addNewChildComponentSchema(re,_);C(i,J,c)}i.contains(r)&&i.removeChild(r)}function N(r,i,h,c){let F,$=-1;if(r.componentInstance&&r.componentInstance.value.triggerBelongedComponentToMoveWhenMoved){const O=r.componentInstance.value.getBelongedComponentInstance(r.componentInstance);O&&(r=s.ref(O.elementRef).value.parentElement,h=r.parentElement)}const L=r.componentInstance&&r.componentInstance.value.schema;let l={id:L&&L.id};L.type==="component"&&(l={component:L&&L.id}),$=Oe.findIndex(h.componentInstance.value.contents,l),$!==-1&&h.componentInstance.value.contents&&(F=h.componentInstance.value.contents.splice($,1),F=F[0]),C(i,F,c),h.componentInstance&&h.componentInstance.value.onChildElementMovedOut&&h.componentInstance.value.onChildElementMovedOut(r),i.componentInstance&&i.componentInstance.value.onAcceptMovedChildElement&&i.componentInstance.value.onAcceptMovedChildElement(r,h)}function E(r,i,h,c){if(!i||r.contains(i))return;switch(r.getAttribute("data-sourceType")){case"control":case"field":case"entity":{m(r,i,h,c);break}default:h.componentInstance.value.contents?N(r,i,h,c):i.contains(r)&&i.removeChild(r)}Ie.value++}function p(r){U&&U.destroy(),$e&&(U=$e([],{mirrorContainer:r,direction:"mixed",revertOnSpill:!0,moves(i,h,c){let F=!0;return i.classList.contains("no-drag")&&(F=!1),i.componentInstance&&(F=!!c.getAttribute("data-dragging-icon")),F},copy(i){return i.classList.contains("drag-copy")},getMirrorText(i){return i.componentInstance&&i.componentInstance.value.getDraggingDisplayText?i.componentInstance.value.getDraggingDisplayText():i.innerText||"控件"},accepts(i,h,c){const F=P(i,h,c),$=r.lastElementChild;return F?$.className=$.className.replace("undroppable",""):$.className.includes("undroppable")||($.className+=" undroppable"),F}}).on("over",(i,h)=>{h.className+=" drag-over"}).on("out",(i,h)=>{h.className=h.className.replace("drag-over","").replace(" ","")}).on("drop",(i,h,c,F)=>{E(i,h,c,F)}).on("dragend",(i,h)=>{y(i,h)}))}function S(r,i){if(!r)return;if(i.noDragDrop)return r;const h=r.querySelector(`[data-dragref='${i.id}-container']`)||r;U&&h&&U.containers.push(h)}function f(){if(!U)return;const r=document.getElementsByClassName("controlCategory");r&&(U.containers=U.containers.filter(i=>!i.className.includes("controlCategory")),Array.from(r).forEach(i=>{U.containers.push(i)}))}return{attachComponents:S,attachToolbox:f,initializeDragula:p}}const cn={id:{type:String,default:""},componentId:{type:String,default:""},type:{type:String,default:""},canDelete:{type:Boolean,default:!0},canMove:{type:Boolean,default:!0},canSelectParent:{type:Boolean,default:!0},customButtons:{type:Array,default:[]},customClass:{type:String,default:""},customStyle:{type:String,default:""},modelValue:{type:Object},ignore:{type:Boolean,default:!1}},M={},B={},k={};let Ye=!1;function un(){Ye||(Ye=!0,Je.registerDesigner(M,B,k),Qe.registerDesigner(M,B,k),Ze.registerDesigner(M,B,k),et.registerDesigner(M,B,k),tt.registerDesigner(M,B,k),nt.registerDesigner(M,B,k),ot.registerDesigner(M,B,k),rt.registerDesigner(M,B,k),it.registerDesigner(M,B,k),st.registerDesigner(M,B,k),at.registerDesigner(M,B,k),ct.registerDesigner(M,B,k),ut.registerDesigner(M,B,k),lt.registerDesigner(M,B,k),ft.registerDesigner(M,B,k),dt.registerDesigner(M,B),pt.registerDesigner(M,B,k),mt.registerDesigner(M,B,k),vt.registerDesigner(M,B,k),gt.registerDesigner(M,B,k),ht.registerDesigner(M,B,k),yt.registerDesigner(M,B,k),Ct.registerDesigner(M,B,k),xt.registerDesigner(M,B,k),bt.registerDesigner(M,B,k),wt.registerDesigner(M,B,k),Pt.registerDesigner(M,B,k),jt.registerDesigner(M,B,k),It.registerDesigner(M,B,k),St.registerDesigner(M,B,k),Tt.registerDesigner(M,B,k),Nt.registerDesigner(M,B,k),Ot.registerDesigner(M,B,k),At.registerDesigner(M,B,k),Dt.registerDesigner(M,B,k),Ft.registerDesigner(M,B,k),Et.registerDesigner(M,B,k),Mt.registerDesigner(M,B,k),Bt.registerDesigner(M,B,k),_t.registerDesigner(M,B,k),Vt.registerDesigner(M,B,k),qt.registerDesigner(M,B,k),kt.registerDesigner(M,B,k),Lt.registerDesigner(M,B,k),Rt.registerDesigner(M,B,k),Xt.registerDesigner(M,B,k),Wt.registerDesigner(M,B,k),$t.registerDesigner(M,B,k),Yt.registerDesigner(M,B,k),zt.registerDesigner(M,B,k),Ut.registerDesigner(M,B,k),Ht.registerDesigner(M,B,k),Gt.registerDesigner(M,B),Kt.registerDesigner(M,B,k),Qt.registerDesigner(M,B,k),Jt.registerDesigner(M,B,k))}const ln={id:{type:String}},dn=s.defineComponent({name:"FDesignerPlaceholder",props:ln,emits:[],setup(_){const U=s.computed(()=>({"drag-and-drop-alert":!0,"no-drag":!0,"w-100":!0})),I=s.computed(()=>({height:"60px",display:"flex","justify-content":"center","align-items":"center",margin:0,padding:".75rem 1.25rem",border:"1px solid transparent","border-radius":"3px",color:"#315585","background-color":"#dfedff","border-color":"#d2e6ff"}));return()=>s.createVNode("div",{class:U.value,style:I.value,role:"alert","data-noattach":"true","data-position":"0"},[s.createTextVNode("拖拽组件到这里")])}});function fn(_){return typeof _=="function"||Object.prototype.toString.call(_)==="[object Object]"&&!s.isVNode(_)}const Fe=s.defineComponent({name:"FDesignerItem",props:cn,emits:["selectionChange"],setup(_,U){const I=s.ref(`${_.modelValue.id}-component`),P=s.ref(_.canMove),V=s.ref(_.canDelete),y=s.ref(!1),C=s.ref(_.modelValue),b=s.ref(_.componentId||""),m=s.ref(""),N=s.ref(""),E=s.ref(_.customClass),p=s.ref(),S=s.inject("canvas-dragula"),f=s.ref(),r=s.inject("design-item-context"),i={designerItemElementRef:p,componentInstance:f,schema:C.value,parent:r,setupContext:U};s.provide("design-item-context",i);const h=s.inject("useFormSchema"),c=s.computed(()=>{const d=_.modelValue.appearance&&_.modelValue.appearance.class||"";let A={"farris-component":!0,"flex-fill":C.value.id=="root-component","position-relative":P.value&&V.value,"farris-nested":y.value,"can-move":P.value,"d-none":p.value&&p.value.classList.contains("d-none"),dgComponentSelected:p.value&&p.value.classList.contains("dgComponentSelected"),dgComponentFocused:p.value&&p.value.classList.contains("dgComponentFocused")};return A[`farris-component-${C.value.type}`]=!0,A=Ee.getCustomClass(A,d),A=Ee.getCustomClass(A,N.value),A=Ee.getCustomClass(A,E.value),A}),F=s.computed(()=>{const d={},A=_.modelValue.appearance&&_.modelValue.appearance.style||"";return A&&A.split(";").reduce((e,t)=>{const[u,g]=t.split(":");return e[u]=g,e},d),m.value&&m.value.split(";").reduce((e,t)=>{const[u,g]=t.split(":");return u&&(e[u]=g),e},d),d});function $(d,A){var u,g,a;if(d&&(d.preventDefault(),d.stopPropagation()),f.value.triggerBelongedComponentToDeleteWhenDeleted){const n=f.value.getBelongedComponentInstance(f);if(n&&n.parent){const z=s.ref(n==null?void 0:n.parent),q=z.value.contents.findIndex(ee=>ee.id===n.schema.id);(g=(u=z.value)==null?void 0:u.contents)==null||g.splice(q,1),(a=z.value)==null||a.updateDragAndDropRules(),Ie.value++}return}let e=r,t=n=>n.id===A.id;if(A.type==="component"&&(e=r==null?void 0:r.parent,t=n=>n.component===A.id),e&&e.schema.contents){const n=e.schema.contents.findIndex(t);e.schema.contents.splice(n,1),e.componentInstance.value.updateDragAndDropRules(),Ie.value++,U.emit("selectionChange")}}function L(d){return V.value&&s.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:A=>{$(A,d)}},[s.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function l(){return P.value&&s.createVNode("div",{role:"button",class:"btn component-settings-button",title:"移动",ref:"moveComponent"},[s.createVNode("i",{"data-dragging-icon":"true",class:"cmp_move f-icon f-icon-yxs_move"},null)])}function O(){return _.customButtons&&!!_.customButtons.length&&_.customButtons.map(d=>s.createVNode("div",{role:"button",class:`btn component-settings-button ${d.class||""}`,title:d.title,ref:d.id},[s.createVNode("i",{class:d.icon},null)]))}function H(d){return s.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[s.createVNode("div",null,[L(d),l(),O()])])}function Y(d,A,e,t){U.emit("selectionChange",d,A,e,t)}function re(d){let A;const e=d.type,t=M[e],u=B[e],g=u?u(d):{};g.customClass=_.ignore?g.customClass:"",g.componentId=b.value;const a=d.contents&&d.contents.length===0;return d.contents&&!!d.contents.length&&t?s.createVNode(t,s.mergeProps({ref:f},g),fn(A=d.contents.map(z=>s.createVNode(Fe,{key:z.id,modelValue:z,"onUpdate:modelValue":q=>z=q,componentId:b.value,onSelectionChange:Y},null)))?A:{default:()=>[A]}):t?a?s.createVNode(t,s.mergeProps({ref:f},g),{default:()=>[s.createVNode(dn,null,null)]}):s.createVNode(t,s.mergeProps({ref:f},g),null):s.createVNode("div",null,null)}function J(d){if(d.type==="component-ref"){let e=h==null?void 0:h.getFormSchema().module.components.find(t=>t.id===d.component);if(e)return s.createVNode(Fe,{key:e.id,modelValue:e,"onUpdate:modelValue":t=>e=t,componentId:e.id,onSelectionChange:Y},null)}}s.watch(()=>_.modelValue,d=>{C.value=d,I.value=`${d.id}-component`});function v(d){const A=d.target;Re(A)}function K(){var d,A;(A=(d=C.value)==null?void 0:d.contents)!=null&&A.length&&p.value&&p.value.addEventListener("scroll",v)}s.onMounted(()=>{if(p.value&&f.value&&f.value.schema){const d=p.value.querySelector(`[data-dragref='${f.value.schema.id}-container']`);S&&d&&S.attachComponents(d,C.value),y.value=f.value.canNested!==void 0?f.value.canNested:y.value,V.value=f.value.canDelete!==void 0?f.value.canDelete:V.value,P.value=f.value.canMove!==void 0?f.value.canMove:P.value,m.value=f.value.styles||"",N.value=f.value.designerClass||"",p.value&&(p.value.componentInstance=f,p.value.designItemContext=i)}K(),Ie.value++}),s.onBeforeUnmount(()=>{p.value&&p.value.removeEventListener("scroll",v)});function Z(d){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(e=>e.classList.remove("dgComponentFocused")),d&&(d.preventDefault(),d.stopPropagation());const A=p.value;if(A){const e=document.getElementsByClassName("dgComponentSelected");if(!(e&&e.length===1&&e[0]===p.value)&&(Array.from(e).forEach(u=>u.classList.remove("dgComponentSelected")),A.classList.add("dgComponentFocused"),U.emit("selectionChange",C.value.type,C.value,b.value,f.value),f.value.getDraggableDesignItemElement)){const u=f.value.getDraggableDesignItemElement(i);u&&u.value&&u.value.classList.add("dgComponentSelected")}}v(d)}return()=>C.value.type==="component-ref"?J(C.value):s.createVNode("div",{id:`${C.value.id}-design-item`,ref:p,class:c.value,style:F.value,onClick:Z},[H(C.value),re(C.value)])}}),pn=s.defineComponent({name:"FDesignerCanvas",props:on,emits:["init","selectionChange","canvasChanged"],setup(_,U){const I=s.ref(),P=s.ref(),V=s.ref(),y=s.ref(),C=s.ref(),b=s.ref(_.componentId),m={eventsEditorUtils:s.inject("eventsEditorUtils"),formSchemaUtils:s.inject("useFormSchema"),formMetadataConverter:s.inject("formMetadataConverter"),designViewModelUtils:s.inject("designViewModelUtils"),controlCreatorUtils:s.inject("controlCreatorUtils"),metadataService:s.inject("Meatdata_Http_Service_Token"),schemaService:s.inject("schemaService")};s.provide("designer-host-service",m);const N=an(m);un(),s.provide("canvas-dragula",N),s.provide("design-item-context",{designerItemElementRef:y,componentInstance:C,schema:P.value,parent:void 0});const E=s.computed(()=>({"d-flex":!0,"flex-fill":!0,"flex-column":!0}));s.onMounted(()=>{V.value&&N.initializeDragula(V.value),I.value=_.modelValue,U.emit("init",N)}),s.watch(Ie,()=>{Re(V.value),U.emit("canvasChanged")},{flush:"post"});function p(S,f,r,i){U.emit("selectionChange",S,f,r,i)}return()=>s.createVNode("div",{class:"editorDiv flex-fill h-100"},[s.createVNode("div",{class:"editorPanel d-flex flex-fill flex-column PC"},[s.createVNode("div",{ref:V,class:E.value},[I.value&&s.createVNode(Fe,{modelValue:I.value,"onUpdate:modelValue":S=>I.value=S,onSelectionChange:p,componentId:b.value},null)])])])}}),mn=s.defineComponent({name:"FFlowNodeItem",props:tn,emits:[],setup(_,U){const I=s.ref(_.id),P=s.ref(_.modelValue),V=s.ref(),y=s.inject("use-drawing-bezier-composition"),{drawFrom:C,eraseDrawingLine:b,finishToDraw:m,getAncherPointPosition:N,isAncherPoint:E}=y,p=s.inject("use-bezier-curve-composition"),{connect:S}=p,f=s.inject("use-connections-composition"),{addConnection:r,getConnectionsOfNode:i}=f;new Map(_.connection);const h=s.computed(()=>({left:`${_.x}px`,top:`${_.y}px`}));function c(l,O){if(E(l)&&E(O)){const H=N(l),Y=N(O);S(l.id,O.id,H,Y);const re=l.id,J=O.id,v=re.split(/(-left-point|-right-point|-top-point|-bottom-point)/,1)[0],K=J.split(/(-left-point|-right-point|-top-point|-bottom-point)/,1)[0];r(v,re,K,J)}}function F(l){var O;document.removeEventListener("mouseup",F),m(l),b(`${(O=V.value)==null?void 0:O.id}_curve_to`),c(V.value,l.target)}function $(l,O){V.value=document.getElementById(l),C(l,O),document.addEventListener("mouseup",F),O.stopPropagation()}s.watch([()=>_.x,()=>_.y],()=>{const l=i(I.value);l.length&&l.forEach(O=>{const H=document.getElementById(O.from),Y=document.getElementById(O.to);H&&Y&&c(H,Y)})});const L=s.computed(()=>({"node-content":!0}));return()=>s.createVNode("div",{id:I.value,class:"br-node",style:h.value},[s.createVNode("div",{id:`${I.value}-left-point`,class:"f-flow-ancher circle-left",onMousedown:l=>$(`${I.value}-left-point`,l)},null),s.createVNode("div",{id:`${I.value}-top-point`,class:"f-flow-ancher circle-top",onMousedown:l=>$(`${I.value}-top-point`,l)},null),s.createVNode("div",{id:`${I.value}-content`,class:L.value,style:"min-width:200px;min-height:200px;"},[P.value&&s.createVNode(pn,{modelValue:P.value,"onUpdate:modelValue":l=>P.value=l},null)]),s.createVNode("div",{id:`${I.value}-right-point`,class:"f-flow-ancher circle-right",onMousedown:l=>$(`${I.value}-right-point`,l)},null),s.createVNode("div",{id:`${I.value}-bottom-point`,class:"f-flow-ancher circle-bottom",onMousedown:l=>$(`${I.value}-bottom-point`,l)},null)])}});function vn(_){const U=new Map,I=new Map;function P(C,b){const m=I.get(C)||[];m.filter(E=>b.from===E.from&&b.to===E.to).length>0||(m.push(b),I.set(C,m))}function V(C,b,m,N){const E=new Set(U.get(b)||[]);E.add(N),U.set(b,[...E]);const p={from:b,to:N,type:"Curve"};P(C,p),P(m,p)}function y(C){return I.get(C)||[]}return{addConnection:V,getConnectionsOfNode:y}}const gn=s.defineComponent({name:"FFlowCanvas",props:Le,emits:[],setup(_,U){const I=s.ref(),P=Zt(),V=en(P),y=vn();s.provide("use-bezier-curve-composition",P),s.provide("use-connections-composition",y),s.provide("use-drawing-bezier-composition",V);const C=s.computed(()=>({transition:"transform 0.2s","background-color":"#F2F3F5",height:"100%",width:"100%",position:"relative"}));s.onMounted(()=>{I.value=_.modelValue});const b=s.ref(),m=s.ref(),N=s.ref(),E=s.ref(),p=s.ref();function S(i){const h=i.clientX-E.value,c=i.clientY-p.value;b.value&&b.value.position&&(b.value.position.x=m.value+h,b.value.position.y=N.value+c)}function f(){document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",f),b.value=void 0,E.value=void 0,p.value=void 0}function r(i,h){b.value=i,m.value=i.position.x,N.value=i.position.y,E.value=h.clientX,p.value=h.clientY,document.addEventListener("mousemove",S),document.addEventListener("mouseup",f)}return()=>s.createVNode("div",{class:"f-flow-canvas editorDiv flex-fill h-100"},[s.createVNode("div",{id:"svg-container",class:"f-struct-wrapper flex-fill",style:C.value},[I.value&&I.value.contents.map(i=>s.createVNode(mn,{modelValue:i.content[0],"onUpdate:modelValue":h=>i.content[0]=h,id:i.id,x:i.position.x,y:i.position.y,onMousedown:h=>r(i,h)},null))])])}});T.FFlowCanvas=gn,T.flowCanvasProps=Le,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});