@ibiz-template/vue3-util 0.7.41-alpha.22 → 0.7.41-alpha.24

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-icon{--ibiz-icon-emoji-space:-3px}.ibiz-icon__emoji{position:relative;left:var(--ibiz-icon-emoji-space)}.ibiz-control-shell{position:relative;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-custom-render{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-view-shell{position:relative;width:100%;height:100%}.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-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-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-nav-pos{width:100%;height:100%}.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-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);width:100%;height:100%;position:relative}.ibiz-panel-field__error{left:0;top:100%;line-height:1;font-size:var(--ibiz-font-size-small);padding-top:var(--ibiz-spacing-super-tight);position:absolute;color:var(--ibiz-color-danger)}.ibiz-panel-field.is-error .el-input__wrapper{box-shadow:0 0 0 1px var(--ibiz-color-danger) inset}.ibiz-panel-field .ibiz-panel-field-content{line-height:inherit}.ibiz-single-data-container{width:100%;height:100%}.ibiz-panel-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width: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-x:hidden;overflow-y:auto}.ibiz-panel-container-image.is-hidden{display:none}.ibiz-multi-data-container-raw{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-container-group{--ibiz-panel-container-group-bg-color:transparent;--ibiz-panel-container-group-header-bg-color:transparent;--ibiz-panel-container-group-header-padding:var(--ibiz-spacing-base-tight);--ibiz-panel-container-group-header-border-color:var(--ibiz-color-border);--ibiz-panel-container-group-header-height:49px;--ibiz-panel-container-group-caption-text-color:var(--ibiz-color-text-0);--ibiz-panel-container-group-caption-font-size:var(--ibiz-font-size-header-5);--ibiz-panel-container-group-caption-font-weight:var(--ibiz-font-weight-bold);--ibiz-panel-container-group-content-bg-color:transparent;--ibiz-panel-container-group-content-padding:var(--ibiz-spacing-tight)}.ibiz-panel-container-group{height:100%;background-color:var(--ibiz-panel-container-group-bg-color);border-radius:var(--ibiz-border-radius-base)}.ibiz-panel-container-group__caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;font-size:var(--ibiz-panel-container-group-caption-font-size);font-weight:var(--ibiz-panel-container-group-caption-font-weight);color:var(--ibiz-panel-container-group-caption-text-color)}.ibiz-panel-container-group__caption--icon{padding-right:var(--ibiz-spacing-tight)}.ibiz-panel-container-group__counter{margin-left:var(--ibiz-spacing-tight)}.ibiz-panel-container-group-collapse>.ibiz-panel-container-group-content{display:block}.ibiz-panel-container-group-collapse.is-collapse>.ibiz-panel-container-group-content{display:none}.ibiz-panel-container-group-header{display:flex;height:var(--ibiz-panel-container-group-header-height);padding:var(--ibiz-panel-container-group-header-padding);margin:var(--ibiz-panel-container-group-header-margin);border-bottom:1px solid var(--ibiz-panel-container-group-header-border-color)}.ibiz-panel-container-group-header__left,.ibiz-panel-container-group-header__right{display:inline-block;width:50%}.ibiz-panel-container-group-header__right{text-align:right;display:flex;align-items:center;justify-content:flex-end}.ibiz-panel-container-group-content{width:100%;height:100%}.ibiz-panel-container-group-content>.ibiz-row{width:100%;height:100%}.ibiz-panel-container-group--show-header>.ibiz-panel-container-group-content{height:calc(100% - var(--ibiz-panel-container-group-header-height));padding:var(--ibiz-panel-container-group-content-padding);background-color:var(--ibiz-panel-container-group-content-bg-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-multi-data-container{width:100%;height:100%}.ibiz-auth-wxmp-qrcode{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-font-size-small);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-color-primary);background-color:rgba(255,255,255,.9)}.ibiz-auth-wxmp-qrcode__mask--icon{font-size:var(--ibiz-font-size-header-1);cursor:pointer}.ibiz-auth-wxmp-qrcode__mask--icon:hover{color:var(--ibiz-color-primary-hover)}.ibiz-teleport-placeholder{width:auto;height:auto}.ibiz-teleport-placeholder>div:not(:last-child){display:none}.ibiz-view-dehtmlview>iframe{width:100%;height:100%;border:0}.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-control-viewlayoutpanel{width:100%;height:100%}.ibiz-control-viewlayoutpanel-content{width:100%;height:100%}.ibiz-control-panel{width:100%;height:100%}.ibiz-control-panel-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-view-shell{position:relative;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-control-shell{position:relative;width:100%;height:100%}.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-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-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-nav-pos{width:100%;height:100%}.ibiz-multi-data-container-raw{width:100%;height:100%}.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);width:100%;height:100%;position:relative}.ibiz-panel-field__error{left:0;top:100%;line-height:1;font-size:var(--ibiz-font-size-small);padding-top:var(--ibiz-spacing-super-tight);position:absolute;color:var(--ibiz-color-danger)}.ibiz-panel-field.is-error .el-input__wrapper{box-shadow:0 0 0 1px var(--ibiz-color-danger) inset}.ibiz-panel-field .ibiz-panel-field-content{line-height:inherit}.ibiz-panel-ctrl-pos{width:100%;height:100%}.ibiz-panel-ctrl-pos.is-hidden{display:none}.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-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-multi-data-container{width:100%;height:100%}.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-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width: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-x:hidden;overflow-y:auto}.ibiz-panel-container-image.is-hidden{display:none}.ibiz-panel-container-group{--ibiz-panel-container-group-bg-color:transparent;--ibiz-panel-container-group-header-bg-color:transparent;--ibiz-panel-container-group-header-padding:var(--ibiz-spacing-base-tight);--ibiz-panel-container-group-header-border-color:var(--ibiz-color-border);--ibiz-panel-container-group-header-height:49px;--ibiz-panel-container-group-caption-text-color:var(--ibiz-color-text-0);--ibiz-panel-container-group-caption-font-size:var(--ibiz-font-size-header-5);--ibiz-panel-container-group-caption-font-weight:var(--ibiz-font-weight-bold);--ibiz-panel-container-group-content-bg-color:transparent;--ibiz-panel-container-group-content-padding:var(--ibiz-spacing-tight)}.ibiz-panel-container-group{height:100%;background-color:var(--ibiz-panel-container-group-bg-color);border-radius:var(--ibiz-border-radius-base)}.ibiz-panel-container-group__caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;font-size:var(--ibiz-panel-container-group-caption-font-size);font-weight:var(--ibiz-panel-container-group-caption-font-weight);color:var(--ibiz-panel-container-group-caption-text-color)}.ibiz-panel-container-group__caption--icon{padding-right:var(--ibiz-spacing-tight)}.ibiz-panel-container-group__counter{margin-left:var(--ibiz-spacing-tight)}.ibiz-panel-container-group-collapse>.ibiz-panel-container-group-content{display:block}.ibiz-panel-container-group-collapse.is-collapse>.ibiz-panel-container-group-content{display:none}.ibiz-panel-container-group-header{display:flex;height:var(--ibiz-panel-container-group-header-height);padding:var(--ibiz-panel-container-group-header-padding);margin:var(--ibiz-panel-container-group-header-margin);border-bottom:1px solid var(--ibiz-panel-container-group-header-border-color)}.ibiz-panel-container-group-header__left,.ibiz-panel-container-group-header__right{display:inline-block;width:50%}.ibiz-panel-container-group-header__right{text-align:right;display:flex;align-items:center;justify-content:flex-end}.ibiz-panel-container-group-content{width:100%;height:100%}.ibiz-panel-container-group-content>.ibiz-row{width:100%;height:100%}.ibiz-panel-container-group--show-header>.ibiz-panel-container-group-content{height:calc(100% - var(--ibiz-panel-container-group-header-height));padding:var(--ibiz-panel-container-group-content-padding);background-color:var(--ibiz-panel-container-group-content-bg-color)}.ibiz-single-data-container{width:100%;height:100%}.ibiz-auth-wxmp-qrcode{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-font-size-small);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-color-primary);background-color:rgba(255,255,255,.9)}.ibiz-auth-wxmp-qrcode__mask--icon{font-size:var(--ibiz-font-size-header-1);cursor:pointer}.ibiz-auth-wxmp-qrcode__mask--icon:hover{color:var(--ibiz-color-primary-hover)}.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-teleport-placeholder{width:auto;height:auto}.ibiz-teleport-placeholder>div:not(:last-child){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,o,i,a,s,r,l,c,d,u,h,p,m,v,g,f,y,w,b,C,P,I,D,E,x,O,N,S,A,T,z,_,R,L,k,B,M,j,V,U,W,F,q,G,$,H,K,X,Q,Y,J,Z,tt,et,nt,ot,it,at,st,rt,lt,ct,dt,ut,ht,pt,mt,vt,gt,ft,yt,wt,bt,Ct,Pt,It,Dt,Et,xt,Ot,Nt,St,At,Tt,zt,_t,Rt,Lt,kt,Bt,Mt,jt,Vt,Ut,Wt,Ft,qt,Gt,$t,Ht,Kt,Xt,Qt,Yt,Jt,Zt,te,ee,ne,oe,ie,ae,se;return{setters:[function(t){e=t.SyncSeriesHook,n=t.AsyncSeriesHook,o=t.isFunc,i=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.isReactive,p=t.toRaw,m=t.inject,v=t.reactive,g=t.onActivated,f=t.onDeactivated,y=t.ref,w=t.h,b=t.resolveComponent,C=t.provide,P=t.onMounted,I=t.onUnmounted,D=t.isRef,E=t.shallowRef,x=t.watchEffect,O=t.computed,N=t.defineComponent,S=t.createVNode,A=t.withDirectives,T=t.resolveDirective,z=t.nextTick,_=t.mergeProps,R=t.isVNode,L=t.createTextVNode,k=t.Teleport,B=t.renderSlot,M=t.onBeforeMount},function(t){j=t.onClickOutside,V=t.NOOP,U=t.listenJSEvent,W=t.Namespace,F=t.RuntimeError,q=t.isBase64Image,G=t.isBase64,$=t.base64ToStr,H=t.isSvg,K=t.fixJsonString,X=t.IBizContext,Q=t.ModelError,Y=t.RuntimeModelError,J=t.setAppCookie,Z=t.CoreConst,tt=t.clearAppCookie,et=t.StringUtil},function(t){nt=t.isNil,ot=t.isNotNil,it=t.clone,at=t.isEmpty,st=t.mergeLeft},function(t){rt=t.MDControlTypes,lt=t.ViewType,ct=t.RouteConst,dt=t.getMatchResPath,ut=t.calcDeCodeNameById,ht=t.PredefinedControlRender,pt=t.ScriptFactory,mt=t.ViewController,vt=t.getControlProvider,gt=t.getErrorViewProvider,ft=t.calcDynaSysParams,yt=t.getViewProvider,wt=t.useCalcOrMode,bt=t.calcThresholdRange,Ct=t.PanelItemState,Pt=t.PanelItemController,It=t.registerPanelItemProvider,Dt=t.Modal,Et=t.ViewMode,xt=t.OpenAppViewCommand,Ot=t.getEditorProvider,Nt=t.PanelItemEventName,St=t.calcDynaClass,At=t.getAllPanelField,Tt=t.isDataContainer,zt=t.PanelNotifyState,_t=t.getPanelItemProvider,Rt=t.convertNavData,Lt=t.PanelData,kt=t.execDELogicById,Bt=t.toLocalOpenWFRedirectView,Mt=t.getControlsByView,jt=t.getCtrlTeleportParams,Vt=t.AppDataUploadViewController,Ut=t.MDCustomViewController,Wt=t.registerViewProvider,Ft=t.getDERedirectToView,qt=t.ViewLayoutPanelController,Gt=t.isSimpleDataContainer,$t=t.registerControlProvider,Ht=t.ControlType,Kt=t.PanelController,Xt=t.RemotePluginItem},function(t){Qt=t.useRoute,Yt=t.useRouter,Jt=t.RouterView},function(t){Zt=t.default},function(t){te=t.isElement,ee=t.isNumber,ne=t.throttle,oe=t.isObject,ie=t.isString},function(t){ae=t.defineStore,se=t.createPinia}],execute:function(){t({calcResRoutePath:Pe,computedAsync:function(t,e,n){let o;o=D(n)?{evaluating:n}:n||{};const{lazy:i=!1,flush:a="pre",evaluating:s,shallow:r=!0,onError:l=V}=o,c=E(!i),d=r?E(e):y(e);let u=0;if(x((async e=>{if(!c.value)return;u++;const n=u;let o=!1;s&&Promise.resolve().then((()=>{s.value=!0}));try{const i=await t((t=>{e((()=>{s&&(s.value=!1),o||t()}))}));n===u&&(d.value=i)}catch(t){l(t)}finally{s&&n===u&&(s.value=!1),o=!0}}),{flush:a}),i)return O((()=>(c.value=!0,d.value)));return d},createOverlayView:Oe,generateRoutePath:async function(t,e,n,o){var i;const a=fe(e);let s=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==o?void 0:o.srfmenuitem;!r&&a.pathNodes.length>1&&(r=null==(i=a.pathNodes[1].params)?void 0:i.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}be(n,a.pathNodes),e.fullPath.startsWith("/appredirectview")&&((null==o?void 0:o.srfindexname)?(a.pathNodes[0].viewName=o.srfindexname,delete o.srfindexname):a.pathNodes[0].viewName="index");if(a.pathNodes.push({viewName:t.codeName.toLowerCase(),context:we(n),params:o}),2===s&&(await Pe(a,n,t.appDataEntityId,t.appId),Ce.includes(t.viewType))){const e=ut(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:ye(a)}},generateRoutePathByModal:async function(t,e,n,o){const i=fe(e),a=i.pathNodes.findIndex((t=>t.viewName===ct.ROUTE_MODAL_TAG));-1!==a&&(i.pathNodes=i.pathNodes.slice(0,a));if(n.currentSrfNav){const t=i.pathNodes[i.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}return be(n,i.pathNodes),i.pathNodes.push({viewName:"".concat(ct.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:we(n),params:o}),{path:ye(i)}},getArrayProps:ei,getAutoCompleteProps:Yo,getCascaderProps:ni,getCheckboxListProps:ko,getCheckboxProps:Bo,getCodeProps:Jo,getColorPickerProps:oi,getDataPickerProps:Mo,getDatePickerProps:jo,getDateRangeProps:Vo,getDateRangeSelectEmits:function(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,change:(t,e,n)=>!0}},getDateRangeSelectProps:Uo,getDrawerPlacement:function(t){return Ne[t]||"right"},getDropdownProps:Lo,getEditorEmits:To,getEditorProps:Ao,getGridArrayProps:function(){return{...ei(),...zo()}},getGridAutoCompleteProps:function(){return{...Yo(),...zo()}},getGridCascaderProps:function(){return{...ni(),...zo()}},getGridCheckboxListProps:function(){return{...ko(),...zo()}},getGridCheckboxProps:function(){return{...Bo(),...zo()}},getGridCodeProps:function(){return{...Jo(),...zo()}},getGridColorPickerProps:function(){return{...oi(),...zo()}},getGridDataPickerProps:function(){return{...Mo(),...zo()}},getGridDatePickerProps:function(){return{...jo(),...zo()}},getGridDateRangeProps:function(){return{...Vo(),...zo()}},getGridDateRangeSelectProps:function(){return{...zo(),...Uo()}},getGridDropdownProps:function(){return{...Lo(),...zo()}},getGridEditorCommonProps:zo,getGridEditorEmits:function(){return{change:(t,e,n)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...Zo(),...zo()}},getGridInputIpProps:function(){return{...ii(),...zo()}},getGridInputNumberProps:function(){return{...ai(),...zo()}},getGridInputProps:function(){return{..._o(),...zo()}},getGridListBoxProps:function(){return{...Wo(),...zo()}},getGridMapPickerProps:function(){return{...si(),...zo()}},getGridMarkDownProps:function(){return{...ti(),...zo()}},getGridNumberRangeProps:function(){return{...Fo(),...zo()}},getGridRadioProps:function(){return{...qo(),...zo()}},getGridRateProps:function(){return{...Go(),...zo()}},getGridRawProps:function(){return{...$o(),...zo()}},getGridSliderProps:function(){return{...Ho(),...zo()}},getGridSpanProps:function(){return{...Ro(),...zo()}},getGridStepperProps:function(){return{...Ko(),...zo()}},getGridSwitchProps:function(){return{...Xo(),...zo()}},getGridUploadProps:function(){return{...Qo(),...zo()}},getHtmlProps:Zo,getInputIpProps:ii,getInputNumberProps:ai,getInputProps:_o,getListBoxProps:Wo,getMapPickerProps:si,getMarkDownProps:ti,getNestedRoutePath:Ie,getNumberRangeProps:Fo,getOrigin:de,getOwnRouteContext:we,getRadioProps:qo,getRateProps:Go,getRawProps:$o,getSliderProps:Ho,getSpanProps:Ro,getStepperProps:Ko,getSwitchProps:Xo,getUploadProps:Qo,isEmptyVNode:function(t){if(!Array.isArray(t))return t===he;return 1===t.length&&t[0]===he},onRouteChange:function(t,e){const n=Qt();if(!n)throw new F(ibiz.i18n.t("vue3Util.util.routeCorrectly"));l((()=>null==n?void 0:n.fullPath),(()=>{const o=Ie(n,e);t({currentKey:o,fullPath:n.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(Oe(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(Oe(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(Oe(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(Oe(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var o;const a=fe(t,n);let s=a.pathNodes[e-1].viewName;if(!s)throw new F(ibiz.i18n.t("vue3Util.util.viewIdentifiers",{depth:e}));s===ct.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==(o=ibiz.appData)?void 0:o.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];i(n.context)&&Object.assign(l,n.context),t!==e-1||n.context&&!nt(n.context.srfnavctrlid)||delete l.srfnavctrlid}const{params:c,srfnav:d}=a.pathNodes[e-1];return{viewConfig:r,context:l,params:c,srfnav:d}},prepareControl:function(t){const e=ge("control"),{controlType:n,sysCss:o,codeName:i}=t.model,a=n.toLowerCase(),s=null==o?void 0:o.cssName,r=ge("control-".concat(a)),l=[e.b(),e.b(a),e.m(i)];s&&l.push(s);return{controlClass:l,ns:r}},renderString:function(t){if(nt(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""},route2routePath:fe,routePath2string:ye,shareCommonAncestor:_e,useAutoFocusBlur:function(t,e){return{useInFocusAndBlur:()=>{t.autoFocus||e("blur")},useInValueChange:()=>{t.autoFocus&&e("blur")}}},useClickOutside:le,useCodeListListen:function(t,e,n){let o;P((async()=>{if(t){const i=await ibiz.hub.getApp(e);o=await i.codeList.getCodeListInstance(t),o&&o.onChange(n)}})),I((()=>{o&&o.offChange(n)}))},useControlController:me,useControlPopoverzIndex:function(t){const{zIndex:e}=Ae();t.state.zIndex=e.increment(),I((()=>{e.decrement()}))},useController:function(t){t.force=ue()},useCtx:pe,useEventListener:ve,useFocusAndBlur:function(t,e){const n=y(),o=y(!1);let i;const a=()=>{o.value||ibiz.log.debug(ibiz.i18n.t("vue3Util.use.focusBlur.noFocus")),e(),i.stop(),o.value=!1};return ve(n,"click",(e=>{o.value||(i=le(n,(()=>{a()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:a,pause:()=>{i&&i.pause()},stop:()=>{i&&i.stop()}}},useForce:ue,useForceTogether:function(t,e){const n=e.force,o=ue();e.force=t=>{n(t),o()}},useLocalCacheKey:function(t,e,n,o="@",i=""){const a=Yt();return()=>{if(!a)return;const s=t.srfuserid;if(n=t.srfdefaulttoroutedepth||n){const t=fe(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 i=ye(t);return"".concat(e).concat(o).concat(s).concat(o).concat(i)}}return i?"".concat(e).concat(o).concat(s).concat(o).concat(i):void 0}},useMobCtx:function(){return m("ctx")},useNamespace:ge,usePopoverVisible:function(t,e){let n;const o=y(!1);return l((()=>t.value),(i=>{i&&!n&&(n=U(window,"click",(n=>{if(o.value&&t.value){_e(e(t.value),n.target)&&(o.value=!1)}}),{capture:!0}))}),{immediate:!0}),I((()=>{null==n||n()})),{popoverVisible:o,setPopoverVisible:t=>{o.value=t}}},usePopoverzIndex:function(){const t="popover_".concat(r());return{popoverid:t,setPopoverZIndex:e=>{const{zIndex:n}=Ae(),o=document.getElementsByClassName(t),i=n.increment();if(o&&o.length>0&&e)for(let t=0;t<o.length;t++)o[t].style.setProperty(e,"".concat(i))}}},useProps:ce,usePropsWatch:function(t,e,n){const o=ce();Object.prototype.hasOwnProperty.call(o,t)&&(l((()=>o[t]),((t,n)=>{e(de(t),de(n))}),n),e(de(o[t]),void 0))},useRouteKey:function(t,e,n){n||(n=y(""));n.value=t.value;const o=new De(e);return l(t,((t,e)=>{t!==e&&o.nextChange((()=>{n.value=t}))})),n},useRouterQuery:function(){const t=Qt(),{query:e}=t;return e},useViewController:Te,useViewOperation:ze});class re{}function le(t,e,n={}){let o=V,i=V,a=V;const s=()=>{o(),o=V,i=V,a=V};return l(t,((t,r)=>{if(t!==r)if(nt(t))s();else{const s=j((null==t?void 0:t.$el)||t,e,n);o=s.stop,i=s.pause,a=s.proceed}}),{immediate:!0}),c((()=>{o!==V&&s()})),{stop:()=>o(),pause:()=>i(),proceed:()=>a()}}function ce(){return u().proxy.$props}function de(t){return h(t)?p(t):t}function ue(){const t=u().proxy;return e=>{t.$forceUpdate(),e&&o(e)&&t.$nextTick((()=>{e()}))}}t("AppHooks",re),re.createApp=new e,re.useComponent=new e,re.appResorceInited=new n,re.beforeInitApp=new n,re.authedApp=new n,re.initedApp=new n,re.destoryApp=new n;const he=t("EmptyVNode",d("EmptyVNode"));function pe(){return m("ctx")}function me(t,e){const n=pe(),o=ce();n.evt.emit("onForecast",o.modelData.name);const i=o.provider;let a;a=(null==i?void 0:i.createController)?i.createController(o.modelData,o.context,o.params,n):t(o.modelData,o.context,o.params,n),-1!==rt.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 o={...t};t.context===n.context&&delete o.context,t.params===n.params&&delete o.params,e.updateContextParams(o),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)}))}(o,a),function(t,e,n=[]){const o=["context","params","modelData",...n];l((()=>{const e={};return Object.keys(t).forEach((n=>{o.includes(n)||(e[n]=t[n])})),e}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.stateChange",{name:e.model.name}),o),Object.keys(o).forEach((t=>{void 0!==o[t]&&(e.state[t]=o[t])}))}),{immediate:!0})}(o,a,null==e?void 0:e.excludePropsKeys),a.state=v(a.state),g((()=>a.onActivated())),f((()=>a.onDeactivated())),a.force=ue();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!==rt.indexOf(a.model.controlType)&&ibiz.util.record.remove(a.ctrlId)})),a}function ve(t,e,n,o={}){let i=V;return l(t,((t,a)=>{t!==a&&(nt(t)?(i(),i=V):i=U((null==t?void 0:t.$el)||t,e,n,o))}),{immediate:!0}),c((()=>{i!==V&&i()})),()=>{i()}}function ge(t){return new W(t,ibiz.env.namespace)}function fe(t,e=!1){const n=t.matched.length;let o=t.path;e&&(o=o.replace(new RegExp("/".concat(ct.ROUTE_MODAL_TAG),"g"),""));const i=o.split("/"),a=[];for(let e=1;e<=n;e++){const n=i[2*e],o=t.params["params".concat(e)];let s,r,l;s=o&&o!==ibiz.env.routePlaceholder?Zt.parse(o,{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=Zt.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:s,pathNodes:a}}function ye(t){let e="";return t.appContext?e+="/".concat(Zt.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach(((t,n)=>{e+="/".concat(t.viewName,"/");let o={};if(0===n)i(t.context)&&(o=t.context);else{if(o=i(t.params)?t.params:{},i(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(o.srfnavctx=encodeURIComponent(e))}t.srfnav&&(o.srfnav=t.srfnav)}const a=Zt.stringify(o,{delimiter:";",strictNullHandling:!0,skipNulls:!0});i(a)?e+=a:e+=ibiz.env.routePlaceholder})),e}function we(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=>{ot(t[n])&&(e[n]=t[n])})),delete e.attributekeys}let o=!1;return Object.prototype.hasOwnProperty.call(e,"srfkeepnull")&&(o=!0===e.srfkeepnull||"true"===e.srfkeepnull,delete e.srfkeepnull),Object.keys(e).forEach((t=>{(n.includes(t)||!o&&nt(e[t]))&&delete e[t]})),e}function be(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 Ce=t("excludeViewTypes",[lt.DE_GRID_VIEW,lt.DE_GRID_EXP_VIEW,lt.DE_LIST_VIEW,lt.DE_LIST_EXP_VIEW,lt.DE_DATA_VIEW,lt.DE_DATAVIEW_EXP_VIEW,lt.DE_CALENDAR_VIEW,lt.DE_CALENDAR_EXP_VIEW,lt.DE_CHART_VIEW,lt.DE_CHART_EXP_VIEW,lt.DE_KANBAN_VIEW]);async function Pe(t,e,n,o){if(n){const i=await ibiz.hub.getAppDataEntity(n,o);let a=dt(e,i);if(a||(a={path:"",keys:[i.codeName.toLowerCase()]}),a){const n=t.pathNodes[1].context,o={};a.keys.forEach((t=>{e&&Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t],n&&delete n[t])})),t.pathNodes[0].context=o}}else t.pathNodes[0].context=void 0}function Ie(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=fe(t);if(o.pathNodes.length<e)return t.path;o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e));const i=o.pathNodes[e-1];return n&&delete i.srfnav,i.context&&delete i.context.srfnavctrlid,ye(o)}class De{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",De);const Ee=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===ht.EMPTYPANEL))}));class xe{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,o=document.createElement("div");let i=document.body;te(null==n?void 0:n.appendTo)&&(i=null==n?void 0:n.appendTo),i.appendChild(o);const a=xe.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){i.removeChild(o),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(o),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",xe);function Oe(t){return(e,n)=>{const o=b("IBizViewShell");return w(o,{...t,viewShellHooks:n,modal:e})}}t("OverlayPopoverContainer",class extends xe{present(t){return this.modal.present(t)}});const Ne={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class Se{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 o=t.currentRoute.value.fullPath;n.replace?t.replace({path:e}):t.push({path:e});const i=e;if(this.map.has(i)){return this.map.get(i).onWillDismiss()}const a=new Se(o,i);return this.map.set(i,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",ae("appStore",(()=>({appStore:v({})}))));const Ae=t("useUIStore",ae("uiStore",(()=>{const t=function(){const t=y(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",se());function Te(t){const e=ce(),n=m("ctx",void 0);null==n||n.evt.emit("onForecast",e.modelData.name);const o=e.provider;let i;i=(null==o?void 0:o.createController)?o.createController(e.modelData,e.context,e.params,n):t(e.modelData,e.context,e.params,n),ibiz.util.viewStack.add(i.id,i),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,i),function(t,e){l((()=>t.state?{...t.state}:{}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.view.stateChange",{name:e.model.name}),o),Object.keys(o).forEach((t=>{e.state[t]=o[t]}))}),{immediate:!0})}(e,i),C("ctx",i.ctx),i.state=v(i.state),i.slotProps=v(i.slotProps),e.modal&&(i.modal=e.modal),g((()=>{i.onActivated(),ibiz.util.viewStack.active(i.id)})),f((()=>{i.onDeactivated(),ibiz.util.viewStack.deactivate(i.id)})),i.force=ue();const a=u().proxy;return i.evt.onAll(((t,e)=>{a.$emit(t.slice(2),e)})),i.created(),c((()=>{i.destroyed(),ibiz.util.viewStack.remove(i.id)})),i}function ze(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 _e(t,e){if(!t||!e)return!1;if(t===e)return!0;const n=new Set;let o=t;for(;o;){n.add(o);const t=o.parentNode;o=!t||"BODY"!==t.nodeName&&"HTML"!==t.nodeName?t:null}for(o=e;o;){if(n.has(o))return!0;o=o.parentNode}return!1}const Re=t("IBizIcon",N({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=ge("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=O((()=>function(t){if(t){if(t.htmlStr)return S("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")||-1!==t.cssClass.indexOf("theme-icon")?S("i",{class:[e.b(),t.cssClass]},null):S("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return q(t.imagePath)?S("img",{class:e.b(),src:t.imagePath},null):G(t.imagePath)?S("div",{class:[e.b(),e.e("emoji")]},[$(t.imagePath)]):H(t.imagePath)?S("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?S("img",{class:e.b(),src:t.imagePath},null):S("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?S("img",{class:e.b(),src:t.imagePath},null):S("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return H(t.rawContent)?S("div",{class:e.b(),innerHTML:t.rawContent},null):S("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}}));t("IBizRouterView",N({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:e}){const n={};let o=!0;l((()=>t.manualKey),((t,e)=>{ot(t)&&t!==e&&(o=!0)}));return{renderComp:(i,a)=>{if(!o)return n.vNode;if(o=!1,i){const o={...i.props};delete o.onVnodeUnmounted,delete o.ref;const a=w(i.type,{...o,...e,key:t.manualKey});return n.vNode=a,a}}}},render(){return S(b("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",N({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=ge("control"),{controlType:n,sysCss:o,codeName:i}=t.controller.model,a=n.toLowerCase(),s=null==o?void 0:o.cssName,r=t.controller.model,l=t.controller.model.controls,c=v({});!1===r.controlType.endsWith("EXPBAR")&&(nt(r.width)||(r.width>0&&r.width<=1?c.width="".concat(100*r.width,"%"):c.width="".concat(r.width,"px")),nt(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 o=e.target.getAttribute(n),i=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)),o&&await pt.asyncExecScriptFn({...t.controller.getEventArgs(),context:a,params:r,data:i?K(i):null},o)},u=O((()=>(n=>{var o,i;const a=r.controlRenders?r.controlRenders.filter((t=>!Object.values(ht).includes(t.id))):void 0;if(!a||0===a.length)return;const s=a[0];if("LAYOUTPANEL_MODEL"===s.renderType&&s.layoutPanelModel){const i=pt.execScriptFn({...t.controller.getEventArgs(),data:n},s.layoutPanelModel,{isAsync:!1});return S("div",{innerHTML:i,onClick:t=>d(t,"click"),onDblclick:t=>d(t,"dbclick"),class:[e.e("control-render"),e.e(null==(o=s.renderName)?void 0:o.toLowerCase())]},null)}return"LAYOUTPANEL"===s.renderType&&s.layoutPanel?S(b("iBizControlShell"),{class:[e.e("control-render"),e.e(null==(i=s.renderName)?void 0:i.toLowerCase())],data:n,params:t.controller.params,context:t.controller.context,modelData:s.layoutPanel},null):void 0})(t.controller.data||t.controller.items)));return{ns:e,typeClass:a,sysCssName:s,inlineStyle:c,codeName:i,controls:l,customRender:u,disableMaskInfoRender:()=>{const n=r.controlRenders?r.controlRenders.find((t=>t.id===ht.DISABLEPANEL)):void 0;if(!n)return S("div",{innerHTML:t.controller.state.maskOption.maskInfo||"",class:[e.e("disable-mask-text")]},null);if("LAYOUTPANEL_MODEL"===n.renderType&&n.layoutPanelModel){const o=pt.execScriptFn({...t.controller.getEventArgs()},n.layoutPanelModel,{isAsync:!1,singleRowReturn:!0});return S("div",{innerHTML:o,class:[e.e("disable-mask-text")]},null)}return"LAYOUTPANEL"===n.renderType&&n.layoutPanel?S(b("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:o,controlPanel:i,providers:a}=this.controller;let s=null;if(o.isCreated&&i){const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const n=t.name,o={context:this.controller.context,params:this.controller.params},i=e[n];e[n]=i?()=>i(o):()=>{const e=b("IBizControlShell");return w(e,{modelData:t,...o})}}));const n=a[i.name];s=w(b(n.component),{modelData:i,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return S("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName,this.ns.is("disabled",o.disabled)],style:this.inlineStyle},[s||this.customRender||(null==(n=(e=this.$slots).default)?void 0:n.call(e)),o.disabled&&S("div",{class:[this.ns.e("mask-container"),this.ns.m(o.maskOption.mode.toLowerCase())]},["MASK"===o.maskOption.mode&&this.disableMaskInfoRender()])])}})),t("IBizControlShell",N({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:lt.DE_CUSTOM_VIEW,appId:ibiz.env.appId};C("ctx",new mt(t,X.create({})).ctx)}const n=y(!1),o=y(""),i=y();vt(t.modelData).then((t=>{t?i.value=t:o.value=ibiz.i18n.t("vue3Util.common.onFoundCorrespondingPart"),n.value=!0})).catch((t=>{ibiz.log.error(t),o.value=t.message,n.value=!0}));return{ns:ge("control-shell"),isComplete:n,errMsg:o,provider:i}},render(){return this.isComplete&&this.provider?w(b(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):A(S("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[T("loading"),!this.isComplete]])}})),t("IBizViewShell",N({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=ge("view-shell"),o=y(!1),i=y(""),a=y(),s=y(),c=y(!0);t.ctx&&C("ctx",t.ctx);const d=y(t.context),u=y(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{accUserMode:n,accessKey:o}=t,i=ibiz.auth.getAuthInfo();if(void 0!==n)switch(n){case 1:i&&(e=!1);break;case 2:i||(e=!1);break;case 4:o&&((await ibiz.hub.getApp(d.value.srfappid)).authority.calcByResCode(o)||(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 ft(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=nt(d.value.srfsessionid)||at(d.value.srfsessionid),o=r();if(n){const e=ibiz.uiDomainManager.create(o,t);d.value.srfsessionid=e.id}const i=ibiz.hub.getApp(p.appId);d.value.srfappid||(d.value.srfappid=p.appId);const a=await i.deService.getService(d.value,t),s=await a.get(d.value,u.value||{});if(s.ok&&s.data){const{srfwftag:t,processdefinitionkey:n,taskdefinitionkey:o}=s.data;t&&(e.srfwftag=t),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW"].includes(p.viewType)&&(nt(u.value.processDefinitionKey)&&(u.value.processDefinitionKey=n),nt(u.value.taskDefinitionKey)&&(u.value.taskDefinitionKey=o))}n&&(ibiz.uiDomainManager.destroy(o),d.value.srfsessionid="")}if(m(e)===h)return void setTimeout((()=>{o.value=!0}));s.value=await ibiz.hub.loadAppView(p.appId,p.id,e),h=m(e)}else s.value=p;a.value=await yt(p)}catch(t){ibiz.log.error(t),i.value=t.message}finally{o.value=!0}};v();return{ns:n,errMsg:i,provider:a,isComplete:o,hasAuthority:c,viewModelData:s,redrawView:async t=>{o.value=!1;const{redrawData:n}=t,{isReloadModel:i}=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()),i?await v():setTimeout((()=>{o.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(b(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(b(t.component)):w(t.component)}return A(S("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[T("loading"),!this.isComplete]])}})),t("IBizCodeList",N({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,o;const i=ge("code-list"),a=y([]),s=(null==(n=t.codeList)?void 0:n.textSeparator)||"、",r=(null==(o=t.codeList)?void 0:o.valueSeparator)||",",c=O((()=>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:o}=t.codeList;if(o&&ee(Number(n))){const t=bt(e,Number(n));if(t)return t}const i=e.find((t=>t.value==n));if(i)return i;for(let t=0;t<e.length;t++){const o=u(e[t].children,n);if(o)return o}}};l([()=>t.codeListItems,()=>t.value],(([e,n],[o,i])=>{if(nt(n)||""===n)a.value=[];else{let o=[];const{getSelectArray:i}=d,s=i(n,t.codeList,e,r,t.codeList.codeItemValueNumber);s&&(o=s),a.value=o.map((n=>{const o=u(e,n);let i=n;if(t.convertToCodeItemText&&(null==o?void 0:o.text))i=o.text;else{const{valueFormat:e,unitName:n}=t;e&&(i=ibiz.util.text.format("".concat(i),e)),n&&(i+=n)}return{text:i,color:null==o?void 0:o.color,textCls:null==o?void 0:o.textCls,sysImage:null==o?void 0:o.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:i,emptyText:h,textSeparator:s}},render(){return S("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,S("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&&S(b("iBizIcon"),{icon:t.sysImage},null),"ICON"!==this.showMode&&t.text])]))])}})),t("ControlLoadingPlaceholder",N({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",N({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"},max:{type:Number,default:99},counterMode:{type:Number}},setup:()=>({ns:ge("badge")}),render(){if((this.value||0===this.value)&&!(1===this.counterMode&&this.value<=0))return S("div",{class:[this.ns.b(),this.ns.m(this.type)]},[this.value>this.max?"".concat(this.max,"+"):this.value])}})),t("IBizCustomRender",N({name:"IBizCustomRender",props:{controller:{type:Object,required:!0}},setup(t){const e=ge("custom-render"),n=async(e,n)=>{e.stopPropagation();const o=e.target.getAttribute(n),i=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)),o&&await pt.asyncExecScriptFn({...t.controller.getEventArgs(),context:a,params:r,data:i?K(i):null},o)};return{ns:e,getControlRender:()=>{var o,i,a;const s=null==(o=t.controller)?void 0:o.model.controlRenders;if(!s||0===s.length)return;const r=s.find((t=>t.id===ht.EMPTYPANEL));if(r){if("LAYOUTPANEL_MODEL"===r.renderType&&r.layoutPanelModel){const o=pt.execScriptFn({...t.controller.getEventArgs()},r.layoutPanelModel,{isAsync:!1});return S("div",{innerHTML:o,onClick:t=>n(t,"click"),onDblclick:t=>n(t,"dbclick"),class:[e.b(),e.e(null==(i=r.renderName)?void 0:i.toLowerCase())]},null)}return"LAYOUTPANEL"===r.renderType&&r.layoutPanel?S(b("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 Le{constructor(t,e,n,o){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=o||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 ke{constructor(t,e,n,o,i,a){this.startPoint=t,this.control2=e,this.control1=n,this.endPoint=o,this.startWidth=i,this.endWidth=a}static fromPoints(t,e){const n=this.calculateControlPoints(t[0],t[1],t[2]).c2,o=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new ke(t[1],n,o,t[2],e.start,e.end)}static calculateControlPoints(t,e,n){const o=t.x-e.x,i=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(o*o+i*i),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,f=e.y-v;return{c1:new Le(r+g,l+f),c2:new Le(c+g,d+f)}}length(){let t,e,n=0;for(let o=0;o<=10;o+=1){const i=o/10,a=this.point(i,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),s=this.point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(o>0){const o=a-t,i=s-e;n+=Math.sqrt(o*o+i*i)}t=a,e=s}return n}point(t,e,n,o,i){return e*(1-t)*(1-t)*(1-t)+3*n*(1-t)*(1-t)*t+3*o*(1-t)*t*t+i*t*t*t}}class Be{constructor(t,e={}){var n,o,i;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!=(o=e.minDistance)?o: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!=(i=e.canvasContextOptions)?i:{},this._strokeMoveUpdate=this.throttle?ne(Be.prototype._strokeUpdate,this.throttle):Be.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 ee(e.rotation)&&0!==e.rotation&&(n=await this.rotateDataURL(n,e.rotation,"image/png")),new Promise(((t,o)=>{const i=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()),i.onload=()=>{this._ctx.drawImage(i,l,c,s,r),t()},i.onerror=t=>{o(t)},i.crossOrigin="anonymous",i.src=n,this._oldFromDataURL=n,this._isEmpty=!1}))}rotateDataURL(t,e=0,n="image/png",o){return new Promise(((i,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),i(l.toDataURL(n,o))},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 o=window.innerWidth>window.innerHeight;return{isLandscape:o,status:o?"横屏":"竖屏",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?(oe(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),ee(n)&&0!==n){const o=n*Math.PI/180,i=document.createElement("canvas"),a=i.getContext("2d"),s=this.canvas.width,r=this.canvas.height;return n%180==0?(i.width=s,i.height=r):(i.width=r,i.height=s),a.translate(i.width/2,i.height/2),a.rotate(o),a.drawImage(this.canvas,-s/2,-r/2),i.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==(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(),o={...n,points:[]};this._data.push(o),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],o=n.points,i=o.length>0&&o[o.length-1],a=!!i&&e.distanceTo(i)<=this.minDistance,s=this._getPointGroupOptions(n);if(!i||!i||!a){const t=this._addPoint(e,s);i?t&&this._drawCurve(t,s):this._drawDot(e,s),o.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 o=this.canvas.getBoundingClientRect();return new Le(t-o.left,e-o.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),o=ke.fromPoints(n,t);return n.shift(),o}return null}_calculateCurveWidths(t,e,n){const o=n.velocityFilterWeight*e.velocityFrom(t)+(1-n.velocityFilterWeight)*this._lastVelocity,i=this._strokeWidth(o,n),a={end:i,start:this._lastWidth};return this._lastVelocity=o,this._lastWidth=i,a}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,n){const o=this._ctx;o.moveTo(t,e),o.arc(t,e,n,0,2*Math.PI,!1),this._isEmpty=!1,this._isRedrawn=!0}_drawCurve(t,e){const n=this._ctx,o=t.endWidth-t.startWidth,i=2*Math.ceil(t.length());n.beginPath(),n.fillStyle=e.penColor;for(let n=0;n<i;n+=1){const a=n/i,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*o,e.maxWidth);this._drawCurveSegment(u,h,p)}n.closePath(),n.fill()}_drawDot(t,e){const n=this._ctx,o=e.dotSize>0?e.dotSize:(e.minWidth+e.maxWidth)/2;n.beginPath(),this._drawCurveSegment(t.x,t.y,o),n.closePath(),n.fillStyle=e.penColor,n.fill()}_fromData(t,e,n){for(const o of t){const{points:t}=o,i=this._getPointGroupOptions(o);if(t.length>1)for(let n=0;n<t.length;n+=1){const o=t[n],a=new Le(o.x,o.y,o.pressure,o.time);0===n&&this._reset(i);const s=this._addPoint(a,i);s&&e(s,i)}else this._reset(i),n(t[0],i)}}toSVG({includeBackgroundColor:t=!1}={}){const e=this._data,n=Math.max(window.devicePixelRatio||1,1),o=this.canvas.width/n,i=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(o," ").concat(i)),a.setAttribute("width",o.toString()),a.setAttribute("height",i.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 o="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",o),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:o,maxWidth:i})=>{const s=document.createElement("circle"),r=n>0?n:(o+i)/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 o=new FileReader;o.onload=()=>{e(o.result)},o.onerror=()=>{n(new Error("无法转换Blob为DataURL"))},o.readAsDataURL(t)}))}loadImage(t,e){const n=new Image;n.onload=()=>e(),n.onerror=()=>e,n.src=t}}t("IBizSignaturePad",N({name:"IBizSignaturePad",props:{options:{type:Object}},setup(t){const e=ge("signature-pad"),n=y(),o=y(),i=y(),a=()=>{const e={};if(t.options){const{dotsize:n,minwidth:o,maxwidth:i,pencolor:a,velocityfilterweight:s,compositeoperation:r,mindistance:l,backgroundcolor:c,throttle:d,canvascontextoptions:u}=t.options;if(n&&Object.assign(e,{dotSize:Number(n)}),o&&Object.assign(e,{minWidth:Number(o)}),i&&Object.assign(e,{maxWidth:Number(i)}),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(ie(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=>{z((()=>{const e=o.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"),i.value=new Be(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=()=>{i.value&&(i.value.off(),l())};return P((()=>{r(),window.addEventListener("resize",c)})),I((()=>{window.removeEventListener("resize",c)})),{ns:e,canvasRef:o,signaturePadRef:n,signaturePad:i,updateSignaturePad:l}},render(){return S("div",{class:this.ns.b(),ref:"signaturePadRef"},[S("div",{class:this.ns.e("container")},[S("canvas",{ref:"canvasRef"},null)])])}}));class Me extends Ct{}t("PanelContainerState",Me);class je extends Pt{createState(){var t;return new Me(null==(t=this.parent)?void 0:t.state)}}function Ve(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}t("PanelContainerController",je);const Ue=N({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:je,required:!0}},setup(t){const e=ge("panel-container"),{id:n}=t.modelData,o=O((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o}));return{ns:e,classArr:o}},render(){var t,e,n;let o;const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=S(b("iBizRow"),{slot:"content",layout:this.modelData.layout},Ve(o=i.map((t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ve(t)?t:{default:()=>[t]}):t})))?o:{default:()=>[o]}),s=null==(n=this.$attrs)?void 0:n.attrs;if(s&&s.dynamictooltip){const t={...s.dynamictooltip};return delete t.content,S(b("el-tooltip"),_({placement:"right","popper-class":this.ns.e("dynamic-tooltip")},t),{default:()=>S("div",_({class:this.classArr,onClick:()=>{this.controller.onClick()}},this.$attrs),[this.controller.model.cssStyle?S("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a]),content:()=>S("div",{class:this.ns.e("dynamic-tooltip-content"),innerHTML:s.dynamictooltip.content},null)})}return S("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?S("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class We{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new je(t,e,n);return await o.init(),o}}t("IBizPanelContainer",Ee(Ue,(function(t){t.component(Ue.name,Ue),It("CONTAINER",(()=>new We)),It("CONTAINER_DEFAULT",(()=>new We))})));const Fe=N({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){m("ctx").evt.on("onRegister",((e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}));return{ns:ge("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),S("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!t.visible)]},[e||(ibiz.env.dev?ibiz.i18n.t("vue3Util.panelComponent.noProvidedSlot",{id:this.modelData.id}):"")])}});class qe extends Pt{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 Ge{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new qe(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",Ee(Fe,(function(t){t.component(Fe.name,Fe),It("CTRLPOS",(()=>new Ge))})));class $e extends Pt{}function He(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}t("ScrollContainerItemController",$e);const Ke=t("ScrollContainerItem",N({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:$e,required:!0}},setup(t){const e=ge("scroll-container-item"),{id:n}=t.modelData,o=O((()=>[e.b(),e.m(n),e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return S(b("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},He(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},He(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class Xe{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new $e(t,e,n);return await o.init(),o}}class Qe extends Pt{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",Qe);const Ye=t("ScrollContainer",N({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:Qe,required:!0}},setup(t){const e=ge("scroll-container"),{id:n}=t.modelData,o=O((()=>[e.b(),e.m(n),...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n=null,o=null,i=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":i=t,r.right={width:l};break;case"NORTH":o=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 S("div",{class:this.classArr},[S("div",{class:[this.ns.e("header")],style:r.top},[o]),S("div",{class:[this.ns.b("content")]},[S("div",{class:this.ns.be("content","left"),style:r.left},[n]),S("div",{class:this.ns.be("content","center")},[s]),S("div",{class:this.ns.be("content","right"),style:r.right},[i])]),S("div",{class:[this.ns.e("footer")],style:r.bottom},[a])])}}));class Je{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new Qe(t,e,n);return await o.init(),o}}t("IBizScrollContainer",Ee(Ye,(function(t){t.component(Ye.name,Ye),t.component(Ke.name,Ke),It("CONTAINER_CONTAINER_SCROLL",(()=>new Je)),It("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new Xe)),It("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new Xe)),It("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new Xe)),It("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new Xe)),It("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new Xe))})));class Ze extends Ct{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={},this.isLoading=!1}}t("NavPosState",Ze);const tn=["is404","isRoutePushed"];class en extends Pt{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 Ze(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]?(st(this.state.navViewMsgs[e],t),tn.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 Dt({mode:this.routeDepth?Et.ROUTE:Et.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=Ie(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,o,i;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=Ie(this.route,this.routeDepth,!1);(null==(e=t.modalOptions)?void 0:e.replace)?this.router.replace("".concat(n,"/error/404")):this.router.push("".concat(n,"/error/404"))}else 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==(o=t.modalOptions)?void 0:o.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==(i=this.rawItemParams)?void 0:i.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;i(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}}function nn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}t("NavPosController",en);const on=N({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:en,required:!0}},setup(t){const e=t.controller,n=ge("nav-pos"),o=Yt(),i=Qt(),a=y(!1);if(e.setRouter(o),e.routeDepth){const t=Ie(i,e.routeDepth);l((()=>i.fullPath),(()=>{const n=Ie(i,e.routeDepth);if(t===n&&i.matched.length>e.routeDepth){if(i.matched.length===e.routeDepth+1&&(a.value=!!i.name,a.value))return;e.onRouteChange(i)}}),{immediate:!0})}return{ns:n,c:e,isPresetView:a,onViewCreated:t=>{e.onViewCreated(t)}}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:o,navViewMsgs:i,cache:a}=e;let s=null;if(e.routeOpen){if(this.isPresetView)return S(Jt,null,null);s=S(b("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?S(t,null,null):null;return a?S(b("keepAlive"),{include:o,max:30,isKey:!0},nn(e)?e:{default:()=>[e]}):e}})}else{const t=n&&i[n]?w(b("IBizViewShell"),{context:i[n].context,params:i[n].params,key:this.c.ignoreEmbedKey?void 0:n,viewId:i[n].viewId,onCreated:this.onViewCreated}):null;s=a?S(b("keepAlive"),{include:o,max:30,isKey:!0},nn(t)?t:{default:()=>[t]}):t}return S("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[s])}});class an{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new en(t,e,n);return await o.init(),o}}t("IBizNavPos",Ee(on,(function(t){t.component(on.name,on),It("RAWITEM_NAV_POS",(()=>new an))})));class sn extends Ct{constructor(){super(...arguments),this.error=null}}class rn extends Pt{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 sn(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 Ot(this.model.editor),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:Nt.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.ENTER,event:t})}}t("PanelFieldController",rn);const ln=N({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:rn,required:!0},attrs:{type:Object,require:!1}},setup(t){const e=ge("panel-field"),n=O((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n),e.is("error",!!t.controller.state.error)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n,onValueChange:(e,n)=>{t.controller.setDataValue(e,n)}}},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"),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=b(this.controller.editorProvider.formEditor);t=w(n,{...e})}else t=S(b("not-supported-editor"),{modelData:this.modelData.editor},null)}return S("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t,this.controller.state.error&&S("div",{class:this.ns.e("error")},[this.controller.state.error])])}});class cn{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new rn(t,e,n);return await o.init(),o}}t("IBizPanelField",Ee(ln,(function(t){t.component(ln.name,ln),It("FIELD",(()=>new cn))})));class dn extends Pt{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?St(this.model.dynaClass,t):[],o=(null==(n=this.model.rawItem)?void 0:n.dynaClass)?St(this.model.rawItem.dynaClass,t):[];this.state.class.containerDyna=[...e,...o]}if(this.model.labelDynaClass){const e=St(this.model.labelDynaClass,t);this.state.class.labelDyna=e}}}t("PanelRawItemController",dn);const un=N({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:dn,required:!0}},setup(t){const e=ge("panel-rawitem"),n=t.controller,o=y(""),i=y(""),{rawItem:a}=t.modelData;a&&a.cssStyle&&(i.value=a.cssStyle);const s=O((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return l((()=>n.data),(async t=>{if(t){const e=n.model.rawItem;if(!e)return;let i;const a={...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(a,{data:{...t}}))),o.value=i}}),{immediate:!0}),{ns:e,classArr:s,tempStyle:i,content:o}},render(){if(this.controller.state.visible)return S("div",{class:this.classArr,style:this.tempStyle,onClick:t=>{this.controller.onClick(t)}},[S(b("iBizRawItem"),{rawItem:this.modelData,content:this.content},null)])}});class hn{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new dn(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",Ee(un,(function(t){t.component(un.name,un),It("RAWITEM",(()=>new hn)),It("RAWITEM_STATIC_IMAGE",(()=>new hn)),It("RAWITEM_STATIC_LABEL",(()=>new hn)),It("RAWITEM_STATIC_TEXT",(()=>new hn))})));class pn extends Ct{constructor(){super(...arguments),this.data={}}}class mn{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new pn,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const i=At(this.model).map((t=>t.id));o._evt.on("change",(t=>{i.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 o,i;const a=this.parent.providers[t.id];if(!a)return;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(o=t.panelItems)?void 0:o.length)&&!Tt(t)?await this.initChildrenController(t.panelItems,e,s):(null==(i=t.panelTabPages)?void 0:i.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 vn extends Ct{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",vn);class gn extends Pt{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new vn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders()}async panelStateNotify(t){super.panelStateNotify(t),t===zt.LOAD&&this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map((async t=>{var e,n;const o=await _t(t,this.panel.model,this.panel.view.model);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!Tt(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,o=this.panel.context.clone();Object.assign(o,Rt(e,t,this.panel.context,this.panel.params));const i=Rt(n,t,this.panel.context,this.panel.params);return Object.assign(i,this.panel.params),{context:o,params:i}}initContainerData(){const{dataSourceType:t,dataName:e,scriptCode:n}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":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"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!n)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=pt.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},n,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}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=At(this.model),n=t.map((t=>new Lt(e,t)));this.dataItems=n.map((t=>new mn(this.model,this.panel,this,t))),this.dataItems.length&&await Promise.all(this.dataItems.map((t=>t.init()))),this.state.items=n,this.childrenStateNotify(zt.LOAD)}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:o}=this.computeNavParams(),i=await kt(e,t,n,this.panel.data,o);if(!i)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(i)}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:o,params:i}=this.computeNavParams(),a=await n.deService.exec(e,t,o,void 0,i);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",gn);const fn=N({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:gn,required:!0}},setup(t){const e=ge("multi-data-container"),{id:n}=t.modelData;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 o=m("renderPanelItem"),i=O((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:i,renderPanelItem: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 S(b("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const o=n.panelItems[t.id];return S(b("iBizCol"),{layoutPos:t.layoutPos,state:o.state},"function"==typeof(i=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(i)&&!R(i)?e:{default:()=>[e]});var i}))]}})})),S("div",{class:this.classArr},[t])}});class yn{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new gn(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",Ee(fn,(function(t){t.component(fn.name,fn),It("CONTAINER_CONTAINER_MULTIDATA",(()=>new yn))})));class wn extends Ct{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerRawState",wn);class bn extends Pt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.items}createState(){var t;return new wn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers()}async panelStateNotify(t){super.panelStateNotify(t),t===zt.LOAD&&this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,i;const a=await _t(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==(o=t.panelItems)?void 0:o.length)&&!Tt(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(i=t.panelTabPages)?void 0:i.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)})))}computeNavParams(){const{navigateContexts:t,navigateParams:e}=this.model,n=this.panel.context.clone();Object.assign(n,Rt(t,this.panel.params,this.panel.context));const o=Rt(e,this.panel.params,this.panel.context);return Object.assign(o,this.panel.params),{context:n,params:o}}initContainerData(){const{dataSourceType:t,dataName:e,scriptCode:n}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":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"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!n)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=pt.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},n,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}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(zt.LOAD)}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:o}=this.computeNavParams(),i=await kt(e,t,n,this.panel.data,o);if(!i)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(i)}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:o,params:i}=this.computeNavParams(),a=await n.deService.exec(e,t,o,void 0,i);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",bn);const Cn=N({name:"IBizMultiDataContainerRaw",props:{modelData:{type:Object,required:!0},controller:{type:bn,required:!0}},setup(t){const e=ge("multi-data-container-raw"),{id:n}=t.modelData;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 o=m("renderPanelItem"),i=O((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:i,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():S(b("iBizRow"),{class:this.ns.b("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 S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!R(o)?e:{default:()=>[e]});var o}))]}}),S("div",{class:this.classArr},[t])}});class Pn{constructor(){this.component="IBizMultiDataContainerRaw"}async createController(t,e,n){const o=new bn(t,e,n);return await o.init(),o}}t("IBizMultiDataContainerRaw",Ee(Cn,(function(t){t.component(Cn.name,Cn),It("CONTAINER_CONTAINER_MULTIDATA_RAW",(()=>new Pn))})));class In extends Ct{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",In);class Dn extends Pt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new In(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers()}async panelStateNotify(t){super.panelStateNotify(t),t===zt.LOAD&&this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,i;const a=await _t(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==(o=t.panelItems)?void 0:o.length)&&!Tt(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(i=t.panelTabPages)?void 0:i.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)})))}computeNavParams(){const{navigateContexts:t,navigateParams:e}=this.model,n=this.panel.context.clone();Object.assign(n,Rt(t,this.panel.params,this.panel.context));const o=Rt(e,this.panel.params,this.panel.context);return Object.assign(o,this.panel.params),{context:n,params:o}}initContainerData(){const{dataSourceType:t,dataName:e,dataRegionType:n,scriptCode:o}=this.model;if("LOGINFORM"!==n)switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":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"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!o)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=pt.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},o,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}else this.setLoginForm()}childrenStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setData(t){var e,n;const o=At(this.model),i=o.map((t=>t.id)),a=new Lt(o,t);a._evt.on("change",(t=>{i.includes(t)&&this.childDataChangeNotify([t])})),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=a,this.childrenStateNotify(zt.LOAD)}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:o}=this.computeNavParams(),i=await kt(e,t,n,this.panel.data,o);if(!i)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(i)}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:o,params:i}=this.computeNavParams(),a=await n.deService.exec(e,t,o,void 0,i);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",Dn);const En=N({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Dn,required:!0}},setup(t){const e=ge("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach((e=>{const n=t.controller.panelItems[e];n.state=v(n.state)}));const o=m("renderPanelItem"),i=O((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:i,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():S(b("iBizRow"),{class:this.ns.b("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 S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!R(o)?e:{default:()=>[e]});var o}))]}}),S("div",{class:this.classArr},[t])}});class xn{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new Dn(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",Ee(En,(function(t){t.component(En.name,En),It("CONTAINER_CONTAINER_SINGLEDATA",(()=>new xn))})));class On extends Ct{}t("GridContainerState",On);class Nn extends Pt{createState(){var t;return new On(null==(t=this.parent)?void 0:t.state)}}function Sn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}t("GridContainerController",Nn);const An=N({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Nn,required:!0}},setup(t){const e=ge("grid-container"),{id:n}=t.modelData,o=O((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),i=O((()=>({...t.modelData.layout,layout:"TABLE_12COL"}))),a=y(void 0),s=y(12);return{ns:e,classArr:o,layoutModel:i,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:s,adaptCols:a}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];if(void 0===this.adaptCols){let t=0,e=0;o.forEach((n=>{const o=n.props;o&&o.modelData&&o.modelData.layoutPos&&("number"==typeof o.modelData.layoutPos.grow?t+=o.modelData.layoutPos.grow:void 0===o.modelData.layoutPos.grow&&(e+=1))}));let n=12;e>0&&(n=(12-t)/e),this.adaptCols=e,this.adaptGrow=n}return S(b("iBizRow"),{class:this.classArr,layout:this.layoutModel},Sn(n=o.map((t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},Sn(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class Tn{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new Nn(t,e,n);return await o.init(),o}}t("IBizGridContainer",Ee(An,(function(t){t.component(An.name,An),It("CONTAINER_CONTAINER_GRID",(()=>new Tn))})));class zn extends Ct{}t("PanelContainerImageState",zn);class _n extends Pt{createState(){var t;return new zn(null==(t=this.parent)?void 0:t.state)}}function Rn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}t("PanelContainerImageController",_n);const Ln=N({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:_n,required:!0}},setup(t){const e=ge("panel-container-image"),{id:n}=t.modelData,o=O((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),i=O((()=>{const e=t.controller.model.sysImage,n={};let o="";if(null==e?void 0:e.rawContent)if(H(e.rawContent)){const t=e.rawContent.replace(/[\u4e00-\u9fff]/g,"");o="url(data:image/svg+xml;base64,".concat(btoa(t),")")}else o="url(".concat(e.rawContent,")");else(null==e?void 0:e.imagePath)&&(o="url(".concat(e.imagePath,")"));return o&&Object.assign(n,{backgroundImage:o}),n}));return{ns:e,classArr:o,backgroundStyle:i}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],i=S(b("iBizRow"),{slot:"content",layout:this.modelData.layout},Rn(n=o.map((t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Rn(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return S("div",{class:this.classArr,onClick:()=>{this.controller.onClick()},style:this.backgroundStyle},[this.controller.model.cssStyle?S("style",{type:"text/css"},[this.controller.model.cssStyle]):null,i])}});class kn{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new _n(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",Ee(Ln,(function(t){t.component(Ln.name,Ln),It("CONTAINER_CONTAINER_IMAGE",(()=>new kn))})));class Bn extends Ct{}t("PanelContainerGroupState",Bn);class Mn extends Pt{createState(){var t;return new Bn(null==(t=this.parent)?void 0:t.state)}get disableClose(){const{titleBarCloseMode:t}=this.model;return 0===t||void 0===t}get defaultExpansion(){const{titleBarCloseMode:t}=this.model;return this.disableClose||1===t}}t("PanelContainerGroupController",Mn);class jn{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new Mn(t,e,n);return await o.init(),o}}function Vn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}const Un=N({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:Mn,required:!0}},setup(t){const e=ge("panel-container-group"),n=y(!t.controller.defaultExpansion);return{ns:e,captionText:O((()=>{const{captionItemName:e,caption:n,capLanguageRes:o}=t.modelData;if(e)return t.controller.data[e];let i=n;return o&&(i=ibiz.i18n.t(o.lanResTag,n)),i})),isCollapse:n,changeCollapse:()=>{t.controller.disableClose||(n.value=!n.value)}}},render(){var t,e;let n;const o=[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!this.controller.state.visible)];!0===this.modelData.showCaption&&(o.push(this.ns.m("show-header")),o.push(this.ns.b("collapse")),o.push(this.ns.is("collapse",this.isCollapse)),this.controller.disableClose&&o.push(this.ns.bm("collapse","disable-close")));const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=S(b("iBizRow"),{slot:"content",layout:this.modelData.layout},Vn(n=i.map((t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Vn(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let s=null;return this.modelData.showCaption&&(s=S("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[S("div",{class:[this.ns.be("header","left")]},[S("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.modelData.sysImage&&S(Re,{class:this.ns.em("caption","icon"),icon:this.modelData.sysImage},null),this.captionText,this.modelData.counterId&&S("span",{class:this.ns.e("counter")},[L("("),this.controller.state.counterData[this.modelData.counterId],L(")")])])]),S("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?S("ion-icon",{name:"caret-forward-sharp"},null):S("ion-icon",{name:"caret-down-sharp"},null))])])),S("div",{class:o},[s,S("div",{class:[this.ns.b("content")]},[a])])}});t("IBizPanelContainerGroup",Ee(Un,(function(t){t.component(Un.name,Un),It("CONTAINER_CONTAINER_GROUP",(()=>new jn))})));function Wn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}const Fn=N({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:Pt,required:!0}},setup(t){const e=ge("panel-tab-page"),n=O((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return S(b("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},Wn(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return S(b("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},Wn(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class qn{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new Pt(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",Ee(Fn,(function(t){t.component(Fn.name,Fn),It("TABPAGE",(()=>new qn))})));class Gn extends Pt{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];return n.layoutPanelModel?pt.execScriptFn({data:e||{}},n.layoutPanelModel,{singleRowReturn:!0,isAsync:!1}):void 0}}const $n=N({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:Gn,required:!0}},setup(t){var e;const n=ge("panel-item-render"),o=ge("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:i}=t.modelData,a=O((()=>[n.b(),n.m(i),o.b(),n.is("hidden",!t.controller.state.visible)])),s=O((()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data)));return{ns:n,classArr:a,htmlCode:s}},render(){return S("div",{class:this.classArr,innerHTML:this.htmlCode},null)}});class Hn{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const o=new Gn(t,e,n);return await o.init(),o}}t("IBizPanelItemRender",Ee($n,(function(t){t.component($n.name,$n),It("PREDEFINE_RENDER",(()=>new Hn))})));const Kn=N({name:"IBizTeleportPlaceholder",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=ge("teleport-placeholder"),n=y(""),{rawItem:o}=t.modelData;o&&o.cssStyle&&(n.value=o.cssStyle);const i=O((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:i,tempStyle:n}},render(){if(this.controller.state.visible)return S("div",{id:this.controller.state.teleportTag,class:this.classArr,style:this.tempStyle},null)}});class Xn extends Ct{constructor(){super(...arguments),this.teleportTag=""}}class Qn extends Pt{createState(){var t;return new Xn(null==(t=this.parent)?void 0:t.state)}async onInit(){var t,e;await super.onInit();const n=this.panel.view.model.codeName;let o="".concat(null==n?void 0:n.toLowerCase(),"-").concat(this.model.id);const i=null==(e=null==(t=this.model.rawItem)?void 0:t.rawItemParams)?void 0:e.find((t=>"TeleportTag"===t.key));i&&i.value&&(o=i.value),ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.placeholderIdentifier",{viewCodeName:n,id:this.model.id}),o),this.state.teleportTag=o}}class Yn{constructor(){this.component="IBizTeleportPlaceholder"}async createController(t,e,n){const o=new Qn(t,e,n);return await o.init(),o}}t("TeleportPlaceholderProvider",Yn);t("IBizTeleportPlaceholder",Ee(Kn,(function(t){t.component(Kn.name,Kn),It("RAWITEM_TELEPORT_PLACEHOLDER",(()=>new Yn))})));const Jn=N({name:"IBizPanelContainerTabs",props:{modelData:{type:Object,required:!0},controller:{type:je,required:!0}},setup:()=>({ns:ge("panel-container-tabs")}),render(){return w(b("IBizPanelContainer"),{...this.$props,...this.$attrs,class:this.ns.b()},this.$slots)}});class Zn{constructor(){this.component="IBizPanelContainerTabs"}async createController(t,e,n){const o=new je(t,e,n);return await o.init(),o}}t("IBizPanelContainerTabs",Ee(Jn,(function(t){t.component(Jn.name,Jn),It("CONTAINER_TABS",(()=>new Zn))})));const to=N({name:"IBizPanelCtrlViewPageCaption",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=ge("panel-ctrl-view-page-caption"),n=O((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n}},render(){let t=null;return this.controller.data&&(t=S("span",{class:this.ns.b("content")},[this.controller.state.caption])),S("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t])}});class eo extends Pt{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 no{constructor(){this.component="IBizPanelCtrlViewPageCaption"}async createController(t,e,n){const o=new eo(t,e,n);return await o.init(),o}}t("IBizPanelCtrlViewPageCaption",Ee(to,(function(t){t.component(to.name,to),It("CTRLPOS_VIEW_PAGECAPTION",(()=>new no))})));const oo=N({name:"IBizAuthWxmpQrcode",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=ge("auth-wxmp-qrcode"),{state:n}=t.controller,o=Qt();t.controller.setRouter(o);const i=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)&&i()}),{immediate:!0}),I((()=>{t.controller.destroy()})),{ns:e,loadQrcode:i}},render(){var t,e;return S("div",{class:this.ns.b()},[S("div",{class:this.ns.e("content")},[this.controller.state.qrcode&&S("img",{class:this.ns.e("qrcode"),src:null==(t=this.controller.state.qrcode)?void 0:t.url},null),!(null==(e=this.controller.state.qrcode)?void 0:e.expirein)&&S("div",{class:this.ns.e("mask")},[S("ion-icon",{title:ibiz.i18n.t("vue3Util.panelComponent.refresh"),name:"reload-outline",onClick:this.loadQrcode,class:this.ns.em("mask","icon")},null)])]),S("div",{class:this.ns.e("caption")},[this.controller.state.tips])])}});class io extends Ct{}class ao extends Pt{constructor(){super(...arguments),this.pollingTime=2,this.rawItemParams={}}createState(){var t;return new io(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;i(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}initParams(){var t;this.pollingTime=(t=this.rawItemParams.pollingtime)&&isFinite(Number(t))?Number(this.rawItemParams.pollingtime):2,this.state.tips=this.model.caption||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 o=this.route.query.ru||"/";window.location.hash=o||"/",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 so{constructor(){this.component="IBizAuthWxmpQrcode"}async createController(t,e,n){const o=new ao(t,e,n);return await o.init(),o}}t("IBizAuthWxmpQrcode",Ee(oo,(function(t){t.component(oo.name,oo),It("RAWITEM_AUTH_WXMP_QRCODE",(()=>new so))}))),t("AppRedirectView",N({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 Bt(e,n)}()},render:()=>S("div",null,[ibiz.i18n.t("vue3Util.view.redirectionProgress")])}));class ro{constructor(){this.component="IBizView"}}const lo=N({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=ge("view"),o=Te(((...t)=>new mt(...t)));ze(o);const i=Mt(o.model),a=[],s=new Map,r=[];i.forEach((t=>{const{teleportFlag:e,teleportTag:n}=jt(t);n||e?(a.push(t),s.set(t.id,n||"")):r.push(t)}));const{viewType:l,sysCss:d,codeName:u}=o.model,h=l.toLowerCase(),p=null==d?void 0:d.cssName,m=O((()=>[n.b(),n.b(h),n.m(u),p,o.state.viewMessages.TOP?"has-top-message":"",o.state.viewMessages.BOTTOM?"has-bottom-message":"",o.state.presetClassList])),v=(t,e={})=>{const n=t.name||t.id;return{context:o.context,params:o.params,modelData:t,...o.slotProps[n]||{},...e}};let g;return P((()=>{z((async()=>{const t=document.getElementById(o.id),e=await ibiz.hub.config.view.get(o.model.id);t&&(null==e?void 0:e.waterMarkOption)&&(g=ibiz.util.watermark.mount(e.waterMarkOption,t,o.context,o.params,o.state.srfactiveviewdata||{}))}))})),c((()=>{null==g||g()})),{c:o,ns:n,controls:r,teleportControls:a,viewClassNames:m,onLayoutPanelCreated:t=>{o.setLayoutPanel(t)},getCtrlProps:v,renderControl:(t,n={})=>{const i=t.name||t.id,a=v(t,n);if(e[i])return B(e,i,a);const s=o.providers[i],r=b((null==s?void 0:s.component)||"IBizControlShell");return s&&(a.provider=s),w(r,a)},getCtrlTeleportTag:t=>{var e,n;const i=s.get(t.id);if(i)return i;const a=null==(n=null==(e=o.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:o.state.hasError?"none":"initial"}),t}}},render(){var t,e;let n=null;if(this.c.state.isCreated)if(0===this.c.engines.length)n=S("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 o=this.c.model.viewLayoutPanel,i=this.c.providers[o.name];n=w(b(i.component),{modelData:o,context:this.c.context,params:this.c.params,provider:i,container:this.c,style:this.getControlStyle(),onControllerAppear:this.onLayoutPanelCreated},e)}let o=null;this.c.state.isCreated&&(null==(e=this.teleportControls)?void 0:e.length)&&(o=this.teleportControls.map((t=>{let e;const n=this.getCtrlTeleportTag(t);return n?S("div",{style:this.getControlStyle()},[S(k,{to:n,disabled:!this.c.state.activated},(o=e=this.renderControl(t),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!R(o)?e:{default:()=>[e]}))]):(ibiz.log.error(ibiz.i18n.t("vue3Util.view.noTeleportTag",{name:t.name})),null);var o})));let i=null;if(this.c.state.hasError&&this.c.error.status){const t=gt(this.c.error.status);t&&("string"==typeof t.component&&(i=w(b(t.component))),i=w(t.component))}return A(S("div",{class:this.viewClassNames,id:this.c.id},[n,o,i]),[[T("loading"),this.c.state.isLoading]])}});class co{constructor(){this.component="IBizView"}createController(t,e,n,o){return new Vt(t,e,n,o)}}class uo{constructor(){this.component="IBizView"}createController(t,e,n,o){return new Ut(t,e,n,o)}}t("IBizView",Ee(lo,(function(t){t.component(lo.name,lo),Wt("DEFAULT",(()=>new ro)),Wt("APPDATAUPLOADVIEW",(()=>new co)),Wt("DEMDCUSTOMVIEW",(()=>new uo))}))),t("TodoRedirect",N({setup(){const t=Yt(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error(ibiz.i18n.t("vue3Util.view.insufficientRedirection"));const i=Zt.parse(o,{delimiter:";"}),{apptype:a,todotype:s,todoid:r}=i,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:()=>S("div",null,[ibiz.i18n.t("vue3Util.view.toDoList")])}));class ho{constructor(){this.component="IBizPortalView"}}const po=N({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=ge("view"),n=Te(((...t)=>new mt(...t))),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:i,sysCss:a,codeName:s}=n.model,r=i.toLowerCase(),l=null==a?void 0:a.cssName,c=[e.b(),e.b(r),e.m(s),l];return{c:n,ns:e,controls:o,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,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const i=n[e];if(i)return void(n[e]=()=>i({modelData:t,...o}));const a=this.c.providers[e];a&&(n[e]=()=>{const e=b(a.component);return w(e,{modelData:t,...o,provider:a})})})),n.dashboard&&(e=n.dashboard())}return S("div",{class:this.viewClassNames},[e])}}),mo=(t("IBizPortalView",Ee(po,(function(t){t.component(po.name,po),Wt(lt.APP_PORTAL_VIEW,(()=>new ho)),Wt(lt.DE_PORTAL_VIEW,(()=>new ho)),Wt(lt.DE_PORTAL_VIEW9,(()=>new ho))}))),N({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=Te(((...t)=>new mt(...t))),n=y(),o=y(),i=y();return e.evt.on("onCreated",(()=>{Ft(p(t.modelData),p(e.context),p(e.params)).then((async t=>{if("view"!==t.type)throw new F(ibiz.i18n.t("vue3Util.view.embeddedRedirectionView"));n.value=t.viewId,o.value=t.context,i.value=t.params}))})),t.isEmbedCtrlNav&&l((()=>[e.context,e.params]),(()=>{Ft(p(t.modelData),p(e.context),p(e.params)).then((async t=>{"view"===t.type&&(n.value=t.viewId,o.value=t.context)}))}),{deep:!0}),{c:e,toViewId:n,toViewContext:o,toViewParams:i}},render(){return this.toViewId?w(b("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):A(S("div",{style:"width: 100%; height: 100%;"},null),[[T("loading"),!this.toViewId]])}}));class vo{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",Ee(mo,(function(t){t.component(mo.name,mo);const e=new vo;Wt(lt.DE_REDIRECT_VIEW,(()=>e))})));class go{constructor(){this.component="IBizHtmlView"}}const fo=N({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=ge("view"),n=Te(((...t)=>new mt(...t))),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:i,sysCss:a,codeName:s}=n.model,r=i.toLowerCase(),l=null==a?void 0:a.cssName,c=[e.b(),e.b(r),e.m(s),l],d=y(!1),u=O((()=>{const{htmlUrl:t}=n.model;return t?et.fill(t,n.context,n.params):""}));M((()=>{u.value&&(d.value=!0)}));return{c:n,ns:e,controls:o,viewClassNames:c,url:u,isLoading:d,onLoad:()=>{d.value=!1}}},render(){if(this.url)return A(S("div",{class:this.viewClassNames},[S("iframe",{src:this.url,onLoad:()=>this.onLoad()},null)]),[[T("loading"),this.isLoading]]);let t=null;const e=gt("404");return e&&("string"==typeof e.component&&(t=w(b(e.component))),t=w(e.component)),S("div",{class:this.viewClassNames},[t])}});t("IBizHtmlView",Ee(fo,(function(t){t.component(fo.name,fo),Wt(lt.DE_HTML_VIEW,(()=>new go))})));const yo=N({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=me(((...e)=>new qt(...e,t.container))),o=ge("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 i=(t,o)=>{var a,s;if(t.hidden)return null;const{providers:r,panelItems:l}=o||n,c=r[t.id];if(!c)return S("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);if("CTRLPOS"!==t.itemType&&e[t.id])return B(e,t.id,{model:t,data:n.data,value:n.data[t.id]});const d=b(c.component);let u;if("CTRLPOS"===t.itemType&&e[t.id]){const n=l[t.id];u=n.parent&&Gt(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=>i(t,o))):Tt(t)?u=void 0:(null==(s=t.panelItems)?void 0:s.length)&&(u=()=>t.panelItems.map((t=>i(t,o))));let h="";t.cssStyle&&(h=t.cssStyle);const p=l[t.id],m=function(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach((t=>{t.attrName&&t.attrValue&&(o[t.attrName]=pt.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))})),o}(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 C("renderPanelItem",i),{c:n,ns:o,renderPanelItem:i}},render(){const{state:t,model:e}=this.c;return S(b("iBizControlBase"),{controller:this.c},{default:()=>[S(b("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",S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!R(o)?e:{default:()=>[e]});var o})))]}})]})}});class wo{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",Ee(yo,(function(t){t.component(yo.name,yo),$t(Ht.VIEW_LAYOUT_PANEL,(()=>new wo))})));function bo(t,e,n){var o,i;if(t.hidden)return;const{providers:a,panelItems:s}=e,r=a[t.id];if(!r)return S("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);const l=b(r.component);let c;"CTRLPOS"===t.itemType&&n.$slots[t.id]?c=()=>n.$slots[t.id]():"TABPANEL"===t.itemType&&(null==(o=t.panelTabPages)?void 0:o.length)?c=()=>t.panelTabPages.map((t=>bo(t,e,n))):Tt(t)?c=void 0:(null==(i=t.panelItems)?void 0:i.length)&&(c=()=>t.panelItems.map((t=>bo(t,e,n))));let d="";t.cssStyle&&(d=t.cssStyle);const u=s[t.id],h=function(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach((t=>{t.attrName&&t.attrValue&&(o[t.attrName]=pt.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))})),o}(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),w(l,{modelData:t,controller:u,key:t.id,style:d,attrs:h},c)}const Co=N({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=me(((...e)=>new Kt(...e,t.container))),n=ge("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 o=m("renderPanelItem");return C("renderPanelItem",o||bo),{c:e,ns:n}},render(){const{state:t,model:e}=this.c;return S(b("iBizControlBase"),{controller:this.c},{default:()=>[S(b("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",S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=bo(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!R(o)?e:{default:()=>[e]});var o})))]}})]})}});class Po{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",Ee(Co,(function(t){t.component(Co.name,Co),$t(Ht.PANEL,(()=>new Po))})));function Io(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Do(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function Eo(t,e){for(var n,o="",i=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(o.length<2||2!==i||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){var l=o.lastIndexOf("/");if(l!==o.length-1){-1===l?(o="",i=0):i=(o=o.slice(0,l)).length-1-o.lastIndexOf("/"),a=r,s=0;continue}}else if(2===o.length||1===o.length){o="",i=0,a=r,s=0;continue}e&&(o.length>0?o+="/..":o="..",i=2)}else o.length>0?o+="/"+t.slice(a+1,r):o=t.slice(a+1,r),i=r-a-1;a=r,s=0}else 46===n&&-1!==s?++s:s=-1}return o}var xo={resolve:function(){for(var t,e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var i;o>=0?i=arguments[o]:(void 0===t&&(t=process.cwd()),i=t),Do(i),0!==i.length&&(e=i+"/"+e,n=47===i.charCodeAt(0))}return e=Eo(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(Do(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=Eo(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return Do(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];Do(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":xo.normalize(t)},relative:function(t,e){if(Do(t),Do(e),t===e)return"";if((t=xo.resolve(t))===(e=xo.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,i=o-n,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var s=e.length-a,r=i<s?i: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 i>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<=o;++c)c!==o&&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(Do(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');Do(t);var n,o=0,i=-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){o=n+1;break}}else-1===r&&(a=!1,r=n+1),s>=0&&(l===e.charCodeAt(s)?-1==--s&&(i=n):(s=-1,i=r))}return o===i?i=r:-1===i&&(i=t.length),t.slice(o,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":t.slice(o,i)},extname:function(t){Do(t);for(var e=-1,n=0,o=-1,i=!0,a=0,s=t.length-1;s>=0;--s){var r=t.charCodeAt(s);if(47!==r)-1===o&&(i=!1,o=s+1),46===r?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=s+1;break}}return-1===e||-1===o||0===a||1===a&&e===o-1&&e===n+1?"":t.slice(e,o)},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,o=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+o:n+t+o:o}("/",t)},parse:function(t){Do(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,o=t.charCodeAt(0),i=47===o;i?(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!==(o=t.charCodeAt(c)))-1===r&&(l=!1,r=c+1),46===o?-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&&i?t.slice(1,r):t.slice(s,r)):(0===s&&i?(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):i&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};xo.posix=xo;var Oo=xo,No=Io(Oo);t("PluginFactory",class{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,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}),re.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,o=n.rtobjectRepo,i=n.pluginParams||{};if(this.isIgnore(o))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(o)){const t=await this.loadQueue.get(o);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(n.rtobjectName,n.rtobjectRepo,e,{...i});this.loadQueue.set(o,t);return await t}catch(t){throw new Y(n,ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"))}finally{this.loadQueue.delete(o)}}}return!1}async loadPluginRef(t,e,n=ibiz.env.appId,o={}){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let i=null;{const t=e,o=this.urlReg.test(t)?"".concat(t,"/package.json"):"".concat("FULLCODE"===ibiz.env.runContainer&&n!==ibiz.env.appId?ibiz.hub.microAppConfigCenter.getPluginBaseUrl(n):ibiz.env.pluginBaseUrl,"/").concat(Oo.join(t,"package.json")),a=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==a.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));i=a.data}Object.assign(i,{appId:n,extraParams:o});const a=new Xt(t,e,i);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}async loadScript(t){const e=t.repo,{name:n,appId:o,system:i,styles:a=[],extraParams:s={}}=t.config;let r="";if(r=Oo.join(e,i),r){if(this.cache.has(r))return;const t="FULLCODE"===ibiz.env.runContainer&&o!==ibiz.env.appId?ibiz.hub.microAppConfigCenter.getPluginBaseUrl(o):ibiz.env.pluginBaseUrl;let i=null;const l=this.parseUrl(r,t),c=("string"==typeof a?[a]:a).map((n=>this.parseUrl(No.join(e,n),t)));if(System.addImportMap({imports:{[n]:l},styles:{[n]:c}}),i=await System.import(n),!i)throw new F(ibiz.i18n.t("vue3Util.plugin.fileContentFormat"));if(!i.default)throw new F(ibiz.i18n.t("vue3Util.plugin.failedRemotePluginLoad"));this.setPluginCode(i.default,s),this.cache.set(r,!0)}}parseUrl(t,e=ibiz.env.pluginBaseUrl){if(this.urlReg.test(t))return t;let n="";n=this.urlReg.test(e)?t.startsWith("/")?e+t:"".concat(e,"/").concat(t):"".concat(Oo.join(e,t));const{origin:o,pathname:i}=window.location;return i.endsWith("/")&&n.startsWith("/")&&(n=n.substring(1)),!1===this.urlReg.test(n)&&(n="".concat(o).concat(i).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 o=n[e],i=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==i.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));const a=i.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 o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.imports){const e=t.imports;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.styles){const e=t.styles;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]="string"==typeof o?this.parseUrl(o,t.baseUrl):o.map((e=>this.parseUrl(e,t.baseUrl)))}}return t}return null}});class So{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function Ao(){return{value:String,controller:new So(Object),data:new So(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function To(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}}function zo(){return{hasError:{type:Boolean}}}function _o(){return{...Ao(),value:[String,Number]}}function Ro(){return{...Ao(),value:[String,Number,Object,Array]}}function Lo(){return{...Ao(),value:[String,Number]}}function ko(){return{...Ao(),value:[String,Number]}}function Bo(){return{...Ao(),value:[String,Number]}}function Mo(){return{...Ao(),value:[String,Array,Object,Number]}}function jo(){return{...Ao(),value:[String,Number]}}function Vo(){return{...Ao(),value:[String,Number]}}function Uo(){return{...Ao(),value:{type:Object}}}function Wo(){return{...Ao(),value:[String,Number]}}function Fo(){return{...Ao(),value:[String,Number]}}function qo(){return{...Ao(),value:[String,Number]}}function Go(){return{...Ao(),value:[String,Number]}}function $o(){return{...Ao(),value:[String,Number,Array]}}function Ho(){return{...Ao(),value:[String,Number]}}function Ko(){return{...Ao(),value:[String,Number]}}function Xo(){return{...Ao(),value:[String,Number]}}function Qo(){return{...Ao(),value:String}}function Yo(){return{...Ao(),value:[String,Number]}}function Jo(){return{...Ao(),value:String,language:{type:String},theme:{type:String}}}function Zo(){return{...Ao(),value:String}}function ti(){return{...Ao(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function ei(){return{...Ao(),value:[Array,Array]}}function ni(){return{...Ao(),value:String}}function oi(){return{...Ao(),value:String}}function ii(){return{...Ao(),value:String}}function ai(){return{...Ao(),value:Number}}function si(){return{...Ao(),value:String}}t("RequiredProp",So);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,o,i,a,s,r,l,c,d,u,h,p,m,v,g,f,y,w,b,C,P,I,D,E,x,O,N,S,A,T,z,_,R,L,k,B,M,j,V,U,W,F,q,G,$,H,K,X,Q,Y,J,Z,tt,et,nt,ot,it,at,st,rt,lt,ct,dt,ut,ht,pt,mt,vt,gt,ft,yt,wt,bt,Ct,Pt,It,Dt,Et,xt,Ot,Nt,St,At,Tt,zt,_t,Rt,Lt,kt,Bt,Mt,jt,Vt,Ut,Wt,Ft,qt,Gt,$t,Ht,Kt,Xt,Qt,Yt,Jt,Zt,te,ee,ne,oe,ie,ae,se;return{setters:[function(t){e=t.SyncSeriesHook,n=t.AsyncSeriesHook,o=t.isFunc,i=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.isReactive,p=t.toRaw,m=t.inject,v=t.reactive,g=t.onActivated,f=t.onDeactivated,y=t.ref,w=t.h,b=t.resolveComponent,C=t.provide,P=t.onMounted,I=t.onUnmounted,D=t.isRef,E=t.shallowRef,x=t.watchEffect,O=t.computed,N=t.defineComponent,S=t.createVNode,A=t.withDirectives,T=t.resolveDirective,z=t.nextTick,_=t.mergeProps,R=t.isVNode,L=t.createTextVNode,k=t.Teleport,B=t.renderSlot,M=t.onBeforeMount},function(t){j=t.onClickOutside,V=t.NOOP,U=t.listenJSEvent,W=t.Namespace,F=t.RuntimeError,q=t.isBase64Image,G=t.isBase64,$=t.base64ToStr,H=t.isSvg,K=t.fixJsonString,X=t.IBizContext,Q=t.ModelError,Y=t.RuntimeModelError,J=t.setAppCookie,Z=t.CoreConst,tt=t.clearAppCookie,et=t.StringUtil},function(t){nt=t.isNil,ot=t.isNotNil,it=t.clone,at=t.isEmpty,st=t.mergeLeft},function(t){rt=t.MDControlTypes,lt=t.ViewType,ct=t.RouteConst,dt=t.getMatchResPath,ut=t.calcDeCodeNameById,ht=t.PredefinedControlRender,pt=t.ScriptFactory,mt=t.ViewController,vt=t.getControlProvider,gt=t.getErrorViewProvider,ft=t.calcDynaSysParams,yt=t.getViewProvider,wt=t.useCalcOrMode,bt=t.calcThresholdRange,Ct=t.PanelItemState,Pt=t.PanelItemController,It=t.registerPanelItemProvider,Dt=t.Modal,Et=t.ViewMode,xt=t.OpenAppViewCommand,Ot=t.getEditorProvider,Nt=t.PanelItemEventName,St=t.calcDynaClass,At=t.getAllPanelField,Tt=t.isDataContainer,zt=t.PanelNotifyState,_t=t.getPanelItemProvider,Rt=t.convertNavData,Lt=t.PanelData,kt=t.execDELogicById,Bt=t.toLocalOpenWFRedirectView,Mt=t.getControlsByView,jt=t.getCtrlTeleportParams,Vt=t.AppDataUploadViewController,Ut=t.MDCustomViewController,Wt=t.registerViewProvider,Ft=t.getDERedirectToView,qt=t.ViewLayoutPanelController,Gt=t.isSimpleDataContainer,$t=t.registerControlProvider,Ht=t.ControlType,Kt=t.PanelController,Xt=t.RemotePluginItem},function(t){Qt=t.useRoute,Yt=t.useRouter,Jt=t.RouterView},function(t){Zt=t.default},function(t){te=t.isElement,ee=t.isNumber,ne=t.throttle,oe=t.isObject,ie=t.isString},function(t){ae=t.defineStore,se=t.createPinia}],execute:function(){t({calcResRoutePath:Pe,computedAsync:function(t,e,n){let o;o=D(n)?{evaluating:n}:n||{};const{lazy:i=!1,flush:a="pre",evaluating:s,shallow:r=!0,onError:l=V}=o,c=E(!i),d=r?E(e):y(e);let u=0;if(x((async e=>{if(!c.value)return;u++;const n=u;let o=!1;s&&Promise.resolve().then((()=>{s.value=!0}));try{const i=await t((t=>{e((()=>{s&&(s.value=!1),o||t()}))}));n===u&&(d.value=i)}catch(t){l(t)}finally{s&&n===u&&(s.value=!1),o=!0}}),{flush:a}),i)return O((()=>(c.value=!0,d.value)));return d},createOverlayView:Oe,generateRoutePath:async function(t,e,n,o){var i;const a=fe(e);let s=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==o?void 0:o.srfmenuitem;!r&&a.pathNodes.length>1&&(r=null==(i=a.pathNodes[1].params)?void 0:i.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}be(n,a.pathNodes),e.fullPath.startsWith("/appredirectview")&&((null==o?void 0:o.srfindexname)?(a.pathNodes[0].viewName=o.srfindexname,delete o.srfindexname):a.pathNodes[0].viewName="index");if(a.pathNodes.push({viewName:t.codeName.toLowerCase(),context:we(n),params:o}),2===s&&(await Pe(a,n,t.appDataEntityId,t.appId),Ce.includes(t.viewType))){const e=ut(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:ye(a)}},generateRoutePathByModal:async function(t,e,n,o){const i=fe(e),a=i.pathNodes.findIndex((t=>t.viewName===ct.ROUTE_MODAL_TAG));-1!==a&&(i.pathNodes=i.pathNodes.slice(0,a));if(n.currentSrfNav){const t=i.pathNodes[i.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}return be(n,i.pathNodes),i.pathNodes.push({viewName:"".concat(ct.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:we(n),params:o}),{path:ye(i)}},getArrayProps:ei,getAutoCompleteProps:Yo,getCascaderProps:ni,getCheckboxListProps:ko,getCheckboxProps:Bo,getCodeProps:Jo,getColorPickerProps:oi,getDataPickerProps:Mo,getDatePickerProps:jo,getDateRangeProps:Vo,getDateRangeSelectEmits:function(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,change:(t,e,n)=>!0}},getDateRangeSelectProps:Uo,getDrawerPlacement:function(t){return Ne[t]||"right"},getDropdownProps:Lo,getEditorEmits:To,getEditorProps:Ao,getGridArrayProps:function(){return{...ei(),...zo()}},getGridAutoCompleteProps:function(){return{...Yo(),...zo()}},getGridCascaderProps:function(){return{...ni(),...zo()}},getGridCheckboxListProps:function(){return{...ko(),...zo()}},getGridCheckboxProps:function(){return{...Bo(),...zo()}},getGridCodeProps:function(){return{...Jo(),...zo()}},getGridColorPickerProps:function(){return{...oi(),...zo()}},getGridDataPickerProps:function(){return{...Mo(),...zo()}},getGridDatePickerProps:function(){return{...jo(),...zo()}},getGridDateRangeProps:function(){return{...Vo(),...zo()}},getGridDateRangeSelectProps:function(){return{...zo(),...Uo()}},getGridDropdownProps:function(){return{...Lo(),...zo()}},getGridEditorCommonProps:zo,getGridEditorEmits:function(){return{change:(t,e,n)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...Zo(),...zo()}},getGridInputIpProps:function(){return{...ii(),...zo()}},getGridInputNumberProps:function(){return{...ai(),...zo()}},getGridInputProps:function(){return{..._o(),...zo()}},getGridListBoxProps:function(){return{...Wo(),...zo()}},getGridMapPickerProps:function(){return{...si(),...zo()}},getGridMarkDownProps:function(){return{...ti(),...zo()}},getGridNumberRangeProps:function(){return{...Fo(),...zo()}},getGridRadioProps:function(){return{...qo(),...zo()}},getGridRateProps:function(){return{...Go(),...zo()}},getGridRawProps:function(){return{...$o(),...zo()}},getGridSliderProps:function(){return{...Ho(),...zo()}},getGridSpanProps:function(){return{...Ro(),...zo()}},getGridStepperProps:function(){return{...Ko(),...zo()}},getGridSwitchProps:function(){return{...Xo(),...zo()}},getGridUploadProps:function(){return{...Qo(),...zo()}},getHtmlProps:Zo,getInputIpProps:ii,getInputNumberProps:ai,getInputProps:_o,getListBoxProps:Wo,getMapPickerProps:si,getMarkDownProps:ti,getNestedRoutePath:Ie,getNumberRangeProps:Fo,getOrigin:de,getOwnRouteContext:we,getRadioProps:qo,getRateProps:Go,getRawProps:$o,getSliderProps:Ho,getSpanProps:Ro,getStepperProps:Ko,getSwitchProps:Xo,getUploadProps:Qo,isEmptyVNode:function(t){if(!Array.isArray(t))return t===he;return 1===t.length&&t[0]===he},onRouteChange:function(t,e){const n=Qt();if(!n)throw new F(ibiz.i18n.t("vue3Util.util.routeCorrectly"));l((()=>null==n?void 0:n.fullPath),(()=>{const o=Ie(n,e);t({currentKey:o,fullPath:n.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(Oe(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(Oe(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(Oe(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(Oe(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var o;const a=fe(t,n);let s=a.pathNodes[e-1].viewName;if(!s)throw new F(ibiz.i18n.t("vue3Util.util.viewIdentifiers",{depth:e}));s===ct.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==(o=ibiz.appData)?void 0:o.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];i(n.context)&&Object.assign(l,n.context),t!==e-1||n.context&&!nt(n.context.srfnavctrlid)||delete l.srfnavctrlid}const{params:c,srfnav:d}=a.pathNodes[e-1];return{viewConfig:r,context:l,params:c,srfnav:d}},prepareControl:function(t){const e=ge("control"),{controlType:n,sysCss:o,codeName:i}=t.model,a=n.toLowerCase(),s=null==o?void 0:o.cssName,r=ge("control-".concat(a)),l=[e.b(),e.b(a),e.m(i)];s&&l.push(s);return{controlClass:l,ns:r}},renderString:function(t){if(nt(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""},route2routePath:fe,routePath2string:ye,shareCommonAncestor:_e,useAutoFocusBlur:function(t,e){return{useInFocusAndBlur:()=>{t.autoFocus||e("blur")},useInValueChange:()=>{t.autoFocus&&e("blur")}}},useClickOutside:le,useCodeListListen:function(t,e,n){let o;P((async()=>{if(t){const i=await ibiz.hub.getApp(e);o=await i.codeList.getCodeListInstance(t),o&&o.onChange(n)}})),I((()=>{o&&o.offChange(n)}))},useControlController:me,useControlPopoverzIndex:function(t){const{zIndex:e}=Ae();t.state.zIndex=e.increment(),I((()=>{e.decrement()}))},useController:function(t){t.force=ue()},useCtx:pe,useEventListener:ve,useFocusAndBlur:function(t,e){const n=y(),o=y(!1);let i;const a=()=>{o.value||ibiz.log.debug(ibiz.i18n.t("vue3Util.use.focusBlur.noFocus")),e(),i.stop(),o.value=!1};return ve(n,"click",(e=>{o.value||(i=le(n,(()=>{a()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:a,pause:()=>{i&&i.pause()},stop:()=>{i&&i.stop()}}},useForce:ue,useForceTogether:function(t,e){const n=e.force,o=ue();e.force=t=>{n(t),o()}},useLocalCacheKey:function(t,e,n,o="@",i=""){const a=Yt();return()=>{if(!a)return;const s=t.srfuserid;if(n=t.srfdefaulttoroutedepth||n){const t=fe(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 i=ye(t);return"".concat(e).concat(o).concat(s).concat(o).concat(i)}}return i?"".concat(e).concat(o).concat(s).concat(o).concat(i):void 0}},useMobCtx:function(){return m("ctx")},useNamespace:ge,usePopoverVisible:function(t,e){let n;const o=y(!1);return l((()=>t.value),(i=>{i&&!n&&(n=U(window,"click",(n=>{if(o.value&&t.value){_e(e(t.value),n.target)&&(o.value=!1)}}),{capture:!0}))}),{immediate:!0}),I((()=>{null==n||n()})),{popoverVisible:o,setPopoverVisible:t=>{o.value=t}}},usePopoverzIndex:function(){const t="popover_".concat(r());return{popoverid:t,setPopoverZIndex:e=>{const{zIndex:n}=Ae(),o=document.getElementsByClassName(t),i=n.increment();if(o&&o.length>0&&e)for(let t=0;t<o.length;t++)o[t].style.setProperty(e,"".concat(i))}}},useProps:ce,usePropsWatch:function(t,e,n){const o=ce();Object.prototype.hasOwnProperty.call(o,t)&&(l((()=>o[t]),((t,n)=>{e(de(t),de(n))}),n),e(de(o[t]),void 0))},useRouteKey:function(t,e,n){n||(n=y(""));n.value=t.value;const o=new De(e);return l(t,((t,e)=>{t!==e&&o.nextChange((()=>{n.value=t}))})),n},useRouterQuery:function(){const t=Qt(),{query:e}=t;return e},useViewController:Te,useViewOperation:ze});class re{}function le(t,e,n={}){let o=V,i=V,a=V;const s=()=>{o(),o=V,i=V,a=V};return l(t,((t,r)=>{if(t!==r)if(nt(t))s();else{const s=j((null==t?void 0:t.$el)||t,e,n);o=s.stop,i=s.pause,a=s.proceed}}),{immediate:!0}),c((()=>{o!==V&&s()})),{stop:()=>o(),pause:()=>i(),proceed:()=>a()}}function ce(){return u().proxy.$props}function de(t){return h(t)?p(t):t}function ue(){const t=u().proxy;return e=>{t.$forceUpdate(),e&&o(e)&&t.$nextTick((()=>{e()}))}}t("AppHooks",re),re.createApp=new e,re.useComponent=new e,re.appResorceInited=new n,re.beforeInitApp=new n,re.authedApp=new n,re.initedApp=new n,re.destoryApp=new n;const he=t("EmptyVNode",d("EmptyVNode"));function pe(){return m("ctx")}function me(t,e){const n=pe(),o=ce();n.evt.emit("onForecast",o.modelData.name);const i=o.provider;let a;a=(null==i?void 0:i.createController)?i.createController(o.modelData,o.context,o.params,n):t(o.modelData,o.context,o.params,n),-1!==rt.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 o={...t};t.context===n.context&&delete o.context,t.params===n.params&&delete o.params,e.updateContextParams(o),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)}))}(o,a),function(t,e,n=[]){const o=["context","params","modelData",...n];l((()=>{const e={};return Object.keys(t).forEach((n=>{o.includes(n)||(e[n]=t[n])})),e}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.stateChange",{name:e.model.name}),o),Object.keys(o).forEach((t=>{void 0!==o[t]&&(e.state[t]=o[t])}))}),{immediate:!0})}(o,a,null==e?void 0:e.excludePropsKeys),a.state=v(a.state),g((()=>a.onActivated())),f((()=>a.onDeactivated())),a.force=ue();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!==rt.indexOf(a.model.controlType)&&ibiz.util.record.remove(a.ctrlId)})),a}function ve(t,e,n,o={}){let i=V;return l(t,((t,a)=>{t!==a&&(nt(t)?(i(),i=V):i=U((null==t?void 0:t.$el)||t,e,n,o))}),{immediate:!0}),c((()=>{i!==V&&i()})),()=>{i()}}function ge(t){return new W(t,ibiz.env.namespace)}function fe(t,e=!1){const n=t.matched.length;let o=t.path;e&&(o=o.replace(new RegExp("/".concat(ct.ROUTE_MODAL_TAG),"g"),""));const i=o.split("/"),a=[];for(let e=1;e<=n;e++){const n=i[2*e],o=t.params["params".concat(e)];let s,r,l;s=o&&o!==ibiz.env.routePlaceholder?Zt.parse(o,{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=Zt.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:s,pathNodes:a}}function ye(t){let e="";return t.appContext?e+="/".concat(Zt.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach(((t,n)=>{e+="/".concat(t.viewName,"/");let o={};if(0===n)i(t.context)&&(o=t.context);else{if(o=i(t.params)?t.params:{},i(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(o.srfnavctx=encodeURIComponent(e))}t.srfnav&&(o.srfnav=t.srfnav)}const a=Zt.stringify(o,{delimiter:";",strictNullHandling:!0,skipNulls:!0});i(a)?e+=a:e+=ibiz.env.routePlaceholder})),e}function we(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=>{ot(t[n])&&(e[n]=t[n])})),delete e.attributekeys}let o=!1;return Object.prototype.hasOwnProperty.call(e,"srfkeepnull")&&(o=!0===e.srfkeepnull||"true"===e.srfkeepnull,delete e.srfkeepnull),Object.keys(e).forEach((t=>{(n.includes(t)||!o&&nt(e[t]))&&delete e[t]})),e}function be(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 Ce=t("excludeViewTypes",[lt.DE_GRID_VIEW,lt.DE_GRID_EXP_VIEW,lt.DE_LIST_VIEW,lt.DE_LIST_EXP_VIEW,lt.DE_DATA_VIEW,lt.DE_DATAVIEW_EXP_VIEW,lt.DE_CALENDAR_VIEW,lt.DE_CALENDAR_EXP_VIEW,lt.DE_CHART_VIEW,lt.DE_CHART_EXP_VIEW,lt.DE_KANBAN_VIEW]);async function Pe(t,e,n,o){if(n){const i=await ibiz.hub.getAppDataEntity(n,o);let a=dt(e,i);if(a||(a={path:"",keys:[i.codeName.toLowerCase()]}),a){const n=t.pathNodes[1].context,o={};a.keys.forEach((t=>{e&&Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t],n&&delete n[t])})),t.pathNodes[0].context=o}}else t.pathNodes[0].context=void 0}function Ie(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=fe(t);if(o.pathNodes.length<e)return t.path;o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e));const i=o.pathNodes[e-1];return n&&delete i.srfnav,i.context&&delete i.context.srfnavctrlid,ye(o)}class De{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",De);const Ee=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===ht.EMPTYPANEL))}));class xe{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,o=document.createElement("div");let i=document.body;te(null==n?void 0:n.appendTo)&&(i=null==n?void 0:n.appendTo),i.appendChild(o);const a=xe.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){i.removeChild(o),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(o),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",xe);function Oe(t){return(e,n)=>{const o=b("IBizViewShell");return w(o,{...t,viewShellHooks:n,modal:e})}}t("OverlayPopoverContainer",class extends xe{present(t){return this.modal.present(t)}});const Ne={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class Se{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 o=t.currentRoute.value.fullPath;n.replace?t.replace({path:e}):t.push({path:e});const i=e;if(this.map.has(i)){return this.map.get(i).onWillDismiss()}const a=new Se(o,i);return this.map.set(i,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",ae("appStore",(()=>({appStore:v({})}))));const Ae=t("useUIStore",ae("uiStore",(()=>{const t=function(){const t=y(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",se());function Te(t){const e=ce(),n=m("ctx",void 0);null==n||n.evt.emit("onForecast",e.modelData.name);const o=e.provider;let i;i=(null==o?void 0:o.createController)?o.createController(e.modelData,e.context,e.params,n):t(e.modelData,e.context,e.params,n),ibiz.util.viewStack.add(i.id,i),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,i),function(t,e){l((()=>t.state?{...t.state}:{}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.view.stateChange",{name:e.model.name}),o),Object.keys(o).forEach((t=>{e.state[t]=o[t]}))}),{immediate:!0})}(e,i),C("ctx",i.ctx),i.state=v(i.state),i.slotProps=v(i.slotProps),e.modal&&(i.modal=e.modal),g((()=>{i.onActivated(),ibiz.util.viewStack.active(i.id)})),f((()=>{i.onDeactivated(),ibiz.util.viewStack.deactivate(i.id)})),i.force=ue();const a=u().proxy;return i.evt.onAll(((t,e)=>{a.$emit(t.slice(2),e)})),i.created(),c((()=>{i.destroyed(),ibiz.util.viewStack.remove(i.id)})),i}function ze(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 _e(t,e){if(!t||!e)return!1;if(t===e)return!0;const n=new Set;let o=t;for(;o;){n.add(o);const t=o.parentNode;o=!t||"BODY"!==t.nodeName&&"HTML"!==t.nodeName?t:null}for(o=e;o;){if(n.has(o))return!0;o=o.parentNode}return!1}const Re=t("IBizIcon",N({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=ge("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=O((()=>function(t){if(t){if(t.htmlStr)return S("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")||-1!==t.cssClass.indexOf("theme-icon")?S("i",{class:[e.b(),t.cssClass]},null):S("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return q(t.imagePath)?S("img",{class:e.b(),src:t.imagePath},null):G(t.imagePath)?S("div",{class:[e.b(),e.e("emoji")]},[$(t.imagePath)]):H(t.imagePath)?S("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?S("img",{class:e.b(),src:t.imagePath},null):S("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?S("img",{class:e.b(),src:t.imagePath},null):S("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return H(t.rawContent)?S("div",{class:e.b(),innerHTML:t.rawContent},null):S("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}}));t("IBizRouterView",N({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:e}){const n={};let o=!0;l((()=>t.manualKey),((t,e)=>{ot(t)&&t!==e&&(o=!0)}));return{renderComp:(i,a)=>{if(!o)return n.vNode;if(o=!1,i){const o={...i.props};delete o.onVnodeUnmounted,delete o.ref;const a=w(i.type,{...o,...e,key:t.manualKey});return n.vNode=a,a}}}},render(){return S(b("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",N({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=ge("control"),{controlType:n,sysCss:o,codeName:i}=t.controller.model,a=n.toLowerCase(),s=null==o?void 0:o.cssName,r=t.controller.model,l=t.controller.model.controls,c=v({});!1===r.controlType.endsWith("EXPBAR")&&(nt(r.width)||(r.width>0&&r.width<=1?c.width="".concat(100*r.width,"%"):c.width="".concat(r.width,"px")),nt(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 o=e.target.getAttribute(n),i=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)),o&&await pt.asyncExecScriptFn({...t.controller.getEventArgs(),context:a,params:r,data:i?K(i):null},o)},u=O((()=>(n=>{var o,i;const a=r.controlRenders?r.controlRenders.filter((t=>!Object.values(ht).includes(t.id))):void 0;if(!a||0===a.length)return;const s=a[0];if("LAYOUTPANEL_MODEL"===s.renderType&&s.layoutPanelModel){const i=pt.execScriptFn({...t.controller.getEventArgs(),data:n},s.layoutPanelModel,{isAsync:!1});return S("div",{innerHTML:i,onClick:t=>d(t,"click"),onDblclick:t=>d(t,"dbclick"),class:[e.e("control-render"),e.e(null==(o=s.renderName)?void 0:o.toLowerCase())]},null)}return"LAYOUTPANEL"===s.renderType&&s.layoutPanel?S(b("iBizControlShell"),{class:[e.e("control-render"),e.e(null==(i=s.renderName)?void 0:i.toLowerCase())],data:n,params:t.controller.params,context:t.controller.context,modelData:s.layoutPanel},null):void 0})(t.controller.data||t.controller.items)));return{ns:e,typeClass:a,sysCssName:s,inlineStyle:c,codeName:i,controls:l,customRender:u,disableMaskInfoRender:()=>{const n=r.controlRenders?r.controlRenders.find((t=>t.id===ht.DISABLEPANEL)):void 0;if(!n)return S("div",{innerHTML:t.controller.state.maskOption.maskInfo||"",class:[e.e("disable-mask-text")]},null);if("LAYOUTPANEL_MODEL"===n.renderType&&n.layoutPanelModel){const o=pt.execScriptFn({...t.controller.getEventArgs()},n.layoutPanelModel,{isAsync:!1,singleRowReturn:!0});return S("div",{innerHTML:o,class:[e.e("disable-mask-text")]},null)}return"LAYOUTPANEL"===n.renderType&&n.layoutPanel?S(b("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:o,controlPanel:i,providers:a}=this.controller;let s=null;if(o.isCreated&&i){const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const n=t.name,o={context:this.controller.context,params:this.controller.params},i=e[n];e[n]=i?()=>i(o):()=>{const e=b("IBizControlShell");return w(e,{modelData:t,...o})}}));const n=a[i.name];s=w(b(n.component),{modelData:i,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return S("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName,this.ns.is("disabled",o.disabled)],style:this.inlineStyle},[s||this.customRender||(null==(n=(e=this.$slots).default)?void 0:n.call(e)),o.disabled&&S("div",{class:[this.ns.e("mask-container"),this.ns.m(o.maskOption.mode.toLowerCase())]},["MASK"===o.maskOption.mode&&this.disableMaskInfoRender()])])}})),t("IBizControlShell",N({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:lt.DE_CUSTOM_VIEW,appId:ibiz.env.appId};C("ctx",new mt(t,X.create({})).ctx)}const n=y(!1),o=y(""),i=y();vt(t.modelData).then((t=>{t?i.value=t:o.value=ibiz.i18n.t("vue3Util.common.onFoundCorrespondingPart"),n.value=!0})).catch((t=>{ibiz.log.error(t),o.value=t.message,n.value=!0}));return{ns:ge("control-shell"),isComplete:n,errMsg:o,provider:i}},render(){return this.isComplete&&this.provider?w(b(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):A(S("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[T("loading"),!this.isComplete]])}})),t("IBizViewShell",N({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=ge("view-shell"),o=y(!1),i=y(""),a=y(),s=y(),c=y(!0);t.ctx&&C("ctx",t.ctx);const d=y(t.context),u=y(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{accUserMode:n,accessKey:o}=t,i=ibiz.auth.getAuthInfo();if(void 0!==n)switch(n){case 1:i&&(e=!1);break;case 2:i||(e=!1);break;case 4:o&&((await ibiz.hub.getApp(d.value.srfappid)).authority.calcByResCode(o)||(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 ft(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=nt(d.value.srfsessionid)||at(d.value.srfsessionid),o=r();if(n){const e=ibiz.uiDomainManager.create(o,t);d.value.srfsessionid=e.id}const i=ibiz.hub.getApp(p.appId);d.value.srfappid||(d.value.srfappid=p.appId);const a=await i.deService.getService(d.value,t),s=await a.get(d.value,u.value||{});if(s.ok&&s.data){const{srfwftag:t,processdefinitionkey:n,taskdefinitionkey:o}=s.data;t&&(e.srfwftag=t),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW"].includes(p.viewType)&&(nt(u.value.processDefinitionKey)&&(u.value.processDefinitionKey=n),nt(u.value.taskDefinitionKey)&&(u.value.taskDefinitionKey=o))}n&&(ibiz.uiDomainManager.destroy(o),d.value.srfsessionid="")}if(m(e)===h)return void setTimeout((()=>{o.value=!0}));s.value=await ibiz.hub.loadAppView(p.appId,p.id,e),h=m(e)}else s.value=p;a.value=await yt(p)}catch(t){ibiz.log.error(t),i.value=t.message}finally{o.value=!0}};v();return{ns:n,errMsg:i,provider:a,isComplete:o,hasAuthority:c,viewModelData:s,redrawView:async t=>{o.value=!1;const{redrawData:n}=t,{isReloadModel:i}=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()),i?await v():setTimeout((()=>{o.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(b(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(b(t.component)):w(t.component)}return A(S("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[T("loading"),!this.isComplete]])}})),t("IBizCodeList",N({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,o;const i=ge("code-list"),a=y([]),s=(null==(n=t.codeList)?void 0:n.textSeparator)||"、",r=(null==(o=t.codeList)?void 0:o.valueSeparator)||",",c=O((()=>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:o}=t.codeList;if(o&&ee(Number(n))){const t=bt(e,Number(n));if(t)return t}const i=e.find((t=>t.value==n));if(i)return i;for(let t=0;t<e.length;t++){const o=u(e[t].children,n);if(o)return o}}};l([()=>t.codeListItems,()=>t.value],(([e,n],[o,i])=>{if(nt(n)||""===n)a.value=[];else{let o=[];const{getSelectArray:i}=d,s=i(n,t.codeList,e,r,t.codeList.codeItemValueNumber);s&&(o=s),a.value=o.map((n=>{const o=u(e,n);let i=n;if(t.convertToCodeItemText&&(null==o?void 0:o.text))i=o.text;else{const{valueFormat:e,unitName:n}=t;e&&(i=ibiz.util.text.format("".concat(i),e)),n&&(i+=n)}return{text:i,color:null==o?void 0:o.color,textCls:null==o?void 0:o.textCls,sysImage:null==o?void 0:o.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:i,emptyText:h,textSeparator:s}},render(){return S("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,S("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&&S(b("iBizIcon"),{icon:t.sysImage},null),"ICON"!==this.showMode&&t.text])]))])}})),t("ControlLoadingPlaceholder",N({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",N({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"},max:{type:Number,default:99},counterMode:{type:Number}},setup:()=>({ns:ge("badge")}),render(){if((this.value||0===this.value)&&!(1===this.counterMode&&this.value<=0))return S("div",{class:[this.ns.b(),this.ns.m(this.type)]},[this.value>this.max?"".concat(this.max,"+"):this.value])}})),t("IBizCustomRender",N({name:"IBizCustomRender",props:{controller:{type:Object,required:!0}},setup(t){const e=ge("custom-render"),n=async(e,n)=>{e.stopPropagation();const o=e.target.getAttribute(n),i=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)),o&&await pt.asyncExecScriptFn({...t.controller.getEventArgs(),context:a,params:r,data:i?K(i):null},o)};return{ns:e,getControlRender:()=>{var o,i,a;const s=null==(o=t.controller)?void 0:o.model.controlRenders;if(!s||0===s.length)return;const r=s.find((t=>t.id===ht.EMPTYPANEL));if(r){if("LAYOUTPANEL_MODEL"===r.renderType&&r.layoutPanelModel){const o=pt.execScriptFn({...t.controller.getEventArgs()},r.layoutPanelModel,{isAsync:!1});return S("div",{innerHTML:o,onClick:t=>n(t,"click"),onDblclick:t=>n(t,"dbclick"),class:[e.b(),e.e(null==(i=r.renderName)?void 0:i.toLowerCase())]},null)}return"LAYOUTPANEL"===r.renderType&&r.layoutPanel?S(b("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 Le{constructor(t,e,n,o){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=o||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 ke{constructor(t,e,n,o,i,a){this.startPoint=t,this.control2=e,this.control1=n,this.endPoint=o,this.startWidth=i,this.endWidth=a}static fromPoints(t,e){const n=this.calculateControlPoints(t[0],t[1],t[2]).c2,o=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new ke(t[1],n,o,t[2],e.start,e.end)}static calculateControlPoints(t,e,n){const o=t.x-e.x,i=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(o*o+i*i),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,f=e.y-v;return{c1:new Le(r+g,l+f),c2:new Le(c+g,d+f)}}length(){let t,e,n=0;for(let o=0;o<=10;o+=1){const i=o/10,a=this.point(i,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),s=this.point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(o>0){const o=a-t,i=s-e;n+=Math.sqrt(o*o+i*i)}t=a,e=s}return n}point(t,e,n,o,i){return e*(1-t)*(1-t)*(1-t)+3*n*(1-t)*(1-t)*t+3*o*(1-t)*t*t+i*t*t*t}}class Be{constructor(t,e={}){var n,o,i;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!=(o=e.minDistance)?o: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!=(i=e.canvasContextOptions)?i:{},this._strokeMoveUpdate=this.throttle?ne(Be.prototype._strokeUpdate,this.throttle):Be.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 ee(e.rotation)&&0!==e.rotation&&(n=await this.rotateDataURL(n,e.rotation,"image/png")),new Promise(((t,o)=>{const i=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()),i.onload=()=>{this._ctx.drawImage(i,l,c,s,r),t()},i.onerror=t=>{o(t)},i.crossOrigin="anonymous",i.src=n,this._oldFromDataURL=n,this._isEmpty=!1}))}rotateDataURL(t,e=0,n="image/png",o){return new Promise(((i,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),i(l.toDataURL(n,o))},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 o=window.innerWidth>window.innerHeight;return{isLandscape:o,status:o?"横屏":"竖屏",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?(oe(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),ee(n)&&0!==n){const o=n*Math.PI/180,i=document.createElement("canvas"),a=i.getContext("2d"),s=this.canvas.width,r=this.canvas.height;return n%180==0?(i.width=s,i.height=r):(i.width=r,i.height=s),a.translate(i.width/2,i.height/2),a.rotate(o),a.drawImage(this.canvas,-s/2,-r/2),i.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==(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(),o={...n,points:[]};this._data.push(o),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],o=n.points,i=o.length>0&&o[o.length-1],a=!!i&&e.distanceTo(i)<=this.minDistance,s=this._getPointGroupOptions(n);if(!i||!i||!a){const t=this._addPoint(e,s);i?t&&this._drawCurve(t,s):this._drawDot(e,s),o.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 o=this.canvas.getBoundingClientRect();return new Le(t-o.left,e-o.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),o=ke.fromPoints(n,t);return n.shift(),o}return null}_calculateCurveWidths(t,e,n){const o=n.velocityFilterWeight*e.velocityFrom(t)+(1-n.velocityFilterWeight)*this._lastVelocity,i=this._strokeWidth(o,n),a={end:i,start:this._lastWidth};return this._lastVelocity=o,this._lastWidth=i,a}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,n){const o=this._ctx;o.moveTo(t,e),o.arc(t,e,n,0,2*Math.PI,!1),this._isEmpty=!1,this._isRedrawn=!0}_drawCurve(t,e){const n=this._ctx,o=t.endWidth-t.startWidth,i=2*Math.ceil(t.length());n.beginPath(),n.fillStyle=e.penColor;for(let n=0;n<i;n+=1){const a=n/i,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*o,e.maxWidth);this._drawCurveSegment(u,h,p)}n.closePath(),n.fill()}_drawDot(t,e){const n=this._ctx,o=e.dotSize>0?e.dotSize:(e.minWidth+e.maxWidth)/2;n.beginPath(),this._drawCurveSegment(t.x,t.y,o),n.closePath(),n.fillStyle=e.penColor,n.fill()}_fromData(t,e,n){for(const o of t){const{points:t}=o,i=this._getPointGroupOptions(o);if(t.length>1)for(let n=0;n<t.length;n+=1){const o=t[n],a=new Le(o.x,o.y,o.pressure,o.time);0===n&&this._reset(i);const s=this._addPoint(a,i);s&&e(s,i)}else this._reset(i),n(t[0],i)}}toSVG({includeBackgroundColor:t=!1}={}){const e=this._data,n=Math.max(window.devicePixelRatio||1,1),o=this.canvas.width/n,i=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(o," ").concat(i)),a.setAttribute("width",o.toString()),a.setAttribute("height",i.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 o="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",o),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:o,maxWidth:i})=>{const s=document.createElement("circle"),r=n>0?n:(o+i)/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 o=new FileReader;o.onload=()=>{e(o.result)},o.onerror=()=>{n(new Error("无法转换Blob为DataURL"))},o.readAsDataURL(t)}))}loadImage(t,e){const n=new Image;n.onload=()=>e(),n.onerror=()=>e,n.src=t}}t("IBizSignaturePad",N({name:"IBizSignaturePad",props:{options:{type:Object}},setup(t){const e=ge("signature-pad"),n=y(),o=y(),i=y(),a=()=>{const e={};if(t.options){const{dotsize:n,minwidth:o,maxwidth:i,pencolor:a,velocityfilterweight:s,compositeoperation:r,mindistance:l,backgroundcolor:c,throttle:d,canvascontextoptions:u}=t.options;if(n&&Object.assign(e,{dotSize:Number(n)}),o&&Object.assign(e,{minWidth:Number(o)}),i&&Object.assign(e,{maxWidth:Number(i)}),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(ie(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=>{z((()=>{const e=o.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"),i.value=new Be(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=()=>{i.value&&(i.value.off(),l())};return P((()=>{r(),window.addEventListener("resize",c)})),I((()=>{window.removeEventListener("resize",c)})),{ns:e,canvasRef:o,signaturePadRef:n,signaturePad:i,updateSignaturePad:l}},render(){return S("div",{class:this.ns.b(),ref:"signaturePadRef"},[S("div",{class:this.ns.e("container")},[S("canvas",{ref:"canvasRef"},null)])])}}));class Me extends Ct{}t("PanelContainerState",Me);class je extends Pt{createState(){var t;return new Me(null==(t=this.parent)?void 0:t.state)}}function Ve(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}t("PanelContainerController",je);const Ue=N({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:je,required:!0}},setup(t){const e=ge("panel-container"),{id:n}=t.modelData,o=O((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o}));return{ns:e,classArr:o}},render(){var t,e,n;let o;const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=S(b("iBizRow"),{slot:"content",layout:this.modelData.layout},Ve(o=i.map((t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ve(t)?t:{default:()=>[t]}):t})))?o:{default:()=>[o]}),s=null==(n=this.$attrs)?void 0:n.attrs;if(s&&s.dynamictooltip){const t={...s.dynamictooltip};return delete t.content,S(b("el-tooltip"),_({placement:"right","popper-class":this.ns.e("dynamic-tooltip")},t),{default:()=>S("div",_({class:this.classArr,onClick:()=>{this.controller.onClick()}},this.$attrs),[this.controller.model.cssStyle?S("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a]),content:()=>S("div",{class:this.ns.e("dynamic-tooltip-content"),innerHTML:s.dynamictooltip.content},null)})}return S("div",{class:this.classArr,onClick:t=>this.controller.onClick(t)},[this.controller.model.cssStyle?S("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class We{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new je(t,e,n);return await o.init(),o}}t("IBizPanelContainer",Ee(Ue,(function(t){t.component(Ue.name,Ue),It("CONTAINER",(()=>new We)),It("CONTAINER_DEFAULT",(()=>new We))})));const Fe=N({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){m("ctx").evt.on("onRegister",((e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}));return{ns:ge("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),S("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!t.visible)]},[e||(ibiz.env.dev?ibiz.i18n.t("vue3Util.panelComponent.noProvidedSlot",{id:this.modelData.id}):"")])}});class qe extends Pt{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 Ge{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new qe(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",Ee(Fe,(function(t){t.component(Fe.name,Fe),It("CTRLPOS",(()=>new Ge))})));class $e extends Pt{}function He(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}t("ScrollContainerItemController",$e);const Ke=t("ScrollContainerItem",N({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:$e,required:!0}},setup(t){const e=ge("scroll-container-item"),{id:n}=t.modelData,o=O((()=>[e.b(),e.m(n),e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return S(b("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},He(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},He(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class Xe{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new $e(t,e,n);return await o.init(),o}}class Qe extends Pt{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",Qe);const Ye=t("ScrollContainer",N({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:Qe,required:!0}},setup(t){const e=ge("scroll-container"),{id:n}=t.modelData,o=O((()=>[e.b(),e.m(n),...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n=null,o=null,i=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":i=t,r.right={width:l};break;case"NORTH":o=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 S("div",{class:this.classArr},[S("div",{class:[this.ns.e("header")],style:r.top},[o]),S("div",{class:[this.ns.b("content")]},[S("div",{class:this.ns.be("content","left"),style:r.left},[n]),S("div",{class:this.ns.be("content","center")},[s]),S("div",{class:this.ns.be("content","right"),style:r.right},[i])]),S("div",{class:[this.ns.e("footer")],style:r.bottom},[a])])}}));class Je{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new Qe(t,e,n);return await o.init(),o}}t("IBizScrollContainer",Ee(Ye,(function(t){t.component(Ye.name,Ye),t.component(Ke.name,Ke),It("CONTAINER_CONTAINER_SCROLL",(()=>new Je)),It("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new Xe)),It("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new Xe)),It("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new Xe)),It("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new Xe)),It("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new Xe))})));class Ze extends Ct{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={},this.isLoading=!1}}t("NavPosState",Ze);const tn=["is404","isRoutePushed"];class en extends Pt{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 Ze(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]?(st(this.state.navViewMsgs[e],t),tn.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 Dt({mode:this.routeDepth?Et.ROUTE:Et.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=Ie(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,o,i;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=Ie(this.route,this.routeDepth,!1);(null==(e=t.modalOptions)?void 0:e.replace)?this.router.replace("".concat(n,"/error/404")):this.router.push("".concat(n,"/error/404"))}else 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==(o=t.modalOptions)?void 0:o.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==(i=this.rawItemParams)?void 0:i.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;i(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}}function nn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}t("NavPosController",en);const on=N({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:en,required:!0}},setup(t){const e=t.controller,n=ge("nav-pos"),o=Yt(),i=Qt(),a=y(!1);if(e.setRouter(o),e.routeDepth){const t=Ie(i,e.routeDepth);l((()=>i.fullPath),(()=>{const n=Ie(i,e.routeDepth);if(t===n&&i.matched.length>e.routeDepth){if(i.matched.length===e.routeDepth+1&&(a.value=!!i.name,a.value))return;e.onRouteChange(i)}}),{immediate:!0})}return{ns:n,c:e,isPresetView:a,onViewCreated:t=>{e.onViewCreated(t)}}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:o,navViewMsgs:i,cache:a}=e;let s=null;if(e.routeOpen){if(this.isPresetView)return S(Jt,null,null);s=S(b("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?S(t,null,null):null;return a?S(b("keepAlive"),{include:o,max:30,isKey:!0},nn(e)?e:{default:()=>[e]}):e}})}else{const t=n&&i[n]?w(b("IBizViewShell"),{context:i[n].context,params:i[n].params,key:this.c.ignoreEmbedKey?void 0:n,viewId:i[n].viewId,onCreated:this.onViewCreated}):null;s=a?S(b("keepAlive"),{include:o,max:30,isKey:!0},nn(t)?t:{default:()=>[t]}):t}return S("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[s])}});class an{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new en(t,e,n);return await o.init(),o}}t("IBizNavPos",Ee(on,(function(t){t.component(on.name,on),It("RAWITEM_NAV_POS",(()=>new an))})));class sn extends Ct{constructor(){super(...arguments),this.error=null}}class rn extends Pt{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 sn(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 Ot(this.model.editor),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:Nt.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.ENTER,event:t})}}t("PanelFieldController",rn);const ln=N({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:rn,required:!0},attrs:{type:Object,require:!1}},setup(t){const e=ge("panel-field"),n=O((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n),e.is("error",!!t.controller.state.error)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n,onValueChange:(e,n)=>{t.controller.setDataValue(e,n)}}},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"),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=b(this.controller.editorProvider.formEditor);t=w(n,{...e})}else t=S(b("not-supported-editor"),{modelData:this.modelData.editor},null)}return S("div",{class:this.classArr,onClick:t=>this.controller.onClick(t)},[t,this.controller.state.error&&S("div",{class:this.ns.e("error")},[this.controller.state.error])])}});class cn{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new rn(t,e,n);return await o.init(),o}}t("IBizPanelField",Ee(ln,(function(t){t.component(ln.name,ln),It("FIELD",(()=>new cn))})));class dn extends Pt{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?St(this.model.dynaClass,t):[],o=(null==(n=this.model.rawItem)?void 0:n.dynaClass)?St(this.model.rawItem.dynaClass,t):[];this.state.class.containerDyna=[...e,...o]}if(this.model.labelDynaClass){const e=St(this.model.labelDynaClass,t);this.state.class.labelDyna=e}}}t("PanelRawItemController",dn);const un=N({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:dn,required:!0}},setup(t){const e=ge("panel-rawitem"),n=t.controller,o=y(""),i=y(""),{rawItem:a}=t.modelData;a&&a.cssStyle&&(i.value=a.cssStyle);const s=O((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return l((()=>n.data),(async t=>{if(t){const e=n.model.rawItem;if(!e)return;let i;const a={...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(a,{data:{...t}}))),o.value=i}}),{immediate:!0}),{ns:e,classArr:s,tempStyle:i,content:o}},render(){if(this.controller.state.visible)return S("div",{class:this.classArr,style:this.tempStyle,onClick:t=>this.controller.onClick(t)},[S(b("iBizRawItem"),{rawItem:this.modelData,content:this.content},null)])}});class hn{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new dn(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",Ee(un,(function(t){t.component(un.name,un),It("RAWITEM",(()=>new hn)),It("RAWITEM_STATIC_IMAGE",(()=>new hn)),It("RAWITEM_STATIC_LABEL",(()=>new hn)),It("RAWITEM_STATIC_TEXT",(()=>new hn))})));class pn extends Ct{constructor(){super(...arguments),this.data={}}}class mn{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new pn,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const i=At(this.model).map((t=>t.id));o._evt.on("change",(t=>{i.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 o,i;const a=this.parent.providers[t.id];if(!a)return;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(o=t.panelItems)?void 0:o.length)&&!Tt(t)?await this.initChildrenController(t.panelItems,e,s):(null==(i=t.panelTabPages)?void 0:i.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 vn extends Ct{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",vn);class gn extends Pt{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new vn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders()}async panelStateNotify(t){super.panelStateNotify(t),t===zt.LOAD&&this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map((async t=>{var e,n;const o=await _t(t,this.panel.model,this.panel.view.model);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!Tt(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,o=this.panel.context.clone();Object.assign(o,Rt(e,t,this.panel.context,this.panel.params));const i=Rt(n,t,this.panel.context,this.panel.params);return Object.assign(i,this.panel.params),{context:o,params:i}}initContainerData(){const{dataSourceType:t,dataName:e,scriptCode:n}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":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"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!n)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=pt.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},n,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}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=At(this.model),n=t.map((t=>new Lt(e,t)));this.dataItems=n.map((t=>new mn(this.model,this.panel,this,t))),this.dataItems.length&&await Promise.all(this.dataItems.map((t=>t.init()))),this.state.items=n,this.childrenStateNotify(zt.LOAD)}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:o}=this.computeNavParams(),i=await kt(e,t,n,this.panel.data,o);if(!i)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(i)}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:o,params:i}=this.computeNavParams(),a=await n.deService.exec(e,t,o,void 0,i);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",gn);const fn=N({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:gn,required:!0}},setup(t){const e=ge("multi-data-container"),{id:n}=t.modelData;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 o=m("renderPanelItem"),i=O((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:i,renderPanelItem: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 S(b("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const o=n.panelItems[t.id];return S(b("iBizCol"),{layoutPos:t.layoutPos,state:o.state},"function"==typeof(i=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(i)&&!R(i)?e:{default:()=>[e]});var i}))]}})})),S("div",{class:this.classArr},[t])}});class yn{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new gn(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",Ee(fn,(function(t){t.component(fn.name,fn),It("CONTAINER_CONTAINER_MULTIDATA",(()=>new yn))})));class wn extends Ct{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerRawState",wn);class bn extends Pt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.items}createState(){var t;return new wn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers()}async panelStateNotify(t){super.panelStateNotify(t),t===zt.LOAD&&this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,i;const a=await _t(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==(o=t.panelItems)?void 0:o.length)&&!Tt(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(i=t.panelTabPages)?void 0:i.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)})))}computeNavParams(){const{navigateContexts:t,navigateParams:e}=this.model,n=this.panel.context.clone();Object.assign(n,Rt(t,this.panel.params,this.panel.context));const o=Rt(e,this.panel.params,this.panel.context);return Object.assign(o,this.panel.params),{context:n,params:o}}initContainerData(){const{dataSourceType:t,dataName:e,scriptCode:n}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":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"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!n)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=pt.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},n,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}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(zt.LOAD)}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:o}=this.computeNavParams(),i=await kt(e,t,n,this.panel.data,o);if(!i)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(i)}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:o,params:i}=this.computeNavParams(),a=await n.deService.exec(e,t,o,void 0,i);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",bn);const Cn=N({name:"IBizMultiDataContainerRaw",props:{modelData:{type:Object,required:!0},controller:{type:bn,required:!0}},setup(t){const e=ge("multi-data-container-raw"),{id:n}=t.modelData;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 o=m("renderPanelItem"),i=O((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:i,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():S(b("iBizRow"),{class:this.ns.b("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 S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!R(o)?e:{default:()=>[e]});var o}))]}}),S("div",{class:this.classArr},[t])}});class Pn{constructor(){this.component="IBizMultiDataContainerRaw"}async createController(t,e,n){const o=new bn(t,e,n);return await o.init(),o}}t("IBizMultiDataContainerRaw",Ee(Cn,(function(t){t.component(Cn.name,Cn),It("CONTAINER_CONTAINER_MULTIDATA_RAW",(()=>new Pn))})));class In extends Ct{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",In);class Dn extends Pt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new In(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers()}async panelStateNotify(t){super.panelStateNotify(t),t===zt.LOAD&&this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,i;const a=await _t(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==(o=t.panelItems)?void 0:o.length)&&!Tt(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(i=t.panelTabPages)?void 0:i.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)})))}computeNavParams(){const{navigateContexts:t,navigateParams:e}=this.model,n=this.panel.context.clone();Object.assign(n,Rt(t,this.panel.params,this.panel.context));const o=Rt(e,this.panel.params,this.panel.context);return Object.assign(o,this.panel.params),{context:n,params:o}}initContainerData(){const{dataSourceType:t,dataName:e,dataRegionType:n,scriptCode:o}=this.model;if("LOGINFORM"!==n)switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":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"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!o)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=pt.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},o,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}else this.setLoginForm()}childrenStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setData(t){var e,n;const o=At(this.model),i=o.map((t=>t.id)),a=new Lt(o,t);a._evt.on("change",(t=>{i.includes(t)&&this.childDataChangeNotify([t])})),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=a,this.childrenStateNotify(zt.LOAD)}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:o}=this.computeNavParams(),i=await kt(e,t,n,this.panel.data,o);if(!i)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(i)}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:o,params:i}=this.computeNavParams(),a=await n.deService.exec(e,t,o,void 0,i);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",Dn);const En=N({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Dn,required:!0}},setup(t){const e=ge("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach((e=>{const n=t.controller.panelItems[e];n.state=v(n.state)}));const o=m("renderPanelItem"),i=O((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:i,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():S(b("iBizRow"),{class:this.ns.b("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 S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!R(o)?e:{default:()=>[e]});var o}))]}}),S("div",{class:this.classArr},[t])}});class xn{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new Dn(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",Ee(En,(function(t){t.component(En.name,En),It("CONTAINER_CONTAINER_SINGLEDATA",(()=>new xn))})));class On extends Ct{}t("GridContainerState",On);class Nn extends Pt{createState(){var t;return new On(null==(t=this.parent)?void 0:t.state)}}function Sn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}t("GridContainerController",Nn);const An=N({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Nn,required:!0}},setup(t){const e=ge("grid-container"),{id:n}=t.modelData,o=O((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),i=O((()=>({...t.modelData.layout,layout:"TABLE_12COL"}))),a=y(void 0),s=y(12);return{ns:e,classArr:o,layoutModel:i,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:s,adaptCols:a}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];if(void 0===this.adaptCols){let t=0,e=0;o.forEach((n=>{const o=n.props;o&&o.modelData&&o.modelData.layoutPos&&("number"==typeof o.modelData.layoutPos.grow?t+=o.modelData.layoutPos.grow:void 0===o.modelData.layoutPos.grow&&(e+=1))}));let n=12;e>0&&(n=(12-t)/e),this.adaptCols=e,this.adaptGrow=n}return S(b("iBizRow"),{class:this.classArr,layout:this.layoutModel},Sn(n=o.map((t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},Sn(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class Tn{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new Nn(t,e,n);return await o.init(),o}}t("IBizGridContainer",Ee(An,(function(t){t.component(An.name,An),It("CONTAINER_CONTAINER_GRID",(()=>new Tn))})));class zn extends Ct{}t("PanelContainerImageState",zn);class _n extends Pt{createState(){var t;return new zn(null==(t=this.parent)?void 0:t.state)}}function Rn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}t("PanelContainerImageController",_n);const Ln=N({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:_n,required:!0}},setup(t){const e=ge("panel-container-image"),{id:n}=t.modelData,o=O((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),i=O((()=>{const e=t.controller.model.sysImage,n={};let o="";if(null==e?void 0:e.rawContent)if(H(e.rawContent)){const t=e.rawContent.replace(/[\u4e00-\u9fff]/g,"");o="url(data:image/svg+xml;base64,".concat(btoa(t),")")}else o="url(".concat(e.rawContent,")");else(null==e?void 0:e.imagePath)&&(o="url(".concat(e.imagePath,")"));return o&&Object.assign(n,{backgroundImage:o}),n}));return{ns:e,classArr:o,backgroundStyle:i}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],i=S(b("iBizRow"),{slot:"content",layout:this.modelData.layout},Rn(n=o.map((t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Rn(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return S("div",{class:this.classArr,onClick:t=>this.controller.onClick(t),style:this.backgroundStyle},[this.controller.model.cssStyle?S("style",{type:"text/css"},[this.controller.model.cssStyle]):null,i])}});class kn{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new _n(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",Ee(Ln,(function(t){t.component(Ln.name,Ln),It("CONTAINER_CONTAINER_IMAGE",(()=>new kn))})));class Bn extends Ct{}t("PanelContainerGroupState",Bn);class Mn extends Pt{createState(){var t;return new Bn(null==(t=this.parent)?void 0:t.state)}get disableClose(){const{titleBarCloseMode:t}=this.model;return 0===t||void 0===t}get defaultExpansion(){const{titleBarCloseMode:t}=this.model;return this.disableClose||1===t}}t("PanelContainerGroupController",Mn);class jn{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new Mn(t,e,n);return await o.init(),o}}function Vn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}const Un=N({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:Mn,required:!0}},setup(t){const e=ge("panel-container-group"),n=y(!t.controller.defaultExpansion);return{ns:e,captionText:O((()=>{const{captionItemName:e,caption:n,capLanguageRes:o}=t.modelData;if(e)return t.controller.data[e];let i=n;return o&&(i=ibiz.i18n.t(o.lanResTag,n)),i})),isCollapse:n,changeCollapse:()=>{t.controller.disableClose||(n.value=!n.value)}}},render(){var t,e;let n;const o=[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!this.controller.state.visible)];!0===this.modelData.showCaption&&(o.push(this.ns.m("show-header")),o.push(this.ns.b("collapse")),o.push(this.ns.is("collapse",this.isCollapse)),this.controller.disableClose&&o.push(this.ns.bm("collapse","disable-close")));const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=S(b("iBizRow"),{slot:"content",layout:this.modelData.layout},Vn(n=i.map((t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Vn(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let s=null;return this.modelData.showCaption&&(s=S("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[S("div",{class:[this.ns.be("header","left")]},[S("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.modelData.sysImage&&S(Re,{class:this.ns.em("caption","icon"),icon:this.modelData.sysImage},null),this.captionText,this.modelData.counterId&&S("span",{class:this.ns.e("counter")},[L("("),this.controller.state.counterData[this.modelData.counterId],L(")")])])]),S("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?S("ion-icon",{name:"caret-forward-sharp"},null):S("ion-icon",{name:"caret-down-sharp"},null))])])),S("div",{class:o},[s,S("div",{class:[this.ns.b("content")]},[a])])}});t("IBizPanelContainerGroup",Ee(Un,(function(t){t.component(Un.name,Un),It("CONTAINER_CONTAINER_GROUP",(()=>new jn))})));function Wn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)}const Fn=N({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:Pt,required:!0}},setup(t){const e=ge("panel-tab-page"),n=O((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return S(b("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},Wn(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return S(b("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},Wn(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class qn{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new Pt(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",Ee(Fn,(function(t){t.component(Fn.name,Fn),It("TABPAGE",(()=>new qn))})));class Gn extends Pt{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];return n.layoutPanelModel?pt.execScriptFn({data:e||{}},n.layoutPanelModel,{singleRowReturn:!0,isAsync:!1}):void 0}}const $n=N({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:Gn,required:!0}},setup(t){var e;const n=ge("panel-item-render"),o=ge("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:i}=t.modelData,a=O((()=>[n.b(),n.m(i),o.b(),n.is("hidden",!t.controller.state.visible)])),s=O((()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data)));return{ns:n,classArr:a,htmlCode:s}},render(){return S("div",{class:this.classArr,innerHTML:this.htmlCode,onClick:t=>this.controller.onClick(t)},null)}});class Hn{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const o=new Gn(t,e,n);return await o.init(),o}}t("IBizPanelItemRender",Ee($n,(function(t){t.component($n.name,$n),It("PREDEFINE_RENDER",(()=>new Hn))})));const Kn=N({name:"IBizTeleportPlaceholder",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=ge("teleport-placeholder"),n=y(""),{rawItem:o}=t.modelData;o&&o.cssStyle&&(n.value=o.cssStyle);const i=O((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:i,tempStyle:n}},render(){if(this.controller.state.visible)return S("div",{id:this.controller.state.teleportTag,class:this.classArr,style:this.tempStyle},null)}});class Xn extends Ct{constructor(){super(...arguments),this.teleportTag=""}}class Qn extends Pt{createState(){var t;return new Xn(null==(t=this.parent)?void 0:t.state)}async onInit(){var t,e;await super.onInit();const n=this.panel.view.model.codeName;let o="".concat(null==n?void 0:n.toLowerCase(),"-").concat(this.model.id);const i=null==(e=null==(t=this.model.rawItem)?void 0:t.rawItemParams)?void 0:e.find((t=>"TeleportTag"===t.key));i&&i.value&&(o=i.value),ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.placeholderIdentifier",{viewCodeName:n,id:this.model.id}),o),this.state.teleportTag=o}}class Yn{constructor(){this.component="IBizTeleportPlaceholder"}async createController(t,e,n){const o=new Qn(t,e,n);return await o.init(),o}}t("TeleportPlaceholderProvider",Yn);t("IBizTeleportPlaceholder",Ee(Kn,(function(t){t.component(Kn.name,Kn),It("RAWITEM_TELEPORT_PLACEHOLDER",(()=>new Yn))})));const Jn=N({name:"IBizPanelContainerTabs",props:{modelData:{type:Object,required:!0},controller:{type:je,required:!0}},setup:()=>({ns:ge("panel-container-tabs")}),render(){return w(b("IBizPanelContainer"),{...this.$props,...this.$attrs,class:this.ns.b()},this.$slots)}});class Zn{constructor(){this.component="IBizPanelContainerTabs"}async createController(t,e,n){const o=new je(t,e,n);return await o.init(),o}}t("IBizPanelContainerTabs",Ee(Jn,(function(t){t.component(Jn.name,Jn),It("CONTAINER_TABS",(()=>new Zn))})));const to=N({name:"IBizPanelCtrlViewPageCaption",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=ge("panel-ctrl-view-page-caption"),n=O((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n}},render(){let t=null;return this.controller.data&&(t=S("span",{class:this.ns.b("content")},[this.controller.state.caption])),S("div",{class:this.classArr,onClick:t=>this.controller.onClick(t)},[t])}});class eo extends Pt{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 no{constructor(){this.component="IBizPanelCtrlViewPageCaption"}async createController(t,e,n){const o=new eo(t,e,n);return await o.init(),o}}t("IBizPanelCtrlViewPageCaption",Ee(to,(function(t){t.component(to.name,to),It("CTRLPOS_VIEW_PAGECAPTION",(()=>new no))})));const oo=N({name:"IBizAuthWxmpQrcode",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=ge("auth-wxmp-qrcode"),{state:n}=t.controller,o=Qt();t.controller.setRouter(o);const i=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)&&i()}),{immediate:!0}),I((()=>{t.controller.destroy()})),{ns:e,loadQrcode:i}},render(){var t,e;return S("div",{class:this.ns.b()},[S("div",{class:this.ns.e("content")},[this.controller.state.qrcode&&S("img",{class:this.ns.e("qrcode"),src:null==(t=this.controller.state.qrcode)?void 0:t.url},null),!(null==(e=this.controller.state.qrcode)?void 0:e.expirein)&&S("div",{class:this.ns.e("mask")},[S("ion-icon",{title:ibiz.i18n.t("vue3Util.panelComponent.refresh"),name:"reload-outline",onClick:this.loadQrcode,class:this.ns.em("mask","icon")},null)])]),S("div",{class:this.ns.e("caption")},[this.controller.state.tips])])}});class io extends Ct{}class ao extends Pt{constructor(){super(...arguments),this.pollingTime=2,this.rawItemParams={}}createState(){var t;return new io(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;i(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}initParams(){var t;this.pollingTime=(t=this.rawItemParams.pollingtime)&&isFinite(Number(t))?Number(this.rawItemParams.pollingtime):2,this.state.tips=this.model.caption||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 o=this.route.query.ru||"/";window.location.hash=o||"/",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 so{constructor(){this.component="IBizAuthWxmpQrcode"}async createController(t,e,n){const o=new ao(t,e,n);return await o.init(),o}}t("IBizAuthWxmpQrcode",Ee(oo,(function(t){t.component(oo.name,oo),It("RAWITEM_AUTH_WXMP_QRCODE",(()=>new so))}))),t("AppRedirectView",N({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 Bt(e,n)}()},render:()=>S("div",null,[ibiz.i18n.t("vue3Util.view.redirectionProgress")])}));class ro{constructor(){this.component="IBizView"}}const lo=N({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=ge("view"),o=Te(((...t)=>new mt(...t)));ze(o);const i=Mt(o.model),a=[],s=new Map,r=[];i.forEach((t=>{const{teleportFlag:e,teleportTag:n}=jt(t);n||e?(a.push(t),s.set(t.id,n||"")):r.push(t)}));const{viewType:l,sysCss:d,codeName:u}=o.model,h=l.toLowerCase(),p=null==d?void 0:d.cssName,m=O((()=>[n.b(),n.b(h),n.m(u),p,o.state.viewMessages.TOP?"has-top-message":"",o.state.viewMessages.BOTTOM?"has-bottom-message":"",o.state.presetClassList])),v=(t,e={})=>{const n=t.name||t.id;return{context:o.context,params:o.params,modelData:t,...o.slotProps[n]||{},...e}};let g;return P((()=>{z((async()=>{const t=document.getElementById(o.id),e=await ibiz.hub.config.view.get(o.model.id);t&&(null==e?void 0:e.waterMarkOption)&&(g=ibiz.util.watermark.mount(e.waterMarkOption,t,o.context,o.params,o.state.srfactiveviewdata||{}))}))})),c((()=>{null==g||g()})),{c:o,ns:n,controls:r,teleportControls:a,viewClassNames:m,onLayoutPanelCreated:t=>{o.setLayoutPanel(t)},getCtrlProps:v,renderControl:(t,n={})=>{const i=t.name||t.id,a=v(t,n);if(e[i])return B(e,i,a);const s=o.providers[i],r=b((null==s?void 0:s.component)||"IBizControlShell");return s&&(a.provider=s),w(r,a)},getCtrlTeleportTag:t=>{var e,n;const i=s.get(t.id);if(i)return i;const a=null==(n=null==(e=o.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:o.state.hasError?"none":"initial"}),t}}},render(){var t,e;let n=null;if(this.c.state.isCreated)if(0===this.c.engines.length)n=S("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 o=this.c.model.viewLayoutPanel,i=this.c.providers[o.name];n=w(b(i.component),{modelData:o,context:this.c.context,params:this.c.params,provider:i,container:this.c,style:this.getControlStyle(),onControllerAppear:this.onLayoutPanelCreated},e)}let o=null;this.c.state.isCreated&&(null==(e=this.teleportControls)?void 0:e.length)&&(o=this.teleportControls.map((t=>{let e;const n=this.getCtrlTeleportTag(t);return n?S("div",{style:this.getControlStyle()},[S(k,{to:n,disabled:!this.c.state.activated},(o=e=this.renderControl(t),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!R(o)?e:{default:()=>[e]}))]):(ibiz.log.error(ibiz.i18n.t("vue3Util.view.noTeleportTag",{name:t.name})),null);var o})));let i=null;if(this.c.state.hasError&&this.c.error.status){const t=gt(this.c.error.status);t&&("string"==typeof t.component&&(i=w(b(t.component))),i=w(t.component))}return A(S("div",{class:this.viewClassNames,id:this.c.id},[n,o,i]),[[T("loading"),this.c.state.isLoading]])}});class co{constructor(){this.component="IBizView"}createController(t,e,n,o){return new Vt(t,e,n,o)}}class uo{constructor(){this.component="IBizView"}createController(t,e,n,o){return new Ut(t,e,n,o)}}t("IBizView",Ee(lo,(function(t){t.component(lo.name,lo),Wt("DEFAULT",(()=>new ro)),Wt("APPDATAUPLOADVIEW",(()=>new co)),Wt("DEMDCUSTOMVIEW",(()=>new uo))}))),t("TodoRedirect",N({setup(){const t=Yt(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error(ibiz.i18n.t("vue3Util.view.insufficientRedirection"));const i=Zt.parse(o,{delimiter:";"}),{apptype:a,todotype:s,todoid:r}=i,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:()=>S("div",null,[ibiz.i18n.t("vue3Util.view.toDoList")])}));class ho{constructor(){this.component="IBizPortalView"}}const po=N({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=ge("view"),n=Te(((...t)=>new mt(...t))),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:i,sysCss:a,codeName:s}=n.model,r=i.toLowerCase(),l=null==a?void 0:a.cssName,c=[e.b(),e.b(r),e.m(s),l];return{c:n,ns:e,controls:o,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,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const i=n[e];if(i)return void(n[e]=()=>i({modelData:t,...o}));const a=this.c.providers[e];a&&(n[e]=()=>{const e=b(a.component);return w(e,{modelData:t,...o,provider:a})})})),n.dashboard&&(e=n.dashboard())}return S("div",{class:this.viewClassNames},[e])}}),mo=(t("IBizPortalView",Ee(po,(function(t){t.component(po.name,po),Wt(lt.APP_PORTAL_VIEW,(()=>new ho)),Wt(lt.DE_PORTAL_VIEW,(()=>new ho)),Wt(lt.DE_PORTAL_VIEW9,(()=>new ho))}))),N({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=Te(((...t)=>new mt(...t))),n=y(),o=y(),i=y();return e.evt.on("onCreated",(()=>{Ft(p(t.modelData),p(e.context),p(e.params)).then((async t=>{if("view"!==t.type)throw new F(ibiz.i18n.t("vue3Util.view.embeddedRedirectionView"));n.value=t.viewId,o.value=t.context,i.value=t.params}))})),t.isEmbedCtrlNav&&l((()=>[e.context,e.params]),(()=>{Ft(p(t.modelData),p(e.context),p(e.params)).then((async t=>{"view"===t.type&&(n.value=t.viewId,o.value=t.context)}))}),{deep:!0}),{c:e,toViewId:n,toViewContext:o,toViewParams:i}},render(){return this.toViewId?w(b("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):A(S("div",{style:"width: 100%; height: 100%;"},null),[[T("loading"),!this.toViewId]])}}));class vo{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",Ee(mo,(function(t){t.component(mo.name,mo);const e=new vo;Wt(lt.DE_REDIRECT_VIEW,(()=>e))})));class go{constructor(){this.component="IBizHtmlView"}}const fo=N({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=ge("view"),n=Te(((...t)=>new mt(...t))),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:i,sysCss:a,codeName:s}=n.model,r=i.toLowerCase(),l=null==a?void 0:a.cssName,c=[e.b(),e.b(r),e.m(s),l],d=y(!1),u=O((()=>{const{htmlUrl:t}=n.model;return t?et.fill(t,n.context,n.params):""}));M((()=>{u.value&&(d.value=!0)}));return{c:n,ns:e,controls:o,viewClassNames:c,url:u,isLoading:d,onLoad:()=>{d.value=!1}}},render(){if(this.url)return A(S("div",{class:this.viewClassNames},[S("iframe",{src:this.url,onLoad:()=>this.onLoad()},null)]),[[T("loading"),this.isLoading]]);let t=null;const e=gt("404");return e&&("string"==typeof e.component&&(t=w(b(e.component))),t=w(e.component)),S("div",{class:this.viewClassNames},[t])}});t("IBizHtmlView",Ee(fo,(function(t){t.component(fo.name,fo),Wt(lt.DE_HTML_VIEW,(()=>new go))})));const yo=N({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=me(((...e)=>new qt(...e,t.container))),o=ge("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 i=(t,o)=>{var a,s;if(t.hidden)return null;const{providers:r,panelItems:l}=o||n,c=r[t.id];if(!c)return S("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);if("CTRLPOS"!==t.itemType&&e[t.id])return B(e,t.id,{model:t,data:n.data,value:n.data[t.id]});const d=b(c.component);let u;if("CTRLPOS"===t.itemType&&e[t.id]){const n=l[t.id];u=n.parent&&Gt(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=>i(t,o))):Tt(t)?u=void 0:(null==(s=t.panelItems)?void 0:s.length)&&(u=()=>t.panelItems.map((t=>i(t,o))));let h="";t.cssStyle&&(h=t.cssStyle);const p=l[t.id],m=function(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach((t=>{t.attrName&&t.attrValue&&(o[t.attrName]=pt.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))})),o}(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 C("renderPanelItem",i),{c:n,ns:o,renderPanelItem:i}},render(){const{state:t,model:e}=this.c;return S(b("iBizControlBase"),{controller:this.c},{default:()=>[S(b("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",S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!R(o)?e:{default:()=>[e]});var o})))]}})]})}});class wo{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",Ee(yo,(function(t){t.component(yo.name,yo),$t(Ht.VIEW_LAYOUT_PANEL,(()=>new wo))})));function bo(t,e,n){var o,i;if(t.hidden)return;const{providers:a,panelItems:s}=e,r=a[t.id];if(!r)return S("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);const l=b(r.component);let c;"CTRLPOS"===t.itemType&&n.$slots[t.id]?c=()=>n.$slots[t.id]():"TABPANEL"===t.itemType&&(null==(o=t.panelTabPages)?void 0:o.length)?c=()=>t.panelTabPages.map((t=>bo(t,e,n))):Tt(t)?c=void 0:(null==(i=t.panelItems)?void 0:i.length)&&(c=()=>t.panelItems.map((t=>bo(t,e,n))));let d="";t.cssStyle&&(d=t.cssStyle);const u=s[t.id],h=function(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach((t=>{t.attrName&&t.attrValue&&(o[t.attrName]=pt.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))})),o}(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),w(l,{modelData:t,controller:u,key:t.id,style:d,attrs:h},c)}const Co=N({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=me(((...e)=>new Kt(...e,t.container))),n=ge("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 o=m("renderPanelItem");return C("renderPanelItem",o||bo),{c:e,ns:n}},render(){const{state:t,model:e}=this.c;return S(b("iBizControlBase"),{controller:this.c},{default:()=>[S(b("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",S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=bo(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!R(o)?e:{default:()=>[e]});var o})))]}})]})}});class Po{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",Ee(Co,(function(t){t.component(Co.name,Co),$t(Ht.PANEL,(()=>new Po))})));function Io(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Do(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function Eo(t,e){for(var n,o="",i=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(o.length<2||2!==i||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){var l=o.lastIndexOf("/");if(l!==o.length-1){-1===l?(o="",i=0):i=(o=o.slice(0,l)).length-1-o.lastIndexOf("/"),a=r,s=0;continue}}else if(2===o.length||1===o.length){o="",i=0,a=r,s=0;continue}e&&(o.length>0?o+="/..":o="..",i=2)}else o.length>0?o+="/"+t.slice(a+1,r):o=t.slice(a+1,r),i=r-a-1;a=r,s=0}else 46===n&&-1!==s?++s:s=-1}return o}var xo={resolve:function(){for(var t,e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var i;o>=0?i=arguments[o]:(void 0===t&&(t=process.cwd()),i=t),Do(i),0!==i.length&&(e=i+"/"+e,n=47===i.charCodeAt(0))}return e=Eo(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(Do(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=Eo(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return Do(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];Do(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":xo.normalize(t)},relative:function(t,e){if(Do(t),Do(e),t===e)return"";if((t=xo.resolve(t))===(e=xo.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,i=o-n,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var s=e.length-a,r=i<s?i: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 i>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<=o;++c)c!==o&&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(Do(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');Do(t);var n,o=0,i=-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){o=n+1;break}}else-1===r&&(a=!1,r=n+1),s>=0&&(l===e.charCodeAt(s)?-1==--s&&(i=n):(s=-1,i=r))}return o===i?i=r:-1===i&&(i=t.length),t.slice(o,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":t.slice(o,i)},extname:function(t){Do(t);for(var e=-1,n=0,o=-1,i=!0,a=0,s=t.length-1;s>=0;--s){var r=t.charCodeAt(s);if(47!==r)-1===o&&(i=!1,o=s+1),46===r?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=s+1;break}}return-1===e||-1===o||0===a||1===a&&e===o-1&&e===n+1?"":t.slice(e,o)},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,o=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+o:n+t+o:o}("/",t)},parse:function(t){Do(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,o=t.charCodeAt(0),i=47===o;i?(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!==(o=t.charCodeAt(c)))-1===r&&(l=!1,r=c+1),46===o?-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&&i?t.slice(1,r):t.slice(s,r)):(0===s&&i?(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):i&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};xo.posix=xo;var Oo=xo,No=Io(Oo);t("PluginFactory",class{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,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}),re.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,o=n.rtobjectRepo,i=n.pluginParams||{};if(this.isIgnore(o))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(o)){const t=await this.loadQueue.get(o);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(n.rtobjectName,n.rtobjectRepo,e,{...i});this.loadQueue.set(o,t);return await t}catch(t){throw new Y(n,ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"))}finally{this.loadQueue.delete(o)}}}return!1}async loadPluginRef(t,e,n=ibiz.env.appId,o={}){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let i=null;{const t=e,o=this.urlReg.test(t)?"".concat(t,"/package.json"):"".concat("FULLCODE"===ibiz.env.runContainer&&n!==ibiz.env.appId?ibiz.hub.microAppConfigCenter.getPluginBaseUrl(n):ibiz.env.pluginBaseUrl,"/").concat(Oo.join(t,"package.json")),a=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==a.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));i=a.data}Object.assign(i,{appId:n,extraParams:o});const a=new Xt(t,e,i);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}async loadScript(t){const e=t.repo,{name:n,appId:o,system:i,styles:a=[],extraParams:s={}}=t.config;let r="";if(r=Oo.join(e,i),r){if(this.cache.has(r))return;const t="FULLCODE"===ibiz.env.runContainer&&o!==ibiz.env.appId?ibiz.hub.microAppConfigCenter.getPluginBaseUrl(o):ibiz.env.pluginBaseUrl;let i=null;const l=this.parseUrl(r,t),c=("string"==typeof a?[a]:a).map((n=>this.parseUrl(No.join(e,n),t)));if(System.addImportMap({imports:{[n]:l},styles:{[n]:c}}),i=await System.import(n),!i)throw new F(ibiz.i18n.t("vue3Util.plugin.fileContentFormat"));if(!i.default)throw new F(ibiz.i18n.t("vue3Util.plugin.failedRemotePluginLoad"));this.setPluginCode(i.default,s),this.cache.set(r,!0)}}parseUrl(t,e=ibiz.env.pluginBaseUrl){if(this.urlReg.test(t))return t;let n="";n=this.urlReg.test(e)?t.startsWith("/")?e+t:"".concat(e,"/").concat(t):"".concat(Oo.join(e,t));const{origin:o,pathname:i}=window.location;return i.endsWith("/")&&n.startsWith("/")&&(n=n.substring(1)),!1===this.urlReg.test(n)&&(n="".concat(o).concat(i).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 o=n[e],i=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==i.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));const a=i.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 o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.imports){const e=t.imports;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.styles){const e=t.styles;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]="string"==typeof o?this.parseUrl(o,t.baseUrl):o.map((e=>this.parseUrl(e,t.baseUrl)))}}return t}return null}});class So{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function Ao(){return{value:String,controller:new So(Object),data:new So(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function To(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}}function zo(){return{hasError:{type:Boolean}}}function _o(){return{...Ao(),value:[String,Number]}}function Ro(){return{...Ao(),value:[String,Number,Object,Array]}}function Lo(){return{...Ao(),value:[String,Number]}}function ko(){return{...Ao(),value:[String,Number]}}function Bo(){return{...Ao(),value:[String,Number]}}function Mo(){return{...Ao(),value:[String,Array,Object,Number]}}function jo(){return{...Ao(),value:[String,Number]}}function Vo(){return{...Ao(),value:[String,Number]}}function Uo(){return{...Ao(),value:{type:Object}}}function Wo(){return{...Ao(),value:[String,Number]}}function Fo(){return{...Ao(),value:[String,Number]}}function qo(){return{...Ao(),value:[String,Number]}}function Go(){return{...Ao(),value:[String,Number]}}function $o(){return{...Ao(),value:[String,Number,Array]}}function Ho(){return{...Ao(),value:[String,Number]}}function Ko(){return{...Ao(),value:[String,Number]}}function Xo(){return{...Ao(),value:[String,Number]}}function Qo(){return{...Ao(),value:String}}function Yo(){return{...Ao(),value:[String,Number]}}function Jo(){return{...Ao(),value:String,language:{type:String},theme:{type:String}}}function Zo(){return{...Ao(),value:String}}function ti(){return{...Ao(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function ei(){return{...Ao(),value:[Array,Array]}}function ni(){return{...Ao(),value:String}}function oi(){return{...Ao(),value:String}}function ii(){return{...Ao(),value:String}}function ai(){return{...Ao(),value:Number}}function si(){return{...Ao(),value:String}}t("RequiredProp",So);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 +1 @@
1
- {"version":3,"file":"panel-container.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-container/panel-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAS,MAAM,KAAK,CAAC;AAEjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,cAAc;IAGvB;;OAEG;;;;;IAEH;;OAEG;;;;;;;;;IANH;;OAEG;;;;;IAEH;;OAEG;;;;;YAuGL,CAAC"}
1
+ {"version":3,"file":"panel-container.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-container/panel-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAS,MAAM,KAAK,CAAC;AAEjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,cAAc;IAGvB;;OAEG;;;;;IAEH;;OAEG;;;;;;;;;IANH;;OAEG;;;;;IAEH;;OAEG;;;;;YAqGL,CAAC"}
@@ -92,9 +92,7 @@ const PanelContainer = /* @__PURE__ */ defineComponent({
92
92
  }
93
93
  return createVNode("div", {
94
94
  "class": this.classArr,
95
- "onClick": () => {
96
- this.controller.onClick();
97
- }
95
+ "onClick": (event) => this.controller.onClick(event)
98
96
  }, [this.controller.model.cssStyle ? createVNode("style", {
99
97
  "type": "text/css"
100
98
  }, [this.controller.model.cssStyle]) : null, content]);
@@ -1 +1 @@
1
- {"version":3,"file":"panel-container-image.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-container-image/panel-container-image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAS,MAAM,KAAK,CAAC;AAGjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,8BAA8B,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAG5B;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;;IATH;;OAEG;;;;;IAKH;;OAEG;;;;;YAmFL,CAAC"}
1
+ {"version":3,"file":"panel-container-image.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-container-image/panel-container-image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAS,MAAM,KAAK,CAAC;AAGjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,8BAA8B,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAG5B;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;;IATH;;OAEG;;;;;IAKH;;OAEG;;;;;YAiFL,CAAC"}
@@ -87,9 +87,7 @@ const PanelContainerImage = /* @__PURE__ */ defineComponent({
87
87
  });
88
88
  return createVNode("div", {
89
89
  "class": this.classArr,
90
- "onClick": () => {
91
- this.controller.onClick();
92
- },
90
+ "onClick": (event) => this.controller.onClick(event),
93
91
  "style": this.backgroundStyle
94
92
  }, [this.controller.model.cssStyle ? createVNode("style", {
95
93
  "type": "text/css"
@@ -1 +1 @@
1
- {"version":3,"file":"panel-ctrl-view-page-caption.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6B,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE1D,OAAO,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAE/F;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;IAGjC;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;IATH;;OAEG;;;;;IAKH;;OAEG;;;;;YA4CL,CAAC"}
1
+ {"version":3,"file":"panel-ctrl-view-page-caption.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6B,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE1D,OAAO,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAE/F;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;IAGjC;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;IATH;;OAEG;;;;;IAKH;;OAEG;;;;;YA0CL,CAAC"}
@@ -45,9 +45,7 @@ const PanelCtrlViewPageCaption = /* @__PURE__ */ defineComponent({
45
45
  }
46
46
  return createVNode("div", {
47
47
  "class": this.classArr,
48
- "onClick": () => {
49
- this.controller.onClick();
50
- }
48
+ "onClick": (event) => this.controller.onClick(event)
51
49
  }, [editor]);
52
50
  }
53
51
  });
@@ -1 +1 @@
1
- {"version":3,"file":"panel-field.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-field/panel-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAA6B,QAAQ,EAAuB,MAAM,KAAK,CAAC;AAE/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,oBAAoB,CAAC;AAE5B;;;;GAIG;AACH,eAAO,MAAM,UAAU;IAGnB;;OAEG;;;;;IAEH;;OAEG;;;;;IAKH;;OAEG;;;;;;;;yBAqByB,OAAO,SAAS,MAAM,KAAG,IAAI;;IAlCzD;;OAEG;;;;;IAEH;;OAEG;;;;;IAKH;;OAEG;;;;;YA4EL,CAAC"}
1
+ {"version":3,"file":"panel-field.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-field/panel-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAA6B,QAAQ,EAAuB,MAAM,KAAK,CAAC;AAE/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,oBAAoB,CAAC;AAE5B;;;;GAIG;AACH,eAAO,MAAM,UAAU;IAGnB;;OAEG;;;;;IAEH;;OAEG;;;;;IAKH;;OAEG;;;;;;;;yBAqByB,OAAO,SAAS,MAAM,KAAG,IAAI;;IAlCzD;;OAEG;;;;;IAEH;;OAEG;;;;;IAKH;;OAEG;;;;;YA0EL,CAAC"}
@@ -80,9 +80,7 @@ const PanelField = /* @__PURE__ */ defineComponent({
80
80
  }
81
81
  return createVNode("div", {
82
82
  "class": this.classArr,
83
- "onClick": () => {
84
- this.controller.onClick();
85
- }
83
+ "onClick": (event) => this.controller.onClick(event)
86
84
  }, [editor, this.controller.state.error && createVNode("div", {
87
85
  "class": this.ns.e("error")
88
86
  }, [this.controller.state.error])]);
@@ -1 +1 @@
1
- {"version":3,"file":"panel-item-render.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-item-render/panel-item-render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,eAAe;IAGxB;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;;IATH;;OAEG;;;;;IAKH;;OAEG;;;;;YAsCL,CAAC"}
1
+ {"version":3,"file":"panel-item-render.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-item-render/panel-item-render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,eAAe;IAGxB;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;;IATH;;OAEG;;;;;IAKH;;OAEG;;;;;YA4CL,CAAC"}
@@ -45,7 +45,8 @@ const PanelItemRender = /* @__PURE__ */ defineComponent({
45
45
  render() {
46
46
  return createVNode("div", {
47
47
  "class": this.classArr,
48
- "innerHTML": this.htmlCode
48
+ "innerHTML": this.htmlCode,
49
+ "onClick": (event) => this.controller.onClick(event)
49
50
  }, null);
50
51
  }
51
52
  });
@@ -1 +1 @@
1
- {"version":3,"file":"panel-rawitem.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-rawitem/panel-rawitem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAa,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAA6B,QAAQ,EAAE,GAAG,EAAc,MAAM,KAAK,CAAC;AAE3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,sBAAsB,CAAC;AAE9B;;;;GAIG;AACH,eAAO,MAAM,YAAY;IAGrB;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;;;IATH;;OAEG;;;;;IAKH;;OAEG;;;;;YAqFL,CAAC"}
1
+ {"version":3,"file":"panel-rawitem.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-rawitem/panel-rawitem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAa,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAA6B,QAAQ,EAAE,GAAG,EAAc,MAAM,KAAK,CAAC;AAE3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,sBAAsB,CAAC;AAE9B;;;;GAIG;AACH,eAAO,MAAM,YAAY;IAGrB;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;;;IATH;;OAEG;;;;;IAKH;;OAEG;;;;;YAiFL,CAAC"}
@@ -77,15 +77,12 @@ const PanelRawItem = /* @__PURE__ */ defineComponent({
77
77
  };
78
78
  },
79
79
  render() {
80
- if (!this.controller.state.visible) {
80
+ if (!this.controller.state.visible)
81
81
  return;
82
- }
83
82
  return createVNode("div", {
84
83
  "class": this.classArr,
85
84
  "style": this.tempStyle,
86
- "onClick": (event) => {
87
- this.controller.onClick(event);
88
- }
85
+ "onClick": (event) => this.controller.onClick(event)
89
86
  }, [createVNode(resolveComponent("iBizRawItem"), {
90
87
  "rawItem": this.modelData,
91
88
  "content": this.content
@@ -94,9 +94,7 @@ const PanelContainer = /* @__PURE__ */ vue.defineComponent({
94
94
  }
95
95
  return vue.createVNode("div", {
96
96
  "class": this.classArr,
97
- "onClick": () => {
98
- this.controller.onClick();
99
- }
97
+ "onClick": (event) => this.controller.onClick(event)
100
98
  }, [this.controller.model.cssStyle ? vue.createVNode("style", {
101
99
  "type": "text/css"
102
100
  }, [this.controller.model.cssStyle]) : null, content]);
@@ -89,9 +89,7 @@ const PanelContainerImage = /* @__PURE__ */ vue.defineComponent({
89
89
  });
90
90
  return vue.createVNode("div", {
91
91
  "class": this.classArr,
92
- "onClick": () => {
93
- this.controller.onClick();
94
- },
92
+ "onClick": (event) => this.controller.onClick(event),
95
93
  "style": this.backgroundStyle
96
94
  }, [this.controller.model.cssStyle ? vue.createVNode("style", {
97
95
  "type": "text/css"
@@ -47,9 +47,7 @@ const PanelCtrlViewPageCaption = /* @__PURE__ */ vue.defineComponent({
47
47
  }
48
48
  return vue.createVNode("div", {
49
49
  "class": this.classArr,
50
- "onClick": () => {
51
- this.controller.onClick();
52
- }
50
+ "onClick": (event) => this.controller.onClick(event)
53
51
  }, [editor]);
54
52
  }
55
53
  });
@@ -82,9 +82,7 @@ const PanelField = /* @__PURE__ */ vue.defineComponent({
82
82
  }
83
83
  return vue.createVNode("div", {
84
84
  "class": this.classArr,
85
- "onClick": () => {
86
- this.controller.onClick();
87
- }
85
+ "onClick": (event) => this.controller.onClick(event)
88
86
  }, [editor, this.controller.state.error && vue.createVNode("div", {
89
87
  "class": this.ns.e("error")
90
88
  }, [this.controller.state.error])]);
@@ -47,7 +47,8 @@ const PanelItemRender = /* @__PURE__ */ vue.defineComponent({
47
47
  render() {
48
48
  return vue.createVNode("div", {
49
49
  "class": this.classArr,
50
- "innerHTML": this.htmlCode
50
+ "innerHTML": this.htmlCode,
51
+ "onClick": (event) => this.controller.onClick(event)
51
52
  }, null);
52
53
  }
53
54
  });
@@ -79,15 +79,12 @@ const PanelRawItem = /* @__PURE__ */ vue.defineComponent({
79
79
  };
80
80
  },
81
81
  render() {
82
- if (!this.controller.state.visible) {
82
+ if (!this.controller.state.visible)
83
83
  return;
84
- }
85
84
  return vue.createVNode("div", {
86
85
  "class": this.classArr,
87
86
  "style": this.tempStyle,
88
- "onClick": (event) => {
89
- this.controller.onClick(event);
90
- }
87
+ "onClick": (event) => this.controller.onClick(event)
91
88
  }, [vue.createVNode(vue.resolveComponent("iBizRawItem"), {
92
89
  "rawItem": this.modelData,
93
90
  "content": this.content
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-util",
3
- "version": "0.7.41-alpha.22",
3
+ "version": "0.7.41-alpha.24",
4
4
  "description": "通用组件库(vue3)",
5
5
  "main": "lib/index.cjs",
6
6
  "types": "es/index.d.ts",
@@ -37,8 +37,8 @@
37
37
  "license": "MIT",
38
38
  "devDependencies": {
39
39
  "@ibiz-template/cli": "^0.3.23",
40
- "@ibiz-template/core": "^0.7.41-alpha.18",
41
- "@ibiz-template/runtime": "^0.7.41-alpha.22",
40
+ "@ibiz-template/core": "^0.7.41-alpha.23",
41
+ "@ibiz-template/runtime": "^0.7.41-alpha.24",
42
42
  "@ibiz-template/theme": "^0.7.39",
43
43
  "@ibiz/model-core": "^0.1.81",
44
44
  "@types/path-browserify": "^1.0.2",
@@ -67,5 +67,5 @@
67
67
  "vue": "^3.3.8",
68
68
  "vue-router": "^4.2.4"
69
69
  },
70
- "gitHead": "34c1dec787f553e73b173cc693284fc544c95c3a"
70
+ "gitHead": "e51539595d0917b47fc822f8315b5f524bf2e4f4"
71
71
  }