@farris/ui-vue 1.2.4 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/components/accordion/index.esm.js +58 -58
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/accordion/package.json +1 -1
  4. package/components/avatar/index.esm.js +124 -116
  5. package/components/avatar/index.umd.cjs +1 -1
  6. package/components/avatar/package.json +1 -1
  7. package/components/border-editor/package.json +1 -1
  8. package/components/button/package.json +1 -1
  9. package/components/button-edit/index.css +1 -0
  10. package/components/button-edit/package.json +1 -1
  11. package/components/button-group/package.json +1 -1
  12. package/components/calculator/package.json +1 -1
  13. package/components/calendar/package.json +1 -1
  14. package/components/capsule/index.esm.js +1 -1
  15. package/components/capsule/index.umd.cjs +1 -1
  16. package/components/capsule/package.json +1 -1
  17. package/components/checkbox/index.esm.js +219 -209
  18. package/components/checkbox/index.umd.cjs +1 -1
  19. package/components/checkbox/package.json +1 -1
  20. package/components/color-picker/package.json +1 -1
  21. package/components/combo-list/index.esm.js +36 -28
  22. package/components/combo-list/index.umd.cjs +1 -1
  23. package/components/combo-list/package.json +1 -1
  24. package/components/combo-tree/index.esm.js +340 -107
  25. package/components/combo-tree/index.umd.cjs +1 -1
  26. package/components/combo-tree/package.json +1 -1
  27. package/components/common/index.esm.js +2 -2
  28. package/components/common/index.umd.cjs +1 -1
  29. package/components/common/package.json +1 -1
  30. package/components/component/index.esm.js +36 -29
  31. package/components/component/index.umd.cjs +1 -1
  32. package/components/component/package.json +1 -1
  33. package/components/condition/index.esm.js +406 -402
  34. package/components/condition/index.umd.cjs +1 -1
  35. package/components/condition/package.json +1 -1
  36. package/components/content-container/index.esm.js +9 -13
  37. package/components/content-container/index.umd.cjs +1 -1
  38. package/components/content-container/package.json +1 -1
  39. package/components/{tree-grid/style.css → data-grid/index.css} +1 -1
  40. package/components/data-grid/index.esm.js +4439 -4273
  41. package/components/data-grid/index.umd.cjs +1 -1
  42. package/components/data-grid/package.json +1 -1
  43. package/components/data-view/index.esm.js +2904 -2892
  44. package/components/data-view/index.umd.cjs +1 -1
  45. package/components/data-view/package.json +1 -1
  46. package/components/date-picker/index.esm.js +250 -242
  47. package/components/date-picker/index.umd.cjs +1 -1
  48. package/components/date-picker/package.json +1 -1
  49. package/components/designer-canvas/index.css +1 -0
  50. package/components/designer-canvas/index.esm.js +24 -21
  51. package/components/designer-canvas/index.umd.cjs +1 -1
  52. package/components/designer-canvas/package.json +1 -1
  53. package/components/designer-outline/index.esm.js +44 -42
  54. package/components/designer-outline/index.umd.cjs +1 -1
  55. package/components/designer-outline/package.json +1 -1
  56. package/components/designer-toolbox/index.esm.js +28 -467
  57. package/components/designer-toolbox/index.umd.cjs +1 -1
  58. package/components/designer-toolbox/package.json +1 -1
  59. package/components/discussion-editor/package.json +1 -1
  60. package/components/discussion-list/package.json +1 -1
  61. package/components/drawer/package.json +1 -1
  62. package/components/dropdown/index.esm.js +86 -86
  63. package/components/dropdown/index.umd.cjs +1 -1
  64. package/components/dropdown/package.json +1 -1
  65. package/components/dynamic-form/index.esm.js +984 -928
  66. package/components/dynamic-form/index.umd.cjs +1 -1
  67. package/components/dynamic-form/package.json +1 -1
  68. package/components/dynamic-resolver/index.esm.js +56 -47
  69. package/components/dynamic-resolver/index.umd.cjs +1 -1
  70. package/components/dynamic-resolver/package.json +1 -1
  71. package/components/dynamic-view/index.esm.js +281 -277
  72. package/components/dynamic-view/index.umd.cjs +1 -1
  73. package/components/dynamic-view/package.json +1 -1
  74. package/components/enum-editor/package.json +1 -1
  75. package/components/events-editor/package.json +1 -1
  76. package/components/expression-editor/package.json +1 -1
  77. package/components/external-container/index.css +1 -0
  78. package/components/external-container/index.esm.js +1917 -1901
  79. package/components/external-container/index.umd.cjs +1 -1
  80. package/components/external-container/package.json +1 -1
  81. package/components/field-selector/index.css +1 -0
  82. package/components/field-selector/index.esm.js +4185 -4023
  83. package/components/field-selector/index.umd.cjs +1 -1
  84. package/components/field-selector/package.json +1 -1
  85. package/components/filter-bar/{style.css → index.css} +1 -1
  86. package/components/filter-bar/index.esm.js +595 -581
  87. package/components/filter-bar/index.umd.cjs +1 -1
  88. package/components/filter-bar/package.json +1 -1
  89. package/components/flow-canvas/index.css +1 -0
  90. package/components/flow-canvas/index.esm.js +38 -35
  91. package/components/flow-canvas/index.umd.cjs +1 -1
  92. package/components/flow-canvas/package.json +1 -1
  93. package/components/image-cropper/package.json +1 -1
  94. package/components/input-group/index.esm.js +256 -248
  95. package/components/input-group/index.umd.cjs +1 -1
  96. package/components/input-group/package.json +1 -1
  97. package/components/layout/package.json +1 -1
  98. package/components/list-nav/package.json +1 -1
  99. package/components/list-view/index.esm.js +1522 -1519
  100. package/components/list-view/index.umd.cjs +1 -1
  101. package/components/list-view/package.json +1 -1
  102. package/components/loading/package.json +1 -1
  103. package/components/locale/package.json +1 -1
  104. package/components/lookup/index.css +1 -0
  105. package/components/lookup/index.esm.js +4629 -4410
  106. package/components/lookup/index.umd.cjs +1 -1
  107. package/components/lookup/package.json +1 -1
  108. package/components/mapping-editor/index.css +1 -0
  109. package/components/mapping-editor/index.esm.js +4454 -4255
  110. package/components/mapping-editor/index.umd.cjs +1 -1
  111. package/components/mapping-editor/package.json +1 -1
  112. package/components/message-box/index.css +1 -0
  113. package/components/message-box/index.esm.js +397 -386
  114. package/components/message-box/index.umd.cjs +1 -1
  115. package/components/message-box/package.json +1 -1
  116. package/components/modal/index.css +1 -0
  117. package/components/modal/index.esm.js +308 -297
  118. package/components/modal/index.umd.cjs +1 -1
  119. package/components/modal/package.json +1 -1
  120. package/components/nav/index.esm.js +511 -469
  121. package/components/nav/index.umd.cjs +2 -2
  122. package/components/nav/package.json +1 -1
  123. package/components/notify/package.json +1 -1
  124. package/components/order/index.esm.js +972 -920
  125. package/components/order/index.umd.cjs +1 -1
  126. package/components/order/package.json +1 -1
  127. package/components/page-footer/package.json +1 -1
  128. package/components/page-header/index.esm.js +917 -893
  129. package/components/page-header/index.umd.cjs +1 -1
  130. package/components/page-header/package.json +1 -1
  131. package/components/pagination/index.esm.js +491 -449
  132. package/components/pagination/index.umd.cjs +1 -1
  133. package/components/pagination/package.json +1 -1
  134. package/components/popover/package.json +1 -1
  135. package/components/progress/package.json +1 -1
  136. package/components/property-editor/index.esm.js +108 -101
  137. package/components/property-editor/index.umd.cjs +2 -2
  138. package/components/property-editor/package.json +1 -1
  139. package/components/property-panel/index.esm.js +361 -349
  140. package/components/property-panel/index.umd.cjs +1 -1
  141. package/components/property-panel/package.json +1 -1
  142. package/components/radio-button/package.json +1 -1
  143. package/components/radio-group/index.esm.js +72 -64
  144. package/components/radio-group/index.umd.cjs +1 -1
  145. package/components/radio-group/package.json +1 -1
  146. package/components/rate/package.json +1 -1
  147. package/components/response-layout/package.json +1 -1
  148. package/components/response-layout-editor/{style.css → index.css} +1 -1
  149. package/components/response-layout-editor/index.esm.js +452 -439
  150. package/components/response-layout-editor/index.umd.cjs +1 -1
  151. package/components/response-layout-editor/package.json +1 -1
  152. package/components/response-toolbar/index.esm.js +610 -592
  153. package/components/response-toolbar/index.umd.cjs +1 -1
  154. package/components/response-toolbar/package.json +1 -1
  155. package/components/schema-selector/index.css +1 -0
  156. package/components/schema-selector/index.esm.js +4041 -3749
  157. package/components/schema-selector/index.umd.cjs +8 -1
  158. package/components/schema-selector/package.json +1 -1
  159. package/components/search-box/package.json +1 -1
  160. package/components/section/index.esm.js +21 -14
  161. package/components/section/index.umd.cjs +1 -1
  162. package/components/section/package.json +1 -1
  163. package/components/smoke-detector/package.json +1 -1
  164. package/components/spacing-editor/package.json +1 -1
  165. package/components/splitter/package.json +1 -1
  166. package/components/step/package.json +1 -1
  167. package/components/switch/index.esm.js +159 -178
  168. package/components/switch/index.umd.cjs +1 -1
  169. package/components/switch/package.json +1 -1
  170. package/components/tabs/index.css +1 -0
  171. package/components/tabs/index.esm.js +1450 -1408
  172. package/components/tabs/index.umd.cjs +1 -1
  173. package/components/tabs/package.json +1 -1
  174. package/components/tags/package.json +1 -1
  175. package/components/text/package.json +1 -1
  176. package/components/textarea/index.esm.js +86 -78
  177. package/components/textarea/index.umd.cjs +1 -1
  178. package/components/textarea/package.json +1 -1
  179. package/components/time-picker/index.css +1 -0
  180. package/components/time-picker/index.esm.js +387 -379
  181. package/components/time-picker/index.umd.cjs +1 -1
  182. package/components/time-picker/package.json +1 -1
  183. package/components/tooltip/package.json +1 -1
  184. package/components/transfer/index.esm.js +95 -93
  185. package/components/transfer/index.umd.cjs +1 -1
  186. package/components/transfer/package.json +1 -1
  187. package/components/{data-grid/style.css → tree-grid/index.css} +1 -1
  188. package/components/tree-grid/index.esm.js +4437 -4271
  189. package/components/tree-grid/index.umd.cjs +1 -1
  190. package/components/tree-grid/package.json +1 -1
  191. package/components/tree-view/index.esm.js +1989 -1985
  192. package/components/tree-view/index.umd.cjs +1 -1
  193. package/components/tree-view/package.json +1 -1
  194. package/components/uploader/package.json +1 -1
  195. package/components/verify-detail/package.json +1 -1
  196. package/components/video/package.json +1 -1
  197. package/components/weather/package.json +1 -1
  198. package/farris.all.esm.js +12989 -12513
  199. package/farris.all.umd.cjs +9 -9
  200. package/index.css +1 -0
  201. package/package.json +2 -2
  202. package/types/combo-tree/src/combo-tree.props.d.ts +4 -0
  203. package/types/combo-tree/src/components/tree-container.component.d.ts +13 -3
  204. package/types/combo-tree/src/components/tree-container.props.d.ts +15 -1
  205. package/types/combo-tree/src/schema/schema-mapper.d.ts +2 -0
  206. package/types/combo-tree/src/schema/schema-resolver.d.ts +2 -0
  207. package/types/components.d.ts +1 -0
  208. package/types/condition/index.d.ts +60 -1
  209. package/types/data-grid/index.d.ts +5 -5
  210. package/types/data-grid/src/data-grid.component.d.ts +2 -2
  211. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  212. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +1 -1
  213. package/types/data-view/components/column-setting/column-setting.component.d.ts +2 -1
  214. package/types/data-view/composition/types.d.ts +2 -0
  215. package/types/designer-canvas/src/composition/dg-control.d.ts +8 -8
  216. package/types/designer-canvas/src/composition/types.d.ts +1 -0
  217. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +3 -3
  218. package/types/dynamic-form/src/types.d.ts +1 -1
  219. package/types/dynamic-resolver/index.d.ts +1 -0
  220. package/types/dynamic-resolver/src/converter/pagination.converter.d.ts +6 -0
  221. package/types/dynamic-resolver/src/visible-prop-resolver.d.ts +3 -0
  222. package/types/list-view/src/composition/types.d.ts +1 -1
  223. package/types/lookup/src/designer/use-lookup-rules.d.ts +3 -0
  224. package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +8 -0
  225. package/types/lookup/src/property-config/lookup.property-config.d.ts +29 -25
  226. package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
  227. package/types/message-box/index.d.ts +84 -1
  228. package/types/modal/src/modal.component.d.ts +3 -3
  229. package/types/modal/src/modal.props.d.ts +3 -5
  230. package/types/notify/index.d.ts +84 -1
  231. package/types/page-header/src/page-header.props.d.ts +7 -0
  232. package/types/page-header/src/property-config/page-header.property-config.d.ts +1 -1
  233. package/types/property-panel/src/composition/entity/base-property.d.ts +2 -0
  234. package/types/response-toolbar/index.d.ts +9 -3
  235. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
  236. package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
  237. package/types/response-toolbar/src/response-toolbar.component.d.ts +4 -2
  238. package/types/response-toolbar/src/response-toolbar.props.d.ts +9 -2
  239. package/types/schema-selector/src/composition/types.d.ts +3 -1
  240. package/types/schema-selector/src/schema-selector-editor.component.d.ts +5 -1
  241. package/types/tabs/src/designer/tab-toolbar.design.component.d.ts +1 -1
  242. package/types/tabs/src/tabs.props.d.ts +8 -0
  243. package/types/tree-grid/src/schema/column-resolver.d.ts +3 -0
  244. package/components/button-edit/style.css +0 -1
  245. package/components/designer-canvas/style.css +0 -1
  246. package/components/external-container/style.css +0 -1
  247. package/components/field-selector/style.css +0 -1
  248. package/components/flow-canvas/style.css +0 -1
  249. package/components/lookup/style.css +0 -1
  250. package/components/mapping-editor/style.css +0 -1
  251. package/components/message-box/style.css +0 -1
  252. package/components/modal/style.css +0 -1
  253. package/components/schema-selector/style.css +0 -1
  254. package/components/tabs/style.css +0 -1
  255. package/components/time-picker/style.css +0 -1
  256. package/style.css +0 -1
  257. package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +0 -19
  258. /package/components/border-editor/{style.css → index.css} +0 -0
  259. /package/components/checkbox/{style.css → index.css} +0 -0
  260. /package/components/date-picker/{style.css → index.css} +0 -0
  261. /package/components/designer-outline/{style.css → index.css} +0 -0
  262. /package/components/designer-toolbox/{style.css → index.css} +0 -0
  263. /package/components/discussion-editor/{style.css → index.css} +0 -0
  264. /package/components/discussion-list/{style.css → index.css} +0 -0
  265. /package/components/drawer/{style.css → index.css} +0 -0
  266. /package/components/events-editor/{style.css → index.css} +0 -0
  267. /package/components/list-view/{style.css → index.css} +0 -0
  268. /package/components/order/{style.css → index.css} +0 -0
  269. /package/components/property-editor/{style.css → index.css} +0 -0
  270. /package/components/property-panel/{style.css → index.css} +0 -0
  271. /package/components/radio-button/{style.css → index.css} +0 -0
  272. /package/components/radio-group/{style.css → index.css} +0 -0
  273. /package/components/smoke-detector/{style.css → index.css} +0 -0
  274. /package/components/spacing-editor/{style.css → index.css} +0 -0
  275. /package/components/splitter/{style.css → index.css} +0 -0
  276. /package/components/switch/{style.css → index.css} +0 -0
  277. /package/components/transfer/{style.css → index.css} +0 -0
  278. /package/components/uploader/{style.css → index.css} +0 -0
  279. /package/components/weather/{style.css → index.css} +0 -0
@@ -1 +1 @@
1
- (function(h,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue"),require("bignumber.js")):typeof define=="function"&&define.amd?define(["exports","vue","bignumber.js"],c):(h=typeof globalThis<"u"?globalThis:h||self,c(h.common={},h.Vue,h.BigNumber))})(this,function(h,c,M){"use strict";var nn=Object.defineProperty;var rn=(h,c,M)=>c in h?nn(h,c,{enumerable:!0,configurable:!0,writable:!0,value:M}):h[c]=M;var te=(h,c,M)=>rn(h,typeof c!="symbol"?c+"":c,M);function be(t,e,n,r){const a=c.ref(t.disabled),i=c.ref(!1),o=c.ref("text"),u=c.ref(t.showBorder),l=c.ref(t.textAlign),m=c.ref(t.updateOn),y=c.computed(()=>t.editable||!t.readonly),T=c.computed(()=>t.editable&&!t.disabled&&!t.readonly),w=c.computed(()=>!t.disabled&&i.value),v=c.computed(()=>n.value===""||n.value===null||n.value===void 0),b=c.computed(()=>(t.disabled||t.readonly)&&!t.forcePlaceholder?"":t.placeholder),s=c.computed(()=>t.readonly||!t.editable),d=c.computed(()=>t.enableTitle?n.value:""),x=c.computed(()=>({"form-control":!0,"f-utils-fill":!0,"text-left":l.value==="left","text-center":l.value==="center","text-right":l.value==="right"})),C=c.computed(()=>{const f={"f-cmp-inputgroup":!0,"input-group":!0,"f-state-disable":a.value,"f-state-editable":T.value,"f-state-readonly":s.value,"f-state-focus":w.value};return(t.customClass||"").split(" ").reduce((B,Q)=>(B[Q]=!0,B),f),f}),k=c.computed(()=>u.value?"":"border-width : 0 ");function _(f,D=!0){n.value=f,r.value!==f&&(r.value=f),D&&e.emit("change",f),e.emit("update:modelValue",f),e.emit("update:value",f)}c.watch(()=>t.modelValue,(f,D)=>{f!==D&&(n.value=f,r.value=f)}),c.watch(()=>t.disabled,(f,D)=>{f!==D&&(a.value=f)});function p(f){return i.value=!1,e.emit("blur",f),f.stopPropagation(),!1}function ee(f){e.emit("click",f)}function W(f){t.disabled||(u.value&&(i.value=!0),y.value&&e.emit("focus",f))}function Y(f){e.emit("input",f.target.value);const D=f.target.value;r.value=D,m.value==="input"&&(e.emit("update:modelValue",D),e.emit("update:value",D))}function O(f){e.emit("keydown",f)}function I(f){e.emit("keyup",f)}function j(f){f.target.tagName!=="INPUT"&&f.preventDefault(),f.stopPropagation()}function A(f){if(m.value==="blur"){const D=f.target.value;f.stopPropagation(),_(D)}}return{changeTextBoxValue:_,disabled:a,displayText:r,editable:T,hasFocused:w,inputGroupClass:C,inputType:o,isEmpty:v,modelValue:n,readonly:s,onBlur:p,onClick:ee,onFocus:W,onInput:Y,onKeydown:O,onKeyup:I,onMousedown:j,onTextBoxValueChange:A,placeholder:b,textBoxClass:x,textBoxTitle:d,inputGroupStyle:k}}function xe(t,e,n,r){const a=c.ref(t.disabled),i=c.ref(!1),o=c.ref("text"),u=c.ref(t.showBorder),l=c.ref(t.textAlign);c.computed(()=>t.editable||!t.readonly);const m=c.computed(()=>t.editable&&!t.disabled&&!t.readonly),y=c.computed(()=>!t.disabled&&i.value),T=c.computed(()=>n.value===""||n.value===null||n.value===void 0),w=c.computed(()=>t.placeholder),v=c.computed(()=>t.readonly||!t.editable),b=c.computed(()=>t.enableTitle?n.value:""),s=c.computed(()=>({"form-control":!0,"text-left":l.value==="left","text-center":l.value==="center","text-right":l.value==="right"})),d=c.computed(()=>({"f-cmp-inputgroup":!0,"input-group":!0,"f-state-disable":!0,"f-state-editable":!1,"f-state-readonly":!0})),x=c.computed(()=>u.value?"":"border-width : 0 ");return{disabled:a,displayText:r,editable:m,hasFocused:y,inputGroupClass:d,inputType:o,isEmpty:T,modelValue:n,readonly:v,placeholder:w,textBoxClass:s,textBoxTitle:b,inputGroupStyle:x}}function De(t,e,n){const r=c.ref(!1),a=c.computed(()=>t.enableClear&&!t.readonly&&!t.disabled),{changeTextBoxValue:i,displayText:o,hasFocused:u,isEmpty:l}=n;function m(s){r.value=s}c.watch(o,()=>{u!=null&&u.value?m(!!(o!=null&&o.value)):m(!1)});const y=c.computed(()=>({"input-group-text":!0,"input-group-clear":!0})),T=c.computed(()=>({width:"24px",display:r.value?"flex":"none"}));function w(s){s.stopPropagation(),a.value&&(i("",!0),m(!r.value),e.emit("clear"))}function v(s){a.value&&!l.value&&m(!0)}function b(s){a.value&&m(!1)}return{clearButtonClass:y,clearButtonStyle:T,hasShownClearButton:r,onClearValue:w,onMouseEnter:v,onMouseLeave:b,shouldShowClearButton:a}}const Me={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12},Te={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};class z{constructor(){te(this,"regexes",{YEAR:"[1-9]\\d{3}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",MONTHNAME:"jan|january|feb|february|mar|march|apr|april|may|jun|june|jul|july|aug|august|sep|september|oct|october|nov|november|dec|december",DAYNAME:"mon|monday|tue|tuesday|wed|wednesday|thu|thursday|fri|friday|sat|saturday|sun|sunday",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",TIMEZONE:"[+-][01]\\d\\:?[0-5]\\d",H24:"[01]\\d|2[0-3]",MIN:"[0-5]\\d",SEC:"[0-5]\\d",MS:"\\d{3,}",H12:"0?[1-9]|1[012]",AMPM:"am|pm",UNIT:"year|month|week|day|hour|minute|second|millisecond"});te(this,"patterns",[["iso_8601",this.makePattern("^(_YEAR_)-(_MONTH_)-(_DAY_)$"),"$2/$3/$1"],["us",this.makePattern("^(_MONTH_)([\\/-])(_DAY_)\\2(_YEAR_)$"),"$1/$3/$4"],["world",this.makePattern("^(_DAY_)([\\/\\.])(_MONTH_)\\2(_YEAR_)$"),"$3/$1/$4"],["chicago",this.makePattern("^(?:(?:_DAYNAME_),? )?(_DAY_)([ -])(_MONTHNAME_)\\2(_YEAR_)$"),"$3 $1, $4"],["conversational",this.makePattern("^(?:(?:_DAYNAME_),? )?(_MONTHNAME_) (_DAY_),? (_YEAR_)$"),"$1 $2, $3"],["month_day_time_year",this.makePattern("^(?:_DAYNAME_) (_MONTHNAME_) (_DAY_) ((?:_H24_)\\:(?:_MIN_)(?:\\:_SEC_)?) (_TIMEZONE_) (_YEAR_)$"),e=>{const n=(""+this.getMonthByName(e[1])).padStart(2,"0"),r=(""+e[2]).padStart(2,"0"),a=e[5],i=e[3],o=e[4],u=a+"-"+n+"-"+r+"T"+i+o;return isNaN(u)?!1:u}],["unix",/^@(-?\d+)$/,e=>this.create(parseInt(e[1],10)*1e3)],["24_hour",this.makePattern("^(?:(.+?)(?: |T))?(_H24_)\\:(_MIN_)(?:\\:(_SEC_)(?:\\.(_MS_))?)? ?(?:GMT)?(_TIMEZONE_)?(?: \\([A-Z]+\\))?$"),e=>{let n;const r=e[1];if(r){if(n=this.create(r),isNaN(n))return!1}else n=new Date,n.setMilliseconds(0);const a=e[2],i=e[3],o=e[4],u=e[5];return n.setHours(parseFloat(a),parseFloat(i),parseFloat(o||0)),u&&n.setMilliseconds(+String(u).slice(0,3)),n}],["12_hour",this.makePattern("^(?:(.+) )?(_H12_)(?:\\:(_MIN_)(?:\\:(_SEC_))?)? ?(_AMPM_)$"),e=>{let n;const r=e[1];if(r){if(n=this.create(r),isNaN(n))return!1}else n=new Date,n.setMilliseconds(0);let a=parseFloat(e[2]);a=e[5].toLowerCase()==="am"?a===12?0:a:a===12?12:a+12;const i=e[3],o=e[4];return n.setHours(a,parseFloat(i||0),parseFloat(o||0)),n}]])}makePattern(e){return e=e.replace(/_([A-Z][A-Z0-9]+)_/g,(n,r)=>this.regexes[r]),new RegExp(e,"i")}getMonthByName(e){return Me[String(e).slice(0,3).toLowerCase()]}getWeekdayByName(e){return Te[String(e).slice(0,3).toLowerCase()]}parse(e){if(!isNaN(Number(e)))return new Date(e);if(e=String(e).replace(/^\s*(.*)\s*$/,"$1"),e=e.replace(/\s{2,}/g," "),e==="")return Date.now();let n=0;for(;n<this.patterns.length;){const r=this.patterns[n];let a,i;typeof r[0]=="string"?(i=r[1],a=r[2]):(i=r[0],a=r[1]);const o=e.match(i);if(!o){n++;continue}if(typeof a=="function"){const u=a(o);if(u instanceof Date)return u}else{const u=Date.parse(e.replace(i,a));if(!isNaN(u))return new Date(u)}n++}return NaN}create(e){return e==null?Date.now():e instanceof Date?e:this.parse(e)}}function N(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function E(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const ne=6048e5,ve=864e5,re=6e4,ae=36e5;let Oe={};function L(){return Oe}function H(t,e){var u,l,m,y;const n=L(),r=(e==null?void 0:e.weekStartsOn)??((l=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((y=(m=n.locale)==null?void 0:m.options)==null?void 0:y.weekStartsOn)??0,a=N(t),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function X(t){return H(t,{weekStartsOn:1})}function ie(t){const e=N(t),n=e.getFullYear(),r=E(t,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=X(r),i=E(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=X(i);return e.getTime()>=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function oe(t){const e=N(t);return e.setHours(0,0,0,0),e}function ue(t){const e=N(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function Ne(t,e){const n=oe(t),r=oe(e),a=+n-ue(n),i=+r-ue(r);return Math.round((a-i)/ve)}function ke(t){const e=ie(t),n=E(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),X(n)}function Ce(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function se(t){if(!Ce(t)&&typeof t!="number")return!1;const e=N(t);return!isNaN(Number(e))}function Se(t){const e=N(t),n=E(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const _e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ye=(t,e,n)=>{let r;const a=_e[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Z(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Ae={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ee={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Fe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},We={date:Z({formats:Ae,defaultWidth:"full"}),time:Z({formats:Ee,defaultWidth:"full"}),dateTime:Z({formats:Fe,defaultWidth:"full"})},Pe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},He=(t,e,n,r)=>Pe[t];function R(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,u=n!=null&&n.width?String(n.width):o;a=t.formattingValues[u]||t.formattingValues[o]}else{const o=t.defaultWidth,u=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[u]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const Re={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},pe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ie={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},je={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Be={ordinalNumber:(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:R({values:Re,defaultWidth:"wide"}),quarter:R({values:qe,defaultWidth:"wide",argumentCallback:t=>t-1}),month:R({values:$e,defaultWidth:"wide"}),day:R({values:pe,defaultWidth:"wide"}),dayPeriod:R({values:Ie,defaultWidth:"wide",formattingValues:je,defaultFormattingWidth:"wide"})};function q(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(u)?Xe(u,T=>T.test(o)):Le(u,T=>T.test(o));let m;m=t.valueCallback?t.valueCallback(l):l,m=n.valueCallback?n.valueCallback(m):m;const y=e.slice(o.length);return{value:m,rest:y}}}function Le(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Xe(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Ge(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const u=e.slice(a.length);return{value:o,rest:u}}}const Ue=/^(\d+)(th|st|nd|rd)?/i,Qe=/\d+/i,ze={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ze={any:[/^b/i,/^(a|c)/i]},Je={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ve={any:[/1/i,/2/i,/3/i,/4/i]},Ke={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},et={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},tt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},nt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},rt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},at={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},it={ordinalNumber:Ge({matchPattern:Ue,parsePattern:Qe,valueCallback:t=>parseInt(t,10)}),era:q({matchPatterns:ze,defaultMatchWidth:"wide",parsePatterns:Ze,defaultParseWidth:"any"}),quarter:q({matchPatterns:Je,defaultMatchWidth:"wide",parsePatterns:Ve,defaultParseWidth:"any",valueCallback:t=>t+1}),month:q({matchPatterns:Ke,defaultMatchWidth:"wide",parsePatterns:et,defaultParseWidth:"any"}),day:q({matchPatterns:tt,defaultMatchWidth:"wide",parsePatterns:nt,defaultParseWidth:"any"}),dayPeriod:q({matchPatterns:rt,defaultMatchWidth:"any",parsePatterns:at,defaultParseWidth:"any"})},ot={code:"en-US",formatDistance:Ye,formatLong:We,formatRelative:He,localize:Be,match:it,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ut(t){const e=N(t);return Ne(e,Se(e))+1}function st(t){const e=N(t),n=+X(e)-+ke(e);return Math.round(n/ne)+1}function ce(t,e){var y,T,w,v;const n=N(t),r=n.getFullYear(),a=L(),i=(e==null?void 0:e.firstWeekContainsDate)??((T=(y=e==null?void 0:e.locale)==null?void 0:y.options)==null?void 0:T.firstWeekContainsDate)??a.firstWeekContainsDate??((v=(w=a.locale)==null?void 0:w.options)==null?void 0:v.firstWeekContainsDate)??1,o=E(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const u=H(o,e),l=E(t,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const m=H(l,e);return n.getTime()>=u.getTime()?r+1:n.getTime()>=m.getTime()?r:r-1}function ct(t,e){var u,l,m,y;const n=L(),r=(e==null?void 0:e.firstWeekContainsDate)??((l=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((y=(m=n.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,a=ce(t,e),i=E(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),H(i,e)}function lt(t,e){const n=N(t),r=+H(n,e)-+ct(n,e);return Math.round(r/ne)+1}function g(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const S={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return g(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):g(n+1,2)},d(t,e){return g(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return g(t.getHours()%12||12,e.length)},H(t,e){return g(t.getHours(),e.length)},m(t,e){return g(t.getMinutes(),e.length)},s(t,e){return g(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return g(a,e.length)}},P={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},le={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return S.y(t,e)},Y:function(t,e,n,r){const a=ce(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return g(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):g(i,e.length)},R:function(t,e){const n=ie(t);return g(n,e.length)},u:function(t,e){const n=t.getFullYear();return g(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return g(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return g(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return S.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return g(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=lt(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):g(a,e.length)},I:function(t,e,n){const r=st(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):g(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):S.d(t,e)},D:function(t,e,n){const r=ut(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):g(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return g(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return g(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return g(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=P.noon:r===0?a=P.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=P.evening:r>=12?a=P.afternoon:r>=4?a=P.morning:a=P.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return S.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):S.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):g(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):g(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):S.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):S.s(t,e)},S:function(t,e){return S.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return fe(r);case"XXXX":case"XX":return F(r);case"XXXXX":case"XXX":default:return F(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return fe(r);case"xxxx":case"xx":return F(r);case"xxxxx":case"xxx":default:return F(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+de(r,":");case"OOOO":default:return"GMT"+F(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+de(r,":");case"zzzz":default:return"GMT"+F(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return g(r,e.length)},T:function(t,e,n){const r=t.getTime();return g(r,e.length)}};function de(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+g(i,2)}function fe(t,e){return t%60===0?(t>0?"-":"+")+g(Math.abs(t)/60,2):F(t,e)}function F(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=g(Math.trunc(r/60),2),i=g(r%60,2);return n+a+e+i}const me=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},he=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},dt={p:he,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return me(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",me(r,e)).replace("{{time}}",he(a,e))}},ft=/^D+$/,mt=/^Y+$/,ht=["D","DD","YY","YYYY"];function gt(t){return ft.test(t)}function wt(t){return mt.test(t)}function yt(t,e,n){const r=bt(t,e,n);if(console.warn(r),ht.includes(t))throw new RangeError(r)}function bt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const xt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mt=/^'([^]*?)'?$/,Tt=/''/g,vt=/[a-zA-Z]/;function G(t,e,n){var y,T,w,v;const r=L(),a=r.locale??ot,i=r.firstWeekContainsDate??((T=(y=r.locale)==null?void 0:y.options)==null?void 0:T.firstWeekContainsDate)??1,o=r.weekStartsOn??((v=(w=r.locale)==null?void 0:w.options)==null?void 0:v.weekStartsOn)??0,u=N(t);if(!se(u))throw new RangeError("Invalid time value");let l=e.match(Dt).map(b=>{const s=b[0];if(s==="p"||s==="P"){const d=dt[s];return d(b,a.formatLong)}return b}).join("").match(xt).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const s=b[0];if(s==="'")return{isToken:!1,value:Ot(b)};if(le[s])return{isToken:!0,value:b};if(s.match(vt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return{isToken:!1,value:b}});a.localize.preprocessor&&(l=a.localize.preprocessor(u,l));const m={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return l.map(b=>{if(!b.isToken)return b.value;const s=b.value;(wt(s)||gt(s))&&yt(s,e,String(t));const d=le[s[0]];return d(u,s,a.localize,m)}).join("")}function Ot(t){const e=t.match(Mt);return e?e[1].replace(Tt,"'"):t}function J(t,e){const r=St(t);let a;if(r.date){const l=_t(r.date,2);a=Yt(l.restDateString,l.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,u;if(r.time&&(o=At(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(u=Et(r.timezone),isNaN(u))return new Date(NaN)}else{const l=new Date(i+o),m=new Date(0);return m.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),m.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),m}return new Date(i+o+u)}const U={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Nt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,kt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ct=/^([+-])(\d{2})(?::?(\d{2}))?$/;function St(t){const e={},n=t.split(U.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],U.timeZoneDelimiter.test(e.date)&&(e.date=t.split(U.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=U.timezone.exec(r);a?(e.time=r.replace(a[1],""),e.timezone=a[1]):e.time=r}return e}function _t(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function Yt(t,e){if(e===null)return new Date(NaN);const n=t.match(Nt);if(!n)return new Date(NaN);const r=!!n[4],a=$(n[1]),i=$(n[2])-1,o=$(n[3]),u=$(n[4]),l=$(n[5])-1;if(r)return Rt(e,u,l)?Ft(e,u,l):new Date(NaN);{const m=new Date(0);return!Pt(e,i,o)||!Ht(e,a)?new Date(NaN):(m.setUTCFullYear(e,i,Math.max(a,o)),m)}}function $(t){return t?parseInt(t):1}function At(t){const e=t.match(kt);if(!e)return NaN;const n=V(e[1]),r=V(e[2]),a=V(e[3]);return qt(n,r,a)?n*ae+r*re+a*1e3:NaN}function V(t){return t&&parseFloat(t.replace(",","."))||0}function Et(t){if(t==="Z")return 0;const e=t.match(Ct);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return $t(r,a)?n*(r*ae+a*re):NaN}function Ft(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const Wt=[31,null,31,30,31,30,31,31,30,31,30,31];function ge(t){return t%400===0||t%4===0&&t%100!==0}function Pt(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(Wt[e]||(ge(t)?29:28))}function Ht(t,e){return e>=1&&e<=(ge(t)?366:365)}function Rt(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function qt(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function $t(t,e){return e>=0&&e<=59}function pt(){const t=new z;function e(n,r){var i;if(!n||typeof n=="string"&&n.indexOf("0001")===0)return"";if(n instanceof Date)return G(n,r);let a=J(n);if(a=="Invalid Date"&&(a=t.create(n)||new Date(n)),se(a))return a=J(G(a,"yyyy-MM-dd HH:mm:ss")),G(a,r);if(r.indexOf("HH")===0||r.indexOf("hh")===0){const o=(i=n.match(/\d*/g))==null?void 0:i.filter(l=>l!=="").join(":");(r==="HH"||r==="hh")&&(r+=":mm");const u=J("2024-06-05 "+o);return G(u,r)}return""}return{formatTo:e}}function It(){function t(){const n=r=>{const a=Math.random()*16|0;return(r==="x"?a:a&3|8).toString(16)};return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n)}function e(n,r){const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=[];let o;if(r=r||a.length,n)for(o=0;o<n;o++)i[o]=a[0|Math.random()*r];else{let u;for(i[8]=i[13]=i[18]=i[23]="-",i[14]="4",o=0;o<36;o++)i[o]||(u=0|Math.random()*16,i[o]=a[o==19?u&3|8:u])}return i.join("")}return{guid:t,uuid:e}}function jt(){function t(s,d=null){return Array.isArray(s)?M.max.apply(null,s).toFixed():s&&d?M.maximum(s,d).toFixed():(console.error("请提供比较的值firstValue、secondValue."),"")}function e(s,d=null){return Array.isArray(s)?M.min.apply(null,s).toFixed():s&&d?M.minimum(s,d).toFixed():(console.error("请提供比较的值firstValue、secondValue."),"")}function n(s){return M.sum.apply(null,s).toFixed()}function r(s,d){return new M(s).div(d).toFixed()}function a(s,d){return new M(s).plus(d).toFixed()}function i(s,d){return new M(s).times(d).toFixed()}function o(s,d){return new M(s).minus(d).toFixed()}function u(s,d){return new M(s).eq(d)}function l(s,d){return new M(s).lt(d)}function m(s,d){return new M(s).gt(d)}function y(s){return new M(s).toNumber()}function T(s,d=0){return new M(s).toFixed(d)}function w(s){const d=new Array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖"),x=new Array("","拾","佰","仟"),C=new Array("","万","亿","兆"),k=new Array("角","分","毫","厘"),_="整",p="元",ee=1e15;let W,Y,O="",I;if(s=="")return"";const j=parseFloat(s);if(j>=ee)return"";if(j===0)return O=d[0]+p+_,O;if(s=j.toString(),s.indexOf(".")===-1?(W=s,Y=""):(I=s.split("."),W=I[0],Y=I[1].substr(0,4)),parseInt(W,10)>0){let A=0;const f=W.length;for(let D=0;D<f;D++){const B=W.substr(D,1),Q=f-D-1,tn=Q/4,ye=Q%4;B=="0"?A++:(A>0&&(O+=d[0]),A=0,O+=d[parseInt(B,10)]+x[ye]),ye==0&&A<4&&(O+=C[tn])}O+=p}if(Y!==""){const A=Y.length;for(let f=0;f<A;f++){let D=Y.substr(f,1);D!=="0"&&(O+=d[Number(D)]+k[f])}}return O===""?O+=d[0]+p+_:Y===""&&(O+=_),O}function v(s,d){var x=s==null||typeof s=="number"&&isNaN(s)?"":String(s);return d&&(d.prefix&&(x=x.replace(new RegExp(d.prefix,"g"),"")),d.suffix&&(x=x.replace(new RegExp(d.suffix,"g"),"")),x=x.replace(/\,/g,"")),x}function b(s,d){const x=new M(s),C={prefix:d.prefix||"",suffix:d.suffix||"",decimalSeparator:d.decimalSeparator||".",groupSeparator:d.groupSeparator||"",groupSize:3};if(x.isNaN())return"";let k=d.precision||0;return k=Number(k),x.toFormat(k,C)}return{formatTo:b,removeFormat:v,convertCurrency:w,toFixed:T,toNumber:y,greaterThan:m,lessThan:l,equal:u,minus:o,multiplied:i,plus:a,average:r,sum:n,min:e,max:t}}const Bt=["秒","分钟","小时","天","周","个月","年"],K=[60,60,24,7,365/7/12,12];function Lt(){const t=new z;function e(o,u){if(u===0)return["刚刚","片刻后"];const l=Bt[~~(u/2)];return[`${o} ${l}前`,`${o} ${l}后`]}function n(o){if(typeof o=="object")return o;{let u=t.create(o);return typeof u=="object"?u:new Date}}function r(o,u){return(+(u?n(u):new Date)-+n(o))/1e3}function a(o){const u=o<0?1:0;o=Math.abs(o);let l=0;for(;o>=K[l]&&l<K.length;l++)o/=K[l];return o=Math.floor(o),l*=2,o>(l===0?9:1)&&(l+=1),e(o,l)[u].replace("%s",o.toString())}function i(o,u){const l=r(o,u&&u.relativeDate);return a(l)}return{formatTo:i}}const we=["moz","ms","webkit"];function Xt(){let t=0;return e=>{const n=new Date().getTime(),r=Math.max(0,16-(n-t)),a=setTimeout(()=>{e(n+r)},r);return t=n+r,a}}function Gt(){if(typeof window>"u")return()=>0;if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);const t=we.filter(e=>`${e}RequestAnimationFrame`in window)[0];return t?window[`${t}RequestAnimationFrame`]:Xt()}function Ut(t){if(typeof window>"u")return null;if(window.cancelAnimationFrame)return window.cancelAnimationFrame(t);const e=we.filter(n=>`${n}CancelAnimationFrame`in window||`${n}CancelRequestAnimationFrame`in window)[0];return e?(window[`${e}CancelAnimationFrame`]||window[`${e}CancelRequestAnimationFrame`]).call(this,t):clearTimeout(t)}const Qt=Gt();function zt(t,e){return((e==null?void 0:e.split(" "))||[]).reduce((r,a)=>(a&&(r[a]=!0),r),t),t}function Zt(t,e){return((e==null?void 0:e.split(";"))||[]).reduce((r,a)=>{if(a){const i=a.split(":");r[i[0]]=i[1]}return r},t),t}const Jt=t=>{const e=t;return e.install=function(n){n.component(e.name,t)},t},Vt=Symbol("checkboxGroupContext");function Kt(t,e,n,r){const a=c.computed(()=>n==null?void 0:n.name),i=c.computed(()=>t.disabled||(n==null?void 0:n.disabled)),o=c.computed(()=>(n==null?void 0:n.mode)==="tag"),u=c.computed(()=>(n==null?void 0:n.mode)==="button"),l=c.computed(()=>!o.value&&!u.value),m=c.computed(()=>(n==null?void 0:n.size)==="small"),y=c.computed(()=>(n==null?void 0:n.size)==="large"),T=c.computed(()=>(n==null?void 0:n.size)==="middle"||(n==null?void 0:n.size)!=="small"&&(n==null?void 0:n.size)!=="large"),w=c.computed(()=>n?n.modelValue===t.value||n.modelValue.includes(t.value):t.checked),v=c.computed(()=>({btn:!0,"f-radio-button":!0,"btn-sm":m.value,"btn-lg":y.value,"btn-md":T.value,active:w.value,[`f-radio-button-${(n==null?void 0:n.type)||"primary"}`]:!0})),b=c.computed(()=>({"f-radio-tag":!0,[`f-radio-tag-${(n==null?void 0:n.type)||"primary"}`]:!0,active:w.value}));return{disabled:i,name:a,shouldRenderButton:u,shouldRenderNative:l,shouldRenderTag:o,buttonClass:v,tagClass:b,checked:w,onClickRadio:x=>{x.stopPropagation(),!i.value&&(n?w.value||(r.emit("update:modelValue",t.value),r.emit("changeValue",t.value)):e.emit("update:checked",!w.value))},onClickCheckBox:x=>{var C;if(x.stopPropagation(),!i.value)if(n)if(!w.value)r.emit("update:modelValue",[...n.modelValue,t.value]),r.emit("changeValue",[...n.modelValue,t.value]);else{const k=(C=n.modelValue)==null?void 0:C.filter(_=>_!==t.value);r.emit("update:modelValue",k),r.emit("changeValue",k)}else e.emit("update:checked",!w.value),e.emit("changeValue",!w.value),e.emit("change",{originalEvent:x,checked:!w.value})}}}const en={checked:{type:Boolean,default:!1},mode:{type:String,default:"default"},type:{type:String,default:"secondary"},size:{type:String,default:"middle"}};h.CHECKBOX_CONTEXT=Vt,h.DateConverter=z,h.cancelRequestAnimationFrame=Ut,h.getCustomClass=zt,h.getCustomStyle=Zt,h.radioCheckBoxCommonProps=en,h.useCheck=Kt,h.useClear=De,h.useDateFormat=pt,h.useGuid=It,h.useNumberFormat=jt,h.useReqAnimationFrame=Qt,h.useTextBox=be,h.useTextBoxDesign=xe,h.useTimeAgo=Lt,h.withInstall=Jt,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
1
+ (function(h,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue"),require("bignumber.js")):typeof define=="function"&&define.amd?define(["exports","vue","bignumber.js"],c):(h=typeof globalThis<"u"?globalThis:h||self,c(h.common={},h.Vue,h.BigNumber))})(this,function(h,c,M){"use strict";var nn=Object.defineProperty;var rn=(h,c,M)=>c in h?nn(h,c,{enumerable:!0,configurable:!0,writable:!0,value:M}):h[c]=M;var te=(h,c,M)=>rn(h,typeof c!="symbol"?c+"":c,M);function be(t,e,n,r){const a=c.ref(t.disabled),i=c.ref(!1),o=c.ref("text"),u=c.ref(t.showBorder),l=c.ref(t.textAlign),m=c.ref(t.updateOn),y=c.computed(()=>t.editable||!t.readonly),T=c.computed(()=>t.editable&&!t.disabled&&!t.readonly),w=c.computed(()=>!t.disabled&&i.value),v=c.computed(()=>n.value===""||n.value===null||n.value===void 0),b=c.computed(()=>(t.disabled||t.readonly)&&!t.forcePlaceholder?"":t.placeholder),s=c.computed(()=>t.readonly||!t.editable),d=c.computed(()=>t.enableTitle?n.value:""),x=c.computed(()=>({"form-control":!0,"f-utils-fill":!0,"text-left":l.value==="left","text-center":l.value==="center","text-right":l.value==="right"})),C=c.computed(()=>{const f={"f-cmp-inputgroup":!0,"input-group":!0,"f-state-disable":a.value,"f-state-editable":T.value,"f-state-readonly":s.value,"f-state-focus":w.value};return(t.customClass||"").split(" ").reduce((B,Q)=>(B[Q]=!0,B),f),f}),k=c.computed(()=>u.value?"":"border-width : 0 ");function _(f,D=!0){n.value=f,r.value!==f&&(r.value=f),D&&e.emit("change",f),e.emit("update:modelValue",f),e.emit("update:value",f)}c.watch(()=>t.modelValue,(f,D)=>{f!==D&&(n.value=f,r.value=f)}),c.watch(()=>t.disabled,(f,D)=>{f!==D&&(a.value=f)});function p(f){return i.value=!1,e.emit("blur",f),f.stopPropagation(),!1}function ee(f){e.emit("click",f)}function W(f){t.disabled||(u.value&&(i.value=!0),y.value&&e.emit("focus",f))}function Y(f){e.emit("input",f.target.value);const D=f.target.value;r.value=D,m.value==="input"&&(e.emit("update:modelValue",D),e.emit("update:value",D))}function O(f){e.emit("keydown",f)}function I(f){e.emit("keyup",f)}function j(f){f.target.tagName!=="INPUT"&&f.preventDefault(),f.stopPropagation()}function A(f){if(m.value==="blur"){const D=f.target.value;f.stopPropagation(),_(D)}}return{changeTextBoxValue:_,disabled:a,displayText:r,editable:T,hasFocused:w,inputGroupClass:C,inputType:o,isEmpty:v,modelValue:n,readonly:s,onBlur:p,onClick:ee,onFocus:W,onInput:Y,onKeydown:O,onKeyup:I,onMousedown:j,onTextBoxValueChange:A,placeholder:b,textBoxClass:x,textBoxTitle:d,inputGroupStyle:k}}function xe(t,e,n,r){const a=c.ref(t.disabled),i=c.ref(!1),o=c.ref("text"),u=c.ref(t.showBorder),l=c.ref(t.textAlign);c.computed(()=>t.editable||!t.readonly);const m=c.computed(()=>t.editable&&!t.disabled&&!t.readonly),y=c.computed(()=>!t.disabled&&i.value),T=c.computed(()=>n.value===""||n.value===null||n.value===void 0),w=c.computed(()=>t.placeholder),v=c.computed(()=>t.readonly||!t.editable),b=c.computed(()=>t.enableTitle?n.value:""),s=c.computed(()=>({"form-control":!0,"text-left":l.value==="left","text-center":l.value==="center","text-right":l.value==="right"})),d=c.computed(()=>({"f-cmp-inputgroup":!0,"input-group":!0,"f-state-disable":!0,"f-state-editable":!1,"f-state-readonly":!0})),x=c.computed(()=>u.value?"":"border-width : 0 ");return{disabled:a,displayText:r,editable:m,hasFocused:y,inputGroupClass:d,inputType:o,isEmpty:T,modelValue:n,readonly:v,placeholder:w,textBoxClass:s,textBoxTitle:b,inputGroupStyle:x}}function De(t,e,n){const r=c.ref(!1),a=c.computed(()=>t.enableClear&&!t.readonly&&!t.disabled),{changeTextBoxValue:i,displayText:o,hasFocused:u,isEmpty:l}=n;function m(s){r.value=s}c.watch(o,()=>{u!=null&&u.value?m(!!(o!=null&&o.value)):m(!1)});const y=c.computed(()=>({"input-group-text":!0,"input-group-clear":!0})),T=c.computed(()=>({width:"24px",display:r.value?"flex":"none"}));function w(s){s.stopPropagation(),a.value&&(i("",!0),m(!r.value),e.emit("clear"))}function v(s){a.value&&!l.value&&m(!0)}function b(s){a.value&&m(!1)}return{clearButtonClass:y,clearButtonStyle:T,hasShownClearButton:r,onClearValue:w,onMouseEnter:v,onMouseLeave:b,shouldShowClearButton:a}}const Me={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12},Te={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};class z{constructor(){te(this,"regexes",{YEAR:"[1-9]\\d{3}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",MONTHNAME:"jan|january|feb|february|mar|march|apr|april|may|jun|june|jul|july|aug|august|sep|september|oct|october|nov|november|dec|december",DAYNAME:"mon|monday|tue|tuesday|wed|wednesday|thu|thursday|fri|friday|sat|saturday|sun|sunday",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",TIMEZONE:"[+-][01]\\d\\:?[0-5]\\d",H24:"[01]\\d|2[0-3]",MIN:"[0-5]\\d",SEC:"[0-5]\\d",MS:"\\d{3,}",H12:"0?[1-9]|1[012]",AMPM:"am|pm",UNIT:"year|month|week|day|hour|minute|second|millisecond"});te(this,"patterns",[["iso_8601",this.makePattern("^(_YEAR_)-(_MONTH_)-(_DAY_)$"),"$2/$3/$1"],["us",this.makePattern("^(_MONTH_)([\\/-])(_DAY_)\\2(_YEAR_)$"),"$1/$3/$4"],["world",this.makePattern("^(_DAY_)([\\/\\.])(_MONTH_)\\2(_YEAR_)$"),"$3/$1/$4"],["chicago",this.makePattern("^(?:(?:_DAYNAME_),? )?(_DAY_)([ -])(_MONTHNAME_)\\2(_YEAR_)$"),"$3 $1, $4"],["conversational",this.makePattern("^(?:(?:_DAYNAME_),? )?(_MONTHNAME_) (_DAY_),? (_YEAR_)$"),"$1 $2, $3"],["month_day_time_year",this.makePattern("^(?:_DAYNAME_) (_MONTHNAME_) (_DAY_) ((?:_H24_)\\:(?:_MIN_)(?:\\:_SEC_)?) (_TIMEZONE_) (_YEAR_)$"),e=>{const n=(""+this.getMonthByName(e[1])).padStart(2,"0"),r=(""+e[2]).padStart(2,"0"),a=e[5],i=e[3],o=e[4],u=a+"-"+n+"-"+r+"T"+i+o;return isNaN(u)?!1:u}],["unix",/^@(-?\d+)$/,e=>this.create(parseInt(e[1],10)*1e3)],["24_hour",this.makePattern("^(?:(.+?)(?: |T))?(_H24_)\\:(_MIN_)(?:\\:(_SEC_)(?:\\.(_MS_))?)? ?(?:GMT)?(_TIMEZONE_)?(?: \\([A-Z]+\\))?$"),e=>{let n;const r=e[1];if(r){if(n=this.create(r),isNaN(n))return!1}else n=new Date,n.setMilliseconds(0);const a=e[2],i=e[3],o=e[4],u=e[5];return n.setHours(parseFloat(a),parseFloat(i),parseFloat(o||0)),u&&n.setMilliseconds(+String(u).slice(0,3)),n}],["12_hour",this.makePattern("^(?:(.+) )?(_H12_)(?:\\:(_MIN_)(?:\\:(_SEC_))?)? ?(_AMPM_)$"),e=>{let n;const r=e[1];if(r){if(n=this.create(r),isNaN(n))return!1}else n=new Date,n.setMilliseconds(0);let a=parseFloat(e[2]);a=e[5].toLowerCase()==="am"?a===12?0:a:a===12?12:a+12;const i=e[3],o=e[4];return n.setHours(a,parseFloat(i||0),parseFloat(o||0)),n}]])}makePattern(e){return e=e.replace(/_([A-Z][A-Z0-9]+)_/g,(n,r)=>this.regexes[r]),new RegExp(e,"i")}getMonthByName(e){return Me[String(e).slice(0,3).toLowerCase()]}getWeekdayByName(e){return Te[String(e).slice(0,3).toLowerCase()]}parse(e){if(!isNaN(Number(e)))return new Date(e);if(e=String(e).replace(/^\s*(.*)\s*$/,"$1"),e=e.replace(/\s{2,}/g," "),e==="")return Date.now();let n=0;for(;n<this.patterns.length;){const r=this.patterns[n];let a,i;typeof r[0]=="string"?(i=r[1],a=r[2]):(i=r[0],a=r[1]);const o=e.match(i);if(!o){n++;continue}if(typeof a=="function"){const u=a(o);if(u instanceof Date)return u}else{const u=Date.parse(e.replace(i,a));if(!isNaN(u))return new Date(u)}n++}return NaN}create(e){return e==null?Date.now():e instanceof Date?e:this.parse(e)}}function N(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function E(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const ne=6048e5,ve=864e5,re=6e4,ae=36e5;let Oe={};function L(){return Oe}function H(t,e){var u,l,m,y;const n=L(),r=(e==null?void 0:e.weekStartsOn)??((l=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((y=(m=n.locale)==null?void 0:m.options)==null?void 0:y.weekStartsOn)??0,a=N(t),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function X(t){return H(t,{weekStartsOn:1})}function ie(t){const e=N(t),n=e.getFullYear(),r=E(t,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=X(r),i=E(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=X(i);return e.getTime()>=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function oe(t){const e=N(t);return e.setHours(0,0,0,0),e}function ue(t){const e=N(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function Ne(t,e){const n=oe(t),r=oe(e),a=+n-ue(n),i=+r-ue(r);return Math.round((a-i)/ve)}function ke(t){const e=ie(t),n=E(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),X(n)}function Ce(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function se(t){if(!Ce(t)&&typeof t!="number")return!1;const e=N(t);return!isNaN(Number(e))}function Se(t){const e=N(t),n=E(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const _e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ye=(t,e,n)=>{let r;const a=_e[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Z(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Ae={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ee={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Fe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},We={date:Z({formats:Ae,defaultWidth:"full"}),time:Z({formats:Ee,defaultWidth:"full"}),dateTime:Z({formats:Fe,defaultWidth:"full"})},Pe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},He=(t,e,n,r)=>Pe[t];function R(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,u=n!=null&&n.width?String(n.width):o;a=t.formattingValues[u]||t.formattingValues[o]}else{const o=t.defaultWidth,u=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[u]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const Re={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},pe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ie={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},je={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Be={ordinalNumber:(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:R({values:Re,defaultWidth:"wide"}),quarter:R({values:qe,defaultWidth:"wide",argumentCallback:t=>t-1}),month:R({values:$e,defaultWidth:"wide"}),day:R({values:pe,defaultWidth:"wide"}),dayPeriod:R({values:Ie,defaultWidth:"wide",formattingValues:je,defaultFormattingWidth:"wide"})};function q(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(u)?Xe(u,T=>T.test(o)):Le(u,T=>T.test(o));let m;m=t.valueCallback?t.valueCallback(l):l,m=n.valueCallback?n.valueCallback(m):m;const y=e.slice(o.length);return{value:m,rest:y}}}function Le(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Xe(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Ge(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const u=e.slice(a.length);return{value:o,rest:u}}}const Ue=/^(\d+)(th|st|nd|rd)?/i,Qe=/\d+/i,ze={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ze={any:[/^b/i,/^(a|c)/i]},Je={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ve={any:[/1/i,/2/i,/3/i,/4/i]},Ke={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},et={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},tt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},nt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},rt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},at={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},it={ordinalNumber:Ge({matchPattern:Ue,parsePattern:Qe,valueCallback:t=>parseInt(t,10)}),era:q({matchPatterns:ze,defaultMatchWidth:"wide",parsePatterns:Ze,defaultParseWidth:"any"}),quarter:q({matchPatterns:Je,defaultMatchWidth:"wide",parsePatterns:Ve,defaultParseWidth:"any",valueCallback:t=>t+1}),month:q({matchPatterns:Ke,defaultMatchWidth:"wide",parsePatterns:et,defaultParseWidth:"any"}),day:q({matchPatterns:tt,defaultMatchWidth:"wide",parsePatterns:nt,defaultParseWidth:"any"}),dayPeriod:q({matchPatterns:rt,defaultMatchWidth:"any",parsePatterns:at,defaultParseWidth:"any"})},ot={code:"en-US",formatDistance:Ye,formatLong:We,formatRelative:He,localize:Be,match:it,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ut(t){const e=N(t);return Ne(e,Se(e))+1}function st(t){const e=N(t),n=+X(e)-+ke(e);return Math.round(n/ne)+1}function ce(t,e){var y,T,w,v;const n=N(t),r=n.getFullYear(),a=L(),i=(e==null?void 0:e.firstWeekContainsDate)??((T=(y=e==null?void 0:e.locale)==null?void 0:y.options)==null?void 0:T.firstWeekContainsDate)??a.firstWeekContainsDate??((v=(w=a.locale)==null?void 0:w.options)==null?void 0:v.firstWeekContainsDate)??1,o=E(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const u=H(o,e),l=E(t,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const m=H(l,e);return n.getTime()>=u.getTime()?r+1:n.getTime()>=m.getTime()?r:r-1}function ct(t,e){var u,l,m,y;const n=L(),r=(e==null?void 0:e.firstWeekContainsDate)??((l=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((y=(m=n.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,a=ce(t,e),i=E(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),H(i,e)}function lt(t,e){const n=N(t),r=+H(n,e)-+ct(n,e);return Math.round(r/ne)+1}function g(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const S={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return g(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):g(n+1,2)},d(t,e){return g(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return g(t.getHours()%12||12,e.length)},H(t,e){return g(t.getHours(),e.length)},m(t,e){return g(t.getMinutes(),e.length)},s(t,e){return g(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return g(a,e.length)}},P={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},le={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return S.y(t,e)},Y:function(t,e,n,r){const a=ce(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return g(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):g(i,e.length)},R:function(t,e){const n=ie(t);return g(n,e.length)},u:function(t,e){const n=t.getFullYear();return g(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return g(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return g(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return S.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return g(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=lt(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):g(a,e.length)},I:function(t,e,n){const r=st(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):g(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):S.d(t,e)},D:function(t,e,n){const r=ut(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):g(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return g(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return g(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return g(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=P.noon:r===0?a=P.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=P.evening:r>=12?a=P.afternoon:r>=4?a=P.morning:a=P.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return S.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):S.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):g(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):g(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):S.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):S.s(t,e)},S:function(t,e){return S.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return fe(r);case"XXXX":case"XX":return F(r);case"XXXXX":case"XXX":default:return F(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return fe(r);case"xxxx":case"xx":return F(r);case"xxxxx":case"xxx":default:return F(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+de(r,":");case"OOOO":default:return"GMT"+F(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+de(r,":");case"zzzz":default:return"GMT"+F(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return g(r,e.length)},T:function(t,e,n){const r=t.getTime();return g(r,e.length)}};function de(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+g(i,2)}function fe(t,e){return t%60===0?(t>0?"-":"+")+g(Math.abs(t)/60,2):F(t,e)}function F(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=g(Math.trunc(r/60),2),i=g(r%60,2);return n+a+e+i}const me=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},he=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},dt={p:he,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return me(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",me(r,e)).replace("{{time}}",he(a,e))}},ft=/^D+$/,mt=/^Y+$/,ht=["D","DD","YY","YYYY"];function gt(t){return ft.test(t)}function wt(t){return mt.test(t)}function yt(t,e,n){const r=bt(t,e,n);if(console.warn(r),ht.includes(t))throw new RangeError(r)}function bt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const xt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mt=/^'([^]*?)'?$/,Tt=/''/g,vt=/[a-zA-Z]/;function G(t,e,n){var y,T,w,v;const r=L(),a=r.locale??ot,i=r.firstWeekContainsDate??((T=(y=r.locale)==null?void 0:y.options)==null?void 0:T.firstWeekContainsDate)??1,o=r.weekStartsOn??((v=(w=r.locale)==null?void 0:w.options)==null?void 0:v.weekStartsOn)??0,u=N(t);if(!se(u))throw new RangeError("Invalid time value");let l=e.match(Dt).map(b=>{const s=b[0];if(s==="p"||s==="P"){const d=dt[s];return d(b,a.formatLong)}return b}).join("").match(xt).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const s=b[0];if(s==="'")return{isToken:!1,value:Ot(b)};if(le[s])return{isToken:!0,value:b};if(s.match(vt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return{isToken:!1,value:b}});a.localize.preprocessor&&(l=a.localize.preprocessor(u,l));const m={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return l.map(b=>{if(!b.isToken)return b.value;const s=b.value;(wt(s)||gt(s))&&yt(s,e,String(t));const d=le[s[0]];return d(u,s,a.localize,m)}).join("")}function Ot(t){const e=t.match(Mt);return e?e[1].replace(Tt,"'"):t}function J(t,e){const r=St(t);let a;if(r.date){const l=_t(r.date,2);a=Yt(l.restDateString,l.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,u;if(r.time&&(o=At(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(u=Et(r.timezone),isNaN(u))return new Date(NaN)}else{const l=new Date(i+o),m=new Date(0);return m.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),m.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),m}return new Date(i+o+u)}const U={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Nt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,kt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ct=/^([+-])(\d{2})(?::?(\d{2}))?$/;function St(t){const e={},n=t.split(U.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],U.timeZoneDelimiter.test(e.date)&&(e.date=t.split(U.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=U.timezone.exec(r);a?(e.time=r.replace(a[1],""),e.timezone=a[1]):e.time=r}return e}function _t(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function Yt(t,e){if(e===null)return new Date(NaN);const n=t.match(Nt);if(!n)return new Date(NaN);const r=!!n[4],a=$(n[1]),i=$(n[2])-1,o=$(n[3]),u=$(n[4]),l=$(n[5])-1;if(r)return Rt(e,u,l)?Ft(e,u,l):new Date(NaN);{const m=new Date(0);return!Pt(e,i,o)||!Ht(e,a)?new Date(NaN):(m.setUTCFullYear(e,i,Math.max(a,o)),m)}}function $(t){return t?parseInt(t):1}function At(t){const e=t.match(kt);if(!e)return NaN;const n=V(e[1]),r=V(e[2]),a=V(e[3]);return qt(n,r,a)?n*ae+r*re+a*1e3:NaN}function V(t){return t&&parseFloat(t.replace(",","."))||0}function Et(t){if(t==="Z")return 0;const e=t.match(Ct);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return $t(r,a)?n*(r*ae+a*re):NaN}function Ft(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const Wt=[31,null,31,30,31,30,31,31,30,31,30,31];function ge(t){return t%400===0||t%4===0&&t%100!==0}function Pt(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(Wt[e]||(ge(t)?29:28))}function Ht(t,e){return e>=1&&e<=(ge(t)?366:365)}function Rt(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function qt(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function $t(t,e){return e>=0&&e<=59}function pt(){const t=new z;function e(n,r){var i;if(!n||typeof n=="string"&&n.indexOf("0001")===0)return"";if(n instanceof Date)return G(n,r);let a=J(n);if(a=="Invalid Date"&&(a=t.create(n)||new Date(n)),se(a))return a=J(G(a,"yyyy-MM-dd HH:mm:ss")),G(a,r);if(r.indexOf("HH")===0||r.indexOf("hh")===0){const o=(i=n.match(/\d*/g))==null?void 0:i.filter(l=>l!=="").join(":");(r==="HH"||r==="hh")&&(r+=":mm");const u=J("2024-06-05 "+o);return G(u,r)}return""}return{formatTo:e}}function It(){function t(){const n=r=>{const a=Math.random()*16|0;return(r==="x"?a:a&3|8).toString(16)};return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n)}function e(n,r){const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=[];let o;if(r=r||a.length,n)for(o=0;o<n;o++)i[o]=a[0|Math.random()*r];else{let u;for(i[8]=i[13]=i[18]=i[23]="-",i[14]="4",o=0;o<36;o++)i[o]||(u=0|Math.random()*16,i[o]=a[o==19?u&3|8:u])}return i.join("")}return{guid:t,uuid:e}}function jt(){function t(s,d=null){return Array.isArray(s)?M.max.apply(null,s).toFixed():s&&d?M.maximum(s,d).toFixed():(console.error("请提供比较的值firstValue、secondValue."),"")}function e(s,d=null){return Array.isArray(s)?M.min.apply(null,s).toFixed():s&&d?M.minimum(s,d).toFixed():(console.error("请提供比较的值firstValue、secondValue."),"")}function n(s){return M.sum.apply(null,s).toFixed()}function r(s,d){return new M(s).div(d).toFixed()}function a(s,d){return new M(s).plus(d).toFixed()}function i(s,d){return new M(s).times(d).toFixed()}function o(s,d){return new M(s).minus(d).toFixed()}function u(s,d){return new M(s).eq(d)}function l(s,d){return new M(s).lt(d)}function m(s,d){return new M(s).gt(d)}function y(s){return new M(s).toNumber()}function T(s,d=0){return new M(s).toFixed(d)}function w(s){const d=new Array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖"),x=new Array("","拾","佰","仟"),C=new Array("","万","亿","兆"),k=new Array("角","分","毫","厘"),_="整",p="元",ee=1e15;let W,Y,O="",I;if(s=="")return"";const j=parseFloat(s);if(j>=ee)return"";if(j===0)return O=d[0]+p+_,O;if(s=j.toString(),s.indexOf(".")===-1?(W=s,Y=""):(I=s.split("."),W=I[0],Y=I[1].substr(0,4)),parseInt(W,10)>0){let A=0;const f=W.length;for(let D=0;D<f;D++){const B=W.substr(D,1),Q=f-D-1,tn=Q/4,ye=Q%4;B=="0"?A++:(A>0&&(O+=d[0]),A=0,O+=d[parseInt(B,10)]+x[ye]),ye==0&&A<4&&(O+=C[tn])}O+=p}if(Y!==""){const A=Y.length;for(let f=0;f<A;f++){let D=Y.substr(f,1);D!=="0"&&(O+=d[Number(D)]+k[f])}}return O===""?O+=d[0]+p+_:Y===""&&(O+=_),O}function v(s,d){var x=s==null||typeof s=="number"&&isNaN(s)?"":String(s);return d&&(d.prefix&&(x=x.replace(new RegExp(d.prefix,"g"),"")),d.suffix&&(x=x.replace(new RegExp(d.suffix,"g"),"")),x=x.replace(/\,/g,"")),x}function b(s,d){const x=new M(s),C={prefix:d.prefix||"",suffix:d.suffix||"",decimalSeparator:d.decimalSeparator||".",groupSeparator:d.groupSeparator||"",groupSize:3};if(x.isNaN())return"";let k=d.precision||0;return k=Number(k),x.toFormat(k,C)}return{formatTo:b,removeFormat:v,convertCurrency:w,toFixed:T,toNumber:y,greaterThan:m,lessThan:l,equal:u,minus:o,multiplied:i,plus:a,average:r,sum:n,min:e,max:t}}const Bt=["秒","分钟","小时","天","周","个月","年"],K=[60,60,24,7,365/7/12,12];function Lt(){const t=new z;function e(o,u){if(u===0)return["刚刚","片刻后"];const l=Bt[~~(u/2)];return[`${o} ${l}前`,`${o} ${l}后`]}function n(o){if(typeof o=="object")return o;{let u=t.create(o);return typeof u=="object"?u:new Date}}function r(o,u){return(+(u?n(u):new Date)-+n(o))/1e3}function a(o){const u=o<0?1:0;o=Math.abs(o);let l=0;for(;o>=K[l]&&l<K.length;l++)o/=K[l];return o=Math.floor(o),l*=2,o>(l===0?9:1)&&(l+=1),e(o,l)[u].replace("%s",o.toString())}function i(o,u){const l=r(o,u&&u.relativeDate);return a(l)}return{formatTo:i}}const we=["moz","ms","webkit"];function Xt(){let t=0;return e=>{const n=new Date().getTime(),r=Math.max(0,16-(n-t)),a=setTimeout(()=>{e(n+r)},r);return t=n+r,a}}function Gt(){if(typeof window>"u")return()=>0;if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);const t=we.filter(e=>`${e}RequestAnimationFrame`in window)[0];return t?window[`${t}RequestAnimationFrame`]:Xt()}function Ut(t){if(typeof window>"u")return null;if(window.cancelAnimationFrame)return window.cancelAnimationFrame(t);const e=we.filter(n=>`${n}CancelAnimationFrame`in window||`${n}CancelRequestAnimationFrame`in window)[0];return e?(window[`${e}CancelAnimationFrame`]||window[`${e}CancelRequestAnimationFrame`]).call(this,t):clearTimeout(t)}const Qt=Gt();function zt(t,e){return((e==null?void 0:e.split(" "))||[]).reduce((r,a)=>(a&&(r[a]=!0),r),t),t}function Zt(t,e){return((e==null?void 0:e.split(";"))||[]).reduce((r,a)=>{if(a){const i=a.split(":");r[i[0]]=i[1]}return r},t),t}const Jt=t=>{const e=t;return e.install=function(n){n.component(e.name,t)},t},Vt=Symbol("checkboxGroupContext");function Kt(t,e,n,r){const a=c.computed(()=>n==null?void 0:n.name),i=c.computed(()=>t.disabled||(n==null?void 0:n.disabled)),o=c.computed(()=>(n==null?void 0:n.mode)==="tag"),u=c.computed(()=>(n==null?void 0:n.mode)==="button"),l=c.computed(()=>!o.value&&!u.value),m=c.computed(()=>(n==null?void 0:n.size)==="small"),y=c.computed(()=>(n==null?void 0:n.size)==="large"),T=c.computed(()=>(n==null?void 0:n.size)==="middle"||(n==null?void 0:n.size)!=="small"&&(n==null?void 0:n.size)!=="large"),w=c.computed(()=>n?n.modelValue===t.value||n.modelValue.includes(t.value):t.checked||t.modelValue),v=c.computed(()=>({btn:!0,"f-radio-button":!0,"btn-sm":m.value,"btn-lg":y.value,"btn-md":T.value,active:w.value,[`f-radio-button-${(n==null?void 0:n.type)||"primary"}`]:!0})),b=c.computed(()=>({"f-radio-tag":!0,[`f-radio-tag-${(n==null?void 0:n.type)||"primary"}`]:!0,active:w.value}));return{disabled:i,name:a,shouldRenderButton:u,shouldRenderNative:l,shouldRenderTag:o,buttonClass:v,tagClass:b,checked:w,onClickRadio:x=>{x.stopPropagation(),!i.value&&(n?w.value||(r.emit("update:modelValue",t.value),r.emit("changeValue",t.value)):e.emit("update:checked",!w.value))},onClickCheckBox:x=>{var C;if(x.stopPropagation(),!i.value)if(n)if(!w.value)r.emit("update:modelValue",[...n.modelValue,t.value]),r.emit("changeValue",[...n.modelValue,t.value]);else{const k=(C=n.modelValue)==null?void 0:C.filter(_=>_!==t.value);r.emit("update:modelValue",k),r.emit("changeValue",k)}else e.emit("update:checked",!w.value),e.emit("update:modelValue",!w.value),e.emit("changeValue",!w.value),e.emit("change",{originalEvent:x,checked:!w.value})}}}const en={checked:{type:Boolean,default:!1},mode:{type:String,default:"default"},type:{type:String,default:"secondary"},size:{type:String,default:"middle"}};h.CHECKBOX_CONTEXT=Vt,h.DateConverter=z,h.cancelRequestAnimationFrame=Ut,h.getCustomClass=zt,h.getCustomStyle=Zt,h.radioCheckBoxCommonProps=en,h.useCheck=Kt,h.useClear=De,h.useDateFormat=pt,h.useGuid=It,h.useNumberFormat=jt,h.useReqAnimationFrame=Qt,h.useTextBox=be,h.useTextBoxDesign=xe,h.useTimeAgo=Lt,h.withInstall=Jt,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
@@ -3,6 +3,6 @@
3
3
  "version": "1.1.7",
4
4
  "main": "index.umd.js",
5
5
  "module": "index.esm.js",
6
- "style": "style.css",
6
+ "style": "index.css",
7
7
  "types": "../types/common/index.d.ts"
8
8
  }
@@ -173,8 +173,15 @@ const ie = "accordion", le = "A Farris Component", ue = "object", fe = {
173
173
  title: "控件类型",
174
174
  type: "select",
175
175
  editor: {
176
- type: "waiting for modification",
177
- enum: []
176
+ type: "combo-list",
177
+ textField: "value",
178
+ valueField: "key",
179
+ data: [
180
+ {
181
+ key: "component",
182
+ value: "组件"
183
+ }
184
+ ]
178
185
  }
179
186
  }
180
187
  }
@@ -240,12 +247,12 @@ function ye(c, e, t) {
240
247
  return null;
241
248
  if (f.value.schema && f.value.schema.type === "component")
242
249
  return f.value;
243
- const v = M(f == null ? void 0 : f.value.parent), h = l(v);
250
+ const C = M(f == null ? void 0 : f.value.parent), h = l(C);
244
251
  return h || null;
245
252
  }
246
253
  function u(f = e) {
247
- const { componentInstance: v, designerItemElementRef: h } = f;
248
- return !v || !v.value ? null : v.value.canMove ? h : u(f.parent);
254
+ const { componentInstance: C, designerItemElementRef: h } = f;
255
+ return !C || !C.value ? null : C.value.canMove ? h : u(f.parent);
249
256
  }
250
257
  function g(f) {
251
258
  return !!t && t.canAccepts(f);
@@ -255,27 +262,27 @@ function ye(c, e, t) {
255
262
  }
256
263
  function r() {
257
264
  }
258
- function o(f, v) {
259
- v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
265
+ function o(f, C) {
266
+ C && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(C);
260
267
  }
261
268
  function p(f) {
262
- const { componentType: v } = f;
263
- let h = $(v, f);
269
+ const { componentType: C } = f;
270
+ let h = $(C, f);
264
271
  t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(f, h));
265
- const O = v.toLowerCase().replace("-", "_");
266
- return h && !h.id && h.type === v && (h.id = `${O}_${Math.random().toString().slice(2, 6)}`), h;
272
+ const O = C.toLowerCase().replace("-", "_");
273
+ return h && !h.id && h.type === C && (h.id = `${O}_${Math.random().toString().slice(2, 6)}`), h;
267
274
  }
268
- function j(f, v) {
275
+ function j(f, C) {
269
276
  const h = String(f.getAttribute("data-controltype")), O = f.getAttribute("data-feature"), w = O ? JSON.parse(O) : {};
270
277
  w.parentComponentInstance = m.value;
271
278
  let A = $(h, w);
272
- t && t.onAcceptNewChildElement && (A = t.onAcceptNewChildElement(f, v, A));
279
+ t && t.onAcceptNewChildElement && (A = t.onAcceptNewChildElement(f, C, A));
273
280
  const N = h.toLowerCase().replace("-", "_");
274
281
  return A && !A.id && A.type === h && (A.id = `${N}_${Math.random().toString().slice(2, 6)}`), A;
275
282
  }
276
283
  function b(f) {
277
284
  }
278
- function C(...f) {
285
+ function v(...f) {
279
286
  if (t && t.getPropsConfig)
280
287
  return t.getPropsConfig(...f);
281
288
  }
@@ -294,7 +301,7 @@ function ye(c, e, t) {
294
301
  getBelongedComponentInstance: l,
295
302
  getDraggableDesignItemElement: u,
296
303
  getDraggingDisplayText: n,
297
- getPropConfig: C,
304
+ getPropConfig: v,
298
305
  getDragScopeElement: r,
299
306
  onAcceptMovedChildElement: o,
300
307
  onAcceptNewChildElement: j,
@@ -305,7 +312,7 @@ function ye(c, e, t) {
305
312
  triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || M(!1)
306
313
  }, m;
307
314
  }
308
- const be = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/dragging-rules.schema.json", me = "Dragging Rules", ge = "The rules of designer canvas", je = "object", Ce = {
315
+ const be = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/dragging-rules.schema.json", me = "Dragging Rules", ge = "The rules of designer canvas", je = "object", ve = {
309
316
  "f-page": {
310
317
  description: "The root class of page designed by farris.",
311
318
  type: "object",
@@ -869,14 +876,14 @@ const be = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-
869
876
  description: "",
870
877
  type: "object"
871
878
  }
872
- }, ve = [], Pe = {
879
+ }, Ce = [], Pe = {
873
880
  $schema: be,
874
881
  $id: he,
875
882
  title: me,
876
883
  description: ge,
877
884
  type: je,
878
- properties: Ce,
879
- required: ve
885
+ properties: ve,
886
+ required: Ce
880
887
  }, E = /* @__PURE__ */ new Map();
881
888
  function Ae() {
882
889
  function c(n, r, o, p) {
@@ -884,13 +891,13 @@ function Ae() {
884
891
  if (typeof o == "number")
885
892
  return ((j = p[n]) == null ? void 0 : j.length) === o;
886
893
  if (typeof o == "object") {
887
- const b = Object.keys(o)[0], C = o[b];
894
+ const b = Object.keys(o)[0], v = o[b];
888
895
  if (b === "not")
889
- return Number(p[n].length) !== Number(C);
896
+ return Number(p[n].length) !== Number(v);
890
897
  if (b === "moreThan")
891
- return Number(p[n].length) >= Number(C);
898
+ return Number(p[n].length) >= Number(v);
892
899
  if (b === "lessThan")
893
- return Number(p[n].length) <= Number(C);
900
+ return Number(p[n].length) <= Number(v);
894
901
  }
895
902
  return !1;
896
903
  }
@@ -926,10 +933,10 @@ function Ae() {
926
933
  return !1;
927
934
  }
928
935
  function P(n, r) {
929
- return Object.keys(n).reduce((b, C) => {
930
- const T = y(C, n[C]);
936
+ return Object.keys(n).reduce((b, v) => {
937
+ const T = y(v, n[v]);
931
938
  return b.push(...T), b;
932
- }, []).reduce((b, C) => b && m(C, r), !0);
939
+ }, []).reduce((b, v) => b && m(v, r), !0);
933
940
  }
934
941
  function D(n, r) {
935
942
  const o = Object.keys(n), p = o.includes("allOf"), j = o.includes("anyOf"), b = p || j, f = (b ? n[b ? p ? "allOf" : "anyOf" : "allOf"] : [n]).map((h) => P(h, r));
@@ -986,7 +993,7 @@ function De(c, e) {
986
993
  const u = c, g = u.appearance && u.appearance.class || "", n = g.split(" "), r = u.contents || [], o = r.length ? r[0] : null, p = o && o.appearance ? o.appearance.class : "", j = p ? p.split(" ") : [], b = r.length ? r.reduce((w, A) => {
987
994
  const N = A && A.appearance ? A.appearance.class : "", J = N ? N.split(" ") : [];
988
995
  return w.push(...J), w;
989
- }, []) : [], C = e, T = C && C.appearance && C.appearance.class || "", f = T ? T.split(" ") : [];
996
+ }, []) : [], v = e, T = v && v.appearance && v.appearance.class || "", f = T ? T.split(" ") : [];
990
997
  i = {
991
998
  componentClass: g,
992
999
  componentClassList: n,
@@ -994,13 +1001,13 @@ function De(c, e) {
994
1001
  firstChildContent: o,
995
1002
  firstChildClass: p,
996
1003
  firstChildClassList: j,
997
- parent: C,
1004
+ parent: v,
998
1005
  parentClass: T,
999
1006
  parentClassList: f,
1000
1007
  children: r,
1001
1008
  childrenClassList: b
1002
1009
  };
1003
- const { canAccept: v, fixed: h, hidePadding: O } = t.getRuleValue(n[0], i);
1010
+ const { canAccept: C, fixed: h, hidePadding: O } = t.getRuleValue(n[0], i);
1004
1011
  return s = O, y = h, !0;
1005
1012
  }
1006
1013
  function l() {
@@ -1 +1 @@
1
- (function($,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],C):($=typeof globalThis<"u"?globalThis:$||self,C($.component={},$.Vue,$.LodashES))})(this,function($,C,W){"use strict";const F={},q={};function V(c){const{properties:e,title:t}=c,s=Object.keys(e).reduce((i,y)=>(i[y]=e[y].type==="object"&&e[y].properties?V(e[y]):W.cloneDeep(e[y].default),i),{});return s.id=`${t}-${Date.now()}`,s}function k(c,e={}){const t=F[c];if(t){let s=V(t);const i=q[c];return s=i?i({getSchemaByType:k},s,e):s,s}return null}function J(c,e){const t=V(e);return Object.keys(c).reduce((s,i)=>(s[i]=c[i],s),t),t}function z(c,e){return Object.keys(c).filter(s=>c[s]!=null).reduce((s,i)=>{if(e.has(i)){const y=e.get(i);if(typeof y=="string")s[y]=c[i];else{const m=y(i,c[i],c);Object.assign(s,m)}}else s[i]=c[i];return s},{})}function G(c,e,t=new Map){const s=J(c,e);return z(s,t)}function H(c={}){function e(p,d,l,u){if(typeof l=="number")return u[p].length===l;if(typeof l=="object"){const g=Object.keys(l)[0],n=l[g];if(g==="not")return Number(u[p].length)!==Number(n);if(g==="moreThan")return Number(u[p].length)>=Number(n);if(g==="lessThan")return Number(u[p].length)<=Number(n)}return!1}function t(p,d,l,u){return u[p]&&u[p].propertyValue&&String(u[p].propertyValue.value)===String(l)}const s=new Map([["length",e],["getProperty",t]]);Object.keys(c).reduce((p,d)=>(p.set(d,c[d]),p),s);function i(p,d){const l=p;return typeof d=="number"?[{target:l,operator:"length",param:null,value:Number(d)}]:typeof d=="boolean"?[{target:l,operator:"getProperty",param:p,value:!!d}]:typeof d=="object"?Object.keys(d).map(u=>{if(u==="length")return{target:l,operator:"length",param:null,value:d[u]};const g=u,n=d[u];return{target:l,operator:"getProperty",param:g,value:n}}):[]}function y(p){return Object.keys(p).reduce((l,u)=>{const g=i(u,p[u]);return l.push(...g),l},[])}function m(p,d){if(s.has(p.operator)){const l=s.get(p.operator);return l&&l(p.target,p.param,p.value,d)||!1}return!1}function T(p,d){return y(p).reduce((g,n)=>g&&m(n,d),!0)}function D(p,d){const l=Object.keys(p),u=l.includes("allOf"),g=l.includes("anyOf"),n=u||g,a=(n?p[n?u?"allOf":"anyOf":"allOf"]:[p]).map(h=>T(h,d));return u?!a.includes(!1):a.includes(!0)}return{parseValueSchema:D}}const Q={},U={};H();function X(c,e,t=new Map,s=(m,T,D)=>T,i={},y=m=>m){return F[e.title]=e,q[e.title]=s,Q[e.title]=i,U[e.title]=y,(m={})=>{const T=G(m,e,t),D=Object.keys(c).reduce((p,d)=>(p[d]=c[d].default,p),{});return Object.assign(D,T)}}function Y(c,e){return{customClass:e.class,customStyle:e.style}}const Z=new Map([["appearance",Y]]),K={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/component.schema.json",title:"component",description:"A Farris Visual Component",type:"object",properties:{id:{description:"The unique identifier for a Section",type:"string"},type:{description:"The type string of Section component",type:"string",default:"component"},componentType:{description:"The type string of Section component",type:"string"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]};function R(c,e,t){return e}const x={title:"accordion",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},appearance:{description:"",title:"外观",properties:{class:{description:"组件的CSS样式",title:"class样式"},style:{description:"组件的内容样式",title:"style样式"}}}}},S={id:{type:String},customClass:{type:String,default:""},componentType:{type:String,default:""}},B=X(S,K,Z,R,x),N=C.defineComponent({name:"FComponent",props:S,emits:["init","afterViewInit"],setup(c,e){return C.onBeforeMount(()=>{e.emit("init",c.id)}),C.onMounted(()=>{e.emit("afterViewInit",c.id)}),()=>C.createVNode("div",{class:c.customClass},[e.slots.default&&e.slots.default()])}});function I(c,e,t){var O;function s(){t!=null&&t.resolveComponentContext&&t.resolveComponentContext()}s();const i=t&&t.getStyles&&t.getStyles()||"",y=t&&t.getDesignerClass&&t.getDesignerClass()||"",m=C.ref();function T(){return(e==null?void 0:e.schema.componentType)==="frame"?!1:t&&t.checkCanMoveComponent?t.checkCanMoveComponent():!0}function D(){return!1}function p(){return(e==null?void 0:e.schema.componentType)==="frame"?!1:t&&t.checkCanDeleteComponent?t.checkCanDeleteComponent():!0}function d(){return(e==null?void 0:e.schema.componentType)==="frame"?!0:t&&t.hideNestedPaddingInDesginerView?t.hideNestedPaddingInDesginerView():!1}function l(f){if(!f||!f.value)return null;if(f.value.schema&&f.value.schema.type==="component")return f.value;const A=C.ref(f==null?void 0:f.value.parent),b=l(A);return b||null}function u(f=e){const{componentInstance:A,designerItemElementRef:b}=f;return!A||!A.value?null:A.value.canMove?b:u(f.parent)}function g(f){return!!t&&t.canAccepts(f)}function n(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function r(){}function o(f,A){A&&t!=null&&t.onAcceptMovedChildElement&&t.onAcceptMovedChildElement(A)}function a(f){const{componentType:A}=f;let b=k(A,f);t&&t.onResolveNewComponentSchema&&(b=t.onResolveNewComponentSchema(f,b));const w=A.toLowerCase().replace("-","_");return b&&!b.id&&b.type===A&&(b.id=`${w}_${Math.random().toString().slice(2,6)}`),b}function j(f,A){const b=String(f.getAttribute("data-controltype")),w=f.getAttribute("data-feature"),M=w?JSON.parse(w):{};M.parentComponentInstance=m.value;let v=k(b,M);t&&t.onAcceptNewChildElement&&(v=t.onAcceptNewChildElement(f,A,v));const E=b.toLowerCase().replace("-","_");return v&&!v.id&&v.type===b&&(v.id=`${E}_${Math.random().toString().slice(2,6)}`),v}function h(f){}function P(...f){if(t&&t.getPropsConfig)return t.getPropsConfig(...f)}return m.value={canMove:T(),canSelectParent:D(),canDelete:p(),canNested:!d(),contents:e==null?void 0:e.schema.contents,elementRef:c,parent:(O=e==null?void 0:e.parent)==null?void 0:O.componentInstance,schema:e==null?void 0:e.schema,styles:i,designerClass:y,canAccepts:g,getBelongedComponentInstance:l,getDraggableDesignItemElement:u,getDraggingDisplayText:n,getPropConfig:P,getDragScopeElement:r,onAcceptMovedChildElement:o,onAcceptNewChildElement:j,onChildElementMovedOut:h,addNewChildComponentSchema:a,updateDragAndDropRules:s,triggerBelongedComponentToMoveWhenMoved:!!t&&t.triggerBelongedComponentToMoveWhenMoved||C.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!t&&t.triggerBelongedComponentToDeleteWhenDeleted||C.ref(!1)},m}const ee={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/dragging-rules.schema.json",title:"Dragging Rules",description:"The rules of designer canvas",type:"object",properties:{"f-page":{description:"The root class of page designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-page-header":{description:"The class of page header designed by farris.",type:"string"},"f-page-main":{description:"The class of page body designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-like-card":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-form":{description:"The class of form component which has a hierarchical structure of component -> section -> respnse-form.",type:"object",properties:{contents:{type:"object",properties:{"f-section-form":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{contents:{type:"object",properties:{"f-form-layout":{description:"The class of reponse form",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}},"f-struct-wrapper":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-section-tabs":{description:"The class of section which has wrapped sub-grid tabs.",type:"object",properties:{contents:{type:"object",properties:{"f-tabs-in-card":{description:"The class of tabs which contains sub-grid.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-card":{description:"The class of sub-grid component",type:"object",properties:{contents:{type:"object",properties:{"f-grid-is-sub":{description:"The class of sub-grid",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-section-in-main":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"object",const:{allOf:[{sibling:0,parent:{"f-page-main":!0}}]}}}}}},"f-struct-data-grid":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"object",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-main-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav-extend":{description:"",type:"object"},"f-section-in-nav":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}}}},"f-page-content-main":{description:"",type:"object",properties:{}}}}}},"f-page-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-list-nav":{description:"",type:"object"},"f-list-nav-left":{description:"",type:"object"}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}},"f-page-content-main":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"object",const:{anyOf:[{children:0},{children:{length:{not:1},"f-struct-like-card":!0}},{children:{"scroll-spy":!1,"f-page-content":!1,"f-struct-like-card":!1}}]}},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-footer":{description:"The class of page footer designed by farris.",type:"string"}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-is-managelist":{description:"The root class of mangement list page.",type:"string"},"f-page-card":{description:"",type:"object"},"f-page-is-mainsubcard":{description:"",type:"object"}},required:[]},L=new Map;function te(){function c(n,r,o,a){var j;if(typeof o=="number")return((j=a[n])==null?void 0:j.length)===o;if(typeof o=="object"){const h=Object.keys(o)[0],P=o[h];if(h==="not")return Number(a[n].length)!==Number(P);if(h==="moreThan")return Number(a[n].length)>=Number(P);if(h==="lessThan")return Number(a[n].length)<=Number(P)}return!1}function e(n,r,o,a){return typeof o=="boolean"?a.childrenClassList.includes(r)===!!o:!1}function t(n,r,o,a){return typeof o=="boolean"?a.parentClassList.includes(r)===!!o:!1}function s(n,r,o,a){return typeof o=="boolean"?a.parentClassList.includes(r)===!!o:!1}const i=new Map([["length",c],["hasChildren",e],["hasSibling",s],["hasParent",t]]);function y(n,r){const o=n;return typeof r=="number"?[{target:o,operator:"length",param:null,value:Number(r)}]:typeof r=="object"?Object.keys(r).map(a=>{if(a==="length")return{target:o,operator:"length",param:null,value:r[a]};const j=a,h=r[a];return{target:o,operator:n==="children"?"hasChildren":n==="parent"?"hasParent":"hasSibling",param:j,value:h}}):[]}function m(n,r){if(i.has(n.operator)){const o=i.get(n.operator);return o&&o(n.target,n.param,n.value,r)||!1}return!1}function T(n,r){return Object.keys(n).reduce((h,P)=>{const O=y(P,n[P]);return h.push(...O),h},[]).reduce((h,P)=>h&&m(P,r),!0)}function D(n,r){const o=Object.keys(n),a=o.includes("allOf"),j=o.includes("anyOf"),h=a||j,f=(h?n[h?a?"allOf":"anyOf":"allOf"]:[n]).map(b=>T(b,r));return a?!f.includes(!1):f.includes(!0)}function p(n,r){const o=n.const;return o?typeof o=="boolean"?o:typeof o=="object"?D(o,r):!1:!1}function d(n){return r=>{const o={canAccept:!0,fixed:!1,hidePadding:!1};return n&&n.properties&&Object.keys(n.properties).reduce((a,j)=>{const h=n.properties[j];return a[j]=p(h,r),a},o),o}}function l(n,r,o){if(r.type==="object"&&r.properties){const{rules:a,contents:j}=r.properties;o.set(n,d(a)),j&&Object.keys(j.properties).forEach(h=>l(h,j.properties[h],o))}}function u(){const{properties:n}=ee;Object.keys(n).forEach(r=>{l(r,n[r],L)})}function g(n,r){const o={canAccept:!0,fixed:!1,hidePadding:!0};return L.has(n)?L.get(n)(r):o}return u(),{getRuleValue:g}}function ne(c,e){const t=te();let s=!1,i,y=!1;const m=!1;function T(){return!1}function D(){return m||!y}function p(){return!y}function d(){y=!1;const u=c,g=u.appearance&&u.appearance.class||"",n=g.split(" "),r=u.contents||[],o=r.length?r[0]:null,a=o&&o.appearance?o.appearance.class:"",j=a?a.split(" "):[],h=r.length?r.reduce((M,v)=>{const E=v&&v.appearance?v.appearance.class:"",re=E?E.split(" "):[];return M.push(...re),M},[]):[],P=e,O=P&&P.appearance&&P.appearance.class||"",f=O?O.split(" "):[];i={componentClass:g,componentClassList:n,childContents:r,firstChildContent:o,firstChildClass:a,firstChildClassList:j,parent:P,parentClass:O,parentClassList:f,children:r,childrenClassList:h};const{canAccept:A,fixed:b,hidePadding:w}=t.getRuleValue(n[0],i);return s=w,y=b,!0}function l(){return s}return{canAccepts:T,checkCanDeleteComponent:D,checkCanMoveComponent:p,resolveComponentContext:d,hideNestedPaddingInDesginerView:l}}const _=C.defineComponent({name:"FComponetDesign",props:S,emits:[],setup(c,e){var m;const t=C.ref(),s=C.inject("design-item-context"),i=ne(s.schema,(m=s.parent)==null?void 0:m.schema),y=I(t,s,i);return C.onMounted(()=>{t.value.componentInstance=y}),e.expose(y.value),()=>C.createVNode("div",{ref:t,class:"drag-container","data-dragref":`${s.schema.id}-container`},[e.slots.default&&e.slots.default()])}}),oe={install(c){c.component(N.name,N)},register(c,e,t,s){c.component=N,e.component=B},registerDesigner(c,e){c.component=_,e.component=B}};$.Component=N,$.ComponentDesign=_,$.componentProps=S,$.default=oe,$.propsResolver=B,Object.defineProperties($,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(A,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],C):(A=typeof globalThis<"u"?globalThis:A||self,C(A.component={},A.Vue,A.LodashES))})(this,function(A,C,W){"use strict";const L={},q={};function V(c){const{properties:e,title:t}=c,s=Object.keys(e).reduce((i,y)=>(i[y]=e[y].type==="object"&&e[y].properties?V(e[y]):W.cloneDeep(e[y].default),i),{});return s.id=`${t}-${Date.now()}`,s}function k(c,e={}){const t=L[c];if(t){let s=V(t);const i=q[c];return s=i?i({getSchemaByType:k},s,e):s,s}return null}function J(c,e){const t=V(e);return Object.keys(c).reduce((s,i)=>(s[i]=c[i],s),t),t}function z(c,e){return Object.keys(c).filter(s=>c[s]!=null).reduce((s,i)=>{if(e.has(i)){const y=e.get(i);if(typeof y=="string")s[y]=c[i];else{const m=y(i,c[i],c);Object.assign(s,m)}}else s[i]=c[i];return s},{})}function G(c,e,t=new Map){const s=J(c,e);return z(s,t)}function H(c={}){function e(p,d,l,u){if(typeof l=="number")return u[p].length===l;if(typeof l=="object"){const g=Object.keys(l)[0],n=l[g];if(g==="not")return Number(u[p].length)!==Number(n);if(g==="moreThan")return Number(u[p].length)>=Number(n);if(g==="lessThan")return Number(u[p].length)<=Number(n)}return!1}function t(p,d,l,u){return u[p]&&u[p].propertyValue&&String(u[p].propertyValue.value)===String(l)}const s=new Map([["length",e],["getProperty",t]]);Object.keys(c).reduce((p,d)=>(p.set(d,c[d]),p),s);function i(p,d){const l=p;return typeof d=="number"?[{target:l,operator:"length",param:null,value:Number(d)}]:typeof d=="boolean"?[{target:l,operator:"getProperty",param:p,value:!!d}]:typeof d=="object"?Object.keys(d).map(u=>{if(u==="length")return{target:l,operator:"length",param:null,value:d[u]};const g=u,n=d[u];return{target:l,operator:"getProperty",param:g,value:n}}):[]}function y(p){return Object.keys(p).reduce((l,u)=>{const g=i(u,p[u]);return l.push(...g),l},[])}function m(p,d){if(s.has(p.operator)){const l=s.get(p.operator);return l&&l(p.target,p.param,p.value,d)||!1}return!1}function $(p,d){return y(p).reduce((g,n)=>g&&m(n,d),!0)}function D(p,d){const l=Object.keys(p),u=l.includes("allOf"),g=l.includes("anyOf"),n=u||g,a=(n?p[n?u?"allOf":"anyOf":"allOf"]:[p]).map(h=>$(h,d));return u?!a.includes(!1):a.includes(!0)}return{parseValueSchema:D}}const Q={},U={};H();function X(c,e,t=new Map,s=(m,$,D)=>$,i={},y=m=>m){return L[e.title]=e,q[e.title]=s,Q[e.title]=i,U[e.title]=y,(m={})=>{const $=G(m,e,t),D=Object.keys(c).reduce((p,d)=>(p[d]=c[d].default,p),{});return Object.assign(D,$)}}function Y(c,e){return{customClass:e.class,customStyle:e.style}}const Z=new Map([["appearance",Y]]),K={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/component.schema.json",title:"component",description:"A Farris Visual Component",type:"object",properties:{id:{description:"The unique identifier for a Section",type:"string"},type:{description:"The type string of Section component",type:"string",default:"component"},componentType:{description:"The type string of Section component",type:"string"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]};function R(c,e,t){return e}const x={title:"accordion",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"combo-list",textField:"value",valueField:"key",data:[{key:"component",value:"组件"}]}}}},appearance:{description:"",title:"外观",properties:{class:{description:"组件的CSS样式",title:"class样式"},style:{description:"组件的内容样式",title:"style样式"}}}}},w={id:{type:String},customClass:{type:String,default:""},componentType:{type:String,default:""}},B=X(w,K,Z,R,x),N=C.defineComponent({name:"FComponent",props:w,emits:["init","afterViewInit"],setup(c,e){return C.onBeforeMount(()=>{e.emit("init",c.id)}),C.onMounted(()=>{e.emit("afterViewInit",c.id)}),()=>C.createVNode("div",{class:c.customClass},[e.slots.default&&e.slots.default()])}});function I(c,e,t){var O;function s(){t!=null&&t.resolveComponentContext&&t.resolveComponentContext()}s();const i=t&&t.getStyles&&t.getStyles()||"",y=t&&t.getDesignerClass&&t.getDesignerClass()||"",m=C.ref();function $(){return(e==null?void 0:e.schema.componentType)==="frame"?!1:t&&t.checkCanMoveComponent?t.checkCanMoveComponent():!0}function D(){return!1}function p(){return(e==null?void 0:e.schema.componentType)==="frame"?!1:t&&t.checkCanDeleteComponent?t.checkCanDeleteComponent():!0}function d(){return(e==null?void 0:e.schema.componentType)==="frame"?!0:t&&t.hideNestedPaddingInDesginerView?t.hideNestedPaddingInDesginerView():!1}function l(f){if(!f||!f.value)return null;if(f.value.schema&&f.value.schema.type==="component")return f.value;const v=C.ref(f==null?void 0:f.value.parent),b=l(v);return b||null}function u(f=e){const{componentInstance:v,designerItemElementRef:b}=f;return!v||!v.value?null:v.value.canMove?b:u(f.parent)}function g(f){return!!t&&t.canAccepts(f)}function n(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function r(){}function o(f,v){v&&t!=null&&t.onAcceptMovedChildElement&&t.onAcceptMovedChildElement(v)}function a(f){const{componentType:v}=f;let b=k(v,f);t&&t.onResolveNewComponentSchema&&(b=t.onResolveNewComponentSchema(f,b));const M=v.toLowerCase().replace("-","_");return b&&!b.id&&b.type===v&&(b.id=`${M}_${Math.random().toString().slice(2,6)}`),b}function j(f,v){const b=String(f.getAttribute("data-controltype")),M=f.getAttribute("data-feature"),S=M?JSON.parse(M):{};S.parentComponentInstance=m.value;let T=k(b,S);t&&t.onAcceptNewChildElement&&(T=t.onAcceptNewChildElement(f,v,T));const E=b.toLowerCase().replace("-","_");return T&&!T.id&&T.type===b&&(T.id=`${E}_${Math.random().toString().slice(2,6)}`),T}function h(f){}function P(...f){if(t&&t.getPropsConfig)return t.getPropsConfig(...f)}return m.value={canMove:$(),canSelectParent:D(),canDelete:p(),canNested:!d(),contents:e==null?void 0:e.schema.contents,elementRef:c,parent:(O=e==null?void 0:e.parent)==null?void 0:O.componentInstance,schema:e==null?void 0:e.schema,styles:i,designerClass:y,canAccepts:g,getBelongedComponentInstance:l,getDraggableDesignItemElement:u,getDraggingDisplayText:n,getPropConfig:P,getDragScopeElement:r,onAcceptMovedChildElement:o,onAcceptNewChildElement:j,onChildElementMovedOut:h,addNewChildComponentSchema:a,updateDragAndDropRules:s,triggerBelongedComponentToMoveWhenMoved:!!t&&t.triggerBelongedComponentToMoveWhenMoved||C.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!t&&t.triggerBelongedComponentToDeleteWhenDeleted||C.ref(!1)},m}const ee={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/dragging-rules.schema.json",title:"Dragging Rules",description:"The rules of designer canvas",type:"object",properties:{"f-page":{description:"The root class of page designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-page-header":{description:"The class of page header designed by farris.",type:"string"},"f-page-main":{description:"The class of page body designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-like-card":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-form":{description:"The class of form component which has a hierarchical structure of component -> section -> respnse-form.",type:"object",properties:{contents:{type:"object",properties:{"f-section-form":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{contents:{type:"object",properties:{"f-form-layout":{description:"The class of reponse form",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}},"f-struct-wrapper":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-section-tabs":{description:"The class of section which has wrapped sub-grid tabs.",type:"object",properties:{contents:{type:"object",properties:{"f-tabs-in-card":{description:"The class of tabs which contains sub-grid.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-card":{description:"The class of sub-grid component",type:"object",properties:{contents:{type:"object",properties:{"f-grid-is-sub":{description:"The class of sub-grid",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-section-in-main":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"object",const:{allOf:[{sibling:0,parent:{"f-page-main":!0}}]}}}}}},"f-struct-data-grid":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"object",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-main-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav-extend":{description:"",type:"object"},"f-section-in-nav":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}}}},"f-page-content-main":{description:"",type:"object",properties:{}}}}}},"f-page-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-list-nav":{description:"",type:"object"},"f-list-nav-left":{description:"",type:"object"}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}},"f-page-content-main":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"object",const:{anyOf:[{children:0},{children:{length:{not:1},"f-struct-like-card":!0}},{children:{"scroll-spy":!1,"f-page-content":!1,"f-struct-like-card":!1}}]}},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-footer":{description:"The class of page footer designed by farris.",type:"string"}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-is-managelist":{description:"The root class of mangement list page.",type:"string"},"f-page-card":{description:"",type:"object"},"f-page-is-mainsubcard":{description:"",type:"object"}},required:[]},F=new Map;function te(){function c(n,r,o,a){var j;if(typeof o=="number")return((j=a[n])==null?void 0:j.length)===o;if(typeof o=="object"){const h=Object.keys(o)[0],P=o[h];if(h==="not")return Number(a[n].length)!==Number(P);if(h==="moreThan")return Number(a[n].length)>=Number(P);if(h==="lessThan")return Number(a[n].length)<=Number(P)}return!1}function e(n,r,o,a){return typeof o=="boolean"?a.childrenClassList.includes(r)===!!o:!1}function t(n,r,o,a){return typeof o=="boolean"?a.parentClassList.includes(r)===!!o:!1}function s(n,r,o,a){return typeof o=="boolean"?a.parentClassList.includes(r)===!!o:!1}const i=new Map([["length",c],["hasChildren",e],["hasSibling",s],["hasParent",t]]);function y(n,r){const o=n;return typeof r=="number"?[{target:o,operator:"length",param:null,value:Number(r)}]:typeof r=="object"?Object.keys(r).map(a=>{if(a==="length")return{target:o,operator:"length",param:null,value:r[a]};const j=a,h=r[a];return{target:o,operator:n==="children"?"hasChildren":n==="parent"?"hasParent":"hasSibling",param:j,value:h}}):[]}function m(n,r){if(i.has(n.operator)){const o=i.get(n.operator);return o&&o(n.target,n.param,n.value,r)||!1}return!1}function $(n,r){return Object.keys(n).reduce((h,P)=>{const O=y(P,n[P]);return h.push(...O),h},[]).reduce((h,P)=>h&&m(P,r),!0)}function D(n,r){const o=Object.keys(n),a=o.includes("allOf"),j=o.includes("anyOf"),h=a||j,f=(h?n[h?a?"allOf":"anyOf":"allOf"]:[n]).map(b=>$(b,r));return a?!f.includes(!1):f.includes(!0)}function p(n,r){const o=n.const;return o?typeof o=="boolean"?o:typeof o=="object"?D(o,r):!1:!1}function d(n){return r=>{const o={canAccept:!0,fixed:!1,hidePadding:!1};return n&&n.properties&&Object.keys(n.properties).reduce((a,j)=>{const h=n.properties[j];return a[j]=p(h,r),a},o),o}}function l(n,r,o){if(r.type==="object"&&r.properties){const{rules:a,contents:j}=r.properties;o.set(n,d(a)),j&&Object.keys(j.properties).forEach(h=>l(h,j.properties[h],o))}}function u(){const{properties:n}=ee;Object.keys(n).forEach(r=>{l(r,n[r],F)})}function g(n,r){const o={canAccept:!0,fixed:!1,hidePadding:!0};return F.has(n)?F.get(n)(r):o}return u(),{getRuleValue:g}}function ne(c,e){const t=te();let s=!1,i,y=!1;const m=!1;function $(){return!1}function D(){return m||!y}function p(){return!y}function d(){y=!1;const u=c,g=u.appearance&&u.appearance.class||"",n=g.split(" "),r=u.contents||[],o=r.length?r[0]:null,a=o&&o.appearance?o.appearance.class:"",j=a?a.split(" "):[],h=r.length?r.reduce((S,T)=>{const E=T&&T.appearance?T.appearance.class:"",re=E?E.split(" "):[];return S.push(...re),S},[]):[],P=e,O=P&&P.appearance&&P.appearance.class||"",f=O?O.split(" "):[];i={componentClass:g,componentClassList:n,childContents:r,firstChildContent:o,firstChildClass:a,firstChildClassList:j,parent:P,parentClass:O,parentClassList:f,children:r,childrenClassList:h};const{canAccept:v,fixed:b,hidePadding:M}=t.getRuleValue(n[0],i);return s=M,y=b,!0}function l(){return s}return{canAccepts:$,checkCanDeleteComponent:D,checkCanMoveComponent:p,resolveComponentContext:d,hideNestedPaddingInDesginerView:l}}const _=C.defineComponent({name:"FComponetDesign",props:w,emits:[],setup(c,e){var m;const t=C.ref(),s=C.inject("design-item-context"),i=ne(s.schema,(m=s.parent)==null?void 0:m.schema),y=I(t,s,i);return C.onMounted(()=>{t.value.componentInstance=y}),e.expose(y.value),()=>C.createVNode("div",{ref:t,class:"drag-container","data-dragref":`${s.schema.id}-container`},[e.slots.default&&e.slots.default()])}}),oe={install(c){c.component(N.name,N)},register(c,e,t,s){c.component=N,e.component=B},registerDesigner(c,e){c.component=_,e.component=B}};A.Component=N,A.ComponentDesign=_,A.componentProps=w,A.default=oe,A.propsResolver=B,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -3,6 +3,6 @@
3
3
  "version": "1.1.7",
4
4
  "main": "index.umd.js",
5
5
  "module": "index.esm.js",
6
- "style": "style.css",
6
+ "style": "index.css",
7
7
  "types": "../types/component/index.d.ts"
8
8
  }