@ibiz-template/vue3-util 0.7.8 → 0.7.10

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-view-shell{position:relative;width:100%;height:100%}.ibiz-badge{display:inline-block;padding:3px 6px;line-height:1rem;color:#fff;background-color:var(--ibiz-badge-bg-color);border-radius:10px}.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-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-panel-container{width:100%;height:100%}.ibiz-panel-container>.ibiz-row{height:100%;overflow-x:hidden;overflow-y:auto}.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-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%}.ibiz-panel-field .ibiz-panel-field-content{line-height:inherit}.ibiz-panel-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width:100%}.ibiz-single-data-container{width:100%;height:100%}.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__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-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-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-teleport-placeholder{width:auto;height:auto}.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:2px;content:"";background-color:var(--el-border-color-light)}.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;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-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-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-control-shell{position:relative;width:100%;height:100%}.ibiz-view-shell{position:relative;width:100%;height:100%}.ibiz-badge{display:inline-block;padding:3px 6px;line-height:1rem;color:#fff;background-color:var(--ibiz-badge-bg-color);border-radius:10px}.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-code-list{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap}.ibiz-code-list__item{color:var(--ibiz-code-list-item-color);display:flex;align-items:center;justify-content:flex-start}.ibiz-code-list .ibiz-icon{display:inline-flex;padding-right:var(--ibiz-spacing-tight)}.ibiz-panel-ctrl-pos{width:100%;height:100%}.ibiz-panel-ctrl-pos.is-hidden{display:none}.ibiz-panel-container{width:100%;height:100%}.ibiz-panel-container>.ibiz-row{height:100%;overflow-x:hidden;overflow-y:auto}.ibiz-panel-container.is-hidden{display:none}.ibiz-nav-pos{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%}.ibiz-panel-field .ibiz-panel-field-content{line-height:inherit}.ibiz-panel-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width:100%}.ibiz-multi-data-container{width:100%;height:100%}.ibiz-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__left{overflow:auto}.ibiz-scroll-container-content__right{overflow:auto}.ibiz-scroll-container-header{overflow:auto}.ibiz-scroll-container-footer{overflow:auto}.ibiz-single-data-container{width:100%;height:100%}.ibiz-grid-container{--ibiz-grid-container-bg-color:var(--ibiz-bg-color-overlay);--ibiz-grid-container-padding:var(--ibiz-padding);width:100%;height:100%;overflow:auto}.ibiz-grid-container.is-hidden{display:none}.ibiz-panel-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;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-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-teleport-placeholder{width:auto;height:auto}.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:2px;content:"";background-color:var(--el-border-color-light)}.ibiz-view{--ibiz-view-bg-color:var(--ibiz-color-bg-1);--ibiz-view-border-radius:var(--ibiz-border-radius-medium);width:100%;height:100%}.ibiz-view .ibiz-view{background-color:var(--ibiz-view-bg-color);border-radius:var(--ibiz-view-border-radius)}.ibiz-view .ibiz-view-appportalview{background-color:rgba(0,0,0,0)}.ibiz-view.has-top-message,.ibiz-view.has-bottom-message{display:flex;flex-flow:column nowrap}.ibiz-view.has-top-message>.ibiz-view-message,.ibiz-view.has-bottom-message>.ibiz-view-message{flex-grow:0;flex-shrink:0}.ibiz-view.has-top-message>.ibiz-control-viewlayoutpanel,.ibiz-view.has-bottom-message>.ibiz-control-viewlayoutpanel{flex-grow:1;flex-shrink:1}.ibiz-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 +1 @@
1
- System.register(["qx-util","vue","@ibiz-template/core","ramda","vue-router","qs","@ibiz-template/runtime","pinia"],(function(t){"use strict";var e,n,o,a,r,s,i,l,c,u,d,p,h,m,f,g,v,y,w,C,b,I,P,D,E,O,N,A,S,x,T,R,z,B,j,V,L,M,k,_,G,W,q,$,U,F,K,H,X,Q,J,Y,Z,tt,et,nt,ot,at,rt,st,it,lt,ct,ut,dt,pt,ht,mt,ft,gt,vt,yt,wt,Ct,bt,It,Pt,Dt,Et,Ot,Nt,At,St,xt,Tt,Rt;return{setters:[function(t){e=t.SyncSeriesHook,n=t.isFunc,o=t.notNilEmpty,a=t.QXEvent,r=t.clearAll,s=t.createUUID},function(t){i=t.watch,l=t.onBeforeUnmount,c=t.createCommentVNode,u=t.getCurrentInstance,d=t.isReactive,p=t.toRaw,h=t.inject,m=t.reactive,f=t.onActivated,g=t.onDeactivated,v=t.ref,y=t.h,w=t.resolveComponent,C=t.provide,b=t.onMounted,I=t.onUnmounted,P=t.defineComponent,D=t.computed,E=t.createVNode,O=t.withDirectives,N=t.resolveDirective,A=t.isVNode,S=t.createTextVNode,x=t.Teleport,T=t.renderSlot},function(t){R=t.onClickOutside,z=t.NOOP,B=t.listenJSEvent,j=t.Namespace,V=t.RuntimeError,L=t.isBase64Image,M=t.isSvg,k=t.IBizContext,_=t.ModelError,G=t.RuntimeModelError},function(t){W=t.isNil,q=t.isNotNil,$=t.isEmpty,U=t.mergeLeft},function(t){F=t.useRoute,K=t.useRouter,H=t.RouterView},function(t){X=t.default},function(t){Q=t.ViewType,J=t.RouteConst,Y=t.getMatchResPath,Z=t.calcDeCodeNameById,tt=t.ViewController,et=t.getControlProvider,nt=t.calcDynaSysParams,ot=t.getViewProvider,at=t.PanelItemState,rt=t.PanelItemController,st=t.registerPanelItemProvider,it=t.Modal,lt=t.ViewMode,ct=t.OpenAppViewCommand,ut=t.getEditorProvider,dt=t.PanelItemEventName,pt=t.getAllPanelField,ht=t.isDataContainer,mt=t.getPanelItemProvider,ft=t.PanelData,gt=t.PanelNotifyState,vt=t.execDELogicById,yt=t.ScriptFactory,wt=t.toLocalOpenWFRedirectView,Ct=t.getControlsByView,bt=t.getCtrlTeleportParams,It=t.getErrorViewProvider,Pt=t.AppDataUploadViewController,Dt=t.registerViewProvider,Et=t.getDERedirectToView,Ot=t.ViewLayoutPanelController,Nt=t.registerControlProvider,At=t.ControlType,St=t.PanelController,xt=t.RemotePluginItem},function(t){Tt=t.defineStore,Rt=t.createPinia}],execute:function(){t({calcResRoutePath:Kt,createOverlayView:Yt,generateRoutePath:async function(t,e,n,o){const a=qt(e);let r=n.srfdefaulttoroutedepth||2;n.toRouteDepth?(r=n.toRouteDepth,n.toRouteDepth=void 0):ibiz.env.isMob&&(a.pathNodes[0]={viewName:"home"});if(a.pathNodes.splice(r-1,a.pathNodes.length-r+1),n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}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:Ut(n),params:o}),2===r&&(await Kt(a,n,t.appDataEntityId,t.appId),Ft.includes(t.viewType))){const e=Z(t.appDataEntityId);delete a.pathNodes[0].context[e]}return{path:$t(a)}},generateRoutePathByModal:async function(t,e,n,o){const a=qt(e),r=a.pathNodes.findIndex((t=>t.viewName===J.ROUTE_MODAL_TAG));-1!==r&&(a.pathNodes=a.pathNodes.slice(0,r));if(n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}return a.pathNodes.push({viewName:"".concat(J.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:Ut(n),params:o}),{path:$t(a)}},getArrayProps:so,getAutoCompleteProps:no,getCascaderProps:io,getCheckboxListProps:Wn,getCheckboxProps:qn,getCodeProps:oo,getColorPickerProps:lo,getDataPickerProps:$n,getDatePickerProps:Un,getDateRangeProps:Fn,getDrawerPlacement:function(t){return Zt[t]||"right"},getDropdownProps:Gn,getEditorEmits:function(){return{change:(t,e)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}},getEditorProps:jn,getGridArrayProps:function(){return{...so(),...Vn()}},getGridAutoCompleteProps:function(){return{...no(),...Vn()}},getGridCascaderProps:function(){return{...io(),...Vn()}},getGridCheckboxListProps:function(){return{...Wn(),...Vn()}},getGridCheckboxProps:function(){return{...qn(),...Vn()}},getGridCodeProps:function(){return{...oo(),...Vn()}},getGridColorPickerProps:function(){return{...lo(),...Vn()}},getGridDataPickerProps:function(){return{...$n(),...Vn()}},getGridDatePickerProps:function(){return{...Un(),...Vn()}},getGridDateRangeProps:function(){return{...Fn(),...Vn()}},getGridDropdownProps:function(){return{...Gn(),...Vn()}},getGridEditorCommonProps:Vn,getGridEditorEmits:function(){return{change:(t,e)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...ao(),...Vn()}},getGridInputIpProps:function(){return{...kn(),...Vn()}},getGridInputNumberProps:function(){return{...Mn(),...Vn()}},getGridInputProps:function(){return{...Ln(),...Vn()}},getGridListBoxProps:function(){return{...Kn(),...Vn()}},getGridMarkDownProps:function(){return{...ro(),...Vn()}},getGridNumberRangeProps:function(){return{...Hn(),...Vn()}},getGridRadioProps:function(){return{...Xn(),...Vn()}},getGridRateProps:function(){return{...Qn(),...Vn()}},getGridRawProps:function(){return{...Jn(),...Vn()}},getGridSliderProps:function(){return{...Yn(),...Vn()}},getGridSpanProps:function(){return{..._n(),...Vn()}},getGridStepperProps:function(){return{...Zn(),...Vn()}},getGridSwitchProps:function(){return{...to(),...Vn()}},getGridUploadProps:function(){return{...eo(),...Vn()}},getHtmlProps:ao,getInputIpProps:kn,getInputNumberProps:Mn,getInputProps:Ln,getListBoxProps:Kn,getMarkDownProps:ro,getNestedRoutePath:Ht,getNumberRangeProps:Hn,getOrigin:Vt,getOwnRouteContext:Ut,getRadioProps:Xn,getRateProps:Qn,getRawProps:Jn,getSliderProps:Yn,getSpanProps:_n,getStepperProps:Zn,getSwitchProps:to,getUploadProps:eo,isEmptyVNode:function(t){if(!Array.isArray(t))return t===Mt;return 1===t.length&&t[0]===Mt},onRouteChange:function(t,e){const n=F();if(!n)throw new V("无法正确获取route,可能是依赖问题");i((()=>null==n?void 0:n.path),(()=>{const o=Ht(n,e);t({currentKey:o,fullPath:n.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(Yt(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(Yt(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(Yt(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(Yt(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var a;const r=qt(t,n);let s=r.pathNodes[e-1].viewName;if(!s)throw new V("第".concat(e,"级路由不存在视图标识"));s===J.ROUTE_MODAL_TAG&&(s=r.pathNodes[e].viewName);"index"===s&&(s=ibiz.hub.defaultAppIndexViewName);const i=await ibiz.hub.config.view.get(s);if(!i)throw new V("找不到视图".concat(s));const l={};(null==(a=ibiz.appData)?void 0:a.context)&&Object.assign(l,ibiz.appData.context);r.appContext&&Object.assign(l,r.appContext);if(1!==e)for(let t=0;t<e;t++){const e=r.pathNodes[t];o(e.context)&&Object.assign(l,e.context)}const{params:c,srfnav:u}=r.pathNodes[e-1];return{viewConfig:i,context:l,params:c,srfnav:u}},prepareControl:function(t){const e=Wt("control"),{controlType:n,sysCss:o,codeName:a}=t.model,r=n.toLowerCase(),s=null==o?void 0:o.cssName,i=Wt("control-".concat(r)),l=[e.b(),e.b(r),e.m(a)];s&&l.push(s);return{controlClass:l,ns:i}},renderString:function(t){if(W(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,"转换成字符串失败",e)}return""},route2routePath:qt,routePath2string:$t,useClickOutside:Bt,useCodeListListen:function(t,e,n){let o;b((async()=>{if(t){const a=await ibiz.hub.getApp(e);o=await a.codeList.getCodeListInstance(t),o&&o.onChange(n)}})),I((()=>{o&&o.offChange(n)}))},useControlController:_t,useController:function(t){t.force=Lt()},useCtx:kt,useEventListener:Gt,useFocusAndBlur:function(t,e){const n=v(),o=v(!1);let a;const r=()=>{o.value||ibiz.log.debug("没有聚焦,不触发失焦"),e(),a.stop(),o.value=!1};return Gt(n,"click",(e=>{o.value||(a=Bt(n,(()=>{r()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:r,pause:()=>{a&&a.pause()},stop:()=>{a&&a.stop()}}},useForce:Lt,useForceTogether:function(t,e){const n=e.force,o=Lt();e.force=t=>{n(t),o()}},useMobCtx:function(){return h("ctx")},useNamespace:Wt,useProps:jt,usePropsWatch:function(t,e,n){const o=jt();Object.prototype.hasOwnProperty.call(o,t)&&(i((()=>o[t]),((t,n)=>{e(Vt(t),Vt(n))}),n),e(Vt(o[t]),void 0))},useRouteKey:function(t,e,n){n||(n=v(""));n.value=t.value;const o=new Xt(e);return i(t,((t,e)=>{t!==e&&o.nextChange((()=>{n.value=t}))})),n},useRouterQuery:function(){const t=F(),{query:e}=t;return e},useViewController:ee});class zt{}function Bt(t,e,n={}){let o=z,a=z,r=z;const s=()=>{o(),o=z,a=z,r=z};return i(t,((t,i)=>{if(t!==i)if(W(t))s();else{const s=R((null==t?void 0:t.$el)||t,e,n);o=s.stop,a=s.pause,r=s.proceed}}),{immediate:!0}),l((()=>{o!==z&&s()})),{stop:()=>o(),pause:()=>a(),proceed:()=>r()}}function jt(){return u().proxy.$props}function Vt(t){return d(t)?p(t):t}function Lt(){const t=u().proxy;return e=>{t.$forceUpdate(),e&&n(e)&&t.$nextTick((()=>{e()}))}}t("AppHooks",zt),zt.createApp=new e,zt.useComponent=new e;const Mt=t("EmptyVNode",c("EmptyVNode"));function kt(){return h("ctx")}function _t(t,e){const n=kt(),o=jt();n.evt.emit("onForecast",o.modelData.name);const a=o.provider;let r;r=(null==a?void 0:a.createController)?a.createController(o.modelData,o.context,o.params,n):t(o.modelData,o.context,o.params,n),function(t,e){i((()=>({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("".concat(e.model.id,"的上下文或视图参数变更:"),t)}))}(o,r),function(t,e,n=[]){const o=["context","params","modelData",...n];i((()=>{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("部件 [".concat(e.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{void 0!==o[t]&&(e.state[t]=o[t])}))}),{immediate:!0})}(o,r,null==e?void 0:e.excludePropsKeys),r.state=m(r.state),f((()=>r.onActivated())),g((()=>r.onDeactivated())),r.force=Lt();const s=u().proxy;return r.evt.onAll(((t,e)=>{s.$emit(t.slice(2),e)})),s.$emit("controllerAppear",r),r.created(),l((()=>r.destroyed())),r}function Gt(t,e,n,o={}){let a=z;return i(t,((t,r)=>{t!==r&&(W(t)?(a(),a=z):a=B((null==t?void 0:t.$el)||t,e,n,o))}),{immediate:!0}),l((()=>{a!==z&&a()})),()=>{a()}}function Wt(t){return new j(t,ibiz.env.namespace)}function qt(t,e=!1){const n=t.matched.length;let o=t.path;e&&(o=o.replace(new RegExp("/".concat(J.ROUTE_MODAL_TAG),"g"),""));const a=o.split("/"),r=[];for(let e=1;e<=n;e++){const n=a[2*e],o=t.params["params".concat(e)];let s,i,l;s=o&&o!==ibiz.env.routePlaceholder?X.parse(o,{strictNullHandling:!0,delimiter:";"}):void 0,s&&(1===e?(i=s,s=void 0):(s.srfnavctx&&(i=JSON.parse(decodeURIComponent(s.srfnavctx)),delete s.srfnavctx),s.srfnav&&(l=s.srfnav,delete s.srfnav))),r.push({viewName:n,context:i,params:s,srfnav:l})}let s;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(s=X.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:s,pathNodes:r}}function $t(t){let e="";return t.appContext?e+="/".concat(X.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach(((t,n)=>{e+="/".concat(t.viewName,"/");let a={};if(0===n)o(t.context)&&(a=t.context);else{if(a=o(t.params)?t.params:{},o(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(a.srfnavctx=encodeURIComponent(e))}t.srfnav&&(a.srfnav=t.srfnav)}const r=X.stringify(a,{delimiter:";",strictNullHandling:!0,skipNulls:!0});o(r)?e+=r:e+=ibiz.env.routePlaceholder})),e}function Ut(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];return Object.keys(e).forEach((t=>{n.includes(t)&&delete e[t]})),e}const Ft=t("excludeViewTypes",[Q.DE_GRID_VIEW,Q.DE_GRID_EXP_VIEW,Q.DE_LIST_VIEW,Q.DE_LIST_EXP_VIEW,Q.DE_DATA_VIEW,Q.DE_DATAVIEW_EXP_VIEW,Q.DE_CALENDAR_VIEW,Q.DE_CALENDAR_EXP_VIEW,Q.DE_CHART_VIEW,Q.DE_CHART_EXP_VIEW,Q.DE_KANBAN_VIEW]);async function Kt(t,e,n,o){if(n){const a=await ibiz.hub.getAppDataEntity(n,o);let r=Y(e,a);if(r||(r={path:"",keys:[a.codeName.toLowerCase()]}),r){const n=t.pathNodes[1].context,o={};r.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 Ht(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=qt(t);return o.pathNodes.length<e?t.path:(o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e)),n&&delete o.pathNodes[e-1].srfnav,$t(o))}class Xt{constructor(t,e){this.callbacks=[],this.timers=[],this.wait=500,e&&(this.wait=e),i((()=>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",Xt);const Qt=t("withInstall",((t,e)=>(t.install=t=>{e(t)},t)));class Jt{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 V("没有注入createVueApp方法")}init(){const t=this,{render:e,opts:n}=this,o=document.createElement("div");document.body.appendChild(o);const a=Jt.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>y(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",Jt);function Yt(t){return e=>{const n=w("IBizViewShell");return y(n,{...t,modal:e})}}t("OverlayPopoverContainer",class extends Jt{present(t){return this.modal.present(t)}});const Zt={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class te{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 a=e;if(this.map.has(a)){return this.map.get(a).onWillDismiss()}const r=new te(o,a);return this.map.set(a,r),this.scheduledDestruction(r),r.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",Tt("appStore",(()=>({appStore:m({})}))));t("useUIStore",Tt("uiStore",(()=>{const t=function(){const t=v(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}();return{UIStore:m({zIndex:t.zIndex,theme:"light"}),zIndex:t}}))),t("piniaInstance",Rt());function ee(t){const e=jt(),n=h("ctx",void 0);null==n||n.evt.emit("onForecast",e.modelData.name);const o=e.provider;let a;a=(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(a.id,a),function(t,e){i((()=>({context:t.context,params:t.params})),(t=>{e.context.reset({},t.context),r(e.params),Object.assign(e.params,t.params),e.handleContextParams(),ibiz.log.debug("".concat(e.model.id,"的上下文或视图参数变更:"),t)}))}(e,a),function(t,e){i((()=>t.state?{...t.state}:{}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug("视图 [".concat(e.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{e.state[t]=o[t]}))}),{immediate:!0})}(e,a),C("ctx",a.ctx),a.state=m(a.state),a.slotProps=m(a.slotProps),e.modal&&(a.modal=e.modal),f((()=>{a.onActivated(),ibiz.util.viewStack.active(a.id)})),g((()=>{a.onDeactivated(),ibiz.util.viewStack.deactivate(a.id)})),a.force=Lt();const s=u().proxy;return a.evt.onAll(((t,e)=>{s.$emit(t.slice(2),e)})),a.created(),l((()=>{a.destroyed(),ibiz.util.viewStack.remove(a.id)})),a}t("IBizIcon",P({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=Wt("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=D((()=>function(t){if(t){if(t.htmlStr)return E("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")?E("i",{class:[e.b(),t.cssClass]},null):E("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return L(t.imagePath)?E("img",{class:e.b(),src:t.imagePath},null):M(t.imagePath)?E("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?E("img",{class:e.b(),src:t.imagePath},null):E("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?E("img",{class:e.b(),src:t.imagePath},null):E("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return M(t.rawContent)?E("div",{class:e.b(),innerHTML:t.rawContent},null):E("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}})),t("IBizRouterView",P({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:e}){const n={};let o=!0;i((()=>t.manualKey),((t,e)=>{q(t)&&t!==e&&(o=!0)}));return{renderComp:(a,r)=>{if(!o)return n.vNode;if(o=!1,a){const o={...a.props};delete o.onVnodeUnmounted,delete o.ref;const r=y(a.type,{...o,...e,key:t.manualKey});return n.vNode=r,r}}}},render(){return E(w("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",P({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=Wt("control"),{controlType:n,sysCss:o,codeName:a}=t.controller.model,r=n.toLowerCase(),s=null==o?void 0:o.cssName,i=t.controller.model,l=t.controller.model.controls,c=m({});return!1===i.controlType.endsWith("EXPBAR")&&(W(i.width)||(i.width>0&&i.width<=1?c.width="".concat(100*i.width,"%"):c.width="".concat(i.width,"px")),W(i.height)||(i.height>0&&i.height<=1?c.width="".concat(100*i.height,"%"):c.height="".concat(i.height,"px"))),{ns:e,typeClass:r,sysCssName:s,inlineStyle:c,codeName:a,controls:l,onLayoutPanelCreated:e=>{t.controller.setLayoutPanel(e)}}},render(){var t,e,n;const{state:o,controlPanel:a,providers:r}=this.controller;let s=null;if(o.isCreated&&a){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},a=e[n];e[n]=a?()=>a(o):()=>{const e=w("IBizControlShell");return y(e,{modelData:t,...o})}}));const n=r[a.name];s=y(w(n.component),{modelData:a,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return E("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName],style:this.inlineStyle},[s||(null==(n=(e=this.$slots).default)?void 0:n.call(e))])}})),t("IBizControlShell",P({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){const e=h("ctx");if(e)e.evt.emit("onForecast",t.modelData.name);else{const t={name:"AppView",id:"AppView",viewType:Q.DE_CUSTOM_VIEW,appId:ibiz.env.appId};C("ctx",new tt(t,k.create({})).ctx)}const n=v(!1),o=v(""),a=v();et(t.modelData).then((t=>{t?a.value=t:o.value="未找到对应部件的适配器",n.value=!0})).catch((t=>{ibiz.log.error(t),o.value=t.message,n.value=!0}));return{ns:Wt("control-shell"),isComplete:n,errMsg:o,provider:a}},render(){return this.isComplete&&this.provider?y(w(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):O(E("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[N("loading"),!this.isComplete]])}})),t("IBizViewShell",P({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(t){const e=Wt("view-shell"),n=v(!1),o=v(""),a=v(),r=v();return(async()=>{let e;if(e=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId),!e)throw new V("未找到视图模型");if(1===e.dynaSysMode){const n=e.appDataEntityId;if(!n)throw new V("".concat(e.codeName,"无实体,暂不支持加载动态模型"));const o=t.params||{},a=await nt(n,t.context,{viewParams:o,appId:e.appId});if(o.srfdatatype&&(a.srfdatatype=o.srfdatatype),o.srfwftag)a.srfwftag=o.srfwftag;else if(n&&e.enableWF){const o={...t.context};if(a.srfkey){const r=W(t.context.srfsessionid)||$(t.context.srfsessionid),i=s();if(r){const t=ibiz.uiDomainManager.create(i);o.srfsessionid=t.id}const l=ibiz.hub.getApp(e.appId),c=await l.deService.getService(t.context,n),u=await c.get(o,t.params||{});if(u.ok&&u.data){const{srfwftag:n,processdefinitionkey:o,taskdefinitionkey:r}=u.data;if(n&&(a.srfwftag=n),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW"].includes(e.viewType)){const e=t.params;W(e.processDefinitionKey)&&(e.processDefinitionKey=o),W(e.taskDefinitionKey)&&(e.taskDefinitionKey=r)}}r&&ibiz.uiDomainManager.destroy(i)}}r.value=await ibiz.hub.loadAppView(e.appId,e.id,a)}else r.value=e;try{a.value=await ot(e)}catch(t){ibiz.log.error(t),o.value=t.message}finally{n.value=!0}})(),{ns:e,isComplete:n,errMsg:o,viewModelData:r,provider:a}},render(){return this.isComplete&&this.provider?y(w(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots):O(E("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[N("loading"),!this.isComplete]])}})),t("IBizCodeList",P({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]}},emits:{infoTextChange:t=>!0},setup(t,{emit:e}){var n,o;const a=Wt("code-list"),r=v([]),s=(null==(n=t.codeList)?void 0:n.textSeparator)||"、",l=(null==(o=t.codeList)?void 0:o.valueSeparator)||",";i(r,(t=>{let n="";t.length>0&&(n=t.map((t=>t.text)).join(s)),e("infoTextChange",n)}));const c=(t,e)=>{if(t){const n=t.find((t=>t.value==e));if(n)return n;for(let n=0;n<t.length;n++){const o=c(t[n].children,e);if(o)return o}}};i([()=>t.codeListItems,()=>t.value],(([t,e],[n,o])=>{if(W(e)||""===e)r.value=[];else{const n="string"==typeof e?e.split(l):[e];r.value=n.map((e=>{const n=c(t,e);return{text:(null==n?void 0:n.text)||e,color:null==n?void 0:n.color,textCls:null==n?void 0:n.textCls,sysImage:null==n?void 0:n.sysImage}}))}}),{immediate:!0});const u="未定义"===t.codeList.emptyText?"- - -":t.codeList.emptyText;return{items:r,ns:a,emptyText:u,textSeparator:s}},render(){return E("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,E("span",{class:[this.ns.e("item"),t.textCls?t.textCls:null],style:t.color?this.ns.cssVarBlock({"item-color":"".concat(t.color)}):null},[t.sysImage&&E(w("iBizIcon"),{icon:t.sysImage},null),t.text])]))])}})),t("ControlLoadingPlaceholder",P({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(h("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null})),t("IBizBadge",P({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"}},setup:()=>({ns:Wt("badge")}),render(){return E("div",{class:[this.ns.b(),this.ns.m(this.type)]},[this.value])}}));class ne extends at{}t("PanelContainerState",ne);class oe extends rt{createState(){var t;return new ne(null==(t=this.parent)?void 0:t.state)}}function ae(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("PanelContainerController",oe);const re=P({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup(t){const e=Wt("panel-container"),{id:n}=t.modelData,o=D((()=>{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;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=E(w("iBizRow"),{slot:"content",layout:this.modelData.layout},ae(n=o.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},ae(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return E("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?E("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class se{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new oe(t,e,n);return await o.init(),o}}t("IBizPanelContainer",Qt(re,(function(t){t.component(re.name,re),st("CONTAINER",(()=>new se)),st("CONTAINER_DEFAULT",(()=>new se))})));const ie=P({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){h("ctx").evt.on("onRegister",((e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}));return{ns:Wt("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),E("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!t.visible)]},[e||(ibiz.env.dev?"未提供".concat(this.modelData.id,"插槽"):"")])}});class le extends rt{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",le);class ce{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new le(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",Qt(ie,(function(t){t.component(ie.name,ie),st("CTRLPOS",(()=>new ce))})));class ue extends rt{}function de(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("ScrollContainerItemController",ue);const pe=t("ScrollContainerItem",P({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:ue,required:!0}},setup(t){const e=Wt("scroll-container-item"),{id:n}=t.modelData,o=D((()=>[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 E(w("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},de(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},de(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class he{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new ue(t,e,n);return await o.init(),o}}class me extends rt{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",me);const fe=t("ScrollContainer",P({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:me,required:!0}},setup(t){const e=Wt("scroll-container"),{id:n}=t.modelData,o=D((()=>[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,a=null,r=null,s=null;const i={};((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,i.left={width:l};break;case"EAST":a=t,i.right={width:l};break;case"NORTH":o=t,i.top={height:c};break;case"SOUTH":r=t,i.bottom={height:c};break;case"CENTER":s=t;break;default:ibiz.log.debug("未适配的布局占位".concat(e.modelData.layoutPos.layoutPos))}}));for(const t in i)(i[t].width||i[t].height)&&(i[t].flexShrink=0);return E("div",{class:this.classArr},[E("div",{class:[this.ns.e("header")],style:i.top},[o]),E("div",{class:[this.ns.b("content")]},[E("div",{class:this.ns.be("content","left"),style:i.left},[n]),E("div",{class:this.ns.be("content","center")},[s]),E("div",{class:this.ns.be("content","right"),style:i.right},[a])]),E("div",{class:[this.ns.e("footer")],style:i.bottom},[r])])}}));class ge{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new me(t,e,n);return await o.init(),o}}t("IBizScrollContainer",Qt(fe,(function(t){t.component(fe.name,fe),t.component(pe.name,pe),st("CONTAINER_CONTAINER_SCROLL",(()=>new ge)),st("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new he)),st("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new he)),st("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new he)),st("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new he)),st("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new he))})));class ve extends at{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={}}}t("NavPosState",ve);const ye=["is404","isRoutePushed"];class we extends rt{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={}}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;"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 ve(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]?(U(this.state.navViewMsgs[e],t),ye.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 it({mode:this.routeDepth?lt.ROUTE:lt.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){ibiz.log.debug(this.constructor.name,"onViewCreated",t)}toBlankRoute(){const t=Ht(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)}openViewByPath(t){var e,n,o;const a=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=a,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const n=Ht(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});this.getExpItemIsCache(t)&&this.state.cacheKeys.push(a),ibiz.commands.execute(ct.TAG,t.viewId,e,t.params,{openMode:"INDEXVIEWTAB",replace:!this.state.currentKey,...t.modalOptions})}}openViewByModel(t){this.setNavViewMsgs(t),this.state.currentKey=this.calcCacheKey(t)}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;o(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}}function Ce(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("NavPosController",we);const be=P({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:we,required:!0}},setup(t){const e=t.controller,n=Wt("nav-pos"),o=K(),a=F(),r=v(!1);if(e.setRouter(o),e.routeDepth){const t=Ht(a,e.routeDepth);i((()=>a.fullPath),(()=>{const n=Ht(a,e.routeDepth);if(t===n&&a.matched.length>e.routeDepth){if(a.matched.length===e.routeDepth+1&&(r.value=!!a.name,r.value))return;e.onRouteChange(a)}}),{immediate:!0})}return{ns:n,c:e,isPresetView:r,onViewCreated:t=>{e.onViewCreated(t)}}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:o,navViewMsgs:a,cache:r}=e;let s=null;if(e.routeOpen){if(this.isPresetView)return E(H,null,null);s=E(w("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?E(t,null,null):null;return r?E(w("keepAlive"),{include:o,max:30,isKey:!0},Ce(e)?e:{default:()=>[e]}):e}})}else{const t=n?y(w("IBizViewShell"),{context:a[n].context,params:a[n].params,key:n,viewId:a[n].viewId,onCreated:this.onViewCreated}):null;s=r?E(w("keepAlive"),{include:o,max:30,isKey:!0},Ce(t)?t:{default:()=>[t]}):t}return E("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[s])}});class Ie{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new we(t,e,n);return await o.init(),o}}t("IBizNavPos",Qt(be,(function(t){t.component(be.name,be),st("RAWITEM_NAV_POS",(()=>new Ie))})));class Pe extends at{}class De extends rt{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 Pe(null==(t=this.parent)?void 0:t.state)}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 ut(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),this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:dt.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:dt.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:dt.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:dt.ENTER,event:t})}}t("PanelFieldController",De);const Ee=P({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:De,required:!0},attrs:{type:Object,require:!1}},setup(t){const e=Wt("panel-field"),n=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];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=w(this.controller.editorProvider.formEditor);t=y(n,{...e})}else t=E(w("not-supported-editor"),{modelData:this.modelData.editor},null)}return E("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t])}});class Oe{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new De(t,e,n);return await o.init(),o}}t("IBizPanelField",Qt(Ee,(function(t){t.component(Ee.name,Ee),st("FIELD",(()=>new Oe))})));class Ne extends rt{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}t("PanelRawItemController",Ne);const Ae=P({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:Ne,required:!0}},setup(t){const e=Wt("panel-rawitem"),n=t.controller,o=v(""),a=v(""),{rawItem:r}=t.modelData;r&&r.cssStyle&&(a.value=r.cssStyle);const s=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return i((()=>n.data),(async t=>{if(t){const e=n.model.rawItem;if(!e)return;let a;const r={...t};"RAW"===e.contentType?a=e.caption:"HTML"===e.contentType&&(a=e.content),a&&e.templateMode&&(a=await ibiz.util.hbs.render(a.replace("//n","\n"),Object.assign(r,{data:{...t}}))),o.value=a}}),{immediate:!0}),{ns:e,classArr:s,tempStyle:a,content:o}},render(){if(this.controller.state.visible)return E("div",{class:this.classArr,style:this.tempStyle,onClick:()=>{this.controller.onClick()}},[E(w("iBizRawItem"),{rawItem:this.modelData,content:this.content},null)])}});class Se{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new Ne(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",Qt(Ae,(function(t){t.component(Ae.name,Ae),st("RAWITEM",(()=>new Se)),st("RAWITEM_STATIC_IMAGE",(()=>new Se)),st("RAWITEM_STATIC_LABEL",(()=>new Se)),st("RAWITEM_STATIC_TEXT",(()=>new Se))})));class xe extends at{constructor(){super(...arguments),this.data={}}}class Te{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new xe,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const a=pt(this.model).map((t=>t.id));o._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])}))}get data(){return this.state.data}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,a;const r=this.parent.providers[t.id];if(!r)return;const s=await r.createController(t,e,n);this.panelItems[t.id]=s,(null==(o=t.panelItems)?void 0:o.length)&&!ht(t)?await this.initChildrenController(t.panelItems,e,s):(null==(a=t.panelTabPages)?void 0:a.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 Re extends at{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",Re);class ze extends rt{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new Re(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders(),this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map((async t=>{var e,n;const o=await mt(t,this.panel.model,this.panel.view.model);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!ht(t)&&await this.initPanelItemProviders(t.panelItems),(null==(n=t.panelTabPages)?void 0:n.length)&&await this.initPanelItemProviders(t.panelTabPages))})))}initContainerData(){const{dataSourceType:t,dataName:e}=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 G(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new G(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new _(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){this.dataItems.forEach((e=>{e.panelStateNotify(t)}))}async setData(t){const e=pt(this.model),n=t.map((t=>new ft(e,t)));this.dataItems=n.map((t=>new Te(this.model,this.panel,this,t))),this.dataItems.length&&await Promise.all(this.dataItems.map((t=>t.init()))),this.state.items=n,this.childrenStateNotify(gt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new G(this.model,"没有配置实体逻辑");if(!t)throw new G(this.model,"没有配置实体");const n=await vt(e,t,this.panel.context,[],this.panel.params);if(!n)throw new V("实体逻辑".concat(e,"没有返回值"));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error("全局变量里没有".concat(t,"属性"))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new G(this.model,"没有配置实体行为");if(!e)throw new G(this.model,"没有配置实体");const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error("绑定视图的会话不存在".concat(e));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error("视图state里没有".concat(e,"属性"))};n(),t.evt.on("onDataChange",(()=>{n()}))}setDataValue(t,e){throw new Error("Method not implemented.")}destroy(){super.destroy(),this.dataItems.forEach((t=>{t.destroy()}))}}t("MultiDataContainerController",ze);const Be=P({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:ze,required:!0}},setup(t){const e=Wt("multi-data-container"),{id:n}=t.modelData;i((()=>t.controller.state.items),(()=>{t.controller.dataItems.forEach((t=>{t.state=m(t.state);Object.keys(t.panelItems).forEach((e=>{const n=t.panelItems[e];n.state=m(n.state)}))}))}),{immediate:!0});const o=h("renderPanelItem"),a=D((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:a,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 E(w("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 E(w("iBizCol"),{layoutPos:t.layoutPos,state:o.state},"function"==typeof(a=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(a)&&!A(a)?e:{default:()=>[e]});var a}))]}})})),E("div",{class:this.classArr},[t])}});class je{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new ze(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",Qt(Be,(function(t){t.component(Be.name,Be),st("CONTAINER_CONTAINER_MULTIDATA",(()=>new je))})));class Ve extends at{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",Ve);class Le extends rt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new Ve(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers(),this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,a;const r=await mt(t,e.model,e.view.model);if(!r)return;this.providers[t.id]=r;const s=await r.createController(t,e,n);this.panelItems[t.id]=s,(null==(o=t.panelItems)?void 0:o.length)&&!ht(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(a=t.panelTabPages)?void 0:a.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)})))}initContainerData(){const{dataSourceType:t,dataName:e}=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 G(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new G(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new _(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setData(t){var e,n;const o=pt(this.model),a=o.map((t=>t.id)),r=new ft(o,t);r._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])})),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=r,this.childrenStateNotify(gt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new G(this.model,"没有配置实体逻辑");if(!t)throw new G(this.model,"没有配置实体");const n=await vt(e,t,this.panel.context,[],this.panel.params);if(!n)throw new V("实体逻辑".concat(e,"没有返回值"));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error("全局变量里没有".concat(t,"属性"))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new G(this.model,"没有配置实体行为");if(!e)throw new G(this.model,"没有配置实体");const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error("绑定视图的会话不存在".concat(e));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error("视图state里没有".concat(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",Le);const Me=P({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Le,required:!0}},setup(t){const e=Wt("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach((e=>{const n=t.controller.panelItems[e];n.state=m(n.state)}));const o=h("renderPanelItem"),a=D((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:a,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():E(w("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 E(w("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)&&!A(o)?e:{default:()=>[e]});var o}))]}}),E("div",{class:this.classArr},[t])}});class ke{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new Le(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",Qt(Me,(function(t){t.component(Me.name,Me),st("CONTAINER_CONTAINER_SINGLEDATA",(()=>new ke))})));class _e extends at{}t("GridContainerState",_e);class Ge extends rt{createState(){var t;return new _e(null==(t=this.parent)?void 0:t.state)}}function We(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("GridContainerController",Ge);const qe=P({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ge,required:!0}},setup(t){const e=Wt("grid-container"),{id:n}=t.modelData,o=D((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=D((()=>({...t.modelData.layout,layout:"TABLE_12COL"}))),r=v(void 0),s=v(12);return{ns:e,classArr:o,layoutModel:a,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:r}},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 E(w("iBizRow"),{class:this.classArr,layout:this.layoutModel},We(n=o.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},We(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class $e{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new Ge(t,e,n);return await o.init(),o}}t("IBizGridContainer",Qt(qe,(function(t){t.component(qe.name,qe),st("CONTAINER_CONTAINER_GRID",(()=>new $e))})));class Ue extends at{}t("PanelContainerImageState",Ue);class Fe extends rt{createState(){var t;return new Ue(null==(t=this.parent)?void 0:t.state)}}function Ke(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("PanelContainerImageController",Fe);const He=P({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:Fe,required:!0}},setup(t){const e=Wt("panel-container-image"),{id:n}=t.modelData,o=D((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=D((()=>{const e=t.controller.model.sysImage,n={};let o="";return(null==e?void 0:e.rawContent)?o=M(e.rawContent)?"url(data:image/svg+xml;base64,".concat(btoa(e.rawContent),")"):"url(".concat(e.rawContent,")"):(null==e?void 0:e.imagePath)&&(o="url(".concat(e.imagePath,")")),o&&Object.assign(n,{backgroundImage:o}),n}));return{ns:e,classArr:o,backgroundStyle:a}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=E(w("iBizRow"),{slot:"content",layout:this.modelData.layout},Ke(n=o.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ke(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return E("div",{class:this.classArr,onClick:()=>{this.controller.onClick()},style:this.backgroundStyle},[this.controller.model.cssStyle?E("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class Xe{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new Fe(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",Qt(He,(function(t){t.component(He.name,He),st("CONTAINER_CONTAINER_IMAGE",(()=>new Xe))})));class Qe extends at{}t("PanelContainerGroupState",Qe);class Je extends rt{createState(){var t;return new Qe(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",Je);class Ye{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new Je(t,e,n);return await o.init(),o}}function Ze(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}const tn=P({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:Je,required:!0}},setup(t){const e=Wt("panel-container-group"),n=v(!t.controller.defaultExpansion);return{ns:e,captionText:D((()=>{const{captionItemName:e,caption:n,capLanguageRes:o}=t.modelData;if(e)return t.controller.data[e];let a=n;return o&&(a=ibiz.i18n.t(o.lanResTag,n)),a})),changeCollapse:()=>{t.controller.disableClose||(n.value=!n.value)},isCollapse:n}},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 a=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],r=E(w("iBizRow"),{slot:"content",layout:this.modelData.layout},Ze(n=a.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ze(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let s=null;return this.modelData.showCaption&&(s=E("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[E("div",{class:[this.ns.be("header","left")]},[E("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),E("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?E("ion-icon",{name:"caret-forward-sharp"},null):E("ion-icon",{name:"caret-down-sharp"},null))])])),E("div",{class:o},[s,E("div",{class:[this.ns.b("content")]},[r])])}});t("IBizPanelContainerGroup",Qt(tn,(function(t){t.component(tn.name,tn),st("CONTAINER_CONTAINER_GROUP",(()=>new Ye))})));function en(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}const nn=P({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:rt,required:!0}},setup(t){const e=Wt("panel-tab-page"),n=D((()=>{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 E(w("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},en(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return E(w("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},en(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class on{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new rt(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",Qt(nn,(function(t){t.component(nn.name,nn),st("TABPAGE",(()=>new on))})));class an extends rt{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];return n.layoutPanelModel?yt.execScriptFn({data:e||{}},n.layoutPanelModel,{singleRowReturn:!0,isAsync:!1}):void 0}}const rn=P({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:an,required:!0}},setup(t){var e;const n=Wt("panel-item-render"),o=Wt("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:a}=t.modelData,r=D((()=>[n.b(),n.m(a),o.b(),n.is("hidden",!t.controller.state.visible)])),s=D((()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data)));return{ns:n,classArr:r,htmlCode:s}},render(){return E("div",{class:this.classArr,innerHTML:this.htmlCode},null)}});class sn{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const o=new an(t,e,n);return await o.init(),o}}t("IBizPanelItemRender",Qt(rn,(function(t){t.component(rn.name,rn),st("PREDEFINE_RENDER",(()=>new sn))})));const ln=P({name:"IBizTeleportPlaceholder",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=Wt("teleport-placeholder"),n=v(""),{rawItem:o}=t.modelData;o&&o.cssStyle&&(n.value=o.cssStyle);const a=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:a,tempStyle:n}},render(){if(this.controller.state.visible)return E("div",{id:this.controller.state.teleportTag,class:this.classArr,style:this.tempStyle},null)}});class cn extends at{constructor(){super(...arguments),this.teleportTag=""}}class un extends rt{createState(){var t;return new cn(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 a=null==(e=null==(t=this.model.rawItem)?void 0:t.rawItemParams)?void 0:e.find((t=>"TeleportTag"===t.key));a&&a.value&&(o=a.value),ibiz.log.debug("视图".concat(n,"的面板成员").concat(this.model.id,"的占位标识是:"),o),this.state.teleportTag=o}}class dn{constructor(){this.component="IBizTeleportPlaceholder"}async createController(t,e,n){const o=new un(t,e,n);return await o.init(),o}}t("TeleportPlaceholderProvider",dn);t("IBizTeleportPlaceholder",Qt(ln,(function(t){t.component(ln.name,ln),st("RAWITEM_TELEPORT_PLACEHOLDER",(()=>new dn))})));const pn=P({name:"IBizPanelContainerTabs",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup:()=>({ns:Wt("panel-container-tabs")}),render(){return y(w("IBizPanelContainer"),{...this.$props,...this.$attrs,class:this.ns.b()},this.$slots)}});class hn{constructor(){this.component="IBizPanelContainerTabs"}async createController(t,e,n){const o=new oe(t,e,n);return await o.init(),o}}t("IBizPanelContainerTabs",Qt(pn,(function(t){t.component(pn.name,pn),st("CONTAINER_TABS",(()=>new hn))}))),t("AppRedirectView",P({setup(){var t;const e=k.create((null==(t=ibiz.appData)?void 0:t.context)||{});I((()=>{e.destroy()}));const{href:n}=window.location;b((()=>ibiz.util.hiddenAppLoading())),async function(){await wt(e,n)}()},render:()=>E("div",null,[S("重定向跳转中")])}));class mn{constructor(){this.component="IBizView"}}const fn=P({name:"IBizView",props:{context: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=Wt("view"),o=ee(((...t)=>new tt(...t))),a=Ct(o.model),r=[],s=new Map,i=[];a.forEach((t=>{const{teleportFlag:e,teleportTag:n}=bt(t);n||e?(r.push(t),s.set(t.id,n||"")):i.push(t)}));const{viewType:l,sysCss:c,codeName:u}=o.model,d=l.toLowerCase(),p=null==c?void 0:c.cssName,h=D((()=>[n.b(),n.b(d),n.m(u),p,o.state.viewMessages.TOP?"has-top-message":"",o.state.viewMessages.BOTTOM?"has-bottom-message":""])),m=t=>{const e=t.name||t.id;return{context:o.context,params:o.params,modelData:t,...o.slotProps[e]||{}}};return{c:o,ns:n,controls:i,teleportControls:r,viewClassNames:h,onLayoutPanelCreated:t=>{o.setLayoutPanel(t)},getCtrlProps:m,renderControl:t=>{const n=t.name||t.id,a=m(t);if(e[n])return T(e,n,a);const r=o.providers[n],s=w((null==r?void 0:r.component)||"IBizControlShell");return r&&(a.provider=r),y(s,a)},getCtrlTeleportTag:t=>{var e,n;const a=s.get(t.id);if(a)return a;const r=null==(n=null==(e=o.parentView)?void 0:e.layoutPanel)?void 0:n.panelItems[t.name];return r?"#".concat(r.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=E("span",{style:"color:red;"},[S("视图类型"),this.modelData.viewType,S("暂未支持")]);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]=()=>this.renderControl(t)}));const o=this.c.model.viewLayoutPanel,a=this.c.providers[o.name];n=y(w(a.component),{modelData:o,context:this.c.context,params:this.c.params,provider:a,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?E("div",{style:this.getControlStyle()},[E(x,{to:n,disabled:!this.c.state.activated},(o=e=this.renderControl(t),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]}))]):(ibiz.log.error("没有找到部件".concat(t.name,"的teleportTag")),null);var o})));let a=null;if(this.c.state.hasError&&this.c.error.status){const t=It(this.c.error.status);t&&("string"==typeof t.component&&(a=y(w(t.component))),a=y(t.component))}return O(E("div",{class:this.viewClassNames,id:this.c.id},[n,o,a]),[[N("loading"),this.c.state.isLoading]])}});class gn{constructor(){this.component="IBizView"}createController(t,e,n,o){return new Pt(t,e,n,o)}}t("IBizView",Qt(fn,(function(t){t.component(fn.name,fn),Dt("DEFAULT",(()=>new mn)),Dt("APPDATAUPLOADVIEW",(()=>new gn))}))),t("TodoRedirect",P({setup(){const t=K(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error("重定向参数不足无法跳转");const a=X.parse(o,{delimiter:";"}),{apptype:r,todotype:s,todoid:i}=a,l={srfapptype:"pc",srfapp:""};r||(l.todourltype="RouterUrl"),async function(){let e=(await ibiz.net.post("/systodos/".concat(i,"/getlinkurl"),l)).data.linkurl;r?window.location.href=e:(0!==e.indexOf("/")&&(e="/".concat(e)),e+=";srfwf=".concat(s),t.push("/index".concat(e)))}()},render:()=>E("div",null,[S("待办列表重定向")])}));class vn{constructor(){this.component="IBizPortalView"}}const yn=P({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=Wt("view"),n=ee(((...t)=>new tt(...t))),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:a,sysCss:r,codeName:s}=n.model,i=a.toLowerCase(),l=null==r?void 0:r.cssName,c=[e.b(),e.b(i),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 a=n[e];if(a)return void(n[e]=()=>a({modelData:t,...o}));const r=this.c.providers[e];r&&(n[e]=()=>{const e=w(r.component);return y(e,{modelData:t,...o,provider:r})})})),n.dashboard&&(e=n.dashboard())}return E("div",{class:this.viewClassNames},[e])}}),wn=(t("IBizPortalView",Qt(yn,(function(t){t.component(yn.name,yn),Dt(Q.APP_PORTAL_VIEW,(()=>new vn)),Dt(Q.DE_PORTAL_VIEW,(()=>new vn)),Dt(Q.DE_PORTAL_VIEW9,(()=>new vn))}))),P({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0}},setup(t){const e=ee(((...t)=>new tt(...t))),n=v(),o=v(),a=v();return e.evt.on("onCreated",(()=>{Et(p(t.modelData),p(e.context),p(e.params)).then((async t=>{if("view"!==t.type)throw new V("嵌入重定向视图不支持url跳转");n.value=t.viewId,o.value=t.context,a.value=t.params}))})),{c:e,toViewId:n,toViewContext:o,toViewParams:a}},render(){return this.toViewId?y(w("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):O(E("div",{style:"width: 100%; height: 100%;"},null),[[N("loading"),!this.toViewId]])}}));class Cn{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",Qt(wn,(function(t){t.component(wn.name,wn);const e=new Cn;Dt(Q.DE_REDIRECT_VIEW,(()=>e))})));function bn(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach((t=>{t.attrName&&t.attrValue&&(o[t.attrName]=yt.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))})),o}const In=P({name:"IBizViewLayoutPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object},setup(t,{slots:e}){const n=_t(((...e)=>new Ot(...e,t.container))),o=Wt("control-".concat(n.model.controlType.toLowerCase()));i((()=>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=m(e.state)}))}));const a=(t,o)=>{var r,s;if(t.hidden)return null;const{providers:i,panelItems:l}=o||n,c=i[t.id];if(!c)return E("div",null,[S("暂未支持的面板项: "),t.id,S(" - "),t.itemType]);if("CTRLPOS"!==t.itemType&&e[t.id])return T(e,t.id,{model:t,data:n.data,value:n.data[t.id]});const u=w(c.component);let d;"CTRLPOS"===t.itemType&&e[t.id]?d=()=>e[t.id]():"TABPANEL"===t.itemType&&(null==(r=t.panelTabPages)?void 0:r.length)?d=()=>t.panelTabPages.map((t=>a(t,o))):ht(t)?d=void 0:(null==(s=t.panelItems)?void 0:s.length)&&(d=()=>t.panelItems.map((t=>a(t,o))));let p="";t.cssStyle&&(p=t.cssStyle);const h=l[t.id];return y(u,{modelData:t,controller:h,key:t.id,style:p,attrs:bn(t,h)},d)};return C("renderPanelItem",a),{c:n,ns:o,renderPanelItem:a}},render(){const{state:t,model:e}=this.c;return E(w("iBizControlBase"),{controller:this.c},{default:()=>[E(w("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",E(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]});var o})))]}})]})}});class Pn{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",Qt(In,(function(t){t.component(In.name,In),Nt(At.VIEW_LAYOUT_PANEL,(()=>new Pn))})));function Dn(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach((t=>{t.attrName&&t.attrValue&&(o[t.attrName]=yt.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))})),o}function En(t,e,n){var o,a;if(t.hidden)return;const{providers:r,panelItems:s}=e,i=r[t.id];if(!i)return E("div",null,[S("暂未支持的面板项: "),t.id,S(" - "),t.itemType]);const l=w(i.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=>En(t,e,n))):(null==(a=t.panelItems)?void 0:a.length)&&(c=()=>t.panelItems.map((t=>En(t,e,n))));let u="";t.cssStyle&&(u=t.cssStyle);const d=s[t.id];return y(l,{modelData:t,controller:d,key:t.id,style:u,attrs:Dn(t,d)},c)}const On=P({name:"IBizPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object,loadDefault:{type:Boolean,default:!0}},setup(t){const e=_t(((...e)=>new St(...e,t.container))),n=Wt("control-".concat(e.model.controlType.toLowerCase()));return i((()=>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=m(n.state)}))})),{c:e,ns:n}},render(){const{state:t,model:e}=this.c;return E(w("iBizControlBase"),{controller:this.c},{default:()=>[E(w("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",E(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=En(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]});var o})))]}})]})}});class Nn{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",Qt(On,(function(t){t.component(On.name,On),Nt(At.PANEL,(()=>new Nn))})));function An(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Sn(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function xn(t,e){for(var n,o="",a=0,r=-1,s=0,i=0;i<=t.length;++i){if(i<t.length)n=t.charCodeAt(i);else{if(47===n)break;n=47}if(47===n){if(r===i-1||1===s);else if(r!==i-1&&2===s){if(o.length<2||2!==a||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="",a=0):a=(o=o.slice(0,l)).length-1-o.lastIndexOf("/"),r=i,s=0;continue}}else if(2===o.length||1===o.length){o="",a=0,r=i,s=0;continue}e&&(o.length>0?o+="/..":o="..",a=2)}else o.length>0?o+="/"+t.slice(r+1,i):o=t.slice(r+1,i),a=i-r-1;r=i,s=0}else 46===n&&-1!==s?++s:s=-1}return o}var Tn={resolve:function(){for(var t,e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var a;o>=0?a=arguments[o]:(void 0===t&&(t=process.cwd()),a=t),Sn(a),0!==a.length&&(e=a+"/"+e,n=47===a.charCodeAt(0))}return e=xn(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(Sn(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=xn(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return Sn(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];Sn(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":Tn.normalize(t)},relative:function(t,e){if(Sn(t),Sn(e),t===e)return"";if((t=Tn.resolve(t))===(e=Tn.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,a=o-n,r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var s=e.length-r,i=a<s?a:s,l=-1,c=0;c<=i;++c){if(c===i){if(s>i){if(47===e.charCodeAt(r+c))return e.slice(r+c+1);if(0===c)return e.slice(r+c)}else a>i&&(47===t.charCodeAt(n+c)?l=c:0===c&&(l=0));break}var u=t.charCodeAt(n+c);if(u!==e.charCodeAt(r+c))break;47===u&&(l=c)}var d="";for(c=n+l+1;c<=o;++c)c!==o&&47!==t.charCodeAt(c)||(0===d.length?d+="..":d+="/..");return d.length>0?d+e.slice(r+l):(r+=l,47===e.charCodeAt(r)&&++r,e.slice(r))},_makeLong:function(t){return t},dirname:function(t){if(Sn(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,o=-1,a=!0,r=t.length-1;r>=1;--r)if(47===(e=t.charCodeAt(r))){if(!a){o=r;break}}else a=!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');Sn(t);var n,o=0,a=-1,r=!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,i=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!r){o=n+1;break}}else-1===i&&(r=!1,i=n+1),s>=0&&(l===e.charCodeAt(s)?-1==--s&&(a=n):(s=-1,a=i))}return o===a?a=i:-1===a&&(a=t.length),t.slice(o,a)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!r){o=n+1;break}}else-1===a&&(r=!1,a=n+1);return-1===a?"":t.slice(o,a)},extname:function(t){Sn(t);for(var e=-1,n=0,o=-1,a=!0,r=0,s=t.length-1;s>=0;--s){var i=t.charCodeAt(s);if(47!==i)-1===o&&(a=!1,o=s+1),46===i?-1===e?e=s:1!==r&&(r=1):-1!==e&&(r=-1);else if(!a){n=s+1;break}}return-1===e||-1===o||0===r||1===r&&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){Sn(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,o=t.charCodeAt(0),a=47===o;a?(e.root="/",n=1):n=0;for(var r=-1,s=0,i=-1,l=!0,c=t.length-1,u=0;c>=n;--c)if(47!==(o=t.charCodeAt(c)))-1===i&&(l=!1,i=c+1),46===o?-1===r?r=c:1!==u&&(u=1):-1!==r&&(u=-1);else if(!l){s=c+1;break}return-1===r||-1===i||0===u||1===u&&r===i-1&&r===s+1?-1!==i&&(e.base=e.name=0===s&&a?t.slice(1,i):t.slice(s,i)):(0===s&&a?(e.name=t.slice(1,r),e.base=t.slice(1,i)):(e.name=t.slice(s,r),e.base=t.slice(s,i)),e.ext=t.slice(r,i)),s>0?e.dir=t.slice(0,s-1):a&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Tn.posix=Tn;var Rn=Tn,zn=An(Rn);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)}))}async loadPredefinedPlugin(t){if(this.predefinedPlugins.has(t)){const e=this.predefinedPlugins.get(t);e&&await this.loadPluginRef(e.name,e.path)}}setPluginCode(t){this.pluginCodes.push(t),zt.useComponent.callSync(null,t)}async loadPlugin(t){if(!0===t.runtimeObject){const e=t;if(e){const t=e.rtobjectName,n=e.rtobjectRepo;if(this.isIgnore(n))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(n)){const t=await this.loadQueue.get(n);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(e.rtobjectName,e.rtobjectRepo);this.loadQueue.set(n,t);return await t}catch(t){throw new G(e,"配置加载失败")}finally{this.loadQueue.delete(n)}}}return!1}async loadPluginRef(t,e){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let n=null;{const t=e,o=this.urlReg.test(t)?"".concat(t,"/package.json"):"".concat(ibiz.env.pluginBaseUrl,"/").concat(Rn.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("配置加载失败");n=a.data}const o=new xt(t,e,n);if(o){await this.loadPluginExternal(o.config);try{return await this.loadScript(o),this.pluginCache.set(t,o),!0}catch(t){ibiz.log.error(t)}}return!1}async loadScript(t){const e=t.repo,{name:n,system:o,styles:a=[]}=t.config;let r="";if(r=Rn.join(e,o),r){if(this.cache.has(r))return;let t=null;const o=this.parseUrl(r),s=("string"==typeof a?[a]:a).map((t=>this.parseUrl(zn.join(e,t))));if(System.addImportMap({imports:{[n]:o},styles:{[n]:s}}),t=await System.import(n),!t)throw new V("远程插件加载失败, 未找到文件或文件内容格式不正确");if(!t.default)throw new V("远程插件加载失败, 远程插件未找到[default]默认导出");this.setPluginCode(t.default),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(Rn.join(e,t));const{origin:o,pathname:a}=window.location;return a.endsWith("/")&&n.startsWith("/")&&(n=n.substring(1)),!1===this.urlReg.test(n)&&(n="".concat(o).concat(a).concat(n)),n}async loadPluginExternal(t){if(!t["systemjs-importmap"])return;const e=this.handleSystemImportMap(t["systemjs-importmap"]);if(e.packages){const t=e.packages;for(const e in t){const n=t[e],o=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:n});if(200!==o.status)throw new Error("配置加载失败");await this.loadPluginExternal(o.data)}}System.addImportMap(e)}handleSystemImportMap(t){if(t){if(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 Bn{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function jn(){return{value:String,controller:new Bn(Object),data:new Bn(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function Vn(){return{hasError:{type:Boolean}}}function Ln(){return{...jn(),value:[String,Number]}}function Mn(){return{...jn(),value:Number}}function kn(){return{...jn(),value:String}}function _n(){return{...jn(),value:[String,Number,Object,Array]}}function Gn(){return{...jn(),value:[String,Number]}}function Wn(){return{...jn(),value:[String,Number]}}function qn(){return{...jn(),value:[String,Number]}}function $n(){return{...jn(),value:[String,Array,Object,Number]}}function Un(){return{...jn(),value:[String,Number]}}function Fn(){return{...jn(),value:[String,Number]}}function Kn(){return{...jn(),value:[String,Number]}}function Hn(){return{...jn(),value:[String,Number]}}function Xn(){return{...jn(),value:[String,Number]}}function Qn(){return{...jn(),value:[String,Number]}}function Jn(){return{...jn(),value:[String,Number,Array]}}function Yn(){return{...jn(),value:[String,Number]}}function Zn(){return{...jn(),value:[String,Number]}}function to(){return{...jn(),value:[String,Number]}}function eo(){return{...jn(),value:String}}function no(){return{...jn(),value:[String,Number]}}function oo(){return{...jn(),value:String,language:{type:String},theme:{type:String}}}function ao(){return{...jn(),value:String}}function ro(){return{...jn(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function so(){return{...jn(),value:[Array,Array]}}function io(){return{...jn(),value:String}}function lo(){return{...jn(),value:String}}t("RequiredProp",Bn)}}}));
1
+ System.register(["qx-util","vue","@ibiz-template/core","ramda","vue-router","qs","@ibiz-template/runtime","pinia"],(function(t){"use strict";var e,n,o,a,r,s,i,l,c,u,d,p,h,m,f,g,v,y,w,C,b,I,P,D,E,O,N,A,x,S,T,R,z,B,j,V,L,M,k,_,G,W,q,$,U,F,K,H,X,Q,J,Y,Z,tt,et,nt,ot,at,rt,st,it,lt,ct,ut,dt,pt,ht,mt,ft,gt,vt,yt,wt,Ct,bt,It,Pt,Dt,Et,Ot,Nt,At,xt,St,Tt,Rt;return{setters:[function(t){e=t.SyncSeriesHook,n=t.isFunc,o=t.notNilEmpty,a=t.QXEvent,r=t.clearAll,s=t.createUUID},function(t){i=t.watch,l=t.onBeforeUnmount,c=t.createCommentVNode,u=t.getCurrentInstance,d=t.isReactive,p=t.toRaw,h=t.inject,m=t.reactive,f=t.onActivated,g=t.onDeactivated,v=t.ref,y=t.h,w=t.resolveComponent,C=t.provide,b=t.onMounted,I=t.onUnmounted,P=t.defineComponent,D=t.computed,E=t.createVNode,O=t.withDirectives,N=t.resolveDirective,A=t.isVNode,x=t.createTextVNode,S=t.Teleport,T=t.renderSlot},function(t){R=t.onClickOutside,z=t.NOOP,B=t.listenJSEvent,j=t.Namespace,V=t.RuntimeError,L=t.isBase64Image,M=t.isSvg,k=t.IBizContext,_=t.ModelError,G=t.RuntimeModelError},function(t){W=t.isNil,q=t.isNotNil,$=t.isEmpty,U=t.mergeLeft},function(t){F=t.useRoute,K=t.useRouter,H=t.RouterView},function(t){X=t.default},function(t){Q=t.ViewType,J=t.RouteConst,Y=t.getMatchResPath,Z=t.calcDeCodeNameById,tt=t.ViewController,et=t.getControlProvider,nt=t.calcDynaSysParams,ot=t.getViewProvider,at=t.PanelItemState,rt=t.PanelItemController,st=t.registerPanelItemProvider,it=t.Modal,lt=t.ViewMode,ct=t.OpenAppViewCommand,ut=t.getEditorProvider,dt=t.PanelItemEventName,pt=t.getAllPanelField,ht=t.isDataContainer,mt=t.getPanelItemProvider,ft=t.PanelData,gt=t.PanelNotifyState,vt=t.execDELogicById,yt=t.ScriptFactory,wt=t.toLocalOpenWFRedirectView,Ct=t.getControlsByView,bt=t.getCtrlTeleportParams,It=t.getErrorViewProvider,Pt=t.AppDataUploadViewController,Dt=t.registerViewProvider,Et=t.getDERedirectToView,Ot=t.ViewLayoutPanelController,Nt=t.registerControlProvider,At=t.ControlType,xt=t.PanelController,St=t.RemotePluginItem},function(t){Tt=t.defineStore,Rt=t.createPinia}],execute:function(){t({calcResRoutePath:Kt,createOverlayView:Yt,generateRoutePath:async function(t,e,n,o){const a=qt(e);let r=n.srfdefaulttoroutedepth||2;n.toRouteDepth?(r=n.toRouteDepth,n.toRouteDepth=void 0):ibiz.env.isMob&&(a.pathNodes[0]={viewName:"home"});if(a.pathNodes.splice(r-1,a.pathNodes.length-r+1),n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}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:Ut(n),params:o}),2===r&&(await Kt(a,n,t.appDataEntityId,t.appId),Ft.includes(t.viewType))){const e=Z(t.appDataEntityId);delete a.pathNodes[0].context[e]}return{path:$t(a)}},generateRoutePathByModal:async function(t,e,n,o){const a=qt(e),r=a.pathNodes.findIndex((t=>t.viewName===J.ROUTE_MODAL_TAG));-1!==r&&(a.pathNodes=a.pathNodes.slice(0,r));if(n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}return a.pathNodes.push({viewName:"".concat(J.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:Ut(n),params:o}),{path:$t(a)}},getArrayProps:so,getAutoCompleteProps:no,getCascaderProps:io,getCheckboxListProps:Wn,getCheckboxProps:qn,getCodeProps:oo,getColorPickerProps:lo,getDataPickerProps:$n,getDatePickerProps:Un,getDateRangeProps:Fn,getDrawerPlacement:function(t){return Zt[t]||"right"},getDropdownProps:Gn,getEditorEmits:function(){return{change:(t,e)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}},getEditorProps:jn,getGridArrayProps:function(){return{...so(),...Vn()}},getGridAutoCompleteProps:function(){return{...no(),...Vn()}},getGridCascaderProps:function(){return{...io(),...Vn()}},getGridCheckboxListProps:function(){return{...Wn(),...Vn()}},getGridCheckboxProps:function(){return{...qn(),...Vn()}},getGridCodeProps:function(){return{...oo(),...Vn()}},getGridColorPickerProps:function(){return{...lo(),...Vn()}},getGridDataPickerProps:function(){return{...$n(),...Vn()}},getGridDatePickerProps:function(){return{...Un(),...Vn()}},getGridDateRangeProps:function(){return{...Fn(),...Vn()}},getGridDropdownProps:function(){return{...Gn(),...Vn()}},getGridEditorCommonProps:Vn,getGridEditorEmits:function(){return{change:(t,e)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...ao(),...Vn()}},getGridInputIpProps:function(){return{...kn(),...Vn()}},getGridInputNumberProps:function(){return{...Mn(),...Vn()}},getGridInputProps:function(){return{...Ln(),...Vn()}},getGridListBoxProps:function(){return{...Kn(),...Vn()}},getGridMarkDownProps:function(){return{...ro(),...Vn()}},getGridNumberRangeProps:function(){return{...Hn(),...Vn()}},getGridRadioProps:function(){return{...Xn(),...Vn()}},getGridRateProps:function(){return{...Qn(),...Vn()}},getGridRawProps:function(){return{...Jn(),...Vn()}},getGridSliderProps:function(){return{...Yn(),...Vn()}},getGridSpanProps:function(){return{..._n(),...Vn()}},getGridStepperProps:function(){return{...Zn(),...Vn()}},getGridSwitchProps:function(){return{...to(),...Vn()}},getGridUploadProps:function(){return{...eo(),...Vn()}},getHtmlProps:ao,getInputIpProps:kn,getInputNumberProps:Mn,getInputProps:Ln,getListBoxProps:Kn,getMarkDownProps:ro,getNestedRoutePath:Ht,getNumberRangeProps:Hn,getOrigin:Vt,getOwnRouteContext:Ut,getRadioProps:Xn,getRateProps:Qn,getRawProps:Jn,getSliderProps:Yn,getSpanProps:_n,getStepperProps:Zn,getSwitchProps:to,getUploadProps:eo,isEmptyVNode:function(t){if(!Array.isArray(t))return t===Mt;return 1===t.length&&t[0]===Mt},onRouteChange:function(t,e){const n=F();if(!n)throw new V("无法正确获取route,可能是依赖问题");i((()=>null==n?void 0:n.path),(()=>{const o=Ht(n,e);t({currentKey:o,fullPath:n.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(Yt(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(Yt(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(Yt(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(Yt(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var a;const r=qt(t,n);let s=r.pathNodes[e-1].viewName;if(!s)throw new V("第".concat(e,"级路由不存在视图标识"));s===J.ROUTE_MODAL_TAG&&(s=r.pathNodes[e].viewName);"index"===s&&(s=ibiz.hub.defaultAppIndexViewName);const i=await ibiz.hub.config.view.get(s);if(!i)throw new V("找不到视图".concat(s));const l={};(null==(a=ibiz.appData)?void 0:a.context)&&Object.assign(l,ibiz.appData.context);r.appContext&&Object.assign(l,r.appContext);if(1!==e)for(let t=0;t<e;t++){const e=r.pathNodes[t];o(e.context)&&Object.assign(l,e.context)}const{params:c,srfnav:u}=r.pathNodes[e-1];return{viewConfig:i,context:l,params:c,srfnav:u}},prepareControl:function(t){const e=Wt("control"),{controlType:n,sysCss:o,codeName:a}=t.model,r=n.toLowerCase(),s=null==o?void 0:o.cssName,i=Wt("control-".concat(r)),l=[e.b(),e.b(r),e.m(a)];s&&l.push(s);return{controlClass:l,ns:i}},renderString:function(t){if(W(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,"转换成字符串失败",e)}return""},route2routePath:qt,routePath2string:$t,useClickOutside:Bt,useCodeListListen:function(t,e,n){let o;b((async()=>{if(t){const a=await ibiz.hub.getApp(e);o=await a.codeList.getCodeListInstance(t),o&&o.onChange(n)}})),I((()=>{o&&o.offChange(n)}))},useControlController:_t,useController:function(t){t.force=Lt()},useCtx:kt,useEventListener:Gt,useFocusAndBlur:function(t,e){const n=v(),o=v(!1);let a;const r=()=>{o.value||ibiz.log.debug("没有聚焦,不触发失焦"),e(),a.stop(),o.value=!1};return Gt(n,"click",(e=>{o.value||(a=Bt(n,(()=>{r()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:r,pause:()=>{a&&a.pause()},stop:()=>{a&&a.stop()}}},useForce:Lt,useForceTogether:function(t,e){const n=e.force,o=Lt();e.force=t=>{n(t),o()}},useMobCtx:function(){return h("ctx")},useNamespace:Wt,useProps:jt,usePropsWatch:function(t,e,n){const o=jt();Object.prototype.hasOwnProperty.call(o,t)&&(i((()=>o[t]),((t,n)=>{e(Vt(t),Vt(n))}),n),e(Vt(o[t]),void 0))},useRouteKey:function(t,e,n){n||(n=v(""));n.value=t.value;const o=new Xt(e);return i(t,((t,e)=>{t!==e&&o.nextChange((()=>{n.value=t}))})),n},useRouterQuery:function(){const t=F(),{query:e}=t;return e},useViewController:ee});class zt{}function Bt(t,e,n={}){let o=z,a=z,r=z;const s=()=>{o(),o=z,a=z,r=z};return i(t,((t,i)=>{if(t!==i)if(W(t))s();else{const s=R((null==t?void 0:t.$el)||t,e,n);o=s.stop,a=s.pause,r=s.proceed}}),{immediate:!0}),l((()=>{o!==z&&s()})),{stop:()=>o(),pause:()=>a(),proceed:()=>r()}}function jt(){return u().proxy.$props}function Vt(t){return d(t)?p(t):t}function Lt(){const t=u().proxy;return e=>{t.$forceUpdate(),e&&n(e)&&t.$nextTick((()=>{e()}))}}t("AppHooks",zt),zt.createApp=new e,zt.useComponent=new e;const Mt=t("EmptyVNode",c("EmptyVNode"));function kt(){return h("ctx")}function _t(t,e){const n=kt(),o=jt();n.evt.emit("onForecast",o.modelData.name);const a=o.provider;let r;r=(null==a?void 0:a.createController)?a.createController(o.modelData,o.context,o.params,n):t(o.modelData,o.context,o.params,n),function(t,e){i((()=>({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("".concat(e.model.id,"的上下文或视图参数变更:"),t)}))}(o,r),function(t,e,n=[]){const o=["context","params","modelData",...n];i((()=>{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("部件 [".concat(e.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{void 0!==o[t]&&(e.state[t]=o[t])}))}),{immediate:!0})}(o,r,null==e?void 0:e.excludePropsKeys),r.state=m(r.state),f((()=>r.onActivated())),g((()=>r.onDeactivated())),r.force=Lt();const s=u().proxy;return r.evt.onAll(((t,e)=>{s.$emit(t.slice(2),e)})),s.$emit("controllerAppear",r),r.created(),l((()=>r.destroyed())),r}function Gt(t,e,n,o={}){let a=z;return i(t,((t,r)=>{t!==r&&(W(t)?(a(),a=z):a=B((null==t?void 0:t.$el)||t,e,n,o))}),{immediate:!0}),l((()=>{a!==z&&a()})),()=>{a()}}function Wt(t){return new j(t,ibiz.env.namespace)}function qt(t,e=!1){const n=t.matched.length;let o=t.path;e&&(o=o.replace(new RegExp("/".concat(J.ROUTE_MODAL_TAG),"g"),""));const a=o.split("/"),r=[];for(let e=1;e<=n;e++){const n=a[2*e],o=t.params["params".concat(e)];let s,i,l;s=o&&o!==ibiz.env.routePlaceholder?X.parse(o,{strictNullHandling:!0,delimiter:";"}):void 0,s&&(1===e?(i=s,s=void 0):(s.srfnavctx&&(i=JSON.parse(decodeURIComponent(s.srfnavctx)),delete s.srfnavctx),s.srfnav&&(l=s.srfnav,delete s.srfnav))),r.push({viewName:n,context:i,params:s,srfnav:l})}let s;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(s=X.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:s,pathNodes:r}}function $t(t){let e="";return t.appContext?e+="/".concat(X.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach(((t,n)=>{e+="/".concat(t.viewName,"/");let a={};if(0===n)o(t.context)&&(a=t.context);else{if(a=o(t.params)?t.params:{},o(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(a.srfnavctx=encodeURIComponent(e))}t.srfnav&&(a.srfnav=t.srfnav)}const r=X.stringify(a,{delimiter:";",strictNullHandling:!0,skipNulls:!0});o(r)?e+=r:e+=ibiz.env.routePlaceholder})),e}function Ut(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];return Object.keys(e).forEach((t=>{n.includes(t)&&delete e[t]})),e}const Ft=t("excludeViewTypes",[Q.DE_GRID_VIEW,Q.DE_GRID_EXP_VIEW,Q.DE_LIST_VIEW,Q.DE_LIST_EXP_VIEW,Q.DE_DATA_VIEW,Q.DE_DATAVIEW_EXP_VIEW,Q.DE_CALENDAR_VIEW,Q.DE_CALENDAR_EXP_VIEW,Q.DE_CHART_VIEW,Q.DE_CHART_EXP_VIEW,Q.DE_KANBAN_VIEW]);async function Kt(t,e,n,o){if(n){const a=await ibiz.hub.getAppDataEntity(n,o);let r=Y(e,a);if(r||(r={path:"",keys:[a.codeName.toLowerCase()]}),r){const n=t.pathNodes[1].context,o={};r.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 Ht(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=qt(t);if(o.pathNodes.length<e)return t.path;o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e));const a=o.pathNodes[e-1];return n&&delete a.srfnav,a.context&&delete a.context.srfpaginationviewid,$t(o)}class Xt{constructor(t,e){this.callbacks=[],this.timers=[],this.wait=500,e&&(this.wait=e),i((()=>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",Xt);const Qt=t("withInstall",((t,e)=>(t.install=t=>{e(t)},t)));class Jt{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 V("没有注入createVueApp方法")}init(){const t=this,{render:e,opts:n}=this,o=document.createElement("div");document.body.appendChild(o);const a=Jt.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>y(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",Jt);function Yt(t){return e=>{const n=w("IBizViewShell");return y(n,{...t,modal:e})}}t("OverlayPopoverContainer",class extends Jt{present(t){return this.modal.present(t)}});const Zt={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class te{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 a=e;if(this.map.has(a)){return this.map.get(a).onWillDismiss()}const r=new te(o,a);return this.map.set(a,r),this.scheduledDestruction(r),r.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",Tt("appStore",(()=>({appStore:m({})}))));t("useUIStore",Tt("uiStore",(()=>{const t=function(){const t=v(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}();return{UIStore:m({zIndex:t.zIndex,theme:"light"}),zIndex:t}}))),t("piniaInstance",Rt());function ee(t){const e=jt(),n=h("ctx",void 0);null==n||n.evt.emit("onForecast",e.modelData.name);const o=e.provider;let a;a=(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(a.id,a),function(t,e){i((()=>({context:t.context,params:t.params})),(t=>{e.context.reset({},t.context),r(e.params),Object.assign(e.params,t.params),e.handleContextParams(),ibiz.log.debug("".concat(e.model.id,"的上下文或视图参数变更:"),t)}))}(e,a),function(t,e){i((()=>t.state?{...t.state}:{}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug("视图 [".concat(e.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{e.state[t]=o[t]}))}),{immediate:!0})}(e,a),C("ctx",a.ctx),a.state=m(a.state),a.slotProps=m(a.slotProps),e.modal&&(a.modal=e.modal),f((()=>{a.onActivated(),ibiz.util.viewStack.active(a.id)})),g((()=>{a.onDeactivated(),ibiz.util.viewStack.deactivate(a.id)})),a.force=Lt();const s=u().proxy;return a.evt.onAll(((t,e)=>{s.$emit(t.slice(2),e)})),a.created(),l((()=>{a.destroyed(),ibiz.util.viewStack.remove(a.id)})),a}t("IBizIcon",P({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=Wt("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=D((()=>function(t){if(t){if(t.htmlStr)return E("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")?E("i",{class:[e.b(),t.cssClass]},null):E("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return L(t.imagePath)?E("img",{class:e.b(),src:t.imagePath},null):M(t.imagePath)?E("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?E("img",{class:e.b(),src:t.imagePath},null):E("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?E("img",{class:e.b(),src:t.imagePath},null):E("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return M(t.rawContent)?E("div",{class:e.b(),innerHTML:t.rawContent},null):E("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}})),t("IBizRouterView",P({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:e}){const n={};let o=!0;i((()=>t.manualKey),((t,e)=>{q(t)&&t!==e&&(o=!0)}));return{renderComp:(a,r)=>{if(!o)return n.vNode;if(o=!1,a){const o={...a.props};delete o.onVnodeUnmounted,delete o.ref;const r=y(a.type,{...o,...e,key:t.manualKey});return n.vNode=r,r}}}},render(){return E(w("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",P({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=Wt("control"),{controlType:n,sysCss:o,codeName:a}=t.controller.model,r=n.toLowerCase(),s=null==o?void 0:o.cssName,i=t.controller.model,l=t.controller.model.controls,c=m({});return!1===i.controlType.endsWith("EXPBAR")&&(W(i.width)||(i.width>0&&i.width<=1?c.width="".concat(100*i.width,"%"):c.width="".concat(i.width,"px")),W(i.height)||(i.height>0&&i.height<=1?c.width="".concat(100*i.height,"%"):c.height="".concat(i.height,"px"))),{ns:e,typeClass:r,sysCssName:s,inlineStyle:c,codeName:a,controls:l,onLayoutPanelCreated:e=>{t.controller.setLayoutPanel(e)}}},render(){var t,e,n;const{state:o,controlPanel:a,providers:r}=this.controller;let s=null;if(o.isCreated&&a){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},a=e[n];e[n]=a?()=>a(o):()=>{const e=w("IBizControlShell");return y(e,{modelData:t,...o})}}));const n=r[a.name];s=y(w(n.component),{modelData:a,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return E("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName],style:this.inlineStyle},[s||(null==(n=(e=this.$slots).default)?void 0:n.call(e))])}})),t("IBizControlShell",P({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){const e=h("ctx");if(e)e.evt.emit("onForecast",t.modelData.name);else{const t={name:"AppView",id:"AppView",viewType:Q.DE_CUSTOM_VIEW,appId:ibiz.env.appId};C("ctx",new tt(t,k.create({})).ctx)}const n=v(!1),o=v(""),a=v();et(t.modelData).then((t=>{t?a.value=t:o.value="未找到对应部件的适配器",n.value=!0})).catch((t=>{ibiz.log.error(t),o.value=t.message,n.value=!0}));return{ns:Wt("control-shell"),isComplete:n,errMsg:o,provider:a}},render(){return this.isComplete&&this.provider?y(w(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):O(E("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[N("loading"),!this.isComplete]])}})),t("IBizViewShell",P({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(t){const e=Wt("view-shell"),n=v(!1),o=v(""),a=v(),r=v();return(async()=>{let e;if(e=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId),!e)throw new V("未找到视图模型");if(1===e.dynaSysMode){const n=e.appDataEntityId;if(!n)throw new V("".concat(e.codeName,"无实体,暂不支持加载动态模型"));const o=t.params||{},a=await nt(n,t.context,{viewParams:o,appId:e.appId});if(o.srfdatatype&&(a.srfdatatype=o.srfdatatype),o.srfwftag)a.srfwftag=o.srfwftag;else if(n&&e.enableWF){const o={...t.context};if(a.srfkey){const r=W(t.context.srfsessionid)||$(t.context.srfsessionid),i=s();if(r){const t=ibiz.uiDomainManager.create(i);o.srfsessionid=t.id}const l=ibiz.hub.getApp(e.appId),c=await l.deService.getService(t.context,n),u=await c.get(o,t.params||{});if(u.ok&&u.data){const{srfwftag:n,processdefinitionkey:o,taskdefinitionkey:r}=u.data;if(n&&(a.srfwftag=n),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW"].includes(e.viewType)){const e=t.params;W(e.processDefinitionKey)&&(e.processDefinitionKey=o),W(e.taskDefinitionKey)&&(e.taskDefinitionKey=r)}}r&&ibiz.uiDomainManager.destroy(i)}}r.value=await ibiz.hub.loadAppView(e.appId,e.id,a)}else r.value=e;try{a.value=await ot(e)}catch(t){ibiz.log.error(t),o.value=t.message}finally{n.value=!0}})(),{ns:e,isComplete:n,errMsg:o,viewModelData:r,provider:a}},render(){return this.isComplete&&this.provider?y(w(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots):O(E("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[N("loading"),!this.isComplete]])}})),t("IBizCodeList",P({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]}},emits:{infoTextChange:t=>!0},setup(t,{emit:e}){var n,o;const a=Wt("code-list"),r=v([]),s=(null==(n=t.codeList)?void 0:n.textSeparator)||"、",l=(null==(o=t.codeList)?void 0:o.valueSeparator)||",";i(r,(t=>{let n="";t.length>0&&(n=t.map((t=>t.text)).join(s)),e("infoTextChange",n)}));const c=(t,e)=>{if(t){const n=t.find((t=>t.value==e));if(n)return n;for(let n=0;n<t.length;n++){const o=c(t[n].children,e);if(o)return o}}};i([()=>t.codeListItems,()=>t.value],(([t,e],[n,o])=>{if(W(e)||""===e)r.value=[];else{const n="string"==typeof e?e.split(l):[e];r.value=n.map((e=>{const n=c(t,e);return{text:(null==n?void 0:n.text)||e,color:null==n?void 0:n.color,textCls:null==n?void 0:n.textCls,sysImage:null==n?void 0:n.sysImage}}))}}),{immediate:!0});const u="未定义"===t.codeList.emptyText?"- - -":t.codeList.emptyText;return{items:r,ns:a,emptyText:u,textSeparator:s}},render(){return E("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,E("span",{class:[this.ns.e("item"),t.textCls?t.textCls:null],style:t.color?this.ns.cssVarBlock({"item-color":"".concat(t.color)}):null},[t.sysImage&&E(w("iBizIcon"),{icon:t.sysImage},null),t.text])]))])}})),t("ControlLoadingPlaceholder",P({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(h("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null})),t("IBizBadge",P({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"}},setup:()=>({ns:Wt("badge")}),render(){return E("div",{class:[this.ns.b(),this.ns.m(this.type)]},[this.value])}}));class ne extends at{}t("PanelContainerState",ne);class oe extends rt{createState(){var t;return new ne(null==(t=this.parent)?void 0:t.state)}}function ae(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("PanelContainerController",oe);const re=P({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup(t){const e=Wt("panel-container"),{id:n}=t.modelData,o=D((()=>{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;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=E(w("iBizRow"),{slot:"content",layout:this.modelData.layout},ae(n=o.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},ae(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return E("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?E("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class se{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new oe(t,e,n);return await o.init(),o}}t("IBizPanelContainer",Qt(re,(function(t){t.component(re.name,re),st("CONTAINER",(()=>new se)),st("CONTAINER_DEFAULT",(()=>new se))})));const ie=P({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){h("ctx").evt.on("onRegister",((e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}));return{ns:Wt("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),E("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!t.visible)]},[e||(ibiz.env.dev?"未提供".concat(this.modelData.id,"插槽"):"")])}});class le extends rt{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",le);class ce{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new le(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",Qt(ie,(function(t){t.component(ie.name,ie),st("CTRLPOS",(()=>new ce))})));class ue extends rt{}function de(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("ScrollContainerItemController",ue);const pe=t("ScrollContainerItem",P({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:ue,required:!0}},setup(t){const e=Wt("scroll-container-item"),{id:n}=t.modelData,o=D((()=>[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 E(w("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},de(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},de(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class he{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new ue(t,e,n);return await o.init(),o}}class me extends rt{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",me);const fe=t("ScrollContainer",P({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:me,required:!0}},setup(t){const e=Wt("scroll-container"),{id:n}=t.modelData,o=D((()=>[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,a=null,r=null,s=null;const i={};((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,i.left={width:l};break;case"EAST":a=t,i.right={width:l};break;case"NORTH":o=t,i.top={height:c};break;case"SOUTH":r=t,i.bottom={height:c};break;case"CENTER":s=t;break;default:ibiz.log.debug("未适配的布局占位".concat(e.modelData.layoutPos.layoutPos))}}));for(const t in i)(i[t].width||i[t].height)&&(i[t].flexShrink=0);return E("div",{class:this.classArr},[E("div",{class:[this.ns.e("header")],style:i.top},[o]),E("div",{class:[this.ns.b("content")]},[E("div",{class:this.ns.be("content","left"),style:i.left},[n]),E("div",{class:this.ns.be("content","center")},[s]),E("div",{class:this.ns.be("content","right"),style:i.right},[a])]),E("div",{class:[this.ns.e("footer")],style:i.bottom},[r])])}}));class ge{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new me(t,e,n);return await o.init(),o}}t("IBizScrollContainer",Qt(fe,(function(t){t.component(fe.name,fe),t.component(pe.name,pe),st("CONTAINER_CONTAINER_SCROLL",(()=>new ge)),st("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new he)),st("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new he)),st("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new he)),st("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new he)),st("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new he))})));class ve extends at{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={}}}t("NavPosState",ve);const ye=["is404","isRoutePushed"];class we extends rt{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={}}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;"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 ve(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]?(U(this.state.navViewMsgs[e],t),ye.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 it({mode:this.routeDepth?lt.ROUTE:lt.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){ibiz.log.debug(this.constructor.name,"onViewCreated",t)}toBlankRoute(){const t=Ht(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)}openViewByPath(t){var e,n,o;const a=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=a,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const n=Ht(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});this.getExpItemIsCache(t)&&this.state.cacheKeys.push(a),ibiz.commands.execute(ct.TAG,t.viewId,e,t.params,{openMode:"INDEXVIEWTAB",replace:!this.state.currentKey,...t.modalOptions})}}openViewByModel(t){this.setNavViewMsgs(t),this.state.currentKey=this.calcCacheKey(t)}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;o(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}}function Ce(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("NavPosController",we);const be=P({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:we,required:!0}},setup(t){const e=t.controller,n=Wt("nav-pos"),o=K(),a=F(),r=v(!1);if(e.setRouter(o),e.routeDepth){const t=Ht(a,e.routeDepth);i((()=>a.fullPath),(()=>{const n=Ht(a,e.routeDepth);if(t===n&&a.matched.length>e.routeDepth){if(a.matched.length===e.routeDepth+1&&(r.value=!!a.name,r.value))return;e.onRouteChange(a)}}),{immediate:!0})}return{ns:n,c:e,isPresetView:r,onViewCreated:t=>{e.onViewCreated(t)}}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:o,navViewMsgs:a,cache:r}=e;let s=null;if(e.routeOpen){if(this.isPresetView)return E(H,null,null);s=E(w("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?E(t,null,null):null;return r?E(w("keepAlive"),{include:o,max:30,isKey:!0},Ce(e)?e:{default:()=>[e]}):e}})}else{const t=n?y(w("IBizViewShell"),{context:a[n].context,params:a[n].params,key:n,viewId:a[n].viewId,onCreated:this.onViewCreated}):null;s=r?E(w("keepAlive"),{include:o,max:30,isKey:!0},Ce(t)?t:{default:()=>[t]}):t}return E("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[s])}});class Ie{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new we(t,e,n);return await o.init(),o}}t("IBizNavPos",Qt(be,(function(t){t.component(be.name,be),st("RAWITEM_NAV_POS",(()=>new Ie))})));class Pe extends at{}class De extends rt{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 Pe(null==(t=this.parent)?void 0:t.state)}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 ut(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),this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:dt.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:dt.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:dt.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:dt.ENTER,event:t})}}t("PanelFieldController",De);const Ee=P({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:De,required:!0},attrs:{type:Object,require:!1}},setup(t){const e=Wt("panel-field"),n=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];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=w(this.controller.editorProvider.formEditor);t=y(n,{...e})}else t=E(w("not-supported-editor"),{modelData:this.modelData.editor},null)}return E("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t])}});class Oe{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new De(t,e,n);return await o.init(),o}}t("IBizPanelField",Qt(Ee,(function(t){t.component(Ee.name,Ee),st("FIELD",(()=>new Oe))})));class Ne extends rt{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}t("PanelRawItemController",Ne);const Ae=P({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:Ne,required:!0}},setup(t){const e=Wt("panel-rawitem"),n=t.controller,o=v(""),a=v(""),{rawItem:r}=t.modelData;r&&r.cssStyle&&(a.value=r.cssStyle);const s=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return i((()=>n.data),(async t=>{if(t){const e=n.model.rawItem;if(!e)return;let a;const r={...t};"RAW"===e.contentType?a=e.caption:"HTML"===e.contentType&&(a=e.content),a&&e.templateMode&&(a=await ibiz.util.hbs.render(a.replace("//n","\n"),Object.assign(r,{data:{...t}}))),o.value=a}}),{immediate:!0}),{ns:e,classArr:s,tempStyle:a,content:o}},render(){if(this.controller.state.visible)return E("div",{class:this.classArr,style:this.tempStyle,onClick:()=>{this.controller.onClick()}},[E(w("iBizRawItem"),{rawItem:this.modelData,content:this.content},null)])}});class xe{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new Ne(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",Qt(Ae,(function(t){t.component(Ae.name,Ae),st("RAWITEM",(()=>new xe)),st("RAWITEM_STATIC_IMAGE",(()=>new xe)),st("RAWITEM_STATIC_LABEL",(()=>new xe)),st("RAWITEM_STATIC_TEXT",(()=>new xe))})));class Se extends at{constructor(){super(...arguments),this.data={}}}class Te{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new Se,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const a=pt(this.model).map((t=>t.id));o._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])}))}get data(){return this.state.data}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,a;const r=this.parent.providers[t.id];if(!r)return;const s=await r.createController(t,e,n);this.panelItems[t.id]=s,(null==(o=t.panelItems)?void 0:o.length)&&!ht(t)?await this.initChildrenController(t.panelItems,e,s):(null==(a=t.panelTabPages)?void 0:a.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 Re extends at{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",Re);class ze extends rt{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new Re(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders(),this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map((async t=>{var e,n;const o=await mt(t,this.panel.model,this.panel.view.model);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!ht(t)&&await this.initPanelItemProviders(t.panelItems),(null==(n=t.panelTabPages)?void 0:n.length)&&await this.initPanelItemProviders(t.panelTabPages))})))}initContainerData(){const{dataSourceType:t,dataName:e}=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 G(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new G(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new _(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){this.dataItems.forEach((e=>{e.panelStateNotify(t)}))}async setData(t){const e=pt(this.model),n=t.map((t=>new ft(e,t)));this.dataItems=n.map((t=>new Te(this.model,this.panel,this,t))),this.dataItems.length&&await Promise.all(this.dataItems.map((t=>t.init()))),this.state.items=n,this.childrenStateNotify(gt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new G(this.model,"没有配置实体逻辑");if(!t)throw new G(this.model,"没有配置实体");const n=await vt(e,t,this.panel.context,[],this.panel.params);if(!n)throw new V("实体逻辑".concat(e,"没有返回值"));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error("全局变量里没有".concat(t,"属性"))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new G(this.model,"没有配置实体行为");if(!e)throw new G(this.model,"没有配置实体");const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error("绑定视图的会话不存在".concat(e));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error("视图state里没有".concat(e,"属性"))};n(),t.evt.on("onDataChange",(()=>{n()}))}setDataValue(t,e){throw new Error("Method not implemented.")}destroy(){super.destroy(),this.dataItems.forEach((t=>{t.destroy()}))}}t("MultiDataContainerController",ze);const Be=P({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:ze,required:!0}},setup(t){const e=Wt("multi-data-container"),{id:n}=t.modelData;i((()=>t.controller.state.items),(()=>{t.controller.dataItems.forEach((t=>{t.state=m(t.state);Object.keys(t.panelItems).forEach((e=>{const n=t.panelItems[e];n.state=m(n.state)}))}))}),{immediate:!0});const o=h("renderPanelItem"),a=D((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:a,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 E(w("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 E(w("iBizCol"),{layoutPos:t.layoutPos,state:o.state},"function"==typeof(a=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(a)&&!A(a)?e:{default:()=>[e]});var a}))]}})})),E("div",{class:this.classArr},[t])}});class je{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new ze(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",Qt(Be,(function(t){t.component(Be.name,Be),st("CONTAINER_CONTAINER_MULTIDATA",(()=>new je))})));class Ve extends at{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",Ve);class Le extends rt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new Ve(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers(),this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,a;const r=await mt(t,e.model,e.view.model);if(!r)return;this.providers[t.id]=r;const s=await r.createController(t,e,n);this.panelItems[t.id]=s,(null==(o=t.panelItems)?void 0:o.length)&&!ht(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(a=t.panelTabPages)?void 0:a.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)})))}initContainerData(){const{dataSourceType:t,dataName:e}=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 G(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new G(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new _(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setData(t){var e,n;const o=pt(this.model),a=o.map((t=>t.id)),r=new ft(o,t);r._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])})),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=r,this.childrenStateNotify(gt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new G(this.model,"没有配置实体逻辑");if(!t)throw new G(this.model,"没有配置实体");const n=await vt(e,t,this.panel.context,[],this.panel.params);if(!n)throw new V("实体逻辑".concat(e,"没有返回值"));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error("全局变量里没有".concat(t,"属性"))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new G(this.model,"没有配置实体行为");if(!e)throw new G(this.model,"没有配置实体");const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error("绑定视图的会话不存在".concat(e));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error("视图state里没有".concat(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",Le);const Me=P({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Le,required:!0}},setup(t){const e=Wt("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach((e=>{const n=t.controller.panelItems[e];n.state=m(n.state)}));const o=h("renderPanelItem"),a=D((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:a,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():E(w("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 E(w("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)&&!A(o)?e:{default:()=>[e]});var o}))]}}),E("div",{class:this.classArr},[t])}});class ke{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new Le(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",Qt(Me,(function(t){t.component(Me.name,Me),st("CONTAINER_CONTAINER_SINGLEDATA",(()=>new ke))})));class _e extends at{}t("GridContainerState",_e);class Ge extends rt{createState(){var t;return new _e(null==(t=this.parent)?void 0:t.state)}}function We(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("GridContainerController",Ge);const qe=P({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ge,required:!0}},setup(t){const e=Wt("grid-container"),{id:n}=t.modelData,o=D((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=D((()=>({...t.modelData.layout,layout:"TABLE_12COL"}))),r=v(void 0),s=v(12);return{ns:e,classArr:o,layoutModel:a,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:r}},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 E(w("iBizRow"),{class:this.classArr,layout:this.layoutModel},We(n=o.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},We(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class $e{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new Ge(t,e,n);return await o.init(),o}}t("IBizGridContainer",Qt(qe,(function(t){t.component(qe.name,qe),st("CONTAINER_CONTAINER_GRID",(()=>new $e))})));class Ue extends at{}t("PanelContainerImageState",Ue);class Fe extends rt{createState(){var t;return new Ue(null==(t=this.parent)?void 0:t.state)}}function Ke(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("PanelContainerImageController",Fe);const He=P({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:Fe,required:!0}},setup(t){const e=Wt("panel-container-image"),{id:n}=t.modelData,o=D((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=D((()=>{const e=t.controller.model.sysImage,n={};let o="";return(null==e?void 0:e.rawContent)?o=M(e.rawContent)?"url(data:image/svg+xml;base64,".concat(btoa(e.rawContent),")"):"url(".concat(e.rawContent,")"):(null==e?void 0:e.imagePath)&&(o="url(".concat(e.imagePath,")")),o&&Object.assign(n,{backgroundImage:o}),n}));return{ns:e,classArr:o,backgroundStyle:a}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=E(w("iBizRow"),{slot:"content",layout:this.modelData.layout},Ke(n=o.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ke(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return E("div",{class:this.classArr,onClick:()=>{this.controller.onClick()},style:this.backgroundStyle},[this.controller.model.cssStyle?E("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class Xe{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new Fe(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",Qt(He,(function(t){t.component(He.name,He),st("CONTAINER_CONTAINER_IMAGE",(()=>new Xe))})));class Qe extends at{}t("PanelContainerGroupState",Qe);class Je extends rt{createState(){var t;return new Qe(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",Je);class Ye{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new Je(t,e,n);return await o.init(),o}}function Ze(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}const tn=P({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:Je,required:!0}},setup(t){const e=Wt("panel-container-group"),n=v(!t.controller.defaultExpansion);return{ns:e,captionText:D((()=>{const{captionItemName:e,caption:n,capLanguageRes:o}=t.modelData;if(e)return t.controller.data[e];let a=n;return o&&(a=ibiz.i18n.t(o.lanResTag,n)),a})),changeCollapse:()=>{t.controller.disableClose||(n.value=!n.value)},isCollapse:n}},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 a=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],r=E(w("iBizRow"),{slot:"content",layout:this.modelData.layout},Ze(n=a.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ze(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let s=null;return this.modelData.showCaption&&(s=E("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[E("div",{class:[this.ns.be("header","left")]},[E("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),E("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?E("ion-icon",{name:"caret-forward-sharp"},null):E("ion-icon",{name:"caret-down-sharp"},null))])])),E("div",{class:o},[s,E("div",{class:[this.ns.b("content")]},[r])])}});t("IBizPanelContainerGroup",Qt(tn,(function(t){t.component(tn.name,tn),st("CONTAINER_CONTAINER_GROUP",(()=>new Ye))})));function en(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}const nn=P({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:rt,required:!0}},setup(t){const e=Wt("panel-tab-page"),n=D((()=>{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 E(w("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},en(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return E(w("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},en(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class on{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new rt(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",Qt(nn,(function(t){t.component(nn.name,nn),st("TABPAGE",(()=>new on))})));class an extends rt{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];return n.layoutPanelModel?yt.execScriptFn({data:e||{}},n.layoutPanelModel,{singleRowReturn:!0,isAsync:!1}):void 0}}const rn=P({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:an,required:!0}},setup(t){var e;const n=Wt("panel-item-render"),o=Wt("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:a}=t.modelData,r=D((()=>[n.b(),n.m(a),o.b(),n.is("hidden",!t.controller.state.visible)])),s=D((()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data)));return{ns:n,classArr:r,htmlCode:s}},render(){return E("div",{class:this.classArr,innerHTML:this.htmlCode},null)}});class sn{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const o=new an(t,e,n);return await o.init(),o}}t("IBizPanelItemRender",Qt(rn,(function(t){t.component(rn.name,rn),st("PREDEFINE_RENDER",(()=>new sn))})));const ln=P({name:"IBizTeleportPlaceholder",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=Wt("teleport-placeholder"),n=v(""),{rawItem:o}=t.modelData;o&&o.cssStyle&&(n.value=o.cssStyle);const a=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:a,tempStyle:n}},render(){if(this.controller.state.visible)return E("div",{id:this.controller.state.teleportTag,class:this.classArr,style:this.tempStyle},null)}});class cn extends at{constructor(){super(...arguments),this.teleportTag=""}}class un extends rt{createState(){var t;return new cn(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 a=null==(e=null==(t=this.model.rawItem)?void 0:t.rawItemParams)?void 0:e.find((t=>"TeleportTag"===t.key));a&&a.value&&(o=a.value),ibiz.log.debug("视图".concat(n,"的面板成员").concat(this.model.id,"的占位标识是:"),o),this.state.teleportTag=o}}class dn{constructor(){this.component="IBizTeleportPlaceholder"}async createController(t,e,n){const o=new un(t,e,n);return await o.init(),o}}t("TeleportPlaceholderProvider",dn);t("IBizTeleportPlaceholder",Qt(ln,(function(t){t.component(ln.name,ln),st("RAWITEM_TELEPORT_PLACEHOLDER",(()=>new dn))})));const pn=P({name:"IBizPanelContainerTabs",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup:()=>({ns:Wt("panel-container-tabs")}),render(){return y(w("IBizPanelContainer"),{...this.$props,...this.$attrs,class:this.ns.b()},this.$slots)}});class hn{constructor(){this.component="IBizPanelContainerTabs"}async createController(t,e,n){const o=new oe(t,e,n);return await o.init(),o}}t("IBizPanelContainerTabs",Qt(pn,(function(t){t.component(pn.name,pn),st("CONTAINER_TABS",(()=>new hn))}))),t("AppRedirectView",P({setup(){var t;const e=k.create((null==(t=ibiz.appData)?void 0:t.context)||{});I((()=>{e.destroy()}));const{href:n}=window.location;b((()=>ibiz.util.hiddenAppLoading())),async function(){await wt(e,n)}()},render:()=>E("div",null,[x("重定向跳转中")])}));class mn{constructor(){this.component="IBizView"}}const fn=P({name:"IBizView",props:{context: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=Wt("view"),o=ee(((...t)=>new tt(...t))),a=Ct(o.model),r=[],s=new Map,i=[];a.forEach((t=>{const{teleportFlag:e,teleportTag:n}=bt(t);n||e?(r.push(t),s.set(t.id,n||"")):i.push(t)}));const{viewType:l,sysCss:c,codeName:u}=o.model,d=l.toLowerCase(),p=null==c?void 0:c.cssName,h=D((()=>[n.b(),n.b(d),n.m(u),p,o.state.viewMessages.TOP?"has-top-message":"",o.state.viewMessages.BOTTOM?"has-bottom-message":""])),m=t=>{const e=t.name||t.id;return{context:o.context,params:o.params,modelData:t,...o.slotProps[e]||{}}};return{c:o,ns:n,controls:i,teleportControls:r,viewClassNames:h,onLayoutPanelCreated:t=>{o.setLayoutPanel(t)},getCtrlProps:m,renderControl:t=>{const n=t.name||t.id,a=m(t);if(e[n])return T(e,n,a);const r=o.providers[n],s=w((null==r?void 0:r.component)||"IBizControlShell");return r&&(a.provider=r),y(s,a)},getCtrlTeleportTag:t=>{var e,n;const a=s.get(t.id);if(a)return a;const r=null==(n=null==(e=o.parentView)?void 0:e.layoutPanel)?void 0:n.panelItems[t.name];return r?"#".concat(r.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=E("span",{style:"color:red;"},[x("视图类型"),this.modelData.viewType,x("暂未支持")]);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]=()=>this.renderControl(t)}));const o=this.c.model.viewLayoutPanel,a=this.c.providers[o.name];n=y(w(a.component),{modelData:o,context:this.c.context,params:this.c.params,provider:a,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?E("div",{style:this.getControlStyle()},[E(S,{to:n,disabled:!this.c.state.activated},(o=e=this.renderControl(t),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]}))]):(ibiz.log.error("没有找到部件".concat(t.name,"的teleportTag")),null);var o})));let a=null;if(this.c.state.hasError&&this.c.error.status){const t=It(this.c.error.status);t&&("string"==typeof t.component&&(a=y(w(t.component))),a=y(t.component))}return O(E("div",{class:this.viewClassNames,id:this.c.id},[n,o,a]),[[N("loading"),this.c.state.isLoading]])}});class gn{constructor(){this.component="IBizView"}createController(t,e,n,o){return new Pt(t,e,n,o)}}t("IBizView",Qt(fn,(function(t){t.component(fn.name,fn),Dt("DEFAULT",(()=>new mn)),Dt("APPDATAUPLOADVIEW",(()=>new gn))}))),t("TodoRedirect",P({setup(){const t=K(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error("重定向参数不足无法跳转");const a=X.parse(o,{delimiter:";"}),{apptype:r,todotype:s,todoid:i}=a,l={srfapptype:"pc",srfapp:""};r||(l.todourltype="RouterUrl"),async function(){let e=(await ibiz.net.post("/systodos/".concat(i,"/getlinkurl"),l)).data.linkurl;r?window.location.href=e:(0!==e.indexOf("/")&&(e="/".concat(e)),e+=";srfwf=".concat(s),t.push("/index".concat(e)))}()},render:()=>E("div",null,[x("待办列表重定向")])}));class vn{constructor(){this.component="IBizPortalView"}}const yn=P({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=Wt("view"),n=ee(((...t)=>new tt(...t))),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:a,sysCss:r,codeName:s}=n.model,i=a.toLowerCase(),l=null==r?void 0:r.cssName,c=[e.b(),e.b(i),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 a=n[e];if(a)return void(n[e]=()=>a({modelData:t,...o}));const r=this.c.providers[e];r&&(n[e]=()=>{const e=w(r.component);return y(e,{modelData:t,...o,provider:r})})})),n.dashboard&&(e=n.dashboard())}return E("div",{class:this.viewClassNames},[e])}}),wn=(t("IBizPortalView",Qt(yn,(function(t){t.component(yn.name,yn),Dt(Q.APP_PORTAL_VIEW,(()=>new vn)),Dt(Q.DE_PORTAL_VIEW,(()=>new vn)),Dt(Q.DE_PORTAL_VIEW9,(()=>new vn))}))),P({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0}},setup(t){const e=ee(((...t)=>new tt(...t))),n=v(),o=v(),a=v();return e.evt.on("onCreated",(()=>{Et(p(t.modelData),p(e.context),p(e.params)).then((async t=>{if("view"!==t.type)throw new V("嵌入重定向视图不支持url跳转");n.value=t.viewId,o.value=t.context,a.value=t.params}))})),{c:e,toViewId:n,toViewContext:o,toViewParams:a}},render(){return this.toViewId?y(w("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):O(E("div",{style:"width: 100%; height: 100%;"},null),[[N("loading"),!this.toViewId]])}}));class Cn{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",Qt(wn,(function(t){t.component(wn.name,wn);const e=new Cn;Dt(Q.DE_REDIRECT_VIEW,(()=>e))})));function bn(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach((t=>{t.attrName&&t.attrValue&&(o[t.attrName]=yt.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))})),o}const In=P({name:"IBizViewLayoutPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object},setup(t,{slots:e}){const n=_t(((...e)=>new Ot(...e,t.container))),o=Wt("control-".concat(n.model.controlType.toLowerCase()));i((()=>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=m(e.state)}))}));const a=(t,o)=>{var r,s;if(t.hidden)return null;const{providers:i,panelItems:l}=o||n,c=i[t.id];if(!c)return E("div",null,[x("暂未支持的面板项: "),t.id,x(" - "),t.itemType]);if("CTRLPOS"!==t.itemType&&e[t.id])return T(e,t.id,{model:t,data:n.data,value:n.data[t.id]});const u=w(c.component);let d;"CTRLPOS"===t.itemType&&e[t.id]?d=()=>e[t.id]():"TABPANEL"===t.itemType&&(null==(r=t.panelTabPages)?void 0:r.length)?d=()=>t.panelTabPages.map((t=>a(t,o))):ht(t)?d=void 0:(null==(s=t.panelItems)?void 0:s.length)&&(d=()=>t.panelItems.map((t=>a(t,o))));let p="";t.cssStyle&&(p=t.cssStyle);const h=l[t.id];return y(u,{modelData:t,controller:h,key:t.id,style:p,attrs:bn(t,h)},d)};return C("renderPanelItem",a),{c:n,ns:o,renderPanelItem:a}},render(){const{state:t,model:e}=this.c;return E(w("iBizControlBase"),{controller:this.c},{default:()=>[E(w("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",E(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]});var o})))]}})]})}});class Pn{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",Qt(In,(function(t){t.component(In.name,In),Nt(At.VIEW_LAYOUT_PANEL,(()=>new Pn))})));function Dn(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach((t=>{t.attrName&&t.attrValue&&(o[t.attrName]=yt.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))})),o}function En(t,e,n){var o,a;if(t.hidden)return;const{providers:r,panelItems:s}=e,i=r[t.id];if(!i)return E("div",null,[x("暂未支持的面板项: "),t.id,x(" - "),t.itemType]);const l=w(i.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=>En(t,e,n))):(null==(a=t.panelItems)?void 0:a.length)&&(c=()=>t.panelItems.map((t=>En(t,e,n))));let u="";t.cssStyle&&(u=t.cssStyle);const d=s[t.id];return y(l,{modelData:t,controller:d,key:t.id,style:u,attrs:Dn(t,d)},c)}const On=P({name:"IBizPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object,loadDefault:{type:Boolean,default:!0}},setup(t){const e=_t(((...e)=>new xt(...e,t.container))),n=Wt("control-".concat(e.model.controlType.toLowerCase()));return i((()=>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=m(n.state)}))})),{c:e,ns:n}},render(){const{state:t,model:e}=this.c;return E(w("iBizControlBase"),{controller:this.c},{default:()=>[E(w("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",E(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=En(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]});var o})))]}})]})}});class Nn{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",Qt(On,(function(t){t.component(On.name,On),Nt(At.PANEL,(()=>new Nn))})));function An(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function xn(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function Sn(t,e){for(var n,o="",a=0,r=-1,s=0,i=0;i<=t.length;++i){if(i<t.length)n=t.charCodeAt(i);else{if(47===n)break;n=47}if(47===n){if(r===i-1||1===s);else if(r!==i-1&&2===s){if(o.length<2||2!==a||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="",a=0):a=(o=o.slice(0,l)).length-1-o.lastIndexOf("/"),r=i,s=0;continue}}else if(2===o.length||1===o.length){o="",a=0,r=i,s=0;continue}e&&(o.length>0?o+="/..":o="..",a=2)}else o.length>0?o+="/"+t.slice(r+1,i):o=t.slice(r+1,i),a=i-r-1;r=i,s=0}else 46===n&&-1!==s?++s:s=-1}return o}var Tn={resolve:function(){for(var t,e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var a;o>=0?a=arguments[o]:(void 0===t&&(t=process.cwd()),a=t),xn(a),0!==a.length&&(e=a+"/"+e,n=47===a.charCodeAt(0))}return e=Sn(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(xn(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=Sn(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return xn(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];xn(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":Tn.normalize(t)},relative:function(t,e){if(xn(t),xn(e),t===e)return"";if((t=Tn.resolve(t))===(e=Tn.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,a=o-n,r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var s=e.length-r,i=a<s?a:s,l=-1,c=0;c<=i;++c){if(c===i){if(s>i){if(47===e.charCodeAt(r+c))return e.slice(r+c+1);if(0===c)return e.slice(r+c)}else a>i&&(47===t.charCodeAt(n+c)?l=c:0===c&&(l=0));break}var u=t.charCodeAt(n+c);if(u!==e.charCodeAt(r+c))break;47===u&&(l=c)}var d="";for(c=n+l+1;c<=o;++c)c!==o&&47!==t.charCodeAt(c)||(0===d.length?d+="..":d+="/..");return d.length>0?d+e.slice(r+l):(r+=l,47===e.charCodeAt(r)&&++r,e.slice(r))},_makeLong:function(t){return t},dirname:function(t){if(xn(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,o=-1,a=!0,r=t.length-1;r>=1;--r)if(47===(e=t.charCodeAt(r))){if(!a){o=r;break}}else a=!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');xn(t);var n,o=0,a=-1,r=!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,i=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!r){o=n+1;break}}else-1===i&&(r=!1,i=n+1),s>=0&&(l===e.charCodeAt(s)?-1==--s&&(a=n):(s=-1,a=i))}return o===a?a=i:-1===a&&(a=t.length),t.slice(o,a)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!r){o=n+1;break}}else-1===a&&(r=!1,a=n+1);return-1===a?"":t.slice(o,a)},extname:function(t){xn(t);for(var e=-1,n=0,o=-1,a=!0,r=0,s=t.length-1;s>=0;--s){var i=t.charCodeAt(s);if(47!==i)-1===o&&(a=!1,o=s+1),46===i?-1===e?e=s:1!==r&&(r=1):-1!==e&&(r=-1);else if(!a){n=s+1;break}}return-1===e||-1===o||0===r||1===r&&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){xn(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,o=t.charCodeAt(0),a=47===o;a?(e.root="/",n=1):n=0;for(var r=-1,s=0,i=-1,l=!0,c=t.length-1,u=0;c>=n;--c)if(47!==(o=t.charCodeAt(c)))-1===i&&(l=!1,i=c+1),46===o?-1===r?r=c:1!==u&&(u=1):-1!==r&&(u=-1);else if(!l){s=c+1;break}return-1===r||-1===i||0===u||1===u&&r===i-1&&r===s+1?-1!==i&&(e.base=e.name=0===s&&a?t.slice(1,i):t.slice(s,i)):(0===s&&a?(e.name=t.slice(1,r),e.base=t.slice(1,i)):(e.name=t.slice(s,r),e.base=t.slice(s,i)),e.ext=t.slice(r,i)),s>0?e.dir=t.slice(0,s-1):a&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Tn.posix=Tn;var Rn=Tn,zn=An(Rn);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)}))}async loadPredefinedPlugin(t){if(this.predefinedPlugins.has(t)){const e=this.predefinedPlugins.get(t);e&&await this.loadPluginRef(e.name,e.path)}}setPluginCode(t){this.pluginCodes.push(t),zt.useComponent.callSync(null,t)}async loadPlugin(t){if(!0===t.runtimeObject){const e=t;if(e){const t=e.rtobjectName,n=e.rtobjectRepo;if(this.isIgnore(n))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(n)){const t=await this.loadQueue.get(n);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(e.rtobjectName,e.rtobjectRepo);this.loadQueue.set(n,t);return await t}catch(t){throw new G(e,"配置加载失败")}finally{this.loadQueue.delete(n)}}}return!1}async loadPluginRef(t,e){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let n=null;{const t=e,o=this.urlReg.test(t)?"".concat(t,"/package.json"):"".concat(ibiz.env.pluginBaseUrl,"/").concat(Rn.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("配置加载失败");n=a.data}const o=new St(t,e,n);if(o){await this.loadPluginExternal(o.config);try{return await this.loadScript(o),this.pluginCache.set(t,o),!0}catch(t){ibiz.log.error(t)}}return!1}async loadScript(t){const e=t.repo,{name:n,system:o,styles:a=[]}=t.config;let r="";if(r=Rn.join(e,o),r){if(this.cache.has(r))return;let t=null;const o=this.parseUrl(r),s=("string"==typeof a?[a]:a).map((t=>this.parseUrl(zn.join(e,t))));if(System.addImportMap({imports:{[n]:o},styles:{[n]:s}}),t=await System.import(n),!t)throw new V("远程插件加载失败, 未找到文件或文件内容格式不正确");if(!t.default)throw new V("远程插件加载失败, 远程插件未找到[default]默认导出");this.setPluginCode(t.default),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(Rn.join(e,t));const{origin:o,pathname:a}=window.location;return a.endsWith("/")&&n.startsWith("/")&&(n=n.substring(1)),!1===this.urlReg.test(n)&&(n="".concat(o).concat(a).concat(n)),n}async loadPluginExternal(t){if(!t["systemjs-importmap"])return;const e=this.handleSystemImportMap(t["systemjs-importmap"]);if(e.packages){const t=e.packages;for(const e in t){const n=t[e],o=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:n});if(200!==o.status)throw new Error("配置加载失败");await this.loadPluginExternal(o.data)}}System.addImportMap(e)}handleSystemImportMap(t){if(t){if(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 Bn{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function jn(){return{value:String,controller:new Bn(Object),data:new Bn(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function Vn(){return{hasError:{type:Boolean}}}function Ln(){return{...jn(),value:[String,Number]}}function Mn(){return{...jn(),value:Number}}function kn(){return{...jn(),value:String}}function _n(){return{...jn(),value:[String,Number,Object,Array]}}function Gn(){return{...jn(),value:[String,Number]}}function Wn(){return{...jn(),value:[String,Number]}}function qn(){return{...jn(),value:[String,Number]}}function $n(){return{...jn(),value:[String,Array,Object,Number]}}function Un(){return{...jn(),value:[String,Number]}}function Fn(){return{...jn(),value:[String,Number]}}function Kn(){return{...jn(),value:[String,Number]}}function Hn(){return{...jn(),value:[String,Number]}}function Xn(){return{...jn(),value:[String,Number]}}function Qn(){return{...jn(),value:[String,Number]}}function Jn(){return{...jn(),value:[String,Number,Array]}}function Yn(){return{...jn(),value:[String,Number]}}function Zn(){return{...jn(),value:[String,Number]}}function to(){return{...jn(),value:[String,Number]}}function eo(){return{...jn(),value:String}}function no(){return{...jn(),value:[String,Number]}}function oo(){return{...jn(),value:String,language:{type:String},theme:{type:String}}}function ao(){return{...jn(),value:String}}function ro(){return{...jn(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function so(){return{...jn(),value:[Array,Array]}}function io(){return{...jn(),value:String}}function lo(){return{...jn(),value:String}}t("RequiredProp",Bn)}}}));
@@ -1 +1 @@
1
- {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/util/route/route.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,IAAI,KAAK,EAAY,MAAM,YAAY,CAAC;AAE9E,OAAO,EAGL,WAAW,EAGZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAkB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,EACZ,YAAY,GAAE,OAAe,GAC5B,UAAU,CAqEZ;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAuD9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAc7D;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAYpC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,QAAQ,EACjB,eAAe,CAAC,EAAE,MAAM,EACxB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA6D3B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA+B3B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,YAAY,GAAE,OAAe,GAC5B,OAAO,CAAC,cAAc,CAAC,CAwDzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,OAAc,GACvB,MAAM,CAwBR;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,KAAK,IAAI,EAClE,KAAK,EAAE,MAAM,GACZ,IAAI,CAaN"}
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/util/route/route.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,IAAI,KAAK,EAAY,MAAM,YAAY,CAAC;AAE9E,OAAO,EAGL,WAAW,EAGZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAkB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,EACZ,YAAY,GAAE,OAAe,GAC5B,UAAU,CAqEZ;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAuD9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAc7D;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAYpC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,QAAQ,EACjB,eAAe,CAAC,EAAE,MAAM,EACxB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA6D3B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA+B3B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,YAAY,GAAE,OAAe,GAC5B,OAAO,CAAC,cAAc,CAAC,CAwDzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,OAAc,GACvB,MAAM,CA4BR;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,KAAK,IAAI,EAClE,KAAK,EAAE,MAAM,GACZ,IAAI,CAaN"}
@@ -268,8 +268,12 @@ function getNestedRoutePath(route, depth, noSrfNav = true) {
268
268
  if (routePath.pathNodes.length > depth) {
269
269
  routePath.pathNodes = routePath.pathNodes.slice(0, depth);
270
270
  }
271
+ const pathNode = routePath.pathNodes[depth - 1];
271
272
  if (noSrfNav) {
272
- delete routePath.pathNodes[depth - 1].srfnav;
273
+ delete pathNode.srfnav;
274
+ }
275
+ if (pathNode.context) {
276
+ delete pathNode.context.srfpaginationviewid;
273
277
  }
274
278
  return routePath2string(routePath);
275
279
  }
@@ -270,8 +270,12 @@ function getNestedRoutePath(route, depth, noSrfNav = true) {
270
270
  if (routePath.pathNodes.length > depth) {
271
271
  routePath.pathNodes = routePath.pathNodes.slice(0, depth);
272
272
  }
273
+ const pathNode = routePath.pathNodes[depth - 1];
273
274
  if (noSrfNav) {
274
- delete routePath.pathNodes[depth - 1].srfnav;
275
+ delete pathNode.srfnav;
276
+ }
277
+ if (pathNode.context) {
278
+ delete pathNode.context.srfpaginationviewid;
275
279
  }
276
280
  return routePath2string(routePath);
277
281
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-util",
3
- "version": "0.7.8",
3
+ "version": "0.7.10",
4
4
  "description": "vue3 工具包",
5
5
  "main": "lib/index.cjs",
6
6
  "types": "es/index.d.ts",
@@ -40,9 +40,9 @@
40
40
  "devDependencies": {
41
41
  "@ibiz-template/cli": "^0.3.10",
42
42
  "@ibiz-template/core": "^0.7.7-dev.0",
43
- "@ibiz-template/runtime": "^0.7.8",
43
+ "@ibiz-template/runtime": "^0.7.10",
44
44
  "@ibiz-template/theme": "^0.7.0",
45
- "@ibiz/model-core": "^0.1.23",
45
+ "@ibiz/model-core": "^0.1.25",
46
46
  "@types/path-browserify": "^1.0.2",
47
47
  "@types/qs": "^6.9.11",
48
48
  "@types/systemjs": "^6.13.5",
@@ -59,7 +59,7 @@
59
59
  "peerDependencies": {
60
60
  "@ibiz-template/core": "^0.6.0",
61
61
  "@ibiz-template/runtime": "^0.6.0",
62
- "@ibiz/model-core": "^0.1.23",
62
+ "@ibiz/model-core": "^0.1.25",
63
63
  "dayjs": "^1.11.10",
64
64
  "path-browserify": "^1.0.1",
65
65
  "pinia": "^2.1.7",