@ibiz-template/vue3-util 0.7.41-alpha.134 → 0.7.41-alpha.136

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.
@@ -1 +1 @@
1
- .ibiz-control-shell{position:relative;width:100%;height:100%}.ibiz-icon{--ibiz-icon-emoji-space:-3px}.ibiz-icon__emoji{position:relative;left:var(--ibiz-icon-emoji-space)}.ibiz-badge{--ibiz-badge-bg-color:var(--ibiz-color-danger);--ibiz-badge-height:18px;--ibiz-badge-border-radius:10px;display:inline-flex;align-items:center;justify-content:center;width:auto;height:var(--ibiz-badge-height);padding:var(--ibiz-spacing-extra-tight);font-size:var(--ibiz-font-size-small);line-height:normal;color:var(--ibiz-color-danger-text);white-space:nowrap;background-color:var(--ibiz-badge-bg-color);border:1px solid rgba(0,0,0,0);border-radius:var(--ibiz-badge-border-radius)}.ibiz-badge--danger{--ibiz-badge-bg-color:var(--ibiz-color-danger)}.ibiz-badge--success{--ibiz-badge-bg-color:var(--ibiz-color-success)}.ibiz-badge--warning{--ibiz-badge-bg-color:var(--ibiz-color-warning)}.ibiz-badge--info{--ibiz-badge-bg-color:var(--ibiz-color-info)}.ibiz-badge--primary{--ibiz-badge-bg-color:var(--ibiz-color-primary)}.ibiz-badge.is-mob{--ibiz-panel-badge-text-color:var(--ibiz-color-white);--ibiz-panel-badge-font-weight:600;--ibiz-panel-badge-height:1.125rem;--ibiz-panel-badge-border-radius:0.625rem;font-weight:var(--ibiz-panel-badge-font-weight);color:var(--ibiz-panel-badge-text-color)}.ibiz-custom-render{width:100%;height:100%}.ibiz-control{--ibiz-control-base-scrollbar-width:0px;--ibiz-control-base-mask-text-color:var(--ibiz-color-primary-text);--ibiz-control-base-mask-background-color-blank:transparent;--ibiz-control-base-mask-background-color-mask:rgba(0, 0, 0, 0.5);width:100%;height:100%}.ibiz-control__control-render{width:100%;height:100%}.ibiz-control.is-disabled{position:relative}.ibiz-control__mask-container{position:absolute;top:0;left:0;z-index:10;width:calc(100% - var(--ibiz-control-base-scrollbar-width));height:100%}.ibiz-control--blank{background-color:var(--ibiz-control-base-mask-background-color-blank)}.ibiz-control--mask{color:var(--ibiz-control-base-mask-text-color);background-color:var(--ibiz-control-base-mask-background-color-mask);display:flex;align-items:center;justify-content:center}.ibiz-view-shell{position:relative;width:100%;height:100%}.ibiz-signature-pad{width:100%;height:100%}.ibiz-signature-pad__container{width:100%;height:100%;background-color:var(--ibiz-color-bg-1)}.ibiz-code-list{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap}.ibiz-code-list__item{color:var(--ibiz-code-list-item-color);display:flex;align-items:center;justify-content:flex-start}.ibiz-code-list .ibiz-icon{display:inline-flex;padding-right:var(--ibiz-spacing-tight)}.ibiz-panel-container{--ibiz-panel-scroll:auto;width:100%;height:100%}.ibiz-panel-container>.ibiz-row{height:100%;overflow:hidden var(--ibiz-panel-scroll)}.ibiz-panel-container.is-hidden{display:none}.ibiz-panel-ctrl-pos{width:100%;height:100%}.ibiz-panel-ctrl-pos.is-hidden{display:none}.ibiz-panel-field{--ibiz-form-item-label-color:var(--ibiz-color-text-1);--ibiz-form-item-text-color:var(--ibiz-color-text-2);--ibiz-form-item-hover-color:var(--ibiz-color-text-0);--ibiz-form-item-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-form-item-readonly-color:var(--ibiz-color-disabled-text);--ibiz-form-item-border-color:transparent;--ibiz-form-item-font-size:var(--ibiz-font-size-regular);--ibiz-form-item-placeholder-color:var(--ibiz-color-text-3);--ibiz-form-item-disabled-color:var(--ibiz-color-disabled-text);--ibiz-form-item-disabled-bg-color:var(--ibiz-color-disabled-fill);--ibiz-form-item-disabled-border-color:var(--ibiz-color-disabled-border);--ibiz-form-item-active-bg:var(--ibiz-color-fill-2);--ibiz-form-item-active-border:var(--ibiz-active-bg);--ibiz-form-item-focus-bg:var(--ibiz-color-fill-0);--ibiz-form-item-focus-border:var(--ibiz-color-focus-border);--ibiz-form-item-line-height:var(--ibiz-editor-default-line-height);--ibiz-form-item-font-weight:var(--ibiz-font-weight-regular);--ibiz-form-item-hover-edit-padding:var(--ibiz-spacing-none) 11px;--ibiz-panel-field-icon-margin:6px;--ibiz-panel-field-error-font-size:var(--ibiz-font-size-small);--ibiz-panel-field-error-padding-top:var(--ibiz-spacing-super-tight);--ibiz-panel-field-error-color:var(--ibiz-color-danger);width:100%;height:100%;position:relative}.ibiz-panel-field__error{left:0;top:100%;line-height:1;font-size:var(--ibiz-panel-field-error-font-size);padding-top:var(--ibiz-panel-field-error-padding-top);position:absolute;color:var(--ibiz-panel-field-error-color)}.ibiz-panel-field.is-error .el-input__wrapper{box-shadow:0 0 0 1px var(--ibiz-panel-field-error-color) inset}.ibiz-panel-field .ibiz-panel-field-content{line-height:inherit}.ibiz-panel-field.is-mob{--ibiz-panel-field-icon-margin:0.375rem;--ibiz-editor-default-text-align:left;--ibiz-editor-default-flex-justify-content:flex-start}.ibiz-panel-field.is-mob .ibiz-panel-field-content{line-height:var(--ibiz-editor-default-line-height)}.ibiz-multi-data-container{width:100%;height:100%}.ibiz-multi-data-container-raw{width:100%;height:100%}.ibiz-panel-container-image{position:relative;width:100%;height:100%;background-repeat:no-repeat;background-position:center center}.ibiz-panel-container-image>.ibiz-row{height:100%;overflow:hidden auto}.ibiz-panel-container-image.is-hidden{display:none}.ibiz-nav-pos{width:100%;height:100%}.ibiz-single-data-container{width:100%;height:100%}.ibiz-grid-container{--ibiz-grid-container-bg-color:var(--ibiz-bg-color-overlay);--ibiz-grid-container-padding:var(--ibiz-padding);width:100%;height:100%;overflow:auto}.ibiz-grid-container.is-hidden{display:none}.ibiz-panel-ctrl-view-page-caption.is-mob .ibiz-panel-ctrl-view-page-caption-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ibiz-view-page-caption-font-size);font-weight:var(--ibiz-view-page-caption-font-weight);line-height:var(--ibiz-view-page-caption-line-height);color:var(--ibiz-view-page-caption-color);text-align:var(--ibiz-view-page-caption-text-align)}.ibiz-panel-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width:100%}.ibiz-teleport-placeholder{width:auto;height:auto}.ibiz-teleport-placeholder>div:not(:last-child){display:none}.ibiz-auth-wxmp-qrcode{--ibiz-auth-wxmp-qrcode-caption-font-size:var(--ibiz-font-size-small);--ibiz-auth-wxmp-qrcode-bg-color:rgba(255, 255, 255, 0.9);--ibiz-auth-wxmp-qrcode-mask-color:var(--ibiz-color-primary);--ibiz-auth-wxmp-qrcode-mask-icon-font-size:var(--ibiz-font-size-header-1);--ibiz-auth-wxmp-qrcode-mask-icon-hover-color:var(--ibiz-color-primary-hover);display:flex;flex-direction:column;width:100%;height:100%}.ibiz-auth-wxmp-qrcode__content{position:relative;width:100%;height:100%}.ibiz-auth-wxmp-qrcode__qrcode{width:100%;height:100%;object-fit:contain}.ibiz-auth-wxmp-qrcode__caption{font-size:var(--ibiz-auth-wxmp-qrcode-caption-font-size);text-align:center}.ibiz-auth-wxmp-qrcode__mask{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:var(--ibiz-auth-wxmp-qrcode-mask-color);background-color:var(--ibiz-auth-wxmp-qrcode-bg-color)}.ibiz-auth-wxmp-qrcode__mask--icon{font-size:var(--ibiz-auth-wxmp-qrcode-mask-icon-font-size);cursor:pointer}.ibiz-auth-wxmp-qrcode__mask--icon:hover{color:var(--ibiz-auth-wxmp-qrcode-mask-icon-hover-color)}.ibiz-panel-container-tabs{position:relative}.ibiz-panel-container-tabs .el-tabs{--el-tabs-header-height: 52px}.ibiz-panel-container-tabs .el-tabs__nav-wrap::after{display:none}.ibiz-panel-container-tabs::after{position:absolute;bottom:0;left:0;z-index:var(--el-index-normal);width:100%;height:"--ibiz-spacing-super-tight";content:"";background-color:var(--el-border-color-light)}.ibiz-view{--ibiz-view-bg-color:var(--ibiz-color-bg-1);--ibiz-view-border-radius:var(--ibiz-border-radius-medium);width:100%;height:100%}.ibiz-view .ibiz-view{background-color:var(--ibiz-view-bg-color);border-radius:var(--ibiz-view-border-radius)}.ibiz-view .ibiz-view-appportalview{background-color:rgba(0,0,0,0)}.ibiz-view.has-top-message,.ibiz-view.has-bottom-message{display:flex;flex-flow:column nowrap}.ibiz-view.has-top-message>.ibiz-view-message,.ibiz-view.has-bottom-message>.ibiz-view-message{flex-grow:0;flex-shrink:0}.ibiz-view.has-top-message>.ibiz-control-viewlayoutpanel,.ibiz-view.has-bottom-message>.ibiz-control-viewlayoutpanel{flex-grow:1;flex-shrink:1}.ibiz-view-dehtmlview>iframe{width:100%;height:100%;border:0}.ibiz-scroll-container-item{width:100%;height:100%;overflow:auto}.ibiz-scroll-container-item.is-hidden{display:none}.ibiz-scroll-container{width:100%;height:100%;display:flex;flex-flow:column nowrap}.ibiz-scroll-container.is-hidden{display:none}.ibiz-scroll-container-content{flex-grow:1;overflow:auto;display:flex}.ibiz-scroll-container-content__center{flex-grow:1;overflow:auto}.ibiz-scroll-container-content__center>.ibiz-scroll-container-item>.ibiz-col{flex:none}.ibiz-scroll-container-content__left{overflow:auto}.ibiz-scroll-container-content__right{overflow:auto}.ibiz-scroll-container-header{overflow:auto}.ibiz-scroll-container-footer{overflow:auto}.ibiz-control-panel{width:100%;height:100%}.ibiz-control-panel-content{width:100%;height:100%}.ibiz-control-viewlayoutpanel{width:100%;height:100%}.ibiz-control-viewlayoutpanel-content{width:100%;height:100%}
1
+ .ibiz-icon{--ibiz-icon-emoji-space:-3px}.ibiz-icon__emoji{position:relative;left:var(--ibiz-icon-emoji-space)}.ibiz-control{--ibiz-control-base-scrollbar-width:0px;--ibiz-control-base-mask-text-color:var(--ibiz-color-primary-text);--ibiz-control-base-mask-background-color-blank:transparent;--ibiz-control-base-mask-background-color-mask:rgba(0, 0, 0, 0.5);width:100%;height:100%}.ibiz-control__control-render{width:100%;height:100%}.ibiz-control.is-disabled{position:relative}.ibiz-control__mask-container{position:absolute;top:0;left:0;z-index:10;width:calc(100% - var(--ibiz-control-base-scrollbar-width));height:100%}.ibiz-control--blank{background-color:var(--ibiz-control-base-mask-background-color-blank)}.ibiz-control--mask{color:var(--ibiz-control-base-mask-text-color);background-color:var(--ibiz-control-base-mask-background-color-mask);display:flex;align-items:center;justify-content:center}.ibiz-control-shell{position:relative;width:100%;height:100%}.ibiz-view-shell{position:relative;width:100%;height:100%}.ibiz-badge{--ibiz-badge-bg-color:var(--ibiz-color-danger);--ibiz-badge-height:18px;--ibiz-badge-border-radius:10px;display:inline-flex;align-items:center;justify-content:center;width:auto;height:var(--ibiz-badge-height);padding:var(--ibiz-spacing-extra-tight);font-size:var(--ibiz-font-size-small);line-height:normal;color:var(--ibiz-color-danger-text);white-space:nowrap;background-color:var(--ibiz-badge-bg-color);border:1px solid rgba(0,0,0,0);border-radius:var(--ibiz-badge-border-radius)}.ibiz-badge--danger{--ibiz-badge-bg-color:var(--ibiz-color-danger)}.ibiz-badge--success{--ibiz-badge-bg-color:var(--ibiz-color-success)}.ibiz-badge--warning{--ibiz-badge-bg-color:var(--ibiz-color-warning)}.ibiz-badge--info{--ibiz-badge-bg-color:var(--ibiz-color-info)}.ibiz-badge--primary{--ibiz-badge-bg-color:var(--ibiz-color-primary)}.ibiz-badge.is-mob{--ibiz-panel-badge-text-color:var(--ibiz-color-white);--ibiz-panel-badge-font-weight:600;--ibiz-panel-badge-height:1.125rem;--ibiz-panel-badge-border-radius:0.625rem;font-weight:var(--ibiz-panel-badge-font-weight);color:var(--ibiz-panel-badge-text-color)}.ibiz-code-list{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap}.ibiz-code-list__item{color:var(--ibiz-code-list-item-color);display:flex;align-items:center;justify-content:flex-start}.ibiz-code-list .ibiz-icon{display:inline-flex;padding-right:var(--ibiz-spacing-tight)}.ibiz-signature-pad{width:100%;height:100%}.ibiz-signature-pad__container{width:100%;height:100%;background-color:var(--ibiz-color-bg-1)}.ibiz-custom-render{width:100%;height:100%}.ibiz-view{--ibiz-view-bg-color:var(--ibiz-color-bg-1);--ibiz-view-border-radius:var(--ibiz-border-radius-medium);width:100%;height:100%}.ibiz-view .ibiz-view{background-color:var(--ibiz-view-bg-color);border-radius:var(--ibiz-view-border-radius)}.ibiz-view .ibiz-view-appportalview{background-color:rgba(0,0,0,0)}.ibiz-view.has-top-message,.ibiz-view.has-bottom-message{display:flex;flex-flow:column nowrap}.ibiz-view.has-top-message>.ibiz-view-message,.ibiz-view.has-bottom-message>.ibiz-view-message{flex-grow:0;flex-shrink:0}.ibiz-view.has-top-message>.ibiz-control-viewlayoutpanel,.ibiz-view.has-bottom-message>.ibiz-control-viewlayoutpanel{flex-grow:1;flex-shrink:1}.ibiz-view-dehtmlview>iframe{width:100%;height:100%;border:0}.ibiz-panel-ctrl-pos{width:100%;height:100%}.ibiz-panel-ctrl-pos.is-hidden{display:none}.ibiz-panel-container{--ibiz-panel-scroll:auto;width:100%;height:100%}.ibiz-panel-container>.ibiz-row{height:100%;overflow:hidden var(--ibiz-panel-scroll)}.ibiz-panel-container.is-hidden{display:none}.ibiz-panel-field{--ibiz-form-item-label-color:var(--ibiz-color-text-1);--ibiz-form-item-text-color:var(--ibiz-color-text-2);--ibiz-form-item-hover-color:var(--ibiz-color-text-0);--ibiz-form-item-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-form-item-readonly-color:var(--ibiz-color-disabled-text);--ibiz-form-item-border-color:transparent;--ibiz-form-item-font-size:var(--ibiz-font-size-regular);--ibiz-form-item-placeholder-color:var(--ibiz-color-text-3);--ibiz-form-item-disabled-color:var(--ibiz-color-disabled-text);--ibiz-form-item-disabled-bg-color:var(--ibiz-color-disabled-fill);--ibiz-form-item-disabled-border-color:var(--ibiz-color-disabled-border);--ibiz-form-item-active-bg:var(--ibiz-color-fill-2);--ibiz-form-item-active-border:var(--ibiz-active-bg);--ibiz-form-item-focus-bg:var(--ibiz-color-fill-0);--ibiz-form-item-focus-border:var(--ibiz-color-focus-border);--ibiz-form-item-line-height:var(--ibiz-editor-default-line-height);--ibiz-form-item-font-weight:var(--ibiz-font-weight-regular);--ibiz-form-item-hover-edit-padding:var(--ibiz-spacing-none) 11px;--ibiz-panel-field-icon-margin:6px;--ibiz-panel-field-error-font-size:var(--ibiz-font-size-small);--ibiz-panel-field-error-padding-top:var(--ibiz-spacing-super-tight);--ibiz-panel-field-error-color:var(--ibiz-color-danger);width:100%;height:100%;position:relative}.ibiz-panel-field__error{left:0;top:100%;line-height:1;font-size:var(--ibiz-panel-field-error-font-size);padding-top:var(--ibiz-panel-field-error-padding-top);position:absolute;color:var(--ibiz-panel-field-error-color)}.ibiz-panel-field.is-error .el-input__wrapper{box-shadow:0 0 0 1px var(--ibiz-panel-field-error-color) inset}.ibiz-panel-field .ibiz-panel-field-content{line-height:inherit}.ibiz-panel-field.is-mob{--ibiz-panel-field-icon-margin:0.375rem;--ibiz-editor-default-text-align:left;--ibiz-editor-default-flex-justify-content:flex-start}.ibiz-panel-field.is-mob .ibiz-panel-field-content{line-height:var(--ibiz-editor-default-line-height)}.ibiz-nav-pos{width:100%;height:100%}.ibiz-panel-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width:100%}.ibiz-multi-data-container{width:100%;height:100%}.ibiz-single-data-container{width:100%;height:100%}.ibiz-grid-container{--ibiz-grid-container-bg-color:var(--ibiz-bg-color-overlay);--ibiz-grid-container-padding:var(--ibiz-padding);width:100%;height:100%;overflow:auto}.ibiz-grid-container.is-hidden{display:none}.ibiz-multi-data-container-raw{width:100%;height:100%}.ibiz-panel-container-image{position:relative;width:100%;height:100%;background-repeat:no-repeat;background-position:center center}.ibiz-panel-container-image>.ibiz-row{height:100%;overflow:hidden auto}.ibiz-panel-container-image.is-hidden{display:none}.ibiz-teleport-placeholder{width:auto;height:auto}.ibiz-teleport-placeholder>div:not(:last-child){display:none}.ibiz-panel-container-tabs{position:relative}.ibiz-panel-container-tabs .el-tabs{--el-tabs-header-height: 52px}.ibiz-panel-container-tabs .el-tabs__nav-wrap::after{display:none}.ibiz-panel-container-tabs::after{position:absolute;bottom:0;left:0;z-index:var(--el-index-normal);width:100%;height:"--ibiz-spacing-super-tight";content:"";background-color:var(--el-border-color-light)}.ibiz-panel-ctrl-view-page-caption.is-mob .ibiz-panel-ctrl-view-page-caption-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ibiz-view-page-caption-font-size);font-weight:var(--ibiz-view-page-caption-font-weight);line-height:var(--ibiz-view-page-caption-line-height);color:var(--ibiz-view-page-caption-color);text-align:var(--ibiz-view-page-caption-text-align)}.ibiz-auth-wxmp-qrcode{--ibiz-auth-wxmp-qrcode-caption-font-size:var(--ibiz-font-size-small);--ibiz-auth-wxmp-qrcode-bg-color:rgba(255, 255, 255, 0.9);--ibiz-auth-wxmp-qrcode-mask-color:var(--ibiz-color-primary);--ibiz-auth-wxmp-qrcode-mask-icon-font-size:var(--ibiz-font-size-header-1);--ibiz-auth-wxmp-qrcode-mask-icon-hover-color:var(--ibiz-color-primary-hover);display:flex;flex-direction:column;width:100%;height:100%}.ibiz-auth-wxmp-qrcode__content{position:relative;width:100%;height:100%}.ibiz-auth-wxmp-qrcode__qrcode{width:100%;height:100%;object-fit:contain}.ibiz-auth-wxmp-qrcode__caption{font-size:var(--ibiz-auth-wxmp-qrcode-caption-font-size);text-align:center}.ibiz-auth-wxmp-qrcode__mask{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:var(--ibiz-auth-wxmp-qrcode-mask-color);background-color:var(--ibiz-auth-wxmp-qrcode-bg-color)}.ibiz-auth-wxmp-qrcode__mask--icon{font-size:var(--ibiz-auth-wxmp-qrcode-mask-icon-font-size);cursor:pointer}.ibiz-auth-wxmp-qrcode__mask--icon:hover{color:var(--ibiz-auth-wxmp-qrcode-mask-icon-hover-color)}.ibiz-scroll-container{width:100%;height:100%;display:flex;flex-flow:column nowrap}.ibiz-scroll-container.is-hidden{display:none}.ibiz-scroll-container-content{flex-grow:1;overflow:auto;display:flex}.ibiz-scroll-container-content__center{flex-grow:1;overflow:auto}.ibiz-scroll-container-content__center>.ibiz-scroll-container-item>.ibiz-col{flex:none}.ibiz-scroll-container-content__left{overflow:auto}.ibiz-scroll-container-content__right{overflow:auto}.ibiz-scroll-container-header{overflow:auto}.ibiz-scroll-container-footer{overflow:auto}.ibiz-scroll-container-item{width:100%;height:100%;overflow:auto}.ibiz-scroll-container-item.is-hidden{display:none}.ibiz-control-panel{width:100%;height:100%}.ibiz-control-panel-content{width:100%;height:100%}.ibiz-control-viewlayoutpanel{width:100%;height:100%}.ibiz-control-viewlayoutpanel-content{width:100%;height:100%}
@@ -1 +1 @@
1
- System.register(["qx-util","vue","@ibiz-template/core","ramda","@ibiz-template/runtime","vue-router","qs","lodash-es","pinia"],function(t){"use strict";var e,n,i,o,a,s,r,l,c,d,u,h,p,m,v,g,y,f,w,C,b,P,I,D,E,S,x,T,O,A,N,z,_,R,L,k,M,B,V,j,U,W,F,q,G,H,$,K,X,Q,Y,J,Z,tt,et,nt,it,ot,at,st,rt,lt,ct,dt,ut,ht,pt,mt,vt,gt,yt,ft,wt,Ct,bt,Pt,It,Dt,Et,St,xt,Tt,Ot,At,Nt,zt,_t,Rt,Lt,kt,Mt,Bt,Vt,jt,Ut,Wt,Ft,qt,Gt,Ht,$t,Kt,Xt,Qt,Yt,Jt,Zt,te,ee,ne,ie,oe,ae,se,re,le,ce,de,ue;return{setters:[function(t){e=t.SyncSeriesHook,n=t.AsyncSeriesHook,i=t.isFunc,o=t.notNilEmpty,a=t.QXEvent,s=t.clearAll,r=t.createUUID},function(t){l=t.watch,c=t.onBeforeUnmount,d=t.createCommentVNode,u=t.getCurrentInstance,h=t.toRaw,p=t.isReactive,m=t.inject,v=t.reactive,g=t.onActivated,y=t.onDeactivated,f=t.ref,w=t.h,C=t.resolveComponent,b=t.provide,P=t.onMounted,I=t.onUnmounted,D=t.isRef,E=t.shallowRef,S=t.watchEffect,x=t.computed,T=t.useAttrs,O=t.defineComponent,A=t.createVNode,N=t.withDirectives,z=t.resolveDirective,_=t.nextTick,R=t.mergeProps,L=t.isVNode,k=t.Teleport,M=t.renderSlot,B=t.onBeforeMount},function(t){V=t.onClickOutside,j=t.NOOP,U=t.listenJSEvent,W=t.Namespace,F=t.RuntimeError,q=t.isBase64Image,G=t.isBase64,H=t.base64ToStr,$=t.isSvg,K=t.fixJsonString,X=t.IBizContext,Q=t.ModelError,Y=t.RuntimeModelError,J=t.setAppCookie,Z=t.CoreConst,tt=t.clearAppCookie},function(t){et=t.isNil,nt=t.isNotNil,it=t.clone,ot=t.isEmpty,at=t.mergeLeft},function(e){st=e.MDControlTypes,rt=e.ViewType,lt=e.RouteConst,ct=e.getMatchResPath,dt=e.calcDeCodeNameById,ut=e.PredefinedControlRender,ht=e.ScriptFactory,pt=e.PredefinedAttributes,mt=e.ViewController,vt=e.getControlProvider,gt=e.getErrorViewProvider,yt=e.calcDynaSysParams,ft=e.getViewProvider,wt=e.useCalcOrMode,Ct=e.calcThresholdRange,bt=e.PanelContainerController,Pt=e.registerPanelItemProvider,It=e.PanelItemController,Dt=e.PanelItemState,Et=e.Modal,St=e.ViewMode,xt=e.OpenAppViewCommand,Tt=e.getEditorProvider,Ot=e.PanelItemEventName,At=e.calcDynaClass,Nt=e.getAllPanelField,zt=e.isDataContainer,_t=e.PanelContainerState,Rt=e.PanelNotifyState,Lt=e.getPanelItemProvider,kt=e.convertNavData,Mt=e.PanelData,Bt=e.PanelDataContainerEventName,Vt=e.execDELogicById,jt=e.toLocalOpenWFRedirectView,Ut=e.getControlsByView,Wt=e.getCtrlTeleportParams,Ft=e.AppDataUploadViewController,qt=e.MDCustomViewController,Gt=e.registerViewProvider,Ht=e.getDERedirectToView,$t=e.HtmlViewController,Kt=e.ViewLayoutPanelController,Xt=e.isSimpleDataContainer,Qt=e.filterPresetAttrs,Yt=e.registerControlProvider,Jt=e.ControlType,Zt=e.PanelController,te=e.RemotePluginItem,t({PanelContainerController:e.PanelContainerController,PanelContainerState:e.PanelContainerState})},function(t){ee=t.useRoute,ne=t.useRouter,ie=t.RouterView},function(t){oe=t.default},function(t){ae=t.isElement,se=t.isNumber,re=t.throttle,le=t.isObject,ce=t.isString},function(t){de=t.defineStore,ue=t.createPinia}],execute:function(){t({calcResRoutePath:xe,computedAsync:function(t,e,n){let i;i=D(n)?{evaluating:n}:n||{};const{lazy:o=!1,flush:a="pre",evaluating:s,shallow:r=!0,onError:l=j}=i,c=E(!o),d=r?E(e):f(e);let u=0;if(S(async e=>{if(!c.value)return;u++;const n=u;let i=!1;s&&Promise.resolve().then(()=>{s.value=!0});try{const o=await t(t=>{e(()=>{s&&(s.value=!1),i||t()})});n===u&&(d.value=o)}catch(t){l(t)}finally{s&&n===u&&(s.value=!1),i=!0}},{flush:a}),o)return x(()=>(c.value=!0,d.value));return d},createOverlayView:ze,generateRoutePath:async function(t,e,n,i){var o;const a=Pe(e);let s=Number(n.srfdefaulttoroutedepth||2);n.toRouteDepth?(s=n.toRouteDepth,n.toRouteDepth=void 0):ibiz.env.isMob&&"DEFAULT"===ibiz.env.mobMenuShowMode&&(a.pathNodes[0]={viewName:"home"});let r=null==i?void 0:i.srfmenuitem;!r&&a.pathNodes.length>1&&(r=null==(o=a.pathNodes[1].params)?void 0:o.srfmenuitem);if(a.pathNodes.splice(s-1,a.pathNodes.length-s+1),n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}Ee(n,a.pathNodes),e.fullPath.startsWith("/appredirectview")&&((null==i?void 0:i.srfindexname)?(a.pathNodes[0].viewName=i.srfindexname,delete i.srfindexname):a.pathNodes[0].viewName="index");if(a.pathNodes.push({viewName:t.codeName.toLowerCase(),context:De(n),params:i}),2===s&&(await xe(a,n,t.appDataEntityId,t.appId),Se.includes(t.viewType))){const e=dt(t.appDataEntityId);delete a.pathNodes[0].context[e]}if(r&&a.pathNodes.length>1){const t=a.pathNodes[1].params||{};a.pathNodes[1].params={...t,srfmenuitem:r}}return{path:Ie(a)}},generateRoutePathByModal:async function(t,e,n,i){const o=Pe(e),a=o.pathNodes.findIndex(t=>t.viewName===lt.ROUTE_MODAL_TAG);-1!==a&&(o.pathNodes=o.pathNodes.slice(0,a));if(n.currentSrfNav){const t=o.pathNodes[o.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}return Ee(n,o.pathNodes),o.pathNodes.push({viewName:"".concat(lt.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:De(n),params:i}),{path:Ie(o)}},getArrayProps:to,getAutoCompleteProps:Qi,getCascaderProps:eo,getCheckboxListProps:Li,getCheckboxProps:ki,getCodeEmits:function(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,customAction:t=>!0}},getCodeProps:Yi,getColorPickerProps:no,getDataPickerProps:Mi,getDatePickerProps:Bi,getDateRangeProps:Vi,getDateRangeSelectEmits:function(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,customAction:t=>!0,change:(t,e,n)=>!0}},getDateRangeSelectProps:ji,getDrawerPlacement:function(t){return _e[t]||"right"},getDropdownProps:Ri,getEditorEmits:Ai,getEditorProps:Oi,getGridArrayProps:function(){return{...to(),...Ni()}},getGridAutoCompleteProps:function(){return{...Qi(),...Ni()}},getGridCascaderProps:function(){return{...eo(),...Ni()}},getGridCheckboxListProps:function(){return{...Li(),...Ni()}},getGridCheckboxProps:function(){return{...ki(),...Ni()}},getGridCodeProps:function(){return{...Yi(),...Ni()}},getGridColorPickerProps:function(){return{...no(),...Ni()}},getGridDataPickerProps:function(){return{...Mi(),...Ni()}},getGridDatePickerProps:function(){return{...Bi(),...Ni()}},getGridDateRangeProps:function(){return{...Vi(),...Ni()}},getGridDateRangeSelectProps:function(){return{...Ni(),...ji()}},getGridDropdownProps:function(){return{...Ri(),...Ni()}},getGridEditorCommonProps:Ni,getGridEditorEmits:function(){return{change:(t,e,n)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...Ji(),...Ni()}},getGridInputIpProps:function(){return{...io(),...Ni()}},getGridInputNumberProps:function(){return{...oo(),...Ni()}},getGridInputProps:function(){return{...zi(),...Ni()}},getGridListBoxProps:function(){return{...Ui(),...Ni()}},getGridMapPickerProps:function(){return{...ao(),...Ni()}},getGridMarkDownProps:function(){return{...Zi(),...Ni()}},getGridNumberRangeProps:function(){return{...Wi(),...Ni()}},getGridRadioProps:function(){return{...Fi(),...Ni()}},getGridRateProps:function(){return{...qi(),...Ni()}},getGridRawProps:function(){return{...Gi(),...Ni()}},getGridSliderProps:function(){return{...Hi(),...Ni()}},getGridSpanProps:function(){return{..._i(),...Ni()}},getGridStepperProps:function(){return{...$i(),...Ni()}},getGridSwitchProps:function(){return{...Ki(),...Ni()}},getGridUploadProps:function(){return{...Xi(),...Ni()}},getHtmlEmits:function(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,customAction:t=>!0}},getHtmlProps:Ji,getInputIpProps:io,getInputNumberProps:oo,getInputProps:zi,getListBoxProps:Ui,getMapPickerProps:ao,getMarkDownEmits:function(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,customAction:t=>!0}},getMarkDownProps:Zi,getNestedRoutePath:Te,getNumberRangeProps:Wi,getOrigin:ve,getOwnRouteContext:De,getRadioProps:Fi,getRateProps:qi,getRawProps:Gi,getSliderProps:Hi,getSpanProps:_i,getStepperProps:$i,getSwitchProps:Ki,getUploadProps:Xi,isEmptyVNode:function(t){if(!Array.isArray(t))return t===ye;return 1===t.length&&t[0]===ye},onRouteChange:function(t,e){const n=ee();if(!n)throw new F(ibiz.i18n.t("vue3Util.util.routeCorrectly"));l(()=>null==n?void 0:n.fullPath,()=>{const i=Te(n,e);t({currentKey:i,fullPath:n.fullPath})},{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(ze(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(ze(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(ze(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const i=ibiz.overlay.createPopover(ze(e),void 0,n);i.present(t.target);return await i.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var i;const a=Pe(t,n);let s=a.pathNodes[e-1].viewName;if(!s)throw new F(ibiz.i18n.t("vue3Util.util.viewIdentifiers",{depth:e}));s===lt.ROUTE_MODAL_TAG&&(s=a.pathNodes[e].viewName);"index"===s&&(s=ibiz.hub.defaultAppIndexViewName);const r=await ibiz.hub.config.view.get(s);if(!r)throw new F(ibiz.i18n.t("vue3Util.util.noFoundView",{viewCodeName:s}));const l={};(null==(i=ibiz.appData)?void 0:i.context)&&Object.assign(l,ibiz.appData.context);a.appContext&&Object.assign(l,a.appContext);if(1!==e)for(let t=0;t<e;t++){const n=a.pathNodes[t];o(n.context)&&Object.assign(l,n.context),t!==e-1||n.context&&!et(n.context.srfnavctrlid)||delete l.srfnavctrlid}const{params:c,srfnav:d}=a.pathNodes[e-1];return{viewConfig:r,context:l,params:c,srfnav:d}},renderString:function(t){if(et(t))return"";if("string"==typeof t)return t;if("object"==typeof t)return JSON.stringify(t);try{return t.toString()}catch(e){ibiz.log.error(t,ibiz.i18n.t("vue3Util.util.convertString"),e)}return""},renderTooltip:Ue,route2routePath:Pe,routePath2string:Ie,shareCommonAncestor:Be,useAutoFocusBlur:function(t,e){return{useInFocusAndBlur:()=>{t.autoFocus||e("blur")},useInValueChange:()=>{t.autoFocus&&e("blur")}}},useClickOutside:pe,useCodeListListen:function(t,e,n){let i;P(async()=>{if(t){const o=await ibiz.hub.getApp(e);i=await o.codeList.getCodeListInstance(t),i&&i.onChange(n)}}),I(()=>{i&&i.offChange(n)})},useControlController:we,useControlPopoverzIndex:function(t){const{zIndex:e}=Le();t.state.zIndex=e.increment(),I(()=>{e.decrement()})},useController:function(t){t.force=ge()},useCtx:fe,useEventListener:Ce,useFilterAttribute:function(t,e,n=["class","style"]){const i={};return Object.keys(t).forEach(o=>{e?e(o)&&(i[o]=t[o]):n.includes(o)||(i[o]=t[o])}),i},useFocusAndBlur:function(t,e){const n=f(),i=f(!1);let o;const a=()=>{i.value||ibiz.log.debug(ibiz.i18n.t("vue3Util.use.focusBlur.noFocus")),e(),o.stop(),i.value=!1};return Ce(n,"click",e=>{i.value||(o=pe(n,()=>{a()}),i.value=!0,t())},{capture:!0}),{componentRef:n,isFocus:i,doBlur:a,pause:()=>{o&&o.pause()},stop:()=>{o&&o.stop()}}},useForce:ge,useForceTogether:function(t,e){const n=e.force,i=ge();e.force=t=>{n(t),i()}},useLocalCacheKey:function(t,e,n,i="@",o=""){const a=ne();return()=>{if(!a)return;const s=t.srfuserid;if(n=t.srfdefaulttoroutedepth||n){const t=Pe(a.currentRoute.value);if(s&&t.pathNodes[n-2]){t.pathNodes=t.pathNodes.slice(0,n-1),t.pathNodes.forEach(t=>{t.context&&delete t.context.srfnavctrlid});const o=Ie(t);return"".concat(e).concat(i).concat(s).concat(i).concat(o)}}return o?"".concat(e).concat(i).concat(s).concat(i).concat(o):void 0}},useMobCtx:function(){return m("ctx")},useNamespace:be,usePopoverVisible:function(t,e){let n;const i=f(!1);return l(()=>t.value,o=>{o&&!n&&(n=U(window,"click",n=>{if(i.value&&t.value){Be(e(t.value),n.target)&&(i.value=!1)}},{capture:!0}))},{immediate:!0}),I(()=>{null==n||n()}),{popoverVisible:i,setPopoverVisible:t=>{i.value=t}}},usePopoverzIndex:function(){const t="popover_".concat(r());return{popoverid:t,setPopoverZIndex:e=>{const{zIndex:n}=Le(),i=document.getElementsByClassName(t),o=n.increment();if(i&&i.length>0&&e)for(let t=0;t<i.length;t++)i[t].style.setProperty(e,"".concat(o))}}},useProps:me,usePropsWatch:function(t,e,n){const i=me();Object.prototype.hasOwnProperty.call(i,t)&&(l(()=>i[t],(t,n)=>{e(ve(t),ve(n))},n),e(ve(i[t]),void 0))},useRouteKey:function(t,e,n){n||(n=f(""));n.value=t.value;const i=new Oe(e);return l(t,(t,e)=>{t!==e&&i.nextChange(()=>{n.value=t})}),n},useRouterQuery:function(){const t=ee(),{query:e}=t;return e},useSemanticNode:We,useViewController:ke,useViewOperation:Me});class he{}function pe(t,e,n={}){let i=j,o=j,a=j;const s=()=>{i(),i=j,o=j,a=j};return l(t,(t,r)=>{if(t!==r)if(et(t))s();else{const s=V((null==t?void 0:t.$el)||t,e,n);i=s.stop,o=s.pause,a=s.proceed}},{immediate:!0}),c(()=>{i!==j&&s()}),{stop:()=>i(),pause:()=>o(),proceed:()=>a()}}function me(){return u().proxy.$props}function ve(t){return p(t)?h(t):t}function ge(){const t=u().proxy;return e=>{t.$forceUpdate(),e&&i(e)&&t.$nextTick(()=>{e()})}}t("AppHooks",he),he.createApp=new e,he.useComponent=new e,he.appResorceInited=new n,he.beforeInitApp=new n,he.authedApp=new n,he.initedApp=new n,he.destoryApp=new n;const ye=t("EmptyVNode",d("EmptyVNode"));function fe(){return m("ctx")}function we(t,e){const n=fe(),i=me();n.evt.emit("onForecast",i.modelData.name);const o=i.provider;let a;a=(null==o?void 0:o.createController)?o.createController(i.modelData,i.context,i.params,n):t(i.modelData,i.context,i.params,n),-1!==st.indexOf(a.model.controlType)&&ibiz.util.record.add(a.ctrlId,a),function(t,e){l(()=>({context:t.context,params:t.params}),(t,n)=>{if(t===n)return;const i={...t};t.context===n.context&&delete i.context,t.params===n.params&&delete i.params,e.updateContextParams(i),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)})}(i,a),function(t,e,n=[]){const i=["context","params","modelData",...n];l(()=>{const e={};return Object.keys(t).forEach(n=>{i.includes(n)||(e[n]=t[n])}),e},(t,n)=>{const i={};Object.keys(t).forEach(e=>{t[e]!==(n||{})[e]&&(i[e]=t[e])}),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.stateChange",{name:e.model.name}),i),Object.keys(i).forEach(t=>{void 0!==i[t]&&(e.state[t]=i[t])})},{immediate:!0})}(i,a,null==e?void 0:e.excludePropsKeys),a.state=v(a.state),g(()=>a.onActivated()),y(()=>a.onDeactivated()),a.force=ge();const s=u().proxy;return a.evt.onAll((t,e)=>{s.$emit(t.slice(2),e)}),s.$emit("controllerAppear",a),a.created(),c(()=>{a.destroyed(),-1!==st.indexOf(a.model.controlType)&&ibiz.util.record.remove(a.ctrlId)}),a}function Ce(t,e,n,i={}){let o=j;return l(t,(t,a)=>{t!==a&&(et(t)?(o(),o=j):o=U((null==t?void 0:t.$el)||t,e,n,i))},{immediate:!0}),c(()=>{o!==j&&o()}),()=>{o()}}function be(t){return new W(t,ibiz.env.namespace)}function Pe(t,e=!1){const n=t.matched.length;let i=t.path;e&&(i=i.replace(new RegExp("/".concat(lt.ROUTE_MODAL_TAG),"g"),""));const o=i.split("/"),a=[];for(let e=1;e<=n;e++){const n=o[2*e],i=t.params["params".concat(e)];let s,r,l;s=i&&i!==ibiz.env.routePlaceholder?oe.parse(i,{strictNullHandling:!0,delimiter:";",depth:8}):void 0,s&&(1===e?(r=s,s=void 0):(s.srfnavctx&&(r=JSON.parse(s.srfnavctx),delete s.srfnavctx),s.srfnav&&(l=s.srfnav,delete s.srfnav))),a.push({viewName:n,context:r,params:s,srfnav:l})}let s;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(s=oe.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:s,pathNodes:a}}function Ie(t){let e="";return t.appContext?e+="/".concat(oe.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach((t,n)=>{e+="/".concat(t.viewName,"/");let i={};if(0===n)o(t.context)&&(i=t.context);else{if(i=o(t.params)?t.params:{},o(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(i.srfnavctx=encodeURIComponent(e))}t.srfnav&&(i.srfnav=t.srfnav)}const a=oe.stringify(i,{delimiter:";",strictNullHandling:!0,skipNulls:!0});o(a)?e+=a:e+=ibiz.env.routePlaceholder}),e}function De(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];if(e.attributekeys){const n=e.attributekeys.split("|");n&&n.length>0&&n.forEach(n=>{nt(t[n])&&(e[n]=t[n])}),delete e.attributekeys}let i=!1;return Object.prototype.hasOwnProperty.call(e,"srfkeepnull")&&(i=!0===e.srfkeepnull||"true"===e.srfkeepnull,delete e.srfkeepnull),Object.keys(e).forEach(t=>{(n.includes(t)||!i&&et(e[t]))&&delete e[t]}),e}function Ee(t,e){let n=-1;e&&e.length>0&&(n=e.findIndex(t=>{var e;return!0===(null==(e=t.context)?void 0:e.srfreadonly)})),t.srfreadonly&&!t.getOwnContext().srfreadonly&&-1===n&&(t.srfreadonly=!0)}const Se=t("excludeViewTypes",[rt.DE_GRID_VIEW,rt.DE_GRID_EXP_VIEW,rt.DE_LIST_VIEW,rt.DE_LIST_EXP_VIEW,rt.DE_DATA_VIEW,rt.DE_DATAVIEW_EXP_VIEW,rt.DE_CALENDAR_VIEW,rt.DE_CALENDAR_EXP_VIEW,rt.DE_CHART_VIEW,rt.DE_CHART_EXP_VIEW,rt.DE_KANBAN_VIEW]);async function xe(t,e,n,i){if(n){const o=await ibiz.hub.getAppDataEntity(n,i);let a=ct(e,o);if(a||(a={path:"",keys:[o.codeName.toLowerCase()]}),a){const n=t.pathNodes[1].context,i={};a.keys.forEach(t=>{e&&Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t],n&&delete n[t])}),t.pathNodes[0].context=i}}else t.pathNodes[0].context=void 0}function Te(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const i=Pe(t);if(i.pathNodes.length<e)return t.path;i.pathNodes.length>e&&(i.pathNodes=i.pathNodes.slice(0,e));const o=i.pathNodes[e-1];return n&&delete o.srfnav,!ibiz.env.isMob&&o.context&&delete o.context.srfnavctrlid,Ie(i)}class Oe{constructor(t,e){this.callbacks=[],this.timers=[],this.wait=500,e&&(this.wait=e),l(()=>t.path,(t,e)=>{if(t!==e){if(this.callbacks.length)for(let t=0;t<this.callbacks.length;t++){(0,this.callbacks[t])()}if(this.callbacks=[],this.timers.length)for(let t=0;t<this.timers.length;t++){const e=this.timers[t];clearTimeout(e)}this.timers=[]}})}nextChange(t){t&&(this.timers.push(setTimeout(()=>{t();const e=this.callbacks.findIndex(e=>e===t);this.callbacks.splice(e,1)},this.wait)),this.callbacks.push(t))}}t("RouteListener",Oe);const Ae=t("withInstall",(t,e)=>(t.install=t=>{e(t)},t));t("hasEmptyPanelRenderer",t=>{const e=null==t?void 0:t.model.controlRenders;return!(!e||0===e.length)&&!!e.find(t=>t.id===ut.EMPTYPANEL)});class Ne{constructor(t,e,n){this.component=t,this.render=e,this.opts=n,this.evt=new a,this.init()}static createVueApp(t,e){throw new F(ibiz.i18n.t("vue3Util.util.noInjected"))}init(){const t=this,{render:e,opts:n}=this,i=document.createElement("div");let o=document.body;ae(null==n?void 0:n.appendTo)&&(o=null==n?void 0:n.appendTo),o.appendChild(i);const a=Ne.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){o.removeChild(i),t.evt.emit("dismiss",t.result)},render:()=>w(t.component,{ref:"root",opts:n,onDismiss(e){t.result=e,a.unmount()}},{default:e})});ibiz.plugin.register(a),a.mount(i),this.vm=a}async present(){return this.modal.present()}async dismiss(t){await this.modal.dismiss(t)}async onWillDismiss(){return new Promise(t=>{const e=n=>{t(n),this.evt.off("dismiss",e)};this.evt.on("dismiss",e)})}}t("OverlayContainer",Ne);function ze(t){return(e,n)=>{const i=C("IBizViewShell");return w(i,{...t,viewShellHooks:n,modal:e})}}t("OverlayPopoverContainer",class extends Ne{present(t){return this.modal.present(t)}});const _e={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class Re{constructor(t,e){this.from=t,this.to=e,this.isActivated=!1,ibiz.log.debug("openRouter: ",t,e)}onWillDismiss(){return this.promise||(this.promise=new Promise(t=>{this.resolve=t})),this.promise.then(t=>(ibiz.log.debug("onWillDismiss: ",this.from,this.to,t),t))}close(t){ibiz.log.debug("closeRouter: ",this.from,this.to,t),this.resolve&&(this.resolve(t),this.resolve=void 0)}active(){ibiz.log.debug("activeRouter: ",this.from,this.to),this.isActivated=!0}destroy(){ibiz.log.debug("destroyRouter: ",this.from,this.to),this.resolve&&(this.resolve({ok:!1}),this.resolve=void 0)}}t("routerCallback",new class{constructor(){this.map=new Map}async open(t,e,n={}){const i=t.currentRoute.value.fullPath;n.replace?t.replace({path:e}):t.push({path:e});const o=e;if(this.map.has(o)){return this.map.get(o).onWillDismiss()}const a=new Re(i,o);return this.map.set(o,a),this.scheduledDestruction(a),a.onWillDismiss()}close(t,e){const n=this.map.get(t);n&&(window.clearTimeout(n.timeout),n.timeout=void 0,n.close(e),this.map.delete(t))}active(t){const e=this.map.get(t);e&&(window.clearTimeout(e.timeout),e.timeout=void 0,e.active())}scheduledDestruction(t){t.timeout=window.setTimeout(()=>{t.timeout=void 0,t.destroy(),this.map.delete(t.to)},6e5)}}),t("useAppStore",de("appStore",()=>({appStore:v({})})));const Le=t("useUIStore",de("uiStore",()=>{const t=function(){const t=f(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}(),e=()=>ibiz.util.theme.getTheme().includes("dark")?"dark":"light",n=v({zIndex:t.zIndex,theme:e()});return ibiz.util.theme.evt.on("onChange",()=>{n.theme=e()}),{UIStore:n,zIndex:t}}));t("piniaInstance",ue());function ke(t){const e=me(),n=m("ctx",void 0);null==n||n.evt.emit("onForecast",e.modelData.name);const i=e.provider;let o;o=(null==i?void 0:i.createController)?i.createController(e.modelData,e.context,e.params,n):t(e.modelData,e.context,e.params,n),ibiz.util.viewStack.add(o.id,o),function(t,e){l(()=>({context:t.context,params:t.params}),t=>{e.context.reset({},t.context),s(e.params),Object.assign(e.params,t.params),e.handleContextParams(),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)})}(e,o),function(t,e){l(()=>t.state?{...t.state}:{},(t,n)=>{const i={};Object.keys(t).forEach(e=>{t[e]!==(n||{})[e]&&(i[e]=t[e])}),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.view.stateChange",{name:e.model.name}),i),Object.keys(i).forEach(t=>{e.state[t]=i[t]})},{immediate:!0})}(e,o),b("ctx",o.ctx),o.state=v(o.state),o.slotProps=v(o.slotProps),e.modal&&(o.modal=e.modal),g(()=>{o.onActivated(),ibiz.util.viewStack.active(o.id)}),y(()=>{o.onDeactivated(),ibiz.util.viewStack.deactivate(o.id)}),o.force=ge();const a=u().proxy;return o.evt.onAll((t,e)=>{a.$emit(t.slice(2),e)}),o.created(),c(()=>{o.destroyed(),ibiz.util.viewStack.remove(o.id)}),o}function Me(t){let e=[];P(()=>{const n=document.getElementById(t.id);n&&(e=["keydown","click"].map(e=>U(n,e,e=>{t.setOperateState("MANUAL")},{once:!0,capture:!0})))}),I(()=>{e&&e.length>0&&e.forEach(t=>{t()})})}function Be(t,e){if(!t||!e)return!1;if(t===e)return!0;const n=new Set;let i=t;for(;i;){n.add(i);const t=i.parentNode;i=!t||"BODY"!==t.nodeName&&"HTML"!==t.nodeName?t:null}for(i=e;i;){if(n.has(i))return!0;i=i.parentNode}return!1}var Ve=t("TooltipPlacement",(t=>(t.TOP="top",t.TOP_START="top-start",t.TOP_END="top-end",t.BOTTOM="bottom",t.BOTTOM_START="bottom-start",t.BOTTOM_END="bottom-end",t.LEFT="left",t.LEFT_START="left-start",t.LEFT_END="left-end",t.RIGHT="right",t.RIGHT_START="right-start",t.RIGHT_END="right-end",t))(Ve||{})),je=t("TooltipTrigger",(t=>(t.HOVER="hover",t.CLICK="click",t.FOCUS="focus",t.CONTEXTMENU="contextmenu",t))(je||{}));function Ue(t,e,n,i="".concat((t=>null==(t=e.id)?void 0:t.toLowerCase())(),"_tooltip")){const o={content:"",disabled:!0,placement:"top"},{controlRenders:a=[],id:s}=e,r="".concat(null==s?void 0:s.toLowerCase(),"_tooltip");let l=a.find(t=>t.id===i);if(l||i===r||(l=a.find(t=>t.id===r)),l)if("LAYOUTPANEL_MODEL"===l.renderType&&l.layoutPanelModel){let i=l.layoutPanelModel;i.includes("return")||(i="return (".concat(i,")")),o.content=ht.execScriptFn({...n.getEventArgs(),data:t,model:e},i,{isAsync:!1}),o.disabled=!1}else"LAYOUTPANEL"===l.renderType&&l.layoutPanel&&(o.content=w(C("IBizControlShell"),{data:t,params:n.params,context:n.context,modelData:l.layoutPanel}),o.disabled=!1);return o}function We(t){var e,n;const i=t.model.controlType,o=t.model.editorType;let a={};const s=null==(e=t.model.controlAttributes)?void 0:e.find(t=>t.attrName===pt.CLASSNAMES);if(s&&s.attrValue)if(i)a=ht.execSingleLine(s.attrValue,{...t.getEventArgs()});else if(o){const e=t;a=ht.execSingleLine(s.attrValue,{...e.ctrl.getEventArgs()})}else{const e=t;a=ht.execSingleLine(s.attrValue,{data:[e.data],value:e.data[e.model.id]})}const r=T();r.classNames&&(a={...a,...r.classNames});let l={};const c=null==(n=t.model.controlAttributes)?void 0:n.find(t=>t.attrName===pt.STYLES);if(c&&c.attrValue)if(i)l=ht.execSingleLine(c.attrValue,{...t.getEventArgs()});else if(o){const e=t;l=ht.execSingleLine(c.attrValue,{...e.ctrl.getEventArgs()})}else{const e=t;l=ht.execSingleLine(c.attrValue,{data:[e.data],value:e.data[e.model.id]})}r.styles&&(l={...l,...r.styles});return{semanticClass:(e,...n)=>{const i=null==a?void 0:a[e];if(void 0!==i)return"string"==typeof i?i:i(t,...n)},semanticStyle:(e,...n)=>{const i=null==l?void 0:l[e];if(void 0!==i){if("string"==typeof i){return i.split(";").reduce((t,e)=>{if(0===e.trim().length)return t;const[n,i]=e.split(":");return t[n.trim()]=i.trim(),t},{})}return i(t,...n)}}}}t("IBizIcon",O({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=be("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const i=x(()=>function(t){if(t){if(t.htmlStr)return A("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")||-1!==t.cssClass.indexOf("theme-icon")?A("i",{class:[e.b(),t.cssClass]},null):A("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return q(t.imagePath)?A("img",{class:e.b(),src:t.imagePath},null):G(t.imagePath)?A("div",{class:[e.b(),e.e("emoji")]},[H(t.imagePath)]):$(t.imagePath)?A("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?A("img",{class:e.b(),src:t.imagePath},null):t.imagePath.startsWith(ibiz.env.assetsUrl)?A("ion-icon",{src:t.imagePath,class:e.b()},null):A("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")||t.imagePath.startsWith(ibiz.env.assetsUrl)?A("img",{class:e.b(),src:t.imagePath},null):A("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return $(t.rawContent)?A("div",{class:e.b(),innerHTML:t.rawContent},null):A("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon));return()=>i.value}})),t("IBizRouterView",O({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:e}){const n={};let i=!0;l(()=>t.manualKey,(t,e)=>{nt(t)&&t!==e&&(i=!0)});return{renderComp:(o,a)=>{if(!i)return n.vNode;if(i=!1,o){const i={...o.props};delete i.onVnodeUnmounted,delete i.ref;const a=w(o.type,{...i,...e,key:t.manualKey});return n.vNode=a,a}}}},render(){return A(C("router-view"),{name:this.name,route:this.route},{default:({Component:t,route:e})=>{const n=this.renderComp(t,e);return this.$slots.default?this.$slots.default({Component:n,route:e}):n}})}})),t("IBizControlBase",O({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=be("control"),{controlType:n,sysCss:i,codeName:o}=t.controller.model,a=n.toLowerCase(),s=null==i?void 0:i.cssName,r=t.controller.model,l=t.controller.model.controls,c=v({});!1===r.controlType.endsWith("EXPBAR")&&(et(r.width)||(r.width>0&&r.width<=1?c.width="".concat(100*r.width,"%"):c.width="".concat(r.width,"px")),et(r.height)||(r.height>0&&r.height<=1?c.width="".concat(100*r.height,"%"):c.height="".concat(r.height,"px")));const d=async(e,n)=>{e.stopPropagation();const i=e.target.getAttribute(n),o=e.target.getAttribute("data"),a=t.controller.context.clone(),s=e.target.getAttribute("context");s&&Object.assign(a,K(s));const r={...t.controller.params},l=e.target.getAttribute("params");l&&Object.assign(r,K(l)),i&&await ht.asyncExecScriptFn({...t.controller.getEventArgs(),context:a,params:r,data:o?K(o):null},i)},u=x(()=>(n=>{var i;let o=r.controlRenders?r.controlRenders.filter(t=>!Object.values(ut).includes(t.id)&&"LAYOUTPANEL_MODEL"===t.renderType):void 0;if(o&&o.length>0&&"DASHBOARD"===r.controlType&&(o=o.filter(t=>!(t.id.endsWith("_header")||t.id.endsWith("_header_caption")||t.id.endsWith("_header_bg")||t.id.endsWith("_header_action")))),!o||0===o.length)return;const a=o[0];if(a.layoutPanelModel){const o=ht.execScriptFn({...t.controller.getEventArgs(),data:n},a.layoutPanelModel,{isAsync:!1});return A("div",{innerHTML:o,onClick:t=>d(t,"click"),onDblclick:t=>d(t,"dbclick"),class:[e.e("control-render"),e.e(null==(i=a.renderName)?void 0:i.toLowerCase())]},null)}})(t.controller.data||t.controller.items));return{ns:e,typeClass:a,sysCssName:s,inlineStyle:c,codeName:o,controls:l,customRender:u,disableMaskInfoRender:()=>{const n=r.controlRenders?r.controlRenders.find(t=>t.id===ut.DISABLEPANEL):void 0;if(!n)return A("div",{innerHTML:t.controller.state.maskOption.maskInfo||"",class:[e.e("disable-mask-text")]},null);if("LAYOUTPANEL_MODEL"===n.renderType&&n.layoutPanelModel){const i=ht.execScriptFn({...t.controller.getEventArgs()},n.layoutPanelModel,{isAsync:!1,singleRowReturn:!0});return A("div",{innerHTML:i,class:[e.e("disable-mask-text")]},null)}return"LAYOUTPANEL"===n.renderType&&n.layoutPanel?A(C("iBizControlShell"),{class:[e.e("disable-mask-text")],data:{},params:t.controller.params,context:t.controller.context,modelData:n.layoutPanel},null):void 0},onLayoutPanelCreated:e=>{t.controller.setLayoutPanel(e)}}},render(){var t,e,n;const{state:i,controlPanel:o,providers:a}=this.controller;let s=null;if(i.isCreated&&o){const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach(t=>{const n=t.name,i={context:this.controller.context,params:this.controller.params},o=e[n];e[n]=o?()=>o(i):()=>{const e=C("IBizControlShell");return w(e,{modelData:t,...i})}});const n=a[o.name];s=w(C(n.component),{modelData:o,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return A("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName,this.ns.is("disabled",i.disabled),this.ns.is("mob",ibiz.env.isMob)],style:this.inlineStyle},[this.customRender||s||(null==(n=(e=this.$slots).default)?void 0:n.call(e)),i.disabled&&A("div",{class:[this.ns.e("mask-container"),this.ns.m(i.maskOption.mode.toLowerCase())]},["MASK"===i.maskOption.mode&&this.disableMaskInfoRender()])])}})),t("IBizControlShell",O({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){const e=m("ctx");if(e)e.evt.emit("onForecast",t.modelData.name);else{const t={name:"AppView",id:"AppView",viewType:rt.DE_CUSTOM_VIEW,appId:ibiz.env.appId};b("ctx",new mt(t,X.create({})).ctx)}const n=f(!1),i=f(""),o=f();vt(t.modelData).then(t=>{t?o.value=t:i.value=ibiz.i18n.t("vue3Util.common.onFoundCorrespondingPart"),n.value=!0}).catch(t=>{ibiz.log.error(t),i.value=t.message,n.value=!0});return{ns:be("control-shell"),isComplete:n,errMsg:i,provider:o}},render(){return this.isComplete&&this.provider?w(C(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):N(A("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[z("loading"),!this.isComplete]])}})),t("IBizViewShell",O({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String},ctx:{type:Object},viewShellHooks:{type:Object}},setup(t,{attrs:e}){const n=be("view-shell"),i=f(!1),o=f(""),a=f(),s=f(),c=f(!0);t.ctx&&b("ctx",t.ctx);const d=f(t.context),u=f(t.params||{});let h="";l(()=>({context:t.context,params:t.params}),t=>{d.value=t.context,u.value=t.params?t.params:{}});let p;const m=t=>{const e=it(t);return e.srfdatatype&&delete e.srfdatatype,JSON.stringify(e)},v=async()=>{try{if(await(async()=>{p=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId)})(),!p)throw new F(ibiz.i18n.t("vue3Util.common.noFoundViewModel"));if(c.value=await(async t=>{let e=!0;const{accessKey:n}=t;let{accUserMode:i}=t;const o=ibiz.auth.getAuthInfo();switch((et(i)||0===i)&&(i=ibiz.config.view.viewAccUserMode),i){case 1:o&&!o.isAnonymous&&(e=!1);break;case 2:(!o||o&&o.isAnonymous)&&(e=!1);break;case 4:o&&!o.isAnonymous&&n&&(await ibiz.hub.getApp(d.value.srfappid)).authority.calcByResCode(n)||(e=!1)}return e})(p),!c.value)return;if(1===p.dynaSysMode){const t=p.appDataEntityId;if(!t)throw new F(ibiz.i18n.t("vue3Util.common.noSupportLoadingDynamic",{codeName:p.codeName}));const e=await yt(t,d.value,{viewParams:u.value,appId:p.appId});if(u.value.srfdatatype&&(e.srfdatatype=u.value.srfdatatype),u.value.srfwftag)e.srfwftag=u.value.srfwftag;else if(t&&p.enableWF&&e.srfkey){const n=et(d.value.srfsessionid)||ot(d.value.srfsessionid),i=r();if(n){const e=ibiz.uiDomainManager.create(i,t);d.value.srfsessionid=e.id}const o=ibiz.hub.getApp(p.appId);d.value.srfappid||(d.value.srfappid=p.appId);const a=await o.deService.getService(d.value,t),s=await a.get(d.value,u.value||{});if(s.ok&&s.data){const{srfwftag:t,processdefinitionkey:n,taskdefinitionkey:i}=s.data;t&&(e.srfwftag=t),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW","DEMOBWFDYNAEDITVIEW3","DEMOBWFDYNAEDITVIEW"].includes(p.viewType)&&(et(u.value.processDefinitionKey)&&(u.value.processDefinitionKey=n),et(u.value.taskDefinitionKey)&&(u.value.taskDefinitionKey=i))}n&&(ibiz.uiDomainManager.destroy(i),d.value.srfsessionid="")}if(m(e)===h)return void setTimeout(()=>{i.value=!0});s.value=await ibiz.hub.loadAppView(p.appId,p.id,e),h=m(e)}else s.value=p;a.value=await ft(p)}catch(t){ibiz.log.error(t),o.value=t.message}finally{i.value=!0}};v();return{ns:n,errMsg:o,provider:a,isComplete:i,hasAuthority:c,viewModelData:s,redrawView:async t=>{i.value=!1;const{redrawData:n}=t,{isReloadModel:o}=n;Object.assign(d.value,n.context),Object.assign(u.value,n.params);const a=e.modal;a&&(a.hooks.preDismiss.clear(),a.hooks.shouldDismiss.clear(),a.hooks.beforeDismiss.clear()),o?await v():setTimeout(()=>{i.value=!0})},onCreated:e=>{t.viewShellHooks&&t.viewShellHooks.hooks.viewCreated.call(e)},curContext:d,curParams:u}},render(){if(this.isComplete&&this.provider&&this.hasAuthority)return w(C(this.provider.component),{context:this.curContext,params:this.curParams,modelData:it(this.viewModelData),...this.$attrs,provider:this.provider,onRedrawView:this.redrawView,onCreated:this.onCreated},this.$slots);if(!this.hasAuthority){const t=gt("403");if(t)return"string"==typeof t.component?w(C(t.component)):w(t.component)}return N(A("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[z("loading"),!this.isComplete]])}})),t("IBizCodeList",O({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]},convertToCodeItemText:{type:Boolean,default:!0},valueFormat:{type:String},unitName:{type:String},showMode:{type:String,default:"DEFAULT"}},emits:{infoTextChange:t=>!0},setup(t,{emit:e}){var n,i;const o=be("code-list"),a=f([]),s=(null==(n=t.codeList)?void 0:n.textSeparator)||"、",r=(null==(i=t.codeList)?void 0:i.valueSeparator)||",",c=x(()=>t.codeList&&t.codeList.orMode?t.codeList.orMode:"STR"),d=wt(c.value);l(a,t=>{let n="";t.length>0&&(n=t.map(t=>t.text).join(s)),e("infoTextChange",n)});const u=(e,n)=>{if(e){const{thresholdGroup:i}=t.codeList;if(i&&se(Number(n))){const t=Ct(e,Number(n));if(t)return t}const o=e.find(t=>t.value==n);if(o)return o;for(let t=0;t<e.length;t++){const i=u(e[t].children,n);if(i)return i}}};l([()=>t.codeListItems,()=>t.value],([e,n],[i,o])=>{if(et(n)||""===n)a.value=[];else{let i=[];const{getSelectArray:o}=d,s=o(n,t.codeList,e,r,t.codeList.codeItemValueNumber);s&&(i=s),a.value=i.map(n=>{const i=u(e,n);let o=n;if(t.convertToCodeItemText&&(null==i?void 0:i.text))o=i.text;else{const{valueFormat:e,unitName:n}=t;e&&(o=ibiz.util.text.format("".concat(o),e)),n&&(o+=n)}return{text:o,color:null==i?void 0:i.color,textCls:null==i?void 0:i.textCls,sysImage:null==i?void 0:i.sysImage}})}},{immediate:!0});const h=t.codeList.emptyText!==ibiz.i18n.t("vue3Util.common.undefined")&&t.codeList.emptyText?t.codeList.emptyText:ibiz.config.common.emptyText;return{items:a,ns:o,emptyText:h,textSeparator:s}},render(){return A("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map((t,e)=>[0!==e?this.textSeparator:null,A("span",{class:[this.ns.e("item"),t.textCls?t.textCls:null],style:t.color?this.ns.cssVarBlock({"item-color":"".concat(t.color)}):null},["TEXT"!==this.showMode&&t.sysImage&&A(C("iBizIcon"),{icon:t.sysImage},null),"ICON"!==this.showMode&&t.text])])])}})),t("ControlLoadingPlaceholder",O({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(m("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null})),t("IBizBadge",O({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"},max:{type:Number},counterMode:{type:Number}},setup:t=>({ns:be("badge"),maxValue:x(()=>t.max?t.max:ibiz.config.common.counterMaxValue)}),render(){if((this.value||0===this.value)&&!(1===this.counterMode&&this.value<=0))return A("div",{class:[this.ns.b(),this.ns.m(this.type),this.ns.is("mob",ibiz.env.isMob)]},[this.value>this.maxValue?"".concat(this.maxValue,"+"):this.value])}})),t("IBizCustomRender",O({name:"IBizCustomRender",props:{controller:{type:Object,required:!0}},setup(t){const e=be("custom-render"),n=async(e,n)=>{e.stopPropagation();const i=e.target.getAttribute(n),o=e.target.getAttribute("data"),a=t.controller.context.clone(),s=e.target.getAttribute("context");s&&Object.assign(a,K(s));const r={...t.controller.params},l=e.target.getAttribute("params");l&&Object.assign(r,K(l)),i&&await ht.asyncExecScriptFn({...t.controller.getEventArgs(),context:a,params:r,data:o?K(o):null},i)};return{ns:e,getControlRender:()=>{var i,o,a;const s=null==(i=t.controller)?void 0:i.model.controlRenders;if(!s||0===s.length)return;const r=s.find(t=>t.id===ut.EMPTYPANEL);if(r){if("LAYOUTPANEL_MODEL"===r.renderType&&r.layoutPanelModel){const i=ht.execScriptFn({...t.controller.getEventArgs()},r.layoutPanelModel,{isAsync:!1});return A("div",{innerHTML:i,onClick:t=>n(t,"click"),onDblclick:t=>n(t,"dbclick"),class:[e.b(),e.e(null==(o=r.renderName)?void 0:o.toLowerCase())]},null)}return"LAYOUTPANEL"===r.renderType&&r.layoutPanel?A(C("iBizControlShell"),{class:[e.b(),e.e(null==(a=r.renderName)?void 0:a.toLowerCase())],params:t.controller.params,context:t.controller.context,modelData:r.layoutPanel},null):void 0}}}},render(){return this.getControlRender()}}));class Fe{constructor(t,e,n,i){if(Number.isNaN(t)||Number.isNaN(e))throw new Error(ibiz.i18n.t("vue3Util.common.invalidPointCoordinates",{x:t,y:e}));this.x=+t,this.y=+e,this.pressure=n||0,this.time=i||Date.now()}distanceTo(t){return Math.sqrt((this.x-t.x)**2+(this.y-t.y)**2)}equals(t){return this.x===t.x&&this.y===t.y&&this.pressure===t.pressure&&this.time===t.time}velocityFrom(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):0}}class qe{constructor(t,e,n,i,o,a){this.startPoint=t,this.control2=e,this.control1=n,this.endPoint=i,this.startWidth=o,this.endWidth=a}static fromPoints(t,e){const n=this.calculateControlPoints(t[0],t[1],t[2]).c2,i=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new qe(t[1],n,i,t[2],e.start,e.end)}static calculateControlPoints(t,e,n){const i=t.x-e.x,o=t.y-e.y,a=e.x-n.x,s=e.y-n.y,r=(t.x+e.x)/2,l=(t.y+e.y)/2,c=(e.x+n.x)/2,d=(e.y+n.y)/2,u=Math.sqrt(i*i+o*o),h=Math.sqrt(a*a+s*s),p=u+h===0?0:h/(u+h),m=c+(r-c)*p,v=d+(l-d)*p,g=e.x-m,y=e.y-v;return{c1:new Fe(r+g,l+y),c2:new Fe(c+g,d+y)}}length(){let t,e,n=0;for(let i=0;i<=10;i+=1){const o=i/10,a=this.point(o,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),s=this.point(o,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(i>0){const i=a-t,o=s-e;n+=Math.sqrt(i*i+o*o)}t=a,e=s}return n}point(t,e,n,i,o){return e*(1-t)*(1-t)*(1-t)+3*n*(1-t)*(1-t)*t+3*i*(1-t)*t*t+o*t*t*t}}class Ge{constructor(t,e={}){var n,i,o;this.canvas=t,this._drawingStroke=!1,this._isEmpty=!0,this._isRedrawn=!1,this._oldFromDataURL="",this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this.velocityFilterWeight=e.velocityFilterWeight||.7,this.minWidth=e.minWidth||2,this.maxWidth=e.maxWidth||2,this.throttle=null!=(n=e.throttle)?n:16,this.minDistance=null!=(i=e.minDistance)?i:5,this.dotSize=e.dotSize||0,this.penColor=e.penColor||"black",this.backgroundColor=e.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=e.compositeOperation||"source-over",this.canvasContextOptions=null!=(o=e.canvasContextOptions)?o:{},this._strokeMoveUpdate=this.throttle?re(Ge.prototype._strokeUpdate,this.throttle):Ge.prototype._strokeUpdate,this._handleMouseDown=this._handleMouseDown.bind(this),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handlePointerDown=this._handlePointerDown.bind(this),this._handlePointerMove=this._handlePointerMove.bind(this),this._handlePointerUp=this._handlePointerUp.bind(this),this._ctx=t.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:t,canvas:e}=this;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0,this._strokePointerId=void 0,this._oldFromDataURL=""}async fromDataURL(t,e={}){let n=t;return se(e.rotation)&&0!==e.rotation&&(n=await this.rotateDataURL(n,e.rotation,"image/png")),new Promise((t,i)=>{const o=new Image,a=e.ratio||window.devicePixelRatio||1,s=e.width||this.canvas.width/a,r=e.height||this.canvas.height/a,l=e.xOffset||0,c=e.yOffset||0;this._reset(this._getPointGroupOptions()),o.onload=()=>{this._ctx.drawImage(o,l,c,s,r),t()},o.onerror=t=>{i(t)},o.crossOrigin="anonymous",o.src=n,this._oldFromDataURL=n,this._isEmpty=!1})}rotateDataURL(t,e=0,n="image/png",i){return new Promise((o,a)=>{const s=new Image;s.onload=()=>{const t=e*Math.PI/180,a=s.width,r=s.height,l=document.createElement("canvas"),c=l.getContext("2d");e%180==0?(l.width=a,l.height=r):(l.width=r,l.height=a),c.translate(l.width/2,l.height/2),c.rotate(t),c.drawImage(s,-a/2,-r/2),o(l.toDataURL(n,i))},s.onerror=a,s.crossOrigin="anonymous",s.src=t})}undoLastStep(){const t=[...this._data],e=this._oldFromDataURL;this.clear(),this._isRedrawn=!0,0!==t.length?(t.pop(),this.fromDataURL(e),this.fromData(t,{clear:!1}),this._isEmpty=t.length<=0):this._oldFromDataURL=""}getCurrentOrientation(){const{screen:t}=window,e=t.orientation||t.mozOrientation||t.msOrientation;let n=0;e&&(n=e.angle);const i=window.innerWidth>window.innerHeight;return{isLandscape:i,status:i?"横屏":"竖屏",angle:n,orientation:{0:"DEFAULT",90:"Rotated right","-90":"Rotated left",180:"Upside down"}["".concat(n)]||"未知 (".concat(n,"°)")}}toDataURL(t="image/png",e={}){return"image/svg+xml"===t?(le(null==e?void 0:e.encoderOptions)&&(e.encoderOptions=void 0),"data:image/svg+xml;base64,".concat(btoa(this.toSVG(null==e?void 0:e.encoderOptions)))):this.toCanvasDataURL(t,e.encoderOptions,e.rotation)}toCanvasDataURL(t="image/png",e,n){if("number"!=typeof e&&(e=void 0),se(n)&&0!==n){const i=n*Math.PI/180,o=document.createElement("canvas"),a=o.getContext("2d"),s=this.canvas.width,r=this.canvas.height;return n%180==0?(o.width=s,o.height=r):(o.width=r,o.height=s),a.translate(o.width/2,o.height/2),a.rotate(i),a.drawImage(this.canvas,-s/2,-r/2),o.toDataURL(t,e)}return this.canvas.toDataURL(t,e)}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";const t=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!t?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){var t;const e=window.document===this.canvas.ownerDocument?window:null!=(t=this.canvas.ownerDocument.defaultView)?t:this.canvas.ownerDocument;return{addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}_removeMoveUpEventListeners(){const{removeEventListener:t}=this._getListenerFunctions();t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp),t("mousemove",this._handleMouseMove),t("mouseup",this._handleMouseUp),t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}isRedrawn(){return this._isRedrawn}fromData(t,{clear:e=!0}={}){e&&this.clear(),this._fromData(t,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(t)}toData(){return this._data}_isLeftButtonPressed(t,e){return e?1===t.buttons:!(1&~t.buttons)}_pointerEventToSignatureEvent(t){return{event:t,type:t.type,x:t.clientX,y:t.clientY,pressure:"pressure"in t?t.pressure:0}}_touchEventToSignatureEvent(t){const e=t.changedTouches[0];return{event:t,type:t.type,x:e.clientX,y:e.clientY,pressure:e.force}}_handleMouseDown(t){this._isLeftButtonPressed(t,!0)&&!this._drawingStroke&&this._strokeBegin(this._pointerEventToSignatureEvent(t))}_handleMouseMove(t){this._isLeftButtonPressed(t,!0)&&this._drawingStroke?this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t)):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1)}_handleMouseUp(t){this._isLeftButtonPressed(t)||this._strokeEnd(this._pointerEventToSignatureEvent(t))}_handleTouchStart(t){1!==t.targetTouches.length||this._drawingStroke||(t.cancelable&&t.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(t)))}_handleTouchMove(t){1===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._drawingStroke?this._strokeMoveUpdate(this._touchEventToSignatureEvent(t)):this._strokeEnd(this._touchEventToSignatureEvent(t),!1))}_handleTouchEnd(t){0===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(t)))}_getPointerId(t){return(null==t?void 0:t.persistentDeviceId)||t.pointerId}_allowPointerId(t,e=!1){return void 0===this._strokePointerId?e:this._getPointerId(t)===this._strokePointerId}_handlePointerDown(t){!this._drawingStroke&&this._isLeftButtonPressed(t)&&this._allowPointerId(t,!0)&&(this._strokePointerId=this._getPointerId(t),t.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(t)))}_handlePointerMove(t){this._allowPointerId(t)&&(this._isLeftButtonPressed(t,!0)&&this._drawingStroke?(t.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t))):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1))}_handlePointerUp(t){!this._isLeftButtonPressed(t)&&this._allowPointerId(t)&&(t.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(t)))}_getPointGroupOptions(t){return{penColor:t&&"penColor"in t?t.penColor:this.penColor,dotSize:t&&"dotSize"in t?t.dotSize:this.dotSize,minWidth:t&&"minWidth"in t?t.minWidth:this.minWidth,maxWidth:t&&"maxWidth"in t?t.maxWidth:this.maxWidth,velocityFilterWeight:t&&"velocityFilterWeight"in t?t.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:t&&"compositeOperation"in t?t.compositeOperation:this.compositeOperation}}_strokeBegin(t){const{addEventListener:e}=this._getListenerFunctions();switch(t.event.type){case"mousedown":e("mousemove",this._handleMouseMove,{passive:!1}),e("mouseup",this._handleMouseUp,{passive:!1});break;case"touchstart":e("touchmove",this._handleTouchMove,{passive:!1}),e("touchend",this._handleTouchEnd,{passive:!1});break;case"pointerdown":e("pointermove",this._handlePointerMove,{passive:!1}),e("pointerup",this._handlePointerUp,{passive:!1})}this._drawingStroke=!0;const n=this._getPointGroupOptions(),i={...n,points:[]};this._data.push(i),this._reset(n),this._strokeUpdate(t)}_strokeUpdate(t){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(t);const e=this._createPoint(t.x,t.y,t.pressure),n=this._data[this._data.length-1],i=n.points,o=i.length>0&&i[i.length-1],a=!!o&&e.distanceTo(o)<=this.minDistance,s=this._getPointGroupOptions(n);if(!o||!o||!a){const t=this._addPoint(e,s);o?t&&this._drawCurve(t,s):this._drawDot(e,s),i.push({time:e.time,x:e.x,y:e.y,pressure:e.pressure})}}_strokeEnd(t,e=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(e&&this._strokeUpdate(t),this._drawingStroke=!1,this._strokePointerId=void 0)}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown,{passive:!1})}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown,{passive:!1})}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart,{passive:!1})}_reset(t){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(t.minWidth+t.maxWidth)/2,this._ctx.fillStyle=t.penColor,this._ctx.globalCompositeOperation=t.compositeOperation}_createPoint(t,e,n){const i=this.canvas.getBoundingClientRect();return new Fe(t-i.left,e-i.top,n,(new Date).getTime())}_addPoint(t,e){const{_lastPoints:n}=this;if(n.push(t),n.length>2){3===n.length&&n.unshift(n[0]);const t=this._calculateCurveWidths(n[1],n[2],e),i=qe.fromPoints(n,t);return n.shift(),i}return null}_calculateCurveWidths(t,e,n){const i=n.velocityFilterWeight*e.velocityFrom(t)+(1-n.velocityFilterWeight)*this._lastVelocity,o=this._strokeWidth(i,n),a={end:o,start:this._lastWidth};return this._lastVelocity=i,this._lastWidth=o,a}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,n){const i=this._ctx;i.moveTo(t,e),i.arc(t,e,n,0,2*Math.PI,!1),this._isEmpty=!1,this._isRedrawn=!0}_drawCurve(t,e){const n=this._ctx,i=t.endWidth-t.startWidth,o=2*Math.ceil(t.length());n.beginPath(),n.fillStyle=e.penColor;for(let n=0;n<o;n+=1){const a=n/o,s=a*a,r=s*a,l=1-a,c=l*l,d=c*l;let u=d*t.startPoint.x;u+=3*c*a*t.control1.x,u+=3*l*s*t.control2.x,u+=r*t.endPoint.x;let h=d*t.startPoint.y;h+=3*c*a*t.control1.y,h+=3*l*s*t.control2.y,h+=r*t.endPoint.y;const p=Math.min(t.startWidth+r*i,e.maxWidth);this._drawCurveSegment(u,h,p)}n.closePath(),n.fill()}_drawDot(t,e){const n=this._ctx,i=e.dotSize>0?e.dotSize:(e.minWidth+e.maxWidth)/2;n.beginPath(),this._drawCurveSegment(t.x,t.y,i),n.closePath(),n.fillStyle=e.penColor,n.fill()}_fromData(t,e,n){for(const i of t){const{points:t}=i,o=this._getPointGroupOptions(i);if(t.length>1)for(let n=0;n<t.length;n+=1){const i=t[n],a=new Fe(i.x,i.y,i.pressure,i.time);0===n&&this._reset(o);const s=this._addPoint(a,o);s&&e(s,o)}else this._reset(o),n(t[0],o)}}toSVG({includeBackgroundColor:t=!1}={}){const e=this._data,n=Math.max(window.devicePixelRatio||1,1),i=this.canvas.width/n,o=this.canvas.height/n,a=document.createElementNS("http://www.w3.org/2000/svg","svg");if(a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),a.setAttribute("viewBox","".concat(0," ").concat(0," ").concat(i," ").concat(o)),a.setAttribute("width",i.toString()),a.setAttribute("height",o.toString()),t&&this.backgroundColor){const t=document.createElement("rect");t.setAttribute("width","100%"),t.setAttribute("height","100%"),t.setAttribute("fill",this.backgroundColor),a.appendChild(t)}return this._fromData(e,(t,{penColor:e})=>{const n=document.createElement("path");if(!(Number.isNaN(t.control1.x)||Number.isNaN(t.control1.y)||Number.isNaN(t.control2.x)||Number.isNaN(t.control2.y))){const i="M ".concat(t.startPoint.x.toFixed(3),",").concat(t.startPoint.y.toFixed(3)," ")+"C ".concat(t.control1.x.toFixed(3),",").concat(t.control1.y.toFixed(3)," ")+"".concat(t.control2.x.toFixed(3),",").concat(t.control2.y.toFixed(3)," ")+"".concat(t.endPoint.x.toFixed(3),",").concat(t.endPoint.y.toFixed(3));n.setAttribute("d",i),n.setAttribute("stroke-width",(2.25*t.endWidth).toFixed(3)),n.setAttribute("stroke",e),n.setAttribute("fill","none"),n.setAttribute("stroke-linecap","round"),a.appendChild(n)}},(t,{penColor:e,dotSize:n,minWidth:i,maxWidth:o})=>{const s=document.createElement("circle"),r=n>0?n:(i+o)/2;s.setAttribute("r",r.toString()),s.setAttribute("cx",t.x.toString()),s.setAttribute("cy",t.y.toString()),s.setAttribute("fill",e),a.appendChild(s)}),a.outerHTML}blobToDataURL(t){return new Promise((e,n)=>{const i=new FileReader;i.onload=()=>{e(i.result)},i.onerror=()=>{n(new Error("无法转换Blob为DataURL"))},i.readAsDataURL(t)})}loadImage(t,e){const n=new Image;n.onload=()=>e(),n.onerror=()=>e,n.src=t}}t("IBizSignaturePad",O({name:"IBizSignaturePad",props:{options:{type:Object}},setup(t){const e=be("signature-pad"),n=f(),i=f(),o=f(),a=()=>{const e={};if(t.options){const{dotsize:n,minwidth:i,maxwidth:o,pencolor:a,velocityfilterweight:s,compositeoperation:r,mindistance:l,backgroundcolor:c,throttle:d,canvascontextoptions:u}=t.options;if(n&&Object.assign(e,{dotSize:Number(n)}),i&&Object.assign(e,{minWidth:Number(i)}),o&&Object.assign(e,{maxWidth:Number(o)}),s&&Object.assign(e,{velocityFilterWeight:Number(s)}),l&&Object.assign(e,{minDistance:Number(l)}),d&&Object.assign(e,{throttle:Number(d)}),a&&Object.assign(e,{penColor:String(a)}),r&&Object.assign(e,{compositeOperation:String(r)}),c&&Object.assign(e,{backgroundColor:String(c)}),u){let t=u;if(ce(u))try{t=JSON.parse(u)}catch(e){ibiz.log.error(e),t=void 0}Object.assign(e,{canvasContextOptions:{...t}})}}return e},s=t=>{t.preventDefault()},r=t=>{_(()=>{const e=i.value,r=n.value;if(!e)return;const l=window.devicePixelRatio||1,c=r.getBoundingClientRect(),d=c.width<300?300:c.width,u=c.height<150?150:c.height;e.width=d*l,e.height=u*l,e.style.width="".concat(d,"px"),e.style.height="".concat(u,"px"),o.value=new Ge(e,{...a()});e.getContext("2d").scale(l,l),e.addEventListener("touchstart",s,{passive:!1}),e.addEventListener("touchmove",s,{passive:!1}),null==t||t()})},l=t=>r(t),c=()=>{o.value&&(o.value.off(),l())};return P(()=>{r(),window.addEventListener("resize",c)}),I(()=>{window.removeEventListener("resize",c)}),{ns:e,canvasRef:i,signaturePadRef:n,signaturePad:o,updateSignaturePad:l}},render(){return A("div",{class:this.ns.b(),ref:"signaturePadRef"},[A("div",{class:this.ns.e("container")},[A("canvas",{ref:"canvasRef"},null)])])}}));function He(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)}const $e=O({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:bt,required:!0}},setup(t){const e=be("panel-container"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller),a=x(()=>{let i=[e.b(),e.m(n)];return i=[...i,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],i});return{ns:e,classArr:a,semanticClass:i,semanticStyle:o}},render(){var t,e,n;let i;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=A(C("iBizRow"),{slot:"content",class:this.semanticClass("content"),style:this.semanticStyle("content"),layout:this.modelData.layout},He(i=o.map(t=>{const e=t.props;return e&&e.controller?A(C("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state,class:this.semanticClass("item",{props:e}),style:this.semanticStyle("item",{props:e})},He(t)?t:{default:()=>[t]}):t}))?i:{default:()=>[i]}),s=null==(n=this.$attrs)?void 0:n.attrs;if(s&&s.dynamictooltip){const t={...s.dynamictooltip};return delete t.content,A(C("el-tooltip"),R({placement:"right","popper-class":this.ns.e("dynamic-tooltip")},t),{default:()=>A("div",R({class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),onClick:()=>{this.controller.onClick()}},this.$attrs),[this.controller.model.cssStyle?A("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a]),content:()=>A("div",{class:[this.ns.e("dynamic-tooltip-content"),this.semanticClass("tooltip")],style:this.semanticStyle("tooltip"),innerHTML:s.dynamictooltip.content},null)})}return N(A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),"element-loading-text":this.controller.state.loadingText,onClick:t=>this.controller.onClick(t)},[this.controller.model.cssStyle?A("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a]),[[z("loading"),this.controller.state.loading]])}});class Ke{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const i=new bt(t,e,n);return await i.init(),i}}t("IBizPanelContainer",Ae($e,function(t){t.component($e.name,$e),Pt("CONTAINER",()=>new Ke),Pt("CONTAINER_DEFAULT",()=>new Ke)}));const Xe=O({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=be("panel-ctrl-pos"),{semanticClass:n,semanticStyle:i}=We(t.controller);return m("ctx").evt.on("onRegister",(e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}),{ns:e,semanticClass:n,semanticStyle:i}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),A("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),this.semanticClass("root"),...this.controller.containerClass,this.ns.is("hidden",!t.visible)],style:this.semanticStyle("root")},[e||(ibiz.env.dev?ibiz.i18n.t("vue3Util.panelComponent.noProvidedSlot",{id:this.modelData.id}):"")])}});class Qe extends It{bindControl(t){this.control=t,t.evt.onAll((t,e)=>{this.panel.evt.emit("onControlEvent",{triggerControlName:this.model.id,triggerEventName:t,triggerEvent:e})})}}t("PanelCtrlPosController",Qe);class Ye{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const i=new Qe(t,e,n);return await i.init(),i}}t("IBizPanelCtrlPos",Ae(Xe,function(t){t.component(Xe.name,Xe),Pt("CTRLPOS",()=>new Ye)}));class Je extends bt{}function Ze(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)}t("ScrollContainerItemController",Je);const tn=t("ScrollContainerItem",O({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:Je,required:!0}},setup(t){const e=be("scroll-container-item"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller),a=x(()=>[e.b(),e.m(n),e.is("hidden",!t.controller.state.visible)]);return{ns:e,classArr:a,semanticClass:i,semanticStyle:o}},render(){var t,e;let n;const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return N(A(C("iBizRow"),{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),layout:{layout:"FLEX"},"element-loading-text":this.controller.state.loadingText},Ze(n=i.map(t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",A(C("iBizCol"),{class:this.semanticClass("item",{props:e}),style:this.semanticStyle("item",{props:e}),layoutPos:e.modelData.layoutPos,state:e.controller.state},Ze(t)?t:{default:()=>[t]})):t}))?n:{default:()=>[n]}),[[z("loading"),this.controller.state.loading]])}}));class en{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const i=new Je(t,e,n);return await i.init(),i}}class nn extends bt{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",nn);const on=t("ScrollContainer",O({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:nn,required:!0}},setup(t){const e=be("scroll-container"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller),a=x(()=>[e.b(),e.m(n),...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)]);return{ns:e,classArr:a,semanticClass:i,semanticStyle:o}},render(){var t,e;let n=null,i=null,o=null,a=null,s=null;const r={};((null==(e=(t=this.$slots).default)?void 0:e.call(t))||[]).forEach(t=>{const e=t.props;if(!e||!e.controller)return;const{width:l,height:c}=e.controller.state.layout;switch(e.modelData.layoutPos.layoutPos){case"WEST":n=t,r.left={width:l};break;case"EAST":o=t,r.right={width:l};break;case"NORTH":i=t,r.top={height:c};break;case"SOUTH":a=t,r.bottom={height:c};break;case"CENTER":s=t;break;default:ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.unadaptedLayout",{layoutPos:e.modelData.layoutPos.layoutPos}))}});for(const t in r)(r[t].width||r[t].height)&&(r[t].flexShrink=0);return N(A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),"element-loading-text":this.controller.state.loadingText},[A("div",{class:[this.ns.e("header"),this.semanticClass("header")],style:[r.top,this.semanticStyle("header")]},[i]),A("div",{class:[this.ns.b("content"),this.semanticClass("content")],style:this.semanticStyle("content")},[A("div",{class:[this.ns.be("content","left"),this.semanticClass("left")],style:[r.left,this.semanticStyle("left")]},[n]),A("div",{class:[this.ns.be("content","center"),this.semanticClass("center")],style:this.semanticStyle("center")},[s]),A("div",{class:[this.ns.be("content","right"),this.semanticClass("right")],style:[r.right,this.semanticStyle("right")]},[o])]),A("div",{class:[this.ns.e("footer"),this.semanticClass("footer")],style:[r.bottom,this.semanticStyle("footer")]},[a])]),[[z("loading"),this.controller.state.loading]])}}));class an{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const i=new nn(t,e,n);return await i.init(),i}}t("IBizScrollContainer",Ae(on,function(t){t.component(on.name,on),t.component(tn.name,tn),Pt("CONTAINER_CONTAINER_SCROLL",()=>new an),Pt("CONTAINER_CONTAINER_SCROLL_LEFT",()=>new en),Pt("CONTAINER_CONTAINER_SCROLL_HEADER",()=>new en),Pt("CONTAINER_CONTAINER_SCROLL_RIGHT",()=>new en),Pt("CONTAINER_CONTAINER_SCROLL_BOTTOM",()=>new en),Pt("CONTAINER_CONTAINER_SCROLL_MAIN",()=>new en)}));class sn extends Dt{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={},this.isLoading=!1}}t("NavPosState",sn);const rn=["is404","isRoutePushed"];class ln extends It{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={},this.ignoreEmbedKey=!1}get route(){return this.router.currentRoute.value}getExpItemIsCache(t){return"CACHE"===this.rawItemParams.expcache||"NO_CACHE"!==this.rawItemParams.expcache&&t.isCache}setRouter(t){this.router=t}async onInit(){var t;await super.onInit(),this.handleRawItemParams(),(null==(t=this.model.rawItem)?void 0:t.rawItemParams)&&this.model.rawItem.rawItemParams.find(t=>!("REFCTRL"!==t.key||!t.value)&&(this.refCtrlKeys=t.value.split(";").map(t=>t.toLowerCase()),!0)),this.panel.evt.on("onControlEvent",t=>{if((0===this.refCtrlKeys.length||this.refCtrlKeys.includes(t.triggerControlName))&&"onNavViewChange"===t.triggerEventName){const e=t.triggerEvent;this.openView(e.navViewMsg)}});const e=this.rawItemParams.expmode||this.panel.view.params.expmode,n=this.rawItemParams.ignoreembedkey||this.panel.view.params.ignoreembedkey||"";this.ignoreEmbedKey=Object.is(n.toLowerCase(),"true"),"ROUTE"===e&&this.routeDepth?this.state.routeOpen=!0:this.state.routeOpen="NO_ROUTE"!==e&&!!this.routeDepth,this.panel.view.params.expmode&&delete this.panel.view.params.expmode}createState(){var t;return new sn(null==(t=this.parent)?void 0:t.state)}get routeDepth(){return this.panel.view.modal.routeDepth}calcCacheKey(t){return t?"".concat(t.viewId,"___").concat(t.key):""}onRouteChange(t){if(this.curNavViewMsg){const e=this.calcCacheKey(this.curNavViewMsg);this.state.currentKey=e,this.state.navViewMsgs[e].fullPath=t.fullPath}}setNavViewMsgs(t){t.isRoutePushed=!0===t.isRoutePushed;const e=this.calcCacheKey(t);this.state.navViewMsgs[e]?(at(this.state.navViewMsgs[e],t),rn.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&(this.state.navViewMsgs[e][n]=void 0)})):(this.state.navViewMsgs[e]=t,this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),this.viewModals[e]=new Et({mode:this.routeDepth?St.ROUTE:St.EMBED,routeDepth:this.routeDepth?this.routeDepth+1:void 0,dismiss:()=>{this.dismiss(e)}})),this.curNavViewMsg=this.state.navViewMsgs[e]}dismiss(t){ibiz.log.debug(this.constructor.name,"dismiss",t)}onViewCreated(t){this.panel.evt.emit("onPresetPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:"onViewCreated",presetParams:t}),ibiz.log.debug(this.constructor.name,"onViewCreated",t)}toBlankRoute(){const t=Te(this.route,this.routeDepth);this.router.push(t)}openView(t){if(!t.key)return this.state.currentKey=this.calcCacheKey(t),void(this.routeDepth&&this.state.routeOpen&&this.toBlankRoute());this.routeDepth&&this.state.routeOpen?this.openViewByPath(t):this.openViewByModel(t)}async openViewByPath(t){var e,n,i,o;const a=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=a,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const n=Te(this.route,this.routeDepth,!1);return void((null==(e=t.modalOptions)?void 0:e.replace)?this.router.replace("".concat(n,"/error/404")):this.router.push("".concat(n,"/error/404")))}if(a===this.state.currentKey&&this.state.navViewMsgs[a].fullPath)(null==(n=t.modalOptions)?void 0:n.replace)?this.router.replace(this.state.navViewMsgs[a].fullPath):this.router.push(this.state.navViewMsgs[a].fullPath);else if(this.state.navViewMsgs[a].fullPath&&this.getExpItemIsCache(t))(null==(i=t.modalOptions)?void 0:i.replace)?this.router.replace(this.state.navViewMsgs[a].fullPath):this.router.push(this.state.navViewMsgs[a].fullPath);else{const e=Object.assign(t.context.clone(),{toRouteDepth:this.routeDepth+1});(null==(o=this.rawItemParams)?void 0:o.routeattributekeys)&&(e.attributekeys=this.rawItemParams.routeattributekeys),this.getExpItemIsCache(t)&&this.state.cacheKeys.push(a),t.viewId&&(this.state.isLoading=!0,await ibiz.commands.execute(xt.TAG,t.viewId,e,t.params,{openMode:"INDEXVIEWTAB",modalOption:{replace:!this.state.currentKey,...t.modalOptions}}),this.state.isLoading=!1)}}openViewByModel(t){this.setNavViewMsgs(t),this.state.currentKey=this.calcCacheKey(t)}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;o(n)&&(e=n.reduce((t,e)=>(t[e.key.toLowerCase()]=e.value,t),{})),Object.assign(this.rawItemParams,e)}}function cn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)}t("NavPosController",ln);const dn=O({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:ln,required:!0}},setup(t){const e=t.controller,n=be("nav-pos"),{semanticClass:i,semanticStyle:o}=We(t.controller),a=ne(),s=ee(),r=f(!1);if(e.setRouter(a),e.routeDepth){const t=Te(s,e.routeDepth);l(()=>s.fullPath,()=>{const n=Te(s,e.routeDepth);if(t===n&&s.matched.length>e.routeDepth){if(s.matched.length===e.routeDepth+1&&(r.value=!!s.name,r.value))return;e.onRouteChange(s)}},{immediate:!0})}return{ns:n,c:e,isPresetView:r,onViewCreated:t=>{e.onViewCreated(t)},semanticClass:i,semanticStyle:o}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:i,navViewMsgs:o,cache:a}=e;let s=null;if(e.routeOpen){if(this.isPresetView)return A(ie,{class:this.semanticClass("root"),style:this.semanticStyle("root")},null);s=A(C("iBizRouterView"),{class:this.semanticClass("content"),style:this.semanticStyle("content"),manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?A(t,null,null):null;return a?A(C("keepAlive"),{include:i,max:30,isKey:!0},cn(e)?e:{default:()=>[e]}):e}})}else{const t=n&&o[n]?w(C("IBizViewShell"),{class:this.semanticClass("content"),style:this.semanticStyle("content"),context:o[n].context,params:o[n].params,key:this.c.ignoreEmbedKey?void 0:n,viewId:o[n].viewId,onCreated:this.onViewCreated}):null;s=a?A(C("keepAlive"),{include:i,max:30,isKey:!0},cn(t)?t:{default:()=>[t]}):t}return A("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),this.semanticClass("root"),...this.controller.containerClass],style:this.semanticStyle("root")},[s])}});class un{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const i=new ln(t,e,n);return await i.init(),i}}t("IBizNavPos",Ae(dn,function(t){t.component(dn.name,dn),Pt("RAWITEM_NAV_POS",()=>new un)}));class hn extends Dt{constructor(){super(...arguments),this.error=null}}const pn=class t extends It{constructor(){super(...arguments),this.unitName=void 0}get valueFormat(){return this.model.valueFormat}get dataType(){}get context(){return this.panel.context}get params(){return this.panel.params}get data(){return this.dataParent.data}get value(){return this.data[this.model.id]}createState(){var t;return new hn(null==(t=this.parent)?void 0:t.state)}async validate(){var t;return this.state.visible&&this.state.required&&!this.value?(this.state.error=(null==(t=this.editor)?void 0:t.model.placeHolder)||ibiz.i18n.t("vue3Util.panelComponent.cannotEmpty",{caption:this.model.caption}),!1):(this.state.error=null,!0)}async onInit(){var t,e;await super.onInit(),this.state.required=!this.model.allowEmpty,!0!==this.context.srfreadonly&&"true"!==this.context.srfreadonly&&(null==(t=this.model.editor)?void 0:t.readOnly)&&(this.state.readonly=(null==(e=this.model.editor)?void 0:e.readOnly)||!1),this.model.editor&&"HIDDEN"!==this.model.editor.editorType&&(this.editorProvider=await Tt(this.model.editor,this.panel.model),this.editorProvider&&(this.editor=await this.editorProvider.createController(this.model.editor,this)))}async setDataValue(t,e){const{id:n}=this.model;e=e||n,this.dataParent.setDataValue&&await this.dataParent.setDataValue(e,t),await this.validate(),this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Ot.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Ot.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Ot.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Ot.ENTER,event:t})}onClick(e){var n;if(ibiz.env.isMob){this.state.readonly||this.state.disabled||!(null==(n=this.editor)?void 0:n.model.editorType)||t.enableClickType.includes(this.editor.model.editorType)||null==e||e.stopPropagation()}super.onClick(e)}};pn.enableClickType=["SPAN","SPAN_LINK","RAW","MOB2DBARCODEREADER","FIELD_CAROUSEL_PICTURE","FIELD_IMAGE_PICTURE_ONE"];let mn=t("PanelFieldController",pn);const vn=O({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:mn,required:!0},attrs:{type:Object,require:!1}},setup(t){const e=be("panel-field"),{semanticClass:n,semanticStyle:i}=We(t.controller),o=x(()=>{const{id:n}=t.modelData;return[e.b(),e.m(n),e.is("error",!!t.controller.state.error),e.is("mob",window.Environment&&window.Environment.isMob)]}),a=x(()=>{const{controlRenders:e=[],id:n}=t.modelData;return!e.some(t=>t.id==="".concat(null==n?void 0:n.toLowerCase(),"_tooltip"))});return{ns:e,classArr:o,showTitle:a,onValueChange:(e,n)=>{t.controller.setDataValue(e,n)},semanticClass:n,semanticStyle:i}},render(){let t=null;if(this.controller.data){const e={value:this.controller.value,data:this.controller.data,controller:this.controller.editor,disabled:this.controller.state.disabled,class:[this.ns.b("content"),!0===ibiz.config.common.enhancedUI?this.controller.containerClass:"",this.semanticClass("content")],style:[this.semanticStyle("content")],showTitle:this.showTitle,readonly:this.controller.state.readonly,onChange:this.onValueChange,onFocus:t=>this.controller.onFocus(t),onBlur:t=>this.controller.onBlur(t),onEnter:t=>this.controller.onEnter(t),...this.attrs};if(this.$slots.default)t=this.$slots.default(e);else if(this.controller.editorProvider){const n=C(this.controller.editorProvider.formEditor);t=w(n,{...e})}else t=A(C("not-supported-editor"),{modelData:this.modelData.editor},null)}return N(A("div",{class:[this.classArr,!1===ibiz.config.common.enhancedUI?this.controller.containerClass:"",this.semanticClass("root")],style:this.semanticStyle("root"),onClick:t=>this.controller.onClick(t)},[t,this.controller.state.error&&A("div",{class:[this.ns.e("error"),this.semanticClass("error")],style:this.semanticStyle("error")},[this.controller.state.error])]),[[z("tooltip"),Ue(this.controller.data,this.controller.model,this.controller.panel)]])}});class gn{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const i=new mn(t,e,n);return await i.init(),i}}t("IBizPanelField",Ae(vn,function(t){t.component(vn.name,vn),Pt("FIELD",()=>new gn)}));class yn extends It{get data(){return this.dataParent.data}async onInit(){await super.onInit()}calcDynaClass(t){var e,n;if(this.model.dynaClass||(null==(e=this.model.rawItem)?void 0:e.dynaClass)){const e=this.model.dynaClass?At(this.model.dynaClass,t):[],i=(null==(n=this.model.rawItem)?void 0:n.dynaClass)?At(this.model.rawItem.dynaClass,t):[];this.state.class.containerDyna=[...e,...i]}if(this.model.labelDynaClass){const e=At(this.model.labelDynaClass,t);this.state.class.labelDyna=e}}}t("PanelRawItemController",yn);const fn=O({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:yn,required:!0}},setup(t){const e=be("panel-rawitem"),n=t.controller,{semanticClass:i,semanticStyle:o}=We(n),a=f(""),s=f(""),{rawItem:r}=t.modelData;r&&r.cssStyle&&(s.value=r.cssStyle);const c=x(()=>{const{id:n}=t.modelData;return[e.b(),e.m(n)]});return l(()=>n.data,async t=>{if(t){const e=n.model.rawItem;if(!e)return;let i;const o={...t};"RAW"===e.contentType?i=e.caption:"HTML"===e.contentType&&(i=e.content),i&&e.templateMode&&(i=await ibiz.util.hbs.render(i.replace("//n","\n"),Object.assign(o,{data:{...t}}))),a.value=i}},{immediate:!0}),{ns:e,classArr:c,tempStyle:s,content:a,semanticClass:i,semanticStyle:o}},render(){if(this.controller.state.visible)return A("div",{class:[this.classArr,!1===ibiz.config.common.enhancedUI?this.controller.containerClass:"",this.semanticClass("root")],style:[!1===ibiz.config.common.enhancedUI?this.tempStyle:"",this.semanticStyle("root")],onClick:t=>this.controller.onClick(t)},[A(C("iBizRawItem"),{class:[!0===ibiz.config.common.enhancedUI?this.controller.containerClass:"",this.semanticClass("content")],style:[!0===ibiz.config.common.enhancedUI?this.tempStyle:"",this.semanticStyle("content")],rawItem:this.modelData,content:this.content},null)])}});class wn{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const i=new yn(t,e,n);return await i.init(),i}}t("IBizPanelRawItem",Ae(fn,function(t){t.component(fn.name,fn),Pt("RAWITEM",()=>new wn),Pt("RAWITEM_STATIC_IMAGE",()=>new wn),Pt("RAWITEM_STATIC_LABEL",()=>new wn),Pt("RAWITEM_STATIC_TEXT",()=>new wn)}));class Cn extends Dt{constructor(){super(...arguments),this.data={}}}class bn{constructor(t,e,n,i){this.model=t,this.panel=e,this.parent=n,this.state=new Cn,this.isDataContainer=!0,this.panelItems={},this.state.data=i;const o=Nt(this.model).map(t=>t.id);i._evt.on("change",t=>{o.includes(t)&&this.childDataChangeNotify([t])})}get data(){return this.state.data}async validate(){return(await Promise.all(Object.values(this.panelItems).map(t=>t.validate()))).every(t=>t)}async init(){await this.initChildrenController()}async initChildrenController(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map(async t=>{var i,o;const a=this.parent.providers[t.id];if(!a)return;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(i=t.panelItems)?void 0:i.length)&&!zt(t)?await this.initChildrenController(t.panelItems,e,s):(null==(o=t.panelTabPages)?void 0:o.length)&&await this.initChildrenController(t.panelTabPages,e,s)}))}async dataChangeNotify(t){}async childDataChangeNotify(t){Object.values(this.panelItems).forEach(e=>{e.dataChangeNotify(t)})}async panelStateNotify(t){Object.values(this.panelItems).forEach(e=>{e.panelStateNotify(t)})}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e,this.childDataChangeNotify([t]))}destroy(){var t,e;null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach(t=>{t.destroy()})}}class Pn extends _t{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",Pn);class In extends bt{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new Pn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders()}async panelStateNotify(t){super.panelStateNotify(t),t===Rt.LOAD&&this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map(async t=>{var e,n;const i=await Lt(t,this.panel.model,this.panel.view.model);i&&(this.providers[t.id]=i,(null==(e=t.panelItems)?void 0:e.length)&&!zt(t)&&await this.initPanelItemProviders(t.panelItems),(null==(n=t.panelTabPages)?void 0:n.length)&&await this.initPanelItemProviders(t.panelTabPages))}))}computeNavParams(){const t=this.dataParent.data||{},{navigateContexts:e,navigateParams:n}=this.model,i=this.panel.context.clone();Object.assign(i,kt(e,t,this.panel.context,this.panel.params));const o=kt(n,t,this.panel.context,this.panel.params);return Object.assign(o,this.panel.params),{context:i,params:o}}async initContainerData(){const{dataSourceType:t,dataName:e,scriptCode:n,showBusyIndicator:i}=this.model;try{switch(i&&this.startLoading(),t){case"DEACTION":case"DEDATASET":await this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":await this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;case"ACTIVEDATAPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));await this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!n)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=ht.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},n,{isAsync:!1,singleRowReturn:!0});await this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}finally{i&&this.endLoading()}}childrenStateNotify(t){this.dataItems.forEach(e=>{e.panelStateNotify(t)})}async validate(){return(await Promise.all(this.dataItems.map(t=>t.validate()))).every(t=>t)}async setData(t){const e=Nt(this.model),n=t.map(t=>new Mt(e,t));this.dataItems=n.map(t=>new bn(this.model,this.panel,this,t)),this.dataItems.length&&await Promise.all(this.dataItems.map(t=>t.init())),this.state.items=n,this.childrenStateNotify(Rt.LOAD),this.panel.evt.emit("onPanelDataContainerEvent",{panelDataContainerName:this.model.id,panelDataContainerEventName:Bt.onLoadSuccess,data:[this.data]})}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const{context:n,params:i}=this.computeNavParams(),o=await Vt(e,t,n,this.panel.data,i);if(!o)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(o)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),{context:i,params:o}=this.computeNavParams(),a=await n.deService.exec(e,t,i,void 0,o);a.ok&&a.data&&this.setData(a.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",()=>{n()})}setDataValue(t,e){throw new Error(ibiz.i18n.t("vue3Util.panelComponent.noImplementMethod"))}destroy(){super.destroy(),this.dataItems.forEach(t=>{t.destroy()})}}t("MultiDataContainerController",In);const Dn=O({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:In,required:!0}},setup(t){const e=be("multi-data-container"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller);l(()=>t.controller.state.items,()=>{t.controller.dataItems.forEach(t=>{t.state=v(t.state);Object.keys(t.panelItems).forEach(e=>{const n=t.panelItems[e];n.state=v(n.state)})})},{immediate:!0});const a=m("renderPanelItem"),s=x(()=>[e.b(),e.m(n),...t.controller.containerClass]);return{ns:e,classArr:s,renderPanelItem:a,semanticClass:i,semanticStyle:o}},render(){let t;return t=this.$slots.default?this.$slots.default():this.controller.state.items.map((t,e)=>{const n=this.controller.dataItems[e];return A(C("iBizRow"),{class:[this.ns.b("content"),this.semanticClass("item",{data:t})],style:this.semanticStyle("item",{data:t}),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map(t=>{let e;const i=n.panelItems[t.id];return A(C("iBizCol"),{layoutPos:t.layoutPos,state:i.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!L(o)?e:{default:()=>[e]});var o})]}})}),N(A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),"element-loading-text":this.controller.state.loadingText},[t]),[[z("loading"),this.controller.state.loading]])}});class En{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const i=new In(t,e,n);return await i.init(),i}}t("IBizMultiDataContainer",Ae(Dn,function(t){t.component(Dn.name,Dn),Pt("CONTAINER_CONTAINER_MULTIDATA",()=>new En)}));class Sn extends _t{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerRawState",Sn);class xn extends bt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.items}createState(){var t;return new Sn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers()}async panelStateNotify(t){super.panelStateNotify(t),t===Rt.LOAD&&this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map(async t=>{var i,o;const a=await Lt(t,e.model,e.view.model);if(!a)return;this.providers[t.id]=a;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(i=t.panelItems)?void 0:i.length)&&!zt(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(o=t.panelTabPages)?void 0:o.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)}))}computeNavParams(){const t=this.dataParent.data||{},{navigateContexts:e,navigateParams:n}=this.model,i=this.panel.context.clone();Object.assign(i,kt(e,t,this.panel.context,this.panel.params));const o=kt(n,t,this.panel.context,this.panel.params);return Object.assign(o,this.panel.params),{context:i,params:o}}async initContainerData(){const{dataSourceType:t,dataName:e,scriptCode:n,showBusyIndicator:i}=this.model;try{switch(i&&this.startLoading(),t){case"DEACTION":case"DEDATASET":await this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":await this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;case"ACTIVEDATAPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));await this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!n)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=ht.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},n,{isAsync:!1,singleRowReturn:!0});await this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}finally{i&&this.endLoading()}}childrenStateNotify(t){Object.values(this.panelItems).forEach(e=>{e.panelStateNotify(t)})}async setData(t){var e,n;null==(n=(e=this.data).destroy)||n.call(e),this.state.items=t,this.childrenStateNotify(Rt.LOAD),this.panel.evt.emit("onPanelDataContainerEvent",{panelDataContainerName:this.model.id,panelDataContainerEventName:Bt.onLoadSuccess,data:[this.data]})}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const{context:n,params:i}=this.computeNavParams(),o=await Vt(e,t,n,this.panel.data,i);if(!o)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(o)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),{context:i,params:o}=this.computeNavParams(),a=await n.deService.exec(e,t,i,void 0,o);a.ok&&a.data&&this.setData(a.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",()=>{n()})}setDataValue(t,e){throw new Error(ibiz.i18n.t("vue3Util.panelComponent.noImplementMethod"))}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach(t=>{var e;null==(e=t.destroy)||e.call(t)})}}t("MultiDataContainerRawController",xn);const Tn=O({name:"IBizMultiDataContainerRaw",props:{modelData:{type:Object,required:!0},controller:{type:xn,required:!0}},setup(t){const e=be("multi-data-container-raw"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller);l(()=>t.controller.state.items,()=>{Object.keys(t.controller.panelItems).forEach(e=>{const n=t.controller.panelItems[e];n.state=v(n.state)})},{immediate:!0,deep:!0});const a=m("renderPanelItem"),s=x(()=>[e.b(),e.m(n),...t.controller.containerClass]);return{ns:e,classArr:s,renderPanelItem:a,semanticClass:i,semanticStyle:o}},render(){let t;return t=this.$slots.default?this.$slots.default():A(C("iBizRow"),{class:[this.ns.b("content"),this.semanticClass("content")],style:this.semanticStyle("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map(t=>{let e;const n=this.controller.panelItems[t.id];return A(C("iBizCol"),{layoutPos:t.layoutPos,state:n.state,class:this.semanticClass("item",{item:n}),style:this.semanticStyle("item",{item:n})},"function"==typeof(i=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(i)&&!L(i)?e:{default:()=>[e]});var i})]}}),N(A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),"element-loading-text":this.controller.state.loadingText},[t]),[[z("loading"),this.controller.state.loading]])}});class On{constructor(){this.component="IBizMultiDataContainerRaw"}async createController(t,e,n){const i=new xn(t,e,n);return await i.init(),i}}t("IBizMultiDataContainerRaw",Ae(Tn,function(t){t.component(Tn.name,Tn),Pt("CONTAINER_CONTAINER_MULTIDATA_RAW",()=>new On)}));class An extends _t{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",An);class Nn extends bt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new An(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers()}async panelStateNotify(t){super.panelStateNotify(t),t===Rt.LOAD&&this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map(async t=>{var i,o;const a=await Lt(t,e.model,e.view.model);if(!a)return;this.providers[t.id]=a;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(i=t.panelItems)?void 0:i.length)&&!zt(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(o=t.panelTabPages)?void 0:o.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)}))}computeNavParams(){const t=this.dataParent.data||{},{navigateContexts:e,navigateParams:n}=this.model,i=this.panel.context.clone();Object.assign(i,kt(e,t,this.panel.context,this.panel.params));const o=kt(n,t,this.panel.context,this.panel.params);return Object.assign(o,this.panel.params),{context:i,params:o}}async initContainerData(){const{dataName:t,scriptCode:e,dataSourceType:n,dataRegionType:i,showBusyIndicator:o}=this.model;try{if(o&&this.startLoading(),"LOGINFORM"===i)return void this.setLoginForm();switch(n){case"DEACTION":case"DEDATASET":await this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":await this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),t);break;case"VIEWSESSIONPARAM":if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,t);break;case"ACTIVEDATAPARAM":if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));await this.setData(this.dataParent.data[t]);break;case"CUSTOM":{if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=ht.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},e,{isAsync:!1,singleRowReturn:!0});await this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:n}))}}finally{o&&this.endLoading()}}childrenStateNotify(t){Object.values(this.panelItems).forEach(e=>{e.panelStateNotify(t)})}async setData(t){var e,n;const i=Nt(this.model),o=i.map(t=>t.id),a=new Mt(i,t);a._evt.on("change",t=>{o.includes(t)&&this.childDataChangeNotify([t])}),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=a,this.childrenStateNotify(Rt.LOAD),this.panel.evt.emit("onPanelDataContainerEvent",{panelDataContainerName:this.model.id,panelDataContainerEventName:Bt.onLoadSuccess,data:[this.data]})}setLoginForm(){this.setData({})}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const{context:n,params:i}=this.computeNavParams(),o=await Vt(e,t,n,this.panel.data,i);if(!o)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(o)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),{context:i,params:o}=this.computeNavParams(),a=await n.deService.exec(e,t,i,void 0,o);a.ok&&a.data&&this.setData(a.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",()=>{n()})}childDataChangeNotify(t){Object.values(this.panelItems).forEach(e=>{e.dataChangeNotify(t)})}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e)}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach(t=>{t.destroy()})}}t("SingleDataContainerController",Nn);const zn=O({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Nn,required:!0}},setup(t){const e=be("single-data-container"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller);Object.keys(t.controller.panelItems).forEach(e=>{const n=t.controller.panelItems[e];n.state=v(n.state)});const a=m("renderPanelItem"),s=x(()=>[e.b(),e.m(n),...t.controller.containerClass]);return{ns:e,classArr:s,renderPanelItem:a,semanticClass:i,semanticStyle:o}},render(){let t;return t=this.$slots.default?this.$slots.default():A(C("iBizRow"),{class:[this.ns.b("content"),this.semanticClass("content")],style:this.semanticStyle("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map(t=>{let e;const n=this.controller.panelItems[t.id];return A(C("iBizCol"),{class:this.semanticClass("item",{item:n}),style:this.semanticStyle("item",{item:n}),layoutPos:t.layoutPos,state:n.state},"function"==typeof(i=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(i)&&!L(i)?e:{default:()=>[e]});var i})]}}),N(A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),"element-loading-text":this.controller.state.loadingText},[t]),[[z("loading"),this.controller.state.loading]])}});class _n{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const i=new Nn(t,e,n);return await i.init(),i}}t("IBizSingleDataContainer",Ae(zn,function(t){t.component(zn.name,zn),Pt("CONTAINER_CONTAINER_SINGLEDATA",()=>new _n)}));class Rn extends _t{}t("GridContainerState",Rn);class Ln extends bt{createState(){var t;return new Rn(null==(t=this.parent)?void 0:t.state)}}function kn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)}t("GridContainerController",Ln);const Mn=O({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ln,required:!0}},setup(t){const e=be("grid-container"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller),a=x(()=>{let i=[e.b(),e.m(n)];return i=[...i,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],i}),s=x(()=>({...t.modelData.layout,layout:"TABLE_12COL"})),r=f(void 0),l=f(12);return{ns:e,classArr:a,layoutModel:s,convertLayoutPos:(t,e)=>{const n={...t,layout:"TABLE_12COL",colXS:t.grow||e,colSM:t.grow||e,colMD:t.grow||e,colLG:t.grow||e};return delete n.grow,n},adaptGrow:l,adaptCols:r,semanticClass:i,semanticStyle:o}},render(){var t,e;let n;const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];if(void 0===this.adaptCols){let t=0,e=0;i.forEach(n=>{const i=n.props;i&&i.modelData&&i.modelData.layoutPos&&("number"==typeof i.modelData.layoutPos.grow?t+=i.modelData.layoutPos.grow:void 0===i.modelData.layoutPos.grow&&(e+=1))});let n=12;e>0&&(n=(12-t)/e),this.adaptCols=e,this.adaptGrow=n}return N(A(C("iBizRow"),{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),layout:this.layoutModel,"element-loading-text":this.controller.state.loadingText},kn(n=i.map(t=>{const e=t.props;return e&&e.controller?A(C("iBizCol"),{class:this.semanticClass("item"),style:this.semanticStyle("item"),layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},kn(t)?t:{default:()=>[t]}):t}))?n:{default:()=>[n]}),[[z("loading"),this.controller.state.loading]])}});class Bn{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const i=new Ln(t,e,n);return await i.init(),i}}t("IBizGridContainer",Ae(Mn,function(t){t.component(Mn.name,Mn),Pt("CONTAINER_CONTAINER_GRID",()=>new Bn)}));class Vn extends _t{}t("PanelContainerImageState",Vn);class jn extends bt{createState(){var t;return new Vn(null==(t=this.parent)?void 0:t.state)}}function Un(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)}t("PanelContainerImageController",jn);const Wn=O({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:jn,required:!0}},setup(t){const e=be("panel-container-image"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller),a=x(()=>{let i=[e.b(),e.m(n)];return i=[...i,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],i}),s=x(()=>{const e=t.controller.model.sysImage,n={};let i="";if(null==e?void 0:e.rawContent)if($(e.rawContent)){const t=e.rawContent.replace(/[\u4e00-\u9fff]/g,"");i="url(data:image/svg+xml;base64,".concat(btoa(t),")")}else i="url(".concat(e.rawContent,")");else(null==e?void 0:e.imagePath)&&(i="url(".concat(e.imagePath,")"));return i&&Object.assign(n,{backgroundImage:i}),n});return{ns:e,classArr:a,backgroundStyle:s,semanticClass:i,semanticStyle:o}},render(){var t,e;let n;const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],o=A(C("iBizRow"),{slot:"content",class:this.semanticClass("content"),style:this.semanticStyle("content"),layout:this.modelData.layout},Un(n=i.map(t=>{const e=t.props;return e&&e.controller?A(C("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state,class:this.semanticClass("item",{props:e}),style:this.semanticStyle("item",{props:e})},Un(t)?t:{default:()=>[t]}):t}))?n:{default:()=>[n]});return N(A("div",{class:[this.classArr,this.semanticClass("root")],"element-loading-text":this.controller.state.loadingText,onClick:t=>this.controller.onClick(t),style:[this.backgroundStyle,this.semanticStyle("root")]},[this.controller.model.cssStyle?A("style",{type:"text/css"},[this.controller.model.cssStyle]):null,o]),[[z("loading"),this.controller.state.loading]])}});class Fn{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const i=new jn(t,e,n);return await i.init(),i}}t("IBizPanelContainerImage",Ae(Wn,function(t){t.component(Wn.name,Wn),Pt("CONTAINER_CONTAINER_IMAGE",()=>new Fn)}));function qn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)}const Gn=O({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:bt,required:!0}},setup(t){const e=be("panel-tab-page"),{semanticClass:n,semanticStyle:i}=We(t.controller),o=x(()=>{const{id:n}=t.modelData,i=[e.b(),e.m(n)];return i.push(...t.controller.containerClass),i});return{ns:e,classArr:o,semanticClass:n,semanticStyle:i}},render(){var t,e;let n;const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return N(A(C("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),layout:this.modelData.layout,"element-loading-text":this.controller.state.loadingText},qn(n=i.map(t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return A(C("iBizCol"),{class:this.semanticClass("item",{props:e}),style:this.semanticStyle("item",{props:e}),layoutPos:n.model.layoutPos,state:n.state},qn(t)?t:{default:()=>[t]})}))?n:{default:()=>[n]}),[[z("loading"),this.controller.state.loading]])}});class Hn{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const i=new bt(t,e,n);return await i.init(),i}}t("IBizPanelTabPage",Ae(Gn,function(t){t.component(Gn.name,Gn),Pt("TABPAGE",()=>new Hn)}));class $n extends It{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];if(n.layoutPanelModel){let t=n.layoutPanelModel;return t.includes("return")||(t="return (".concat(t,")")),ht.execScriptFn({data:e||{}},t,{isAsync:!1})}}}const Kn=O({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:$n,required:!0}},setup(t){var e;const n=be("panel-item-render"),{semanticClass:i,semanticStyle:o}=We(t.controller),a=be("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:s}=t.modelData,r=x(()=>[n.b(),n.m(s),a.b(),n.is("hidden",!t.controller.state.visible)]),l=x(()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data));return{ns:n,classArr:r,htmlCode:l,semanticClass:i,semanticStyle:o}},render(){return A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),innerHTML:this.htmlCode,onClick:t=>this.controller.onClick(t)},null)}});class Xn{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const i=new $n(t,e,n);return await i.init(),i}}t("IBizPanelItemRender",Ae(Kn,function(t){t.component(Kn.name,Kn),Pt("PREDEFINE_RENDER",()=>new Xn)}));const Qn=O({name:"IBizTeleportPlaceholder",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=be("teleport-placeholder"),n=f(""),{semanticClass:i,semanticStyle:o}=We(t.controller),{rawItem:a}=t.modelData;a&&a.cssStyle&&(n.value=a.cssStyle);const s=x(()=>{const{id:n}=t.modelData,i=[e.b(),e.m(n)];return i.push(...t.controller.containerClass),i});return{ns:e,classArr:s,tempStyle:n,semanticClass:i,semanticStyle:o}},render(){if(this.controller.state.visible)return A("div",{id:this.controller.state.teleportTag,class:[this.classArr,this.semanticClass("root")],style:[this.tempStyle,this.semanticStyle("root")]},null)}});class Yn extends Dt{constructor(){super(...arguments),this.teleportTag=""}}class Jn extends It{createState(){var t;return new Yn(null==(t=this.parent)?void 0:t.state)}async onInit(){var t,e;await super.onInit();const n=this.panel.view.model.codeName;let i="".concat(null==n?void 0:n.toLowerCase(),"-").concat(this.model.id);const o=null==(e=null==(t=this.model.rawItem)?void 0:t.rawItemParams)?void 0:e.find(t=>"TeleportTag"===t.key);o&&o.value&&(i=o.value),ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.placeholderIdentifier",{viewCodeName:n,id:this.model.id}),i),this.state.teleportTag=i}}class Zn{constructor(){this.component="IBizTeleportPlaceholder"}async createController(t,e,n){const i=new Jn(t,e,n);return await i.init(),i}}t("TeleportPlaceholderProvider",Zn);t("IBizTeleportPlaceholder",Ae(Qn,function(t){t.component(Qn.name,Qn),Pt("RAWITEM_TELEPORT_PLACEHOLDER",()=>new Zn)}));const ti=O({name:"IBizPanelContainerTabs",props:{modelData:{type:Object,required:!0},controller:{type:bt,required:!0}},setup:()=>({ns:be("panel-container-tabs")}),render(){return w(C("IBizPanelContainer"),{...this.$props,...this.$attrs,class:this.ns.b()},this.$slots)}});class ei{constructor(){this.component="IBizPanelContainerTabs"}async createController(t,e,n){const i=new bt(t,e,n);return await i.init(),i}}t("IBizPanelContainerTabs",Ae(ti,function(t){t.component(ti.name,ti),Pt("CONTAINER_TABS",()=>new ei)}));const ni=O({name:"IBizPanelCtrlViewPageCaption",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=be("panel-ctrl-view-page-caption"),{semanticClass:n,semanticStyle:i}=We(t.controller),o=x(()=>{const{id:n}=t.modelData,i=[e.b(),e.m(n),e.is("mob",ibiz.env.isMob)];return i.push(...t.controller.containerClass),i});return{ns:e,classArr:o,semanticClass:n,semanticStyle:i}},render(){let t=null;return this.controller.data&&(t=A("span",{class:[this.ns.b("content"),this.semanticClass("content")],style:this.semanticStyle("content")},[this.controller.state.caption])),A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),onClick:t=>this.controller.onClick(t)},[t])}});class ii extends It{async onInit(){await super.onInit(),this.state.caption=this.panel.view.model.caption||"",this.panel.view.evt.on("onViewInfoChange",({caption:t,dataInfo:e})=>{this.state.caption="".concat(this.panel.view.model.caption).concat(e?"-".concat(e):"")})}}class oi{constructor(){this.component="IBizPanelCtrlViewPageCaption"}async createController(t,e,n){const i=new ii(t,e,n);return await i.init(),i}}t("IBizPanelCtrlViewPageCaption",Ae(ni,function(t){t.component(ni.name,ni),Pt("CTRLPOS_VIEW_PAGECAPTION",()=>new oi)}));const ai=O({name:"IBizAuthWxmpQrcode",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=be("auth-wxmp-qrcode"),{state:n}=t.controller,i=ee();t.controller.setRouter(i);const{semanticClass:o,semanticStyle:a}=We(t.controller),s=async()=>{await t.controller.loadQrcode()};return l(()=>n.visible,()=>{var t;n.visible&&(n.keepAlive&&!(null==(t=n.qrcode)?void 0:t.expirein)||!n.keepAlive)&&s()},{immediate:!0}),I(()=>{t.controller.destroy()}),{ns:e,loadQrcode:s,semanticClass:o,semanticStyle:a}},render(){var t,e;return A("div",{class:[this.ns.b(),this.semanticClass("root")],style:this.semanticStyle("root")},[A("div",{class:this.ns.e("content")},[this.controller.state.qrcode&&A("img",{class:[this.ns.e("qrcode"),this.semanticClass("content")],style:this.semanticStyle("content"),src:null==(t=this.controller.state.qrcode)?void 0:t.url},null),!(null==(e=this.controller.state.qrcode)?void 0:e.expirein)&&A("div",{class:[this.ns.e("mask"),this.semanticClass("mask")],style:this.semanticStyle("mask")},[A("ion-icon",{title:ibiz.i18n.t("vue3Util.panelComponent.refresh"),name:"reload-outline",onClick:this.loadQrcode,class:this.ns.em("mask","icon")},null)])]),A("div",{class:[this.ns.e("caption"),this.semanticClass("caption")],style:this.semanticStyle("caption")},[this.controller.state.tips])])}});class si extends Dt{}class ri extends It{constructor(){super(...arguments),this.pollingTime=2,this.rawItemParams={}}createState(){var t;return new si(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),this.handleRawItemParams(),this.initParams()}setRouter(t){this.route=t}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;o(n)&&(e=n.reduce((t,e)=>(t[e.key.toLowerCase()]=e.value,t),{})),Object.assign(this.rawItemParams,e)}initParams(){var t;var e;this.pollingTime=(e=this.rawItemParams.pollingtime)&&isFinite(Number(e))?Number(this.rawItemParams.pollingtime):2;const n=(null==(t=this.model.rawItem)?void 0:t.caption)||this.model.caption;this.state.tips=n?ibiz.appUtil.resolveI18nText(n):ibiz.i18n.t("vue3Util.panelComponent.wxQrcodeCaption")}async loadQrcode(){try{const t=await ibiz.net.get("/uaa/open/wxmp/createqrcode",{},{srfdcsystem:ibiz.env.dcSystem});t.ok&&t.data&&(this.state.qrcode=t.data,this.setTimer())}catch(t){ibiz.log.error(t.message)}}setTimer(){this.expirationTimer=setInterval(()=>{this.state.qrcode&&this.state.qrcode.expirein>0?this.state.qrcode.expirein-=1:clearInterval(this.expirationTimer)},1e3),this.pollingTimer=setInterval(async()=>{await this.pollingLogin()},1e3*this.pollingTime)}async pollingLogin(){try{if(this.state.qrcode&&this.state.qrcode.expirein>0){if(this.state.visible){const t=await ibiz.net.get("/uaa/open/wxmp/qrcode/".concat(this.state.qrcode.ticket),{},{srfdcsystem:ibiz.env.dcSystem}),{data:e,ok:n}=t;if(n&&(null==e?void 0:e.token)){clearInterval(this.pollingTimer);const t=30;J(Z.TOKEN_REMEMBER,"1",t),J(Z.TOKEN,e.token,t);const n=(new Date).getTime()+1e3*(e.expirein||7199);J(Z.TOKEN_EXPIRES,"".concat(n),t),e.refresh_token&&J(Z.REFRESH_TOKEN,e.refresh_token,t),tt(Z.IS_ANONYMOUS);const i=this.route.query.ru||"/";window.location.hash=i||"/",window.history.pushState({},""),window.location.reload()}}}else clearInterval(this.pollingTimer)}catch(t){ibiz.log.error(t.message)}}async destroy(){await super.destroy(),this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=void 0),this.expirationTimer&&(clearInterval(this.expirationTimer),this.expirationTimer=void 0)}}class li{constructor(){this.component="IBizAuthWxmpQrcode"}async createController(t,e,n){const i=new ri(t,e,n);return await i.init(),i}}t("IBizAuthWxmpQrcode",Ae(ai,function(t){t.component(ai.name,ai),Pt("RAWITEM_AUTH_WXMP_QRCODE",()=>new li)})),t("AppRedirectView",O({setup(){var t;const e=X.create((null==(t=ibiz.appData)?void 0:t.context)||{});I(()=>{e.destroy()});const{href:n}=window.location;P(()=>ibiz.util.hiddenAppLoading()),async function(){await jt(e,n)}()},render:()=>A("div",null,[ibiz.i18n.t("vue3Util.view.redirectionProgress")])}));class ci{constructor(){this.component="IBizView"}}const di=O({name:"IBizView",props:{context:{type:Object},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object},provider:{type:Object}},setup(t,{slots:e}){const n=be("view"),i=ke((...t)=>new mt(...t));Me(i);const o=Ut(i.model),a=[],s=new Map,r=[];o.forEach(t=>{const{teleportFlag:e,teleportTag:n}=Wt(t);n||e?(a.push(t),s.set(t.id,n||"")):r.push(t)});const{viewType:l,sysCss:d,codeName:u}=i.model,h=l.toLowerCase(),p=null==d?void 0:d.cssName,m=x(()=>[n.b(),n.b(h),n.m(u),p,i.state.viewMessages.TOP?"has-top-message":"",i.state.viewMessages.BOTTOM?"has-bottom-message":"",i.state.presetClassList]),v=(t,e={})=>{const n=t.name||t.id;return{context:i.context,params:i.params,modelData:t,...i.slotProps[n]||{},...e}};let g;return P(()=>{_(async()=>{const t=document.getElementById(i.id),e=await ibiz.hub.config.view.get(i.model.id);t&&(null==e?void 0:e.waterMarkOption)&&(g=ibiz.util.watermark.mount(e.waterMarkOption,t,i.context,i.params,i.state.srfactiveviewdata||{}))})}),c(()=>{null==g||g()}),{c:i,ns:n,controls:r,teleportControls:a,viewClassNames:m,onLayoutPanelCreated:t=>{i.setLayoutPanel(t)},getCtrlProps:v,renderControl:(t,n={})=>{const o=t.name||t.id,a=v(t,n);if(e[o])return M(e,o,a);const s=i.providers[o],r=C((null==s?void 0:s.component)||"IBizControlShell");return s&&(a.provider=s),w(r,a)},getCtrlTeleportTag:t=>{var e,n;const o=s.get(t.id);if(o)return o;const a=null==(n=null==(e=i.parentView)?void 0:e.layoutPanel)?void 0:n.panelItems[t.name];return a?"#".concat(a.state.teleportTag):void 0},getControlStyle:()=>{const t={};return Object.assign(t,{display:i.state.hasError?"none":"initial"}),t}}},render(){var t,e;let n=null;if(this.c.state.isCreated)if(0===this.c.engines.length)n=A("span",{style:"color:red;"},[ibiz.i18n.t("vue3Util.view.viewType",{viewType:this.modelData.viewType})]);else{const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach(t=>{const n=t.name||t.id;e[n]=e=>this.renderControl(t,e)});const i=this.c.model.viewLayoutPanel,o=this.c.providers[i.name];n=w(C(o.component),{modelData:i,context:this.c.context,params:this.c.params,provider:o,container:this.c,style:this.getControlStyle(),onControllerAppear:this.onLayoutPanelCreated},e)}let i=null;this.c.state.isCreated&&(null==(e=this.teleportControls)?void 0:e.length)&&(i=this.teleportControls.map(t=>{let e;const n=this.getCtrlTeleportTag(t);return n?A("div",{style:this.getControlStyle()},[A(k,{to:n,disabled:!this.c.state.activated},(i=e=this.renderControl(t),"function"==typeof i||"[object Object]"===Object.prototype.toString.call(i)&&!L(i)?e:{default:()=>[e]}))]):(ibiz.log.error(ibiz.i18n.t("vue3Util.view.noTeleportTag",{name:t.name})),null);var i}));let o=null;if(this.c.state.hasError&&this.c.error.status){const t=gt(this.c.error.status);t&&("string"==typeof t.component&&(o=w(C(t.component))),o=w(t.component))}return N(A("div",{class:this.viewClassNames,id:this.c.id,"element-loading-text":this.c.state.loadingText},[n,i,o]),[[z("loading"),this.c.state.isLoading]])}});class ui{constructor(){this.component="IBizView"}createController(t,e,n,i){return new Ft(t,e,n,i)}}class hi{constructor(){this.component="IBizView"}createController(t,e,n,i){return new qt(t,e,n,i)}}t("IBizView",Ae(di,function(t){t.component(di.name,di),Gt("DEFAULT",()=>new ci),Gt("APPDATAUPLOADVIEW",()=>new ui),Gt("DEMDCUSTOMVIEW",()=>new hi)})),t("TodoRedirect",O({setup(){const t=ne(),{href:e}=window.location,n=e.lastIndexOf("?"),i=decodeURIComponent(e.substring(n+1,e.length));if(!i)throw new Error(ibiz.i18n.t("vue3Util.view.insufficientRedirection"));const o=oe.parse(i,{delimiter:";"}),{apptype:a,todotype:s,todoid:r}=o,l={srfapptype:"pc",srfapp:""};a||(l.todourltype="RouterUrl"),async function(){let e=(await ibiz.net.post("/systodos/".concat(r,"/getlinkurl"),l)).data.linkurl;a?window.location.href=e:(0!==e.indexOf("/")&&(e="/".concat(e)),e+=";srfwf=".concat(s),t.push("/index".concat(e)))}()},render:()=>A("div",null,[ibiz.i18n.t("vue3Util.view.toDoList")])}));class pi{constructor(){this.component="IBizPortalView"}}const mi=O({name:"IBizPortalView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=be("view"),n=ke((...t)=>new mt(...t)),i=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:o,sysCss:a,codeName:s}=n.model,r=o.toLowerCase(),l=null==a?void 0:a.cssName,c=[e.b(),e.b(r),e.m(s),l];return{c:n,ns:e,controls:i,viewClassNames:c}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach(t=>{const e=t.name||t.id,i={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(i,this.c.slotProps[e]);const o=n[e];if(o)return void(n[e]=()=>o({modelData:t,...i}));const a=this.c.providers[e];a&&(n[e]=()=>{const e=C(a.component);return w(e,{modelData:t,...i,provider:a})})}),n.dashboard&&(e=n.dashboard())}return A("div",{class:this.viewClassNames},[e])}}),vi=(t("IBizPortalView",Ae(mi,function(t){t.component(mi.name,mi),Gt(rt.APP_PORTAL_VIEW,()=>new pi),Gt(rt.DE_PORTAL_VIEW,()=>new pi),Gt(rt.DE_PORTAL_VIEW9,()=>new pi)})),O({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},isEmbedCtrlNav:{type:Boolean,default:!1}},setup(t){const e=ke((...t)=>new mt(...t)),n=f(),i=f(),o=f();return e.evt.on("onCreated",()=>{Ht(h(t.modelData),h(e.context),h(e.params)).then(async t=>{if("view"!==t.type)throw new F(ibiz.i18n.t("vue3Util.view.embeddedRedirectionView"));n.value=t.viewId,i.value=t.context,o.value=t.params})}),t.isEmbedCtrlNav&&l(()=>[e.context,e.params],()=>{Ht(h(t.modelData),h(e.context),h(e.params)).then(async t=>{"view"===t.type&&(n.value=t.viewId,i.value=t.context)})},{deep:!0}),{c:e,toViewId:n,toViewContext:i,toViewParams:o}},render(){return this.toViewId?w(C("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):N(A("div",{style:"width: 100%; height: 100%;"},null),[[z("loading"),!this.toViewId]])}}));class gi{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",Ae(vi,function(t){t.component(vi.name,vi);const e=new gi;Gt(rt.DE_REDIRECT_VIEW,()=>e)}));class yi{constructor(){this.component="IBizHtmlView"}}const fi=O({name:"IBizHtmlView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=be("view"),n=ke((t,...e)=>new $t(t,...e)),i=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:o,sysCss:a,codeName:s}=n.model,r=o.toLowerCase(),l=null==a?void 0:a.cssName,c=[e.b(),e.b(r),e.m(s),l],d=f(!1);B(()=>{n.state.htmlUrl&&(d.value=!0)});return{c:n,ns:e,controls:i,viewClassNames:c,isLoading:d,onLoad:()=>{d.value=!1}}},render(){if(!this.c.state.isCreated)return;if(this.c.state.htmlUrl)return N(A("div",{class:this.viewClassNames,"element-loading-text":this.c.state.loadingText},[A("iframe",{src:this.c.state.htmlUrl,onLoad:()=>this.onLoad()},null)]),[[z("loading"),this.isLoading]]);let t=null;const e=gt("404");return e&&("string"==typeof e.component&&(t=w(C(e.component))),t=w(e.component)),A("div",{class:this.viewClassNames},[t])}});t("IBizHtmlView",Ae(fi,function(t){t.component(fi.name,fi),Gt(rt.DE_HTML_VIEW,()=>new yi)}));const wi=O({name:"IBizViewLayoutPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:{type:Object}},setup(t,{slots:e}){const n=we((...e)=>new Kt(...e,t.container)),i=be("control-".concat(n.model.controlType.toLowerCase()));l(()=>t.data,t=>{t&&(n.setInputData(t),n.load())},{immediate:!0}),n.evt.on("onCreated",()=>{Object.keys(n.panelItems).forEach(t=>{const e=n.panelItems[t];e.state=v(e.state)})});const o=(t,i)=>{var a,s;if(t.hidden)return null;const{providers:r,panelItems:l}=i||n,c=r[t.id];if(!c)return A("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);if("CTRLPOS"!==t.itemType&&e[t.id])return M(e,t.id,{model:t,data:n.data,value:n.data[t.id],controller:l[t.id]});const d=C(c.component);let u;if("CTRLPOS"===t.itemType&&e[t.id]){const n=l[t.id];u=n.parent&&Xt(n.parent.model)?()=>e[t.id]({isSimple:!0,data:n.data}):()=>e[t.id]()}else"TABPANEL"===t.itemType&&(null==(a=t.panelTabPages)?void 0:a.length)?u=()=>t.panelTabPages.map(t=>o(t,i)):zt(t)?u=void 0:(null==(s=t.panelItems)?void 0:s.length)&&(u=()=>t.panelItems.map(t=>o(t,i)));let h="";t.cssStyle&&(h=t.cssStyle);const p=l[t.id],m=function(t,e){const n={};return Qt(t.controlAttributes).forEach(t=>{t.attrName&&t.attrValue&&(n[t.attrName]=ht.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))}),n}(t,p);return m.dynamicstyle&&("object"==typeof m.dynamicstyle?h+=Object.entries(m.dynamicstyle).map(([t,e])=>"".concat(t,":").concat(e,";")).join(""):h+=m.dynamicstyle,delete m.dynamicstyle),w(d,{modelData:t,controller:p,key:t.id,style:h,attrs:m},u)};return b("renderPanelItem",o),{c:n,ns:i,renderPanelItem:o}},render(){const{state:t,model:e}=this.c;return A(C("iBizControlBase"),{controller:this.c},{default:()=>[A(C("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map(t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",A(C("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(i=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(i)&&!L(i)?e:{default:()=>[e]});var i}))]}})]})}});class Ci{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",Ae(wi,function(t){t.component(wi.name,wi),Yt(Jt.VIEW_LAYOUT_PANEL,()=>new Ci)}));function bi(t,e,n){var i,o;if(t.hidden)return;const{providers:a,panelItems:s}=e,r=a[t.id];if(!r)return A("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);const l=C(r.component);let c;"CTRLPOS"===t.itemType&&n.$slots[t.id]?c=()=>n.$slots[t.id]():"TABPANEL"===t.itemType&&(null==(i=t.panelTabPages)?void 0:i.length)?c=()=>t.panelTabPages.map(t=>bi(t,e,n)):zt(t)?c=void 0:(null==(o=t.panelItems)?void 0:o.length)&&(c=()=>t.panelItems.map(t=>bi(t,e,n)));let d="";t.cssStyle&&(d=t.cssStyle);const u=s[t.id],h=function(t,e){const n={};return Qt(t.controlAttributes).forEach(t=>{t.attrName&&t.attrValue&&(n[t.attrName]=ht.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))}),n}(t,u);return h.dynamicstyle&&("object"==typeof h.dynamicstyle?d+=Object.entries(h.dynamicstyle).map(([t,e])=>"".concat(t,":").concat(e,";")).join(""):d+=h.dynamicstyle,delete h.dynamicstyle),(null==n?void 0:n.$slots[t.id])?M(n.$slots,t.id,{modelData:t,controller:u,key:t.id,style:d,attrs:h}):w(l,{modelData:t,controller:u,key:t.id,style:d,attrs:h},c)}const Pi=O({name:"IBizPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:{type:Object},loadDefault:{type:Boolean,default:!0}},setup(t){const e=we((...e)=>new Zt(...e,t.container)),n=be("control-".concat(e.model.controlType.toLowerCase()));l(()=>t.data,t=>{t&&(e.setInputData(t),e.load())},{immediate:!0}),e.evt.on("onCreated",()=>{Object.keys(e.panelItems).forEach(t=>{const n=e.panelItems[t];n.state=v(n.state)})});const i=m("renderPanelItem");return b("renderPanelItem",i||bi),{c:e,ns:n}},render(){const{state:t,model:e}=this.c;return A(C("iBizControlBase"),{controller:this.c},{default:()=>[A(C("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map(t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",A(C("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(i=e=bi(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(i)&&!L(i)?e:{default:()=>[e]});var i}))]}})]})}});class Ii{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",Ae(Pi,function(t){t.component(Pi.name,Pi),Yt(Jt.PANEL,()=>new Ii)}));function Di(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function Ei(t,e){for(var n,i="",o=0,a=-1,s=0,r=0;r<=t.length;++r){if(r<t.length)n=t.charCodeAt(r);else{if(47===n)break;n=47}if(47===n){if(a===r-1||1===s);else if(a!==r-1&&2===s){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",o=0):o=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),a=r,s=0;continue}}else if(2===i.length||1===i.length){i="",o=0,a=r,s=0;continue}e&&(i.length>0?i+="/..":i="..",o=2)}else i.length>0?i+="/"+t.slice(a+1,r):i=t.slice(a+1,r),o=r-a-1;a=r,s=0}else 46===n&&-1!==s?++s:s=-1}return i}var Si={resolve:function(){for(var t,e="",n=!1,i=arguments.length-1;i>=-1&&!n;i--){var o;i>=0?o=arguments[i]:(void 0===t&&(t=process.cwd()),o=t),Di(o),0!==o.length&&(e=o+"/"+e,n=47===o.charCodeAt(0))}return e=Ei(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(Di(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=Ei(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return Di(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];Di(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":Si.normalize(t)},relative:function(t,e){if(Di(t),Di(e),t===e)return"";if((t=Si.resolve(t))===(e=Si.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var i=t.length,o=i-n,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var s=e.length-a,r=o<s?o:s,l=-1,c=0;c<=r;++c){if(c===r){if(s>r){if(47===e.charCodeAt(a+c))return e.slice(a+c+1);if(0===c)return e.slice(a+c)}else o>r&&(47===t.charCodeAt(n+c)?l=c:0===c&&(l=0));break}var d=t.charCodeAt(n+c);if(d!==e.charCodeAt(a+c))break;47===d&&(l=c)}var u="";for(c=n+l+1;c<=i;++c)c!==i&&47!==t.charCodeAt(c)||(0===u.length?u+="..":u+="/..");return u.length>0?u+e.slice(a+l):(a+=l,47===e.charCodeAt(a)&&++a,e.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(Di(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,i=-1,o=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');Di(t);var n,i=0,o=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var s=e.length-1,r=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!a){i=n+1;break}}else-1===r&&(a=!1,r=n+1),s>=0&&(l===e.charCodeAt(s)?-1===--s&&(o=n):(s=-1,o=r))}return i===o?o=r:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){i=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){Di(t);for(var e=-1,n=0,i=-1,o=!0,a=0,s=t.length-1;s>=0;--s){var r=t.charCodeAt(s);if(47!==r)-1===i&&(o=!1,i=s+1),46===r?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!o){n=s+1;break}}return-1===e||-1===i||0===a||1===a&&e===i-1&&e===n+1?"":t.slice(e,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+i:n+t+i:i}("/",t)},parse:function(t){Di(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,i=t.charCodeAt(0),o=47===i;o?(e.root="/",n=1):n=0;for(var a=-1,s=0,r=-1,l=!0,c=t.length-1,d=0;c>=n;--c)if(47!==(i=t.charCodeAt(c)))-1===r&&(l=!1,r=c+1),46===i?-1===a?a=c:1!==d&&(d=1):-1!==a&&(d=-1);else if(!l){s=c+1;break}return-1===a||-1===r||0===d||1===d&&a===r-1&&a===s+1?-1!==r&&(e.base=e.name=0===s&&o?t.slice(1,r):t.slice(s,r)):(0===s&&o?(e.name=t.slice(1,a),e.base=t.slice(1,r)):(e.name=t.slice(s,a),e.base=t.slice(s,r)),e.ext=t.slice(a,r)),s>0?e.dir=t.slice(0,s-1):o&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Si.posix=Si;var xi=Si;t("PluginFactory",class{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.apiUrlPrefix="".concat(ibiz.env.baseUrl),this.cache=new Map,this.pluginCache=new Map,this.pluginCodes=[],this.predefinedPlugins=new Map,this.ignoreRules=[],this.loadQueue=new Map}isIgnore(t){return this.ignoreRules.some(e=>"string"==typeof e?t===e:e.test(t))}setDevIgnore(t){this.ignoreRules.push(t)}registerPredefinedPlugin(t){this.predefinedPlugins.set(t.name,t)}register(t){this.pluginCodes.forEach(e=>{t.use(e.code,e.extraParams)})}async loadPredefinedPlugin(t){if(this.predefinedPlugins.has(t)){const e=this.predefinedPlugins.get(t);e&&await this.loadPluginRef(e.name,e.path)}}setPluginCode(t,e={}){this.pluginCodes.push({code:t,extraParams:e}),he.useComponent.callSync(null,t,e)}async loadPlugin(t,e=ibiz.env.appId){if(!0===t.runtimeObject){const n=t;if(n){const t=n.rtobjectName,i=n.rtobjectRepo,o=n.pluginParams||{};if(this.isIgnore(i))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(i)){const t=await this.loadQueue.get(i);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(n.rtobjectName,n.rtobjectRepo,e,{...o});this.loadQueue.set(i,t);return await t}catch(t){throw new Y(n,ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"))}finally{this.loadQueue.delete(i)}}}return!1}async loadPluginRef(t,e,n=ibiz.env.appId,i={}){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let o=null;{const t=e,i=this.urlReg.test(t)||t.startsWith(this.apiUrlPrefix)?"".concat(t,"/package.json"):"".concat("FULLCODE"===ibiz.env.runContainer&&n!==ibiz.env.appId?ibiz.hub.microAppConfigCenter.getPluginBaseUrl(n):ibiz.env.pluginBaseUrl,"/").concat(xi.join(t,"package.json")),a=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:i});if(200!==a.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));o=a.data}Object.assign(o,{appId:n,extraParams:i});const a=new te(t,e,o);if(a){await this.loadPluginExternal(a.config);try{return await this.loadScript(a),this.pluginCache.set(t,a),!0}catch(t){ibiz.log.error(t)}}return!1}normalizedPath(t,e){let n="";if(this.urlReg.test(t)){const i=t.endsWith("/")?t:"".concat(t,"/");n=new URL(e,i).href}else n=xi.join(t,e);return n}async loadScript(t){const e=t.repo,{name:n,appId:i,system:o,styles:a=[],extraParams:s={}}=t.config,r=this.normalizedPath(e,o);if(r){if(this.cache.has(r))return;const t="FULLCODE"===ibiz.env.runContainer&&i!==ibiz.env.appId?ibiz.hub.microAppConfigCenter.getPluginBaseUrl(i):ibiz.env.pluginBaseUrl;let o=null;const l=this.parseUrl(r,t),c=("string"==typeof a?[a]:a).map(n=>this.parseUrl(this.normalizedPath(e,n),t));if(System.addImportMap({imports:{[n]:l},styles:{[n]:c}}),o=await System.import(n),!o)throw new F(ibiz.i18n.t("vue3Util.plugin.fileContentFormat"));if(!o.default)throw new F(ibiz.i18n.t("vue3Util.plugin.failedRemotePluginLoad"));this.setPluginCode(o.default,s),this.cache.set(r,!0)}}parseUrl(t,e=ibiz.env.pluginBaseUrl){if(this.urlReg.test(t)||t.startsWith(this.apiUrlPrefix))return t;let n="";n=this.urlReg.test(e)?t.startsWith("/")?e+t:"".concat(e,"/").concat(t):"".concat(xi.join(e,t));const{origin:i,pathname:o}=window.location;return o.endsWith("/")&&n.startsWith("/")&&(n=n.substring(1)),!1===this.urlReg.test(n)&&(n="".concat(i).concat(o).concat(n)),n}async loadPluginExternal(t){if(!t["systemjs-importmap"])return;const e=this.handleSystemImportMap(t["systemjs-importmap"],t.appId);if(e.packages){const n=e.packages;for(const e in n){const i=n[e],o=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:i});if(200!==o.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));const a=o.data;Object.assign(a,{appId:t.appId}),await this.loadPluginExternal(a)}}System.addImportMap(e)}handleSystemImportMap(t,e){if(t){if(t.baseUrl||"FULLCODE"!==ibiz.env.runContainer||e===ibiz.env.appId||(t.baseUrl=ibiz.hub.microAppConfigCenter.getPluginBaseUrl(e)),t.packages){const e=t.packages;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=e[n];e[n]=this.parseUrl(i,t.baseUrl)}}if(t.imports){const e=t.imports;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=e[n];e[n]=this.parseUrl(i,t.baseUrl)}}if(t.styles){const e=t.styles;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=e[n];e[n]="string"==typeof i?this.parseUrl(i,t.baseUrl):i.map(e=>this.parseUrl(e,t.baseUrl))}}return t}return null}});class Ti{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function Oi(){return{value:String,controller:new Ti(Object),data:new Ti(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function Ai(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,customAction:t=>!0}}function Ni(){return{hasError:{type:Boolean}}}function zi(){return{...Oi(),value:[String,Number]}}function _i(){return{...Oi(),value:[String,Number,Object,Array],showTitle:{type:Boolean,default:!0}}}function Ri(){return{...Oi(),value:[String,Number]}}function Li(){return{...Oi(),value:[String,Number]}}function ki(){return{...Oi(),value:[String,Number]}}function Mi(){return{...Oi(),value:[String,Array,Object,Number]}}function Bi(){return{...Oi(),value:[String,Number]}}function Vi(){return{...Oi(),value:[String,Number]}}function ji(){return{...Oi(),value:{type:Object}}}function Ui(){return{...Oi(),value:[String,Number]}}function Wi(){return{...Oi(),value:[String,Number]}}function Fi(){return{...Oi(),value:[String,Number]}}function qi(){return{...Oi(),value:[String,Number]}}function Gi(){return{...Oi(),value:[String,Number,Array]}}function Hi(){return{...Oi(),value:[String,Number]}}function $i(){return{...Oi(),value:[String,Number]}}function Ki(){return{...Oi(),value:[String,Number]}}function Xi(){return{...Oi(),value:String}}function Qi(){return{...Oi(),value:[String,Number]}}function Yi(){return{...Oi(),value:String,language:{type:String},theme:{type:String}}}function Ji(){return{...Oi(),value:String}}function Zi(){return{...Oi(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1},chunkView:{type:String,required:!1},chunkEntity:{type:String,required:!1},context:{type:Object,required:!1},ctrl:{type:Object,required:!1},view:{type:Object,required:!1}}}function to(){return{...Oi(),value:[Array,Array]}}function eo(){return{...Oi(),value:String}}function no(){return{...Oi(),value:String}}function io(){return{...Oi(),value:String}}function oo(){return{...Oi(),value:Number}}function ao(){return{...Oi(),value:String}}t("RequiredProp",Ti);t("en",{vue3Util:{common:{undefined:"undefined",onFoundCorrespondingPart:"Undefined adapter with no corresponding part found",noFoundViewModel:"View model not found",noSupportLoadingDynamic:"{codeName}No entity, do not support loading dynamic models at this time",invalidPointCoordinates:"Invalid point coordinates: ({x}, {y})"},control:{unsupportedPanel:"Unsupported panel items: {id} - {itemType}"},panelComponent:{noConfiguardDataObject:"No data object name config",noSupportedDataSourceType:"The data source type {dataSourceType} is not supported",noConfiguredEntityLogic:"No entity logic config",noConfiguredEntity:"No entity config",noReturnValue:"The entity logic {appDELogicId} has no return value",noAttribute:"There is no {dataName} attribute in the global variable.",noConfiguredScript:"No javaScript config",noConfiguerdEntityBehanior:"No entity behavior config",sessionView:"The session to which the view is bound does not exist {dataName}",viewStateAttribute:"There is no {dataName} attribute in the view state",noImplementMethod:"Method not implemented.",noProvidedSlot:"No {id} slot provided",cannotEmpty:"{caption} cannot be empty",unadaptedLayout:"Unadapted layout placeholder {layoutPos}",placeholderIdentifier:"The placeholder identifier for panel member {id} of view {viewCodeName} is:",refresh:"Refresh",wxQrcodeCaption:"Please use wechat to scan the QR code to log in"},plugin:{failureConfigurationLoad:"Configuration load failure",failedRemotePluginLoad:"Remote Plugin failed to load, Remote Plugin did not find [default] Default Export",fileContentFormat:"Remote plugin failed to load, file not found or file content format is incorrect"},use:{control:{parameterChanges:"Context or view parameter changes for {id}:",stateChange:"Part [{name}] state change"},focusBlur:{noFocus:"No focus, no out-of-focus triggering"},view:{stateChange:"View [{name}] state change"}},util:{noInjected:"The createVueApp method is not injected.",convertString:"Failed to convert to string",viewIdentifiers:"View identifiers do not exist for {depth} level routes",noFoundView:"View not found {viewCodeName}",routeCorrectly:"Cannot get the route correctly, could be a dependency issue."},view:{redirectionProgress:"Redirection in progress",viewType:"View type {viewType} is not supported yet.",noTeleportTag:"No teleportTag was found for part {name}.",embeddedRedirectionView:"Embedded redirection view does not support url jumping",insufficientRedirection:"Insufficient redirection parameters to jump",toDoList:"To-Do List Redirection"}}}),t("zhCn",{vue3Util:{common:{undefined:"未定义",onFoundCorrespondingPart:"未定义未找到对应部件的适配器",noFoundViewModel:"未找到视图模型",noSupportLoadingDynamic:"{codeName}无实体,暂不支持加载动态模型",invalidPointCoordinates:"点坐标无效: ({x}, {y})"},control:{unsupportedPanel:"暂未支持的面板项: {id} - {itemType}"},panelComponent:{noConfiguardDataObject:"没有配置数据对象名称",noSupportedDataSourceType:"数据源类型{dataSourceType}暂未支持",noConfiguredEntityLogic:"没有配置实体逻辑",noConfiguredEntity:"没有配置实体",noReturnValue:"实体逻辑{appDELogicId}没有返回值",noAttribute:"全局变量里没有{dataName}属性",noConfiguredScript:"没有配置脚本代码",noConfiguerdEntityBehanior:"没有配置实体行为",sessionView:"绑定视图的会话不存在{dataName}",viewStateAttribute:"视图state里没有{dataName}属性",noImplementMethod:"未执行的方法",noProvidedSlot:"未提供{id}插槽",cannotEmpty:"{caption} 不能为空",unadaptedLayout:"未适配的布局占位{layoutPos}",placeholderIdentifier:"视图{viewCodeName}的面板成员{id}的占位标识是:",refresh:"刷新",wxQrcodeCaption:"请使用微信扫描二维码登录"},plugin:{failureConfigurationLoad:"配置加载失败",failedRemotePluginLoad:"远程插件加载失败, 远程插件未找到[default]默认导出",fileContentFormat:"远程插件加载失败, 未找到文件或文件内容格式不正确"},use:{control:{parameterChanges:"{id}的上下文或视图参数变更:",stateChange:"部件 [{name}] state 变更"},focusBlur:{noFocus:"没有聚焦,不触发失焦"},view:{stateChange:"视图 [{name}] state 变更"}},util:{noInjected:"没有注入createVueApp方法",convertString:"转换成字符串失败",viewIdentifiers:"第{depth}级路由不存在视图标识",noFoundView:"找不到视图{viewCodeName}",routeCorrectly:"无法正确获取route,可能是依赖问题"},view:{redirectionProgress:"重定向跳转中",viewType:"视图类型{viewType}暂未支持",noTeleportTag:"没有找到部件{name}的teleportTag",embeddedRedirectionView:"嵌入重定向视图不支持url跳转",insufficientRedirection:"重定向参数不足无法跳转",toDoList:"待办列表重定向"}}})}}});
1
+ System.register(["qx-util","vue","@ibiz-template/core","ramda","@ibiz-template/runtime","vue-router","qs","lodash-es","pinia"],function(t){"use strict";var e,n,i,o,a,s,r,l,c,d,u,h,p,m,v,g,y,f,w,C,b,P,I,D,E,S,x,T,O,A,N,z,_,R,L,k,M,B,V,j,U,W,F,q,G,H,$,K,X,Q,Y,J,Z,tt,et,nt,it,ot,at,st,rt,lt,ct,dt,ut,ht,pt,mt,vt,gt,yt,ft,wt,Ct,bt,Pt,It,Dt,Et,St,xt,Tt,Ot,At,Nt,zt,_t,Rt,Lt,kt,Mt,Bt,Vt,jt,Ut,Wt,Ft,qt,Gt,Ht,$t,Kt,Xt,Qt,Yt,Jt,Zt,te,ee,ne,ie,oe,ae,se,re,le,ce,de,ue;return{setters:[function(t){e=t.SyncSeriesHook,n=t.AsyncSeriesHook,i=t.isFunc,o=t.notNilEmpty,a=t.QXEvent,s=t.clearAll,r=t.createUUID},function(t){l=t.watch,c=t.onBeforeUnmount,d=t.createCommentVNode,u=t.getCurrentInstance,h=t.toRaw,p=t.isReactive,m=t.inject,v=t.reactive,g=t.onActivated,y=t.onDeactivated,f=t.ref,w=t.h,C=t.resolveComponent,b=t.provide,P=t.onMounted,I=t.onUnmounted,D=t.isRef,E=t.shallowRef,S=t.watchEffect,x=t.computed,T=t.useAttrs,O=t.defineComponent,A=t.createVNode,N=t.withDirectives,z=t.resolveDirective,_=t.nextTick,R=t.mergeProps,L=t.isVNode,k=t.Teleport,M=t.renderSlot,B=t.onBeforeMount},function(t){V=t.onClickOutside,j=t.NOOP,U=t.listenJSEvent,W=t.Namespace,F=t.RuntimeError,q=t.isBase64Image,G=t.isBase64,H=t.base64ToStr,$=t.isSvg,K=t.fixJsonString,X=t.IBizContext,Q=t.ModelError,Y=t.RuntimeModelError,J=t.setAppCookie,Z=t.CoreConst,tt=t.clearAppCookie},function(t){et=t.isNil,nt=t.isNotNil,it=t.clone,ot=t.isEmpty,at=t.mergeLeft},function(e){st=e.MDControlTypes,rt=e.ViewType,lt=e.RouteConst,ct=e.getMatchResPath,dt=e.calcDeCodeNameById,ut=e.PredefinedControlRender,ht=e.ScriptFactory,pt=e.PredefinedAttributes,mt=e.ViewController,vt=e.getControlProvider,gt=e.getErrorViewProvider,yt=e.calcDynaSysParams,ft=e.getViewProvider,wt=e.useCalcOrMode,Ct=e.calcThresholdRange,bt=e.PanelContainerController,Pt=e.registerPanelItemProvider,It=e.PanelItemController,Dt=e.PanelItemState,Et=e.Modal,St=e.ViewMode,xt=e.OpenAppViewCommand,Tt=e.getEditorProvider,Ot=e.PanelItemEventName,At=e.calcDynaClass,Nt=e.getAllPanelField,zt=e.isDataContainer,_t=e.PanelContainerState,Rt=e.PanelNotifyState,Lt=e.getPanelItemProvider,kt=e.convertNavData,Mt=e.PanelData,Bt=e.PanelDataContainerEventName,Vt=e.execDELogicById,jt=e.toLocalOpenWFRedirectView,Ut=e.getControlsByView,Wt=e.getCtrlTeleportParams,Ft=e.AppDataUploadViewController,qt=e.MDCustomViewController,Gt=e.registerViewProvider,Ht=e.getDERedirectToView,$t=e.HtmlViewController,Kt=e.ViewLayoutPanelController,Xt=e.isSimpleDataContainer,Qt=e.filterPresetAttrs,Yt=e.registerControlProvider,Jt=e.ControlType,Zt=e.PanelController,te=e.RemotePluginItem,t({PanelContainerController:e.PanelContainerController,PanelContainerState:e.PanelContainerState})},function(t){ee=t.useRoute,ne=t.useRouter,ie=t.RouterView},function(t){oe=t.default},function(t){ae=t.isElement,se=t.isNumber,re=t.throttle,le=t.isObject,ce=t.isString},function(t){de=t.defineStore,ue=t.createPinia}],execute:function(){t({calcResRoutePath:xe,computedAsync:function(t,e,n){let i;i=D(n)?{evaluating:n}:n||{};const{lazy:o=!1,flush:a="pre",evaluating:s,shallow:r=!0,onError:l=j}=i,c=E(!o),d=r?E(e):f(e);let u=0;if(S(async e=>{if(!c.value)return;u++;const n=u;let i=!1;s&&Promise.resolve().then(()=>{s.value=!0});try{const o=await t(t=>{e(()=>{s&&(s.value=!1),i||t()})});n===u&&(d.value=o)}catch(t){l(t)}finally{s&&n===u&&(s.value=!1),i=!0}},{flush:a}),o)return x(()=>(c.value=!0,d.value));return d},createOverlayView:ze,generateRoutePath:async function(t,e,n,i){var o;const a=Pe(e);let s=Number(n.srfdefaulttoroutedepth||2);n.toRouteDepth?(s=n.toRouteDepth,n.toRouteDepth=void 0):ibiz.env.isMob&&"DEFAULT"===ibiz.env.mobMenuShowMode&&(a.pathNodes[0]={viewName:"home"});let r=null==i?void 0:i.srfmenuitem;!r&&a.pathNodes.length>1&&(r=null==(o=a.pathNodes[1].params)?void 0:o.srfmenuitem);if(a.pathNodes.splice(s-1,a.pathNodes.length-s+1),n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}Ee(n,a.pathNodes),e.fullPath.startsWith("/appredirectview")&&((null==i?void 0:i.srfindexname)?(a.pathNodes[0].viewName=i.srfindexname,delete i.srfindexname):a.pathNodes[0].viewName="index");if(a.pathNodes.push({viewName:t.codeName.toLowerCase(),context:De(n),params:i}),2===s&&(await xe(a,n,t.appDataEntityId,t.appId),Se.includes(t.viewType))){const e=dt(t.appDataEntityId);delete a.pathNodes[0].context[e]}if(r&&a.pathNodes.length>1){const t=a.pathNodes[1].params||{};a.pathNodes[1].params={...t,srfmenuitem:r}}return{path:Ie(a)}},generateRoutePathByModal:async function(t,e,n,i){const o=Pe(e),a=o.pathNodes.findIndex(t=>t.viewName===lt.ROUTE_MODAL_TAG);-1!==a&&(o.pathNodes=o.pathNodes.slice(0,a));if(n.currentSrfNav){const t=o.pathNodes[o.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}return Ee(n,o.pathNodes),o.pathNodes.push({viewName:"".concat(lt.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:De(n),params:i}),{path:Ie(o)}},getArrayProps:to,getAutoCompleteProps:Qi,getCascaderProps:eo,getCheckboxListProps:Li,getCheckboxProps:ki,getCodeEmits:function(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,customAction:t=>!0}},getCodeProps:Yi,getColorPickerProps:no,getDataPickerProps:Mi,getDatePickerProps:Bi,getDateRangeProps:Vi,getDateRangeSelectEmits:function(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,customAction:t=>!0,change:(t,e,n)=>!0}},getDateRangeSelectProps:ji,getDrawerPlacement:function(t){return _e[t]||"right"},getDropdownProps:Ri,getEditorEmits:Ai,getEditorProps:Oi,getGridArrayProps:function(){return{...to(),...Ni()}},getGridAutoCompleteProps:function(){return{...Qi(),...Ni()}},getGridCascaderProps:function(){return{...eo(),...Ni()}},getGridCheckboxListProps:function(){return{...Li(),...Ni()}},getGridCheckboxProps:function(){return{...ki(),...Ni()}},getGridCodeProps:function(){return{...Yi(),...Ni()}},getGridColorPickerProps:function(){return{...no(),...Ni()}},getGridDataPickerProps:function(){return{...Mi(),...Ni()}},getGridDatePickerProps:function(){return{...Bi(),...Ni()}},getGridDateRangeProps:function(){return{...Vi(),...Ni()}},getGridDateRangeSelectProps:function(){return{...Ni(),...ji()}},getGridDropdownProps:function(){return{...Ri(),...Ni()}},getGridEditorCommonProps:Ni,getGridEditorEmits:function(){return{change:(t,e,n)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...Ji(),...Ni()}},getGridInputIpProps:function(){return{...io(),...Ni()}},getGridInputNumberProps:function(){return{...oo(),...Ni()}},getGridInputProps:function(){return{...zi(),...Ni()}},getGridListBoxProps:function(){return{...Ui(),...Ni()}},getGridMapPickerProps:function(){return{...ao(),...Ni()}},getGridMarkDownProps:function(){return{...Zi(),...Ni()}},getGridNumberRangeProps:function(){return{...Wi(),...Ni()}},getGridRadioProps:function(){return{...Fi(),...Ni()}},getGridRateProps:function(){return{...qi(),...Ni()}},getGridRawProps:function(){return{...Gi(),...Ni()}},getGridSliderProps:function(){return{...Hi(),...Ni()}},getGridSpanProps:function(){return{..._i(),...Ni()}},getGridStepperProps:function(){return{...$i(),...Ni()}},getGridSwitchProps:function(){return{...Ki(),...Ni()}},getGridUploadProps:function(){return{...Xi(),...Ni()}},getHtmlEmits:function(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,customAction:t=>!0}},getHtmlProps:Ji,getInputIpProps:io,getInputNumberProps:oo,getInputProps:zi,getListBoxProps:Ui,getMapPickerProps:ao,getMarkDownEmits:function(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,customAction:t=>!0}},getMarkDownProps:Zi,getNestedRoutePath:Te,getNumberRangeProps:Wi,getOrigin:ve,getOwnRouteContext:De,getRadioProps:Fi,getRateProps:qi,getRawProps:Gi,getSliderProps:Hi,getSpanProps:_i,getStepperProps:$i,getSwitchProps:Ki,getUploadProps:Xi,isEmptyVNode:function(t){if(!Array.isArray(t))return t===ye;return 1===t.length&&t[0]===ye},onRouteChange:function(t,e){const n=ee();if(!n)throw new F(ibiz.i18n.t("vue3Util.util.routeCorrectly"));l(()=>null==n?void 0:n.fullPath,()=>{const i=Te(n,e);t({currentKey:i,fullPath:n.fullPath})},{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(ze(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(ze(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(ze(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const i=ibiz.overlay.createPopover(ze(e),void 0,n);i.present(t.target);return await i.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var i;const a=Pe(t,n);let s=a.pathNodes[e-1].viewName;if(!s)throw new F(ibiz.i18n.t("vue3Util.util.viewIdentifiers",{depth:e}));s===lt.ROUTE_MODAL_TAG&&(s=a.pathNodes[e].viewName);"index"===s&&(s=ibiz.hub.defaultAppIndexViewName);const r=await ibiz.hub.config.view.get(s);if(!r)throw new F(ibiz.i18n.t("vue3Util.util.noFoundView",{viewCodeName:s}));const l={};(null==(i=ibiz.appData)?void 0:i.context)&&Object.assign(l,ibiz.appData.context);a.appContext&&Object.assign(l,a.appContext);if(1!==e)for(let t=0;t<e;t++){const n=a.pathNodes[t];o(n.context)&&Object.assign(l,n.context),t!==e-1||n.context&&!et(n.context.srfnavctrlid)||delete l.srfnavctrlid}const{params:c,srfnav:d}=a.pathNodes[e-1];return{viewConfig:r,context:l,params:c,srfnav:d}},renderString:function(t){if(et(t))return"";if("string"==typeof t)return t;if("object"==typeof t)return JSON.stringify(t);try{return t.toString()}catch(e){ibiz.log.error(t,ibiz.i18n.t("vue3Util.util.convertString"),e)}return""},renderTooltip:Ue,route2routePath:Pe,routePath2string:Ie,shareCommonAncestor:Be,useAutoFocusBlur:function(t,e){return{useInFocusAndBlur:()=>{t.autoFocus||e("blur")},useInValueChange:()=>{t.autoFocus&&e("blur")}}},useClickOutside:pe,useCodeListListen:function(t,e,n){let i;P(async()=>{if(t){const o=await ibiz.hub.getApp(e);i=await o.codeList.getCodeListInstance(t),i&&i.onChange(n)}}),I(()=>{i&&i.offChange(n)})},useControlController:we,useControlPopoverzIndex:function(t){const{zIndex:e}=Le();t.state.zIndex=e.increment(),I(()=>{e.decrement()})},useController:function(t){t.force=ge()},useCtx:fe,useEventListener:Ce,useFilterAttribute:function(t,e,n=["class","style"]){const i={};return Object.keys(t).forEach(o=>{e?e(o)&&(i[o]=t[o]):n.includes(o)||(i[o]=t[o])}),i},useFocusAndBlur:function(t,e){const n=f(),i=f(!1);let o;const a=()=>{i.value||ibiz.log.debug(ibiz.i18n.t("vue3Util.use.focusBlur.noFocus")),e(),o.stop(),i.value=!1};return Ce(n,"click",e=>{i.value||(o=pe(n,()=>{a()}),i.value=!0,t())},{capture:!0}),{componentRef:n,isFocus:i,doBlur:a,pause:()=>{o&&o.pause()},stop:()=>{o&&o.stop()}}},useForce:ge,useForceTogether:function(t,e){const n=e.force,i=ge();e.force=t=>{n(t),i()}},useLocalCacheKey:function(t,e,n,i="@",o=""){const a=ne();return()=>{if(!a)return;const s=t.srfuserid;if(n=t.srfdefaulttoroutedepth||n){const t=Pe(a.currentRoute.value);if(s&&t.pathNodes[n-2]){t.pathNodes=t.pathNodes.slice(0,n-1),t.pathNodes.forEach(t=>{t.context&&delete t.context.srfnavctrlid});const o=Ie(t);return"".concat(e).concat(i).concat(s).concat(i).concat(o)}}return o?"".concat(e).concat(i).concat(s).concat(i).concat(o):void 0}},useMobCtx:function(){return m("ctx")},useNamespace:be,usePopoverVisible:function(t,e){let n;const i=f(!1);return l(()=>t.value,o=>{o&&!n&&(n=U(window,"click",n=>{if(i.value&&t.value){Be(e(t.value),n.target)&&(i.value=!1)}},{capture:!0}))},{immediate:!0}),I(()=>{null==n||n()}),{popoverVisible:i,setPopoverVisible:t=>{i.value=t}}},usePopoverzIndex:function(){const t="popover_".concat(r());return{popoverid:t,setPopoverZIndex:e=>{const{zIndex:n}=Le(),i=document.getElementsByClassName(t),o=n.increment();if(i&&i.length>0&&e)for(let t=0;t<i.length;t++)i[t].style.setProperty(e,"".concat(o))}}},useProps:me,usePropsWatch:function(t,e,n){const i=me();Object.prototype.hasOwnProperty.call(i,t)&&(l(()=>i[t],(t,n)=>{e(ve(t),ve(n))},n),e(ve(i[t]),void 0))},useRouteKey:function(t,e,n){n||(n=f(""));n.value=t.value;const i=new Oe(e);return l(t,(t,e)=>{t!==e&&i.nextChange(()=>{n.value=t})}),n},useRouterQuery:function(){const t=ee(),{query:e}=t;return e},useSemanticNode:We,useViewController:ke,useViewOperation:Me});class he{}function pe(t,e,n={}){let i=j,o=j,a=j;const s=()=>{i(),i=j,o=j,a=j};return l(t,(t,r)=>{if(t!==r)if(et(t))s();else{const s=V((null==t?void 0:t.$el)||t,e,n);i=s.stop,o=s.pause,a=s.proceed}},{immediate:!0}),c(()=>{i!==j&&s()}),{stop:()=>i(),pause:()=>o(),proceed:()=>a()}}function me(){return u().proxy.$props}function ve(t){return p(t)?h(t):t}function ge(){const t=u().proxy;return e=>{t.$forceUpdate(),e&&i(e)&&t.$nextTick(()=>{e()})}}t("AppHooks",he),he.createApp=new e,he.useComponent=new e,he.appResorceInited=new n,he.beforeInitApp=new n,he.authedApp=new n,he.mountedLayout=new n,he.initedApp=new n,he.destoryApp=new n;const ye=t("EmptyVNode",d("EmptyVNode"));function fe(){return m("ctx")}function we(t,e){const n=fe(),i=me();n.evt.emit("onForecast",i.modelData.name);const o=i.provider;let a;a=(null==o?void 0:o.createController)?o.createController(i.modelData,i.context,i.params,n):t(i.modelData,i.context,i.params,n),-1!==st.indexOf(a.model.controlType)&&ibiz.util.record.add(a.ctrlId,a),function(t,e){l(()=>({context:t.context,params:t.params}),(t,n)=>{if(t===n)return;const i={...t};t.context===n.context&&delete i.context,t.params===n.params&&delete i.params,e.updateContextParams(i),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)})}(i,a),function(t,e,n=[]){const i=["context","params","modelData",...n];l(()=>{const e={};return Object.keys(t).forEach(n=>{i.includes(n)||(e[n]=t[n])}),e},(t,n)=>{const i={};Object.keys(t).forEach(e=>{t[e]!==(n||{})[e]&&(i[e]=t[e])}),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.stateChange",{name:e.model.name}),i),Object.keys(i).forEach(t=>{void 0!==i[t]&&(e.state[t]=i[t])})},{immediate:!0})}(i,a,null==e?void 0:e.excludePropsKeys),a.state=v(a.state),g(()=>a.onActivated()),y(()=>a.onDeactivated()),a.force=ge();const s=u().proxy;return a.evt.onAll((t,e)=>{s.$emit(t.slice(2),e)}),s.$emit("controllerAppear",a),a.created(),c(()=>{a.destroyed(),-1!==st.indexOf(a.model.controlType)&&ibiz.util.record.remove(a.ctrlId)}),a}function Ce(t,e,n,i={}){let o=j;return l(t,(t,a)=>{t!==a&&(et(t)?(o(),o=j):o=U((null==t?void 0:t.$el)||t,e,n,i))},{immediate:!0}),c(()=>{o!==j&&o()}),()=>{o()}}function be(t){return new W(t,ibiz.env.namespace)}function Pe(t,e=!1){const n=t.matched.length;let i=t.path;e&&(i=i.replace(new RegExp("/".concat(lt.ROUTE_MODAL_TAG),"g"),""));const o=i.split("/"),a=[];for(let e=1;e<=n;e++){const n=o[2*e],i=t.params["params".concat(e)];let s,r,l;s=i&&i!==ibiz.env.routePlaceholder?oe.parse(i,{strictNullHandling:!0,delimiter:";",depth:8}):void 0,s&&(1===e?(r=s,s=void 0):(s.srfnavctx&&(r=JSON.parse(s.srfnavctx),delete s.srfnavctx),s.srfnav&&(l=s.srfnav,delete s.srfnav))),a.push({viewName:n,context:r,params:s,srfnav:l})}let s;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(s=oe.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:s,pathNodes:a}}function Ie(t){let e="";return t.appContext?e+="/".concat(oe.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach((t,n)=>{e+="/".concat(t.viewName,"/");let i={};if(0===n)o(t.context)&&(i=t.context);else{if(i=o(t.params)?t.params:{},o(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(i.srfnavctx=encodeURIComponent(e))}t.srfnav&&(i.srfnav=t.srfnav)}const a=oe.stringify(i,{delimiter:";",strictNullHandling:!0,skipNulls:!0});o(a)?e+=a:e+=ibiz.env.routePlaceholder}),e}function De(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];if(e.attributekeys){const n=e.attributekeys.split("|");n&&n.length>0&&n.forEach(n=>{nt(t[n])&&(e[n]=t[n])}),delete e.attributekeys}let i=!1;return Object.prototype.hasOwnProperty.call(e,"srfkeepnull")&&(i=!0===e.srfkeepnull||"true"===e.srfkeepnull,delete e.srfkeepnull),Object.keys(e).forEach(t=>{(n.includes(t)||!i&&et(e[t]))&&delete e[t]}),e}function Ee(t,e){let n=-1;e&&e.length>0&&(n=e.findIndex(t=>{var e;return!0===(null==(e=t.context)?void 0:e.srfreadonly)})),t.srfreadonly&&!t.getOwnContext().srfreadonly&&-1===n&&(t.srfreadonly=!0)}const Se=t("excludeViewTypes",[rt.DE_GRID_VIEW,rt.DE_GRID_EXP_VIEW,rt.DE_LIST_VIEW,rt.DE_LIST_EXP_VIEW,rt.DE_DATA_VIEW,rt.DE_DATAVIEW_EXP_VIEW,rt.DE_CALENDAR_VIEW,rt.DE_CALENDAR_EXP_VIEW,rt.DE_CHART_VIEW,rt.DE_CHART_EXP_VIEW,rt.DE_KANBAN_VIEW]);async function xe(t,e,n,i){if(n){const o=await ibiz.hub.getAppDataEntity(n,i);let a=ct(e,o);if(a||(a={path:"",keys:[o.codeName.toLowerCase()]}),a){const n=t.pathNodes[1].context,i={};a.keys.forEach(t=>{e&&Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t],n&&delete n[t])}),t.pathNodes[0].context=i}}else t.pathNodes[0].context=void 0}function Te(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const i=Pe(t);if(i.pathNodes.length<e)return t.path;i.pathNodes.length>e&&(i.pathNodes=i.pathNodes.slice(0,e));const o=i.pathNodes[e-1];return n&&delete o.srfnav,!ibiz.env.isMob&&o.context&&delete o.context.srfnavctrlid,Ie(i)}class Oe{constructor(t,e){this.callbacks=[],this.timers=[],this.wait=500,e&&(this.wait=e),l(()=>t.path,(t,e)=>{if(t!==e){if(this.callbacks.length)for(let t=0;t<this.callbacks.length;t++){(0,this.callbacks[t])()}if(this.callbacks=[],this.timers.length)for(let t=0;t<this.timers.length;t++){const e=this.timers[t];clearTimeout(e)}this.timers=[]}})}nextChange(t){t&&(this.timers.push(setTimeout(()=>{t();const e=this.callbacks.findIndex(e=>e===t);this.callbacks.splice(e,1)},this.wait)),this.callbacks.push(t))}}t("RouteListener",Oe);const Ae=t("withInstall",(t,e)=>(t.install=t=>{e(t)},t));t("hasEmptyPanelRenderer",t=>{const e=null==t?void 0:t.model.controlRenders;return!(!e||0===e.length)&&!!e.find(t=>t.id===ut.EMPTYPANEL)});class Ne{constructor(t,e,n){this.component=t,this.render=e,this.opts=n,this.evt=new a,this.init()}static createVueApp(t,e){throw new F(ibiz.i18n.t("vue3Util.util.noInjected"))}init(){const t=this,{render:e,opts:n}=this,i=document.createElement("div");let o=document.body;ae(null==n?void 0:n.appendTo)&&(o=null==n?void 0:n.appendTo),o.appendChild(i);const a=Ne.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){o.removeChild(i),t.evt.emit("dismiss",t.result)},render:()=>w(t.component,{ref:"root",opts:n,onDismiss(e){t.result=e,a.unmount()}},{default:e})});ibiz.plugin.register(a),a.mount(i),this.vm=a}async present(){return this.modal.present()}async dismiss(t){await this.modal.dismiss(t)}async onWillDismiss(){return new Promise(t=>{const e=n=>{t(n),this.evt.off("dismiss",e)};this.evt.on("dismiss",e)})}}t("OverlayContainer",Ne);function ze(t){return(e,n)=>{const i=C("IBizViewShell");return w(i,{...t,viewShellHooks:n,modal:e})}}t("OverlayPopoverContainer",class extends Ne{present(t){return this.modal.present(t)}});const _e={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class Re{constructor(t,e){this.from=t,this.to=e,this.isActivated=!1,ibiz.log.debug("openRouter: ",t,e)}onWillDismiss(){return this.promise||(this.promise=new Promise(t=>{this.resolve=t})),this.promise.then(t=>(ibiz.log.debug("onWillDismiss: ",this.from,this.to,t),t))}close(t){ibiz.log.debug("closeRouter: ",this.from,this.to,t),this.resolve&&(this.resolve(t),this.resolve=void 0)}active(){ibiz.log.debug("activeRouter: ",this.from,this.to),this.isActivated=!0}destroy(){ibiz.log.debug("destroyRouter: ",this.from,this.to),this.resolve&&(this.resolve({ok:!1}),this.resolve=void 0)}}t("routerCallback",new class{constructor(){this.map=new Map}async open(t,e,n={}){const i=t.currentRoute.value.fullPath;n.replace?t.replace({path:e}):t.push({path:e});const o=e;if(this.map.has(o)){return this.map.get(o).onWillDismiss()}const a=new Re(i,o);return this.map.set(o,a),this.scheduledDestruction(a),a.onWillDismiss()}close(t,e){const n=this.map.get(t);n&&(window.clearTimeout(n.timeout),n.timeout=void 0,n.close(e),this.map.delete(t))}active(t){const e=this.map.get(t);e&&(window.clearTimeout(e.timeout),e.timeout=void 0,e.active())}scheduledDestruction(t){t.timeout=window.setTimeout(()=>{t.timeout=void 0,t.destroy(),this.map.delete(t.to)},6e5)}}),t("useAppStore",de("appStore",()=>({appStore:v({})})));const Le=t("useUIStore",de("uiStore",()=>{const t=function(){const t=f(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}(),e=()=>ibiz.util.theme.getTheme().includes("dark")?"dark":"light",n=v({zIndex:t.zIndex,theme:e()});return ibiz.util.theme.evt.on("onChange",()=>{n.theme=e()}),{UIStore:n,zIndex:t}}));t("piniaInstance",ue());function ke(t){const e=me(),n=m("ctx",void 0);null==n||n.evt.emit("onForecast",e.modelData.name);const i=e.provider;let o;o=(null==i?void 0:i.createController)?i.createController(e.modelData,e.context,e.params,n):t(e.modelData,e.context,e.params,n),ibiz.util.viewStack.add(o.id,o),function(t,e){l(()=>({context:t.context,params:t.params}),t=>{e.context.reset({},t.context),s(e.params),Object.assign(e.params,t.params),e.handleContextParams(),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)})}(e,o),function(t,e){l(()=>t.state?{...t.state}:{},(t,n)=>{const i={};Object.keys(t).forEach(e=>{t[e]!==(n||{})[e]&&(i[e]=t[e])}),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.view.stateChange",{name:e.model.name}),i),Object.keys(i).forEach(t=>{e.state[t]=i[t]})},{immediate:!0})}(e,o),b("ctx",o.ctx),o.state=v(o.state),o.slotProps=v(o.slotProps),e.modal&&(o.modal=e.modal),g(()=>{o.onActivated(),ibiz.util.viewStack.active(o.id)}),y(()=>{o.onDeactivated(),ibiz.util.viewStack.deactivate(o.id)}),o.force=ge();const a=u().proxy;return o.evt.onAll((t,e)=>{a.$emit(t.slice(2),e)}),o.created(),c(()=>{o.destroyed(),ibiz.util.viewStack.remove(o.id)}),o}function Me(t){let e=[];P(()=>{const n=document.getElementById(t.id);n&&(e=["keydown","click"].map(e=>U(n,e,e=>{t.setOperateState("MANUAL")},{once:!0,capture:!0})))}),I(()=>{e&&e.length>0&&e.forEach(t=>{t()})})}function Be(t,e){if(!t||!e)return!1;if(t===e)return!0;const n=new Set;let i=t;for(;i;){n.add(i);const t=i.parentNode;i=!t||"BODY"!==t.nodeName&&"HTML"!==t.nodeName?t:null}for(i=e;i;){if(n.has(i))return!0;i=i.parentNode}return!1}var Ve=t("TooltipPlacement",(t=>(t.TOP="top",t.TOP_START="top-start",t.TOP_END="top-end",t.BOTTOM="bottom",t.BOTTOM_START="bottom-start",t.BOTTOM_END="bottom-end",t.LEFT="left",t.LEFT_START="left-start",t.LEFT_END="left-end",t.RIGHT="right",t.RIGHT_START="right-start",t.RIGHT_END="right-end",t))(Ve||{})),je=t("TooltipTrigger",(t=>(t.HOVER="hover",t.CLICK="click",t.FOCUS="focus",t.CONTEXTMENU="contextmenu",t))(je||{}));function Ue(t,e,n,i="".concat((t=>null==(t=e.id)?void 0:t.toLowerCase())(),"_tooltip")){const o={content:"",disabled:!0,placement:"top"},{controlRenders:a=[],id:s}=e,r="".concat(null==s?void 0:s.toLowerCase(),"_tooltip");let l=a.find(t=>t.id===i);if(l||i===r||(l=a.find(t=>t.id===r)),l)if("LAYOUTPANEL_MODEL"===l.renderType&&l.layoutPanelModel){let i=l.layoutPanelModel;i.includes("return")||(i="return (".concat(i,")")),o.content=ht.execScriptFn({...n.getEventArgs(),data:t,model:e},i,{isAsync:!1}),o.disabled=!1}else"LAYOUTPANEL"===l.renderType&&l.layoutPanel&&(o.content=w(C("IBizControlShell"),{data:t,params:n.params,context:n.context,modelData:l.layoutPanel}),o.disabled=!1);return o}function We(t){var e,n;const i=t.model.controlType,o=t.model.editorType;let a={};const s=null==(e=t.model.controlAttributes)?void 0:e.find(t=>t.attrName===pt.CLASSNAMES);if(s&&s.attrValue)if(i)a=ht.execSingleLine(s.attrValue,{...t.getEventArgs()});else if(o){const e=t;a=ht.execSingleLine(s.attrValue,{...e.ctrl.getEventArgs()})}else{const e=t;a=ht.execSingleLine(s.attrValue,{data:[e.data],value:e.data[e.model.id]})}const r=T();r.classNames&&(a={...a,...r.classNames});let l={};const c=null==(n=t.model.controlAttributes)?void 0:n.find(t=>t.attrName===pt.STYLES);if(c&&c.attrValue)if(i)l=ht.execSingleLine(c.attrValue,{...t.getEventArgs()});else if(o){const e=t;l=ht.execSingleLine(c.attrValue,{...e.ctrl.getEventArgs()})}else{const e=t;l=ht.execSingleLine(c.attrValue,{data:[e.data],value:e.data[e.model.id]})}r.styles&&(l={...l,...r.styles});return{semanticClass:(e,...n)=>{const i=null==a?void 0:a[e];if(void 0!==i)return"string"==typeof i?i:i(t,...n)},semanticStyle:(e,...n)=>{const i=null==l?void 0:l[e];if(void 0!==i){if("string"==typeof i){return i.split(";").reduce((t,e)=>{if(0===e.trim().length)return t;const[n,i]=e.split(":");return t[n.trim()]=i.trim(),t},{})}return i(t,...n)}}}}t("IBizIcon",O({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=be("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const i=x(()=>function(t){if(t){if(t.htmlStr)return A("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")||-1!==t.cssClass.indexOf("theme-icon")?A("i",{class:[e.b(),t.cssClass]},null):A("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return q(t.imagePath)?A("img",{class:e.b(),src:t.imagePath},null):G(t.imagePath)?A("div",{class:[e.b(),e.e("emoji")]},[H(t.imagePath)]):$(t.imagePath)?A("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?A("img",{class:e.b(),src:t.imagePath},null):t.imagePath.startsWith(ibiz.env.assetsUrl)?A("ion-icon",{src:t.imagePath,class:e.b()},null):A("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")||t.imagePath.startsWith(ibiz.env.assetsUrl)?A("img",{class:e.b(),src:t.imagePath},null):A("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return $(t.rawContent)?A("div",{class:e.b(),innerHTML:t.rawContent},null):A("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon));return()=>i.value}})),t("IBizRouterView",O({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:e}){const n={};let i=!0;l(()=>t.manualKey,(t,e)=>{nt(t)&&t!==e&&(i=!0)});return{renderComp:(o,a)=>{if(!i)return n.vNode;if(i=!1,o){const i={...o.props};delete i.onVnodeUnmounted,delete i.ref;const a=w(o.type,{...i,...e,key:t.manualKey});return n.vNode=a,a}}}},render(){return A(C("router-view"),{name:this.name,route:this.route},{default:({Component:t,route:e})=>{const n=this.renderComp(t,e);return this.$slots.default?this.$slots.default({Component:n,route:e}):n}})}})),t("IBizControlBase",O({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=be("control"),{controlType:n,sysCss:i,codeName:o}=t.controller.model,a=n.toLowerCase(),s=null==i?void 0:i.cssName,r=t.controller.model,l=t.controller.model.controls,c=v({});!1===r.controlType.endsWith("EXPBAR")&&(et(r.width)||(r.width>0&&r.width<=1?c.width="".concat(100*r.width,"%"):c.width="".concat(r.width,"px")),et(r.height)||(r.height>0&&r.height<=1?c.width="".concat(100*r.height,"%"):c.height="".concat(r.height,"px")));const d=async(e,n)=>{e.stopPropagation();const i=e.target.getAttribute(n),o=e.target.getAttribute("data"),a=t.controller.context.clone(),s=e.target.getAttribute("context");s&&Object.assign(a,K(s));const r={...t.controller.params},l=e.target.getAttribute("params");l&&Object.assign(r,K(l)),i&&await ht.asyncExecScriptFn({...t.controller.getEventArgs(),context:a,params:r,data:o?K(o):null},i)},u=x(()=>(n=>{var i;let o=r.controlRenders?r.controlRenders.filter(t=>!Object.values(ut).includes(t.id)&&"LAYOUTPANEL_MODEL"===t.renderType):void 0;if(o&&o.length>0&&"DASHBOARD"===r.controlType&&(o=o.filter(t=>!(t.id.endsWith("_header")||t.id.endsWith("_header_caption")||t.id.endsWith("_header_bg")||t.id.endsWith("_header_action")))),!o||0===o.length)return;const a=o[0];if(a.layoutPanelModel){const o=ht.execScriptFn({...t.controller.getEventArgs(),data:n},a.layoutPanelModel,{isAsync:!1});return A("div",{innerHTML:o,onClick:t=>d(t,"click"),onDblclick:t=>d(t,"dbclick"),class:[e.e("control-render"),e.e(null==(i=a.renderName)?void 0:i.toLowerCase())]},null)}})(t.controller.data||t.controller.items));return{ns:e,typeClass:a,sysCssName:s,inlineStyle:c,codeName:o,controls:l,customRender:u,disableMaskInfoRender:()=>{const n=r.controlRenders?r.controlRenders.find(t=>t.id===ut.DISABLEPANEL):void 0;if(!n)return A("div",{innerHTML:t.controller.state.maskOption.maskInfo||"",class:[e.e("disable-mask-text")]},null);if("LAYOUTPANEL_MODEL"===n.renderType&&n.layoutPanelModel){const i=ht.execScriptFn({...t.controller.getEventArgs()},n.layoutPanelModel,{isAsync:!1,singleRowReturn:!0});return A("div",{innerHTML:i,class:[e.e("disable-mask-text")]},null)}return"LAYOUTPANEL"===n.renderType&&n.layoutPanel?A(C("iBizControlShell"),{class:[e.e("disable-mask-text")],data:{},params:t.controller.params,context:t.controller.context,modelData:n.layoutPanel},null):void 0},onLayoutPanelCreated:e=>{t.controller.setLayoutPanel(e)}}},render(){var t,e,n;const{state:i,controlPanel:o,providers:a}=this.controller;let s=null;if(i.isCreated&&o){const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach(t=>{const n=t.name,i={context:this.controller.context,params:this.controller.params},o=e[n];e[n]=o?()=>o(i):()=>{const e=C("IBizControlShell");return w(e,{modelData:t,...i})}});const n=a[o.name];s=w(C(n.component),{modelData:o,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return A("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName,this.ns.is("disabled",i.disabled),this.ns.is("mob",ibiz.env.isMob)],style:this.inlineStyle},[this.customRender||s||(null==(n=(e=this.$slots).default)?void 0:n.call(e)),i.disabled&&A("div",{class:[this.ns.e("mask-container"),this.ns.m(i.maskOption.mode.toLowerCase())]},["MASK"===i.maskOption.mode&&this.disableMaskInfoRender()])])}})),t("IBizControlShell",O({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){const e=m("ctx");if(e)e.evt.emit("onForecast",t.modelData.name);else{const t={name:"AppView",id:"AppView",viewType:rt.DE_CUSTOM_VIEW,appId:ibiz.env.appId};b("ctx",new mt(t,X.create({})).ctx)}const n=f(!1),i=f(""),o=f();vt(t.modelData).then(t=>{t?o.value=t:i.value=ibiz.i18n.t("vue3Util.common.onFoundCorrespondingPart"),n.value=!0}).catch(t=>{ibiz.log.error(t),i.value=t.message,n.value=!0});return{ns:be("control-shell"),isComplete:n,errMsg:i,provider:o}},render(){return this.isComplete&&this.provider?w(C(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):N(A("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[z("loading"),!this.isComplete]])}})),t("IBizViewShell",O({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String},ctx:{type:Object},viewShellHooks:{type:Object}},setup(t,{attrs:e}){const n=be("view-shell"),i=f(!1),o=f(""),a=f(),s=f(),c=f(!0);t.ctx&&b("ctx",t.ctx);const d=f(t.context),u=f(t.params||{});let h="";l(()=>({context:t.context,params:t.params}),t=>{d.value=t.context,u.value=t.params?t.params:{}});let p;const m=t=>{const e=it(t);return e.srfdatatype&&delete e.srfdatatype,JSON.stringify(e)},v=async()=>{try{if(await(async()=>{p=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId)})(),!p)throw new F(ibiz.i18n.t("vue3Util.common.noFoundViewModel"));if(c.value=await(async t=>{let e=!0;const{accessKey:n}=t;let{accUserMode:i}=t;const o=ibiz.auth.getAuthInfo();switch((et(i)||0===i)&&(i=ibiz.config.view.viewAccUserMode),i){case 1:o&&!o.isAnonymous&&(e=!1);break;case 2:(!o||o&&o.isAnonymous)&&(e=!1);break;case 4:o&&!o.isAnonymous&&n&&(await ibiz.hub.getApp(d.value.srfappid)).authority.calcByResCode(n)||(e=!1)}return e})(p),!c.value)return;if(1===p.dynaSysMode){const t=p.appDataEntityId;if(!t)throw new F(ibiz.i18n.t("vue3Util.common.noSupportLoadingDynamic",{codeName:p.codeName}));const e=await yt(t,d.value,{viewParams:u.value,appId:p.appId});if(u.value.srfdatatype&&(e.srfdatatype=u.value.srfdatatype),u.value.srfwftag)e.srfwftag=u.value.srfwftag;else if(t&&p.enableWF&&e.srfkey){const n=et(d.value.srfsessionid)||ot(d.value.srfsessionid),i=r();if(n){const e=ibiz.uiDomainManager.create(i,t);d.value.srfsessionid=e.id}const o=ibiz.hub.getApp(p.appId);d.value.srfappid||(d.value.srfappid=p.appId);const a=await o.deService.getService(d.value,t),s=await a.get(d.value,u.value||{});if(s.ok&&s.data){const{srfwftag:t,processdefinitionkey:n,taskdefinitionkey:i}=s.data;t&&(e.srfwftag=t),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW","DEMOBWFDYNAEDITVIEW3","DEMOBWFDYNAEDITVIEW"].includes(p.viewType)&&(et(u.value.processDefinitionKey)&&(u.value.processDefinitionKey=n),et(u.value.taskDefinitionKey)&&(u.value.taskDefinitionKey=i))}n&&(ibiz.uiDomainManager.destroy(i),d.value.srfsessionid="")}if(m(e)===h)return void setTimeout(()=>{i.value=!0});s.value=await ibiz.hub.loadAppView(p.appId,p.id,e),h=m(e)}else s.value=p;a.value=await ft(p)}catch(t){ibiz.log.error(t),o.value=t.message}finally{i.value=!0}};v();return{ns:n,errMsg:o,provider:a,isComplete:i,hasAuthority:c,viewModelData:s,redrawView:async t=>{i.value=!1;const{redrawData:n}=t,{isReloadModel:o}=n;Object.assign(d.value,n.context),Object.assign(u.value,n.params);const a=e.modal;a&&(a.hooks.preDismiss.clear(),a.hooks.shouldDismiss.clear(),a.hooks.beforeDismiss.clear()),o?await v():setTimeout(()=>{i.value=!0})},onCreated:e=>{t.viewShellHooks&&t.viewShellHooks.hooks.viewCreated.call(e)},curContext:d,curParams:u}},render(){if(this.isComplete&&this.provider&&this.hasAuthority)return w(C(this.provider.component),{context:this.curContext,params:this.curParams,modelData:it(this.viewModelData),...this.$attrs,provider:this.provider,onRedrawView:this.redrawView,onCreated:this.onCreated},this.$slots);if(!this.hasAuthority){const t=gt("403");if(t)return"string"==typeof t.component?w(C(t.component)):w(t.component)}return N(A("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[z("loading"),!this.isComplete]])}})),t("IBizCodeList",O({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]},convertToCodeItemText:{type:Boolean,default:!0},valueFormat:{type:String},unitName:{type:String},showMode:{type:String,default:"DEFAULT"}},emits:{infoTextChange:t=>!0},setup(t,{emit:e}){var n,i;const o=be("code-list"),a=f([]),s=(null==(n=t.codeList)?void 0:n.textSeparator)||"、",r=(null==(i=t.codeList)?void 0:i.valueSeparator)||",",c=x(()=>t.codeList&&t.codeList.orMode?t.codeList.orMode:"STR"),d=wt(c.value);l(a,t=>{let n="";t.length>0&&(n=t.map(t=>t.text).join(s)),e("infoTextChange",n)});const u=(e,n)=>{if(e){const{thresholdGroup:i}=t.codeList;if(i&&se(Number(n))){const t=Ct(e,Number(n));if(t)return t}const o=e.find(t=>t.value==n);if(o)return o;for(let t=0;t<e.length;t++){const i=u(e[t].children,n);if(i)return i}}};l([()=>t.codeListItems,()=>t.value],([e,n],[i,o])=>{if(et(n)||""===n)a.value=[];else{let i=[];const{getSelectArray:o}=d,s=o(n,t.codeList,e,r,t.codeList.codeItemValueNumber);s&&(i=s),a.value=i.map(n=>{const i=u(e,n);let o=n;if(t.convertToCodeItemText&&(null==i?void 0:i.text))o=i.text;else{const{valueFormat:e,unitName:n}=t;e&&(o=ibiz.util.text.format("".concat(o),e)),n&&(o+=n)}return{text:o,color:null==i?void 0:i.color,textCls:null==i?void 0:i.textCls,sysImage:null==i?void 0:i.sysImage}})}},{immediate:!0});const h=t.codeList.emptyText!==ibiz.i18n.t("vue3Util.common.undefined")&&t.codeList.emptyText?t.codeList.emptyText:ibiz.config.common.emptyText;return{items:a,ns:o,emptyText:h,textSeparator:s}},render(){return A("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map((t,e)=>[0!==e?this.textSeparator:null,A("span",{class:[this.ns.e("item"),t.textCls?t.textCls:null],style:t.color?this.ns.cssVarBlock({"item-color":"".concat(t.color)}):null},["TEXT"!==this.showMode&&t.sysImage&&A(C("iBizIcon"),{icon:t.sysImage},null),"ICON"!==this.showMode&&t.text])])])}})),t("ControlLoadingPlaceholder",O({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(m("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null})),t("IBizBadge",O({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"},max:{type:Number},counterMode:{type:Number}},setup:t=>({ns:be("badge"),maxValue:x(()=>t.max?t.max:ibiz.config.common.counterMaxValue)}),render(){if((this.value||0===this.value)&&!(1===this.counterMode&&this.value<=0))return A("div",{class:[this.ns.b(),this.ns.m(this.type),this.ns.is("mob",ibiz.env.isMob)]},[this.value>this.maxValue?"".concat(this.maxValue,"+"):this.value])}})),t("IBizCustomRender",O({name:"IBizCustomRender",props:{controller:{type:Object,required:!0}},setup(t){const e=be("custom-render"),n=async(e,n)=>{e.stopPropagation();const i=e.target.getAttribute(n),o=e.target.getAttribute("data"),a=t.controller.context.clone(),s=e.target.getAttribute("context");s&&Object.assign(a,K(s));const r={...t.controller.params},l=e.target.getAttribute("params");l&&Object.assign(r,K(l)),i&&await ht.asyncExecScriptFn({...t.controller.getEventArgs(),context:a,params:r,data:o?K(o):null},i)};return{ns:e,getControlRender:()=>{var i,o,a;const s=null==(i=t.controller)?void 0:i.model.controlRenders;if(!s||0===s.length)return;const r=s.find(t=>t.id===ut.EMPTYPANEL);if(r){if("LAYOUTPANEL_MODEL"===r.renderType&&r.layoutPanelModel){const i=ht.execScriptFn({...t.controller.getEventArgs()},r.layoutPanelModel,{isAsync:!1});return A("div",{innerHTML:i,onClick:t=>n(t,"click"),onDblclick:t=>n(t,"dbclick"),class:[e.b(),e.e(null==(o=r.renderName)?void 0:o.toLowerCase())]},null)}return"LAYOUTPANEL"===r.renderType&&r.layoutPanel?A(C("iBizControlShell"),{class:[e.b(),e.e(null==(a=r.renderName)?void 0:a.toLowerCase())],params:t.controller.params,context:t.controller.context,modelData:r.layoutPanel},null):void 0}}}},render(){return this.getControlRender()}}));class Fe{constructor(t,e,n,i){if(Number.isNaN(t)||Number.isNaN(e))throw new Error(ibiz.i18n.t("vue3Util.common.invalidPointCoordinates",{x:t,y:e}));this.x=+t,this.y=+e,this.pressure=n||0,this.time=i||Date.now()}distanceTo(t){return Math.sqrt((this.x-t.x)**2+(this.y-t.y)**2)}equals(t){return this.x===t.x&&this.y===t.y&&this.pressure===t.pressure&&this.time===t.time}velocityFrom(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):0}}class qe{constructor(t,e,n,i,o,a){this.startPoint=t,this.control2=e,this.control1=n,this.endPoint=i,this.startWidth=o,this.endWidth=a}static fromPoints(t,e){const n=this.calculateControlPoints(t[0],t[1],t[2]).c2,i=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new qe(t[1],n,i,t[2],e.start,e.end)}static calculateControlPoints(t,e,n){const i=t.x-e.x,o=t.y-e.y,a=e.x-n.x,s=e.y-n.y,r=(t.x+e.x)/2,l=(t.y+e.y)/2,c=(e.x+n.x)/2,d=(e.y+n.y)/2,u=Math.sqrt(i*i+o*o),h=Math.sqrt(a*a+s*s),p=u+h===0?0:h/(u+h),m=c+(r-c)*p,v=d+(l-d)*p,g=e.x-m,y=e.y-v;return{c1:new Fe(r+g,l+y),c2:new Fe(c+g,d+y)}}length(){let t,e,n=0;for(let i=0;i<=10;i+=1){const o=i/10,a=this.point(o,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),s=this.point(o,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(i>0){const i=a-t,o=s-e;n+=Math.sqrt(i*i+o*o)}t=a,e=s}return n}point(t,e,n,i,o){return e*(1-t)*(1-t)*(1-t)+3*n*(1-t)*(1-t)*t+3*i*(1-t)*t*t+o*t*t*t}}class Ge{constructor(t,e={}){var n,i,o;this.canvas=t,this._drawingStroke=!1,this._isEmpty=!0,this._isRedrawn=!1,this._oldFromDataURL="",this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this.velocityFilterWeight=e.velocityFilterWeight||.7,this.minWidth=e.minWidth||2,this.maxWidth=e.maxWidth||2,this.throttle=null!=(n=e.throttle)?n:16,this.minDistance=null!=(i=e.minDistance)?i:5,this.dotSize=e.dotSize||0,this.penColor=e.penColor||"black",this.backgroundColor=e.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=e.compositeOperation||"source-over",this.canvasContextOptions=null!=(o=e.canvasContextOptions)?o:{},this._strokeMoveUpdate=this.throttle?re(Ge.prototype._strokeUpdate,this.throttle):Ge.prototype._strokeUpdate,this._handleMouseDown=this._handleMouseDown.bind(this),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handlePointerDown=this._handlePointerDown.bind(this),this._handlePointerMove=this._handlePointerMove.bind(this),this._handlePointerUp=this._handlePointerUp.bind(this),this._ctx=t.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:t,canvas:e}=this;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0,this._strokePointerId=void 0,this._oldFromDataURL=""}async fromDataURL(t,e={}){let n=t;return se(e.rotation)&&0!==e.rotation&&(n=await this.rotateDataURL(n,e.rotation,"image/png")),new Promise((t,i)=>{const o=new Image,a=e.ratio||window.devicePixelRatio||1,s=e.width||this.canvas.width/a,r=e.height||this.canvas.height/a,l=e.xOffset||0,c=e.yOffset||0;this._reset(this._getPointGroupOptions()),o.onload=()=>{this._ctx.drawImage(o,l,c,s,r),t()},o.onerror=t=>{i(t)},o.crossOrigin="anonymous",o.src=n,this._oldFromDataURL=n,this._isEmpty=!1})}rotateDataURL(t,e=0,n="image/png",i){return new Promise((o,a)=>{const s=new Image;s.onload=()=>{const t=e*Math.PI/180,a=s.width,r=s.height,l=document.createElement("canvas"),c=l.getContext("2d");e%180==0?(l.width=a,l.height=r):(l.width=r,l.height=a),c.translate(l.width/2,l.height/2),c.rotate(t),c.drawImage(s,-a/2,-r/2),o(l.toDataURL(n,i))},s.onerror=a,s.crossOrigin="anonymous",s.src=t})}undoLastStep(){const t=[...this._data],e=this._oldFromDataURL;this.clear(),this._isRedrawn=!0,0!==t.length?(t.pop(),this.fromDataURL(e),this.fromData(t,{clear:!1}),this._isEmpty=t.length<=0):this._oldFromDataURL=""}getCurrentOrientation(){const{screen:t}=window,e=t.orientation||t.mozOrientation||t.msOrientation;let n=0;e&&(n=e.angle);const i=window.innerWidth>window.innerHeight;return{isLandscape:i,status:i?"横屏":"竖屏",angle:n,orientation:{0:"DEFAULT",90:"Rotated right","-90":"Rotated left",180:"Upside down"}["".concat(n)]||"未知 (".concat(n,"°)")}}toDataURL(t="image/png",e={}){return"image/svg+xml"===t?(le(null==e?void 0:e.encoderOptions)&&(e.encoderOptions=void 0),"data:image/svg+xml;base64,".concat(btoa(this.toSVG(null==e?void 0:e.encoderOptions)))):this.toCanvasDataURL(t,e.encoderOptions,e.rotation)}toCanvasDataURL(t="image/png",e,n){if("number"!=typeof e&&(e=void 0),se(n)&&0!==n){const i=n*Math.PI/180,o=document.createElement("canvas"),a=o.getContext("2d"),s=this.canvas.width,r=this.canvas.height;return n%180==0?(o.width=s,o.height=r):(o.width=r,o.height=s),a.translate(o.width/2,o.height/2),a.rotate(i),a.drawImage(this.canvas,-s/2,-r/2),o.toDataURL(t,e)}return this.canvas.toDataURL(t,e)}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";const t=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!t?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){var t;const e=window.document===this.canvas.ownerDocument?window:null!=(t=this.canvas.ownerDocument.defaultView)?t:this.canvas.ownerDocument;return{addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}_removeMoveUpEventListeners(){const{removeEventListener:t}=this._getListenerFunctions();t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp),t("mousemove",this._handleMouseMove),t("mouseup",this._handleMouseUp),t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}isRedrawn(){return this._isRedrawn}fromData(t,{clear:e=!0}={}){e&&this.clear(),this._fromData(t,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(t)}toData(){return this._data}_isLeftButtonPressed(t,e){return e?1===t.buttons:!(1&~t.buttons)}_pointerEventToSignatureEvent(t){return{event:t,type:t.type,x:t.clientX,y:t.clientY,pressure:"pressure"in t?t.pressure:0}}_touchEventToSignatureEvent(t){const e=t.changedTouches[0];return{event:t,type:t.type,x:e.clientX,y:e.clientY,pressure:e.force}}_handleMouseDown(t){this._isLeftButtonPressed(t,!0)&&!this._drawingStroke&&this._strokeBegin(this._pointerEventToSignatureEvent(t))}_handleMouseMove(t){this._isLeftButtonPressed(t,!0)&&this._drawingStroke?this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t)):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1)}_handleMouseUp(t){this._isLeftButtonPressed(t)||this._strokeEnd(this._pointerEventToSignatureEvent(t))}_handleTouchStart(t){1!==t.targetTouches.length||this._drawingStroke||(t.cancelable&&t.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(t)))}_handleTouchMove(t){1===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._drawingStroke?this._strokeMoveUpdate(this._touchEventToSignatureEvent(t)):this._strokeEnd(this._touchEventToSignatureEvent(t),!1))}_handleTouchEnd(t){0===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(t)))}_getPointerId(t){return(null==t?void 0:t.persistentDeviceId)||t.pointerId}_allowPointerId(t,e=!1){return void 0===this._strokePointerId?e:this._getPointerId(t)===this._strokePointerId}_handlePointerDown(t){!this._drawingStroke&&this._isLeftButtonPressed(t)&&this._allowPointerId(t,!0)&&(this._strokePointerId=this._getPointerId(t),t.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(t)))}_handlePointerMove(t){this._allowPointerId(t)&&(this._isLeftButtonPressed(t,!0)&&this._drawingStroke?(t.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t))):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1))}_handlePointerUp(t){!this._isLeftButtonPressed(t)&&this._allowPointerId(t)&&(t.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(t)))}_getPointGroupOptions(t){return{penColor:t&&"penColor"in t?t.penColor:this.penColor,dotSize:t&&"dotSize"in t?t.dotSize:this.dotSize,minWidth:t&&"minWidth"in t?t.minWidth:this.minWidth,maxWidth:t&&"maxWidth"in t?t.maxWidth:this.maxWidth,velocityFilterWeight:t&&"velocityFilterWeight"in t?t.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:t&&"compositeOperation"in t?t.compositeOperation:this.compositeOperation}}_strokeBegin(t){const{addEventListener:e}=this._getListenerFunctions();switch(t.event.type){case"mousedown":e("mousemove",this._handleMouseMove,{passive:!1}),e("mouseup",this._handleMouseUp,{passive:!1});break;case"touchstart":e("touchmove",this._handleTouchMove,{passive:!1}),e("touchend",this._handleTouchEnd,{passive:!1});break;case"pointerdown":e("pointermove",this._handlePointerMove,{passive:!1}),e("pointerup",this._handlePointerUp,{passive:!1})}this._drawingStroke=!0;const n=this._getPointGroupOptions(),i={...n,points:[]};this._data.push(i),this._reset(n),this._strokeUpdate(t)}_strokeUpdate(t){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(t);const e=this._createPoint(t.x,t.y,t.pressure),n=this._data[this._data.length-1],i=n.points,o=i.length>0&&i[i.length-1],a=!!o&&e.distanceTo(o)<=this.minDistance,s=this._getPointGroupOptions(n);if(!o||!o||!a){const t=this._addPoint(e,s);o?t&&this._drawCurve(t,s):this._drawDot(e,s),i.push({time:e.time,x:e.x,y:e.y,pressure:e.pressure})}}_strokeEnd(t,e=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(e&&this._strokeUpdate(t),this._drawingStroke=!1,this._strokePointerId=void 0)}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown,{passive:!1})}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown,{passive:!1})}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart,{passive:!1})}_reset(t){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(t.minWidth+t.maxWidth)/2,this._ctx.fillStyle=t.penColor,this._ctx.globalCompositeOperation=t.compositeOperation}_createPoint(t,e,n){const i=this.canvas.getBoundingClientRect();return new Fe(t-i.left,e-i.top,n,(new Date).getTime())}_addPoint(t,e){const{_lastPoints:n}=this;if(n.push(t),n.length>2){3===n.length&&n.unshift(n[0]);const t=this._calculateCurveWidths(n[1],n[2],e),i=qe.fromPoints(n,t);return n.shift(),i}return null}_calculateCurveWidths(t,e,n){const i=n.velocityFilterWeight*e.velocityFrom(t)+(1-n.velocityFilterWeight)*this._lastVelocity,o=this._strokeWidth(i,n),a={end:o,start:this._lastWidth};return this._lastVelocity=i,this._lastWidth=o,a}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,n){const i=this._ctx;i.moveTo(t,e),i.arc(t,e,n,0,2*Math.PI,!1),this._isEmpty=!1,this._isRedrawn=!0}_drawCurve(t,e){const n=this._ctx,i=t.endWidth-t.startWidth,o=2*Math.ceil(t.length());n.beginPath(),n.fillStyle=e.penColor;for(let n=0;n<o;n+=1){const a=n/o,s=a*a,r=s*a,l=1-a,c=l*l,d=c*l;let u=d*t.startPoint.x;u+=3*c*a*t.control1.x,u+=3*l*s*t.control2.x,u+=r*t.endPoint.x;let h=d*t.startPoint.y;h+=3*c*a*t.control1.y,h+=3*l*s*t.control2.y,h+=r*t.endPoint.y;const p=Math.min(t.startWidth+r*i,e.maxWidth);this._drawCurveSegment(u,h,p)}n.closePath(),n.fill()}_drawDot(t,e){const n=this._ctx,i=e.dotSize>0?e.dotSize:(e.minWidth+e.maxWidth)/2;n.beginPath(),this._drawCurveSegment(t.x,t.y,i),n.closePath(),n.fillStyle=e.penColor,n.fill()}_fromData(t,e,n){for(const i of t){const{points:t}=i,o=this._getPointGroupOptions(i);if(t.length>1)for(let n=0;n<t.length;n+=1){const i=t[n],a=new Fe(i.x,i.y,i.pressure,i.time);0===n&&this._reset(o);const s=this._addPoint(a,o);s&&e(s,o)}else this._reset(o),n(t[0],o)}}toSVG({includeBackgroundColor:t=!1}={}){const e=this._data,n=Math.max(window.devicePixelRatio||1,1),i=this.canvas.width/n,o=this.canvas.height/n,a=document.createElementNS("http://www.w3.org/2000/svg","svg");if(a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),a.setAttribute("viewBox","".concat(0," ").concat(0," ").concat(i," ").concat(o)),a.setAttribute("width",i.toString()),a.setAttribute("height",o.toString()),t&&this.backgroundColor){const t=document.createElement("rect");t.setAttribute("width","100%"),t.setAttribute("height","100%"),t.setAttribute("fill",this.backgroundColor),a.appendChild(t)}return this._fromData(e,(t,{penColor:e})=>{const n=document.createElement("path");if(!(Number.isNaN(t.control1.x)||Number.isNaN(t.control1.y)||Number.isNaN(t.control2.x)||Number.isNaN(t.control2.y))){const i="M ".concat(t.startPoint.x.toFixed(3),",").concat(t.startPoint.y.toFixed(3)," ")+"C ".concat(t.control1.x.toFixed(3),",").concat(t.control1.y.toFixed(3)," ")+"".concat(t.control2.x.toFixed(3),",").concat(t.control2.y.toFixed(3)," ")+"".concat(t.endPoint.x.toFixed(3),",").concat(t.endPoint.y.toFixed(3));n.setAttribute("d",i),n.setAttribute("stroke-width",(2.25*t.endWidth).toFixed(3)),n.setAttribute("stroke",e),n.setAttribute("fill","none"),n.setAttribute("stroke-linecap","round"),a.appendChild(n)}},(t,{penColor:e,dotSize:n,minWidth:i,maxWidth:o})=>{const s=document.createElement("circle"),r=n>0?n:(i+o)/2;s.setAttribute("r",r.toString()),s.setAttribute("cx",t.x.toString()),s.setAttribute("cy",t.y.toString()),s.setAttribute("fill",e),a.appendChild(s)}),a.outerHTML}blobToDataURL(t){return new Promise((e,n)=>{const i=new FileReader;i.onload=()=>{e(i.result)},i.onerror=()=>{n(new Error("无法转换Blob为DataURL"))},i.readAsDataURL(t)})}loadImage(t,e){const n=new Image;n.onload=()=>e(),n.onerror=()=>e,n.src=t}}t("IBizSignaturePad",O({name:"IBizSignaturePad",props:{options:{type:Object}},setup(t){const e=be("signature-pad"),n=f(),i=f(),o=f(),a=()=>{const e={};if(t.options){const{dotsize:n,minwidth:i,maxwidth:o,pencolor:a,velocityfilterweight:s,compositeoperation:r,mindistance:l,backgroundcolor:c,throttle:d,canvascontextoptions:u}=t.options;if(n&&Object.assign(e,{dotSize:Number(n)}),i&&Object.assign(e,{minWidth:Number(i)}),o&&Object.assign(e,{maxWidth:Number(o)}),s&&Object.assign(e,{velocityFilterWeight:Number(s)}),l&&Object.assign(e,{minDistance:Number(l)}),d&&Object.assign(e,{throttle:Number(d)}),a&&Object.assign(e,{penColor:String(a)}),r&&Object.assign(e,{compositeOperation:String(r)}),c&&Object.assign(e,{backgroundColor:String(c)}),u){let t=u;if(ce(u))try{t=JSON.parse(u)}catch(e){ibiz.log.error(e),t=void 0}Object.assign(e,{canvasContextOptions:{...t}})}}return e},s=t=>{t.preventDefault()},r=t=>{_(()=>{const e=i.value,r=n.value;if(!e)return;const l=window.devicePixelRatio||1,c=r.getBoundingClientRect(),d=c.width<300?300:c.width,u=c.height<150?150:c.height;e.width=d*l,e.height=u*l,e.style.width="".concat(d,"px"),e.style.height="".concat(u,"px"),o.value=new Ge(e,{...a()});e.getContext("2d").scale(l,l),e.addEventListener("touchstart",s,{passive:!1}),e.addEventListener("touchmove",s,{passive:!1}),null==t||t()})},l=t=>r(t),c=()=>{o.value&&(o.value.off(),l())};return P(()=>{r(),window.addEventListener("resize",c)}),I(()=>{window.removeEventListener("resize",c)}),{ns:e,canvasRef:i,signaturePadRef:n,signaturePad:o,updateSignaturePad:l}},render(){return A("div",{class:this.ns.b(),ref:"signaturePadRef"},[A("div",{class:this.ns.e("container")},[A("canvas",{ref:"canvasRef"},null)])])}}));function He(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)}const $e=O({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:bt,required:!0}},setup(t){const e=be("panel-container"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller),a=x(()=>{let i=[e.b(),e.m(n)];return i=[...i,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],i});return{ns:e,classArr:a,semanticClass:i,semanticStyle:o}},render(){var t,e,n;let i;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=A(C("iBizRow"),{slot:"content",class:this.semanticClass("content"),style:this.semanticStyle("content"),layout:this.modelData.layout},He(i=o.map(t=>{const e=t.props;return e&&e.controller?A(C("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state,class:this.semanticClass("item",{props:e}),style:this.semanticStyle("item",{props:e})},He(t)?t:{default:()=>[t]}):t}))?i:{default:()=>[i]}),s=null==(n=this.$attrs)?void 0:n.attrs;if(s&&s.dynamictooltip){const t={...s.dynamictooltip};return delete t.content,A(C("el-tooltip"),R({placement:"right","popper-class":this.ns.e("dynamic-tooltip")},t),{default:()=>A("div",R({class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),onClick:()=>{this.controller.onClick()}},this.$attrs),[this.controller.model.cssStyle?A("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a]),content:()=>A("div",{class:[this.ns.e("dynamic-tooltip-content"),this.semanticClass("tooltip")],style:this.semanticStyle("tooltip"),innerHTML:s.dynamictooltip.content},null)})}return N(A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),"element-loading-text":this.controller.state.loadingText,onClick:t=>this.controller.onClick(t)},[this.controller.model.cssStyle?A("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a]),[[z("loading"),this.controller.state.loading]])}});class Ke{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const i=new bt(t,e,n);return await i.init(),i}}t("IBizPanelContainer",Ae($e,function(t){t.component($e.name,$e),Pt("CONTAINER",()=>new Ke),Pt("CONTAINER_DEFAULT",()=>new Ke)}));const Xe=O({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=be("panel-ctrl-pos"),{semanticClass:n,semanticStyle:i}=We(t.controller);return m("ctx").evt.on("onRegister",(e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}),{ns:e,semanticClass:n,semanticStyle:i}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),A("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),this.semanticClass("root"),...this.controller.containerClass,this.ns.is("hidden",!t.visible)],style:this.semanticStyle("root")},[e||(ibiz.env.dev?ibiz.i18n.t("vue3Util.panelComponent.noProvidedSlot",{id:this.modelData.id}):"")])}});class Qe extends It{bindControl(t){this.control=t,t.evt.onAll((t,e)=>{this.panel.evt.emit("onControlEvent",{triggerControlName:this.model.id,triggerEventName:t,triggerEvent:e})})}}t("PanelCtrlPosController",Qe);class Ye{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const i=new Qe(t,e,n);return await i.init(),i}}t("IBizPanelCtrlPos",Ae(Xe,function(t){t.component(Xe.name,Xe),Pt("CTRLPOS",()=>new Ye)}));class Je extends bt{}function Ze(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)}t("ScrollContainerItemController",Je);const tn=t("ScrollContainerItem",O({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:Je,required:!0}},setup(t){const e=be("scroll-container-item"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller),a=x(()=>[e.b(),e.m(n),e.is("hidden",!t.controller.state.visible)]);return{ns:e,classArr:a,semanticClass:i,semanticStyle:o}},render(){var t,e;let n;const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return N(A(C("iBizRow"),{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),layout:{layout:"FLEX"},"element-loading-text":this.controller.state.loadingText},Ze(n=i.map(t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",A(C("iBizCol"),{class:this.semanticClass("item",{props:e}),style:this.semanticStyle("item",{props:e}),layoutPos:e.modelData.layoutPos,state:e.controller.state},Ze(t)?t:{default:()=>[t]})):t}))?n:{default:()=>[n]}),[[z("loading"),this.controller.state.loading]])}}));class en{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const i=new Je(t,e,n);return await i.init(),i}}class nn extends bt{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",nn);const on=t("ScrollContainer",O({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:nn,required:!0}},setup(t){const e=be("scroll-container"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller),a=x(()=>[e.b(),e.m(n),...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)]);return{ns:e,classArr:a,semanticClass:i,semanticStyle:o}},render(){var t,e;let n=null,i=null,o=null,a=null,s=null;const r={};((null==(e=(t=this.$slots).default)?void 0:e.call(t))||[]).forEach(t=>{const e=t.props;if(!e||!e.controller)return;const{width:l,height:c}=e.controller.state.layout;switch(e.modelData.layoutPos.layoutPos){case"WEST":n=t,r.left={width:l};break;case"EAST":o=t,r.right={width:l};break;case"NORTH":i=t,r.top={height:c};break;case"SOUTH":a=t,r.bottom={height:c};break;case"CENTER":s=t;break;default:ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.unadaptedLayout",{layoutPos:e.modelData.layoutPos.layoutPos}))}});for(const t in r)(r[t].width||r[t].height)&&(r[t].flexShrink=0);return N(A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),"element-loading-text":this.controller.state.loadingText},[A("div",{class:[this.ns.e("header"),this.semanticClass("header")],style:[r.top,this.semanticStyle("header")]},[i]),A("div",{class:[this.ns.b("content"),this.semanticClass("content")],style:this.semanticStyle("content")},[A("div",{class:[this.ns.be("content","left"),this.semanticClass("left")],style:[r.left,this.semanticStyle("left")]},[n]),A("div",{class:[this.ns.be("content","center"),this.semanticClass("center")],style:this.semanticStyle("center")},[s]),A("div",{class:[this.ns.be("content","right"),this.semanticClass("right")],style:[r.right,this.semanticStyle("right")]},[o])]),A("div",{class:[this.ns.e("footer"),this.semanticClass("footer")],style:[r.bottom,this.semanticStyle("footer")]},[a])]),[[z("loading"),this.controller.state.loading]])}}));class an{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const i=new nn(t,e,n);return await i.init(),i}}t("IBizScrollContainer",Ae(on,function(t){t.component(on.name,on),t.component(tn.name,tn),Pt("CONTAINER_CONTAINER_SCROLL",()=>new an),Pt("CONTAINER_CONTAINER_SCROLL_LEFT",()=>new en),Pt("CONTAINER_CONTAINER_SCROLL_HEADER",()=>new en),Pt("CONTAINER_CONTAINER_SCROLL_RIGHT",()=>new en),Pt("CONTAINER_CONTAINER_SCROLL_BOTTOM",()=>new en),Pt("CONTAINER_CONTAINER_SCROLL_MAIN",()=>new en)}));class sn extends Dt{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={},this.isLoading=!1}}t("NavPosState",sn);const rn=["is404","isRoutePushed"];class ln extends It{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={},this.ignoreEmbedKey=!1}get route(){return this.router.currentRoute.value}getExpItemIsCache(t){return"CACHE"===this.rawItemParams.expcache||"NO_CACHE"!==this.rawItemParams.expcache&&t.isCache}setRouter(t){this.router=t}async onInit(){var t;await super.onInit(),this.handleRawItemParams(),(null==(t=this.model.rawItem)?void 0:t.rawItemParams)&&this.model.rawItem.rawItemParams.find(t=>!("REFCTRL"!==t.key||!t.value)&&(this.refCtrlKeys=t.value.split(";").map(t=>t.toLowerCase()),!0)),this.panel.evt.on("onControlEvent",t=>{if((0===this.refCtrlKeys.length||this.refCtrlKeys.includes(t.triggerControlName))&&"onNavViewChange"===t.triggerEventName){const e=t.triggerEvent;this.openView(e.navViewMsg)}});const e=this.rawItemParams.expmode||this.panel.view.params.expmode,n=this.rawItemParams.ignoreembedkey||this.panel.view.params.ignoreembedkey||"";this.ignoreEmbedKey=Object.is(n.toLowerCase(),"true"),"ROUTE"===e&&this.routeDepth?this.state.routeOpen=!0:this.state.routeOpen="NO_ROUTE"!==e&&!!this.routeDepth,this.panel.view.params.expmode&&delete this.panel.view.params.expmode}createState(){var t;return new sn(null==(t=this.parent)?void 0:t.state)}get routeDepth(){return this.panel.view.modal.routeDepth}calcCacheKey(t){return t?"".concat(t.viewId,"___").concat(t.key):""}onRouteChange(t){if(this.curNavViewMsg){const e=this.calcCacheKey(this.curNavViewMsg);this.state.currentKey=e,this.state.navViewMsgs[e].fullPath=t.fullPath}}setNavViewMsgs(t){t.isRoutePushed=!0===t.isRoutePushed;const e=this.calcCacheKey(t);this.state.navViewMsgs[e]?(at(this.state.navViewMsgs[e],t),rn.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&(this.state.navViewMsgs[e][n]=void 0)})):(this.state.navViewMsgs[e]=t,this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),this.viewModals[e]=new Et({mode:this.routeDepth?St.ROUTE:St.EMBED,routeDepth:this.routeDepth?this.routeDepth+1:void 0,dismiss:()=>{this.dismiss(e)}})),this.curNavViewMsg=this.state.navViewMsgs[e]}dismiss(t){ibiz.log.debug(this.constructor.name,"dismiss",t)}onViewCreated(t){this.panel.evt.emit("onPresetPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:"onViewCreated",presetParams:t}),ibiz.log.debug(this.constructor.name,"onViewCreated",t)}toBlankRoute(){const t=Te(this.route,this.routeDepth);this.router.push(t)}openView(t){if(!t.key)return this.state.currentKey=this.calcCacheKey(t),void(this.routeDepth&&this.state.routeOpen&&this.toBlankRoute());this.routeDepth&&this.state.routeOpen?this.openViewByPath(t):this.openViewByModel(t)}async openViewByPath(t){var e,n,i,o;const a=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=a,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const n=Te(this.route,this.routeDepth,!1);return void((null==(e=t.modalOptions)?void 0:e.replace)?this.router.replace("".concat(n,"/error/404")):this.router.push("".concat(n,"/error/404")))}if(a===this.state.currentKey&&this.state.navViewMsgs[a].fullPath)(null==(n=t.modalOptions)?void 0:n.replace)?this.router.replace(this.state.navViewMsgs[a].fullPath):this.router.push(this.state.navViewMsgs[a].fullPath);else if(this.state.navViewMsgs[a].fullPath&&this.getExpItemIsCache(t))(null==(i=t.modalOptions)?void 0:i.replace)?this.router.replace(this.state.navViewMsgs[a].fullPath):this.router.push(this.state.navViewMsgs[a].fullPath);else{const e=Object.assign(t.context.clone(),{toRouteDepth:this.routeDepth+1});(null==(o=this.rawItemParams)?void 0:o.routeattributekeys)&&(e.attributekeys=this.rawItemParams.routeattributekeys),this.getExpItemIsCache(t)&&this.state.cacheKeys.push(a),t.viewId&&(this.state.isLoading=!0,await ibiz.commands.execute(xt.TAG,t.viewId,e,t.params,{openMode:"INDEXVIEWTAB",modalOption:{replace:!this.state.currentKey,...t.modalOptions}}),this.state.isLoading=!1)}}openViewByModel(t){this.setNavViewMsgs(t),this.state.currentKey=this.calcCacheKey(t)}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;o(n)&&(e=n.reduce((t,e)=>(t[e.key.toLowerCase()]=e.value,t),{})),Object.assign(this.rawItemParams,e)}}function cn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)}t("NavPosController",ln);const dn=O({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:ln,required:!0}},setup(t){const e=t.controller,n=be("nav-pos"),{semanticClass:i,semanticStyle:o}=We(t.controller),a=ne(),s=ee(),r=f(!1);if(e.setRouter(a),e.routeDepth){const t=Te(s,e.routeDepth);l(()=>s.fullPath,()=>{const n=Te(s,e.routeDepth);if(t===n&&s.matched.length>e.routeDepth){if(s.matched.length===e.routeDepth+1&&(r.value=!!s.name,r.value))return;e.onRouteChange(s)}},{immediate:!0})}return{ns:n,c:e,isPresetView:r,onViewCreated:t=>{e.onViewCreated(t)},semanticClass:i,semanticStyle:o}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:i,navViewMsgs:o,cache:a}=e;let s=null;if(e.routeOpen){if(this.isPresetView)return A(ie,{class:this.semanticClass("root"),style:this.semanticStyle("root")},null);s=A(C("iBizRouterView"),{class:this.semanticClass("content"),style:this.semanticStyle("content"),manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?A(t,null,null):null;return a?A(C("keepAlive"),{include:i,max:30,isKey:!0},cn(e)?e:{default:()=>[e]}):e}})}else{const t=n&&o[n]?w(C("IBizViewShell"),{class:this.semanticClass("content"),style:this.semanticStyle("content"),context:o[n].context,params:o[n].params,key:this.c.ignoreEmbedKey?void 0:n,viewId:o[n].viewId,onCreated:this.onViewCreated}):null;s=a?A(C("keepAlive"),{include:i,max:30,isKey:!0},cn(t)?t:{default:()=>[t]}):t}return A("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),this.semanticClass("root"),...this.controller.containerClass],style:this.semanticStyle("root")},[s])}});class un{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const i=new ln(t,e,n);return await i.init(),i}}t("IBizNavPos",Ae(dn,function(t){t.component(dn.name,dn),Pt("RAWITEM_NAV_POS",()=>new un)}));class hn extends Dt{constructor(){super(...arguments),this.error=null}}const pn=class t extends It{constructor(){super(...arguments),this.unitName=void 0}get valueFormat(){return this.model.valueFormat}get dataType(){}get context(){return this.panel.context}get params(){return this.panel.params}get data(){return this.dataParent.data}get value(){return this.data[this.model.id]}createState(){var t;return new hn(null==(t=this.parent)?void 0:t.state)}async validate(){var t;return this.state.visible&&this.state.required&&!this.value?(this.state.error=(null==(t=this.editor)?void 0:t.model.placeHolder)||ibiz.i18n.t("vue3Util.panelComponent.cannotEmpty",{caption:this.model.caption}),!1):(this.state.error=null,!0)}async onInit(){var t,e;await super.onInit(),this.state.required=!this.model.allowEmpty,!0!==this.context.srfreadonly&&"true"!==this.context.srfreadonly&&(null==(t=this.model.editor)?void 0:t.readOnly)&&(this.state.readonly=(null==(e=this.model.editor)?void 0:e.readOnly)||!1),this.model.editor&&"HIDDEN"!==this.model.editor.editorType&&(this.editorProvider=await Tt(this.model.editor,this.panel.model),this.editorProvider&&(this.editor=await this.editorProvider.createController(this.model.editor,this)))}async setDataValue(t,e){const{id:n}=this.model;e=e||n,this.dataParent.setDataValue&&await this.dataParent.setDataValue(e,t),await this.validate(),this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Ot.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Ot.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Ot.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Ot.ENTER,event:t})}onClick(e){var n;if(ibiz.env.isMob){this.state.readonly||this.state.disabled||!(null==(n=this.editor)?void 0:n.model.editorType)||t.enableClickType.includes(this.editor.model.editorType)||null==e||e.stopPropagation()}super.onClick(e)}};pn.enableClickType=["SPAN","SPAN_LINK","RAW","MOB2DBARCODEREADER","FIELD_CAROUSEL_PICTURE","FIELD_IMAGE_PICTURE_ONE"];let mn=t("PanelFieldController",pn);const vn=O({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:mn,required:!0},attrs:{type:Object,require:!1}},setup(t){const e=be("panel-field"),{semanticClass:n,semanticStyle:i}=We(t.controller),o=x(()=>{const{id:n}=t.modelData;return[e.b(),e.m(n),e.is("error",!!t.controller.state.error),e.is("mob",window.Environment&&window.Environment.isMob)]}),a=x(()=>{const{controlRenders:e=[],id:n}=t.modelData;return!e.some(t=>t.id==="".concat(null==n?void 0:n.toLowerCase(),"_tooltip"))});return{ns:e,classArr:o,showTitle:a,onValueChange:(e,n)=>{t.controller.setDataValue(e,n)},semanticClass:n,semanticStyle:i}},render(){let t=null;if(this.controller.data){const e={value:this.controller.value,data:this.controller.data,controller:this.controller.editor,disabled:this.controller.state.disabled,class:[this.ns.b("content"),!0===ibiz.config.common.enhancedUI?this.controller.containerClass:"",this.semanticClass("content")],style:[this.semanticStyle("content")],showTitle:this.showTitle,readonly:this.controller.state.readonly,onChange:this.onValueChange,onFocus:t=>this.controller.onFocus(t),onBlur:t=>this.controller.onBlur(t),onEnter:t=>this.controller.onEnter(t),...this.attrs};if(this.$slots.default)t=this.$slots.default(e);else if(this.controller.editorProvider){const n=C(this.controller.editorProvider.formEditor);t=w(n,{...e})}else t=A(C("not-supported-editor"),{modelData:this.modelData.editor},null)}return N(A("div",{class:[this.classArr,!1===ibiz.config.common.enhancedUI?this.controller.containerClass:"",this.semanticClass("root")],style:this.semanticStyle("root"),onClick:t=>this.controller.onClick(t)},[t,this.controller.state.error&&A("div",{class:[this.ns.e("error"),this.semanticClass("error")],style:this.semanticStyle("error")},[this.controller.state.error])]),[[z("tooltip"),Ue(this.controller.data,this.controller.model,this.controller.panel)]])}});class gn{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const i=new mn(t,e,n);return await i.init(),i}}t("IBizPanelField",Ae(vn,function(t){t.component(vn.name,vn),Pt("FIELD",()=>new gn)}));class yn extends It{get data(){return this.dataParent.data}async onInit(){await super.onInit()}calcDynaClass(t){var e,n;if(this.model.dynaClass||(null==(e=this.model.rawItem)?void 0:e.dynaClass)){const e=this.model.dynaClass?At(this.model.dynaClass,t):[],i=(null==(n=this.model.rawItem)?void 0:n.dynaClass)?At(this.model.rawItem.dynaClass,t):[];this.state.class.containerDyna=[...e,...i]}if(this.model.labelDynaClass){const e=At(this.model.labelDynaClass,t);this.state.class.labelDyna=e}}}t("PanelRawItemController",yn);const fn=O({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:yn,required:!0}},setup(t){const e=be("panel-rawitem"),n=t.controller,{semanticClass:i,semanticStyle:o}=We(n),a=f(""),s=f(""),{rawItem:r}=t.modelData;r&&r.cssStyle&&(s.value=r.cssStyle);const c=x(()=>{const{id:n}=t.modelData;return[e.b(),e.m(n)]});return l(()=>n.data,async t=>{if(t){const e=n.model.rawItem;if(!e)return;let i;const o={...t};"RAW"===e.contentType?i=e.caption:"HTML"===e.contentType&&(i=e.content),i&&e.templateMode&&(i=await ibiz.util.hbs.render(i.replace("//n","\n"),Object.assign(o,{data:{...t}}))),a.value=i}},{immediate:!0}),{ns:e,classArr:c,tempStyle:s,content:a,semanticClass:i,semanticStyle:o}},render(){if(this.controller.state.visible)return A("div",{class:[this.classArr,!1===ibiz.config.common.enhancedUI?this.controller.containerClass:"",this.semanticClass("root")],style:[!1===ibiz.config.common.enhancedUI?this.tempStyle:"",this.semanticStyle("root")],onClick:t=>this.controller.onClick(t)},[A(C("iBizRawItem"),{class:[!0===ibiz.config.common.enhancedUI?this.controller.containerClass:"",this.semanticClass("content")],style:[!0===ibiz.config.common.enhancedUI?this.tempStyle:"",this.semanticStyle("content")],rawItem:this.modelData,content:this.content},null)])}});class wn{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const i=new yn(t,e,n);return await i.init(),i}}t("IBizPanelRawItem",Ae(fn,function(t){t.component(fn.name,fn),Pt("RAWITEM",()=>new wn),Pt("RAWITEM_STATIC_IMAGE",()=>new wn),Pt("RAWITEM_STATIC_LABEL",()=>new wn),Pt("RAWITEM_STATIC_TEXT",()=>new wn)}));class Cn extends Dt{constructor(){super(...arguments),this.data={}}}class bn{constructor(t,e,n,i){this.model=t,this.panel=e,this.parent=n,this.state=new Cn,this.isDataContainer=!0,this.panelItems={},this.state.data=i;const o=Nt(this.model).map(t=>t.id);i._evt.on("change",t=>{o.includes(t)&&this.childDataChangeNotify([t])})}get data(){return this.state.data}async validate(){return(await Promise.all(Object.values(this.panelItems).map(t=>t.validate()))).every(t=>t)}async init(){await this.initChildrenController()}async initChildrenController(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map(async t=>{var i,o;const a=this.parent.providers[t.id];if(!a)return;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(i=t.panelItems)?void 0:i.length)&&!zt(t)?await this.initChildrenController(t.panelItems,e,s):(null==(o=t.panelTabPages)?void 0:o.length)&&await this.initChildrenController(t.panelTabPages,e,s)}))}async dataChangeNotify(t){}async childDataChangeNotify(t){Object.values(this.panelItems).forEach(e=>{e.dataChangeNotify(t)})}async panelStateNotify(t){Object.values(this.panelItems).forEach(e=>{e.panelStateNotify(t)})}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e,this.childDataChangeNotify([t]))}destroy(){var t,e;null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach(t=>{t.destroy()})}}class Pn extends _t{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",Pn);class In extends bt{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new Pn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders()}async panelStateNotify(t){super.panelStateNotify(t),t===Rt.LOAD&&this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map(async t=>{var e,n;const i=await Lt(t,this.panel.model,this.panel.view.model);i&&(this.providers[t.id]=i,(null==(e=t.panelItems)?void 0:e.length)&&!zt(t)&&await this.initPanelItemProviders(t.panelItems),(null==(n=t.panelTabPages)?void 0:n.length)&&await this.initPanelItemProviders(t.panelTabPages))}))}computeNavParams(){const t=this.dataParent.data||{},{navigateContexts:e,navigateParams:n}=this.model,i=this.panel.context.clone();Object.assign(i,kt(e,t,this.panel.context,this.panel.params));const o=kt(n,t,this.panel.context,this.panel.params);return Object.assign(o,this.panel.params),{context:i,params:o}}async initContainerData(){const{dataSourceType:t,dataName:e,scriptCode:n,showBusyIndicator:i}=this.model;try{switch(i&&this.startLoading(),t){case"DEACTION":case"DEDATASET":await this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":await this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;case"ACTIVEDATAPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));await this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!n)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=ht.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},n,{isAsync:!1,singleRowReturn:!0});await this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}finally{i&&this.endLoading()}}childrenStateNotify(t){this.dataItems.forEach(e=>{e.panelStateNotify(t)})}async validate(){return(await Promise.all(this.dataItems.map(t=>t.validate()))).every(t=>t)}async setData(t){const e=Nt(this.model),n=t.map(t=>new Mt(e,t));this.dataItems=n.map(t=>new bn(this.model,this.panel,this,t)),this.dataItems.length&&await Promise.all(this.dataItems.map(t=>t.init())),this.state.items=n,this.childrenStateNotify(Rt.LOAD),this.panel.evt.emit("onPanelDataContainerEvent",{panelDataContainerName:this.model.id,panelDataContainerEventName:Bt.onLoadSuccess,data:[this.data]})}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const{context:n,params:i}=this.computeNavParams(),o=await Vt(e,t,n,this.panel.data,i);if(!o)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(o)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),{context:i,params:o}=this.computeNavParams(),a=await n.deService.exec(e,t,i,void 0,o);a.ok&&a.data&&this.setData(a.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",()=>{n()})}setDataValue(t,e){throw new Error(ibiz.i18n.t("vue3Util.panelComponent.noImplementMethod"))}destroy(){super.destroy(),this.dataItems.forEach(t=>{t.destroy()})}}t("MultiDataContainerController",In);const Dn=O({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:In,required:!0}},setup(t){const e=be("multi-data-container"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller);l(()=>t.controller.state.items,()=>{t.controller.dataItems.forEach(t=>{t.state=v(t.state);Object.keys(t.panelItems).forEach(e=>{const n=t.panelItems[e];n.state=v(n.state)})})},{immediate:!0});const a=m("renderPanelItem"),s=x(()=>[e.b(),e.m(n),...t.controller.containerClass]);return{ns:e,classArr:s,renderPanelItem:a,semanticClass:i,semanticStyle:o}},render(){let t;return t=this.$slots.default?this.$slots.default():this.controller.state.items.map((t,e)=>{const n=this.controller.dataItems[e];return A(C("iBizRow"),{class:[this.ns.b("content"),this.semanticClass("item",{data:t})],style:this.semanticStyle("item",{data:t}),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map(t=>{let e;const i=n.panelItems[t.id];return A(C("iBizCol"),{layoutPos:t.layoutPos,state:i.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!L(o)?e:{default:()=>[e]});var o})]}})}),N(A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),"element-loading-text":this.controller.state.loadingText},[t]),[[z("loading"),this.controller.state.loading]])}});class En{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const i=new In(t,e,n);return await i.init(),i}}t("IBizMultiDataContainer",Ae(Dn,function(t){t.component(Dn.name,Dn),Pt("CONTAINER_CONTAINER_MULTIDATA",()=>new En)}));class Sn extends _t{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerRawState",Sn);class xn extends bt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.items}createState(){var t;return new Sn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers()}async panelStateNotify(t){super.panelStateNotify(t),t===Rt.LOAD&&this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map(async t=>{var i,o;const a=await Lt(t,e.model,e.view.model);if(!a)return;this.providers[t.id]=a;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(i=t.panelItems)?void 0:i.length)&&!zt(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(o=t.panelTabPages)?void 0:o.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)}))}computeNavParams(){const t=this.dataParent.data||{},{navigateContexts:e,navigateParams:n}=this.model,i=this.panel.context.clone();Object.assign(i,kt(e,t,this.panel.context,this.panel.params));const o=kt(n,t,this.panel.context,this.panel.params);return Object.assign(o,this.panel.params),{context:i,params:o}}async initContainerData(){const{dataSourceType:t,dataName:e,scriptCode:n,showBusyIndicator:i}=this.model;try{switch(i&&this.startLoading(),t){case"DEACTION":case"DEDATASET":await this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":await this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;case"ACTIVEDATAPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));await this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!n)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=ht.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},n,{isAsync:!1,singleRowReturn:!0});await this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}finally{i&&this.endLoading()}}childrenStateNotify(t){Object.values(this.panelItems).forEach(e=>{e.panelStateNotify(t)})}async setData(t){var e,n;null==(n=(e=this.data).destroy)||n.call(e),this.state.items=t,this.childrenStateNotify(Rt.LOAD),this.panel.evt.emit("onPanelDataContainerEvent",{panelDataContainerName:this.model.id,panelDataContainerEventName:Bt.onLoadSuccess,data:[this.data]})}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const{context:n,params:i}=this.computeNavParams(),o=await Vt(e,t,n,this.panel.data,i);if(!o)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(o)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),{context:i,params:o}=this.computeNavParams(),a=await n.deService.exec(e,t,i,void 0,o);a.ok&&a.data&&this.setData(a.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",()=>{n()})}setDataValue(t,e){throw new Error(ibiz.i18n.t("vue3Util.panelComponent.noImplementMethod"))}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach(t=>{var e;null==(e=t.destroy)||e.call(t)})}}t("MultiDataContainerRawController",xn);const Tn=O({name:"IBizMultiDataContainerRaw",props:{modelData:{type:Object,required:!0},controller:{type:xn,required:!0}},setup(t){const e=be("multi-data-container-raw"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller);l(()=>t.controller.state.items,()=>{Object.keys(t.controller.panelItems).forEach(e=>{const n=t.controller.panelItems[e];n.state=v(n.state)})},{immediate:!0,deep:!0});const a=m("renderPanelItem"),s=x(()=>[e.b(),e.m(n),...t.controller.containerClass]);return{ns:e,classArr:s,renderPanelItem:a,semanticClass:i,semanticStyle:o}},render(){let t;return t=this.$slots.default?this.$slots.default():A(C("iBizRow"),{class:[this.ns.b("content"),this.semanticClass("content")],style:this.semanticStyle("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map(t=>{let e;const n=this.controller.panelItems[t.id];return A(C("iBizCol"),{layoutPos:t.layoutPos,state:n.state,class:this.semanticClass("item",{item:n}),style:this.semanticStyle("item",{item:n})},"function"==typeof(i=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(i)&&!L(i)?e:{default:()=>[e]});var i})]}}),N(A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),"element-loading-text":this.controller.state.loadingText},[t]),[[z("loading"),this.controller.state.loading]])}});class On{constructor(){this.component="IBizMultiDataContainerRaw"}async createController(t,e,n){const i=new xn(t,e,n);return await i.init(),i}}t("IBizMultiDataContainerRaw",Ae(Tn,function(t){t.component(Tn.name,Tn),Pt("CONTAINER_CONTAINER_MULTIDATA_RAW",()=>new On)}));class An extends _t{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",An);class Nn extends bt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new An(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers()}async panelStateNotify(t){super.panelStateNotify(t),t===Rt.LOAD&&this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map(async t=>{var i,o;const a=await Lt(t,e.model,e.view.model);if(!a)return;this.providers[t.id]=a;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(i=t.panelItems)?void 0:i.length)&&!zt(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(o=t.panelTabPages)?void 0:o.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)}))}computeNavParams(){const t=this.dataParent.data||{},{navigateContexts:e,navigateParams:n}=this.model,i=this.panel.context.clone();Object.assign(i,kt(e,t,this.panel.context,this.panel.params));const o=kt(n,t,this.panel.context,this.panel.params);return Object.assign(o,this.panel.params),{context:i,params:o}}async initContainerData(){const{dataName:t,scriptCode:e,dataSourceType:n,dataRegionType:i,showBusyIndicator:o}=this.model;try{if(o&&this.startLoading(),"LOGINFORM"===i)return void this.setLoginForm();switch(n){case"DEACTION":case"DEDATASET":await this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":await this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),t);break;case"VIEWSESSIONPARAM":if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,t);break;case"ACTIVEDATAPARAM":if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));await this.setData(this.dataParent.data[t]);break;case"CUSTOM":{if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=ht.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},e,{isAsync:!1,singleRowReturn:!0});await this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:n}))}}finally{o&&this.endLoading()}}childrenStateNotify(t){Object.values(this.panelItems).forEach(e=>{e.panelStateNotify(t)})}async setData(t){var e,n;const i=Nt(this.model),o=i.map(t=>t.id),a=new Mt(i,t);a._evt.on("change",t=>{o.includes(t)&&this.childDataChangeNotify([t])}),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=a,this.childrenStateNotify(Rt.LOAD),this.panel.evt.emit("onPanelDataContainerEvent",{panelDataContainerName:this.model.id,panelDataContainerEventName:Bt.onLoadSuccess,data:[this.data]})}setLoginForm(){this.setData({})}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const{context:n,params:i}=this.computeNavParams(),o=await Vt(e,t,n,this.panel.data,i);if(!o)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(o)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),{context:i,params:o}=this.computeNavParams(),a=await n.deService.exec(e,t,i,void 0,o);a.ok&&a.data&&this.setData(a.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",()=>{n()})}childDataChangeNotify(t){Object.values(this.panelItems).forEach(e=>{e.dataChangeNotify(t)})}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e)}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach(t=>{t.destroy()})}}t("SingleDataContainerController",Nn);const zn=O({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Nn,required:!0}},setup(t){const e=be("single-data-container"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller);Object.keys(t.controller.panelItems).forEach(e=>{const n=t.controller.panelItems[e];n.state=v(n.state)});const a=m("renderPanelItem"),s=x(()=>[e.b(),e.m(n),...t.controller.containerClass]);return{ns:e,classArr:s,renderPanelItem:a,semanticClass:i,semanticStyle:o}},render(){let t;return t=this.$slots.default?this.$slots.default():A(C("iBizRow"),{class:[this.ns.b("content"),this.semanticClass("content")],style:this.semanticStyle("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map(t=>{let e;const n=this.controller.panelItems[t.id];return A(C("iBizCol"),{class:this.semanticClass("item",{item:n}),style:this.semanticStyle("item",{item:n}),layoutPos:t.layoutPos,state:n.state},"function"==typeof(i=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(i)&&!L(i)?e:{default:()=>[e]});var i})]}}),N(A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),"element-loading-text":this.controller.state.loadingText},[t]),[[z("loading"),this.controller.state.loading]])}});class _n{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const i=new Nn(t,e,n);return await i.init(),i}}t("IBizSingleDataContainer",Ae(zn,function(t){t.component(zn.name,zn),Pt("CONTAINER_CONTAINER_SINGLEDATA",()=>new _n)}));class Rn extends _t{}t("GridContainerState",Rn);class Ln extends bt{createState(){var t;return new Rn(null==(t=this.parent)?void 0:t.state)}}function kn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)}t("GridContainerController",Ln);const Mn=O({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ln,required:!0}},setup(t){const e=be("grid-container"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller),a=x(()=>{let i=[e.b(),e.m(n)];return i=[...i,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],i}),s=x(()=>({...t.modelData.layout,layout:"TABLE_12COL"})),r=f(void 0),l=f(12);return{ns:e,classArr:a,layoutModel:s,convertLayoutPos:(t,e)=>{const n={...t,layout:"TABLE_12COL",colXS:t.grow||e,colSM:t.grow||e,colMD:t.grow||e,colLG:t.grow||e};return delete n.grow,n},adaptGrow:l,adaptCols:r,semanticClass:i,semanticStyle:o}},render(){var t,e;let n;const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];if(void 0===this.adaptCols){let t=0,e=0;i.forEach(n=>{const i=n.props;i&&i.modelData&&i.modelData.layoutPos&&("number"==typeof i.modelData.layoutPos.grow?t+=i.modelData.layoutPos.grow:void 0===i.modelData.layoutPos.grow&&(e+=1))});let n=12;e>0&&(n=(12-t)/e),this.adaptCols=e,this.adaptGrow=n}return N(A(C("iBizRow"),{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),layout:this.layoutModel,"element-loading-text":this.controller.state.loadingText},kn(n=i.map(t=>{const e=t.props;return e&&e.controller?A(C("iBizCol"),{class:this.semanticClass("item"),style:this.semanticStyle("item"),layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},kn(t)?t:{default:()=>[t]}):t}))?n:{default:()=>[n]}),[[z("loading"),this.controller.state.loading]])}});class Bn{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const i=new Ln(t,e,n);return await i.init(),i}}t("IBizGridContainer",Ae(Mn,function(t){t.component(Mn.name,Mn),Pt("CONTAINER_CONTAINER_GRID",()=>new Bn)}));class Vn extends _t{}t("PanelContainerImageState",Vn);class jn extends bt{createState(){var t;return new Vn(null==(t=this.parent)?void 0:t.state)}}function Un(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)}t("PanelContainerImageController",jn);const Wn=O({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:jn,required:!0}},setup(t){const e=be("panel-container-image"),{id:n}=t.modelData,{semanticClass:i,semanticStyle:o}=We(t.controller),a=x(()=>{let i=[e.b(),e.m(n)];return i=[...i,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],i}),s=x(()=>{const e=t.controller.model.sysImage,n={};let i="";if(null==e?void 0:e.rawContent)if($(e.rawContent)){const t=e.rawContent.replace(/[\u4e00-\u9fff]/g,"");i="url(data:image/svg+xml;base64,".concat(btoa(t),")")}else i="url(".concat(e.rawContent,")");else(null==e?void 0:e.imagePath)&&(i="url(".concat(e.imagePath,")"));return i&&Object.assign(n,{backgroundImage:i}),n});return{ns:e,classArr:a,backgroundStyle:s,semanticClass:i,semanticStyle:o}},render(){var t,e;let n;const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],o=A(C("iBizRow"),{slot:"content",class:this.semanticClass("content"),style:this.semanticStyle("content"),layout:this.modelData.layout},Un(n=i.map(t=>{const e=t.props;return e&&e.controller?A(C("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state,class:this.semanticClass("item",{props:e}),style:this.semanticStyle("item",{props:e})},Un(t)?t:{default:()=>[t]}):t}))?n:{default:()=>[n]});return N(A("div",{class:[this.classArr,this.semanticClass("root")],"element-loading-text":this.controller.state.loadingText,onClick:t=>this.controller.onClick(t),style:[this.backgroundStyle,this.semanticStyle("root")]},[this.controller.model.cssStyle?A("style",{type:"text/css"},[this.controller.model.cssStyle]):null,o]),[[z("loading"),this.controller.state.loading]])}});class Fn{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const i=new jn(t,e,n);return await i.init(),i}}t("IBizPanelContainerImage",Ae(Wn,function(t){t.component(Wn.name,Wn),Pt("CONTAINER_CONTAINER_IMAGE",()=>new Fn)}));function qn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!L(t)}const Gn=O({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:bt,required:!0}},setup(t){const e=be("panel-tab-page"),{semanticClass:n,semanticStyle:i}=We(t.controller),o=x(()=>{const{id:n}=t.modelData,i=[e.b(),e.m(n)];return i.push(...t.controller.containerClass),i});return{ns:e,classArr:o,semanticClass:n,semanticStyle:i}},render(){var t,e;let n;const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return N(A(C("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),layout:this.modelData.layout,"element-loading-text":this.controller.state.loadingText},qn(n=i.map(t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return A(C("iBizCol"),{class:this.semanticClass("item",{props:e}),style:this.semanticStyle("item",{props:e}),layoutPos:n.model.layoutPos,state:n.state},qn(t)?t:{default:()=>[t]})}))?n:{default:()=>[n]}),[[z("loading"),this.controller.state.loading]])}});class Hn{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const i=new bt(t,e,n);return await i.init(),i}}t("IBizPanelTabPage",Ae(Gn,function(t){t.component(Gn.name,Gn),Pt("TABPAGE",()=>new Hn)}));class $n extends It{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];if(n.layoutPanelModel){let t=n.layoutPanelModel;return t.includes("return")||(t="return (".concat(t,")")),ht.execScriptFn({data:e||{}},t,{isAsync:!1})}}}const Kn=O({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:$n,required:!0}},setup(t){var e;const n=be("panel-item-render"),{semanticClass:i,semanticStyle:o}=We(t.controller),a=be("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:s}=t.modelData,r=x(()=>[n.b(),n.m(s),a.b(),n.is("hidden",!t.controller.state.visible)]),l=x(()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data));return{ns:n,classArr:r,htmlCode:l,semanticClass:i,semanticStyle:o}},render(){return A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),innerHTML:this.htmlCode,onClick:t=>this.controller.onClick(t)},null)}});class Xn{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const i=new $n(t,e,n);return await i.init(),i}}t("IBizPanelItemRender",Ae(Kn,function(t){t.component(Kn.name,Kn),Pt("PREDEFINE_RENDER",()=>new Xn)}));const Qn=O({name:"IBizTeleportPlaceholder",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=be("teleport-placeholder"),n=f(""),{semanticClass:i,semanticStyle:o}=We(t.controller),{rawItem:a}=t.modelData;a&&a.cssStyle&&(n.value=a.cssStyle);const s=x(()=>{const{id:n}=t.modelData,i=[e.b(),e.m(n)];return i.push(...t.controller.containerClass),i});return{ns:e,classArr:s,tempStyle:n,semanticClass:i,semanticStyle:o}},render(){if(this.controller.state.visible)return A("div",{id:this.controller.state.teleportTag,class:[this.classArr,this.semanticClass("root")],style:[this.tempStyle,this.semanticStyle("root")]},null)}});class Yn extends Dt{constructor(){super(...arguments),this.teleportTag=""}}class Jn extends It{createState(){var t;return new Yn(null==(t=this.parent)?void 0:t.state)}async onInit(){var t,e;await super.onInit();const n=this.panel.view.model.codeName;let i="".concat(null==n?void 0:n.toLowerCase(),"-").concat(this.model.id);const o=null==(e=null==(t=this.model.rawItem)?void 0:t.rawItemParams)?void 0:e.find(t=>"TeleportTag"===t.key);o&&o.value&&(i=o.value),ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.placeholderIdentifier",{viewCodeName:n,id:this.model.id}),i),this.state.teleportTag=i}}class Zn{constructor(){this.component="IBizTeleportPlaceholder"}async createController(t,e,n){const i=new Jn(t,e,n);return await i.init(),i}}t("TeleportPlaceholderProvider",Zn);t("IBizTeleportPlaceholder",Ae(Qn,function(t){t.component(Qn.name,Qn),Pt("RAWITEM_TELEPORT_PLACEHOLDER",()=>new Zn)}));const ti=O({name:"IBizPanelContainerTabs",props:{modelData:{type:Object,required:!0},controller:{type:bt,required:!0}},setup:()=>({ns:be("panel-container-tabs")}),render(){return w(C("IBizPanelContainer"),{...this.$props,...this.$attrs,class:this.ns.b()},this.$slots)}});class ei{constructor(){this.component="IBizPanelContainerTabs"}async createController(t,e,n){const i=new bt(t,e,n);return await i.init(),i}}t("IBizPanelContainerTabs",Ae(ti,function(t){t.component(ti.name,ti),Pt("CONTAINER_TABS",()=>new ei)}));const ni=O({name:"IBizPanelCtrlViewPageCaption",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=be("panel-ctrl-view-page-caption"),{semanticClass:n,semanticStyle:i}=We(t.controller),o=x(()=>{const{id:n}=t.modelData,i=[e.b(),e.m(n),e.is("mob",ibiz.env.isMob)];return i.push(...t.controller.containerClass),i});return{ns:e,classArr:o,semanticClass:n,semanticStyle:i}},render(){let t=null;return this.controller.data&&(t=A("span",{class:[this.ns.b("content"),this.semanticClass("content")],style:this.semanticStyle("content")},[this.controller.state.caption])),A("div",{class:[this.classArr,this.semanticClass("root")],style:this.semanticStyle("root"),onClick:t=>this.controller.onClick(t)},[t])}});class ii extends It{async onInit(){await super.onInit(),this.state.caption=this.panel.view.model.caption||"",this.panel.view.evt.on("onViewInfoChange",({caption:t,dataInfo:e})=>{this.state.caption="".concat(this.panel.view.model.caption).concat(e?"-".concat(e):"")})}}class oi{constructor(){this.component="IBizPanelCtrlViewPageCaption"}async createController(t,e,n){const i=new ii(t,e,n);return await i.init(),i}}t("IBizPanelCtrlViewPageCaption",Ae(ni,function(t){t.component(ni.name,ni),Pt("CTRLPOS_VIEW_PAGECAPTION",()=>new oi)}));const ai=O({name:"IBizAuthWxmpQrcode",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=be("auth-wxmp-qrcode"),{state:n}=t.controller,i=ee();t.controller.setRouter(i);const{semanticClass:o,semanticStyle:a}=We(t.controller),s=async()=>{await t.controller.loadQrcode()};return l(()=>n.visible,()=>{var t;n.visible&&(n.keepAlive&&!(null==(t=n.qrcode)?void 0:t.expirein)||!n.keepAlive)&&s()},{immediate:!0}),I(()=>{t.controller.destroy()}),{ns:e,loadQrcode:s,semanticClass:o,semanticStyle:a}},render(){var t,e;return A("div",{class:[this.ns.b(),this.semanticClass("root")],style:this.semanticStyle("root")},[A("div",{class:this.ns.e("content")},[this.controller.state.qrcode&&A("img",{class:[this.ns.e("qrcode"),this.semanticClass("content")],style:this.semanticStyle("content"),src:null==(t=this.controller.state.qrcode)?void 0:t.url},null),!(null==(e=this.controller.state.qrcode)?void 0:e.expirein)&&A("div",{class:[this.ns.e("mask"),this.semanticClass("mask")],style:this.semanticStyle("mask")},[A("ion-icon",{title:ibiz.i18n.t("vue3Util.panelComponent.refresh"),name:"reload-outline",onClick:this.loadQrcode,class:this.ns.em("mask","icon")},null)])]),A("div",{class:[this.ns.e("caption"),this.semanticClass("caption")],style:this.semanticStyle("caption")},[this.controller.state.tips])])}});class si extends Dt{}class ri extends It{constructor(){super(...arguments),this.pollingTime=2,this.rawItemParams={}}createState(){var t;return new si(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),this.handleRawItemParams(),this.initParams()}setRouter(t){this.route=t}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;o(n)&&(e=n.reduce((t,e)=>(t[e.key.toLowerCase()]=e.value,t),{})),Object.assign(this.rawItemParams,e)}initParams(){var t;var e;this.pollingTime=(e=this.rawItemParams.pollingtime)&&isFinite(Number(e))?Number(this.rawItemParams.pollingtime):2;const n=(null==(t=this.model.rawItem)?void 0:t.caption)||this.model.caption;this.state.tips=n?ibiz.appUtil.resolveI18nText(n):ibiz.i18n.t("vue3Util.panelComponent.wxQrcodeCaption")}async loadQrcode(){try{const t=await ibiz.net.get("/uaa/open/wxmp/createqrcode",{},{srfdcsystem:ibiz.env.dcSystem});t.ok&&t.data&&(this.state.qrcode=t.data,this.setTimer())}catch(t){ibiz.log.error(t.message)}}setTimer(){this.expirationTimer=setInterval(()=>{this.state.qrcode&&this.state.qrcode.expirein>0?this.state.qrcode.expirein-=1:clearInterval(this.expirationTimer)},1e3),this.pollingTimer=setInterval(async()=>{await this.pollingLogin()},1e3*this.pollingTime)}async pollingLogin(){try{if(this.state.qrcode&&this.state.qrcode.expirein>0){if(this.state.visible){const t=await ibiz.net.get("/uaa/open/wxmp/qrcode/".concat(this.state.qrcode.ticket),{},{srfdcsystem:ibiz.env.dcSystem}),{data:e,ok:n}=t;if(n&&(null==e?void 0:e.token)){clearInterval(this.pollingTimer);const t=30;J(Z.TOKEN_REMEMBER,"1",t),J(Z.TOKEN,e.token,t);const n=(new Date).getTime()+1e3*(e.expirein||7199);J(Z.TOKEN_EXPIRES,"".concat(n),t),e.refresh_token&&J(Z.REFRESH_TOKEN,e.refresh_token,t),tt(Z.IS_ANONYMOUS);const i=this.route.query.ru||"/";window.location.hash=i||"/",window.history.pushState({},""),window.location.reload()}}}else clearInterval(this.pollingTimer)}catch(t){ibiz.log.error(t.message)}}async destroy(){await super.destroy(),this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=void 0),this.expirationTimer&&(clearInterval(this.expirationTimer),this.expirationTimer=void 0)}}class li{constructor(){this.component="IBizAuthWxmpQrcode"}async createController(t,e,n){const i=new ri(t,e,n);return await i.init(),i}}t("IBizAuthWxmpQrcode",Ae(ai,function(t){t.component(ai.name,ai),Pt("RAWITEM_AUTH_WXMP_QRCODE",()=>new li)})),t("AppRedirectView",O({setup(){var t;const e=X.create((null==(t=ibiz.appData)?void 0:t.context)||{});I(()=>{e.destroy()});const{href:n}=window.location;P(()=>ibiz.util.hiddenAppLoading()),async function(){await jt(e,n)}()},render:()=>A("div",null,[ibiz.i18n.t("vue3Util.view.redirectionProgress")])}));class ci{constructor(){this.component="IBizView"}}const di=O({name:"IBizView",props:{context:{type:Object},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object},provider:{type:Object}},setup(t,{slots:e}){const n=be("view"),i=ke((...t)=>new mt(...t));Me(i);const o=Ut(i.model),a=[],s=new Map,r=[];o.forEach(t=>{const{teleportFlag:e,teleportTag:n}=Wt(t);n||e?(a.push(t),s.set(t.id,n||"")):r.push(t)});const{viewType:l,sysCss:d,codeName:u}=i.model,h=l.toLowerCase(),p=null==d?void 0:d.cssName,m=x(()=>[n.b(),n.b(h),n.m(u),p,i.state.viewMessages.TOP?"has-top-message":"",i.state.viewMessages.BOTTOM?"has-bottom-message":"",i.state.presetClassList]),v=(t,e={})=>{const n=t.name||t.id;return{context:i.context,params:i.params,modelData:t,...i.slotProps[n]||{},...e}};let g;return P(()=>{_(async()=>{const t=document.getElementById(i.id),e=await ibiz.hub.config.view.get(i.model.id);t&&(null==e?void 0:e.waterMarkOption)&&(g=ibiz.util.watermark.mount(e.waterMarkOption,t,i.context,i.params,i.state.srfactiveviewdata||{}))})}),c(()=>{null==g||g()}),{c:i,ns:n,controls:r,teleportControls:a,viewClassNames:m,onLayoutPanelCreated:t=>{i.setLayoutPanel(t)},getCtrlProps:v,renderControl:(t,n={})=>{const o=t.name||t.id,a=v(t,n);if(e[o])return M(e,o,a);const s=i.providers[o],r=C((null==s?void 0:s.component)||"IBizControlShell");return s&&(a.provider=s),w(r,a)},getCtrlTeleportTag:t=>{var e,n;const o=s.get(t.id);if(o)return o;const a=null==(n=null==(e=i.parentView)?void 0:e.layoutPanel)?void 0:n.panelItems[t.name];return a?"#".concat(a.state.teleportTag):void 0},getControlStyle:()=>{const t={};return Object.assign(t,{display:i.state.hasError?"none":"initial"}),t}}},render(){var t,e;let n=null;if(this.c.state.isCreated)if(0===this.c.engines.length)n=A("span",{style:"color:red;"},[ibiz.i18n.t("vue3Util.view.viewType",{viewType:this.modelData.viewType})]);else{const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach(t=>{const n=t.name||t.id;e[n]=e=>this.renderControl(t,e)});const i=this.c.model.viewLayoutPanel,o=this.c.providers[i.name];n=w(C(o.component),{modelData:i,context:this.c.context,params:this.c.params,provider:o,container:this.c,style:this.getControlStyle(),onControllerAppear:this.onLayoutPanelCreated},e)}let i=null;this.c.state.isCreated&&(null==(e=this.teleportControls)?void 0:e.length)&&(i=this.teleportControls.map(t=>{let e;const n=this.getCtrlTeleportTag(t);return n?A("div",{style:this.getControlStyle()},[A(k,{to:n,disabled:!this.c.state.activated},(i=e=this.renderControl(t),"function"==typeof i||"[object Object]"===Object.prototype.toString.call(i)&&!L(i)?e:{default:()=>[e]}))]):(ibiz.log.error(ibiz.i18n.t("vue3Util.view.noTeleportTag",{name:t.name})),null);var i}));let o=null;if(this.c.state.hasError&&this.c.error.status){const t=gt(this.c.error.status);t&&("string"==typeof t.component&&(o=w(C(t.component))),o=w(t.component))}return N(A("div",{class:this.viewClassNames,id:this.c.id,"element-loading-text":this.c.state.loadingText},[n,i,o]),[[z("loading"),this.c.state.isLoading]])}});class ui{constructor(){this.component="IBizView"}createController(t,e,n,i){return new Ft(t,e,n,i)}}class hi{constructor(){this.component="IBizView"}createController(t,e,n,i){return new qt(t,e,n,i)}}t("IBizView",Ae(di,function(t){t.component(di.name,di),Gt("DEFAULT",()=>new ci),Gt("APPDATAUPLOADVIEW",()=>new ui),Gt("DEMDCUSTOMVIEW",()=>new hi)})),t("TodoRedirect",O({setup(){const t=ne(),{href:e}=window.location,n=e.lastIndexOf("?"),i=decodeURIComponent(e.substring(n+1,e.length));if(!i)throw new Error(ibiz.i18n.t("vue3Util.view.insufficientRedirection"));const o=oe.parse(i,{delimiter:";"}),{apptype:a,todotype:s,todoid:r}=o,l={srfapptype:"pc",srfapp:""};a||(l.todourltype="RouterUrl"),async function(){let e=(await ibiz.net.post("/systodos/".concat(r,"/getlinkurl"),l)).data.linkurl;a?window.location.href=e:(0!==e.indexOf("/")&&(e="/".concat(e)),e+=";srfwf=".concat(s),t.push("/index".concat(e)))}()},render:()=>A("div",null,[ibiz.i18n.t("vue3Util.view.toDoList")])}));class pi{constructor(){this.component="IBizPortalView"}}const mi=O({name:"IBizPortalView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=be("view"),n=ke((...t)=>new mt(...t)),i=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:o,sysCss:a,codeName:s}=n.model,r=o.toLowerCase(),l=null==a?void 0:a.cssName,c=[e.b(),e.b(r),e.m(s),l];return{c:n,ns:e,controls:i,viewClassNames:c}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach(t=>{const e=t.name||t.id,i={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(i,this.c.slotProps[e]);const o=n[e];if(o)return void(n[e]=()=>o({modelData:t,...i}));const a=this.c.providers[e];a&&(n[e]=()=>{const e=C(a.component);return w(e,{modelData:t,...i,provider:a})})}),n.dashboard&&(e=n.dashboard())}return A("div",{class:this.viewClassNames},[e])}}),vi=(t("IBizPortalView",Ae(mi,function(t){t.component(mi.name,mi),Gt(rt.APP_PORTAL_VIEW,()=>new pi),Gt(rt.DE_PORTAL_VIEW,()=>new pi),Gt(rt.DE_PORTAL_VIEW9,()=>new pi)})),O({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},isEmbedCtrlNav:{type:Boolean,default:!1}},setup(t){const e=ke((...t)=>new mt(...t)),n=f(),i=f(),o=f();return e.evt.on("onCreated",()=>{Ht(h(t.modelData),h(e.context),h(e.params)).then(async t=>{if("view"!==t.type)throw new F(ibiz.i18n.t("vue3Util.view.embeddedRedirectionView"));n.value=t.viewId,i.value=t.context,o.value=t.params})}),t.isEmbedCtrlNav&&l(()=>[e.context,e.params],()=>{Ht(h(t.modelData),h(e.context),h(e.params)).then(async t=>{"view"===t.type&&(n.value=t.viewId,i.value=t.context)})},{deep:!0}),{c:e,toViewId:n,toViewContext:i,toViewParams:o}},render(){return this.toViewId?w(C("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):N(A("div",{style:"width: 100%; height: 100%;"},null),[[z("loading"),!this.toViewId]])}}));class gi{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",Ae(vi,function(t){t.component(vi.name,vi);const e=new gi;Gt(rt.DE_REDIRECT_VIEW,()=>e)}));class yi{constructor(){this.component="IBizHtmlView"}}const fi=O({name:"IBizHtmlView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=be("view"),n=ke((t,...e)=>new $t(t,...e)),i=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:o,sysCss:a,codeName:s}=n.model,r=o.toLowerCase(),l=null==a?void 0:a.cssName,c=[e.b(),e.b(r),e.m(s),l],d=f(!1);B(()=>{n.state.htmlUrl&&(d.value=!0)});return{c:n,ns:e,controls:i,viewClassNames:c,isLoading:d,onLoad:()=>{d.value=!1}}},render(){if(!this.c.state.isCreated)return;if(this.c.state.htmlUrl)return N(A("div",{class:this.viewClassNames,"element-loading-text":this.c.state.loadingText},[A("iframe",{src:this.c.state.htmlUrl,onLoad:()=>this.onLoad()},null)]),[[z("loading"),this.isLoading]]);let t=null;const e=gt("404");return e&&("string"==typeof e.component&&(t=w(C(e.component))),t=w(e.component)),A("div",{class:this.viewClassNames},[t])}});t("IBizHtmlView",Ae(fi,function(t){t.component(fi.name,fi),Gt(rt.DE_HTML_VIEW,()=>new yi)}));const wi=O({name:"IBizViewLayoutPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:{type:Object}},setup(t,{slots:e}){const n=we((...e)=>new Kt(...e,t.container)),i=be("control-".concat(n.model.controlType.toLowerCase()));l(()=>t.data,t=>{t&&(n.setInputData(t),n.load())},{immediate:!0}),n.evt.on("onCreated",()=>{Object.keys(n.panelItems).forEach(t=>{const e=n.panelItems[t];e.state=v(e.state)})});const o=(t,i)=>{var a,s;if(t.hidden)return null;const{providers:r,panelItems:l}=i||n,c=r[t.id];if(!c)return A("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);if("CTRLPOS"!==t.itemType&&e[t.id])return M(e,t.id,{model:t,data:n.data,value:n.data[t.id],controller:l[t.id]});const d=C(c.component);let u;if("CTRLPOS"===t.itemType&&e[t.id]){const n=l[t.id];u=n.parent&&Xt(n.parent.model)?()=>e[t.id]({isSimple:!0,data:n.data}):()=>e[t.id]()}else"TABPANEL"===t.itemType&&(null==(a=t.panelTabPages)?void 0:a.length)?u=()=>t.panelTabPages.map(t=>o(t,i)):zt(t)?u=void 0:(null==(s=t.panelItems)?void 0:s.length)&&(u=()=>t.panelItems.map(t=>o(t,i)));let h="";t.cssStyle&&(h=t.cssStyle);const p=l[t.id],m=function(t,e){const n={};return Qt(t.controlAttributes).forEach(t=>{t.attrName&&t.attrValue&&(n[t.attrName]=ht.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))}),n}(t,p);return m.dynamicstyle&&("object"==typeof m.dynamicstyle?h+=Object.entries(m.dynamicstyle).map(([t,e])=>"".concat(t,":").concat(e,";")).join(""):h+=m.dynamicstyle,delete m.dynamicstyle),w(d,{modelData:t,controller:p,key:t.id,style:h,attrs:m},u)};return b("renderPanelItem",o),{c:n,ns:i,renderPanelItem:o}},render(){const{state:t,model:e}=this.c;return A(C("iBizControlBase"),{controller:this.c},{default:()=>[A(C("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map(t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",A(C("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(i=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(i)&&!L(i)?e:{default:()=>[e]});var i}))]}})]})}});class Ci{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",Ae(wi,function(t){t.component(wi.name,wi),Yt(Jt.VIEW_LAYOUT_PANEL,()=>new Ci)}));function bi(t,e,n){var i,o;if(t.hidden)return;const{providers:a,panelItems:s}=e,r=a[t.id];if(!r)return A("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);const l=C(r.component);let c;"CTRLPOS"===t.itemType&&n.$slots[t.id]?c=()=>n.$slots[t.id]():"TABPANEL"===t.itemType&&(null==(i=t.panelTabPages)?void 0:i.length)?c=()=>t.panelTabPages.map(t=>bi(t,e,n)):zt(t)?c=void 0:(null==(o=t.panelItems)?void 0:o.length)&&(c=()=>t.panelItems.map(t=>bi(t,e,n)));let d="";t.cssStyle&&(d=t.cssStyle);const u=s[t.id],h=function(t,e){const n={};return Qt(t.controlAttributes).forEach(t=>{t.attrName&&t.attrValue&&(n[t.attrName]=ht.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))}),n}(t,u);return h.dynamicstyle&&("object"==typeof h.dynamicstyle?d+=Object.entries(h.dynamicstyle).map(([t,e])=>"".concat(t,":").concat(e,";")).join(""):d+=h.dynamicstyle,delete h.dynamicstyle),(null==n?void 0:n.$slots[t.id])?M(n.$slots,t.id,{modelData:t,controller:u,key:t.id,style:d,attrs:h}):w(l,{modelData:t,controller:u,key:t.id,style:d,attrs:h},c)}const Pi=O({name:"IBizPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:{type:Object},loadDefault:{type:Boolean,default:!0}},setup(t){const e=we((...e)=>new Zt(...e,t.container)),n=be("control-".concat(e.model.controlType.toLowerCase()));l(()=>t.data,t=>{t&&(e.setInputData(t),e.load())},{immediate:!0}),e.evt.on("onCreated",()=>{Object.keys(e.panelItems).forEach(t=>{const n=e.panelItems[t];n.state=v(n.state)})});const i=m("renderPanelItem");return b("renderPanelItem",i||bi),{c:e,ns:n}},render(){const{state:t,model:e}=this.c;return A(C("iBizControlBase"),{controller:this.c},{default:()=>[A(C("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map(t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",A(C("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(i=e=bi(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(i)&&!L(i)?e:{default:()=>[e]});var i}))]}})]})}});class Ii{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",Ae(Pi,function(t){t.component(Pi.name,Pi),Yt(Jt.PANEL,()=>new Ii)}));function Di(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function Ei(t,e){for(var n,i="",o=0,a=-1,s=0,r=0;r<=t.length;++r){if(r<t.length)n=t.charCodeAt(r);else{if(47===n)break;n=47}if(47===n){if(a===r-1||1===s);else if(a!==r-1&&2===s){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",o=0):o=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),a=r,s=0;continue}}else if(2===i.length||1===i.length){i="",o=0,a=r,s=0;continue}e&&(i.length>0?i+="/..":i="..",o=2)}else i.length>0?i+="/"+t.slice(a+1,r):i=t.slice(a+1,r),o=r-a-1;a=r,s=0}else 46===n&&-1!==s?++s:s=-1}return i}var Si={resolve:function(){for(var t,e="",n=!1,i=arguments.length-1;i>=-1&&!n;i--){var o;i>=0?o=arguments[i]:(void 0===t&&(t=process.cwd()),o=t),Di(o),0!==o.length&&(e=o+"/"+e,n=47===o.charCodeAt(0))}return e=Ei(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(Di(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=Ei(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return Di(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];Di(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":Si.normalize(t)},relative:function(t,e){if(Di(t),Di(e),t===e)return"";if((t=Si.resolve(t))===(e=Si.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var i=t.length,o=i-n,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var s=e.length-a,r=o<s?o:s,l=-1,c=0;c<=r;++c){if(c===r){if(s>r){if(47===e.charCodeAt(a+c))return e.slice(a+c+1);if(0===c)return e.slice(a+c)}else o>r&&(47===t.charCodeAt(n+c)?l=c:0===c&&(l=0));break}var d=t.charCodeAt(n+c);if(d!==e.charCodeAt(a+c))break;47===d&&(l=c)}var u="";for(c=n+l+1;c<=i;++c)c!==i&&47!==t.charCodeAt(c)||(0===u.length?u+="..":u+="/..");return u.length>0?u+e.slice(a+l):(a+=l,47===e.charCodeAt(a)&&++a,e.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(Di(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,i=-1,o=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');Di(t);var n,i=0,o=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var s=e.length-1,r=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!a){i=n+1;break}}else-1===r&&(a=!1,r=n+1),s>=0&&(l===e.charCodeAt(s)?-1===--s&&(o=n):(s=-1,o=r))}return i===o?o=r:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){i=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){Di(t);for(var e=-1,n=0,i=-1,o=!0,a=0,s=t.length-1;s>=0;--s){var r=t.charCodeAt(s);if(47!==r)-1===i&&(o=!1,i=s+1),46===r?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!o){n=s+1;break}}return-1===e||-1===i||0===a||1===a&&e===i-1&&e===n+1?"":t.slice(e,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+i:n+t+i:i}("/",t)},parse:function(t){Di(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,i=t.charCodeAt(0),o=47===i;o?(e.root="/",n=1):n=0;for(var a=-1,s=0,r=-1,l=!0,c=t.length-1,d=0;c>=n;--c)if(47!==(i=t.charCodeAt(c)))-1===r&&(l=!1,r=c+1),46===i?-1===a?a=c:1!==d&&(d=1):-1!==a&&(d=-1);else if(!l){s=c+1;break}return-1===a||-1===r||0===d||1===d&&a===r-1&&a===s+1?-1!==r&&(e.base=e.name=0===s&&o?t.slice(1,r):t.slice(s,r)):(0===s&&o?(e.name=t.slice(1,a),e.base=t.slice(1,r)):(e.name=t.slice(s,a),e.base=t.slice(s,r)),e.ext=t.slice(a,r)),s>0?e.dir=t.slice(0,s-1):o&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Si.posix=Si;var xi=Si;t("PluginFactory",class{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.apiUrlPrefix="".concat(ibiz.env.baseUrl),this.cache=new Map,this.pluginCache=new Map,this.pluginCodes=[],this.predefinedPlugins=new Map,this.ignoreRules=[],this.loadQueue=new Map}isIgnore(t){return this.ignoreRules.some(e=>"string"==typeof e?t===e:e.test(t))}setDevIgnore(t){this.ignoreRules.push(t)}registerPredefinedPlugin(t){this.predefinedPlugins.set(t.name,t)}register(t){this.pluginCodes.forEach(e=>{t.use(e.code,e.extraParams)})}async loadPredefinedPlugin(t){if(this.predefinedPlugins.has(t)){const e=this.predefinedPlugins.get(t);e&&await this.loadPluginRef(e.name,e.path)}}setPluginCode(t,e={}){this.pluginCodes.push({code:t,extraParams:e}),he.useComponent.callSync(null,t,e)}async loadPlugin(t,e=ibiz.env.appId){if(!0===t.runtimeObject){const n=t;if(n){const t=n.rtobjectName,i=n.rtobjectRepo,o=n.pluginParams||{};if(this.isIgnore(i))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(i)){const t=await this.loadQueue.get(i);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(n.rtobjectName,n.rtobjectRepo,e,{...o});this.loadQueue.set(i,t);return await t}catch(t){throw new Y(n,ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"))}finally{this.loadQueue.delete(i)}}}return!1}async loadPluginRef(t,e,n=ibiz.env.appId,i={}){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let o=null;{const t=e,i=this.urlReg.test(t)||t.startsWith(this.apiUrlPrefix)?"".concat(t,"/package.json"):"".concat("FULLCODE"===ibiz.env.runContainer&&n!==ibiz.env.appId?ibiz.hub.microAppConfigCenter.getPluginBaseUrl(n):ibiz.env.pluginBaseUrl,"/").concat(xi.join(t,"package.json")),a=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:i});if(200!==a.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));if(o=a.data,!o||!o.name||!o.version)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"))}Object.assign(o,{appId:n,extraParams:i});const a=new te(t,e,o);if(a){await this.loadPluginExternal(a.config);try{return await this.loadScript(a),this.pluginCache.set(t,a),!0}catch(t){ibiz.log.error(t)}}return!1}normalizedPath(t,e){let n="";if(this.urlReg.test(t)){const i=t.endsWith("/")?t:"".concat(t,"/");n=new URL(e,i).href}else n=xi.join(t,e);return n}async loadScript(t){const e=t.repo,{name:n,appId:i,system:o,styles:a=[],extraParams:s={}}=t.config,r=this.normalizedPath(e,o);if(r){if(this.cache.has(r))return;const t="FULLCODE"===ibiz.env.runContainer&&i!==ibiz.env.appId?ibiz.hub.microAppConfigCenter.getPluginBaseUrl(i):ibiz.env.pluginBaseUrl;let o=null;const l=this.parseUrl(r,t),c=("string"==typeof a?[a]:a).map(n=>this.parseUrl(this.normalizedPath(e,n),t));if(System.addImportMap({imports:{[n]:l},styles:{[n]:c}}),o=await System.import(n),!o)throw new F(ibiz.i18n.t("vue3Util.plugin.fileContentFormat"));if(!o.default)throw new F(ibiz.i18n.t("vue3Util.plugin.failedRemotePluginLoad"));this.setPluginCode(o.default,s),this.cache.set(r,!0)}}parseUrl(t,e=ibiz.env.pluginBaseUrl){if(this.urlReg.test(t)||t.startsWith(this.apiUrlPrefix))return t;let n="";n=this.urlReg.test(e)?t.startsWith("/")?e+t:"".concat(e,"/").concat(t):"".concat(xi.join(e,t));const{origin:i,pathname:o}=window.location;return o.endsWith("/")&&n.startsWith("/")&&(n=n.substring(1)),!1===this.urlReg.test(n)&&(n="".concat(i).concat(o).concat(n)),n}async loadPluginExternal(t){if(!t["systemjs-importmap"])return;const e=this.handleSystemImportMap(t["systemjs-importmap"],t.appId);if(e.packages){const n=e.packages;for(const e in n){const i=n[e],o=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:i});if(200!==o.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));const a=o.data;Object.assign(a,{appId:t.appId}),await this.loadPluginExternal(a)}}System.addImportMap(e)}handleSystemImportMap(t,e){if(t){if(t.baseUrl||"FULLCODE"!==ibiz.env.runContainer||e===ibiz.env.appId||(t.baseUrl=ibiz.hub.microAppConfigCenter.getPluginBaseUrl(e)),t.packages){const e=t.packages;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=e[n];e[n]=this.parseUrl(i,t.baseUrl)}}if(t.imports){const e=t.imports;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=e[n];e[n]=this.parseUrl(i,t.baseUrl)}}if(t.styles){const e=t.styles;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=e[n];e[n]="string"==typeof i?this.parseUrl(i,t.baseUrl):i.map(e=>this.parseUrl(e,t.baseUrl))}}return t}return null}});class Ti{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function Oi(){return{value:String,controller:new Ti(Object),data:new Ti(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function Ai(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,customAction:t=>!0}}function Ni(){return{hasError:{type:Boolean}}}function zi(){return{...Oi(),value:[String,Number]}}function _i(){return{...Oi(),value:[String,Number,Object,Array],showTitle:{type:Boolean,default:!0}}}function Ri(){return{...Oi(),value:[String,Number]}}function Li(){return{...Oi(),value:[String,Number]}}function ki(){return{...Oi(),value:[String,Number]}}function Mi(){return{...Oi(),value:[String,Array,Object,Number]}}function Bi(){return{...Oi(),value:[String,Number]}}function Vi(){return{...Oi(),value:[String,Number]}}function ji(){return{...Oi(),value:{type:Object}}}function Ui(){return{...Oi(),value:[String,Number]}}function Wi(){return{...Oi(),value:[String,Number]}}function Fi(){return{...Oi(),value:[String,Number]}}function qi(){return{...Oi(),value:[String,Number]}}function Gi(){return{...Oi(),value:[String,Number,Array]}}function Hi(){return{...Oi(),value:[String,Number]}}function $i(){return{...Oi(),value:[String,Number]}}function Ki(){return{...Oi(),value:[String,Number]}}function Xi(){return{...Oi(),value:String}}function Qi(){return{...Oi(),value:[String,Number]}}function Yi(){return{...Oi(),value:String,language:{type:String},theme:{type:String}}}function Ji(){return{...Oi(),value:String}}function Zi(){return{...Oi(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1},chunkView:{type:String,required:!1},chunkEntity:{type:String,required:!1},context:{type:Object,required:!1},ctrl:{type:Object,required:!1},view:{type:Object,required:!1}}}function to(){return{...Oi(),value:[Array,Array]}}function eo(){return{...Oi(),value:String}}function no(){return{...Oi(),value:String}}function io(){return{...Oi(),value:String}}function oo(){return{...Oi(),value:Number}}function ao(){return{...Oi(),value:String}}t("RequiredProp",Ti);t("en",{vue3Util:{common:{undefined:"undefined",onFoundCorrespondingPart:"Undefined adapter with no corresponding part found",noFoundViewModel:"View model not found",noSupportLoadingDynamic:"{codeName}No entity, do not support loading dynamic models at this time",invalidPointCoordinates:"Invalid point coordinates: ({x}, {y})"},control:{unsupportedPanel:"Unsupported panel items: {id} - {itemType}"},panelComponent:{noConfiguardDataObject:"No data object name config",noSupportedDataSourceType:"The data source type {dataSourceType} is not supported",noConfiguredEntityLogic:"No entity logic config",noConfiguredEntity:"No entity config",noReturnValue:"The entity logic {appDELogicId} has no return value",noAttribute:"There is no {dataName} attribute in the global variable.",noConfiguredScript:"No javaScript config",noConfiguerdEntityBehanior:"No entity behavior config",sessionView:"The session to which the view is bound does not exist {dataName}",viewStateAttribute:"There is no {dataName} attribute in the view state",noImplementMethod:"Method not implemented.",noProvidedSlot:"No {id} slot provided",cannotEmpty:"{caption} cannot be empty",unadaptedLayout:"Unadapted layout placeholder {layoutPos}",placeholderIdentifier:"The placeholder identifier for panel member {id} of view {viewCodeName} is:",refresh:"Refresh",wxQrcodeCaption:"Please use wechat to scan the QR code to log in"},plugin:{failureConfigurationLoad:"Configuration load failure",failedRemotePluginLoad:"Remote Plugin failed to load, Remote Plugin did not find [default] Default Export",fileContentFormat:"Remote plugin failed to load, file not found or file content format is incorrect"},use:{control:{parameterChanges:"Context or view parameter changes for {id}:",stateChange:"Part [{name}] state change"},focusBlur:{noFocus:"No focus, no out-of-focus triggering"},view:{stateChange:"View [{name}] state change"}},util:{noInjected:"The createVueApp method is not injected.",convertString:"Failed to convert to string",viewIdentifiers:"View identifiers do not exist for {depth} level routes",noFoundView:"View not found {viewCodeName}",routeCorrectly:"Cannot get the route correctly, could be a dependency issue."},view:{redirectionProgress:"Redirection in progress",viewType:"View type {viewType} is not supported yet.",noTeleportTag:"No teleportTag was found for part {name}.",embeddedRedirectionView:"Embedded redirection view does not support url jumping",insufficientRedirection:"Insufficient redirection parameters to jump",toDoList:"To-Do List Redirection"}}}),t("zhCn",{vue3Util:{common:{undefined:"未定义",onFoundCorrespondingPart:"未定义未找到对应部件的适配器",noFoundViewModel:"未找到视图模型",noSupportLoadingDynamic:"{codeName}无实体,暂不支持加载动态模型",invalidPointCoordinates:"点坐标无效: ({x}, {y})"},control:{unsupportedPanel:"暂未支持的面板项: {id} - {itemType}"},panelComponent:{noConfiguardDataObject:"没有配置数据对象名称",noSupportedDataSourceType:"数据源类型{dataSourceType}暂未支持",noConfiguredEntityLogic:"没有配置实体逻辑",noConfiguredEntity:"没有配置实体",noReturnValue:"实体逻辑{appDELogicId}没有返回值",noAttribute:"全局变量里没有{dataName}属性",noConfiguredScript:"没有配置脚本代码",noConfiguerdEntityBehanior:"没有配置实体行为",sessionView:"绑定视图的会话不存在{dataName}",viewStateAttribute:"视图state里没有{dataName}属性",noImplementMethod:"未执行的方法",noProvidedSlot:"未提供{id}插槽",cannotEmpty:"{caption} 不能为空",unadaptedLayout:"未适配的布局占位{layoutPos}",placeholderIdentifier:"视图{viewCodeName}的面板成员{id}的占位标识是:",refresh:"刷新",wxQrcodeCaption:"请使用微信扫描二维码登录"},plugin:{failureConfigurationLoad:"配置加载失败",failedRemotePluginLoad:"远程插件加载失败, 远程插件未找到[default]默认导出",fileContentFormat:"远程插件加载失败, 未找到文件或文件内容格式不正确"},use:{control:{parameterChanges:"{id}的上下文或视图参数变更:",stateChange:"部件 [{name}] state 变更"},focusBlur:{noFocus:"没有聚焦,不触发失焦"},view:{stateChange:"视图 [{name}] state 变更"}},util:{noInjected:"没有注入createVueApp方法",convertString:"转换成字符串失败",viewIdentifiers:"第{depth}级路由不存在视图标识",noFoundView:"找不到视图{viewCodeName}",routeCorrectly:"无法正确获取route,可能是依赖问题"},view:{redirectionProgress:"重定向跳转中",viewType:"视图类型{viewType}暂未支持",noTeleportTag:"没有找到部件{name}的teleportTag",embeddedRedirectionView:"嵌入重定向视图不支持url跳转",insufficientRedirection:"重定向参数不足无法跳转",toDoList:"待办列表重定向"}}})}}});
@@ -41,6 +41,12 @@ export declare class AppHooks {
41
41
  static authedApp: AsyncSeriesHook<[], {
42
42
  context: IParams;
43
43
  }>;
44
+ /**
45
+ * @description 应用布局挂载完成钩子
46
+ * @static
47
+ * @memberof AppHooks
48
+ */
49
+ static mountedLayout: AsyncSeriesHook<[], null>;
44
50
  /**
45
51
  * @description 应用初始化完成钩子
46
52
  * @static
@@ -1 +1 @@
1
- {"version":3,"file":"app.hooks.d.ts","sourceRoot":"","sources":["../../../src/hooks/app/app.hooks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;;;GAIG;AACH,qBAAa,QAAQ;IACnB;;;;OAIG;IACH,MAAM,CAAC,SAAS,iCAA6B;IAE7C;;;;OAIG;IACH,MAAM,CAAC,YAAY,4BAA6B;IAEhD;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,yCAAgD;IAEvE;;;;OAIG;IACH,MAAM,CAAC,aAAa;iBAAsC,OAAO;OAAM;IAEvE;;;;OAIG;IACH,MAAM,CAAC,SAAS;iBAAsC,OAAO;OAAM;IAEnE;;;;OAIG;IACH,MAAM,CAAC,SAAS;iBAEH,OAAO;aAAO,WAAW;OAClC;IAEJ;;;;OAIG;IACH,MAAM,CAAC,UAAU,2BAAkC;CACpD"}
1
+ {"version":3,"file":"app.hooks.d.ts","sourceRoot":"","sources":["../../../src/hooks/app/app.hooks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;;;GAIG;AACH,qBAAa,QAAQ;IACnB;;;;OAIG;IACH,MAAM,CAAC,SAAS,iCAA6B;IAE7C;;;;OAIG;IACH,MAAM,CAAC,YAAY,4BAA6B;IAEhD;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,yCAAgD;IAEvE;;;;OAIG;IACH,MAAM,CAAC,aAAa;iBAAsC,OAAO;OAAM;IAEvE;;;;OAIG;IACH,MAAM,CAAC,SAAS;iBAAsC,OAAO;OAAM;IAEnE;;;;OAIG;IACH,MAAM,CAAC,aAAa,4BAA6B;IAEjD;;;;OAIG;IACH,MAAM,CAAC,SAAS;iBAEH,OAAO;aAAO,WAAW;OAClC;IAEJ;;;;OAIG;IACH,MAAM,CAAC,UAAU,2BAAkC;CACpD"}
@@ -33,6 +33,12 @@ AppHooks.beforeInitApp = new AsyncSeriesHook();
33
33
  * @memberof AppHooks
34
34
  */
35
35
  AppHooks.authedApp = new AsyncSeriesHook();
36
+ /**
37
+ * @description 应用布局挂载完成钩子
38
+ * @static
39
+ * @memberof AppHooks
40
+ */
41
+ AppHooks.mountedLayout = new AsyncSeriesHook();
36
42
  /**
37
43
  * @description 应用初始化完成钩子
38
44
  * @static
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-factory.d.ts","sourceRoot":"","sources":["../../../src/plugin/plugin-factory/plugin-factory.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAmB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAGlC;;;;;;;GAOG;AACH,qBAAa,aAAc,YAAW,cAAc;IAClD;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,SAA0B;IAE1C;;;;OAIG;IACH,SAAS,CAAC,YAAY,SAAyB;IAE/C;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAa;IAElD;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAa;IAEjE;;;;;OAKG;IACH,SAAS,CAAC,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,OAAO,CAAA;KAAE,EAAE,CAAM;IAErE;;;;;;;OAOG;IACH,SAAS,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAa;IAElE;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAM;IAEhD;;;;;;;OAOG;IACH,SAAS,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAa;IAE/D;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAS/C;;;;;;OAMG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIzC;;;;;;OAMG;IACH,wBAAwB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAInD;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAMxB;;;;;;;OAOG;IACG,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASvD;;;;;;OAMG;IACH,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,GAAE,OAAY,GAAG,IAAI;IAMtE;;;;;;OAMG;IACG,UAAU,CACd,MAAM,EAAE,YAAY,EACpB,KAAK,GAAE,MAAuB,GAC7B,OAAO,CAAC,OAAO,CAAC;IA6CnB;;;;;;;;OAQG;IACG,aAAa,CACjB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,KAAK,GAAE,MAAuB,EAC9B,WAAW,GAAE,OAAY,GACxB,OAAO,CAAC,OAAO,CAAC;IA6CnB;;;;;;;OAOG;IACH,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAWpE;;;;;;;;OAQG;cACa,UAAU,CAAC,YAAY,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAuDzE;;;;;;;;;OASG;IACH,SAAS,CAAC,QAAQ,CAChB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,MAA+B,GACvC,MAAM;IAwBT;;;;;;;;OAQG;cACa,kBAAkB,CAChC,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,IAAI,CAAC;IAiChB;;;;;;;OAOG;IACH,SAAS,CAAC,qBAAqB,CAC7B,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,MAAM,GACZ,gBAAgB,GAAG,IAAI;CAkD3B"}
1
+ {"version":3,"file":"plugin-factory.d.ts","sourceRoot":"","sources":["../../../src/plugin/plugin-factory/plugin-factory.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAmB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAGlC;;;;;;;GAOG;AACH,qBAAa,aAAc,YAAW,cAAc;IAClD;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,SAA0B;IAE1C;;;;OAIG;IACH,SAAS,CAAC,YAAY,SAAyB;IAE/C;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAa;IAElD;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAa;IAEjE;;;;;OAKG;IACH,SAAS,CAAC,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,OAAO,CAAA;KAAE,EAAE,CAAM;IAErE;;;;;;;OAOG;IACH,SAAS,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAa;IAElE;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAM;IAEhD;;;;;;;OAOG;IACH,SAAS,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAa;IAE/D;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAS/C;;;;;;OAMG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIzC;;;;;;OAMG;IACH,wBAAwB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAInD;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAMxB;;;;;;;OAOG;IACG,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASvD;;;;;;OAMG;IACH,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,GAAE,OAAY,GAAG,IAAI;IAMtE;;;;;;OAMG;IACG,UAAU,CACd,MAAM,EAAE,YAAY,EACpB,KAAK,GAAE,MAAuB,GAC7B,OAAO,CAAC,OAAO,CAAC;IA6CnB;;;;;;;;OAQG;IACG,aAAa,CACjB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,KAAK,GAAE,MAAuB,EAC9B,WAAW,GAAE,OAAY,GACxB,OAAO,CAAC,OAAO,CAAC;IAkDnB;;;;;;;OAOG;IACH,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAWpE;;;;;;;;OAQG;cACa,UAAU,CAAC,YAAY,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAuDzE;;;;;;;;;OASG;IACH,SAAS,CAAC,QAAQ,CAChB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,MAA+B,GACvC,MAAM;IAwBT;;;;;;;;OAQG;cACa,kBAAkB,CAChC,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,IAAI,CAAC;IAiChB;;;;;;;OAOG;IACH,SAAS,CAAC,qBAAqB,CAC7B,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,MAAM,GACZ,gBAAgB,GAAG,IAAI;CAkD3B"}
@@ -232,6 +232,11 @@ class PluginFactory {
232
232
  );
233
233
  }
234
234
  configData = res.data;
235
+ if (!configData || !configData.name || !configData.version) {
236
+ throw new Error(
237
+ ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad")
238
+ );
239
+ }
235
240
  }
236
241
  Object.assign(configData, { appId, extraParams });
237
242
  const remotePlugin = new RemotePluginItem(
@@ -35,6 +35,12 @@ AppHooks.beforeInitApp = new qxUtil.AsyncSeriesHook();
35
35
  * @memberof AppHooks
36
36
  */
37
37
  AppHooks.authedApp = new qxUtil.AsyncSeriesHook();
38
+ /**
39
+ * @description 应用布局挂载完成钩子
40
+ * @static
41
+ * @memberof AppHooks
42
+ */
43
+ AppHooks.mountedLayout = new qxUtil.AsyncSeriesHook();
38
44
  /**
39
45
  * @description 应用初始化完成钩子
40
46
  * @static
@@ -234,6 +234,11 @@ class PluginFactory {
234
234
  );
235
235
  }
236
236
  configData = res.data;
237
+ if (!configData || !configData.name || !configData.version) {
238
+ throw new Error(
239
+ ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad")
240
+ );
241
+ }
237
242
  }
238
243
  Object.assign(configData, { appId, extraParams });
239
244
  const remotePlugin = new runtime.RemotePluginItem(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-util",
3
- "version": "0.7.41-alpha.134",
3
+ "version": "0.7.41-alpha.136",
4
4
  "description": "通用组件库(vue3)",
5
5
  "main": "lib/index.cjs",
6
6
  "types": "es/index.d.ts",
@@ -39,7 +39,7 @@
39
39
  "devDependencies": {
40
40
  "@ibiz-template/cli": "^0.3.23",
41
41
  "@ibiz-template/core": "^0.7.41-alpha.119",
42
- "@ibiz-template/runtime": "^0.7.41-alpha.134",
42
+ "@ibiz-template/runtime": "^0.7.41-alpha.136",
43
43
  "@ibiz-template/theme": "^0.7.39",
44
44
  "@ibiz/model-core": "^0.1.89",
45
45
  "@types/path-browserify": "^1.0.2",
@@ -68,5 +68,5 @@
68
68
  "vue": "^3.3.8",
69
69
  "vue-router": "^4.2.4"
70
70
  },
71
- "gitHead": "e78bf67edd338c57931386b644794510729a9fa8"
71
+ "gitHead": "1b93abc0b7ace1087581e25717564d4f35a8056d"
72
72
  }
@@ -44,6 +44,13 @@ export class AppHooks {
44
44
  */
45
45
  static authedApp = new AsyncSeriesHook<[], { context: IParams }>();
46
46
 
47
+ /**
48
+ * @description 应用布局挂载完成钩子
49
+ * @static
50
+ * @memberof AppHooks
51
+ */
52
+ static mountedLayout = new AsyncSeriesHook<[]>();
53
+
47
54
  /**
48
55
  * @description 应用初始化完成钩子
49
56
  * @static
@@ -253,7 +253,7 @@ export class PluginFactory implements IPluginFactory {
253
253
  if (this.pluginCache.has(rtObjectName)) {
254
254
  return true;
255
255
  }
256
- let configData: unknown = null;
256
+ let configData: IData | null = null;
257
257
  {
258
258
  const pluginPath: string = rtObjectRepo;
259
259
  const configUrl =
@@ -271,6 +271,11 @@ export class PluginFactory implements IPluginFactory {
271
271
  );
272
272
  }
273
273
  configData = res.data;
274
+ if (!configData || !configData.name || !configData.version) {
275
+ throw new Error(
276
+ ibiz.i18n.t('vue3Util.plugin.failureConfigurationLoad'),
277
+ );
278
+ }
274
279
  }
275
280
  Object.assign(configData as RemotePluginConfig, { appId, extraParams });
276
281
  const remotePlugin = new RemotePluginItem(