jianghu-ui 1.0.5 → 1.0.7

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 (48) hide show
  1. package/dist/jianghu-ui.css +186 -115
  2. package/dist/jianghu-ui.js +1 -1
  3. package/package.json +1 -1
  4. package/src/components/JhAddressSelect/JhAddressSelect.vue +6 -6
  5. package/src/components/JhDrawer/JhDrawer.stories.js +6 -6
  6. package/src/components/JhDrawerForm/JhDrawerForm.vue +1 -1
  7. package/src/components/JhForm/JhForm.stories.js +114 -95
  8. package/src/components/JhForm/JhForm.vue +148 -21
  9. package/src/components/JhFormFields/JhFormFields.vue +33 -14
  10. package/src/components/JhModal/JhModal.stories.js +6 -6
  11. package/src/components/JhModal/JhModal.vue +1 -1
  12. package/src/components/JhModalForm/JhModalForm.vue +1 -1
  13. package/src/components/JhTable/JhTable.stories.js +192 -154
  14. package/src/components/JhTable/JhTable.vue +122 -26
  15. package/src/style/globalCSSVuetifyV4.css +1 -2
  16. package/src/components/JhAddressSelect/JhAddressSelect.md +0 -267
  17. package/src/components/JhCard/JhCard.md +0 -246
  18. package/src/components/JhCheckCard/JhCheckCard.md +0 -245
  19. package/src/components/JhConfirmDialog/JhConfirmDialog.md +0 -70
  20. package/src/components/JhDateRangePicker/JhDateRangePicker.md +0 -56
  21. package/src/components/JhDescriptions/JhDescriptions.md +0 -724
  22. package/src/components/JhDraggable/JhDraggable.md +0 -66
  23. package/src/components/JhDrawer/JhDrawer.md +0 -68
  24. package/src/components/JhDrawerForm/JhDrawerForm.md +0 -69
  25. package/src/components/JhEditableTable/JhEditableTable.md +0 -507
  26. package/src/components/JhFileInput/JhFileInput.md +0 -56
  27. package/src/components/JhForm/JhForm.md +0 -676
  28. package/src/components/JhFormFields/JhFormFields.md +0 -647
  29. package/src/components/JhFormList/JhFormList.md +0 -303
  30. package/src/components/JhJsonEditor/JhJsonEditor.md +0 -54
  31. package/src/components/JhLayout/JhLayout.md +0 -580
  32. package/src/components/JhList/JhList.md +0 -441
  33. package/src/components/JhMarkdownEditor/JhMarkdownEditor.md +0 -56
  34. package/src/components/JhMask/JhMask.md +0 -62
  35. package/src/components/JhMenu/JhMenu.md +0 -85
  36. package/src/components/JhModal/JhModal.md +0 -68
  37. package/src/components/JhModalForm/JhModalForm.md +0 -69
  38. package/src/components/JhPageContainer/JhPageContainer.md +0 -409
  39. package/src/components/JhQueryFilter/JhQueryFilter.md +0 -77
  40. package/src/components/JhScene/JhScene.md +0 -64
  41. package/src/components/JhStatisticCard/JhStatisticCard.md +0 -363
  42. package/src/components/JhStepsForm/JhStepsForm.md +0 -666
  43. package/src/components/JhTable/JhTable.md +0 -730
  44. package/src/components/JhTableAttachment/JhTableAttachment.md +0 -70
  45. package/src/components/JhToast/JhToast.md +0 -67
  46. package/src/components/JhTreeSelect/JhTreeSelect.md +0 -82
  47. package/src/components/JhWaterMark/JhWaterMark.md +0 -190
  48. package/src/components/README.md +0 -52
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see jianghu-ui.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("JianghuUI",[],e):"object"==typeof exports?exports.JianghuUI=e():t.JianghuUI=e()}("undefined"!=typeof self?self:this,()=>(()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{default:()=>Yn});var n=function(){var t=this,e=t._self._c;return e("div",[t.hideDrawers?t._e():e("v-navigation-drawer",{staticClass:"jh-page-nav-bar hidden-md-and-up",attrs:{app:"",clipped:"",temporary:t.temporary},model:{value:t.mobileMenuDrawer,callback:function(e){t.mobileMenuDrawer=e},expression:"mobileMenuDrawer"}},[e("v-toolbar-title",{staticClass:"px-3 jh-toolbar-title"},[e("span",{staticClass:"text-base font-medium"},[t._v(t._s(t.appTitle))])]),t._v(" "),e("v-divider",{staticClass:"jh-divider"}),t._v(" "),e("v-list",{staticClass:"py-0",attrs:{flat:""}},[e("v-list-item-group",{attrs:{value:t.currentMenuIndex}},[t._l(t.menuList,function(n,i){return[n.children&&n.children.length>0?[e("v-list-group",{key:i,staticClass:"px-4",attrs:{value:n.active},scopedSlots:t._u([{key:"activator",fn:function(){return[e("v-list-item",{staticClass:"pl-0",attrs:{ripple:!1}},[e("v-list-item-content",[e("v-list-item-title",[t._v(t._s(n.title))])],1)],1)]},proxy:!0},{key:"appendIcon",fn:function(){return[e("v-icon",{attrs:{size:"18"}},[t._v("mdi-chevron-down")])]},proxy:!0}],null,!0)},[t._v(" "),t._v(" "),t._l(n.children,function(n,r){return[n.children&&n.children.length>0?[e("v-list-group",{key:r,staticClass:"px-0",attrs:{value:n.active},scopedSlots:t._u([{key:"activator",fn:function(){return[e("v-list-item",{staticClass:"pl-0",attrs:{ripple:!1}},[e("v-list-item-content",[e("v-list-item-title",{staticClass:"pl-6 pl-sm-4"},[t._v(t._s(n.title))])],1)],1)]},proxy:!0},{key:"appendIcon",fn:function(){return[e("v-icon",{attrs:{size:"16"}},[t._v("mdi-chevron-down")])]},proxy:!0}],null,!0)},[t._v(" "),t._v(" "),t._l(n.children,function(n,r){return e("v-list-item",{key:r,class:{"second-active":t.currentSecondMenuId===n.id&&t.currentMenuIndex===i},on:{click:function(e){return t.handleMenuClick(n,i)}}},[e("v-list-item-content",[e("v-list-item-title",{staticClass:"pl-10 pl-sm-8"},[t._v(t._s(n.title))])],1)],1)})],2)]:e("v-list-item",{key:r,class:{"second-active":t.currentSecondMenuId===n.id&&t.currentMenuIndex===i},on:{click:function(e){return t.handleMenuClick(n,i)}}},[e("v-list-item-content",[e("v-list-item-title",{staticClass:"pl-6 pl-sm-4"},[t._v(t._s(n.title))])],1)],1)]})],2)]:e("v-list-item",{key:i,staticClass:"px-4",class:{"second-active":t.currentMenuIndex===i},on:{click:function(e){return t.handleMenuClick(n,i)}}},[e("v-list-item-content",{staticClass:"pl-0"},[e("v-list-item-title",[t._v(t._s(n.title))])],1),t._v(" "),e("v-list-item-icon",{staticClass:"my-3"},[e("v-icon",{attrs:{size:"18"}},[t._v("mdi-chevron-right")])],1)],1)]})],2)],1),t._v(" "),e("v-btn",{staticClass:"jh-menu-drawer-close-float-btn",attrs:{elevation:"0",color:"success",fab:"",absolute:"",top:"",left:"",small:"",tile:""},on:{click:function(e){t.mobileMenuDrawer=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),t._v(" "),!t.hideDrawers&&t.showAvatar?e("v-navigation-drawer",{staticClass:"jh-page-nav-bar hidden-md-and-up",attrs:{app:"",clipped:"",temporary:t.temporary,right:""},model:{value:t.mobileUserMenuDrawer,callback:function(e){t.mobileUserMenuDrawer=e},expression:"mobileUserMenuDrawer"}},[e("div",{staticClass:"d-flex flex-column",staticStyle:{height:"calc(100vh - 20px)"}},[e("div",[e("v-toolbar-title",{staticClass:"px-4",staticStyle:{"min-height":"110px"}},[e("div",{staticClass:"d-flex flex-column pt-3",staticStyle:{gap:"12px"}},[e("div",{staticClass:"success--text text-xs text-center",staticStyle:{cursor:"pointer"},on:{click:function(e){t.mobileUserMenuDrawer=!1}}},[e("v-icon",{staticClass:"success--text",attrs:{size:"22"}},[t._v("mdi-window-close")]),t._v(" "),e("div",{staticClass:"success--text",staticStyle:{"margin-top":"-2px"}},[t._v("关闭")])],1),t._v(" "),e("div",{staticClass:"d-flex align-start mb-2",staticStyle:{gap:"4px"}},[e("v-icon",{attrs:{size:36}},[t._v("mdi-account-circle")]),t._v(" "),e("div",{staticClass:"flex-1"},[e("div",{staticClass:"text-xs"},[t._v("\n "+t._s(t.userInfo.username)+"\n "),e("span",{staticClass:"text-caption grey--text"},[t._v(t._s(t.userInfo.userId))])]),t._v(" "),e("div",{staticClass:"d-flex flex-wrap",staticStyle:{gap:"4px"}},t._l(t.userInfo.roles,function(n,i){return e("span",{key:i,staticClass:"text-caption px-1 grey--text",staticStyle:{border:"1px solid #ccc","border-radius":"4px"}},[t._v("\n "+t._s(n)+"\n ")])}),0)])],1)])]),t._v(" "),e("v-divider",{staticClass:"jh-divider"})],1),t._v(" "),e("v-list",{staticClass:"flex-1",attrs:{nav:"",dense:""}},t._l(t.avatarMenuList,function(n,i){return e("v-list-item",{key:i,on:{click:function(e){return t.handleMenuClick(n)}}},[e("v-list-item-icon",{staticClass:"mr-1 mt-1"},[e("v-icon",{attrs:{size:"16",color:"grey darken-3"}},[t._v("mdi-account-cog-outline")])],1),t._v(" "),e("v-list-item-content",[e("v-list-item-title",{attrs:{color:"grey darken-3"}},[t._v(t._s(n.title))])],1)],1)}),1),t._v(" "),e("div",{staticClass:"px-4"},[e("v-btn",{attrs:{block:"",elevation:"0",small:"",color:"error"},on:{click:t.handleLogout}},[e("v-icon",{attrs:{size:"16"}},[t._v("mdi-logout")]),t._v(" "),e("span",{staticClass:"ml-2"},[t._v("登出")])],1)],1)],1)]):t._e(),t._v(" "),e("v-app-bar",{staticClass:"jh-page-header px-8",attrs:{app:"","clipped-left":"",height:"52",flat:""}},[!t.hideDrawers&&t.isMobile?e("div",{staticClass:"hidden-md-and-up d-flex flex-column justify-center align-start",staticStyle:{width:"60px",cursor:"pointer"},on:{click:function(e){t.mobileMenuDrawer=!t.mobileMenuDrawer}}},[e("span",{staticClass:"success--text text-caption"},[e("v-icon",{staticClass:"success--text",attrs:{size:"24"}},[t._v("mdi-menu")]),t._v(" "),e("div",{staticClass:"text-xs",staticStyle:{"margin-top":"-2px"}},[t._v("目录")])],1)]):t._e(),t._v(" "),e("v-toolbar-title",{staticClass:"pl-0"},[e("span",{staticClass:"hidden-sm-and-down text-h6 font-weight-bold"},[t._t("title",function(){return[t._v(t._s(t.appTitle))]})],2),t._v(" "),e("span",{staticClass:"hidden-md-and-up font-weight-medium text-center"},[e("div",{staticClass:"text-base"},[t._v(t._s(t.appTitle))]),t._v(" "),e("div",{staticClass:"text-xs grey--text text--darken-2",staticStyle:{"margin-top":"-2px"}},[t._t("subtitle")],2)])]),t._v(" "),e("v-spacer",{staticClass:"hidden-sm-and-down"}),t._v(" "),t.hideDrawers?t._e():e("v-tabs",{staticClass:"hidden-sm-and-down",attrs:{"show-arrows":"","slider-size":"0",color:"success"}},[t._l(t.menuList,function(n,i){return[n.children&&0!==n.children.length?[e("v-menu",{key:i,attrs:{"offset-y":""},scopedSlots:t._u([{key:"activator",fn:function(r){var a=r.on,o=r.attrs;return[e("v-tab",t._g(t._b({staticClass:"px-2 mx-1 jh-header-tab",class:{"jh-header-tab-active":t.currentMenuIndex===i}},"v-tab",o,!1),a),[t._v("\n "+t._s(n.title)+"\n "),e("v-icon",{attrs:{size:"12"}},[t._v("mdi-chevron-down")])],1)]}}],null,!0)},[t._v(" "),e("v-list",{attrs:{nav:"",dense:""}},[t._l(n.children,function(n,r){return[n.children&&n.children.length>0?[e("v-menu",{key:r,attrs:{"offset-x":"",right:""},scopedSlots:t._u([{key:"activator",fn:function(i){var r=i.on,a=i.attrs;return[e("v-list-item",t._g(t._b({},"v-list-item",a,!1),r),[e("v-list-item-content",[e("v-list-item-title",{staticStyle:{color:"#41434f"}},[t._v(t._s(n.title))])],1),t._v(" "),e("v-list-item-action",[e("v-icon",[t._v("mdi-chevron-right")])],1)],1)]}}],null,!0)},[t._v(" "),e("v-list",{attrs:{nav:"",dense:""}},t._l(n.children,function(n,r){return e("v-list-item",{key:r,class:{"second-active":t.currentSecondMenuId===n.id&&t.currentMenuIndex===i},on:{click:function(e){return t.handleMenuClick(n,i)}}},[e("v-list-item-content",[e("v-list-item-title",{staticStyle:{color:"#41434f"}},[t._v(t._s(n.title))])],1)],1)}),1)],1)]:e("v-list-item",{key:r,class:{"second-active":t.currentSecondMenuId===n.id&&t.currentMenuIndex===i},on:{click:function(e){return t.handleMenuClick(n,i)}}},[e("v-list-item-content",[e("v-list-item-title",{staticStyle:{color:"#41434f"}},[t._v(t._s(n.title))])],1)],1)]})],2)],1)]:[e("v-tab",{key:i,staticClass:"px-2 mx-1 jh-header-tab",class:{"jh-header-tab-active":t.currentMenuIndex===i},on:{click:function(e){return t.handleMenuClick(n,i)}}},[t._v("\n "+t._s(n.title)+"\n ")])]]})],2),t._v(" "),e("div",{staticClass:"d-flex align-center",staticStyle:{"white-space":"nowrap"}},[t.rightMenuList.length>0?e("div",{staticClass:"d-flex align-center mr-2"},t._l(t.rightMenuList,function(n,i){return e("div",{key:i,staticClass:"d-flex align-center ml-4 jh-right-menu",staticStyle:{cursor:"pointer"},on:{click:function(e){return t.handleMenuClick(n)}}},[n.icon?e("v-icon",{attrs:{size:"20"}},[t._v(t._s(n.icon))]):t._e(),t._v(" "),e("div",{class:{"ml-1":n.icon}},[t._v(t._s(n.title))])],1)}),0):t._e(),t._v(" "),t.rightMenuList.length>0?e("v-divider",{staticClass:"mx-3 jh-divider",attrs:{vertical:""}}):t._e(),t._v(" "),t.showAvatar?[t.isMobile?e("div",{staticClass:"jh-avatar-menu-btn d-flex flex-column justify-center align-end hidden-sm-and-up",on:{click:function(e){t.mobileUserMenuDrawer=!t.mobileUserMenuDrawer}}},[e("div",{staticClass:"text-center"},[e("v-icon",{attrs:{size:24,color:"success"}},[t._v("mdi-account-circle")]),t._v(" "),e("div",{staticStyle:{"margin-top":"-2px"}},[e("p",{staticClass:"text-xs success--text mb-0",staticStyle:{"max-width":"60px",overflow:"hidden","text-overflow":"ellipsis"}},[t._v("\n "+t._s(t.userInfo.username)+"\n ")])])],1)]):t._e(),t._v(" "),e("v-menu",{attrs:{"offset-y":""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[t.isMobile?t._e():e("div",t._g(t._b({staticClass:"jh-avatar-menu-btn d-flex align-center px-1 hidden-xs-only"},"div",r,!1),i),[e("v-icon",{attrs:{size:32,color:"grey lighten-2"}},[t._v("mdi-account-circle")]),t._v(" "),e("div",{staticClass:"ml-1"},[e("p",{staticClass:"caption black--text mb-0"},[t._v(t._s(t.userInfo.username))])])],1)]}}],null,!1,2365689925)},[t._v(" "),e("v-list",{attrs:{nav:"",dense:""}},[e("v-list-item",[e("v-list-item-content",[e("p",{staticClass:"caption black--text mb-0"},[t._v(t._s(t.userInfo.username))]),t._v(" "),e("p",{staticClass:"caption grey--text mb-0",staticStyle:{"font-size":"10px"}},[t._v(t._s(t.userInfo.userId))])])],1),t._v(" "),t.userInfo.roles&&t.userInfo.roles.length>0?e("div",{staticStyle:{"max-width":"220px",padding:"0 16px"}},t._l(t.userInfo.roles,function(n,i){return e("v-chip",{key:i,staticClass:"mr-1 mb-1",staticStyle:{"font-size":"10px"},attrs:{label:"","x-small":"",outlined:""}},[t._v("\n "+t._s(n)+"\n ")])}),1):t._e(),t._v(" "),t.userInfo.roles&&t.userInfo.roles.length>0?e("v-divider",{staticClass:"my-1 jh-divider"}):t._e(),t._v(" "),t._l(t.avatarMenuList,function(n,i){return e("v-list-item",{key:i,on:{click:function(e){return t.handleMenuClick(n)}}},[e("v-list-item-icon",{staticClass:"mr-1 mt-1"},[e("v-icon",{attrs:{size:"16",color:"grey darken-3"}},[t._v("mdi-account-cog-outline")])],1),t._v(" "),e("v-list-item-content",[e("v-list-item-title",{attrs:{color:"grey darken-3"}},[t._v(t._s(n.title))])],1)],1)}),t._v(" "),e("v-list-item",{on:{click:t.handleLogout}},[e("v-list-item-icon",{staticClass:"mr-1 mt-1"},[e("v-icon",{attrs:{size:"16",color:"grey darken-3"}},[t._v("mdi-logout")])],1),t._v(" "),e("v-list-item-content",[e("v-list-item-title",{attrs:{color:"grey darken-3"}},[t._v("登出")])],1)],1)],2)],1)]:t._e()],2)],1)],1)};function i(t,e,n,i,r,a,o,l){var s,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),o?(s=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=s):r&&(s=l?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),s)if(c.functional){c._injectStyles=s;var u=c.render;c.render=function(t,e){return s.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,s):[s]}return{exports:t,options:c}}n._withStripped=!0;const r=i({name:"JhMenu",props:{appTitle:{type:String,default:"JianghuJS"},menuList:{type:Array,default:function(){return[]}},rightMenuList:{type:Array,default:function(){return[]}},avatarMenuList:{type:Array,default:function(){return[]}},userInfo:{type:Object,default:function(){return{username:"Guest",userId:"",roles:[]}}},showAvatar:{type:Boolean,default:!0},activeMenuIndex:{type:Number,default:-1},activeSecondMenuId:{type:String,default:null},temporary:{type:Boolean,default:!0},hideDrawers:{type:Boolean,default:!1}},data:function(){return{mobileMenuDrawer:!1,mobileUserMenuDrawer:!1,currentMenuIndex:this.activeMenuIndex,currentSecondMenuId:this.activeSecondMenuId,isMobile:window.innerWidth<600}},watch:{activeMenuIndex:function(t){this.currentMenuIndex=t},activeSecondMenuId:function(t){this.currentSecondMenuId=t}},methods:{handleMenuClick:function(t,e){void 0!==e&&(this.currentMenuIndex=e),t.id&&(this.currentSecondMenuId=t.id),this.mobileMenuDrawer=!1,this.mobileUserMenuDrawer=!1,this.$emit("menu-click",t,e)},handleLogout:function(){this.mobileUserMenuDrawer=!1,this.$emit("logout")}}},n,[],!1,null,"73ddcbb9",null).exports;var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"jh-scene"},[e("v-row",{staticClass:"ma-0"},[e("v-btn-toggle",{class:{"mr-md-2":t.showActionBtn},attrs:{value:t.currentSceneIndex,mandatory:"",dense:"",color:"success"},on:{change:t.handleSceneChange}},t._l(t.sceneList,function(n,i){return e("v-btn",{key:i,attrs:{small:""}},[t._v(t._s(n.name))])}),1),t._v(" "),t.showActionBtn?e("v-menu",{attrs:{"offset-y":""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-btn-toggle",{attrs:{dense:"",color:"white"}},[e("v-btn",t._g(t._b({attrs:{small:""}},"v-btn",r,!1),i),[e("v-icon",{staticClass:"mx-0",attrs:{small:""}},[t._v("mdi-chevron-down")])],1)],1)]}}],null,!1,1121844081),model:{value:t.isSceneOperationShown,callback:function(e){t.isSceneOperationShown=e},expression:"isSceneOperationShown"}},[t._v(" "),e("v-list",{staticClass:"pb-0",attrs:{dense:""}},[e("v-list-item",{on:{click:t.openCreateSceneDialog}},[e("v-list-item-title",{staticClass:"success--text"},[e("v-icon",{staticClass:"success--text",attrs:{small:""}},[t._v("mdi-plus")]),t._v(" "),e("span",{staticClass:"success--text"},[t._v("新建场景")])],1)],1),t._v(" "),e("v-list-item",{on:{click:t.openSceneListDialog}},[e("v-list-item-title",{staticClass:"success--text"},[e("v-icon",{staticClass:"success--text",attrs:{small:""}},[t._v("mdi-cog-outline")]),t._v(" "),e("span",{staticClass:"success--text"},[t._v("场景管理")])],1)],1)],1)],1):t._e()],1),t._v(" "),e("v-dialog",{attrs:{persistent:"",width:"360px"},model:{value:t.isCreateSceneDialogShown,callback:function(e){t.isCreateSceneDialogShown=e},expression:"isCreateSceneDialogShown"}},[e("v-card",[e("v-card-title",[e("v-row",{staticClass:"ma-0"},[e("div",{staticStyle:{"font-size":"16px"}},[t._v("新建场景")]),t._v(" "),e("v-spacer"),t._v(" "),e("v-btn",{staticClass:"elevation-0",attrs:{fab:"","x-small":""},on:{click:t.closeCreateSceneDialog}},[e("v-icon",{attrs:{dark:""}},[t._v("mdi-close")])],1)],1)],1),t._v(" "),e("v-card-text",[e("div",{staticClass:"mb-2"},[e("span",{staticClass:"jh-input-label"},[t._v("场景名称")]),t._v(" "),e("v-text-field",{staticClass:"jh-v-input",attrs:{dense:"","single-line":"",filled:"","hide-details":"",placeholder:"场景名称,最多10个字符",rules:t.validationRules.requireRules},model:{value:t.createItem.name,callback:function(e){t.$set(t.createItem,"name",e)},expression:"createItem.name"}})],1),t._v(" "),t.hasFormSlot?e("div",{staticClass:"mb-2"},[e("span",{staticClass:"jh-input-label"},[t._v("筛选条件")]),t._v(" "),t._t("form",null,{form:t.createItem.form})],2):t._e()]),t._v(" "),e("v-card-actions",{staticClass:"pb-4"},[e("v-row",{staticClass:"ma-0 pa-6 pt-2 justify-end"},[e("v-btn",{staticClass:"ml-2",attrs:{small:"",color:"success"},on:{click:t.doCreateScene}},[t._v("保存")]),t._v(" "),e("v-btn",{staticClass:"ml-2",attrs:{small:""},on:{click:t.closeCreateSceneDialog}},[t._v("取消")])],1)],1)],1)],1),t._v(" "),e("v-dialog",{attrs:{persistent:"",width:"360px"},model:{value:t.isSceneListShown,callback:function(e){t.isSceneListShown=e},expression:"isSceneListShown"}},[e("v-card",{staticClass:"scene-manage"},[e("v-card-title",[e("v-row",{staticClass:"ma-0"},[e("div",{staticStyle:{"font-size":"16px"}},[t._v("场景管理")]),t._v(" "),e("v-spacer"),t._v(" "),e("v-btn",{staticClass:"elevation-0",attrs:{fab:"","x-small":""},on:{click:t.closeSceneListDialog}},[e("v-icon",{attrs:{dark:""}},[t._v("mdi-close")])],1)],1)],1),t._v(" "),e("v-card-text",{staticClass:"pb-2"},[e("v-card",{attrs:{outlined:""}},[e("v-list",{staticClass:"scene-list",attrs:{dense:""}},[t.sceneCustomList&&t.sceneCustomList.length?t._l(t.sceneCustomList,function(n){return e("v-list-item",{key:n.id,staticClass:"scene-item px-2"},[e("v-list-item-content",[t._v(t._s(n.name))]),t._v(" "),e("v-list-item-icon",{on:{click:function(e){return e.stopPropagation(),t.doDeleteScene(n)}}},[e("v-icon",{attrs:{size:"22"}},[t._v("mdi-delete")])],1)],1)}):[e("div",{staticClass:"text-center grey--text",staticStyle:{"line-height":"100px"}},[t._v("暂无自定义场景")])]],2)],1)],1),t._v(" "),e("v-card-actions",{staticClass:"pb-4"},[e("v-row",{staticClass:"ma-0 pa-6 pt-2 justify-end"},[e("v-btn",{staticClass:"ml-2",attrs:{small:"",color:"success"},on:{click:t.changeToCreateDialog}},[t._v("新建场景")]),t._v(" "),e("v-btn",{staticClass:"ml-2",attrs:{small:""},on:{click:t.closeSceneListDialog}},[t._v("取消")])],1)],1)],1)],1)],1)};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function c(t,e,n){return(e=function(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}a._withStripped=!0;const f=i({name:"JhScene",props:{initFormData:{type:Object,default:function(){return{}}},storageKey:{type:String,default:"jh-scene-list"},scenes:{type:Array,default:function(){return[]}},currentSceneId:{type:String,default:null},showActionBtn:{type:Boolean,default:!0},useLocalStorage:{type:Boolean,default:!1}},data:function(){return{validationRules:{requireRules:[function(t){return!!t||"此项必填"}]},sceneList:[],sceneCustomList:[],deleteItem:{},createItem:{name:"",form:{}},isCreateSceneDialogShown:!1,isSceneOperationShown:!1,isSceneListShown:!1,currentSceneIndex:0}},computed:{hasFormSlot:function(){return!!this.$scopedSlots.form}},watch:{scenes:{handler:function(t){t&&t.length>0&&(this.sceneList=u(t),this.updateCustomSceneList())},immediate:!0}},created:function(){this.initSceneList()},methods:{initSceneList:function(){this.useLocalStorage?this.getSceneListFromStorage():this.scenes&&this.scenes.length>0&&(this.sceneList=u(this.scenes)),this.updateCustomSceneList(),this.useDefaultScene()},getSceneListFromStorage:function(){var t=localStorage.getItem(this.storageKey);null==t&&(t="[]"),t=JSON.parse(t),this.sceneList=t},saveSceneListToStorage:function(){this.useLocalStorage&&localStorage.setItem(this.storageKey,JSON.stringify(this.sceneList))},updateCustomSceneList:function(){this.sceneCustomList=this.sceneList.filter(function(t){return!t.system})},useDefaultScene:function(){var t=this.sceneList.find(function(t){return!0===t.default});!t&&this.sceneList.length>0&&(t=this.sceneList[0]),t&&(this.currentSceneIndex=this.sceneList.findIndex(function(e){return e.id===t.id}),this.useScene(t))},useScene:function(t){this.$emit("scene-change",t)},handleSceneChange:function(t){this.currentSceneIndex=t,this.sceneList[t]&&this.useScene(this.sceneList[t])},getUUID:function(t){for(var e=[],n="0123456789abcdef",i=0;i<10;i++)e[i]=n.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=n.substr(3&e[19]|8,1),t+"-"+e.join("")},prepareCreateSceneData:function(){this.createItem={name:"",form:s({},this.initFormData),id:this.getUUID("scene")}},openCreateSceneDialog:function(){this.prepareCreateSceneData(),this.isCreateSceneDialogShown=!0,this.isSceneOperationShown=!1},closeCreateSceneDialog:function(){this.isCreateSceneDialogShown=!1},validateSceneName:function(){var t=this.createItem.name;if(!t)throw new Error("场景名称不能为空");if(this.sceneList.some(function(e){return e.name===t}))throw new Error("场景名称重复")},doCreateScene:function(){try{this.validateSceneName();var t=s({},this.createItem);this.sceneList.push(t),this.saveSceneListToStorage(),this.updateCustomSceneList(),this.closeCreateSceneDialog(),this.currentSceneIndex=this.sceneList.length-1,this.useScene(t),this.$emit("scene-created",t)}catch(t){this.$emit("error",t.message)}},openSceneListDialog:function(){this.isSceneListShown=!0,this.isSceneOperationShown=!1},closeSceneListDialog:function(){this.isSceneListShown=!1},changeToCreateDialog:function(){this.closeSceneListDialog(),this.openCreateSceneDialog()},doDeleteScene:function(t){var e;this.deleteItem=s({},t),(null===(e=this.sceneList[this.currentSceneIndex])||void 0===e?void 0:e.id)===t.id&&this.useDefaultScene(),this.sceneList=this.sceneList.filter(function(e){return e.id!==t.id}),this.saveSceneListToStorage(),this.updateCustomSceneList(),this.$emit("scene-deleted",t)}}},a,[],!1,null,"50ab6d9d",null).exports;var h=function(){var t=this,e=t._self._c;return e("div",{staticClass:"date-range-picker-container"},[e("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"auto","max-width":"600"},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-text-field",t._g(t._b({attrs:{prefix:t.prefix,"prepend-inner-icon":"mdi-calendar",readonly:"",filled:t.filled,dense:t.dense,outlined:t.outlined,"hide-details":t.hideDetails,clearable:t.clearable},on:{"click:clear":t.clearDateRange},model:{value:t.dateRangeText,callback:function(e){t.dateRangeText=e},expression:"dateRangeText"}},"v-text-field",r,!1),i))]}}]),model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[t._v(" "),e("v-card",[e("v-card-text",{staticClass:"pa-0"},[e("div",{staticClass:"d-flex"},[e("v-list",{staticClass:"quick-select-list",attrs:{dense:"",nav:""}},[e("v-list-item",{class:{"v-item--active v-list-item--active primary--text":t.isLast7Days},on:{click:function(e){return t.quickSelect(7)}}},[e("v-list-item-title",[t._v("最近7天")])],1),t._v(" "),e("v-list-item",{class:{"v-item--active v-list-item--active primary--text":t.isLast30Days},on:{click:function(e){return t.quickSelect(30)}}},[e("v-list-item-title",[t._v("最近30天")])],1),t._v(" "),e("v-list-item",{class:{"v-item--active v-list-item--active primary--text":t.isLast90Days},on:{click:function(e){return t.quickSelect(90)}}},[e("v-list-item-title",[t._v("最近90天")])],1),t._v(" "),e("v-list-item",{class:{"v-item--active v-list-item--active primary--text":t.isThisMonth},on:{click:t.selectThisMonth}},[e("v-list-item-title",[t._v("本月")])],1),t._v(" "),e("v-list-item",{class:{"v-item--active v-list-item--active primary--text":t.isLastMonth},on:{click:t.selectLastMonth}},[e("v-list-item-title",[t._v("上月")])],1),t._v(" "),e("v-list-item",{class:{"v-item--active v-list-item--active primary--text":t.isLast365Days},on:{click:function(e){return t.quickSelect(365)}}},[e("v-list-item-title",[t._v("最近一年")])],1)],1),t._v(" "),e("v-date-picker",{attrs:{"no-title":"",range:"",color:"primary"},model:{value:t.tempDateRange,callback:function(e){t.tempDateRange=e},expression:"tempDateRange"}})],1)]),t._v(" "),e("v-divider"),t._v(" "),e("v-card-actions",[e("v-spacer"),t._v(" "),e("v-btn",{attrs:{text:"",color:"grey"},on:{click:t.cancelDateRange}},[t._v("取消")]),t._v(" "),e("v-btn",{attrs:{text:"",color:"primary"},on:{click:t.confirmDateRange}},[t._v("确认")])],1)],1)],1)],1)};function p(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return v(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}h._withStripped=!0;const m=i({name:"JhDateRangePicker",props:{value:{type:Array,default:function(){return[]}},prefix:{type:String,default:""},filled:{type:Boolean,default:!0},dense:{type:Boolean,default:!0},outlined:{type:Boolean,default:!1},hideDetails:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0}},data:function(){return{menu:!1,dateRange:[],tempDateRange:[]}},computed:{dateRangeText:function(){return this.dateRange&&2===this.dateRange.length?"".concat(this.formatDate(this.dateRange[0])," ~ ").concat(this.formatDate(this.dateRange[1])):""},isLast7Days:function(){if(!this.tempDateRange||2!==this.tempDateRange.length)return!1;var t=this.getToday(),e=this.subtractDays(7);return this.tempDateRange[0]===e&&this.tempDateRange[1]===t},isLast30Days:function(){if(!this.tempDateRange||2!==this.tempDateRange.length)return!1;var t=this.getToday(),e=this.subtractDays(30);return this.tempDateRange[0]===e&&this.tempDateRange[1]===t},isLast90Days:function(){if(!this.tempDateRange||2!==this.tempDateRange.length)return!1;var t=this.getToday(),e=this.subtractDays(90);return this.tempDateRange[0]===e&&this.tempDateRange[1]===t},isThisMonth:function(){if(!this.tempDateRange||2!==this.tempDateRange.length)return!1;var t=this.getToday(),e=this.getStartOfMonth();return this.tempDateRange[0]===e&&this.tempDateRange[1]===t},isLastMonth:function(){if(!this.tempDateRange||2!==this.tempDateRange.length)return!1;var t=this.getStartOfLastMonth(),e=this.getEndOfLastMonth();return this.tempDateRange[0]===t&&this.tempDateRange[1]===e},isLast365Days:function(){if(!this.tempDateRange||2!==this.tempDateRange.length)return!1;var t=this.getToday(),e=this.subtractDays(365);return this.tempDateRange[0]===e&&this.tempDateRange[1]===t}},watch:{value:{handler:function(t){t&&Array.isArray(t)&&2===t.length&&(this.dateRange=p(t),this.tempDateRange=p(t))},immediate:!0},menu:function(t){t&&(this.tempDateRange=2===this.dateRange.length?p(this.dateRange):[])}},mounted:function(){this.value&&Array.isArray(this.value)&&2===this.value.length&&(this.dateRange=p(this.value),this.tempDateRange=p(this.value))},methods:{formatDate:function(t){return t||""},getToday:function(){var t=new Date;return this.toDateString(t)},subtractDays:function(t){var e=new Date;return e.setDate(e.getDate()-t),this.toDateString(e)},getStartOfMonth:function(){var t=new Date;return this.toDateString(new Date(t.getFullYear(),t.getMonth(),1))},getStartOfLastMonth:function(){var t=new Date;return this.toDateString(new Date(t.getFullYear(),t.getMonth()-1,1))},getEndOfLastMonth:function(){var t=new Date;return this.toDateString(new Date(t.getFullYear(),t.getMonth(),0))},toDateString:function(t){var e=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0");return"".concat(e,"-").concat(n,"-").concat(i)},confirmDateRange:function(){if(this.tempDateRange&&2===this.tempDateRange.length){var t=p(this.tempDateRange).sort();this.dateRange=t,this.$emit("input",this.dateRange),this.$emit("change",this.dateRange)}this.menu=!1},cancelDateRange:function(){this.tempDateRange=2===this.dateRange.length?p(this.dateRange):[],this.menu=!1},clearDateRange:function(){this.dateRange=[],this.tempDateRange=[],this.$emit("input",[]),this.$emit("change",[])},quickSelect:function(t){var e=this.getToday(),n=this.subtractDays(t);this.tempDateRange=[n,e]},selectThisMonth:function(){var t=this.getToday(),e=this.getStartOfMonth();this.tempDateRange=[e,t]},selectLastMonth:function(){var t=this.getStartOfLastMonth(),e=this.getEndOfLastMonth();this.tempDateRange=[t,e]}}},h,[],!1,null,"f2799a5a",null).exports;var y=function(){var t=this,e=t._self._c;return e("div",{staticClass:"jh-query-filter"},[e("v-form",{ref:"queryForm",on:{submit:function(e){return e.preventDefault(),t.handleSearch.apply(null,arguments)}}},[e("v-row",{class:t.rowClass},[e("JhFormFields",{attrs:{fields:t.visibleFieldsWithConfig,showLabels:t.showLabels,labelClass:t.labelClass,inputClass:t.inputClass,defaultDense:t.dense,defaultFilled:t.filled,defaultOutlined:t.outlined,defaultSingleLine:t.singleLine,hideDetails:!0,layout:"vertical"},on:{"field-change":t.handleFieldChange},scopedSlots:t._u([t._l(t.fields,function(e){return{key:"field-".concat(e.key),fn:function(n){return[t._t("field-".concat(e.key),null,null,n)]}}})],null,!0),model:{value:t.formData,callback:function(e){t.formData=e},expression:"formData"}}),t._v(" "),e("v-col",{staticClass:"d-flex align-end flex-column justify-center"},[t.showLabels?e("span",{staticClass:"opacity-0",class:t.labelClass},[t._v("\n 工具栏\n ")]):t._e(),t._v(" "),t._t("buttons",function(){return[e("div",{staticClass:"jh-query-filter-buttons",class:t.buttonClass},[e("v-btn",{staticClass:"jh-query-filter-search-btn",attrs:{color:"primary",small:"small"===t.buttonSize,dense:"small"===t.buttonSize,depressed:"",loading:t.searching},on:{click:t.handleSearch}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-magnify")]),t._v("\n "+t._s(t.searchText)+"\n ")],1),t._v(" "),e("v-btn",{staticClass:"jh-query-filter-reset-btn",attrs:{outlined:"",small:"small"===t.buttonSize,dense:"small"===t.buttonSize},on:{click:t.handleReset}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-refresh")]),t._v("\n "+t._s(t.resetText)+"\n ")],1),t._v(" "),t.collapsible&&t.fields.length>t.defaultVisibleCount?e("v-btn",{staticClass:"jh-query-filter-collapse-btn",attrs:{text:"",small:"small"===t.buttonSize,dense:"small"===t.buttonSize,color:"primary"},on:{click:t.toggleCollapse}},[t._v("\n "+t._s(t.collapsed?t.expandText:t.collapseText)+"\n "),e("v-icon",{attrs:{right:"",small:""}},[t._v(t._s(t.collapsed?"mdi-chevron-down":"mdi-chevron-up"))])],1):t._e()],1)]},{formData:t.formData,search:t.handleSearch,reset:t.handleReset})],2)],1)],1)],1)};y._withStripped=!0;var b=function(){var t=this,e=t._self._c;return e("div",{class:t.formFieldsClasses},[t.title||t.$slots.title?e("div",{staticClass:"jh-form-fields-header"},[t._t("title",function(){return[e("div",{staticClass:"jh-form-fields-title"},[t._v("\n "+t._s(t.title)+"\n "),t.tooltip?e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-icon",t._g(t._b({staticClass:"ml-1",attrs:{small:""}},"v-icon",r,!1),i),[t._v("mdi-help-circle-outline")])]}}],null,!1,1799656693)},[t._v(" "),e("span",[t._v(t._s(t.tooltip))])]):t._e()],1)]}),t._v(" "),t.description?e("div",{staticClass:"jh-form-fields-description"},[t._v(t._s(t.description))]):t._e()],2):t._e(),t._v(" "),e("v-row",t._b({class:t.rowClass,attrs:{dense:t.dense}},"v-row",t.rowProps,!1),[t._l(t.visibleFields,function(n,i){return["group"===n.type?e("v-col",{key:"group-".concat(i),attrs:{cols:"12"}},[e("div",{staticClass:"jh-form-group-title",class:n.titleClass},[n.divider&&i>0?e("v-divider",{staticClass:"mb-4"}):t._e(),t._v(" "),n.title?e("h3",{staticClass:"text-h6 mb-2"},[t._v(t._s(n.title))]):t._e(),t._v(" "),n.description?e("p",{staticClass:"text-caption grey--text mb-3"},[t._v(t._s(n.description))]):t._e()],1)]):e("v-col",{key:n.key,class:t.getFieldColClass(n),attrs:{cols:t.getFieldCols(n),sm:t.getFieldSm(n),md:t.getFieldMd(n),lg:t.getFieldLg(n),xl:t.getFieldXl(n)}},[e("div",{class:t.getFieldWrapperClass(n)},[n.label&&t.showLabels&&("horizontal"===t.layout||"horizontal"===n.layout)?e("div",{class:t.getHorizontalLabelClass(n),style:t.getHorizontalLabelStyle(n)},[n.required&&t.showRequiredMark?e("span",{staticClass:"error--text mr-1"},[t._v("*")]):t._e(),t._v("\n "+t._s(n.label)+"\n "),n.tooltip?e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-icon",t._g(t._b({staticClass:"ml-1",attrs:{small:""}},"v-icon",r,!1),i),[t._v("mdi-help-circle-outline")])]}}],null,!0)},[t._v(" "),e("span",[t._v(t._s(n.tooltip))])]):t._e()],1):t._e(),t._v(" "),e("div",{class:t.getFieldInputClass(n)},[n.label&&t.showLabels&&"horizontal"!==t.layout&&"horizontal"!==n.layout?e("div",{class:t.getVerticalLabelClass(n)},[n.required&&t.showRequiredMark?e("span",{staticClass:"error--text"},[t._v("*")]):t._e(),t._v("\n "+t._s(n.label)+"\n "),n.tooltip?e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-icon",t._g(t._b({staticClass:"ml-1",attrs:{small:""}},"v-icon",r,!1),i),[t._v("mdi-help-circle-outline")])]}}],null,!0)},[t._v(" "),e("span",[t._v(t._s(n.tooltip))])]):t._e()],1):t._e(),t._v(" "),n.extra?e("div",{staticClass:"jh-field-extra text-caption grey--text mb-2"},[t._v("\n "+t._s(n.extra)+"\n ")]):t._e(),t._v(" "),t.isFieldReadonly(n)?e("div",{staticClass:"jh-form-readonly-text"},[t._v("\n "+t._s(t.getReadonlyValue(n))+"\n ")]):["text"!==n.type&&n.type?"textarea"===n.type?e("v-textarea",t._b({class:t.inputClass,attrs:{dense:t.getDense(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,placeholder:n.placeholder,rows:n.rows||3,"hide-details":n.hideDetails||t.hideDetails},on:{input:function(e){return t.handleInput(n.key,e)},change:function(e){return t.handleChange(n.key,e)},blur:function(e){return t.handleBlur(n.key,e)}}},"v-textarea",n.props,!1)):"number"===n.type?e("v-text-field",t._b({class:t.inputClass,attrs:{type:"number",dense:t.getDense(n),"single-line":t.getSingleLine(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,placeholder:n.placeholder,"hide-details":n.hideDetails||t.hideDetails},on:{input:function(e){return t.handleInput(n.key,e)},change:function(e){return t.handleChange(n.key,e)},blur:function(e){return t.handleBlur(n.key,e)}}},"v-text-field",n.props,!1)):"select"===n.type?e("v-select",t._b({class:t.inputClass,attrs:{dense:t.getDense(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),items:t.getFieldOptions(n),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,placeholder:n.placeholder,"item-text":n.itemText||"text","item-value":n.itemValue||"value",multiple:n.multiple,chips:n.chips,"hide-details":n.hideDetails||t.hideDetails},on:{input:function(e){return t.handleInput(n.key,e)},change:function(e){return t.handleChange(n.key,e)},blur:function(e){return t.handleBlur(n.key,e)}}},"v-select",n.props,!1)):"autocomplete"===n.type?e("v-autocomplete",t._b({class:t.inputClass,attrs:{dense:t.getDense(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),items:t.getFieldOptions(n),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,placeholder:n.placeholder,"item-text":n.itemText||"text","item-value":n.itemValue||"value","hide-details":n.hideDetails||t.hideDetails},on:{input:function(e){return t.handleInput(n.key,e)},change:function(e){return t.handleChange(n.key,e)},blur:function(e){return t.handleBlur(n.key,e)}}},"v-autocomplete",n.props,!1)):"date"===n.type?e("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"290px"},scopedSlots:t._u([{key:"activator",fn:function(i){var r=i.on,a=i.attrs;return[e("v-text-field",t._g(t._b({class:t.inputClass,attrs:{dense:t.getDense(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),placeholder:n.placeholder,"hide-details":n.hideDetails||t.hideDetails,readonly:""}},"v-text-field",a,!1),r))]}}],null,!0),model:{value:t.dateMenus[n.key],callback:function(e){t.$set(t.dateMenus,n.key,e)},expression:"dateMenus[field.key]"}},[t._v(" "),e("v-date-picker",t._b({attrs:{value:t.getFieldValue(n.key),locale:n.locale||"zh-cn"},on:{input:function(e){t.dateMenus[n.key]=!1,t.handleInput(n.key,e)}}},"v-date-picker",n.pickerProps,!1))],1):"time"===n.type?e("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"290px"},scopedSlots:t._u([{key:"activator",fn:function(i){var r=i.on,a=i.attrs;return[e("v-text-field",t._g(t._b({class:t.inputClass,attrs:{dense:t.getDense(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),placeholder:n.placeholder,"hide-details":n.hideDetails||t.hideDetails,readonly:""}},"v-text-field",a,!1),r))]}}],null,!0),model:{value:t.timeMenus[n.key],callback:function(e){t.$set(t.timeMenus,n.key,e)},expression:"timeMenus[field.key]"}},[t._v(" "),e("v-time-picker",t._b({attrs:{value:t.getFieldValue(n.key),format:"24hr"},on:{input:function(e){t.timeMenus[n.key]=!1,t.handleInput(n.key,e)}}},"v-time-picker",n.pickerProps,!1))],1):"color"===n.type?e("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"320px"},scopedSlots:t._u([{key:"activator",fn:function(i){var r=i.on;return i.attrs,[e("v-text-field",t._g(t._b({class:t.inputClass,attrs:{dense:t.getDense(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),placeholder:n.placeholder,"hide-details":n.hideDetails||t.hideDetails,readonly:""},scopedSlots:t._u([{key:"append",fn:function(){return[e("span",{staticClass:"jh-color-preview",style:{backgroundColor:t.getFieldValue(n.key)||n.defaultValue||"#ffffff"}})]},proxy:!0}],null,!0)},"v-text-field",n.props,!1),r))]}}],null,!0),model:{value:t.colorMenus[n.key],callback:function(e){t.$set(t.colorMenus,n.key,e)},expression:"colorMenus[field.key]"}},[t._v(" "),e("v-color-picker",t._b({attrs:{value:t.getFieldValue(n.key)||n.defaultValue||"#000000",flat:"","hide-mode-switch":!1!==n.hideModeSwitch},on:{input:function(e){return t.handleColorInput(n,e)}}},"v-color-picker",n.pickerProps,!1))],1):"slider"===n.type?e("v-slider",t._b({class:t.inputClass,attrs:{value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,min:void 0!==n.min?n.min:0,max:void 0!==n.max?n.max:100,step:void 0!==n.step?n.step:1,"thumb-label":n.thumbLabel,ticks:n.ticks,"tick-size":n.tickSize,color:n.color||"primary","hide-details":n.hideDetails||t.hideDetails},on:{input:function(e){return t.handleInput(n.key,e)}}},"v-slider",n.props,!1)):"range-slider"===n.type?e("v-range-slider",t._b({class:t.inputClass,attrs:{value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,min:void 0!==n.min?n.min:0,max:void 0!==n.max?n.max:100,step:void 0!==n.step?n.step:1,"thumb-label":n.thumbLabel,ticks:n.ticks,"tick-size":n.tickSize,color:n.color||"primary","hide-details":n.hideDetails||t.hideDetails},on:{input:function(e){return t.handleInput(n.key,e)}}},"v-range-slider",n.props,!1)):"switch"===n.type?e("v-switch",t._b({attrs:{"input-value":t.getFieldValue(n.key),label:n.switchLabel,disabled:t.getFieldDisabled(n),readonly:n.readonly,color:n.color||"success","hide-details":n.hideDetails||t.hideDetails},on:{change:function(e){return t.handleChange(n.key,e)}}},"v-switch",n.props,!1)):"checkbox"===n.type?e("v-checkbox",t._b({attrs:{"input-value":t.getFieldValue(n.key),label:n.checkboxLabel,disabled:t.getFieldDisabled(n),readonly:n.readonly,color:n.color||"success","hide-details":n.hideDetails||t.hideDetails},on:{change:function(e){return t.handleChange(n.key,e)}}},"v-checkbox",n.props,!1)):"radio"===n.type?e("v-radio-group",t._b({attrs:{value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,row:!1!==n.row,"hide-details":n.hideDetails||t.hideDetails},on:{change:function(e){return t.handleChange(n.key,e)}}},"v-radio-group",n.props,!1),t._l(t.getFieldOptions(n),function(t){return e("v-radio",{key:t.value,attrs:{label:t.text,value:t.value,color:n.color||"success"}})}),1):"slot"===n.type?t._t("field-".concat(n.key),null,{field:n,value:t.getFieldValue(n.key),values:t.values,updateField:t.updateField}):t._e():e("v-text-field",t._b({class:t.inputClass,attrs:{dense:t.getDense(n),"single-line":t.getSingleLine(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,placeholder:n.placeholder,prefix:n.prefix,suffix:n.suffix,"hide-details":n.hideDetails||t.hideDetails},on:{input:function(e){return t.handleInput(n.key,e)},change:function(e){return t.handleChange(n.key,e)},blur:function(e){return t.handleBlur(n.key,e)}}},"v-text-field",n.props,!1))]],2)])])]})],2),t._v(" "),t._t("footer",null,{values:t.values})],2)};function g(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return _(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function S(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?S(Object(n),!0).forEach(function(e){x(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function x(t,e,n){return(e=function(t){var e=function(t){if("object"!=w(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==w(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}b._withStripped=!0;const k=i({name:"JhFormFields",props:{fields:{type:Array,default:function(){return[]}},value:{type:Object,default:function(){return{}}},title:{type:String,default:""},description:{type:String,default:""},tooltip:{type:String,default:""},layout:{type:String,default:"vertical",validator:function(t){return["horizontal","vertical","inline"].includes(t)}},showLabels:{type:Boolean,default:!0},labelWidth:{type:[Number,String],default:"auto"},labelAlign:{type:String,default:"right",validator:function(t){return["left","right","center"].includes(t)}},showRequiredMark:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},defaultDense:{type:Boolean,default:!0},defaultFilled:{type:Boolean,default:!0},defaultOutlined:{type:Boolean,default:!1},defaultSingleLine:{type:Boolean,default:!0},defaultColsMd:{type:Number,default:6},hideDetails:{type:[Boolean,String],default:!1},labelClass:{type:String,default:"jh-input-label"},inputClass:{type:String,default:"jh-v-input"},rowClass:{type:String,default:""},rowProps:{type:Object,default:function(){return{}}},validationRules:{type:Object,default:function(){return{require:[function(t){return!!t||"必填"}],email:[function(t){return!t||/.+@.+\..+/.test(t)||"邮箱格式不正确"}],phone:[function(t){return!t||/^1[3-9]\d{9}$/.test(t)||"手机号格式不正确"}],number:[function(t){return!t||!isNaN(t)||"请输入数字"}],integer:[function(t){return!t||Number.isInteger(Number(t))||"请输入整数"}]}}},dense:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},dependencies:{type:Array,default:function(){return[]}}},data:function(){return{values:{},dateMenus:{},timeMenus:{},colorMenus:{},dependencyWatchers:[]}},computed:{formFieldsClasses:function(){return x({"jh-form-fields":!0,"jh-form-fields--bordered":this.bordered,"jh-form-fields--readonly":this.readonly,"jh-form-fields--disabled":this.disabled},"jh-form-fields--".concat(this.layout),!0)},visibleFields:function(){var t=this;return this.fields.filter(function(e){return"function"==typeof e.visible?e.visible(t.values):void 0===e.visible||e.visible})}},watch:{value:{handler:function(t){this.values=C({},t)},immediate:!0,deep:!0},dependencies:{handler:function(t){this.setupDependencyWatchers(t)},immediate:!0}},mounted:function(){this.initValues(),this.setupFieldDependencies()},beforeDestroy:function(){this.dependencyWatchers.forEach(function(t){return t()}),this.dependencyWatchers=[]},methods:{initValues:function(){var t=C({},this.value);this.fields.forEach(function(e){void 0!==e.defaultValue&&void 0===t[e.key]&&(t[e.key]=e.defaultValue)}),this.values=t},setupFieldDependencies:function(){var t=this;this.fields.forEach(function(e){e.dependencies&&Array.isArray(e.dependencies)&&e.dependencies.forEach(function(n){var i=t.$watch(function(){return t.values[n]},function(i,r){i!==r&&t.handleDependencyChange(e,n,i,r)});t.dependencyWatchers.push(i)})})},setupDependencyWatchers:function(t){var e=this;this.dependencyWatchers.forEach(function(t){return t()}),this.dependencyWatchers=[],t.forEach(function(t){var n=e.$watch(function(){return e.values[t]},function(n,i){n!==i&&e.$emit("dependency-change",{key:t,value:n,oldValue:i,values:e.values})});e.dependencyWatchers.push(n)})},handleDependencyChange:function(t,e,n,i){"function"==typeof t.onDependencyChange&&t.onDependencyChange(e,n,i,this.values),this.$emit("field-dependency-change",{field:t.key,dependency:e,value:n,oldValue:i,values:this.values})},getFieldValue:function(t){return this.values[t]},getFieldOptions:function(t){return"function"==typeof t.options?t.options(this.values):t.options||[]},getFieldCols:function(t){return"inline"===this.layout?"auto":t.cols?"object"===w(t.cols)&&t.cols.xs||t.cols:12},getFieldSm:function(t){return"inline"===this.layout?"auto":t.cols&&"object"===w(t.cols)?t.cols.sm:12},getFieldMd:function(t){return"inline"===this.layout?"auto":t.cols&&"object"===w(t.cols)?t.cols.md||this.defaultColsMd:t.cols||this.defaultColsMd},getFieldLg:function(t){return"inline"===this.layout?"auto":t.cols&&"object"===w(t.cols)?t.cols.lg||t.cols.md||this.defaultColsMd:t.cols||this.defaultColsMd},getFieldXl:function(t){return"inline"===this.layout?"auto":t.cols&&"object"===w(t.cols)?t.cols.xl||t.cols.md||this.defaultColsMd:t.cols||this.defaultColsMd},getFieldColClass:function(t){return t.colClass||""},getFieldWrapperClass:function(t){var e=t.layout||this.layout;return"jh-field-wrapper ".concat("horizontal"===e?"d-flex align-center":"")},getHorizontalLabelClass:function(t){var e=t.labelAlign||this.labelAlign;return"jh-field-label jh-input-label jh-field-label--horizontal text-".concat(e," flex-shrink-0")},getHorizontalLabelStyle:function(t){var e=t.labelWidth||this.labelWidth;return{width:"number"==typeof e?"".concat(e,"px"):e,minWidth:"number"==typeof e?"".concat(e,"px"):e}},getVerticalLabelClass:function(t){return"jh-field-label jh-input-label jh-field-label--vertical mb-1"},getFieldInputClass:function(t){return"horizontal"===(t.layout||this.layout)?"jh-field-input flex-grow-1":"jh-field-input"},getFieldDisabled:function(t){return"function"==typeof t.disabled?t.disabled(this.values):void 0!==t.disabled?t.disabled:this.disabled},isFieldReadonly:function(t){return"function"==typeof t.readonly?t.readonly(this.values):void 0!==t.readonly?t.readonly:this.readonly},getReadonlyValue:function(t){var e=this.values[t.key];if("function"==typeof t.readonlyRender)return t.readonlyRender(e,this.values);if(("select"===t.type||"radio"===t.type)&&t.options){var n=this.getFieldOptions(t);if(t.multiple&&Array.isArray(e))return e.map(function(t){var e=n.find(function(e){return e.value===t});return e?e.text:t}).join(", ");var i=n.find(function(t){return t.value===e});return i?i.text:e}return"switch"===t.type||"checkbox"===t.type?e?"是":"否":"range-slider"===t.type&&Array.isArray(e)?e.join(" ~ "):e||"-"},getDense:function(t){return void 0!==t.dense?t.dense:this.defaultDense},getFilled:function(t){return void 0!==t.filled?t.filled:this.defaultFilled},getOutlined:function(t){return void 0!==t.outlined?t.outlined:this.defaultOutlined},getSingleLine:function(t){return void 0!==t.singleLine?t.singleLine:this.defaultSingleLine},getRules:function(t){var e=this,n=[];return t.required&&n.push(function(e){return!!e||"".concat(t.label||"此字段","为必填项")}),t.rules&&(Array.isArray(t.rules)?n.push.apply(n,g(t.rules)):"string"==typeof t.rules&&t.rules.split("|").forEach(function(t){var i=t.trim();e.validationRules[i]&&n.push.apply(n,g(e.validationRules[i]))})),n},handleInput:function(t,e){this.$set(this.values,t,e),this.$emit("input",this.values),this.$emit("field-input",{key:t,value:e,values:this.values})},handleChange:function(t,e){this.$set(this.values,t,e),this.$emit("input",this.values),this.$emit("field-change",{key:t,value:e,values:this.values})},handleColorInput:function(t,e){this.handleInput(t.key,e),!1!==t.closeOnSelect&&this.$set(this.colorMenus,t.key,!1)},handleBlur:function(t,e){this.$emit("field-blur",{key:t,value:e,values:this.values})},updateField:function(t,e){this.$set(this.values,t,e),this.$emit("input",this.values),this.$emit("field-change",{key:t,value:e,values:this.values})},getValues:function(){return C({},this.values)},setFieldsValue:function(t){this.values=C(C({},this.values),t),this.$emit("input",this.values)},setFieldValue:function(t,e){this.$set(this.values,t,e),this.$emit("input",this.values)},resetFields:function(){var t={};this.fields.forEach(function(e){void 0!==e.defaultValue&&(t[e.key]=e.defaultValue)}),this.values=t,this.$emit("input",this.values),this.$emit("reset",this.values)}}},b,[],!1,null,"666784d9",null).exports;function j(t){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}function O(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return D(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(D(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,D(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,D(d,"constructor",c),D(c,"constructor",s),s.displayName="GeneratorFunction",D(c,r,"GeneratorFunction"),D(d),D(d,r,"Generator"),D(d,i,function(){return this}),D(d,"toString",function(){return"[object Generator]"}),(O=function(){return{w:a,m:f}})()}function D(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}D=function(t,e,n,i){function a(e,n){D(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},D(t,e,n,i)}function P(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function F(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach(function(e){T(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function T(t,e,n){return(e=function(t){var e=function(t){if("object"!=j(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==j(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const A=i({name:"JhQueryFilter",components:{JhFormFields:k},props:{fields:{type:Array,default:function(){return[]}},initialValues:{type:Object,default:function(){return{}}},collapsible:{type:Boolean,default:!0},defaultCollapsed:{type:Boolean,default:!0},defaultVisibleCount:{type:Number,default:3},colSpan:{type:Object,default:function(){return{xs:24,sm:12,md:6,lg:4}}},showLabels:{type:Boolean,default:!0},dense:{type:Boolean,default:!0},filled:{type:Boolean,default:!0},outlined:{type:Boolean,default:!1},singleLine:{type:Boolean,default:!0},searchText:{type:String,default:"查询"},resetText:{type:String,default:"重置"},expandText:{type:String,default:"展开"},collapseText:{type:String,default:"收起"},buttonSize:{type:String,default:"small",validator:function(t){return["small","default","large"].includes(t)}},buttonAlign:{type:String,default:"left",validator:function(t){return["left","right","center"].includes(t)}},loading:{type:Boolean,default:!1},labelClass:{type:String,default:"jh-input-label"},inputClass:{type:String,default:"jh-v-input"},rowClass:{type:String,default:"ma-0"},buttonClass:{type:String,default:"gap-2"},buttonColumnClass:{type:String,default:""}},data:function(){return{formData:{},collapsed:this.defaultCollapsed,searching:!1}},computed:{visibleFields:function(){return this.collapsible&&this.collapsed?this.fields.slice(0,this.defaultVisibleCount):this.fields},visibleFieldsWithConfig:function(){var t=this;return this.visibleFields.map(function(e){return F(F({},e),{},{cols:e.cols||{xs:t.colSpan.xs||12,sm:t.colSpan.sm||12,md:t.colSpan.md||8,lg:t.colSpan.lg||6},props:F({clearable:!0,placeholder:e.placeholder||"请输入".concat(e.text)},e.props)})})}},watch:{initialValues:{handler:function(t){this.formData=F({},t)},immediate:!0,deep:!0},loading:function(t){this.searching=t}},mounted:function(){this.initFormData()},methods:{initFormData:function(){var t=F({},this.initialValues);this.fields.forEach(function(e){void 0!==e.defaultValue&&void 0===t[e.key]&&(t[e.key]=e.defaultValue)}),this.formData=t},handleFieldChange:function(t){var e,n=t.key,i=t.value;this.$emit("field-change",{key:n,value:i,formData:this.formData}),null!==(e=this.fields.find(function(t){return t.key===n}))&&void 0!==e&&e.realtime&&this.handleSearch()},toggleCollapse:function(){this.collapsed=!this.collapsed,this.$emit("collapse-change",this.collapsed)},handleSearch:function(){var t,e=this;return(t=O().m(function t(){var n;return O().w(function(t){for(;;)switch(t.n){case 0:e.searching=!0;try{n={},Object.keys(e.formData).forEach(function(t){var i=e.formData[t];if(null!=i&&""!==i){if(Array.isArray(i)&&0===i.length)return;n[t]=i}}),e.$emit("search",n)}finally{e.loading||(e.searching=!1)}case 1:return t.a(2)}},t)}),function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){P(a,i,r,o,l,"next",t)}function l(t){P(a,i,r,o,l,"throw",t)}o(void 0)})})()},handleReset:function(){var t=this;this.initFormData(),this.fields.forEach(function(e){t.$set(t.formData,e.key,void 0!==e.defaultValue?e.defaultValue:"")}),this.$emit("reset"),this.handleSearch()},getFormData:function(){return F({},this.formData)},setFieldsValue:function(t){this.formData=F(F({},this.formData),t)},setFieldValue:function(t,e){this.$set(this.formData,t,e)}}},y,[],!1,null,"3f67f486",null).exports;var B=function(){var t=this,e=t._self._c;return e("div",{class:t.wrapperClass,style:t.wrapperStyle},[t.headerTitle||t.$slots["header-title"]||t.$slots["toolbar-extra"]?e("div",{staticClass:"jh-pro-table-header"},[e("div",{staticClass:"jh-pro-table-header-left"},[t.headerTitle||t.$slots["header-title"]?e("div",{staticClass:"jh-pro-table-title"},[t._t("header-title",function(){return[e("span",{staticClass:"jh-pro-table-title-text"},[t._v(t._s(t.headerTitle))]),t._v(" "),t.tooltip?e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-icon",t._g(t._b({staticClass:"ml-1",attrs:{small:""}},"v-icon",r,!1),i),[t._v("mdi-help-circle-outline")])]}}],null,!1,1799656693)},[t._v(" "),e("span",[t._v(t._s(t.tooltip))])]):t._e()]})],2):t._e()]),t._v(" "),e("div",{staticClass:"jh-pro-table-header-right"},[t._t("toolbar-extra")],2)]):t._e(),t._v(" "),t.hasFilterFields?e("jh-query-filter",{ref:"queryFilterRef",staticClass:"pa-0",attrs:{fields:t.filterFieldsResolved,"initial-values":t.computedFilterInitialValues,collapsible:t.filterCollapsible,"default-collapsed":t.filterDefaultCollapsed,"default-visible-count":t.filterDefaultVisibleCount,"col-span":t.filterColSpan,dense:!0,outlined:!1,"show-labels":!1,"search-text":t.filterSearchText,"reset-text":t.filterResetText},on:{search:t.handleFilterSearch,reset:t.handleFilterReset},scopedSlots:t._u([t._l(t.filterFieldsResolved,function(e){return{key:"field-".concat(e.key),fn:function(n){return[t._t("filter-field-".concat(e.key),null,null,n)]}}}),{key:"buttons",fn:function(e){return[t._t("filter-buttons",null,null,e)]}}],null,!0)}):t._e(),t._v(" "),t.showSelectionAlertBar?e("div",{staticClass:"jh-pro-table-alert"},[t.hasAlertContent?e("div",{staticClass:"jh-pro-table-alert-info"},[t.$scopedSlots.alert?[t._t("alert",null,{selectedRowKeys:t.selectedRowKeys,selectedRows:t.selectedItems})]:"function"==typeof t.tableAlertRender?e("render-function",{attrs:{render:t.tableAlertRender,params:t.tableAlertScope}}):[e("v-icon",{staticClass:"mr-2",attrs:{small:"",color:"primary"}},[t._v("mdi-checkbox-marked-circle")]),t._v(" "),e("span",[t._v("已选择 "),e("strong",{staticClass:"primary--text"},[t._v(t._s(t.selectedItems.length))]),t._v(" 项")]),t._v(" "),e("v-btn",{staticClass:"ml-2",attrs:{text:"","x-small":""},on:{click:t.clearSelection}},[t._v("清空")])]],2):t._e(),t._v(" "),t.hasAlertActionsContent?e("div",{staticClass:"jh-pro-table-alert-actions"},[t.$scopedSlots["alert-actions"]?[t._t("alert-actions",null,{selectedRowKeys:t.selectedRowKeys,selectedRows:t.selectedItems})]:e("render-function",{attrs:{render:t.tableAlertOptionRender,params:t.tableAlertScope}})],2):t._e()]):t._e(),t._v(" "),!1!==t.toolbar?e("v-row",{staticClass:"jh-pro-table-toolbar ma-0 pb-3 pa-3 pa-md-0",attrs:{align:"center"}},[t.headerTitle||t.$slots["header-title"]?t._e():e("div",{staticClass:"flex items-center gap-2"},[t._t("toolbar-actions",function(){return[t.showCreateButton?e("v-btn",{staticClass:"mr-2",attrs:{color:"success",small:""},on:{click:function(e){return e.stopPropagation(),t.$emit("create-click")}}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-plus")]),t._v(" "),e("span",{staticClass:"d-none d-sm-inline"},[t._v("新增")])],1):t._e()]})],2),t._v(" "),e("v-spacer"),t._v(" "),e("div",{staticClass:"flex items-center gap-2 justify-end flex-wrap"},[t.toolbarConfig.search?e("v-text-field",{staticClass:"jh-v-input jh-toolbar-search border",attrs:{prefix:t.isMobile?"":"筛选",placeholder:t.isMobile?"筛选":"",dense:"",filled:"","single-line":"","hide-details":"",clearable:""},model:{value:t.searchInputInternal,callback:function(e){t.searchInputInternal=e},expression:"searchInputInternal"}}):t._e(),t._v(" "),t.toolbarConfig.export?e("v-btn",{attrs:{icon:"",small:"",title:"导出"},on:{click:t.handleExport}},[e("v-icon",[t._v("mdi-export-variant")])],1):t._e(),t._v(" "),t.toolbarConfig.refresh?e("v-btn",{attrs:{icon:"",small:"",title:"刷新"},on:{click:t.handleRefresh}},[e("v-icon",[t._v("mdi-refresh")])],1):t._e(),t._v(" "),t.toolbarConfig.density?e("v-menu",{attrs:{"offset-y":""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-btn",t._g(t._b({attrs:{icon:"",small:"",title:"密度"}},"v-btn",r,!1),i),[e("v-icon",[t._v("mdi-format-line-spacing")])],1)]}}],null,!1,1668111094)},[t._v(" "),e("v-list",{attrs:{dense:""}},[e("v-list-item",{on:{click:function(e){t.currentDensity="default"}}},[e("v-list-item-title",["default"===t.currentDensity?e("v-icon",{attrs:{small:"",left:""}},[t._v("mdi-check")]):t._e(),t._v("\n 默认\n ")],1)],1),t._v(" "),e("v-list-item",{on:{click:function(e){t.currentDensity="medium"}}},[e("v-list-item-title",["medium"===t.currentDensity?e("v-icon",{attrs:{small:"",left:""}},[t._v("mdi-check")]):t._e(),t._v("\n 中等\n ")],1)],1),t._v(" "),e("v-list-item",{on:{click:function(e){t.currentDensity="compact"}}},[e("v-list-item-title",["compact"===t.currentDensity?e("v-icon",{attrs:{small:"",left:""}},[t._v("mdi-check")]):t._e(),t._v("\n 紧凑\n ")],1)],1)],1)],1):t._e(),t._v(" "),t.toolbarConfig.setting?e("v-menu",{attrs:{"offset-y":"",left:"","max-height":"400"},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-btn",t._g(t._b({attrs:{icon:"",small:"",title:"列设置"}},"v-btn",r,!1),i),[e("v-icon",[t._v("mdi-cog-outline")])],1)]}}],null,!1,911125755)},[t._v(" "),e("v-card",{attrs:{"min-width":"200"}},[e("v-card-text",{staticClass:"pa-2"},[e("div",{staticClass:"text-caption font-weight-bold mb-2"},[t._v("列显示")]),t._v(" "),e("v-list",{attrs:{dense:""}},t._l(t.internalColumns,function(n){return e("v-list-item",{key:n.value,staticClass:"px-2",on:{click:function(e){return t.toggleColumn(n)}}},[e("v-list-item-action",{staticClass:"mr-2"},[e("v-checkbox",{attrs:{"input-value":!1!==n.visible,"hide-details":"",dense:""},on:{click:function(e){return e.stopPropagation(),t.toggleColumn(n)}}})],1),t._v(" "),e("v-list-item-content",[e("v-list-item-title",{staticClass:"text-body-2"},[t._v(t._s(n.text||n.title))])],1)],1)}),1),t._v(" "),e("v-divider",{staticClass:"my-2"}),t._v(" "),e("v-btn",{attrs:{text:"",small:"",block:""},on:{click:t.resetColumns}},[t._v("重置")])],1)],1)],1):t._e(),t._v(" "),t.toolbarConfig.fullscreen?e("v-btn",{attrs:{icon:"",small:"",title:t.isFullscreen?"退出全屏":"全屏"},on:{click:t.toggleFullscreen}},[e("v-icon",[t._v(t._s(t.isFullscreen?"mdi-fullscreen-exit":"mdi-fullscreen"))])],1):t._e()],1)],1):t._e(),t._v(" "),t.$slots["table-extra"]?e("div",{staticClass:"jh-pro-table-extra"},[t._t("table-extra")],2):t._e(),t._v(" "),e("v-data-table",t._g(t._b({ref:"dataTable",staticClass:"jh-fixed-table-height elevation-0 mb-xs-4 mx-3 mx-md-0 mt-3",class:[t.tableClassComputed,t.densityClass],attrs:{headers:t.visibleHeaders,items:t.currentItems,search:t.searchInputInternal,"footer-props":t.currentFooterProps,"items-per-page":t.currentItemsPerPage,page:t.currentPage,"server-items-length":t.serverItemsLength,"mobile-breakpoint":t.mobileBreakpoint,loading:t.currentLoading,"checkbox-color":t.checkboxColor,"fixed-header":t.fixedHeader,"show-select":t.showSelectComputed,"single-select":t.singleSelectComputed,value:t.selectedItems,"item-key":t.rowKey,dense:t.tableDense,"multi-sort":t.multiSort,"must-sort":t.mustSort,"sort-by":t.internalSortBy,"sort-desc":t.internalSortDesc},on:{"click:row":t.handleRowClick,input:t.handleSelectionChange,"update:page":t.handlePageChange,"update:items-per-page":t.handleItemsPerPageChange,"update:sort-by":t.handleSortByUpdate,"update:sort-desc":t.handleSortDescUpdate,"update:options":t.handleOptionsUpdate},scopedSlots:t._u([t._l(t.customHeaderSlots,function(e){return{key:"header.".concat(e.value),fn:function(n){var i=n.header;return[t._t("header.".concat(e.value),function(){return[t._v(t._s(i.text||i.title))]},{header:i})]}}}),t._l(t.visibleHeaders,function(n){return{key:"item.".concat(n.value),fn:function(i){var r=i.item,a=i.value,o=i.index;return["action"===n.value?[t._t("item.action",function(){return[t.isMobile?t._e():e("div",{staticClass:"flex items-center gap-1"},[t.actionColumn&&t.actionColumn.buttons?[t._l(t.getVisibleButtons(r),function(n,i){return[n.tooltip?e("v-tooltip",{key:"tooltip-".concat(i),attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(i){var a=i.on,o=i.attrs;return[e("v-btn",t._g(t._b({attrs:{"x-small":"",text:"link"===n.type,icon:"icon"===n.type,color:n.color||"primary"},on:{click:function(e){return e.stopPropagation(),t.handleActionClick(n,r)}}},"v-btn",o,!1),a),[n.icon?e("v-icon",{attrs:{small:""}},[t._v(t._s(n.icon))]):t._e(),t._v(" "),"icon"!==n.type?e("span",[t._v(t._s(n.text))]):t._e()],1)]}}],null,!0)},[t._v(" "),e("span",[t._v(t._s(n.tooltip))])]):e("v-btn",{key:"btn-".concat(i),attrs:{"x-small":"",text:"link"===n.type,icon:"icon"===n.type,color:n.color||"primary"},on:{click:function(e){return e.stopPropagation(),t.handleActionClick(n,r)}}},[n.icon?e("v-icon",{attrs:{small:""}},[t._v(t._s(n.icon))]):t._e(),t._v(" "),"icon"!==n.type?e("span",[t._v(t._s(n.text))]):t._e()],1)]})]:[t.showUpdateAction?e("span",{staticClass:"success--text font-weight-medium font-size-2 mr-2 cursor-pointer",attrs:{role:"button"},on:{click:function(e){return e.stopPropagation(),t.$emit("update-click",r)}}},[e("v-icon",{staticClass:"success--text",attrs:{size:"16"}},[t._v("mdi-note-edit-outline")]),t._v("详情\n ")],1):t._e(),t._v(" "),t.showDeleteAction?e("span",{staticClass:"error--text font-weight-medium font-size-2 mr-2 cursor-pointer",attrs:{role:"button"},on:{click:function(e){return e.stopPropagation(),t.$emit("delete-click",r)}}},[e("v-icon",{staticClass:"error--text",attrs:{size:"16"}},[t._v("mdi-trash-can-outline")]),t._v("删除\n ")],1):t._e()]],2),t._v(" "),t.isMobile?e("v-menu",{attrs:{"offset-y":""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("span",t._g(t._b({staticClass:"success--text font-weight-medium font-size-2",attrs:{role:"button"}},"span",r,!1),i),[e("v-icon",{staticClass:"success--text",attrs:{size:"20"}},[t._v("mdi-chevron-down")]),t._v("操作\n ")],1)]}}],null,!0)},[t._v(" "),e("v-list",{attrs:{dense:""}},[t.actionColumn&&t.actionColumn.buttons?t._l(t.getVisibleButtons(r),function(n,i){return e("v-list-item",{key:i,on:{click:function(e){return e.stopPropagation(),t.handleActionClick(n,r)}}},[n.icon?e("v-list-item-icon",[e("v-icon",{attrs:{small:""}},[t._v(t._s(n.icon))])],1):t._e(),t._v(" "),e("v-list-item-title",[t._v(t._s(n.text))])],1)}):[t.showUpdateAction?e("v-list-item",{on:{click:function(e){return e.stopPropagation(),t.$emit("update-click",r)}}},[e("v-list-item-title",[t._v("详情")])],1):t._e(),t._v(" "),t.showDeleteAction?e("v-list-item",{on:{click:function(e){return e.stopPropagation(),t.$emit("delete-click",r)}}},[e("v-list-item-title",[t._v("删除")])],1):t._e()]],2)],1):t._e()]},{item:r})]:[n.slot||t.$scopedSlots["item.".concat(n.value)]?t._t("item.".concat(n.value),null,{item:r,value:a}):e("div",{staticClass:"jh-table-schema-cell d-flex align-center flex-wrap"},["status"===n.valueType?[e("v-chip",t._b({staticClass:"mr-2",attrs:{small:"",label:""}},"v-chip",t.getStatusChipProps(n,a,r),!1),[t.getStatusChipProps(n,a,r).icon?e("v-icon",{attrs:{left:"","x-small":""}},[t._v("\n "+t._s(t.getStatusChipProps(n,a,r).icon)+"\n ")]):t._e(),t._v("\n "+t._s(t.getStatusText(n,a,r))+"\n ")],1)]:"progress"===n.valueType?[e("div",{staticClass:"d-flex align-center w-100"},[e("v-progress-linear",t._b({staticClass:"flex-grow-1",attrs:{value:t.getProgressValue(a)}},"v-progress-linear",t.getProgressProps(n),!1)),t._v(" "),!1!==t.getProgressProps(n).showValue?e("span",{staticClass:"ml-2 text-caption"},[t._v("\n "+t._s(t.formatPercentValue(t.getProgressValue(a),n.valueProps))+"\n ")]):t._e()],1)]:"avatar"===n.valueType?[e("v-avatar",t._b({},"v-avatar",t.getAvatarProps(n),!1),[t.getAvatarSrc(a)?e("img",{attrs:{src:t.getAvatarSrc(a),alt:t.formatColumnValue(n,r,a,o)}}):e("span",[t._v(t._s(t.getAvatarInitials(t.formatColumnValue(n,r,a,o))))])]),t._v(" "),e("span",{staticClass:"ml-2"},[t._v(t._s(t.formatColumnValue(n,r,a,o)))])]:"json"===n.valueType?e("pre",{staticClass:"jh-table-json mr-2"},[t._v(t._s(t.formatJsonValue(a))+"\n ")]):"index"===n.valueType?e("span",[t._v(t._s(t.getDisplayIndex(o)))]):"code"===n.valueType?e("code",{staticClass:"jh-table-code"},[t._v(t._s(t.formatColumnValue(n,r,a,o)))]):"dateRange"===n.valueType?e("span",[t._v(t._s(t.formatDateRangeValue(a,n.valueProps)))]):"date"===n.valueType||"dateTime"===n.valueType||"time"===n.valueType?e("span",[t._v("\n "+t._s(t.formatDateValue(a,n.valueType,n.valueProps))+"\n ")]):"money"===n.valueType?e("span",[t._v(t._s(t.formatMoneyValue(a,n.valueProps)))]):"percent"===n.valueType?e("span",[t._v(t._s(t.formatPercentValue(a,n.valueProps)))]):"digit"===n.valueType?e("span",[t._v(t._s(t.formatDigitValue(a,n.valueProps)))]):[t.shouldShowEllipsis(n,a,r,o)?e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(i){var l=i.on,s=i.attrs;return[e("span",t._g(t._b({staticClass:"text-truncate d-inline-block",staticStyle:{"max-width":"200px"}},"span",s,!1),l),[t._v("\n "+t._s(t.formatColumnValue(n,r,a,o))+"\n ")])]}}],null,!0)},[t._v(" "),e("span",[t._v(t._s(t.formatColumnValue(n,r,a,o)))])]):e("span",[t._v(t._s(t.formatColumnValue(n,r,a,o)))])],t._v(" "),n.copyable&&t.hasCopyValue(n,r,a)?e("v-btn",{staticClass:"ml-1",attrs:{icon:"","x-small":""},on:{click:function(e){e.stopPropagation(),t.copyToClipboard(t.getCopyValue(n,r,a))}}},[e("v-icon",{attrs:{"x-small":""}},[t._v("mdi-content-copy")])],1):t._e()],2)]]}}}),{key:"loading",fn:function(){return[e("div",{staticClass:"jh-no-data pa-6"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"primary"}}),t._v(" "),e("div",{staticClass:"mt-2"},[t._v("数据加载中...")])],1)]},proxy:!0},{key:"no-data",fn:function(){return[e("div",{staticClass:"jh-no-data pa-6"},[e("v-icon",{attrs:{large:"",color:"grey lighten-1"}},[t._v("mdi-inbox-outline")]),t._v(" "),e("div",{staticClass:"mt-2 text-body-2 grey--text"},[t._v("暂无数据")])],1)]},proxy:!0},{key:"no-results",fn:function(){return[e("div",{staticClass:"jh-no-data pa-6"},[e("v-icon",{attrs:{large:"",color:"grey lighten-1"}},[t._v("mdi-magnify")]),t._v(" "),e("div",{staticClass:"mt-2 text-body-2 grey--text"},[t._v("未找到匹配的数据")])],1)]},proxy:!0},{key:"footer.page-text",fn:function(n){return[e("span",[t._v(t._s(n.pageStart)+"-"+t._s(n.pageStop))]),t._v(" "),e("span",{staticClass:"ml-1"},[t._v("共"+t._s(n.itemsLength)+"条")])]}}],null,!0)},"v-data-table",t.mergedDataTableProps,!1),t.dataTableListeners))],1)};B._withStripped=!0;var $=["class","style"],R=["title"];function V(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return N(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(N(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,N(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,N(d,"constructor",c),N(c,"constructor",s),s.displayName="GeneratorFunction",N(c,r,"GeneratorFunction"),N(d),N(d,r,"Generator"),N(d,i,function(){return this}),N(d,"toString",function(){return"[object Generator]"}),(V=function(){return{w:a,m:f}})()}function N(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}N=function(t,e,n,i){function a(e,n){N(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},N(t,e,n,i)}function M(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function E(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){M(a,i,r,o,l,"next",t)}function l(t){M(a,i,r,o,l,"throw",t)}o(void 0)})}}function L(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function z(t){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},z(t)}function K(t){return function(t){if(Array.isArray(t))return G(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||J(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(t,e){if(t){if("string"==typeof t)return G(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(t,e):void 0}}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function W(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function U(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?W(Object(n),!0).forEach(function(e){q(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function q(t,e,n){return(e=function(t){var e=function(t){if("object"!=z(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==z(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var H={success:{color:"success",textColor:"white"},warning:{color:"warning",textColor:"white"},error:{color:"error",textColor:"white"},processing:{color:"info",textColor:"white"},default:{color:"grey lighten-2",textColor:"grey darken-2"}};const Y=i({name:"JhTable",inheritAttrs:!1,components:{JhQueryFilter:A,RenderFunction:{name:"JhTableRenderFunction",functional:!0,props:{render:{type:Function,default:null},params:{type:Object,default:function(){return{}}}},render:function(t,e){var n=e.props.render;if("function"!=typeof n)return null;var i=e.props.params||{};return n.length>=2?n(t,i):n(i)}}},props:{headers:{type:Array,required:!0,default:function(){return[]}},items:{type:Array,default:function(){return[]}},request:{type:Function,default:null},showFilter:{type:Boolean,default:!1},filterFields:{type:Array,default:function(){return[]}},autoFilterFromHeaders:{type:Boolean,default:!0},filterInitialValues:{type:Object,default:function(){return{}}},filterCollapsible:{type:Boolean,default:!0},filterDefaultCollapsed:{type:Boolean,default:!0},filterDefaultVisibleCount:{type:Number,default:3},filterColSpan:{type:Object,default:function(){return{xs:24,sm:12,md:6,lg:4}}},filterSearchText:{type:String,default:"查询"},filterResetText:{type:String,default:"重置"},toolbar:{type:[Object,Boolean],default:function(){return{search:!0,refresh:!0,setting:!0,density:!0,fullscreen:!1}}},showSearch:{type:Boolean,default:!0},searchInput:{type:String,default:null},dataTableProps:{type:Object,default:function(){return{}}},sortBy:{type:[Array,String],default:function(){return[]}},sortDesc:{type:[Array,Boolean],default:function(){return[]}},multiSort:{type:Boolean,default:!1},mustSort:{type:Boolean,default:!1},showCreateButton:{type:Boolean,default:!0},showUpdateAction:{type:Boolean,default:!0},showDeleteAction:{type:Boolean,default:!0},actionColumn:{type:[Object,Boolean],default:null},columnsState:{type:Object,default:function(){return{persistenceKey:"",defaultVisible:null,value:null}}},pagination:{type:[Object,Boolean],default:function(){return{current:1,pageSize:20,pageSizeOptions:[10,20,50,100],showTotal:!0}}},itemsPerPage:{type:Number,default:20},rowSelection:{type:[Object,Boolean],default:null},tableAlertRender:{type:[Function,Boolean],default:null},tableAlertOptionRender:{type:[Function,Boolean],default:null},showSelect:{type:Boolean,default:!1},singleSelect:{type:Boolean,default:!1},headerTitle:{type:String,default:""},tooltip:{type:String,default:""},cardBordered:{type:Boolean,default:!0},ghost:{type:Boolean,default:!1},polling:{type:Number,default:0},debounceTime:{type:Number,default:300},loading:{type:Boolean,default:!1},rowKey:{type:String,default:"id"},size:{type:String,default:"default",validator:function(t){return["default","medium","compact"].includes(t)}},footerProps:{type:Object,default:function(){return{itemsPerPageOptions:[10,20,50,100],itemsPerPageText:"每页",itemsPerPageAllText:"所有",showFirstLastPage:!0,showCurrentPage:!0}}},mobileBreakpoint:{type:Number,default:600},checkboxColor:{type:String,default:"success"},tableClass:{type:[String,Object,Array],default:function(){return{zebraLine:!0}}},fixedHeader:{type:Boolean,default:!0},dense:{type:Boolean,default:!1},context:{type:Object,default:null}},data:function(){return{isMobile:window.innerWidth<500,searchInputInternal:this.searchInput,currentLoading:this.loading,currentItems:this.items||[],currentPage:this.pagination&&this.pagination.current||1,currentItemsPerPage:this.itemsPerPage,serverItemsLength:-1,internalColumns:[],currentDensity:this.size,isFullscreen:!1,selectedItems:[],filterValues:{},pollingTimer:null,searchDebounceTimer:null,internalSortBy:this.normalizeSortBy(this.sortBy),internalSortDesc:this.normalizeSortDesc(this.sortDesc),sortChangeTimer:null,hasAppliedDefaultRowSelection:!1}},computed:{selectedRowKeys:function(){var t=this;return this.selectedItems.map(function(e){return e[t.rowKey]})},tableAlertScope:function(){return{selectedRowKeys:this.selectedRowKeys,selectedRows:this.selectedItems,onCleanSelected:this.clearSelection}},hasFilterFields:function(){return this.showFilter&&this.filterFieldsResolved.length>0},filterFieldsResolved:function(){var t=Array.isArray(this.filterFields)?this.filterFields.map(function(t){return U({},t)}):[],e=new Set(t.map(function(t){return null==t?void 0:t.key}).filter(Boolean)),n=this.autoFilterConfig.fields.filter(function(t){return!e.has(t.key)});return[].concat(K(t),K(n))},computedFilterInitialValues:function(){var t=U(U({},this.autoFilterConfig.initialValues),this.filterInitialValues||{});return this.filterFieldsResolved.forEach(function(e){e&&e.key&&void 0===t[e.key]&&(void 0!==e.initialValue?t[e.key]=e.initialValue:void 0!==e.defaultValue&&(t[e.key]=e.defaultValue))}),t},autoFilterConfig:function(){var t=this,e={fields:[],meta:{},initialValues:{}};return this.autoFilterFromHeaders&&Array.isArray(this.internalColumns)&&this.internalColumns.length?(this.internalColumns.forEach(function(n){var i=t.buildAutoFilterField(n);i&&(e.fields.push(i.field),e.meta[i.field.key]={transform:i.transform},void 0!==i.initialValue&&(e.initialValues[i.field.key]=i.initialValue))}),e):e},filterFieldMetaMap:function(){var t=U({},this.autoFilterConfig.meta);return(this.filterFields||[]).forEach(function(e){e&&e.key&&(t[e.key]=U(U({},t[e.key]||{}),{},{transform:e.transform||t[e.key]&&t[e.key].transform}))}),this.filterFieldsResolved.forEach(function(e){e&&e.key&&e.transform&&(t[e.key]=U(U({},t[e.key]||{}),{},{transform:e.transform}))}),t},hasAlertContent:function(){return!!this.$scopedSlots.alert||"function"==typeof this.tableAlertRender||!1!==this.tableAlertRender},hasAlertActionsContent:function(){return!!this.$scopedSlots["alert-actions"]||"function"==typeof this.tableAlertOptionRender},showSelectionAlertBar:function(){return!!this.showSelectComputed&&!!this.selectedItems.length&&(this.hasAlertContent||this.hasAlertActionsContent)},toolbarConfig:function(){return!1===this.toolbar?{}:"object"===z(this.toolbar)?U({search:this.showSearch,refresh:!0,setting:!0,density:!0,fullscreen:!1,export:!1},this.toolbar):{search:this.showSearch,refresh:!0,setting:!0,density:!0,fullscreen:!1,export:!1}},visibleHeaders:function(){return this.internalColumns.filter(function(t){return!1!==t.visible})},customHeaderSlots:function(){var t=this;return this.internalColumns.filter(function(e){return t.$scopedSlots["header.".concat(e.value)]})},tableClassComputed:function(){return[this.tableClass,{"jh-table-fullscreen":this.isFullscreen}]},tableDense:function(){return"compact"===this.currentDensity||this.dense},densityClass:function(){return{"jh-table-default":"default"===this.currentDensity,"jh-table-medium":"medium"===this.currentDensity,"jh-table-compact":"compact"===this.currentDensity}},currentFooterProps:function(){return U(U({},{itemsPerPageOptions:[10,20,50,100],itemsPerPageText:"每页",itemsPerPageAllText:"所有",showFirstLastPage:!0,showCurrentPage:!0}),this.footerProps)},showSelectComputed:function(){return!1!==this.rowSelection&&(this.rowSelection&&"object"===z(this.rowSelection)?!1!==this.rowSelection.show:this.showSelect)},singleSelectComputed:function(){return!(!this.rowSelection||"radio"!==this.rowSelection.type)||this.singleSelect},isRowSelectionControlled:function(){return!(!this.rowSelection||!Array.isArray(this.rowSelection.selectedRowKeys))},wrapperClass:function(){return["jh-pro-table",this.$attrs.class,{"jh-pro-table-card":this.cardBordered,"jh-pro-table-ghost":this.ghost}]},wrapperStyle:function(){return this.$attrs.style||null},mergedDataTableProps:function(){var t=["class","style","headers","items","search","footer-props","items-per-page","page","server-items-length","mobile-breakpoint","loading","checkbox-color","fixed-header","show-select","single-select","value","item-key","dense","multi-sort","must-sort","sort-by","sort-desc","request","headerTitle","tooltip","cardBordered","ghost","toolbar","showSearch","searchInput","showFilter","filterFields","filterInitialValues","autoFilterFromHeaders","filterCollapsible","filterDefaultCollapsed","filterDefaultVisibleCount","filterColSpan","filterSearchText","filterResetText","showCreateButton","showUpdateAction","showDeleteAction","actionColumn","columnsState","pagination","itemsPerPage","rowSelection","tableAlertRender","tableAlertOptionRender","showSelect","singleSelect","rowKey","size","footerProps","tableClass","polling","debounceTime","dataTableProps"],e=this.$attrs||{},n=(e.class,e.style,L(e,$)),i={};return Object.keys(n).forEach(function(e){var r=e.replace(/([A-Z])/g,"-$1").toLowerCase();t.includes(e)||t.includes(r)||(i[e]=n[e])}),U(U({},i),this.dataTableProps)},dataTableListeners:function(){var t=["click:row","input","update:page","update:items-per-page","update:sort-by","update:sort-desc","update:options","create-click","update-click","delete-click","row-click","selection-change","refresh","copy-success","request-error","filter-search","filter-reset","columns-state-change","sort-change","update:searchInput"],e=U({},this.$listeners||{}),n={};return Object.keys(e).forEach(function(i){t.includes(i)||(n[i]=e[i])}),n}},watch:{headers:{immediate:!0,handler:function(t){this.initColumns(t)}},items:function(t){var e=this;this.request||(this.currentItems=t||[],this.$nextTick(function(){return e.applySelectionState()}))},loading:function(t){this.currentLoading=t},searchInput:function(t){this.searchInputInternal=t},searchInputInternal:function(t){var e=this;this.$emit("update:searchInput",t),this.request&&(this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=setTimeout(function(){e.reload()},this.debounceTime))},size:function(t){this.currentDensity=t},sortBy:function(t){this.internalSortBy=this.normalizeSortBy(t),this.scheduleSortChangeEmit()},sortDesc:function(t){this.internalSortDesc=this.normalizeSortDesc(t),this.scheduleSortChangeEmit()},rowSelection:{deep:!0,handler:function(){var t=this;this.hasAppliedDefaultRowSelection=!1,this.$nextTick(function(){return t.applySelectionState()})}},actionColumn:{handler:function(){this.initColumns(this.headers)},deep:!0},columnsState:{deep:!0,handler:function(t){t&&void 0!==t.value&&null!==t.value&&this.applyExternalColumnState(t.value)}},showSelect:function(){var t=this;this.$nextTick(function(){return t.applySelectionState()})},currentItems:function(){var t=this;this.$nextTick(function(){return t.applySelectionState()})}},mounted:function(){var t=this;window.addEventListener("resize",this.handleResize),this.request&&this.reload(),this.startPolling(),this.$nextTick(function(){return t.applySelectionState()})},beforeDestroy:function(){window.removeEventListener("resize",this.handleResize),this.stopPolling(),this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.sortChangeTimer&&clearTimeout(this.sortChangeTimer)},methods:{initColumns:function(t){var e,n,i=this,r=K(t||[]);if(this.actionColumn&&!r.some(function(t){return"action"===t.value})){var a={text:"操作",value:"action",sortable:!1,width:120,align:"center",class:"fixed",cellClass:"fixed"};if("object"===z(this.actionColumn)&&null!==this.actionColumn){var o=this.actionColumn,l=o.title,s=L(o,R);Object.assign(a,s),l&&(a.text=l)}r.push(a)}var c=this.getPersistedColumnState(),u=null===(e=this.columnsState)||void 0===e?void 0:e.value,d=null===(n=this.columnsState)||void 0===n?void 0:n.defaultVisible;this.internalColumns=r.map(function(t){var e=t.value||t.dataIndex||t.key,n=!1!==t.visible,r=i.resolveColumnVisible({value:e,baseVisible:n,externalState:u,persistedState:c,defaultVisible:d});return U(U({},t),{},{visible:r,initiallyVisible:n,text:t.text||t.title,value:e})})},getColumnRawValue:function(t,e,n){if(t&&"function"==typeof t.valueGetter)return t.valueGetter.call(this.context,e,t);if(void 0!==n)return n;var i=null==t?void 0:t.value;return i?e?e[i]:n:void 0},applyValueFormatter:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(t&&"function"==typeof t.valueFormatter){var r=t.valueFormatter.call(this.context,e,n,t,i);if(null!=r)return r}return null},getValueEnumOption:function(t,e){var n=null==t?void 0:t.valueEnum;return n?Array.isArray(n)?n.find(function(t){return(null==t?void 0:t.value)===e})||null:n[e]||null:null},getStatusText:function(t,e,n){var i=this.getColumnRawValue(t,n,e),r=this.applyValueFormatter(t,i,n);if(null!==r)return r;var a=this.getValueEnumOption(t,i);return a?"object"===z(a)?a.text||a.label||i||"--":a:null==i||""===i?"--":i},getStatusChipProps:function(t,e,n){var i,r,a,o,l,s=this.getColumnRawValue(t,n,e),c=this.getValueEnumOption(t,s),u=c&&c.status||s||"default",d=H[u]||H.default,f=(null==t||null===(i=t.valueEnumStatusMap)||void 0===i?void 0:i[u])||{};return{color:f.color||(null==c?void 0:c.color)||d.color,textColor:f.textColor||(null==c?void 0:c.textColor)||d.textColor,outlined:null!==(r=null!==(a=f.outlined)&&void 0!==a?a:null==c?void 0:c.outlined)&&void 0!==r&&r,dark:null!==(o=null!==(l=f.dark)&&void 0!==l?l:null==c?void 0:c.dark)&&void 0!==o&&o,icon:null==c?void 0:c.icon}},getProgressProps:function(t){return U({height:6,color:"primary",rounded:!0},null==t?void 0:t.valueProps)},getProgressValue:function(t){var e=Number(t);return Number.isFinite(e)?e<0?0:e>100?100:e:0},formatMoneyValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==t||""===t)return"--";var n="number"==typeof e.precision?e.precision:2,i=e.currencySymbol||"¥",r=e.locale||"zh-CN",a=Number(t);return Number.isFinite(a)?"".concat(i," ").concat(a.toLocaleString(r,{minimumFractionDigits:n,maximumFractionDigits:n})):t},formatPercentValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==t||""===t)return"--";var n="number"==typeof e.precision?e.precision:0,i=Number(t);if(!Number.isFinite(i))return t;var r=e.unit||"%";return"".concat(i.toFixed(n)).concat(r)},formatDigitValue:function(t){if(null==t||""===t)return"--";var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).locale||"zh-CN",n=Number(t);return Number.isFinite(n)?n.toLocaleString(e):t},formatDateValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"date",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)return"--";var i=new Date(t);if(Number.isNaN(i.getTime()))return t;var r=n.format||("dateTime"===e?"YYYY-MM-DD HH:mm:ss":"time"===e?"HH:mm:ss":"YYYY-MM-DD"),a=i.getFullYear(),o=String(i.getMonth()+1).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0"),s=String(i.getHours()).padStart(2,"0"),c=String(i.getMinutes()).padStart(2,"0"),u=String(i.getSeconds()).padStart(2,"0");return r.replace("YYYY",a).replace("MM",o).replace("DD",l).replace("HH",s).replace("mm",c).replace("ss",u)},formatDateRangeValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(t)||0===t.length)return"--";var n,i,r=(i=2,function(t){if(Array.isArray(t))return t}(n=t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,a,o,l=[],s=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(i=a.call(n)).done)&&(l.push(i.value),l.length!==e);s=!0);}catch(t){c=!0,r=t}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return l}}(n,i)||J(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],o=r[1],l=e.separator||" ~ ",s=e.valueType||"date";return"".concat(this.formatDateValue(a,s,e)).concat(l).concat(this.formatDateValue(o,s,e))},formatJsonValue:function(t){if(null==t||""===t)return"--";if("string"==typeof t)try{var e=JSON.parse(t);return JSON.stringify(e,null,2)}catch(e){return t}return"object"===z(t)?JSON.stringify(t,null,2):String(t)},shouldShowEllipsis:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(null==t||!t.ellipsis)return!1;var r=this.formatColumnValue(t,n,e,i);if(null==r)return!1;var a=t.ellipsisLength||20;return String(r).length>a},formatColumnValue:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=this.getColumnRawValue(t,e,n),a=this.applyValueFormatter(t,r,e,i);if(null!==a)return a;if("money"===(null==t?void 0:t.valueType))return this.formatMoneyValue(r,t.valueProps);if("percent"===(null==t?void 0:t.valueType)||"progress"===(null==t?void 0:t.valueType))return this.formatPercentValue(r,t.valueProps);if("digit"===(null==t?void 0:t.valueType))return this.formatDigitValue(r,t.valueProps);if("date"===(null==t?void 0:t.valueType)||"dateTime"===(null==t?void 0:t.valueType)||"time"===(null==t?void 0:t.valueType))return this.formatDateValue(r,t.valueType,t.valueProps);if("dateRange"===(null==t?void 0:t.valueType))return this.formatDateRangeValue(r,t.valueProps);if("json"===(null==t?void 0:t.valueType))return this.formatJsonValue(r);if("index"===(null==t?void 0:t.valueType))return this.getDisplayIndex(i);var o=this.getValueEnumOption(t,r);return o?"object"===z(o)?o.text||o.label||o.value||r||"--":o:null==r||""===r?"--":r},hasCopyValue:function(t,e,n){var i=this.getColumnRawValue(t,e,n);return null!=i&&""!==i},getCopyValue:function(t,e,n){var i=this.getColumnRawValue(t,e,n);if(null==i)return"";if("object"===z(i))try{return JSON.stringify(i)}catch(t){return String(i)}return String(i)},getDisplayIndex:function(t){return"number"!=typeof t?"--":this.request?(this.currentPage-1)*this.currentItemsPerPage+t+1:t+1},getAvatarProps:function(t){return U({size:32,color:"primary lighten-5"},null==t?void 0:t.valueProps)},getAvatarSrc:function(t){return t?"string"==typeof t?t:"object"===z(t)&&t.src?t.src:null:null},getAvatarInitials:function(t){if(!t)return"--";var e=String(t).trim();if(!e)return"--";var n=e.split(/\s+/);return 1===n.length?n[0].charAt(0).toUpperCase():"".concat(n[0].charAt(0)).concat(n[n.length-1].charAt(0)).toUpperCase()},toggleColumn:function(t){t.visible=!t.visible,this.emitColumnStateChange(),this.$forceUpdate()},resetColumns:function(){this.internalColumns.forEach(function(t){t.visible=t.initiallyVisible}),this.clearPersistedColumnState(),this.emitColumnStateChange(),this.$forceUpdate()},handleExport:function(){this.$emit("export")},handleRefresh:function(){var t=this;return E(V().m(function e(){return V().w(function(e){for(;;)switch(e.n){case 0:if(t.$emit("refresh"),!t.request){e.n=1;break}return e.n=1,t.reload();case 1:return e.a(2)}},e)}))()},toggleFullscreen:function(){var t,e,n,i;this.isFullscreen=!this.isFullscreen,this.isFullscreen?null===(t=(e=this.$el).requestFullscreen)||void 0===t||t.call(e):null===(n=(i=document).exitFullscreen)||void 0===n||n.call(i)},getVisibleButtons:function(t){var e=this;return this.actionColumn&&this.actionColumn.buttons?this.actionColumn.buttons.filter(function(n){return"function"==typeof n.visible?n.visible.call(e.context,t):!1!==n.visible}):[]},handleActionClick:function(t,e){var n=this;return E(V().m(function i(){return V().w(function(i){for(;;)switch(i.n){case 0:if(!t.confirm){i.n=1;break}if(confirm(t.confirm)){i.n=1;break}return i.a(2);case 1:if(!t.onClick){i.n=2;break}return i.n=2,t.onClick.call(n.context,e);case 2:return i.a(2)}},i)}))()},copyToClipboard:function(t){var e=this;if(navigator.clipboard)navigator.clipboard.writeText(t).then(function(){e.$emit("copy-success",t),console.log("已复制:",t)});else{var n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),this.$emit("copy-success",t),console.log("已复制:",t)}},handleRowClick:function(t,e){this.$emit("row-click",t,e),this.$emit("click:row",t,e)},handleSelectionChange:function(t){var e=this;this.selectedItems=t;var n={selectedRowKeys:t.map(function(t){return t[e.rowKey]}),selectedRows:t};this.$emit("selection-change",n),this.$emit("input",t),this.rowSelection&&"function"==typeof this.rowSelection.onChange&&this.rowSelection.onChange.call(this.context,n.selectedRowKeys,t)},handlePageChange:function(t){this.currentPage=t,this.$emit("update:page",t),this.request&&this.reload()},handleItemsPerPageChange:function(t){this.currentItemsPerPage=t,this.currentPage=1,this.$emit("update:items-per-page",t),this.request&&this.reload()},handleOptionsUpdate:function(t){t&&"object"===z(t)&&(void 0!==t.page&&t.page!==this.currentPage&&this.handlePageChange(t.page),void 0!==t.itemsPerPage&&t.itemsPerPage!==this.currentItemsPerPage&&this.handleItemsPerPageChange(t.itemsPerPage),void 0!==t.sortBy&&this.handleSortByUpdate(t.sortBy),void 0!==t.sortDesc&&this.handleSortDescUpdate(t.sortDesc)),this.$emit("update:options",t)},handleFilterSearch:function(t){var e=this.transformFilterValues(t);this.filterValues=e,this.currentPage=1,this.$emit("filter-search",e),this.request&&this.reload()},handleFilterReset:function(){this.filterValues={},this.currentPage=1,this.$emit("filter-reset"),this.request&&this.reload()},transformFilterValues:function(t){var e=this,n={};return Object.keys(t||{}).forEach(function(i){var r=t[i],a=e.filterFieldMetaMap[i];if(a&&"function"==typeof a.transform){var o=a.transform.call(e.context,r,t);return o&&"object"===z(o)&&!Array.isArray(o)?void Object.assign(n,o):void(void 0!==o&&(n[i]=o))}n[i]=r}),n},buildAutoFilterField:function(t){var e=this.normalizeSearchConfig(t);if(!e)return null;var n,i=this.mapValueTypeToFilterType(e.valueType,t),r={key:e.key,label:e.label,type:i,placeholder:e.placeholder||this.formatAutoFieldPlaceholder(e.label,i),options:[],props:U({clearable:!0,dense:!0},e.formItemProps||{}),initialValue:e.initialValue,defaultValue:e.initialValue,hideDetails:!0};return"select"===i&&(r.options=this.buildValueEnumOptions(t,e)),"date"===i&&(r.pickerProps=U({range:"dateRange"===e.valueType},(null===(n=e.formItemProps)||void 0===n?void 0:n.pickerProps)||{})),e.multiple&&(r.multiple=!0),e.fieldProps&&"object"===z(e.fieldProps)&&Object.assign(r,e.fieldProps),{field:r,transform:e.transform,initialValue:e.initialValue}},normalizeSearchConfig:function(t){var e;if(!t||"action"===t.value)return null;var n=t.search;if(null==n||!1===n)return null;var i=!0===n?{}:"object"===z(n)?U({},n):{},r=i.key||t.filterKey||t.value||t.dataIndex||t.key;return r?{key:r,label:i.label||t.searchLabel||t.text||t.title||r,valueType:i.valueType||t.valueType||"text",placeholder:i.placeholder,formItemProps:i.formItemProps||{},transform:i.transform,initialValue:i.initialValue,valueEnumKey:i.valueEnumKey||t.valueEnumKey,fieldProps:i.fieldProps||{},multiple:i.multiple||(null===(e=i.formItemProps)||void 0===e?void 0:e.multiple),search:i}:null},mapValueTypeToFilterType:function(t,e){switch(t){case"status":case"option":case"select":return null!=e&&e.valueEnum?"select":"text";case"date":case"dateTime":case"time":case"dateRange":return"date";default:return"text"}},buildValueEnumOptions:function(t,e){var n=null==t?void 0:t.valueEnum;if(!n)return[];var i=[];return Array.isArray(n)?(n.forEach(function(t){t&&i.push({text:t.text||t.label||t.value,value:t.value})}),i):(Object.keys(n).forEach(function(t){var r=n[t];if("object"===z(r)){var a=e.valueEnumKey&&void 0!==r[e.valueEnumKey]?r[e.valueEnumKey]:void 0!==r.value?r.value:t;i.push({text:r.text||r.label||t,value:a})}else i.push({text:r,value:t})}),i)},formatAutoFieldPlaceholder:function(t,e){return t?"select"===e?"请选择".concat(t):"请输入".concat(t):""},reload:function(){var t=this;return E(V().m(function e(){var n,i,r;return V().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t.request){e.n=1;break}return e.a(2);case 1:return t.currentLoading=!0,e.p=2,n={page:t.currentPage,pageSize:t.currentItemsPerPage,search:t.searchInputInternal,sorter:t.buildSorterPayload(),filters:t.filterValues},e.n=3,t.request(n);case 3:(i=e.v)&&!1!==i.success&&(t.currentItems=i.data||i.list||[],t.serverItemsLength=i.total||i.totalCount||t.currentItems.length,t.$nextTick(function(){return t.applySelectionState()})),e.n=5;break;case 4:e.p=4,r=e.v,console.error("Failed to load data:",r),t.$emit("request-error",r);case 5:return e.p=5,t.currentLoading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},reset:function(){this.currentPage=1,this.reload()},clearSelection:function(){var t,e;this.selectedItems=[],null===(t=this.$refs.dataTable)||void 0===t||null===(e=t.clearSelection)||void 0===e||e.call(t),this.$emit("selection-change",{selectedRowKeys:[],selectedRows:[]}),this.$emit("input",[]),this.rowSelection&&"function"==typeof this.rowSelection.onChange&&this.rowSelection.onChange([],[])},getSelectedRows:function(){return this.selectedItems},handleResize:function(){this.isMobile=window.innerWidth<500},startPolling:function(){var t=this;this.polling>0&&this.request&&(this.pollingTimer=setInterval(function(){t.reload()},this.polling))},stopPolling:function(){this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=null)},resolveColumnVisible:function(t){var e=t.value,n=t.baseVisible,i=t.externalState,r=t.persistedState,a=t.defaultVisible;return i&&Object.prototype.hasOwnProperty.call(i,e)?i[e]:r&&Object.prototype.hasOwnProperty.call(r,e)?r[e]:a&&Object.prototype.hasOwnProperty.call(a,e)?a[e]:n},getColumnStateSnapshot:function(){return this.internalColumns.reduce(function(t,e){return t[e.value]=!1!==e.visible,t},{})},emitColumnStateChange:function(){var t=this.getColumnStateSnapshot();this.$emit("columns-state-change",t),this.columnsState&&"function"==typeof this.columnsState.onChange&&this.columnsState.onChange.call(this.context,t),this.persistColumnState(t)},getPersistedColumnState:function(){if(!this.columnsState||!this.columnsState.persistenceKey)return null;if("undefined"==typeof window)return null;try{var t=window.localStorage.getItem(this.columnsState.persistenceKey);return t?JSON.parse(t):null}catch(t){return console.warn("[JhTable] Failed to parse persisted column state:",t),null}},persistColumnState:function(t){if(this.columnsState&&this.columnsState.persistenceKey&&"undefined"!=typeof window)try{t?window.localStorage.setItem(this.columnsState.persistenceKey,JSON.stringify(t)):window.localStorage.removeItem(this.columnsState.persistenceKey)}catch(t){console.warn("[JhTable] Failed to persist column state:",t)}},clearPersistedColumnState:function(){if(this.columnsState&&this.columnsState.persistenceKey&&"undefined"!=typeof window)try{window.localStorage.removeItem(this.columnsState.persistenceKey)}catch(t){console.warn("[JhTable] Failed to clear column state:",t)}},applyExternalColumnState:function(t){t&&(this.internalColumns=this.internalColumns.map(function(e){return U(U({},e),{},{visible:Object.prototype.hasOwnProperty.call(t,e.value)?t[e.value]:e.visible})}),this.$forceUpdate())},normalizeSortBy:function(t){return Array.isArray(t)?t:"string"==typeof t&&t?[t]:[]},normalizeSortDesc:function(t){return Array.isArray(t)?t:"boolean"==typeof t?[t]:[]},handleSortByUpdate:function(t){this.internalSortBy=this.normalizeSortBy(t),this.scheduleSortChangeEmit()},handleSortDescUpdate:function(t){Array.isArray(t)?this.internalSortDesc=t:this.internalSortDesc="boolean"==typeof t?[t]:[],this.scheduleSortChangeEmit()},scheduleSortChangeEmit:function(){var t=this;this.sortChangeTimer&&clearTimeout(this.sortChangeTimer),this.sortChangeTimer=setTimeout(function(){t.sortChangeTimer=null,t.emitSortChange()},0)},emitSortChange:function(){this.$emit("update:sortBy",this.internalSortBy),this.$emit("update:sortDesc",this.internalSortDesc),this.$emit("sort-change",{sortBy:this.internalSortBy,sortDesc:this.internalSortDesc,sorter:this.buildSorterPayload()}),this.request&&(this.currentPage=1,this.$emit("update:page",1),this.reload())},buildSorterPayload:function(){var t=this;if(!this.internalSortBy.length)return{};var e={};return this.internalSortBy.forEach(function(n,i){e[n]=t.internalSortDesc[i]?"desc":"asc"}),{sortBy:this.internalSortBy,sortDesc:this.internalSortDesc,order:e}},applySelectionState:function(){if(this.showSelectComputed){var t=this.getControlledRowKeys();t?this.syncSelectionByKeys(t):this.applyDefaultRowSelection()}else this.selectedItems.length&&(this.selectedItems=[],this.$emit("input",[]))},getControlledRowKeys:function(){return this.rowSelection&&Array.isArray(this.rowSelection.selectedRowKeys)?this.rowSelection.selectedRowKeys:null},syncSelectionByKeys:function(t){var e=this;if(Array.isArray(t)){var n=new Set(t),i=this.currentItems.filter(function(t){return n.has(t[e.rowKey])});this.selectedItems=i,this.$emit("input",i)}},applyDefaultRowSelection:function(){var t=this;if(!this.hasAppliedDefaultRowSelection&&this.rowSelection&&Array.isArray(this.rowSelection.defaultSelectedRowKeys)){var e=new Set(this.rowSelection.defaultSelectedRowKeys),n=this.currentItems.filter(function(n){return e.has(n[t.rowKey])});n.length&&(this.selectedItems=n,this.$emit("input",n)),this.hasAppliedDefaultRowSelection=!0}}}},B,[],!1,null,"7e5a2306",null).exports;var X=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{value:t.visible,"max-width":t.maxWidth,persistent:"",fullscreen:t.isMobile},on:{input:t.handleDialogInput}},[e("v-card",[e("v-card-title",{staticClass:"d-flex align-center pa-4"},[e("span",[t._v(t._s(t.title))]),t._v(" "),e("v-spacer"),t._v(" "),e("v-icon",{on:{click:t.handleClose}},[t._v("mdi-close")])],1),t._v(" "),e("v-card-text",{staticClass:"pa-0"},[e("v-row",{style:t.contentStyle,attrs:{"no-gutters":""}},[e("v-col",{staticClass:"border-right",attrs:{cols:t.isMobile?12:7}},[t.showSearch||t.showSelectAll&&"multiple"===t.mode?e("div",{staticClass:"px-3 pt-3"},[t.showSearch?e("v-text-field",{staticClass:"mb-3",attrs:{placeholder:t.placeholder,"prepend-inner-icon":"mdi-magnify",outlined:"",dense:"","hide-details":"",clearable:""},model:{value:t.searchKeyword,callback:function(e){t.searchKeyword=e},expression:"searchKeyword"}}):t._e(),t._v(" "),t.showSelectAll&&"multiple"===t.mode?e("div",{staticClass:"mb-3 d-flex flex-wrap"},[e("v-btn",{staticClass:"mr-2 mb-2",attrs:{small:"",outlined:"",disabled:0===t.filteredAllNodes.length},on:{click:t.handleBatchSelect}},[e("v-icon",{attrs:{small:"",left:""}},[t._v("mdi-checkbox-multiple-marked")]),t._v("\n "+t._s(t.isAllSelected?"取消全选":"全选当前")+"\n ")],1)],1):t._e()],1):t._e(),t._v(" "),t.showSearch||t.showSelectAll&&"multiple"===t.mode?e("v-divider"):t._e(),t._v(" "),e("div",{style:t.listStyle},[e("div",{staticClass:"px-3 py-2",staticStyle:{height:"100%","overflow-y":"auto"}},[t.loading?e("div",{staticClass:"text-center py-8"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"primary"}})],1):0===t.filteredTreeData.length?e("div",{staticClass:"text-center grey--text py-8"},[e("v-icon",{attrs:{size:"48",color:"grey lighten-1"}},[t._v("mdi-file-tree")]),t._v(" "),e("div",{staticClass:"mt-2"},[t._v("未找到匹配的节点")])],1):e("div",t._l(t.filteredTreeData,function(n){return e("tree-node",{key:t.getNodeKey(n),attrs:{node:n,level:0,mode:t.mode,"allow-select-node":t.allowSelectNode,expandedNodes:t.expandedNodes,tempSelectedNodes:t.tempSelectedNodes,nodeKey:t.nodeKey,nodeLabel:t.nodeLabel,nodeChildren:t.nodeChildren,searchKeyword:t.searchKeyword,isNodeSelected:t.isNodeSelected,isNodeChildrenSelected:t.isNodeChildrenSelected},on:{"toggle-expand":t.toggleNodeExpand,"toggle-node":t.toggleNode,"select-single-node":t.selectSingleNode,"node-click":t.handleNodeClick}})}),1)])])],1),t._v(" "),"multiple"!==t.mode||t.isMobile?t._e():e("v-col",{attrs:{cols:t.isMobile?12:5}},[e("div",{staticClass:"pa-3",staticStyle:{height:"100%",display:"flex","flex-direction":"column"}},[e("div",{staticClass:"d-flex align-center mb-3"},[e("span",{staticClass:"text-subtitle-2"},[t._v("\n 已选: "+t._s(t.tempSelectedNodes.length)+"\n ")]),t._v(" "),e("v-spacer"),t._v(" "),e("v-btn",{attrs:{text:"",small:"",color:"primary",disabled:0===t.tempSelectedNodes.length},on:{click:t.clearSelection}},[t._v("\n 清除\n ")])],1),t._v(" "),e("v-divider",{staticClass:"mb-3"}),t._v(" "),e("div",{staticClass:"flex-grow-1",staticStyle:{"overflow-y":"auto"}},[0===t.tempSelectedNodes.length?e("div",{staticClass:"text-center py-8"},[e("v-icon",{attrs:{size:"64",color:"grey lighten-2"}},[t._v("mdi-checkbox-multiple-blank-outline")]),t._v(" "),e("div",{staticClass:"grey--text mt-2"},[t._v("暂无选中内容")])],1):e("div",t._l(t.tempSelectedNodes,function(n){return e("v-chip",{key:t.getNodeKey(n),staticClass:"ma-1",attrs:{close:"",small:""},on:{"click:close":function(e){return t.removeNodeFromTemp(n)}}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-file-tree")]),t._v("\n "+t._s(t.getNodeLabel(n))+"\n ")],1)}),1)])],1)])],1)],1),t._v(" "),e("v-divider"),t._v(" "),e("v-card-actions",{staticClass:"pa-4"},["multiple"===t.mode&&t.isMobile?e("div",{staticClass:"text-caption"},[t._v("\n 已选 "+t._s(t.tempSelectedNodes.length)+"\n ")]):t._e(),t._v(" "),e("v-spacer"),t._v(" "),e("v-btn",{attrs:{text:""},on:{click:t.handleCancel}},[t._v("取消")]),t._v(" "),e("v-btn",{attrs:{color:"success",disabled:"single"===t.mode&&0===t.tempSelectedNodes.length},on:{click:t.handleConfirm}},[t._v("\n 确定\n ")])],1)],1)],1)};function Z(t){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z(t)}function Q(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function tt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(n),!0).forEach(function(e){et(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function et(t,e,n){return(e=function(t){var e=function(t){if("object"!=Z(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Z(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nt(t){return function(t){if(Array.isArray(t))return rt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||it(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(t,e){if(t){if("string"==typeof t)return rt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rt(t,e):void 0}}function rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}X._withStripped=!0;const at=i({name:"JhTreeSelect",components:{TreeNode:{name:"TreeNode",template:'\n <div class="mb-1">\n \x3c!-- 节点 --\x3e\n <div class="d-flex align-center py-2 tree-item" :style="{ paddingLeft: (level * 16) + \'px\' }">\n <v-checkbox\n v-if="mode === \'multiple\' && !allowSelectNode"\n :input-value="isNodeChildrenSelected(node)"\n @change="$emit(\'toggle-node\', node)"\n @click.stop\n hide-details\n dense\n class="mr-2 mt-0"\n ></v-checkbox>\n <v-icon \n class="mr-2" \n small\n @click="$emit(\'toggle-expand\', getNodeKey(node))"\n style="cursor: pointer;"\n v-if="hasChildren(node)"\n >\n {{ expandedNodes.includes(getNodeKey(node)) ? \'mdi-chevron-down\' : \'mdi-chevron-right\' }}\n </v-icon>\n <span v-else class="mr-2" style="width: 20px;"></span>\n <v-icon small class="mr-2" color="primary">mdi-file-tree</v-icon>\n <div class="flex-grow-1" @click="$emit(\'toggle-expand\', getNodeKey(node))" style="cursor: pointer;">\n <div class="font-weight-medium">{{ getNodeLabel(node) }}</div>\n <div class="text-caption grey--text" v-if="hasChildren(node)">\n {{ getChildrenCount(node) }}个子节点\n </div>\n </div>\n \x3c!-- 选择节点按钮 --\x3e\n <v-btn\n v-if="allowSelectNode && mode === \'multiple\'"\n x-small\n outlined\n color="primary"\n @click.stop="$emit(\'toggle-node\', node)"\n class="ml-2"\n >\n <v-icon x-small left>mdi-check</v-icon>\n {{ isNodeSelected(node) ? \'已选\' : \'选择\' }}\n </v-btn>\n <v-radio\n v-else-if="allowSelectNode && mode === \'single\'"\n :value="getNodeKey(node)"\n :input-value="selectedNodeKey"\n @click.stop="handleRadioClick(node)"\n hide-details\n dense\n class="ml-2 mt-0"\n ></v-radio>\n </div>\n \n \x3c!-- 展开内容:子节点 --\x3e\n <v-expand-transition>\n <div v-show="expandedNodes.includes(getNodeKey(node))">\n \x3c!-- 子节点(递归) --\x3e\n <tree-node\n v-for="child in getChildren(node)"\n :key="getNodeKey(child)"\n :node="child"\n :level="level + 1"\n :mode="mode"\n :allow-select-node="allowSelectNode"\n :expandedNodes="expandedNodes"\n :tempSelectedNodes="tempSelectedNodes"\n :nodeKey="nodeKey"\n :nodeLabel="nodeLabel"\n :nodeChildren="nodeChildren"\n :searchKeyword="searchKeyword"\n :isNodeSelected="isNodeSelected"\n :isNodeChildrenSelected="isNodeChildrenSelected"\n @toggle-expand="$emit(\'toggle-expand\', $event)"\n @toggle-node="$emit(\'toggle-node\', $event)"\n @select-single-node="$emit(\'select-single-node\', $event)"\n @node-click="$emit(\'node-click\', $event)"\n ></tree-node>\n </div>\n </v-expand-transition>\n </div>\n ',props:{node:{type:Object,required:!0},level:{type:Number,default:0},mode:String,allowSelectNode:Boolean,expandedNodes:Array,tempSelectedNodes:Array,nodeKey:String,nodeLabel:String,nodeChildren:String,searchKeyword:String,isNodeSelected:Function,isNodeChildrenSelected:Function},computed:{selectedNodeKey:function(){return this.tempSelectedNodes.length>0?this.getNodeKey(this.tempSelectedNodes[0]):null}},methods:{getNodeKey:function(t){return t[this.nodeKey]},getNodeLabel:function(t){return t[this.nodeLabel]||""},getChildren:function(t){var e=this,n=t[this.nodeChildren]||[];if(!this.searchKeyword)return n;var i=this.searchKeyword.toLowerCase();return n.filter(function(t){return e.getNodeLabel(t).toLowerCase().includes(i)||e.hasMatchingChildren(t,i)})},hasMatchingChildren:function(t,e){var n=this;return(t[this.nodeChildren]||[]).some(function(t){return n.getNodeLabel(t).toLowerCase().includes(e)||n.hasMatchingChildren(t,e)})},hasChildren:function(t){var e=t[this.nodeChildren]||[];return e&&e.length>0},getChildrenCount:function(t){var e=t[this.nodeChildren]||[];return e?e.length:0},handleRadioClick:function(t){this.$emit("select-single-node",t)}}}},props:{value:{type:Array,default:function(){return[]}},visible:{type:Boolean,default:!1},mode:{type:String,default:"multiple",validator:function(t){return["multiple","single"].includes(t)}},title:{type:String,default:"选择节点"},placeholder:{type:String,default:"搜索节点"},maxWidth:{type:String,default:"1000px"},data:{type:Array,default:function(){return[]}},nodeKey:{type:String,default:"id"},nodeLabel:{type:String,default:"label"},nodeChildren:{type:String,default:"children"},allowSelectNode:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!0},showSelectAll:{type:Boolean,default:!0},loading:{type:Boolean,default:!1}},data:function(){return{isMobile:"undefined"!=typeof window&&window.innerWidth<600,currentTab:0,searchKeyword:"",tempSelectedNodes:[],expandedNodes:[]}},computed:{contentStyle:function(){return this.isMobile?"height: calc(100vh - 120px);":"height: 600px;"},listStyle:function(){var t=this.showSearch||this.showSelectAll&&"multiple"===this.mode?"calc(100% - 140px)":"calc(100% - 60px)";return"height: ".concat(t,";")},filteredTreeData:function(){if(!this.searchKeyword)return this.data;var t=this.searchKeyword.toLowerCase();return this.filterTreeRecursive(this.data,t)},filteredAllNodes:function(){var t=this,e=function(n){var i=[];return n.forEach(function(n){i.push(n);var r=n[t.nodeChildren]||[];r.length>0&&(i=i.concat(e(r)))}),i},n=e(this.data);if(!this.searchKeyword)return n;var i=this.searchKeyword.toLowerCase();return n.filter(function(e){return t.getNodeLabel(e).toLowerCase().includes(i)})},isAllSelected:function(){var t=this;return 0!==this.filteredAllNodes.length&&this.filteredAllNodes.every(function(e){return t.isNodeSelected(e)})}},watch:{visible:{immediate:!0,handler:function(t){t&&this.initDialog()}}},mounted:function(){"undefined"!=typeof window&&window.addEventListener("resize",this.handleResize)},beforeDestroy:function(){"undefined"!=typeof window&&window.removeEventListener("resize",this.handleResize)},methods:{handleResize:function(){this.isMobile=window.innerWidth<600},initDialog:function(){var t=this;this.tempSelectedNodes=nt(this.value||[]),this.searchKeyword="",this.expandedNodes=[],this.autoExpandSelectedNodes(),this.data.length>0&&(this.expandedNodes=this.data.slice(0,3).map(function(e){return t.getNodeKey(e)}))},autoExpandSelectedNodes:function(){var t=this,e=new Set(this.tempSelectedNodes.map(function(e){return t.getNodeKey(e)})),n=function(e,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=it(t))){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,o=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){o=!0,r=t},f:function(){try{a||null==e.return||e.return()}finally{if(o)throw r}}}}(e);try{for(o.s();!(r=o.n()).done;){var l=r.value,s=t.getNodeKey(l),c=[].concat(nt(a),[s]);if(s===i)return c;var u=l[t.nodeChildren]||[];if(u.length>0){var d=n(u,i,c);if(d)return d}}}catch(t){o.e(t)}finally{o.f()}return null};e.forEach(function(e){var i=n(t.data,e);i&&i.forEach(function(e){return t.expandedNodes.push(e)})}),this.expandedNodes=nt(new Set(this.expandedNodes))},filterTreeRecursive:function(t,e){var n=this,i=[];return t.forEach(function(t){var r=n.getNodeLabel(t).toLowerCase().includes(e),a=t[n.nodeChildren]||[],o=a.length>0?n.filterTreeRecursive(a,e):[],l=o.length>0;(r||l)&&i.push(tt(tt({},t),{},et({},n.nodeChildren,o)))}),i},getNodeKey:function(t){return t[this.nodeKey]},getNodeLabel:function(t){return t[this.nodeLabel]||""},isNodeSelected:function(t){var e=this,n=this.getNodeKey(t);return this.tempSelectedNodes.some(function(t){return e.getNodeKey(t)===n})},isNodeChildrenSelected:function(t){var e=this,n=t[this.nodeChildren]||[];return 0!==n.length&&n.every(function(t){return e.isNodeSelected(t)})},toggleNodeExpand:function(t){var e=this.expandedNodes.indexOf(t);e>-1?this.expandedNodes.splice(e,1):this.expandedNodes.push(t)},toggleNode:function(t){var e=this;if("single"!==this.mode){var n=this.getNodeKey(t),i=this.tempSelectedNodes.findIndex(function(t){return e.getNodeKey(t)===n});i>-1?this.tempSelectedNodes.splice(i,1):this.tempSelectedNodes.push(t)}else this.selectSingleNode(t)},selectSingleNode:function(t){this.tempSelectedNodes=[t]},handleNodeClick:function(t){this.allowSelectNode?this.toggleNode(t):this.toggleNodeExpand(this.getNodeKey(t))},handleBatchSelect:function(){var t=this;this.isAllSelected?this.filteredAllNodes.forEach(function(e){var n=t.getNodeKey(e),i=t.tempSelectedNodes.findIndex(function(e){return t.getNodeKey(e)===n});i>-1&&t.tempSelectedNodes.splice(i,1)}):this.filteredAllNodes.forEach(function(e){t.isNodeSelected(e)||t.tempSelectedNodes.push(e)})},removeNodeFromTemp:function(t){var e=this,n=this.getNodeKey(t),i=this.tempSelectedNodes.findIndex(function(t){return e.getNodeKey(t)===n});i>-1&&this.tempSelectedNodes.splice(i,1)},clearSelection:function(){this.tempSelectedNodes=[]},handleDialogInput:function(t){this.$emit("update:visible",t)},handleClose:function(){this.handleCancel()},handleCancel:function(){this.$emit("update:visible",!1),this.$emit("cancel")},handleConfirm:function(){this.$emit("input",this.tempSelectedNodes),this.$emit("update:visible",!1),this.$emit("confirm",this.tempSelectedNodes)}}},X,[],!1,null,"4421993c",null).exports;var ot=function(){var t=this,e=t._self._c;return e("div",{staticClass:"jh-address-select"},["select"===t.type?[e("v-row",{attrs:{dense:""}},[e("v-col",{attrs:{cols:"12",md:t.gridCol}},[e("v-autocomplete",{staticClass:"jh-v-input",attrs:{items:t.provinces,label:t.labels.province,outlined:t.outlined,dense:t.dense,filled:t.filled,"single-line":t.singleLine,loading:t.loading,"item-text":"name","item-value":"code",clearable:"","hide-details":"","hide-no-data":"","prepend-inner-icon":"mdi-map-outline"},on:{change:t.handleProvinceChange},model:{value:t.internalValue.province,callback:function(e){t.$set(t.internalValue,"province",e)},expression:"internalValue.province"}})],1),t._v(" "),t.level>=2?e("v-col",{attrs:{cols:"12",md:t.gridCol}},[e("v-autocomplete",{staticClass:"jh-v-input",attrs:{items:t.cities,label:t.labels.city,disabled:!t.internalValue.province,outlined:t.outlined,dense:t.dense,filled:t.filled,"single-line":t.singleLine,loading:t.loading,"item-text":"name","item-value":"code",clearable:"","prepend-inner-icon":"mdi-city-variant-outline"},on:{change:t.handleCityChange},model:{value:t.internalValue.city,callback:function(e){t.$set(t.internalValue,"city",e)},expression:"internalValue.city"}})],1):t._e(),t._v(" "),t.level>=3?e("v-col",{attrs:{cols:"12",md:t.gridCol}},[e("v-autocomplete",{staticClass:"jh-v-input",attrs:{items:t.districts,label:t.labels.district,disabled:!t.internalValue.city,outlined:t.outlined,dense:t.dense,filled:t.filled,"single-line":t.singleLine,loading:t.loading,"item-text":"name","item-value":"code",clearable:"","prepend-inner-icon":"mdi-home-city-outline"},on:{change:t.handleDistrictChange},model:{value:t.internalValue.district,callback:function(e){t.$set(t.internalValue,"district",e)},expression:"internalValue.district"}})],1):t._e(),t._v(" "),t.level>=4?e("v-col",{attrs:{cols:"12",md:t.gridCol}},[e("v-autocomplete",{staticClass:"jh-v-input",attrs:{items:t.towns,label:t.labels.town,disabled:!t.internalValue.district,outlined:t.outlined,dense:t.dense,filled:t.filled,"single-line":t.singleLine,loading:t.loading,"item-text":"name","item-value":"code",clearable:"","prepend-inner-icon":"mdi-home-variant-outline"},on:{change:t.emitChange},model:{value:t.internalValue.town,callback:function(e){t.$set(t.internalValue,"town",e)},expression:"internalValue.town"}})],1):t._e()],1)]:"cascader"===t.type?[e("v-menu",{attrs:{"close-on-content-click":!1,"offset-y":"","max-width":"100%",transition:"scale-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-text-field",t._g(t._b({staticClass:"jh-v-input",attrs:{value:t.displayText,label:t.label,outlined:t.outlined,dense:t.dense,filled:t.filled,"single-line":t.singleLine,loading:t.loading,readonly:"","append-icon":"mdi-menu-down",clearable:"","hide-details":""},on:{"click:clear":t.clearValue}},"v-text-field",r,!1),i))]}}]),model:{value:t.menuVisible,callback:function(e){t.menuVisible=e},expression:"menuVisible"}},[t._v(" "),e("v-card",{staticClass:"jh-cascader-card"},[e("div",{staticClass:"jh-cascader-container"},[t.provinces.length?e("div",{staticClass:"jh-cascader-column"},[e("v-list",{staticClass:"pa-0",attrs:{dense:""}},t._l(t.provinces,function(n){return e("v-list-item",{key:n.code,class:{"v-item--active v-list-item--active primary--text":t.internalValue.province===n.code},on:{click:function(e){return t.onProvinceClick(n)}}},[e("v-list-item-content",[e("v-list-item-title",{attrs:{title:n.name}},[t._v(t._s(n.name))])],1),t._v(" "),t.level>1?e("v-list-item-action",[e("v-icon",{attrs:{small:""}},[t._v("mdi-chevron-right")])],1):t._e()],1)}),1)],1):t._e(),t._v(" "),t.level>=2?e("div",{staticClass:"jh-cascader-column"},[t.cities.length?e("v-list",{staticClass:"pa-0",attrs:{dense:""}},t._l(t.cities,function(n){return e("v-list-item",{key:n.code,class:{"v-item--active v-list-item--active primary--text":t.internalValue.city===n.code},on:{click:function(e){return t.onCityClick(n)}}},[e("v-list-item-content",[e("v-list-item-title",{attrs:{title:n.name}},[t._v(t._s(n.name))])],1),t._v(" "),t.level>2?e("v-list-item-action",[e("v-icon",{attrs:{small:""}},[t._v("mdi-chevron-right")])],1):t._e()],1)}),1):t._e()],1):t._e(),t._v(" "),t.level>=3?e("div",{staticClass:"jh-cascader-column"},[t.districts.length?e("v-list",{staticClass:"pa-0",attrs:{dense:""}},t._l(t.districts,function(n){return e("v-list-item",{key:n.code,class:{"v-item--active v-list-item--active primary--text":t.internalValue.district===n.code},on:{click:function(e){return t.onDistrictClick(n)}}},[e("v-list-item-content",[e("v-list-item-title",{attrs:{title:n.name}},[t._v(t._s(n.name))])],1),t._v(" "),t.level>3?e("v-list-item-action",[e("v-icon",{attrs:{small:""}},[t._v("mdi-chevron-right")])],1):t._e()],1)}),1):t._e()],1):t._e(),t._v(" "),t.level>=4?e("div",{staticClass:"jh-cascader-column"},[t.towns.length?e("v-list",{staticClass:"pa-0",attrs:{dense:""}},t._l(t.towns,function(n){return e("v-list-item",{key:n.code,class:{"v-item--active v-list-item--active primary--text":t.internalValue.town===n.code},on:{click:function(e){return t.onTownClick(n)}}},[e("v-list-item-content",[e("v-list-item-title",{attrs:{title:n.name}},[t._v(t._s(n.name))])],1)],1)}),1):t._e()],1):t._e()])])],1)]:t._e()],2)};function lt(t){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(t)}function st(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function ct(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?st(Object(n),!0).forEach(function(e){ut(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ut(t,e,n){return(e=function(t){var e=function(t){if("object"!=lt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=lt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}ot._withStripped=!0;const dt=i({name:"JhAddressSelect",props:{value:{type:Object,default:function(){return{province:null,city:null,district:null,town:null}}},level:{type:Number,default:3},outlined:{type:Boolean,default:!0},dense:{type:Boolean,default:!0},filled:{type:Boolean,default:!0},singleLine:{type:Boolean,default:!0},type:{type:String,default:"select"},label:{type:String,default:"请选择地区"},loading:{type:Boolean,default:!1},labels:{type:Object,default:function(){return{province:"省份",city:"城市",district:"区/县",town:"乡镇"}}},data:{type:Array,default:function(){return[{code:"110000",name:"北京市",children:[{code:"110100",name:"市辖区",children:[{code:"110101",name:"东城区",children:[{code:"110101001",name:"东华门街道"}]}]}]},{code:"440000",name:"广东省",children:[{code:"440100",name:"广州市",children:[{code:"440106",name:"天河区",children:[{code:"440106001",name:"天河南街道"}]}]},{code:"440300",name:"深圳市",children:[{code:"440305",name:"南山区",children:[{code:"440305001",name:"南头街道"}]}]}]}]}}},data:function(){return{internalValue:ct({},this.value),cities:[],districts:[],towns:[],menuVisible:!1}},computed:{provinces:function(){return this.data.map(function(t){return{code:t.code,name:t.name}})},gridCol:function(){return 1===this.level?12:2===this.level?6:3===this.level?4:3},displayText:function(){var t=this;if(!this.internalValue.province)return"";var e=this.provinces.find(function(e){return e.code===t.internalValue.province}),n=e?e.name:"";if(this.level>=2&&this.internalValue.city){var i=this.cities.find(function(e){return e.code===t.internalValue.city});i&&(n+=" / ".concat(i.name))}if(this.level>=3&&this.internalValue.district){var r=this.districts.find(function(e){return e.code===t.internalValue.district});r&&(n+=" / ".concat(r.name))}if(this.level>=4&&this.internalValue.town){var a=this.towns.find(function(e){return e.code===t.internalValue.town});a&&(n+=" / ".concat(a.name))}return n},fullValue:function(){var t=this,e={province:null,city:null,district:null,town:null};if(this.internalValue.province){var n=this.provinces.find(function(e){return e.code===t.internalValue.province});n&&(e.province={code:n.code,name:n.name})}if(this.internalValue.city){var i=this.cities.find(function(e){return e.code===t.internalValue.city});i&&(e.city={code:i.code,name:i.name})}if(this.internalValue.district){var r=this.districts.find(function(e){return e.code===t.internalValue.district});r&&(e.district={code:r.code,name:r.name})}if(this.internalValue.town){var a=this.towns.find(function(e){return e.code===t.internalValue.town});a&&(e.town={code:a.code,name:a.name})}return e}},watch:{value:{deep:!0,immediate:!0,handler:function(t){var e={province:null,city:null,district:null,town:null};if(t.province&&(e.province="object"===lt(t.province)?t.province.code:t.province),t.city&&(e.city="object"===lt(t.city)?t.city.code:t.city),t.district&&(e.district="object"===lt(t.district)?t.district.code:t.district),t.town&&(e.town="object"===lt(t.town)?t.town.code:t.town),this.internalValue=e,e.province){var n=this.data.find(function(t){return t.code===e.province});if(this.cities=n?n.children:[],e.city){var i=this.cities.find(function(t){return t.code===e.city});if(this.districts=i?i.children:[],e.district){var r=this.districts.find(function(t){return t.code===e.district});this.towns=r?r.children:[]}}}}}},methods:{handleProvinceChange:function(t){if(this.internalValue.city=null,this.internalValue.district=null,this.internalValue.town=null,this.cities=[],this.districts=[],this.towns=[],t){var e=this.data.find(function(e){return e.code===t});this.cities=e?e.children:[]}this.emitChange()},handleCityChange:function(t){var e=this;if(this.internalValue.district=null,this.internalValue.town=null,this.districts=[],this.towns=[],t){var n=this.data.find(function(t){return t.code===e.internalValue.province}),i=null==n?void 0:n.children.find(function(e){return e.code===t});this.districts=i?i.children:[]}this.emitChange()},handleDistrictChange:function(t){var e=this;if(this.internalValue.town=null,this.towns=[],t){var n=this.data.find(function(t){return t.code===e.internalValue.province}),i=null==n?void 0:n.children.find(function(t){return t.code===e.internalValue.city}),r=null==i?void 0:i.children.find(function(e){return e.code===t});this.towns=r?r.children:[]}this.emitChange()},emitChange:function(){this.$emit("input",ct({},this.fullValue)),this.$emit("change",ct({},this.fullValue))},onProvinceClick:function(t){this.internalValue.province=t.code,this.handleProvinceChange(t.code),1===this.level&&(this.menuVisible=!1)},onCityClick:function(t){this.internalValue.city=t.code,this.handleCityChange(t.code),2===this.level&&(this.menuVisible=!1)},onDistrictClick:function(t){this.internalValue.district=t.code,this.handleDistrictChange(t.code),3===this.level&&(this.menuVisible=!1)},onTownClick:function(t){this.internalValue.town=t.code,this.emitChange(),4===this.level&&(this.menuVisible=!1)},clearValue:function(){this.internalValue={province:null,city:null,district:null,town:null},this.cities=[],this.districts=[],this.towns=[],this.emitChange()}}},ot,[],!1,null,"05c116e5",null).exports;var ft=function(){var t=this,e=t._self._c;return e("div",[e("v-app",{attrs:{"mobile-breakpoint":"sm"}},[t._t("menu"),t._v(" "),e("v-main",{staticClass:"mt-15"},[e("div",{staticClass:"jh-page-second-bar px-3 px-sm-8"},[e("v-row",{staticClass:"align-center",attrs:{"no-gutters":""}},[e("v-col",{attrs:{cols:"12",sm:"12",md:"4",xl:"3"}},[e("div",{staticClass:"py-4 text-body-1 font-weight-bold align-center d-flex align-center"},[t._v("\n "+t._s(t.pageName)+"\n "),t._v(" "),t.showHelpButton?e("v-icon",{staticClass:"black--text ml-1",attrs:{size:"15"},on:{click:function(e){return t.$emit("help-click")}}},[t._v("\n mdi-help-circle\n ")]):t._e()],1)]),t._v(" "),e("v-spacer"),t._v(" "),e("v-col",{staticClass:"pl-md-2 mb-2 mb-md-0 flex justify-end",attrs:{cols:"12",xs:"12",sm:"12",md:"8",xl:"9"}},[t._t("search-bar")],2)],1)],1),t._v(" "),e("div",{staticClass:"jh-page-body-container px-sm-8"},[e("v-row",{staticClass:"pa-0 ma-0"},[e("v-col",{staticClass:"pa-0",attrs:{cols:12}},[t._t("content")],2)],1)],1),t._v(" "),t._t("default")],2)],2),t._v(" "),e("jh-toast"),t._v(" "),e("jh-mask"),t._v(" "),e("jh-confirm-dialog")],1)};ft._withStripped=!0;const ht=i({name:"JhPageContainer",props:{pageName:{type:String,required:!0,default:"页面标题"},showHelpButton:{type:Boolean,default:!0}}},ft,[],!1,null,null,null).exports;var pt=function(){var t=this,e=t._self._c;return e("v-app",[e("jh-menu",{attrs:{"app-title":t.title,"menu-list":t.formattedMenuData,"right-menu-list":t.rightMenuList,"avatar-menu-list":t.formattedAvatarMenuList,"user-info":t.userInfo,"show-avatar":t.showAvatar,"active-menu-index":t.currentMenuIndex,"active-second-menu-id":t.currentSecondMenuId},on:{"menu-click":t.handleMenuClick,logout:t.handleLogout},scopedSlots:t._u([{key:"title",fn:function(){return[t._t("logo",function(){return[e("div",{staticClass:"d-flex align-center"},[t.logo?e("v-icon",{staticClass:"mr-2",attrs:{color:"primary"}},[t._v(t._s(t.logo))]):t._e(),t._v(" "),e("span",{staticClass:"text-h6 font-weight-bold primary--text"},[t._v(t._s(t.title))])],1)]})]},proxy:!0}],null,!0)}),t._v(" "),e("v-main",{staticClass:"jh-layout-main"},[e("div",{staticClass:"jh-layout-content",style:{backgroundColor:t.contentBackground}},[t._t("default")],2)]),t._v(" "),t.showSettings?e("v-navigation-drawer",{staticClass:"jh-layout-settings",attrs:{app:"",right:"",temporary:"",width:"320"},model:{value:t.settingsDrawer,callback:function(e){t.settingsDrawer=e},expression:"settingsDrawer"}},[e("v-toolbar",{attrs:{flat:"",color:"primary",dark:""}},[e("v-toolbar-title",[t._v("布局设置")]),t._v(" "),e("v-spacer"),t._v(" "),e("v-btn",{attrs:{icon:""},on:{click:function(e){t.settingsDrawer=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),t._v(" "),e("v-list",[e("v-list-item",[e("v-list-item-content",[e("v-list-item-title",{staticClass:"font-weight-bold mb-2"},[t._v("内容背景色")]),t._v(" "),e("v-text-field",{attrs:{dense:"",outlined:"","hide-details":"",placeholder:"#f5f5f5"},scopedSlots:t._u([{key:"prepend-inner",fn:function(){return[e("div",{style:{backgroundColor:t.internalContentBackground,width:"24px",height:"24px",borderRadius:"4px",border:"1px solid #ddd"}})]},proxy:!0}],null,!1,3625797711),model:{value:t.internalContentBackground,callback:function(e){t.internalContentBackground=e},expression:"internalContentBackground"}})],1)],1),t._v(" "),e("v-divider"),t._v(" "),e("v-list-item",[e("v-list-item-content",[e("v-list-item-title",{staticClass:"font-weight-bold mb-2"},[t._v("功能开关")]),t._v(" "),e("v-switch",{staticClass:"mt-2",attrs:{label:"显示用户头像",dense:"","hide-details":""},model:{value:t.internalShowAvatar,callback:function(e){t.internalShowAvatar=e},expression:"internalShowAvatar"}})],1)],1),t._v(" "),e("v-divider"),t._v(" "),e("v-list-item",[e("v-list-item-content",[e("v-list-item-title",{staticClass:"font-weight-bold mb-3"},[t._v("快速预设")]),t._v(" "),e("v-btn",{staticClass:"mb-2",attrs:{block:"",outlined:"",small:""},on:{click:function(e){return t.applyPreset("default")}}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-palette")]),t._v("\n 默认主题\n ")],1),t._v(" "),e("v-btn",{staticClass:"mb-2",attrs:{block:"",outlined:"",small:""},on:{click:function(e){return t.applyPreset("dark")}}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-weather-night")]),t._v("\n 暗色主题\n ")],1),t._v(" "),e("v-btn",{attrs:{block:"",outlined:"",small:""},on:{click:function(e){return t.applyPreset("compact")}}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-arrow-collapse-vertical")]),t._v("\n 紧凑模式\n ")],1)],1)],1),t._v(" "),e("v-divider"),t._v(" "),e("v-list-item",[e("v-list-item-content",[e("v-btn",{attrs:{block:"",color:"error",outlined:""},on:{click:t.resetSettings}},[e("v-icon",{attrs:{left:""}},[t._v("mdi-restore")]),t._v("\n 重置为默认\n ")],1)],1)],1)],1)],1):t._e(),t._v(" "),t.showSettings?e("v-btn",{staticClass:"jh-layout-settings-btn",attrs:{fab:"",fixed:"",right:"",bottom:"",color:"primary",elevation:"4"},on:{click:function(e){t.settingsDrawer=!0}}},[e("v-icon",[t._v("mdi-cog")])],1):t._e()],1)};function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function mt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function yt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mt(Object(n),!0).forEach(function(e){bt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function bt(t,e,n){return(e=function(t){var e=function(t){if("object"!=vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}pt._withStripped=!0;const gt=i({name:"JhLayout",components:{JhMenu:r},props:{title:{type:String,default:"JianghuJS"},logo:{type:String,default:""},menuData:{type:Array,default:function(){return[]}},rightMenuList:{type:Array,default:function(){return[]}},currentPath:{type:String,default:""},contentBackground:{type:String,default:"#f5f5f5"},showAvatar:{type:Boolean,default:!0},userInfo:{type:Object,default:function(){return{username:"Guest",userId:"",roles:[]}}},avatarMenuList:{type:Array,default:function(){return[]}},showSettings:{type:Boolean,default:!1}},data:function(){return{settingsDrawer:!1,currentMenuIndex:-1,currentSecondMenuId:null,internalContentBackground:this.contentBackground,internalShowAvatar:this.showAvatar}},computed:{formattedMenuData:function(){return this.formatMenuItems(this.menuData)},formattedAvatarMenuList:function(){return this.avatarMenuList.map(function(t){return yt(yt({},t),{},{title:t.name||t.title,id:t.path||t.id})})}},watch:{internalContentBackground:function(t){this.$emit("update:contentBackground",t)},internalShowAvatar:function(t){this.$emit("update:showAvatar",t)},currentPath:{handler:function(t){this.updateActiveMenu(t)},immediate:!0}},methods:{formatMenuItems:function(t){var e=this;return t.map(function(t){return yt(yt({},t),{},{title:t.name||t.title,id:t.path||t.id,children:t.children?e.formatMenuItems(t.children):void 0})})},updateActiveMenu:function(t){var e=this;if(t){var n=function(t,i){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,a=0;a<t.length;a++){var o=t[a],l=-1===r?a:r;if(o.path===i)return e.currentMenuIndex=l,e.currentSecondMenuId=o.id||o.path,!0;if(o.children&&n(o.children,i,l))return!0}return!1};n(this.menuData,t)}},handleMenuClick:function(t,e){void 0!==e&&(this.currentMenuIndex=e),t.id&&(this.currentSecondMenuId=t.id),this.$emit("menu-click",t)},handleLogout:function(){this.$emit("logout")},applyPreset:function(t){switch(t){case"default":this.internalContentBackground="#f5f5f5",this.internalShowAvatar=!0;break;case"dark":this.internalContentBackground="#1e1e1e",this.internalShowAvatar=!0;break;case"compact":this.internalContentBackground="#ffffff",this.internalShowAvatar=!0}},resetSettings:function(){this.internalContentBackground="#f5f5f5",this.internalShowAvatar=!0}}},pt,[],!1,null,"181b7ada",null).exports;var _t=function(){var t=this,e=t._self._c;return e("div",{class:t.cardClasses,style:t.cardStyles},[t.hasHeader?e("div",{class:t.headerClasses},[e("div",{staticClass:"jh-card-header-left"},[t.title?e("div",{staticClass:"jh-card-title"},[t._v("\n "+t._s(t.title)+"\n ")]):t._e(),t._v(" "),t._t("title"),t._v(" "),t.tooltip?e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-icon",t._g(t._b({staticClass:"ml-2",attrs:{small:""}},"v-icon",r,!1),i),[t._v("\n mdi-help-circle-outline\n ")])]}}],null,!1,732963286)},[t._v(" "),e("span",[t._v(t._s(t.tooltip))])]):t._e()],2),t._v(" "),t.extra||t.$slots.extra?e("div",{staticClass:"jh-card-extra"},[t._t("extra",function(){return[t._v(t._s(t.extra))]})],2):t._e(),t._v(" "),t.collapsible?e("v-btn",{staticClass:"ml-2",attrs:{icon:"",small:""},on:{click:t.toggleCollapse}},[e("v-icon",[t._v(t._s(t.isCollapsed?"mdi-chevron-down":"mdi-chevron-up"))])],1):t._e()],1):t._e(),t._v(" "),t.hasHeader&&t.headerBordered?e("v-divider"):t._e(),t._v(" "),t.tabs?e("v-tabs",{class:t.tabsClasses,attrs:{vertical:"left"===t.tabs.tabPosition||"right"===t.tabs.tabPosition},on:{change:t.handleTabChange},model:{value:t.activeTabKey,callback:function(e){t.activeTabKey=e},expression:"activeTabKey"}},t._l(t.tabPanes,function(n){return e("v-tab",{key:n.key},[t._v("\n "+t._s(n.tab)+"\n ")])}),1):t._e(),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.isCollapsed,expression:"!isCollapsed"}],class:t.bodyClasses,style:t.bodyStyles},[t.tabs?[e("v-tabs-items",{model:{value:t.activeTabKey,callback:function(e){t.activeTabKey=e},expression:"activeTabKey"}},t._l(t.tabPanes,function(n){return e("v-tab-item",{key:n.key},[t._t("tab-".concat(n.key),function(){return[t._v("\n "+t._s(n.content)+"\n ")]})],2)}),1)]:[t.loading?e("div",{staticClass:"jh-card-loading"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"primary"}})],1):t._t("default")]],2),t._v(" "),t.actions&&t.actions.length>0?[e("v-divider"),t._v(" "),e("div",{staticClass:"jh-card-actions"},t._l(t.actions,function(n,i){return e("div",{key:i,staticClass:"jh-card-action-item"},[e(n.component||"div",t._b({tag:"component",on:{click:n.onClick}},"component",n.props,!1),[n.icon?e("v-icon",[t._v(t._s(n.icon))]):t._e(),t._v(" "),n.text?e("span",[t._v(t._s(n.text))]):t._e()],1),t._v(" "),i<t.actions.length-1?e("v-divider",{staticClass:"mx-2",attrs:{vertical:""}}):t._e()],1)}),0)]:t._e()],2)};function wt(t){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt(t)}function St(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Ct(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?St(Object(n),!0).forEach(function(e){xt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):St(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function xt(t,e,n){return(e=function(t){var e=function(t){if("object"!=wt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=wt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}_t._withStripped=!0;const jt=i({name:"JhCard",props:{title:{type:String,default:""},subTitle:{type:String,default:""},tooltip:{type:String,default:""},extra:{type:String,default:""},bordered:{type:Boolean,default:!0},headerBordered:{type:Boolean,default:!1},ghost:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},defaultCollapsed:{type:Boolean,default:!1},size:{type:String,default:"default",validator:function(t){return["small","default"].includes(t)}},loading:{type:Boolean,default:!1},actions:{type:Array,default:function(){return[]}},layout:{type:String,default:"default",validator:function(t){return["default","center"].includes(t)}},direction:{type:String,default:"row",validator:function(t){return["row","column"].includes(t)}},split:{type:String,default:"",validator:function(t){return["","vertical","horizontal"].includes(t)}},colSpan:{type:[Number,String],default:24},gutter:{type:[Number,Array],default:0},tabs:{type:Object,default:null},hoverable:{type:Boolean,default:!1},bodyStyle:{type:Object,default:function(){return{}}},headStyle:{type:Object,default:function(){return{}}}},data:function(){var t;return{isCollapsed:this.defaultCollapsed,activeTabKey:(null===(t=this.tabs)||void 0===t?void 0:t.activeKey)||0,tabPanes:[]}},computed:{hasHeader:function(){return this.title||this.$slots.title||this.extra||this.$slots.extra||this.collapsible},cardClasses:function(){return["jh-card",{"jh-card--bordered":this.bordered,"jh-card--ghost":this.ghost,"jh-card--small":"small"===this.size,"jh-card--hoverable":this.hoverable,"jh-card--split-vertical":"vertical"===this.split,"jh-card--split-horizontal":"horizontal"===this.split,"jh-card--layout-center":"center"===this.layout}]},cardStyles:function(){var t,e,n={};if(24!==this.colSpan&&("number"==typeof this.colSpan?(n.flex="0 0 ".concat(this.colSpan/24*100,"%"),n.maxWidth="".concat(this.colSpan/24*100,"%")):"string"==typeof this.colSpan&&(this.colSpan.endsWith("%")||this.colSpan.endsWith("px"))&&(n.flex="0 0 ".concat(this.colSpan),n.maxWidth=this.colSpan)),this.gutter)if(Array.isArray(this.gutter)){var i=(t=this.gutter,e=2,function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,a,o,l=[],s=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(i=a.call(n)).done)&&(l.push(i.value),l.length!==e);s=!0);}catch(t){c=!0,r=t}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return kt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],a=i[1];r&&(n.marginLeft="".concat(r/2,"px")),r&&(n.marginRight="".concat(r/2,"px")),a&&(n.marginTop="".concat(a/2,"px")),a&&(n.marginBottom="".concat(a/2,"px"))}else n.gap="".concat(this.gutter,"px");return n},headerClasses:function(){return["jh-card-header",{"jh-card-header--small":"small"===this.size}]},bodyClasses:function(){return["jh-card-body",{"jh-card-body--small":"small"===this.size,"jh-card-body--ghost":this.ghost,"jh-card-body--center":"center"===this.layout}]},bodyStyles:function(){return Ct(Ct({},this.bodyStyle),{},{flexDirection:this.direction})},tabsClasses:function(){var t;return["jh-card-tabs",{"jh-card-tabs--card":"card"===(null===(t=this.tabs)||void 0===t?void 0:t.type)}]}},watch:{"tabs.activeKey":function(t){this.activeTabKey=t}},mounted:function(){this.tabs&&this.$slots.default&&this.collectTabPanes()},methods:{toggleCollapse:function(){this.isCollapsed=!this.isCollapsed,this.$emit("collapse",this.isCollapsed)},handleTabChange:function(t){var e;this.activeTabKey=t,this.$emit("tab-change",t),null!==(e=this.tabs)&&void 0!==e&&e.onChange&&this.tabs.onChange(t)},collectTabPanes:function(){var t=[];(this.$slots.default||[]).forEach(function(e,n){if(e.componentOptions&&"jh-card-tab-pane"===e.componentOptions.tag){var i=e.componentOptions.propsData||{};t.push({key:i.tabKey||n,tab:i.tab||"Tab ".concat(n+1),content:e})}}),this.tabPanes=t}}},_t,[],!1,null,"7e359408",null).exports;var Ot=function(){var t=this,e=t._self._c;return e("div",{class:t.cardClasses,style:t.cardStyles},[t.title||t.$slots.title?e("div",{staticClass:"jh-statistic-card-header"},[t._t("title",function(){return[e("div",{staticClass:"jh-statistic-card-title"},[t._v(t._s(t.title))])]}),t._v(" "),t.tooltip?e("div",{staticClass:"jh-statistic-card-tooltip"},[e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-icon",t._g(t._b({attrs:{small:""}},"v-icon",r,!1),i),[t._v("mdi-help-circle-outline")])]}}],null,!1,722434280)},[t._v(" "),e("span",[t._v(t._s(t.tooltip))])])],1):t._e()],2):t._e(),t._v(" "),e("div",{staticClass:"jh-statistic-card-content"},[e("div",{staticClass:"jh-statistic-card-statistic"},[e("div",{staticClass:"jh-statistic-card-value-wrapper"},[t.prefix?e("span",{staticClass:"jh-statistic-card-prefix"},[t._v(t._s(t.prefix))]):t._e(),t._v(" "),e("span",{class:t.valueClasses,style:t.valueStyles},[t._t("value",function(){return[t._v(t._s(t.formattedValue))]})],2),t._v(" "),t.suffix?e("span",{staticClass:"jh-statistic-card-suffix"},[t._v(t._s(t.suffix))]):t._e()]),t._v(" "),t.trend||t.$slots.trend?e("div",{staticClass:"jh-statistic-card-trend"},[t._t("trend",function(){return[e("v-icon",{staticClass:"jh-statistic-card-trend-icon",attrs:{small:"",color:t.trendColor}},[t._v("\n "+t._s(t.trendIcon)+"\n ")]),t._v(" "),e("span",{style:{color:t.trendColor}},[t._v(t._s(t.trend))])]})],2):t._e(),t._v(" "),t.description||t.$slots.description?e("div",{staticClass:"jh-statistic-card-description"},[t._t("description",function(){return[t._v(t._s(t.description))]})],2):t._e()]),t._v(" "),t.hasChart?e("div",{staticClass:"jh-statistic-card-chart"},[t._t("chart",function(){return[t.chartOption?e("v-chart",{style:t.chartStyles,attrs:{option:t.chartOption,autoresize:""}}):t._e()]})],2):t._e()]),t._v(" "),t.$slots.footer||t.footer?e("div",{staticClass:"jh-statistic-card-footer"},[t._t("footer",function(){return[t._v(t._s(t.footer))]})],2):t._e()])};Ot._withStripped=!0;var Dt=function(){return"undefined"!=typeof window&&window.echarts};const Pt=i({name:"JhStatisticCard",components:{VChart:{name:"VChart",props:{option:Object,autoresize:{type:Boolean,default:!0}},data:function(){return{chart:null}},mounted:function(){this.initChart(),this.autoresize&&window.addEventListener("resize",this.handleResize)},beforeDestroy:function(){this.chart&&this.chart.dispose(),this.autoresize&&window.removeEventListener("resize",this.handleResize)},watch:{option:{handler:function(){this.updateChart()},deep:!0}},methods:{initChart:function(){Dt()?(this.chart=window.echarts.init(this.$el),this.updateChart()):console.warn("ECharts is not available. Please include ECharts CDN.")},updateChart:function(){this.chart&&this.option&&this.chart.setOption(this.option,!0)},handleResize:function(){this.chart&&this.chart.resize()}},render:function(t){return t("div",{style:{width:"100%",height:"100%"}})}}},props:{title:{type:String,default:""},tooltip:{type:String,default:""},value:{type:[Number,String],default:0},prefix:{type:String,default:""},suffix:{type:String,default:""},precision:{type:Number,default:0},valueColor:{type:String,default:""},trend:{type:String,default:""},trendType:{type:String,default:"up",validator:function(t){return["up","down"].includes(t)}},description:{type:String,default:""},footer:{type:String,default:""},chartOption:{type:Object,default:null},chartHeight:{type:[Number,String],default:46},chartWidth:{type:[Number,String],default:100},bordered:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},layout:{type:String,default:"horizontal",validator:function(t){return["horizontal","vertical"].includes(t)}}},computed:{formattedValue:function(){return"number"==typeof this.value?this.value.toFixed(this.precision):this.value},trendIcon:function(){return"up"===this.trendType?"mdi-trending-up":"mdi-trending-down"},trendColor:function(){return"up"===this.trendType?"#52c41a":"#f5222d"},hasChart:function(){return(this.$slots.chart||this.chartOption)&&Dt()},cardClasses:function(){return["jh-statistic-card",{"jh-statistic-card--bordered":this.bordered,"jh-statistic-card--loading":this.loading,"jh-statistic-card--vertical":"vertical"===this.layout}]},cardStyles:function(){return{}},valueClasses:function(){return["jh-statistic-card-value"]},valueStyles:function(){var t={};return this.valueColor&&(t.color=this.valueColor),t},chartStyles:function(){return{height:"number"==typeof this.chartHeight?"".concat(this.chartHeight,"px"):this.chartHeight,width:"number"==typeof this.chartWidth?"".concat(this.chartWidth,"px"):this.chartWidth}}}},Ot,[],!1,null,"39b0e8b7",null).exports;var It=function(){var t=this;return(0,t._self._c)("div",{staticClass:"jh-watermark",style:t.containerStyle},[t._t("default")],2)};function Ft(t){return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(t)}function Tt(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return At(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(At(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,At(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,At(d,"constructor",c),At(c,"constructor",s),s.displayName="GeneratorFunction",At(c,r,"GeneratorFunction"),At(d),At(d,r,"Generator"),At(d,i,function(){return this}),At(d,"toString",function(){return"[object Generator]"}),(Tt=function(){return{w:a,m:f}})()}function At(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}At=function(t,e,n,i){function a(e,n){At(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},At(t,e,n,i)}function Bt(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function $t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Rt(t,e,n){return(e=function(t){var e=function(t){if("object"!=Ft(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ft(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}It._withStripped=!0;const Vt=i({name:"JhWaterMark",props:{content:{type:[String,Array],default:""},image:{type:String,default:""},width:{type:Number,default:120},height:{type:Number,default:64},rotate:{type:Number,default:-22},gapX:{type:Number,default:212},gapY:{type:Number,default:222},offsetX:{type:Number,default:void 0},offsetY:{type:Number,default:void 0},font:{type:Object,default:function(){return{}}},zIndex:{type:Number,default:9},getContainer:{type:Function,default:void 0}},data:function(){return{watermarkUrl:"",observer:null}},computed:{containerStyle:function(){return{position:"relative"}},mergedFont:function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$t(Object(n),!0).forEach(function(e){Rt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({color:"rgba(0, 0, 0, 0.15)",fontSize:16,fontWeight:"normal",fontFamily:"sans-serif",fontStyle:"normal",textAlign:"center"},this.font)},actualOffsetX:function(){return void 0!==this.offsetX?this.offsetX:this.gapX/2},actualOffsetY:function(){return void 0!==this.offsetY?this.offsetY:this.gapY/2}},watch:{content:{handler:function(){this.renderWatermark()},deep:!0},image:function(){this.renderWatermark()},width:function(){this.renderWatermark()},height:function(){this.renderWatermark()},rotate:function(){this.renderWatermark()},gapX:function(){this.renderWatermark()},gapY:function(){this.renderWatermark()},offsetX:function(){this.renderWatermark()},offsetY:function(){this.renderWatermark()},font:{handler:function(){this.renderWatermark()},deep:!0}},mounted:function(){this.renderWatermark(),this.observeWatermark()},beforeDestroy:function(){this.destroyWatermark(),this.observer&&this.observer.disconnect()},methods:{renderWatermark:function(){var t,e=this;return(t=Tt().m(function t(){var n,i,r,a;return Tt().w(function(t){for(;;)switch(t.n){case 0:if(n=document.createElement("canvas"),i=n.getContext("2d"),r=2*(e.width+e.gapX),a=2*(e.height+e.gapY),n.width=r,n.height=a,!e.image){t.n=2;break}return t.n=1,e.drawImageWatermark(i,r,a);case 1:t.n=3;break;case 2:e.content&&e.drawTextWatermark(i,r,a);case 3:e.watermarkUrl=n.toDataURL(),e.updateWatermarkElement();case 4:return t.a(2)}},t)}),function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){Bt(a,i,r,o,l,"next",t)}function l(t){Bt(a,i,r,o,l,"throw",t)}o(void 0)})})()},drawImageWatermark:function(t,e,n){var i=this;return new Promise(function(r,a){var o=new Image;o.crossOrigin="anonymous",o.referrerPolicy="no-referrer",o.onload=function(){t.save();var a=e/2,l=n/2;t.translate(a,l),t.rotate(Math.PI/180*i.rotate),t.drawImage(o,-i.width/2,-i.height/2,i.width,i.height),t.restore(),r()},o.onerror=function(){console.error("Watermark image load failed"),a()},o.src=i.image})},drawTextWatermark:function(t,e,n){var i=this.mergedFont,r=i.color,a=i.fontSize,o=i.fontWeight,l=i.fontFamily,s=i.fontStyle,c=i.textAlign;t.save(),t.font="".concat(s," ").concat(o," ").concat(a,"px ").concat(l),t.fillStyle=r,t.textAlign=c,t.textBaseline="middle";var u=e/2,d=n/2;t.translate(u,d),t.rotate(Math.PI/180*this.rotate);var f=Array.isArray(this.content)?this.content:[this.content],h=1.5*a,p=-f.length*h/2+h/2;f.forEach(function(e,n){var i=p+n*h;t.fillText(e,0,i)}),t.restore()},updateWatermarkElement:function(){this.destroyWatermark();var t=this.getContainer?this.getContainer():this.$el;if(t){var e=document.createElement("div");e.className="jh-watermark-layer",e.style.cssText="\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n z-index: ".concat(this.zIndex,";\n background-image: url(").concat(this.watermarkUrl,");\n background-repeat: repeat;\n background-position: ").concat(this.actualOffsetX,"px ").concat(this.actualOffsetY,"px;\n overflow: hidden;\n "),e.setAttribute("data-watermark","true"),t.appendChild(e),this.watermarkElement=e}},destroyWatermark:function(){this.watermarkElement&&this.watermarkElement.parentNode&&(this.watermarkElement.parentNode.removeChild(this.watermarkElement),this.watermarkElement=null)},observeWatermark:function(){var t=this;window.MutationObserver&&(this.observer=new MutationObserver(function(e){e.forEach(function(e){"childList"===e.type?Array.from(e.removedNodes).some(function(e){return e===t.watermarkElement})&&t.updateWatermarkElement():"attributes"===e.type&&e.target===t.watermarkElement&&t.updateWatermarkElement()})}),this.observer.observe(this.$el,{childList:!0,attributes:!0,subtree:!0}))}}},It,[],!1,null,"44935ffe",null).exports;var Nt=function(){var t=this,e=t._self._c;return e("v-overlay",{attrs:{value:t.value,opacity:t.opacity,color:t.color,"z-index":t.zIndex},on:{click:t.handleClick}},[t._t("default",function(){return[t.showLoading?e("v-progress-circular",{attrs:{size:t.loadingSize,width:t.loadingWidth,color:t.loadingColor,indeterminate:""}}):t._e()]})],2)};Nt._withStripped=!0;const Mt=i({name:"JhMask",props:{value:{type:Boolean,default:!1},color:{type:String,default:"#e3e3e3"},opacity:{type:[Number,String],default:.8,validator:function(t){var e=parseFloat(t);return e>=0&&e<=1}},zIndex:{type:[Number,String],default:300},showLoading:{type:Boolean,default:!1},loadingSize:{type:[Number,String],default:64},loadingWidth:{type:[Number,String],default:7},loadingColor:{type:String,default:"primary"},closeOnClick:{type:Boolean,default:!1},timeout:{type:Number,default:0}},data:function(){return{timer:null}},watch:{value:function(t){t&&this.timeout>0?this.startTimer():t||this.clearTimer()}},beforeDestroy:function(){this.clearTimer()},methods:{handleClick:function(){this.closeOnClick&&(this.$emit("input",!1),this.$emit("click"))},startTimer:function(){var t=this;this.clearTimer(),this.timer=setTimeout(function(){t.$emit("input",!1),t.$emit("timeout")},this.timeout)},clearTimer:function(){this.timer&&(clearTimeout(this.timer),this.timer=null)}}},Nt,[],!1,null,"79554ce9",null).exports;var Et=function(){var t=this,e=t._self._c;return e("v-snackbar",{class:["jh-toast","jh-toast--".concat(t.type)],attrs:{color:t.currentColor,timeout:t.currentTimeout,top:t.position.includes("top"),bottom:t.position.includes("bottom"),left:t.position.includes("left"),right:t.position.includes("right"),vertical:t.vertical,elevation:t.elevation},on:{input:t.handleInput},scopedSlots:t._u([{key:"action",fn:function(n){var i=n.attrs;return[t.showCloseButton?e("v-btn",t._b({attrs:{color:t.closeButtonColor,text:"",small:""},on:{click:t.close}},"v-btn",i,!1),[t._v("\n "+t._s(t.closeButtonText)+"\n ")]):t._e(),t._v(" "),t.actionText?e("v-btn",t._b({attrs:{color:t.actionButtonColor,text:"",small:""},on:{click:t.handleAction}},"v-btn",i,!1),[t._v("\n "+t._s(t.actionText)+"\n ")]):t._e()]}}]),model:{value:t.isVisible,callback:function(e){t.isVisible=e},expression:"isVisible"}},[e("div",{staticClass:"jh-toast__content"},["loading"===t.type?e("v-progress-circular",{staticClass:"jh-toast__icon",attrs:{size:18,width:3,color:"white",indeterminate:""}}):t.currentIcon?e("v-icon",{staticClass:"jh-toast__icon",attrs:{color:t.iconColor}},[t._v("\n "+t._s(t.currentIcon)+"\n ")]):t._e(),t._v(" "),e("span",{staticClass:"jh-toast__message"},[t._v(t._s(t.currentMessage))])],1)])};Et._withStripped=!0;const Lt=i({name:"JhToast",props:{value:{type:Boolean,default:!1},message:{type:String,default:""},type:{type:String,default:"success",validator:function(t){return["success","error","warning","info","loading"].includes(t)}},position:{type:String,default:"top",validator:function(t){return["top","bottom","top-left","top-right","bottom-left","bottom-right"].includes(t)}},timeout:{type:Number,default:3e3},color:{type:String,default:""},icon:{type:String,default:""},iconColor:{type:String,default:"white"},showCloseButton:{type:Boolean,default:!0},closeButtonText:{type:String,default:"关闭"},closeButtonColor:{type:String,default:"white"},actionText:{type:String,default:""},actionButtonColor:{type:String,default:"white"},vertical:{type:Boolean,default:!1},elevation:{type:[Number,String],default:24},maxLength:{type:Number,default:100}},data:function(){return{isVisible:!1}},computed:{currentMessage:function(){var t=this.message||"";return t.length>this.maxLength&&(t=t.substring(0,this.maxLength)+"..."),t},currentColor:function(){return this.color?this.color:{success:"success",error:"error",warning:"warning",info:"info",loading:"primary"}[this.type]||"success"},currentIcon:function(){return this.icon?this.icon:"loading"===this.type?"":{success:"mdi-check-circle",error:"mdi-alert-circle",warning:"mdi-alert",info:"mdi-information"}[this.type]||"mdi-check-circle"},currentTimeout:function(){return"loading"===this.type?-1:this.timeout}},watch:{value:function(t){this.isVisible=t},isVisible:function(t){t||this.$emit("input",!1)}},mounted:function(){this.isVisible=this.value},methods:{handleInput:function(t){this.$emit("input",t),t||this.$emit("close")},close:function(){this.isVisible=!1},handleAction:function(){this.$emit("action")}}},Et,[],!1,null,"0da7bef5",null).exports;var zt=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{"max-width":t.maxWidth,persistent:t.persistent},on:{"click:outside":t.handleClickOutside},model:{value:t.isVisible,callback:function(e){t.isVisible=e},expression:"isVisible"}},[e("v-card",[t.title||t.$slots.title?e("v-card-title",[t._t("title",function(){return[t._v(t._s(t.title))]})],2):t._e(),t._v(" "),t.content||t.$slots.default?e("v-card-text",{class:t.contentClass},[t._t("default",function(){return[e("div",{domProps:{innerHTML:t._s(t.content)}})]})],2):t._e(),t._v(" "),e("v-card-actions",[e("v-spacer"),t._v(" "),t.showCancelButton?e("v-btn",{attrs:{color:t.cancelButtonColor,text:""!==t.cancelButtonText,disabled:t.loading},on:{click:t.handleCancel}},[t._v("\n "+t._s(t.cancelButtonText||"取消")+"\n ")]):t._e(),t._v(" "),e("v-btn",{attrs:{color:t.confirmButtonColor,text:""!==t.confirmButtonText,loading:t.loading},on:{click:t.handleConfirm}},[t._v("\n "+t._s(t.confirmButtonText||"确定")+"\n ")])],1)],1)],1)};function Kt(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return Jt(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(Jt(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Jt(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,Jt(d,"constructor",c),Jt(c,"constructor",s),s.displayName="GeneratorFunction",Jt(c,r,"GeneratorFunction"),Jt(d),Jt(d,r,"Generator"),Jt(d,i,function(){return this}),Jt(d,"toString",function(){return"[object Generator]"}),(Kt=function(){return{w:a,m:f}})()}function Jt(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}Jt=function(t,e,n,i){function a(e,n){Jt(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},Jt(t,e,n,i)}function Gt(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function Wt(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){Gt(a,i,r,o,l,"next",t)}function l(t){Gt(a,i,r,o,l,"throw",t)}o(void 0)})}}zt._withStripped=!0;const Ut=i({name:"JhConfirmDialog",props:{value:{type:Boolean,default:!1},title:{type:String,default:"提示"},content:{type:String,default:""},contentClass:{type:String,default:"pa-6 text-pre-line"},maxWidth:{type:[String,Number],default:420},showCancelButton:{type:Boolean,default:!0},confirmButtonText:{type:String,default:"确定"},cancelButtonText:{type:String,default:"取消"},confirmButtonColor:{type:String,default:"primary"},cancelButtonColor:{type:String,default:"default"},persistent:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},beforeConfirm:{type:Function,default:null},beforeCancel:{type:Function,default:null}},data:function(){return{isVisible:!1}},watch:{value:function(t){this.isVisible=t},isVisible:function(t){t!==this.value&&this.$emit("input",t)}},mounted:function(){this.isVisible=this.value},methods:{handleConfirm:function(){var t=this;return Wt(Kt().m(function e(){return Kt().w(function(e){for(;;)switch(e.n){case 0:if(!t.beforeConfirm){e.n=2;break}return e.n=1,t.beforeConfirm();case 1:if(!1!==e.v){e.n=2;break}return e.a(2);case 2:t.$emit("confirm"),t.loading||t.close();case 3:return e.a(2)}},e)}))()},handleCancel:function(){var t=this;return Wt(Kt().m(function e(){return Kt().w(function(e){for(;;)switch(e.n){case 0:if(!t.beforeCancel){e.n=2;break}return e.n=1,t.beforeCancel();case 1:if(!1!==e.v){e.n=2;break}return e.a(2);case 2:t.$emit("cancel"),t.close();case 3:return e.a(2)}},e)}))()},handleClickOutside:function(){this.persistent||(this.$emit("click-outside"),this.$emit("cancel"))},close:function(){this.isVisible=!1},open:function(){this.isVisible=!0}}},zt,[],!1,null,"4d697b30",null).exports;var qt=function(){var t=this,e=t._self._c;return e("v-form",t._g(t._b({ref:t.formRef,class:t.formClasses,attrs:{"lazy-validation":t.lazyValidation}},"v-form",t.mergedFormProps,!1),t.formListeners),[e("jh-form-fields",{attrs:{fields:t.normalizedFields,layout:t.internalLayout,"show-labels":t.showLabels,"label-width":t.labelWidth,"label-align":t.labelAlign,"show-required-mark":t.showRequiredMark,readonly:t.readonly,disabled:t.disabled,"default-dense":t.defaultDense,"default-filled":t.defaultFilled,"default-outlined":t.defaultOutlined,"default-single-line":t.defaultSingleLine,"default-cols-md":t.defaultColsMd,"hide-details":t.hideDetails,"label-class":t.labelClass,"input-class":t.inputClass,"row-class":t.rowClass,"validation-rules":t.validationRules,"row-props":t.gridRowProps},on:{"field-input":t.handleFieldInput,"field-change":t.handleFieldChange,"field-blur":t.handleFieldBlur},scopedSlots:t._u([t._l(t.slotFields,function(e){return{key:"field-".concat(e.key),fn:function(n){return[t._t("field-".concat(e.key),null,null,n)]}}})],null,!0),model:{value:t.formData,callback:function(e){t.formData=e},expression:"formData"}}),t._v(" "),t.isGridLayout?[e("v-row",t._b({staticClass:"jh-form-grid-actions-row"},"v-row",t.rowProps,!1),[e("v-col",{staticClass:"jh-form-actions-col",attrs:{cols:"12"}},[t._t("actions",null,{formData:t.formData,validate:t.validate,resetForm:t.resetForm})],2)],1)]:[t._t("actions",null,{formData:t.formData,validate:t.validate,resetForm:t.resetForm})]],2)};qt._withStripped=!0;var Ht=["class","style"];function Yt(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return Xt(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(Xt(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Xt(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,Xt(d,"constructor",c),Xt(c,"constructor",s),s.displayName="GeneratorFunction",Xt(c,r,"GeneratorFunction"),Xt(d),Xt(d,r,"Generator"),Xt(d,i,function(){return this}),Xt(d,"toString",function(){return"[object Generator]"}),(Yt=function(){return{w:a,m:f}})()}function Xt(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}Xt=function(t,e,n,i){function a(e,n){Xt(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},Xt(t,e,n,i)}function Zt(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function Qt(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){Zt(a,i,r,o,l,"next",t)}function l(t){Zt(a,i,r,o,l,"throw",t)}o(void 0)})}}function te(t){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},te(t)}function ee(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function ne(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ee(Object(n),!0).forEach(function(e){ie(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ie(t,e,n){return(e=function(t){var e=function(t){if("object"!=te(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==te(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const re=i({name:"JhForm",inheritAttrs:!1,components:{JhFormFields:k},props:{fields:{type:Array,default:function(){return[]}},initialData:{type:Object,default:function(){return{}}},formRef:{type:String,default:"jhForm"},lazyValidation:{type:Boolean,default:!0},layout:{type:String,default:"vertical",validator:function(t){return["horizontal","vertical","inline","grid"].includes(t)}},showLabels:{type:Boolean,default:!0},labelPosition:{type:String,default:"top",validator:function(t){return["top","left"].includes(t)}},labelWidth:{type:[Number,String],default:"auto"},labelAlign:{type:String,default:"right",validator:function(t){return["left","right","center"].includes(t)}},showRequiredMark:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},defaultDense:{type:Boolean,default:!0},defaultFilled:{type:Boolean,default:!0},defaultOutlined:{type:Boolean,default:!1},defaultSingleLine:{type:Boolean,default:!0},defaultColsMd:{type:Number,default:6},hideDetails:{type:[Boolean,String],default:!1},labelClass:{type:String,default:"jh-input-label"},inputClass:{type:String,default:"jh-v-input"},rowClass:{type:String,default:""},validationRules:{type:Object,default:function(){return{require:[function(t){return!!t||"必填"}],email:[function(t){return!t||/.+@.+\..+/.test(t)||"邮箱格式不正确"}],phone:[function(t){return!t||/^1[3-9]\d{9}$/.test(t)||"手机号格式不正确"}],number:[function(t){return!t||!isNaN(t)||"请输入数字"}],integer:[function(t){return!t||Number.isInteger(Number(t))||"请输入整数"}]}}},submitter:{type:[Object,Boolean],default:void 0},onFinish:{type:Function,default:void 0},onFinishFailed:{type:Function,default:void 0},dateFormatter:{type:[String,Function,Boolean],default:"YYYY-MM-DD"},omitNil:{type:Boolean,default:!0},grid:{type:Boolean,default:!1},colProps:{type:Object,default:function(){return{}}},rowProps:{type:Object,default:function(){return{}}}},data:function(){return{formData:{}}},computed:{formClasses:function(){return ie(ie(ie({"jh-form":!0},"jh-form--".concat(this.layout),!0),"jh-form--readonly",this.readonly),"jh-form--disabled",this.disabled)},isGridLayout:function(){return this.grid||"grid"===this.layout},normalizedFields:function(){var t=this;return this.isGridLayout?this.fields.map(function(e){if("group"===e.type)return ne({},e);var n=t.getColBindings(e),i={};if(void 0!==n.cols&&(i.xs=n.cols),void 0!==n.sm&&(i.sm=n.sm),void 0!==n.md&&(i.md=n.md),void 0!==n.lg&&(i.lg=n.lg),void 0!==n.xl&&(i.xl=n.xl),!Object.keys(i).length)return ne({},e);var r=e.cols&&"object"===te(e.cols)?e.cols:{};return ne(ne({},e),{},{cols:ne(ne({},r),i)})}):this.fields},internalLayout:function(){return this.isGridLayout?"vertical":this.layout},slotFields:function(){return this.fields.filter(function(t){return"slot"===t.type})},gridRowProps:function(){return this.isGridLayout&&this.rowProps||{}},mergedFormProps:function(){var t=["class","style","lazy-validation","lazyValidation","fields","initialData","formRef","layout","showLabels","labelPosition","labelWidth","labelAlign","showRequiredMark","readonly","disabled","defaultDense","defaultFilled","defaultOutlined","defaultSingleLine","defaultColsMd","hideDetails","labelClass","inputClass","rowClass","validationRules","submitter","onFinish","onFinishFailed","dateFormatter","omitNil","grid","colProps","rowProps"],e=this.$attrs||{},n=(e.class,e.style,function(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}(e,Ht)),i={};return Object.keys(n).forEach(function(e){var r=e.replace(/([A-Z])/g,"-$1").toLowerCase();t.includes(e)||t.includes(r)||(i[e]=n[e])}),i},formListeners:function(){var t=["submit","reset","validate","input","change","blur","field-change"],e=ne({},this.$listeners||{}),n={};return Object.keys(e).forEach(function(i){t.includes(i)||(n[i]=e[i])}),n}},watch:{initialData:{handler:function(t){this.formData=ne({},t)},immediate:!0,deep:!0}},mounted:function(){this.initFormData()},methods:{initFormData:function(){var t=ne({},this.initialData);this.fields.forEach(function(e){void 0!==e.defaultValue&&void 0===t[e.key]&&(t[e.key]=e.defaultValue)}),this.formData=t},getColBindings:function(t){var e=ne(ne({},this.colProps||{}),t.colProps||{});t.cols&&("object"===te(t.cols)?Object.assign(e,t.cols):e.cols=t.cols);var n=void 0!==t.colSpan?t.colSpan:e.span,i=void 0!==n?this.mapGridSpan(n):null;return null===i||"cols"in e||"sm"in e||"md"in e||"lg"in e||"xl"in e||(e.md=i),delete e.span,"cols"in e||"sm"in e||"md"in e||"lg"in e||"xl"in e||(e.md=this.mapGridSpan(this.colProps.span||8)),e},mapGridSpan:function(t){var e=Number(t)||0,n=Math.round(e/24*12);return Math.max(1,Math.min(12,n||1))},handleFieldInput:function(t){var e=t.key,n=t.value;this.$emit("input",e,n,this.formData),this.$emit("field-change",{key:e,value:n,formData:this.formData})},handleFieldChange:function(t){var e=t.key,n=t.value;this.$emit("change",e,n,this.formData),this.$emit("field-change",{key:e,value:n,formData:this.formData})},handleFieldBlur:function(t){var e=t.key,n=t.value;this.$emit("blur",e,n,this.formData)},updateField:function(t,e){this.$set(this.formData,t,e),this.handleFieldChange({key:t,value:e})},getForm:function(){return this.$refs[this.formRef]},getFormData:function(){return ne({},this.formData)},setFieldsValue:function(t){this.formData=ne(ne({},this.formData),t)},setFieldValue:function(t,e){this.$set(this.formData,t,e)},reset:function(){var t=this.$refs[this.formRef];t&&t.reset(),this.initFormData(),this.$emit("reset",this.formData)},resetForm:function(){this.reset()},resetValidation:function(){var t=this.$refs[this.formRef];t&&t.resetValidation()},validate:function(){var t=this;return Qt(Yt().m(function e(){var n,i;return Yt().w(function(e){for(;;)switch(e.n){case 0:if(!(n=t.$refs[t.formRef])){e.n=2;break}return e.n=1,n.validate();case 1:return i=e.v,t.$emit("validate",i,t.formData),e.a(2,i);case 2:return e.a(2,!0)}},e)}))()},validateField:function(t){var e=this;return Qt(Yt().m(function n(){var i,r;return Yt().w(function(n){for(;;)switch(n.n){case 0:if(!((i=e.$refs[e.formRef])&&i.$refs&&i.$refs[t])){n.n=2;break}if(!(r=i.$refs[t])||"function"!=typeof r.validate){n.n=2;break}return n.n=1,r.validate();case 1:return n.a(2,n.v);case 2:return n.a(2,!0)}},n)}))()},submit:function(){var t=this;return Qt(Yt().m(function e(){var n,i,r;return Yt().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.n=1,t.validate();case 1:if(!(n=e.v)){e.n=6;break}if(i=t.getTransformedData(),t.$emit("submit",i),!t.onFinish){e.n=5;break}return e.p=2,e.n=3,t.onFinish(i);case 3:e.n=5;break;case 4:e.p=4,r=e.v,console.error("Form submit error:",r);case 5:e.n=7;break;case 6:t.onFinishFailed&&t.onFinishFailed(t.formData);case 7:return e.a(2,n)}},e,null,[[2,4]])}))()},getTransformedData:function(){var t=ne({},this.formData);return this.fields.forEach(function(e){e.key&&e.transform&&"function"==typeof e.transform&&(t[e.key]=e.transform(t[e.key],t))}),this.omitNil&&Object.keys(t).forEach(function(e){null!==t[e]&&void 0!==t[e]&&""!==t[e]||delete t[e]}),t},getDependenciesValues:function(t){var e=this;return t&&Array.isArray(t)?t.map(function(t){return e.formData[t]}):[]},checkDependenciesChanged:function(t,e,n){if(!t.dependencies)return!1;for(var i=0;i<t.dependencies.length;i++)if(e[i]!==n[i])return!0;return!1}}},qt,[],!1,null,"0a365969",null).exports;var ae=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{"max-width":t.width,persistent:t.persistent,fullscreen:t.fullscreen},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.handleCancel.apply(null,arguments)}},model:{value:t.isShownInternal,callback:function(e){t.isShownInternal=e},expression:"isShownInternal"}},[e("v-card",[e("v-card-title",{staticClass:"d-flex align-center justify-space-between pa-4"},[e("span",{staticClass:"text-h6"},[t._v(t._s(t.title))]),t._v(" "),t.closable?e("v-btn",{attrs:{icon:"",small:""},on:{click:t.handleCancel}},[e("v-icon",[t._v("mdi-close")])],1):t._e()],1),t._v(" "),e("v-divider"),t._v(" "),e("v-card-text",{staticClass:"pa-6"},[t._t("content",function(){return[e("jh-form",{ref:"jhForm",attrs:{"form-ref":t.formRef,fields:t.fields,"initial-data":t.initialData,"validation-rules":t.validationRules,"default-cols-md":6},on:{"field-change":t.handleFieldChange},scopedSlots:t._u([t._l(t.slotFields,function(e){return{key:"field-".concat(e.key),fn:function(n){return[t._t("field-".concat(e.key),null,null,n)]}}})],null,!0)})]})],2),t._v(" "),e("v-divider"),t._v(" "),e("v-card-actions",{staticClass:"pa-4"},[e("v-spacer"),t._v(" "),e("v-btn",{attrs:{text:""},on:{click:t.handleCancel}},[t._v("\n "+t._s(t.cancelText)+"\n ")]),t._v(" "),t.showConfirmButton?e("v-btn",{attrs:{color:"success"},on:{click:t.handleConfirm}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()],1)],1)],1)};function oe(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return le(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(le(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,le(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,le(d,"constructor",c),le(c,"constructor",s),s.displayName="GeneratorFunction",le(c,r,"GeneratorFunction"),le(d),le(d,r,"Generator"),le(d,i,function(){return this}),le(d,"toString",function(){return"[object Generator]"}),(oe=function(){return{w:a,m:f}})()}function le(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}le=function(t,e,n,i){function a(e,n){le(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},le(t,e,n,i)}function se(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function ce(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){se(a,i,r,o,l,"next",t)}function l(t){se(a,i,r,o,l,"throw",t)}o(void 0)})}}ae._withStripped=!0;const ue=i({name:"JhModalForm",components:{JhForm:re},props:{value:{type:Boolean,default:!1},title:{type:String,default:"表单"},fields:{type:Array,default:function(){return[]}},initialData:{type:Object,default:function(){return{}}},width:{type:[Number,String],default:600},fullscreen:{type:Boolean,default:!1},persistent:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},showConfirmButton:{type:Boolean,default:!0},confirmText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"},formRef:{type:String,default:"modalForm"},validateBeforeConfirm:{type:Boolean,default:!0},validationRules:{type:Object,default:function(){return{require:[function(t){return!!t||"必填"}],email:[function(t){return!t||/.+@.+\..+/.test(t)||"邮箱格式不正确"}],phone:[function(t){return!t||/^1[3-9]\d{9}$/.test(t)||"手机号格式不正确"}],number:[function(t){return!t||!isNaN(t)||"请输入数字"}],integer:[function(t){return!t||Number.isInteger(Number(t))||"请输入整数"}]}}}},data:function(){return{isShownInternal:this.value}},computed:{slotFields:function(){return this.fields.filter(function(t){return"slot"===t.type})}},watch:{value:function(t){var e=this;this.isShownInternal=t,t&&this.$nextTick(function(){e.resetForm()})},isShownInternal:function(t){t||(this.$emit("input",!1),this.$emit("close"))}},methods:{handleCancel:function(){this.$emit("cancel"),this.isShownInternal=!1},handleConfirm:function(){var t=this;return ce(oe().m(function e(){return oe().w(function(e){for(;;)switch(e.n){case 0:if(!t.validateBeforeConfirm){e.n=2;break}return e.n=1,t.validate();case 1:if(e.v){e.n=2;break}return e.a(2);case 2:t.$emit("confirm",t.getFormData());case 3:return e.a(2)}},e)}))()},handleFieldChange:function(t){this.$emit("field-change",t)},getJhForm:function(){return this.$refs.jhForm},getForm:function(){var t=this.getJhForm();return t?t.getForm():null},getFormData:function(){var t=this.getJhForm();return t?t.getFormData():{}},setFieldsValue:function(t){var e=this.getJhForm();e&&e.setFieldsValue(t)},setFieldValue:function(t,e){var n=this.getJhForm();n&&n.setFieldValue(t,e)},resetForm:function(){var t=this.getJhForm();t&&t.resetForm()},resetValidation:function(){var t=this.getJhForm();t&&t.resetValidation()},validate:function(){var t=this;return ce(oe().m(function e(){var n;return oe().w(function(e){for(;;)switch(e.n){case 0:if(!(n=t.getJhForm())){e.n=2;break}return e.n=1,n.validate();case 1:return e.a(2,e.v);case 2:return e.a(2,!0)}},e)}))()}}},ae,[],!1,null,"9ad4133c",null).exports;var de=function(){var t=this,e=t._self._c;return e("v-navigation-drawer",{staticClass:"elevation-24",attrs:{fixed:"",temporary:"",right:"right"===t.position,left:"left"===t.position,width:t.width},model:{value:t.isShownInternal,callback:function(e){t.isShownInternal=e},expression:"isShownInternal"}},[e("v-row",{staticClass:"jh-drawer-header px-4 bg-white",attrs:{"no-gutters":"",align:"center"}},[e("span",{staticClass:"text-h7 font-weight-bold py-4"},[t._v(t._s(t.title))]),t._v(" "),e("v-spacer"),t._v(" "),e("div",{staticClass:"jh-drawer-action-btn-group"},[e("v-btn",{staticClass:"elevation-0 grey lighten-4",attrs:{small:""},on:{click:t.handleCancel}},[t._v("\n "+t._s(t.cancelText)+"\n ")]),t._v(" "),t._t("actions",function(){return[t.showConfirmButton?e("v-btn",{staticClass:"ml-2",attrs:{color:"success",small:""},on:{click:t.handleConfirm}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()]})],2)],1),t._v(" "),e("v-divider",{staticClass:"jh-divider"}),t._v(" "),e("div",{staticClass:"px-4 pb-4"},[t._t("content",function(){return[e("jh-form",{ref:"jhForm",attrs:{"form-ref":t.formRef,fields:t.fields,"initial-data":t.initialData,"validation-rules":t.validationRules,"default-cols-md":3,"row-class":t.rowClass},on:{"field-change":t.handleFieldChange},scopedSlots:t._u([t._l(t.slotFields,function(e){return{key:"field-".concat(e.key),fn:function(n){return[t._t("field-".concat(e.key),null,null,n)]}}})],null,!0)})]})],2),t._v(" "),e("v-btn",{staticClass:"drawer-close-float-btn",attrs:{elevation:"0",color:"success",fab:"",absolute:"",top:"",left:"",small:"",tile:""},on:{click:t.handleCancel}},[e("v-icon",[t._v("mdi-close")])],1)],1)};function fe(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return he(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(he(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,he(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,he(d,"constructor",c),he(c,"constructor",s),s.displayName="GeneratorFunction",he(c,r,"GeneratorFunction"),he(d),he(d,r,"Generator"),he(d,i,function(){return this}),he(d,"toString",function(){return"[object Generator]"}),(fe=function(){return{w:a,m:f}})()}function he(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}he=function(t,e,n,i){function a(e,n){he(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},he(t,e,n,i)}function pe(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function ve(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){pe(a,i,r,o,l,"next",t)}function l(t){pe(a,i,r,o,l,"throw",t)}o(void 0)})}}de._withStripped=!0;const me=i({name:"JhDrawerForm",components:{JhForm:re},props:{value:{type:Boolean,default:!1},title:{type:String,default:"表单"},position:{type:String,default:"right",validator:function(t){return["left","right"].includes(t)}},width:{type:String,default:"90%"},showConfirmButton:{type:Boolean,default:!0},confirmText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"},formRef:{type:String,default:"drawerForm"},validateBeforeConfirm:{type:Boolean,default:!0},fields:{type:Array,default:function(){return[]}},initialData:{type:Object,default:function(){return{}}},rowClass:{type:String,default:"mt-0"},validationRules:{type:Object,default:function(){return{require:[function(t){return!!t||"必填"}],email:[function(t){return!t||/.+@.+\..+/.test(t)||"邮箱格式不正确"}],phone:[function(t){return!t||/^1[3-9]\d{9}$/.test(t)||"手机号格式不正确"}],number:[function(t){return!t||!isNaN(t)||"请输入数字"}],integer:[function(t){return!t||Number.isInteger(Number(t))||"请输入整数"}]}}}},data:function(){return{isShownInternal:this.value}},computed:{slotFields:function(){return this.fields.filter(function(t){return"slot"===t.type})}},watch:{value:function(t){var e=this;this.isShownInternal=t,t&&this.$nextTick(function(){e.resetForm()})},isShownInternal:function(t){t||(this.$emit("input",!1),this.$emit("close"))}},methods:{handleCancel:function(){this.$emit("cancel"),this.isShownInternal=!1},handleConfirm:function(){var t=this;return ve(fe().m(function e(){return fe().w(function(e){for(;;)switch(e.n){case 0:if(!t.validateBeforeConfirm){e.n=2;break}return e.n=1,t.validate();case 1:if(e.v){e.n=2;break}return e.a(2);case 2:t.$emit("confirm",t.getFormData());case 3:return e.a(2)}},e)}))()},handleFieldChange:function(t){this.$emit("field-change",t)},getJhForm:function(){return this.$refs.jhForm},getForm:function(){var t=this.getJhForm();return t?t.getForm():null},getFormData:function(){var t=this.getJhForm();return t?t.getFormData():{}},setFieldsValue:function(t){var e=this.getJhForm();e&&e.setFieldsValue(t)},setFieldValue:function(t,e){var n=this.getJhForm();n&&n.setFieldValue(t,e)},resetForm:function(){var t=this.getJhForm();t&&t.resetForm()},resetValidation:function(){var t=this.getJhForm();t&&t.resetValidation()},validate:function(){var t=this;return ve(fe().m(function e(){var n;return fe().w(function(e){for(;;)switch(e.n){case 0:if(!(n=t.getJhForm())){e.n=2;break}return e.n=1,n.validate();case 1:return e.a(2,e.v);case 2:return e.a(2,!0)}},e)}))()}}},de,[],!1,null,"7a237adf",null).exports;var ye=function(){var t=this,e=t._self._c;return e("v-dialog",t._g(t._b({attrs:{"max-width":t.width,persistent:t.persistent,fullscreen:t.fullscreen},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.handleCancel.apply(null,arguments)}},model:{value:t.isShownInternal,callback:function(e){t.isShownInternal=e},expression:"isShownInternal"}},"v-dialog",t.mergedDialogProps,!1),t.dialogListeners),[e("v-card",[e("v-card-title",{staticClass:"d-flex align-center justify-space-between pa-4 sticky top-0 z-10 bg-white darken-1"},[e("span",{staticClass:"text-h6"},[t._v(t._s(t.title))]),t._v(" "),t.closable?e("v-btn",{attrs:{icon:"",small:""},on:{click:t.handleCancel}},[e("v-icon",[t._v("mdi-close")])],1):t._e()],1),t._v(" "),e("v-divider"),t._v(" "),e("v-card-text",{staticClass:"pa-6"},[t._t("default")],2),t._v(" "),t.showActions?[e("v-divider"),t._v(" "),e("v-card-actions",{staticClass:"pa-4"},[t._t("actions",function(){return[e("v-spacer"),t._v(" "),t.showCancelButton?e("v-btn",{attrs:{text:""},on:{click:t.handleCancel}},[t._v("\n "+t._s(t.cancelText)+"\n ")]):t._e(),t._v(" "),t.showConfirmButton?e("v-btn",{attrs:{color:"success"},on:{click:t.handleConfirm}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()]})],2)]:t._e()],2)],1)};function be(t){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},be(t)}ye._withStripped=!0;var ge=["class","style"];function _e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function we(t,e,n){return(e=function(t){var e=function(t){if("object"!=be(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==be(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Se=i({name:"JhModal",inheritAttrs:!1,props:{value:{type:Boolean,default:!1},title:{type:String,default:"弹窗"},width:{type:[Number,String],default:600},fullscreen:{type:Boolean,default:!1},persistent:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},showActions:{type:Boolean,default:!0},showConfirmButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},confirmText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"}},data:function(){return{isShownInternal:this.value}},computed:{mergedDialogProps:function(){var t=["class","style","value","modelValue","max-width","maxWidth","persistent","fullscreen","title","width","closable","showActions","showConfirmButton","showCancelButton","confirmText","cancelText"],e=this.$attrs||{},n=(e.class,e.style,function(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}(e,ge)),i={};return Object.keys(n).forEach(function(e){var r=e.replace(/([A-Z])/g,"-$1").toLowerCase();t.includes(e)||t.includes(r)||(i[e]=n[e])}),i},dialogListeners:function(){var t=["open","close","confirm","cancel"],e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_e(Object(n),!0).forEach(function(e){we(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},this.$listeners||{}),n={};return Object.keys(e).forEach(function(i){t.includes(i)||(n[i]=e[i])}),n}},watch:{value:function(t){this.isShownInternal=t,t&&this.$emit("open")},isShownInternal:function(t){t||(this.$emit("input",!1),this.$emit("close"))}},methods:{handleCancel:function(){this.$emit("cancel"),this.isShownInternal=!1},handleConfirm:function(){this.$emit("confirm")},open:function(){this.isShownInternal=!0},close:function(){this.isShownInternal=!1}}},ye,[],!1,null,"b71c0556",null).exports;var Ce=function(){var t=this,e=t._self._c;return e("v-navigation-drawer",t._g(t._b({class:t.drawerClasses,style:t.drawerStyles,attrs:{permanent:t.isShownInternal,fixed:"",temporary:"",right:"right"===t.position,left:"left"===t.position,bottom:t.isBottomPosition,width:t.drawerWidth,height:t.drawerHeight},model:{value:t.isShownInternal,callback:function(e){t.isShownInternal=e},expression:"isShownInternal"}},"v-navigation-drawer",t.mergedDrawerProps,!1),t.drawerListeners),[t.title?e("v-row",{staticClass:"jh-drawer-header px-4 bg-white sticky top-0 z-10",attrs:{"no-gutters":"",align:"center"}},[e("span",{staticClass:"text-h7 font-weight-bold py-4"},[t._v(t._s(t.title))]),t._v(" "),e("v-spacer"),t._v(" "),e("div",{staticClass:"jh-drawer-action-btn-group"},[t._t("actions",function(){return[t.showCancelButton?e("v-btn",{staticClass:"elevation-0 grey lighten-4",attrs:{small:""},on:{click:t.handleCancel}},[t._v("\n "+t._s(t.cancelText)+"\n ")]):t._e(),t._v(" "),t.showConfirmButton?e("v-btn",{staticClass:"ml-2",attrs:{color:"success",small:""},on:{click:t.handleConfirm}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()]})],2)],1):t._e(),t._v(" "),e("v-divider",{staticClass:"jh-divider"}),t._v(" "),e("div",{staticClass:"pa-4"},[t._t("default")],2),t._v(" "),t.shouldRenderCloseButton?e("v-btn",{staticClass:"drawer-close-float-btn",attrs:{elevation:"0",color:"success",fab:"",absolute:"",top:"",left:"",small:"",tile:""},on:{click:t.handleCancel}},[e("v-icon",[t._v("mdi-close")])],1):t._e()],1)};function xe(t){return xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(t)}Ce._withStripped=!0;var ke=["class","style"];function je(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Oe(t,e,n){return(e=function(t){var e=function(t){if("object"!=xe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xe(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const De=i({name:"JhDrawer",inheritAttrs:!1,props:{value:{type:Boolean,default:!1},title:{type:String,default:""},position:{type:String,default:"right",validator:function(t){return["left","right","bottom"].includes(t)}},width:{type:[String,Number],default:"90%"},height:{type:[String,Number],default:"60vh"},showConfirmButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},confirmText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"}},data:function(){return{isShownInternal:this.value}},computed:{isBottomPosition:function(){return"bottom"===this.position},drawerWidth:function(){return this.isBottomPosition?"100%":this.width},drawerHeight:function(){return this.isBottomPosition?this.height:void 0},shouldRenderCloseButton:function(){return this.showCloseButton&&!this.isBottomPosition},drawerClasses:function(){return["elevation-24",{"jh-drawer-bottom":this.isBottomPosition},this.$attrs.class]},drawerStyles:function(){var t=this.$attrs?this.$attrs.style:null;if(!this.isBottomPosition)return t||null;var e={borderTopLeftRadius:"16px",borderTopRightRadius:"16px",top:"auto",bottom:"0",left:"0",right:"0"};return t?[e,t]:e},mergedDrawerProps:function(){var t=["class","style","value","modelValue","permanent","fixed","temporary","right","left","bottom","width","height","title","position","showConfirmButton","showCancelButton","showCloseButton","confirmText","cancelText"],e=this.$attrs||{},n=(e.class,e.style,function(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}(e,ke)),i={};return Object.keys(n).forEach(function(e){var r=e.replace(/([A-Z])/g,"-$1").toLowerCase();t.includes(e)||t.includes(r)||(i[e]=n[e])}),i},drawerListeners:function(){var t=["open","close","confirm","cancel"],e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?je(Object(n),!0).forEach(function(e){Oe(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},this.$listeners||{}),n={};return Object.keys(e).forEach(function(i){t.includes(i)||(n[i]=e[i])}),n}},watch:{value:function(t){this.isShownInternal=t,t&&this.$emit("open")},isShownInternal:function(t){t||(this.$emit("input",!1),this.$emit("close"))}},methods:{handleCancel:function(){this.$emit("cancel"),this.isShownInternal=!1},handleConfirm:function(){this.$emit("confirm")},open:function(){this.isShownInternal=!0},close:function(){this.isShownInternal=!1}}},Ce,[],!1,null,"51648bd1",null).exports;var Pe=function(){var t=this,e=t._self._c;return e("div",{class:["jh-steps-form-container",{"is-vertical":t.vertical}],style:t.containerStyle},[t.vertical?[e("div",{staticClass:"jh-steps-form-stepper"},[e("div",{staticClass:"vertical-steps"},t._l(t.steps,function(n,i){return e("div",{key:"step-".concat(i),class:["vertical-step-item",{active:t.currentStepIndex===i+1,completed:t.currentStepIndex>i+1,editable:t.editable&&i<t.currentStepIndex-1}],on:{click:function(e){t.editable&&i<t.currentStepIndex-1&&t.handleStepClick(i)}}},[e("div",{staticClass:"step-number"},[t.currentStepIndex>i+1?e("v-icon",{attrs:{small:"",color:"success"}},[t._v("mdi-check")]):e("span",[t._v(t._s(i+1))])],1),t._v(" "),e("div",{staticClass:"step-info"},[e("div",{staticClass:"step-title"},[t._v(t._s(n.title))]),t._v(" "),n.subTitle?e("div",{staticClass:"step-subtitle"},[t._v(t._s(n.subTitle))]):t._e()])])}),0)]),t._v(" "),e("div",{staticClass:"jh-steps-form-content"},[e("v-card",{attrs:{flat:""}},[e("div",{staticClass:"step-content"},[t._l(t.steps,function(n,i){return[t.currentStepIndex===i+1?e("div",{key:"content-".concat(i)},[n.slot?t._t(n.slot,null,{step:n,index:i,formData:t.formData}):n.fields?e("jh-form",t._b({ref:"stepForm".concat(i),refInFor:!0,attrs:{fields:n.fields,"initial-data":t.formData["step".concat(i)]||{},"show-buttons":!1,outlined:t.outlined,dense:t.dense},on:{change:function(e){return t.handleStepFormChange(i,e)}}},"jh-form",t.mergedFormProps,!1)):e("div",[t._t("default",null,{step:n,index:i,formData:t.formData})],2)],2):t._e()]})],2),t._v(" "),t.submitter&&!1===t.submitter.render?t._e():e("div",{staticClass:"step-actions d-flex justify-space-between mt-6"},[t.submitter&&t.submitter.render?[t._t("submitter",function(){return[e(t.submitter.render,{tag:"component",attrs:{step:t.steps[t.currentStepIndex-1],index:t.currentStepIndex-1,onPrevious:t.handlePrevious,onNext:t.handleNext,onFinish:t.handleFinish,submitting:t.submitting,validating:t.validating}})]},{step:t.steps[t.currentStepIndex-1],index:t.currentStepIndex-1,onPrevious:t.handlePrevious,onNext:t.handleNext,onFinish:t.handleFinish,submitting:t.submitting,validating:t.validating})]:[t.currentStepIndex>1&&(!t.submitter||!1!==t.submitter.showPrevious)?e("v-btn",t._b({attrs:{text:"",disabled:t.submitting},on:{click:t.handlePrevious}},"v-btn",t.submitter&&t.submitter.previousButtonProps,!1),[t._v("\n "+t._s(t.submitter&&t.submitter.previousText||t.previousButtonText)+"\n ")]):e("v-spacer"),t._v(" "),e("div",[t.currentStepIndex<t.steps.length?e("v-btn",t._b({attrs:{color:"primary",loading:t.validating,disabled:t.submitting},on:{click:t.handleNext}},"v-btn",t.submitter&&t.submitter.nextButtonProps,!1),[t._v("\n "+t._s(t.submitter&&t.submitter.nextText||t.nextButtonText)+"\n ")]):e("v-btn",t._b({attrs:{color:"primary",loading:t.submitting},on:{click:t.handleFinish}},"v-btn",t.submitter&&t.submitter.submitButtonProps,!1),[t._v("\n "+t._s(t.submitter&&t.submitter.submitText||t.finishButtonText)+"\n ")])],1)]],2)])],1)]:[e("v-stepper",t._b({staticClass:"w-full",attrs:{"alt-labels":t.altLabels},model:{value:t.currentStepIndex,callback:function(e){t.currentStepIndex=e},expression:"currentStepIndex"}},"v-stepper",t.stepsProps,!1),[e("v-stepper-header",[t._l(t.steps,function(n,i){return[e("v-stepper-step",{key:"step-".concat(i),attrs:{complete:t.currentStepIndex>i+1,step:i+1,editable:t.editable&&i<t.currentStepIndex},on:{click:function(e){t.editable&&t.handleStepClick(i)}}},[t._v("\n "+t._s(n.title)+"\n "),n.subTitle?e("small",[t._v(t._s(n.subTitle))]):t._e()]),t._v(" "),i<t.steps.length-1?e("v-divider",{key:"divider-".concat(i)}):t._e()]})],2),t._v(" "),e("v-stepper-items",t._l(t.steps,function(n,i){return e("v-stepper-content",{key:"content-".concat(i),attrs:{step:i+1}},[e("div",{staticClass:"step-content"},[n.slot?t._t(n.slot,null,{step:n,index:i,formData:t.formData}):n.fields?e("jh-form",t._b({ref:"stepForm".concat(i),refInFor:!0,attrs:{fields:n.fields,"initial-data":t.formData["step".concat(i)]||{},"show-buttons":!1,outlined:t.outlined,dense:t.dense},on:{change:function(e){return t.handleStepFormChange(i,e)}}},"jh-form",t.mergedFormProps,!1)):e("div",[t._t("default",null,{step:n,index:i,formData:t.formData})],2)],2),t._v(" "),t.submitter&&!1===t.submitter.render?t._e():e("div",{staticClass:"step-actions d-flex justify-space-between mt-6"},[t.submitter&&t.submitter.render?[t._t("submitter",function(){return[e(t.submitter.render,{tag:"component",attrs:{step:n,index:i,onPrevious:t.handlePrevious,onNext:t.handleNext,onFinish:t.handleFinish,submitting:t.submitting,validating:t.validating}})]},{step:n,index:i,onPrevious:t.handlePrevious,onNext:t.handleNext,onFinish:t.handleFinish,submitting:t.submitting,validating:t.validating})]:[i>0&&(!t.submitter||!1!==t.submitter.showPrevious)?e("v-btn",t._b({attrs:{text:"",disabled:t.submitting},on:{click:t.handlePrevious}},"v-btn",t.submitter&&t.submitter.previousButtonProps,!1),[t._v("\n "+t._s(t.submitter&&t.submitter.previousText||t.previousButtonText)+"\n ")]):e("v-spacer"),t._v(" "),e("div",[i<t.steps.length-1?e("v-btn",t._b({attrs:{color:"primary",loading:t.validating,disabled:t.submitting},on:{click:t.handleNext}},"v-btn",t.submitter&&t.submitter.nextButtonProps,!1),[t._v("\n "+t._s(t.submitter&&t.submitter.nextText||t.nextButtonText)+"\n ")]):e("v-btn",t._b({attrs:{color:"primary",loading:t.submitting},on:{click:t.handleFinish}},"v-btn",t.submitter&&t.submitter.submitButtonProps,!1),[t._v("\n "+t._s(t.submitter&&t.submitter.submitText||t.finishButtonText)+"\n ")])],1)]],2)])}),1)],1)]],2)};function Ie(t){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ie(t)}function Fe(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return Te(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(Te(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Te(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,Te(d,"constructor",c),Te(c,"constructor",s),s.displayName="GeneratorFunction",Te(c,r,"GeneratorFunction"),Te(d),Te(d,r,"Generator"),Te(d,i,function(){return this}),Te(d,"toString",function(){return"[object Generator]"}),(Fe=function(){return{w:a,m:f}})()}function Te(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}Te=function(t,e,n,i){function a(e,n){Te(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},Te(t,e,n,i)}function Ae(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function Be(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){Ae(a,i,r,o,l,"next",t)}function l(t){Ae(a,i,r,o,l,"throw",t)}o(void 0)})}}function $e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Re(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$e(Object(n),!0).forEach(function(e){Ve(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$e(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ve(t,e,n){return(e=function(t){var e=function(t){if("object"!=Ie(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ie(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Pe._withStripped=!0;const Ne=i({name:"JhStepsForm",components:{JhForm:re},props:{steps:{type:Array,required:!0,default:function(){return[]}},initialStep:{type:Number,default:0},value:{type:Number,default:null},current:{type:Number,default:null},editable:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},altLabels:{type:Boolean,default:!1},outlined:{type:Boolean,default:!0},dense:{type:Boolean,default:!1},submitting:{type:Boolean,default:!1},previousButtonText:{type:String,default:"上一步"},nextButtonText:{type:String,default:"下一步"},finishButtonText:{type:String,default:"完成"},validateStep:{type:Function,default:null},transformBeforeFinish:{type:Function,default:null},onCurrentChange:{type:Function,default:null},onFormChange:{type:Function,default:null},stepsProps:{type:Object,default:function(){return{}}},formProps:{type:Object,default:function(){return{}}},stepFormRender:{type:Function,default:null},submitter:{type:[Object,Boolean],default:null},containerStyle:{type:[Object,String],default:null}},data:function(){return{currentStepIndex:(null!==this.current?this.current:null!==this.value?this.value:this.initialStep)+1,formData:{},validating:!1,formMapRef:{}}},computed:{mergedFormProps:function(){return Re(Re({},this.formProps),{},{outlined:this.outlined,dense:this.dense})}},watch:{value:function(t){null!==t&&t+1!==this.currentStepIndex&&(this.currentStepIndex=t+1)},current:function(t){null!==t&&t+1!==this.currentStepIndex&&(this.currentStepIndex=t+1)},currentStepIndex:function(t,e){var n=t-1;this.$emit("input",n),this.$emit("update:current",n),this.$emit("step-change",{current:n,step:this.steps[n]}),this.onCurrentChange&&void 0!==e&&this.onCurrentChange(n)}},mounted:function(){this.updateFormMapRef()},updated:function(){this.updateFormMapRef()},methods:{handleStepClick:function(t){this.editable&&t<this.currentStepIndex-1&&(this.currentStepIndex=t+1)},handleStepFormChange:function(t,e){this.$set(this.formData,"step".concat(t),e),this.$emit("change",this.formData),this.onFormChange&&this.onFormChange({stepIndex:t,values:e,allValues:this.formData})},updateFormMapRef:function(){var t=this,e={};this.steps.forEach(function(n,i){if(n.fields){var r=t.$refs["stepForm".concat(i)];r&&r[0]&&(e[i]=r[0])}}),this.formMapRef=e},handlePrevious:function(){this.currentStepIndex>1&&this.currentStepIndex--},handleNext:function(){var t=this;return Be(Fe().m(function e(){var n;return Fe().w(function(e){for(;;)switch(e.n){case 0:return n=t.currentStepIndex-1,e.n=1,t.validateCurrentStep(n);case 1:e.v&&t.currentStepIndex++;case 2:return e.a(2)}},e)}))()},handleFinish:function(){var t=this;return Be(Fe().m(function e(){var n,i;return Fe().w(function(e){for(;;)switch(e.n){case 0:return n=t.currentStepIndex-1,e.n=1,t.validateCurrentStep(n);case 1:if(e.v){e.n=2;break}return e.a(2);case 2:i=Re({},t.formData),t.transformBeforeFinish&&(i=t.transformBeforeFinish(i)),t.$emit("finish",i);case 3:return e.a(2)}},e)}))()},validateCurrentStep:function(t){var e=this;return Be(Fe().m(function n(){var i,r,a;return Fe().w(function(n){for(;;)switch(n.p=n.n){case 0:if(e.validating=!0,n.p=1,!(i=e.steps[t]).fields){n.n=3;break}if(!(r=e.$refs["stepForm".concat(t)])||!r[0]){n.n=3;break}return n.n=2,r[0].validate();case 2:if(n.v){n.n=3;break}return n.a(2,!1);case 3:if(!e.validateStep){n.n=5;break}return n.n=4,e.validateStep({step:i,stepIndex:t,formData:e.formData});case 4:if(!1!==n.v){n.n=5;break}return n.a(2,!1);case 5:return n.a(2,!0);case 6:return n.p=6,a=n.v,console.error("步骤验证失败:",a),n.a(2,!1);case 7:return n.p=7,e.validating=!1,n.f(7);case 8:return n.a(2)}},n,null,[[1,6,7,8]])}))()},goToStep:function(t){t>=0&&t<this.steps.length&&(this.currentStepIndex=t+1)},reset:function(){var t=this;this.currentStepIndex=this.initialStep+1,this.formData={},this.steps.forEach(function(e,n){if(e.fields){var i=t.$refs["stepForm".concat(n)];i&&i[0]&&i[0].resetForm()}})},getFormData:function(){return Re({},this.formData)},setFormData:function(t){this.formData=Re({},t)},getFormMapRef:function(){return this.formMapRef},getStepFormRef:function(t){return this.formMapRef[t]||null},validateAll:function(){var t=this;return Be(Fe().m(function e(){var n,i,r;return Fe().w(function(e){for(;;)switch(e.n){case 0:n=[],i=0;case 1:if(!(i<t.steps.length)){e.n=4;break}return e.n=2,t.validateCurrentStep(i);case 2:r=e.v,n.push(r);case 3:i++,e.n=1;break;case 4:return e.a(2,n.every(function(t){return t}))}},e)}))()}}},Pe,[],!1,null,"7e20b247",null).exports;function Me(t){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Me(t)}function Ee(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Le(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ee(Object(n),!0).forEach(function(e){ze(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ze(t,e,n){return(e=function(t){var e=function(t){if("object"!=Me(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Me(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ke=function(){var t=this,e=t._self._c;return e("div",{class:t.formListClasses},[t.title||t.description||t.$slots.header?e("div",{staticClass:"jh-form-list-header"},[t._t("header",function(){return[t.title?e("h3",{staticClass:"text-h6 mb-2"},[t._v(t._s(t.title))]):t._e(),t._v(" "),t.description?e("p",{staticClass:"text-caption grey--text mb-0"},[t._v(t._s(t.description))]):t._e()]})],2):t._e(),t._v(" "),0===t.listData.length?e("div",{staticClass:"jh-form-list-empty"},[t._t("empty",function(){return[e("v-icon",{attrs:{size:"48",color:"grey lighten-1"}},[t._v("mdi-inbox")]),t._v(" "),e("p",{staticClass:"grey--text mt-2"},[t._v("暂无数据")])]})],2):"card"===t.mode?e("div",{ref:"listBody",staticClass:"jh-form-list-body jh-form-list-body--card"},t._l(t.listData,function(n,i){return e("v-card",t._b({key:n.__id__,staticClass:"jh-form-list-item jh-form-list-item--card mb-4",class:t.getItemClasses(i)},"v-card",t.cardProps,!1),[e("v-card-title",{staticClass:"jh-form-list-item-header py-2 px-4"},[e("div",{staticClass:"d-flex align-center"},[!t.sortable||t.disabled||t.readonly?t._e():e("v-icon",{staticClass:"jh-form-list-drag-handle mr-2",attrs:{small:""}},[t._v("\n mdi-drag\n ")]),t._v(" "),t.collapsible?e("v-btn",{staticClass:"mr-2",attrs:{icon:"","x-small":""},on:{click:function(e){return t.toggleCollapse(n)}}},[e("v-icon",{attrs:{small:""}},[t._v("\n "+t._s(t.isCollapsed(n)?"mdi-chevron-down":"mdi-chevron-up")+"\n ")])],1):t._e(),t._v(" "),t.showIndex&&t.alwaysShowItemLabel?e("span",{staticClass:"jh-form-list-item-index"},[t._v("\n #"+t._s(i+1)+"\n ")]):t._e()],1),t._v(" "),e("v-spacer"),t._v(" "),!t.showItemActions||t.disabled||t.readonly?t._e():e("div",{staticClass:"jh-form-list-item-actions"},[t._t("item-actions",function(){return[t.actionRender?[e({render:function(){return t.renderActionButtons(n,i)}},{tag:"component"})]:[t.copyable?e("v-btn",{attrs:{icon:"",small:"",title:"复制"},on:{click:function(e){return t.copyItem(i)}}},[e("v-icon",{attrs:{small:""}},[t._v("mdi-content-copy")])],1):t._e(),t._v(" "),e("v-btn",{attrs:{icon:"",small:"",color:"error",disabled:t.listData.length<=t.min,title:"删除"},on:{click:function(e){return t.removeItem(i)}}},[e("v-icon",{attrs:{small:""}},[t._v("mdi-delete")])],1)]]},{item:n,index:i,removeItem:t.removeItem,copyItem:t.copyItem})],2)],1),t._v(" "),t.isCollapsed(n)?t._e():e("v-divider"),t._v(" "),e("v-expand-transition",[e("v-card-text",{directives:[{name:"show",rawName:"v-show",value:!t.isCollapsed(n),expression:"!isCollapsed(item)"}],staticClass:"pa-4"},[t._t("item",function(){return[e("jh-form",{ref:"itemForm_".concat(i),refInFor:!0,attrs:{fields:t.fields,"initial-data":n,layout:t.itemLayout,"label-width":t.itemLabelWidth,dense:t.dense,outlined:t.outlined,disabled:t.disabled,readonly:t.readonly,"hide-details":!1},on:{"field-change":function(e){return t.handleItemFieldChange(i,e)}},scopedSlots:t._u([t._l(t.fields,function(e){return{key:"field-".concat(e.key),fn:function(r){return[t._t("field-".concat(e.key),null,null,Le(Le({},r),{},{index:i,item:n}))]}}})],null,!0)})]},{item:n,index:i,fields:t.fields,updateItem:function(e,n){return t.updateItemField(i,e,n)}})],2)],1),t._v(" "),t.validationErrors[i]&&!t.isCollapsed(n)?e("v-alert",{staticClass:"mx-4 mb-3",attrs:{type:"error",dense:"",text:""}},[t._v("\n "+t._s(t.validationErrors[i])+"\n ")]):t._e()],1)}),1):"table"===t.mode?e("div",{staticClass:"jh-form-list-body jh-form-list-body--table"},[e("v-simple-table",{attrs:{dense:t.dense}},[e("thead",[e("tr",[t.showIndex?e("th",{staticClass:"text-center",staticStyle:{width:"60px"}},[t._v("#")]):t._e(),t._v(" "),!t.sortable||t.disabled||t.readonly?t._e():e("th",{staticStyle:{width:"40px"}}),t._v(" "),t._l(t.fields,function(n){return e("th",{key:n.key},[n.required?e("span",{staticClass:"error--text mr-1"},[t._v("*")]):t._e(),t._v("\n "+t._s(n.label)+"\n ")])}),t._v(" "),!t.showItemActions||t.disabled||t.readonly?t._e():e("th",{staticClass:"text-center",style:{width:t.actionColumn.width+"px"}},[t._v("\n 操作\n ")])],2)]),t._v(" "),e("tbody",{ref:"listBody"},t._l(t.listData,function(n,i){return e("tr",{key:n.__id__,class:t.getItemClasses(i)},[t.showIndex?e("td",{staticClass:"text-center"},[t._v(t._s(i+1))]):t._e(),t._v(" "),!t.sortable||t.disabled||t.readonly?t._e():e("td",{staticClass:"text-center"},[e("v-icon",{staticClass:"jh-form-list-drag-handle",attrs:{small:""}},[t._v("mdi-drag")])],1),t._v(" "),t._l(t.fields,function(r){return e("td",{key:r.key},[t._t("field-".concat(r.key),function(){return[e(t.getFieldComponent(r),t._b({tag:"component",attrs:{dense:t.dense,outlined:t.outlined,disabled:t.disabled||t.getFieldDisabled(r,n),readonly:t.readonly,placeholder:r.placeholder,"hide-details":!0},on:{input:function(e){return t.handleItemFieldChange(i,{key:r.key,value:e})}},model:{value:n[r.key],callback:function(e){t.$set(n,r.key,e)},expression:"item[field.key]"}},"component",t.getFieldProps(r),!1))]},{item:n,index:i,field:r,updateItem:function(e,n){return t.updateItemField(i,e,n)}})],2)}),t._v(" "),!t.showItemActions||t.disabled||t.readonly?t._e():e("td",{staticClass:"text-center"},[t._t("item-actions",function(){return[t.copyable?e("v-btn",{staticClass:"mr-1",attrs:{icon:"","x-small":"",title:"复制"},on:{click:function(e){return t.copyItem(i)}}},[e("v-icon",{attrs:{"x-small":""}},[t._v("mdi-content-copy")])],1):t._e(),t._v(" "),e("v-btn",{attrs:{icon:"","x-small":"",color:"error",disabled:t.listData.length<=t.min,title:"删除"},on:{click:function(e){return t.removeItem(i)}}},[e("v-icon",{attrs:{"x-small":""}},[t._v("mdi-delete")])],1)]},{item:n,index:i,removeItem:t.removeItem,copyItem:t.copyItem})],2)],2)}),0)])],1):"inline"===t.mode?e("div",{ref:"listBody",staticClass:"jh-form-list-body jh-form-list-body--inline d-flex flex-wrap align-center"},t._l(t.listData,function(n,i){return e("div",{key:n.__id__,staticClass:"jh-form-list-item jh-form-list-item--inline mr-2 mb-2",class:t.getItemClasses(i)},[t._t("item",function(){return[e("v-chip",{attrs:{close:!t.disabled&&!t.readonly&&t.listData.length>t.min,draggable:t.sortable&&!t.disabled&&!t.readonly},on:{"click:close":function(e){return t.removeItem(i)}}},[!t.sortable||t.disabled||t.readonly?t._e():e("v-icon",{staticClass:"jh-form-list-drag-handle mr-1",attrs:{"x-small":""}},[t._v("\n mdi-drag\n ")]),t._v("\n "+t._s(t.getInlineItemDisplay(n))+"\n ")],1)]},{item:n,index:i,fields:t.fields,updateItem:function(e,n){return t.updateItemField(i,e,n)}})],2)}),0):t._e(),t._v(" "),t.validationErrors._list?e("v-alert",{staticClass:"mt-3",attrs:{type:"error",dense:"",text:""}},[t._v("\n "+t._s(t.validationErrors._list)+"\n ")]):t._e(),t._v(" "),t.showMaxLimitAlert?e("v-alert",{staticClass:"mt-3",attrs:{type:"warning",dense:"",text:"",dismissible:""},on:{input:function(e){t.showMaxLimitAlert=!1}}},[t._v("\n "+t._s(t.maxLimitText)+" (最大: "+t._s(t.max)+")\n ")]):t._e(),t._v(" "),t.showMinLimitAlert?e("v-alert",{staticClass:"mt-3",attrs:{type:"warning",dense:"",text:"",dismissible:""},on:{input:function(e){t.showMinLimitAlert=!1}}},[t._v("\n "+t._s(t.minLimitText)+" (最小: "+t._s(t.min)+")\n ")]):t._e(),t._v(" "),t.disabled||t.readonly||!1===t.computedCreatorButtonProps?t._e():e("div",{staticClass:"jh-form-list-footer mt-4"},[t._t("footer",function(){return[e("v-btn",t._b({attrs:{disabled:!t.canAdd},on:{click:function(e){return t.addItem()}}},"v-btn",t.computedCreatorButtonProps,!1),[e("v-icon",{attrs:{left:""}},[t._v("mdi-plus")]),t._v("\n "+t._s(t.computedCreatorButtonProps.text||t.addButtonText)+"\n ")],1)]},{addItem:t.addItem,canAdd:t.canAdd})],2)],1)};Ke._withStripped=!0;var Je=["__id__"],Ge=["__id__"],We=["__id__"];function Ue(t){return Ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ue(t)}function qe(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return He(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?He(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}function He(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Ye(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return Xe(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(Xe(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Xe(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,Xe(d,"constructor",c),Xe(c,"constructor",s),s.displayName="GeneratorFunction",Xe(c,r,"GeneratorFunction"),Xe(d),Xe(d,r,"Generator"),Xe(d,i,function(){return this}),Xe(d,"toString",function(){return"[object Generator]"}),(Ye=function(){return{w:a,m:f}})()}function Xe(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}Xe=function(t,e,n,i){function a(e,n){Xe(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},Xe(t,e,n,i)}function Ze(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function Qe(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){Ze(a,i,r,o,l,"next",t)}function l(t){Ze(a,i,r,o,l,"throw",t)}o(void 0)})}}function tn(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function en(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function nn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?en(Object(n),!0).forEach(function(e){rn(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):en(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function rn(t,e,n){return(e=function(t){var e=function(t){if("object"!=Ue(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ue(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ue(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const an=i({name:"JhFormList",components:{JhForm:re},props:{value:{type:Array,default:function(){return[]}},fields:{type:Array,default:function(){return[]}},mode:{type:String,default:"card",validator:function(t){return["card","table","inline"].includes(t)}},title:{type:String,default:""},description:{type:String,default:""},min:{type:Number,default:0},max:{type:Number,default:1/0},sortable:{type:Boolean,default:!1},copyable:{type:Boolean,default:!0},showIndex:{type:Boolean,default:!0},showItemActions:{type:Boolean,default:!0},defaultValue:{type:[Object,Function],default:function(){return{}}},addButtonText:{type:String,default:"添加"},addButtonProps:{type:Object,default:function(){return{}}},deleteConfirm:{type:Boolean,default:!1},deleteConfirmText:{type:String,default:"确定要删除这一项吗?"},itemLayout:{type:String,default:"horizontal"},itemLabelWidth:{type:[Number,String],default:"auto"},dense:{type:Boolean,default:!0},outlined:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},rules:{type:Array,default:function(){return[]}},actionColumn:{type:Object,default:function(){return{width:100}}},cardProps:{type:Object,default:function(){return{}}},itemClass:{type:String,default:""},inlineDisplayKey:{type:String,default:""},alwaysShowItemLabel:{type:Boolean,default:!0},itemRender:{type:Function,default:null},creatorButtonProps:{type:[Object,Boolean],default:function(){return{}}},creatorRecord:{type:[Object,Function],default:null},actionGuard:{type:Object,default:function(){return{beforeAddRow:null,beforeRemoveRow:null}}},onAfterRemove:{type:Function,default:null},collapsible:{type:Boolean,default:!1},defaultCollapsed:{type:Boolean,default:!1},actionRender:{type:Function,default:null},maxLimitText:{type:String,default:"已达到最大数量限制"},minLimitText:{type:String,default:"已达到最小数量限制"}},data:function(){return{listData:[],validationErrors:{},sortableInstance:null,collapsedItems:new Set,showMaxLimitAlert:!1,showMinLimitAlert:!1}},computed:{formListClasses:function(){return rn(rn(rn({"jh-form-list":!0},"jh-form-list--".concat(this.mode),!0),"jh-form-list--disabled",this.disabled),"jh-form-list--readonly",this.readonly)},canAdd:function(){return this.listData.length<this.max},computedCreatorButtonProps:function(){return!1!==this.creatorButtonProps&&nn({color:"primary",outlined:!0},this.creatorButtonProps)},computedCreatorRecord:function(){var t=this;return this.creatorRecord?"function"==typeof this.creatorRecord?this.creatorRecord:function(){return t.creatorRecord}:"function"==typeof this.defaultValue?this.defaultValue:function(){return t.defaultValue}}},watch:{value:{handler:function(t){this.initListData()},immediate:!0,deep:!0},sortable:function(t){var e=this;t?this.$nextTick(function(){e.initSortable()}):this.destroySortable()}},mounted:function(){this.sortable&&this.initSortable()},beforeDestroy:function(){this.destroySortable()},methods:{generateItemId:function(){return"item_".concat(Date.now(),"_").concat(Math.random().toString(36).substr(2,9))},initListData:function(){var t=this;this.listData=(this.value||[]).map(function(e){return nn(nn({},e),{},{__id__:e.__id__||t.generateItemId()})})},getCleanData:function(){return this.listData.map(function(t){return t.__id__,tn(t,Je)})},addItem:function(){var t=arguments,e=this;return Qe(Ye().m(function n(){var i,r,a,o,l;return Ye().w(function(n){for(;;)switch(n.n){case 0:if(r=t.length>0&&void 0!==t[0]?t[0]:null,a=t.length>1&&void 0!==t[1]?t[1]:null,!(e.listData.length>=e.max)){n.n=1;break}return e.showMaxLimitAlert=!0,setTimeout(function(){e.showMaxLimitAlert=!1},3e3),e.$emit("max-limit",e.max),n.a(2);case 1:if(null===(i=e.actionGuard)||void 0===i||!i.beforeAddRow){n.n=3;break}return n.n=2,e.actionGuard.beforeAddRow(e.listData.length);case 2:if(!1!==n.v){n.n=3;break}return n.a(2);case 3:o=e.computedCreatorRecord(e.listData.length),l=nn(nn(nn({},o),r),{},{__id__:e.generateItemId()}),null!==a&&a>=0&&a<=e.listData.length?e.listData.splice(a,0,l):e.listData.push(l),e.emitInput(),e.$emit("add",e.getCleanItem(l),null!=a?a:e.listData.length-1);case 4:return n.a(2)}},n)}))()},removeItem:function(t){var e=this;return Qe(Ye().m(function n(){var i,r;return Ye().w(function(n){for(;;)switch(n.n){case 0:if(!(e.listData.length<=e.min)){n.n=1;break}return e.showMinLimitAlert=!0,setTimeout(function(){e.showMinLimitAlert=!1},3e3),e.$emit("min-limit",e.min),n.a(2);case 1:if(null===(i=e.actionGuard)||void 0===i||!i.beforeRemoveRow){n.n=3;break}return n.n=2,e.actionGuard.beforeRemoveRow(t,e.listData[t]);case 2:if(!1!==n.v){n.n=3;break}return n.a(2);case 3:if(!e.deleteConfirm){n.n=5;break}return n.n=4,e.confirm(e.deleteConfirmText);case 4:if(n.v){n.n=5;break}return n.a(2);case 5:r=e.listData[t],e.listData.splice(t,1),delete e.validationErrors[t],e.collapsedItems.delete(r.__id__),e.emitInput(),e.$emit("remove",e.getCleanItem(r),t),e.onAfterRemove&&e.onAfterRemove(t,e.getCleanItem(r));case 6:return n.a(2)}},n)}))()},copyItem:function(t){if(this.canAdd){var e=this.listData[t],n=(e.__id__,nn(nn({},tn(e,Ge)),{},{__id__:this.generateItemId()}));this.listData.splice(t+1,0,n),this.emitInput(),this.$emit("copy",this.getCleanItem(e),this.getCleanItem(n))}else this.$emit("max-limit",this.max)},moveItem:function(t,e){var n=this.listData.splice(t,1)[0];this.listData.splice(e,0,n),this.emitInput(),this.$emit("sort",t,e)},updateItemField:function(t,e,n){this.listData[t]&&(this.$set(this.listData[t],e,n),this.emitInput(),this.$emit("item-change",t,this.getCleanItem(this.listData[t])))},handleItemFieldChange:function(t,e){var n=e.key,i=e.value;this.updateItemField(t,n,i)},getCleanItem:function(t){return t.__id__,tn(t,We)},emitInput:function(){this.$emit("input",this.getCleanData()),this.$emit("change",this.getCleanData())},getItemClasses:function(t){var e=[];return this.itemClass&&e.push(this.itemClass),this.validationErrors[t]&&e.push("jh-form-list-item--error"),e.join(" ")},toggleCollapse:function(t){var e=t.__id__;this.collapsedItems.has(e)?this.collapsedItems.delete(e):this.collapsedItems.add(e),this.$forceUpdate()},isCollapsed:function(t){return this.collapsedItems.has(t.__id__)},renderActionButtons:function(t,e){var n=this;return this.actionRender?this.actionRender({item:this.getCleanItem(t),index:e,removeItem:function(){return n.removeItem(e)},copyItem:function(){return n.copyItem(e)}}):null},getFieldComponent:function(t){return{text:"v-text-field",textarea:"v-textarea",number:"v-text-field",select:"v-select",autocomplete:"v-autocomplete",switch:"v-switch",checkbox:"v-checkbox"}[t.type]||"v-text-field"},getFieldProps:function(t){var e=nn({},t.props);return"select"!==t.type&&"autocomplete"!==t.type||(e.items=t.options||[],e.itemText=t.itemText||"text",e.itemValue=t.itemValue||"value"),"number"===t.type&&(e.type="number"),e},getFieldDisabled:function(t,e){return"function"==typeof t.disabled?t.disabled(e):t.disabled||!1},getInlineItemDisplay:function(t){if(this.inlineDisplayKey)return t[this.inlineDisplayKey]||"-";var e=this.fields[0];return e&&t[e.key]||"-"},initSortable:function(){var t=this;this.sortable&&!this.sortableInstance&&this.$nextTick(function(){var e=t.$refs.listBody;e&&("undefined"!=typeof window&&window.Sortable?t.sortableInstance=window.Sortable.create(e,{animation:150,handle:".jh-form-list-drag-handle",ghostClass:"jh-form-list-ghost",dragClass:"jh-form-list-dragging",onEnd:function(e){var n=e.oldIndex,i=e.newIndex;n!==i&&t.moveItem(n,i)}}):console.warn("JhFormList: sortable 功能需要引入 SortableJS 库"))})},destroySortable:function(){this.sortableInstance&&(this.sortableInstance.destroy(),this.sortableInstance=null)},validate:function(){var t=this;return Qe(Ye().m(function e(){var n,i,r,a,o,l,s,c;return Ye().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n={},i=!0,!t.rules||!t.rules.length){e.n=7;break}r=qe(t.rules),e.p=1,r.s();case 2:if((a=r.n()).done){e.n=4;break}if(o=a.value,"string"!=typeof(l=o(t.getCleanData()))){e.n=3;break}return n._list=l,i=!1,e.a(3,4);case 3:e.n=2;break;case 4:e.n=6;break;case 5:e.p=5,c=e.v,r.e(c);case 6:return e.p=6,r.f(),e.f(6);case 7:s=0;case 8:if(!(s<t.listData.length)){e.n=11;break}return e.n=9,t.validateItem(s);case 9:e.v||(i=!1,n[s]="该项存在验证错误");case 10:s++,e.n=8;break;case 11:return t.validationErrors=n,t.$emit("validate",i,n),e.a(2,i)}},e,null,[[1,5,6,7]])}))()},validateItem:function(t){var e=this;return Qe(Ye().m(function n(){var i;return Ye().w(function(n){for(;;)switch(n.n){case 0:if(!(i=e.$refs["itemForm_".concat(t)])||!i[0]){n.n=2;break}return n.n=1,i[0].validate();case 1:return n.a(2,n.v);case 2:return n.a(2,!0)}},n)}))()},resetValidation:function(){var t=this;this.validationErrors={},this.listData.forEach(function(e,n){var i=t.$refs["itemForm_".concat(n)];i&&i[0]&&i[0].resetValidation()})},reset:function(){this.listData=[],this.validationErrors={},this.emitInput()},getItems:function(){return this.getCleanData()},setItems:function(t){var e=this;this.listData=t.map(function(t){return nn(nn({},t),{},{__id__:t.__id__||e.generateItemId()})}),this.emitInput()},getItemValue:function(t){return this.listData[t]?this.getCleanItem(this.listData[t]):null},setItemValue:function(t,e){this.listData[t]&&(this.$set(this.listData,t,nn(nn({},e),{},{__id__:this.listData[t].__id__})),this.emitInput())},confirm:function(t){return new Promise(function(e){e(window.confirm(t))})}}},Ke,[],!1,null,"ce7ba014",null).exports;var on=function(){var t=this,e=t._self._c;return e("v-app",[e("v-container",{staticClass:"pa-0",attrs:{fluid:""}},[e("div",{staticClass:"w-full"},[e("div",{staticClass:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-4"},[t.value&&t.isString(t.value)?e("div",{staticClass:"relative aspect-square rounded overflow-hidden"},[e("div",{staticClass:"w-full h-full flex flex-col items-center justify-center p-2 bg-gray-100"},[t.isImage(t.value)?e("img",{staticClass:"max-w-full max-h-full object-contain",attrs:{src:t.getImageUrl(t.value)}}):e("v-icon",{staticClass:"text-gray-500",attrs:{size:"40"}},[t._v("mdi-file-document-outline")])],1),t._v(" "),t.readonly?t._e():e("v-btn",{staticClass:"absolute top-1 right-1 !bg-black/50",attrs:{icon:"","x-small":""},on:{click:t.handleRemoveSingleFile}},[e("v-icon",{attrs:{small:"",color:"white"}},[t._v("mdi-close")])],1)],1):t.value&&Array.isArray(t.value)?t._l(t.value,function(n,i){return e("div",{key:i,staticClass:"relative aspect-square border border-gray-200 rounded overflow-hidden"},[t.isString(n)?e("div",{staticClass:"w-full h-full flex flex-col items-center justify-center p-2 bg-gray-100"},[t.isImage(n)?e("img",{staticClass:"max-w-full max-h-full object-contain",attrs:{src:t.getImageUrl(n)}}):e("v-icon",{staticClass:"text-gray-500",attrs:{size:"40"}},[t._v("mdi-file-document-outline")])],1):e("div",{staticClass:"w-full h-full flex flex-col items-center justify-center p-2 bg-gray-100"},[t.isImage(n)?e("img",{staticClass:"max-w-full max-h-full object-contain",attrs:{src:t.getObjectUrl(n)}}):e("v-icon",{staticClass:"text-gray-500",attrs:{size:"40"}},[t._v("mdi-file-document-outline")])],1),t._v(" "),t.readonly?t._e():e("v-btn",{staticClass:"absolute top-1 right-1 !bg-black/50",attrs:{icon:"","x-small":""},on:{click:function(e){return t.removeFile(i)}}},[e("v-icon",{attrs:{small:"",color:"white"}},[t._v("mdi-close")])],1),t._v(" "),e("div",{staticClass:"absolute top-0 left-2 text-xs bg-green-500 text-white px-1 rounded-b-sm"},[t._v("\n "+t._s(t.getFileExtension(n))+"\n ")])],1)}):t._e(),t._v(" "),t.isCanUpload?e("div",{staticClass:"aspect-square border-2 border-dashed border-gray-200 rounded flex items-center justify-center cursor-pointer transition-all hover:border-blue-500 hover:bg-blue-50",on:{click:t.triggerFileInput}},[e("input",{ref:"fileInput",staticClass:"hidden",attrs:{type:"file",multiple:t.multiple,accept:t.accept},on:{change:t.handleFileChange}}),t._v(" "),e("v-icon",{staticClass:"text-gray-500 transition-all group-hover:text-blue-500",attrs:{size:"40"}},[t._v("mdi-plus")])],1):t._e()],2),t._v(" "),t.errorMessage?e("div",{staticClass:"text-red-500 text-xs mt-2 pl-0.5"},[t._v("\n "+t._s(t.errorMessage)+"\n ")]):t._e(),t._v(" "),t.isShowUploadLimit?e("div",{staticClass:"text-gray-500 text-xs mt-2 pl-0.5"},[t._v("\n 最多可上传 "+t._s(t.maxFiles)+" 个文件 (已上传 "+t._s(t.isString(t.value)?1:(t.value||[]).length)+" 个)\n ")]):t._e()])])],1)};function ln(t){return ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ln(t)}function sn(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(ln(t)+" is not iterable")}function cn(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return un(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(un(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,un(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,un(d,"constructor",c),un(c,"constructor",s),s.displayName="GeneratorFunction",un(c,r,"GeneratorFunction"),un(d),un(d,r,"Generator"),un(d,i,function(){return this}),un(d,"toString",function(){return"[object Generator]"}),(cn=function(){return{w:a,m:f}})()}function un(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}un=function(t,e,n,i){function a(e,n){un(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},un(t,e,n,i)}function dn(t){return function(t){if(Array.isArray(t))return hn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||fn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fn(t,e){if(t){if("string"==typeof t)return hn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hn(t,e):void 0}}function hn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function pn(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}on._withStripped=!0;const vn=i({name:"JhFileInput",props:{value:{type:[Array,String],default:function(){return[]}},maxFiles:{type:Number,default:0},accept:{type:String,default:"*/*"},multiple:{type:Boolean,default:!1},rules:{type:Array,default:function(){return[]}},readonly:{type:Boolean,default:!1},uploadPrefix:{type:String,default:"/upload/"}},data:function(){return{errorMessage:""}},watch:{value:{handler:function(){this.validate()},deep:!0}},computed:{isCanUpload:function(){return!this.readonly&&(this.multiple?!this.maxFiles||(this.value||[]).length<this.maxFiles:(this.value||[]).length<1)},isShowUploadLimit:function(){return!this.readonly&&this.multiple&&this.maxFiles>0}},methods:{isString:function(t){return"string"==typeof t},triggerFileInput:function(){this.$refs.fileInput.click()},handleFileChange:function(t){var e,n=this;return(e=cn().m(function e(){var i,r,a,o,l;return cn().w(function(e){for(;;)switch(e.n){case 0:if(i=Array.from(t.target.files),!(n.maxFiles&&(n.value||[]).length+i.length>n.maxFiles)){e.n=1;break}return n.errorMessage="最多只能上传 ".concat(n.maxFiles," 个文件"),e.a(2);case 1:r=dn(n.value||[]),a=cn().m(function t(){var e,i;return cn().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=l[o],t.p=1,!r.some(function(t){return t.name===e.name&&t.size===e.size})){t.n=2;break}return n.errorMessage="文件 ".concat(e.name," 已存在"),t.a(2,1);case 2:r.push(e),t.n=4;break;case 3:t.p=3,i=t.v,console.error("Upload error:",i),n.errorMessage="上传文件 ".concat(e.name," 失败");case 4:return t.a(2)}},t,null,[[1,3]])}),o=0,l=i;case 2:if(!(o<l.length)){e.n=5;break}return e.d(sn(a()),3);case 3:if(!e.v){e.n=4;break}return e.a(3,4);case 4:o++,e.n=2;break;case 5:n.$emit("input",r),n.$emit("change",r),n.errorMessage||(n.errorMessage=""),t.target.value="";case 6:return e.a(2)}},e)}),function(){var t=this,n=arguments;return new Promise(function(i,r){var a=e.apply(t,n);function o(t){pn(a,i,r,o,l,"next",t)}function l(t){pn(a,i,r,o,l,"throw",t)}o(void 0)})})()},handleRemoveSingleFile:function(){this.$emit("input",[]),this.$emit("change",[])},removeFile:function(t){var e=dn(this.value);e.splice(t,1),this.$emit("input",e),this.$emit("change",e)},isImage:function(t){return this.isString(t)?["jpg","jpeg","png","gif","bmp","webp","svg"].includes(t.split(".").pop().toLowerCase()):!!t.type&&t.type.startsWith("image/")},getImageUrl:function(t){return"".concat(this.uploadPrefix).concat(t)},getObjectUrl:function(t){return URL.createObjectURL(t)},getFileExtension:function(t){return this.isString(t)?t.split(".").pop():t.name.split(".").pop()},validate:function(){this.errorMessage="";var t,e=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=fn(t))){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,o=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){o=!0,r=t},f:function(){try{a||null==e.return||e.return()}finally{if(o)throw r}}}}(this.rules);try{for(e.s();!(t=e.n()).done;){var n=(0,t.value)(this.value);if(!0!==n)return this.errorMessage=n,!1}}catch(t){e.e(t)}finally{e.f()}return!0}}},on,[],!1,null,"a8e9f800",null).exports;var mn=function(){var t=this._self._c;return t("v-app",[t("v-container",{staticClass:"pa-0",attrs:{fluid:""}},[t("div",[t("div",{staticClass:"jsoneditor-vue",style:{height:this.height}})])])],1)};function yn(t){return yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yn(t)}function bn(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return gn(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(gn(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,gn(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,gn(d,"constructor",c),gn(c,"constructor",s),s.displayName="GeneratorFunction",gn(c,r,"GeneratorFunction"),gn(d),gn(d,r,"Generator"),gn(d,i,function(){return this}),gn(d,"toString",function(){return"[object Generator]"}),(bn=function(){return{w:a,m:f}})()}function gn(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}gn=function(t,e,n,i){function a(e,n){gn(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},gn(t,e,n,i)}function _n(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function wn(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){_n(a,i,r,o,l,"next",t)}function l(t){_n(a,i,r,o,l,"throw",t)}o(void 0)})}}mn._withStripped=!0;const Sn=i({name:"JhJsonEditor",props:{value:{type:[String,Number,Object,Array],default:function(){return{}}},expandedOnStart:{type:Boolean,default:!1},mode:{type:String,default:"code"},modes:{type:Array,default:function(){return["tree","code","form","text","view"]}},height:{type:String,default:"calc(100vh - 240px)"}},watch:{value:{immediate:!0,handler:function(t){var e=this;return wn(bn().m(function t(){return bn().w(function(t){for(;;)switch(t.n){case 0:if(e.internalChange){t.n=2;break}return t.n=1,e.setEditor();case 1:e.error=!1,e.expandAll();case 2:return t.a(2)}},t)}))()},deep:!0}},data:function(){return{editor:null,error:!1,internalChange:!1,expandedModes:["tree","view","form"]}},computed:{valueType:function(){return yn(this.value)},formatValue:{get:function(){if("string"===this.valueType&&this.value)try{return JSON.parse(this.value)}catch(t){return this.value}return this.value},set:function(t){"string"!==this.valueType&&this.value?this.value=t:this.value=JSON.stringify(t)}}},mounted:function(){this.$emit("has-error",!1),window.JSONEditor?this.init():console.warn("JSONEditor is not loaded. Please include JSONEditor library.")},beforeDestroy:function(){this.editor&&this.editor.destroy()},methods:{init:function(){var t=this,e={mode:this.mode,modes:this.modes,themeColor:"#4caf50",onChange:function(){try{var e=t.editor.get();t.formatValue=e,t.error=!1,t.$emit("has-error",!1),t.internalChange=!0,t.$emit("input",t.value),t.$nextTick(function(){t.internalChange=!1})}catch(e){t.error=!0,t.$emit("has-error",!0)}},onModeChange:function(){t.expandAll()}};window.JSONEditor&&(this.editor=new window.JSONEditor(t.$el.querySelector(".jsoneditor-vue"),e,t.formatValue))},expandAll:function(){this.expandedOnStart&&this.editor&&this.expandedModes.includes(this.editor.getMode())&&this.editor.expandAll()},setEditor:function(){var t=this;return wn(bn().m(function e(){return bn().w(function(e){for(;;)switch(e.n){case 0:t.editor&&t.editor.set(t.formatValue);case 1:return e.a(2)}},e)}))()}}},mn,[],!1,null,"0d5540e8",null).exports;var Cn=function(){var t=this,e=t._self._c;return e("v-app",[e("v-container",{staticClass:"pa-0",attrs:{fluid:""}},[e("div",[e("div",{style:"overflow-y: auto; height: ".concat(t.height)},[e("div",{attrs:{id:t.editorId}},[e("textarea",{staticStyle:{display:"none"}},[t._v(t._s(t.value))])])])])])],1)};Cn._withStripped=!0;const xn=i({name:"JhMarkdownEditor",props:{value:{type:String,default:""},placeholder:{type:String,default:"请输入内容..."},height:{type:String,default:"calc(100vh - 400px)"},width:{type:Number,default:100},editorPath:{type:String,default:"/public/plugins/editor.md/lib/"},toolbarIcons:{type:Array,default:function(){return["undo","redo","|","watch","preview","|","h1","h2","h3","h4","h5","bold","del","italic","quote","mark","list-ul","list-ol","hr","link","|","image","code","table"]}},readonly:{type:Boolean,default:!1}},data:function(){return{editor:null,isMDChange:!1,editorId:"markdown-editor-".concat(Math.random().toString(36).substr(2,9))}},mounted:function(){var t=this;this.$nextTick(function(){t.initEditorMd()})},beforeDestroy:function(){this.editor&&(this.editor=null)},watch:{value:function(t){this.editor&&!this.isMDChange&&this.editor.setMarkdown(t),this.isMDChange=!1}},methods:{initEditorMd:function(){var t=this,e=document.getElementById(this.editorId);e?window.editormd?(e.innerHTML='<textarea style="display:none;">'.concat(this.value||"","</textarea>"),t.editor=window.editormd(this.editorId,{watch:!this.readonly,saveHTMLToTextarea:!0,path:this.editorPath,toolbarIcons:this.toolbarIcons,placeholder:this.placeholder,readOnly:this.readonly,onchange:function(){t.handleMDChange()}})):console.warn("Editor.md is not loaded. Please include Editor.md library."):console.warn("Editor container not found")},handleMDChange:function(){this.isMDChange=!0;var t=this.editor.getMarkdown();if(this.$emit("input",t),this.$emit("change",t),this.editor.getPreviewedHTML){var e=this.editor.getPreviewedHTML();this.$emit("content-for-seo",e)}},getMarkdown:function(){return this.editor?this.editor.getMarkdown():this.value},setMarkdown:function(t){this.editor&&this.editor.setMarkdown(t)},insertValue:function(t){this.editor&&this.editor.insertValue(t)}}},Cn,[],!1,null,"024b241e",null).exports;var kn=function(){var t=this,e=t._self._c;return e("v-app",[e("v-container",{attrs:{fluid:""}},[e("v-row",{staticClass:"draggable-container"},[t.showComponentLibrary?e("v-col",{attrs:{cols:"12",md:"3"}},[e("div",{staticClass:"title"},[t._v(t._s(t.componentLibraryTitle))]),t._v(" "),t.isDraggableLoaded?e("draggable",{attrs:{group:{name:t.groupName,pull:"clone",put:!1},animation:t.animation,"drag-class":t.dragClass,"ghost-class":t.ghostClass,"chosen-class":t.chosenClass},on:{start:t.handleStart,end:t.handleEnd},model:{value:t.componentsInternal,callback:function(e){t.componentsInternal=e},expression:"componentsInternal"}},[e("transition-group",t._l(t.componentsInternal,function(n){return e("div",{key:n.id,staticClass:"draggable-item"},[t._v("\n "+t._s(n.name)+"\n ")])}),0)],1):t._e()],1):t._e(),t._v(" "),e("v-col",{attrs:{cols:(t.showComponentLibrary,12),md:t.showComponentLibrary?9:12}},[t.isDraggableLoaded?e("draggable",{attrs:{group:t.groupName,animation:t.animation,"drag-class":t.dragClass,"ghost-class":t.ghostClass,"chosen-class":t.chosenClass},on:{start:t.handleStart,end:t.handleEnd},model:{value:t.designAreaInternal,callback:function(e){t.designAreaInternal=e},expression:"designAreaInternal"}},[e("transition-group",t._l(t.designAreaInternal,function(n){return e("div",{key:n.id,staticClass:"draggable-item"},[t._t("item",function(){return[t._v("\n "+t._s(n.name)+"\n ")]},{item:n})],2)}),0)],1):t._e(),t._v(" "),e("v-row",{directives:[{name:"show",rawName:"v-show",value:!t.designAreaInternal.length,expression:"!designAreaInternal.length"}],staticClass:"ma-0 pa-0",staticStyle:{width:"100%"}},[e("v-card",{staticClass:"ma-12",staticStyle:{border:"1px dashed #333333"},attrs:{height:"100",width:"100%",color:"#f5f8fa"}},[t.isDraggableLoaded?e("draggable",{staticClass:"d-flex align-center justify-center",staticStyle:{height:"100%"},attrs:{group:t.groupName,animation:t.animation,"drag-class":t.dragClass,"ghost-class":t.ghostClass},model:{value:t.designAreaInternal,callback:function(e){t.designAreaInternal=e},expression:"designAreaInternal"}},[e("v-card-text",{staticClass:"text-center title draggable-placeholder"},[t._v("\n "+t._s(t.emptyPlaceholder)+"\n ")])],1):t._e()],1)],1)],1)],1)],1)],1)};function jn(t){return function(t){if(Array.isArray(t))return On(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return On(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?On(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function On(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}kn._withStripped=!0;const Dn=i({name:"JhDraggable",props:{components:{type:Array,default:function(){return[]}},value:{type:Array,default:function(){return[]}},showComponentLibrary:{type:Boolean,default:!0},componentLibraryTitle:{type:String,default:"组件"},groupName:{type:String,default:"draggable-group"},animation:{type:Number,default:300},dragClass:{type:String,default:"jh-drag-class"},ghostClass:{type:String,default:"jh-ghost-class"},chosenClass:{type:String,default:"jh-chosen-class"},emptyPlaceholder:{type:String,default:"从左侧拖入或点选组件进行内容设计"}},data:function(){return{drag:!1,componentsInternal:[],designAreaInternal:[],isDraggableLoaded:!1}},watch:{components:{handler:function(t){this.componentsInternal=jn(t)},immediate:!0,deep:!0},value:{handler:function(t){this.designAreaInternal=jn(t)},immediate:!0,deep:!0},designAreaInternal:{handler:function(t){this.$emit("input",t),this.$emit("change",t)},deep:!0}},mounted:function(){this.checkDraggableLibrary()},methods:{checkDraggableLibrary:function(){this.$options.components.draggable||window.vuedraggable?this.isDraggableLoaded=!0:(console.warn("Vue Draggable library is not loaded. Please include vuedraggable library."),this.isDraggableLoaded=!1)},handleStart:function(){this.drag=!0,this.$emit("start")},handleEnd:function(){this.drag=!1,this.ensureUniqueIds(),this.$emit("end")},ensureUniqueIds:function(){var t=this,e=[].concat(jn(this.componentsInternal.map(function(t){return t.id})),jn(this.designAreaInternal.map(function(t){return t.id}))),n=Math.max.apply(Math,jn(e));this.designAreaInternal.forEach(function(e){t.componentsInternal.some(function(t){return t.id===e.id})&&(e.id=++n)})}}},kn,[],!1,null,"a384b1a0",null).exports;var Pn=function(){var t=this,e=t._self._c;return e("v-app",[e("v-container",{attrs:{fluid:""}},[e("v-card",{staticClass:"px-4"},[e("v-row",{staticClass:"ma-0 pt-0 d-flex"},[t.showCreateButton?e("v-btn",{staticClass:"elevation-0 mr-2",attrs:{color:"success",small:"",dark:""},on:{click:t.handleCreateClick}},[t._v("\n 新增附件\n ")]):t._e(),t._v(" "),e("v-spacer"),t._v(" "),e("v-col",{staticClass:"pa-0 pt-2 pt-sm-0",attrs:{cols:"12",sm:"6",md:"3",xl:"3"}},[e("v-text-field",{staticClass:"jh-v-input",attrs:{color:"success",prefix:"表格过滤:",dense:"",filled:"","single-line":"","hide-details":""},model:{value:t.searchInput,callback:function(e){t.searchInput=e},expression:"searchInput"}})],1)],1),t._v(" "),t._l(t.groupedAttachments,function(n,i){return e("v-card",{key:i,staticClass:"my-2",attrs:{outlined:""}},[e("v-card-title",{staticClass:"pl-4",staticStyle:{"font-size":"20px","font-weight":"500"}},[t._v("\n "+t._s(i)+"\n ")]),t._v(" "),e("v-card-text",{staticStyle:{display:"flex","flex-flow":"wrap"}},t._l(n,function(n){return e("v-card",{key:n.id,staticClass:"mr-2 mb-2",attrs:{width:"200px",outlined:""}},[e("v-img",{staticClass:"white--text align-end",attrs:{src:t.getPreviewUrl(n),gradient:"to bottom, rgba(0,0,0,.1), rgba(0,0,0,.5)",height:"120px"}},[e("v-card-title",{staticClass:"text-subtitle-2"},[t._v(t._s(n.filename))])],1),t._v(" "),e("v-card-actions",[e("v-chip",{attrs:{small:""}},[t._v(t._s(n.fileSubtype||t.getFileType(n.filename)))]),t._v(" "),e("v-spacer"),t._v(" "),t.isImage(n.downloadPath||n.filename)?e("v-btn",{attrs:{icon:"",small:"",title:"预览"},on:{click:function(e){return t.handlePreview(n)}}},[e("v-icon",[t._v("mdi-eye")])],1):t._e(),t._v(" "),n.downloadPath?e("v-btn",{attrs:{icon:"",small:"",title:"下载"},on:{click:function(e){return t.handleDownload(n)}}},[e("v-icon",[t._v("mdi-download")])],1):t._e(),t._v(" "),t.readonly?t._e():e("v-btn",{attrs:{icon:"",small:"",title:"删除"},on:{click:function(e){return t.handleDelete(n)}}},[e("v-icon",[t._v("mdi-trash-can-outline")])],1)],1)],1)}),1)],1)}),t._v(" "),e("v-overlay",{attrs:{absolute:"",value:t.loading,color:"#fff"}},[e("v-progress-circular",{attrs:{color:"success",indeterminate:"",size:"32"}})],1),t._v(" "),t.loading||0!==t.filteredAttachments.length?t._e():e("div",{staticClass:"mt-5 text-center"},[t._v("\n 暂无附件\n ")])],2),t._v(" "),e("v-dialog",{attrs:{"max-width":"90vw"},model:{value:t.previewDialog,callback:function(e){t.previewDialog=e},expression:"previewDialog"}},[e("v-card",[e("v-card-title",[t._v("\n "+t._s(t.previewItem?t.previewItem.filename:"")+"\n "),e("v-spacer"),t._v(" "),e("v-btn",{attrs:{icon:""},on:{click:function(e){t.previewDialog=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),t._v(" "),e("v-card-text",{staticClass:"pa-0"},[t.previewItem?e("v-img",{attrs:{src:t.getPreviewUrl(t.previewItem),contain:"","max-height":"70vh"}}):t._e()],1)],1)],1)],1)],1)};Pn._withStripped=!0;const In=i({name:"JhTableAttachment",props:{attachments:{type:Array,default:function(){return[]}},showCreateButton:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},groupBy:{type:String,default:"fileType"},previewPrefix:{type:String,default:"/upload/"},loading:{type:Boolean,default:!1}},data:function(){return{searchInput:"",previewDialog:!1,previewItem:null}},computed:{filteredAttachments:function(){var t=this;return this.searchInput?this.attachments.filter(function(e){return e.filename.toLowerCase().includes(t.searchInput.toLowerCase())||e.fileType&&e.fileType.toLowerCase().includes(t.searchInput.toLowerCase())}):this.attachments},groupedAttachments:function(){var t=this,e={};return this.filteredAttachments.forEach(function(n){var i=n[t.groupBy]||"未分类";e[i]||(e[i]=[]),e[i].push(n)}),e}},methods:{getPreviewUrl:function(t){return t.downloadPath?"".concat(this.previewPrefix).concat(t.downloadPath):"/placeholder-image.jpg"},isImage:function(t){return!!t&&/\.(gif|jpg|jpeg|png|webp|svg|bmp)$/i.test(t)},getFileType:function(t){if(!t)return"";var e=t.split(".").pop();return e?e.toLowerCase():""},handleCreateClick:function(){this.$emit("create-click")},handlePreview:function(t){this.previewItem=t,this.previewDialog=!0,this.$emit("preview",t)},handleDownload:function(t){if(this.$emit("download",t),t.downloadPath){var e=document.createElement("a");e.href=this.getPreviewUrl(t),e.download=t.filename,e.click()}},handleDelete:function(t){this.$emit("delete",t)}}},Pn,[],!1,null,"5113d453",null).exports;var Fn=function(){var t=this,e=t._self._c;return e("div",{staticClass:"jh-editable-table"},[e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.tableHeaders,items:t.internalData,"items-per-page":t.itemsPerPage,"hide-default-footer":t.hideFooter,dense:t.dense,"disable-sort":!t.sortable},scopedSlots:t._u([t._l(t.editableColumns,function(n){return{key:"item.".concat(n.key),fn:function(i){var r,a,o=i.item;return[e("div",{key:n.key,staticClass:"jh-editable-cell"},[t.isEditing(o)?[n.type&&"text"!==n.type?"number"===n.type?e("v-text-field",{staticClass:"my-1",attrs:{label:n.label,rules:n.rules,type:"number",dense:"","hide-details":"auto"},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,t._n(e))},expression:"item[column.key]"}}):"select"===n.type?e("v-select",{staticClass:"my-1",attrs:{items:n.options,label:n.label,rules:n.rules,dense:"","hide-details":"auto"},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,e)},expression:"item[column.key]"}}):"date"===n.type?e("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"auto"},scopedSlots:t._u([{key:"activator",fn:function(i){var r=i.on,a=i.attrs;return[e("v-text-field",t._g(t._b({staticClass:"my-1",attrs:{label:n.label,"prepend-icon":"mdi-calendar",readonly:"",dense:"","hide-details":"auto"},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,e)},expression:"item[column.key]"}},"v-text-field",a,!1),r))]}}],null,!0),model:{value:t.dateMenus[o._uuid+n.key],callback:function(e){t.$set(t.dateMenus,o._uuid+n.key,e)},expression:"dateMenus[item._uuid + column.key]"}},[t._v(" "),e("v-date-picker",{on:{input:function(e){t.dateMenus[o._uuid+n.key]=!1}},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,e)},expression:"item[column.key]"}})],1):"switch"===n.type?e("v-switch",{staticClass:"my-1",attrs:{label:n.label,dense:"","hide-details":"auto"},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,e)},expression:"item[column.key]"}}):"enum"===n.type&&n.enum?e("v-select",{staticClass:"my-1",attrs:{items:t.getEnumOptions(n.enum),label:n.label,rules:n.rules,dense:"","hide-details":"auto"},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,e)},expression:"item[column.key]"}}):t._e():e("v-text-field",{staticClass:"my-1",attrs:{label:n.label,rules:n.rules,placeholder:n.placeholder,dense:"","hide-details":"auto"},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,e)},expression:"item[column.key]"}})]:[t.$scopedSlots["cell.".concat(n.key)]?t._t("cell.".concat(n.key),null,{item:o,value:o[n.key]}):e("span",["enum"===n.type&&n.enum?e("v-chip",{attrs:{color:null===(r=n.enum[o[n.key]])||void 0===r?void 0:r.color,small:""}},[t._v("\n "+t._s((null===(a=n.enum[o[n.key]])||void 0===a?void 0:a.text)||o[n.key])+"\n ")]):"switch"===n.type?e("v-icon",{attrs:{color:o[n.key]?"success":"grey"}},[t._v("\n "+t._s(o[n.key]?"mdi-check-circle":"mdi-circle-outline")+"\n ")]):e("span",[t._v(t._s(o[n.key]))])],1)]],2)]}}}),{key:"item.actions",fn:function(n){var i=n.item;return[e("div",{staticClass:"jh-editable-actions"},[t.isEditing(i)?[e("v-btn",{attrs:{icon:"",small:"",color:"success",title:"保存"},on:{click:function(e){return t.handleSave(i)}}},[e("v-icon",{attrs:{small:""}},[t._v("mdi-check")])],1),t._v(" "),e("v-btn",{attrs:{icon:"",small:"",color:"error",title:"取消"},on:{click:function(e){return t.handleCancel(i)}}},[e("v-icon",{attrs:{small:""}},[t._v("mdi-close")])],1)]:[t.editable?e("v-btn",{attrs:{icon:"",small:"",color:"primary",title:"编辑"},on:{click:function(e){return t.handleEdit(i)}}},[e("v-icon",{attrs:{small:""}},[t._v("mdi-pencil")])],1):t._e(),t._v(" "),t.deletable?e("v-btn",{attrs:{icon:"",small:"",color:"error",title:"删除"},on:{click:function(e){return t.handleDelete(i)}}},[e("v-icon",{attrs:{small:""}},[t._v("mdi-delete")])],1):t._e(),t._v(" "),t._t("actions",null,{item:i})]],2)]}},t.recordCreator?{key:"footer",fn:function(){return[e("div",{staticClass:"jh-editable-footer pa-3"},[e("v-btn",{attrs:{color:"primary",small:"",disabled:t.hasEditingRow},on:{click:t.handleAddRow}},[e("v-icon",{attrs:{small:"",left:""}},[t._v("mdi-plus")]),t._v("\n "+t._s(t.recordCreatorProps.creatorButtonText||"添加一行数据")+"\n ")],1)],1)]},proxy:!0}:null],null,!0)})],1)};Fn._withStripped=!0;var Tn=["_uuid","_isNew"],An=["_uuid","_isNew"];function Bn(t){return Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bn(t)}function $n(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Rn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Vn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}function Vn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Nn(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return Mn(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(Mn(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Mn(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,Mn(d,"constructor",c),Mn(c,"constructor",s),s.displayName="GeneratorFunction",Mn(c,r,"GeneratorFunction"),Mn(d),Mn(d,r,"Generator"),Mn(d,i,function(){return this}),Mn(d,"toString",function(){return"[object Generator]"}),(Nn=function(){return{w:a,m:f}})()}function Mn(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}Mn=function(t,e,n,i){function a(e,n){Mn(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},Mn(t,e,n,i)}function En(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function Ln(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){En(a,i,r,o,l,"next",t)}function l(t){En(a,i,r,o,l,"throw",t)}o(void 0)})}}function zn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Kn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?zn(Object(n),!0).forEach(function(e){Jn(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Jn(t,e,n){return(e=function(t){var e=function(t){if("object"!=Bn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bn(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gn(t){return Gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gn(t)}function Wn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Un(t,e,n){return(e=function(t){var e=function(t){if("object"!=Gn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Gn(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var qn={JhMenu:r,JhScene:f,JhDateRangePicker:m,JhQueryFilter:A,JhTable:Y,JhTreeSelect:at,JhAddressSelect:dt,JhPageContainer:ht,JhLayout:gt,JhCard:jt,JhStatisticCard:Pt,JhWaterMark:Vt,JhForm:re,JhModalForm:ue,JhDrawerForm:me,JhModal:Se,JhDrawer:De,JhStepsForm:Ne,JhFormList:an,JhFileInput:vn,JhJsonEditor:Sn,JhMarkdownEditor:xn,JhDraggable:Dn,JhTableAttachment:In,JhEditableTable:i({name:"JhEditableTable",props:{value:{type:Array,default:function(){return[]}},columns:{type:Array,required:!0},editable:{type:Boolean,default:!0},deletable:{type:Boolean,default:!0},recordCreator:{type:Boolean,default:!0},recordCreatorProps:{type:Object,default:function(){return{creatorButtonText:"添加一行数据",record:{}}}},itemsPerPage:{type:Number,default:-1},hideFooter:{type:Boolean,default:!0},dense:{type:Boolean,default:!1},sortable:{type:Boolean,default:!1},rowKey:{type:String,default:"id"},editableType:{type:String,default:"multiple",validator:function(t){return["single","multiple"].includes(t)}},maxRows:{type:Number,default:1/0},onValuesChange:{type:Function,default:null},beforeAddRow:{type:Function,default:null},beforeRemoveRow:{type:Function,default:null},actionRender:{type:Function,default:null},editableKeys:{type:Array,default:null},onSave:{type:Function,default:null},onDelete:{type:Function,default:null}},data:function(){return{internalData:[],editingKeys:new Set,originalData:new Map,dateMenus:{}}},computed:{editableColumns:function(){return this.columns.filter(function(t){return!1!==t.editable})},tableHeaders:function(){var t=this,e=this.columns.map(function(e){return{text:e.label||e.key,value:e.key,sortable:!1!==e.sortable&&t.sortable,width:e.width,align:e.align||"start"}});return(this.editable||this.deletable||this.$scopedSlots.actions)&&e.push({text:"操作",value:"actions",sortable:!1,width:120,align:"center"}),e},hasEditingRow:function(){return this.editingKeys.size>0}},watch:{value:{handler:function(t){this.initInternalData(t)},immediate:!0,deep:!0}},methods:{initInternalData:function(t){var e=this;this.internalData=t.map(function(t){return t._uuid||(t._uuid=e.generateUUID()),Kn({},t)})},generateUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})},getRowKey:function(t){return t._uuid||t[this.rowKey]},isEditing:function(t){return this.editingKeys.has(this.getRowKey(t))},getEnumOptions:function(t){return Object.keys(t).map(function(e){return{text:t[e].text||e,value:e}})},handleEdit:function(t){var e=this;return Ln(Nn().m(function n(){var i,r,a;return Nn().w(function(n){for(;;)switch(n.n){case 0:if(i=e.getRowKey(t),!("single"===e.editableType&&e.editingKeys.size>0)){n.n=1;break}if(r=Array.from(e.editingKeys)[0],!(a=e.internalData.find(function(t){return e.getRowKey(t)===r}))){n.n=1;break}return n.n=1,e.handleCancel(a);case 1:e.originalData.set(i,Kn({},t)),e.editingKeys.add(i),e.$emit("edit",t),e.$emit("update:editableKeys",Array.from(e.editingKeys));case 2:return n.a(2)}},n)}))()},handleSave:function(t){var e=this;return Ln(Nn().m(function n(){var i;return Nn().w(function(n){for(;;)switch(n.n){case 0:if(i=e.getRowKey(t),e.validateRow(t)){n.n=1;break}return n.a(2);case 1:if(!e.onSave){n.n=3;break}return n.n=2,e.onSave(i,t,e.originalData.get(i));case 2:if(!1!==n.v){n.n=3;break}return n.a(2);case 3:e.editingKeys.delete(i),e.originalData.delete(i),e.syncToParent(),e.$emit("save",t),e.$emit("change",e.internalData),e.$emit("update:editableKeys",Array.from(e.editingKeys)),e.onValuesChange&&e.onValuesChange(t,e.internalData);case 4:return n.a(2)}},n)}))()},handleCancel:function(t){var e=this,n=this.getRowKey(t);if(t._isNew){var i=this.internalData.findIndex(function(t){return e.getRowKey(t)===n});i>-1&&this.internalData.splice(i,1)}else{var r=this.originalData.get(n);if(r){var a=this.internalData.findIndex(function(t){return e.getRowKey(t)===n});a>-1&&this.internalData.splice(a,1,Kn({},r))}}this.editingKeys.delete(n),this.originalData.delete(n),this.syncToParent(),this.$emit("cancel",t)},handleDelete:function(t){var e=this;return Ln(Nn().m(function n(){var i,r;return Nn().w(function(n){for(;;)switch(n.n){case 0:if(i=e.getRowKey(t),r=e.internalData.findIndex(function(t){return e.getRowKey(t)===i}),!e.beforeRemoveRow){n.n=2;break}return n.n=1,e.beforeRemoveRow(t,r);case 1:if(!1!==n.v){n.n=2;break}return n.a(2);case 2:if(!e.onDelete){n.n=4;break}return n.n=3,e.onDelete(i,t);case 3:if(!1!==n.v){n.n=4;break}return n.a(2);case 4:r>-1&&(e.internalData.splice(r,1),e.syncToParent(),e.$emit("delete",t,r),e.$emit("change",e.internalData));case 5:return n.a(2)}},n)}))()},handleAddRow:function(){var t=this;return Ln(Nn().m(function e(){var n;return Nn().w(function(e){for(;;)switch(e.n){case 0:if(!(t.internalData.length>=t.maxRows)){e.n=1;break}return t.$emit("max-rows",t.maxRows),e.a(2);case 1:if(!t.beforeAddRow){e.n=3;break}return e.n=2,t.beforeAddRow();case 2:if(!1!==e.v){e.n=3;break}return e.a(2);case 3:n=Kn({_uuid:t.generateUUID(),_isNew:!0},t.recordCreatorProps.record),t.columns.forEach(function(t){t.key&&void 0===n[t.key]&&("switch"===t.type?n[t.key]=!1:"number"===t.type?n[t.key]=0:n[t.key]="")}),t.internalData.push(n),t.$nextTick(function(){t.handleEdit(n)}),t.$emit("add",n);case 4:return e.a(2)}},e)}))()},validateRow:function(t){var e,n=Rn(this.columns);try{for(n.s();!(e=n.n()).done;){var i=e.value;if(i.rules&&!1!==i.editable){var r,a=Rn(i.rules);try{for(a.s();!(r=a.n()).done;){var o=(0,r.value)(t[i.key]);if("string"==typeof o)return this.$emit("validation-error",{item:t,column:i,message:o}),!1}}catch(t){a.e(t)}finally{a.f()}}}}catch(t){n.e(t)}finally{n.f()}return!0},syncToParent:function(){var t=this.internalData.map(function(t){return t._uuid,t._isNew,$n(t,Tn)});this.$emit("input",t)},getData:function(){return this.internalData.map(function(t){return t._uuid,t._isNew,$n(t,An)})},setData:function(t){this.initInternalData(t),this.syncToParent()},clearData:function(){this.internalData=[],this.editingKeys.clear(),this.originalData.clear(),this.syncToParent()}}},Fn,[],!1,null,"52ef24ea",null).exports,JhMask:Mt,JhToast:Lt,JhConfirmDialog:Ut},Hn=function(t){Hn.installed||(Hn.installed=!0,Object.keys(qn).forEach(function(e){t.component(e,qn[e])}))};"undefined"!=typeof window&&window.Vue&&Hn(window.Vue);const Yn=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wn(Object(n),!0).forEach(function(e){Un(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({install:Hn},qn);return e.default})());
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("JianghuUI",[],e):"object"==typeof exports?exports.JianghuUI=e():t.JianghuUI=e()}("undefined"!=typeof self?self:this,()=>(()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{default:()=>Xn});var n=function(){var t=this,e=t._self._c;return e("div",[t.hideDrawers?t._e():e("v-navigation-drawer",{staticClass:"jh-page-nav-bar hidden-md-and-up",attrs:{app:"",clipped:"",temporary:t.temporary},model:{value:t.mobileMenuDrawer,callback:function(e){t.mobileMenuDrawer=e},expression:"mobileMenuDrawer"}},[e("v-toolbar-title",{staticClass:"px-3 jh-toolbar-title"},[e("span",{staticClass:"text-base font-medium"},[t._v(t._s(t.appTitle))])]),t._v(" "),e("v-divider",{staticClass:"jh-divider"}),t._v(" "),e("v-list",{staticClass:"py-0",attrs:{flat:""}},[e("v-list-item-group",{attrs:{value:t.currentMenuIndex}},[t._l(t.menuList,function(n,i){return[n.children&&n.children.length>0?[e("v-list-group",{key:i,staticClass:"px-4",attrs:{value:n.active},scopedSlots:t._u([{key:"activator",fn:function(){return[e("v-list-item",{staticClass:"pl-0",attrs:{ripple:!1}},[e("v-list-item-content",[e("v-list-item-title",[t._v(t._s(n.title))])],1)],1)]},proxy:!0},{key:"appendIcon",fn:function(){return[e("v-icon",{attrs:{size:"18"}},[t._v("mdi-chevron-down")])]},proxy:!0}],null,!0)},[t._v(" "),t._v(" "),t._l(n.children,function(n,r){return[n.children&&n.children.length>0?[e("v-list-group",{key:r,staticClass:"px-0",attrs:{value:n.active},scopedSlots:t._u([{key:"activator",fn:function(){return[e("v-list-item",{staticClass:"pl-0",attrs:{ripple:!1}},[e("v-list-item-content",[e("v-list-item-title",{staticClass:"pl-6 pl-sm-4"},[t._v(t._s(n.title))])],1)],1)]},proxy:!0},{key:"appendIcon",fn:function(){return[e("v-icon",{attrs:{size:"16"}},[t._v("mdi-chevron-down")])]},proxy:!0}],null,!0)},[t._v(" "),t._v(" "),t._l(n.children,function(n,r){return e("v-list-item",{key:r,class:{"second-active":t.currentSecondMenuId===n.id&&t.currentMenuIndex===i},on:{click:function(e){return t.handleMenuClick(n,i)}}},[e("v-list-item-content",[e("v-list-item-title",{staticClass:"pl-10 pl-sm-8"},[t._v(t._s(n.title))])],1)],1)})],2)]:e("v-list-item",{key:r,class:{"second-active":t.currentSecondMenuId===n.id&&t.currentMenuIndex===i},on:{click:function(e){return t.handleMenuClick(n,i)}}},[e("v-list-item-content",[e("v-list-item-title",{staticClass:"pl-6 pl-sm-4"},[t._v(t._s(n.title))])],1)],1)]})],2)]:e("v-list-item",{key:i,staticClass:"px-4",class:{"second-active":t.currentMenuIndex===i},on:{click:function(e){return t.handleMenuClick(n,i)}}},[e("v-list-item-content",{staticClass:"pl-0"},[e("v-list-item-title",[t._v(t._s(n.title))])],1),t._v(" "),e("v-list-item-icon",{staticClass:"my-3"},[e("v-icon",{attrs:{size:"18"}},[t._v("mdi-chevron-right")])],1)],1)]})],2)],1),t._v(" "),e("v-btn",{staticClass:"jh-menu-drawer-close-float-btn",attrs:{elevation:"0",color:"success",fab:"",absolute:"",top:"",left:"",small:"",tile:""},on:{click:function(e){t.mobileMenuDrawer=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),t._v(" "),!t.hideDrawers&&t.showAvatar?e("v-navigation-drawer",{staticClass:"jh-page-nav-bar hidden-md-and-up",attrs:{app:"",clipped:"",temporary:t.temporary,right:""},model:{value:t.mobileUserMenuDrawer,callback:function(e){t.mobileUserMenuDrawer=e},expression:"mobileUserMenuDrawer"}},[e("div",{staticClass:"d-flex flex-column",staticStyle:{height:"calc(100vh - 20px)"}},[e("div",[e("v-toolbar-title",{staticClass:"px-4",staticStyle:{"min-height":"110px"}},[e("div",{staticClass:"d-flex flex-column pt-3",staticStyle:{gap:"12px"}},[e("div",{staticClass:"success--text text-xs text-center",staticStyle:{cursor:"pointer"},on:{click:function(e){t.mobileUserMenuDrawer=!1}}},[e("v-icon",{staticClass:"success--text",attrs:{size:"22"}},[t._v("mdi-window-close")]),t._v(" "),e("div",{staticClass:"success--text",staticStyle:{"margin-top":"-2px"}},[t._v("关闭")])],1),t._v(" "),e("div",{staticClass:"d-flex align-start mb-2",staticStyle:{gap:"4px"}},[e("v-icon",{attrs:{size:36}},[t._v("mdi-account-circle")]),t._v(" "),e("div",{staticClass:"flex-1"},[e("div",{staticClass:"text-xs"},[t._v("\n "+t._s(t.userInfo.username)+"\n "),e("span",{staticClass:"text-caption grey--text"},[t._v(t._s(t.userInfo.userId))])]),t._v(" "),e("div",{staticClass:"d-flex flex-wrap",staticStyle:{gap:"4px"}},t._l(t.userInfo.roles,function(n,i){return e("span",{key:i,staticClass:"text-caption px-1 grey--text",staticStyle:{border:"1px solid #ccc","border-radius":"4px"}},[t._v("\n "+t._s(n)+"\n ")])}),0)])],1)])]),t._v(" "),e("v-divider",{staticClass:"jh-divider"})],1),t._v(" "),e("v-list",{staticClass:"flex-1",attrs:{nav:"",dense:""}},t._l(t.avatarMenuList,function(n,i){return e("v-list-item",{key:i,on:{click:function(e){return t.handleMenuClick(n)}}},[e("v-list-item-icon",{staticClass:"mr-1 mt-1"},[e("v-icon",{attrs:{size:"16",color:"grey darken-3"}},[t._v("mdi-account-cog-outline")])],1),t._v(" "),e("v-list-item-content",[e("v-list-item-title",{attrs:{color:"grey darken-3"}},[t._v(t._s(n.title))])],1)],1)}),1),t._v(" "),e("div",{staticClass:"px-4"},[e("v-btn",{attrs:{block:"",elevation:"0",small:"",color:"error"},on:{click:t.handleLogout}},[e("v-icon",{attrs:{size:"16"}},[t._v("mdi-logout")]),t._v(" "),e("span",{staticClass:"ml-2"},[t._v("登出")])],1)],1)],1)]):t._e(),t._v(" "),e("v-app-bar",{staticClass:"jh-page-header px-8",attrs:{app:"","clipped-left":"",height:"52",flat:""}},[!t.hideDrawers&&t.isMobile?e("div",{staticClass:"hidden-md-and-up d-flex flex-column justify-center align-start",staticStyle:{width:"60px",cursor:"pointer"},on:{click:function(e){t.mobileMenuDrawer=!t.mobileMenuDrawer}}},[e("span",{staticClass:"success--text text-caption"},[e("v-icon",{staticClass:"success--text",attrs:{size:"24"}},[t._v("mdi-menu")]),t._v(" "),e("div",{staticClass:"text-xs",staticStyle:{"margin-top":"-2px"}},[t._v("目录")])],1)]):t._e(),t._v(" "),e("v-toolbar-title",{staticClass:"pl-0"},[e("span",{staticClass:"hidden-sm-and-down text-h6 font-weight-bold"},[t._t("title",function(){return[t._v(t._s(t.appTitle))]})],2),t._v(" "),e("span",{staticClass:"hidden-md-and-up font-weight-medium text-center"},[e("div",{staticClass:"text-base"},[t._v(t._s(t.appTitle))]),t._v(" "),e("div",{staticClass:"text-xs grey--text text--darken-2",staticStyle:{"margin-top":"-2px"}},[t._t("subtitle")],2)])]),t._v(" "),e("v-spacer",{staticClass:"hidden-sm-and-down"}),t._v(" "),t.hideDrawers?t._e():e("v-tabs",{staticClass:"hidden-sm-and-down",attrs:{"show-arrows":"","slider-size":"0",color:"success"}},[t._l(t.menuList,function(n,i){return[n.children&&0!==n.children.length?[e("v-menu",{key:i,attrs:{"offset-y":""},scopedSlots:t._u([{key:"activator",fn:function(r){var a=r.on,o=r.attrs;return[e("v-tab",t._g(t._b({staticClass:"px-2 mx-1 jh-header-tab",class:{"jh-header-tab-active":t.currentMenuIndex===i}},"v-tab",o,!1),a),[t._v("\n "+t._s(n.title)+"\n "),e("v-icon",{attrs:{size:"12"}},[t._v("mdi-chevron-down")])],1)]}}],null,!0)},[t._v(" "),e("v-list",{attrs:{nav:"",dense:""}},[t._l(n.children,function(n,r){return[n.children&&n.children.length>0?[e("v-menu",{key:r,attrs:{"offset-x":"",right:""},scopedSlots:t._u([{key:"activator",fn:function(i){var r=i.on,a=i.attrs;return[e("v-list-item",t._g(t._b({},"v-list-item",a,!1),r),[e("v-list-item-content",[e("v-list-item-title",{staticStyle:{color:"#41434f"}},[t._v(t._s(n.title))])],1),t._v(" "),e("v-list-item-action",[e("v-icon",[t._v("mdi-chevron-right")])],1)],1)]}}],null,!0)},[t._v(" "),e("v-list",{attrs:{nav:"",dense:""}},t._l(n.children,function(n,r){return e("v-list-item",{key:r,class:{"second-active":t.currentSecondMenuId===n.id&&t.currentMenuIndex===i},on:{click:function(e){return t.handleMenuClick(n,i)}}},[e("v-list-item-content",[e("v-list-item-title",{staticStyle:{color:"#41434f"}},[t._v(t._s(n.title))])],1)],1)}),1)],1)]:e("v-list-item",{key:r,class:{"second-active":t.currentSecondMenuId===n.id&&t.currentMenuIndex===i},on:{click:function(e){return t.handleMenuClick(n,i)}}},[e("v-list-item-content",[e("v-list-item-title",{staticStyle:{color:"#41434f"}},[t._v(t._s(n.title))])],1)],1)]})],2)],1)]:[e("v-tab",{key:i,staticClass:"px-2 mx-1 jh-header-tab",class:{"jh-header-tab-active":t.currentMenuIndex===i},on:{click:function(e){return t.handleMenuClick(n,i)}}},[t._v("\n "+t._s(n.title)+"\n ")])]]})],2),t._v(" "),e("div",{staticClass:"d-flex align-center",staticStyle:{"white-space":"nowrap"}},[t.rightMenuList.length>0?e("div",{staticClass:"d-flex align-center mr-2"},t._l(t.rightMenuList,function(n,i){return e("div",{key:i,staticClass:"d-flex align-center ml-4 jh-right-menu",staticStyle:{cursor:"pointer"},on:{click:function(e){return t.handleMenuClick(n)}}},[n.icon?e("v-icon",{attrs:{size:"20"}},[t._v(t._s(n.icon))]):t._e(),t._v(" "),e("div",{class:{"ml-1":n.icon}},[t._v(t._s(n.title))])],1)}),0):t._e(),t._v(" "),t.rightMenuList.length>0?e("v-divider",{staticClass:"mx-3 jh-divider",attrs:{vertical:""}}):t._e(),t._v(" "),t.showAvatar?[t.isMobile?e("div",{staticClass:"jh-avatar-menu-btn d-flex flex-column justify-center align-end hidden-sm-and-up",on:{click:function(e){t.mobileUserMenuDrawer=!t.mobileUserMenuDrawer}}},[e("div",{staticClass:"text-center"},[e("v-icon",{attrs:{size:24,color:"success"}},[t._v("mdi-account-circle")]),t._v(" "),e("div",{staticStyle:{"margin-top":"-2px"}},[e("p",{staticClass:"text-xs success--text mb-0",staticStyle:{"max-width":"60px",overflow:"hidden","text-overflow":"ellipsis"}},[t._v("\n "+t._s(t.userInfo.username)+"\n ")])])],1)]):t._e(),t._v(" "),e("v-menu",{attrs:{"offset-y":""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[t.isMobile?t._e():e("div",t._g(t._b({staticClass:"jh-avatar-menu-btn d-flex align-center px-1 hidden-xs-only"},"div",r,!1),i),[e("v-icon",{attrs:{size:32,color:"grey lighten-2"}},[t._v("mdi-account-circle")]),t._v(" "),e("div",{staticClass:"ml-1"},[e("p",{staticClass:"caption black--text mb-0"},[t._v(t._s(t.userInfo.username))])])],1)]}}],null,!1,2365689925)},[t._v(" "),e("v-list",{attrs:{nav:"",dense:""}},[e("v-list-item",[e("v-list-item-content",[e("p",{staticClass:"caption black--text mb-0"},[t._v(t._s(t.userInfo.username))]),t._v(" "),e("p",{staticClass:"caption grey--text mb-0",staticStyle:{"font-size":"10px"}},[t._v(t._s(t.userInfo.userId))])])],1),t._v(" "),t.userInfo.roles&&t.userInfo.roles.length>0?e("div",{staticStyle:{"max-width":"220px",padding:"0 16px"}},t._l(t.userInfo.roles,function(n,i){return e("v-chip",{key:i,staticClass:"mr-1 mb-1",staticStyle:{"font-size":"10px"},attrs:{label:"","x-small":"",outlined:""}},[t._v("\n "+t._s(n)+"\n ")])}),1):t._e(),t._v(" "),t.userInfo.roles&&t.userInfo.roles.length>0?e("v-divider",{staticClass:"my-1 jh-divider"}):t._e(),t._v(" "),t._l(t.avatarMenuList,function(n,i){return e("v-list-item",{key:i,on:{click:function(e){return t.handleMenuClick(n)}}},[e("v-list-item-icon",{staticClass:"mr-1 mt-1"},[e("v-icon",{attrs:{size:"16",color:"grey darken-3"}},[t._v("mdi-account-cog-outline")])],1),t._v(" "),e("v-list-item-content",[e("v-list-item-title",{attrs:{color:"grey darken-3"}},[t._v(t._s(n.title))])],1)],1)}),t._v(" "),e("v-list-item",{on:{click:t.handleLogout}},[e("v-list-item-icon",{staticClass:"mr-1 mt-1"},[e("v-icon",{attrs:{size:"16",color:"grey darken-3"}},[t._v("mdi-logout")])],1),t._v(" "),e("v-list-item-content",[e("v-list-item-title",{attrs:{color:"grey darken-3"}},[t._v("登出")])],1)],1)],2)],1)]:t._e()],2)],1)],1)};function i(t,e,n,i,r,a,o,l){var s,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),o?(s=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=s):r&&(s=l?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),s)if(c.functional){c._injectStyles=s;var u=c.render;c.render=function(t,e){return s.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,s):[s]}return{exports:t,options:c}}n._withStripped=!0;const r=i({name:"JhMenu",props:{appTitle:{type:String,default:"JianghuJS"},menuList:{type:Array,default:function(){return[]}},rightMenuList:{type:Array,default:function(){return[]}},avatarMenuList:{type:Array,default:function(){return[]}},userInfo:{type:Object,default:function(){return{username:"Guest",userId:"",roles:[]}}},showAvatar:{type:Boolean,default:!0},activeMenuIndex:{type:Number,default:-1},activeSecondMenuId:{type:String,default:null},temporary:{type:Boolean,default:!0},hideDrawers:{type:Boolean,default:!1}},data:function(){return{mobileMenuDrawer:!1,mobileUserMenuDrawer:!1,currentMenuIndex:this.activeMenuIndex,currentSecondMenuId:this.activeSecondMenuId,isMobile:window.innerWidth<600}},watch:{activeMenuIndex:function(t){this.currentMenuIndex=t},activeSecondMenuId:function(t){this.currentSecondMenuId=t}},methods:{handleMenuClick:function(t,e){void 0!==e&&(this.currentMenuIndex=e),t.id&&(this.currentSecondMenuId=t.id),this.mobileMenuDrawer=!1,this.mobileUserMenuDrawer=!1,this.$emit("menu-click",t,e)},handleLogout:function(){this.mobileUserMenuDrawer=!1,this.$emit("logout")}}},n,[],!1,null,"73ddcbb9",null).exports;var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"jh-scene"},[e("v-row",{staticClass:"ma-0"},[e("v-btn-toggle",{class:{"mr-md-2":t.showActionBtn},attrs:{value:t.currentSceneIndex,mandatory:"",dense:"",color:"success"},on:{change:t.handleSceneChange}},t._l(t.sceneList,function(n,i){return e("v-btn",{key:i,attrs:{small:""}},[t._v(t._s(n.name))])}),1),t._v(" "),t.showActionBtn?e("v-menu",{attrs:{"offset-y":""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-btn-toggle",{attrs:{dense:"",color:"white"}},[e("v-btn",t._g(t._b({attrs:{small:""}},"v-btn",r,!1),i),[e("v-icon",{staticClass:"mx-0",attrs:{small:""}},[t._v("mdi-chevron-down")])],1)],1)]}}],null,!1,1121844081),model:{value:t.isSceneOperationShown,callback:function(e){t.isSceneOperationShown=e},expression:"isSceneOperationShown"}},[t._v(" "),e("v-list",{staticClass:"pb-0",attrs:{dense:""}},[e("v-list-item",{on:{click:t.openCreateSceneDialog}},[e("v-list-item-title",{staticClass:"success--text"},[e("v-icon",{staticClass:"success--text",attrs:{small:""}},[t._v("mdi-plus")]),t._v(" "),e("span",{staticClass:"success--text"},[t._v("新建场景")])],1)],1),t._v(" "),e("v-list-item",{on:{click:t.openSceneListDialog}},[e("v-list-item-title",{staticClass:"success--text"},[e("v-icon",{staticClass:"success--text",attrs:{small:""}},[t._v("mdi-cog-outline")]),t._v(" "),e("span",{staticClass:"success--text"},[t._v("场景管理")])],1)],1)],1)],1):t._e()],1),t._v(" "),e("v-dialog",{attrs:{persistent:"",width:"360px"},model:{value:t.isCreateSceneDialogShown,callback:function(e){t.isCreateSceneDialogShown=e},expression:"isCreateSceneDialogShown"}},[e("v-card",[e("v-card-title",[e("v-row",{staticClass:"ma-0"},[e("div",{staticStyle:{"font-size":"16px"}},[t._v("新建场景")]),t._v(" "),e("v-spacer"),t._v(" "),e("v-btn",{staticClass:"elevation-0",attrs:{fab:"","x-small":""},on:{click:t.closeCreateSceneDialog}},[e("v-icon",{attrs:{dark:""}},[t._v("mdi-close")])],1)],1)],1),t._v(" "),e("v-card-text",[e("div",{staticClass:"mb-2"},[e("span",{staticClass:"jh-input-label"},[t._v("场景名称")]),t._v(" "),e("v-text-field",{staticClass:"jh-v-input",attrs:{dense:"","single-line":"",filled:"","hide-details":"",placeholder:"场景名称,最多10个字符",rules:t.validationRules.requireRules},model:{value:t.createItem.name,callback:function(e){t.$set(t.createItem,"name",e)},expression:"createItem.name"}})],1),t._v(" "),t.hasFormSlot?e("div",{staticClass:"mb-2"},[e("span",{staticClass:"jh-input-label"},[t._v("筛选条件")]),t._v(" "),t._t("form",null,{form:t.createItem.form})],2):t._e()]),t._v(" "),e("v-card-actions",{staticClass:"pb-4"},[e("v-row",{staticClass:"ma-0 pa-6 pt-2 justify-end"},[e("v-btn",{staticClass:"ml-2",attrs:{small:"",color:"success"},on:{click:t.doCreateScene}},[t._v("保存")]),t._v(" "),e("v-btn",{staticClass:"ml-2",attrs:{small:""},on:{click:t.closeCreateSceneDialog}},[t._v("取消")])],1)],1)],1)],1),t._v(" "),e("v-dialog",{attrs:{persistent:"",width:"360px"},model:{value:t.isSceneListShown,callback:function(e){t.isSceneListShown=e},expression:"isSceneListShown"}},[e("v-card",{staticClass:"scene-manage"},[e("v-card-title",[e("v-row",{staticClass:"ma-0"},[e("div",{staticStyle:{"font-size":"16px"}},[t._v("场景管理")]),t._v(" "),e("v-spacer"),t._v(" "),e("v-btn",{staticClass:"elevation-0",attrs:{fab:"","x-small":""},on:{click:t.closeSceneListDialog}},[e("v-icon",{attrs:{dark:""}},[t._v("mdi-close")])],1)],1)],1),t._v(" "),e("v-card-text",{staticClass:"pb-2"},[e("v-card",{attrs:{outlined:""}},[e("v-list",{staticClass:"scene-list",attrs:{dense:""}},[t.sceneCustomList&&t.sceneCustomList.length?t._l(t.sceneCustomList,function(n){return e("v-list-item",{key:n.id,staticClass:"scene-item px-2"},[e("v-list-item-content",[t._v(t._s(n.name))]),t._v(" "),e("v-list-item-icon",{on:{click:function(e){return e.stopPropagation(),t.doDeleteScene(n)}}},[e("v-icon",{attrs:{size:"22"}},[t._v("mdi-delete")])],1)],1)}):[e("div",{staticClass:"text-center grey--text",staticStyle:{"line-height":"100px"}},[t._v("暂无自定义场景")])]],2)],1)],1),t._v(" "),e("v-card-actions",{staticClass:"pb-4"},[e("v-row",{staticClass:"ma-0 pa-6 pt-2 justify-end"},[e("v-btn",{staticClass:"ml-2",attrs:{small:"",color:"success"},on:{click:t.changeToCreateDialog}},[t._v("新建场景")]),t._v(" "),e("v-btn",{staticClass:"ml-2",attrs:{small:""},on:{click:t.closeSceneListDialog}},[t._v("取消")])],1)],1)],1)],1)],1)};function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function c(t,e,n){return(e=function(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}a._withStripped=!0;const f=i({name:"JhScene",props:{initFormData:{type:Object,default:function(){return{}}},storageKey:{type:String,default:"jh-scene-list"},scenes:{type:Array,default:function(){return[]}},currentSceneId:{type:String,default:null},showActionBtn:{type:Boolean,default:!0},useLocalStorage:{type:Boolean,default:!1}},data:function(){return{validationRules:{requireRules:[function(t){return!!t||"此项必填"}]},sceneList:[],sceneCustomList:[],deleteItem:{},createItem:{name:"",form:{}},isCreateSceneDialogShown:!1,isSceneOperationShown:!1,isSceneListShown:!1,currentSceneIndex:0}},computed:{hasFormSlot:function(){return!!this.$scopedSlots.form}},watch:{scenes:{handler:function(t){t&&t.length>0&&(this.sceneList=u(t),this.updateCustomSceneList())},immediate:!0}},created:function(){this.initSceneList()},methods:{initSceneList:function(){this.useLocalStorage?this.getSceneListFromStorage():this.scenes&&this.scenes.length>0&&(this.sceneList=u(this.scenes)),this.updateCustomSceneList(),this.useDefaultScene()},getSceneListFromStorage:function(){var t=localStorage.getItem(this.storageKey);null==t&&(t="[]"),t=JSON.parse(t),this.sceneList=t},saveSceneListToStorage:function(){this.useLocalStorage&&localStorage.setItem(this.storageKey,JSON.stringify(this.sceneList))},updateCustomSceneList:function(){this.sceneCustomList=this.sceneList.filter(function(t){return!t.system})},useDefaultScene:function(){var t=this.sceneList.find(function(t){return!0===t.default});!t&&this.sceneList.length>0&&(t=this.sceneList[0]),t&&(this.currentSceneIndex=this.sceneList.findIndex(function(e){return e.id===t.id}),this.useScene(t))},useScene:function(t){this.$emit("scene-change",t)},handleSceneChange:function(t){this.currentSceneIndex=t,this.sceneList[t]&&this.useScene(this.sceneList[t])},getUUID:function(t){for(var e=[],n="0123456789abcdef",i=0;i<10;i++)e[i]=n.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=n.substr(3&e[19]|8,1),t+"-"+e.join("")},prepareCreateSceneData:function(){this.createItem={name:"",form:s({},this.initFormData),id:this.getUUID("scene")}},openCreateSceneDialog:function(){this.prepareCreateSceneData(),this.isCreateSceneDialogShown=!0,this.isSceneOperationShown=!1},closeCreateSceneDialog:function(){this.isCreateSceneDialogShown=!1},validateSceneName:function(){var t=this.createItem.name;if(!t)throw new Error("场景名称不能为空");if(this.sceneList.some(function(e){return e.name===t}))throw new Error("场景名称重复")},doCreateScene:function(){try{this.validateSceneName();var t=s({},this.createItem);this.sceneList.push(t),this.saveSceneListToStorage(),this.updateCustomSceneList(),this.closeCreateSceneDialog(),this.currentSceneIndex=this.sceneList.length-1,this.useScene(t),this.$emit("scene-created",t)}catch(t){this.$emit("error",t.message)}},openSceneListDialog:function(){this.isSceneListShown=!0,this.isSceneOperationShown=!1},closeSceneListDialog:function(){this.isSceneListShown=!1},changeToCreateDialog:function(){this.closeSceneListDialog(),this.openCreateSceneDialog()},doDeleteScene:function(t){var e;this.deleteItem=s({},t),(null===(e=this.sceneList[this.currentSceneIndex])||void 0===e?void 0:e.id)===t.id&&this.useDefaultScene(),this.sceneList=this.sceneList.filter(function(e){return e.id!==t.id}),this.saveSceneListToStorage(),this.updateCustomSceneList(),this.$emit("scene-deleted",t)}}},a,[],!1,null,"50ab6d9d",null).exports;var h=function(){var t=this,e=t._self._c;return e("div",{staticClass:"date-range-picker-container"},[e("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"auto","max-width":"600"},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-text-field",t._g(t._b({attrs:{prefix:t.prefix,"prepend-inner-icon":"mdi-calendar",readonly:"",filled:t.filled,dense:t.dense,outlined:t.outlined,"hide-details":t.hideDetails,clearable:t.clearable},on:{"click:clear":t.clearDateRange},model:{value:t.dateRangeText,callback:function(e){t.dateRangeText=e},expression:"dateRangeText"}},"v-text-field",r,!1),i))]}}]),model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[t._v(" "),e("v-card",[e("v-card-text",{staticClass:"pa-0"},[e("div",{staticClass:"d-flex"},[e("v-list",{staticClass:"quick-select-list",attrs:{dense:"",nav:""}},[e("v-list-item",{class:{"v-item--active v-list-item--active primary--text":t.isLast7Days},on:{click:function(e){return t.quickSelect(7)}}},[e("v-list-item-title",[t._v("最近7天")])],1),t._v(" "),e("v-list-item",{class:{"v-item--active v-list-item--active primary--text":t.isLast30Days},on:{click:function(e){return t.quickSelect(30)}}},[e("v-list-item-title",[t._v("最近30天")])],1),t._v(" "),e("v-list-item",{class:{"v-item--active v-list-item--active primary--text":t.isLast90Days},on:{click:function(e){return t.quickSelect(90)}}},[e("v-list-item-title",[t._v("最近90天")])],1),t._v(" "),e("v-list-item",{class:{"v-item--active v-list-item--active primary--text":t.isThisMonth},on:{click:t.selectThisMonth}},[e("v-list-item-title",[t._v("本月")])],1),t._v(" "),e("v-list-item",{class:{"v-item--active v-list-item--active primary--text":t.isLastMonth},on:{click:t.selectLastMonth}},[e("v-list-item-title",[t._v("上月")])],1),t._v(" "),e("v-list-item",{class:{"v-item--active v-list-item--active primary--text":t.isLast365Days},on:{click:function(e){return t.quickSelect(365)}}},[e("v-list-item-title",[t._v("最近一年")])],1)],1),t._v(" "),e("v-date-picker",{attrs:{"no-title":"",range:"",color:"primary"},model:{value:t.tempDateRange,callback:function(e){t.tempDateRange=e},expression:"tempDateRange"}})],1)]),t._v(" "),e("v-divider"),t._v(" "),e("v-card-actions",[e("v-spacer"),t._v(" "),e("v-btn",{attrs:{text:"",color:"grey"},on:{click:t.cancelDateRange}},[t._v("取消")]),t._v(" "),e("v-btn",{attrs:{text:"",color:"primary"},on:{click:t.confirmDateRange}},[t._v("确认")])],1)],1)],1)],1)};function p(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return v(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}h._withStripped=!0;const m=i({name:"JhDateRangePicker",props:{value:{type:Array,default:function(){return[]}},prefix:{type:String,default:""},filled:{type:Boolean,default:!0},dense:{type:Boolean,default:!0},outlined:{type:Boolean,default:!1},hideDetails:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0}},data:function(){return{menu:!1,dateRange:[],tempDateRange:[]}},computed:{dateRangeText:function(){return this.dateRange&&2===this.dateRange.length?"".concat(this.formatDate(this.dateRange[0])," ~ ").concat(this.formatDate(this.dateRange[1])):""},isLast7Days:function(){if(!this.tempDateRange||2!==this.tempDateRange.length)return!1;var t=this.getToday(),e=this.subtractDays(7);return this.tempDateRange[0]===e&&this.tempDateRange[1]===t},isLast30Days:function(){if(!this.tempDateRange||2!==this.tempDateRange.length)return!1;var t=this.getToday(),e=this.subtractDays(30);return this.tempDateRange[0]===e&&this.tempDateRange[1]===t},isLast90Days:function(){if(!this.tempDateRange||2!==this.tempDateRange.length)return!1;var t=this.getToday(),e=this.subtractDays(90);return this.tempDateRange[0]===e&&this.tempDateRange[1]===t},isThisMonth:function(){if(!this.tempDateRange||2!==this.tempDateRange.length)return!1;var t=this.getToday(),e=this.getStartOfMonth();return this.tempDateRange[0]===e&&this.tempDateRange[1]===t},isLastMonth:function(){if(!this.tempDateRange||2!==this.tempDateRange.length)return!1;var t=this.getStartOfLastMonth(),e=this.getEndOfLastMonth();return this.tempDateRange[0]===t&&this.tempDateRange[1]===e},isLast365Days:function(){if(!this.tempDateRange||2!==this.tempDateRange.length)return!1;var t=this.getToday(),e=this.subtractDays(365);return this.tempDateRange[0]===e&&this.tempDateRange[1]===t}},watch:{value:{handler:function(t){t&&Array.isArray(t)&&2===t.length&&(this.dateRange=p(t),this.tempDateRange=p(t))},immediate:!0},menu:function(t){t&&(this.tempDateRange=2===this.dateRange.length?p(this.dateRange):[])}},mounted:function(){this.value&&Array.isArray(this.value)&&2===this.value.length&&(this.dateRange=p(this.value),this.tempDateRange=p(this.value))},methods:{formatDate:function(t){return t||""},getToday:function(){var t=new Date;return this.toDateString(t)},subtractDays:function(t){var e=new Date;return e.setDate(e.getDate()-t),this.toDateString(e)},getStartOfMonth:function(){var t=new Date;return this.toDateString(new Date(t.getFullYear(),t.getMonth(),1))},getStartOfLastMonth:function(){var t=new Date;return this.toDateString(new Date(t.getFullYear(),t.getMonth()-1,1))},getEndOfLastMonth:function(){var t=new Date;return this.toDateString(new Date(t.getFullYear(),t.getMonth(),0))},toDateString:function(t){var e=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0");return"".concat(e,"-").concat(n,"-").concat(i)},confirmDateRange:function(){if(this.tempDateRange&&2===this.tempDateRange.length){var t=p(this.tempDateRange).sort();this.dateRange=t,this.$emit("input",this.dateRange),this.$emit("change",this.dateRange)}this.menu=!1},cancelDateRange:function(){this.tempDateRange=2===this.dateRange.length?p(this.dateRange):[],this.menu=!1},clearDateRange:function(){this.dateRange=[],this.tempDateRange=[],this.$emit("input",[]),this.$emit("change",[])},quickSelect:function(t){var e=this.getToday(),n=this.subtractDays(t);this.tempDateRange=[n,e]},selectThisMonth:function(){var t=this.getToday(),e=this.getStartOfMonth();this.tempDateRange=[e,t]},selectLastMonth:function(){var t=this.getStartOfLastMonth(),e=this.getEndOfLastMonth();this.tempDateRange=[t,e]}}},h,[],!1,null,"f2799a5a",null).exports;var y=function(){var t=this,e=t._self._c;return e("div",{staticClass:"jh-query-filter"},[e("v-form",{ref:"queryForm",on:{submit:function(e){return e.preventDefault(),t.handleSearch.apply(null,arguments)}}},[e("v-row",{class:t.rowClass},[e("JhFormFields",{attrs:{fields:t.visibleFieldsWithConfig,showLabels:t.showLabels,labelClass:t.labelClass,inputClass:t.inputClass,defaultDense:t.dense,defaultFilled:t.filled,defaultOutlined:t.outlined,defaultSingleLine:t.singleLine,hideDetails:!0,layout:"vertical"},on:{"field-change":t.handleFieldChange},scopedSlots:t._u([t._l(t.fields,function(e){return{key:"field-".concat(e.key),fn:function(n){return[t._t("field-".concat(e.key),null,null,n)]}}})],null,!0),model:{value:t.formData,callback:function(e){t.formData=e},expression:"formData"}}),t._v(" "),e("v-col",{staticClass:"d-flex align-end flex-column justify-center"},[t.showLabels?e("span",{staticClass:"opacity-0",class:t.labelClass},[t._v("\n 工具栏\n ")]):t._e(),t._v(" "),t._t("buttons",function(){return[e("div",{staticClass:"jh-query-filter-buttons",class:t.buttonClass},[e("v-btn",{staticClass:"jh-query-filter-search-btn",attrs:{color:"primary",small:"small"===t.buttonSize,dense:"small"===t.buttonSize,depressed:"",loading:t.searching},on:{click:t.handleSearch}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-magnify")]),t._v("\n "+t._s(t.searchText)+"\n ")],1),t._v(" "),e("v-btn",{staticClass:"jh-query-filter-reset-btn",attrs:{outlined:"",small:"small"===t.buttonSize,dense:"small"===t.buttonSize},on:{click:t.handleReset}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-refresh")]),t._v("\n "+t._s(t.resetText)+"\n ")],1),t._v(" "),t.collapsible&&t.fields.length>t.defaultVisibleCount?e("v-btn",{staticClass:"jh-query-filter-collapse-btn",attrs:{text:"",small:"small"===t.buttonSize,dense:"small"===t.buttonSize,color:"primary"},on:{click:t.toggleCollapse}},[t._v("\n "+t._s(t.collapsed?t.expandText:t.collapseText)+"\n "),e("v-icon",{attrs:{right:"",small:""}},[t._v(t._s(t.collapsed?"mdi-chevron-down":"mdi-chevron-up"))])],1):t._e()],1)]},{formData:t.formData,search:t.handleSearch,reset:t.handleReset})],2)],1)],1)],1)};y._withStripped=!0;var b=function(){var t=this,e=t._self._c;return e("div",{class:t.formFieldsClasses},[t.title||t.$slots.title?e("div",{staticClass:"jh-form-fields-header"},[t._t("title",function(){return[e("div",{staticClass:"jh-form-fields-title"},[t._v("\n "+t._s(t.title)+"\n "),t.tooltip?e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-icon",t._g(t._b({staticClass:"ml-1",attrs:{small:""}},"v-icon",r,!1),i),[t._v("mdi-help-circle-outline")])]}}],null,!1,1799656693)},[t._v(" "),e("span",[t._v(t._s(t.tooltip))])]):t._e()],1)]}),t._v(" "),t.description?e("div",{staticClass:"jh-form-fields-description"},[t._v(t._s(t.description))]):t._e()],2):t._e(),t._v(" "),e("v-row",t._b({class:t.rowClass,attrs:{dense:t.dense}},"v-row",t.rowProps,!1),[t._l(t.visibleFields,function(n,i){return["group"===n.type?e("v-col",{key:"group-".concat(i),attrs:{cols:"12"}},[e("div",{staticClass:"jh-form-group-title",class:n.titleClass},[n.divider&&i>0?e("v-divider",{staticClass:"mb-4"}):t._e(),t._v(" "),n.title?e("h3",{staticClass:"text-h6 mb-2"},[t._v(t._s(n.title))]):t._e(),t._v(" "),n.description?e("p",{staticClass:"text-caption grey--text mb-3"},[t._v(t._s(n.description))]):t._e()],1)]):e("v-col",{key:n.key,class:t.getFieldColClass(n),attrs:{cols:t.getFieldCols(n),sm:t.getFieldSm(n),md:t.getFieldMd(n),lg:t.getFieldLg(n),xl:t.getFieldXl(n)}},[e("div",{class:t.getFieldWrapperClass(n)},[n.label&&t.showLabels&&("horizontal"===t.layout||"horizontal"===n.layout)?e("div",{class:t.getHorizontalLabelClass(n),style:t.getHorizontalLabelStyle(n)},[n.required&&t.showRequiredMark?e("span",{staticClass:"error--text mr-1"},[t._v("*")]):t._e(),t._v("\n "+t._s(n.label)+"\n "),n.tooltip?e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-icon",t._g(t._b({staticClass:"ml-1",attrs:{small:""}},"v-icon",r,!1),i),[t._v("mdi-help-circle-outline")])]}}],null,!0)},[t._v(" "),e("span",[t._v(t._s(n.tooltip))])]):t._e()],1):t._e(),t._v(" "),e("div",{class:t.getFieldInputClass(n)},[n.label&&t.showLabels&&"horizontal"!==t.layout&&"horizontal"!==n.layout?e("div",{class:t.getVerticalLabelClass(n)},[n.required&&t.showRequiredMark?e("span",{staticClass:"error--text"},[t._v("*")]):t._e(),t._v("\n "+t._s(n.label)+"\n "),n.tooltip?e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-icon",t._g(t._b({staticClass:"ml-1",attrs:{small:""}},"v-icon",r,!1),i),[t._v("mdi-help-circle-outline")])]}}],null,!0)},[t._v(" "),e("span",[t._v(t._s(n.tooltip))])]):t._e()],1):t._e(),t._v(" "),t.isFieldReadonly(n)?e("div",{staticClass:"jh-form-readonly-text"},[t._v("\n "+t._s(t.getReadonlyValue(n))+"\n ")]):["text"!==n.type&&n.type?"textarea"===n.type?e("v-textarea",t._b({class:t.inputClass,attrs:{dense:t.getDense(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,placeholder:n.placeholder,rows:n.rows||3,"hide-details":n.hideDetails||t.hideDetails},on:{input:function(e){return t.handleInput(n.key,e)},change:function(e){return t.handleChange(n.key,e)},blur:function(e){return t.handleBlur(n.key,e)}}},"v-textarea",n.props,!1)):"number"===n.type?e("v-text-field",t._b({class:t.inputClass,attrs:{type:"number",dense:t.getDense(n),"single-line":t.getSingleLine(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,placeholder:n.placeholder,"hide-details":n.hideDetails||t.hideDetails},on:{input:function(e){return t.handleInput(n.key,e)},change:function(e){return t.handleChange(n.key,e)},blur:function(e){return t.handleBlur(n.key,e)}}},"v-text-field",n.props,!1)):"select"===n.type?e("v-select",t._b({class:t.inputClass,attrs:{dense:t.getDense(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),items:t.getFieldOptions(n),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,placeholder:n.placeholder,"item-text":n.itemText||"text","item-value":n.itemValue||"value",multiple:n.multiple,chips:n.chips,"hide-details":n.hideDetails||t.hideDetails,"small-chips":""},on:{input:function(e){return t.handleInput(n.key,e)},change:function(e){return t.handleChange(n.key,e)},blur:function(e){return t.handleBlur(n.key,e)}}},"v-select",n.props,!1)):"autocomplete"===n.type?e("v-autocomplete",t._b({class:t.inputClass,attrs:{dense:t.getDense(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),items:t.getFieldOptions(n),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,placeholder:n.placeholder,"item-text":n.itemText||"text","item-value":n.itemValue||"value","hide-details":n.hideDetails||t.hideDetails},on:{input:function(e){return t.handleInput(n.key,e)},change:function(e){return t.handleChange(n.key,e)},blur:function(e){return t.handleBlur(n.key,e)}}},"v-autocomplete",n.props,!1)):"date"===n.type?e("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"290px"},scopedSlots:t._u([{key:"activator",fn:function(i){var r=i.on,a=i.attrs;return[e("v-text-field",t._g(t._b({class:t.inputClass,attrs:{dense:t.getDense(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),placeholder:n.placeholder,"hide-details":n.hideDetails||t.hideDetails,readonly:""}},"v-text-field",a,!1),r))]}}],null,!0),model:{value:t.dateMenus[n.key],callback:function(e){t.$set(t.dateMenus,n.key,e)},expression:"dateMenus[field.key]"}},[t._v(" "),e("v-date-picker",t._b({attrs:{value:t.getFieldValue(n.key),locale:n.locale||"zh-cn"},on:{input:function(e){t.dateMenus[n.key]=!1,t.handleInput(n.key,e)}}},"v-date-picker",n.pickerProps,!1))],1):"time"===n.type?e("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"290px"},scopedSlots:t._u([{key:"activator",fn:function(i){var r=i.on,a=i.attrs;return[e("v-text-field",t._g(t._b({class:t.inputClass,attrs:{dense:t.getDense(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),placeholder:n.placeholder,"hide-details":n.hideDetails||t.hideDetails,readonly:""}},"v-text-field",a,!1),r))]}}],null,!0),model:{value:t.timeMenus[n.key],callback:function(e){t.$set(t.timeMenus,n.key,e)},expression:"timeMenus[field.key]"}},[t._v(" "),e("v-time-picker",t._b({attrs:{value:t.getFieldValue(n.key),format:"24hr"},on:{input:function(e){t.timeMenus[n.key]=!1,t.handleInput(n.key,e)}}},"v-time-picker",n.pickerProps,!1))],1):"color"===n.type?e("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"320px"},scopedSlots:t._u([{key:"activator",fn:function(i){var r=i.on;return i.attrs,[e("v-text-field",t._g(t._b({class:t.inputClass,attrs:{dense:t.getDense(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),placeholder:n.placeholder,"hide-details":n.hideDetails||t.hideDetails,readonly:""},scopedSlots:t._u([{key:"append",fn:function(){return[e("span",{staticClass:"jh-color-preview",style:{backgroundColor:t.getFieldValue(n.key)||n.defaultValue||"#ffffff"}})]},proxy:!0}],null,!0)},"v-text-field",n.props,!1),r))]}}],null,!0),model:{value:t.colorMenus[n.key],callback:function(e){t.$set(t.colorMenus,n.key,e)},expression:"colorMenus[field.key]"}},[t._v(" "),e("v-color-picker",t._b({attrs:{value:t.getFieldValue(n.key)||n.defaultValue||"#000000",flat:"","hide-mode-switch":!1!==n.hideModeSwitch},on:{input:function(e){return t.handleColorInput(n,e)}}},"v-color-picker",n.pickerProps,!1))],1):"slider"===n.type?e("v-slider",t._b({class:t.inputClass,attrs:{value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,min:void 0!==n.min?n.min:0,max:void 0!==n.max?n.max:100,step:void 0!==n.step?n.step:1,"thumb-label":n.thumbLabel,ticks:n.ticks,"tick-size":n.tickSize,color:n.color||"primary","hide-details":n.hideDetails||t.hideDetails},on:{input:function(e){return t.handleInput(n.key,e)}}},"v-slider",n.props,!1)):"range-slider"===n.type?e("v-range-slider",t._b({class:t.inputClass,attrs:{value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,min:void 0!==n.min?n.min:0,max:void 0!==n.max?n.max:100,step:void 0!==n.step?n.step:1,"thumb-label":n.thumbLabel,ticks:n.ticks,"tick-size":n.tickSize,color:n.color||"primary","hide-details":n.hideDetails||t.hideDetails},on:{input:function(e){return t.handleInput(n.key,e)}}},"v-range-slider",n.props,!1)):"switch"===n.type?e("v-switch",t._b({attrs:{"input-value":t.getFieldValue(n.key),label:n.switchLabel,disabled:t.getFieldDisabled(n),readonly:n.readonly,color:n.color||"success","hide-details":n.hideDetails||t.hideDetails},on:{change:function(e){return t.handleChange(n.key,e)}}},"v-switch",n.props,!1)):"checkbox"===n.type?e("v-checkbox",t._b({attrs:{"input-value":t.getFieldValue(n.key),label:n.checkboxLabel,disabled:t.getFieldDisabled(n),readonly:n.readonly,color:n.color||"success","hide-details":n.hideDetails||t.hideDetails},on:{change:function(e){return t.handleChange(n.key,e)}}},"v-checkbox",n.props,!1)):"radio"===n.type?e("v-radio-group",t._b({attrs:{value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,row:!1!==n.row,"hide-details":n.hideDetails||t.hideDetails},on:{change:function(e){return t.handleChange(n.key,e)}}},"v-radio-group",n.props,!1),t._l(t.getFieldOptions(n),function(t){return e("v-radio",{key:t.value,attrs:{label:t.text,value:t.value,color:n.color||"success"}})}),1):"slot"===n.type?t._t("field-".concat(n.key),null,{field:n,value:t.getFieldValue(n.key),values:t.values,updateField:t.updateField}):t._e():e("v-text-field",t._b({class:t.inputClass,attrs:{dense:t.getDense(n),"single-line":t.getSingleLine(n),filled:t.getFilled(n),outlined:t.getOutlined(n),value:t.getFieldValue(n.key),rules:t.getRules(n),disabled:t.getFieldDisabled(n),readonly:n.readonly,placeholder:n.placeholder,prefix:n.prefix,suffix:n.suffix,"hide-details":n.hideDetails||t.hideDetails},on:{input:function(e){return t.handleInput(n.key,e)},change:function(e){return t.handleChange(n.key,e)},blur:function(e){return t.handleBlur(n.key,e)}}},"v-text-field",n.props,!1))]],2)])])]})],2),t._v(" "),t._t("footer",null,{values:t.values})],2)};function g(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return _(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function S(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?S(Object(n),!0).forEach(function(e){x(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function x(t,e,n){return(e=function(t){var e=function(t){if("object"!=w(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==w(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}b._withStripped=!0;const k=i({name:"JhFormFields",props:{fields:{type:Array,default:function(){return[]}},value:{type:Object,default:function(){return{}}},title:{type:String,default:""},description:{type:String,default:""},tooltip:{type:String,default:""},layout:{type:String,default:"vertical",validator:function(t){return["horizontal","vertical","inline"].includes(t)}},showLabels:{type:Boolean,default:!0},labelWidth:{type:[Number,String],default:"auto"},labelAlign:{type:String,default:"right",validator:function(t){return["left","right","center"].includes(t)}},showRequiredMark:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},defaultDense:{type:Boolean,default:!0},defaultFilled:{type:Boolean,default:!0},defaultOutlined:{type:Boolean,default:!1},defaultSingleLine:{type:Boolean,default:!0},defaultColsMd:{type:Number,default:6},hideDetails:{type:[Boolean,String],default:!1},labelClass:{type:String,default:"jh-input-label"},inputClass:{type:String,default:"jh-v-input"},rowClass:{type:String,default:""},rowProps:{type:Object,default:function(){return{}}},validationRules:{type:Object,default:function(){return{require:[function(t){return!!t||"必填"}],email:[function(t){return!t||/.+@.+\..+/.test(t)||"邮箱格式不正确"}],phone:[function(t){return!t||/^1[3-9]\d{9}$/.test(t)||"手机号格式不正确"}],number:[function(t){return!t||!isNaN(t)||"请输入数字"}],integer:[function(t){return!t||Number.isInteger(Number(t))||"请输入整数"}]}}},dense:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},dependencies:{type:Array,default:function(){return[]}}},data:function(){return{values:{},dateMenus:{},timeMenus:{},colorMenus:{},dependencyWatchers:[]}},computed:{formFieldsClasses:function(){return x({"jh-form-fields":!0,"jh-form-fields--bordered":this.bordered,"jh-form-fields--readonly":this.readonly,"jh-form-fields--disabled":this.disabled},"jh-form-fields--".concat(this.layout),!0)},visibleFields:function(){var t=this;return this.fields.filter(function(e){return"function"==typeof e.visible?e.visible(t.values):void 0===e.visible||e.visible})}},watch:{value:{handler:function(t){this.values=C({},t)},immediate:!0,deep:!0},dependencies:{handler:function(t){this.setupDependencyWatchers(t)},immediate:!0}},mounted:function(){this.initValues(),this.setupFieldDependencies()},beforeDestroy:function(){this.dependencyWatchers.forEach(function(t){return t()}),this.dependencyWatchers=[]},methods:{initValues:function(){var t=C({},this.value);this.fields.forEach(function(e){void 0!==e.defaultValue&&void 0===t[e.key]&&(t[e.key]=e.defaultValue)}),this.values=t},setupFieldDependencies:function(){var t=this;this.fields.forEach(function(e){e.dependencies&&Array.isArray(e.dependencies)&&e.dependencies.forEach(function(n){var i=t.$watch(function(){return t.values[n]},function(i,r){i!==r&&t.handleDependencyChange(e,n,i,r)});t.dependencyWatchers.push(i)})})},setupDependencyWatchers:function(t){var e=this;this.dependencyWatchers.forEach(function(t){return t()}),this.dependencyWatchers=[],t.forEach(function(t){var n=e.$watch(function(){return e.values[t]},function(n,i){n!==i&&e.$emit("dependency-change",{key:t,value:n,oldValue:i,values:e.values})});e.dependencyWatchers.push(n)})},handleDependencyChange:function(t,e,n,i){"function"==typeof t.onDependencyChange&&t.onDependencyChange(e,n,i,this.values),this.$emit("field-dependency-change",{field:t.key,dependency:e,value:n,oldValue:i,values:this.values})},getFieldValue:function(t){return this.values[t]},getFieldOptions:function(t){return"function"==typeof t.options?t.options(this.values):t.options||[]},getFieldCols:function(t){return"inline"===this.layout?"auto":t.cols?"object"===w(t.cols)&&t.cols.xs||t.cols:12},getFieldSm:function(t){return"inline"===this.layout?"auto":t.cols&&"object"===w(t.cols)?t.cols.sm:12},getFieldMd:function(t){return"inline"===this.layout?"auto":t.cols&&"object"===w(t.cols)?t.cols.md||this.defaultColsMd:t.cols||this.defaultColsMd},getFieldLg:function(t){return"inline"===this.layout?"auto":t.cols&&"object"===w(t.cols)?t.cols.lg||t.cols.md||this.defaultColsMd:t.cols||this.defaultColsMd},getFieldXl:function(t){return"inline"===this.layout?"auto":t.cols&&"object"===w(t.cols)?t.cols.xl||t.cols.md||this.defaultColsMd:t.cols||this.defaultColsMd},getFieldColClass:function(t){return t.colClass||""},getFieldWrapperClass:function(t){var e=t.layout||this.layout;return"jh-field-wrapper ".concat("horizontal"===e?"d-flex align-center":"")},getHorizontalLabelClass:function(t){var e=t.labelAlign||this.labelAlign;return"jh-field-label jh-input-label jh-field-label--horizontal text-".concat(e," flex-shrink-0")},getHorizontalLabelStyle:function(t){var e=t.labelWidth||this.labelWidth;return{width:"number"==typeof e?"".concat(e,"px"):e,minWidth:"number"==typeof e?"".concat(e,"px"):e}},getVerticalLabelClass:function(t){return"jh-field-label jh-input-label jh-field-label--vertical mb-1"},getFieldInputClass:function(t){return"horizontal"===(t.layout||this.layout)?"jh-field-input flex-grow-1":"jh-field-input"},getFieldDisabled:function(t){return"function"==typeof t.disabled?t.disabled(this.values):void 0!==t.disabled?t.disabled:this.disabled},isFieldReadonly:function(t){return"function"==typeof t.readonly?t.readonly(this.values):void 0!==t.readonly?t.readonly:this.readonly},getReadonlyValue:function(t){var e=this.values[t.key];if("function"==typeof t.readonlyRender)return t.readonlyRender(e,this.values);if(("select"===t.type||"radio"===t.type)&&t.options){var n=this.getFieldOptions(t);if(t.multiple&&Array.isArray(e))return e.map(function(t){var e=n.find(function(e){return e.value===t});return e?e.text:t}).join(", ");var i=n.find(function(t){return t.value===e});return i?i.text:e}return"switch"===t.type||"checkbox"===t.type?e?"是":"否":"range-slider"===t.type&&Array.isArray(e)?e.join(" ~ "):e||"-"},getDense:function(t){return void 0!==t.dense?t.dense:this.defaultDense},getFilled:function(t){return void 0!==t.filled?t.filled:this.defaultFilled},getOutlined:function(t){return void 0!==t.outlined?t.outlined:this.defaultOutlined},getSingleLine:function(t){return void 0!==t.singleLine?t.singleLine:this.defaultSingleLine},getRules:function(t){var e=this,n=[];return t.required&&n.push(function(e){return!!e||"".concat(t.label||"此字段","为必填项")}),t.rules&&(Array.isArray(t.rules)?n.push.apply(n,g(t.rules)):"string"==typeof t.rules&&t.rules.split("|").forEach(function(t){var i=t.trim();e.validationRules[i]&&n.push.apply(n,g(e.validationRules[i]))})),n},handleInput:function(t,e){this.$set(this.values,t,e),this.$emit("input",this.values),this.$emit("field-input",{key:t,value:e,values:this.values})},handleChange:function(t,e){this.$set(this.values,t,e),this.$emit("input",this.values),this.$emit("field-change",{key:t,value:e,values:this.values})},handleColorInput:function(t,e){this.handleInput(t.key,e),!1!==t.closeOnSelect&&this.$set(this.colorMenus,t.key,!1)},handleBlur:function(t,e){this.$emit("field-blur",{key:t,value:e,values:this.values})},updateField:function(t,e){this.$set(this.values,t,e),this.$emit("input",this.values),this.$emit("field-change",{key:t,value:e,values:this.values})},getValues:function(){return C({},this.values)},setFieldsValue:function(t){this.values=C(C({},this.values),t),this.$emit("input",this.values)},setFieldValue:function(t,e){this.$set(this.values,t,e),this.$emit("input",this.values)},resetFields:function(){var t={};this.fields.forEach(function(e){void 0!==e.defaultValue&&(t[e.key]=e.defaultValue)}),this.values=t,this.$emit("input",this.values),this.$emit("reset",this.values)}}},b,[],!1,null,"763c73b1",null).exports;function j(t){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}function O(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return D(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(D(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,D(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,D(d,"constructor",c),D(c,"constructor",s),s.displayName="GeneratorFunction",D(c,r,"GeneratorFunction"),D(d),D(d,r,"Generator"),D(d,i,function(){return this}),D(d,"toString",function(){return"[object Generator]"}),(O=function(){return{w:a,m:f}})()}function D(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}D=function(t,e,n,i){function a(e,n){D(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},D(t,e,n,i)}function P(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function F(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach(function(e){T(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function T(t,e,n){return(e=function(t){var e=function(t){if("object"!=j(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==j(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const A=i({name:"JhQueryFilter",components:{JhFormFields:k},props:{fields:{type:Array,default:function(){return[]}},initialValues:{type:Object,default:function(){return{}}},collapsible:{type:Boolean,default:!0},defaultCollapsed:{type:Boolean,default:!0},defaultVisibleCount:{type:Number,default:3},colSpan:{type:Object,default:function(){return{xs:24,sm:12,md:6,lg:4}}},showLabels:{type:Boolean,default:!0},dense:{type:Boolean,default:!0},filled:{type:Boolean,default:!0},outlined:{type:Boolean,default:!1},singleLine:{type:Boolean,default:!0},searchText:{type:String,default:"查询"},resetText:{type:String,default:"重置"},expandText:{type:String,default:"展开"},collapseText:{type:String,default:"收起"},buttonSize:{type:String,default:"small",validator:function(t){return["small","default","large"].includes(t)}},buttonAlign:{type:String,default:"left",validator:function(t){return["left","right","center"].includes(t)}},loading:{type:Boolean,default:!1},labelClass:{type:String,default:"jh-input-label"},inputClass:{type:String,default:"jh-v-input"},rowClass:{type:String,default:"ma-0"},buttonClass:{type:String,default:"gap-2"},buttonColumnClass:{type:String,default:""}},data:function(){return{formData:{},collapsed:this.defaultCollapsed,searching:!1}},computed:{visibleFields:function(){return this.collapsible&&this.collapsed?this.fields.slice(0,this.defaultVisibleCount):this.fields},visibleFieldsWithConfig:function(){var t=this;return this.visibleFields.map(function(e){return F(F({},e),{},{cols:e.cols||{xs:t.colSpan.xs||12,sm:t.colSpan.sm||12,md:t.colSpan.md||8,lg:t.colSpan.lg||6},props:F({clearable:!0,placeholder:e.placeholder||"请输入".concat(e.text)},e.props)})})}},watch:{initialValues:{handler:function(t){this.formData=F({},t)},immediate:!0,deep:!0},loading:function(t){this.searching=t}},mounted:function(){this.initFormData()},methods:{initFormData:function(){var t=F({},this.initialValues);this.fields.forEach(function(e){void 0!==e.defaultValue&&void 0===t[e.key]&&(t[e.key]=e.defaultValue)}),this.formData=t},handleFieldChange:function(t){var e,n=t.key,i=t.value;this.$emit("field-change",{key:n,value:i,formData:this.formData}),null!==(e=this.fields.find(function(t){return t.key===n}))&&void 0!==e&&e.realtime&&this.handleSearch()},toggleCollapse:function(){this.collapsed=!this.collapsed,this.$emit("collapse-change",this.collapsed)},handleSearch:function(){var t,e=this;return(t=O().m(function t(){var n;return O().w(function(t){for(;;)switch(t.n){case 0:e.searching=!0;try{n={},Object.keys(e.formData).forEach(function(t){var i=e.formData[t];if(null!=i&&""!==i){if(Array.isArray(i)&&0===i.length)return;n[t]=i}}),e.$emit("search",n)}finally{e.loading||(e.searching=!1)}case 1:return t.a(2)}},t)}),function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){P(a,i,r,o,l,"next",t)}function l(t){P(a,i,r,o,l,"throw",t)}o(void 0)})})()},handleReset:function(){var t=this;this.initFormData(),this.fields.forEach(function(e){t.$set(t.formData,e.key,void 0!==e.defaultValue?e.defaultValue:"")}),this.$emit("reset"),this.handleSearch()},getFormData:function(){return F({},this.formData)},setFieldsValue:function(t){this.formData=F(F({},this.formData),t)},setFieldValue:function(t,e){this.$set(this.formData,t,e)}}},y,[],!1,null,"3f67f486",null).exports;var $=function(){var t=this,e=t._self._c;return e("div",{class:t.wrapperClass,style:t.wrapperStyle},[t.headerTitle||t.$slots["header-title"]||t.$slots["toolbar-extra"]?e("div",{staticClass:"jh-pro-table-header"},[e("div",{staticClass:"jh-pro-table-header-left"},[t.headerTitle||t.$slots["header-title"]?e("div",{staticClass:"jh-pro-table-title"},[t._t("header-title",function(){return[e("span",{staticClass:"jh-pro-table-title-text"},[t._v(t._s(t.headerTitle))]),t._v(" "),t.tooltip?e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-icon",t._g(t._b({staticClass:"ml-1",attrs:{small:""}},"v-icon",r,!1),i),[t._v("mdi-help-circle-outline")])]}}],null,!1,1799656693)},[t._v(" "),e("span",[t._v(t._s(t.tooltip))])]):t._e()]})],2):t._e()]),t._v(" "),e("div",{staticClass:"jh-pro-table-header-right"},[t._t("toolbar-extra")],2)]):t._e(),t._v(" "),t.hasFilterFields?e("jh-query-filter",{ref:"queryFilterRef",staticClass:"pa-0",attrs:{fields:t.filterFieldsResolved,"initial-values":t.computedFilterInitialValues,collapsible:t.filterCollapsible,"default-collapsed":t.filterDefaultCollapsed,"default-visible-count":t.filterDefaultVisibleCount,"col-span":t.filterColSpan,dense:!0,outlined:!1,"show-labels":!1,"search-text":t.filterSearchText,"reset-text":t.filterResetText},on:{search:t.handleFilterSearch,reset:t.handleFilterReset},scopedSlots:t._u([t._l(t.filterFieldsResolved,function(e){return{key:"field-".concat(e.key),fn:function(n){return[t._t("filter-field-".concat(e.key),null,null,n)]}}}),{key:"buttons",fn:function(e){return[t._t("filter-buttons",null,null,e)]}}],null,!0)}):t._e(),t._v(" "),t.showSelectionAlertBar?e("div",{staticClass:"jh-pro-table-alert"},[t.hasAlertContent?e("div",{staticClass:"jh-pro-table-alert-info"},[t.$scopedSlots.alert?[t._t("alert",null,{selectedRowKeys:t.selectedRowKeys,selectedRows:t.selectedItems})]:"function"==typeof t.tableAlertRender?e("render-function",{attrs:{render:t.tableAlertRender,params:t.tableAlertScope}}):[e("v-icon",{staticClass:"mr-2",attrs:{small:"",color:"primary"}},[t._v("mdi-checkbox-marked-circle")]),t._v(" "),e("div",[t._v("已选择 "),e("strong",{staticClass:"primary--text"},[t._v(t._s(t.selectedItems.length))]),t._v(" 项")]),t._v(" "),e("v-spacer"),t._v(" "),e("a",{staticClass:"ml-2",attrs:{text:"","x-small":""},on:{click:t.clearSelection}},[t._v("清空")])]],2):t._e(),t._v(" "),t.hasAlertActionsContent?e("div",{staticClass:"jh-pro-table-alert-actions"},[t.$scopedSlots["alert-actions"]?[t._t("alert-actions",null,{selectedRowKeys:t.selectedRowKeys,selectedRows:t.selectedItems})]:e("render-function",{attrs:{render:t.tableAlertOptionRender,params:t.tableAlertScope}})],2):t._e()]):t._e(),t._v(" "),!1!==t.toolbar?e("v-row",{staticClass:"jh-pro-table-toolbar ma-0 pb-3 pa-3 pa-md-0",attrs:{align:"center"}},[t.headerTitle||t.$slots["header-title"]?t._e():e("div",{staticClass:"flex items-center gap-2"},[t._t("toolbar-actions",function(){return[t.showCreateButton?e("v-btn",{staticClass:"mr-2",attrs:{color:"success",small:""},on:{click:function(e){return e.stopPropagation(),t.$emit("create-click")}}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-plus")]),t._v(" "),e("span",{staticClass:"d-none d-sm-inline"},[t._v("新增")])],1):t._e()]})],2),t._v(" "),e("v-spacer"),t._v(" "),e("div",{staticClass:"flex items-center gap-2 justify-end flex-wrap"},[t.toolbarConfig.search?e("v-text-field",{staticClass:"jh-v-input jh-toolbar-search border",attrs:{prefix:t.isMobile?"":"筛选",placeholder:t.isMobile?"筛选":"",dense:"",filled:"","single-line":"","hide-details":"",clearable:""},model:{value:t.searchInputInternal,callback:function(e){t.searchInputInternal=e},expression:"searchInputInternal"}}):t._e(),t._v(" "),t.toolbarConfig.export?e("v-btn",{attrs:{icon:"",small:"",title:"导出"},on:{click:t.handleExport}},[e("v-icon",[t._v("mdi-export-variant")])],1):t._e(),t._v(" "),t.toolbarConfig.refresh?e("v-btn",{attrs:{icon:"",small:"",title:"刷新"},on:{click:t.handleRefresh}},[e("v-icon",[t._v("mdi-refresh")])],1):t._e(),t._v(" "),t.toolbarConfig.density?e("v-menu",{attrs:{"offset-y":""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-btn",t._g(t._b({attrs:{icon:"",small:"",title:"密度"}},"v-btn",r,!1),i),[e("v-icon",[t._v("mdi-format-line-spacing")])],1)]}}],null,!1,1668111094)},[t._v(" "),e("v-list",{attrs:{dense:""}},[e("v-list-item",{on:{click:function(e){t.currentDensity="default"}}},[e("v-list-item-title",["default"===t.currentDensity?e("v-icon",{attrs:{small:"",left:""}},[t._v("mdi-check")]):t._e(),t._v("\n 默认\n ")],1)],1),t._v(" "),e("v-list-item",{on:{click:function(e){t.currentDensity="medium"}}},[e("v-list-item-title",["medium"===t.currentDensity?e("v-icon",{attrs:{small:"",left:""}},[t._v("mdi-check")]):t._e(),t._v("\n 中等\n ")],1)],1),t._v(" "),e("v-list-item",{on:{click:function(e){t.currentDensity="compact"}}},[e("v-list-item-title",["compact"===t.currentDensity?e("v-icon",{attrs:{small:"",left:""}},[t._v("mdi-check")]):t._e(),t._v("\n 紧凑\n ")],1)],1)],1)],1):t._e(),t._v(" "),t.toolbarConfig.setting?e("v-menu",{attrs:{"offset-y":"",left:"","max-height":"400"},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-btn",t._g(t._b({attrs:{icon:"",small:"",title:"列设置"}},"v-btn",r,!1),i),[e("v-icon",[t._v("mdi-cog-outline")])],1)]}}],null,!1,911125755)},[t._v(" "),e("v-card",{attrs:{"min-width":"200"}},[e("v-card-text",{staticClass:"pa-2"},[e("div",{staticClass:"text-caption font-weight-bold mb-2"},[t._v("列显示")]),t._v(" "),e("v-list",{attrs:{dense:""}},t._l(t.internalColumns,function(n){return e("v-list-item",{key:n.value,staticClass:"px-2",on:{click:function(e){return t.toggleColumn(n)}}},[e("v-list-item-action",{staticClass:"mr-2"},[e("v-checkbox",{attrs:{"input-value":!1!==n.visible,"hide-details":"",dense:""},on:{click:function(e){return e.stopPropagation(),t.toggleColumn(n)}}})],1),t._v(" "),e("v-list-item-content",[e("v-list-item-title",{staticClass:"text-body-2"},[t._v(t._s(n.text||n.title))])],1)],1)}),1),t._v(" "),e("v-divider",{staticClass:"my-2"}),t._v(" "),e("v-btn",{attrs:{text:"",small:"",block:""},on:{click:t.resetColumns}},[t._v("重置")])],1)],1)],1):t._e(),t._v(" "),t.toolbarConfig.fullscreen?e("v-btn",{attrs:{icon:"",small:"",title:t.isFullscreen?"退出全屏":"全屏"},on:{click:t.toggleFullscreen}},[e("v-icon",[t._v(t._s(t.isFullscreen?"mdi-fullscreen-exit":"mdi-fullscreen"))])],1):t._e()],1)],1):t._e(),t._v(" "),t.$slots["table-extra"]?e("div",{staticClass:"jh-pro-table-extra"},[t._t("table-extra")],2):t._e(),t._v(" "),e("v-data-table",t._g(t._b({ref:"dataTable",staticClass:"jh-fixed-table-height elevation-0 mb-xs-4 mx-3 mx-md-0 mt-3",class:[t.tableClassComputed,t.densityClass],attrs:{headers:t.visibleHeaders,items:t.currentItems,search:t.searchInputInternal,"footer-props":t.currentFooterProps,"items-per-page":t.currentItemsPerPage,page:t.currentPage,"server-items-length":t.serverItemsLength,"mobile-breakpoint":t.mobileBreakpoint,loading:t.currentLoading,"checkbox-color":t.checkboxColor,"fixed-header":t.fixedHeader,"show-select":t.showSelectComputed,"single-select":t.singleSelectComputed,value:t.selectedItems,"item-key":t.computedRowKey,dense:t.tableDense,"multi-sort":t.multiSort,"must-sort":t.mustSort,"sort-by":t.internalSortBy,"sort-desc":t.internalSortDesc},on:{"click:row":t.handleRowClick,input:t.handleSelectionChange,"update:page":t.handlePageChange,"update:items-per-page":t.handleItemsPerPageChange,"update:sort-by":t.handleSortByUpdate,"update:sort-desc":t.handleSortDescUpdate,"update:options":t.handleOptionsUpdate},scopedSlots:t._u([t._l(t.customHeaderSlots,function(e){return{key:"header.".concat(e.value),fn:function(n){var i=n.header;return[t._t("header.".concat(e.value),function(){return[t._v(t._s(i.text||i.title))]},{header:i})]}}}),t._l(t.visibleHeaders,function(n){return{key:"item.".concat(n.value),fn:function(i){var r=i.item,a=i.value,o=i.index;return["action"===n.value?[t._t("item.action",function(){return[t.isMobile?t._e():e("div",{staticClass:"flex items-center gap-1"},[t.actionColumn&&t.actionColumn.buttons?[t._l(t.getVisibleButtons(r),function(n,i){return[n.tooltip?e("v-tooltip",{key:"tooltip-".concat(i),attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(i){var a=i.on,o=i.attrs;return[e("v-btn",t._g(t._b({attrs:{"x-small":"",text:"link"===n.type,icon:"icon"===n.type,color:n.color||"primary"},on:{click:function(e){return e.stopPropagation(),t.handleActionClick(n,r)}}},"v-btn",o,!1),a),[n.icon?e("v-icon",{attrs:{small:""}},[t._v(t._s(n.icon))]):t._e(),t._v(" "),"icon"!==n.type?e("span",[t._v(t._s(n.text))]):t._e()],1)]}}],null,!0)},[t._v(" "),e("span",[t._v(t._s(n.tooltip))])]):e("v-btn",{key:"btn-".concat(i),attrs:{"x-small":"",text:"link"===n.type,icon:"icon"===n.type,color:n.color||"primary"},on:{click:function(e){return e.stopPropagation(),t.handleActionClick(n,r)}}},[n.icon?e("v-icon",{attrs:{small:""}},[t._v(t._s(n.icon))]):t._e(),t._v(" "),"icon"!==n.type?e("span",[t._v(t._s(n.text))]):t._e()],1)]})]:[t.showUpdateAction?e("span",{staticClass:"success--text font-weight-medium font-size-2 mr-2 cursor-pointer",attrs:{role:"button"},on:{click:function(e){return e.stopPropagation(),t.$emit("update-click",r)}}},[e("v-icon",{staticClass:"success--text",attrs:{size:"16"}},[t._v("mdi-note-edit-outline")]),t._v("详情\n ")],1):t._e(),t._v(" "),t.showDeleteAction?e("span",{staticClass:"error--text font-weight-medium font-size-2 mr-2 cursor-pointer",attrs:{role:"button"},on:{click:function(e){return e.stopPropagation(),t.$emit("delete-click",r)}}},[e("v-icon",{staticClass:"error--text",attrs:{size:"16"}},[t._v("mdi-trash-can-outline")]),t._v("删除\n ")],1):t._e()]],2),t._v(" "),t.isMobile?e("v-menu",{attrs:{"offset-y":""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("span",t._g(t._b({staticClass:"success--text font-weight-medium font-size-2",attrs:{role:"button"}},"span",r,!1),i),[e("v-icon",{staticClass:"success--text",attrs:{size:"20"}},[t._v("mdi-chevron-down")]),t._v("操作\n ")],1)]}}],null,!0)},[t._v(" "),e("v-list",{attrs:{dense:""}},[t.actionColumn&&t.actionColumn.buttons?t._l(t.getVisibleButtons(r),function(n,i){return e("v-list-item",{key:i,on:{click:function(e){return e.stopPropagation(),t.handleActionClick(n,r)}}},[n.icon?e("v-list-item-icon",[e("v-icon",{attrs:{small:""}},[t._v(t._s(n.icon))])],1):t._e(),t._v(" "),e("v-list-item-title",[t._v(t._s(n.text))])],1)}):[t.showUpdateAction?e("v-list-item",{on:{click:function(e){return e.stopPropagation(),t.$emit("update-click",r)}}},[e("v-list-item-title",[t._v("详情")])],1):t._e(),t._v(" "),t.showDeleteAction?e("v-list-item",{on:{click:function(e){return e.stopPropagation(),t.$emit("delete-click",r)}}},[e("v-list-item-title",[t._v("删除")])],1):t._e()]],2)],1):t._e()]},{item:r})]:[n.slot||t.$scopedSlots["item.".concat(n.value)]?t._t("item.".concat(n.value),null,{item:r,value:a,index:o}):e("div",{staticClass:"jh-table-schema-cell d-flex align-center flex-wrap"},["status"===n.valueType?[e("v-chip",t._b({staticClass:"mr-2",attrs:{small:"",label:""}},"v-chip",t.getStatusChipProps(n,a,r),!1),[t.getStatusChipProps(n,a,r).icon?e("v-icon",{attrs:{left:"","x-small":""}},[t._v("\n "+t._s(t.getStatusChipProps(n,a,r).icon)+"\n ")]):t._e(),t._v("\n "+t._s(t.getStatusText(n,a,r))+"\n ")],1)]:"progress"===n.valueType?[e("div",{staticClass:"d-flex align-center w-100"},[e("v-progress-linear",t._b({staticClass:"flex-grow-1",attrs:{value:t.getProgressValue(a)}},"v-progress-linear",t.getProgressProps(n),!1)),t._v(" "),!1!==t.getProgressProps(n).showValue?e("span",{staticClass:"ml-2 text-caption"},[t._v("\n "+t._s(t.formatPercentValue(t.getProgressValue(a),n.valueProps))+"\n ")]):t._e()],1)]:"avatar"===n.valueType?[e("v-avatar",t._b({},"v-avatar",t.getAvatarProps(n),!1),[t.getAvatarSrc(a)?e("img",{attrs:{src:t.getAvatarSrc(a),alt:t.formatColumnValue(n,r,a,o)}}):e("span",[t._v(t._s(t.getAvatarInitials(t.formatColumnValue(n,r,a,o))))])]),t._v(" "),e("span",{staticClass:"ml-2"},[t._v(t._s(t.formatColumnValue(n,r,a,o)))])]:"json"===n.valueType?e("pre",{staticClass:"jh-table-json mr-2"},[t._v(t._s(t.formatJsonValue(a))+"\n ")]):"index"===n.valueType?e("span",[t._v(t._s(t.getDisplayIndex(o)))]):"code"===n.valueType?e("code",{staticClass:"jh-table-code"},[t._v(t._s(t.formatColumnValue(n,r,a,o)))]):"dateRange"===n.valueType?e("span",[t._v(t._s(t.formatDateRangeValue(a,n.valueProps)))]):"date"===n.valueType||"dateTime"===n.valueType||"time"===n.valueType?e("span",[t._v("\n "+t._s(t.formatDateValue(a,n.valueType,n.valueProps))+"\n ")]):"money"===n.valueType?e("span",[t._v(t._s(t.formatMoneyValue(a,n.valueProps)))]):"percent"===n.valueType?e("span",[t._v(t._s(t.formatPercentValue(a,n.valueProps)))]):"digit"===n.valueType?e("span",[t._v(t._s(t.formatDigitValue(a,n.valueProps)))]):[t.shouldShowEllipsis(n,a,r,o)?e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(i){var l=i.on,s=i.attrs;return[e("span",t._g(t._b({staticClass:"text-truncate d-inline-block",staticStyle:{"max-width":"200px"}},"span",s,!1),l),[t._v("\n "+t._s(t.formatColumnValue(n,r,a,o))+"\n ")])]}}],null,!0)},[t._v(" "),e("span",[t._v(t._s(t.formatColumnValue(n,r,a,o)))])]):e("span",[t._v(t._s(t.formatColumnValue(n,r,a,o)))])],t._v(" "),n.copyable&&t.hasCopyValue(n,r,a)?e("v-btn",{staticClass:"ml-1",attrs:{icon:"","x-small":""},on:{click:function(e){e.stopPropagation(),t.copyToClipboard(t.getCopyValue(n,r,a))}}},[e("v-icon",{attrs:{"x-small":""}},[t._v("mdi-content-copy")])],1):t._e()],2)]]}}}),t._l(t.passthroughSlots,function(e){return{key:e,fn:function(n){return[t._t(e,null,null,n)]}}}),t.$scopedSlots.loading?null:{key:"loading",fn:function(){return[e("div",{staticClass:"jh-no-data pa-6"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"primary"}}),t._v(" "),e("div",{staticClass:"mt-2"},[t._v("数据加载中...")])],1)]},proxy:!0},t.$scopedSlots["no-data"]?null:{key:"no-data",fn:function(){return[e("div",{staticClass:"jh-no-data pa-6"},[e("v-icon",{attrs:{large:"",color:"grey lighten-1"}},[t._v("mdi-inbox-outline")]),t._v(" "),e("div",{staticClass:"mt-2 text-body-2 grey--text"},[t._v("暂无数据")])],1)]},proxy:!0},t.$scopedSlots["no-results"]?null:{key:"no-results",fn:function(){return[e("div",{staticClass:"jh-no-data pa-6"},[e("v-icon",{attrs:{large:"",color:"grey lighten-1"}},[t._v("mdi-magnify")]),t._v(" "),e("div",{staticClass:"mt-2 text-body-2 grey--text"},[t._v("未找到匹配的数据")])],1)]},proxy:!0},t.$scopedSlots["footer.page-text"]?null:{key:"footer.page-text",fn:function(n){return[e("span",[t._v(t._s(n.pageStart)+"-"+t._s(n.pageStop))]),t._v(" "),e("span",{staticClass:"ml-1"},[t._v("共"+t._s(n.itemsLength)+"条")])]}}],null,!0)},"v-data-table",t.mergedDataTableProps,!1),t.dataTableListeners))],1)};$._withStripped=!0;var B=["class","style"],R=["title"];function V(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return E(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(E(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,E(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,E(d,"constructor",c),E(c,"constructor",s),s.displayName="GeneratorFunction",E(c,r,"GeneratorFunction"),E(d),E(d,r,"Generator"),E(d,i,function(){return this}),E(d,"toString",function(){return"[object Generator]"}),(V=function(){return{w:a,m:f}})()}function E(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}E=function(t,e,n,i){function a(e,n){E(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},E(t,e,n,i)}function L(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function N(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){L(a,i,r,o,l,"next",t)}function l(t){L(a,i,r,o,l,"throw",t)}o(void 0)})}}function M(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function K(t){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K(t)}function z(t){return function(t){if(Array.isArray(t))return G(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||J(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(t,e){if(t){if("string"==typeof t)return G(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(t,e):void 0}}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function W(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function U(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?W(Object(n),!0).forEach(function(e){q(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function q(t,e,n){return(e=function(t){var e=function(t){if("object"!=K(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=K(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==K(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var H={success:{color:"success",textColor:"white"},warning:{color:"warning",textColor:"white"},error:{color:"error",textColor:"white"},processing:{color:"info",textColor:"white"},default:{color:"grey lighten-2",textColor:"grey darken-2"}};const Y=i({name:"JhTable",inheritAttrs:!1,components:{JhQueryFilter:A,RenderFunction:{name:"JhTableRenderFunction",functional:!0,props:{render:{type:Function,default:null},params:{type:Object,default:function(){return{}}}},render:function(t,e){var n=e.props.render;if("function"!=typeof n)return null;var i=e.props.params||{};return n.length>=2?n(t,i):n(i)}}},props:{headers:{type:Array,required:!0,default:function(){return[]}},items:{type:Array,default:function(){return[]}},request:{type:Function,default:null},showFilter:{type:Boolean,default:!1},filterFields:{type:Array,default:function(){return[]}},autoFilterFromHeaders:{type:Boolean,default:!0},filterInitialValues:{type:Object,default:function(){return{}}},filterCollapsible:{type:Boolean,default:!0},filterDefaultCollapsed:{type:Boolean,default:!0},filterDefaultVisibleCount:{type:Number,default:3},filterColSpan:{type:Object,default:function(){return{xs:24,sm:12,md:6,lg:4}}},filterSearchText:{type:String,default:"查询"},filterResetText:{type:String,default:"重置"},toolbar:{type:[Object,Boolean],default:function(){return{search:!0,refresh:!0,setting:!0,density:!0,fullscreen:!1}}},showSearch:{type:Boolean,default:!0},searchInput:{type:String,default:null},dataTableProps:{type:Object,default:function(){return{}}},sortBy:{type:[Array,String],default:function(){return[]}},sortDesc:{type:[Array,Boolean],default:function(){return[]}},multiSort:{type:Boolean,default:!1},mustSort:{type:Boolean,default:!1},showCreateButton:{type:Boolean,default:!0},showUpdateAction:{type:Boolean,default:!0},showDeleteAction:{type:Boolean,default:!0},actionColumn:{type:[Object,Boolean],default:null},columnsState:{type:Object,default:function(){return{persistenceKey:"",defaultVisible:null,value:null}}},pagination:{type:[Object,Boolean],default:function(){return{current:1,pageSize:20,pageSizeOptions:[10,20,50,100],showTotal:!0}}},itemsPerPage:{type:Number,default:20},rowSelection:{type:[Object,Boolean],default:null},tableAlertRender:{type:[Function,Boolean],default:null},tableAlertOptionRender:{type:[Function,Boolean],default:null},showSelect:{type:Boolean,default:!1},singleSelect:{type:Boolean,default:!1},headerTitle:{type:String,default:""},tooltip:{type:String,default:""},cardBordered:{type:Boolean,default:!0},ghost:{type:Boolean,default:!1},polling:{type:Number,default:0},debounceTime:{type:Number,default:300},loading:{type:Boolean,default:!1},rowKey:{type:String,default:void 0},itemKey:{type:String,default:void 0},size:{type:String,default:"medium",validator:function(t){return["default","medium","compact"].includes(t)}},footerProps:{type:Object,default:function(){return{itemsPerPageOptions:[10,20,50,100],itemsPerPageText:"每页",itemsPerPageAllText:"所有",showFirstLastPage:!0,showCurrentPage:!0}}},mobileBreakpoint:{type:Number,default:600},checkboxColor:{type:String,default:"success"},tableClass:{type:[String,Object,Array],default:function(){return{zebraLine:!0}}},fixedHeader:{type:Boolean,default:!0},dense:{type:Boolean,default:!1},page:{type:Number,default:void 0},serverItemsLength:{type:Number,default:void 0},value:{type:Array,default:void 0},context:{type:Object,default:null}},data:function(){return{isMobile:window.innerWidth<500,searchInputInternal:this.searchInput,currentLoading:this.loading,currentItems:this.items||[],currentPage:void 0!==this.page?this.page:this.pagination&&this.pagination.current||1,currentItemsPerPage:this.itemsPerPage,serverItemsLength:void 0!==this.serverItemsLength?this.serverItemsLength:-1,internalColumns:[],currentDensity:this.size,isFullscreen:!1,selectedItems:this.value||[],filterValues:{},pollingTimer:null,searchDebounceTimer:null,internalSortBy:this.normalizeSortBy(this.sortBy),internalSortDesc:this.normalizeSortDesc(this.sortDesc),sortChangeTimer:null,hasAppliedDefaultRowSelection:!1,computedRowKey:this.rowKey||this.itemKey||this.$attrs["item-key"]||"id"}},computed:{selectedRowKeys:function(){var t=this;return this.selectedItems.map(function(e){return e[t.computedRowKey]})},tableAlertScope:function(){return{selectedRowKeys:this.selectedRowKeys,selectedRows:this.selectedItems,onCleanSelected:this.clearSelection}},hasFilterFields:function(){return this.showFilter&&this.filterFieldsResolved.length>0},filterFieldsResolved:function(){var t=Array.isArray(this.filterFields)?this.filterFields.map(function(t){return U({},t)}):[],e=new Set(t.map(function(t){return null==t?void 0:t.key}).filter(Boolean)),n=this.autoFilterConfig.fields.filter(function(t){return!e.has(t.key)});return[].concat(z(t),z(n))},computedFilterInitialValues:function(){var t=U(U({},this.autoFilterConfig.initialValues),this.filterInitialValues||{});return this.filterFieldsResolved.forEach(function(e){e&&e.key&&void 0===t[e.key]&&(void 0!==e.initialValue?t[e.key]=e.initialValue:void 0!==e.defaultValue&&(t[e.key]=e.defaultValue))}),t},autoFilterConfig:function(){var t=this,e={fields:[],meta:{},initialValues:{}};return this.autoFilterFromHeaders&&Array.isArray(this.internalColumns)&&this.internalColumns.length?(this.internalColumns.forEach(function(n){var i=t.buildAutoFilterField(n);i&&(e.fields.push(i.field),e.meta[i.field.key]={transform:i.transform},void 0!==i.initialValue&&(e.initialValues[i.field.key]=i.initialValue))}),e):e},filterFieldMetaMap:function(){var t=U({},this.autoFilterConfig.meta);return(this.filterFields||[]).forEach(function(e){e&&e.key&&(t[e.key]=U(U({},t[e.key]||{}),{},{transform:e.transform||t[e.key]&&t[e.key].transform}))}),this.filterFieldsResolved.forEach(function(e){e&&e.key&&e.transform&&(t[e.key]=U(U({},t[e.key]||{}),{},{transform:e.transform}))}),t},hasAlertContent:function(){return!!this.$scopedSlots.alert||"function"==typeof this.tableAlertRender||!1!==this.tableAlertRender},hasAlertActionsContent:function(){return!!this.$scopedSlots["alert-actions"]||"function"==typeof this.tableAlertOptionRender},showSelectionAlertBar:function(){return!!this.showSelectComputed&&!!this.selectedItems.length&&(this.hasAlertContent||this.hasAlertActionsContent)},toolbarConfig:function(){return!1===this.toolbar?{}:"object"===K(this.toolbar)?U({search:this.showSearch,refresh:!0,setting:!0,density:!0,fullscreen:!1,export:!1},this.toolbar):{search:this.showSearch,refresh:!0,setting:!0,density:!0,fullscreen:!1,export:!1}},visibleHeaders:function(){return this.internalColumns.filter(function(t){return!1!==t.visible})},customHeaderSlots:function(){var t=this;return this.internalColumns.filter(function(e){return t.$scopedSlots["header.".concat(e.value)]})},passthroughSlots:function(){var t=["loading","no-data","no-results","footer.page-text","toolbar-actions","toolbar-extra","header-title","table-extra","alert","alert-actions"];return Object.keys(this.$scopedSlots).filter(function(e){return!(e.startsWith("item.")||e.startsWith("header.")||e.startsWith("filter-field-")||t.includes(e))})},tableClassComputed:function(){return[this.tableClass,{"jh-table-fullscreen":this.isFullscreen}]},tableDense:function(){return"compact"===this.currentDensity||this.dense},densityClass:function(){return{"jh-table-default":"default"===this.currentDensity,"jh-table-medium":"medium"===this.currentDensity,"jh-table-compact":"compact"===this.currentDensity}},currentFooterProps:function(){return U(U({},{itemsPerPageOptions:[10,20,50,100],itemsPerPageText:"每页",itemsPerPageAllText:"所有",showFirstLastPage:!0,showCurrentPage:!0}),this.footerProps)},showSelectComputed:function(){return!1!==this.rowSelection&&(this.rowSelection&&"object"===K(this.rowSelection)?!1!==this.rowSelection.show:this.showSelect)},singleSelectComputed:function(){return!(!this.rowSelection||"radio"!==this.rowSelection.type)||this.singleSelect},isRowSelectionControlled:function(){return!(!this.rowSelection||!Array.isArray(this.rowSelection.selectedRowKeys))},wrapperClass:function(){return["jh-pro-table",this.$attrs.class,{"jh-pro-table-card":this.cardBordered,"jh-pro-table-ghost":this.ghost}]},wrapperStyle:function(){return this.$attrs.style||null},mergedDataTableProps:function(){var t=["class","style","headers","items","search","footer-props","items-per-page","page","server-items-length","mobile-breakpoint","loading","checkbox-color","fixed-header","show-select","single-select","value","item-key","dense","multi-sort","must-sort","sort-by","sort-desc","request","headerTitle","tooltip","cardBordered","ghost","toolbar","showSearch","searchInput","showFilter","filterFields","filterInitialValues","autoFilterFromHeaders","filterCollapsible","filterDefaultCollapsed","filterDefaultVisibleCount","filterColSpan","filterSearchText","filterResetText","showCreateButton","showUpdateAction","showDeleteAction","actionColumn","columnsState","pagination","itemsPerPage","rowSelection","tableAlertRender","tableAlertOptionRender","showSelect","singleSelect","rowKey","itemKey","size","footerProps","tableClass","polling","debounceTime","dataTableProps"],e=this.$attrs||{},n=(e.class,e.style,M(e,B)),i={};return Object.keys(n).forEach(function(e){var r=e.replace(/([A-Z])/g,"-$1").toLowerCase();t.includes(e)||t.includes(r)||(i[e]=n[e])}),U(U({},i),this.dataTableProps)},dataTableListeners:function(){var t=["click:row","input","update:page","update:items-per-page","update:sort-by","update:sort-desc","update:options","create-click","update-click","delete-click","row-click","selection-change","refresh","copy-success","request-error","filter-search","filter-reset","columns-state-change","sort-change","update:searchInput"],e=U({},this.$listeners||{}),n={};return Object.keys(e).forEach(function(i){t.includes(i)||(n[i]=e[i])}),n}},watch:{page:function(t){void 0!==t&&t!==this.currentPage&&(this.currentPage=t)},serverItemsLength:function(t){void 0!==t&&(this.serverItemsLength=t)},value:function(t){void 0!==t&&(this.selectedItems=t)},itemsPerPage:function(t){void 0!==t&&t!==this.currentItemsPerPage&&(this.currentItemsPerPage=t)},headers:{immediate:!0,handler:function(t){this.initColumns(t)}},items:function(t){var e=this;this.request||(this.currentItems=t||[],this.$nextTick(function(){return e.applySelectionState()}))},loading:function(t){this.currentLoading=t},searchInput:function(t){this.searchInputInternal=t},searchInputInternal:function(t){var e=this;this.$emit("update:searchInput",t),this.request&&(this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=setTimeout(function(){e.reload()},this.debounceTime))},size:function(t){this.currentDensity=t},sortBy:function(t){this.internalSortBy=this.normalizeSortBy(t),this.scheduleSortChangeEmit()},sortDesc:function(t){this.internalSortDesc=this.normalizeSortDesc(t),this.scheduleSortChangeEmit()},rowSelection:{deep:!0,handler:function(){var t=this;this.hasAppliedDefaultRowSelection=!1,this.$nextTick(function(){return t.applySelectionState()})}},rowKey:function(t){this.computedRowKey=t||this.itemKey||this.$attrs["item-key"]||"id"},itemKey:function(t){this.computedRowKey=this.rowKey||t||this.$attrs["item-key"]||"id"},actionColumn:{handler:function(){this.initColumns(this.headers)},deep:!0},columnsState:{deep:!0,handler:function(t){t&&void 0!==t.value&&null!==t.value&&this.applyExternalColumnState(t.value)}},showSelect:function(){var t=this;this.$nextTick(function(){return t.applySelectionState()})},currentItems:function(){var t=this;this.$nextTick(function(){return t.applySelectionState()})}},mounted:function(){var t=this;window.addEventListener("resize",this.handleResize),this.request&&this.reload(),this.startPolling(),this.$nextTick(function(){return t.applySelectionState()})},beforeDestroy:function(){window.removeEventListener("resize",this.handleResize),this.stopPolling(),this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.sortChangeTimer&&clearTimeout(this.sortChangeTimer)},methods:{initColumns:function(t){var e,n,i=this,r=z(t||[]);if(this.actionColumn&&!r.some(function(t){return"action"===t.value})){var a={text:"操作",value:"action",sortable:!1,width:120,align:"center",class:"fixed",cellClass:"fixed"};if("object"===K(this.actionColumn)&&null!==this.actionColumn){var o=this.actionColumn,l=o.title,s=M(o,R);Object.assign(a,s),l&&(a.text=l)}r.push(a)}var c=this.getPersistedColumnState(),u=null===(e=this.columnsState)||void 0===e?void 0:e.value,d=null===(n=this.columnsState)||void 0===n?void 0:n.defaultVisible;this.internalColumns=r.map(function(t){var e=t.value||t.dataIndex||t.key,n=!1!==t.visible,r=i.resolveColumnVisible({value:e,baseVisible:n,externalState:u,persistedState:c,defaultVisible:d});return U(U({},t),{},{visible:r,initiallyVisible:n,text:t.text||t.title,value:e})})},getColumnRawValue:function(t,e,n){if(t&&"function"==typeof t.valueGetter)return t.valueGetter.call(this.context,e,t);if(void 0!==n)return n;var i=null==t?void 0:t.value;return i?e?e[i]:n:void 0},applyValueFormatter:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(t&&"function"==typeof t.valueFormatter){var r=t.valueFormatter.call(this.context,e,n,t,i);if(null!=r)return r}return null},getValueEnumOption:function(t,e){var n=null==t?void 0:t.valueEnum;return n?Array.isArray(n)?n.find(function(t){return(null==t?void 0:t.value)===e})||null:n[e]||null:null},getStatusText:function(t,e,n){var i=this.getColumnRawValue(t,n,e),r=this.applyValueFormatter(t,i,n);if(null!==r)return r;var a=this.getValueEnumOption(t,i);return a?"object"===K(a)?a.text||a.label||i||"--":a:null==i||""===i?"--":i},getStatusChipProps:function(t,e,n){var i,r,a,o,l,s=this.getColumnRawValue(t,n,e),c=this.getValueEnumOption(t,s),u=c&&c.status||s||"default",d=H[u]||H.default,f=(null==t||null===(i=t.valueEnumStatusMap)||void 0===i?void 0:i[u])||{};return{color:f.color||(null==c?void 0:c.color)||d.color,textColor:f.textColor||(null==c?void 0:c.textColor)||d.textColor,outlined:null!==(r=null!==(a=f.outlined)&&void 0!==a?a:null==c?void 0:c.outlined)&&void 0!==r&&r,dark:null!==(o=null!==(l=f.dark)&&void 0!==l?l:null==c?void 0:c.dark)&&void 0!==o&&o,icon:null==c?void 0:c.icon}},getProgressProps:function(t){return U({height:6,color:"primary",rounded:!0},null==t?void 0:t.valueProps)},getProgressValue:function(t){var e=Number(t);return Number.isFinite(e)?e<0?0:e>100?100:e:0},formatMoneyValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==t||""===t)return"--";var n="number"==typeof e.precision?e.precision:2,i=e.currencySymbol||"¥",r=e.locale||"zh-CN",a=Number(t);return Number.isFinite(a)?"".concat(i," ").concat(a.toLocaleString(r,{minimumFractionDigits:n,maximumFractionDigits:n})):t},formatPercentValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==t||""===t)return"--";var n="number"==typeof e.precision?e.precision:0,i=Number(t);if(!Number.isFinite(i))return t;var r=e.unit||"%";return"".concat(i.toFixed(n)).concat(r)},formatDigitValue:function(t){if(null==t||""===t)return"--";var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).locale||"zh-CN",n=Number(t);return Number.isFinite(n)?n.toLocaleString(e):t},formatDateValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"date",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)return"--";var i=new Date(t);if(Number.isNaN(i.getTime()))return t;var r=n.format||("dateTime"===e?"YYYY-MM-DD HH:mm:ss":"time"===e?"HH:mm:ss":"YYYY-MM-DD"),a=i.getFullYear(),o=String(i.getMonth()+1).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0"),s=String(i.getHours()).padStart(2,"0"),c=String(i.getMinutes()).padStart(2,"0"),u=String(i.getSeconds()).padStart(2,"0");return r.replace("YYYY",a).replace("MM",o).replace("DD",l).replace("HH",s).replace("mm",c).replace("ss",u)},formatDateRangeValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(t)||0===t.length)return"--";var n,i,r=(i=2,function(t){if(Array.isArray(t))return t}(n=t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,a,o,l=[],s=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(i=a.call(n)).done)&&(l.push(i.value),l.length!==e);s=!0);}catch(t){c=!0,r=t}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return l}}(n,i)||J(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],o=r[1],l=e.separator||" ~ ",s=e.valueType||"date";return"".concat(this.formatDateValue(a,s,e)).concat(l).concat(this.formatDateValue(o,s,e))},formatJsonValue:function(t){if(null==t||""===t)return"--";if("string"==typeof t)try{var e=JSON.parse(t);return JSON.stringify(e,null,2)}catch(e){return t}return"object"===K(t)?JSON.stringify(t,null,2):String(t)},shouldShowEllipsis:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(null==t||!t.ellipsis)return!1;var r=this.formatColumnValue(t,n,e,i);if(null==r)return!1;var a=t.ellipsisLength||20;return String(r).length>a},formatColumnValue:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=this.getColumnRawValue(t,e,n),a=this.applyValueFormatter(t,r,e,i);if(null!==a)return a;if("money"===(null==t?void 0:t.valueType))return this.formatMoneyValue(r,t.valueProps);if("percent"===(null==t?void 0:t.valueType)||"progress"===(null==t?void 0:t.valueType))return this.formatPercentValue(r,t.valueProps);if("digit"===(null==t?void 0:t.valueType))return this.formatDigitValue(r,t.valueProps);if("date"===(null==t?void 0:t.valueType)||"dateTime"===(null==t?void 0:t.valueType)||"time"===(null==t?void 0:t.valueType))return this.formatDateValue(r,t.valueType,t.valueProps);if("dateRange"===(null==t?void 0:t.valueType))return this.formatDateRangeValue(r,t.valueProps);if("json"===(null==t?void 0:t.valueType))return this.formatJsonValue(r);if("index"===(null==t?void 0:t.valueType))return this.getDisplayIndex(i);var o=this.getValueEnumOption(t,r);return o?"object"===K(o)?o.text||o.label||o.value||r||"--":o:null==r||""===r?"--":r},hasCopyValue:function(t,e,n){var i=this.getColumnRawValue(t,e,n);return null!=i&&""!==i},getCopyValue:function(t,e,n){var i=this.getColumnRawValue(t,e,n);if(null==i)return"";if("object"===K(i))try{return JSON.stringify(i)}catch(t){return String(i)}return String(i)},getDisplayIndex:function(t){return"number"!=typeof t?"--":this.request?(this.currentPage-1)*this.currentItemsPerPage+t+1:t+1},getAvatarProps:function(t){return U({size:32,color:"primary lighten-5"},null==t?void 0:t.valueProps)},getAvatarSrc:function(t){return t?"string"==typeof t?t:"object"===K(t)&&t.src?t.src:null:null},getAvatarInitials:function(t){if(!t)return"--";var e=String(t).trim();if(!e)return"--";var n=e.split(/\s+/);return 1===n.length?n[0].charAt(0).toUpperCase():"".concat(n[0].charAt(0)).concat(n[n.length-1].charAt(0)).toUpperCase()},toggleColumn:function(t){t.visible=!t.visible,this.emitColumnStateChange(),this.$forceUpdate()},resetColumns:function(){this.internalColumns.forEach(function(t){t.visible=t.initiallyVisible}),this.clearPersistedColumnState(),this.emitColumnStateChange(),this.$forceUpdate()},handleExport:function(){this.$emit("export")},handleRefresh:function(){var t=this;return N(V().m(function e(){return V().w(function(e){for(;;)switch(e.n){case 0:if(t.$emit("refresh"),!t.request){e.n=1;break}return e.n=1,t.reload();case 1:return e.a(2)}},e)}))()},toggleFullscreen:function(){var t,e,n,i;this.isFullscreen=!this.isFullscreen,this.isFullscreen?null===(t=(e=this.$el).requestFullscreen)||void 0===t||t.call(e):null===(n=(i=document).exitFullscreen)||void 0===n||n.call(i)},getVisibleButtons:function(t){var e=this;return this.actionColumn&&this.actionColumn.buttons?this.actionColumn.buttons.filter(function(n){return"function"==typeof n.visible?n.visible.call(e.context,t):!1!==n.visible}):[]},handleActionClick:function(t,e){var n=this;return N(V().m(function i(){return V().w(function(i){for(;;)switch(i.n){case 0:if(!t.confirm){i.n=1;break}if(confirm(t.confirm)){i.n=1;break}return i.a(2);case 1:if(!t.onClick){i.n=2;break}return i.n=2,t.onClick.call(n.context,e);case 2:return i.a(2)}},i)}))()},copyToClipboard:function(t){var e=this;if(navigator.clipboard)navigator.clipboard.writeText(t).then(function(){e.$emit("copy-success",t),console.log("已复制:",t)});else{var n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),this.$emit("copy-success",t),console.log("已复制:",t)}},handleRowClick:function(t,e){this.$emit("row-click",t,e),this.$emit("click:row",t,e)},handleSelectionChange:function(t){var e=this;this.selectedItems=t;var n={selectedRowKeys:t.map(function(t){return t[e.computedRowKey]}),selectedRows:t};this.$emit("selection-change",n),this.$emit("input",t),this.rowSelection&&"function"==typeof this.rowSelection.onChange&&this.rowSelection.onChange.call(this.context,n.selectedRowKeys,t)},handlePageChange:function(t){this.currentPage=t,this.$emit("update:page",t),this.request&&this.reload()},handleItemsPerPageChange:function(t){this.currentItemsPerPage=t,this.currentPage=1,this.$emit("update:items-per-page",t),this.request&&this.reload()},handleOptionsUpdate:function(t){t&&"object"===K(t)&&(void 0!==t.page&&t.page!==this.currentPage&&this.handlePageChange(t.page),void 0!==t.itemsPerPage&&t.itemsPerPage!==this.currentItemsPerPage&&this.handleItemsPerPageChange(t.itemsPerPage),void 0!==t.sortBy&&this.handleSortByUpdate(t.sortBy),void 0!==t.sortDesc&&this.handleSortDescUpdate(t.sortDesc)),this.$emit("update:options",t)},handleFilterSearch:function(t){var e=this.transformFilterValues(t);this.filterValues=e,this.currentPage=1,this.$emit("update:page",1),this.$emit("filter-search",e),this.request&&this.reload()},handleFilterReset:function(){this.filterValues={},this.currentPage=1,this.$emit("update:page",1),this.$emit("filter-reset"),this.request&&this.reload()},transformFilterValues:function(t){var e=this,n={};return Object.keys(t||{}).forEach(function(i){var r=t[i],a=e.filterFieldMetaMap[i];if(a&&"function"==typeof a.transform){var o=a.transform.call(e.context,r,t);return o&&"object"===K(o)&&!Array.isArray(o)?void Object.assign(n,o):void(void 0!==o&&(n[i]=o))}n[i]=r}),n},buildAutoFilterField:function(t){var e=this.normalizeSearchConfig(t);if(!e)return null;var n,i=this.mapValueTypeToFilterType(e.valueType,t),r={key:e.key,label:e.label,type:i,placeholder:e.placeholder||this.formatAutoFieldPlaceholder(e.label,i),options:[],props:U({clearable:!0,dense:!0},e.formItemProps||{}),initialValue:e.initialValue,defaultValue:e.initialValue,hideDetails:!0};return"select"===i&&(r.options=this.buildValueEnumOptions(t,e)),"date"===i&&(r.pickerProps=U({range:"dateRange"===e.valueType},(null===(n=e.formItemProps)||void 0===n?void 0:n.pickerProps)||{})),e.multiple&&(r.multiple=!0),e.fieldProps&&"object"===K(e.fieldProps)&&Object.assign(r,e.fieldProps),{field:r,transform:e.transform,initialValue:e.initialValue}},normalizeSearchConfig:function(t){var e;if(!t||"action"===t.value)return null;var n=t.search;if(null==n||!1===n)return null;var i=!0===n?{}:"object"===K(n)?U({},n):{},r=i.key||t.filterKey||t.value||t.dataIndex||t.key;return r?{key:r,label:i.label||t.searchLabel||t.text||t.title||r,valueType:i.valueType||t.valueType||"text",placeholder:i.placeholder,formItemProps:i.formItemProps||{},transform:i.transform,initialValue:i.initialValue,valueEnumKey:i.valueEnumKey||t.valueEnumKey,fieldProps:i.fieldProps||{},multiple:i.multiple||(null===(e=i.formItemProps)||void 0===e?void 0:e.multiple),search:i}:null},mapValueTypeToFilterType:function(t,e){switch(t){case"status":case"option":case"select":return null!=e&&e.valueEnum?"select":"text";case"date":case"dateTime":case"time":case"dateRange":return"date";default:return"text"}},buildValueEnumOptions:function(t,e){var n=null==t?void 0:t.valueEnum;if(!n)return[];var i=[];return Array.isArray(n)?(n.forEach(function(t){t&&i.push({text:t.text||t.label||t.value,value:t.value})}),i):(Object.keys(n).forEach(function(t){var r=n[t];if("object"===K(r)){var a=e.valueEnumKey&&void 0!==r[e.valueEnumKey]?r[e.valueEnumKey]:void 0!==r.value?r.value:t;i.push({text:r.text||r.label||t,value:a})}else i.push({text:r,value:t})}),i)},formatAutoFieldPlaceholder:function(t,e){return t?"select"===e?"请选择".concat(t):"请输入".concat(t):""},getVDataTable:function(){return this.$refs.dataTable},reload:function(){var t=this;return N(V().m(function e(){var n,i,r;return V().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t.request){e.n=1;break}return e.a(2);case 1:return t.currentLoading=!0,e.p=2,n={page:t.currentPage,pageSize:t.currentItemsPerPage,search:t.searchInputInternal,sorter:t.buildSorterPayload(),filters:t.filterValues},e.n=3,t.request(n);case 3:(i=e.v)&&!1!==i.success&&(t.currentItems=i.data||i.list||[],t.serverItemsLength=i.total||i.totalCount||t.currentItems.length,t.$nextTick(function(){return t.applySelectionState()})),e.n=5;break;case 4:e.p=4,r=e.v,console.error("Failed to load data:",r),t.$emit("request-error",r);case 5:return e.p=5,t.currentLoading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},reset:function(){this.currentPage=1,this.$emit("update:page",1),this.reload()},clearSelection:function(){var t,e;this.selectedItems=[],null===(t=this.$refs.dataTable)||void 0===t||null===(e=t.clearSelection)||void 0===e||e.call(t),this.$emit("selection-change",{selectedRowKeys:[],selectedRows:[]}),this.$emit("input",[]),this.rowSelection&&"function"==typeof this.rowSelection.onChange&&this.rowSelection.onChange([],[])},getSelectedRows:function(){return this.selectedItems},handleResize:function(){this.isMobile=window.innerWidth<500},startPolling:function(){var t=this;this.polling>0&&this.request&&(this.pollingTimer=setInterval(function(){t.reload()},this.polling))},stopPolling:function(){this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=null)},resolveColumnVisible:function(t){var e=t.value,n=t.baseVisible,i=t.externalState,r=t.persistedState,a=t.defaultVisible;return i&&Object.prototype.hasOwnProperty.call(i,e)?i[e]:r&&Object.prototype.hasOwnProperty.call(r,e)?r[e]:a&&Object.prototype.hasOwnProperty.call(a,e)?a[e]:n},getColumnStateSnapshot:function(){return this.internalColumns.reduce(function(t,e){return t[e.value]=!1!==e.visible,t},{})},emitColumnStateChange:function(){var t=this.getColumnStateSnapshot();this.$emit("columns-state-change",t),this.columnsState&&"function"==typeof this.columnsState.onChange&&this.columnsState.onChange.call(this.context,t),this.persistColumnState(t)},getPersistedColumnState:function(){if(!this.columnsState||!this.columnsState.persistenceKey)return null;if("undefined"==typeof window)return null;try{var t=window.localStorage.getItem(this.columnsState.persistenceKey);return t?JSON.parse(t):null}catch(t){return console.warn("[JhTable] Failed to parse persisted column state:",t),null}},persistColumnState:function(t){if(this.columnsState&&this.columnsState.persistenceKey&&"undefined"!=typeof window)try{t?window.localStorage.setItem(this.columnsState.persistenceKey,JSON.stringify(t)):window.localStorage.removeItem(this.columnsState.persistenceKey)}catch(t){console.warn("[JhTable] Failed to persist column state:",t)}},clearPersistedColumnState:function(){if(this.columnsState&&this.columnsState.persistenceKey&&"undefined"!=typeof window)try{window.localStorage.removeItem(this.columnsState.persistenceKey)}catch(t){console.warn("[JhTable] Failed to clear column state:",t)}},applyExternalColumnState:function(t){t&&(this.internalColumns=this.internalColumns.map(function(e){return U(U({},e),{},{visible:Object.prototype.hasOwnProperty.call(t,e.value)?t[e.value]:e.visible})}),this.$forceUpdate())},normalizeSortBy:function(t){return Array.isArray(t)?t:"string"==typeof t&&t?[t]:[]},normalizeSortDesc:function(t){return Array.isArray(t)?t:"boolean"==typeof t?[t]:[]},handleSortByUpdate:function(t){this.internalSortBy=this.normalizeSortBy(t),this.scheduleSortChangeEmit()},handleSortDescUpdate:function(t){Array.isArray(t)?this.internalSortDesc=t:this.internalSortDesc="boolean"==typeof t?[t]:[],this.scheduleSortChangeEmit()},scheduleSortChangeEmit:function(){var t=this;this.sortChangeTimer&&clearTimeout(this.sortChangeTimer),this.sortChangeTimer=setTimeout(function(){t.sortChangeTimer=null,t.emitSortChange()},0)},emitSortChange:function(){this.$emit("update:sortBy",this.internalSortBy),this.$emit("update:sortDesc",this.internalSortDesc),this.$emit("sort-change",{sortBy:this.internalSortBy,sortDesc:this.internalSortDesc,sorter:this.buildSorterPayload()}),this.request&&(this.currentPage=1,this.$emit("update:page",1),this.reload())},buildSorterPayload:function(){var t=this;if(!this.internalSortBy.length)return{};var e={};return this.internalSortBy.forEach(function(n,i){e[n]=t.internalSortDesc[i]?"desc":"asc"}),{sortBy:this.internalSortBy,sortDesc:this.internalSortDesc,order:e}},applySelectionState:function(){if(this.showSelectComputed){var t=this.getControlledRowKeys();t?this.syncSelectionByKeys(t):this.applyDefaultRowSelection()}else this.selectedItems.length&&(this.selectedItems=[],this.$emit("input",[]))},getControlledRowKeys:function(){return this.rowSelection&&Array.isArray(this.rowSelection.selectedRowKeys)?this.rowSelection.selectedRowKeys:null},syncSelectionByKeys:function(t){var e=this;if(Array.isArray(t)){var n=new Set(t),i=this.currentItems.filter(function(t){return n.has(t[e.computedRowKey])});this.selectedItems=i,this.$emit("input",i)}},applyDefaultRowSelection:function(){var t=this;if(!this.hasAppliedDefaultRowSelection&&this.rowSelection&&Array.isArray(this.rowSelection.defaultSelectedRowKeys)){var e=new Set(this.rowSelection.defaultSelectedRowKeys),n=this.currentItems.filter(function(n){return e.has(n[t.computedRowKey])});n.length&&(this.selectedItems=n,this.$emit("input",n)),this.hasAppliedDefaultRowSelection=!0}}}},$,[],!1,null,"2c63568e",null).exports;var X=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{value:t.visible,"max-width":t.maxWidth,persistent:"",fullscreen:t.isMobile},on:{input:t.handleDialogInput}},[e("v-card",[e("v-card-title",{staticClass:"d-flex align-center pa-4"},[e("span",[t._v(t._s(t.title))]),t._v(" "),e("v-spacer"),t._v(" "),e("v-icon",{on:{click:t.handleClose}},[t._v("mdi-close")])],1),t._v(" "),e("v-card-text",{staticClass:"pa-0"},[e("v-row",{style:t.contentStyle,attrs:{"no-gutters":""}},[e("v-col",{staticClass:"border-right",attrs:{cols:t.isMobile?12:7}},[t.showSearch||t.showSelectAll&&"multiple"===t.mode?e("div",{staticClass:"px-3 pt-3"},[t.showSearch?e("v-text-field",{staticClass:"mb-3",attrs:{placeholder:t.placeholder,"prepend-inner-icon":"mdi-magnify",outlined:"",dense:"","hide-details":"",clearable:""},model:{value:t.searchKeyword,callback:function(e){t.searchKeyword=e},expression:"searchKeyword"}}):t._e(),t._v(" "),t.showSelectAll&&"multiple"===t.mode?e("div",{staticClass:"mb-3 d-flex flex-wrap"},[e("v-btn",{staticClass:"mr-2 mb-2",attrs:{small:"",outlined:"",disabled:0===t.filteredAllNodes.length},on:{click:t.handleBatchSelect}},[e("v-icon",{attrs:{small:"",left:""}},[t._v("mdi-checkbox-multiple-marked")]),t._v("\n "+t._s(t.isAllSelected?"取消全选":"全选当前")+"\n ")],1)],1):t._e()],1):t._e(),t._v(" "),t.showSearch||t.showSelectAll&&"multiple"===t.mode?e("v-divider"):t._e(),t._v(" "),e("div",{style:t.listStyle},[e("div",{staticClass:"px-3 py-2",staticStyle:{height:"100%","overflow-y":"auto"}},[t.loading?e("div",{staticClass:"text-center py-8"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"primary"}})],1):0===t.filteredTreeData.length?e("div",{staticClass:"text-center grey--text py-8"},[e("v-icon",{attrs:{size:"48",color:"grey lighten-1"}},[t._v("mdi-file-tree")]),t._v(" "),e("div",{staticClass:"mt-2"},[t._v("未找到匹配的节点")])],1):e("div",t._l(t.filteredTreeData,function(n){return e("tree-node",{key:t.getNodeKey(n),attrs:{node:n,level:0,mode:t.mode,"allow-select-node":t.allowSelectNode,expandedNodes:t.expandedNodes,tempSelectedNodes:t.tempSelectedNodes,nodeKey:t.nodeKey,nodeLabel:t.nodeLabel,nodeChildren:t.nodeChildren,searchKeyword:t.searchKeyword,isNodeSelected:t.isNodeSelected,isNodeChildrenSelected:t.isNodeChildrenSelected},on:{"toggle-expand":t.toggleNodeExpand,"toggle-node":t.toggleNode,"select-single-node":t.selectSingleNode,"node-click":t.handleNodeClick}})}),1)])])],1),t._v(" "),"multiple"!==t.mode||t.isMobile?t._e():e("v-col",{attrs:{cols:t.isMobile?12:5}},[e("div",{staticClass:"pa-3",staticStyle:{height:"100%",display:"flex","flex-direction":"column"}},[e("div",{staticClass:"d-flex align-center mb-3"},[e("span",{staticClass:"text-subtitle-2"},[t._v("\n 已选: "+t._s(t.tempSelectedNodes.length)+"\n ")]),t._v(" "),e("v-spacer"),t._v(" "),e("v-btn",{attrs:{text:"",small:"",color:"primary",disabled:0===t.tempSelectedNodes.length},on:{click:t.clearSelection}},[t._v("\n 清除\n ")])],1),t._v(" "),e("v-divider",{staticClass:"mb-3"}),t._v(" "),e("div",{staticClass:"flex-grow-1",staticStyle:{"overflow-y":"auto"}},[0===t.tempSelectedNodes.length?e("div",{staticClass:"text-center py-8"},[e("v-icon",{attrs:{size:"64",color:"grey lighten-2"}},[t._v("mdi-checkbox-multiple-blank-outline")]),t._v(" "),e("div",{staticClass:"grey--text mt-2"},[t._v("暂无选中内容")])],1):e("div",t._l(t.tempSelectedNodes,function(n){return e("v-chip",{key:t.getNodeKey(n),staticClass:"ma-1",attrs:{close:"",small:""},on:{"click:close":function(e){return t.removeNodeFromTemp(n)}}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-file-tree")]),t._v("\n "+t._s(t.getNodeLabel(n))+"\n ")],1)}),1)])],1)])],1)],1),t._v(" "),e("v-divider"),t._v(" "),e("v-card-actions",{staticClass:"pa-4"},["multiple"===t.mode&&t.isMobile?e("div",{staticClass:"text-caption"},[t._v("\n 已选 "+t._s(t.tempSelectedNodes.length)+"\n ")]):t._e(),t._v(" "),e("v-spacer"),t._v(" "),e("v-btn",{attrs:{text:""},on:{click:t.handleCancel}},[t._v("取消")]),t._v(" "),e("v-btn",{attrs:{color:"success",disabled:"single"===t.mode&&0===t.tempSelectedNodes.length},on:{click:t.handleConfirm}},[t._v("\n 确定\n ")])],1)],1)],1)};function Z(t){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z(t)}function Q(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function tt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(n),!0).forEach(function(e){et(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function et(t,e,n){return(e=function(t){var e=function(t){if("object"!=Z(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Z(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nt(t){return function(t){if(Array.isArray(t))return rt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||it(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(t,e){if(t){if("string"==typeof t)return rt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rt(t,e):void 0}}function rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}X._withStripped=!0;const at=i({name:"JhTreeSelect",components:{TreeNode:{name:"TreeNode",template:'\n <div class="mb-1">\n \x3c!-- 节点 --\x3e\n <div class="d-flex align-center py-2 tree-item" :style="{ paddingLeft: (level * 16) + \'px\' }">\n <v-checkbox\n v-if="mode === \'multiple\' && !allowSelectNode"\n :input-value="isNodeChildrenSelected(node)"\n @change="$emit(\'toggle-node\', node)"\n @click.stop\n hide-details\n dense\n class="mr-2 mt-0"\n ></v-checkbox>\n <v-icon \n class="mr-2" \n small\n @click="$emit(\'toggle-expand\', getNodeKey(node))"\n style="cursor: pointer;"\n v-if="hasChildren(node)"\n >\n {{ expandedNodes.includes(getNodeKey(node)) ? \'mdi-chevron-down\' : \'mdi-chevron-right\' }}\n </v-icon>\n <span v-else class="mr-2" style="width: 20px;"></span>\n <v-icon small class="mr-2" color="primary">mdi-file-tree</v-icon>\n <div class="flex-grow-1" @click="$emit(\'toggle-expand\', getNodeKey(node))" style="cursor: pointer;">\n <div class="font-weight-medium">{{ getNodeLabel(node) }}</div>\n <div class="text-caption grey--text" v-if="hasChildren(node)">\n {{ getChildrenCount(node) }}个子节点\n </div>\n </div>\n \x3c!-- 选择节点按钮 --\x3e\n <v-btn\n v-if="allowSelectNode && mode === \'multiple\'"\n x-small\n outlined\n color="primary"\n @click.stop="$emit(\'toggle-node\', node)"\n class="ml-2"\n >\n <v-icon x-small left>mdi-check</v-icon>\n {{ isNodeSelected(node) ? \'已选\' : \'选择\' }}\n </v-btn>\n <v-radio\n v-else-if="allowSelectNode && mode === \'single\'"\n :value="getNodeKey(node)"\n :input-value="selectedNodeKey"\n @click.stop="handleRadioClick(node)"\n hide-details\n dense\n class="ml-2 mt-0"\n ></v-radio>\n </div>\n \n \x3c!-- 展开内容:子节点 --\x3e\n <v-expand-transition>\n <div v-show="expandedNodes.includes(getNodeKey(node))">\n \x3c!-- 子节点(递归) --\x3e\n <tree-node\n v-for="child in getChildren(node)"\n :key="getNodeKey(child)"\n :node="child"\n :level="level + 1"\n :mode="mode"\n :allow-select-node="allowSelectNode"\n :expandedNodes="expandedNodes"\n :tempSelectedNodes="tempSelectedNodes"\n :nodeKey="nodeKey"\n :nodeLabel="nodeLabel"\n :nodeChildren="nodeChildren"\n :searchKeyword="searchKeyword"\n :isNodeSelected="isNodeSelected"\n :isNodeChildrenSelected="isNodeChildrenSelected"\n @toggle-expand="$emit(\'toggle-expand\', $event)"\n @toggle-node="$emit(\'toggle-node\', $event)"\n @select-single-node="$emit(\'select-single-node\', $event)"\n @node-click="$emit(\'node-click\', $event)"\n ></tree-node>\n </div>\n </v-expand-transition>\n </div>\n ',props:{node:{type:Object,required:!0},level:{type:Number,default:0},mode:String,allowSelectNode:Boolean,expandedNodes:Array,tempSelectedNodes:Array,nodeKey:String,nodeLabel:String,nodeChildren:String,searchKeyword:String,isNodeSelected:Function,isNodeChildrenSelected:Function},computed:{selectedNodeKey:function(){return this.tempSelectedNodes.length>0?this.getNodeKey(this.tempSelectedNodes[0]):null}},methods:{getNodeKey:function(t){return t[this.nodeKey]},getNodeLabel:function(t){return t[this.nodeLabel]||""},getChildren:function(t){var e=this,n=t[this.nodeChildren]||[];if(!this.searchKeyword)return n;var i=this.searchKeyword.toLowerCase();return n.filter(function(t){return e.getNodeLabel(t).toLowerCase().includes(i)||e.hasMatchingChildren(t,i)})},hasMatchingChildren:function(t,e){var n=this;return(t[this.nodeChildren]||[]).some(function(t){return n.getNodeLabel(t).toLowerCase().includes(e)||n.hasMatchingChildren(t,e)})},hasChildren:function(t){var e=t[this.nodeChildren]||[];return e&&e.length>0},getChildrenCount:function(t){var e=t[this.nodeChildren]||[];return e?e.length:0},handleRadioClick:function(t){this.$emit("select-single-node",t)}}}},props:{value:{type:Array,default:function(){return[]}},visible:{type:Boolean,default:!1},mode:{type:String,default:"multiple",validator:function(t){return["multiple","single"].includes(t)}},title:{type:String,default:"选择节点"},placeholder:{type:String,default:"搜索节点"},maxWidth:{type:String,default:"1000px"},data:{type:Array,default:function(){return[]}},nodeKey:{type:String,default:"id"},nodeLabel:{type:String,default:"label"},nodeChildren:{type:String,default:"children"},allowSelectNode:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!0},showSelectAll:{type:Boolean,default:!0},loading:{type:Boolean,default:!1}},data:function(){return{isMobile:"undefined"!=typeof window&&window.innerWidth<600,currentTab:0,searchKeyword:"",tempSelectedNodes:[],expandedNodes:[]}},computed:{contentStyle:function(){return this.isMobile?"height: calc(100vh - 120px);":"height: 600px;"},listStyle:function(){var t=this.showSearch||this.showSelectAll&&"multiple"===this.mode?"calc(100% - 140px)":"calc(100% - 60px)";return"height: ".concat(t,";")},filteredTreeData:function(){if(!this.searchKeyword)return this.data;var t=this.searchKeyword.toLowerCase();return this.filterTreeRecursive(this.data,t)},filteredAllNodes:function(){var t=this,e=function(n){var i=[];return n.forEach(function(n){i.push(n);var r=n[t.nodeChildren]||[];r.length>0&&(i=i.concat(e(r)))}),i},n=e(this.data);if(!this.searchKeyword)return n;var i=this.searchKeyword.toLowerCase();return n.filter(function(e){return t.getNodeLabel(e).toLowerCase().includes(i)})},isAllSelected:function(){var t=this;return 0!==this.filteredAllNodes.length&&this.filteredAllNodes.every(function(e){return t.isNodeSelected(e)})}},watch:{visible:{immediate:!0,handler:function(t){t&&this.initDialog()}}},mounted:function(){"undefined"!=typeof window&&window.addEventListener("resize",this.handleResize)},beforeDestroy:function(){"undefined"!=typeof window&&window.removeEventListener("resize",this.handleResize)},methods:{handleResize:function(){this.isMobile=window.innerWidth<600},initDialog:function(){var t=this;this.tempSelectedNodes=nt(this.value||[]),this.searchKeyword="",this.expandedNodes=[],this.autoExpandSelectedNodes(),this.data.length>0&&(this.expandedNodes=this.data.slice(0,3).map(function(e){return t.getNodeKey(e)}))},autoExpandSelectedNodes:function(){var t=this,e=new Set(this.tempSelectedNodes.map(function(e){return t.getNodeKey(e)})),n=function(e,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=it(t))){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,o=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){o=!0,r=t},f:function(){try{a||null==e.return||e.return()}finally{if(o)throw r}}}}(e);try{for(o.s();!(r=o.n()).done;){var l=r.value,s=t.getNodeKey(l),c=[].concat(nt(a),[s]);if(s===i)return c;var u=l[t.nodeChildren]||[];if(u.length>0){var d=n(u,i,c);if(d)return d}}}catch(t){o.e(t)}finally{o.f()}return null};e.forEach(function(e){var i=n(t.data,e);i&&i.forEach(function(e){return t.expandedNodes.push(e)})}),this.expandedNodes=nt(new Set(this.expandedNodes))},filterTreeRecursive:function(t,e){var n=this,i=[];return t.forEach(function(t){var r=n.getNodeLabel(t).toLowerCase().includes(e),a=t[n.nodeChildren]||[],o=a.length>0?n.filterTreeRecursive(a,e):[],l=o.length>0;(r||l)&&i.push(tt(tt({},t),{},et({},n.nodeChildren,o)))}),i},getNodeKey:function(t){return t[this.nodeKey]},getNodeLabel:function(t){return t[this.nodeLabel]||""},isNodeSelected:function(t){var e=this,n=this.getNodeKey(t);return this.tempSelectedNodes.some(function(t){return e.getNodeKey(t)===n})},isNodeChildrenSelected:function(t){var e=this,n=t[this.nodeChildren]||[];return 0!==n.length&&n.every(function(t){return e.isNodeSelected(t)})},toggleNodeExpand:function(t){var e=this.expandedNodes.indexOf(t);e>-1?this.expandedNodes.splice(e,1):this.expandedNodes.push(t)},toggleNode:function(t){var e=this;if("single"!==this.mode){var n=this.getNodeKey(t),i=this.tempSelectedNodes.findIndex(function(t){return e.getNodeKey(t)===n});i>-1?this.tempSelectedNodes.splice(i,1):this.tempSelectedNodes.push(t)}else this.selectSingleNode(t)},selectSingleNode:function(t){this.tempSelectedNodes=[t]},handleNodeClick:function(t){this.allowSelectNode?this.toggleNode(t):this.toggleNodeExpand(this.getNodeKey(t))},handleBatchSelect:function(){var t=this;this.isAllSelected?this.filteredAllNodes.forEach(function(e){var n=t.getNodeKey(e),i=t.tempSelectedNodes.findIndex(function(e){return t.getNodeKey(e)===n});i>-1&&t.tempSelectedNodes.splice(i,1)}):this.filteredAllNodes.forEach(function(e){t.isNodeSelected(e)||t.tempSelectedNodes.push(e)})},removeNodeFromTemp:function(t){var e=this,n=this.getNodeKey(t),i=this.tempSelectedNodes.findIndex(function(t){return e.getNodeKey(t)===n});i>-1&&this.tempSelectedNodes.splice(i,1)},clearSelection:function(){this.tempSelectedNodes=[]},handleDialogInput:function(t){this.$emit("update:visible",t)},handleClose:function(){this.handleCancel()},handleCancel:function(){this.$emit("update:visible",!1),this.$emit("cancel")},handleConfirm:function(){this.$emit("input",this.tempSelectedNodes),this.$emit("update:visible",!1),this.$emit("confirm",this.tempSelectedNodes)}}},X,[],!1,null,"4421993c",null).exports;var ot=function(){var t=this,e=t._self._c;return e("div",{staticClass:"jh-address-select"},["select"===t.type?[e("v-row",{attrs:{dense:""}},[e("v-col",{attrs:{cols:"12",md:t.gridCol}},[e("v-autocomplete",{staticClass:"jh-v-input",attrs:{items:t.provinces,label:t.labels.province,outlined:t.outlined,dense:t.dense,filled:t.filled,"single-line":t.singleLine,loading:t.loading,"item-text":"name","item-value":"code",clearable:"","hide-details":"","hide-no-data":"","prepend-inner-icon":"mdi-map-outline"},on:{change:t.handleProvinceChange},model:{value:t.internalValue.province,callback:function(e){t.$set(t.internalValue,"province",e)},expression:"internalValue.province"}})],1),t._v(" "),t.level>=2?e("v-col",{attrs:{cols:"12",md:t.gridCol}},[e("v-autocomplete",{staticClass:"jh-v-input",attrs:{items:t.cities,label:t.labels.city,disabled:!t.internalValue.province,outlined:t.outlined,dense:t.dense,filled:t.filled,"single-line":t.singleLine,loading:t.loading,"item-text":"name","item-value":"code",clearable:"","prepend-inner-icon":"mdi-city-variant-outline"},on:{change:t.handleCityChange},model:{value:t.internalValue.city,callback:function(e){t.$set(t.internalValue,"city",e)},expression:"internalValue.city"}})],1):t._e(),t._v(" "),t.level>=3?e("v-col",{attrs:{cols:"12",md:t.gridCol}},[e("v-autocomplete",{staticClass:"jh-v-input",attrs:{items:t.districts,label:t.labels.district,disabled:!t.internalValue.city,outlined:t.outlined,dense:t.dense,filled:t.filled,"single-line":t.singleLine,loading:t.loading,"item-text":"name","item-value":"code",clearable:"","prepend-inner-icon":"mdi-home-city-outline"},on:{change:t.handleDistrictChange},model:{value:t.internalValue.district,callback:function(e){t.$set(t.internalValue,"district",e)},expression:"internalValue.district"}})],1):t._e(),t._v(" "),t.level>=4?e("v-col",{attrs:{cols:"12",md:t.gridCol}},[e("v-autocomplete",{staticClass:"jh-v-input",attrs:{items:t.towns,label:t.labels.town,disabled:!t.internalValue.district,outlined:t.outlined,dense:t.dense,filled:t.filled,"single-line":t.singleLine,loading:t.loading,"item-text":"name","item-value":"code",clearable:"","prepend-inner-icon":"mdi-home-variant-outline"},on:{change:t.emitChange},model:{value:t.internalValue.town,callback:function(e){t.$set(t.internalValue,"town",e)},expression:"internalValue.town"}})],1):t._e()],1)]:"cascader"===t.type?[e("v-menu",{attrs:{"close-on-content-click":!1,"offset-y":"","max-width":"100%",transition:"scale-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-text-field",t._g(t._b({staticClass:"jh-v-input",attrs:{value:t.displayText,label:t.label,outlined:t.outlined,dense:t.dense,filled:t.filled,"single-line":t.singleLine,loading:t.loading,readonly:"","append-icon":"mdi-menu-down",clearable:"","hide-details":""},on:{"click:clear":t.clearValue}},"v-text-field",r,!1),i))]}}]),model:{value:t.menuVisible,callback:function(e){t.menuVisible=e},expression:"menuVisible"}},[t._v(" "),e("v-card",{staticClass:"jh-cascader-card"},[e("div",{staticClass:"jh-cascader-container"},[t.provinces.length?e("div",{staticClass:"jh-cascader-column"},[e("v-list",{staticClass:"pa-0",attrs:{dense:""}},t._l(t.provinces,function(n){return e("v-list-item",{key:n.code,class:{"v-item--active v-list-item--active primary--text":t.internalValue.province===n.code},on:{click:function(e){return t.onProvinceClick(n)}}},[e("v-list-item-content",[e("v-list-item-title",{attrs:{title:n.name}},[t._v(t._s(n.name))])],1),t._v(" "),t.level>1?e("v-list-item-action",[e("v-icon",{attrs:{small:""}},[t._v("mdi-chevron-right")])],1):t._e()],1)}),1)],1):t._e(),t._v(" "),t.level>=2&&t.internalValue.province&&t.cities.length?e("div",{staticClass:"jh-cascader-column"},[e("v-list",{staticClass:"pa-0",attrs:{dense:""}},t._l(t.cities,function(n){return e("v-list-item",{key:n.code,class:{"v-item--active v-list-item--active primary--text":t.internalValue.city===n.code},on:{click:function(e){return t.onCityClick(n)}}},[e("v-list-item-content",[e("v-list-item-title",{attrs:{title:n.name}},[t._v(t._s(n.name))])],1),t._v(" "),t.level>2?e("v-list-item-action",[e("v-icon",{attrs:{small:""}},[t._v("mdi-chevron-right")])],1):t._e()],1)}),1)],1):t._e(),t._v(" "),t.level>=3&&t.internalValue.city&&t.districts.length?e("div",{staticClass:"jh-cascader-column"},[e("v-list",{staticClass:"pa-0",attrs:{dense:""}},t._l(t.districts,function(n){return e("v-list-item",{key:n.code,class:{"v-item--active v-list-item--active primary--text":t.internalValue.district===n.code},on:{click:function(e){return t.onDistrictClick(n)}}},[e("v-list-item-content",[e("v-list-item-title",{attrs:{title:n.name}},[t._v(t._s(n.name))])],1),t._v(" "),t.level>3?e("v-list-item-action",[e("v-icon",{attrs:{small:""}},[t._v("mdi-chevron-right")])],1):t._e()],1)}),1)],1):t._e(),t._v(" "),t.level>=4&&t.internalValue.district&&t.towns.length?e("div",{staticClass:"jh-cascader-column"},[e("v-list",{staticClass:"pa-0",attrs:{dense:""}},t._l(t.towns,function(n){return e("v-list-item",{key:n.code,class:{"v-item--active v-list-item--active primary--text":t.internalValue.town===n.code},on:{click:function(e){return t.onTownClick(n)}}},[e("v-list-item-content",[e("v-list-item-title",{attrs:{title:n.name}},[t._v(t._s(n.name))])],1)],1)}),1)],1):t._e()])])],1)]:t._e()],2)};function lt(t){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(t)}function st(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function ct(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?st(Object(n),!0).forEach(function(e){ut(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ut(t,e,n){return(e=function(t){var e=function(t){if("object"!=lt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=lt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}ot._withStripped=!0;const dt=i({name:"JhAddressSelect",props:{value:{type:Object,default:function(){return{province:null,city:null,district:null,town:null}}},level:{type:Number,default:3},outlined:{type:Boolean,default:!0},dense:{type:Boolean,default:!0},filled:{type:Boolean,default:!0},singleLine:{type:Boolean,default:!0},type:{type:String,default:"select"},label:{type:String,default:"请选择地区"},loading:{type:Boolean,default:!1},labels:{type:Object,default:function(){return{province:"省份",city:"城市",district:"区/县",town:"乡镇"}}},data:{type:Array,default:function(){return[{code:"110000",name:"北京市",children:[{code:"110100",name:"市辖区",children:[{code:"110101",name:"东城区",children:[{code:"110101001",name:"东华门街道"}]}]}]},{code:"440000",name:"广东省",children:[{code:"440100",name:"广州市",children:[{code:"440106",name:"天河区",children:[{code:"440106001",name:"天河南街道"}]}]},{code:"440300",name:"深圳市",children:[{code:"440305",name:"南山区",children:[{code:"440305001",name:"南头街道"}]}]}]}]}}},data:function(){return{internalValue:ct({},this.value),cities:[],districts:[],towns:[],menuVisible:!1}},computed:{provinces:function(){return this.data.map(function(t){return{code:t.code,name:t.name}})},gridCol:function(){return 1===this.level?12:2===this.level?6:3===this.level?4:3},displayText:function(){var t=this;if(!this.internalValue.province)return"";var e=this.provinces.find(function(e){return e.code===t.internalValue.province}),n=e?e.name:"";if(this.level>=2&&this.internalValue.city){var i=this.cities.find(function(e){return e.code===t.internalValue.city});i&&(n+=" / ".concat(i.name))}if(this.level>=3&&this.internalValue.district){var r=this.districts.find(function(e){return e.code===t.internalValue.district});r&&(n+=" / ".concat(r.name))}if(this.level>=4&&this.internalValue.town){var a=this.towns.find(function(e){return e.code===t.internalValue.town});a&&(n+=" / ".concat(a.name))}return n},fullValue:function(){var t=this,e={province:null,city:null,district:null,town:null};if(this.internalValue.province){var n=this.provinces.find(function(e){return e.code===t.internalValue.province});n&&(e.province={code:n.code,name:n.name})}if(this.internalValue.city){var i=this.cities.find(function(e){return e.code===t.internalValue.city});i&&(e.city={code:i.code,name:i.name})}if(this.internalValue.district){var r=this.districts.find(function(e){return e.code===t.internalValue.district});r&&(e.district={code:r.code,name:r.name})}if(this.internalValue.town){var a=this.towns.find(function(e){return e.code===t.internalValue.town});a&&(e.town={code:a.code,name:a.name})}return e}},watch:{value:{deep:!0,immediate:!0,handler:function(t){var e={province:null,city:null,district:null,town:null};if(t.province&&(e.province="object"===lt(t.province)?t.province.code:t.province),t.city&&(e.city="object"===lt(t.city)?t.city.code:t.city),t.district&&(e.district="object"===lt(t.district)?t.district.code:t.district),t.town&&(e.town="object"===lt(t.town)?t.town.code:t.town),this.internalValue=e,e.province){var n=this.data.find(function(t){return t.code===e.province});if(this.cities=n?n.children:[],e.city){var i=this.cities.find(function(t){return t.code===e.city});if(this.districts=i?i.children:[],e.district){var r=this.districts.find(function(t){return t.code===e.district});this.towns=r?r.children:[]}}}}}},methods:{handleProvinceChange:function(t){if(this.internalValue.city=null,this.internalValue.district=null,this.internalValue.town=null,this.cities=[],this.districts=[],this.towns=[],t){var e=this.data.find(function(e){return e.code===t});this.cities=e?e.children:[]}this.emitChange()},handleCityChange:function(t){var e=this;if(this.internalValue.district=null,this.internalValue.town=null,this.districts=[],this.towns=[],t){var n=this.data.find(function(t){return t.code===e.internalValue.province}),i=null==n?void 0:n.children.find(function(e){return e.code===t});this.districts=i?i.children:[]}this.emitChange()},handleDistrictChange:function(t){var e=this;if(this.internalValue.town=null,this.towns=[],t){var n=this.data.find(function(t){return t.code===e.internalValue.province}),i=null==n?void 0:n.children.find(function(t){return t.code===e.internalValue.city}),r=null==i?void 0:i.children.find(function(e){return e.code===t});this.towns=r?r.children:[]}this.emitChange()},emitChange:function(){this.$emit("input",ct({},this.fullValue)),this.$emit("change",ct({},this.fullValue))},onProvinceClick:function(t){this.internalValue.province=t.code,this.handleProvinceChange(t.code),1===this.level&&(this.menuVisible=!1)},onCityClick:function(t){this.internalValue.city=t.code,this.handleCityChange(t.code),2===this.level&&(this.menuVisible=!1)},onDistrictClick:function(t){this.internalValue.district=t.code,this.handleDistrictChange(t.code),3===this.level&&(this.menuVisible=!1)},onTownClick:function(t){this.internalValue.town=t.code,this.emitChange(),4===this.level&&(this.menuVisible=!1)},clearValue:function(){this.internalValue={province:null,city:null,district:null,town:null},this.cities=[],this.districts=[],this.towns=[],this.emitChange()}}},ot,[],!1,null,"7ee57067",null).exports;var ft=function(){var t=this,e=t._self._c;return e("div",[e("v-app",{attrs:{"mobile-breakpoint":"sm"}},[t._t("menu"),t._v(" "),e("v-main",{staticClass:"mt-15"},[e("div",{staticClass:"jh-page-second-bar px-3 px-sm-8"},[e("v-row",{staticClass:"align-center",attrs:{"no-gutters":""}},[e("v-col",{attrs:{cols:"12",sm:"12",md:"4",xl:"3"}},[e("div",{staticClass:"py-4 text-body-1 font-weight-bold align-center d-flex align-center"},[t._v("\n "+t._s(t.pageName)+"\n "),t._v(" "),t.showHelpButton?e("v-icon",{staticClass:"black--text ml-1",attrs:{size:"15"},on:{click:function(e){return t.$emit("help-click")}}},[t._v("\n mdi-help-circle\n ")]):t._e()],1)]),t._v(" "),e("v-spacer"),t._v(" "),e("v-col",{staticClass:"pl-md-2 mb-2 mb-md-0 flex justify-end",attrs:{cols:"12",xs:"12",sm:"12",md:"8",xl:"9"}},[t._t("search-bar")],2)],1)],1),t._v(" "),e("div",{staticClass:"jh-page-body-container px-sm-8"},[e("v-row",{staticClass:"pa-0 ma-0"},[e("v-col",{staticClass:"pa-0",attrs:{cols:12}},[t._t("content")],2)],1)],1),t._v(" "),t._t("default")],2)],2),t._v(" "),e("jh-toast"),t._v(" "),e("jh-mask"),t._v(" "),e("jh-confirm-dialog")],1)};ft._withStripped=!0;const ht=i({name:"JhPageContainer",props:{pageName:{type:String,required:!0,default:"页面标题"},showHelpButton:{type:Boolean,default:!0}}},ft,[],!1,null,null,null).exports;var pt=function(){var t=this,e=t._self._c;return e("v-app",[e("jh-menu",{attrs:{"app-title":t.title,"menu-list":t.formattedMenuData,"right-menu-list":t.rightMenuList,"avatar-menu-list":t.formattedAvatarMenuList,"user-info":t.userInfo,"show-avatar":t.showAvatar,"active-menu-index":t.currentMenuIndex,"active-second-menu-id":t.currentSecondMenuId},on:{"menu-click":t.handleMenuClick,logout:t.handleLogout},scopedSlots:t._u([{key:"title",fn:function(){return[t._t("logo",function(){return[e("div",{staticClass:"d-flex align-center"},[t.logo?e("v-icon",{staticClass:"mr-2",attrs:{color:"primary"}},[t._v(t._s(t.logo))]):t._e(),t._v(" "),e("span",{staticClass:"text-h6 font-weight-bold primary--text"},[t._v(t._s(t.title))])],1)]})]},proxy:!0}],null,!0)}),t._v(" "),e("v-main",{staticClass:"jh-layout-main"},[e("div",{staticClass:"jh-layout-content",style:{backgroundColor:t.contentBackground}},[t._t("default")],2)]),t._v(" "),t.showSettings?e("v-navigation-drawer",{staticClass:"jh-layout-settings",attrs:{app:"",right:"",temporary:"",width:"320"},model:{value:t.settingsDrawer,callback:function(e){t.settingsDrawer=e},expression:"settingsDrawer"}},[e("v-toolbar",{attrs:{flat:"",color:"primary",dark:""}},[e("v-toolbar-title",[t._v("布局设置")]),t._v(" "),e("v-spacer"),t._v(" "),e("v-btn",{attrs:{icon:""},on:{click:function(e){t.settingsDrawer=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),t._v(" "),e("v-list",[e("v-list-item",[e("v-list-item-content",[e("v-list-item-title",{staticClass:"font-weight-bold mb-2"},[t._v("内容背景色")]),t._v(" "),e("v-text-field",{attrs:{dense:"",outlined:"","hide-details":"",placeholder:"#f5f5f5"},scopedSlots:t._u([{key:"prepend-inner",fn:function(){return[e("div",{style:{backgroundColor:t.internalContentBackground,width:"24px",height:"24px",borderRadius:"4px",border:"1px solid #ddd"}})]},proxy:!0}],null,!1,3625797711),model:{value:t.internalContentBackground,callback:function(e){t.internalContentBackground=e},expression:"internalContentBackground"}})],1)],1),t._v(" "),e("v-divider"),t._v(" "),e("v-list-item",[e("v-list-item-content",[e("v-list-item-title",{staticClass:"font-weight-bold mb-2"},[t._v("功能开关")]),t._v(" "),e("v-switch",{staticClass:"mt-2",attrs:{label:"显示用户头像",dense:"","hide-details":""},model:{value:t.internalShowAvatar,callback:function(e){t.internalShowAvatar=e},expression:"internalShowAvatar"}})],1)],1),t._v(" "),e("v-divider"),t._v(" "),e("v-list-item",[e("v-list-item-content",[e("v-list-item-title",{staticClass:"font-weight-bold mb-3"},[t._v("快速预设")]),t._v(" "),e("v-btn",{staticClass:"mb-2",attrs:{block:"",outlined:"",small:""},on:{click:function(e){return t.applyPreset("default")}}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-palette")]),t._v("\n 默认主题\n ")],1),t._v(" "),e("v-btn",{staticClass:"mb-2",attrs:{block:"",outlined:"",small:""},on:{click:function(e){return t.applyPreset("dark")}}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-weather-night")]),t._v("\n 暗色主题\n ")],1),t._v(" "),e("v-btn",{attrs:{block:"",outlined:"",small:""},on:{click:function(e){return t.applyPreset("compact")}}},[e("v-icon",{attrs:{left:"",small:""}},[t._v("mdi-arrow-collapse-vertical")]),t._v("\n 紧凑模式\n ")],1)],1)],1),t._v(" "),e("v-divider"),t._v(" "),e("v-list-item",[e("v-list-item-content",[e("v-btn",{attrs:{block:"",color:"error",outlined:""},on:{click:t.resetSettings}},[e("v-icon",{attrs:{left:""}},[t._v("mdi-restore")]),t._v("\n 重置为默认\n ")],1)],1)],1)],1)],1):t._e(),t._v(" "),t.showSettings?e("v-btn",{staticClass:"jh-layout-settings-btn",attrs:{fab:"",fixed:"",right:"",bottom:"",color:"primary",elevation:"4"},on:{click:function(e){t.settingsDrawer=!0}}},[e("v-icon",[t._v("mdi-cog")])],1):t._e()],1)};function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function mt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function yt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mt(Object(n),!0).forEach(function(e){bt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function bt(t,e,n){return(e=function(t){var e=function(t){if("object"!=vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}pt._withStripped=!0;const gt=i({name:"JhLayout",components:{JhMenu:r},props:{title:{type:String,default:"JianghuJS"},logo:{type:String,default:""},menuData:{type:Array,default:function(){return[]}},rightMenuList:{type:Array,default:function(){return[]}},currentPath:{type:String,default:""},contentBackground:{type:String,default:"#f5f5f5"},showAvatar:{type:Boolean,default:!0},userInfo:{type:Object,default:function(){return{username:"Guest",userId:"",roles:[]}}},avatarMenuList:{type:Array,default:function(){return[]}},showSettings:{type:Boolean,default:!1}},data:function(){return{settingsDrawer:!1,currentMenuIndex:-1,currentSecondMenuId:null,internalContentBackground:this.contentBackground,internalShowAvatar:this.showAvatar}},computed:{formattedMenuData:function(){return this.formatMenuItems(this.menuData)},formattedAvatarMenuList:function(){return this.avatarMenuList.map(function(t){return yt(yt({},t),{},{title:t.name||t.title,id:t.path||t.id})})}},watch:{internalContentBackground:function(t){this.$emit("update:contentBackground",t)},internalShowAvatar:function(t){this.$emit("update:showAvatar",t)},currentPath:{handler:function(t){this.updateActiveMenu(t)},immediate:!0}},methods:{formatMenuItems:function(t){var e=this;return t.map(function(t){return yt(yt({},t),{},{title:t.name||t.title,id:t.path||t.id,children:t.children?e.formatMenuItems(t.children):void 0})})},updateActiveMenu:function(t){var e=this;if(t){var n=function(t,i){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,a=0;a<t.length;a++){var o=t[a],l=-1===r?a:r;if(o.path===i)return e.currentMenuIndex=l,e.currentSecondMenuId=o.id||o.path,!0;if(o.children&&n(o.children,i,l))return!0}return!1};n(this.menuData,t)}},handleMenuClick:function(t,e){void 0!==e&&(this.currentMenuIndex=e),t.id&&(this.currentSecondMenuId=t.id),this.$emit("menu-click",t)},handleLogout:function(){this.$emit("logout")},applyPreset:function(t){switch(t){case"default":this.internalContentBackground="#f5f5f5",this.internalShowAvatar=!0;break;case"dark":this.internalContentBackground="#1e1e1e",this.internalShowAvatar=!0;break;case"compact":this.internalContentBackground="#ffffff",this.internalShowAvatar=!0}},resetSettings:function(){this.internalContentBackground="#f5f5f5",this.internalShowAvatar=!0}}},pt,[],!1,null,"181b7ada",null).exports;var _t=function(){var t=this,e=t._self._c;return e("div",{class:t.cardClasses,style:t.cardStyles},[t.hasHeader?e("div",{class:t.headerClasses},[e("div",{staticClass:"jh-card-header-left"},[t.title?e("div",{staticClass:"jh-card-title"},[t._v("\n "+t._s(t.title)+"\n ")]):t._e(),t._v(" "),t._t("title"),t._v(" "),t.tooltip?e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-icon",t._g(t._b({staticClass:"ml-2",attrs:{small:""}},"v-icon",r,!1),i),[t._v("\n mdi-help-circle-outline\n ")])]}}],null,!1,732963286)},[t._v(" "),e("span",[t._v(t._s(t.tooltip))])]):t._e()],2),t._v(" "),t.extra||t.$slots.extra?e("div",{staticClass:"jh-card-extra"},[t._t("extra",function(){return[t._v(t._s(t.extra))]})],2):t._e(),t._v(" "),t.collapsible?e("v-btn",{staticClass:"ml-2",attrs:{icon:"",small:""},on:{click:t.toggleCollapse}},[e("v-icon",[t._v(t._s(t.isCollapsed?"mdi-chevron-down":"mdi-chevron-up"))])],1):t._e()],1):t._e(),t._v(" "),t.hasHeader&&t.headerBordered?e("v-divider"):t._e(),t._v(" "),t.tabs?e("v-tabs",{class:t.tabsClasses,attrs:{vertical:"left"===t.tabs.tabPosition||"right"===t.tabs.tabPosition},on:{change:t.handleTabChange},model:{value:t.activeTabKey,callback:function(e){t.activeTabKey=e},expression:"activeTabKey"}},t._l(t.tabPanes,function(n){return e("v-tab",{key:n.key},[t._v("\n "+t._s(n.tab)+"\n ")])}),1):t._e(),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.isCollapsed,expression:"!isCollapsed"}],class:t.bodyClasses,style:t.bodyStyles},[t.tabs?[e("v-tabs-items",{model:{value:t.activeTabKey,callback:function(e){t.activeTabKey=e},expression:"activeTabKey"}},t._l(t.tabPanes,function(n){return e("v-tab-item",{key:n.key},[t._t("tab-".concat(n.key),function(){return[t._v("\n "+t._s(n.content)+"\n ")]})],2)}),1)]:[t.loading?e("div",{staticClass:"jh-card-loading"},[e("v-progress-circular",{attrs:{indeterminate:"",color:"primary"}})],1):t._t("default")]],2),t._v(" "),t.actions&&t.actions.length>0?[e("v-divider"),t._v(" "),e("div",{staticClass:"jh-card-actions"},t._l(t.actions,function(n,i){return e("div",{key:i,staticClass:"jh-card-action-item"},[e(n.component||"div",t._b({tag:"component",on:{click:n.onClick}},"component",n.props,!1),[n.icon?e("v-icon",[t._v(t._s(n.icon))]):t._e(),t._v(" "),n.text?e("span",[t._v(t._s(n.text))]):t._e()],1),t._v(" "),i<t.actions.length-1?e("v-divider",{staticClass:"mx-2",attrs:{vertical:""}}):t._e()],1)}),0)]:t._e()],2)};function wt(t){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt(t)}function St(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Ct(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?St(Object(n),!0).forEach(function(e){xt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):St(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function xt(t,e,n){return(e=function(t){var e=function(t){if("object"!=wt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=wt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}_t._withStripped=!0;const jt=i({name:"JhCard",props:{title:{type:String,default:""},subTitle:{type:String,default:""},tooltip:{type:String,default:""},extra:{type:String,default:""},bordered:{type:Boolean,default:!0},headerBordered:{type:Boolean,default:!1},ghost:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},defaultCollapsed:{type:Boolean,default:!1},size:{type:String,default:"default",validator:function(t){return["small","default"].includes(t)}},loading:{type:Boolean,default:!1},actions:{type:Array,default:function(){return[]}},layout:{type:String,default:"default",validator:function(t){return["default","center"].includes(t)}},direction:{type:String,default:"row",validator:function(t){return["row","column"].includes(t)}},split:{type:String,default:"",validator:function(t){return["","vertical","horizontal"].includes(t)}},colSpan:{type:[Number,String],default:24},gutter:{type:[Number,Array],default:0},tabs:{type:Object,default:null},hoverable:{type:Boolean,default:!1},bodyStyle:{type:Object,default:function(){return{}}},headStyle:{type:Object,default:function(){return{}}}},data:function(){var t;return{isCollapsed:this.defaultCollapsed,activeTabKey:(null===(t=this.tabs)||void 0===t?void 0:t.activeKey)||0,tabPanes:[]}},computed:{hasHeader:function(){return this.title||this.$slots.title||this.extra||this.$slots.extra||this.collapsible},cardClasses:function(){return["jh-card",{"jh-card--bordered":this.bordered,"jh-card--ghost":this.ghost,"jh-card--small":"small"===this.size,"jh-card--hoverable":this.hoverable,"jh-card--split-vertical":"vertical"===this.split,"jh-card--split-horizontal":"horizontal"===this.split,"jh-card--layout-center":"center"===this.layout}]},cardStyles:function(){var t,e,n={};if(24!==this.colSpan&&("number"==typeof this.colSpan?(n.flex="0 0 ".concat(this.colSpan/24*100,"%"),n.maxWidth="".concat(this.colSpan/24*100,"%")):"string"==typeof this.colSpan&&(this.colSpan.endsWith("%")||this.colSpan.endsWith("px"))&&(n.flex="0 0 ".concat(this.colSpan),n.maxWidth=this.colSpan)),this.gutter)if(Array.isArray(this.gutter)){var i=(t=this.gutter,e=2,function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,a,o,l=[],s=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(i=a.call(n)).done)&&(l.push(i.value),l.length!==e);s=!0);}catch(t){c=!0,r=t}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return kt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],a=i[1];r&&(n.marginLeft="".concat(r/2,"px")),r&&(n.marginRight="".concat(r/2,"px")),a&&(n.marginTop="".concat(a/2,"px")),a&&(n.marginBottom="".concat(a/2,"px"))}else n.gap="".concat(this.gutter,"px");return n},headerClasses:function(){return["jh-card-header",{"jh-card-header--small":"small"===this.size}]},bodyClasses:function(){return["jh-card-body",{"jh-card-body--small":"small"===this.size,"jh-card-body--ghost":this.ghost,"jh-card-body--center":"center"===this.layout}]},bodyStyles:function(){return Ct(Ct({},this.bodyStyle),{},{flexDirection:this.direction})},tabsClasses:function(){var t;return["jh-card-tabs",{"jh-card-tabs--card":"card"===(null===(t=this.tabs)||void 0===t?void 0:t.type)}]}},watch:{"tabs.activeKey":function(t){this.activeTabKey=t}},mounted:function(){this.tabs&&this.$slots.default&&this.collectTabPanes()},methods:{toggleCollapse:function(){this.isCollapsed=!this.isCollapsed,this.$emit("collapse",this.isCollapsed)},handleTabChange:function(t){var e;this.activeTabKey=t,this.$emit("tab-change",t),null!==(e=this.tabs)&&void 0!==e&&e.onChange&&this.tabs.onChange(t)},collectTabPanes:function(){var t=[];(this.$slots.default||[]).forEach(function(e,n){if(e.componentOptions&&"jh-card-tab-pane"===e.componentOptions.tag){var i=e.componentOptions.propsData||{};t.push({key:i.tabKey||n,tab:i.tab||"Tab ".concat(n+1),content:e})}}),this.tabPanes=t}}},_t,[],!1,null,"7e359408",null).exports;var Ot=function(){var t=this,e=t._self._c;return e("div",{class:t.cardClasses,style:t.cardStyles},[t.title||t.$slots.title?e("div",{staticClass:"jh-statistic-card-header"},[t._t("title",function(){return[e("div",{staticClass:"jh-statistic-card-title"},[t._v(t._s(t.title))])]}),t._v(" "),t.tooltip?e("div",{staticClass:"jh-statistic-card-tooltip"},[e("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(n){var i=n.on,r=n.attrs;return[e("v-icon",t._g(t._b({attrs:{small:""}},"v-icon",r,!1),i),[t._v("mdi-help-circle-outline")])]}}],null,!1,722434280)},[t._v(" "),e("span",[t._v(t._s(t.tooltip))])])],1):t._e()],2):t._e(),t._v(" "),e("div",{staticClass:"jh-statistic-card-content"},[e("div",{staticClass:"jh-statistic-card-statistic"},[e("div",{staticClass:"jh-statistic-card-value-wrapper"},[t.prefix?e("span",{staticClass:"jh-statistic-card-prefix"},[t._v(t._s(t.prefix))]):t._e(),t._v(" "),e("span",{class:t.valueClasses,style:t.valueStyles},[t._t("value",function(){return[t._v(t._s(t.formattedValue))]})],2),t._v(" "),t.suffix?e("span",{staticClass:"jh-statistic-card-suffix"},[t._v(t._s(t.suffix))]):t._e()]),t._v(" "),t.trend||t.$slots.trend?e("div",{staticClass:"jh-statistic-card-trend"},[t._t("trend",function(){return[e("v-icon",{staticClass:"jh-statistic-card-trend-icon",attrs:{small:"",color:t.trendColor}},[t._v("\n "+t._s(t.trendIcon)+"\n ")]),t._v(" "),e("span",{style:{color:t.trendColor}},[t._v(t._s(t.trend))])]})],2):t._e(),t._v(" "),t.description||t.$slots.description?e("div",{staticClass:"jh-statistic-card-description"},[t._t("description",function(){return[t._v(t._s(t.description))]})],2):t._e()]),t._v(" "),t.hasChart?e("div",{staticClass:"jh-statistic-card-chart"},[t._t("chart",function(){return[t.chartOption?e("v-chart",{style:t.chartStyles,attrs:{option:t.chartOption,autoresize:""}}):t._e()]})],2):t._e()]),t._v(" "),t.$slots.footer||t.footer?e("div",{staticClass:"jh-statistic-card-footer"},[t._t("footer",function(){return[t._v(t._s(t.footer))]})],2):t._e()])};Ot._withStripped=!0;var Dt=function(){return"undefined"!=typeof window&&window.echarts};const Pt=i({name:"JhStatisticCard",components:{VChart:{name:"VChart",props:{option:Object,autoresize:{type:Boolean,default:!0}},data:function(){return{chart:null}},mounted:function(){this.initChart(),this.autoresize&&window.addEventListener("resize",this.handleResize)},beforeDestroy:function(){this.chart&&this.chart.dispose(),this.autoresize&&window.removeEventListener("resize",this.handleResize)},watch:{option:{handler:function(){this.updateChart()},deep:!0}},methods:{initChart:function(){Dt()?(this.chart=window.echarts.init(this.$el),this.updateChart()):console.warn("ECharts is not available. Please include ECharts CDN.")},updateChart:function(){this.chart&&this.option&&this.chart.setOption(this.option,!0)},handleResize:function(){this.chart&&this.chart.resize()}},render:function(t){return t("div",{style:{width:"100%",height:"100%"}})}}},props:{title:{type:String,default:""},tooltip:{type:String,default:""},value:{type:[Number,String],default:0},prefix:{type:String,default:""},suffix:{type:String,default:""},precision:{type:Number,default:0},valueColor:{type:String,default:""},trend:{type:String,default:""},trendType:{type:String,default:"up",validator:function(t){return["up","down"].includes(t)}},description:{type:String,default:""},footer:{type:String,default:""},chartOption:{type:Object,default:null},chartHeight:{type:[Number,String],default:46},chartWidth:{type:[Number,String],default:100},bordered:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},layout:{type:String,default:"horizontal",validator:function(t){return["horizontal","vertical"].includes(t)}}},computed:{formattedValue:function(){return"number"==typeof this.value?this.value.toFixed(this.precision):this.value},trendIcon:function(){return"up"===this.trendType?"mdi-trending-up":"mdi-trending-down"},trendColor:function(){return"up"===this.trendType?"#52c41a":"#f5222d"},hasChart:function(){return(this.$slots.chart||this.chartOption)&&Dt()},cardClasses:function(){return["jh-statistic-card",{"jh-statistic-card--bordered":this.bordered,"jh-statistic-card--loading":this.loading,"jh-statistic-card--vertical":"vertical"===this.layout}]},cardStyles:function(){return{}},valueClasses:function(){return["jh-statistic-card-value"]},valueStyles:function(){var t={};return this.valueColor&&(t.color=this.valueColor),t},chartStyles:function(){return{height:"number"==typeof this.chartHeight?"".concat(this.chartHeight,"px"):this.chartHeight,width:"number"==typeof this.chartWidth?"".concat(this.chartWidth,"px"):this.chartWidth}}}},Ot,[],!1,null,"39b0e8b7",null).exports;var It=function(){var t=this;return(0,t._self._c)("div",{staticClass:"jh-watermark",style:t.containerStyle},[t._t("default")],2)};function Ft(t){return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(t)}function Tt(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return At(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(At(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,At(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,At(d,"constructor",c),At(c,"constructor",s),s.displayName="GeneratorFunction",At(c,r,"GeneratorFunction"),At(d),At(d,r,"Generator"),At(d,i,function(){return this}),At(d,"toString",function(){return"[object Generator]"}),(Tt=function(){return{w:a,m:f}})()}function At(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}At=function(t,e,n,i){function a(e,n){At(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},At(t,e,n,i)}function $t(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function Bt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Rt(t,e,n){return(e=function(t){var e=function(t){if("object"!=Ft(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ft(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}It._withStripped=!0;const Vt=i({name:"JhWaterMark",props:{content:{type:[String,Array],default:""},image:{type:String,default:""},width:{type:Number,default:120},height:{type:Number,default:64},rotate:{type:Number,default:-22},gapX:{type:Number,default:212},gapY:{type:Number,default:222},offsetX:{type:Number,default:void 0},offsetY:{type:Number,default:void 0},font:{type:Object,default:function(){return{}}},zIndex:{type:Number,default:9},getContainer:{type:Function,default:void 0}},data:function(){return{watermarkUrl:"",observer:null}},computed:{containerStyle:function(){return{position:"relative"}},mergedFont:function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Bt(Object(n),!0).forEach(function(e){Rt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({color:"rgba(0, 0, 0, 0.15)",fontSize:16,fontWeight:"normal",fontFamily:"sans-serif",fontStyle:"normal",textAlign:"center"},this.font)},actualOffsetX:function(){return void 0!==this.offsetX?this.offsetX:this.gapX/2},actualOffsetY:function(){return void 0!==this.offsetY?this.offsetY:this.gapY/2}},watch:{content:{handler:function(){this.renderWatermark()},deep:!0},image:function(){this.renderWatermark()},width:function(){this.renderWatermark()},height:function(){this.renderWatermark()},rotate:function(){this.renderWatermark()},gapX:function(){this.renderWatermark()},gapY:function(){this.renderWatermark()},offsetX:function(){this.renderWatermark()},offsetY:function(){this.renderWatermark()},font:{handler:function(){this.renderWatermark()},deep:!0}},mounted:function(){this.renderWatermark(),this.observeWatermark()},beforeDestroy:function(){this.destroyWatermark(),this.observer&&this.observer.disconnect()},methods:{renderWatermark:function(){var t,e=this;return(t=Tt().m(function t(){var n,i,r,a;return Tt().w(function(t){for(;;)switch(t.n){case 0:if(n=document.createElement("canvas"),i=n.getContext("2d"),r=2*(e.width+e.gapX),a=2*(e.height+e.gapY),n.width=r,n.height=a,!e.image){t.n=2;break}return t.n=1,e.drawImageWatermark(i,r,a);case 1:t.n=3;break;case 2:e.content&&e.drawTextWatermark(i,r,a);case 3:e.watermarkUrl=n.toDataURL(),e.updateWatermarkElement();case 4:return t.a(2)}},t)}),function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){$t(a,i,r,o,l,"next",t)}function l(t){$t(a,i,r,o,l,"throw",t)}o(void 0)})})()},drawImageWatermark:function(t,e,n){var i=this;return new Promise(function(r,a){var o=new Image;o.crossOrigin="anonymous",o.referrerPolicy="no-referrer",o.onload=function(){t.save();var a=e/2,l=n/2;t.translate(a,l),t.rotate(Math.PI/180*i.rotate),t.drawImage(o,-i.width/2,-i.height/2,i.width,i.height),t.restore(),r()},o.onerror=function(){console.error("Watermark image load failed"),a()},o.src=i.image})},drawTextWatermark:function(t,e,n){var i=this.mergedFont,r=i.color,a=i.fontSize,o=i.fontWeight,l=i.fontFamily,s=i.fontStyle,c=i.textAlign;t.save(),t.font="".concat(s," ").concat(o," ").concat(a,"px ").concat(l),t.fillStyle=r,t.textAlign=c,t.textBaseline="middle";var u=e/2,d=n/2;t.translate(u,d),t.rotate(Math.PI/180*this.rotate);var f=Array.isArray(this.content)?this.content:[this.content],h=1.5*a,p=-f.length*h/2+h/2;f.forEach(function(e,n){var i=p+n*h;t.fillText(e,0,i)}),t.restore()},updateWatermarkElement:function(){this.destroyWatermark();var t=this.getContainer?this.getContainer():this.$el;if(t){var e=document.createElement("div");e.className="jh-watermark-layer",e.style.cssText="\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n z-index: ".concat(this.zIndex,";\n background-image: url(").concat(this.watermarkUrl,");\n background-repeat: repeat;\n background-position: ").concat(this.actualOffsetX,"px ").concat(this.actualOffsetY,"px;\n overflow: hidden;\n "),e.setAttribute("data-watermark","true"),t.appendChild(e),this.watermarkElement=e}},destroyWatermark:function(){this.watermarkElement&&this.watermarkElement.parentNode&&(this.watermarkElement.parentNode.removeChild(this.watermarkElement),this.watermarkElement=null)},observeWatermark:function(){var t=this;window.MutationObserver&&(this.observer=new MutationObserver(function(e){e.forEach(function(e){"childList"===e.type?Array.from(e.removedNodes).some(function(e){return e===t.watermarkElement})&&t.updateWatermarkElement():"attributes"===e.type&&e.target===t.watermarkElement&&t.updateWatermarkElement()})}),this.observer.observe(this.$el,{childList:!0,attributes:!0,subtree:!0}))}}},It,[],!1,null,"44935ffe",null).exports;var Et=function(){var t=this,e=t._self._c;return e("v-overlay",{attrs:{value:t.value,opacity:t.opacity,color:t.color,"z-index":t.zIndex},on:{click:t.handleClick}},[t._t("default",function(){return[t.showLoading?e("v-progress-circular",{attrs:{size:t.loadingSize,width:t.loadingWidth,color:t.loadingColor,indeterminate:""}}):t._e()]})],2)};Et._withStripped=!0;const Lt=i({name:"JhMask",props:{value:{type:Boolean,default:!1},color:{type:String,default:"#e3e3e3"},opacity:{type:[Number,String],default:.8,validator:function(t){var e=parseFloat(t);return e>=0&&e<=1}},zIndex:{type:[Number,String],default:300},showLoading:{type:Boolean,default:!1},loadingSize:{type:[Number,String],default:64},loadingWidth:{type:[Number,String],default:7},loadingColor:{type:String,default:"primary"},closeOnClick:{type:Boolean,default:!1},timeout:{type:Number,default:0}},data:function(){return{timer:null}},watch:{value:function(t){t&&this.timeout>0?this.startTimer():t||this.clearTimer()}},beforeDestroy:function(){this.clearTimer()},methods:{handleClick:function(){this.closeOnClick&&(this.$emit("input",!1),this.$emit("click"))},startTimer:function(){var t=this;this.clearTimer(),this.timer=setTimeout(function(){t.$emit("input",!1),t.$emit("timeout")},this.timeout)},clearTimer:function(){this.timer&&(clearTimeout(this.timer),this.timer=null)}}},Et,[],!1,null,"79554ce9",null).exports;var Nt=function(){var t=this,e=t._self._c;return e("v-snackbar",{class:["jh-toast","jh-toast--".concat(t.type)],attrs:{color:t.currentColor,timeout:t.currentTimeout,top:t.position.includes("top"),bottom:t.position.includes("bottom"),left:t.position.includes("left"),right:t.position.includes("right"),vertical:t.vertical,elevation:t.elevation},on:{input:t.handleInput},scopedSlots:t._u([{key:"action",fn:function(n){var i=n.attrs;return[t.showCloseButton?e("v-btn",t._b({attrs:{color:t.closeButtonColor,text:"",small:""},on:{click:t.close}},"v-btn",i,!1),[t._v("\n "+t._s(t.closeButtonText)+"\n ")]):t._e(),t._v(" "),t.actionText?e("v-btn",t._b({attrs:{color:t.actionButtonColor,text:"",small:""},on:{click:t.handleAction}},"v-btn",i,!1),[t._v("\n "+t._s(t.actionText)+"\n ")]):t._e()]}}]),model:{value:t.isVisible,callback:function(e){t.isVisible=e},expression:"isVisible"}},[e("div",{staticClass:"jh-toast__content"},["loading"===t.type?e("v-progress-circular",{staticClass:"jh-toast__icon",attrs:{size:18,width:3,color:"white",indeterminate:""}}):t.currentIcon?e("v-icon",{staticClass:"jh-toast__icon",attrs:{color:t.iconColor}},[t._v("\n "+t._s(t.currentIcon)+"\n ")]):t._e(),t._v(" "),e("span",{staticClass:"jh-toast__message"},[t._v(t._s(t.currentMessage))])],1)])};Nt._withStripped=!0;const Mt=i({name:"JhToast",props:{value:{type:Boolean,default:!1},message:{type:String,default:""},type:{type:String,default:"success",validator:function(t){return["success","error","warning","info","loading"].includes(t)}},position:{type:String,default:"top",validator:function(t){return["top","bottom","top-left","top-right","bottom-left","bottom-right"].includes(t)}},timeout:{type:Number,default:3e3},color:{type:String,default:""},icon:{type:String,default:""},iconColor:{type:String,default:"white"},showCloseButton:{type:Boolean,default:!0},closeButtonText:{type:String,default:"关闭"},closeButtonColor:{type:String,default:"white"},actionText:{type:String,default:""},actionButtonColor:{type:String,default:"white"},vertical:{type:Boolean,default:!1},elevation:{type:[Number,String],default:24},maxLength:{type:Number,default:100}},data:function(){return{isVisible:!1}},computed:{currentMessage:function(){var t=this.message||"";return t.length>this.maxLength&&(t=t.substring(0,this.maxLength)+"..."),t},currentColor:function(){return this.color?this.color:{success:"success",error:"error",warning:"warning",info:"info",loading:"primary"}[this.type]||"success"},currentIcon:function(){return this.icon?this.icon:"loading"===this.type?"":{success:"mdi-check-circle",error:"mdi-alert-circle",warning:"mdi-alert",info:"mdi-information"}[this.type]||"mdi-check-circle"},currentTimeout:function(){return"loading"===this.type?-1:this.timeout}},watch:{value:function(t){this.isVisible=t},isVisible:function(t){t||this.$emit("input",!1)}},mounted:function(){this.isVisible=this.value},methods:{handleInput:function(t){this.$emit("input",t),t||this.$emit("close")},close:function(){this.isVisible=!1},handleAction:function(){this.$emit("action")}}},Nt,[],!1,null,"0da7bef5",null).exports;var Kt=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{"max-width":t.maxWidth,persistent:t.persistent},on:{"click:outside":t.handleClickOutside},model:{value:t.isVisible,callback:function(e){t.isVisible=e},expression:"isVisible"}},[e("v-card",[t.title||t.$slots.title?e("v-card-title",[t._t("title",function(){return[t._v(t._s(t.title))]})],2):t._e(),t._v(" "),t.content||t.$slots.default?e("v-card-text",{class:t.contentClass},[t._t("default",function(){return[e("div",{domProps:{innerHTML:t._s(t.content)}})]})],2):t._e(),t._v(" "),e("v-card-actions",[e("v-spacer"),t._v(" "),t.showCancelButton?e("v-btn",{attrs:{color:t.cancelButtonColor,text:""!==t.cancelButtonText,disabled:t.loading},on:{click:t.handleCancel}},[t._v("\n "+t._s(t.cancelButtonText||"取消")+"\n ")]):t._e(),t._v(" "),e("v-btn",{attrs:{color:t.confirmButtonColor,text:""!==t.confirmButtonText,loading:t.loading},on:{click:t.handleConfirm}},[t._v("\n "+t._s(t.confirmButtonText||"确定")+"\n ")])],1)],1)],1)};function zt(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return Jt(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(Jt(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Jt(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,Jt(d,"constructor",c),Jt(c,"constructor",s),s.displayName="GeneratorFunction",Jt(c,r,"GeneratorFunction"),Jt(d),Jt(d,r,"Generator"),Jt(d,i,function(){return this}),Jt(d,"toString",function(){return"[object Generator]"}),(zt=function(){return{w:a,m:f}})()}function Jt(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}Jt=function(t,e,n,i){function a(e,n){Jt(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},Jt(t,e,n,i)}function Gt(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function Wt(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){Gt(a,i,r,o,l,"next",t)}function l(t){Gt(a,i,r,o,l,"throw",t)}o(void 0)})}}Kt._withStripped=!0;const Ut=i({name:"JhConfirmDialog",props:{value:{type:Boolean,default:!1},title:{type:String,default:"提示"},content:{type:String,default:""},contentClass:{type:String,default:"pa-6 text-pre-line"},maxWidth:{type:[String,Number],default:420},showCancelButton:{type:Boolean,default:!0},confirmButtonText:{type:String,default:"确定"},cancelButtonText:{type:String,default:"取消"},confirmButtonColor:{type:String,default:"primary"},cancelButtonColor:{type:String,default:"default"},persistent:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},beforeConfirm:{type:Function,default:null},beforeCancel:{type:Function,default:null}},data:function(){return{isVisible:!1}},watch:{value:function(t){this.isVisible=t},isVisible:function(t){t!==this.value&&this.$emit("input",t)}},mounted:function(){this.isVisible=this.value},methods:{handleConfirm:function(){var t=this;return Wt(zt().m(function e(){return zt().w(function(e){for(;;)switch(e.n){case 0:if(!t.beforeConfirm){e.n=2;break}return e.n=1,t.beforeConfirm();case 1:if(!1!==e.v){e.n=2;break}return e.a(2);case 2:t.$emit("confirm"),t.loading||t.close();case 3:return e.a(2)}},e)}))()},handleCancel:function(){var t=this;return Wt(zt().m(function e(){return zt().w(function(e){for(;;)switch(e.n){case 0:if(!t.beforeCancel){e.n=2;break}return e.n=1,t.beforeCancel();case 1:if(!1!==e.v){e.n=2;break}return e.a(2);case 2:t.$emit("cancel"),t.close();case 3:return e.a(2)}},e)}))()},handleClickOutside:function(){this.persistent||(this.$emit("click-outside"),this.$emit("cancel"))},close:function(){this.isVisible=!1},open:function(){this.isVisible=!0}}},Kt,[],!1,null,"4d697b30",null).exports;var qt=function(){var t=this,e=t._self._c;return e("v-form",t._g(t._b({ref:t.formRef,class:t.formClasses,attrs:{"lazy-validation":t.lazyValidation}},"v-form",t.mergedFormProps,!1),t.formListeners),[e("jh-form-fields",{attrs:{fields:t.normalizedFields,layout:t.internalLayout,"show-labels":t.showLabels,"label-width":t.labelWidth,"label-align":t.labelAlign,"show-required-mark":t.showRequiredMark,readonly:t.readonly,disabled:t.disabled,"default-dense":t.defaultDense,"default-filled":t.defaultFilled,"default-outlined":t.defaultOutlined,"default-single-line":t.defaultSingleLine,"default-cols-md":t.defaultColsMd,"hide-details":t.hideDetails,"label-class":t.labelClass,"input-class":t.inputClass,"row-class":t.rowClass,"validation-rules":t.validationRules,"row-props":t.gridRowProps},on:{"field-input":t.handleFieldInput,"field-change":t.handleFieldChange,"field-blur":t.handleFieldBlur},scopedSlots:t._u([t._l(t.slotFields,function(e){return{key:"field-".concat(e.key),fn:function(n){return[t._t("field-".concat(e.key),null,null,n)]}}})],null,!0),model:{value:t.formData,callback:function(e){t.formData=e},expression:"formData"}}),t._v(" "),t.isGridLayout?[e("v-row",t._b({staticClass:"jh-form-grid-actions-row"},"v-row",t.rowProps,!1),[e("v-col",{staticClass:"jh-form-actions-col",attrs:{cols:"12"}},[t._t("actions",null,{formData:t.formData,validate:t.validate,resetForm:t.resetForm})],2)],1)]:[t._t("actions",null,{formData:t.formData,validate:t.validate,resetForm:t.resetForm})]],2)};qt._withStripped=!0;var Ht,Yt=["class","style"];function Xt(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return Zt(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(Zt(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Zt(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,Zt(d,"constructor",c),Zt(c,"constructor",s),s.displayName="GeneratorFunction",Zt(c,r,"GeneratorFunction"),Zt(d),Zt(d,r,"Generator"),Zt(d,i,function(){return this}),Zt(d,"toString",function(){return"[object Generator]"}),(Xt=function(){return{w:a,m:f}})()}function Zt(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}Zt=function(t,e,n,i){function a(e,n){Zt(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},Zt(t,e,n,i)}function Qt(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function te(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){Qt(a,i,r,o,l,"next",t)}function l(t){Qt(a,i,r,o,l,"throw",t)}o(void 0)})}}function ee(t){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ee(t)}function ne(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function ie(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ne(Object(n),!0).forEach(function(e){re(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function re(t,e,n){return(e=function(t){var e=function(t){if("object"!=ee(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ee(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const ae=i({name:"JhForm",inheritAttrs:!1,components:{JhFormFields:k},props:{fields:{type:Array,default:function(){return[]}},initialData:{type:Object,default:function(){return{}}},formRef:{type:String,default:"jhForm"},lazyValidation:{type:Boolean,default:!0},layout:{type:String,default:"vertical",validator:function(t){return["horizontal","vertical","inline","grid"].includes(t)}},showLabels:{type:Boolean,default:!0},labelPosition:{type:String,default:"top",validator:function(t){return["top","left"].includes(t)}},labelWidth:{type:[Number,String],default:"auto"},labelAlign:{type:String,default:"right",validator:function(t){return["left","right","center"].includes(t)}},showRequiredMark:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},defaultDense:{type:Boolean,default:!0},defaultFilled:{type:Boolean,default:!0},defaultOutlined:{type:Boolean,default:!1},defaultSingleLine:{type:Boolean,default:!0},defaultColsMd:{type:Number,default:6},hideDetails:{type:[Boolean,String],default:!0},labelClass:{type:String,default:"jh-input-label"},inputClass:{type:String,default:"jh-v-input"},rowClass:{type:String,default:""},validationRules:{type:Object,default:function(){return{require:[function(t){return!!t||"必填"}],email:[function(t){return!t||/.+@.+\..+/.test(t)||"邮箱格式不正确"}],phone:[function(t){return!t||/^1[3-9]\d{9}$/.test(t)||"手机号格式不正确"}],number:[function(t){return!t||!isNaN(t)||"请输入数字"}],integer:[function(t){return!t||Number.isInteger(Number(t))||"请输入整数"}]}}},submitter:{type:[Object,Boolean],default:void 0},onFinish:{type:Function,default:void 0},onFinishFailed:{type:Function,default:void 0},dateFormatter:{type:[String,Function,Boolean],default:"YYYY-MM-DD"},omitNil:{type:Boolean,default:!0},grid:{type:Boolean,default:!1},colProps:{type:Object,default:function(){return{}}},rowProps:{type:Object,default:function(){return{}}}},data:function(){return{formData:{},submitLoading:!1,submitError:null}},computed:{formClasses:function(){return re(re(re({"jh-form":!0},"jh-form--".concat(this.layout),!0),"jh-form--readonly",this.readonly),"jh-form--disabled",this.disabled)},isGridLayout:function(){return this.grid||"grid"===this.layout},normalizedFields:function(){var t=this;return this.isGridLayout?this.fields.map(function(e){if("group"===e.type)return ie({},e);var n=t.getColBindings(e),i={};if(void 0!==n.cols&&(i.xs=n.cols),void 0!==n.sm&&(i.sm=n.sm),void 0!==n.md&&(i.md=n.md),void 0!==n.lg&&(i.lg=n.lg),void 0!==n.xl&&(i.xl=n.xl),!Object.keys(i).length)return ie({},e);var r=e.cols&&"object"===ee(e.cols)?e.cols:{};return ie(ie({},e),{},{cols:ie(ie({},r),i)})}):this.fields},internalLayout:function(){return this.isGridLayout?"vertical":this.layout},slotFields:function(){return this.fields.filter(function(t){return"slot"===t.type})},gridRowProps:function(){return this.isGridLayout&&this.rowProps||{}},mergedFormProps:function(){var t=["class","style","lazy-validation","lazyValidation","fields","initialData","formRef","layout","showLabels","labelPosition","labelWidth","labelAlign","showRequiredMark","readonly","disabled","defaultDense","defaultFilled","defaultOutlined","defaultSingleLine","defaultColsMd","hideDetails","labelClass","inputClass","rowClass","validationRules","submitter","onFinish","onFinishFailed","dateFormatter","omitNil","grid","colProps","rowProps"],e=this.$attrs||{},n=(e.class,e.style,function(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}(e,Yt)),i={};return Object.keys(n).forEach(function(e){var r=e.replace(/([A-Z])/g,"-$1").toLowerCase();t.includes(e)||t.includes(r)||(i[e]=n[e])}),i},formListeners:function(){var t=["field-change"],e=ie({},this.$listeners||{}),n={};return Object.keys(e).forEach(function(i){t.includes(i)||(n[i]=e[i])}),n}},watch:{initialData:{handler:function(t){this.formData=ie({},t)},immediate:!0,deep:!0}},mounted:function(){this.initFormData()},methods:ie(ie({initFormData:function(){var t=ie({},this.initialData);this.fields.forEach(function(e){void 0!==e.defaultValue&&void 0===t[e.key]&&(t[e.key]=e.defaultValue)}),this.formData=t},getColBindings:function(t){var e=ie(ie({},this.colProps||{}),t.colProps||{});t.cols&&("object"===ee(t.cols)?Object.assign(e,t.cols):e.cols=t.cols);var n=void 0!==t.colSpan?t.colSpan:e.span,i=void 0!==n?this.mapGridSpan(n):null;return null===i||"cols"in e||"sm"in e||"md"in e||"lg"in e||"xl"in e||(e.md=i),delete e.span,"cols"in e||"sm"in e||"md"in e||"lg"in e||"xl"in e||(e.md=this.mapGridSpan(this.colProps.span||8)),e},mapGridSpan:function(t){var e=Number(t)||0,n=Math.round(e/24*12);return Math.max(1,Math.min(12,n||1))},handleFieldInput:function(t){var e=t.key,n=t.value;this.$emit("input",e,n,this.formData),this.$emit("field-change",{key:e,value:n,formData:this.formData})},handleFieldChange:function(t){var e=t.key,n=t.value;this.$emit("change",e,n,this.formData),this.$emit("field-change",{key:e,value:n,formData:this.formData})},handleFieldBlur:function(t){var e=t.key,n=t.value;this.$emit("blur",e,n,this.formData)},updateField:function(t,e){this.$set(this.formData,t,e),this.handleFieldChange({key:t,value:e})},getForm:function(){return this.$refs[this.formRef]}},(Ht={},["validate","reset","resetValidation"].forEach(function(t){Ht[t]=function(){var e=this.$refs[this.formRef];return e&&"function"==typeof e[t]?e[t].apply(e,arguments):"validate"===t||void 0}}),Ht)),{},re(re(re(re(re(re(re({getFormData:function(){return ie({},this.formData)},setFieldsValue:function(t){this.formData=ie(ie({},this.formData),t)},setFieldValue:function(t,e){this.$set(this.formData,t,e)},reset:function(){var t=this.$refs[this.formRef];t&&t.reset(),this.initFormData(),this.$emit("reset",this.formData)},resetForm:function(){this.reset()},resetValidation:function(){var t=this.$refs[this.formRef];t&&t.resetValidation()},validate:function(){var t=this;return te(Xt().m(function e(){var n,i;return Xt().w(function(e){for(;;)switch(e.n){case 0:if(!(n=t.$refs[t.formRef])){e.n=2;break}return e.n=1,n.validate();case 1:return i=e.v,t.$emit("validate",i,t.formData),e.a(2,i);case 2:return e.a(2,!0)}},e)}))()},validateField:function(t){var e=this;return te(Xt().m(function n(){var i,r;return Xt().w(function(n){for(;;)switch(n.n){case 0:if(!((i=e.$refs[e.formRef])&&i.$refs&&i.$refs[t])){n.n=2;break}if(!(r=i.$refs[t])||"function"!=typeof r.validate){n.n=2;break}return n.n=1,r.validate();case 1:return n.a(2,n.v);case 2:return n.a(2,!0)}},n)}))()},submit:function(){var t=arguments,e=this;return te(Xt().m(function n(){var i,r,a,o,l,s,c,u,d,f;return Xt().w(function(n){for(;;)switch(n.p=n.n){case 0:if(r=(i=t.length>0&&void 0!==t[0]?t[0]:{}).validate,a=void 0===r||r,o=i.transform,l=void 0===o||o,s=i.showLoading,c=void 0!==s&&s,(void 0===(u=i.resetError)||u)&&(e.submitError=null),c&&(e.submitLoading=!0),n.p=1,!a){n.n=3;break}return n.n=2,e.validate();case 2:if(n.v){n.n=3;break}return e.onFinishFailed&&e.onFinishFailed(e.formData),n.a(2,!1);case 3:if(d=l?e.getTransformedData():ie({},e.formData),e.$emit("submit",d),!e.onFinish){n.n=4;break}return n.n=4,e.onFinish(d);case 4:return n.a(2,!0);case 5:return n.p=5,f=n.v,console.error("Form submit error:",f),e.submitError=f.message||"提交失败",e.$emit("submit-error",f),n.a(2,!1);case 6:return n.p=6,c&&(e.submitLoading=!1),n.f(6);case 7:return n.a(2)}},n,null,[[1,5,6,7]])}))()}},"validateField",function(t){var e=this;return te(Xt().m(function t(){var n;return Xt().w(function(t){for(;;)switch(t.n){case 0:if(!(n=e.$refs[e.formRef])||!n.validate){t.n=2;break}return t.n=1,e.validate();case 1:return t.a(2,t.v);case 2:return t.a(2,!0)}},t)}))()}),"getFormState",function(){return{submitLoading:this.submitLoading,submitError:this.submitError,formData:ie({},this.formData)}}),"clearSubmitError",function(){this.submitError=null}),"batchUpdateFields",function(t){var e=this;Object.keys(t).forEach(function(n){e.$set(e.formData,n,t[n]),e.handleFieldChange({key:n,value:t[n]})})}),"getTransformedData",function(){var t=ie({},this.formData);return this.fields.forEach(function(e){e.key&&e.transform&&"function"==typeof e.transform&&(t[e.key]=e.transform(t[e.key],t))}),this.omitNil&&Object.keys(t).forEach(function(e){null!==t[e]&&void 0!==t[e]&&""!==t[e]||delete t[e]}),t}),"getDependenciesValues",function(t){var e=this;return t&&Array.isArray(t)?t.map(function(t){return e.formData[t]}):[]}),"checkDependenciesChanged",function(t,e,n){if(!t.dependencies)return!1;for(var i=0;i<t.dependencies.length;i++)if(e[i]!==n[i])return!0;return!1}))},qt,[],!1,null,"3809d698",null).exports;var oe=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{"max-width":t.width,persistent:t.persistent,fullscreen:t.fullscreen},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.handleCancel.apply(null,arguments)}},model:{value:t.isShownInternal,callback:function(e){t.isShownInternal=e},expression:"isShownInternal"}},[e("v-card",[e("v-card-title",{staticClass:"d-flex align-center justify-space-between pa-4 sticky top-0 z-10 bg-white darken-1"},[e("span",{staticClass:"text-h6"},[t._v(t._s(t.title))]),t._v(" "),t.closable?e("v-btn",{attrs:{icon:"",small:""},on:{click:t.handleCancel}},[e("v-icon",[t._v("mdi-close")])],1):t._e()],1),t._v(" "),e("v-divider"),t._v(" "),e("v-card-text",{staticClass:"pa-6"},[t._t("content",function(){return[e("jh-form",{ref:"jhForm",attrs:{"form-ref":t.formRef,fields:t.fields,"initial-data":t.initialData,"validation-rules":t.validationRules,"default-cols-md":6},on:{"field-change":t.handleFieldChange},scopedSlots:t._u([t._l(t.slotFields,function(e){return{key:"field-".concat(e.key),fn:function(n){return[t._t("field-".concat(e.key),null,null,n)]}}})],null,!0)})]})],2),t._v(" "),e("v-divider"),t._v(" "),e("v-card-actions",{staticClass:"pa-4"},[e("v-spacer"),t._v(" "),e("v-btn",{attrs:{text:""},on:{click:t.handleCancel}},[t._v("\n "+t._s(t.cancelText)+"\n ")]),t._v(" "),t.showConfirmButton?e("v-btn",{attrs:{color:"success"},on:{click:t.handleConfirm}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()],1)],1)],1)};function le(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return se(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(se(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,se(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,se(d,"constructor",c),se(c,"constructor",s),s.displayName="GeneratorFunction",se(c,r,"GeneratorFunction"),se(d),se(d,r,"Generator"),se(d,i,function(){return this}),se(d,"toString",function(){return"[object Generator]"}),(le=function(){return{w:a,m:f}})()}function se(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}se=function(t,e,n,i){function a(e,n){se(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},se(t,e,n,i)}function ce(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function ue(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){ce(a,i,r,o,l,"next",t)}function l(t){ce(a,i,r,o,l,"throw",t)}o(void 0)})}}oe._withStripped=!0;const de=i({name:"JhModalForm",components:{JhForm:ae},props:{value:{type:Boolean,default:!1},title:{type:String,default:"表单"},fields:{type:Array,default:function(){return[]}},initialData:{type:Object,default:function(){return{}}},width:{type:[Number,String],default:600},fullscreen:{type:Boolean,default:!1},persistent:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},showConfirmButton:{type:Boolean,default:!0},confirmText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"},formRef:{type:String,default:"modalForm"},validateBeforeConfirm:{type:Boolean,default:!0},validationRules:{type:Object,default:function(){return{require:[function(t){return!!t||"必填"}],email:[function(t){return!t||/.+@.+\..+/.test(t)||"邮箱格式不正确"}],phone:[function(t){return!t||/^1[3-9]\d{9}$/.test(t)||"手机号格式不正确"}],number:[function(t){return!t||!isNaN(t)||"请输入数字"}],integer:[function(t){return!t||Number.isInteger(Number(t))||"请输入整数"}]}}}},data:function(){return{isShownInternal:this.value}},computed:{slotFields:function(){return this.fields.filter(function(t){return"slot"===t.type})}},watch:{value:function(t){var e=this;this.isShownInternal=t,t&&this.$nextTick(function(){e.resetForm()})},isShownInternal:function(t){t||(this.$emit("input",!1),this.$emit("close"))}},methods:{handleCancel:function(){this.$emit("cancel"),this.isShownInternal=!1},handleConfirm:function(){var t=this;return ue(le().m(function e(){return le().w(function(e){for(;;)switch(e.n){case 0:if(!t.validateBeforeConfirm){e.n=2;break}return e.n=1,t.validate();case 1:if(e.v){e.n=2;break}return e.a(2);case 2:t.$emit("confirm",t.getFormData());case 3:return e.a(2)}},e)}))()},handleFieldChange:function(t){this.$emit("field-change",t)},getJhForm:function(){return this.$refs.jhForm},getForm:function(){var t=this.getJhForm();return t?t.getForm():null},getFormData:function(){var t=this.getJhForm();return t?t.getFormData():{}},setFieldsValue:function(t){var e=this.getJhForm();e&&e.setFieldsValue(t)},setFieldValue:function(t,e){var n=this.getJhForm();n&&n.setFieldValue(t,e)},resetForm:function(){var t=this.getJhForm();t&&t.resetForm()},resetValidation:function(){var t=this.getJhForm();t&&t.resetValidation()},validate:function(){var t=this;return ue(le().m(function e(){var n;return le().w(function(e){for(;;)switch(e.n){case 0:if(!(n=t.getJhForm())){e.n=2;break}return e.n=1,n.validate();case 1:return e.a(2,e.v);case 2:return e.a(2,!0)}},e)}))()}}},oe,[],!1,null,"267503d6",null).exports;var fe=function(){var t=this,e=t._self._c;return e("v-navigation-drawer",{staticClass:"elevation-24",attrs:{fixed:"",temporary:"",right:"right"===t.position,left:"left"===t.position,width:t.width},model:{value:t.isShownInternal,callback:function(e){t.isShownInternal=e},expression:"isShownInternal"}},[e("v-row",{staticClass:"jh-drawer-header px-4 bg-white sticky top-0 z-10",attrs:{"no-gutters":"",align:"center"}},[e("span",{staticClass:"text-h7 font-weight-bold py-4"},[t._v(t._s(t.title))]),t._v(" "),e("v-spacer"),t._v(" "),e("div",{staticClass:"jh-drawer-action-btn-group"},[e("v-btn",{staticClass:"elevation-0 grey lighten-4",attrs:{small:""},on:{click:t.handleCancel}},[t._v("\n "+t._s(t.cancelText)+"\n ")]),t._v(" "),t._t("actions",function(){return[t.showConfirmButton?e("v-btn",{staticClass:"ml-2",attrs:{color:"success",small:""},on:{click:t.handleConfirm}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()]})],2)],1),t._v(" "),e("v-divider",{staticClass:"jh-divider"}),t._v(" "),e("div",{staticClass:"px-4 pb-4"},[t._t("content",function(){return[e("jh-form",{ref:"jhForm",attrs:{"form-ref":t.formRef,fields:t.fields,"initial-data":t.initialData,"validation-rules":t.validationRules,"default-cols-md":3,"row-class":t.rowClass},on:{"field-change":t.handleFieldChange},scopedSlots:t._u([t._l(t.slotFields,function(e){return{key:"field-".concat(e.key),fn:function(n){return[t._t("field-".concat(e.key),null,null,n)]}}})],null,!0)})]})],2),t._v(" "),e("v-btn",{staticClass:"drawer-close-float-btn",attrs:{elevation:"0",color:"success",fab:"",absolute:"",top:"",left:"",small:"",tile:""},on:{click:t.handleCancel}},[e("v-icon",[t._v("mdi-close")])],1)],1)};function he(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return pe(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(pe(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,pe(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,pe(d,"constructor",c),pe(c,"constructor",s),s.displayName="GeneratorFunction",pe(c,r,"GeneratorFunction"),pe(d),pe(d,r,"Generator"),pe(d,i,function(){return this}),pe(d,"toString",function(){return"[object Generator]"}),(he=function(){return{w:a,m:f}})()}function pe(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}pe=function(t,e,n,i){function a(e,n){pe(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},pe(t,e,n,i)}function ve(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function me(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){ve(a,i,r,o,l,"next",t)}function l(t){ve(a,i,r,o,l,"throw",t)}o(void 0)})}}fe._withStripped=!0;const ye=i({name:"JhDrawerForm",components:{JhForm:ae},props:{value:{type:Boolean,default:!1},title:{type:String,default:"表单"},position:{type:String,default:"right",validator:function(t){return["left","right"].includes(t)}},width:{type:String,default:"90%"},showConfirmButton:{type:Boolean,default:!0},confirmText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"},formRef:{type:String,default:"drawerForm"},validateBeforeConfirm:{type:Boolean,default:!0},fields:{type:Array,default:function(){return[]}},initialData:{type:Object,default:function(){return{}}},rowClass:{type:String,default:"mt-0"},validationRules:{type:Object,default:function(){return{require:[function(t){return!!t||"必填"}],email:[function(t){return!t||/.+@.+\..+/.test(t)||"邮箱格式不正确"}],phone:[function(t){return!t||/^1[3-9]\d{9}$/.test(t)||"手机号格式不正确"}],number:[function(t){return!t||!isNaN(t)||"请输入数字"}],integer:[function(t){return!t||Number.isInteger(Number(t))||"请输入整数"}]}}}},data:function(){return{isShownInternal:this.value}},computed:{slotFields:function(){return this.fields.filter(function(t){return"slot"===t.type})}},watch:{value:function(t){var e=this;this.isShownInternal=t,t&&this.$nextTick(function(){e.resetForm()})},isShownInternal:function(t){t||(this.$emit("input",!1),this.$emit("close"))}},methods:{handleCancel:function(){this.$emit("cancel"),this.isShownInternal=!1},handleConfirm:function(){var t=this;return me(he().m(function e(){return he().w(function(e){for(;;)switch(e.n){case 0:if(!t.validateBeforeConfirm){e.n=2;break}return e.n=1,t.validate();case 1:if(e.v){e.n=2;break}return e.a(2);case 2:t.$emit("confirm",t.getFormData());case 3:return e.a(2)}},e)}))()},handleFieldChange:function(t){this.$emit("field-change",t)},getJhForm:function(){return this.$refs.jhForm},getForm:function(){var t=this.getJhForm();return t?t.getForm():null},getFormData:function(){var t=this.getJhForm();return t?t.getFormData():{}},setFieldsValue:function(t){var e=this.getJhForm();e&&e.setFieldsValue(t)},setFieldValue:function(t,e){var n=this.getJhForm();n&&n.setFieldValue(t,e)},resetForm:function(){var t=this.getJhForm();t&&t.resetForm()},resetValidation:function(){var t=this.getJhForm();t&&t.resetValidation()},validate:function(){var t=this;return me(he().m(function e(){var n;return he().w(function(e){for(;;)switch(e.n){case 0:if(!(n=t.getJhForm())){e.n=2;break}return e.n=1,n.validate();case 1:return e.a(2,e.v);case 2:return e.a(2,!0)}},e)}))()}}},fe,[],!1,null,"9c936160",null).exports;var be=function(){var t=this,e=t._self._c;return e("v-dialog",t._g(t._b({attrs:{"max-width":t.width,persistent:t.persistent,fullscreen:t.fullscreen},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.handleCancel.apply(null,arguments)}},model:{value:t.isShownInternal,callback:function(e){t.isShownInternal=e},expression:"isShownInternal"}},"v-dialog",t.mergedDialogProps,!1),t.dialogListeners),[e("v-card",[e("v-card-title",{staticClass:"d-flex align-center justify-space-between pa-4 sticky top-0 z-10 bg-white darken-1"},[e("span",{staticClass:"text-h6"},[t._v(t._s(t.title))]),t._v(" "),t.closable?e("v-btn",{attrs:{icon:"",small:""},on:{click:t.handleCancel}},[e("v-icon",[t._v("mdi-close")])],1):t._e()],1),t._v(" "),e("v-divider"),t._v(" "),e("v-card-text",{staticClass:"pa-6"},[t._t("default")],2),t._v(" "),t.showActions?[e("v-divider"),t._v(" "),e("v-card-actions",{staticClass:"pa-4"},[t._t("actions",function(){return[e("v-spacer"),t._v(" "),t.showCancelButton?e("v-btn",{attrs:{text:""},on:{click:t.handleCancel}},[t._v("\n "+t._s(t.cancelText)+"\n ")]):t._e(),t._v(" "),t.showConfirmButton?e("v-btn",{attrs:{color:"success"},on:{click:t.handleConfirm}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()]})],2)]:t._e()],2)],1)};function ge(t){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ge(t)}be._withStripped=!0;var _e=["class","style"];function we(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Se(t,e,n){return(e=function(t){var e=function(t){if("object"!=ge(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ge(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Ce=i({name:"JhModal",inheritAttrs:!1,props:{value:{type:Boolean,default:!1},title:{type:String,default:"弹窗"},width:{type:[Number,String],default:600},fullscreen:{type:Boolean,default:!1},persistent:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},showActions:{type:Boolean,default:!0},showConfirmButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},confirmText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"}},data:function(){return{isShownInternal:this.value}},computed:{mergedDialogProps:function(){var t=["class","style","value","modelValue","max-width","maxWidth","persistent","fullscreen","title","width","closable","showActions","showConfirmButton","showCancelButton","confirmText","cancelText"],e=this.$attrs||{},n=(e.class,e.style,function(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}(e,_e)),i={};return Object.keys(n).forEach(function(e){var r=e.replace(/([A-Z])/g,"-$1").toLowerCase();t.includes(e)||t.includes(r)||(i[e]=n[e])}),i},dialogListeners:function(){var t=["open","close","confirm","cancel"],e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?we(Object(n),!0).forEach(function(e){Se(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},this.$listeners||{}),n={};return Object.keys(e).forEach(function(i){t.includes(i)||(n[i]=e[i])}),n}},watch:{value:function(t){this.isShownInternal=t,t&&this.$emit("open")},isShownInternal:function(t){t||(this.$emit("input",!1),this.$emit("close"))}},methods:{handleCancel:function(){this.$emit("cancel"),this.isShownInternal=!1},handleConfirm:function(){this.$emit("confirm")},open:function(){this.isShownInternal=!0},close:function(){this.isShownInternal=!1}}},be,[],!1,null,"a1b54582",null).exports;var xe=function(){var t=this,e=t._self._c;return e("v-navigation-drawer",t._g(t._b({class:t.drawerClasses,style:t.drawerStyles,attrs:{permanent:t.isShownInternal,fixed:"",temporary:"",right:"right"===t.position,left:"left"===t.position,bottom:t.isBottomPosition,width:t.drawerWidth,height:t.drawerHeight},model:{value:t.isShownInternal,callback:function(e){t.isShownInternal=e},expression:"isShownInternal"}},"v-navigation-drawer",t.mergedDrawerProps,!1),t.drawerListeners),[t.title?e("v-row",{staticClass:"jh-drawer-header px-4 bg-white sticky top-0 z-10",attrs:{"no-gutters":"",align:"center"}},[e("span",{staticClass:"text-h7 font-weight-bold py-4"},[t._v(t._s(t.title))]),t._v(" "),e("v-spacer"),t._v(" "),e("div",{staticClass:"jh-drawer-action-btn-group"},[t._t("actions",function(){return[t.showCancelButton?e("v-btn",{staticClass:"elevation-0 grey lighten-4",attrs:{small:""},on:{click:t.handleCancel}},[t._v("\n "+t._s(t.cancelText)+"\n ")]):t._e(),t._v(" "),t.showConfirmButton?e("v-btn",{staticClass:"ml-2",attrs:{color:"success",small:""},on:{click:t.handleConfirm}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()]})],2)],1):t._e(),t._v(" "),e("v-divider",{staticClass:"jh-divider"}),t._v(" "),e("div",{staticClass:"pa-4"},[t._t("default")],2),t._v(" "),t.shouldRenderCloseButton?e("v-btn",{staticClass:"drawer-close-float-btn",attrs:{elevation:"0",color:"success",fab:"",absolute:"",top:"",left:"",small:"",tile:""},on:{click:t.handleCancel}},[e("v-icon",[t._v("mdi-close")])],1):t._e()],1)};function ke(t){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ke(t)}xe._withStripped=!0;var je=["class","style"];function Oe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function De(t,e,n){return(e=function(t){var e=function(t){if("object"!=ke(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ke(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Pe=i({name:"JhDrawer",inheritAttrs:!1,props:{value:{type:Boolean,default:!1},title:{type:String,default:""},position:{type:String,default:"right",validator:function(t){return["left","right","bottom"].includes(t)}},width:{type:[String,Number],default:"90%"},height:{type:[String,Number],default:"60vh"},showConfirmButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},confirmText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"}},data:function(){return{isShownInternal:this.value}},computed:{isBottomPosition:function(){return"bottom"===this.position},drawerWidth:function(){return this.isBottomPosition?"100%":this.width},drawerHeight:function(){return this.isBottomPosition?this.height:void 0},shouldRenderCloseButton:function(){return this.showCloseButton&&!this.isBottomPosition},drawerClasses:function(){return["elevation-24",{"jh-drawer-bottom":this.isBottomPosition},this.$attrs.class]},drawerStyles:function(){var t=this.$attrs?this.$attrs.style:null;if(!this.isBottomPosition)return t||null;var e={borderTopLeftRadius:"16px",borderTopRightRadius:"16px",top:"auto",bottom:"0",left:"0",right:"0"};return t?[e,t]:e},mergedDrawerProps:function(){var t=["class","style","value","modelValue","permanent","fixed","temporary","right","left","bottom","width","height","title","position","showConfirmButton","showCancelButton","showCloseButton","confirmText","cancelText"],e=this.$attrs||{},n=(e.class,e.style,function(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}(e,je)),i={};return Object.keys(n).forEach(function(e){var r=e.replace(/([A-Z])/g,"-$1").toLowerCase();t.includes(e)||t.includes(r)||(i[e]=n[e])}),i},drawerListeners:function(){var t=["open","close","confirm","cancel"],e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Oe(Object(n),!0).forEach(function(e){De(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},this.$listeners||{}),n={};return Object.keys(e).forEach(function(i){t.includes(i)||(n[i]=e[i])}),n}},watch:{value:function(t){this.isShownInternal=t,t&&this.$emit("open")},isShownInternal:function(t){t||(this.$emit("input",!1),this.$emit("close"))}},methods:{handleCancel:function(){this.$emit("cancel"),this.isShownInternal=!1},handleConfirm:function(){this.$emit("confirm")},open:function(){this.isShownInternal=!0},close:function(){this.isShownInternal=!1}}},xe,[],!1,null,"51648bd1",null).exports;var Ie=function(){var t=this,e=t._self._c;return e("div",{class:["jh-steps-form-container",{"is-vertical":t.vertical}],style:t.containerStyle},[t.vertical?[e("div",{staticClass:"jh-steps-form-stepper"},[e("div",{staticClass:"vertical-steps"},t._l(t.steps,function(n,i){return e("div",{key:"step-".concat(i),class:["vertical-step-item",{active:t.currentStepIndex===i+1,completed:t.currentStepIndex>i+1,editable:t.editable&&i<t.currentStepIndex-1}],on:{click:function(e){t.editable&&i<t.currentStepIndex-1&&t.handleStepClick(i)}}},[e("div",{staticClass:"step-number"},[t.currentStepIndex>i+1?e("v-icon",{attrs:{small:"",color:"success"}},[t._v("mdi-check")]):e("span",[t._v(t._s(i+1))])],1),t._v(" "),e("div",{staticClass:"step-info"},[e("div",{staticClass:"step-title"},[t._v(t._s(n.title))]),t._v(" "),n.subTitle?e("div",{staticClass:"step-subtitle"},[t._v(t._s(n.subTitle))]):t._e()])])}),0)]),t._v(" "),e("div",{staticClass:"jh-steps-form-content"},[e("v-card",{attrs:{flat:""}},[e("div",{staticClass:"step-content"},[t._l(t.steps,function(n,i){return[t.currentStepIndex===i+1?e("div",{key:"content-".concat(i)},[n.slot?t._t(n.slot,null,{step:n,index:i,formData:t.formData}):n.fields?e("jh-form",t._b({ref:"stepForm".concat(i),refInFor:!0,attrs:{fields:n.fields,"initial-data":t.formData["step".concat(i)]||{},"show-buttons":!1,outlined:t.outlined,dense:t.dense},on:{change:function(e){return t.handleStepFormChange(i,e)}}},"jh-form",t.mergedFormProps,!1)):e("div",[t._t("default",null,{step:n,index:i,formData:t.formData})],2)],2):t._e()]})],2),t._v(" "),t.submitter&&!1===t.submitter.render?t._e():e("div",{staticClass:"step-actions d-flex justify-space-between mt-6"},[t.submitter&&t.submitter.render?[t._t("submitter",function(){return[e(t.submitter.render,{tag:"component",attrs:{step:t.steps[t.currentStepIndex-1],index:t.currentStepIndex-1,onPrevious:t.handlePrevious,onNext:t.handleNext,onFinish:t.handleFinish,submitting:t.submitting,validating:t.validating}})]},{step:t.steps[t.currentStepIndex-1],index:t.currentStepIndex-1,onPrevious:t.handlePrevious,onNext:t.handleNext,onFinish:t.handleFinish,submitting:t.submitting,validating:t.validating})]:[t.currentStepIndex>1&&(!t.submitter||!1!==t.submitter.showPrevious)?e("v-btn",t._b({attrs:{text:"",disabled:t.submitting},on:{click:t.handlePrevious}},"v-btn",t.submitter&&t.submitter.previousButtonProps,!1),[t._v("\n "+t._s(t.submitter&&t.submitter.previousText||t.previousButtonText)+"\n ")]):e("v-spacer"),t._v(" "),e("div",[t.currentStepIndex<t.steps.length?e("v-btn",t._b({attrs:{color:"primary",loading:t.validating,disabled:t.submitting},on:{click:t.handleNext}},"v-btn",t.submitter&&t.submitter.nextButtonProps,!1),[t._v("\n "+t._s(t.submitter&&t.submitter.nextText||t.nextButtonText)+"\n ")]):e("v-btn",t._b({attrs:{color:"primary",loading:t.submitting},on:{click:t.handleFinish}},"v-btn",t.submitter&&t.submitter.submitButtonProps,!1),[t._v("\n "+t._s(t.submitter&&t.submitter.submitText||t.finishButtonText)+"\n ")])],1)]],2)])],1)]:[e("v-stepper",t._b({staticClass:"w-full",attrs:{"alt-labels":t.altLabels},model:{value:t.currentStepIndex,callback:function(e){t.currentStepIndex=e},expression:"currentStepIndex"}},"v-stepper",t.stepsProps,!1),[e("v-stepper-header",[t._l(t.steps,function(n,i){return[e("v-stepper-step",{key:"step-".concat(i),attrs:{complete:t.currentStepIndex>i+1,step:i+1,editable:t.editable&&i<t.currentStepIndex},on:{click:function(e){t.editable&&t.handleStepClick(i)}}},[t._v("\n "+t._s(n.title)+"\n "),n.subTitle?e("small",[t._v(t._s(n.subTitle))]):t._e()]),t._v(" "),i<t.steps.length-1?e("v-divider",{key:"divider-".concat(i)}):t._e()]})],2),t._v(" "),e("v-stepper-items",t._l(t.steps,function(n,i){return e("v-stepper-content",{key:"content-".concat(i),attrs:{step:i+1}},[e("div",{staticClass:"step-content"},[n.slot?t._t(n.slot,null,{step:n,index:i,formData:t.formData}):n.fields?e("jh-form",t._b({ref:"stepForm".concat(i),refInFor:!0,attrs:{fields:n.fields,"initial-data":t.formData["step".concat(i)]||{},"show-buttons":!1,outlined:t.outlined,dense:t.dense},on:{change:function(e){return t.handleStepFormChange(i,e)}}},"jh-form",t.mergedFormProps,!1)):e("div",[t._t("default",null,{step:n,index:i,formData:t.formData})],2)],2),t._v(" "),t.submitter&&!1===t.submitter.render?t._e():e("div",{staticClass:"step-actions d-flex justify-space-between mt-6"},[t.submitter&&t.submitter.render?[t._t("submitter",function(){return[e(t.submitter.render,{tag:"component",attrs:{step:n,index:i,onPrevious:t.handlePrevious,onNext:t.handleNext,onFinish:t.handleFinish,submitting:t.submitting,validating:t.validating}})]},{step:n,index:i,onPrevious:t.handlePrevious,onNext:t.handleNext,onFinish:t.handleFinish,submitting:t.submitting,validating:t.validating})]:[i>0&&(!t.submitter||!1!==t.submitter.showPrevious)?e("v-btn",t._b({attrs:{text:"",disabled:t.submitting},on:{click:t.handlePrevious}},"v-btn",t.submitter&&t.submitter.previousButtonProps,!1),[t._v("\n "+t._s(t.submitter&&t.submitter.previousText||t.previousButtonText)+"\n ")]):e("v-spacer"),t._v(" "),e("div",[i<t.steps.length-1?e("v-btn",t._b({attrs:{color:"primary",loading:t.validating,disabled:t.submitting},on:{click:t.handleNext}},"v-btn",t.submitter&&t.submitter.nextButtonProps,!1),[t._v("\n "+t._s(t.submitter&&t.submitter.nextText||t.nextButtonText)+"\n ")]):e("v-btn",t._b({attrs:{color:"primary",loading:t.submitting},on:{click:t.handleFinish}},"v-btn",t.submitter&&t.submitter.submitButtonProps,!1),[t._v("\n "+t._s(t.submitter&&t.submitter.submitText||t.finishButtonText)+"\n ")])],1)]],2)])}),1)],1)]],2)};function Fe(t){return Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fe(t)}function Te(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return Ae(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(Ae(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Ae(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,Ae(d,"constructor",c),Ae(c,"constructor",s),s.displayName="GeneratorFunction",Ae(c,r,"GeneratorFunction"),Ae(d),Ae(d,r,"Generator"),Ae(d,i,function(){return this}),Ae(d,"toString",function(){return"[object Generator]"}),(Te=function(){return{w:a,m:f}})()}function Ae(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}Ae=function(t,e,n,i){function a(e,n){Ae(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},Ae(t,e,n,i)}function $e(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function Be(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){$e(a,i,r,o,l,"next",t)}function l(t){$e(a,i,r,o,l,"throw",t)}o(void 0)})}}function Re(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Ve(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Re(Object(n),!0).forEach(function(e){Ee(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ee(t,e,n){return(e=function(t){var e=function(t){if("object"!=Fe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Fe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fe(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Ie._withStripped=!0;const Le=i({name:"JhStepsForm",components:{JhForm:ae},props:{steps:{type:Array,required:!0,default:function(){return[]}},initialStep:{type:Number,default:0},value:{type:Number,default:null},current:{type:Number,default:null},editable:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},altLabels:{type:Boolean,default:!1},outlined:{type:Boolean,default:!0},dense:{type:Boolean,default:!1},submitting:{type:Boolean,default:!1},previousButtonText:{type:String,default:"上一步"},nextButtonText:{type:String,default:"下一步"},finishButtonText:{type:String,default:"完成"},validateStep:{type:Function,default:null},transformBeforeFinish:{type:Function,default:null},onCurrentChange:{type:Function,default:null},onFormChange:{type:Function,default:null},stepsProps:{type:Object,default:function(){return{}}},formProps:{type:Object,default:function(){return{}}},stepFormRender:{type:Function,default:null},submitter:{type:[Object,Boolean],default:null},containerStyle:{type:[Object,String],default:null}},data:function(){return{currentStepIndex:(null!==this.current?this.current:null!==this.value?this.value:this.initialStep)+1,formData:{},validating:!1,formMapRef:{}}},computed:{mergedFormProps:function(){return Ve(Ve({},this.formProps),{},{outlined:this.outlined,dense:this.dense})}},watch:{value:function(t){null!==t&&t+1!==this.currentStepIndex&&(this.currentStepIndex=t+1)},current:function(t){null!==t&&t+1!==this.currentStepIndex&&(this.currentStepIndex=t+1)},currentStepIndex:function(t,e){var n=t-1;this.$emit("input",n),this.$emit("update:current",n),this.$emit("step-change",{current:n,step:this.steps[n]}),this.onCurrentChange&&void 0!==e&&this.onCurrentChange(n)}},mounted:function(){this.updateFormMapRef()},updated:function(){this.updateFormMapRef()},methods:{handleStepClick:function(t){this.editable&&t<this.currentStepIndex-1&&(this.currentStepIndex=t+1)},handleStepFormChange:function(t,e){this.$set(this.formData,"step".concat(t),e),this.$emit("change",this.formData),this.onFormChange&&this.onFormChange({stepIndex:t,values:e,allValues:this.formData})},updateFormMapRef:function(){var t=this,e={};this.steps.forEach(function(n,i){if(n.fields){var r=t.$refs["stepForm".concat(i)];r&&r[0]&&(e[i]=r[0])}}),this.formMapRef=e},handlePrevious:function(){this.currentStepIndex>1&&this.currentStepIndex--},handleNext:function(){var t=this;return Be(Te().m(function e(){var n;return Te().w(function(e){for(;;)switch(e.n){case 0:return n=t.currentStepIndex-1,e.n=1,t.validateCurrentStep(n);case 1:e.v&&t.currentStepIndex++;case 2:return e.a(2)}},e)}))()},handleFinish:function(){var t=this;return Be(Te().m(function e(){var n,i;return Te().w(function(e){for(;;)switch(e.n){case 0:return n=t.currentStepIndex-1,e.n=1,t.validateCurrentStep(n);case 1:if(e.v){e.n=2;break}return e.a(2);case 2:i=Ve({},t.formData),t.transformBeforeFinish&&(i=t.transformBeforeFinish(i)),t.$emit("finish",i);case 3:return e.a(2)}},e)}))()},validateCurrentStep:function(t){var e=this;return Be(Te().m(function n(){var i,r,a;return Te().w(function(n){for(;;)switch(n.p=n.n){case 0:if(e.validating=!0,n.p=1,!(i=e.steps[t]).fields){n.n=3;break}if(!(r=e.$refs["stepForm".concat(t)])||!r[0]){n.n=3;break}return n.n=2,r[0].validate();case 2:if(n.v){n.n=3;break}return n.a(2,!1);case 3:if(!e.validateStep){n.n=5;break}return n.n=4,e.validateStep({step:i,stepIndex:t,formData:e.formData});case 4:if(!1!==n.v){n.n=5;break}return n.a(2,!1);case 5:return n.a(2,!0);case 6:return n.p=6,a=n.v,console.error("步骤验证失败:",a),n.a(2,!1);case 7:return n.p=7,e.validating=!1,n.f(7);case 8:return n.a(2)}},n,null,[[1,6,7,8]])}))()},goToStep:function(t){t>=0&&t<this.steps.length&&(this.currentStepIndex=t+1)},reset:function(){var t=this;this.currentStepIndex=this.initialStep+1,this.formData={},this.steps.forEach(function(e,n){if(e.fields){var i=t.$refs["stepForm".concat(n)];i&&i[0]&&i[0].resetForm()}})},getFormData:function(){return Ve({},this.formData)},setFormData:function(t){this.formData=Ve({},t)},getFormMapRef:function(){return this.formMapRef},getStepFormRef:function(t){return this.formMapRef[t]||null},validateAll:function(){var t=this;return Be(Te().m(function e(){var n,i,r;return Te().w(function(e){for(;;)switch(e.n){case 0:n=[],i=0;case 1:if(!(i<t.steps.length)){e.n=4;break}return e.n=2,t.validateCurrentStep(i);case 2:r=e.v,n.push(r);case 3:i++,e.n=1;break;case 4:return e.a(2,n.every(function(t){return t}))}},e)}))()}}},Ie,[],!1,null,"7e20b247",null).exports;function Ne(t){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ne(t)}function Me(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Ke(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Me(Object(n),!0).forEach(function(e){ze(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ze(t,e,n){return(e=function(t){var e=function(t){if("object"!=Ne(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ne(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Je=function(){var t=this,e=t._self._c;return e("div",{class:t.formListClasses},[t.title||t.description||t.$slots.header?e("div",{staticClass:"jh-form-list-header"},[t._t("header",function(){return[t.title?e("h3",{staticClass:"text-h6 mb-2"},[t._v(t._s(t.title))]):t._e(),t._v(" "),t.description?e("p",{staticClass:"text-caption grey--text mb-0"},[t._v(t._s(t.description))]):t._e()]})],2):t._e(),t._v(" "),0===t.listData.length?e("div",{staticClass:"jh-form-list-empty"},[t._t("empty",function(){return[e("v-icon",{attrs:{size:"48",color:"grey lighten-1"}},[t._v("mdi-inbox")]),t._v(" "),e("p",{staticClass:"grey--text mt-2"},[t._v("暂无数据")])]})],2):"card"===t.mode?e("div",{ref:"listBody",staticClass:"jh-form-list-body jh-form-list-body--card"},t._l(t.listData,function(n,i){return e("v-card",t._b({key:n.__id__,staticClass:"jh-form-list-item jh-form-list-item--card mb-4",class:t.getItemClasses(i)},"v-card",t.cardProps,!1),[e("v-card-title",{staticClass:"jh-form-list-item-header py-2 px-4"},[e("div",{staticClass:"d-flex align-center"},[!t.sortable||t.disabled||t.readonly?t._e():e("v-icon",{staticClass:"jh-form-list-drag-handle mr-2",attrs:{small:""}},[t._v("\n mdi-drag\n ")]),t._v(" "),t.collapsible?e("v-btn",{staticClass:"mr-2",attrs:{icon:"","x-small":""},on:{click:function(e){return t.toggleCollapse(n)}}},[e("v-icon",{attrs:{small:""}},[t._v("\n "+t._s(t.isCollapsed(n)?"mdi-chevron-down":"mdi-chevron-up")+"\n ")])],1):t._e(),t._v(" "),t.showIndex&&t.alwaysShowItemLabel?e("span",{staticClass:"jh-form-list-item-index"},[t._v("\n #"+t._s(i+1)+"\n ")]):t._e()],1),t._v(" "),e("v-spacer"),t._v(" "),!t.showItemActions||t.disabled||t.readonly?t._e():e("div",{staticClass:"jh-form-list-item-actions"},[t._t("item-actions",function(){return[t.actionRender?[e({render:function(){return t.renderActionButtons(n,i)}},{tag:"component"})]:[t.copyable?e("v-btn",{attrs:{icon:"",small:"",title:"复制"},on:{click:function(e){return t.copyItem(i)}}},[e("v-icon",{attrs:{small:""}},[t._v("mdi-content-copy")])],1):t._e(),t._v(" "),e("v-btn",{attrs:{icon:"",small:"",color:"error",disabled:t.listData.length<=t.min,title:"删除"},on:{click:function(e){return t.removeItem(i)}}},[e("v-icon",{attrs:{small:""}},[t._v("mdi-delete")])],1)]]},{item:n,index:i,removeItem:t.removeItem,copyItem:t.copyItem})],2)],1),t._v(" "),t.isCollapsed(n)?t._e():e("v-divider"),t._v(" "),e("v-expand-transition",[e("v-card-text",{directives:[{name:"show",rawName:"v-show",value:!t.isCollapsed(n),expression:"!isCollapsed(item)"}],staticClass:"pa-4"},[t._t("item",function(){return[e("jh-form",{ref:"itemForm_".concat(i),refInFor:!0,attrs:{fields:t.fields,"initial-data":n,layout:t.itemLayout,"label-width":t.itemLabelWidth,dense:t.dense,outlined:t.outlined,disabled:t.disabled,readonly:t.readonly,"hide-details":!1},on:{"field-change":function(e){return t.handleItemFieldChange(i,e)}},scopedSlots:t._u([t._l(t.fields,function(e){return{key:"field-".concat(e.key),fn:function(r){return[t._t("field-".concat(e.key),null,null,Ke(Ke({},r),{},{index:i,item:n}))]}}})],null,!0)})]},{item:n,index:i,fields:t.fields,updateItem:function(e,n){return t.updateItemField(i,e,n)}})],2)],1),t._v(" "),t.validationErrors[i]&&!t.isCollapsed(n)?e("v-alert",{staticClass:"mx-4 mb-3",attrs:{type:"error",dense:"",text:""}},[t._v("\n "+t._s(t.validationErrors[i])+"\n ")]):t._e()],1)}),1):"table"===t.mode?e("div",{staticClass:"jh-form-list-body jh-form-list-body--table"},[e("v-simple-table",{attrs:{dense:t.dense}},[e("thead",[e("tr",[t.showIndex?e("th",{staticClass:"text-center",staticStyle:{width:"60px"}},[t._v("#")]):t._e(),t._v(" "),!t.sortable||t.disabled||t.readonly?t._e():e("th",{staticStyle:{width:"40px"}}),t._v(" "),t._l(t.fields,function(n){return e("th",{key:n.key},[n.required?e("span",{staticClass:"error--text mr-1"},[t._v("*")]):t._e(),t._v("\n "+t._s(n.label)+"\n ")])}),t._v(" "),!t.showItemActions||t.disabled||t.readonly?t._e():e("th",{staticClass:"text-center",style:{width:t.actionColumn.width+"px"}},[t._v("\n 操作\n ")])],2)]),t._v(" "),e("tbody",{ref:"listBody"},t._l(t.listData,function(n,i){return e("tr",{key:n.__id__,class:t.getItemClasses(i)},[t.showIndex?e("td",{staticClass:"text-center"},[t._v(t._s(i+1))]):t._e(),t._v(" "),!t.sortable||t.disabled||t.readonly?t._e():e("td",{staticClass:"text-center"},[e("v-icon",{staticClass:"jh-form-list-drag-handle",attrs:{small:""}},[t._v("mdi-drag")])],1),t._v(" "),t._l(t.fields,function(r){return e("td",{key:r.key},[t._t("field-".concat(r.key),function(){return[e(t.getFieldComponent(r),t._b({tag:"component",attrs:{dense:t.dense,outlined:t.outlined,disabled:t.disabled||t.getFieldDisabled(r,n),readonly:t.readonly,placeholder:r.placeholder,"hide-details":!0},on:{input:function(e){return t.handleItemFieldChange(i,{key:r.key,value:e})}},model:{value:n[r.key],callback:function(e){t.$set(n,r.key,e)},expression:"item[field.key]"}},"component",t.getFieldProps(r),!1))]},{item:n,index:i,field:r,updateItem:function(e,n){return t.updateItemField(i,e,n)}})],2)}),t._v(" "),!t.showItemActions||t.disabled||t.readonly?t._e():e("td",{staticClass:"text-center"},[t._t("item-actions",function(){return[t.copyable?e("v-btn",{staticClass:"mr-1",attrs:{icon:"","x-small":"",title:"复制"},on:{click:function(e){return t.copyItem(i)}}},[e("v-icon",{attrs:{"x-small":""}},[t._v("mdi-content-copy")])],1):t._e(),t._v(" "),e("v-btn",{attrs:{icon:"","x-small":"",color:"error",disabled:t.listData.length<=t.min,title:"删除"},on:{click:function(e){return t.removeItem(i)}}},[e("v-icon",{attrs:{"x-small":""}},[t._v("mdi-delete")])],1)]},{item:n,index:i,removeItem:t.removeItem,copyItem:t.copyItem})],2)],2)}),0)])],1):"inline"===t.mode?e("div",{ref:"listBody",staticClass:"jh-form-list-body jh-form-list-body--inline d-flex flex-wrap align-center"},t._l(t.listData,function(n,i){return e("div",{key:n.__id__,staticClass:"jh-form-list-item jh-form-list-item--inline mr-2 mb-2",class:t.getItemClasses(i)},[t._t("item",function(){return[e("v-chip",{attrs:{close:!t.disabled&&!t.readonly&&t.listData.length>t.min,draggable:t.sortable&&!t.disabled&&!t.readonly},on:{"click:close":function(e){return t.removeItem(i)}}},[!t.sortable||t.disabled||t.readonly?t._e():e("v-icon",{staticClass:"jh-form-list-drag-handle mr-1",attrs:{"x-small":""}},[t._v("\n mdi-drag\n ")]),t._v("\n "+t._s(t.getInlineItemDisplay(n))+"\n ")],1)]},{item:n,index:i,fields:t.fields,updateItem:function(e,n){return t.updateItemField(i,e,n)}})],2)}),0):t._e(),t._v(" "),t.validationErrors._list?e("v-alert",{staticClass:"mt-3",attrs:{type:"error",dense:"",text:""}},[t._v("\n "+t._s(t.validationErrors._list)+"\n ")]):t._e(),t._v(" "),t.showMaxLimitAlert?e("v-alert",{staticClass:"mt-3",attrs:{type:"warning",dense:"",text:"",dismissible:""},on:{input:function(e){t.showMaxLimitAlert=!1}}},[t._v("\n "+t._s(t.maxLimitText)+" (最大: "+t._s(t.max)+")\n ")]):t._e(),t._v(" "),t.showMinLimitAlert?e("v-alert",{staticClass:"mt-3",attrs:{type:"warning",dense:"",text:"",dismissible:""},on:{input:function(e){t.showMinLimitAlert=!1}}},[t._v("\n "+t._s(t.minLimitText)+" (最小: "+t._s(t.min)+")\n ")]):t._e(),t._v(" "),t.disabled||t.readonly||!1===t.computedCreatorButtonProps?t._e():e("div",{staticClass:"jh-form-list-footer mt-4"},[t._t("footer",function(){return[e("v-btn",t._b({attrs:{disabled:!t.canAdd},on:{click:function(e){return t.addItem()}}},"v-btn",t.computedCreatorButtonProps,!1),[e("v-icon",{attrs:{left:""}},[t._v("mdi-plus")]),t._v("\n "+t._s(t.computedCreatorButtonProps.text||t.addButtonText)+"\n ")],1)]},{addItem:t.addItem,canAdd:t.canAdd})],2)],1)};Je._withStripped=!0;var Ge=["__id__"],We=["__id__"],Ue=["__id__"];function qe(t){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qe(t)}function He(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ye(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ye(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}function Ye(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Xe(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return Ze(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(Ze(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Ze(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,Ze(d,"constructor",c),Ze(c,"constructor",s),s.displayName="GeneratorFunction",Ze(c,r,"GeneratorFunction"),Ze(d),Ze(d,r,"Generator"),Ze(d,i,function(){return this}),Ze(d,"toString",function(){return"[object Generator]"}),(Xe=function(){return{w:a,m:f}})()}function Ze(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}Ze=function(t,e,n,i){function a(e,n){Ze(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},Ze(t,e,n,i)}function Qe(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function tn(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){Qe(a,i,r,o,l,"next",t)}function l(t){Qe(a,i,r,o,l,"throw",t)}o(void 0)})}}function en(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function nn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function rn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nn(Object(n),!0).forEach(function(e){an(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function an(t,e,n){return(e=function(t){var e=function(t){if("object"!=qe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qe(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const on=i({name:"JhFormList",components:{JhForm:ae},props:{value:{type:Array,default:function(){return[]}},fields:{type:Array,default:function(){return[]}},mode:{type:String,default:"card",validator:function(t){return["card","table","inline"].includes(t)}},title:{type:String,default:""},description:{type:String,default:""},min:{type:Number,default:0},max:{type:Number,default:1/0},sortable:{type:Boolean,default:!1},copyable:{type:Boolean,default:!0},showIndex:{type:Boolean,default:!0},showItemActions:{type:Boolean,default:!0},defaultValue:{type:[Object,Function],default:function(){return{}}},addButtonText:{type:String,default:"添加"},addButtonProps:{type:Object,default:function(){return{}}},deleteConfirm:{type:Boolean,default:!1},deleteConfirmText:{type:String,default:"确定要删除这一项吗?"},itemLayout:{type:String,default:"horizontal"},itemLabelWidth:{type:[Number,String],default:"auto"},dense:{type:Boolean,default:!0},outlined:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},rules:{type:Array,default:function(){return[]}},actionColumn:{type:Object,default:function(){return{width:100}}},cardProps:{type:Object,default:function(){return{}}},itemClass:{type:String,default:""},inlineDisplayKey:{type:String,default:""},alwaysShowItemLabel:{type:Boolean,default:!0},itemRender:{type:Function,default:null},creatorButtonProps:{type:[Object,Boolean],default:function(){return{}}},creatorRecord:{type:[Object,Function],default:null},actionGuard:{type:Object,default:function(){return{beforeAddRow:null,beforeRemoveRow:null}}},onAfterRemove:{type:Function,default:null},collapsible:{type:Boolean,default:!1},defaultCollapsed:{type:Boolean,default:!1},actionRender:{type:Function,default:null},maxLimitText:{type:String,default:"已达到最大数量限制"},minLimitText:{type:String,default:"已达到最小数量限制"}},data:function(){return{listData:[],validationErrors:{},sortableInstance:null,collapsedItems:new Set,showMaxLimitAlert:!1,showMinLimitAlert:!1}},computed:{formListClasses:function(){return an(an(an({"jh-form-list":!0},"jh-form-list--".concat(this.mode),!0),"jh-form-list--disabled",this.disabled),"jh-form-list--readonly",this.readonly)},canAdd:function(){return this.listData.length<this.max},computedCreatorButtonProps:function(){return!1!==this.creatorButtonProps&&rn({color:"primary",outlined:!0},this.creatorButtonProps)},computedCreatorRecord:function(){var t=this;return this.creatorRecord?"function"==typeof this.creatorRecord?this.creatorRecord:function(){return t.creatorRecord}:"function"==typeof this.defaultValue?this.defaultValue:function(){return t.defaultValue}}},watch:{value:{handler:function(t){this.initListData()},immediate:!0,deep:!0},sortable:function(t){var e=this;t?this.$nextTick(function(){e.initSortable()}):this.destroySortable()}},mounted:function(){this.sortable&&this.initSortable()},beforeDestroy:function(){this.destroySortable()},methods:{generateItemId:function(){return"item_".concat(Date.now(),"_").concat(Math.random().toString(36).substr(2,9))},initListData:function(){var t=this;this.listData=(this.value||[]).map(function(e){return rn(rn({},e),{},{__id__:e.__id__||t.generateItemId()})})},getCleanData:function(){return this.listData.map(function(t){return t.__id__,en(t,Ge)})},addItem:function(){var t=arguments,e=this;return tn(Xe().m(function n(){var i,r,a,o,l;return Xe().w(function(n){for(;;)switch(n.n){case 0:if(r=t.length>0&&void 0!==t[0]?t[0]:null,a=t.length>1&&void 0!==t[1]?t[1]:null,!(e.listData.length>=e.max)){n.n=1;break}return e.showMaxLimitAlert=!0,setTimeout(function(){e.showMaxLimitAlert=!1},3e3),e.$emit("max-limit",e.max),n.a(2);case 1:if(null===(i=e.actionGuard)||void 0===i||!i.beforeAddRow){n.n=3;break}return n.n=2,e.actionGuard.beforeAddRow(e.listData.length);case 2:if(!1!==n.v){n.n=3;break}return n.a(2);case 3:o=e.computedCreatorRecord(e.listData.length),l=rn(rn(rn({},o),r),{},{__id__:e.generateItemId()}),null!==a&&a>=0&&a<=e.listData.length?e.listData.splice(a,0,l):e.listData.push(l),e.emitInput(),e.$emit("add",e.getCleanItem(l),null!=a?a:e.listData.length-1);case 4:return n.a(2)}},n)}))()},removeItem:function(t){var e=this;return tn(Xe().m(function n(){var i,r;return Xe().w(function(n){for(;;)switch(n.n){case 0:if(!(e.listData.length<=e.min)){n.n=1;break}return e.showMinLimitAlert=!0,setTimeout(function(){e.showMinLimitAlert=!1},3e3),e.$emit("min-limit",e.min),n.a(2);case 1:if(null===(i=e.actionGuard)||void 0===i||!i.beforeRemoveRow){n.n=3;break}return n.n=2,e.actionGuard.beforeRemoveRow(t,e.listData[t]);case 2:if(!1!==n.v){n.n=3;break}return n.a(2);case 3:if(!e.deleteConfirm){n.n=5;break}return n.n=4,e.confirm(e.deleteConfirmText);case 4:if(n.v){n.n=5;break}return n.a(2);case 5:r=e.listData[t],e.listData.splice(t,1),delete e.validationErrors[t],e.collapsedItems.delete(r.__id__),e.emitInput(),e.$emit("remove",e.getCleanItem(r),t),e.onAfterRemove&&e.onAfterRemove(t,e.getCleanItem(r));case 6:return n.a(2)}},n)}))()},copyItem:function(t){if(this.canAdd){var e=this.listData[t],n=(e.__id__,rn(rn({},en(e,We)),{},{__id__:this.generateItemId()}));this.listData.splice(t+1,0,n),this.emitInput(),this.$emit("copy",this.getCleanItem(e),this.getCleanItem(n))}else this.$emit("max-limit",this.max)},moveItem:function(t,e){var n=this.listData.splice(t,1)[0];this.listData.splice(e,0,n),this.emitInput(),this.$emit("sort",t,e)},updateItemField:function(t,e,n){this.listData[t]&&(this.$set(this.listData[t],e,n),this.emitInput(),this.$emit("item-change",t,this.getCleanItem(this.listData[t])))},handleItemFieldChange:function(t,e){var n=e.key,i=e.value;this.updateItemField(t,n,i)},getCleanItem:function(t){return t.__id__,en(t,Ue)},emitInput:function(){this.$emit("input",this.getCleanData()),this.$emit("change",this.getCleanData())},getItemClasses:function(t){var e=[];return this.itemClass&&e.push(this.itemClass),this.validationErrors[t]&&e.push("jh-form-list-item--error"),e.join(" ")},toggleCollapse:function(t){var e=t.__id__;this.collapsedItems.has(e)?this.collapsedItems.delete(e):this.collapsedItems.add(e),this.$forceUpdate()},isCollapsed:function(t){return this.collapsedItems.has(t.__id__)},renderActionButtons:function(t,e){var n=this;return this.actionRender?this.actionRender({item:this.getCleanItem(t),index:e,removeItem:function(){return n.removeItem(e)},copyItem:function(){return n.copyItem(e)}}):null},getFieldComponent:function(t){return{text:"v-text-field",textarea:"v-textarea",number:"v-text-field",select:"v-select",autocomplete:"v-autocomplete",switch:"v-switch",checkbox:"v-checkbox"}[t.type]||"v-text-field"},getFieldProps:function(t){var e=rn({},t.props);return"select"!==t.type&&"autocomplete"!==t.type||(e.items=t.options||[],e.itemText=t.itemText||"text",e.itemValue=t.itemValue||"value"),"number"===t.type&&(e.type="number"),e},getFieldDisabled:function(t,e){return"function"==typeof t.disabled?t.disabled(e):t.disabled||!1},getInlineItemDisplay:function(t){if(this.inlineDisplayKey)return t[this.inlineDisplayKey]||"-";var e=this.fields[0];return e&&t[e.key]||"-"},initSortable:function(){var t=this;this.sortable&&!this.sortableInstance&&this.$nextTick(function(){var e=t.$refs.listBody;e&&("undefined"!=typeof window&&window.Sortable?t.sortableInstance=window.Sortable.create(e,{animation:150,handle:".jh-form-list-drag-handle",ghostClass:"jh-form-list-ghost",dragClass:"jh-form-list-dragging",onEnd:function(e){var n=e.oldIndex,i=e.newIndex;n!==i&&t.moveItem(n,i)}}):console.warn("JhFormList: sortable 功能需要引入 SortableJS 库"))})},destroySortable:function(){this.sortableInstance&&(this.sortableInstance.destroy(),this.sortableInstance=null)},validate:function(){var t=this;return tn(Xe().m(function e(){var n,i,r,a,o,l,s,c;return Xe().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n={},i=!0,!t.rules||!t.rules.length){e.n=7;break}r=He(t.rules),e.p=1,r.s();case 2:if((a=r.n()).done){e.n=4;break}if(o=a.value,"string"!=typeof(l=o(t.getCleanData()))){e.n=3;break}return n._list=l,i=!1,e.a(3,4);case 3:e.n=2;break;case 4:e.n=6;break;case 5:e.p=5,c=e.v,r.e(c);case 6:return e.p=6,r.f(),e.f(6);case 7:s=0;case 8:if(!(s<t.listData.length)){e.n=11;break}return e.n=9,t.validateItem(s);case 9:e.v||(i=!1,n[s]="该项存在验证错误");case 10:s++,e.n=8;break;case 11:return t.validationErrors=n,t.$emit("validate",i,n),e.a(2,i)}},e,null,[[1,5,6,7]])}))()},validateItem:function(t){var e=this;return tn(Xe().m(function n(){var i;return Xe().w(function(n){for(;;)switch(n.n){case 0:if(!(i=e.$refs["itemForm_".concat(t)])||!i[0]){n.n=2;break}return n.n=1,i[0].validate();case 1:return n.a(2,n.v);case 2:return n.a(2,!0)}},n)}))()},resetValidation:function(){var t=this;this.validationErrors={},this.listData.forEach(function(e,n){var i=t.$refs["itemForm_".concat(n)];i&&i[0]&&i[0].resetValidation()})},reset:function(){this.listData=[],this.validationErrors={},this.emitInput()},getItems:function(){return this.getCleanData()},setItems:function(t){var e=this;this.listData=t.map(function(t){return rn(rn({},t),{},{__id__:t.__id__||e.generateItemId()})}),this.emitInput()},getItemValue:function(t){return this.listData[t]?this.getCleanItem(this.listData[t]):null},setItemValue:function(t,e){this.listData[t]&&(this.$set(this.listData,t,rn(rn({},e),{},{__id__:this.listData[t].__id__})),this.emitInput())},confirm:function(t){return new Promise(function(e){e(window.confirm(t))})}}},Je,[],!1,null,"ce7ba014",null).exports;var ln=function(){var t=this,e=t._self._c;return e("v-app",[e("v-container",{staticClass:"pa-0",attrs:{fluid:""}},[e("div",{staticClass:"w-full"},[e("div",{staticClass:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-4"},[t.value&&t.isString(t.value)?e("div",{staticClass:"relative aspect-square rounded overflow-hidden"},[e("div",{staticClass:"w-full h-full flex flex-col items-center justify-center p-2 bg-gray-100"},[t.isImage(t.value)?e("img",{staticClass:"max-w-full max-h-full object-contain",attrs:{src:t.getImageUrl(t.value)}}):e("v-icon",{staticClass:"text-gray-500",attrs:{size:"40"}},[t._v("mdi-file-document-outline")])],1),t._v(" "),t.readonly?t._e():e("v-btn",{staticClass:"absolute top-1 right-1 !bg-black/50",attrs:{icon:"","x-small":""},on:{click:t.handleRemoveSingleFile}},[e("v-icon",{attrs:{small:"",color:"white"}},[t._v("mdi-close")])],1)],1):t.value&&Array.isArray(t.value)?t._l(t.value,function(n,i){return e("div",{key:i,staticClass:"relative aspect-square border border-gray-200 rounded overflow-hidden"},[t.isString(n)?e("div",{staticClass:"w-full h-full flex flex-col items-center justify-center p-2 bg-gray-100"},[t.isImage(n)?e("img",{staticClass:"max-w-full max-h-full object-contain",attrs:{src:t.getImageUrl(n)}}):e("v-icon",{staticClass:"text-gray-500",attrs:{size:"40"}},[t._v("mdi-file-document-outline")])],1):e("div",{staticClass:"w-full h-full flex flex-col items-center justify-center p-2 bg-gray-100"},[t.isImage(n)?e("img",{staticClass:"max-w-full max-h-full object-contain",attrs:{src:t.getObjectUrl(n)}}):e("v-icon",{staticClass:"text-gray-500",attrs:{size:"40"}},[t._v("mdi-file-document-outline")])],1),t._v(" "),t.readonly?t._e():e("v-btn",{staticClass:"absolute top-1 right-1 !bg-black/50",attrs:{icon:"","x-small":""},on:{click:function(e){return t.removeFile(i)}}},[e("v-icon",{attrs:{small:"",color:"white"}},[t._v("mdi-close")])],1),t._v(" "),e("div",{staticClass:"absolute top-0 left-2 text-xs bg-green-500 text-white px-1 rounded-b-sm"},[t._v("\n "+t._s(t.getFileExtension(n))+"\n ")])],1)}):t._e(),t._v(" "),t.isCanUpload?e("div",{staticClass:"aspect-square border-2 border-dashed border-gray-200 rounded flex items-center justify-center cursor-pointer transition-all hover:border-blue-500 hover:bg-blue-50",on:{click:t.triggerFileInput}},[e("input",{ref:"fileInput",staticClass:"hidden",attrs:{type:"file",multiple:t.multiple,accept:t.accept},on:{change:t.handleFileChange}}),t._v(" "),e("v-icon",{staticClass:"text-gray-500 transition-all group-hover:text-blue-500",attrs:{size:"40"}},[t._v("mdi-plus")])],1):t._e()],2),t._v(" "),t.errorMessage?e("div",{staticClass:"text-red-500 text-xs mt-2 pl-0.5"},[t._v("\n "+t._s(t.errorMessage)+"\n ")]):t._e(),t._v(" "),t.isShowUploadLimit?e("div",{staticClass:"text-gray-500 text-xs mt-2 pl-0.5"},[t._v("\n 最多可上传 "+t._s(t.maxFiles)+" 个文件 (已上传 "+t._s(t.isString(t.value)?1:(t.value||[]).length)+" 个)\n ")]):t._e()])])],1)};function sn(t){return sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sn(t)}function cn(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(sn(t)+" is not iterable")}function un(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return dn(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(dn(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,dn(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,dn(d,"constructor",c),dn(c,"constructor",s),s.displayName="GeneratorFunction",dn(c,r,"GeneratorFunction"),dn(d),dn(d,r,"Generator"),dn(d,i,function(){return this}),dn(d,"toString",function(){return"[object Generator]"}),(un=function(){return{w:a,m:f}})()}function dn(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}dn=function(t,e,n,i){function a(e,n){dn(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},dn(t,e,n,i)}function fn(t){return function(t){if(Array.isArray(t))return pn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||hn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hn(t,e){if(t){if("string"==typeof t)return pn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pn(t,e):void 0}}function pn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function vn(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}ln._withStripped=!0;const mn=i({name:"JhFileInput",props:{value:{type:[Array,String],default:function(){return[]}},maxFiles:{type:Number,default:0},accept:{type:String,default:"*/*"},multiple:{type:Boolean,default:!1},rules:{type:Array,default:function(){return[]}},readonly:{type:Boolean,default:!1},uploadPrefix:{type:String,default:"/upload/"}},data:function(){return{errorMessage:""}},watch:{value:{handler:function(){this.validate()},deep:!0}},computed:{isCanUpload:function(){return!this.readonly&&(this.multiple?!this.maxFiles||(this.value||[]).length<this.maxFiles:(this.value||[]).length<1)},isShowUploadLimit:function(){return!this.readonly&&this.multiple&&this.maxFiles>0}},methods:{isString:function(t){return"string"==typeof t},triggerFileInput:function(){this.$refs.fileInput.click()},handleFileChange:function(t){var e,n=this;return(e=un().m(function e(){var i,r,a,o,l;return un().w(function(e){for(;;)switch(e.n){case 0:if(i=Array.from(t.target.files),!(n.maxFiles&&(n.value||[]).length+i.length>n.maxFiles)){e.n=1;break}return n.errorMessage="最多只能上传 ".concat(n.maxFiles," 个文件"),e.a(2);case 1:r=fn(n.value||[]),a=un().m(function t(){var e,i;return un().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=l[o],t.p=1,!r.some(function(t){return t.name===e.name&&t.size===e.size})){t.n=2;break}return n.errorMessage="文件 ".concat(e.name," 已存在"),t.a(2,1);case 2:r.push(e),t.n=4;break;case 3:t.p=3,i=t.v,console.error("Upload error:",i),n.errorMessage="上传文件 ".concat(e.name," 失败");case 4:return t.a(2)}},t,null,[[1,3]])}),o=0,l=i;case 2:if(!(o<l.length)){e.n=5;break}return e.d(cn(a()),3);case 3:if(!e.v){e.n=4;break}return e.a(3,4);case 4:o++,e.n=2;break;case 5:n.$emit("input",r),n.$emit("change",r),n.errorMessage||(n.errorMessage=""),t.target.value="";case 6:return e.a(2)}},e)}),function(){var t=this,n=arguments;return new Promise(function(i,r){var a=e.apply(t,n);function o(t){vn(a,i,r,o,l,"next",t)}function l(t){vn(a,i,r,o,l,"throw",t)}o(void 0)})})()},handleRemoveSingleFile:function(){this.$emit("input",[]),this.$emit("change",[])},removeFile:function(t){var e=fn(this.value);e.splice(t,1),this.$emit("input",e),this.$emit("change",e)},isImage:function(t){return this.isString(t)?["jpg","jpeg","png","gif","bmp","webp","svg"].includes(t.split(".").pop().toLowerCase()):!!t.type&&t.type.startsWith("image/")},getImageUrl:function(t){return"".concat(this.uploadPrefix).concat(t)},getObjectUrl:function(t){return URL.createObjectURL(t)},getFileExtension:function(t){return this.isString(t)?t.split(".").pop():t.name.split(".").pop()},validate:function(){this.errorMessage="";var t,e=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=hn(t))){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,o=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){o=!0,r=t},f:function(){try{a||null==e.return||e.return()}finally{if(o)throw r}}}}(this.rules);try{for(e.s();!(t=e.n()).done;){var n=(0,t.value)(this.value);if(!0!==n)return this.errorMessage=n,!1}}catch(t){e.e(t)}finally{e.f()}return!0}}},ln,[],!1,null,"a8e9f800",null).exports;var yn=function(){var t=this._self._c;return t("v-app",[t("v-container",{staticClass:"pa-0",attrs:{fluid:""}},[t("div",[t("div",{staticClass:"jsoneditor-vue",style:{height:this.height}})])])],1)};function bn(t){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(t)}function gn(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return _n(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(_n(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,_n(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,_n(d,"constructor",c),_n(c,"constructor",s),s.displayName="GeneratorFunction",_n(c,r,"GeneratorFunction"),_n(d),_n(d,r,"Generator"),_n(d,i,function(){return this}),_n(d,"toString",function(){return"[object Generator]"}),(gn=function(){return{w:a,m:f}})()}function _n(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}_n=function(t,e,n,i){function a(e,n){_n(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},_n(t,e,n,i)}function wn(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function Sn(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){wn(a,i,r,o,l,"next",t)}function l(t){wn(a,i,r,o,l,"throw",t)}o(void 0)})}}yn._withStripped=!0;const Cn=i({name:"JhJsonEditor",props:{value:{type:[String,Number,Object,Array],default:function(){return{}}},expandedOnStart:{type:Boolean,default:!1},mode:{type:String,default:"code"},modes:{type:Array,default:function(){return["tree","code","form","text","view"]}},height:{type:String,default:"calc(100vh - 240px)"}},watch:{value:{immediate:!0,handler:function(t){var e=this;return Sn(gn().m(function t(){return gn().w(function(t){for(;;)switch(t.n){case 0:if(e.internalChange){t.n=2;break}return t.n=1,e.setEditor();case 1:e.error=!1,e.expandAll();case 2:return t.a(2)}},t)}))()},deep:!0}},data:function(){return{editor:null,error:!1,internalChange:!1,expandedModes:["tree","view","form"]}},computed:{valueType:function(){return bn(this.value)},formatValue:{get:function(){if("string"===this.valueType&&this.value)try{return JSON.parse(this.value)}catch(t){return this.value}return this.value},set:function(t){"string"!==this.valueType&&this.value?this.value=t:this.value=JSON.stringify(t)}}},mounted:function(){this.$emit("has-error",!1),window.JSONEditor?this.init():console.warn("JSONEditor is not loaded. Please include JSONEditor library.")},beforeDestroy:function(){this.editor&&this.editor.destroy()},methods:{init:function(){var t=this,e={mode:this.mode,modes:this.modes,themeColor:"#4caf50",onChange:function(){try{var e=t.editor.get();t.formatValue=e,t.error=!1,t.$emit("has-error",!1),t.internalChange=!0,t.$emit("input",t.value),t.$nextTick(function(){t.internalChange=!1})}catch(e){t.error=!0,t.$emit("has-error",!0)}},onModeChange:function(){t.expandAll()}};window.JSONEditor&&(this.editor=new window.JSONEditor(t.$el.querySelector(".jsoneditor-vue"),e,t.formatValue))},expandAll:function(){this.expandedOnStart&&this.editor&&this.expandedModes.includes(this.editor.getMode())&&this.editor.expandAll()},setEditor:function(){var t=this;return Sn(gn().m(function e(){return gn().w(function(e){for(;;)switch(e.n){case 0:t.editor&&t.editor.set(t.formatValue);case 1:return e.a(2)}},e)}))()}}},yn,[],!1,null,"0d5540e8",null).exports;var xn=function(){var t=this,e=t._self._c;return e("v-app",[e("v-container",{staticClass:"pa-0",attrs:{fluid:""}},[e("div",[e("div",{style:"overflow-y: auto; height: ".concat(t.height)},[e("div",{attrs:{id:t.editorId}},[e("textarea",{staticStyle:{display:"none"}},[t._v(t._s(t.value))])])])])])],1)};xn._withStripped=!0;const kn=i({name:"JhMarkdownEditor",props:{value:{type:String,default:""},placeholder:{type:String,default:"请输入内容..."},height:{type:String,default:"calc(100vh - 400px)"},width:{type:Number,default:100},editorPath:{type:String,default:"/public/plugins/editor.md/lib/"},toolbarIcons:{type:Array,default:function(){return["undo","redo","|","watch","preview","|","h1","h2","h3","h4","h5","bold","del","italic","quote","mark","list-ul","list-ol","hr","link","|","image","code","table"]}},readonly:{type:Boolean,default:!1}},data:function(){return{editor:null,isMDChange:!1,editorId:"markdown-editor-".concat(Math.random().toString(36).substr(2,9))}},mounted:function(){var t=this;this.$nextTick(function(){t.initEditorMd()})},beforeDestroy:function(){this.editor&&(this.editor=null)},watch:{value:function(t){this.editor&&!this.isMDChange&&this.editor.setMarkdown(t),this.isMDChange=!1}},methods:{initEditorMd:function(){var t=this,e=document.getElementById(this.editorId);e?window.editormd?(e.innerHTML='<textarea style="display:none;">'.concat(this.value||"","</textarea>"),t.editor=window.editormd(this.editorId,{watch:!this.readonly,saveHTMLToTextarea:!0,path:this.editorPath,toolbarIcons:this.toolbarIcons,placeholder:this.placeholder,readOnly:this.readonly,onchange:function(){t.handleMDChange()}})):console.warn("Editor.md is not loaded. Please include Editor.md library."):console.warn("Editor container not found")},handleMDChange:function(){this.isMDChange=!0;var t=this.editor.getMarkdown();if(this.$emit("input",t),this.$emit("change",t),this.editor.getPreviewedHTML){var e=this.editor.getPreviewedHTML();this.$emit("content-for-seo",e)}},getMarkdown:function(){return this.editor?this.editor.getMarkdown():this.value},setMarkdown:function(t){this.editor&&this.editor.setMarkdown(t)},insertValue:function(t){this.editor&&this.editor.insertValue(t)}}},xn,[],!1,null,"024b241e",null).exports;var jn=function(){var t=this,e=t._self._c;return e("v-app",[e("v-container",{attrs:{fluid:""}},[e("v-row",{staticClass:"draggable-container"},[t.showComponentLibrary?e("v-col",{attrs:{cols:"12",md:"3"}},[e("div",{staticClass:"title"},[t._v(t._s(t.componentLibraryTitle))]),t._v(" "),t.isDraggableLoaded?e("draggable",{attrs:{group:{name:t.groupName,pull:"clone",put:!1},animation:t.animation,"drag-class":t.dragClass,"ghost-class":t.ghostClass,"chosen-class":t.chosenClass},on:{start:t.handleStart,end:t.handleEnd},model:{value:t.componentsInternal,callback:function(e){t.componentsInternal=e},expression:"componentsInternal"}},[e("transition-group",t._l(t.componentsInternal,function(n){return e("div",{key:n.id,staticClass:"draggable-item"},[t._v("\n "+t._s(n.name)+"\n ")])}),0)],1):t._e()],1):t._e(),t._v(" "),e("v-col",{attrs:{cols:(t.showComponentLibrary,12),md:t.showComponentLibrary?9:12}},[t.isDraggableLoaded?e("draggable",{attrs:{group:t.groupName,animation:t.animation,"drag-class":t.dragClass,"ghost-class":t.ghostClass,"chosen-class":t.chosenClass},on:{start:t.handleStart,end:t.handleEnd},model:{value:t.designAreaInternal,callback:function(e){t.designAreaInternal=e},expression:"designAreaInternal"}},[e("transition-group",t._l(t.designAreaInternal,function(n){return e("div",{key:n.id,staticClass:"draggable-item"},[t._t("item",function(){return[t._v("\n "+t._s(n.name)+"\n ")]},{item:n})],2)}),0)],1):t._e(),t._v(" "),e("v-row",{directives:[{name:"show",rawName:"v-show",value:!t.designAreaInternal.length,expression:"!designAreaInternal.length"}],staticClass:"ma-0 pa-0",staticStyle:{width:"100%"}},[e("v-card",{staticClass:"ma-12",staticStyle:{border:"1px dashed #333333"},attrs:{height:"100",width:"100%",color:"#f5f8fa"}},[t.isDraggableLoaded?e("draggable",{staticClass:"d-flex align-center justify-center",staticStyle:{height:"100%"},attrs:{group:t.groupName,animation:t.animation,"drag-class":t.dragClass,"ghost-class":t.ghostClass},model:{value:t.designAreaInternal,callback:function(e){t.designAreaInternal=e},expression:"designAreaInternal"}},[e("v-card-text",{staticClass:"text-center title draggable-placeholder"},[t._v("\n "+t._s(t.emptyPlaceholder)+"\n ")])],1):t._e()],1)],1)],1)],1)],1)],1)};function On(t){return function(t){if(Array.isArray(t))return Dn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Dn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dn(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}jn._withStripped=!0;const Pn=i({name:"JhDraggable",props:{components:{type:Array,default:function(){return[]}},value:{type:Array,default:function(){return[]}},showComponentLibrary:{type:Boolean,default:!0},componentLibraryTitle:{type:String,default:"组件"},groupName:{type:String,default:"draggable-group"},animation:{type:Number,default:300},dragClass:{type:String,default:"jh-drag-class"},ghostClass:{type:String,default:"jh-ghost-class"},chosenClass:{type:String,default:"jh-chosen-class"},emptyPlaceholder:{type:String,default:"从左侧拖入或点选组件进行内容设计"}},data:function(){return{drag:!1,componentsInternal:[],designAreaInternal:[],isDraggableLoaded:!1}},watch:{components:{handler:function(t){this.componentsInternal=On(t)},immediate:!0,deep:!0},value:{handler:function(t){this.designAreaInternal=On(t)},immediate:!0,deep:!0},designAreaInternal:{handler:function(t){this.$emit("input",t),this.$emit("change",t)},deep:!0}},mounted:function(){this.checkDraggableLibrary()},methods:{checkDraggableLibrary:function(){this.$options.components.draggable||window.vuedraggable?this.isDraggableLoaded=!0:(console.warn("Vue Draggable library is not loaded. Please include vuedraggable library."),this.isDraggableLoaded=!1)},handleStart:function(){this.drag=!0,this.$emit("start")},handleEnd:function(){this.drag=!1,this.ensureUniqueIds(),this.$emit("end")},ensureUniqueIds:function(){var t=this,e=[].concat(On(this.componentsInternal.map(function(t){return t.id})),On(this.designAreaInternal.map(function(t){return t.id}))),n=Math.max.apply(Math,On(e));this.designAreaInternal.forEach(function(e){t.componentsInternal.some(function(t){return t.id===e.id})&&(e.id=++n)})}}},jn,[],!1,null,"a384b1a0",null).exports;var In=function(){var t=this,e=t._self._c;return e("v-app",[e("v-container",{attrs:{fluid:""}},[e("v-card",{staticClass:"px-4"},[e("v-row",{staticClass:"ma-0 pt-0 d-flex"},[t.showCreateButton?e("v-btn",{staticClass:"elevation-0 mr-2",attrs:{color:"success",small:"",dark:""},on:{click:t.handleCreateClick}},[t._v("\n 新增附件\n ")]):t._e(),t._v(" "),e("v-spacer"),t._v(" "),e("v-col",{staticClass:"pa-0 pt-2 pt-sm-0",attrs:{cols:"12",sm:"6",md:"3",xl:"3"}},[e("v-text-field",{staticClass:"jh-v-input",attrs:{color:"success",prefix:"表格过滤:",dense:"",filled:"","single-line":"","hide-details":""},model:{value:t.searchInput,callback:function(e){t.searchInput=e},expression:"searchInput"}})],1)],1),t._v(" "),t._l(t.groupedAttachments,function(n,i){return e("v-card",{key:i,staticClass:"my-2",attrs:{outlined:""}},[e("v-card-title",{staticClass:"pl-4",staticStyle:{"font-size":"20px","font-weight":"500"}},[t._v("\n "+t._s(i)+"\n ")]),t._v(" "),e("v-card-text",{staticStyle:{display:"flex","flex-flow":"wrap"}},t._l(n,function(n){return e("v-card",{key:n.id,staticClass:"mr-2 mb-2",attrs:{width:"200px",outlined:""}},[e("v-img",{staticClass:"white--text align-end",attrs:{src:t.getPreviewUrl(n),gradient:"to bottom, rgba(0,0,0,.1), rgba(0,0,0,.5)",height:"120px"}},[e("v-card-title",{staticClass:"text-subtitle-2"},[t._v(t._s(n.filename))])],1),t._v(" "),e("v-card-actions",[e("v-chip",{attrs:{small:""}},[t._v(t._s(n.fileSubtype||t.getFileType(n.filename)))]),t._v(" "),e("v-spacer"),t._v(" "),t.isImage(n.downloadPath||n.filename)?e("v-btn",{attrs:{icon:"",small:"",title:"预览"},on:{click:function(e){return t.handlePreview(n)}}},[e("v-icon",[t._v("mdi-eye")])],1):t._e(),t._v(" "),n.downloadPath?e("v-btn",{attrs:{icon:"",small:"",title:"下载"},on:{click:function(e){return t.handleDownload(n)}}},[e("v-icon",[t._v("mdi-download")])],1):t._e(),t._v(" "),t.readonly?t._e():e("v-btn",{attrs:{icon:"",small:"",title:"删除"},on:{click:function(e){return t.handleDelete(n)}}},[e("v-icon",[t._v("mdi-trash-can-outline")])],1)],1)],1)}),1)],1)}),t._v(" "),e("v-overlay",{attrs:{absolute:"",value:t.loading,color:"#fff"}},[e("v-progress-circular",{attrs:{color:"success",indeterminate:"",size:"32"}})],1),t._v(" "),t.loading||0!==t.filteredAttachments.length?t._e():e("div",{staticClass:"mt-5 text-center"},[t._v("\n 暂无附件\n ")])],2),t._v(" "),e("v-dialog",{attrs:{"max-width":"90vw"},model:{value:t.previewDialog,callback:function(e){t.previewDialog=e},expression:"previewDialog"}},[e("v-card",[e("v-card-title",[t._v("\n "+t._s(t.previewItem?t.previewItem.filename:"")+"\n "),e("v-spacer"),t._v(" "),e("v-btn",{attrs:{icon:""},on:{click:function(e){t.previewDialog=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),t._v(" "),e("v-card-text",{staticClass:"pa-0"},[t.previewItem?e("v-img",{attrs:{src:t.getPreviewUrl(t.previewItem),contain:"","max-height":"70vh"}}):t._e()],1)],1)],1)],1)],1)};In._withStripped=!0;const Fn=i({name:"JhTableAttachment",props:{attachments:{type:Array,default:function(){return[]}},showCreateButton:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},groupBy:{type:String,default:"fileType"},previewPrefix:{type:String,default:"/upload/"},loading:{type:Boolean,default:!1}},data:function(){return{searchInput:"",previewDialog:!1,previewItem:null}},computed:{filteredAttachments:function(){var t=this;return this.searchInput?this.attachments.filter(function(e){return e.filename.toLowerCase().includes(t.searchInput.toLowerCase())||e.fileType&&e.fileType.toLowerCase().includes(t.searchInput.toLowerCase())}):this.attachments},groupedAttachments:function(){var t=this,e={};return this.filteredAttachments.forEach(function(n){var i=n[t.groupBy]||"未分类";e[i]||(e[i]=[]),e[i].push(n)}),e}},methods:{getPreviewUrl:function(t){return t.downloadPath?"".concat(this.previewPrefix).concat(t.downloadPath):"/placeholder-image.jpg"},isImage:function(t){return!!t&&/\.(gif|jpg|jpeg|png|webp|svg|bmp)$/i.test(t)},getFileType:function(t){if(!t)return"";var e=t.split(".").pop();return e?e.toLowerCase():""},handleCreateClick:function(){this.$emit("create-click")},handlePreview:function(t){this.previewItem=t,this.previewDialog=!0,this.$emit("preview",t)},handleDownload:function(t){if(this.$emit("download",t),t.downloadPath){var e=document.createElement("a");e.href=this.getPreviewUrl(t),e.download=t.filename,e.click()}},handleDelete:function(t){this.$emit("delete",t)}}},In,[],!1,null,"5113d453",null).exports;var Tn=function(){var t=this,e=t._self._c;return e("div",{staticClass:"jh-editable-table"},[e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.tableHeaders,items:t.internalData,"items-per-page":t.itemsPerPage,"hide-default-footer":t.hideFooter,dense:t.dense,"disable-sort":!t.sortable},scopedSlots:t._u([t._l(t.editableColumns,function(n){return{key:"item.".concat(n.key),fn:function(i){var r,a,o=i.item;return[e("div",{key:n.key,staticClass:"jh-editable-cell"},[t.isEditing(o)?[n.type&&"text"!==n.type?"number"===n.type?e("v-text-field",{staticClass:"my-1",attrs:{label:n.label,rules:n.rules,type:"number",dense:"","hide-details":"auto"},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,t._n(e))},expression:"item[column.key]"}}):"select"===n.type?e("v-select",{staticClass:"my-1",attrs:{items:n.options,label:n.label,rules:n.rules,dense:"","hide-details":"auto"},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,e)},expression:"item[column.key]"}}):"date"===n.type?e("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"auto"},scopedSlots:t._u([{key:"activator",fn:function(i){var r=i.on,a=i.attrs;return[e("v-text-field",t._g(t._b({staticClass:"my-1",attrs:{label:n.label,"prepend-icon":"mdi-calendar",readonly:"",dense:"","hide-details":"auto"},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,e)},expression:"item[column.key]"}},"v-text-field",a,!1),r))]}}],null,!0),model:{value:t.dateMenus[o._uuid+n.key],callback:function(e){t.$set(t.dateMenus,o._uuid+n.key,e)},expression:"dateMenus[item._uuid + column.key]"}},[t._v(" "),e("v-date-picker",{on:{input:function(e){t.dateMenus[o._uuid+n.key]=!1}},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,e)},expression:"item[column.key]"}})],1):"switch"===n.type?e("v-switch",{staticClass:"my-1",attrs:{label:n.label,dense:"","hide-details":"auto"},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,e)},expression:"item[column.key]"}}):"enum"===n.type&&n.enum?e("v-select",{staticClass:"my-1",attrs:{items:t.getEnumOptions(n.enum),label:n.label,rules:n.rules,dense:"","hide-details":"auto"},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,e)},expression:"item[column.key]"}}):t._e():e("v-text-field",{staticClass:"my-1",attrs:{label:n.label,rules:n.rules,placeholder:n.placeholder,dense:"","hide-details":"auto"},model:{value:o[n.key],callback:function(e){t.$set(o,n.key,e)},expression:"item[column.key]"}})]:[t.$scopedSlots["cell.".concat(n.key)]?t._t("cell.".concat(n.key),null,{item:o,value:o[n.key]}):e("span",["enum"===n.type&&n.enum?e("v-chip",{attrs:{color:null===(r=n.enum[o[n.key]])||void 0===r?void 0:r.color,small:""}},[t._v("\n "+t._s((null===(a=n.enum[o[n.key]])||void 0===a?void 0:a.text)||o[n.key])+"\n ")]):"switch"===n.type?e("v-icon",{attrs:{color:o[n.key]?"success":"grey"}},[t._v("\n "+t._s(o[n.key]?"mdi-check-circle":"mdi-circle-outline")+"\n ")]):e("span",[t._v(t._s(o[n.key]))])],1)]],2)]}}}),{key:"item.actions",fn:function(n){var i=n.item;return[e("div",{staticClass:"jh-editable-actions"},[t.isEditing(i)?[e("v-btn",{attrs:{icon:"",small:"",color:"success",title:"保存"},on:{click:function(e){return t.handleSave(i)}}},[e("v-icon",{attrs:{small:""}},[t._v("mdi-check")])],1),t._v(" "),e("v-btn",{attrs:{icon:"",small:"",color:"error",title:"取消"},on:{click:function(e){return t.handleCancel(i)}}},[e("v-icon",{attrs:{small:""}},[t._v("mdi-close")])],1)]:[t.editable?e("v-btn",{attrs:{icon:"",small:"",color:"primary",title:"编辑"},on:{click:function(e){return t.handleEdit(i)}}},[e("v-icon",{attrs:{small:""}},[t._v("mdi-pencil")])],1):t._e(),t._v(" "),t.deletable?e("v-btn",{attrs:{icon:"",small:"",color:"error",title:"删除"},on:{click:function(e){return t.handleDelete(i)}}},[e("v-icon",{attrs:{small:""}},[t._v("mdi-delete")])],1):t._e(),t._v(" "),t._t("actions",null,{item:i})]],2)]}},t.recordCreator?{key:"footer",fn:function(){return[e("div",{staticClass:"jh-editable-footer pa-3"},[e("v-btn",{attrs:{color:"primary",small:"",disabled:t.hasEditingRow},on:{click:t.handleAddRow}},[e("v-icon",{attrs:{small:"",left:""}},[t._v("mdi-plus")]),t._v("\n "+t._s(t.recordCreatorProps.creatorButtonText||"添加一行数据")+"\n ")],1)],1)]},proxy:!0}:null],null,!0)})],1)};Tn._withStripped=!0;var An=["_uuid","_isNew"],$n=["_uuid","_isNew"];function Bn(t){return Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bn(t)}function Rn(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Vn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return En(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?En(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}function En(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Ln(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return Nn(c,"_invoke",function(n,i,r){var a,l,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,l=0,s=t,f.n=n,o}};function h(n,i){for(l=n,s=i,e=0;!d&&c&&!r&&e<u.length;e++){var r,a=u[e],h=f.p,p=a[2];n>3?(r=p===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=t):a[0]<=h&&((r=n<2&&h<a[1])?(l=0,f.v=i,f.n=a[1]):h<p&&(r=n<3||a[0]>i||i>p)&&(a[4]=n,a[5]=i,f.n=p,l=0))}if(r||n>1)return o;throw d=!0,i}return function(r,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(e=l<2?t:s)||!d;){a||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(r="next"),e=a[r]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=a.return)&&e.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);a=t}else if((e=(d=f.n<0)?s:n.call(i,f))!==o)break}catch(e){a=t,l=1,s=e}finally{c=1}}return{value:e,done:d}}}(n,r,a),!0),c}var o={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][i]?e(e([][i]())):(Nn(e={},i,function(){return this}),e),d=c.prototype=l.prototype=Object.create(u);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Nn(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=c,Nn(d,"constructor",c),Nn(c,"constructor",s),s.displayName="GeneratorFunction",Nn(c,r,"GeneratorFunction"),Nn(d),Nn(d,r,"Generator"),Nn(d,i,function(){return this}),Nn(d,"toString",function(){return"[object Generator]"}),(Ln=function(){return{w:a,m:f}})()}function Nn(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}Nn=function(t,e,n,i){function a(e,n){Nn(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},Nn(t,e,n,i)}function Mn(t,e,n,i,r,a,o){try{var l=t[a](o),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,r)}function Kn(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){Mn(a,i,r,o,l,"next",t)}function l(t){Mn(a,i,r,o,l,"throw",t)}o(void 0)})}}function zn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Jn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?zn(Object(n),!0).forEach(function(e){Gn(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zn(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Gn(t,e,n){return(e=function(t){var e=function(t){if("object"!=Bn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bn(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wn(t){return Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(t)}function Un(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function qn(t,e,n){return(e=function(t){var e=function(t){if("object"!=Wn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Wn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wn(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hn={JhMenu:r,JhScene:f,JhDateRangePicker:m,JhQueryFilter:A,JhTable:Y,JhTreeSelect:at,JhAddressSelect:dt,JhPageContainer:ht,JhLayout:gt,JhCard:jt,JhStatisticCard:Pt,JhWaterMark:Vt,JhForm:ae,JhModalForm:de,JhDrawerForm:ye,JhModal:Ce,JhDrawer:Pe,JhStepsForm:Le,JhFormList:on,JhFileInput:mn,JhJsonEditor:Cn,JhMarkdownEditor:kn,JhDraggable:Pn,JhTableAttachment:Fn,JhEditableTable:i({name:"JhEditableTable",props:{value:{type:Array,default:function(){return[]}},columns:{type:Array,required:!0},editable:{type:Boolean,default:!0},deletable:{type:Boolean,default:!0},recordCreator:{type:Boolean,default:!0},recordCreatorProps:{type:Object,default:function(){return{creatorButtonText:"添加一行数据",record:{}}}},itemsPerPage:{type:Number,default:-1},hideFooter:{type:Boolean,default:!0},dense:{type:Boolean,default:!1},sortable:{type:Boolean,default:!1},rowKey:{type:String,default:"id"},editableType:{type:String,default:"multiple",validator:function(t){return["single","multiple"].includes(t)}},maxRows:{type:Number,default:1/0},onValuesChange:{type:Function,default:null},beforeAddRow:{type:Function,default:null},beforeRemoveRow:{type:Function,default:null},actionRender:{type:Function,default:null},editableKeys:{type:Array,default:null},onSave:{type:Function,default:null},onDelete:{type:Function,default:null}},data:function(){return{internalData:[],editingKeys:new Set,originalData:new Map,dateMenus:{}}},computed:{editableColumns:function(){return this.columns.filter(function(t){return!1!==t.editable})},tableHeaders:function(){var t=this,e=this.columns.map(function(e){return{text:e.label||e.key,value:e.key,sortable:!1!==e.sortable&&t.sortable,width:e.width,align:e.align||"start"}});return(this.editable||this.deletable||this.$scopedSlots.actions)&&e.push({text:"操作",value:"actions",sortable:!1,width:120,align:"center"}),e},hasEditingRow:function(){return this.editingKeys.size>0}},watch:{value:{handler:function(t){this.initInternalData(t)},immediate:!0,deep:!0}},methods:{initInternalData:function(t){var e=this;this.internalData=t.map(function(t){return t._uuid||(t._uuid=e.generateUUID()),Jn({},t)})},generateUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})},getRowKey:function(t){return t._uuid||t[this.rowKey]},isEditing:function(t){return this.editingKeys.has(this.getRowKey(t))},getEnumOptions:function(t){return Object.keys(t).map(function(e){return{text:t[e].text||e,value:e}})},handleEdit:function(t){var e=this;return Kn(Ln().m(function n(){var i,r,a;return Ln().w(function(n){for(;;)switch(n.n){case 0:if(i=e.getRowKey(t),!("single"===e.editableType&&e.editingKeys.size>0)){n.n=1;break}if(r=Array.from(e.editingKeys)[0],!(a=e.internalData.find(function(t){return e.getRowKey(t)===r}))){n.n=1;break}return n.n=1,e.handleCancel(a);case 1:e.originalData.set(i,Jn({},t)),e.editingKeys.add(i),e.$emit("edit",t),e.$emit("update:editableKeys",Array.from(e.editingKeys));case 2:return n.a(2)}},n)}))()},handleSave:function(t){var e=this;return Kn(Ln().m(function n(){var i;return Ln().w(function(n){for(;;)switch(n.n){case 0:if(i=e.getRowKey(t),e.validateRow(t)){n.n=1;break}return n.a(2);case 1:if(!e.onSave){n.n=3;break}return n.n=2,e.onSave(i,t,e.originalData.get(i));case 2:if(!1!==n.v){n.n=3;break}return n.a(2);case 3:e.editingKeys.delete(i),e.originalData.delete(i),e.syncToParent(),e.$emit("save",t),e.$emit("change",e.internalData),e.$emit("update:editableKeys",Array.from(e.editingKeys)),e.onValuesChange&&e.onValuesChange(t,e.internalData);case 4:return n.a(2)}},n)}))()},handleCancel:function(t){var e=this,n=this.getRowKey(t);if(t._isNew){var i=this.internalData.findIndex(function(t){return e.getRowKey(t)===n});i>-1&&this.internalData.splice(i,1)}else{var r=this.originalData.get(n);if(r){var a=this.internalData.findIndex(function(t){return e.getRowKey(t)===n});a>-1&&this.internalData.splice(a,1,Jn({},r))}}this.editingKeys.delete(n),this.originalData.delete(n),this.syncToParent(),this.$emit("cancel",t)},handleDelete:function(t){var e=this;return Kn(Ln().m(function n(){var i,r;return Ln().w(function(n){for(;;)switch(n.n){case 0:if(i=e.getRowKey(t),r=e.internalData.findIndex(function(t){return e.getRowKey(t)===i}),!e.beforeRemoveRow){n.n=2;break}return n.n=1,e.beforeRemoveRow(t,r);case 1:if(!1!==n.v){n.n=2;break}return n.a(2);case 2:if(!e.onDelete){n.n=4;break}return n.n=3,e.onDelete(i,t);case 3:if(!1!==n.v){n.n=4;break}return n.a(2);case 4:r>-1&&(e.internalData.splice(r,1),e.syncToParent(),e.$emit("delete",t,r),e.$emit("change",e.internalData));case 5:return n.a(2)}},n)}))()},handleAddRow:function(){var t=this;return Kn(Ln().m(function e(){var n;return Ln().w(function(e){for(;;)switch(e.n){case 0:if(!(t.internalData.length>=t.maxRows)){e.n=1;break}return t.$emit("max-rows",t.maxRows),e.a(2);case 1:if(!t.beforeAddRow){e.n=3;break}return e.n=2,t.beforeAddRow();case 2:if(!1!==e.v){e.n=3;break}return e.a(2);case 3:n=Jn({_uuid:t.generateUUID(),_isNew:!0},t.recordCreatorProps.record),t.columns.forEach(function(t){t.key&&void 0===n[t.key]&&("switch"===t.type?n[t.key]=!1:"number"===t.type?n[t.key]=0:n[t.key]="")}),t.internalData.push(n),t.$nextTick(function(){t.handleEdit(n)}),t.$emit("add",n);case 4:return e.a(2)}},e)}))()},validateRow:function(t){var e,n=Vn(this.columns);try{for(n.s();!(e=n.n()).done;){var i=e.value;if(i.rules&&!1!==i.editable){var r,a=Vn(i.rules);try{for(a.s();!(r=a.n()).done;){var o=(0,r.value)(t[i.key]);if("string"==typeof o)return this.$emit("validation-error",{item:t,column:i,message:o}),!1}}catch(t){a.e(t)}finally{a.f()}}}}catch(t){n.e(t)}finally{n.f()}return!0},syncToParent:function(){var t=this.internalData.map(function(t){return t._uuid,t._isNew,Rn(t,An)});this.$emit("input",t)},getData:function(){return this.internalData.map(function(t){return t._uuid,t._isNew,Rn(t,$n)})},setData:function(t){this.initInternalData(t),this.syncToParent()},clearData:function(){this.internalData=[],this.editingKeys.clear(),this.originalData.clear(),this.syncToParent()}}},Tn,[],!1,null,"52ef24ea",null).exports,JhMask:Lt,JhToast:Mt,JhConfirmDialog:Ut},Yn=function(t){Yn.installed||(Yn.installed=!0,Object.keys(Hn).forEach(function(e){t.component(e,Hn[e])}))};"undefined"!=typeof window&&window.Vue&&Yn(window.Vue);const Xn=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Un(Object(n),!0).forEach(function(e){qn(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Un(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({install:Yn},Hn);return e.default})());