@gct-paas/render 0.1.6-dev.1 → 0.1.6-dev.3

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
- import{ASSIGNMENTSTRATEGY_ENUM as e,BizServiceEnum as t,ButtonTypeEnum as n,DateRangeEnums as r,DefaultDateTypeConst as o,Dependency_ENUM as i,DisplayType as a,EntityModelCategoryEnum as s,ExamineAndApproveStateEnum as u,FIELD_TYPE as c,FieldSysVarDefaultValueEnum as l,FormComponents as d,GLOBAL_VAR_TYPE as f,INNER_EVENT as p,OpinionTypeEnum as h,PluginModeEnum as g,PluginPgkUtil as m,SEARCH_SERVICE as y,SYSTEM_VAR_PREFIX as v,calcStyle as b,cssLoader as w,functionMap as O,gctMemoizeAsync as D,innerVarIds as E,isMultipleOperator as I,operator2FuncMap as S,t as T,useNamespace as C,usePermissionStore as N}from"@gct-paas/core";import M from"dayjs";import*as x from"vue";import{TransitionGroup as R,computed as P,createElementBlock as A,createElementVNode as _,createTextVNode as k,createVNode as Y,customRef as $,defineComponent as j,getCurrentInstance as H,getCurrentScope as V,h as F,inject as B,isVNode as U,nextTick as L,onActivated as G,onBeforeUnmount as K,onMounted as W,onScopeDispose as q,onUnmounted as z,openBlock as J,provide as X,reactive as Q,readonly as Z,ref as ee,resolveComponent as te,shallowReactive as ne,shallowRef as re,toRaw as oe,toRef as ie,toRefs as ae,toValue as se,unref as ue,watch as ce}from"vue";import{DesignNodeMode as le,extractFontStyle as de,generateWrapperStyle as fe,propsToStyle as pe}from"@gct-paas/schema";import*as he from"lodash-es";import{cloneDeep as ge,differenceBy as me,get as ye,isArray as ve,isEqual as be,isNull as we,isUndefined as Oe,merge as De,pick as Ee}from"lodash-es";import Ie from"bignumber.js";import*as Se from"esprima-next";import Te from"estraverse";import Ce from"escodegen";import Ne from"qs";var Me=Object.create,xe=Object.defineProperty,Re=Object.getOwnPropertyDescriptor,Pe=Object.getOwnPropertyNames,Ae=Object.getPrototypeOf,_e=Object.prototype.hasOwnProperty,ke=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ye=(e,t)=>{let n={};for(var r in e)xe(n,r,{get:e[r],enumerable:!0});return t||xe(n,Symbol.toStringTag,{value:"Module"}),n},$e=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var o,i=Pe(t),a=0,s=i.length;a<s;a++)o=i[a],_e.call(e,o)||o===n||xe(e,o,{get:(e=>t[e]).bind(null,o),enumerable:!(r=Re(t,o))||r.enumerable});return e},je=(e,t,n)=>(n=null!=e?Me(Ae(e)):{},$e(!t&&e&&e.__esModule?n:xe(n,"default",{value:e,enumerable:!0}),e));function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}function Ve(e,t,n){return(t=function(e){var t=function(e){if("object"!=He(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=He(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==He(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fe=class{constructor(){Ve(this,"map",/* @__PURE__ */new Map)}register(e,t){this.map.set(e,t)}unregister(e){this.map.delete(e)}get(e){const t=this.map.get(e);return t||console.warn(`No component registered for tag: ${e}`),t}keys(){return Array.from(this.map.keys())}},Be="view-design",Ue="id",Le=/* @__PURE__ */function(e){return e.ACTIVE_TAG="design-active-item",e.DRAG_TAG="design-drop-item",e.INDEX_TAG="design-item-index",e.NODE_ID_TAG="design-item-id",e.DESIGN_NAME="design-item-name",e.GROUP_TAG="design-group-tag",e.DRAG_GROUP_TYPE="drag-group-type",e.IS_INLINE_BLOCK="is-inline-block",e.SELECTOR_INDEX="selector-index",e}({}),Ge={WEEK_NOW:e=>{const t=M().startOf("week").add(1,"day"),n=M().endOf("week").add(1,"day"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},MONTH_NOW:e=>{const t=M().startOf("month"),n=M().endOf("month"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},QUARTER_NOW:e=>{const t=M().startOf("quarter"),n=M().endOf("quarter"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},YEAR_NOW:e=>{const t=M().startOf("year"),n=M().endOf("year"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},WEEk_BEFORE:e=>{M.locale("zh-cn");const t=M().startOf("week").subtract(1,"week"),n=t.clone().endOf("week"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},MONTH_BEFORE:e=>{const t=M().add(-1,"month").startOf("month"),n=M().add(-1,"month").endOf("month"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},QUARTER_BEFORE:e=>{const t=M().add(-1,"quarter").startOf("quarter"),n=M().add(-1,"quarter").endOf("quarter"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},YEAR_BEFORE:e=>{const t=M().add(-1,"year").startOf("year"),n=M().add(-1,"year").endOf("year"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},DATE_BEFORE:e=>{const t=M().add(-1,"day");return{disabled:e<t.valueOf(),maxDate:t}},DATE_AFTER:e=>{const t=M();return{disabled:e>t.valueOf(),minDate:t}}},Ke=(e,t)=>{const n=M(e).valueOf(),r=Ge[t];if(r){const{disabled:e}=r(n);return e}return!1},We=e=>{const t=Ge[e];if(t){const{minDate:e,maxDate:n}=t(0);return Object.assign({},e&&{minDate:new Date(e)},n&&{maxDate:new Date(n)})}return{}},qe=(e,t)=>{let n;switch(e){case l.SYS_DATE:n=M().format(t??"YYYY-MM-DD");break;case l.SYS_DATE_TIME:n=M().format(t??"YYYY-MM-DD HH:mm:ss");break;case l.SYS_TIME:n=M().format(t??"HH:mm:ss")}return n},ze={YYYY:{valueFormat:"YYYY-01-01",picker:"year",columnsType:["year"]},"YYYY HH":{valueFormat:"YYYY-01-01 HH:00:00",columnsType:["hour"]},"YYYY-MM HH:mm":{valueFormat:"YYYY-MM-01 HH:mm:00",columnsType:["hour","minute"]},"YYYY-MM":{valueFormat:"YYYY-MM-01",picker:"month",columnsType:["year","month"]},"YYYY-MM-DD":{valueFormat:"YYYY-MM-DD",picker:"date",columnsType:["year","month","day"]},"YYYY-MM-DD HH":{valueFormat:"YYYY-MM-DD HH:00:00",columnsType:["hour"]},"YYYY-MM-DD HH:mm":{valueFormat:"YYYY-MM-DD HH:mm:00",columnsType:["hour","minute"]},"YYYY-MM-DD HH:mm:ss":{valueFormat:"YYYY-MM-DD HH:mm:ss",columnsType:["hour","minute","second"]},"HH:mm:ss":{valueFormat:"HH:mm:ss",columnsType:["hour","minute","second"]},"HH:mm":{valueFormat:"HH:mm:00",columnsType:["hour","minute"]},HH:{valueFormat:"HH:00:00",columnsType:["hour"]}},Je={[r.WEEK_NOW]:""},Xe=/* @__PURE__ */function(e){return e.DESIGN_RENDER="design-render",e}({}),Qe=/* @__PURE__ */function(e){return e.CUSTOM_HOME="custom-home",e.CARD_VIEW="card-view",e.MOBILE_CARD_VIEW="mobile-card-view",e.DESIGN_EDITOR="design-editor",e}({}),Ze=/* @__PURE__ */function(e){return e.PAGE="PAGE",e.PAGE_LOWER="page",e.FIELD="field",e.PANEL="panel",e.TABS="tabs",e.TAB_ITEM="tab-item",e.MENU_LIST="menu-list",e.SELECT_COMPONENT="select-component",e.GRID="grid",e.GRID_ITEM="grid-item",e.MESSAGE="message",e.WORKBENCH="workbench",e.PERSONAL_CENTER="personal-center",e.TODO="todo",e}({}),et=class{static register(e,t,n){const r=n?`${n}:${e}`:e;this.map.set(r,t)}static get(e,t){const n=t?`${t}:${e}`:e;if(this.cache.has(n))return this.cache.get(n);const r=this.map.get(n);if(r){const e=r();return this.cache.set(n,e),e}return null}static registerCustomHome(e,t){this.register(e,t,Qe.CUSTOM_HOME)}static registerDesignEditorNode(e,t){this.register(e,t,Qe.DESIGN_EDITOR)}static getCustomHome(e){return this.get(e,Qe.CUSTOM_HOME)}static getDesignEditorNode(e){return this.get(e,Qe.DESIGN_EDITOR)}};Ve(et,"map",/* @__PURE__ */new Map),Ve(et,"cache",/* @__PURE__ */new Map);var tt=/* @__PURE__ */j({name:"DesignRenderItem",props:{model:{type:Object,required:!0}},setup(e,{slots:t}){const n=C("design-render-item"),r=b(e.model.data);return()=>{var e;return Y("div",{class:n.b(),style:r},[null===(e=t.default)||void 0===e?void 0:e.call(t)])}}}),nt=class{constructor(){Ve(this,"context",{})}},rt=class{constructor(){Ve(this,"isDestroy",!1)}},ot=class{constructor(e){Ve(this,"state",new rt),this.model=e}mounted(){}destroy(){}},it=class extends ot{},at=class extends ot{},st=class{constructor(){Ve(this,"state",new nt),Ve(this,"prefix",""),Ve(this,"preview",!1),Ve(this,"item",/* @__PURE__ */new Map),Ve(this,"nodes",[]),Ve(this,"tree",[])}setTree(e){this.tree=e}setNodes(e){this.reset(),this.nodes=e,this.nodes.forEach(e=>{const t=et.get(e.type,this.prefix);if(t){if(t.createController)return void this.item.set(e.id,t.createController(e));if(t.mode===le.CONTAINER)return void this.item.set(e.id,new it(e));if(t.mode===le.ITEM)return void this.item.set(e.id,new at(e))}this.item.set(e.id,new ot(e))})}getNodes(e){if(e){const t=this.getTreeItem(e);return t&&t.children?t.children.map(e=>this.nodes.find(t=>e.id===t.id)):[]}return this.tree.map(e=>this.nodes.find(t=>e.id===t.id))}getTreeItem(e,t=this.tree){if(!e)return null;for(const n of t){if(n.id===e)return n;if(n.children&&n.children.length>0){const t=this.getTreeItem(e,n.children);if(t)return t}}return null}getController(e){return this.item.get(e)}mounted(){}unmounted(){this.reset()}reset(){this.nodes=[],this.item.forEach(e=>{e.destroy()})}};function ut(e){let t=B(Xe.DESIGN_RENDER);return t||(t=e?e():new st,t.state=Q(t.state),X(Xe.DESIGN_RENDER,t),W(()=>{t.mounted()}),z(()=>{t.unmounted()})),t}var ct="undefined"!=typeof window&&"undefined"!=typeof document,lt=("undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),Object.prototype.toString),dt=()=>{},ft=e=>e();function pt(e,t={}){let n,r,o=dt;const i=e=>{clearTimeout(e),o(),o=dt};let a;return s=>{const u=se(e),c=se(t.maxWait);return n&&i(n),u<=0||void 0!==c&&c<=0?(r&&(i(r),r=void 0),Promise.resolve(s())):new Promise((e,l)=>{o=t.rejectOnCancel?l:e,a=s,c&&!r&&(r=setTimeout(()=>{n&&i(n),r=void 0,e(a())},c)),n=setTimeout(()=>{r&&i(r),r=void 0,e(s())},u)})}}function ht(e){return Array.isArray(e)?e:[e]}function gt(e){const t=Object.create(null);return n=>t[n]||(t[n]=e(n))}var mt=/\B([A-Z])/g,yt=(gt(e=>e.replace(mt,"-$1").toLowerCase()),/-(\w)/g);function vt(e,t,n={}){const{eventFilter:r=ft,...o}=n;return ce(e,(i=r,a=t,function(...e){return new Promise((t,n)=>{Promise.resolve(i(()=>a.apply(this,e),{fn:a,thisArg:this,args:e})).then(t).catch(n)})}),o);var i,a}function bt(e,t=!0,n){!function(e){return e||H()}(n)?t?e():L(e):W(e,n)}function wt(e,t,n={}){const{debounce:r=0,maxWait:o,...i}=n;return vt(e,t,{...i,eventFilter:pt(r,{maxWait:o})})}gt(e=>e.replace(yt,(e,t)=>t?t.toUpperCase():""));var Ot=ct?window:void 0,Dt=ct?window.document:void 0;function Et(...e){const t=P(()=>{const t=ht(se(e[0])).filter(e=>null!=e);return t.every(e=>"string"!=typeof e)?t:void 0});return n=([e,t,n,r],o,i)=>{if(!(null==e?void 0:e.length)||!(null==t?void 0:t.length)||!(null==n?void 0:n.length))return;const a=(s=r,"[object Object]"===lt.call(s)?{...r}:r);var s;const u=e.flatMap(e=>t.flatMap(t=>n.map(n=>((e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)))(e,t,n,a))));i(()=>{u.forEach(e=>e())})},r={flush:"post"},ce(()=>{var n,r;return[null!==(n=null===(r=t.value)||void 0===r?void 0:r.map(e=>function(e){var t;const n=se(e);return null!==(t=null==n?void 0:n.$el)&&void 0!==t?t:n}(e)))&&void 0!==n?n:[Ot].filter(e=>null!=e),ht(se(t.value?e[1]:e[0])),ht(ue(t.value?e[2]:e[1])),se(t.value?e[3]:e[2])]},n,{...r,immediate:!0});var n,r}ct&&window.navigator,ct&&window.location;var It="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},St="__vueuse_ssr_handlers__",Tt=/* @__PURE__ */Ct();function Ct(){return St in It||(It[St]=It[St]||{}),It[St]}var Nt={boolean:{read:e=>"true"===e,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Mt="vueuse-storage";function xt(e,t,n,r={}){var o;const{flush:i="pre",deep:a=!0,listenToStorageChanges:s=!0,writeDefaults:u=!0,mergeDefaults:c=!1,shallow:l,window:d=Ot,eventFilter:f,onError:p=e=>{console.error(e)},initOnMounted:h}=r,g=(l?re:ee)("function"==typeof t?t():t),m=P(()=>se(e));if(!n)try{n=(Tt.getDefaultStorage||(()=>null==Ot?void 0:Ot.localStorage))()}catch(S){p(S)}if(!n)return g;const y=se(t),v=function(e){return null==e?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"object"==typeof e?"object":Number.isNaN(e)?"any":"number"}(y),b=null!==(o=r.serializer)&&void 0!==o?o:Nt[v],{pause:w,resume:O}=function(e,t,n={}){const{eventFilter:r,initialState:o="active",...i}=n,{eventFilter:a,pause:s,resume:u,isActive:c}=function(e=ft,t={}){const{initialState:n="active"}=t,r=function(...e){if(1!==e.length)return ie(...e);const t=e[0];return"function"==typeof t?Z($(()=>({get:t,set:dt}))):ee(t)}("active"===n);return{isActive:Z(r),pause:function(){r.value=!1},resume:function(){r.value=!0},eventFilter:(...t)=>{r.value&&e(...t)}}}(r,{initialState:o});return{stop:vt(e,t,{...i,eventFilter:a}),pause:s,resume:u,isActive:c}}(g,e=>function(e){try{const t=n.getItem(m.value);if(null==e)E(t,null),n.removeItem(m.value);else{const r=b.write(e);t!==r&&(n.setItem(m.value,r),E(t,r))}}catch(S){p(S)}}(e),{flush:i,deep:a,eventFilter:f});ce(m,()=>I(),{flush:i});let D=!1;function E(e,t){if(d){const r={key:m.value,oldValue:e,newValue:t,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",r):new CustomEvent(Mt,{detail:r}))}}function I(e){if(!e||e.storageArea===n)if(e&&null==e.key)g.value=y;else if(!e||e.key===m.value){w();try{const t=b.write(g.value);void 0!==e&&(null==e?void 0:e.newValue)===t||(g.value=function(e){const t=e?e.newValue:n.getItem(m.value);if(null==t)return u&&null!=y&&n.setItem(m.value,b.write(y)),y;if(!e&&c){const e=b.read(t);return"function"==typeof c?c(e,y):"object"!==v||Array.isArray(e)?e:{...y,...e}}return"string"!=typeof t?t:b.read(t)}(e))}catch(S){p(S)}finally{e?L(O):O()}}}return d&&s&&(n instanceof Storage?Et(d,"storage",e=>{h&&!D||I(e)},{passive:!0}):Et(d,Mt,e=>{h&&!D||I(e.detail)})),h?bt(()=>{D=!0,I()}):I(),g}function Rt(e,t){const n=(null==t?void 0:t.cache)?ne(t.cache):ne(/* @__PURE__ */new Map),r=(...e)=>(null==t?void 0:t.getKey)?t.getKey(...e):JSON.stringify(e),o=(t,...r)=>(n.set(t,e(...r)),n.get(t)),i=(...e)=>{const t=r(...e);return n.has(t)?n.get(t):o(t,...e)};return i.load=(...e)=>o(r(...e),...e),i.delete=(...e)=>{n.delete(r(...e))},i.clear=()=>{n.clear()},i.generateKey=r,i.cache=n,i}var Pt=0;Number.POSITIVE_INFINITY;var At=/* @__PURE__ */function(e){return e.SELECT_ID="$VAR_GCT_SELECT_ID",e}({}),_t=function(e,t,n={}){const{window:r=Ot}=n;return xt(e,t,null==r?void 0:r.localStorage,n)}("GCT_APP_GlobalCache",{}),kt=e=>{const t=P({get:()=>_t.value[e]||{},set(t){_t.value[e]=t}});return{selectID:P({get:()=>t.value[At.SELECT_ID],set(e){t.value[At.SELECT_ID]?t.value[At.SELECT_ID]=e:t.value={...t.value,[At.SELECT_ID]:e}}}),cacheMap:t}},Yt=class{static async getMap(e,t=!0){if(!e)return Promise.reject();if(!this.responsePromise.has(e)||!t){const t=(async()=>{const t=await _gct.api.apaas.modelMeta.getDetail({modelKey:e});this.modelData.set(e,t);const n=!!(null==t?void 0:t.fieldMetaList)&&t.fieldMetaList.reduce((e,t)=>(t.key&&(e[t.key]=t),e),{});n&&this.FiledData.set(e,n)})();this.responsePromise.set(e,t)}return this.responsePromise.get(e)}static async getConfigByField(e,t,n=!0){return await this.getMap(e,n),this.FiledData.get(e)[t]}static async getConfigByModel(e){return await this.getMap(e),this.modelData.get(e)}static clearCacheMap(e=!1){e&&this.responsePromise.clear(),this.modelData.clear(),this.FiledData.clear()}};async function $t(e,t=!1){const{modelKey:n,field:r,isCustomField:o,fieldName:i,readonly:a,fieldType:s}=e.props;if(!e.isField&&!t||"table_name_"===r)return{};let u;if(o?u={name:i,type:""}:n&&(u=await Yt.getConfigByField(n,r)),!(o||u&&u.type===s))throw new Error("该字段可能已经被删除");if(!u)return{};const{required:c,specificConfig:l}=u;return e.props.fieldRequired=!!c,c&&!a&&(e.props.required=!0),void 0!==(null==l?void 0:l.digits)&&(e.props.precision=l.digits),u}Ve(Yt,"modelData",/* @__PURE__ */new Map),Ve(Yt,"FiledData",/* @__PURE__ */new Map),Ve(Yt,"responsePromise",/* @__PURE__ */new Map),Ve(Yt,"silent",!1);var jt=()=>{const e=ee({});return{getFileAttrs:async function({modelKey:t,fieldKey:n}){const r=await Yt.getConfigByField(t,n);if(r&&r.specificConfig){const t=Ee(r.specificConfig,["maxNumber","fileSize","fileTypes"])??{},n=t.fileTypes??[];e.value={maxSize:t.fileSize,maxCount:t.maxNumber,accept:n,acceptStr:Array.isArray(n)&&0!==n.length?n.join("、"):""}}},attrObj:e,getmaxTagLength:async function({modelKey:t,fieldKey:n}){const r=await Yt.getConfigByField(t,n);r&&r.specificConfig&&(e.value={maxTagTextLength:(Ee(r.specificConfig,["codeVisibleNum"])??{}).codeVisibleNum||12})}}},Ht=/* @__PURE__ */j({name:"DesignRender",props:{model:{type:Object,required:!0},prefix:{type:String,default:""},preview:{type:Boolean,default:!1},context:{type:Object,default:()=>({})}},setup(e){const t=C("design-render"),n=ut();n.prefix=e.prefix,n.preview=e.preview,n.setNodes(e.model.nodes),n.setTree(e.model.tree),ce(()=>e.context,()=>{n.state.context=e.context},{immediate:!0});const r=P(()=>e.model.pageNode?b(e.model.pageNode.data):{}),o=n.getNodes();function i(t,r){const o=et.get(t.type,n.prefix);if(!o)return console.warn(`未找到节点类型为${t.type}的渲染器`),null;let a=null;return a=o.mode===le.CONTAINER?function(t,r){const o=et.get(t.type,n.prefix),a=n.getNodes(t.id),s=n.getController(t.id);return F(te(o.component),{key:t.id,c:s,model:t,parent:r,preview:e.preview,context:n.state.context,pageModel:e.model.pageNode},a.map(e=>i(e,t)))}(t,r):o.mode===le.ITEM?function(t,r){const o=et.get(t.type,n.prefix),i=n.getController(t.id);return F(te(o.component),{key:t.id,c:i,model:t,parent:r,preview:e.preview,context:n.state.context,pageModel:e.model.pageNode})}(t,r):Y("div",null,[k("未支持的适配器模式["),o.mode,k("]")]),Y(tt,{model:t},{default:()=>a})}function a(t){if(!e.model.pageNode)return t;const r=et.get(e.model.pageNode.type,n.prefix);if(!r)return console.warn(`未找到页面节点类型为${e.model.pageNode.type}的渲染器`),t;const o=n.getController(e.model.pageNode.id);return F(te(r.component),{key:e.model.pageNode.id,c:o,model:e.model.pageNode,parent:void 0,preview:e.preview,context:n.state.context},t)}return()=>Y("div",{class:t.b(),style:r.value},[a(o.map(e=>i(e)))])}}),Vt=D(_api.apaas.commonInfoCard.getGetById),Ft=/* @__PURE__ */j({name:"CardViewRender",props:{id:{type:String,required:!0},modelKey:{type:String,required:!0},fetch:{type:Function},preview:{type:Boolean,default:!1}},emits:["mounted"],setup(e,{emit:t,slots:n}){const r=C("card-view-render"),o=ee(!1),i=ee(!1),a=ee(null),s=ee({}),u=P(()=>{var e;return a.value?{width:(null===(e=a.value.pageNode)||void 0===e?void 0:e.data.width)?`${a.value.pageNode.data.width}px`:""}:{}});return async function(){if(e.id){try{o.value=!0,await async function(){const t=await Vt({id:e.id,modelKey:e.modelKey,type:"CARD"});t&&t.designerJson&&(a.value=JSON.parse(decodeURIComponent(t.designerJson)))}(),!0!==e.preview&&e.fetch&&(s.value=await e.fetch()||{})}catch(n){console.error(n)}finally{o.value=!1}i.value=!0,await L(),setTimeout(()=>{var e;t("mounted",null===(e=a.value)||void 0===e||null===(e=e.pageNode)||void 0===e?void 0:e.data)})}}(),()=>{var t;return Y("div",{class:r.b(),style:u.value},[o.value&&n.loading?null===(t=n.loading)||void 0===t?void 0:t.call(n):null,a.value&&i.value?Y(Ht,{context:{data:s.value,id:e.id,modelKey:e.modelKey},model:{nodes:a.value.nodes,pageNode:a.value.pageNode,tree:a.value.tree,type:Qe.CARD_VIEW},prefix:Qe.CARD_VIEW,preview:e.preview},null):null])}}}),Bt={class:"handwriting-pad"},Ut=["width","height"],Lt=/* @__PURE__ */((e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n})(/* @__PURE__ */j({__name:"HandwritingPad",props:{width:{default:300},height:{default:150},backgroundColor:{default:"transparent"},lineWidth:{default:2},strokeStyle:{default:"#000"}},setup(e,{expose:t}){const n=e,r=ee(null);let o=null,i=!1,a=0,s=0;function u(e){const t=r.value.getBoundingClientRect();return"touches"in e?{x:e.touches[0].clientX-t.left,y:e.touches[0].clientY-t.top}:{x:e.offsetX,y:e.offsetY}}function c(e){e.preventDefault(),i=!0;const{x:t,y:n}=u(e);a=t,s=n}function l(e){if(!i||!o)return;e.preventDefault();const{x:t,y:n}=u(e);o.beginPath(),o.moveTo(a,s),o.lineTo(t,n),o.stroke(),o.closePath(),a=t,s=n}function d(e){e.preventDefault(),i=!1}return W(()=>{o=r.value.getContext("2d"),"transparent"!==n.backgroundColor&&(o.fillStyle=n.backgroundColor,o.fillRect(0,0,n.width,n.height)),o.lineWidth=n.lineWidth,o.strokeStyle=n.strokeStyle}),t({getValue:function(){var e;return null===(e=r.value)||void 0===e?void 0:e.toDataURL()},setValue:function(e){const t=new Image;t.src=e,t.onload=()=>{null==o||o.drawImage(t,0,0)}},clear:function(){null==o||o.clearRect(0,0,n.width,n.height),"transparent"!==n.backgroundColor&&(o.fillStyle=n.backgroundColor,o.fillRect(0,0,n.width,n.height))}}),(t,n)=>(J(),A("div",Bt,[_("canvas",{ref_key:"canvasRef",ref:r,width:e.width,height:e.height,class:"canvas",onMousedown:c,onMousemove:l,onMouseup:d,onMouseleave:d,onTouchstart:c,onTouchmove:l,onTouchend:d},null,40,Ut)]))}}),[["__scopeId","data-v-d5b980b7"]]),Gt=class{static runApp({userInfo:e,env:t,aid:n}){this.ENV=t,this.AID=n,this.userInfo=e}};Ve(Gt,"ENV",void 0),Ve(Gt,"AID",void 0),Ve(Gt,"userInfo",void 0);var Kt={[f.DATE]:{callback:e=>M(e,["YYYY-MM-DD","YYYY/MM/DD"],!0).isValid(),message:"日期变量格式为YYYY-MM-DD,YYYY/MM/DD"},[f.TIME]:{callback:e=>M(e,"HH:mm:ss",!0).isValid(),message:"时间变量格式HH:mm:ss"},[f.DATETIME]:{callback:e=>M(e,["YYYY-MM-DD HH:mm:ss","YYYY/MM/DD HH:mm:ss"]).isValid(),message:"日期时间变量格式为YYYY-MM-DD HH:mm:ss,YYYY/MM/DD HH:mm:ss"}},Wt=/* @__PURE__ */function(e){return e.WEB="web_module",e.MOBILE="mobile_module",e.PAD="pad_module",e}({}),qt={[Wt.WEB]:{getPageInfo:_gct.api.apaas.webpage.getInfo},[Wt.MOBILE]:{getPageInfo:_gct.api.apaas.mobilePage.getInfo},[Wt.PAD]:{getPageInfo:_gct.api.apaas.padPage.getInfo}},zt=ee({}),Jt=ee({}),Xt=ee({});function Qt(e,t){Xt.value[e]=t}var Zt=ee({pageStyle:{},pageConfig:{},pageName:""}),en=ie(()=>{const{title:e}=Zt.value.pageConfig||{};return e}),tn=class e{static setModals(e){this.modalsCache={},null==e||e.forEach(e=>{this.modalsCache[e.id]=e})}static async getModalById(e){if(!e)return Promise.reject();if(/^i?g_modal_/.test(e)&&!this.modalsCache[e]){const[t]=await _api.apaas.appGlobalSettings.getInfo({keys:e,fullInfo:!0})||[];if(null==t?void 0:t.configJson){const n=JSON.parse(t.configJson);this.modalsCache[e]=n}}return this.modalsCache[e]||(console.error(`模态框${e}不存在`),Promise.reject())}static getPremission(e){if(!e)return!0;const t=this.permissions[e];return!t||N().getPermissionByKey(this.pageID,t)}static setPremission(e,t){this.permissions[t]=e}static setContextByKey(e,t){t?this.ContextCache[t]=e:this.ContextCache={page:e}}static getContextByKey(e){return this.ContextCache[e||"page"]}static async initvars(){(await _gct.api.apaas.appGlobalSettings.getList({type:"var",fullInfo:!0})||[]).forEach(e=>{if(e.configJson)try{const t=JSON.parse(e.configJson);Jt.value[t.key]=(({value:e,appredis:t,key:n,type:r})=>{var o;const i="dev"!==Gt.ENV&&t,{cacheMap:a}=kt(`${Gt.AID}_${null===(o=Gt.userInfo)||void 0===o?void 0:o.userId}`);return new Proxy({value:e,type:r},{get:(e,t)=>i&&"value"===t?a.value[n]:Reflect.get(e,t),set:(e,t,r,o)=>(i&&"value"===t&&(a.value[n]?a.value[n]=r:a.value={...a.value,[n]:r}),Reflect.set(e,t,r,o))})})({value:t.defaultValue,appredis:t.appredis,key:t.key,type:t.type})}catch(t){console.error("initvars",t)}})}static async inithooks(){(await _gct.api.apaas.appGlobalSettings.getList({type:"event",fullInfo:!0})||[]).forEach(e=>{if(e.configJson)try{const t=new Function(JSON.parse(e.configJson).runJs),n=this.globalHookCaches[e.key];n&&n.push(t)}catch(t){console.error("inithooks",t)}})}static async initPermission(e){this.permissions=e||{}}static async initGlobalS(e){var t;if(this.setModals(e.modals),null===(t=e.pageVars)||void 0===t||t.forEach(e=>{var t;zt.value[e.key]={value:null===(t=e.varInfo)||void 0===t?void 0:t.defaultValue,type:e.varInfo.type}}),!this.startRuning){this.startRuning=!0;try{await Promise.all([this.initvars(),this.inithooks()])}catch(n){console.log(n)}}}static getGlobalVar(e){const t=Jt.value[e];return t?t.value:console.warn("变量key不存在")}static async setGlobalVar(e,t){const n=Jt.value[e];if(!n)return console.warn("变量key不存在");n.value=t}static getPageVar(e){const t=zt.value[e];return t?t.value:console.warn("变量key不存在")}static async setPageVar(e,t){const n=zt.value[e];if(!n)return console.warn("变量key不存在");await function(e,t){if(t===f.NULL)return!0;const{callback:n,message:r}=Kt[t]||{callback:e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase()===t,value:"变量值必须为"+t};return n(e)?Promise.resolve():Promise.reject(r)}(t,n.type),zt.value[e]&&(zt.value[e].value=t)}static getPageGlobalVar(e){var t;return null===(t=zt.value[e])||void 0===t?void 0:t.value}static setPageGlobalVar(e,t){zt.value[e]?zt.value[e].value=t:zt.value[e]={value:t,type:"string"}}static async initPageByid(e,t=Wt.WEB){this.pageID=e;const n=qt[t].getPageInfo,r=await n({id:e}),{runtimeJson:o,name:i}=r||{};if(Zt.value.pageName=i,!o)return Promise.reject();const a=JSON.parse(o);return a.widgets.filter(e=>"bottom-button-container"!==e.type).length?(await this.initGlobalS(a),Zt.value.pageConfig=a.pageConfig||{},Zt.value.pageStyle=a.pageStyle||{},{res:r,data:a,name:i}):Promise.reject()}static async initHistoryByid(e){this.pageID=e;const t=await _gct.api.apaas.pageDesignerLog.getInfo({id:e}),{runtimeJson:n,name:r}=t||{};if(!n)return Promise.reject();Zt.value.pageName=r;const o=JSON.parse(n);return await this.initGlobalS(o),Zt.value.pageConfig=o.pageConfig||{},Zt.value.pageStyle=o.pageStyle||{},{res:t,data:o,name:r}}static usePageHooks(t,n,r,o){const i=ee(!1);return W(async()=>{await L();const e=null==n?void 0:n.pageBeforeMount;if((null==e?void 0:e.name)&&await t.runExportByName(e.name,e.extraParams),o&&await o(t),i.value=!0,null==r?void 0:r.pageMounted)for(const t of this.globalHookCaches.pageMounted)await t();const{extraParams:a,name:s}=(null==n?void 0:n.pageMounted)||{};s&&t.runAsyncExportByName(s,a)}),K(async()=>{Zt.value={};const{extraParams:e,name:o}=(null==n?void 0:n.pageDestroyed)||{};if(o&&t.runExportByName(o,e),null==r?void 0:r.pageDestroyed)for(const t of this.globalHookCaches.pageDestroyed)await t()}),G(async()=>{if(e.setContextByKey(t.context),null==r?void 0:r.pageActivated)for(const e of this.globalHookCaches.pageActivated)await e();const{extraParams:o,name:i}=(null==n?void 0:n.pageActivated)||{};i&&t.runAsyncExportByName(i,o)}),{pageload:i}}};Ve(tn,"modalsCache",{}),Ve(tn,"pageID",""),Ve(tn,"permissions",{}),Ve(tn,"ContextCache",{}),Ve(tn,"startRuning",!1),Ve(tn,"globalHookCaches",{pageMounted:[],pageActivated:[],pageDestroyed:[]});var nn=tn.getPremission.bind(tn),rn=/* @__PURE__ */ke((e,t)=>{!function(n,r){"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_utc=r()}(e,function(){var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var u=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var c=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r;if(0===a)return this.utc(o);var s=this.clone();if(o)return s.$offset=a,s.$u=!1,s;var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(a+u,e)).$offset=a,s.$x.$localOffset=u,s};var l=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return f.call(this,e,t,n);var r=this.local(),o=i(e).local();return f.call(r,o,t,n)}}})}),on=/* @__PURE__ */ke((e,t)=>{!function(n,r){"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_timezone=r()}(e,function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,o){var i,a=function(e,n,r){void 0===r&&(r={});var o=new Date(e);return function(e,n){void 0===n&&(n={});var r=n.timeZoneName||"short",o=e+"|"+r,i=t[o];return i||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),t[o]=i),i}(n,r).formatToParts(o)},s=function(t,n){for(var r=a(t,n),i=[],s=0;s<r.length;s+=1){var u=r[s],c=u.type,l=u.value,d=e[c];d>=0&&(i[d]=parseInt(l,10))}var f=i[3],p=24===f?0:f,h=i[0]+"-"+i[1]+"-"+i[2]+" "+p+":"+i[4]+":"+i[5]+":000",g=+t;return(o.utc(h).valueOf()-(g-=g%1e3))/6e4},u=r.prototype;u.tz=function(e,t){void 0===e&&(e=i);var n,r=this.utcOffset(),a=this.toDate(),s=a.toLocaleString("en-US",{timeZone:e}),u=Math.round((a-new Date(s))/1e3/60),c=15*-Math.round(a.getTimezoneOffset()/15)-u;if(Number(c)){if(n=o(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var l=n.utcOffset();n=n.add(r-l,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},u.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var c=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,a=n||t||i,u=s(+o(),a);if("string"!=typeof e)return o(e).tz(a);var c=function(e,t,n){var r=e-60*t*1e3,o=s(r,n);if(t===o)return[r,t];var i=s(r-=60*(o-t)*1e3,n);return o===i?[r,o]:[e-60*Math.min(o,i)*1e3,Math.max(o,i)]}(o.utc(e,r).valueOf(),u,a),l=c[0],d=c[1],f=o(l).utcOffset(d);return f.$x.$timezone=a,f},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){i=e}}})}),an=/* @__PURE__ */ke((e,t)=>{!function(n,r){"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_quarterOfYear=r()}(e,function(){var e="month",t="quarter";return function(n,r){var o=r.prototype;o.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var i=o.add;o.add=function(n,r){return n=Number(n),this.$utils().p(r)===t?this.add(3*n,e):i.bind(this)(n,r)};var a=o.startOf;o.startOf=function(n,r){var o=this.$utils(),i=!!o.u(r)||r;if(o.p(n)===t){var s=this.quarter()-1;return i?this.month(3*s).startOf(e).startOf("day"):this.month(3*s+2).endOf(e).endOf("day")}return a.bind(this)(n,r)}}})}),sn=/* @__PURE__ */ke((e,t)=>{!function(n,r){"object"==typeof e&&void 0!==t?t.exports=function(e,t){t.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}:"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_toArray=function(e,t){t.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}}(e,function(){return function(e,t){t.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}})}),un=/* @__PURE__ */ke((e,t)=>{!function(n,r){"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_isoWeek=r()}(e,function(){var e="day";return function(t,n,r){var o=function(t){return t.add(4-t.isoWeekday(),e)},i=n.prototype;i.isoWeekYear=function(){return o(this).year()},i.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,i,a,s=o(this),u=(n=this.isoWeekYear(),a=4-(i=(this.$u?r.utc:r)().year(n).startOf("year")).isoWeekday(),i.isoWeekday()>4&&(a+=7),i.add(a,e));return s.diff(u,"week")+1},i.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var a=i.startOf;i.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return"isoweek"===n.p(e)?r?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(e,t)}}})}),cn=/* @__PURE__ */Ye({ABS:()=>tr,ADD:()=>Un,AND:()=>bn,AVERAGE:()=>er,CONCAT:()=>Nn,COUNT:()=>_r,DATE2TIMESTAMP:()=>dr,DATEFORMAT:()=>fr,DAY:()=>yr,DIVISION:()=>Kn,EQ:()=>On,FINDSTR:()=>jn,FIXED:()=>Wn,GE:()=>Sn,GET:()=>ar,GT:()=>Tn,HEADPUSH:()=>cr,HOUR:()=>vr,IF:()=>gn,ISDATERANGE:()=>Nr,ISEMPTY:()=>mn,ISNULL:()=>yn,ISTIMERANGE:()=>Mr,ISUNDEFINED:()=>vn,LARGE:()=>Xn,LASTMONTHRANGE:()=>Er,LASTQUARTER:()=>Cr,LASTWEEKRANGE:()=>Or,LASTYEARRANGE:()=>Sr,LE:()=>En,LEN:()=>Cn,LOWER:()=>Pn,LT:()=>In,LTRIM:()=>_n,MAX:()=>Jn,MIN:()=>Qn,MINUTE:()=>br,MOD:()=>nr,MONTH:()=>mr,MONTHRANGE:()=>Dr,MULTIPLICATION:()=>Gn,NE:()=>Dn,NOW:()=>pr,OR:()=>wn,PARSENUMBER:()=>Vn,POWER:()=>or,PUSH:()=>ur,PUT:()=>sr,QUARTER:()=>Tr,REDUCE:()=>Ln,REPEAT:()=>Yn,REPLACE:()=>$n,ROUND:()=>qn,ROUNDUP:()=>zn,RTRIM:()=>kn,SEARCHSTR:()=>Hn,SEQMAP:()=>Pr,SMALL:()=>Zn,SPLIT:()=>Fn,SQRT:()=>ir,STDEV:()=>kr,SUBSTR:()=>xn,SUBSTRING:()=>Mn,SUM:()=>Bn,SUMSQ:()=>Ar,TIMESTAMP2DATE:()=>lr,TODAY:()=>hr,TRIM:()=>An,TUPLE:()=>Rr,UPPER:()=>Rn,WEEKRANGE:()=>wr,YEAR:()=>gr,YEARRANGE:()=>Ir}),ln=/* @__PURE__ */je(rn(),1),dn=/* @__PURE__ */je(on(),1),fn=/* @__PURE__ */je(an(),1),pn=/* @__PURE__ */je(sn(),1),hn=/* @__PURE__ */je(un(),1);function gn(e,t,n){return e?t:n}function mn(e){return null==e||""===e||0===e}function yn(e){return we(e)}function vn(e){return Oe(e)}function bn(...e){return(()=>{for(const t of e)if(!t)return!1;return!0})()}function wn(...e){return e.some(e=>e)}function On(e,t){return be(e,t)}function Dn(e,t){return e!==t}function En(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<=t}function In(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<t}function Sn(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>=t}function Tn(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>t}function Cn(e){return(null==e?void 0:e.length)||0}function Nn(...e){return e.join("")}function Mn(e="",t,n){return(()=>{const r=(t<0?[...e].reverse().join(""):e).slice(Math.abs(t+Number(t<0)),Math.abs(n)+Number(t>=0));return t<0?[...r].reverse().join(""):r})()}function xn(e="",t,n){return(()=>{const r=(t<0?[...e].reverse().join(""):e).slice(Math.abs(t+Number(t<0)),Math.abs(t+Number(t<0))+Math.abs(n));return t<0?[...r].reverse().join(""):r})()}function Rn(e=""){return e.toUpperCase()}function Pn(e=""){return e.toLowerCase()}function An(e=""){return e.trim()}function _n(e=""){return e.replace(/^\s\s*/,"")}function kn(e=""){return e.replace(/\s\s*$/,"")}function Yn(e="",t=""){return(null===(n=e.match(new RegExp(t,"g")))||void 0===n?void 0:n.length)||null;var n}function $n(e="",t="",n=""){return e.replace(new RegExp(t,"g"),n)}function jn(e="",t=""){return e.includes(t)}function Hn(e="",t=""){return(null===(n=e.match(new RegExp(t,"g")))||void 0===n?void 0:n.length)||0;var n}function Vn(e=""){return(()=>{const t=parseFloat(e);return isNaN(t)?null:t})()}function Fn(e="",t=""){return e.split(t)}function Bn(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?t.reduce(Yr,0):""}function Un(...e){return e.flat().reduce(Yr,0)}function Ln(e,...t){return t.reduce($r,e)}function Gn(e,...t){const n=t.flat().filter(e=>""!==e&&null!=e);return n.length?n.reduce(jr,e):""}function Kn(e,...t){return t.reduce(Hr,e)}function Wn(e,t){return(()=>{if(t<0)throw new Error("Decimal places should be non-negative.");const[n,r=""]=e.toString().split(".");if(0==t)return n;let o=r.split("");if(o.length>t)o=o.slice(0,t);else{const e=o.length;for(let n=0;n<t-e;n++)o.push("0")}return`${n}.${o.join("")}`})()}function qn(e,t){return(()=>{if(null===e||""===e||void 0===e)return"";if(t<0)throw new Error("Decimal places should be non-negative.");const n=Math.trunc(t),r=Number(e);if(isNaN(r))return"";const o=r>0?(+(Math.round(Number(r+`e${n}`))+`e-${n}`)).toFixed(n):-(+(Math.round(Number(-r+`e${n}`))+`e-${n}`)).toFixed(n);return parseFloat(o+"")})()}function zn(e,t){if(null===e||""===e||void 0===e)return"";if(t<0)throw new Error("Decimal places should be non-negative.");return t=t?parseInt(t+""):0,new Ie(e).decimalPlaces(t,Ie.ROUND_UP).toNumber()}function Jn(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.max.apply(null,t):""}function Xn(e,t){return(()=>{if(t<1||t>e.length)throw new Error("Invalid value of n. It should be between 1 and the array length.");return e.sort((e,t)=>t-e)[t-1]})()}function Qn(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.min.apply(null,t):""}function Zn(e,t){return(()=>{if(t<1||t>e.length)throw new Error("Invalid value of n. It should be between 1 and the array length.");return e.sort((e,t)=>e-t)[t-1]})()}function er(...e){const t=e.flat().filter(e=>""!==e&&null!=e),n=t.length;if(!n)return"";let r=new Ie(0);for(const o of t)r=r.plus(o);return r.dividedBy(n).toNumber()}function tr(e){return Math.abs.call(null,e)}function nr(e,t){return(()=>{if(0===e)throw new Error("The second value should not be zero.");const n=new Ie(e).mod(t).toNumber();return isNaN(n)?"":n})()}function rr(e){if("number"==typeof e)return Number.isFinite(e)?e:null;if("string"==typeof e){const t=e.trim();if(""===t)return null;const n=Number(t);return Number.isFinite(n)?n:null}if("bigint"==typeof e){const t=Number(e);return Number.isFinite(t)?t:null}return null}function or(e,t){return(()=>{const n=rr(e),r=rr(t);return null===n||null===r?NaN:Math.abs(r)>1e9?r>0?1/0:0:Math.pow(n,r)})()}function ir(e){return(()=>{const t=rr(e);return null===t?NaN:Math.sqrt(t)})()}function ar(e,t){return(()=>{if(Array.isArray(e)){if("number"==typeof t)return e[t];throw new Error("For arrays, the second argument should be a number.")}if("object"==typeof e){if("string"==typeof t)return e[t];throw new Error("For objects, the second argument (b) should be a string.")}throw new Error("Unsupported data type. The first argument (a) should be an array or an object.")})()}function sr(e,t,n){return(()=>{if(Array.isArray(e)){if(!("number"==typeof t&&t>=0&&t<e.length))throw new Error("For arrays, the second argument (b) should be a number.");e[t]=n}else{if("object"!=typeof e)throw new Error("Unsupported data type. The first argument (a) should be an array or an object.");if("string"!=typeof t||!e)throw new Error("For objects, the second argument (b) should be a string.");e[t]=n}return e})()}function ur(e,t){return(()=>{if(!t)throw new Error("For arrays, the second argument should not be null or undefined");return e.push(t),e})()}function cr(e,t){return(()=>{if(!t)throw new Error("For arrays, the second argument should not be null or undefined");return e.unshift(t),e})()}function lr(e){if(e)return(()=>{if(!e)throw new Error("the frist argument should not be null");const t=/* @__PURE__ */new Date(1e3*e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")} ${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`})()}function dr(e){if(e)return M(e).unix()}function fr(e,t){if(e)return M(e).format(t)}function pr(){return M().format("YYYY-MM-DD HH:MM:ss")}function hr(){return M().format("YYYY-MM-DD")}function gr(e){return M(e).year()}function mr(e){return M(e).month()}function yr(e){return M(e).day()}function vr(e){return M(e).hour()}function br(e){return M(e).minute()}function wr(){return[xr(M().startOf("week").toDate()),xr(M().endOf("week").toDate())]}function Or(){return[xr(M().subtract(1,"week").startOf("week").toDate()),xr(M().subtract(1,"week").endOf("week").toDate())]}function Dr(){return[xr(M().startOf("month").toDate()),xr(M().endOf("month").toDate())]}function Er(){return[xr(M().subtract(1,"month").startOf("month").toDate()),xr(M().subtract(1,"month").endOf("month").toDate())]}function Ir(){return[xr(M().startOf("year").toDate()),xr(M().endOf("year").toDate())]}function Sr(){return[xr(M().subtract(1,"year").startOf("year").toDate()),xr(M().subtract(1,"year").endOf("year").toDate())]}function Tr(){return(()=>{const e=Math.floor((M().month()+3)/3);return[xr(M().quarter(e).startOf("quarter").toDate()),xr(M().quarter(e).endOf("quarter").toDate())]})()}function Cr(){return(()=>{const e=Math.floor((M().month()+3)/3);return[xr(M().quarter(e-1).startOf("quarter").toDate()),xr(M().quarter(e-1).endOf("quarter").toDate())]})()}function Nr(e,t){return(()=>{const[n,r]=t;return e>=n&&e<=r})()}function Mr(e,t){return(()=>{const[n,r]=t,o=M(e,"HH:mm");if(n>r){const e=M(n,"HH:mm"),t=M(r,"HH:mm").add(1,"day");return o>=e||o<=t}return o>=M(n,"HH:mm")&&o<=M(r,"HH:mm")})()}function xr(e){return M(e).tz("America/Chicago").format("YYYY-MM-DD HH:mm:ss.SSSSSSSSS ZZ")}function Rr(...e){return[...e]}function Pr(...e){const t=(e.length-e.length%2)/2,n={};return Array(t).forEach(t=>{const r=e[2*t];n[r]=e[2*t+1]}),n}function Ar(...e){return 0===(e=e.flat().filter(e=>""!==e&&null!=e)).length?"":e.map(e=>{const t=jr(e,e);return""!==t?t:new Ie(0).toNumber()}).reduce((e,t)=>Yr(e,t)||Ie(0).toNumber(),new Ie(0).toNumber())}function _r(e){return Array.isArray(e)?e.length:""}function kr(...e){const t=e.flat().map(e=>Number(e)).filter(e=>Number.isFinite(e));if(t.length<2)return"";const n=t.reduce((e,t)=>e+t,0)/t.length,r=t.reduce((e,t)=>{const r=t-n;return e+r*r},0)/(t.length-1);return Math.sqrt(r)}function Yr(e,t){const n=new Ie(e).plus(new Ie(t)).toNumber();return isNaN(n)?"":n}function $r(e,t){const n=new Ie(e).minus(new Ie(t)).toNumber();return isNaN(n)?"":n}function jr(e,t){const n=new Ie(e).multipliedBy(new Ie(t)).toNumber();return isNaN(n)?"":n}function Hr(e,t){const n=new Ie(e).div(new Ie(t)).toNumber();return isNaN(n)?"":n}M.extend(ln.default),M.extend(dn.default),M.extend(fn.default),M.extend(pn.default),M.extend(hn.default),window._METHOD_DEBUG_=cn;var Vr=Rt(function(e,t=!1){const n=Se.parse(e);let r=[];return Te.traverse(n,{enter:function(e){if(e.type===Se.Syntax.MemberExpression){const t=Br(e);r.push(t),Object.assign(e,{name:t,type:Se.Syntax.Identifier})}else e.type===Se.Syntax.Identifier&&r.push(e.name);r=t?r.filter(e=>!O[e]&&"undefined"!==e):r.filter(e=>!(O[e]||"undefined"===e||E.includes(e)||e.startsWith(v)||e.startsWith("undefined.")))}}),[...new Set(r)]}),Fr=Rt(async function(e,t){const n=Vr(e,!0),r=n.filter(e=>E.includes(e)).sort(),o=n.filter(e=>e.startsWith(v)).sort(),i=await Lr([...r,...o]),a=Se.parse(e);Te.replace(a,{enter(e){if(e.type===Se.Syntax.BinaryExpression){const{operator:t}=e,n=S[t];return n?{type:Se.Syntax.CallExpression,arguments:[e.left,e.right],callee:{type:Se.Syntax.Identifier,name:n},optional:!1}:e}return e}}),Te.traverse(a,{enter:function(e){e.type===Se.Syntax.CallExpression&&e.callee.type===Se.Syntax.Identifier&&(e.callee.name=`await Methods.${e.callee.name}`)}});const s=Ce.generate(a,{format:{semicolons:!1}}),u={},c=[];i.forEach(e=>{c.push(`const ${e.key} = ${JSON.stringify(e.value)};`)}),Object.keys(t).map(e=>{if(e.includes(".")){const[n="",r]=e.split(".");u[n]||(c.push(`const ${n} = {};`),u[n]=!0),c.push(`${n}.${r} = ${JSON.stringify(t[e])};`)}else c.push(`const ${e} = ${JSON.stringify(t[e])};`)});const l=new Ur("Methods",[...c,"return new Promise(async(resolve)=>{",`const res = ${s};`,"resolve(res);","})"].join("\n")),d=await l(cn);return console.info("【表达式】",e),console.info("【参数】",t),console.info("【执行语句】",l.toString()),console.info("【执行结果】",d),d});function Br(e){return e.type===Se.Syntax.MemberExpression?`${e.object.type===Se.Syntax.MemberExpression?Br(e.object):e.object.name}.${e.property.name}`:e.type===Se.Syntax.Identifier?e.name:""}var Ur=Object.getPrototypeOf(async function(){}).constructor,Lr=Rt(async function(e){let t=[];return e.length>0&&(t=await _gct.api.apaas.systemVar.getGetVarByKeys({keys:e.join(",")})),t});window.gct_expression={execute:Fr,identify:Vr};var Gr={[c.TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[c.LONG_TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[c.INTEGER]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[c.LONG]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[c.DOUBLE]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[c.DECIMAL]:{attrsTransform:[{from:"specificConfig.digits",to:"precision"},{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]}},Kr=(e,t)=>{const{attrsTransform:n=[]}=Gr[e]??{};return n.reduce((e,n)=>{const r=ye(t,n.from);return e[n.to]=r,e},{})},Wr=class extends m{static async loadRenderPlugin(e,t=[]){try{const n=await this.loadPlugins(e,t);t.forEach(e=>{const t=e.key;n[t]?_gct.register.render.register(t,n[t].default):console.error(`${t} 插件加载失败,请检查插件配置是否正确`)})}catch(n){console.error(n)}}static loadMobilePlugin(e=[]){return this.loadRenderPlugin(g.MOBILE,e)}static loadPadPlugin(e=[]){return this.loadRenderPlugin(g.PAD,e)}static loadWebPlugin(e=[]){return this.loadRenderPlugin(g.WEB,e)}};function qr(e){const{style:t={}}=e||{},n="ignoringStyle"in e?e.ignoringStyle??[]:[],r=pe(t);return{wrapperStyle:fe(t,n),wStyle:r,labelFont:de(t.labelFont),contentFont:de(t.contentFont)}}var zr=e=>de(e);function Jr(e,t){return(null==e?void 0:e.map(e=>Xr(e,t)))||[]}function Xr(e={},t={}){var n;const r=ge(e);r._X_ROW_KEY=void 0;const o=(null===(n=Object.keys(t??{}))||void 0===n?void 0:n.length)?Object.keys(r).reduce((e,n)=>{const o=t[n],i=r[n];if(o&&i)try{const t=(i+"").split(",").map(e=>o[e]);e[n]={[i+""]:t}}catch{}return e},{}):r._DICT||{};return{...r,_DICT:o,_OPCT:r.__FOREIGN__&&"object"==typeof r.__FOREIGN__?Xr(r.__FOREIGN__,t):{}}}function Qr(e,t,n){"object"==typeof t&&De(e,Xr(t,n))}function Zr(e,t,n){if("object"!=typeof t)return;for(const o in e)"_OPCT"!==o&&"_NOSUBMIT"!==o&&delete e[o];const r=Xr(t,n);r._X_ROW_KEY=t._X_ROW_KEY,De(e,r)}function eo(e,t={},n={}){const r=ge(t.__FOREIGN__||t),o={_DICT:{}};return Object.keys(r).forEach(t=>{const i=`${e}.${t}`,a=n[t],s=r[t];if(a&&s)try{const e=(s+"").split(",").map(e=>a[e]);o._DICT[i]={[s+""]:e}}catch{}o[i]=s}),{...r,_OPCT:o}}function to(e={},t={}){var n;const r=ge(e);return(null===(n=Object.keys(t??{}))||void 0===n?void 0:n.length)?Object.keys(r).reduce((e,n)=>{const o=t[n]||{},i=r[n];try{e[n]=(i+"").split(",").map(e=>o[e]).join(",")}catch{e[n]=i}return e},{}):r}function no(e,t,n=!1){var r;if(n||(null==e||null===(r=e.customApi)||void 0===r?void 0:r.value))return t(e);const o="object"==typeof e?Ne.stringify({...e,customApi:null}):e;let i=ro.get(o);return i||(i=(async()=>{try{return await t(e)}catch(n){throw ro.delete(o),n}})(),ro.set(o,i,5e3),i)}var ro=class{static set(e,t,n){this.cachedata[e]={maxAge:n||0,value:t,now:Date.now()}}static get(e){this.reset();const t=this.cachedata[e];return t?t.value:null}static delete(e){return delete this.cachedata[e]}static clear(){this.cachedata={}}static reset(){for(const e in this.cachedata){const t=this.cachedata[e];t&&Date.now()-t.now>t.maxAge&&this.delete(e)}}};async function oo({ids:e,refOriginField:t,refOriginFieldType:n,model:r,foreignFields:o}){if(!e)return Promise.reject();const i=await async function({refOriginFieldType:e,modelKey:t,foreignFields:n,ids:r}){if(e===c.RDO_REF){const{data:e={},dict:o={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"rdoGetVersionByRefId",modelCategory:s.ENTITY},{foreignFields:n},{refId:r});return{data:e,dict:o}}{const{data:e={},dict:o={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"getOne",modelCategory:s.ENTITY},{query:{"id_.eq":r},foreignFields:n},{});return{data:e,dict:o}}}({refOriginFieldType:n,modelKey:r,foreignFields:o,ids:e});return(null==i?void 0:i.data)?eo(t,i.data,i.dict):void 0}Ve(ro,"cachedata",{});var io=e=>no(e,oo),ao=[y.CONTAINALL,y.CONTAINANY,y.IN,y.NOTIN];function so(e,t,n){const{body:r,exp:o}=function(e){const r={};let o=n||"";return t.forEach(t=>{const n=t.props.fieldSearchKey||t.props.field,i=t.props.ope||[];let a=e[t.id];(null!=a||t.props.useMore)&&i.forEach(e=>{a=function(e,t){return ao.indexOf(t)>-1&&"string"==typeof e?e.split(","):e}(a,e);const i=`${n}.${e}:${t.id}`,s=`${t.id}.${e}`;r[i]=t.props.useMore?null:a,o=o.replace(s,i)})}),{body:r,exp:o}}(function(e,t){if(!t.length)return e;const n=t.filter(e=>e.props.fieldType===c.RDO_REF);return n.length?(n.forEach(t=>{if(e[t.id]){if(!Array.isArray(e[t.id])){const[n,r]=e[t.id].split(":");return r||n}e[t.id]=e[t.id].map(e=>{if(!e)return;const[t,n]=e.split(":");return n||t})}}),e):e}(e,t));return{query:r,exp:o}}var uo=/* @__PURE__ */new Map;async function co(e,t={}){const{defaultValue:n}=e.props;if(!n)return null;if(Array.isArray(n)){if(!n.includes("CURRENT_ORG"))return null}else if("CURRENT_ORG"!==n)return null;const r=await _api.platform.tenant.getUserInfo();if(r){const t=await _api.apaas.designerCommon.getGetCanBeUsedOrgUser({pageNo:1,pageSize:999999999});if(t){const n=t.data;if(n&&-1!==n.findIndex(e=>e.masterOrgId===r.masterOrgId))return I(e.props.ope)?[r.masterOrgId]:r.masterOrgId}return null}}async function lo(e,t={}){const{defaultValue:n}=e.props;if(!n)return null;if(Array.isArray(n)){if(!n.includes("CURRENT_USER"))return null}else if("CURRENT_USER"!==n)return null;const r=await _api.platform.user.getInfo();if(r){const t=await _api.apaas.designerCommon.getGetCanBeUsedOrgUser({pageNo:1,pageSize:999999999});if(t){const n=t.data;if(n&&-1!==n.findIndex(e=>e.id===r.userId))return I(e.props.ope)?[r.userId]:r.userId}return null}}async function fo(e,t={}){const{defaultValue:n}=e.props;return n&&0!==n.length?n:null}async function po(e,t={}){const{defaultValue:n}=e.props;return null==n?null:n}function ho(e,t,n={}){const{defaultValueType:r,defaultValue:i}=e.props;if(null==r||""==r)return null;const{isRang:a,fieldType:s}=e.props;if(!a){const e=s===c.DATE?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss";if(r===o.SystemDate)return M(/* @__PURE__ */new Date).format(e)}if(a){const e=s===c.DATE?"YYYY-MM-DD":"YYYY-MM-DD 00:00:00",t=s===c.DATE?"YYYY-MM-DD":"YYYY-MM-DD 23:59:59",n=null!=i?Number(i):0,u=M();switch(r){case o.SystemDate:return a?[u.format(e),u.format(t)]:u.format(e);case o.PastDays:return[u.subtract(n,"day").format(e),u.subtract(n>0?1:0,"day").format(t)];case o.PastWeeks:return[u.subtract(n,"week").startOf("isoWeek").format(e),u.subtract(n>0?1:0,"week").endOf("isoWeek").format(t)];case o.PastMonths:return[u.subtract(n,"month").startOf("month").format(e),u.subtract(n>0?1:0,"month").endOf("month").format(t)];case o.PastYears:return[u.subtract(n,"year").startOf("year").format(e),u.subtract(n>0?1:0,"year").endOf("year").format(t)];case o.Yesterday:{const n=u.subtract(1,"day");return[n.format(e),n.format(t)]}case o.Past7Days:return[u.subtract(6,"day").format(e),u.format(t)];case o.Past30Days:return[u.subtract(29,"day").format(e),u.format(t)];case o.ThisWeek:return[u.startOf("isoWeek").format(e),u.endOf("isoWeek").format(t)];case o.LastWeek:{const n=u.subtract(1,"week");return[n.startOf("isoWeek").format(e),n.endOf("isoWeek").format(t)]}case o.ThisMonth:return[u.startOf("month").format(e),u.endOf("month").format(t)];case o.LastMonth:{const n=u.subtract(1,"month");return[n.startOf("month").format(e),n.endOf("month").format(t)]}case o.ThisYear:return[u.startOf("year").format(e),u.endOf("year").format(t)];case o.LastYear:{const n=u.subtract(1,"year");return[n.startOf("year").format(e),n.endOf("year").format(t)]}default:return null}}return null}uo.set(c.ORG,co),uo.set(c.ORG_MULTI,co),uo.set(c.USER,lo),uo.set(c.USER_MULTI,lo),uo.set(c.ENUM,fo),uo.set(c.ENUM_MULTI,fo),uo.set(c.INTEGER,po),uo.set(c.LONG,po),uo.set(c.DOUBLE,po),uo.set(c.DECIMAL,po),uo.set(c.TEXT,async function(e,t={}){const{defaultValue:n}=e.props;return n||null}),uo.set(c.LONG_TEXT,po),uo.set(c.BOOLEAN,async function(e,t={}){const{defaultValue:n}=e.props;return null==n||""===n?null:n}),uo.set(c.DATE,async function(e,t={}){return ho(e)}),uo.set(c.DATE_TIME,async function(e,t={}){return ho(e)}),uo.set(c.PRINTER,async function(e,t={}){const{defaultValue:n}=e.props;return n&&0!==n.length?n:null});function go(e,t=[]){return"ignoreCase"==(null==t?void 0:t[0])?null==e?void 0:e.replace(/\./g,".i"):e}function mo(e,t=[]){return"ignoreCase"==(null==t?void 0:t[0])?null==e?void 0:e.map(e=>{const t=e.split(".");return`${t[0]}.i${t[1]}`}):e}var yo=({searchField:e,keyword:t})=>t&&(null==e?void 0:e.reduce((e,n)=>(e[n.split(".").length>1?n:n+".like"]=t,e),{}))||{},vo=e=>{let t={},n="";if(ve(e))t={...e.reduce((e,t)=>(e[t.key+"."+t.ope]=t.value,e),{})};else try{const o=JSON.parse(null==e?void 0:e.dataRule);n=null==o?void 0:o.exp;const i=(null==o?void 0:o.typeMap)||{},a=(null==o?void 0:o.query)||{};for(const e in a)if("VAR"===i[e]){var r;t[e]=null===(r=Jt.value)||void 0===r||null===(r=r[a[e]])||void 0===r?void 0:r.value}else t[e]=a[e]}catch(o){console.log(o)}return{query:t,getExp:function(...e){const t=[n,...e].filter(e=>e),r=t.join(",");return t.length>1?`AND(${r})`:r}}},bo=({collation:e,collationSort:t,collationField:n})=>e?e.filter(e=>e.collationField).map(e=>({sortField:e.collationField,sortType:e.collationSort})):t?[{sortField:n,sortType:t}]:[],wo=Object.prototype.toString;function Oo(e,t){return wo.call(e)===`[object ${t}]`}function Do(e){return void 0!==e}function Eo(e){return!Do(e)}function Io(e){return null!==e&&Oo(e,"Object")}function So(e){return Yo(e)||Po(e)?0===e.length:e instanceof Map||e instanceof Set?0===e.size:!!Io(e)&&0===Object.keys(e).length}function To(e){return Oo(e,"Date")}function Co(e){return null===e}function No(e){return Eo(e)&&Co(e)}function Mo(e){return Eo(e)||Co(e)}function xo(e){return Oo(e,"Number")}function Ro(e){return Oo(e,"Promise")&&Io(e)&&Ao(e.then)&&Ao(e.then)}function Po(e){return Oo(e,"String")}function Ao(e){return"function"==typeof e}function _o(e){return Oo(e,"Boolean")}function ko(e){return Oo(e,"RegExp")}function Yo(e){return!!e&&Array.isArray(e)}function $o(e){return"undefined"!=typeof window&&Oo(e,"Window")}function jo(e){return Io(e)&&!!e.tagName}function Ho(e){return Oo(e,"Map")}function Vo(e){return/^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?/.test(e)}function Fo(e){return void 0===e||!e&&0!==e&&"0"!==e||!/[^\s]/.test(e+"")}function Bo(e,t){const n=[],r=e.props.fieldType,o=P(()=>e.props.readonly&&r&&!n.includes(r)&&(void 0===t.value||""===t.value||null===t.value));return{RenderEmptyValue:/* @__PURE__ */j((e,t)=>()=>_gct.store.getEmptyDisplay),isEmpty:o}}var Uo=(e,t)=>["post","put"].includes(t)?(t,n={},r={},o={})=>e({modelKey:t.key,bsKey:t.action,modelCategory:t.modelCategory??s.ENTITY},r,n,o):(t,n={},r={})=>e({modelKey:t.key,bsKey:t.action,modelCategory:t.modelCategory??s.ENTITY},n,r),Lo={post:Uo(_gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey,"post"),get:Uo(_gct.api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey,"get"),put:Uo(_gct.api.apaas.modelComprehensive.putBizServiceModelCategoryModelKeyBsKey,"put"),delete:Uo(_gct.api.apaas.modelComprehensive.deleteBizServiceModelCategoryModelKeyBsKey,"delete")};async function Go(e,n,...r){return Lo[t[e.action]](e,n,...r)}async function Ko(e,t,{body:n={},query:r={}}={},o={}){return await _gct.api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey({bsKey:t,modelKey:e,modelCategory:s.ENTITY},r,n,o)}var Wo=class e{constructor(){if(Ve(this,"mask",void 0),Ve(this,"container",void 0),Ve(this,"spinner",void 0),e.instance)return e.instance;e.instance=this,this.createLoadingElement(),this.initStyle()}createLoadingElement(){this.mask=document.createElement("div"),this.mask.id="gct-global-loading-mask",this.container=document.createElement("div"),this.container.id="gct-global-loading-container",this.spinner=document.createElement("div"),this.spinner.id="gct-global-loading-spinner",this.container.appendChild(this.spinner),this.mask.appendChild(this.container),document.body.appendChild(this.mask)}initStyle(){Object.assign(this.mask.style,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"rgba(255, 255, 255, 0.5)",zIndex:9999,display:"none",justifyContent:"center",alignItems:"center"}),Object.assign(this.container.style,{display:"flex",flexDirection:"column",alignItems:"center",width:"43px",height:"43px",backgroundColor:"transparent",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.15)"}),Object.assign(this.spinner.style,{display:"grid",width:"43px",height:"43px",gridTemplateColumns:"repeat(2, 1fr)",gridTemplateRows:"repeat(2, 1fr)",gap:"3px"});const e=getComputedStyle(document.documentElement).getPropertyValue("--gct-color-primary").trim();[{id:"gct-global-loading-item_1",delay:"0s"},{id:"gct-global-loading-item_2",delay:"0.25s"},{id:"gct-global-loading-item_3",delay:"0.75s"},{id:"gct-global-loading-item_4",delay:"0.5s"}].forEach(t=>{const n=document.createElement("div");n.id=t.id,Object.assign(n.style,{backgroundColor:e,opacity:.2,animation:"globalLoading 1s infinite",animationDelay:t.delay}),this.spinner.appendChild(n)});const t=document.createElement("style");t.textContent="\n @keyframes globalLoading {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0.2;\n }\n }",document.head.appendChild(t)}show(){this.mask.style.display="flex",document.body.style.overflow="hidden"}hide(){this.mask.style.display="none",document.body.style.overflow=""}};Ve(Wo,"instance",void 0);var qo=new Wo,zo=class{constructor({taskId:e,processInstanceId:t,examineAndApproveState:n=u.MY_CUSTOM,refFormId:r}){Ve(this,"isHandle",!1),Ve(this,"buttonConfig",{}),Ve(this,"fieldConfig",{}),Ve(this,"processId",""),Ve(this,"dataId",""),Ve(this,"taskId",void 0),Ve(this,"processInstanceId",void 0),Ve(this,"refFormId",void 0),Ve(this,"examineAndApproveState",u.MY_CUSTOM),Ve(this,"fieldStatus",""),Ve(this,"viewPageKey",void 0),Ve(this,"isviewPage",void 0),Ve(this,"isAPPviewPage",void 0),Ve(this,"nonRelatedPerson",!1),this.taskId=e,this.processInstanceId=t,this.examineAndApproveState=n,this.refFormId=r}async readyProcess(){const{taskId:e,processInstanceId:t}=this;if(this.examineAndApproveState===u.MY_AGENT){await this.getDataInfo();const{node:t,processDefId:r,webViewPageKey:o,mobileViewPageKey:i}=await _gct.api.apaas.pmProcessEngine.getTaskExtension({taskId:e});this.transformByNode(t),this.processId=r;for(const e in this.buttonConfig)e===n.Withdraw&&(this.buttonConfig[e].show=!1);this.viewPageKey=(null==t?void 0:t.webViewPageKey)||o,this.isAPPviewPage=!!(null==t?void 0:t.mobileViewPageKey)||!!i}if(this.examineAndApproveState===u.MY_APPLICATION){await this.getDataInfo();const{node:e,processDefId:r,withdrawOp:o}=await _gct.api.apaas.pmProcessEngine.getInitialTaskExtension({processInstanceId:t})||{};this.transformByNode(e),this.processId=r;for(const t in this.buttonConfig)t===n.End&&(this.buttonConfig[t].show=!1),t===n.Withdraw&&(this.buttonConfig[t].show=!!o),t===n.Resubmit&&(this.buttonConfig[t].show=!1)}if(this.examineAndApproveState===u.MY_DONE){await this.getDataInfo();const{node:t,processDefId:n}=await _gct.api.apaas.pmProcessEngine.getHiTaskExtension({taskId:e});this.transformByNode(t),this.processId=n}if(this.examineAndApproveState===u.MY_CUSTOM){await this.getDataInfo();const{node:e,processDefId:n,btnList:r,webViewPageKey:o,taskId:i,initiatorNode:a}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),s=r||[];this.withdrawByNode(a),this.transformByNode(e),this.processId=n;for(const t in this.buttonConfig){const e=t;this.buttonConfig[e].show&&(this.buttonConfig[e].show=s.includes(t))}if(!e)return void(this.nonRelatedPerson=!0);!s.length||"__initiator__"===(null==e?void 0:e.key)&&!i?this.isviewPage=!0:this.viewPageKey=(null==e?void 0:e.webViewPageKey)||o}if(this.examineAndApproveState===u.MY_CUSTOM_Modal){await this.getDataInfo();const{node:e,btnList:n,taskId:r,processDefId:o,initiatorNode:i}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),a=n||[];this.withdrawByNode(i),this.transformByNode(e),this.processId=o;for(const t in this.buttonConfig){const e=t;this.buttonConfig[e].show&&(this.buttonConfig[e].show=a.includes(t))}if(!e)return void(this.nonRelatedPerson=!0);a.length&&("__initiator__"!==(null==e?void 0:e.key)||r)||(this.isviewPage=!0)}}withdrawByNode(e){if(!e)return;const{buttonConfig:t}=e;JSON.parse(t+"").forEach(e=>{const t=T(`sys.process.paasBpmnButtonEvent.${e.type}`);this.buttonConfig[e.type]={showModel:!1,title:T("sys.process.element.approval")+t,success:t+T("sys.success")+"!",show:e.enable,alias:e.alias,signature:!!e.signature,opinion:{},user:{}}})}transformByNode(e){if(e)try{const{opinionConfig:t,buttonConfig:r,fieldConfig:o}=e,i=JSON.parse(r||"[]"),a=JSON.parse(t||'{"enabled":false,"opinionType":[]}');i.forEach(e=>{const t=T(`sys.process.paasBpmnButtonEvent.${e.type}`);var r,o;this.buttonConfig[e.type]={showModel:![n.Resubmit,n.Withdraw,n.End].includes(e.type),title:T("sys.process.element.approval")+t,success:t+T("sys.success")+"!",show:e.enable,alias:e.alias,signature:!!e.signature,opinion:{show:a.enabled,required:(r=a.opinionType,o=e.type,!!r.includes(h.Required)||!r.includes(h.Optional)&&(r.includes(h.ApproveRequired)||r.includes(h.ApproveRequired)?o===n.Approve:r.includes(h.CountersignRequired)?o===n.Countersign:r.includes(h.ReassignRequired)?o===n.Reassign:r.includes(h.RejectRequired)?o===n.Reject:r.includes(h.RefuseRequired)?o===n.Refuse:void 0))},user:{show:[n.Reassign,n.Countersign].includes(e.type),multiple:n.Countersign===e.type,label:T(`sys.process.user.${e.type}`)}}}),this.fieldConfig=JSON.parse(o+"")}catch(t){console.error("流程信息解析失败",t)}}async getDataInfo(){const{dataId:e}=await _gct.api.apaas.pmProcessEngine.getModel({processInstanceId:this.processInstanceId});this.dataId=e}filterButton(e){return this.nonRelatedPerson||this.examineAndApproveState===u.MY_DONE?[]:e.filter(e=>{if(e.type===d.ProcessApproveButton){const t=this.buttonConfig[e.props.action],n=!!(null==t?void 0:t.show);return n&&(e.props.title=t.alias),n}return!0})}useFieldWidget(e){if(this.nonRelatedPerson)return;const t=e.props.field,{fieldConfig:n,examineAndApproveState:r}=this;if(n&&n[t]){const{permission:r}=n[t];switch(r){case Jo.disabled:e.props.disabled=!0,e.props.readonly=!1;break;case Jo.editable:e.props.disabled=!1,e.props.readonly=!1;break;case Jo.readonly:e.props.readonly=!0}}else e.props.readonly=!0;e.props.disabled||![u.MY_APPLICATION,u.MY_DONE].includes(r)&&!this.isviewPage||(e.props.readonly=!0)}useFieldToShow(e){const t=e.props.field,{fieldConfig:n}=this;if(n&&n[t]){const{permission:r}=n[t];r===Jo.hidden&&(e.props.hidden=!0)}}};var Jo=/* @__PURE__ */function(e){return e.hidden="hidden",e.readonly="readonly",e.disabled="disabled",e.editable="editable",e}({});function Xo(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qo(e,t,n){Xo(e,t),t.set(e,n)}function Zo(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function ei(e,t,n){return e.set(Zo(e,t),n),n}function ti(e,t){return e.get(Zo(e,t))}var ni=/* @__PURE__ */new WeakMap,ri=/* @__PURE__ */new WeakMap,oi=/* @__PURE__ */new WeakSet,ii=class{constructor({js:e,css:t,pageKey:n,ContextVm:r}){var o;Xo(this,o=oi),o.add(this),Ve(this,"context",void 0),Ve(this,"searchVNodes",void 0),Ve(this,"cssData",void 0),Ve(this,"pageKey",void 0),Ve(this,"exports",void 0),Qo(this,ni,void 0),Qo(this,ri,void 0),Ve(this,"ProcessAppRoved",void 0),Ve(this,"pageLayoutMode",void 0),this.cssData=Zo(oi,this,ai).call(this,t),this.searchVNodes={},this.exports={},ei(ri,this,{}),ei(ni,this,{}),this.context=new r({$ref:this.getComponent.bind(this),$asyncRef:this.getSyncComponent.bind(this)}),Zo(oi,this,si).call(this,e),tn.setContextByKey(this.context,n),this.pageKey=n}async runProcessBySaskId({taskId:e,processInstanceId:t,examineAndApproveState:n,refFormId:r}){this.ProcessAppRoved=new zo({taskId:e,processInstanceId:t,examineAndApproveState:n,refFormId:r}),await this.ProcessAppRoved.readyProcess()}runContext(e,t){this.context.gctWidgets[e]=t}async runEventByName(e,t={},...n){const r=t[e];let o;if(r){if(Array.isArray(r))o=await async function(e,t,n){const r=e.map(fi.bind(t,n));await Promise.all(r)}(r,this.context,n);else{const e=this.exports[r.name];if(!e)throw`函数${r.name}不存在`;o=await e(...n,oe(r.extraParams))}return o}}async runExportByName(e,...t){try{const n=this.exports[e];if(!n)throw`函数${e}不存在`;return n(...t)}catch(n){console.error(n)}}async runAsyncExportByName(e,...t){try{const n=this.exports[e];if(!n)throw`函数${e}不存在`;return await this.getReadyByFun(n),n(...t)}catch(n){console.error(n)}}initNode(e,t){e&&(ti(ri,this)[e]=t,Zo(oi,this,ci).call(this,e,t))}destroyNode(e){delete ti(ri,this)[e],delete ti(ni,this)[e]}initSearchs(e,t,n){if(e)if(this.searchVNodes[e]){const r=this.searchVNodes[e].find(e=>e.comId===n);r?r.callback=t:this.searchVNodes[e].push({callback:t,comId:n})}else this.searchVNodes[e]=[{callback:t,comId:n}]}cancelInitSearchs(e,t){e&&this.searchVNodes[e]&&(this.searchVNodes[e]=this.searchVNodes[e].filter(e=>e.comId!==t),0===this.searchVNodes[e].length&&delete this.searchVNodes[e])}runTableBySearch(e,t){(this.searchVNodes[e]||[]).forEach(({callback:e})=>e(t))}getComponent(e){const t=ti(ri,this)[e];if(t)return new di(e,t);console.error(e+"组件不存在或者未初始化")}getSyncComponent(e){if(!e)return Promise.reject("标识不能为空");const t=ti(ri,this)[e];return t?Promise.resolve(new di(e,t)):new Promise((t,n)=>{const r=setTimeout(()=>{n(e+"不存在或者被隐藏")},3e4);Zo(oi,this,ui).call(this,e,n=>{clearTimeout(r),t(new di(e,n))})})}async getReadyByFun(e){var t;if("function"!=typeof e)return Promise.reject("参数必须是函数");const n=(null===(t=String(e).match(/\$ref\((["'A-Za-z0-9_-]+)\)/g))||void 0===t?void 0:t.map(e=>{var t;const n=null===(t=e.match(/\$ref\(['|"]([A-Za-z0-9_-]+)['|"]\)/))||void 0===t?void 0:t[1];return this.getSyncComponent(n)}))||[];await Promise.all(n)}async processHandle(e,{opinion:t,reassignId:n,signature:r,countersignUserIds:o,button:i}){const{taskId:a,processInstanceId:s}=this.ProcessAppRoved,u={procInstId:s,data:e,opinion:t,button:i,countersignUserIds:o,taskId:a,signature:r,reassignId:n};await _gct.api.apaas.pmProcessEngine.postProcExecute(u)}async checkedProcess(e){const{processId:t}=this.ProcessAppRoved||{};return t?e!==t?Promise.reject(T("sys.process.processInstanceMismatch")):void 0:Promise.reject(T("sys.process.pleaseInitiateTheProcessFirst"))}};function ai(e,t={}){if(!e)return;const{css:n,load:r,unload:o}=function(e,t={}){const n=re(!1),{document:r=Dt,immediate:o=!0,manual:i=!1,id:a="vueuse_styletag_"+ ++Pt}=t,s=re(e);let u=()=>{};const c=()=>{if(!r)return;const e=r.getElementById(a)||r.createElement("style");e.isConnected||(e.id=a,t.nonce&&(e.nonce=t.nonce),t.media&&(e.media=t.media),r.head.appendChild(e)),n.value||(u=ce(s,t=>{e.textContent=t},{immediate:!0}),n.value=!0)},l=()=>{r&&n.value&&(u(),r.head.removeChild(r.getElementById(a)),n.value=!1)};var d;return o&&!i&&bt(c),i||(d=l,V()&&q(d,void 0)),{id:a,css:s,unload:l,load:c,isLoaded:Z(n)}}(e,t);return{css:n,load:r,unload:o}}function si(e){if(e)try{new Function("exports","CTX",e)(this.exports,this.context)}catch(t){console.error(t,"createFunction")}}function ui(e,t){const n=ti(ri,this)[e];n?t(e,n):ti(ni,this)[e]?ti(ni,this)[e].push(t):ti(ni,this)[e]=[t]}function ci(e,t){ti(ni,this)[e]&&ti(ni,this)[e].forEach(e=>{e(t)})}var li=class{constructor({$ref:e,$asyncRef:t}){Ve(this,"$ref",void 0),Ve(this,"$asyncRef",void 0),Ve(this,"$getModal",void 0),Ve(this,"$closeModal",void 0),Ve(this,"$customBizService",Lo),Ve(this,"gctWidgets",{}),Ve(this,"$utility",{_:he,cloneDeep:ge,differenceBy:me,dayjs:M,BigNumber:Ie,plus:(e,t)=>new Ie(e).plus(new Ie(t)).toNumber(),minus:(e,t)=>new Ie(e).minus(new Ie(t)).toNumber(),multipliedBy:(e,t)=>new Ie(e).multipliedBy(new Ie(t)).toNumber(),div:(e,t)=>new Ie(e).div(new Ie(t)).toNumber(),transformSourceData:Jr,transformData:Xr}),Ve(this,"$httpBizService",Go),Ve(this,"$request",Ko),Ve(this,"$loading",qo),this.$asyncRef=t,this.$ref=e}$getPremission(e){return tn.getPremission(e)}$setPremission(e,t){tn.setPremission(e,t)}$getAppGlobalVar(e){return tn.getGlobalVar(e)}$setAppGlobalVar(e,t){tn.setGlobalVar(e,t)}$getPageGlobalVar(e){return tn.getPageGlobalVar(e)}$setPageGlobalVar(e,t){tn.setPageGlobalVar(e,t)}$getPageVar(e){return tn.getPageVar(e)}$setPageVar(e,t){tn.setPageVar(e,t)}$getCtxById(e){return tn.getContextByKey(e)}$setPropsByKey(e,t){var n;const r=null===(n=this.gctWidgets[e])||void 0===n?void 0:n.props;if(r)for(const o in t)r[o]=t[o]}$getPropsByKey(e,t=[],n){const r=this.gctWidgets[e];if(!r)return{};const o=n||!r.props?r:r.props;return"string"==typeof t&&(t=[t]),t.reduce((e,t)=>(e[t]=o[t],e),{})}},di=class{constructor(e,t){Ve(this,"modelKey",void 0),Ve(this,"getValue",void 0),Ve(this,"setValue",void 0),Ve(this,"submit",void 0),Ve(this,"reload",void 0),Ve(this,"key",void 0),this.key=e;const n=t.elRef;Object.keys(n).forEach(e=>{this[e]=n[e]})}};async function fi(e,t){const{name:n,refId:r,scopeId:o,modalTitle:i}=t,a=(null==i?void 0:i.split("."))||[];let s;if(a.length>1){var u;const e=[];pi(e,(null===(u=this.gctWidgets)||void 0===u?void 0:u[a[0]])||{}),s=e.find(e=>e.id===a[1])||{}}else if(a.length){var c;s=null===(c=this.gctWidgets)||void 0===c?void 0:c[a[0]]}var l;n===p.OPEN_MODAL&&await this.$getModal(r).open({title:null==s||null===(l=s.props)||void 0===l?void 0:l.title}),n===p.CLOSE_MODAL&&(r?await this.$getModal(r).close():await this.$closeModal()),n===p.REFRESH_TABLE&&await(await this.$getCtxById(o).$asyncRef(r)).reload(e?e[0]:null)}function pi(e,t){const n=t.children||[];for(const o of n)if(o.type&&o.type==d.CustomButton)e.push(o);else{var r;(null===(r=o.children)||void 0===r?void 0:r.length)&&pi(e,o)}}function hi({expression:e="",rowData:t=null},n){if(!e||"true"===e)return void n(!0);const r=Vr(e),o=r.reduce((e,t)=>{const n=t.split(".");return e[t]={formKey:n[0],itemKey:n[1]},e},{}),i=P(()=>r.reduce((e,n)=>{const r=n.split("."),o=r[0]+"",i=r[1];if(i){var a;const n=(t?t[i]:null===(a=Xt.value[o])||void 0===a?void 0:a[i])??"";e[o]?e[o][i]=n:e[o]={[i]:n}}else if(o.startsWith("$VAR_")||o.startsWith("$IVAR_")){var s;e[o]=(null===(s=Jt.value[o])||void 0===s?void 0:s.value)??""}else if(o.startsWith("$PAGERVAR_")||o.startsWith("$IPAGERVAR_")){var u;e[o]=(null===(u=zt.value[o])||void 0===u?void 0:u.value)??""}return e},{}));function a(t){const r={};Object.keys(o).forEach(e=>{var n;const{formKey:i,itemKey:a}=o[e];r[e]=a?null===(n=t[i])||void 0===n?void 0:n[a]:t[i]}),Fr(e,r).then(n)}t&&a(i.value),wt(i,()=>{a(i.value)},{debounce:200,immediate:!t})}async function gi({expression:e="",rowData:t=null}){if(!e||"true"===e)return!0;const n=Vr(e).reduce((e,t)=>{const n=t.split(".");return e[t]={formKey:n[0],itemKey:n[1]},e},{}),r={};return Object.keys(n).forEach(e=>{const{formKey:o,itemKey:i}=n[e];let a="";var s;if(o.startsWith("$VAR_"))a=(null===(s=Jt.value[o])||void 0===s?void 0:s.value)??"";else if(o.startsWith("$PAGERVAR_")){var u;a=(null===(u=zt.value[o])||void 0===u?void 0:u.value)??""}else if(i){var c;a=(t?t[i]:null===(c=Xt.value[o])||void 0===c?void 0:c[i])??""}else a=(t?t[o]:Xt.value[o])??"";r[e]=a}),Fr(e,r)}function mi(e,t){return nn(t)?e.displayType===a.CONFIG?ie(()=>!e.hidden):function(e){const t=ee(!1);return yi(e,e=>{t.value=!!e}),t}(e):ee(!1)}function yi({displayRule:e,tableForm:t},n){if(e){const r=Vr(e),o=r.reduce((e,t)=>{const n=t.split(".");return e[t]={formKey:n[0],itemKey:n[1]},e},{}),i=ie(()=>r.reduce((e,n)=>{var r;const o=n.split("."),i=o[0]+"",a=o[1]+"",s=null===(r={...t,...Xt.value}[i])||void 0===r?void 0:r[a];return e[i]?e[i][a]=s:e[i]={[a]:s},e},{}));wt(i,()=>{!function(e,t,n,r){const o={};Object.keys(t).forEach(n=>{var r;const{formKey:i,itemKey:a}=t[n];o[n]=null==e||null===(r=e[i])||void 0===r?void 0:r[a]}),Fr(n,o).then(r)}(i.value,o,e,e=>{n(e)})},{immediate:!0,debounce:300})}else n(!0)}function vi(e,t){const n=Q({});return ie(()=>e?e.filter(e=>{const{displayRule:r,hidden:o,displayType:i}=e.props||e;return nn(e.id)?i===a.CONFIG?n[e.id]=!o:yi({displayRule:r,tableForm:t},t=>{n[e.id]=t}):n[e.id]=!1,n[e.id]}):[])}function bi(e,t){if(!(null==e?void 0:e.length))return;const n=[],r=[];e.forEach((e,t)=>{e.displayRule?r.push({...e,id:t}):n.push({...e,id:t})});const o=wi(r,t),i=wi(n,t);return ie(()=>(null==o?void 0:o.value)||(null==i?void 0:i.value))}function wi(e,t){const n=Q({});if(e)return ie(()=>e.find(e=>{const{displayRule:r,hidden:o,displayType:i}=e.props||e;return i===a.CONFIG?n[e.id]=!o:yi({displayRule:r,tableForm:t},t=>{n[e.id]=t}),n[e.id]}))}function Oi(e){var t,n;return(null===(t=e.props)||void 0===t?void 0:t.displayRule)&&(null===(n=e.props)||void 0===n?void 0:n.displayType)===a.RULE?mi(e.props,e.id):Di(e)}function Di(e,t){var n;if(!e.id)return e.props.hidden=!0,ee(!1);if(!nn(e.id))return e.props.hidden=!0,ee(!1);const r=B("useProcessFieldEvent",void 0);if(r)return r.useFieldToShow(e),ie(()=>!e.props.hidden);const{displayType:o,displayRule:s}=e.props||{},{value:u,expression:c}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[i.HIDDEN]||{};return u&&c?(e.props.hidden=!0,hi({expression:c,rowData:t},t=>{e.props.hidden=!!t})):u?e.props.hidden=!0:o===a.RULE&&s&&(e.props.hidden=!0,hi({expression:s,rowData:t},t=>{e.props.hidden=!t})),ie(()=>!e.props.hidden)}async function Ei(e,t){var n;if(!e.id)return!1;if(!nn(e.id))return e.props.hidden=!0,!1;const r=B("useProcessFieldEvent",void 0);if(r)return r.useFieldToShow(e),!e.props.hidden;const{displayType:o,displayRule:s}=e.props||{},{value:u,expression:c}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[i.HIDDEN]||{};return u&&c?(e.props.hidden=!0,e.props.hidden=!!(await gi({expression:c,rowData:t}))):u?e.props.hidden=!0:o===a.RULE&&s&&(e.props.hidden=!0,e.props.hidden=!!(await gi({expression:s,rowData:t}))),!e.props.hidden}function Ii(e,t){return e.forEach(e=>{Di(e,t)}),ie(()=>e.filter(e=>!e.props.hidden))}function Si(e,t){var n;const{value:r,expression:o}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[i.HIDDEN]||{};r&&o&&hi({expression:o},e=>{t(e)}),t(e.props.hidden)}function Ti(e){var t;const n=(null===(t=e.props.componentDependency)||void 0===t?void 0:t.configDependency)||{},{value:r,expression:o}=n[i.HIDDEN]||{};r&&o&&hi({expression:o},t=>{e.props.hidden=!!t});const{value:a,expression:s}=n[i.REQUIRED]||{};a&&s&&hi({expression:s},t=>{e.props.required=!!t})}function Ci(t,n={},r=!1){var o,a,s;const{readonly:u,field:c,isFieldModel:l,bindFieldLink:d,refOriginField:f,refOriginModelKey:p,refOriginFieldType:h}=t.props,g=(null===(o=t.props.componentDependency)||void 0===o?void 0:o.configDependency)||{},m=B("formReadonly",void 0),y=B("useProcessFieldEvent",void 0);if(y&&y.useFieldWidget(t),!y&&t.formItem&&void 0!==(null==m?void 0:m.value)&&(t.props.readonly=(null==m?void 0:m.value)||t.props.readonly),!y&&!(null==m?void 0:m.value)){var v,b,w,O,D,E,I,S;const e=null===(v=g[i.READONLY])||void 0===v?void 0:v.expression,o=null===(b=g[i.READONLY])||void 0===b?void 0:b.fieldValue,a=null===(w=g[i.READONLY])||void 0===w?void 0:w.value;!o&&a&&e&&hi({expression:e,rowData:r?n:null},e=>{t.props.readonly=!!e});const s=null===(O=g[i.REQUIRED])||void 0===O?void 0:O.expression,c=null===(D=g[i.REQUIRED])||void 0===D?void 0:D.value;!(null===(E=g[i.REQUIRED])||void 0===E?void 0:E.fieldValue)&&c&&s&&hi({expression:s,rowData:r?n:null},e=>{t.props.required=!!e,t.props.readonly=!e&&u});const l=null===(I=g[i.DISABLED])||void 0===I?void 0:I.expression;(null===(S=g[i.DISABLED])||void 0===S?void 0:S.value)&&l&&hi({expression:l,rowData:r?n:null},e=>{t.props.disabled=!!e,t.props.readonly=!e&&u})}const T=null===(a=g[i.ASSIGNMENT])||void 0===a?void 0:a.expression,C=null===(s=g[i.ASSIGNMENT])||void 0===s?void 0:s.strategy;T&&hi({expression:T,rowData:r?n:null},e=>{n[c]=e});const N=l?null==d?void 0:d.join("."):c;n._OPCT||(n._OPCT={_DICT:{}});const M=P(()=>l?n._OPCT:n),x=P({get:()=>N?M.value[N]:"",set(t){T&&C===e.alwaysCover||(M.value[N]=t)}});if(l&&f){const e=ie(()=>n[d[0]]),t=d.length>2?[d[1]+".*"]:void 0;wt(e,async()=>{try{const n=await io({ids:e.value,refOriginField:d[0],refOriginFieldType:h,model:p,foreignFields:t});M.value[N]=n._OPCT[N],M.value._DICT||(M.value._DICT={}),M.value._DICT[N]=n._OPCT._DICT[N]}catch{for(const e in M.value)e.startsWith(N)&&(M.value[e]=void 0)}},{debounce:100,immediate:!0})}return{value:x,formRowData:M,fieldKey:N}}function Ni(e){var t,n,r,o;const{readonly:a}=e.props,s=(null===(t=e.props.componentDependency)||void 0===t?void 0:t.configDependency)||{},u=null===(n=s[i.REQUIRED])||void 0===n?void 0:n.expression,c=null===(r=s[i.REQUIRED])||void 0===r?void 0:r.value;!(null===(o=s[i.REQUIRED])||void 0===o?void 0:o.fieldValue)&&c&&u&&hi({expression:u},t=>{e.props.required=!!t,e.props.readonly=!t&&a})}var Mi=/* @__PURE__ */Ye({Vue:()=>x,Vue2:()=>{},del:()=>Ai,install:()=>Ri,isVue2:()=>!1,isVue3:()=>!0,set:()=>Pi});import*as xi from"vue";function Ri(){}function Pi(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Ai(e,t){Array.isArray(e)?e.splice(t,1):delete e[t]}$e(Mi,xi,"default");var _i=Symbol.for("DndContextType");function ki(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Yi="function"==typeof Symbol&&Symbol.observable||"@@observable",$i=function(){return Math.random().toString(36).substring(7).split("").join(".")},ji={INIT:"@@redux/INIT"+$i(),REPLACE:"@@redux/REPLACE"+$i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+$i()}};function Hi(e){var t=typeof e;return"production"!==process.env.NODE_ENV&&(t=function(e){if(void 0===e)return"undefined";if(null===e)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";var n=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}(e)),t}function Vi(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("production"===process.env.NODE_ENV?ki(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("production"===process.env.NODE_ENV?ki(1):"Expected the enhancer to be a function. Instead, received: '"+Hi(n)+"'");return n(Vi)(e,t)}if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?ki(2):"Expected the root reducer to be a function. Instead, received: '"+Hi(e)+"'");var o=e,i=t,a=[],s=a,u=!1;function c(){s===a&&(s=a.slice())}function l(){if(u)throw new Error("production"===process.env.NODE_ENV?ki(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function d(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?ki(4):"Expected the listener to be a function. Instead, received: '"+Hi(e)+"'");if(u)throw new Error("production"===process.env.NODE_ENV?ki(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var t=!0;return c(),s.push(e),function(){if(t){if(u)throw new Error("production"===process.env.NODE_ENV?ki(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,c();var n=s.indexOf(e);s.splice(n,1),a=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error("production"===process.env.NODE_ENV?ki(7):"Actions must be plain objects. Instead, the actual type was: '"+Hi(e)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(void 0===e.type)throw new Error("production"===process.env.NODE_ENV?ki(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(u)throw new Error("production"===process.env.NODE_ENV?ki(9):"Reducers may not dispatch actions.");try{u=!0,i=o(i,e)}finally{u=!1}for(var t=a=s,n=0;n<t.length;n++)(0,t[n])();return e}return f({type:ji.INIT}),(r={dispatch:f,subscribe:d,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?ki(10):"Expected the nextReducer to be a function. Instead, received: '"+Hi(e));o=e,f({type:ji.REPLACE})}})[Yi]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error("production"===process.env.NODE_ENV?ki(11):"Expected the observer to be an object. Instead, received: '"+Hi(e)+"'");function n(){e.next&&e.next(l())}return n(),{unsubscribe:t(n)}}})[Yi]=function(){return this},e},r}function Fi(e,t,...n){if("undefined"!=typeof process&&"production"===process.env.NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=/* @__PURE__ */new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let r=0;e=new Error(t.replace(/%s/g,function(){return n[r++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function Bi(e){return"object"==typeof e}var Ui="dnd-core/INIT_COORDS",Li="dnd-core/BEGIN_DRAG",Gi="dnd-core/PUBLISH_DRAG_SOURCE",Ki="dnd-core/HOVER",Wi="dnd-core/DROP",qi="dnd-core/END_DRAG";function zi(e,t){return{type:Ui,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var Ji={type:Ui,payload:{clientOffset:null,sourceClientOffset:null}};function Xi(e){return function(t=[],n={publishSource:!0}){const{publishSource:r=!0,clientOffset:o,getSourceClientOffset:i}=n,a=e.getMonitor(),s=e.getRegistry();e.dispatch(zi(o)),function(e,t,n){Fi(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){Fi(n.getSource(e),"Expected sourceIds to be registered.")})}(t,a,s);const u=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,a);if(null==u)return void e.dispatch(Ji);let c=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");!function(e){Fi("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(i),c=i(u)}e.dispatch(zi(o,c));const l=s.getSource(u).beginDrag(a,u);return null!=l?(function(e){Fi(Bi(e),"Item must be an object.")}(l),s.pinSource(u),{type:Li,payload:{itemType:s.getSourceType(u),item:l,sourceId:u,clientOffset:o||null,sourceClientOffset:c||null,isSourcePublic:!!r}}):void 0}}function Qi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Qi(e,t,n[t])})}return e}function ea(e){return function(t={}){const n=e.getMonitor(),r=e.getRegistry();!function(e){Fi(e.isDragging(),"Cannot call drop while not dragging."),Fi(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n),function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n).forEach((o,i)=>{const a={type:Wi,payload:{dropResult:Zi({},t,ta(o,i,r,n))}};e.dispatch(a)})}}function ta(e,t,n,r){const o=n.getTarget(e);let i=o?o.drop(r,e):void 0;return function(e){Fi(void 0===e||Bi(e),"Drop result must either be an object or undefined.")}(i),void 0===i&&(i=0===t?{}:r.getDropResult()),i}function na(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){Fi(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();return null!=r&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:qi}}}function ra(e,t){return null===t?null===e:Array.isArray(e)?e.some(e=>e===t):e===t}function oa(e){return function(t,{clientOffset:n}={}){!function(e){Fi(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),o=e.getMonitor(),i=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const o=e[r];ra(t.getTargetType(o),n)||e.splice(r,1)}}(r,i,o.getItemType()),function(e,t,n){Fi(t.isDragging(),"Cannot call hover while not dragging."),Fi(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r<e.length;r++){const t=e[r];Fi(e.lastIndexOf(t)===r,"Expected targetIds to be unique in the passed array."),Fi(n.getTarget(t),"Expected targetIds to be registered.")}}(r,o,i),function(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}(r,o,i),{type:Ki,payload:{targetIds:r,clientOffset:n||null}}}}function ia(e){return function(){if(e.getMonitor().isDragging())return{type:Gi}}}var aa=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store,n=function(e){return{beginDrag:Xi(e),publishDragSource:ia(e),hover:oa(e),drop:ea(e),endDrag:na(e)}}(this);return Object.keys(n).reduce((r,o)=>{const i=n[o];var a;return r[o]=(a=i,(...n)=>{const r=a.apply(e,n);void 0!==r&&t(r)}),r},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function sa(e,t){return{x:e.x-t.x,y:e.y-t.y}}var ua=[],ca=[];ua.__IS_NONE__=!0,ca.__IS_ALL__=!0;var la=class{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;Fi("function"==typeof e,"listener must be a function."),Fi(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe(()=>{const t=this.store.getState(),o=t.stateId;try{o===r||o===r+1&&!function(e,t){return e!==ua&&(e===ca||void 0===t||(n=t,r=e,n.filter(e=>r.indexOf(e)>-1)).length>0);var n,r}(t.dirtyHandlerIds,n)||e()}finally{r=o}})}subscribeToOffsetChange(e){Fi("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return Fi(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);return Fi(t,`Expected to find a valid target. targetId=${e}`),!(!this.isDragging()||this.didDrop())&&ra(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);return Fi(t,`Expected to find a valid source. sourceId=${e}`),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();if(o&&!ra(r,o))return!1;const i=this.getTargetIds();if(!i.length)return!1;const a=i.indexOf(e);return n?a===i.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?sa((i=r,{x:(o=t).x+i.x,y:o.y+i.y}),n):null;var o,i}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?sa(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},da="undefined"!=typeof global?global:self,fa=da.MutationObserver||da.WebKitMutationObserver;function pa(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}var ha,ga="function"==typeof fa?function(e){let t=1;const n=new fa(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:pa,ma=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},ya=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=ga(this.flush),this.requestErrorThrow=pa(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},va=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new ma(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(ya.registerPendingError),ba="dnd-core/ADD_SOURCE",wa="dnd-core/ADD_TARGET",Oa="dnd-core/REMOVE_SOURCE",Da="dnd-core/REMOVE_TARGET";function Ea(e,t){t&&Array.isArray(e)?e.forEach(e=>Ea(e,!1)):Fi("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(ha||(ha={}));var Ia=0;function Sa(e){switch(e[0]){case"S":return ha.SOURCE;case"T":return ha.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Ta(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,o]}=n.next();if(o===t)return!0;r=!!e}while(!r);return!1}var Ca=class{addSource(e,t){Ea(e),function(e){Fi("function"==typeof e.canDrag,"Expected canDrag to be a function."),Fi("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),Fi("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(ha.SOURCE,e,t);return this.store.dispatch(function(e){return{type:ba,payload:{sourceId:e}}}(n)),n}addTarget(e,t){Ea(e,!0),function(e){Fi("function"==typeof e.canDrop,"Expected canDrop to be a function."),Fi("function"==typeof e.hover,"Expected hover to be a function."),Fi("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(ha.TARGET,e,t);return this.store.dispatch(function(e){return{type:wa,payload:{targetId:e}}}(n)),n}containsHandler(e){return Ta(this.dragSources,e)||Ta(this.dropTargets,e)}getSource(e,t=!1){return Fi(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return Fi(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return Fi(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return Fi(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Sa(e)===ha.SOURCE}isTargetId(e){return Sa(e)===ha.TARGET}removeSource(e){var t;Fi(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:Oa,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},ya.enqueueTask(va.create(t))}removeTarget(e){Fi(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:Da,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);Fi(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){Fi(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=function(e){const t=(Ia++).toString();switch(e){case ha.SOURCE:return`S${t}`;case ha.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}(e);return this.types.set(r,t),e===ha.SOURCE?this.dragSources.set(r,n):e===ha.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=/* @__PURE__ */new Map,this.dragSources=/* @__PURE__ */new Map,this.dropTargets=/* @__PURE__ */new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}},Na=(e,t)=>e===t;function Ma(e=ua,t){switch(t.type){case Ki:break;case ba:case wa:case Da:case Oa:return ua;default:return ca}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,o=function(e,t){const n=/* @__PURE__ */new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const o=[];return n.forEach((e,t)=>{1===e&&o.push(t)}),o}(n,r);if(!(o.length>0)&&function(e,t,n=Na){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(n,r))return ua;const i=r[r.length-1],a=n[n.length-1];return i!==a&&(i&&o.push(i),a&&o.push(a)),o}function xa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ra={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Pa(e=Ra,t){const{payload:n}=t;switch(t.type){case Ui:case Li:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Ki:return r=e.clientOffset,o=n.clientOffset,!r&&!o||r&&o&&r.x===o.x&&r.y===o.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){xa(e,t,n[t])})}return e}({},e,{clientOffset:n.clientOffset});case qi:case Wi:return Ra;default:return e}var r,o}function Aa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Aa(e,t,n[t])})}return e}var ka={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ya(e=ka,t){const{payload:n}=t;switch(t.type){case Li:return _a({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Gi:return _a({},e,{isSourcePublic:!0});case Ki:return _a({},e,{targetIds:n.targetIds});case Da:return-1===e.targetIds.indexOf(n.targetId)?e:_a({},e,{targetIds:(r=e.targetIds,o=n.targetId,r.filter(e=>e!==o))});case Wi:return _a({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case qi:return _a({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,o}function $a(e=0,t){switch(t.type){case ba:case wa:return e+1;case Oa:case Da:return e-1;default:return e}}function ja(e=0){return e+1}function Ha(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Va(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Ha(e,t,n[t])})}return e}function Fa(e={},t){return{dirtyHandlerIds:Ma(e.dirtyHandlerIds,{type:t.type,payload:Va({},t.payload,{prevTargetIds:(n=e,r=[],"dragOperation.targetIds".split(".").reduce((e,t)=>e&&e[t]?e[t]:r||null,n))})}),dragOffset:Pa(e.dragOffset,t),refCount:$a(e.refCount,t),dragOperation:Ya(e.dragOperation,t),stateId:ja(e.stateId)};var n,r}function Ba(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ua=0,La=Symbol.for("__VUE_DND_CONTEXT_INSTANCE__");function Ga(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ka(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t;return o[La]||(o[La]=function(e,t,n={},r=!1){const o=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Vi(Fa,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),i=new aa(o,new la(o,new Ca(o))),a=e(i,t,n);return i.receiveBackend(a),i}(e,t,n,r)),o[La]}function Ka(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:window}(0,Mi.defineComponent)({name:"DndProvider",props:{manager:{type:Object},backend:{type:Function},context:{type:Object},options:{type:Object},debugMode:{type:Boolean}},setup:function(e,t){var n,r,o,i,a=t.slots,s=(o=function(e){return function(e){return"manager"in e&&e.manager}(e)?[e.manager,!1]:[Ga(e.backend,e.context,e.options,e.debugMode),!e.context]}(e),i=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(o,i)||function(e,t){if(e){if("string"==typeof e)return Ba(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ba(e,t):void 0}}(o,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],c=s[1];return c&&++Ua,(0,Mi.onUnmounted)(function(){if(c){var e=Ka();0===--Ua&&(e[La]=null)}}),n=u,(0,Mi.provide)(_i,n),function(){var e;return null!==(r=null===(e=a.default)||void 0===e?void 0:e.call(a))&&void 0!==r?r:null}}}),(0,Mi.defineComponent)({props:{connect:{type:Function,required:!0},src:{type:String,required:!0}},setup:function(e){return(0,Mi.watchEffect)(function(){if("undefined"!=typeof Image){var t=!1,n=new Image;return n.src=e.src,n.onload=function(){e.connect(n),t=!0},function(){t&&e.connect(null)}}}),function(){return null}}});var Wa=!1,qa=!1,za=/* @__PURE__ */function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.sourceId=e},t.getHandlerId=function(){return this.sourceId},t.canDrag=function(){Fi(!Wa,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Wa=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Wa=!1}},t.isDragging=function(){if(!this.sourceId)return!1;Fi(!qa,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return qa=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{qa=!1}},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.isDraggingSource=function(e){return this.internalMonitor.isDraggingSource(e)},t.isOverTarget=function(e,t){return this.internalMonitor.isOverTarget(e,t)},t.getTargetIds=function(){return this.internalMonitor.getTargetIds()},t.isSourcePublic=function(){return this.internalMonitor.isSourcePublic()},t.getSourceId=function(){return this.internalMonitor.getSourceId()},t.subscribeToOffsetChange=function(e){return this.internalMonitor.subscribeToOffsetChange(e)},t.canDragSource=function(e){return this.internalMonitor.canDragSource(e)},t.canDropOnTarget=function(e){return this.internalMonitor.canDropOnTarget(e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}(),Ja=!1,Xa=/* @__PURE__ */function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.targetId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.targetId=e},t.getHandlerId=function(){return this.targetId},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.canDrop=function(){if(!this.targetId)return!1;Fi(!Ja,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Ja=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ja=!1}},t.isOver=function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();function Qa(e){return function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if((t=n)&&t.__v_skip&&function(){throw new Error("Only native element nodes can now be passed to Vue DnD connectors.You can either wrap Component into a <div>, or turn it into a drag source or a drop target itself.")}(),!function(e){return!!(n=e)&&!0===n.__v_isVNode&&"symbol"!=((t=e.type)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t);var t,n}(n)){var o=n;return e(o,r),o}}}function Za(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var o=Qa(r);t[n]=function(){return o}}}),t}function es(e,t,n,r){let o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let u=0;u<i.length;u++){const a=i[u];if(!s(a))return!1;const c=e[a],l=t[a];if(o=n?n.call(r,c,l,a):void 0,!1===o||void 0===o&&c!==l)return!1}return!0}function ts(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ns=/* @__PURE__ */function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=Za({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,n.dragPreviewNode=e,n.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceOptionsInternal=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}var t,n,r=e.prototype;return r.receiveHandlerId=function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())},r.reconnect=function(){var e=this.reconnectDragSource();this.reconnectDragPreview(e)},r.reconnectDragSource=function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t},r.reconnectDragPreview=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)},r.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},r.didConnectedDragSourceChange=function(){return this.lastConnectedDragSource!==this.dragSource},r.didConnectedDragPreviewChange=function(){return this.lastConnectedDragPreview!==this.dragPreview},r.didDragSourceOptionsChange=function(){return!es(this.lastConnectedDragSourceOptions,this.dragSourceOptions)},r.didDragPreviewOptionsChange=function(){return!es(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)},r.disconnectDragSource=function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)},r.disconnectDragPreview=function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null)},r.clearDragSource=function(){this.dragSourceNode=null},r.clearDragPreview=function(){this.dragPreviewNode=null},t=e,(n=[{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"dragSource",get:function(){return this.dragSourceNode}},{key:"dragPreview",get:function(){return this.dragPreviewNode}}])&&ts(t.prototype,n),e}();function rs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var os=/* @__PURE__ */function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=Za({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,(0,Mi.isRef)(e)?n.dropTargetRef=e:n.dropTargetNode=e,n.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}var t,n,r=e.prototype;return r.reconnect=function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)},r.receiveHandlerId=function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())},r.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},r.didDropTargetChange=function(){return this.lastConnectedDropTarget!==this.dropTarget},r.didOptionsChange=function(){return!es(this.lastConnectedDropTargetOptions,this.dropTargetOptions)},r.disconnectDropTarget=function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)},r.clearDropTarget=function(){this.dropTargetRef=null,this.dropTargetNode=null},t=e,(n=[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.value}}])&&rs(t.prototype,n),e}(),is=/* @__PURE__ */function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=n,this.connector=r}var t=e.prototype;return t.beginDrag=function(){var e,t=this.spec,n=this.monitor;return null!=(e="object"==typeof t.item?t.item:"function"==typeof t.item?t.item(n):{})?e:null},t.canDrag=function(){var e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)},t.isDragging=function(e,t){var n=this.spec,r=this.monitor,o=n.isDragging;return o?o(r):t===e.getSourceId()},t.endDrag=function(){var e=this.spec,t=this.monitor,n=this.connector,r=e.end;r&&r(t.getItem(),t),n.reconnect()},e}();function as(){var e=(0,Mi.inject)(_i);return Fi(null!=e,"Expected drag drop context"),e}function ss(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function us(e,t,n){var r=as(),o=function(e,t,n){var r=(0,Mi.computed)(function(){return new is((0,Mi.unref)(e),(0,Mi.unref)(t),(0,Mi.unref)(n))});return(0,Mi.watchEffect)(function(){r.value.spec=(0,Mi.unref)(e)}),r}(e,t,n),i=function(e){return(0,Mi.computed)(function(){var t=(0,Mi.unref)(e).type;return Fi(null!=t,"spec.type must be defined"),t})}(e);(0,Mi.watchEffect)(function(e){if(null!=(0,Mi.unref)(i)){var a=(c=function(e,t,n){var r=n.getRegistry(),o=r.addSource(e,t);return[o,function(){return r.removeSource(o)}]}((0,Mi.unref)(i),(0,Mi.unref)(o),(0,Mi.unref)(r)),l=2,function(e){if(Array.isArray(e))return e}(c)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(c,l)||function(e,t){if(e){if("string"==typeof e)return ss(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ss(e,t):void 0}}(c,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],u=a[1];(0,Mi.unref)(t).receiveHandlerId(s),(0,Mi.unref)(n).receiveHandlerId(s),e(u)}var c,l})}function cs(e){return(0,Mi.computed)(function(){return"function"==typeof e?e():e})}var ls=/* @__PURE__ */je(/* @__PURE__ */ke((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!==o--;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}})());function ds(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fs(e,t,n){var r,o,i=(r=function(e,t,n){var r=(0,Mi.ref)((0,Mi.unref)(t)((0,Mi.unref)(e))),o=function(){var o=(0,Mi.unref)(t)((0,Mi.unref)(e));(0,ls.default)(r.value,o)||(r.value=o,n&&n())};return(0,Mi.watchEffect)(o),[r,o]}(e,t,n),o=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(r,o)||function(e,t){if(e){if("string"==typeof e)return ds(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ds(e,t):void 0}}(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],s=i[1];return(0,Mi.watchEffect)(function(t){var n=(0,Mi.unref)(e).getHandlerId();null!=n&&t((0,Mi.unref)(e).subscribeToStateChange(s,{handlerIds:[n]}))}),a}function ps(e,t,n){return fs(t,e||function(){return{}},function(){return(0,Mi.unref)(n).reconnect()})}function hs(e,t){var n=(0,Mi.reactive)({el:null,options:(0,Mi.unref)(t)});return(0,Mi.watchEffect)(function(){e(n)},{flush:"post"}),function(e,r){Pi(n,"el",e);var o=(0,Mi.unref)(t)||r;return(0,ls.default)(n.options,o)||Pi(n,"options",o),(0,Mi.unref)(e)}}function gs(e,t){return hs(function(t){(0,Mi.unref)(e).hooks.dragSource()(t.el,t.options)},(0,Mi.computed)(function(){return(0,Mi.unref)(t).options}))}function ms(e,t){return hs(function(t){(0,Mi.unref)(e).hooks.dragPreview()(t.el,t.options)},(0,Mi.computed)(function(){return(0,Mi.unref)(t).previewOptions}))}var ys=/* @__PURE__ */function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=n}var t=e.prototype;return t.canDrop=function(){var e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)},t.hover=function(){var e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)},t.drop=function(){var e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)},e}();function vs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bs(e,t,n){var r=as(),o=function(e,t){var n=(0,Mi.computed)(function(){return new ys((0,Mi.unref)(e),(0,Mi.unref)(t))});return(0,Mi.watchEffect)(function(){n.value.spec=(0,Mi.unref)(e)}),n}(e,t),i=function(e){return(0,Mi.computed)(function(){var t=(0,Mi.unref)(e).accept;return Fi(null!=t,"accept must be defined"),Array.isArray(t)?t:[t]})}(e);(0,Mi.watchEffect)(function(e){var a,s,u=(a=function(e,t,n){var r=(0,Mi.unref)(n).getRegistry(),o=r.addTarget((0,Mi.unref)(e),(0,Mi.unref)(t));return[o,function(){return r.removeTarget(o)}]}(i,o,r),s=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(a,s)||function(e,t){if(e){if("string"==typeof e)return vs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vs(e,t):void 0}}(a,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=u[0],l=u[1];(0,Mi.unref)(t).receiveHandlerId(c),(0,Mi.unref)(n).receiveHandlerId(c),e(l)})}function ws(e,t){return hs(function(t){(0,Mi.unref)(e).hooks.dropTarget()(t.el,t.options)},(0,Mi.computed)(function(){return(0,Mi.unref)(t).options}))}function Os(e){var t,n=cs(e),r=(t=as(),(0,Mi.computed)(function(){return new Xa((0,Mi.unref)(t))})),o=function(e){var t=as(),n=(0,Mi.computed)(function(){return new os((0,Mi.unref)(t).getBackend())});return(0,Mi.watchEffect)(function(t){n.value.dropTargetOptions=(0,Mi.unref)(e)||null,n.value.reconnect(),t(function(){return n.value.disconnectDropTarget()})}),n}((0,Mi.computed)(function(){return(0,Mi.unref)(n).options}));return bs(n,r,o),[ps((0,Mi.computed)(function(){return(0,Mi.unref)(n).collect||function(){return{}}}),r,o),ws(o,n)]}var Ds=/* @__PURE__ */j({name:"Vue3DndDraggableItem",props:{group:{type:String,required:!0},index:{type:Number,required:!0},item:{type:Object,required:!0},config:{type:Object,required:!0},add:{type:Function,required:!0},remove:{type:Function,required:!0},move:{type:Function,required:!0}},setup(e){const t=C("vue3-dnd-draggable-item"),n=ee(null),r=ee(!1),{config:o}=e,[i,a,s]=(l={type:o.type,item:()=>({group:e.group,item:e.item}),collect:e=>({canDrag:e.canDrag(),isDragging:e.isDragging()}),canDrag:e=>!o.canDrag||o.canDrag(e),end(t,n){if(o.end)return o.end(t,n);const r=n.getDropResult();r&&r.group!==e.group&&e.remove(t)},options:o.dragOptions,previewOptions:o.previewOptions},f=cs(l),d=as(),p=(0,Mi.computed)(function(){return new za((0,Mi.unref)(d))}),h=function(e,t){var n=as(),r=(0,Mi.computed)(function(){return new ns((0,Mi.unref)(n).getBackend())});return(0,Mi.watchEffect)(function(t){r.value.dragSourceOptions=(0,Mi.unref)(e)||null,(0,Mi.unref)(r).reconnect(),t(function(){r.value.disconnectDragSource()})}),(0,Mi.watchEffect)(function(e){r.value.dragPreviewOptions=(0,Mi.unref)(t)||null,(0,Mi.unref)(r).reconnect(),e(function(){r.value.disconnectDragPreview()})}),r}((0,Mi.computed)(function(){return(0,Mi.unref)(f).options}),(0,Mi.computed)(function(){return(0,Mi.unref)(f).previewOptions})),us(f,p,h),[ps((0,Mi.computed)(function(){return(0,Mi.unref)(f).collect||function(){return{}}}),p,h),gs(h,f),ms(h,f)]),[u,c]=Os({accept:o.type,collect:e=>({handlerId:e.getHandlerId(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0}),isOver:e.isOver()}),hover(t,a){if(o.hover)return o.hover(t,a);if(!1!==a.canDrop()&&!0!==i.value.isDragging&&e.item!==t.item&&a.isOver({shallow:!0})){const i=n.value.getBoundingClientRect(),s=a.getClientOffset(),u=o.offset??0;let c=0;if("vertical"===o.direction){const{top:e,height:t}=i,{y:n}=s;if(c=n-e-t/2,Math.abs(c)<u)return;r.value=c<0}else if("horizontal"===o.direction){const{left:e,width:t}=i,{x:n}=s;if(c=n-e-t/2,Math.abs(c)<u)return;r.value=c<0}const l=o.key??"id";t.group===e.group?e.move(r.value,e.item[l],t.item[l]):e.add(r.value,e.item[l],t.item)}},canDrop:(e,t)=>o.canDrop?o.canDrop(e,t):!0!==i.value.isDragging,drop:(t,n)=>o.drop?o.drop(t,n):{group:e.group},options:o.dropOptions});var l,d,f,p,h;return!0===e.config.isCustomHandle||e.config.handle||a(n),c(n),s(n),W(()=>{L(()=>{if(e.config.handle&&n.value){const t=n.value.querySelector(e.config.handle);t&&a(t)}})}),{ns:t,elRef:n,dragCollect:i,dropCollect:u,isBeforeHover:r,drag:a,preview:s}},render(){var e,t;return Y("div",{ref:"elRef",class:[this.ns.b(),this.ns.is("dragging",this.dragCollect.isDragging),this.ns.is("shallow-over",this.dropCollect.isShallowOver)]},[null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t,{item:this.item,index:this.index,isDragging:this.dragCollect.isDragging,isShallowOver:this.dropCollect.isShallowOver,isOver:this.dropCollect.isOver,isBeforeHover:this.isBeforeHover,isAfterHover:!this.isBeforeHover,direction:this.config.direction,drag:this.drag,preview:this.preview})])}}),{toString:Es}=Object.prototype;function Is(){return(65536*(1+Math.random())|0).toString(16).substring(1)}var Ss=/* @__PURE__ */j({name:"Vue3DndDraggable",props:{opts:{type:Object,default:()=>({})},items:{type:Array,required:!0}},emits:["add","remove","move"],setup(e,{emit:t}){const n=C("vue3-dnd-draggable"),r=`${Is()+Is()}-${Is()}-${Is()}-${Is()}-${Is()}${Is()}${Is()}`,o=ee(null),{opts:i,items:a}=ae(e),s=P(()=>u.value.key||"id"),u=P(()=>De({type:"Vue3DndDraggable",direction:"vertical"},i.value)),[c,l]=Os({accept:u.value.type,collect:e=>({handlerId:e.getHandlerId(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0})}),canDrop:(t,n)=>!(e.items.length>0)&&(!u.value.canDropContainer||u.value.canDropContainer(t,n)),drop:(e,t)=>u.value.dropContainer?u.value.dropContainer(e,t):(!1!==t.canDrop()&&a.value.push(e),{group:r})});return l(o),{ns:n,groupId:r,key:s,rootRef:o,collect:c,config:u,onAdd:(e,n,r)=>{const o=a.value.findIndex(e=>e[s.value]===n);a.value.splice(e?o:o+1,0,r),t("add",r,o)},onRemove:e=>{console.warn("onRemove 未实现",e)},onMove:(e,n,r)=>{const o=a.value.findIndex(e=>e[s.value]===n),i=a.value.findIndex(e=>e[s.value]===r),u=a.value[i],c=e?o:o+1;!e&&c===i||e&&c-1===i||(a.value.splice(c,0,u),c<i?a.value.splice(i+1,1):a.value.splice(i,1),t("move",o,c))}}},render(){let e;return Y("div",{ref:"rootRef",class:[this.ns.b(),this.ns.is("over",this.collect.isShallowOver)]},[Y(R,{name:"list"},(t=e=this.items.map((e,t)=>Y(Ds,{group:this.groupId,key:e[this.key]||t,index:t,item:e,config:this.config,add:this.onAdd,remove:this.onRemove,move:this.onMove},{default:e=>{var t,n;return null===(t=(n=this.$slots).draggableItem)||void 0===t?void 0:t.call(n,e)}})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!U(t)?e:{default:()=>[e]}))]);var t}});function Ts(){_gct.register.render?console.warn("渲染注册已存在,可能存在重复注册问题,请检查是否有重复引入渲染包的情况"):_gct.register.render=new Fe}var Cs=new URL("./index.min.css",import.meta.url);w.load(Cs.href);export{Ft as CardViewRender,li as Context,Xe as ControllerType,Ue as DESIGN_DATA_KEY_TAG,Be as DESIGN_TYPE,ze as DateFormat,Ge as DateRangeMap,Je as DatepickerRanges,Le as DesignItemAttribute,Ht as DesignRender,Qe as DesignRenderViewPrefix,ii as Events,Yt as FieldSchema,di as GctComponent,tn as Globals,Lt as HandwritingPad,Wt as PageTypeEnum,et as RenderNodeRegister,Ze as RenderNodeType,Wr as RenderPluginPgkUtil,Fe as RenderRegister,Ss as Vue3DndDraggable,Ds as Vue3DndDraggableItem,Qr as addDataByForm,no as cacheAdapter,Fr as calculate,gi as calculateDepResult,uo as defaultValMap,Di as dependencyToShow,Ei as dependencyToShowSync,Bo as emptyValueDisplay,Xt as formMap,qe as getDefaultDate,Ke as getDisabledDate,go as getIExp,mo as getIKeywordFieldKeys,We as getMobileDateRange,en as getPageTitle,nn as getPremission,yo as getQueryDateByKeyWord,bo as getQuerySort,io as getRefInfoId,Jt as globalVarCaches,Vr as identify,$t as initFieldWidgetRuntime,hi as insetDep,Oo as is,Yo as isArray,_o as isBoolean,To as isDate,Do as isDef,jo as isElement,So as isEmpty,Fo as isEmptyStr,Ao as isFunction,Ho as isMap,Co as isNull,No as isNullAndUnDef,Mo as isNullOrUnDef,xo as isNumber,Io as isObject,Ro as isPromise,ko as isRegExp,Po as isString,Eo as isUnDef,Vo as isUrl,$o as isWindow,Ts as onInit,Zt as pageDataforJson,zt as pageGlobaVariables,zr as schemaToStyle,Zr as setDataByForm,Qt as setFormData,Ti as tableWidgetByDept,Si as tableWidgetToShow,eo as transSelectData,Xr as transformData,to as transformDataToDict,Kr as transformPropsField,Jr as transformSourceData,jt as useAsyncFileAttrs,Ci as useDependency,Ni as useDependencyByRequired,Oi as useDependencyToShow,Ii as useDependencyToShowList,ut as useDesignRenderController,bi as useDisplayRuleColumnByStyles,vi as useDisplayRuleOptions,kt as useGctSelect,so as useGetBodyBySearch,vo as useQueryfilter,qr as useStyle,mi as useVisibileByRuleHook};
1
+ import{ASSIGNMENTSTRATEGY_ENUM as e,BizServiceEnum as t,ButtonTypeEnum as n,DateRangeEnums as r,DefaultDateTypeConst as o,Dependency_ENUM as i,DisplayType as s,EntityModelCategoryEnum as a,ExamineAndApproveStateEnum as u,FIELD_TYPE as c,FieldSysVarDefaultValueEnum as l,FormComponents as d,GLOBAL_VAR_TYPE as f,INNER_EVENT as p,OpinionTypeEnum as h,PluginModeEnum as g,PluginPgkUtil as m,SEARCH_SERVICE as y,SYSTEM_VAR_PREFIX as v,calcStyle as b,cssLoader as w,functionMap as O,gctMemoizeAsync as D,innerVarIds as E,isMultipleOperator as I,operator2FuncMap as S,t as T,useNamespace as C,usePermissionStore as N}from"@gct-paas/core";import M from"dayjs";import*as x from"vue";import{TransitionGroup as R,computed as P,createElementBlock as A,createElementVNode as _,createTextVNode as k,createVNode as Y,customRef as $,defineComponent as j,getCurrentInstance as H,getCurrentScope as V,h as F,inject as B,isVNode as U,nextTick as L,onActivated as G,onBeforeUnmount as K,onMounted as W,onScopeDispose as q,onUnmounted as z,openBlock as J,provide as X,reactive as Q,readonly as Z,ref as ee,resolveComponent as te,shallowReactive as ne,shallowRef as re,toRaw as oe,toRef as ie,toRefs as se,toValue as ae,unref as ue,watch as ce}from"vue";import{DesignNodeMode as le,extractFontStyle as de,generateWrapperStyle as fe,propsToStyle as pe}from"@gct-paas/schema";import*as he from"lodash-es";import{cloneDeep as ge,differenceBy as me,get as ye,isArray as ve,isEqual as be,isNull as we,isUndefined as Oe,merge as De,pick as Ee}from"lodash-es";import Ie from"bignumber.js";import*as Se from"esprima-next";import Te from"estraverse";import Ce from"escodegen";import Ne from"qs";var Me=Object.create,xe=Object.defineProperty,Re=Object.getOwnPropertyDescriptor,Pe=Object.getOwnPropertyNames,Ae=Object.getPrototypeOf,_e=Object.prototype.hasOwnProperty,ke=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Ye=(e,t)=>{let n={};for(var r in e)xe(n,r,{get:e[r],enumerable:!0});return t||xe(n,Symbol.toStringTag,{value:"Module"}),n},$e=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var o,i=Pe(t),s=0,a=i.length;s<a;s++)o=i[s],_e.call(e,o)||o===n||xe(e,o,{get:(e=>t[e]).bind(null,o),enumerable:!(r=Re(t,o))||r.enumerable});return e},je=(e,t,n)=>(n=null!=e?Me(Ae(e)):{},$e(!t&&e&&e.__esModule?n:xe(n,"default",{value:e,enumerable:!0}),e));function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}function Ve(e,t,n){return(t=function(e){var t=function(e){if("object"!=He(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=He(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==He(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fe=class{constructor(){Ve(this,"map",/* @__PURE__ */new Map)}register(e,t,n){const r=n?`${n}:${e}`:e;this.map.set(r,t)}unregister(e,t){const n=t?`${t}:${e}`:e;this.map.delete(n)}get(e,t){const n=t?`${t}:${e}`:e,r=this.map.get(n);return r||console.warn(`No component registered for tag: ${n}`),r}keys(){return Array.from(this.map.keys())}},Be="view-design",Ue="id",Le=/* @__PURE__ */function(e){return e.ACTIVE_TAG="design-active-item",e.DRAG_TAG="design-drop-item",e.INDEX_TAG="design-item-index",e.NODE_ID_TAG="design-item-id",e.DESIGN_NAME="design-item-name",e.GROUP_TAG="design-group-tag",e.DRAG_GROUP_TYPE="drag-group-type",e.IS_INLINE_BLOCK="is-inline-block",e.SELECTOR_INDEX="selector-index",e}({}),Ge={WEEK_NOW:e=>{const t=M().startOf("week").add(1,"day"),n=M().endOf("week").add(1,"day"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},MONTH_NOW:e=>{const t=M().startOf("month"),n=M().endOf("month"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},QUARTER_NOW:e=>{const t=M().startOf("quarter"),n=M().endOf("quarter"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},YEAR_NOW:e=>{const t=M().startOf("year"),n=M().endOf("year"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},WEEk_BEFORE:e=>{M.locale("zh-cn");const t=M().startOf("week").subtract(1,"week"),n=t.clone().endOf("week"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},MONTH_BEFORE:e=>{const t=M().add(-1,"month").startOf("month"),n=M().add(-1,"month").endOf("month"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},QUARTER_BEFORE:e=>{const t=M().add(-1,"quarter").startOf("quarter"),n=M().add(-1,"quarter").endOf("quarter"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},YEAR_BEFORE:e=>{const t=M().add(-1,"year").startOf("year"),n=M().add(-1,"year").endOf("year"),r=t.valueOf(),o=n.valueOf();return{disabled:e<r||e>o,minDate:t,maxDate:n}},DATE_BEFORE:e=>{const t=M().add(-1,"day");return{disabled:e<t.valueOf(),maxDate:t}},DATE_AFTER:e=>{const t=M();return{disabled:e>t.valueOf(),minDate:t}}},Ke=(e,t)=>{const n=M(e).valueOf(),r=Ge[t];if(r){const{disabled:e}=r(n);return e}return!1},We=e=>{const t=Ge[e];if(t){const{minDate:e,maxDate:n}=t(0);return Object.assign({},e&&{minDate:new Date(e)},n&&{maxDate:new Date(n)})}return{}},qe=(e,t)=>{let n;switch(e){case l.SYS_DATE:n=M().format(t??"YYYY-MM-DD");break;case l.SYS_DATE_TIME:n=M().format(t??"YYYY-MM-DD HH:mm:ss");break;case l.SYS_TIME:n=M().format(t??"HH:mm:ss")}return n},ze={YYYY:{valueFormat:"YYYY-01-01",picker:"year",columnsType:["year"]},"YYYY HH":{valueFormat:"YYYY-01-01 HH:00:00",columnsType:["hour"]},"YYYY-MM HH:mm":{valueFormat:"YYYY-MM-01 HH:mm:00",columnsType:["hour","minute"]},"YYYY-MM":{valueFormat:"YYYY-MM-01",picker:"month",columnsType:["year","month"]},"YYYY-MM-DD":{valueFormat:"YYYY-MM-DD",picker:"date",columnsType:["year","month","day"]},"YYYY-MM-DD HH":{valueFormat:"YYYY-MM-DD HH:00:00",columnsType:["hour"]},"YYYY-MM-DD HH:mm":{valueFormat:"YYYY-MM-DD HH:mm:00",columnsType:["hour","minute"]},"YYYY-MM-DD HH:mm:ss":{valueFormat:"YYYY-MM-DD HH:mm:ss",columnsType:["hour","minute","second"]},"HH:mm:ss":{valueFormat:"HH:mm:ss",columnsType:["hour","minute","second"]},"HH:mm":{valueFormat:"HH:mm:00",columnsType:["hour","minute"]},HH:{valueFormat:"HH:00:00",columnsType:["hour"]}},Je={[r.WEEK_NOW]:""},Xe=/* @__PURE__ */function(e){return e.DESIGN_RENDER="design-render",e}({}),Qe=/* @__PURE__ */function(e){return e.CUSTOM_HOME="custom-home",e.CARD_VIEW="card-view",e.MOBILE_CARD_VIEW="mobile-card-view",e.DESIGN_EDITOR="design-editor",e}({}),Ze=/* @__PURE__ */function(e){return e.PAGE="PAGE",e.PAGE_LOWER="page",e.FIELD="field",e.PANEL="panel",e.TABS="tabs",e.TAB_ITEM="tab-item",e.MENU_LIST="menu-list",e.SELECT_COMPONENT="select-component",e.GRID="grid",e.GRID_ITEM="grid-item",e.MESSAGE="message",e.WORKBENCH="workbench",e.PERSONAL_CENTER="personal-center",e.TODO="todo",e}({}),et=/* @__PURE__ */function(e){return e.DESIGN_EDITOR="design_editor",e}({}),tt=class{static register(e,t,n){const r=n?`${n}:${e}`:e;this.map.set(r,t)}static get(e,t){const n=t?`${t}:${e}`:e;if(this.cache.has(n))return this.cache.get(n);const r=this.map.get(n);if(r){const e=r();return this.cache.set(n,e),e}return null}static registerCustomHome(e,t){this.register(e,t,Qe.CUSTOM_HOME)}static registerDesignEditorNode(e,t){this.register(e,t,Qe.DESIGN_EDITOR)}static getCustomHome(e){return this.get(e,Qe.CUSTOM_HOME)}static getDesignEditorNode(e){return this.get(e,Qe.DESIGN_EDITOR)}};Ve(tt,"map",/* @__PURE__ */new Map),Ve(tt,"cache",/* @__PURE__ */new Map);var nt=/* @__PURE__ */j({name:"DesignRenderItem",props:{model:{type:Object,required:!0}},setup(e,{slots:t}){const n=C("design-render-item"),r=b(e.model.data);return()=>{var e;return Y("div",{class:n.b(),style:r},[null===(e=t.default)||void 0===e?void 0:e.call(t)])}}}),rt=class{constructor(){Ve(this,"context",{})}},ot=class{constructor(){Ve(this,"isDestroy",!1)}},it=class{constructor(e){Ve(this,"state",new ot),this.model=e}mounted(){}destroy(){}},st=class extends it{},at=class extends it{},ut=class{constructor(){Ve(this,"state",new rt),Ve(this,"prefix",""),Ve(this,"preview",!1),Ve(this,"item",/* @__PURE__ */new Map),Ve(this,"nodes",[]),Ve(this,"tree",[])}setTree(e){this.tree=e}setNodes(e){this.reset(),this.nodes=e,this.nodes.forEach(e=>{const t=tt.get(e.type,this.prefix);if(t){if(t.createController)return void this.item.set(e.id,t.createController(e));if(t.mode===le.CONTAINER)return void this.item.set(e.id,new st(e));if(t.mode===le.ITEM)return void this.item.set(e.id,new at(e))}this.item.set(e.id,new it(e))})}getNodes(e){if(e){const t=this.getTreeItem(e);return t&&t.children?t.children.map(e=>this.nodes.find(t=>e.id===t.id)):[]}return this.tree.map(e=>this.nodes.find(t=>e.id===t.id))}getTreeItem(e,t=this.tree){if(!e)return null;for(const n of t){if(n.id===e)return n;if(n.children&&n.children.length>0){const t=this.getTreeItem(e,n.children);if(t)return t}}return null}getController(e){return this.item.get(e)}mounted(){}unmounted(){this.reset()}reset(){this.nodes=[],this.item.forEach(e=>{e.destroy()})}};function ct(e){let t=B(Xe.DESIGN_RENDER);return t||(t=e?e():new ut,t.state=Q(t.state),X(Xe.DESIGN_RENDER,t),W(()=>{t.mounted()}),z(()=>{t.unmounted()})),t}var lt="undefined"!=typeof window&&"undefined"!=typeof document,dt=("undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),Object.prototype.toString),ft=()=>{},pt=e=>e();function ht(e,t={}){let n,r,o=ft;const i=e=>{clearTimeout(e),o(),o=ft};let s;return a=>{const u=ae(e),c=ae(t.maxWait);return n&&i(n),u<=0||void 0!==c&&c<=0?(r&&(i(r),r=void 0),Promise.resolve(a())):new Promise((e,l)=>{o=t.rejectOnCancel?l:e,s=a,c&&!r&&(r=setTimeout(()=>{n&&i(n),r=void 0,e(s())},c)),n=setTimeout(()=>{r&&i(r),r=void 0,e(a())},u)})}}function gt(e){return Array.isArray(e)?e:[e]}function mt(e){const t=Object.create(null);return n=>t[n]||(t[n]=e(n))}var yt=/\B([A-Z])/g,vt=(mt(e=>e.replace(yt,"-$1").toLowerCase()),/-(\w)/g);function bt(e,t,n={}){const{eventFilter:r=pt,...o}=n;return ce(e,(i=r,s=t,function(...e){return new Promise((t,n)=>{Promise.resolve(i(()=>s.apply(this,e),{fn:s,thisArg:this,args:e})).then(t).catch(n)})}),o);var i,s}function wt(e,t=!0,n){!function(e){return e||H()}(n)?t?e():L(e):W(e,n)}function Ot(e,t,n={}){const{debounce:r=0,maxWait:o,...i}=n;return bt(e,t,{...i,eventFilter:ht(r,{maxWait:o})})}mt(e=>e.replace(vt,(e,t)=>t?t.toUpperCase():""));var Dt=lt?window:void 0,Et=lt?window.document:void 0;function It(...e){const t=P(()=>{const t=gt(ae(e[0])).filter(e=>null!=e);return t.every(e=>"string"!=typeof e)?t:void 0});return n=([e,t,n,r],o,i)=>{if(!(null==e?void 0:e.length)||!(null==t?void 0:t.length)||!(null==n?void 0:n.length))return;const s=(a=r,"[object Object]"===dt.call(a)?{...r}:r);var a;const u=e.flatMap(e=>t.flatMap(t=>n.map(n=>((e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)))(e,t,n,s))));i(()=>{u.forEach(e=>e())})},r={flush:"post"},ce(()=>{var n,r;return[null!==(n=null===(r=t.value)||void 0===r?void 0:r.map(e=>function(e){var t;const n=ae(e);return null!==(t=null==n?void 0:n.$el)&&void 0!==t?t:n}(e)))&&void 0!==n?n:[Dt].filter(e=>null!=e),gt(ae(t.value?e[1]:e[0])),gt(ue(t.value?e[2]:e[1])),ae(t.value?e[3]:e[2])]},n,{...r,immediate:!0});var n,r}lt&&window.navigator,lt&&window.location;var St="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Tt="__vueuse_ssr_handlers__",Ct=/* @__PURE__ */Nt();function Nt(){return Tt in St||(St[Tt]=St[Tt]||{}),St[Tt]}var Mt={boolean:{read:e=>"true"===e,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},xt="vueuse-storage";function Rt(e,t,n,r={}){var o;const{flush:i="pre",deep:s=!0,listenToStorageChanges:a=!0,writeDefaults:u=!0,mergeDefaults:c=!1,shallow:l,window:d=Dt,eventFilter:f,onError:p=e=>{console.error(e)},initOnMounted:h}=r,g=(l?re:ee)("function"==typeof t?t():t),m=P(()=>ae(e));if(!n)try{n=(Ct.getDefaultStorage||(()=>null==Dt?void 0:Dt.localStorage))()}catch(S){p(S)}if(!n)return g;const y=ae(t),v=function(e){return null==e?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"object"==typeof e?"object":Number.isNaN(e)?"any":"number"}(y),b=null!==(o=r.serializer)&&void 0!==o?o:Mt[v],{pause:w,resume:O}=function(e,t,n={}){const{eventFilter:r,initialState:o="active",...i}=n,{eventFilter:s,pause:a,resume:u,isActive:c}=function(e=pt,t={}){const{initialState:n="active"}=t,r=function(...e){if(1!==e.length)return ie(...e);const t=e[0];return"function"==typeof t?Z($(()=>({get:t,set:ft}))):ee(t)}("active"===n);return{isActive:Z(r),pause:function(){r.value=!1},resume:function(){r.value=!0},eventFilter:(...t)=>{r.value&&e(...t)}}}(r,{initialState:o});return{stop:bt(e,t,{...i,eventFilter:s}),pause:a,resume:u,isActive:c}}(g,e=>function(e){try{const t=n.getItem(m.value);if(null==e)E(t,null),n.removeItem(m.value);else{const r=b.write(e);t!==r&&(n.setItem(m.value,r),E(t,r))}}catch(S){p(S)}}(e),{flush:i,deep:s,eventFilter:f});ce(m,()=>I(),{flush:i});let D=!1;function E(e,t){if(d){const r={key:m.value,oldValue:e,newValue:t,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",r):new CustomEvent(xt,{detail:r}))}}function I(e){if(!e||e.storageArea===n)if(e&&null==e.key)g.value=y;else if(!e||e.key===m.value){w();try{const t=b.write(g.value);void 0!==e&&(null==e?void 0:e.newValue)===t||(g.value=function(e){const t=e?e.newValue:n.getItem(m.value);if(null==t)return u&&null!=y&&n.setItem(m.value,b.write(y)),y;if(!e&&c){const e=b.read(t);return"function"==typeof c?c(e,y):"object"!==v||Array.isArray(e)?e:{...y,...e}}return"string"!=typeof t?t:b.read(t)}(e))}catch(S){p(S)}finally{e?L(O):O()}}}return d&&a&&(n instanceof Storage?It(d,"storage",e=>{h&&!D||I(e)},{passive:!0}):It(d,xt,e=>{h&&!D||I(e.detail)})),h?wt(()=>{D=!0,I()}):I(),g}function Pt(e,t){const n=(null==t?void 0:t.cache)?ne(t.cache):ne(/* @__PURE__ */new Map),r=(...e)=>(null==t?void 0:t.getKey)?t.getKey(...e):JSON.stringify(e),o=(t,...r)=>(n.set(t,e(...r)),n.get(t)),i=(...e)=>{const t=r(...e);return n.has(t)?n.get(t):o(t,...e)};return i.load=(...e)=>o(r(...e),...e),i.delete=(...e)=>{n.delete(r(...e))},i.clear=()=>{n.clear()},i.generateKey=r,i.cache=n,i}var At=0;Number.POSITIVE_INFINITY;var _t=/* @__PURE__ */function(e){return e.SELECT_ID="$VAR_GCT_SELECT_ID",e}({}),kt=function(e,t,n={}){const{window:r=Dt}=n;return Rt(e,t,null==r?void 0:r.localStorage,n)}("GCT_APP_GlobalCache",{}),Yt=e=>{const t=P({get:()=>kt.value[e]||{},set(t){kt.value[e]=t}});return{selectID:P({get:()=>t.value[_t.SELECT_ID],set(e){t.value[_t.SELECT_ID]?t.value[_t.SELECT_ID]=e:t.value={...t.value,[_t.SELECT_ID]:e}}}),cacheMap:t}},$t=class{static async getMap(e,t=!0){if(!e)return Promise.reject();if(!this.responsePromise.has(e)||!t){const t=(async()=>{const t=await _gct.api.apaas.modelMeta.getDetail({modelKey:e});this.modelData.set(e,t);const n=!!(null==t?void 0:t.fieldMetaList)&&t.fieldMetaList.reduce((e,t)=>(t.key&&(e[t.key]=t),e),{});n&&this.FiledData.set(e,n)})();this.responsePromise.set(e,t)}return this.responsePromise.get(e)}static async getConfigByField(e,t,n=!0){return await this.getMap(e,n),this.FiledData.get(e)[t]}static async getConfigByModel(e){return await this.getMap(e),this.modelData.get(e)}static clearCacheMap(e=!1){e&&this.responsePromise.clear(),this.modelData.clear(),this.FiledData.clear()}};async function jt(e,t=!1){const{modelKey:n,field:r,isCustomField:o,fieldName:i,readonly:s,fieldType:a}=e.props;if(!e.isField&&!t||"table_name_"===r)return{};let u;if(o?u={name:i,type:""}:n&&(u=await $t.getConfigByField(n,r)),!(o||u&&u.type===a))throw new Error("该字段可能已经被删除");if(!u)return{};const{required:c,specificConfig:l}=u;return e.props.fieldRequired=!!c,c&&!s&&(e.props.required=!0),void 0!==(null==l?void 0:l.digits)&&(e.props.precision=l.digits),u}Ve($t,"modelData",/* @__PURE__ */new Map),Ve($t,"FiledData",/* @__PURE__ */new Map),Ve($t,"responsePromise",/* @__PURE__ */new Map),Ve($t,"silent",!1);var Ht=()=>{const e=ee({});return{getFileAttrs:async function({modelKey:t,fieldKey:n}){const r=await $t.getConfigByField(t,n);if(r&&r.specificConfig){const t=Ee(r.specificConfig,["maxNumber","fileSize","fileTypes"])??{},n=t.fileTypes??[];e.value={maxSize:t.fileSize,maxCount:t.maxNumber,accept:n,acceptStr:Array.isArray(n)&&0!==n.length?n.join("、"):""}}},attrObj:e,getmaxTagLength:async function({modelKey:t,fieldKey:n}){const r=await $t.getConfigByField(t,n);r&&r.specificConfig&&(e.value={maxTagTextLength:(Ee(r.specificConfig,["codeVisibleNum"])??{}).codeVisibleNum||12})}}},Vt=/* @__PURE__ */j({name:"DesignRender",props:{model:{type:Object,required:!0},prefix:{type:String,default:""},preview:{type:Boolean,default:!1},context:{type:Object,default:()=>({})}},setup(e){const t=C("design-render"),n=ct();n.prefix=e.prefix,n.preview=e.preview,n.setNodes(e.model.nodes),n.setTree(e.model.tree),ce(()=>e.context,()=>{n.state.context=e.context},{immediate:!0});const r=P(()=>e.model.pageNode?b(e.model.pageNode.data):{}),o=n.getNodes();function i(t,r){const o=tt.get(t.type,n.prefix);if(!o)return console.warn(`未找到节点类型为${t.type}的渲染器`),null;let s=null;return s=o.mode===le.CONTAINER?function(t,r){const o=tt.get(t.type,n.prefix),s=n.getNodes(t.id),a=n.getController(t.id);return F(te(o.component),{key:t.id,c:a,model:t,parent:r,preview:e.preview,context:n.state.context,pageModel:e.model.pageNode},s.map(e=>i(e,t)))}(t,r):o.mode===le.ITEM?function(t,r){const o=tt.get(t.type,n.prefix),i=n.getController(t.id);return F(te(o.component),{key:t.id,c:i,model:t,parent:r,preview:e.preview,context:n.state.context,pageModel:e.model.pageNode})}(t,r):Y("div",null,[k("未支持的适配器模式["),o.mode,k("]")]),Y(nt,{model:t},{default:()=>s})}function s(t){if(!e.model.pageNode)return t;const r=tt.get(e.model.pageNode.type,n.prefix);if(!r)return console.warn(`未找到页面节点类型为${e.model.pageNode.type}的渲染器`),t;const o=n.getController(e.model.pageNode.id);return F(te(r.component),{key:e.model.pageNode.id,c:o,model:e.model.pageNode,parent:void 0,preview:e.preview,context:n.state.context},t)}return()=>Y("div",{class:t.b(),style:r.value},[s(o.map(e=>i(e)))])}}),Ft=D(_api.apaas.commonInfoCard.getGetById),Bt=/* @__PURE__ */j({name:"CardViewRender",props:{id:{type:String,required:!0},modelKey:{type:String,required:!0},fetch:{type:Function},preview:{type:Boolean,default:!1}},emits:["mounted"],setup(e,{emit:t,slots:n}){const r=C("card-view-render"),o=ee(!1),i=ee(!1),s=ee(null),a=ee({}),u=P(()=>{var e;return s.value?{width:(null===(e=s.value.pageNode)||void 0===e?void 0:e.data.width)?`${s.value.pageNode.data.width}px`:""}:{}});return async function(){if(e.id){try{o.value=!0,await async function(){const t=await Ft({id:e.id,modelKey:e.modelKey,type:"CARD"});t&&t.designerJson&&(s.value=JSON.parse(decodeURIComponent(t.designerJson)))}(),!0!==e.preview&&e.fetch&&(a.value=await e.fetch()||{})}catch(n){console.error(n)}finally{o.value=!1}i.value=!0,await L(),setTimeout(()=>{var e;t("mounted",null===(e=s.value)||void 0===e||null===(e=e.pageNode)||void 0===e?void 0:e.data)})}}(),()=>{var t;return Y("div",{class:r.b(),style:u.value},[o.value&&n.loading?null===(t=n.loading)||void 0===t?void 0:t.call(n):null,s.value&&i.value?Y(Vt,{context:{data:a.value,id:e.id,modelKey:e.modelKey},model:{nodes:s.value.nodes,pageNode:s.value.pageNode,tree:s.value.tree,type:Qe.CARD_VIEW},prefix:Qe.CARD_VIEW,preview:e.preview},null):null])}}}),Ut={class:"handwriting-pad"},Lt=["width","height"],Gt=/* @__PURE__ */((e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n})(/* @__PURE__ */j({__name:"HandwritingPad",props:{width:{default:300},height:{default:150},backgroundColor:{default:"transparent"},lineWidth:{default:2},strokeStyle:{default:"#000"}},setup(e,{expose:t}){const n=e,r=ee(null);let o=null,i=!1,s=0,a=0;function u(e){const t=r.value.getBoundingClientRect();return"touches"in e?{x:e.touches[0].clientX-t.left,y:e.touches[0].clientY-t.top}:{x:e.offsetX,y:e.offsetY}}function c(e){e.preventDefault(),i=!0;const{x:t,y:n}=u(e);s=t,a=n}function l(e){if(!i||!o)return;e.preventDefault();const{x:t,y:n}=u(e);o.beginPath(),o.moveTo(s,a),o.lineTo(t,n),o.stroke(),o.closePath(),s=t,a=n}function d(e){e.preventDefault(),i=!1}return W(()=>{o=r.value.getContext("2d"),"transparent"!==n.backgroundColor&&(o.fillStyle=n.backgroundColor,o.fillRect(0,0,n.width,n.height)),o.lineWidth=n.lineWidth,o.strokeStyle=n.strokeStyle}),t({getValue:function(){var e;return null===(e=r.value)||void 0===e?void 0:e.toDataURL()},setValue:function(e){const t=new Image;t.src=e,t.onload=()=>{null==o||o.drawImage(t,0,0)}},clear:function(){null==o||o.clearRect(0,0,n.width,n.height),"transparent"!==n.backgroundColor&&(o.fillStyle=n.backgroundColor,o.fillRect(0,0,n.width,n.height))}}),(t,n)=>(J(),A("div",Ut,[_("canvas",{ref_key:"canvasRef",ref:r,width:e.width,height:e.height,class:"canvas",onMousedown:c,onMousemove:l,onMouseup:d,onMouseleave:d,onTouchstart:c,onTouchmove:l,onTouchend:d},null,40,Lt)]))}}),[["__scopeId","data-v-d5b980b7"]]),Kt=class{static runApp({userInfo:e,env:t,aid:n}){this.ENV=t,this.AID=n,this.userInfo=e}};Ve(Kt,"ENV",void 0),Ve(Kt,"AID",void 0),Ve(Kt,"userInfo",void 0);var Wt={[f.DATE]:{callback:e=>M(e,["YYYY-MM-DD","YYYY/MM/DD"],!0).isValid(),message:"日期变量格式为YYYY-MM-DD,YYYY/MM/DD"},[f.TIME]:{callback:e=>M(e,"HH:mm:ss",!0).isValid(),message:"时间变量格式HH:mm:ss"},[f.DATETIME]:{callback:e=>M(e,["YYYY-MM-DD HH:mm:ss","YYYY/MM/DD HH:mm:ss"]).isValid(),message:"日期时间变量格式为YYYY-MM-DD HH:mm:ss,YYYY/MM/DD HH:mm:ss"}},qt=/* @__PURE__ */function(e){return e.WEB="web_module",e.MOBILE="mobile_module",e.PAD="pad_module",e}({}),zt={[qt.WEB]:{getPageInfo:_gct.api.apaas.webpage.getInfo},[qt.MOBILE]:{getPageInfo:_gct.api.apaas.mobilePage.getInfo},[qt.PAD]:{getPageInfo:_gct.api.apaas.padPage.getInfo}},Jt=ee({}),Xt=ee({}),Qt=ee({});function Zt(e,t){Qt.value[e]=t}var en=ee({pageStyle:{},pageConfig:{},pageName:""}),tn=ie(()=>{const{title:e}=en.value.pageConfig||{};return e}),nn=class e{static setModals(e){this.modalsCache={},null==e||e.forEach(e=>{this.modalsCache[e.id]=e})}static async getModalById(e){if(!e)return Promise.reject();if(/^i?g_modal_/.test(e)&&!this.modalsCache[e]){const[t]=await _api.apaas.appGlobalSettings.getInfo({keys:e,fullInfo:!0})||[];if(null==t?void 0:t.configJson){const n=JSON.parse(t.configJson);this.modalsCache[e]=n}}return this.modalsCache[e]||(console.error(`模态框${e}不存在`),Promise.reject())}static getPremission(e){if(!e)return!0;const t=this.permissions[e];return!t||N().getPermissionByKey(this.pageID,t)}static setPremission(e,t){this.permissions[t]=e}static setContextByKey(e,t){t?this.ContextCache[t]=e:this.ContextCache={page:e}}static getContextByKey(e){return this.ContextCache[e||"page"]}static async initvars(){(await _gct.api.apaas.appGlobalSettings.getList({type:"var",fullInfo:!0})||[]).forEach(e=>{if(e.configJson)try{const t=JSON.parse(e.configJson);Xt.value[t.key]=(({value:e,appredis:t,key:n,type:r})=>{var o;const i="dev"!==Kt.ENV&&t,{cacheMap:s}=Yt(`${Kt.AID}_${null===(o=Kt.userInfo)||void 0===o?void 0:o.userId}`);return new Proxy({value:e,type:r},{get:(e,t)=>i&&"value"===t?s.value[n]:Reflect.get(e,t),set:(e,t,r,o)=>(i&&"value"===t&&(s.value[n]?s.value[n]=r:s.value={...s.value,[n]:r}),Reflect.set(e,t,r,o))})})({value:t.defaultValue,appredis:t.appredis,key:t.key,type:t.type})}catch(t){console.error("initvars",t)}})}static async inithooks(){(await _gct.api.apaas.appGlobalSettings.getList({type:"event",fullInfo:!0})||[]).forEach(e=>{if(e.configJson)try{const t=new Function(JSON.parse(e.configJson).runJs),n=this.globalHookCaches[e.key];n&&n.push(t)}catch(t){console.error("inithooks",t)}})}static async initPermission(e){this.permissions=e||{}}static async initGlobalS(e){var t;if(this.setModals(e.modals),null===(t=e.pageVars)||void 0===t||t.forEach(e=>{var t;Jt.value[e.key]={value:null===(t=e.varInfo)||void 0===t?void 0:t.defaultValue,type:e.varInfo.type}}),!this.startRuning){this.startRuning=!0;try{await Promise.all([this.initvars(),this.inithooks()])}catch(n){console.log(n)}}}static getGlobalVar(e){const t=Xt.value[e];return t?t.value:console.warn("变量key不存在")}static async setGlobalVar(e,t){const n=Xt.value[e];if(!n)return console.warn("变量key不存在");n.value=t}static getPageVar(e){const t=Jt.value[e];return t?t.value:console.warn("变量key不存在")}static async setPageVar(e,t){const n=Jt.value[e];if(!n)return console.warn("变量key不存在");await function(e,t){if(t===f.NULL)return!0;const{callback:n,message:r}=Wt[t]||{callback:e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase()===t,value:"变量值必须为"+t};return n(e)?Promise.resolve():Promise.reject(r)}(t,n.type),Jt.value[e]&&(Jt.value[e].value=t)}static getPageGlobalVar(e){var t;return null===(t=Jt.value[e])||void 0===t?void 0:t.value}static setPageGlobalVar(e,t){Jt.value[e]?Jt.value[e].value=t:Jt.value[e]={value:t,type:"string"}}static async initPageByid(e,t=qt.WEB){this.pageID=e;const n=zt[t].getPageInfo,r=await n({id:e}),{runtimeJson:o,name:i}=r||{};if(en.value.pageName=i,!o)return Promise.reject();const s=JSON.parse(o);return s.widgets.filter(e=>"bottom-button-container"!==e.type).length?(await this.initGlobalS(s),en.value.pageConfig=s.pageConfig||{},en.value.pageStyle=s.pageStyle||{},{res:r,data:s,name:i}):Promise.reject()}static async initHistoryByid(e){this.pageID=e;const t=await _gct.api.apaas.pageDesignerLog.getInfo({id:e}),{runtimeJson:n,name:r}=t||{};if(!n)return Promise.reject();en.value.pageName=r;const o=JSON.parse(n);return await this.initGlobalS(o),en.value.pageConfig=o.pageConfig||{},en.value.pageStyle=o.pageStyle||{},{res:t,data:o,name:r}}static usePageHooks(t,n,r,o){const i=ee(!1);return W(async()=>{await L();const e=null==n?void 0:n.pageBeforeMount;if((null==e?void 0:e.name)&&await t.runExportByName(e.name,e.extraParams),o&&await o(t),i.value=!0,null==r?void 0:r.pageMounted)for(const t of this.globalHookCaches.pageMounted)await t();const{extraParams:s,name:a}=(null==n?void 0:n.pageMounted)||{};a&&t.runAsyncExportByName(a,s)}),K(async()=>{en.value={};const{extraParams:e,name:o}=(null==n?void 0:n.pageDestroyed)||{};if(o&&t.runExportByName(o,e),null==r?void 0:r.pageDestroyed)for(const t of this.globalHookCaches.pageDestroyed)await t()}),G(async()=>{if(e.setContextByKey(t.context),null==r?void 0:r.pageActivated)for(const e of this.globalHookCaches.pageActivated)await e();const{extraParams:o,name:i}=(null==n?void 0:n.pageActivated)||{};i&&t.runAsyncExportByName(i,o)}),{pageload:i}}};Ve(nn,"modalsCache",{}),Ve(nn,"pageID",""),Ve(nn,"permissions",{}),Ve(nn,"ContextCache",{}),Ve(nn,"startRuning",!1),Ve(nn,"globalHookCaches",{pageMounted:[],pageActivated:[],pageDestroyed:[]});var rn=nn.getPremission.bind(nn),on=class{constructor(){Ve(this,"mode",le.ITEM),Ve(this,"type",et.DESIGN_EDITOR),Ve(this,"fieldKey",void 0),Ve(this,"fieldType",void 0)}createController(e){throw new Error("Method not implemented.")}};function sn(e,t){class n extends on{constructor(...n){super(...n),Ve(this,"fieldType",e),Ve(this,"component",t)}}return{install(){e&&tt.registerDesignEditorNode(e,()=>new n)}}}var an=/* @__PURE__ */ke((e,t)=>{!function(n,r){"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_utc=r()}(e,function(){var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var s=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},s.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},s.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var a=s.parse;s.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),a.call(this,e)};var u=s.init;s.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var c=s.utcOffset;s.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],s=60*+o[1]+ +o[2];return 0===s?0:"+"===i?s:-s}(r),null===r))return this;var s=Math.abs(r)<=16?60*r:r;if(0===s)return this.utc(o);var a=this.clone();if(o)return a.$offset=s,a.$u=!1,a;var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(a=this.local().add(s+u,e)).$offset=s,a.$x.$localOffset=u,a};var l=s.format;s.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},s.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var d=s.toDate;s.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=s.diff;s.diff=function(e,t,n){if(e&&this.$u===e.$u)return f.call(this,e,t,n);var r=this.local(),o=i(e).local();return f.call(r,o,t,n)}}})}),un=/* @__PURE__ */ke((e,t)=>{!function(n,r){"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_timezone=r()}(e,function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,o){var i,s=function(e,n,r){void 0===r&&(r={});var o=new Date(e);return function(e,n){void 0===n&&(n={});var r=n.timeZoneName||"short",o=e+"|"+r,i=t[o];return i||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),t[o]=i),i}(n,r).formatToParts(o)},a=function(t,n){for(var r=s(t,n),i=[],a=0;a<r.length;a+=1){var u=r[a],c=u.type,l=u.value,d=e[c];d>=0&&(i[d]=parseInt(l,10))}var f=i[3],p=24===f?0:f,h=i[0]+"-"+i[1]+"-"+i[2]+" "+p+":"+i[4]+":"+i[5]+":000",g=+t;return(o.utc(h).valueOf()-(g-=g%1e3))/6e4},u=r.prototype;u.tz=function(e,t){void 0===e&&(e=i);var n,r=this.utcOffset(),s=this.toDate(),a=s.toLocaleString("en-US",{timeZone:e}),u=Math.round((s-new Date(a))/1e3/60),c=15*-Math.round(s.getTimezoneOffset()/15)-u;if(Number(c)){if(n=o(a,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var l=n.utcOffset();n=n.add(r-l,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},u.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=s(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var c=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,s=n||t||i,u=a(+o(),s);if("string"!=typeof e)return o(e).tz(s);var c=function(e,t,n){var r=e-60*t*1e3,o=a(r,n);if(t===o)return[r,t];var i=a(r-=60*(o-t)*1e3,n);return o===i?[r,o]:[e-60*Math.min(o,i)*1e3,Math.max(o,i)]}(o.utc(e,r).valueOf(),u,s),l=c[0],d=c[1],f=o(l).utcOffset(d);return f.$x.$timezone=s,f},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){i=e}}})}),cn=/* @__PURE__ */ke((e,t)=>{!function(n,r){"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_quarterOfYear=r()}(e,function(){var e="month",t="quarter";return function(n,r){var o=r.prototype;o.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var i=o.add;o.add=function(n,r){return n=Number(n),this.$utils().p(r)===t?this.add(3*n,e):i.bind(this)(n,r)};var s=o.startOf;o.startOf=function(n,r){var o=this.$utils(),i=!!o.u(r)||r;if(o.p(n)===t){var a=this.quarter()-1;return i?this.month(3*a).startOf(e).startOf("day"):this.month(3*a+2).endOf(e).endOf("day")}return s.bind(this)(n,r)}}})}),ln=/* @__PURE__ */ke((e,t)=>{!function(n,r){"object"==typeof e&&void 0!==t?t.exports=function(e,t){t.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}:"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_toArray=function(e,t){t.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}}(e,function(){return function(e,t){t.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}})}),dn=/* @__PURE__ */ke((e,t)=>{!function(n,r){"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_isoWeek=r()}(e,function(){var e="day";return function(t,n,r){var o=function(t){return t.add(4-t.isoWeekday(),e)},i=n.prototype;i.isoWeekYear=function(){return o(this).year()},i.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,i,s,a=o(this),u=(n=this.isoWeekYear(),s=4-(i=(this.$u?r.utc:r)().year(n).startOf("year")).isoWeekday(),i.isoWeekday()>4&&(s+=7),i.add(s,e));return a.diff(u,"week")+1},i.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var s=i.startOf;i.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return"isoweek"===n.p(e)?r?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(e,t)}}})}),fn=/* @__PURE__ */Ye({ABS:()=>or,ADD:()=>Kn,AND:()=>Dn,AVERAGE:()=>rr,CONCAT:()=>Rn,COUNT:()=>$r,DATE2TIMESTAMP:()=>hr,DATEFORMAT:()=>gr,DAY:()=>wr,DIVISION:()=>zn,EQ:()=>In,FINDSTR:()=>Fn,FIXED:()=>Jn,GE:()=>Nn,GET:()=>cr,GT:()=>Mn,HEADPUSH:()=>fr,HOUR:()=>Or,IF:()=>vn,ISDATERANGE:()=>Rr,ISEMPTY:()=>bn,ISNULL:()=>wn,ISTIMERANGE:()=>Pr,ISUNDEFINED:()=>On,LARGE:()=>er,LASTMONTHRANGE:()=>Tr,LASTQUARTER:()=>xr,LASTWEEKRANGE:()=>Ir,LASTYEARRANGE:()=>Nr,LE:()=>Tn,LEN:()=>xn,LOWER:()=>kn,LT:()=>Cn,LTRIM:()=>$n,MAX:()=>Zn,MIN:()=>tr,MINUTE:()=>Dr,MOD:()=>ir,MONTH:()=>br,MONTHRANGE:()=>Sr,MULTIPLICATION:()=>qn,NE:()=>Sn,NOW:()=>mr,OR:()=>En,PARSENUMBER:()=>Un,POWER:()=>ar,PUSH:()=>dr,PUT:()=>lr,QUARTER:()=>Mr,REDUCE:()=>Wn,REPEAT:()=>Hn,REPLACE:()=>Vn,ROUND:()=>Xn,ROUNDUP:()=>Qn,RTRIM:()=>jn,SEARCHSTR:()=>Bn,SEQMAP:()=>kr,SMALL:()=>nr,SPLIT:()=>Ln,SQRT:()=>ur,STDEV:()=>jr,SUBSTR:()=>An,SUBSTRING:()=>Pn,SUM:()=>Gn,SUMSQ:()=>Yr,TIMESTAMP2DATE:()=>pr,TODAY:()=>yr,TRIM:()=>Yn,TUPLE:()=>_r,UPPER:()=>_n,WEEKRANGE:()=>Er,YEAR:()=>vr,YEARRANGE:()=>Cr}),pn=/* @__PURE__ */je(an(),1),hn=/* @__PURE__ */je(un(),1),gn=/* @__PURE__ */je(cn(),1),mn=/* @__PURE__ */je(ln(),1),yn=/* @__PURE__ */je(dn(),1);function vn(e,t,n){return e?t:n}function bn(e){return null==e||""===e||0===e}function wn(e){return we(e)}function On(e){return Oe(e)}function Dn(...e){return(()=>{for(const t of e)if(!t)return!1;return!0})()}function En(...e){return e.some(e=>e)}function In(e,t){return be(e,t)}function Sn(e,t){return e!==t}function Tn(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<=t}function Cn(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<t}function Nn(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>=t}function Mn(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>t}function xn(e){return(null==e?void 0:e.length)||0}function Rn(...e){return e.join("")}function Pn(e="",t,n){return(()=>{const r=(t<0?[...e].reverse().join(""):e).slice(Math.abs(t+Number(t<0)),Math.abs(n)+Number(t>=0));return t<0?[...r].reverse().join(""):r})()}function An(e="",t,n){return(()=>{const r=(t<0?[...e].reverse().join(""):e).slice(Math.abs(t+Number(t<0)),Math.abs(t+Number(t<0))+Math.abs(n));return t<0?[...r].reverse().join(""):r})()}function _n(e=""){return e.toUpperCase()}function kn(e=""){return e.toLowerCase()}function Yn(e=""){return e.trim()}function $n(e=""){return e.replace(/^\s\s*/,"")}function jn(e=""){return e.replace(/\s\s*$/,"")}function Hn(e="",t=""){return(null===(n=e.match(new RegExp(t,"g")))||void 0===n?void 0:n.length)||null;var n}function Vn(e="",t="",n=""){return e.replace(new RegExp(t,"g"),n)}function Fn(e="",t=""){return e.includes(t)}function Bn(e="",t=""){return(null===(n=e.match(new RegExp(t,"g")))||void 0===n?void 0:n.length)||0;var n}function Un(e=""){return(()=>{const t=parseFloat(e);return isNaN(t)?null:t})()}function Ln(e="",t=""){return e.split(t)}function Gn(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?t.reduce(Hr,0):""}function Kn(...e){return e.flat().reduce(Hr,0)}function Wn(e,...t){return t.reduce(Vr,e)}function qn(e,...t){const n=t.flat().filter(e=>""!==e&&null!=e);return n.length?n.reduce(Fr,e):""}function zn(e,...t){return t.reduce(Br,e)}function Jn(e,t){return(()=>{if(t<0)throw new Error("Decimal places should be non-negative.");const[n,r=""]=e.toString().split(".");if(0==t)return n;let o=r.split("");if(o.length>t)o=o.slice(0,t);else{const e=o.length;for(let n=0;n<t-e;n++)o.push("0")}return`${n}.${o.join("")}`})()}function Xn(e,t){return(()=>{if(null===e||""===e||void 0===e)return"";if(t<0)throw new Error("Decimal places should be non-negative.");const n=Math.trunc(t),r=Number(e);if(isNaN(r))return"";const o=r>0?(+(Math.round(Number(r+`e${n}`))+`e-${n}`)).toFixed(n):-(+(Math.round(Number(-r+`e${n}`))+`e-${n}`)).toFixed(n);return parseFloat(o+"")})()}function Qn(e,t){if(null===e||""===e||void 0===e)return"";if(t<0)throw new Error("Decimal places should be non-negative.");return t=t?parseInt(t+""):0,new Ie(e).decimalPlaces(t,Ie.ROUND_UP).toNumber()}function Zn(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.max.apply(null,t):""}function er(e,t){return(()=>{if(t<1||t>e.length)throw new Error("Invalid value of n. It should be between 1 and the array length.");return e.sort((e,t)=>t-e)[t-1]})()}function tr(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.min.apply(null,t):""}function nr(e,t){return(()=>{if(t<1||t>e.length)throw new Error("Invalid value of n. It should be between 1 and the array length.");return e.sort((e,t)=>e-t)[t-1]})()}function rr(...e){const t=e.flat().filter(e=>""!==e&&null!=e),n=t.length;if(!n)return"";let r=new Ie(0);for(const o of t)r=r.plus(o);return r.dividedBy(n).toNumber()}function or(e){return Math.abs.call(null,e)}function ir(e,t){return(()=>{if(0===e)throw new Error("The second value should not be zero.");const n=new Ie(e).mod(t).toNumber();return isNaN(n)?"":n})()}function sr(e){if("number"==typeof e)return Number.isFinite(e)?e:null;if("string"==typeof e){const t=e.trim();if(""===t)return null;const n=Number(t);return Number.isFinite(n)?n:null}if("bigint"==typeof e){const t=Number(e);return Number.isFinite(t)?t:null}return null}function ar(e,t){return(()=>{const n=sr(e),r=sr(t);return null===n||null===r?NaN:Math.abs(r)>1e9?r>0?1/0:0:Math.pow(n,r)})()}function ur(e){return(()=>{const t=sr(e);return null===t?NaN:Math.sqrt(t)})()}function cr(e,t){return(()=>{if(Array.isArray(e)){if("number"==typeof t)return e[t];throw new Error("For arrays, the second argument should be a number.")}if("object"==typeof e){if("string"==typeof t)return e[t];throw new Error("For objects, the second argument (b) should be a string.")}throw new Error("Unsupported data type. The first argument (a) should be an array or an object.")})()}function lr(e,t,n){return(()=>{if(Array.isArray(e)){if(!("number"==typeof t&&t>=0&&t<e.length))throw new Error("For arrays, the second argument (b) should be a number.");e[t]=n}else{if("object"!=typeof e)throw new Error("Unsupported data type. The first argument (a) should be an array or an object.");if("string"!=typeof t||!e)throw new Error("For objects, the second argument (b) should be a string.");e[t]=n}return e})()}function dr(e,t){return(()=>{if(!t)throw new Error("For arrays, the second argument should not be null or undefined");return e.push(t),e})()}function fr(e,t){return(()=>{if(!t)throw new Error("For arrays, the second argument should not be null or undefined");return e.unshift(t),e})()}function pr(e){if(e)return(()=>{if(!e)throw new Error("the frist argument should not be null");const t=/* @__PURE__ */new Date(1e3*e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")} ${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`})()}function hr(e){if(e)return M(e).unix()}function gr(e,t){if(e)return M(e).format(t)}function mr(){return M().format("YYYY-MM-DD HH:MM:ss")}function yr(){return M().format("YYYY-MM-DD")}function vr(e){return M(e).year()}function br(e){return M(e).month()}function wr(e){return M(e).day()}function Or(e){return M(e).hour()}function Dr(e){return M(e).minute()}function Er(){return[Ar(M().startOf("week").toDate()),Ar(M().endOf("week").toDate())]}function Ir(){return[Ar(M().subtract(1,"week").startOf("week").toDate()),Ar(M().subtract(1,"week").endOf("week").toDate())]}function Sr(){return[Ar(M().startOf("month").toDate()),Ar(M().endOf("month").toDate())]}function Tr(){return[Ar(M().subtract(1,"month").startOf("month").toDate()),Ar(M().subtract(1,"month").endOf("month").toDate())]}function Cr(){return[Ar(M().startOf("year").toDate()),Ar(M().endOf("year").toDate())]}function Nr(){return[Ar(M().subtract(1,"year").startOf("year").toDate()),Ar(M().subtract(1,"year").endOf("year").toDate())]}function Mr(){return(()=>{const e=Math.floor((M().month()+3)/3);return[Ar(M().quarter(e).startOf("quarter").toDate()),Ar(M().quarter(e).endOf("quarter").toDate())]})()}function xr(){return(()=>{const e=Math.floor((M().month()+3)/3);return[Ar(M().quarter(e-1).startOf("quarter").toDate()),Ar(M().quarter(e-1).endOf("quarter").toDate())]})()}function Rr(e,t){return(()=>{const[n,r]=t;return e>=n&&e<=r})()}function Pr(e,t){return(()=>{const[n,r]=t,o=M(e,"HH:mm");if(n>r){const e=M(n,"HH:mm"),t=M(r,"HH:mm").add(1,"day");return o>=e||o<=t}return o>=M(n,"HH:mm")&&o<=M(r,"HH:mm")})()}function Ar(e){return M(e).tz("America/Chicago").format("YYYY-MM-DD HH:mm:ss.SSSSSSSSS ZZ")}function _r(...e){return[...e]}function kr(...e){const t=(e.length-e.length%2)/2,n={};return Array(t).forEach(t=>{const r=e[2*t];n[r]=e[2*t+1]}),n}function Yr(...e){return 0===(e=e.flat().filter(e=>""!==e&&null!=e)).length?"":e.map(e=>{const t=Fr(e,e);return""!==t?t:new Ie(0).toNumber()}).reduce((e,t)=>Hr(e,t)||Ie(0).toNumber(),new Ie(0).toNumber())}function $r(e){return Array.isArray(e)?e.length:""}function jr(...e){const t=e.flat().map(e=>Number(e)).filter(e=>Number.isFinite(e));if(t.length<2)return"";const n=t.reduce((e,t)=>e+t,0)/t.length,r=t.reduce((e,t)=>{const r=t-n;return e+r*r},0)/(t.length-1);return Math.sqrt(r)}function Hr(e,t){const n=new Ie(e).plus(new Ie(t)).toNumber();return isNaN(n)?"":n}function Vr(e,t){const n=new Ie(e).minus(new Ie(t)).toNumber();return isNaN(n)?"":n}function Fr(e,t){const n=new Ie(e).multipliedBy(new Ie(t)).toNumber();return isNaN(n)?"":n}function Br(e,t){const n=new Ie(e).div(new Ie(t)).toNumber();return isNaN(n)?"":n}M.extend(pn.default),M.extend(hn.default),M.extend(gn.default),M.extend(mn.default),M.extend(yn.default),window._METHOD_DEBUG_=fn;var Ur=Pt(function(e,t=!1){const n=Se.parse(e);let r=[];return Te.traverse(n,{enter:function(e){if(e.type===Se.Syntax.MemberExpression){const t=Gr(e);r.push(t),Object.assign(e,{name:t,type:Se.Syntax.Identifier})}else e.type===Se.Syntax.Identifier&&r.push(e.name);r=t?r.filter(e=>!O[e]&&"undefined"!==e):r.filter(e=>!(O[e]||"undefined"===e||E.includes(e)||e.startsWith(v)||e.startsWith("undefined.")))}}),[...new Set(r)]}),Lr=Pt(async function(e,t){const n=Ur(e,!0),r=n.filter(e=>E.includes(e)).sort(),o=n.filter(e=>e.startsWith(v)).sort(),i=await Wr([...r,...o]),s=Se.parse(e);Te.replace(s,{enter(e){if(e.type===Se.Syntax.BinaryExpression){const{operator:t}=e,n=S[t];return n?{type:Se.Syntax.CallExpression,arguments:[e.left,e.right],callee:{type:Se.Syntax.Identifier,name:n},optional:!1}:e}return e}}),Te.traverse(s,{enter:function(e){e.type===Se.Syntax.CallExpression&&e.callee.type===Se.Syntax.Identifier&&(e.callee.name=`await Methods.${e.callee.name}`)}});const a=Ce.generate(s,{format:{semicolons:!1}}),u={},c=[];i.forEach(e=>{c.push(`const ${e.key} = ${JSON.stringify(e.value)};`)}),Object.keys(t).map(e=>{if(e.includes(".")){const[n="",r]=e.split(".");u[n]||(c.push(`const ${n} = {};`),u[n]=!0),c.push(`${n}.${r} = ${JSON.stringify(t[e])};`)}else c.push(`const ${e} = ${JSON.stringify(t[e])};`)});const l=new Kr("Methods",[...c,"return new Promise(async(resolve)=>{",`const res = ${a};`,"resolve(res);","})"].join("\n")),d=await l(fn);return console.info("【表达式】",e),console.info("【参数】",t),console.info("【执行语句】",l.toString()),console.info("【执行结果】",d),d});function Gr(e){return e.type===Se.Syntax.MemberExpression?`${e.object.type===Se.Syntax.MemberExpression?Gr(e.object):e.object.name}.${e.property.name}`:e.type===Se.Syntax.Identifier?e.name:""}var Kr=Object.getPrototypeOf(async function(){}).constructor,Wr=Pt(async function(e){let t=[];return e.length>0&&(t=await _gct.api.apaas.systemVar.getGetVarByKeys({keys:e.join(",")})),t});window.gct_expression={execute:Lr,identify:Ur};var qr={[c.TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[c.LONG_TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[c.INTEGER]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[c.LONG]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[c.DOUBLE]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[c.DECIMAL]:{attrsTransform:[{from:"specificConfig.digits",to:"precision"},{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]}},zr=(e,t)=>{const{attrsTransform:n=[]}=qr[e]??{};return n.reduce((e,n)=>{const r=ye(t,n.from);return e[n.to]=r,e},{})},Jr=class extends m{static async loadRenderPlugin(e,t=[]){try{const n=await this.loadPlugins(e,t);t.forEach(e=>{const t=e.key;n[t]?_gct.register.render.register(t,n[t].default):console.error(`${t} 插件加载失败,请检查插件配置是否正确`)})}catch(n){console.error(n)}}static loadMobilePlugin(e=[]){return this.loadRenderPlugin(g.MOBILE,e)}static loadPadPlugin(e=[]){return this.loadRenderPlugin(g.PAD,e)}static loadWebPlugin(e=[]){return this.loadRenderPlugin(g.WEB,e)}};function Xr(e){const{style:t={}}=e||{},n="ignoringStyle"in e?e.ignoringStyle??[]:[],r=pe(t);return{wrapperStyle:fe(t,n),wStyle:r,labelFont:de(t.labelFont),contentFont:de(t.contentFont)}}var Qr=e=>de(e);function Zr(e,t){return(null==e?void 0:e.map(e=>eo(e,t)))||[]}function eo(e={},t={}){var n;const r=ge(e);r._X_ROW_KEY=void 0;const o=(null===(n=Object.keys(t??{}))||void 0===n?void 0:n.length)?Object.keys(r).reduce((e,n)=>{const o=t[n],i=r[n];if(o&&i)try{const t=(i+"").split(",").map(e=>o[e]);e[n]={[i+""]:t}}catch{}return e},{}):r._DICT||{};return{...r,_DICT:o,_OPCT:r.__FOREIGN__&&"object"==typeof r.__FOREIGN__?eo(r.__FOREIGN__,t):{}}}function to(e,t,n){"object"==typeof t&&De(e,eo(t,n))}function no(e,t,n){if("object"!=typeof t)return;for(const o in e)"_OPCT"!==o&&"_NOSUBMIT"!==o&&delete e[o];const r=eo(t,n);r._X_ROW_KEY=t._X_ROW_KEY,De(e,r)}function ro(e,t={},n={}){const r=ge(t.__FOREIGN__||t),o={_DICT:{}};return Object.keys(r).forEach(t=>{const i=`${e}.${t}`,s=n[t],a=r[t];if(s&&a)try{const e=(a+"").split(",").map(e=>s[e]);o._DICT[i]={[a+""]:e}}catch{}o[i]=a}),{...r,_OPCT:o}}function oo(e={},t={}){var n;const r=ge(e);return(null===(n=Object.keys(t??{}))||void 0===n?void 0:n.length)?Object.keys(r).reduce((e,n)=>{const o=t[n]||{},i=r[n];try{e[n]=(i+"").split(",").map(e=>o[e]).join(",")}catch{e[n]=i}return e},{}):r}function io(e,t,n=!1){var r;if(n||(null==e||null===(r=e.customApi)||void 0===r?void 0:r.value))return t(e);const o="object"==typeof e?Ne.stringify({...e,customApi:null}):e;let i=so.get(o);return i||(i=(async()=>{try{return await t(e)}catch(n){throw so.delete(o),n}})(),so.set(o,i,5e3),i)}var so=class{static set(e,t,n){this.cachedata[e]={maxAge:n||0,value:t,now:Date.now()}}static get(e){this.reset();const t=this.cachedata[e];return t?t.value:null}static delete(e){return delete this.cachedata[e]}static clear(){this.cachedata={}}static reset(){for(const e in this.cachedata){const t=this.cachedata[e];t&&Date.now()-t.now>t.maxAge&&this.delete(e)}}};async function ao({ids:e,refOriginField:t,refOriginFieldType:n,model:r,foreignFields:o}){if(!e)return Promise.reject();const i=await async function({refOriginFieldType:e,modelKey:t,foreignFields:n,ids:r}){if(e===c.RDO_REF){const{data:e={},dict:o={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"rdoGetVersionByRefId",modelCategory:a.ENTITY},{foreignFields:n},{refId:r});return{data:e,dict:o}}{const{data:e={},dict:o={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"getOne",modelCategory:a.ENTITY},{query:{"id_.eq":r},foreignFields:n},{});return{data:e,dict:o}}}({refOriginFieldType:n,modelKey:r,foreignFields:o,ids:e});return(null==i?void 0:i.data)?ro(t,i.data,i.dict):void 0}Ve(so,"cachedata",{});var uo=e=>io(e,ao),co=[y.CONTAINALL,y.CONTAINANY,y.IN,y.NOTIN];function lo(e,t,n){const{body:r,exp:o}=function(e){const r={};let o=n||"";return t.forEach(t=>{const n=t.props.fieldSearchKey||t.props.field,i=t.props.ope||[];let s=e[t.id];(null!=s||t.props.useMore)&&i.forEach(e=>{s=function(e,t){return co.indexOf(t)>-1&&"string"==typeof e?e.split(","):e}(s,e);const i=`${n}.${e}:${t.id}`,a=`${t.id}.${e}`;r[i]=t.props.useMore?null:s,o=o.replace(a,i)})}),{body:r,exp:o}}(function(e,t){if(!t.length)return e;const n=t.filter(e=>e.props.fieldType===c.RDO_REF);return n.length?(n.forEach(t=>{if(e[t.id]){if(!Array.isArray(e[t.id])){const[n,r]=e[t.id].split(":");return r||n}e[t.id]=e[t.id].map(e=>{if(!e)return;const[t,n]=e.split(":");return n||t})}}),e):e}(e,t));return{query:r,exp:o}}var fo=/* @__PURE__ */new Map;async function po(e,t={}){const{defaultValue:n}=e.props;if(!n)return null;if(Array.isArray(n)){if(!n.includes("CURRENT_ORG"))return null}else if("CURRENT_ORG"!==n)return null;const r=await _api.platform.tenant.getUserInfo();if(r){const t=await _api.apaas.designerCommon.getGetCanBeUsedOrgUser({pageNo:1,pageSize:999999999});if(t){const n=t.data;if(n&&-1!==n.findIndex(e=>e.masterOrgId===r.masterOrgId))return I(e.props.ope)?[r.masterOrgId]:r.masterOrgId}return null}}async function ho(e,t={}){const{defaultValue:n}=e.props;if(!n)return null;if(Array.isArray(n)){if(!n.includes("CURRENT_USER"))return null}else if("CURRENT_USER"!==n)return null;const r=await _api.platform.user.getInfo();if(r){const t=await _api.apaas.designerCommon.getGetCanBeUsedOrgUser({pageNo:1,pageSize:999999999});if(t){const n=t.data;if(n&&-1!==n.findIndex(e=>e.id===r.userId))return I(e.props.ope)?[r.userId]:r.userId}return null}}async function go(e,t={}){const{defaultValue:n}=e.props;return n&&0!==n.length?n:null}async function mo(e,t={}){const{defaultValue:n}=e.props;return null==n?null:n}function yo(e,t,n={}){const{defaultValueType:r,defaultValue:i}=e.props;if(null==r||""==r)return null;const{isRang:s,fieldType:a}=e.props;if(!s){const e=a===c.DATE?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss";if(r===o.SystemDate)return M(/* @__PURE__ */new Date).format(e)}if(s){const e=a===c.DATE?"YYYY-MM-DD":"YYYY-MM-DD 00:00:00",t=a===c.DATE?"YYYY-MM-DD":"YYYY-MM-DD 23:59:59",n=null!=i?Number(i):0,u=M();switch(r){case o.SystemDate:return s?[u.format(e),u.format(t)]:u.format(e);case o.PastDays:return[u.subtract(n,"day").format(e),u.subtract(n>0?1:0,"day").format(t)];case o.PastWeeks:return[u.subtract(n,"week").startOf("isoWeek").format(e),u.subtract(n>0?1:0,"week").endOf("isoWeek").format(t)];case o.PastMonths:return[u.subtract(n,"month").startOf("month").format(e),u.subtract(n>0?1:0,"month").endOf("month").format(t)];case o.PastYears:return[u.subtract(n,"year").startOf("year").format(e),u.subtract(n>0?1:0,"year").endOf("year").format(t)];case o.Yesterday:{const n=u.subtract(1,"day");return[n.format(e),n.format(t)]}case o.Past7Days:return[u.subtract(6,"day").format(e),u.format(t)];case o.Past30Days:return[u.subtract(29,"day").format(e),u.format(t)];case o.ThisWeek:return[u.startOf("isoWeek").format(e),u.endOf("isoWeek").format(t)];case o.LastWeek:{const n=u.subtract(1,"week");return[n.startOf("isoWeek").format(e),n.endOf("isoWeek").format(t)]}case o.ThisMonth:return[u.startOf("month").format(e),u.endOf("month").format(t)];case o.LastMonth:{const n=u.subtract(1,"month");return[n.startOf("month").format(e),n.endOf("month").format(t)]}case o.ThisYear:return[u.startOf("year").format(e),u.endOf("year").format(t)];case o.LastYear:{const n=u.subtract(1,"year");return[n.startOf("year").format(e),n.endOf("year").format(t)]}default:return null}}return null}fo.set(c.ORG,po),fo.set(c.ORG_MULTI,po),fo.set(c.USER,ho),fo.set(c.USER_MULTI,ho),fo.set(c.ENUM,go),fo.set(c.ENUM_MULTI,go),fo.set(c.INTEGER,mo),fo.set(c.LONG,mo),fo.set(c.DOUBLE,mo),fo.set(c.DECIMAL,mo),fo.set(c.TEXT,async function(e,t={}){const{defaultValue:n}=e.props;return n||null}),fo.set(c.LONG_TEXT,mo),fo.set(c.BOOLEAN,async function(e,t={}){const{defaultValue:n}=e.props;return null==n||""===n?null:n}),fo.set(c.DATE,async function(e,t={}){return yo(e)}),fo.set(c.DATE_TIME,async function(e,t={}){return yo(e)}),fo.set(c.PRINTER,async function(e,t={}){const{defaultValue:n}=e.props;return n&&0!==n.length?n:null});function vo(e,t=[]){return"ignoreCase"==(null==t?void 0:t[0])?null==e?void 0:e.replace(/\./g,".i"):e}function bo(e,t=[]){return"ignoreCase"==(null==t?void 0:t[0])?null==e?void 0:e.map(e=>{const t=e.split(".");return`${t[0]}.i${t[1]}`}):e}var wo=({searchField:e,keyword:t})=>t&&(null==e?void 0:e.reduce((e,n)=>(e[n.split(".").length>1?n:n+".like"]=t,e),{}))||{},Oo=e=>{let t={},n="";if(ve(e))t={...e.reduce((e,t)=>(e[t.key+"."+t.ope]=t.value,e),{})};else try{const o=JSON.parse(null==e?void 0:e.dataRule);n=null==o?void 0:o.exp;const i=(null==o?void 0:o.typeMap)||{},s=(null==o?void 0:o.query)||{};for(const e in s)if("VAR"===i[e]){var r;t[e]=null===(r=Xt.value)||void 0===r||null===(r=r[s[e]])||void 0===r?void 0:r.value}else t[e]=s[e]}catch(o){console.log(o)}return{query:t,getExp:function(...e){const t=[n,...e].filter(e=>e),r=t.join(",");return t.length>1?`AND(${r})`:r}}},Do=({collation:e,collationSort:t,collationField:n})=>e?e.filter(e=>e.collationField).map(e=>({sortField:e.collationField,sortType:e.collationSort})):t?[{sortField:n,sortType:t}]:[],Eo=Object.prototype.toString;function Io(e,t){return Eo.call(e)===`[object ${t}]`}function So(e){return void 0!==e}function To(e){return!So(e)}function Co(e){return null!==e&&Io(e,"Object")}function No(e){return Ho(e)||ko(e)?0===e.length:e instanceof Map||e instanceof Set?0===e.size:!!Co(e)&&0===Object.keys(e).length}function Mo(e){return Io(e,"Date")}function xo(e){return null===e}function Ro(e){return To(e)&&xo(e)}function Po(e){return To(e)||xo(e)}function Ao(e){return Io(e,"Number")}function _o(e){return Io(e,"Promise")&&Co(e)&&Yo(e.then)&&Yo(e.then)}function ko(e){return Io(e,"String")}function Yo(e){return"function"==typeof e}function $o(e){return Io(e,"Boolean")}function jo(e){return Io(e,"RegExp")}function Ho(e){return!!e&&Array.isArray(e)}function Vo(e){return"undefined"!=typeof window&&Io(e,"Window")}function Fo(e){return Co(e)&&!!e.tagName}function Bo(e){return Io(e,"Map")}function Uo(e){return/^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?/.test(e)}function Lo(e){return void 0===e||!e&&0!==e&&"0"!==e||!/[^\s]/.test(e+"")}function Go(e,t){const n=[],r=e.props.fieldType,o=P(()=>e.props.readonly&&r&&!n.includes(r)&&(void 0===t.value||""===t.value||null===t.value));return{RenderEmptyValue:/* @__PURE__ */j((e,t)=>()=>_gct.store.getEmptyDisplay),isEmpty:o}}var Ko=(e,t)=>["post","put"].includes(t)?(t,n={},r={},o={})=>e({modelKey:t.key,bsKey:t.action,modelCategory:t.modelCategory??a.ENTITY},r,n,o):(t,n={},r={})=>e({modelKey:t.key,bsKey:t.action,modelCategory:t.modelCategory??a.ENTITY},n,r),Wo={post:Ko(_gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey,"post"),get:Ko(_gct.api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey,"get"),put:Ko(_gct.api.apaas.modelComprehensive.putBizServiceModelCategoryModelKeyBsKey,"put"),delete:Ko(_gct.api.apaas.modelComprehensive.deleteBizServiceModelCategoryModelKeyBsKey,"delete")};async function qo(e,n,...r){return Wo[t[e.action]](e,n,...r)}async function zo(e,t,{body:n={},query:r={}}={},o={}){return await _gct.api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey({bsKey:t,modelKey:e,modelCategory:a.ENTITY},r,n,o)}var Jo=class e{constructor(){if(Ve(this,"mask",void 0),Ve(this,"container",void 0),Ve(this,"spinner",void 0),e.instance)return e.instance;e.instance=this,this.createLoadingElement(),this.initStyle()}createLoadingElement(){this.mask=document.createElement("div"),this.mask.id="gct-global-loading-mask",this.container=document.createElement("div"),this.container.id="gct-global-loading-container",this.spinner=document.createElement("div"),this.spinner.id="gct-global-loading-spinner",this.container.appendChild(this.spinner),this.mask.appendChild(this.container),document.body.appendChild(this.mask)}initStyle(){Object.assign(this.mask.style,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"rgba(255, 255, 255, 0.5)",zIndex:9999,display:"none",justifyContent:"center",alignItems:"center"}),Object.assign(this.container.style,{display:"flex",flexDirection:"column",alignItems:"center",width:"43px",height:"43px",backgroundColor:"transparent",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.15)"}),Object.assign(this.spinner.style,{display:"grid",width:"43px",height:"43px",gridTemplateColumns:"repeat(2, 1fr)",gridTemplateRows:"repeat(2, 1fr)",gap:"3px"});const e=getComputedStyle(document.documentElement).getPropertyValue("--gct-color-primary").trim();[{id:"gct-global-loading-item_1",delay:"0s"},{id:"gct-global-loading-item_2",delay:"0.25s"},{id:"gct-global-loading-item_3",delay:"0.75s"},{id:"gct-global-loading-item_4",delay:"0.5s"}].forEach(t=>{const n=document.createElement("div");n.id=t.id,Object.assign(n.style,{backgroundColor:e,opacity:.2,animation:"globalLoading 1s infinite",animationDelay:t.delay}),this.spinner.appendChild(n)});const t=document.createElement("style");t.textContent="\n @keyframes globalLoading {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0.2;\n }\n }",document.head.appendChild(t)}show(){this.mask.style.display="flex",document.body.style.overflow="hidden"}hide(){this.mask.style.display="none",document.body.style.overflow=""}};Ve(Jo,"instance",void 0);var Xo=new Jo,Qo=class{constructor({taskId:e,processInstanceId:t,examineAndApproveState:n=u.MY_CUSTOM,refFormId:r}){Ve(this,"isHandle",!1),Ve(this,"buttonConfig",{}),Ve(this,"fieldConfig",{}),Ve(this,"processId",""),Ve(this,"dataId",""),Ve(this,"taskId",void 0),Ve(this,"processInstanceId",void 0),Ve(this,"refFormId",void 0),Ve(this,"examineAndApproveState",u.MY_CUSTOM),Ve(this,"fieldStatus",""),Ve(this,"viewPageKey",void 0),Ve(this,"isviewPage",void 0),Ve(this,"isAPPviewPage",void 0),Ve(this,"nonRelatedPerson",!1),this.taskId=e,this.processInstanceId=t,this.examineAndApproveState=n,this.refFormId=r}async readyProcess(){const{taskId:e,processInstanceId:t}=this;if(this.examineAndApproveState===u.MY_AGENT){await this.getDataInfo();const{node:t,processDefId:r,webViewPageKey:o,mobileViewPageKey:i}=await _gct.api.apaas.pmProcessEngine.getTaskExtension({taskId:e});this.transformByNode(t),this.processId=r;for(const e in this.buttonConfig)e===n.Withdraw&&(this.buttonConfig[e].show=!1);this.viewPageKey=(null==t?void 0:t.webViewPageKey)||o,this.isAPPviewPage=!!(null==t?void 0:t.mobileViewPageKey)||!!i}if(this.examineAndApproveState===u.MY_APPLICATION){await this.getDataInfo();const{node:e,processDefId:r,withdrawOp:o}=await _gct.api.apaas.pmProcessEngine.getInitialTaskExtension({processInstanceId:t})||{};this.transformByNode(e),this.processId=r;for(const t in this.buttonConfig)t===n.End&&(this.buttonConfig[t].show=!1),t===n.Withdraw&&(this.buttonConfig[t].show=!!o),t===n.Resubmit&&(this.buttonConfig[t].show=!1)}if(this.examineAndApproveState===u.MY_DONE){await this.getDataInfo();const{node:t,processDefId:n}=await _gct.api.apaas.pmProcessEngine.getHiTaskExtension({taskId:e});this.transformByNode(t),this.processId=n}if(this.examineAndApproveState===u.MY_CUSTOM){await this.getDataInfo();const{node:e,processDefId:n,btnList:r,webViewPageKey:o,taskId:i,initiatorNode:s}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),a=r||[];this.withdrawByNode(s),this.transformByNode(e),this.processId=n;for(const t in this.buttonConfig){const e=t;this.buttonConfig[e].show&&(this.buttonConfig[e].show=a.includes(t))}if(!e)return void(this.nonRelatedPerson=!0);!a.length||"__initiator__"===(null==e?void 0:e.key)&&!i?this.isviewPage=!0:this.viewPageKey=(null==e?void 0:e.webViewPageKey)||o}if(this.examineAndApproveState===u.MY_CUSTOM_Modal){await this.getDataInfo();const{node:e,btnList:n,taskId:r,processDefId:o,initiatorNode:i}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),s=n||[];this.withdrawByNode(i),this.transformByNode(e),this.processId=o;for(const t in this.buttonConfig){const e=t;this.buttonConfig[e].show&&(this.buttonConfig[e].show=s.includes(t))}if(!e)return void(this.nonRelatedPerson=!0);s.length&&("__initiator__"!==(null==e?void 0:e.key)||r)||(this.isviewPage=!0)}}withdrawByNode(e){if(!e)return;const{buttonConfig:t}=e;JSON.parse(t+"").forEach(e=>{const t=T(`sys.process.paasBpmnButtonEvent.${e.type}`);this.buttonConfig[e.type]={showModel:!1,title:T("sys.process.element.approval")+t,success:t+T("sys.success")+"!",show:e.enable,alias:e.alias,signature:!!e.signature,opinion:{},user:{}}})}transformByNode(e){if(e)try{const{opinionConfig:t,buttonConfig:r,fieldConfig:o}=e,i=JSON.parse(r||"[]"),s=JSON.parse(t||'{"enabled":false,"opinionType":[]}');i.forEach(e=>{const t=T(`sys.process.paasBpmnButtonEvent.${e.type}`);var r,o;this.buttonConfig[e.type]={showModel:![n.Resubmit,n.Withdraw,n.End].includes(e.type),title:T("sys.process.element.approval")+t,success:t+T("sys.success")+"!",show:e.enable,alias:e.alias,signature:!!e.signature,opinion:{show:s.enabled,required:(r=s.opinionType,o=e.type,!!r.includes(h.Required)||!r.includes(h.Optional)&&(r.includes(h.ApproveRequired)||r.includes(h.ApproveRequired)?o===n.Approve:r.includes(h.CountersignRequired)?o===n.Countersign:r.includes(h.ReassignRequired)?o===n.Reassign:r.includes(h.RejectRequired)?o===n.Reject:r.includes(h.RefuseRequired)?o===n.Refuse:void 0))},user:{show:[n.Reassign,n.Countersign].includes(e.type),multiple:n.Countersign===e.type,label:T(`sys.process.user.${e.type}`)}}}),this.fieldConfig=JSON.parse(o+"")}catch(t){console.error("流程信息解析失败",t)}}async getDataInfo(){const{dataId:e}=await _gct.api.apaas.pmProcessEngine.getModel({processInstanceId:this.processInstanceId});this.dataId=e}filterButton(e){return this.nonRelatedPerson||this.examineAndApproveState===u.MY_DONE?[]:e.filter(e=>{if(e.type===d.ProcessApproveButton){const t=this.buttonConfig[e.props.action],n=!!(null==t?void 0:t.show);return n&&(e.props.title=t.alias),n}return!0})}useFieldWidget(e){if(this.nonRelatedPerson)return;const t=e.props.field,{fieldConfig:n,examineAndApproveState:r}=this;if(n&&n[t]){const{permission:r}=n[t];switch(r){case Zo.disabled:e.props.disabled=!0,e.props.readonly=!1;break;case Zo.editable:e.props.disabled=!1,e.props.readonly=!1;break;case Zo.readonly:e.props.readonly=!0}}else e.props.readonly=!0;e.props.disabled||![u.MY_APPLICATION,u.MY_DONE].includes(r)&&!this.isviewPage||(e.props.readonly=!0)}useFieldToShow(e){const t=e.props.field,{fieldConfig:n}=this;if(n&&n[t]){const{permission:r}=n[t];r===Zo.hidden&&(e.props.hidden=!0)}}};var Zo=/* @__PURE__ */function(e){return e.hidden="hidden",e.readonly="readonly",e.disabled="disabled",e.editable="editable",e}({});function ei(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ti(e,t,n){ei(e,t),t.set(e,n)}function ni(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function ri(e,t,n){return e.set(ni(e,t),n),n}function oi(e,t){return e.get(ni(e,t))}var ii=/* @__PURE__ */new WeakMap,si=/* @__PURE__ */new WeakMap,ai=/* @__PURE__ */new WeakSet,ui=class{constructor({js:e,css:t,pageKey:n,ContextVm:r}){var o;ei(this,o=ai),o.add(this),Ve(this,"context",void 0),Ve(this,"searchVNodes",void 0),Ve(this,"cssData",void 0),Ve(this,"pageKey",void 0),Ve(this,"exports",void 0),ti(this,ii,void 0),ti(this,si,void 0),Ve(this,"ProcessAppRoved",void 0),Ve(this,"pageLayoutMode",void 0),this.cssData=ni(ai,this,ci).call(this,t),this.searchVNodes={},this.exports={},ri(si,this,{}),ri(ii,this,{}),this.context=new r({$ref:this.getComponent.bind(this),$asyncRef:this.getSyncComponent.bind(this)}),ni(ai,this,li).call(this,e),nn.setContextByKey(this.context,n),this.pageKey=n}async runProcessBySaskId({taskId:e,processInstanceId:t,examineAndApproveState:n,refFormId:r}){this.ProcessAppRoved=new Qo({taskId:e,processInstanceId:t,examineAndApproveState:n,refFormId:r}),await this.ProcessAppRoved.readyProcess()}runContext(e,t){this.context.gctWidgets[e]=t}async runEventByName(e,t={},...n){const r=t[e];let o;if(r){if(Array.isArray(r))o=await async function(e,t,n){const r=e.map(gi.bind(t,n));await Promise.all(r)}(r,this.context,n);else{const e=this.exports[r.name];if(!e)throw`函数${r.name}不存在`;o=await e(...n,oe(r.extraParams))}return o}}async runExportByName(e,...t){try{const n=this.exports[e];if(!n)throw`函数${e}不存在`;return n(...t)}catch(n){console.error(n)}}async runAsyncExportByName(e,...t){try{const n=this.exports[e];if(!n)throw`函数${e}不存在`;return await this.getReadyByFun(n),n(...t)}catch(n){console.error(n)}}initNode(e,t){e&&(oi(si,this)[e]=t,ni(ai,this,fi).call(this,e,t))}destroyNode(e){delete oi(si,this)[e],delete oi(ii,this)[e]}initSearchs(e,t,n){if(e)if(this.searchVNodes[e]){const r=this.searchVNodes[e].find(e=>e.comId===n);r?r.callback=t:this.searchVNodes[e].push({callback:t,comId:n})}else this.searchVNodes[e]=[{callback:t,comId:n}]}cancelInitSearchs(e,t){e&&this.searchVNodes[e]&&(this.searchVNodes[e]=this.searchVNodes[e].filter(e=>e.comId!==t),0===this.searchVNodes[e].length&&delete this.searchVNodes[e])}runTableBySearch(e,t){(this.searchVNodes[e]||[]).forEach(({callback:e})=>e(t))}getComponent(e){const t=oi(si,this)[e];if(t)return new hi(e,t);console.error(e+"组件不存在或者未初始化")}getSyncComponent(e){if(!e)return Promise.reject("标识不能为空");const t=oi(si,this)[e];return t?Promise.resolve(new hi(e,t)):new Promise((t,n)=>{const r=setTimeout(()=>{n(e+"不存在或者被隐藏")},3e4);ni(ai,this,di).call(this,e,n=>{clearTimeout(r),t(new hi(e,n))})})}async getReadyByFun(e){var t;if("function"!=typeof e)return Promise.reject("参数必须是函数");const n=(null===(t=String(e).match(/\$ref\((["'A-Za-z0-9_-]+)\)/g))||void 0===t?void 0:t.map(e=>{var t;const n=null===(t=e.match(/\$ref\(['|"]([A-Za-z0-9_-]+)['|"]\)/))||void 0===t?void 0:t[1];return this.getSyncComponent(n)}))||[];await Promise.all(n)}async processHandle(e,{opinion:t,reassignId:n,signature:r,countersignUserIds:o,button:i}){const{taskId:s,processInstanceId:a}=this.ProcessAppRoved,u={procInstId:a,data:e,opinion:t,button:i,countersignUserIds:o,taskId:s,signature:r,reassignId:n};await _gct.api.apaas.pmProcessEngine.postProcExecute(u)}async checkedProcess(e){const{processId:t}=this.ProcessAppRoved||{};return t?e!==t?Promise.reject(T("sys.process.processInstanceMismatch")):void 0:Promise.reject(T("sys.process.pleaseInitiateTheProcessFirst"))}};function ci(e,t={}){if(!e)return;const{css:n,load:r,unload:o}=function(e,t={}){const n=re(!1),{document:r=Et,immediate:o=!0,manual:i=!1,id:s="vueuse_styletag_"+ ++At}=t,a=re(e);let u=()=>{};const c=()=>{if(!r)return;const e=r.getElementById(s)||r.createElement("style");e.isConnected||(e.id=s,t.nonce&&(e.nonce=t.nonce),t.media&&(e.media=t.media),r.head.appendChild(e)),n.value||(u=ce(a,t=>{e.textContent=t},{immediate:!0}),n.value=!0)},l=()=>{r&&n.value&&(u(),r.head.removeChild(r.getElementById(s)),n.value=!1)};var d;return o&&!i&&wt(c),i||(d=l,V()&&q(d,void 0)),{id:s,css:a,unload:l,load:c,isLoaded:Z(n)}}(e,t);return{css:n,load:r,unload:o}}function li(e){if(e)try{new Function("exports","CTX",e)(this.exports,this.context)}catch(t){console.error(t,"createFunction")}}function di(e,t){const n=oi(si,this)[e];n?t(e,n):oi(ii,this)[e]?oi(ii,this)[e].push(t):oi(ii,this)[e]=[t]}function fi(e,t){oi(ii,this)[e]&&oi(ii,this)[e].forEach(e=>{e(t)})}var pi=class{constructor({$ref:e,$asyncRef:t}){Ve(this,"$ref",void 0),Ve(this,"$asyncRef",void 0),Ve(this,"$getModal",void 0),Ve(this,"$closeModal",void 0),Ve(this,"$customBizService",Wo),Ve(this,"gctWidgets",{}),Ve(this,"$utility",{_:he,cloneDeep:ge,differenceBy:me,dayjs:M,BigNumber:Ie,plus:(e,t)=>new Ie(e).plus(new Ie(t)).toNumber(),minus:(e,t)=>new Ie(e).minus(new Ie(t)).toNumber(),multipliedBy:(e,t)=>new Ie(e).multipliedBy(new Ie(t)).toNumber(),div:(e,t)=>new Ie(e).div(new Ie(t)).toNumber(),transformSourceData:Zr,transformData:eo}),Ve(this,"$httpBizService",qo),Ve(this,"$request",zo),Ve(this,"$loading",Xo),this.$asyncRef=t,this.$ref=e}$getPremission(e){return nn.getPremission(e)}$setPremission(e,t){nn.setPremission(e,t)}$getAppGlobalVar(e){return nn.getGlobalVar(e)}$setAppGlobalVar(e,t){nn.setGlobalVar(e,t)}$getPageGlobalVar(e){return nn.getPageGlobalVar(e)}$setPageGlobalVar(e,t){nn.setPageGlobalVar(e,t)}$getPageVar(e){return nn.getPageVar(e)}$setPageVar(e,t){nn.setPageVar(e,t)}$getCtxById(e){return nn.getContextByKey(e)}$setPropsByKey(e,t){var n;const r=null===(n=this.gctWidgets[e])||void 0===n?void 0:n.props;if(r)for(const o in t)r[o]=t[o]}$getPropsByKey(e,t=[],n){const r=this.gctWidgets[e];if(!r)return{};const o=n||!r.props?r:r.props;return"string"==typeof t&&(t=[t]),t.reduce((e,t)=>(e[t]=o[t],e),{})}},hi=class{constructor(e,t){Ve(this,"modelKey",void 0),Ve(this,"getValue",void 0),Ve(this,"setValue",void 0),Ve(this,"submit",void 0),Ve(this,"reload",void 0),Ve(this,"key",void 0),this.key=e;const n=t.elRef;Object.keys(n).forEach(e=>{this[e]=n[e]})}};async function gi(e,t){const{name:n,refId:r,scopeId:o,modalTitle:i}=t,s=(null==i?void 0:i.split("."))||[];let a;if(s.length>1){var u;const e=[];mi(e,(null===(u=this.gctWidgets)||void 0===u?void 0:u[s[0]])||{}),a=e.find(e=>e.id===s[1])||{}}else if(s.length){var c;a=null===(c=this.gctWidgets)||void 0===c?void 0:c[s[0]]}var l;n===p.OPEN_MODAL&&await this.$getModal(r).open({title:null==a||null===(l=a.props)||void 0===l?void 0:l.title}),n===p.CLOSE_MODAL&&(r?await this.$getModal(r).close():await this.$closeModal()),n===p.REFRESH_TABLE&&await(await this.$getCtxById(o).$asyncRef(r)).reload(e?e[0]:null)}function mi(e,t){const n=t.children||[];for(const o of n)if(o.type&&o.type==d.CustomButton)e.push(o);else{var r;(null===(r=o.children)||void 0===r?void 0:r.length)&&mi(e,o)}}function yi({expression:e="",rowData:t=null},n){if(!e||"true"===e)return void n(!0);const r=Ur(e),o=r.reduce((e,t)=>{const n=t.split(".");return e[t]={formKey:n[0],itemKey:n[1]},e},{}),i=P(()=>r.reduce((e,n)=>{const r=n.split("."),o=r[0]+"",i=r[1];if(i){var s;const n=(t?t[i]:null===(s=Qt.value[o])||void 0===s?void 0:s[i])??"";e[o]?e[o][i]=n:e[o]={[i]:n}}else if(o.startsWith("$VAR_")||o.startsWith("$IVAR_")){var a;e[o]=(null===(a=Xt.value[o])||void 0===a?void 0:a.value)??""}else if(o.startsWith("$PAGERVAR_")||o.startsWith("$IPAGERVAR_")){var u;e[o]=(null===(u=Jt.value[o])||void 0===u?void 0:u.value)??""}return e},{}));function s(t){const r={};Object.keys(o).forEach(e=>{var n;const{formKey:i,itemKey:s}=o[e];r[e]=s?null===(n=t[i])||void 0===n?void 0:n[s]:t[i]}),Lr(e,r).then(n)}t&&s(i.value),Ot(i,()=>{s(i.value)},{debounce:200,immediate:!t})}async function vi({expression:e="",rowData:t=null}){if(!e||"true"===e)return!0;const n=Ur(e).reduce((e,t)=>{const n=t.split(".");return e[t]={formKey:n[0],itemKey:n[1]},e},{}),r={};return Object.keys(n).forEach(e=>{const{formKey:o,itemKey:i}=n[e];let s="";var a;if(o.startsWith("$VAR_"))s=(null===(a=Xt.value[o])||void 0===a?void 0:a.value)??"";else if(o.startsWith("$PAGERVAR_")){var u;s=(null===(u=Jt.value[o])||void 0===u?void 0:u.value)??""}else if(i){var c;s=(t?t[i]:null===(c=Qt.value[o])||void 0===c?void 0:c[i])??""}else s=(t?t[o]:Qt.value[o])??"";r[e]=s}),Lr(e,r)}function bi(e,t){return rn(t)?e.displayType===s.CONFIG?ie(()=>!e.hidden):function(e){const t=ee(!1);return wi(e,e=>{t.value=!!e}),t}(e):ee(!1)}function wi({displayRule:e,tableForm:t},n){if(e){const r=Ur(e),o=r.reduce((e,t)=>{const n=t.split(".");return e[t]={formKey:n[0],itemKey:n[1]},e},{}),i=ie(()=>r.reduce((e,n)=>{var r;const o=n.split("."),i=o[0]+"",s=o[1]+"",a=null===(r={...t,...Qt.value}[i])||void 0===r?void 0:r[s];return e[i]?e[i][s]=a:e[i]={[s]:a},e},{}));Ot(i,()=>{!function(e,t,n,r){const o={};Object.keys(t).forEach(n=>{var r;const{formKey:i,itemKey:s}=t[n];o[n]=null==e||null===(r=e[i])||void 0===r?void 0:r[s]}),Lr(n,o).then(r)}(i.value,o,e,e=>{n(e)})},{immediate:!0,debounce:300})}else n(!0)}function Oi(e,t){const n=Q({});return ie(()=>e?e.filter(e=>{const{displayRule:r,hidden:o,displayType:i}=e.props||e;return rn(e.id)?i===s.CONFIG?n[e.id]=!o:wi({displayRule:r,tableForm:t},t=>{n[e.id]=t}):n[e.id]=!1,n[e.id]}):[])}function Di(e,t){if(!(null==e?void 0:e.length))return;const n=[],r=[];e.forEach((e,t)=>{e.displayRule?r.push({...e,id:t}):n.push({...e,id:t})});const o=Ei(r,t),i=Ei(n,t);return ie(()=>(null==o?void 0:o.value)||(null==i?void 0:i.value))}function Ei(e,t){const n=Q({});if(e)return ie(()=>e.find(e=>{const{displayRule:r,hidden:o,displayType:i}=e.props||e;return i===s.CONFIG?n[e.id]=!o:wi({displayRule:r,tableForm:t},t=>{n[e.id]=t}),n[e.id]}))}function Ii(e){var t,n;return(null===(t=e.props)||void 0===t?void 0:t.displayRule)&&(null===(n=e.props)||void 0===n?void 0:n.displayType)===s.RULE?bi(e.props,e.id):Si(e)}function Si(e,t){var n;if(!e.id)return e.props.hidden=!0,ee(!1);if(!rn(e.id))return e.props.hidden=!0,ee(!1);const r=B("useProcessFieldEvent",void 0);if(r)return r.useFieldToShow(e),ie(()=>!e.props.hidden);const{displayType:o,displayRule:a}=e.props||{},{value:u,expression:c}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[i.HIDDEN]||{};return u&&c?(e.props.hidden=!0,yi({expression:c,rowData:t},t=>{e.props.hidden=!!t})):u?e.props.hidden=!0:o===s.RULE&&a&&(e.props.hidden=!0,yi({expression:a,rowData:t},t=>{e.props.hidden=!t})),ie(()=>!e.props.hidden)}async function Ti(e,t){var n;if(!e.id)return!1;if(!rn(e.id))return e.props.hidden=!0,!1;const r=B("useProcessFieldEvent",void 0);if(r)return r.useFieldToShow(e),!e.props.hidden;const{displayType:o,displayRule:a}=e.props||{},{value:u,expression:c}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[i.HIDDEN]||{};return u&&c?(e.props.hidden=!0,e.props.hidden=!!(await vi({expression:c,rowData:t}))):u?e.props.hidden=!0:o===s.RULE&&a&&(e.props.hidden=!0,e.props.hidden=!!(await vi({expression:a,rowData:t}))),!e.props.hidden}function Ci(e,t){return e.forEach(e=>{Si(e,t)}),ie(()=>e.filter(e=>!e.props.hidden))}function Ni(e,t){var n;const{value:r,expression:o}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[i.HIDDEN]||{};r&&o&&yi({expression:o},e=>{t(e)}),t(e.props.hidden)}function Mi(e){var t;const n=(null===(t=e.props.componentDependency)||void 0===t?void 0:t.configDependency)||{},{value:r,expression:o}=n[i.HIDDEN]||{};r&&o&&yi({expression:o},t=>{e.props.hidden=!!t});const{value:s,expression:a}=n[i.REQUIRED]||{};s&&a&&yi({expression:a},t=>{e.props.required=!!t})}function xi(t,n={},r=!1){var o,s,a;const{readonly:u,field:c,isFieldModel:l,bindFieldLink:d,refOriginField:f,refOriginModelKey:p,refOriginFieldType:h}=t.props,g=(null===(o=t.props.componentDependency)||void 0===o?void 0:o.configDependency)||{},m=B("formReadonly",void 0),y=B("useProcessFieldEvent",void 0);if(y&&y.useFieldWidget(t),!y&&t.formItem&&void 0!==(null==m?void 0:m.value)&&(t.props.readonly=(null==m?void 0:m.value)||t.props.readonly),!y&&!(null==m?void 0:m.value)){var v,b,w,O,D,E,I,S;const e=null===(v=g[i.READONLY])||void 0===v?void 0:v.expression,o=null===(b=g[i.READONLY])||void 0===b?void 0:b.fieldValue,s=null===(w=g[i.READONLY])||void 0===w?void 0:w.value;!o&&s&&e&&yi({expression:e,rowData:r?n:null},e=>{t.props.readonly=!!e});const a=null===(O=g[i.REQUIRED])||void 0===O?void 0:O.expression,c=null===(D=g[i.REQUIRED])||void 0===D?void 0:D.value;!(null===(E=g[i.REQUIRED])||void 0===E?void 0:E.fieldValue)&&c&&a&&yi({expression:a,rowData:r?n:null},e=>{t.props.required=!!e,t.props.readonly=!e&&u});const l=null===(I=g[i.DISABLED])||void 0===I?void 0:I.expression;(null===(S=g[i.DISABLED])||void 0===S?void 0:S.value)&&l&&yi({expression:l,rowData:r?n:null},e=>{t.props.disabled=!!e,t.props.readonly=!e&&u})}const T=null===(s=g[i.ASSIGNMENT])||void 0===s?void 0:s.expression,C=null===(a=g[i.ASSIGNMENT])||void 0===a?void 0:a.strategy;T&&yi({expression:T,rowData:r?n:null},e=>{n[c]=e});const N=l?null==d?void 0:d.join("."):c;n._OPCT||(n._OPCT={_DICT:{}});const M=P(()=>l?n._OPCT:n),x=P({get:()=>N?M.value[N]:"",set(t){T&&C===e.alwaysCover||(M.value[N]=t)}});if(l&&f){const e=ie(()=>n[d[0]]),t=d.length>2?[d[1]+".*"]:void 0;Ot(e,async()=>{try{const n=await uo({ids:e.value,refOriginField:d[0],refOriginFieldType:h,model:p,foreignFields:t});M.value[N]=n._OPCT[N],M.value._DICT||(M.value._DICT={}),M.value._DICT[N]=n._OPCT._DICT[N]}catch{for(const e in M.value)e.startsWith(N)&&(M.value[e]=void 0)}},{debounce:100,immediate:!0})}return{value:x,formRowData:M,fieldKey:N}}function Ri(e){var t,n,r,o;const{readonly:s}=e.props,a=(null===(t=e.props.componentDependency)||void 0===t?void 0:t.configDependency)||{},u=null===(n=a[i.REQUIRED])||void 0===n?void 0:n.expression,c=null===(r=a[i.REQUIRED])||void 0===r?void 0:r.value;!(null===(o=a[i.REQUIRED])||void 0===o?void 0:o.fieldValue)&&c&&u&&yi({expression:u},t=>{e.props.required=!!t,e.props.readonly=!t&&s})}var Pi={preview:{type:Boolean,default:!1},c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,required:!0}},Ai={preview:{type:Boolean,default:!1},c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,required:!0}},_i={preview:{type:Boolean,default:!1},c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,required:!0},field:{type:Object,required:!0},value:{type:Object}},ki=/* @__PURE__ */Ye({Vue:()=>x,Vue2:()=>{},del:()=>Hi,install:()=>$i,isVue2:()=>!1,isVue3:()=>!0,set:()=>ji});import*as Yi from"vue";function $i(){}function ji(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Hi(e,t){Array.isArray(e)?e.splice(t,1):delete e[t]}$e(ki,Yi,"default");var Vi=Symbol.for("DndContextType");function Fi(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Bi="function"==typeof Symbol&&Symbol.observable||"@@observable",Ui=function(){return Math.random().toString(36).substring(7).split("").join(".")},Li={INIT:"@@redux/INIT"+Ui(),REPLACE:"@@redux/REPLACE"+Ui(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ui()}};function Gi(e){var t=typeof e;return"production"!==process.env.NODE_ENV&&(t=function(e){if(void 0===e)return"undefined";if(null===e)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";var n=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}(e)),t}function Ki(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("production"===process.env.NODE_ENV?Fi(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("production"===process.env.NODE_ENV?Fi(1):"Expected the enhancer to be a function. Instead, received: '"+Gi(n)+"'");return n(Ki)(e,t)}if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?Fi(2):"Expected the root reducer to be a function. Instead, received: '"+Gi(e)+"'");var o=e,i=t,s=[],a=s,u=!1;function c(){a===s&&(a=s.slice())}function l(){if(u)throw new Error("production"===process.env.NODE_ENV?Fi(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function d(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?Fi(4):"Expected the listener to be a function. Instead, received: '"+Gi(e)+"'");if(u)throw new Error("production"===process.env.NODE_ENV?Fi(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var t=!0;return c(),a.push(e),function(){if(t){if(u)throw new Error("production"===process.env.NODE_ENV?Fi(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,c();var n=a.indexOf(e);a.splice(n,1),s=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error("production"===process.env.NODE_ENV?Fi(7):"Actions must be plain objects. Instead, the actual type was: '"+Gi(e)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(void 0===e.type)throw new Error("production"===process.env.NODE_ENV?Fi(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(u)throw new Error("production"===process.env.NODE_ENV?Fi(9):"Reducers may not dispatch actions.");try{u=!0,i=o(i,e)}finally{u=!1}for(var t=s=a,n=0;n<t.length;n++)(0,t[n])();return e}return f({type:Li.INIT}),(r={dispatch:f,subscribe:d,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?Fi(10):"Expected the nextReducer to be a function. Instead, received: '"+Gi(e));o=e,f({type:Li.REPLACE})}})[Bi]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error("production"===process.env.NODE_ENV?Fi(11):"Expected the observer to be an object. Instead, received: '"+Gi(e)+"'");function n(){e.next&&e.next(l())}return n(),{unsubscribe:t(n)}}})[Bi]=function(){return this},e},r}function Wi(e,t,...n){if("undefined"!=typeof process&&"production"===process.env.NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=/* @__PURE__ */new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let r=0;e=new Error(t.replace(/%s/g,function(){return n[r++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function qi(e){return"object"==typeof e}var zi="dnd-core/INIT_COORDS",Ji="dnd-core/BEGIN_DRAG",Xi="dnd-core/PUBLISH_DRAG_SOURCE",Qi="dnd-core/HOVER",Zi="dnd-core/DROP",es="dnd-core/END_DRAG";function ts(e,t){return{type:zi,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var ns={type:zi,payload:{clientOffset:null,sourceClientOffset:null}};function rs(e){return function(t=[],n={publishSource:!0}){const{publishSource:r=!0,clientOffset:o,getSourceClientOffset:i}=n,s=e.getMonitor(),a=e.getRegistry();e.dispatch(ts(o)),function(e,t,n){Wi(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){Wi(n.getSource(e),"Expected sourceIds to be registered.")})}(t,s,a);const u=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,s);if(null==u)return void e.dispatch(ns);let c=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");!function(e){Wi("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(i),c=i(u)}e.dispatch(ts(o,c));const l=a.getSource(u).beginDrag(s,u);return null!=l?(function(e){Wi(qi(e),"Item must be an object.")}(l),a.pinSource(u),{type:Ji,payload:{itemType:a.getSourceType(u),item:l,sourceId:u,clientOffset:o||null,sourceClientOffset:c||null,isSourcePublic:!!r}}):void 0}}function os(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function is(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){os(e,t,n[t])})}return e}function ss(e){return function(t={}){const n=e.getMonitor(),r=e.getRegistry();!function(e){Wi(e.isDragging(),"Cannot call drop while not dragging."),Wi(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n),function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n).forEach((o,i)=>{const s={type:Zi,payload:{dropResult:is({},t,as(o,i,r,n))}};e.dispatch(s)})}}function as(e,t,n,r){const o=n.getTarget(e);let i=o?o.drop(r,e):void 0;return function(e){Wi(void 0===e||qi(e),"Drop result must either be an object or undefined.")}(i),void 0===i&&(i=0===t?{}:r.getDropResult()),i}function us(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){Wi(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();return null!=r&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:es}}}function cs(e,t){return null===t?null===e:Array.isArray(e)?e.some(e=>e===t):e===t}function ls(e){return function(t,{clientOffset:n}={}){!function(e){Wi(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),o=e.getMonitor(),i=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const o=e[r];cs(t.getTargetType(o),n)||e.splice(r,1)}}(r,i,o.getItemType()),function(e,t,n){Wi(t.isDragging(),"Cannot call hover while not dragging."),Wi(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r<e.length;r++){const t=e[r];Wi(e.lastIndexOf(t)===r,"Expected targetIds to be unique in the passed array."),Wi(n.getTarget(t),"Expected targetIds to be registered.")}}(r,o,i),function(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}(r,o,i),{type:Qi,payload:{targetIds:r,clientOffset:n||null}}}}function ds(e){return function(){if(e.getMonitor().isDragging())return{type:Xi}}}var fs=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store,n=function(e){return{beginDrag:rs(e),publishDragSource:ds(e),hover:ls(e),drop:ss(e),endDrag:us(e)}}(this);return Object.keys(n).reduce((r,o)=>{const i=n[o];var s;return r[o]=(s=i,(...n)=>{const r=s.apply(e,n);void 0!==r&&t(r)}),r},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function ps(e,t){return{x:e.x-t.x,y:e.y-t.y}}var hs=[],gs=[];hs.__IS_NONE__=!0,gs.__IS_ALL__=!0;var ms=class{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;Wi("function"==typeof e,"listener must be a function."),Wi(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe(()=>{const t=this.store.getState(),o=t.stateId;try{o===r||o===r+1&&!function(e,t){return e!==hs&&(e===gs||void 0===t||(n=t,r=e,n.filter(e=>r.indexOf(e)>-1)).length>0);var n,r}(t.dirtyHandlerIds,n)||e()}finally{r=o}})}subscribeToOffsetChange(e){Wi("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return Wi(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);return Wi(t,`Expected to find a valid target. targetId=${e}`),!(!this.isDragging()||this.didDrop())&&cs(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);return Wi(t,`Expected to find a valid source. sourceId=${e}`),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();if(o&&!cs(r,o))return!1;const i=this.getTargetIds();if(!i.length)return!1;const s=i.indexOf(e);return n?s===i.length-1:s>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?ps((i=r,{x:(o=t).x+i.x,y:o.y+i.y}),n):null;var o,i}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?ps(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},ys="undefined"!=typeof global?global:self,vs=ys.MutationObserver||ys.WebKitMutationObserver;function bs(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}var ws,Os="function"==typeof vs?function(e){let t=1;const n=new vs(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:bs,Ds=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},Es=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Os(this.flush),this.requestErrorThrow=bs(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},Is=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new Ds(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(Es.registerPendingError),Ss="dnd-core/ADD_SOURCE",Ts="dnd-core/ADD_TARGET",Cs="dnd-core/REMOVE_SOURCE",Ns="dnd-core/REMOVE_TARGET";function Ms(e,t){t&&Array.isArray(e)?e.forEach(e=>Ms(e,!1)):Wi("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(ws||(ws={}));var xs=0;function Rs(e){switch(e[0]){case"S":return ws.SOURCE;case"T":return ws.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Ps(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,o]}=n.next();if(o===t)return!0;r=!!e}while(!r);return!1}var As=class{addSource(e,t){Ms(e),function(e){Wi("function"==typeof e.canDrag,"Expected canDrag to be a function."),Wi("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),Wi("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(ws.SOURCE,e,t);return this.store.dispatch(function(e){return{type:Ss,payload:{sourceId:e}}}(n)),n}addTarget(e,t){Ms(e,!0),function(e){Wi("function"==typeof e.canDrop,"Expected canDrop to be a function."),Wi("function"==typeof e.hover,"Expected hover to be a function."),Wi("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(ws.TARGET,e,t);return this.store.dispatch(function(e){return{type:Ts,payload:{targetId:e}}}(n)),n}containsHandler(e){return Ps(this.dragSources,e)||Ps(this.dropTargets,e)}getSource(e,t=!1){return Wi(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return Wi(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return Wi(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return Wi(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Rs(e)===ws.SOURCE}isTargetId(e){return Rs(e)===ws.TARGET}removeSource(e){var t;Wi(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:Cs,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},Es.enqueueTask(Is.create(t))}removeTarget(e){Wi(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:Ns,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);Wi(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){Wi(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=function(e){const t=(xs++).toString();switch(e){case ws.SOURCE:return`S${t}`;case ws.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}(e);return this.types.set(r,t),e===ws.SOURCE?this.dragSources.set(r,n):e===ws.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=/* @__PURE__ */new Map,this.dragSources=/* @__PURE__ */new Map,this.dropTargets=/* @__PURE__ */new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}},_s=(e,t)=>e===t;function ks(e=hs,t){switch(t.type){case Qi:break;case Ss:case Ts:case Ns:case Cs:return hs;default:return gs}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,o=function(e,t){const n=/* @__PURE__ */new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const o=[];return n.forEach((e,t)=>{1===e&&o.push(t)}),o}(n,r);if(!(o.length>0)&&function(e,t,n=_s){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(n,r))return hs;const i=r[r.length-1],s=n[n.length-1];return i!==s&&(i&&o.push(i),s&&o.push(s)),o}function Ys(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $s={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function js(e=$s,t){const{payload:n}=t;switch(t.type){case zi:case Ji:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Qi:return r=e.clientOffset,o=n.clientOffset,!r&&!o||r&&o&&r.x===o.x&&r.y===o.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Ys(e,t,n[t])})}return e}({},e,{clientOffset:n.clientOffset});case es:case Zi:return $s;default:return e}var r,o}function Hs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Hs(e,t,n[t])})}return e}var Fs={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Bs(e=Fs,t){const{payload:n}=t;switch(t.type){case Ji:return Vs({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Xi:return Vs({},e,{isSourcePublic:!0});case Qi:return Vs({},e,{targetIds:n.targetIds});case Ns:return-1===e.targetIds.indexOf(n.targetId)?e:Vs({},e,{targetIds:(r=e.targetIds,o=n.targetId,r.filter(e=>e!==o))});case Zi:return Vs({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case es:return Vs({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,o}function Us(e=0,t){switch(t.type){case Ss:case Ts:return e+1;case Cs:case Ns:return e-1;default:return e}}function Ls(e=0){return e+1}function Gs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ks(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Gs(e,t,n[t])})}return e}function Ws(e={},t){return{dirtyHandlerIds:ks(e.dirtyHandlerIds,{type:t.type,payload:Ks({},t.payload,{prevTargetIds:(n=e,r=[],"dragOperation.targetIds".split(".").reduce((e,t)=>e&&e[t]?e[t]:r||null,n))})}),dragOffset:js(e.dragOffset,t),refCount:Us(e.refCount,t),dragOperation:Bs(e.dragOperation,t),stateId:Ls(e.stateId)};var n,r}function qs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var zs=0,Js=Symbol.for("__VUE_DND_CONTEXT_INSTANCE__");function Xs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qs(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t;return o[Js]||(o[Js]=function(e,t,n={},r=!1){const o=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Ki(Ws,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),i=new fs(o,new ms(o,new As(o))),s=e(i,t,n);return i.receiveBackend(s),i}(e,t,n,r)),o[Js]}function Qs(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:window}(0,ki.defineComponent)({name:"DndProvider",props:{manager:{type:Object},backend:{type:Function},context:{type:Object},options:{type:Object},debugMode:{type:Boolean}},setup:function(e,t){var n,r,o,i,s=t.slots,a=(o=function(e){return function(e){return"manager"in e&&e.manager}(e)?[e.manager,!1]:[Xs(e.backend,e.context,e.options,e.debugMode),!e.context]}(e),i=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(u){a=!0,o=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}}(o,i)||function(e,t){if(e){if("string"==typeof e)return qs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qs(e,t):void 0}}(o,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=a[0],c=a[1];return c&&++zs,(0,ki.onUnmounted)(function(){if(c){var e=Qs();0===--zs&&(e[Js]=null)}}),n=u,(0,ki.provide)(Vi,n),function(){var e;return null!==(r=null===(e=s.default)||void 0===e?void 0:e.call(s))&&void 0!==r?r:null}}}),(0,ki.defineComponent)({props:{connect:{type:Function,required:!0},src:{type:String,required:!0}},setup:function(e){return(0,ki.watchEffect)(function(){if("undefined"!=typeof Image){var t=!1,n=new Image;return n.src=e.src,n.onload=function(){e.connect(n),t=!0},function(){t&&e.connect(null)}}}),function(){return null}}});var Zs=!1,ea=!1,ta=/* @__PURE__ */function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.sourceId=e},t.getHandlerId=function(){return this.sourceId},t.canDrag=function(){Wi(!Zs,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Zs=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Zs=!1}},t.isDragging=function(){if(!this.sourceId)return!1;Wi(!ea,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return ea=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{ea=!1}},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.isDraggingSource=function(e){return this.internalMonitor.isDraggingSource(e)},t.isOverTarget=function(e,t){return this.internalMonitor.isOverTarget(e,t)},t.getTargetIds=function(){return this.internalMonitor.getTargetIds()},t.isSourcePublic=function(){return this.internalMonitor.isSourcePublic()},t.getSourceId=function(){return this.internalMonitor.getSourceId()},t.subscribeToOffsetChange=function(e){return this.internalMonitor.subscribeToOffsetChange(e)},t.canDragSource=function(e){return this.internalMonitor.canDragSource(e)},t.canDropOnTarget=function(e){return this.internalMonitor.canDropOnTarget(e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}(),na=!1,ra=/* @__PURE__ */function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.targetId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.targetId=e},t.getHandlerId=function(){return this.targetId},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.canDrop=function(){if(!this.targetId)return!1;Wi(!na,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return na=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{na=!1}},t.isOver=function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();function oa(e){return function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if((t=n)&&t.__v_skip&&function(){throw new Error("Only native element nodes can now be passed to Vue DnD connectors.You can either wrap Component into a <div>, or turn it into a drag source or a drop target itself.")}(),!function(e){return!!(n=e)&&!0===n.__v_isVNode&&"symbol"!=((t=e.type)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t);var t,n}(n)){var o=n;return e(o,r),o}}}function ia(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var o=oa(r);t[n]=function(){return o}}}),t}function sa(e,t,n,r){let o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let u=0;u<i.length;u++){const s=i[u];if(!a(s))return!1;const c=e[s],l=t[s];if(o=n?n.call(r,c,l,s):void 0,!1===o||void 0===o&&c!==l)return!1}return!0}function aa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ua=/* @__PURE__ */function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=ia({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,n.dragPreviewNode=e,n.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceOptionsInternal=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}var t,n,r=e.prototype;return r.receiveHandlerId=function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())},r.reconnect=function(){var e=this.reconnectDragSource();this.reconnectDragPreview(e)},r.reconnectDragSource=function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t},r.reconnectDragPreview=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)},r.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},r.didConnectedDragSourceChange=function(){return this.lastConnectedDragSource!==this.dragSource},r.didConnectedDragPreviewChange=function(){return this.lastConnectedDragPreview!==this.dragPreview},r.didDragSourceOptionsChange=function(){return!sa(this.lastConnectedDragSourceOptions,this.dragSourceOptions)},r.didDragPreviewOptionsChange=function(){return!sa(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)},r.disconnectDragSource=function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)},r.disconnectDragPreview=function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null)},r.clearDragSource=function(){this.dragSourceNode=null},r.clearDragPreview=function(){this.dragPreviewNode=null},t=e,(n=[{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"dragSource",get:function(){return this.dragSourceNode}},{key:"dragPreview",get:function(){return this.dragPreviewNode}}])&&aa(t.prototype,n),e}();function ca(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var la=/* @__PURE__ */function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=ia({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,(0,ki.isRef)(e)?n.dropTargetRef=e:n.dropTargetNode=e,n.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}var t,n,r=e.prototype;return r.reconnect=function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)},r.receiveHandlerId=function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())},r.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},r.didDropTargetChange=function(){return this.lastConnectedDropTarget!==this.dropTarget},r.didOptionsChange=function(){return!sa(this.lastConnectedDropTargetOptions,this.dropTargetOptions)},r.disconnectDropTarget=function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)},r.clearDropTarget=function(){this.dropTargetRef=null,this.dropTargetNode=null},t=e,(n=[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.value}}])&&ca(t.prototype,n),e}(),da=/* @__PURE__ */function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=n,this.connector=r}var t=e.prototype;return t.beginDrag=function(){var e,t=this.spec,n=this.monitor;return null!=(e="object"==typeof t.item?t.item:"function"==typeof t.item?t.item(n):{})?e:null},t.canDrag=function(){var e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)},t.isDragging=function(e,t){var n=this.spec,r=this.monitor,o=n.isDragging;return o?o(r):t===e.getSourceId()},t.endDrag=function(){var e=this.spec,t=this.monitor,n=this.connector,r=e.end;r&&r(t.getItem(),t),n.reconnect()},e}();function fa(){var e=(0,ki.inject)(Vi);return Wi(null!=e,"Expected drag drop context"),e}function pa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ha(e,t,n){var r=fa(),o=function(e,t,n){var r=(0,ki.computed)(function(){return new da((0,ki.unref)(e),(0,ki.unref)(t),(0,ki.unref)(n))});return(0,ki.watchEffect)(function(){r.value.spec=(0,ki.unref)(e)}),r}(e,t,n),i=function(e){return(0,ki.computed)(function(){var t=(0,ki.unref)(e).type;return Wi(null!=t,"spec.type must be defined"),t})}(e);(0,ki.watchEffect)(function(e){if(null!=(0,ki.unref)(i)){var s=(c=function(e,t,n){var r=n.getRegistry(),o=r.addSource(e,t);return[o,function(){return r.removeSource(o)}]}((0,ki.unref)(i),(0,ki.unref)(o),(0,ki.unref)(r)),l=2,function(e){if(Array.isArray(e))return e}(c)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(u){a=!0,o=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}}(c,l)||function(e,t){if(e){if("string"==typeof e)return pa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pa(e,t):void 0}}(c,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=s[0],u=s[1];(0,ki.unref)(t).receiveHandlerId(a),(0,ki.unref)(n).receiveHandlerId(a),e(u)}var c,l})}function ga(e){return(0,ki.computed)(function(){return"function"==typeof e?e():e})}var ma=/* @__PURE__ */je(/* @__PURE__ */ke((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!==o--;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}})());function ya(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function va(e,t,n){var r,o,i=(r=function(e,t,n){var r=(0,ki.ref)((0,ki.unref)(t)((0,ki.unref)(e))),o=function(){var o=(0,ki.unref)(t)((0,ki.unref)(e));(0,ma.default)(r.value,o)||(r.value=o,n&&n())};return(0,ki.watchEffect)(o),[r,o]}(e,t,n),o=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(u){a=!0,o=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}}(r,o)||function(e,t){if(e){if("string"==typeof e)return ya(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ya(e,t):void 0}}(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=i[0],a=i[1];return(0,ki.watchEffect)(function(t){var n=(0,ki.unref)(e).getHandlerId();null!=n&&t((0,ki.unref)(e).subscribeToStateChange(a,{handlerIds:[n]}))}),s}function ba(e,t,n){return va(t,e||function(){return{}},function(){return(0,ki.unref)(n).reconnect()})}function wa(e,t){var n=(0,ki.reactive)({el:null,options:(0,ki.unref)(t)});return(0,ki.watchEffect)(function(){e(n)},{flush:"post"}),function(e,r){ji(n,"el",e);var o=(0,ki.unref)(t)||r;return(0,ma.default)(n.options,o)||ji(n,"options",o),(0,ki.unref)(e)}}function Oa(e,t){return wa(function(t){(0,ki.unref)(e).hooks.dragSource()(t.el,t.options)},(0,ki.computed)(function(){return(0,ki.unref)(t).options}))}function Da(e,t){return wa(function(t){(0,ki.unref)(e).hooks.dragPreview()(t.el,t.options)},(0,ki.computed)(function(){return(0,ki.unref)(t).previewOptions}))}var Ea=/* @__PURE__ */function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=n}var t=e.prototype;return t.canDrop=function(){var e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)},t.hover=function(){var e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)},t.drop=function(){var e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)},e}();function Ia(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sa(e,t,n){var r=fa(),o=function(e,t){var n=(0,ki.computed)(function(){return new Ea((0,ki.unref)(e),(0,ki.unref)(t))});return(0,ki.watchEffect)(function(){n.value.spec=(0,ki.unref)(e)}),n}(e,t),i=function(e){return(0,ki.computed)(function(){var t=(0,ki.unref)(e).accept;return Wi(null!=t,"accept must be defined"),Array.isArray(t)?t:[t]})}(e);(0,ki.watchEffect)(function(e){var s,a,u=(s=function(e,t,n){var r=(0,ki.unref)(n).getRegistry(),o=r.addTarget((0,ki.unref)(e),(0,ki.unref)(t));return[o,function(){return r.removeTarget(o)}]}(i,o,r),a=2,function(e){if(Array.isArray(e))return e}(s)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(u){a=!0,o=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}}(s,a)||function(e,t){if(e){if("string"==typeof e)return Ia(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ia(e,t):void 0}}(s,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=u[0],l=u[1];(0,ki.unref)(t).receiveHandlerId(c),(0,ki.unref)(n).receiveHandlerId(c),e(l)})}function Ta(e,t){return wa(function(t){(0,ki.unref)(e).hooks.dropTarget()(t.el,t.options)},(0,ki.computed)(function(){return(0,ki.unref)(t).options}))}function Ca(e){var t,n=ga(e),r=(t=fa(),(0,ki.computed)(function(){return new ra((0,ki.unref)(t))})),o=function(e){var t=fa(),n=(0,ki.computed)(function(){return new la((0,ki.unref)(t).getBackend())});return(0,ki.watchEffect)(function(t){n.value.dropTargetOptions=(0,ki.unref)(e)||null,n.value.reconnect(),t(function(){return n.value.disconnectDropTarget()})}),n}((0,ki.computed)(function(){return(0,ki.unref)(n).options}));return Sa(n,r,o),[ba((0,ki.computed)(function(){return(0,ki.unref)(n).collect||function(){return{}}}),r,o),Ta(o,n)]}var Na=/* @__PURE__ */j({name:"Vue3DndDraggableItem",props:{group:{type:String,required:!0},index:{type:Number,required:!0},item:{type:Object,required:!0},config:{type:Object,required:!0},add:{type:Function,required:!0},remove:{type:Function,required:!0},move:{type:Function,required:!0}},setup(e){const t=C("vue3-dnd-draggable-item"),n=ee(null),r=ee(!1),{config:o}=e,[i,s,a]=(l={type:o.type,item:()=>({group:e.group,item:e.item}),collect:e=>({canDrag:e.canDrag(),isDragging:e.isDragging()}),canDrag:e=>!o.canDrag||o.canDrag(e),end(t,n){if(o.end)return o.end(t,n);const r=n.getDropResult();r&&r.group!==e.group&&e.remove(t)},options:o.dragOptions,previewOptions:o.previewOptions},f=ga(l),d=fa(),p=(0,ki.computed)(function(){return new ta((0,ki.unref)(d))}),h=function(e,t){var n=fa(),r=(0,ki.computed)(function(){return new ua((0,ki.unref)(n).getBackend())});return(0,ki.watchEffect)(function(t){r.value.dragSourceOptions=(0,ki.unref)(e)||null,(0,ki.unref)(r).reconnect(),t(function(){r.value.disconnectDragSource()})}),(0,ki.watchEffect)(function(e){r.value.dragPreviewOptions=(0,ki.unref)(t)||null,(0,ki.unref)(r).reconnect(),e(function(){r.value.disconnectDragPreview()})}),r}((0,ki.computed)(function(){return(0,ki.unref)(f).options}),(0,ki.computed)(function(){return(0,ki.unref)(f).previewOptions})),ha(f,p,h),[ba((0,ki.computed)(function(){return(0,ki.unref)(f).collect||function(){return{}}}),p,h),Oa(h,f),Da(h,f)]),[u,c]=Ca({accept:o.type,collect:e=>({handlerId:e.getHandlerId(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0}),isOver:e.isOver()}),hover(t,s){if(o.hover)return o.hover(t,s);if(!1!==s.canDrop()&&!0!==i.value.isDragging&&e.item!==t.item&&s.isOver({shallow:!0})){const i=n.value.getBoundingClientRect(),a=s.getClientOffset(),u=o.offset??0;let c=0;if("vertical"===o.direction){const{top:e,height:t}=i,{y:n}=a;if(c=n-e-t/2,Math.abs(c)<u)return;r.value=c<0}else if("horizontal"===o.direction){const{left:e,width:t}=i,{x:n}=a;if(c=n-e-t/2,Math.abs(c)<u)return;r.value=c<0}const l=o.key??"id";t.group===e.group?e.move(r.value,e.item[l],t.item[l]):e.add(r.value,e.item[l],t.item)}},canDrop:(e,t)=>o.canDrop?o.canDrop(e,t):!0!==i.value.isDragging,drop:(t,n)=>o.drop?o.drop(t,n):{group:e.group},options:o.dropOptions});var l,d,f,p,h;return!0===e.config.isCustomHandle||e.config.handle||s(n),c(n),a(n),W(()=>{L(()=>{if(e.config.handle&&n.value){const t=n.value.querySelector(e.config.handle);t&&s(t)}})}),{ns:t,elRef:n,dragCollect:i,dropCollect:u,isBeforeHover:r,drag:s,preview:a}},render(){var e,t;return Y("div",{ref:"elRef",class:[this.ns.b(),this.ns.is("dragging",this.dragCollect.isDragging),this.ns.is("shallow-over",this.dropCollect.isShallowOver)]},[null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t,{item:this.item,index:this.index,isDragging:this.dragCollect.isDragging,isShallowOver:this.dropCollect.isShallowOver,isOver:this.dropCollect.isOver,isBeforeHover:this.isBeforeHover,isAfterHover:!this.isBeforeHover,direction:this.config.direction,drag:this.drag,preview:this.preview})])}}),{toString:Ma}=Object.prototype;function xa(){return(65536*(1+Math.random())|0).toString(16).substring(1)}var Ra=/* @__PURE__ */j({name:"Vue3DndDraggable",props:{opts:{type:Object,default:()=>({})},items:{type:Array,required:!0}},emits:["add","remove","move"],setup(e,{emit:t}){const n=C("vue3-dnd-draggable"),r=`${xa()+xa()}-${xa()}-${xa()}-${xa()}-${xa()}${xa()}${xa()}`,o=ee(null),{opts:i,items:s}=se(e),a=P(()=>u.value.key||"id"),u=P(()=>De({type:"Vue3DndDraggable",direction:"vertical"},i.value)),[c,l]=Ca({accept:u.value.type,collect:e=>({handlerId:e.getHandlerId(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0})}),canDrop:(t,n)=>!(e.items.length>0)&&(!u.value.canDropContainer||u.value.canDropContainer(t,n)),drop:(e,t)=>u.value.dropContainer?u.value.dropContainer(e,t):(!1!==t.canDrop()&&s.value.push(e),{group:r})});return l(o),{ns:n,groupId:r,key:a,rootRef:o,collect:c,config:u,onAdd:(e,n,r)=>{const o=s.value.findIndex(e=>e[a.value]===n);s.value.splice(e?o:o+1,0,r),t("add",r,o)},onRemove:e=>{console.warn("onRemove 未实现",e)},onMove:(e,n,r)=>{const o=s.value.findIndex(e=>e[a.value]===n),i=s.value.findIndex(e=>e[a.value]===r),u=s.value[i],c=e?o:o+1;!e&&c===i||e&&c-1===i||(s.value.splice(c,0,u),c<i?s.value.splice(i+1,1):s.value.splice(i,1),t("move",o,c))}}},render(){let e;return Y("div",{ref:"rootRef",class:[this.ns.b(),this.ns.is("over",this.collect.isShallowOver)]},[Y(R,{name:"list"},(t=e=this.items.map((e,t)=>Y(Na,{group:this.groupId,key:e[this.key]||t,index:t,item:e,config:this.config,add:this.onAdd,remove:this.onRemove,move:this.onMove},{default:e=>{var t,n;return null===(t=(n=this.$slots).draggableItem)||void 0===t?void 0:t.call(n,e)}})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!U(t)?e:{default:()=>[e]}))]);var t}});function Pa(){_gct.register.render?console.warn("渲染注册已存在,可能存在重复注册问题,请检查是否有重复引入渲染包的情况"):_gct.register.render=new Fe}var Aa=new URL("./index.min.css",import.meta.url);w.load(Aa.href);export{Bt as CardViewRender,pi as Context,Xe as ControllerType,Ue as DESIGN_DATA_KEY_TAG,Be as DESIGN_TYPE,ze as DateFormat,Ge as DateRangeMap,Je as DatepickerRanges,Le as DesignItemAttribute,et as DesignNodeType,Vt as DesignRender,Qe as DesignRenderViewPrefix,ui as Events,$t as FieldSchema,hi as GctComponent,nn as Globals,Gt as HandwritingPad,qt as PageTypeEnum,on as RenderDesignEditor,tt as RenderNodeRegister,Ze as RenderNodeType,Jr as RenderPluginPgkUtil,Fe as RenderRegister,Ra as Vue3DndDraggable,Na as Vue3DndDraggableItem,to as addDataByForm,io as cacheAdapter,Lr as calculate,vi as calculateDepResult,Ai as containerNodeProps,fo as defaultValMap,Si as dependencyToShow,Ti as dependencyToShowSync,Go as emptyValueDisplay,Qt as formMap,qe as getDefaultDate,Ke as getDisabledDate,vo as getIExp,bo as getIKeywordFieldKeys,We as getMobileDateRange,tn as getPageTitle,rn as getPremission,wo as getQueryDateByKeyWord,Do as getQuerySort,uo as getRefInfoId,Xt as globalVarCaches,Ur as identify,jt as initFieldWidgetRuntime,yi as insetDep,Io as is,Ho as isArray,$o as isBoolean,Mo as isDate,So as isDef,Fo as isElement,No as isEmpty,Lo as isEmptyStr,Yo as isFunction,Bo as isMap,xo as isNull,Ro as isNullAndUnDef,Po as isNullOrUnDef,Ao as isNumber,Co as isObject,_o as isPromise,jo as isRegExp,ko as isString,To as isUnDef,Uo as isUrl,Vo as isWindow,_i as nodeEditorProps,Pi as nodeProps,Pa as onInit,en as pageDataforJson,Jt as pageGlobaVariables,Qr as schemaToStyle,no as setDataByForm,Zt as setFormData,Mi as tableWidgetByDept,Ni as tableWidgetToShow,ro as transSelectData,eo as transformData,oo as transformDataToDict,zr as transformPropsField,Zr as transformSourceData,Ht as useAsyncFileAttrs,xi as useDependency,Ri as useDependencyByRequired,Ii as useDependencyToShow,Ci as useDependencyToShowList,ct as useDesignRenderController,Di as useDisplayRuleColumnByStyles,Oi as useDisplayRuleOptions,Yt as useGctSelect,lo as useGetBodyBySearch,Oo as useQueryfilter,Xr as useStyle,bi as useVisibileByRuleHook,sn as widthRenderDesignEditorInstall};
@@ -273,7 +273,9 @@ var Context = class {
273
273
  div(a, b) {
274
274
  return new BigNumberJS(a).div(new BigNumberJS(b)).toNumber();
275
275
  },
276
+ /**表格数据data,dict翻译 */
276
277
  transformSourceData,
278
+ /**表单数据data,dict翻译*/
277
279
  transformData
278
280
  };
279
281
  $httpBizService = $httpBizService;
@@ -90,5 +90,19 @@ export declare enum RenderNodeType {
90
90
  /**待办 */
91
91
  TODO = "todo"
92
92
  }
93
+ /**
94
+ * 设计节点类型
95
+ *
96
+ * @author chitanda
97
+ * @date 2025-07-08 13:07:18
98
+ * @export
99
+ * @enum {number}
100
+ */
101
+ export declare enum DesignNodeType {
102
+ /**
103
+ * 设计编辑器
104
+ */
105
+ DESIGN_EDITOR = "design_editor"
106
+ }
93
107
  export * from './date-time';
94
108
  export * from './data-format';
@@ -96,5 +96,20 @@ var RenderNodeType = /* @__PURE__ */ function(RenderNodeType) {
96
96
  RenderNodeType["TODO"] = "todo";
97
97
  return RenderNodeType;
98
98
  }({});
99
+ /**
100
+ * 设计节点类型
101
+ *
102
+ * @author chitanda
103
+ * @date 2025-07-08 13:07:18
104
+ * @export
105
+ * @enum {number}
106
+ */
107
+ var DesignNodeType = /* @__PURE__ */ function(DesignNodeType) {
108
+ /**
109
+ * 设计编辑器
110
+ */
111
+ DesignNodeType["DESIGN_EDITOR"] = "design_editor";
112
+ return DesignNodeType;
113
+ }({});
99
114
  //#endregion
100
- export { ControllerType, DesignRenderViewPrefix, RenderNodeType };
115
+ export { ControllerType, DesignNodeType, DesignRenderViewPrefix, RenderNodeType };
package/es/index.d.ts CHANGED
@@ -3,6 +3,8 @@ export * from './constant';
3
3
  export * from './Event';
4
4
  export * from './hooks';
5
5
  export type * from './interface';
6
+ export * from './props';
7
+ export * from './providers';
6
8
  export * from './register';
7
9
  export * from './utils';
8
10
  export * from './modules/vue3-dnd';
package/es/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { RenderRegister } from "./register/render-register/render-register.mjs";
2
2
  import { DESIGN_DATA_KEY_TAG, DESIGN_TYPE, DateRangeMap, DesignItemAttribute, getDefaultDate, getDisabledDate, getMobileDateRange } from "./constant/date-time.mjs";
3
3
  import { DateFormat, DatepickerRanges } from "./constant/data-format.mjs";
4
- import { ControllerType, DesignRenderViewPrefix, RenderNodeType } from "./constant/index.mjs";
4
+ import { ControllerType, DesignNodeType, DesignRenderViewPrefix, RenderNodeType } from "./constant/index.mjs";
5
5
  import { RenderNodeRegister } from "./register/node/node.register.mjs";
6
6
  import "./register/index.mjs";
7
7
  import { useDesignRenderController } from "./hooks/use-design-render-controller/use-design-render-controller.mjs";
@@ -14,6 +14,9 @@ import { CardViewRender } from "./components/card-view-render/card-view-render.m
14
14
  import HandwritingPad_default from "./components/HandwritingPad.vue.mjs";
15
15
  import "./components/index.mjs";
16
16
  import { Globals, PageTypeEnum, formMap, getPageTitle, getPremission, globalVarCaches, pageDataforJson, pageGlobaVariables, setFormData } from "./Event/utils/runGlobalByPage.mjs";
17
+ import { RenderDesignEditor } from "./providers/render-design-editor/render-design-editor.provider.mjs";
18
+ import "./providers/index.mjs";
19
+ import { widthRenderDesignEditorInstall } from "./utils/design-install/design-install.mjs";
17
20
  import { calculate, identify } from "./utils/expression/index.mjs";
18
21
  import { transformPropsField } from "./utils/field-attrs/index.mjs";
19
22
  import { RenderPluginPgkUtil } from "./utils/render-plugin-pkg-util/render-plugin-pkg-util.mjs";
@@ -33,6 +36,7 @@ import { useDisplayRuleColumnByStyles, useDisplayRuleOptions, useVisibileByRuleH
33
36
  import { dependencyToShow, dependencyToShowSync, tableWidgetByDept, tableWidgetToShow, useDependencyToShow, useDependencyToShowList } from "./Event/Dependency/useDependencyToShow.mjs";
34
37
  import { useDependency, useDependencyByRequired } from "./Event/Dependency/useDependency.mjs";
35
38
  import "./Event/index.mjs";
39
+ import { containerNodeProps, nodeEditorProps, nodeProps } from "./props/index.mjs";
36
40
  import { Vue3DndDraggableItem } from "./modules/vue3-dnd/components/vue3-dnd-draggable-item/vue3-dnd-draggable-item.mjs";
37
41
  import { Vue3DndDraggable } from "./modules/vue3-dnd/components/vue3-dnd-draggable/vue3-dnd-draggable.mjs";
38
42
  import "./modules/vue3-dnd/index.mjs";
@@ -42,4 +46,4 @@ function onInit() {
42
46
  else console.warn("渲染注册已存在,可能存在重复注册问题,请检查是否有重复引入渲染包的情况");
43
47
  }
44
48
  //#endregion
45
- export { CardViewRender, Context, ControllerType, DESIGN_DATA_KEY_TAG, DESIGN_TYPE, DateFormat, DateRangeMap, DatepickerRanges, DesignItemAttribute, DesignRender, DesignRenderViewPrefix, Events, FieldSchema, GctComponent, Globals, HandwritingPad_default as HandwritingPad, PageTypeEnum, RenderNodeRegister, RenderNodeType, RenderPluginPgkUtil, RenderRegister, Vue3DndDraggable, Vue3DndDraggableItem, addDataByForm, cacheAdapter, calculate, calculateDepResult, defaultValMap, dependencyToShow, dependencyToShowSync, emptyValueDisplay, formMap, getDefaultDate, getDisabledDate, getIExp, getIKeywordFieldKeys, getMobileDateRange, getPageTitle, getPremission, getQueryDateByKeyWord, getQuerySort, getRefInfoId, globalVarCaches, identify, initFieldWidgetRuntime, insetDep, is, isArray, isBoolean, isDate, isDef, isElement, isEmpty, isEmptyStr, isFunction, isMap, isNull, isNullAndUnDef, isNullOrUnDef, isNumber, isObject, isPromise, isRegExp, isString, isUnDef, isUrl, isWindow, onInit, pageDataforJson, pageGlobaVariables, schemaToStyle, setDataByForm, setFormData, tableWidgetByDept, tableWidgetToShow, transSelectData, transformData, transformDataToDict, transformPropsField, transformSourceData, useAsyncFileAttrs, useDependency, useDependencyByRequired, useDependencyToShow, useDependencyToShowList, useDesignRenderController, useDisplayRuleColumnByStyles, useDisplayRuleOptions, useGctSelect, useGetBodyBySearch, useQueryfilter, useStyle, useVisibileByRuleHook };
49
+ export { CardViewRender, Context, ControllerType, DESIGN_DATA_KEY_TAG, DESIGN_TYPE, DateFormat, DateRangeMap, DatepickerRanges, DesignItemAttribute, DesignNodeType, DesignRender, DesignRenderViewPrefix, Events, FieldSchema, GctComponent, Globals, HandwritingPad_default as HandwritingPad, PageTypeEnum, RenderDesignEditor, RenderNodeRegister, RenderNodeType, RenderPluginPgkUtil, RenderRegister, Vue3DndDraggable, Vue3DndDraggableItem, addDataByForm, cacheAdapter, calculate, calculateDepResult, containerNodeProps, defaultValMap, dependencyToShow, dependencyToShowSync, emptyValueDisplay, formMap, getDefaultDate, getDisabledDate, getIExp, getIKeywordFieldKeys, getMobileDateRange, getPageTitle, getPremission, getQueryDateByKeyWord, getQuerySort, getRefInfoId, globalVarCaches, identify, initFieldWidgetRuntime, insetDep, is, isArray, isBoolean, isDate, isDef, isElement, isEmpty, isEmptyStr, isFunction, isMap, isNull, isNullAndUnDef, isNullOrUnDef, isNumber, isObject, isPromise, isRegExp, isString, isUnDef, isUrl, isWindow, nodeEditorProps, nodeProps, onInit, pageDataforJson, pageGlobaVariables, schemaToStyle, setDataByForm, setFormData, tableWidgetByDept, tableWidgetToShow, transSelectData, transformData, transformDataToDict, transformPropsField, transformSourceData, useAsyncFileAttrs, useDependency, useDependencyByRequired, useDependencyToShow, useDependencyToShowList, useDesignRenderController, useDisplayRuleColumnByStyles, useDisplayRuleOptions, useGctSelect, useGetBodyBySearch, useQueryfilter, useStyle, useVisibileByRuleHook, widthRenderDesignEditorInstall };
@@ -0,0 +1,73 @@
1
+ import { PropType } from 'vue';
2
+ import { IDesignRenderContainerController, IDesignRenderItemController } from '../interface';
3
+ import { IDesignNode } from '@gct-paas/schema';
4
+ /**
5
+ * 节点类型组件输入参数
6
+ */
7
+ export declare const nodeProps: {
8
+ readonly preview: {
9
+ readonly type: BooleanConstructor;
10
+ readonly default: false;
11
+ };
12
+ readonly c: {
13
+ readonly type: PropType<IDesignRenderItemController>;
14
+ readonly required: true;
15
+ };
16
+ readonly model: {
17
+ readonly type: PropType<IDesignNode>;
18
+ readonly required: true;
19
+ };
20
+ readonly context: {
21
+ readonly type: PropType<IContext>;
22
+ readonly required: true;
23
+ };
24
+ };
25
+ /**
26
+ * 节点类型组件输入参数
27
+ */
28
+ export declare const containerNodeProps: {
29
+ readonly preview: {
30
+ readonly type: BooleanConstructor;
31
+ readonly default: false;
32
+ };
33
+ readonly c: {
34
+ readonly type: PropType<IDesignRenderContainerController>;
35
+ readonly required: true;
36
+ };
37
+ readonly model: {
38
+ readonly type: PropType<IDesignNode>;
39
+ readonly required: true;
40
+ };
41
+ readonly context: {
42
+ readonly type: PropType<IContext>;
43
+ readonly required: true;
44
+ };
45
+ };
46
+ /**
47
+ * 节点编辑器组件输入参数
48
+ */
49
+ export declare const nodeEditorProps: {
50
+ preview: {
51
+ type: BooleanConstructor;
52
+ default: boolean;
53
+ };
54
+ c: {
55
+ type: PropType<IDesignRenderItemController>;
56
+ required: boolean;
57
+ };
58
+ model: {
59
+ type: PropType<IDesignNode>;
60
+ required: boolean;
61
+ };
62
+ context: {
63
+ type: PropType<IContext>;
64
+ required: boolean;
65
+ };
66
+ field: {
67
+ type: PropType<IObject>;
68
+ required: boolean;
69
+ };
70
+ value: {
71
+ type: PropType<any>;
72
+ };
73
+ };
@@ -0,0 +1,71 @@
1
+ //#region src/props/index.ts
2
+ /**
3
+ * 节点类型组件输入参数
4
+ */
5
+ var nodeProps = {
6
+ preview: {
7
+ type: Boolean,
8
+ default: false
9
+ },
10
+ c: {
11
+ type: Object,
12
+ required: true
13
+ },
14
+ model: {
15
+ type: Object,
16
+ required: true
17
+ },
18
+ context: {
19
+ type: Object,
20
+ required: true
21
+ }
22
+ };
23
+ /**
24
+ * 节点类型组件输入参数
25
+ */
26
+ var containerNodeProps = {
27
+ preview: {
28
+ type: Boolean,
29
+ default: false
30
+ },
31
+ c: {
32
+ type: Object,
33
+ required: true
34
+ },
35
+ model: {
36
+ type: Object,
37
+ required: true
38
+ },
39
+ context: {
40
+ type: Object,
41
+ required: true
42
+ }
43
+ };
44
+ /**
45
+ * 节点编辑器组件输入参数
46
+ */
47
+ var nodeEditorProps = {
48
+ preview: {
49
+ type: Boolean,
50
+ default: false
51
+ },
52
+ c: {
53
+ type: Object,
54
+ required: true
55
+ },
56
+ model: {
57
+ type: Object,
58
+ required: true
59
+ },
60
+ context: {
61
+ type: Object,
62
+ required: true
63
+ },
64
+ field: {
65
+ type: Object,
66
+ required: true
67
+ },
68
+ value: { type: Object }
69
+ };
70
+ //#endregion
71
+ export { containerNodeProps, nodeEditorProps, nodeProps };
@@ -0,0 +1 @@
1
+ export { RenderDesignEditor } from './render-design-editor/render-design-editor.provider';
@@ -0,0 +1 @@
1
+ import "./render-design-editor/render-design-editor.provider.mjs";
@@ -0,0 +1,12 @@
1
+ import { Component } from 'vue';
2
+ import { IDesignRenderItemController, IRenderEditorNodeProvider } from '../../interface';
3
+ import { DesignNodeMode, IDesignNode } from '@gct-paas/schema';
4
+ import { FIELD_TYPE } from '@gct-paas/core';
5
+ export declare abstract class RenderDesignEditor implements IRenderEditorNodeProvider {
6
+ mode: DesignNodeMode.ITEM;
7
+ type: string;
8
+ fieldKey?: string;
9
+ fieldType?: FIELD_TYPE;
10
+ abstract component: string | Component;
11
+ createController?(_model: IDesignNode): IDesignRenderItemController;
12
+ }
@@ -0,0 +1,15 @@
1
+ import { DesignNodeType } from "../../constant/index.mjs";
2
+ import "vue";
3
+ import { DesignNodeMode } from "@gct-paas/schema";
4
+ //#region src/providers/render-design-editor/render-design-editor.provider.ts
5
+ var RenderDesignEditor = class {
6
+ mode = DesignNodeMode.ITEM;
7
+ type = DesignNodeType.DESIGN_EDITOR;
8
+ fieldKey;
9
+ fieldType;
10
+ createController(_model) {
11
+ throw new Error("Method not implemented.");
12
+ }
13
+ };
14
+ //#endregion
15
+ export { RenderDesignEditor };
@@ -24,25 +24,28 @@ export declare class RenderRegister {
24
24
  * @date 2024-05-25 08:05:05
25
25
  * @param {string} tag
26
26
  * @param {Component} com
27
+ * @param {string} [prefix]
27
28
  */
28
- register(tag: string, com: Component): void;
29
+ register(tag: string, com: Component, prefix?: string): void;
29
30
  /**
30
31
  * 取消组件注册
31
32
  *
32
33
  * @author zhanghanrui
33
34
  * @date 2024-05-25 08:05:34
34
35
  * @param {string} tag
36
+ * @param {string} [prefix]
35
37
  */
36
- unregister(tag: string): void;
38
+ unregister(tag: string, prefix?: string): void;
37
39
  /**
38
40
  * 获取注册的组件
39
41
  *
40
42
  * @author zhanghanrui
41
43
  * @date 2024-05-25 08:05:59
42
44
  * @param {string} tag
45
+ * @param {string} [prefix]
43
46
  * @return {*} {(Component | undefined)}
44
47
  */
45
- get(tag: string): Component | undefined;
48
+ get(tag: string, prefix?: string): Component | undefined;
46
49
  /**
47
50
  * 组件标识清单
48
51
  *
@@ -24,9 +24,11 @@ var RenderRegister = class {
24
24
  * @date 2024-05-25 08:05:05
25
25
  * @param {string} tag
26
26
  * @param {Component} com
27
+ * @param {string} [prefix]
27
28
  */
28
- register(tag, com) {
29
- this.map.set(tag, com);
29
+ register(tag, com, prefix) {
30
+ const fullTag = prefix ? `${prefix}:${tag}` : tag;
31
+ this.map.set(fullTag, com);
30
32
  }
31
33
  /**
32
34
  * 取消组件注册
@@ -34,9 +36,11 @@ var RenderRegister = class {
34
36
  * @author zhanghanrui
35
37
  * @date 2024-05-25 08:05:34
36
38
  * @param {string} tag
39
+ * @param {string} [prefix]
37
40
  */
38
- unregister(tag) {
39
- this.map.delete(tag);
41
+ unregister(tag, prefix) {
42
+ const fullTag = prefix ? `${prefix}:${tag}` : tag;
43
+ this.map.delete(fullTag);
40
44
  }
41
45
  /**
42
46
  * 获取注册的组件
@@ -44,11 +48,13 @@ var RenderRegister = class {
44
48
  * @author zhanghanrui
45
49
  * @date 2024-05-25 08:05:59
46
50
  * @param {string} tag
51
+ * @param {string} [prefix]
47
52
  * @return {*} {(Component | undefined)}
48
53
  */
49
- get(tag) {
50
- const component = this.map.get(tag);
51
- if (!component) console.warn(`No component registered for tag: ${tag}`);
54
+ get(tag, prefix) {
55
+ const fullTag = prefix ? `${prefix}:${tag}` : tag;
56
+ const component = this.map.get(fullTag);
57
+ if (!component) console.warn(`No component registered for tag: ${fullTag}`);
52
58
  return component;
53
59
  }
54
60
  /**
@@ -0,0 +1,16 @@
1
+ import { Component } from 'vue';
2
+ import { FIELD_TYPE } from '@gct-paas/core';
3
+ /**
4
+ * 设计编辑器安装函数
5
+ *
6
+ * @author chitanda
7
+ * @date 2025-07-07 15:07:46
8
+ * @export
9
+ * @param {string} providerTag
10
+ * @param {() => DesignEditorNodeProvider} provider
11
+ * @param {*} [com]
12
+ * @returns {*}
13
+ */
14
+ export declare function widthRenderDesignEditorInstall(fieldType: FIELD_TYPE, com: Component): {
15
+ install(): void;
16
+ };
@@ -0,0 +1,28 @@
1
+ import { RenderNodeRegister } from "../../register/node/node.register.mjs";
2
+ import "../../register/index.mjs";
3
+ import { RenderDesignEditor } from "../../providers/render-design-editor/render-design-editor.provider.mjs";
4
+ import "../../providers/index.mjs";
5
+ import "vue";
6
+ //#region src/utils/design-install/design-install.ts
7
+ /**
8
+ * 设计编辑器安装函数
9
+ *
10
+ * @author chitanda
11
+ * @date 2025-07-07 15:07:46
12
+ * @export
13
+ * @param {string} providerTag
14
+ * @param {() => DesignEditorNodeProvider} provider
15
+ * @param {*} [com]
16
+ * @returns {*}
17
+ */
18
+ function widthRenderDesignEditorInstall(fieldType, com) {
19
+ class Provider extends RenderDesignEditor {
20
+ fieldType = fieldType;
21
+ component = com;
22
+ }
23
+ return { install() {
24
+ if (fieldType) RenderNodeRegister.registerDesignEditorNode(fieldType, () => new Provider());
25
+ } };
26
+ }
27
+ //#endregion
28
+ export { widthRenderDesignEditorInstall };
@@ -1,3 +1,4 @@
1
+ export { widthRenderDesignEditorInstall } from './design-install/design-install';
1
2
  export { calculate, identify } from './expression';
2
3
  export { transformPropsField } from './field-attrs';
3
4
  export { RenderPluginPgkUtil } from './render-plugin-pkg-util/render-plugin-pkg-util';
@@ -1,4 +1,5 @@
1
1
  import "./getFieldSchema.mjs";
2
+ import "./design-install/design-install.mjs";
2
3
  import "./expression/index.mjs";
3
4
  import "./field-attrs/index.mjs";
4
5
  import "./render-plugin-pkg-util/render-plugin-pkg-util.mjs";
@@ -4,9 +4,13 @@ import { isArray } from "lodash-es";
4
4
  //#region src/utils/search/listhook.ts
5
5
  /** 数据类型 */
6
6
  var ValueTypeEnum = {
7
+ /** 固定值 */
7
8
  FIXED: "FIXED",
9
+ /** 系统变量 */
8
10
  SYS: "SYS",
11
+ /** 字段 */
9
12
  FIELD: "FIELD",
13
+ /** 变量 */
10
14
  VAR: "VAR"
11
15
  };
12
16
  function getIExp(exp, ignoreOptions = []) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/render",
3
- "version": "0.1.6-dev.1",
3
+ "version": "0.1.6-dev.3",
4
4
  "type": "module",
5
5
  "description": "paas 平台网页端底包",
6
6
  "loader": "dist/loader.esm.min.js",
@@ -44,10 +44,10 @@
44
44
  "qx-util": "^0.4.8",
45
45
  "vue": "^3.5.30",
46
46
  "vue3-dnd": "^2.1.0",
47
- "@gct-paas/core": "0.1.6-dev.1",
48
- "@gct-paas/core-web": "0.1.6-dev.1",
49
- "@gct-paas/schema": "0.1.6-dev.1",
50
- "@gct-paas/scss": "0.1.6-dev.1"
47
+ "@gct-paas/core": "0.1.6-dev.3",
48
+ "@gct-paas/scss": "0.1.6-dev.3",
49
+ "@gct-paas/core-web": "0.1.6-dev.3",
50
+ "@gct-paas/schema": "0.1.6-dev.3"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/escodegen": "^0.0.10",
@@ -57,10 +57,10 @@
57
57
  "peerDependencies": {
58
58
  "@gct-paas/api": "^0.1.4-dev.4",
59
59
  "vue": ">=3",
60
- "@gct-paas/core-web": "0.1.6-dev.1",
61
- "@gct-paas/core": "0.1.6-dev.1",
62
- "@gct-paas/scss": "0.1.6-dev.1",
63
- "@gct-paas/schema": "0.1.6-dev.1"
60
+ "@gct-paas/core": "0.1.6-dev.3",
61
+ "@gct-paas/schema": "0.1.6-dev.3",
62
+ "@gct-paas/core-web": "0.1.6-dev.3",
63
+ "@gct-paas/scss": "0.1.6-dev.3"
64
64
  },
65
65
  "scripts": {
66
66
  "dev": "cross-env NODE_ENV=development vite build --watch --config vite.dev.config.ts",