@gct-paas/render 0.1.5-dev.0 → 0.1.5-dev.1
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.
- package/dist/loader.esm.min.js +1 -1
- package/es/Event/Dependency/controller.mjs +1 -1
- package/es/Event/Dependency/displayRule.mjs +1 -1
- package/es/Event/Dependency/useDependency.mjs +1 -1
- package/es/Event/baseEvent.mjs +1 -1
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/widgets/useFileAttrsHooks.d.ts +28 -0
- package/es/hooks/widgets/useFileAttrsHooks.mjs +37 -0
- package/es/index.d.ts +1 -0
- package/es/index.mjs +14 -4
- package/es/utils/index.mjs +1 -0
- package/es/utils/search/index.d.ts +1 -0
- package/es/utils/search/index.mjs +1 -0
- package/es/utils/search/listhook.d.ts +17 -0
- package/es/utils/search/listhook.mjs +70 -0
- package/package.json +8 -7
package/dist/loader.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ASSIGNMENTSTRATEGY_ENUM as e,BizServiceEnum as t,ButtonTypeEnum as n,DateRangeEnums as r,DefaultDateTypeConst as i,Dependency_ENUM as o,DisplayType as s,EntityModelCategoryEnum as a,ExamineAndApproveStateEnum as u,FIELD_TYPE as l,FieldSysVarDefaultValueEnum as c,FormComponents as d,GLOBAL_VAR_TYPE as f,INNER_EVENT as p,OpinionTypeEnum as h,PluginModeEnum as m,PluginPgkUtil as g,SEARCH_SERVICE as y,SYSTEM_VAR_PREFIX as v,cssLoader as b,functionMap as w,innerVarIds as E,isMultipleOperator as D,operator2FuncMap as O,t as I,usePermissionStore as T}from"@gct-paas/core";import M from"dayjs";import*as S from"lodash-es";import{cloneDeep as N,differenceBy as C,get as _,isEqual as R,isNull as A,isUndefined as Y,merge as x}from"lodash-es";import P from"bignumber.js";import*as $ from"esprima-next";import k from"estraverse";import{computed as F,createElementBlock as H,createElementVNode as B,customRef as V,defineComponent as L,getCurrentInstance as j,getCurrentScope as U,inject as G,nextTick as W,onActivated as K,onBeforeUnmount as q,onMounted as z,onScopeDispose as J,onUnmounted as Q,openBlock as X,provide as Z,reactive as ee,readonly as te,ref as ne,shallowReactive as re,shallowRef as ie,toRaw as oe,toRef as se,toValue as ae,unref as ue,watch as le}from"vue";import{DesignNodeMode as ce,extractFontStyle as de,generateWrapperStyle as fe,propsToStyle as pe}from"@gct-paas/schema";import he from"qs";var me=Object.create,ge=Object.defineProperty,ye=Object.getOwnPropertyDescriptor,ve=Object.getOwnPropertyNames,be=Object.getPrototypeOf,we=Object.prototype.hasOwnProperty,Ee=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),De=(e,t)=>{let n={};for(var r in e)ge(n,r,{get:e[r],enumerable:!0});return t||ge(n,Symbol.toStringTag,{value:"Module"}),n},Oe=(e,t,n)=>(n=null!=e?me(be(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=ve(t),s=0,a=o.length;s<a;s++)i=o[s],we.call(e,i)||void 0===i||ge(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=ye(t,i))||r.enumerable});return e})(!t&&e&&e.__esModule?n:ge(n,"default",{value:e,enumerable:!0}),e));function Ie(e){return Ie="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},Ie(e)}function Te(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ie(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ie(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Me=class{constructor(){Te(this,"map",/* @__PURE__ */new Map)}register(e,t){this.map.set(e,t)}unregister(e){this.map.delete(e)}get(e){return this.map.get(e)}keys(){return Array.from(this.map.keys())}},Se="view-design",Ne="id",Ce=/* @__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}({}),_e={WEEK_NOW:e=>{const t=M().startOf("week").add(1,"day"),n=M().endOf("week").add(1,"day"),r=t.valueOf(),i=n.valueOf();return{disabled:e<r||e>i,minDate:t,maxDate:n}},MONTH_NOW:e=>{const t=M().startOf("month"),n=M().endOf("month"),r=t.valueOf(),i=n.valueOf();return{disabled:e<r||e>i,minDate:t,maxDate:n}},QUARTER_NOW:e=>{const t=M().startOf("quarter"),n=M().endOf("quarter"),r=t.valueOf(),i=n.valueOf();return{disabled:e<r||e>i,minDate:t,maxDate:n}},YEAR_NOW:e=>{const t=M().startOf("year"),n=M().endOf("year"),r=t.valueOf(),i=n.valueOf();return{disabled:e<r||e>i,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(),i=n.valueOf();return{disabled:e<r||e>i,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(),i=n.valueOf();return{disabled:e<r||e>i,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(),i=n.valueOf();return{disabled:e<r||e>i,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(),i=n.valueOf();return{disabled:e<r||e>i,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}}},Re=(e,t)=>{const n=M(e).valueOf(),r=_e[t];if(r){const{disabled:e}=r(n);return e}return!1},Ae=e=>{const t=_e[e];if(t){const{minDate:e,maxDate:n}=t(0);return Object.assign({},e&&{minDate:new Date(e)},n&&{maxDate:new Date(n)})}return{}},Ye=(e,t)=>{let n;switch(e){case c.SYS_DATE:n=M().format(t??"YYYY-MM-DD");break;case c.SYS_DATE_TIME:n=M().format(t??"YYYY-MM-DD HH:mm:ss");break;case c.SYS_TIME:n=M().format(t??"HH:mm:ss")}return n},xe={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"]}},Pe={[r.WEEK_NOW]:""},$e=/* @__PURE__ */function(e){return e.DESIGN_RENDER="design-render",e}({}),ke=/* @__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}({}),Fe=/* @__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}({}),He=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,ke.CUSTOM_HOME)}static registerDesignEditorNode(e,t){this.register(e,t,ke.DESIGN_EDITOR)}static getCustomHome(e){return this.get(e,ke.CUSTOM_HOME)}static getDesignEditorNode(e){return this.get(e,ke.DESIGN_EDITOR)}};Te(He,"map",/* @__PURE__ */new Map),Te(He,"cache",/* @__PURE__ */new Map);var Be=/* @__PURE__ */Ee((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,i,o){var s=i.prototype;o.utc=function(e){return new i({date:e,utc:!0,args:arguments})},s.utc=function(t){var n=o(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},s.local=function(){return o(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 l=s.utcOffset;s.utcOffset=function(r,i){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?l.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 i=(""+r[0]).match(n)||["-",0,0],o=i[0],s=60*+i[1]+ +i[2];return 0===s?0:"+"===o?s:-s}(r),null===r))return this;var s=Math.abs(r)<=16?60*r:r;if(0===s)return this.utc(i);var a=this.clone();if(i)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 c=s.format;s.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.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?o(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(),i=o(e).local();return f.call(r,i,t,n)}}})}),Ve=/* @__PURE__ */Ee((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,i){var o,s=function(e,n,r){void 0===r&&(r={});var i=new Date(e);return function(e,n){void 0===n&&(n={});var r=n.timeZoneName||"short",i=e+"|"+r,o=t[i];return o||(o=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[i]=o),o}(n,r).formatToParts(i)},a=function(t,n){for(var r=s(t,n),o=[],a=0;a<r.length;a+=1){var u=r[a],l=u.type,c=u.value,d=e[l];d>=0&&(o[d]=parseInt(c,10))}var f=o[3],p=24===f?0:f,h=o[0]+"-"+o[1]+"-"+o[2]+" "+p+":"+o[4]+":"+o[5]+":000",m=+t;return(i.utc(h).valueOf()-(m-=m%1e3))/6e4},u=r.prototype;u.tz=function(e,t){void 0===e&&(e=o);var n,r=this.utcOffset(),s=this.toDate(),a=s.toLocaleString("en-US",{timeZone:e}),u=Math.round((s-new Date(a))/1e3/60),l=15*-Math.round(s.getTimezoneOffset()/15)-u;if(Number(l)){if(n=i(a,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(l,!0),t){var c=n.utcOffset();n=n.add(r-c,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},u.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),n=s(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var l=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var n=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(n,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,n){var r=n&&t,s=n||t||o,u=a(+i(),s);if("string"!=typeof e)return i(e).tz(s);var l=function(e,t,n){var r=e-60*t*1e3,i=a(r,n);if(t===i)return[r,t];var o=a(r-=60*(i-t)*1e3,n);return i===o?[r,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}(i.utc(e,r).valueOf(),u,s),c=l[0],d=l[1],f=i(c).utcOffset(d);return f.$x.$timezone=s,f},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){o=e}}})}),Le=/* @__PURE__ */Ee((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 i=r.prototype;i.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var o=i.add;i.add=function(n,r){return n=Number(n),this.$utils().p(r)===t?this.add(3*n,e):o.bind(this)(n,r)};var s=i.startOf;i.startOf=function(n,r){var i=this.$utils(),o=!!i.u(r)||r;if(i.p(n)===t){var a=this.quarter()-1;return o?this.month(3*a).startOf(e).startOf("day"):this.month(3*a+2).endOf(e).endOf("day")}return s.bind(this)(n,r)}}})}),je=/* @__PURE__ */Ee((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]}}})}),Ue=/* @__PURE__ */Ee((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 i=function(t){return t.add(4-t.isoWeekday(),e)},o=n.prototype;o.isoWeekYear=function(){return i(this).year()},o.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,o,s,a=i(this),u=(n=this.isoWeekYear(),s=4-(o=(this.$u?r.utc:r)().year(n).startOf("year")).isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return a.diff(u,"week")+1},o.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var s=o.startOf;o.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)}}})}),Ge=/* @__PURE__ */De({ABS:()=>kt,ADD:()=>Tt,AND:()=>tt,AVERAGE:()=>$t,CONCAT:()=>ct,COUNT:()=>yn,DATE2TIMESTAMP:()=>Kt,DATEFORMAT:()=>qt,DAY:()=>Zt,DIVISION:()=>Nt,EQ:()=>rt,FINDSTR:()=>wt,FIXED:()=>Ct,GE:()=>at,GET:()=>Lt,GT:()=>ut,HEADPUSH:()=>Gt,HOUR:()=>en,IF:()=>Qe,ISDATERANGE:()=>dn,ISEMPTY:()=>Xe,ISNULL:()=>Ze,ISTIMERANGE:()=>fn,ISUNDEFINED:()=>et,LARGE:()=>Yt,LASTMONTHRANGE:()=>sn,LASTQUARTER:()=>cn,LASTWEEKRANGE:()=>rn,LASTYEARRANGE:()=>un,LE:()=>ot,LEN:()=>lt,LOWER:()=>ht,LT:()=>st,LTRIM:()=>gt,MAX:()=>At,MIN:()=>xt,MINUTE:()=>tn,MOD:()=>Ft,MONTH:()=>Xt,MONTHRANGE:()=>on,MULTIPLICATION:()=>St,NE:()=>it,NOW:()=>zt,OR:()=>nt,PARSENUMBER:()=>Dt,POWER:()=>Bt,PUSH:()=>Ut,PUT:()=>jt,QUARTER:()=>ln,REDUCE:()=>Mt,REPEAT:()=>vt,REPLACE:()=>bt,ROUND:()=>_t,ROUNDUP:()=>Rt,RTRIM:()=>yt,SEARCHSTR:()=>Et,SEQMAP:()=>mn,SMALL:()=>Pt,SPLIT:()=>Ot,SQRT:()=>Vt,STDEV:()=>vn,SUBSTR:()=>ft,SUBSTRING:()=>dt,SUM:()=>It,SUMSQ:()=>gn,TIMESTAMP2DATE:()=>Wt,TODAY:()=>Jt,TRIM:()=>mt,TUPLE:()=>hn,UPPER:()=>pt,WEEKRANGE:()=>nn,YEAR:()=>Qt,YEARRANGE:()=>an}),We=/* @__PURE__ */Oe(Be(),1),Ke=/* @__PURE__ */Oe(Ve(),1),qe=/* @__PURE__ */Oe(Le(),1),ze=/* @__PURE__ */Oe(je(),1),Je=/* @__PURE__ */Oe(Ue(),1);function Qe(e,t,n){return e?t:n}function Xe(e){return null==e||""===e||0===e}function Ze(e){return A(e)}function et(e){return Y(e)}function tt(...e){return(()=>{for(const t of e)if(!t)return!1;return!0})()}function nt(...e){return e.some(e=>e)}function rt(e,t){return R(e,t)}function it(e,t){return e!==t}function ot(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<=t}function st(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<t}function at(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>=t}function ut(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>t}function lt(e){return(null==e?void 0:e.length)||0}function ct(...e){return e.join("")}function dt(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 ft(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 pt(e=""){return e.toUpperCase()}function ht(e=""){return e.toLowerCase()}function mt(e=""){return e.trim()}function gt(e=""){return e.replace(/^\s\s*/,"")}function yt(e=""){return e.replace(/\s\s*$/,"")}function vt(e="",t=""){return(null===(n=e.match(new RegExp(t,"g")))||void 0===n?void 0:n.length)||null;var n}function bt(e="",t="",n=""){return e.replace(new RegExp(t,"g"),n)}function wt(e="",t=""){return e.includes(t)}function Et(e="",t=""){return(null===(n=e.match(new RegExp(t,"g")))||void 0===n?void 0:n.length)||0;var n}function Dt(e=""){return(()=>{const t=parseFloat(e);return isNaN(t)?null:t})()}function Ot(e="",t=""){return e.split(t)}function It(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?t.reduce(bn,0):""}function Tt(...e){return e.flat().reduce(bn,0)}function Mt(e,...t){return t.reduce(wn,e)}function St(e,...t){const n=t.flat().filter(e=>""!==e&&null!=e);return n.length?n.reduce(En,e):""}function Nt(e,...t){return t.reduce(Dn,e)}function Ct(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 i=r.split("");if(i.length>t)i=i.slice(0,t);else{const e=i.length;for(let n=0;n<t-e;n++)i.push("0")}return`${n}.${i.join("")}`})()}function _t(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 i=r>0?(+(Math.round(Number(r+`e${n}`))+`e-${n}`)).toFixed(n):-(+(Math.round(Number(-r+`e${n}`))+`e-${n}`)).toFixed(n);return parseFloat(i+"")})()}function Rt(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 P(e).decimalPlaces(t,P.ROUND_UP).toNumber()}function At(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.max.apply(null,t):""}function Yt(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 xt(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.min.apply(null,t):""}function Pt(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 $t(...e){const t=e.flat().filter(e=>""!==e&&null!=e),n=t.length;if(!n)return"";let r=new P(0);for(const i of t)r=r.plus(i);return r.dividedBy(n).toNumber()}function kt(e){return Math.abs.call(null,e)}function Ft(e,t){return(()=>{if(0===e)throw new Error("The second value should not be zero.");const n=new P(e).mod(t).toNumber();return isNaN(n)?"":n})()}function Ht(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 Bt(e,t){return(()=>{const n=Ht(e),r=Ht(t);return null===n||null===r?NaN:Math.abs(r)>1e9?r>0?1/0:0:Math.pow(n,r)})()}function Vt(e){return(()=>{const t=Ht(e);return null===t?NaN:Math.sqrt(t)})()}function Lt(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 jt(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 Ut(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 Gt(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 Wt(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 Kt(e){if(e)return M(e).unix()}function qt(e,t){if(e)return M(e).format(t)}function zt(){return M().format("YYYY-MM-DD HH:MM:ss")}function Jt(){return M().format("YYYY-MM-DD")}function Qt(e){return M(e).year()}function Xt(e){return M(e).month()}function Zt(e){return M(e).day()}function en(e){return M(e).hour()}function tn(e){return M(e).minute()}function nn(){return[pn(M().startOf("week").toDate()),pn(M().endOf("week").toDate())]}function rn(){return[pn(M().subtract(1,"week").startOf("week").toDate()),pn(M().subtract(1,"week").endOf("week").toDate())]}function on(){return[pn(M().startOf("month").toDate()),pn(M().endOf("month").toDate())]}function sn(){return[pn(M().subtract(1,"month").startOf("month").toDate()),pn(M().subtract(1,"month").endOf("month").toDate())]}function an(){return[pn(M().startOf("year").toDate()),pn(M().endOf("year").toDate())]}function un(){return[pn(M().subtract(1,"year").startOf("year").toDate()),pn(M().subtract(1,"year").endOf("year").toDate())]}function ln(){return(()=>{const e=Math.floor((M().month()+3)/3);return[pn(M().quarter(e).startOf("quarter").toDate()),pn(M().quarter(e).endOf("quarter").toDate())]})()}function cn(){return(()=>{const e=Math.floor((M().month()+3)/3);return[pn(M().quarter(e-1).startOf("quarter").toDate()),pn(M().quarter(e-1).endOf("quarter").toDate())]})()}function dn(e,t){return(()=>{const[n,r]=t;return e>=n&&e<=r})()}function fn(e,t){return(()=>{const[n,r]=t,i=M(e,"HH:mm");if(n>r){const e=M(n,"HH:mm"),t=M(r,"HH:mm").add(1,"day");return i>=e||i<=t}return i>=M(n,"HH:mm")&&i<=M(r,"HH:mm")})()}function pn(e){return M(e).tz("America/Chicago").format("YYYY-MM-DD HH:mm:ss.SSSSSSSSS ZZ")}function hn(...e){return[...e]}function mn(...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 gn(...e){return 0===(e=e.flat().filter(e=>""!==e&&null!=e)).length?"":e.map(e=>{const t=En(e,e);return""!==t?t:new P(0).toNumber()}).reduce((e,t)=>bn(e,t)||P(0).toNumber(),new P(0).toNumber())}function yn(e){return Array.isArray(e)?e.length:""}function vn(...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 bn(e,t){const n=new P(e).plus(new P(t)).toNumber();return isNaN(n)?"":n}function wn(e,t){const n=new P(e).minus(new P(t)).toNumber();return isNaN(n)?"":n}function En(e,t){const n=new P(e).multipliedBy(new P(t)).toNumber();return isNaN(n)?"":n}function Dn(e,t){const n=new P(e).div(new P(t)).toNumber();return isNaN(n)?"":n}M.extend(We.default),M.extend(Ke.default),M.extend(qe.default),M.extend(ze.default),M.extend(Je.default);var On="undefined"!=typeof window&&"undefined"!=typeof document,In=("undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),Object.prototype.toString),Tn=()=>{},Mn=e=>e();function Sn(e,t={}){let n,r,i=Tn;const o=e=>{clearTimeout(e),i(),i=Tn};let s;return a=>{const u=ae(e),l=ae(t.maxWait);return n&&o(n),u<=0||void 0!==l&&l<=0?(r&&(o(r),r=void 0),Promise.resolve(a())):new Promise((e,c)=>{i=t.rejectOnCancel?c:e,s=a,l&&!r&&(r=setTimeout(()=>{n&&o(n),r=void 0,e(s())},l)),n=setTimeout(()=>{r&&o(r),r=void 0,e(a())},u)})}}function Nn(e){return Array.isArray(e)?e:[e]}function Cn(e){const t=Object.create(null);return n=>t[n]||(t[n]=e(n))}var _n=/\B([A-Z])/g,Rn=(Cn(e=>e.replace(_n,"-$1").toLowerCase()),/-(\w)/g);function An(e,t,n={}){const{eventFilter:r=Mn,...i}=n;return le(e,(o=r,s=t,function(...e){return new Promise((t,n)=>{Promise.resolve(o(()=>s.apply(this,e),{fn:s,thisArg:this,args:e})).then(t).catch(n)})}),i);var o,s}function Yn(e,t=!0,n){!function(e){return e||j()}(n)?t?e():W(e):z(e,n)}function xn(e,t,n={}){const{debounce:r=0,maxWait:i,...o}=n;return An(e,t,{...o,eventFilter:Sn(r,{maxWait:i})})}Cn(e=>e.replace(Rn,(e,t)=>t?t.toUpperCase():""));var Pn=On?window:void 0,$n=On?window.document:void 0;function kn(...e){const t=F(()=>{const t=Nn(ae(e[0])).filter(e=>null!=e);return t.every(e=>"string"!=typeof e)?t:void 0});return n=([e,t,n,r],i,o)=>{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]"===In.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))));o(()=>{u.forEach(e=>e())})},r={flush:"post"},le(()=>{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:[Pn].filter(e=>null!=e),Nn(ae(t.value?e[1]:e[0])),Nn(ue(t.value?e[2]:e[1])),ae(t.value?e[3]:e[2])]},n,{...r,immediate:!0});var n,r}On&&window.navigator,On&&window.location;var Fn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Hn="__vueuse_ssr_handlers__",Bn=/* @__PURE__ */Vn();function Vn(){return Hn in Fn||(Fn[Hn]=Fn[Hn]||{}),Fn[Hn]}var Ln={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()}},jn="vueuse-storage";function Un(e,t,n,r={}){var i;const{flush:o="pre",deep:s=!0,listenToStorageChanges:a=!0,writeDefaults:u=!0,mergeDefaults:l=!1,shallow:c,window:d=Pn,eventFilter:f,onError:p=e=>{console.error(e)},initOnMounted:h}=r,m=(c?ie:ne)("function"==typeof t?t():t),g=F(()=>ae(e));if(!n)try{n=(Bn.getDefaultStorage||(()=>null==Pn?void 0:Pn.localStorage))()}catch(T){p(T)}if(!n)return m;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!==(i=r.serializer)&&void 0!==i?i:Ln[v],{pause:w,resume:E}=function(e,t,n={}){const{eventFilter:r,initialState:i="active",...o}=n,{eventFilter:s,pause:a,resume:u,isActive:l}=function(e=Mn,t={}){const{initialState:n="active"}=t,r=function(...e){if(1!==e.length)return se(...e);const t=e[0];return"function"==typeof t?te(V(()=>({get:t,set:Tn}))):ne(t)}("active"===n);return{isActive:te(r),pause:function(){r.value=!1},resume:function(){r.value=!0},eventFilter:(...t)=>{r.value&&e(...t)}}}(r,{initialState:i});return{stop:An(e,t,{...o,eventFilter:s}),pause:a,resume:u,isActive:l}}(m,e=>function(e){try{const t=n.getItem(g.value);if(null==e)O(t,null),n.removeItem(g.value);else{const r=b.write(e);t!==r&&(n.setItem(g.value,r),O(t,r))}}catch(T){p(T)}}(e),{flush:o,deep:s,eventFilter:f});le(g,()=>I(),{flush:o});let D=!1;function O(e,t){if(d){const r={key:g.value,oldValue:e,newValue:t,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",r):new CustomEvent(jn,{detail:r}))}}function I(e){if(!e||e.storageArea===n)if(e&&null==e.key)m.value=y;else if(!e||e.key===g.value){w();try{const t=b.write(m.value);void 0!==e&&(null==e?void 0:e.newValue)===t||(m.value=function(e){const t=e?e.newValue:n.getItem(g.value);if(null==t)return u&&null!=y&&n.setItem(g.value,b.write(y)),y;if(!e&&l){const e=b.read(t);return"function"==typeof l?l(e,y):"object"!==v||Array.isArray(e)?e:{...y,...e}}return"string"!=typeof t?t:b.read(t)}(e))}catch(T){p(T)}finally{e?W(E):E()}}}return d&&a&&(n instanceof Storage?kn(d,"storage",e=>{h&&!D||I(e)},{passive:!0}):kn(d,jn,e=>{h&&!D||I(e.detail)})),h?Yn(()=>{D=!0,I()}):I(),m}function Gn(e,t){const n=(null==t?void 0:t.cache)?re(t.cache):re(/* @__PURE__ */new Map),r=(...e)=>(null==t?void 0:t.getKey)?t.getKey(...e):JSON.stringify(e),i=(t,...r)=>(n.set(t,e(...r)),n.get(t)),o=(...e)=>{const t=r(...e);return n.has(t)?n.get(t):i(t,...e)};return o.load=(...e)=>i(r(...e),...e),o.delete=(...e)=>{n.delete(r(...e))},o.clear=()=>{n.clear()},o.generateKey=r,o.cache=n,o}var Wn=0;Number.POSITIVE_INFINITY,window._METHOD_DEBUG_=Ge;var Kn=Gn(function(e,t=!1){const n=$.parse(e);let r=[];return k.traverse(n,{enter:function(e){if(e.type===$.Syntax.MemberExpression){const t=zn(e);r.push(t),Object.assign(e,{name:t,type:$.Syntax.Identifier})}else e.type===$.Syntax.Identifier&&r.push(e.name);r=t?r.filter(e=>!w[e]&&"undefined"!==e):r.filter(e=>!(w[e]||"undefined"===e||E.includes(e)||e.startsWith(v)||e.startsWith("undefined.")))}}),[...new Set(r)]}),qn=Gn(async function(e,t){const n=Kn(e,!0),r=n.filter(e=>E.includes(e)).sort(),i=n.filter(e=>e.startsWith(v)).sort(),o=await Qn([...r,...i]),s=$.parse(e);k.replace(s,{enter(e){if(e.type===$.Syntax.BinaryExpression){const{operator:t}=e,n=O[t];return n?{type:$.Syntax.CallExpression,arguments:[e.left,e.right],callee:{type:$.Syntax.Identifier,name:n},optional:!1}:e}return e}}),k.traverse(s,{enter:function(e){e.type===$.Syntax.CallExpression&&e.callee.type===$.Syntax.Identifier&&(e.callee.name=`await Methods.${e.callee.name}`)}});const a={},u=[];o.forEach(e=>{u.push(`const ${e.key} = ${JSON.stringify(e.value)};`)}),Object.keys(t).map(e=>{if(e.includes(".")){const[n="",r]=e.split(".");a[n]||(u.push(`const ${n} = {};`),a[n]=!0),u.push(`${n}.${r} = ${JSON.stringify(t[e])};`)}else u.push(`const ${e} = ${JSON.stringify(t[e])};`)});const l=new Jn("Methods",[...u,"return new Promise(async(resolve)=>{","const res = ;","resolve(res);","})"].join("\n")),c=await l(Ge);return console.info("【表达式】",e),console.info("【参数】",t),console.info("【执行语句】",l.toString()),console.info("【执行结果】",c),c});function zn(e){return e.type===$.Syntax.MemberExpression?`${e.object.type===$.Syntax.MemberExpression?zn(e.object):e.object.name}.${e.property.name}`:e.type===$.Syntax.Identifier?e.name:""}var Jn=Object.getPrototypeOf(async function(){}).constructor,Qn=Gn(async function(e){let t=[];return e.length>0&&(t=await _gct.api.apaas.systemVar.getGetVarByKeys({keys:e.join(",")})),t});window.gct_expression={execute:qn,identify:Kn};var Xn={[l.TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[l.LONG_TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[l.INTEGER]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[l.LONG]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[l.DOUBLE]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[l.DECIMAL]:{attrsTransform:[{from:"specificConfig.digits",to:"precision"},{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]}},Zn=(e,t)=>{const{attrsTransform:n=[]}=Xn[e]??{};return n.reduce((e,n)=>{const r=_(t,n.from);return e[n.to]=r,e},{})},er=class extends g{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(m.MOBILE,e)}static loadPadPlugin(e=[]){return this.loadRenderPlugin(m.PAD,e)}static loadWebPlugin(e=[]){return this.loadRenderPlugin(m.WEB,e)}};function tr(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 nr=e=>de(e),rr=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 ir(e,t=!1){const{modelKey:n,field:r,isCustomField:i,fieldName:o,readonly:s,fieldType:a}=e.props;if(!e.isField&&!t||"table_name_"===r)return{};let u;if(i?u={name:o,type:""}:n&&(u=await rr.getConfigByField(n,r)),!(i||u&&u.type===a))throw new Error("该字段可能已经被删除");if(!u)return{};const{required:l,specificConfig:c}=u;return e.props.fieldRequired=!!l,l&&!s&&(e.props.required=!0),void 0!==(null==c?void 0:c.digits)&&(e.props.precision=c.digits),u}function or(e,t){return(null==e?void 0:e.map(e=>sr(e,t)))||[]}function sr(e={},t={}){var n;const r=N(e);r._X_ROW_KEY=void 0;const i=(null===(n=Object.keys(t??{}))||void 0===n?void 0:n.length)?Object.keys(r).reduce((e,n)=>{const i=t[n],o=r[n];if(i&&o)try{const t=(o+"").split(",").map(e=>i[e]);e[n]={[o+""]:t}}catch{}return e},{}):r._DICT||{};return{...r,_DICT:i,_OPCT:r.__FOREIGN__&&"object"==typeof r.__FOREIGN__?sr(r.__FOREIGN__,t):{}}}function ar(e,t,n){"object"==typeof t&&x(e,sr(t,n))}function ur(e,t,n){if("object"!=typeof t)return;for(const i in e)"_OPCT"!==i&&"_NOSUBMIT"!==i&&delete e[i];const r=sr(t,n);r._X_ROW_KEY=t._X_ROW_KEY,x(e,r)}function lr(e,t={},n={}){const r=N(t.__FOREIGN__||t),i={_DICT:{}};return Object.keys(r).forEach(t=>{const o=`${e}.${t}`,s=n[t],a=r[t];if(s&&a)try{const e=(a+"").split(",").map(e=>s[e]);i._DICT[o]={[a+""]:e}}catch{}i[o]=a}),{...r,_OPCT:i}}function cr(e={},t={}){var n;const r=N(e);return(null===(n=Object.keys(t??{}))||void 0===n?void 0:n.length)?Object.keys(r).reduce((e,n)=>{const i=t[n]||{},o=r[n];try{e[n]=(o+"").split(",").map(e=>i[e]).join(",")}catch{e[n]=o}return e},{}):r}function dr(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 i="object"==typeof e?he.stringify({...e,customApi:null}):e;let o=fr.get(i);return o||(o=(async()=>{try{return await t(e)}catch(n){throw fr.delete(i),n}})(),fr.set(i,o,5e3),o)}Te(rr,"modelData",/* @__PURE__ */new Map),Te(rr,"FiledData",/* @__PURE__ */new Map),Te(rr,"responsePromise",/* @__PURE__ */new Map),Te(rr,"silent",!1);var fr=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 pr({ids:e,refOriginField:t,refOriginFieldType:n,model:r,foreignFields:i}){if(!e)return Promise.reject();const o=await async function({refOriginFieldType:e,modelKey:t,foreignFields:n,ids:r}){if(e===l.RDO_REF){const{data:e={},dict:i={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"rdoGetVersionByRefId",modelCategory:a.ENTITY},{foreignFields:n},{refId:r});return{data:e,dict:i}}{const{data:e={},dict:i={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"getOne",modelCategory:a.ENTITY},{query:{"id_.eq":r},foreignFields:n},{});return{data:e,dict:i}}}({refOriginFieldType:n,modelKey:r,foreignFields:i,ids:e});return(null==o?void 0:o.data)?lr(t,o.data,o.dict):void 0}Te(fr,"cachedata",{});var hr=e=>dr(e,pr),mr=[y.CONTAINALL,y.CONTAINANY,y.IN,y.NOTIN];function gr(e,t,n){const{body:r,exp:i}=function(e){const r={};let i=n||"";return t.forEach(t=>{const n=t.props.fieldSearchKey||t.props.field,o=t.props.ope||[];let s=e[t.id];(null!=s||t.props.useMore)&&o.forEach(e=>{s=function(e,t){return mr.indexOf(t)>-1&&"string"==typeof e?e.split(","):e}(s,e);const o=`${n}.${e}:${t.id}`,a=`${t.id}.${e}`;r[o]=t.props.useMore?null:s,i=i.replace(a,o)})}),{body:r,exp:i}}(function(e,t){if(!t.length)return e;const n=t.filter(e=>e.props.fieldType===l.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:i}}var yr=/* @__PURE__ */new Map;async function vr(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 D(e.props.ope)?[r.masterOrgId]:r.masterOrgId}return null}}async function br(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 D(e.props.ope)?[r.userId]:r.userId}return null}}async function wr(e,t={}){const{defaultValue:n}=e.props;return n&&0!==n.length?n:null}async function Er(e,t={}){const{defaultValue:n}=e.props;return null==n?null:n}function Dr(e,t,n={}){const{defaultValueType:r,defaultValue:o}=e.props;if(null==r||""==r)return null;const{isRang:s,fieldType:a}=e.props;if(!s){const e=a===l.DATE?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss";if(r===i.SystemDate)return M(/* @__PURE__ */new Date).format(e)}if(s){const e=a===l.DATE?"YYYY-MM-DD":"YYYY-MM-DD 00:00:00",t=a===l.DATE?"YYYY-MM-DD":"YYYY-MM-DD 23:59:59",n=null!=o?Number(o):0,u=M();switch(r){case i.SystemDate:return s?[u.format(e),u.format(t)]:u.format(e);case i.PastDays:return[u.subtract(n,"day").format(e),u.subtract(n>0?1:0,"day").format(t)];case i.PastWeeks:return[u.subtract(n,"week").startOf("isoWeek").format(e),u.subtract(n>0?1:0,"week").endOf("isoWeek").format(t)];case i.PastMonths:return[u.subtract(n,"month").startOf("month").format(e),u.subtract(n>0?1:0,"month").endOf("month").format(t)];case i.PastYears:return[u.subtract(n,"year").startOf("year").format(e),u.subtract(n>0?1:0,"year").endOf("year").format(t)];case i.Yesterday:{const n=u.subtract(1,"day");return[n.format(e),n.format(t)]}case i.Past7Days:return[u.subtract(6,"day").format(e),u.format(t)];case i.Past30Days:return[u.subtract(29,"day").format(e),u.format(t)];case i.ThisWeek:return[u.startOf("isoWeek").format(e),u.endOf("isoWeek").format(t)];case i.LastWeek:{const n=u.subtract(1,"week");return[n.startOf("isoWeek").format(e),n.endOf("isoWeek").format(t)]}case i.ThisMonth:return[u.startOf("month").format(e),u.endOf("month").format(t)];case i.LastMonth:{const n=u.subtract(1,"month");return[n.startOf("month").format(e),n.endOf("month").format(t)]}case i.ThisYear:return[u.startOf("year").format(e),u.endOf("year").format(t)];case i.LastYear:{const n=u.subtract(1,"year");return[n.startOf("year").format(e),n.endOf("year").format(t)]}default:return null}}return null}yr.set(l.ORG,vr),yr.set(l.ORG_MULTI,vr),yr.set(l.USER,br),yr.set(l.USER_MULTI,br),yr.set(l.ENUM,wr),yr.set(l.ENUM_MULTI,wr),yr.set(l.INTEGER,Er),yr.set(l.LONG,Er),yr.set(l.DOUBLE,Er),yr.set(l.DECIMAL,Er),yr.set(l.TEXT,async function(e,t={}){const{defaultValue:n}=e.props;return n||null}),yr.set(l.LONG_TEXT,Er),yr.set(l.BOOLEAN,async function(e,t={}){const{defaultValue:n}=e.props;return null==n||""===n?null:n}),yr.set(l.DATE,async function(e,t={}){return Dr(e)}),yr.set(l.DATE_TIME,async function(e,t={}){return Dr(e)}),yr.set(l.PRINTER,async function(e,t={}){const{defaultValue:n}=e.props;return n&&0!==n.length?n:null});var Or={class:"handwriting-pad"},Ir=["width","height"],Tr=/* @__PURE__ */(e=>{const t=e.__vccOpts||e;for(const[n,r]of[["__scopeId","data-v-d5b980b7"]])t[n]=r;return t})(/* @__PURE__ */L({__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=ne(null);let i=null,o=!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 l(e){e.preventDefault(),o=!0;const{x:t,y:n}=u(e);s=t,a=n}function c(e){if(!o||!i)return;e.preventDefault();const{x:t,y:n}=u(e);i.beginPath(),i.moveTo(s,a),i.lineTo(t,n),i.stroke(),i.closePath(),s=t,a=n}function d(e){e.preventDefault(),o=!1}return z(()=>{i=r.value.getContext("2d"),"transparent"!==n.backgroundColor&&(i.fillStyle=n.backgroundColor,i.fillRect(0,0,n.width,n.height)),i.lineWidth=n.lineWidth,i.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==i||i.drawImage(t,0,0)}},clear:function(){null==i||i.clearRect(0,0,n.width,n.height),"transparent"!==n.backgroundColor&&(i.fillStyle=n.backgroundColor,i.fillRect(0,0,n.width,n.height))}}),(t,n)=>(X(),H("div",Or,[B("canvas",{ref_key:"canvasRef",ref:r,width:e.width,height:e.height,class:"canvas",onMousedown:l,onMousemove:c,onMouseup:d,onMouseleave:d,onTouchstart:l,onTouchmove:c,onTouchend:d},null,40,Ir)]))}})),Mr=/* @__PURE__ */function(e){return e.SELECT_ID="$VAR_GCT_SELECT_ID",e}({}),Sr=function(e,t,n={}){const{window:r=Pn}=n;return Un(e,t,null==r?void 0:r.localStorage,n)}("GCT_APP_GlobalCache",{}),Nr=e=>{const t=F({get:()=>Sr.value[e]||{},set(t){Sr.value[e]=t}});return{selectID:F({get:()=>t.value[Mr.SELECT_ID],set(e){t.value[Mr.SELECT_ID]?t.value[Mr.SELECT_ID]=e:t.value={...t.value,[Mr.SELECT_ID]:e}}}),cacheMap:t}},Cr=class{static runApp({userInfo:e,env:t,aid:n}){this.ENV=t,this.AID=n,this.userInfo=e}};Te(Cr,"ENV",void 0),Te(Cr,"AID",void 0),Te(Cr,"userInfo",void 0);var _r={[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"}},Rr=/* @__PURE__ */function(e){return e.WEB="web_module",e.MOBILE="mobile_module",e.PAD="pad_module",e}({}),Ar={[Rr.WEB]:{getPageInfo:_gct.api.apaas.webpage.getInfo},[Rr.MOBILE]:{getPageInfo:_gct.api.apaas.mobilePage.getInfo},[Rr.PAD]:{getPageInfo:_gct.api.apaas.padPage.getInfo}},Yr=ne({}),xr=ne({}),Pr=ne({});function $r(e,t){Pr.value[e]=t}var kr=ne({pageStyle:{},pageConfig:{},pageName:""}),Fr=se(()=>{const{title:e}=kr.value.pageConfig||{};return e}),Hr=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||T().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);xr.value[t.key]=(({value:e,appredis:t,key:n,type:r})=>{var i;const o="dev"!==Cr.ENV&&t,{cacheMap:s}=Nr(`${Cr.AID}_${null===(i=Cr.userInfo)||void 0===i?void 0:i.userId}`);return new Proxy({value:e,type:r},{get:(e,t)=>o&&"value"===t?s.value[n]:Reflect.get(e,t),set:(e,t,r,i)=>(o&&"value"===t&&(s.value[n]?s.value[n]=r:s.value={...s.value,[n]:r}),Reflect.set(e,t,r,i))})})({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;Yr.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=xr.value[e];return t?t.value:console.warn("变量key不存在")}static async setGlobalVar(e,t){const n=xr.value[e];if(!n)return console.warn("变量key不存在");n.value=t}static getPageVar(e){const t=Yr.value[e];return t?t.value:console.warn("变量key不存在")}static async setPageVar(e,t){const n=Yr.value[e];if(!n)return console.warn("变量key不存在");await function(e,t){if(t===f.NULL)return!0;const{callback:n,message:r}=_r[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),Yr.value[e]&&(Yr.value[e].value=t)}static getPageGlobalVar(e){var t;return null===(t=Yr.value[e])||void 0===t?void 0:t.value}static setPageGlobalVar(e,t){Yr.value[e]?Yr.value[e].value=t:Yr.value[e]={value:t,type:"string"}}static async initPageByid(e,t=Rr.WEB){this.pageID=e;const n=Ar[t].getPageInfo,r=await n({id:e}),{runtimeJson:i,name:o}=r||{};if(kr.value.pageName=o,!i)return Promise.reject();const s=JSON.parse(i);return s.widgets.filter(e=>"bottom-button-container"!==e.type).length?(await this.initGlobalS(s),kr.value.pageConfig=s.pageConfig||{},kr.value.pageStyle=s.pageStyle||{},{res:r,data:s,name:o}):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();kr.value.pageName=r;const i=JSON.parse(n);return await this.initGlobalS(i),kr.value.pageConfig=i.pageConfig||{},kr.value.pageStyle=i.pageStyle||{},{res:t,data:i,name:r}}static usePageHooks(t,n,r,i){const o=ne(!1);return z(async()=>{await W();const e=null==n?void 0:n.pageBeforeMount;if((null==e?void 0:e.name)&&await t.runExportByName(e.name,e.extraParams),i&&await i(t),o.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)}),q(async()=>{kr.value={};const{extraParams:e,name:i}=(null==n?void 0:n.pageDestroyed)||{};if(i&&t.runExportByName(i,e),null==r?void 0:r.pageDestroyed)for(const t of this.globalHookCaches.pageDestroyed)await t()}),K(async()=>{if(e.setContextByKey(t.context),null==r?void 0:r.pageActivated)for(const e of this.globalHookCaches.pageActivated)await e();const{extraParams:i,name:o}=(null==n?void 0:n.pageActivated)||{};o&&t.runAsyncExportByName(o,i)}),{pageload:o}}};Te(Hr,"modalsCache",{}),Te(Hr,"pageID",""),Te(Hr,"permissions",{}),Te(Hr,"ContextCache",{}),Te(Hr,"startRuning",!1),Te(Hr,"globalHookCaches",{pageMounted:[],pageActivated:[],pageDestroyed:[]});var Br=Hr.getPremission.bind(Hr),Vr=e=>(t,n={},r={},i={})=>e({modelKey:t.key,bsKey:t.action,modelCategory:t.modelCategory??a.ENTITY},n,r,i),Lr={post:Vr(_gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey),get:Vr(_gct.api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey),put:Vr(_gct.api.apaas.modelComprehensive.putBizServiceModelCategoryModelKeyBsKey),delete:Vr(_gct.api.apaas.modelComprehensive.deleteBizServiceModelCategoryModelKeyBsKey)};async function jr(e,n,...r){return Lr[t[e.action]](e,n,...r)}async function Ur(e,t,{body:n={},query:r={}}={},i={}){return await _gct.api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey({bsKey:t,modelKey:e,modelCategory:a.ENTITY},r,n,i)}var Gr=class e{constructor(){if(Te(this,"mask",void 0),Te(this,"container",void 0),Te(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=""}};Te(Gr,"instance",void 0);var Wr=new Gr,Kr=class{constructor({taskId:e,processInstanceId:t,examineAndApproveState:n=u.MY_CUSTOM,refFormId:r}){Te(this,"isHandle",!1),Te(this,"buttonConfig",{}),Te(this,"fieldConfig",{}),Te(this,"processId",""),Te(this,"dataId",""),Te(this,"taskId",void 0),Te(this,"processInstanceId",void 0),Te(this,"refFormId",void 0),Te(this,"examineAndApproveState",u.MY_CUSTOM),Te(this,"fieldStatus",""),Te(this,"viewPageKey",void 0),Te(this,"isviewPage",void 0),Te(this,"isAPPviewPage",void 0),Te(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:i,mobileViewPageKey:o}=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)||i,this.isAPPviewPage=!!(null==t?void 0:t.mobileViewPageKey)||!!o}if(this.examineAndApproveState===u.MY_APPLICATION){await this.getDataInfo();const{node:e,processDefId:r,withdrawOp:i}=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=!!i),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:i,taskId:o,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)&&!o?this.isviewPage=!0:this.viewPageKey=(null==e?void 0:e.webViewPageKey)||i}if(this.examineAndApproveState===u.MY_CUSTOM_Modal){await this.getDataInfo();const{node:e,btnList:n,taskId:r,processDefId:i,initiatorNode:o}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),s=n||[];this.withdrawByNode(o),this.transformByNode(e),this.processId=i;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=I(`sys.process.paasBpmnButtonEvent.${e.type}`);this.buttonConfig[e.type]={showModel:!1,title:I("sys.process.element.approval")+t,success:t+I("sys.success")+"!",show:e.enable,alias:e.alias,signature:!!e.signature,opinion:{},user:{}}})}transformByNode(e){if(e)try{const{opinionConfig:t,buttonConfig:r,fieldConfig:i}=e,o=JSON.parse(r||"[]"),s=JSON.parse(t||'{"enabled":false,"opinionType":[]}');o.forEach(e=>{const t=I(`sys.process.paasBpmnButtonEvent.${e.type}`);var r,i;this.buttonConfig[e.type]={showModel:![n.Resubmit,n.Withdraw,n.End].includes(e.type),title:I("sys.process.element.approval")+t,success:t+I("sys.success")+"!",show:e.enable,alias:e.alias,signature:!!e.signature,opinion:{show:s.enabled,required:(r=s.opinionType,i=e.type,!!r.includes(h.Required)||!r.includes(h.Optional)&&(r.includes(h.ApproveRequired)||r.includes(h.ApproveRequired)?i===n.Approve:r.includes(h.CountersignRequired)?i===n.Countersign:r.includes(h.ReassignRequired)?i===n.Reassign:r.includes(h.RejectRequired)?i===n.Reject:r.includes(h.RefuseRequired)?i===n.Refuse:void 0))},user:{show:[n.Reassign,n.Countersign].includes(e.type),multiple:n.Countersign===e.type,label:I(`sys.process.user.${e.type}`)}}}),this.fieldConfig=JSON.parse(i+"")}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 qr.disabled:e.props.disabled=!0,e.props.readonly=!1;break;case qr.editable:e.props.disabled=!1,e.props.readonly=!1;break;case qr.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===qr.hidden&&(e.props.hidden=!0)}}};var qr=/* @__PURE__ */function(e){return e.hidden="hidden",e.readonly="readonly",e.disabled="disabled",e.editable="editable",e}({});function zr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jr(e,t,n){zr(e,t),t.set(e,n)}function Qr(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 Xr(e,t,n){return e.set(Qr(e,t),n),n}function Zr(e,t){return e.get(Qr(e,t))}var ei=/* @__PURE__ */new WeakMap,ti=/* @__PURE__ */new WeakMap,ni=/* @__PURE__ */new WeakSet,ri=class{constructor({js:e,css:t,pageKey:n,ContextVm:r}){var i;zr(this,i=ni),i.add(this),Te(this,"context",void 0),Te(this,"searchVNodes",void 0),Te(this,"cssData",void 0),Te(this,"pageKey",void 0),Te(this,"exports",void 0),Jr(this,ei,void 0),Jr(this,ti,void 0),Te(this,"ProcessAppRoved",void 0),Te(this,"pageLayoutMode",void 0),this.cssData=Qr(ni,this,ii).call(this,t),this.searchVNodes={},this.exports={},Xr(ti,this,{}),Xr(ei,this,{}),this.context=new r({$ref:this.getComponent.bind(this),$asyncRef:this.getSyncComponent.bind(this)}),Qr(ni,this,oi).call(this,e),Hr.setContextByKey(this.context,n),this.pageKey=n}async runProcessBySaskId({taskId:e,processInstanceId:t,examineAndApproveState:n,refFormId:r}){this.ProcessAppRoved=new Kr({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 i;if(r){if(Array.isArray(r))i=await async function(e,t,n){const r=e.map(ci.bind(t,n));await Promise.all(r)}(r,this.context,n);else{const e=this.exports[r.name];if(!e)throw`函数${r.name}不存在`;i=await e(...n,oe(r.extraParams))}return i}}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&&(Zr(ti,this)[e]=t,Qr(ni,this,ai).call(this,e,t))}destroyNode(e){delete Zr(ti,this)[e],delete Zr(ei,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=Zr(ti,this)[e];if(t)return new li(e,t);console.error(e+"组件不存在或者未初始化")}getSyncComponent(e){if(!e)return Promise.reject("标识不能为空");const t=Zr(ti,this)[e];return t?Promise.resolve(new li(e,t)):new Promise((t,n)=>{const r=setTimeout(()=>{n(e+"不存在或者被隐藏")},3e4);Qr(ni,this,si).call(this,e,n=>{clearTimeout(r),t(new li(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:i,button:o}){const{taskId:s,processInstanceId:a}=this.ProcessAppRoved,u={procInstId:a,data:e,opinion:t,button:o,countersignUserIds:i,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(I("sys.process.processInstanceMismatch")):void 0:Promise.reject(I("sys.process.pleaseInitiateTheProcessFirst"))}};function ii(e,t={}){if(!e)return;const{css:n,load:r,unload:i}=function(e,t={}){const n=ie(!1),{document:r=$n,immediate:i=!0,manual:o=!1,id:s="vueuse_styletag_"+ ++Wn}=t,a=ie(e);let u=()=>{};const l=()=>{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=le(a,t=>{e.textContent=t},{immediate:!0}),n.value=!0)},c=()=>{r&&n.value&&(u(),r.head.removeChild(r.getElementById(s)),n.value=!1)};var d;return i&&!o&&Yn(l),o||(d=c,U()&&J(d,void 0)),{id:s,css:a,unload:c,load:l,isLoaded:te(n)}}(e,t);return{css:n,load:r,unload:i}}function oi(e){if(e)try{new Function("exports","CTX",e)(this.exports,this.context)}catch(t){console.error(t,"createFunction")}}function si(e,t){const n=Zr(ti,this)[e];n?t(e,n):Zr(ei,this)[e]?Zr(ei,this)[e].push(t):Zr(ei,this)[e]=[t]}function ai(e,t){Zr(ei,this)[e]&&Zr(ei,this)[e].forEach(e=>{e(t)})}var ui=class{constructor({$ref:e,$asyncRef:t}){Te(this,"$ref",void 0),Te(this,"$asyncRef",void 0),Te(this,"$getModal",void 0),Te(this,"$closeModal",void 0),Te(this,"$customBizService",Lr),Te(this,"gctWidgets",{}),Te(this,"$utility",{_:S,cloneDeep:N,differenceBy:C,dayjs:M,BigNumber:P,plus:(e,t)=>new P(e).plus(new P(t)).toNumber(),minus:(e,t)=>new P(e).minus(new P(t)).toNumber(),multipliedBy:(e,t)=>new P(e).multipliedBy(new P(t)).toNumber(),div:(e,t)=>new P(e).div(new P(t)).toNumber(),transformSourceData:or,transformData:sr}),Te(this,"$httpBizService",jr),Te(this,"$request",Ur),Te(this,"$loading",Wr),this.$asyncRef=t,this.$ref=e}$getPremission(e){return Hr.getPremission(e)}$setPremission(e,t){Hr.setPremission(e,t)}$getAppGlobalVar(e){return Hr.getGlobalVar(e)}$setAppGlobalVar(e,t){Hr.setGlobalVar(e,t)}$getPageGlobalVar(e){return Hr.getPageGlobalVar(e)}$setPageGlobalVar(e,t){Hr.setPageGlobalVar(e,t)}$getPageVar(e){return Hr.getPageVar(e)}$setPageVar(e,t){Hr.setPageVar(e,t)}$getCtxById(e){return Hr.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 i in t)r[i]=t[i]}$getPropsByKey(e,t=[],n){const r=this.gctWidgets[e];if(!r)return{};const i=n||!r.props?r:r.props;return"string"==typeof t&&(t=[t]),t.reduce((e,t)=>(e[t]=i[t],e),{})}},li=class{constructor(e,t){Te(this,"modelKey",void 0),Te(this,"getValue",void 0),Te(this,"setValue",void 0),Te(this,"submit",void 0),Te(this,"reload",void 0),Te(this,"key",void 0),this.key=e;const n=t.elRef;Object.keys(n).forEach(e=>{this[e]=n[e]})}};async function ci(e,t){const{name:n,refId:r,scopeId:i,modalTitle:o}=t,s=(null==o?void 0:o.split("."))||[];let a;if(s.length>1){var u;const e=[];di(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 l;a=null===(l=this.gctWidgets)||void 0===l?void 0:l[s[0]]}var c;n===p.OPEN_MODAL&&await this.$getModal(r).open({title:null==a||null===(c=a.props)||void 0===c?void 0:c.title}),n===p.CLOSE_MODAL&&(r?await this.$getModal(r).close():await this.$closeModal()),n===p.REFRESH_TABLE&&await(await this.$getCtxById(i).$asyncRef(r)).reload(e?e[0]:null)}function di(e,t){const n=t.children||[];for(const i of n)if(i.type&&i.type==d.CustomButton)e.push(i);else{var r;(null===(r=i.children)||void 0===r?void 0:r.length)&&di(e,i)}}function fi({expression:e="",rowData:t=null},n){if(!e||"true"===e)return void n(!0);const r=Kn(e),i=r.reduce((e,t)=>{const n=t.split(".");return e[t]={formKey:n[0],itemKey:n[1]},e},{}),o=F(()=>r.reduce((e,n)=>{const r=n.split("."),i=r[0]+"",o=r[1];if(o){var s;const n=(t?t[o]:null===(s=Pr.value[i])||void 0===s?void 0:s[o])??"";e[i]?e[i][o]=n:e[i]={[o]:n}}else if(i.startsWith("$VAR_")||i.startsWith("$IVAR_")){var a;e[i]=(null===(a=xr.value[i])||void 0===a?void 0:a.value)??""}else if(i.startsWith("$PAGERVAR_")||i.startsWith("$IPAGERVAR_")){var u;e[i]=(null===(u=Yr.value[i])||void 0===u?void 0:u.value)??""}return e},{}));function s(t){const r={};Object.keys(i).forEach(e=>{var n;const{formKey:o,itemKey:s}=i[e];r[e]=s?null===(n=t[o])||void 0===n?void 0:n[s]:t[o]}),qn(e,r).then(n)}t&&s(o.value),xn(o,()=>{s(o.value)},{debounce:200,immediate:!t})}async function pi({expression:e="",rowData:t=null}){if(!e||"true"===e)return!0;const n=Kn(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:i,itemKey:o}=n[e];let s="";var a;if(i.startsWith("$VAR_"))s=(null===(a=xr.value[i])||void 0===a?void 0:a.value)??"";else if(i.startsWith("$PAGERVAR_")){var u;s=(null===(u=Yr.value[i])||void 0===u?void 0:u.value)??""}else if(o){var l;s=(t?t[o]:null===(l=Pr.value[i])||void 0===l?void 0:l[o])??""}else s=(t?t[i]:Pr.value[i])??"";r[e]=s}),qn(e,r)}function hi(e,t){return!!Br(t)&&(e.displayType===s.CONFIG?se(()=>!e.hidden):function(e){const t=ne(!1);return mi(e,e=>{t.value=!!e}),t}(e))}function mi({displayRule:e,tableForm:t},n){if(e){const r=Kn(e),i=r.reduce((e,t)=>{const n=t.split(".");return e[t]={formKey:n[0],itemKey:n[1]},e},{}),o=se(()=>r.reduce((e,n)=>{var r;const i=n.split("."),o=i[0]+"",s=i[1]+"",a=null===(r={...t,...Pr.value}[o])||void 0===r?void 0:r[s];return e[o]?e[o][s]=a:e[o]={[s]:a},e},{}));xn(o,()=>{!function(e,t,n,r){const i={};Object.keys(t).forEach(n=>{var r;const{formKey:o,itemKey:s}=t[n];i[n]=null==e||null===(r=e[o])||void 0===r?void 0:r[s]}),qn(n,i).then(r)}(o.value,i,e,e=>{n(e)})},{immediate:!0,debounce:300})}else n(!0)}function gi(e,t){const n=ee({});return se(()=>e?e.filter(e=>{const{displayRule:r,hidden:i,displayType:o}=e.props||e;return Br(e.id)?o===s.CONFIG?n[e.id]=!i:mi({displayRule:r,tableForm:t},t=>{n[e.id]=t}):n[e.id]=!1,n[e.id]}):[])}function yi(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 i=vi(r,t),o=vi(n,t);return se(()=>(null==i?void 0:i.value)||(null==o?void 0:o.value))}function vi(e,t){const n=ee({});if(e)return se(()=>e.find(e=>{const{displayRule:r,hidden:i,displayType:o}=e.props||e;return o===s.CONFIG?n[e.id]=!i:mi({displayRule:r,tableForm:t},t=>{n[e.id]=t}),n[e.id]}))}function bi(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?hi(e.props,e.id):wi(e)}function wi(e,t){var n;if(!e.id)return!1;if(!Br(e.id))return e.props.hidden=!0,!1;const r=G("useProcessFieldEvent",void 0);if(r)return r.useFieldToShow(e),!e.props.hidden;const{displayType:i,displayRule:a}=e.props||{},{value:u,expression:l}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[o.HIDDEN]||{};return u&&l?(e.props.hidden=!0,fi({expression:l,rowData:t},t=>{e.props.hidden=!!t})):u?e.props.hidden=!0:i===s.RULE&&a&&(e.props.hidden=!0,fi({expression:a,rowData:t},t=>{e.props.hidden=!t})),se(()=>!e.props.hidden)}async function Ei(e,t){var n;if(!e.id)return!1;if(!Br(e.id))return e.props.hidden=!0,!1;const r=G("useProcessFieldEvent",void 0);if(r)return r.useFieldToShow(e),!e.props.hidden;const{displayType:i,displayRule:a}=e.props||{},{value:u,expression:l}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[o.HIDDEN]||{};return u&&l?(e.props.hidden=!0,e.props.hidden=!!(await pi({expression:l,rowData:t}))):u?e.props.hidden=!0:i===s.RULE&&a&&(e.props.hidden=!0,e.props.hidden=!!(await pi({expression:a,rowData:t}))),!e.props.hidden}function Di(e,t){return e.forEach(e=>{wi(e,t)}),se(()=>e.filter(e=>!e.props.hidden))}function Oi(e,t){var n;const{value:r,expression:i}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[o.HIDDEN]||{};r&&i&&fi({expression:i},e=>{t(e)}),t(e.props.hidden)}function Ii(e){var t;const n=(null===(t=e.props.componentDependency)||void 0===t?void 0:t.configDependency)||{},{value:r,expression:i}=n[o.HIDDEN]||{};r&&i&&fi({expression:i},t=>{e.props.hidden=!!t});const{value:s,expression:a}=n[o.REQUIRED]||{};s&&a&&fi({expression:a},t=>{e.props.required=!!t})}function Ti(t,n={},r=!1){var i,s,a;const{readonly:u,field:l,isFieldModel:c,bindFieldLink:d,refOriginField:f,refOriginModelKey:p,refOriginFieldType:h}=t.props,m=(null===(i=t.props.componentDependency)||void 0===i?void 0:i.configDependency)||{},g=G("formReadonly",void 0),y=G("useProcessFieldEvent",void 0);if(y&&y.useFieldWidget(t),!y&&t.formItem&&void 0!==(null==g?void 0:g.value)&&(t.props.readonly=(null==g?void 0:g.value)||t.props.readonly),!y&&!(null==g?void 0:g.value)){var v,b,w,E,D,O,I,T;const e=null===(v=m[o.READONLY])||void 0===v?void 0:v.expression,i=null===(b=m[o.READONLY])||void 0===b?void 0:b.fieldValue,s=null===(w=m[o.READONLY])||void 0===w?void 0:w.value;!i&&s&&e&&fi({expression:e,rowData:r?n:null},e=>{t.props.readonly=!!e});const a=null===(E=m[o.REQUIRED])||void 0===E?void 0:E.expression,l=null===(D=m[o.REQUIRED])||void 0===D?void 0:D.value;!(null===(O=m[o.REQUIRED])||void 0===O?void 0:O.fieldValue)&&l&&a&&fi({expression:a,rowData:r?n:null},e=>{t.props.required=!!e,t.props.readonly=!e&&u});const c=null===(I=m[o.DISABLED])||void 0===I?void 0:I.expression;(null===(T=m[o.DISABLED])||void 0===T?void 0:T.value)&&c&&fi({expression:c,rowData:r?n:null},e=>{t.props.disabled=!!e,t.props.readonly=!e&&u})}const M=null===(s=m[o.ASSIGNMENT])||void 0===s?void 0:s.expression,S=null===(a=m[o.ASSIGNMENT])||void 0===a?void 0:a.strategy;M&&fi({expression:M,rowData:r?n:null},e=>{n[l]=e});const N=c?null==d?void 0:d.join("."):l;n._OPCT||(n._OPCT={_DICT:{}});const C=F(()=>c?n._OPCT:n),_=F({get:()=>N?C.value[N]:"",set(t){M&&S===e.alwaysCover||(C.value[N]=t)}});if(c&&f){const e=se(()=>n[d[0]]),t=d.length>2?[d[1]+".*"]:void 0;xn(e,async()=>{try{const n=await hr({ids:e.value,refOriginField:d[0],refOriginFieldType:h,model:p,foreignFields:t});C.value[N]=n._OPCT[N],C.value._DICT||(C.value._DICT={}),C.value._DICT[N]=n._OPCT._DICT[N]}catch{for(const e in C.value)e.startsWith(N)&&(C.value[e]=void 0)}},{debounce:100,immediate:!0})}return{value:_,formRowData:C,fieldKey:N}}function Mi(e){var t,n,r,i;const{readonly:s}=e.props,a=(null===(t=e.props.componentDependency)||void 0===t?void 0:t.configDependency)||{},u=null===(n=a[o.REQUIRED])||void 0===n?void 0:n.expression,l=null===(r=a[o.REQUIRED])||void 0===r?void 0:r.value;!(null===(i=a[o.REQUIRED])||void 0===i?void 0:i.fieldValue)&&l&&u&&fi({expression:u},t=>{e.props.required=!!t,e.props.readonly=!t&&s})}var Si=class{constructor(){Te(this,"context",{})}},Ni=class{constructor(){Te(this,"isDestroy",!1)}},Ci=class{constructor(e){Te(this,"state",new Ni),this.model=e}mounted(){}destroy(){}},_i=class extends Ci{},Ri=class extends Ci{},Ai=class{constructor(){Te(this,"state",new Si),Te(this,"prefix",""),Te(this,"preview",!1),Te(this,"item",/* @__PURE__ */new Map),Te(this,"nodes",[]),Te(this,"tree",[])}setTree(e){this.tree=e}setNodes(e){this.reset(),this.nodes=e,this.nodes.forEach(e=>{const t=He.get(e.type,this.prefix);if(t){if(t.createController)return void this.item.set(e.id,t.createController(e));if(t.mode===ce.CONTAINER)return void this.item.set(e.id,new _i(e));if(t.mode===ce.ITEM)return void this.item.set(e.id,new Ri(e))}this.item.set(e.id,new Ci(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 Yi(e){let t=G($e.DESIGN_RENDER);return t||(t=e?e():new Ai,t.state=ee(t.state),Z($e.DESIGN_RENDER,t),z(()=>{t.mounted()}),Q(()=>{t.unmounted()})),t}function xi(){_gct.register.render?console.warn("渲染注册已存在,可能存在重复注册问题,请检查是否有重复引入渲染包的情况"):_gct.register.render=new Me}var Pi=new URL("./index.min.css",import.meta.url);b.load(Pi.href);export{ui as Context,$e as ControllerType,Ne as DESIGN_DATA_KEY_TAG,Se as DESIGN_TYPE,xe as DateFormat,_e as DateRangeMap,Pe as DatepickerRanges,Ce as DesignItemAttribute,ke as DesignRenderViewPrefix,ri as Events,rr as FieldSchema,li as GctComponent,Hr as Globals,Tr as HandwritingPad,Rr as PageTypeEnum,He as RenderNodeRegister,Fe as RenderNodeType,er as RenderPluginPgkUtil,Me as RenderRegister,ar as addDataByForm,dr as cacheAdapter,qn as calculate,pi as calculateDepResult,yr as defaultValMap,wi as dependencyToShow,Ei as dependencyToShowSync,Pr as formMap,Ye as getDefaultDate,Re as getDisabledDate,Ae as getMobileDateRange,Fr as getPageTitle,Br as getPremission,hr as getRefInfoId,xr as globalVarCaches,Kn as identify,ir as initFieldWidgetRuntime,fi as insetDep,xi as onInit,kr as pageDataforJson,Yr as pageGlobaVariables,nr as schemaToStyle,ur as setDataByForm,$r as setFormData,Ii as tableWidgetByDept,Oi as tableWidgetToShow,lr as transSelectData,sr as transformData,cr as transformDataToDict,Zn as transformPropsField,or as transformSourceData,Ti as useDependency,Mi as useDependencyByRequired,bi as useDependencyToShow,Di as useDependencyToShowList,Yi as useDesignRenderController,yi as useDisplayRuleColumnByStyles,gi as useDisplayRuleOptions,Nr as useGctSelect,gr as useGetBodyBySearch,tr as useStyle,hi as useVisibileByRuleHook};
|
|
1
|
+
import{ASSIGNMENTSTRATEGY_ENUM as e,BizServiceEnum as t,ButtonTypeEnum as n,DateRangeEnums as r,DefaultDateTypeConst as i,Dependency_ENUM as o,DisplayType as s,EntityModelCategoryEnum as a,ExamineAndApproveStateEnum as u,FIELD_TYPE as l,FieldSysVarDefaultValueEnum as c,FormComponents as d,GLOBAL_VAR_TYPE as f,INNER_EVENT as p,OpinionTypeEnum as h,PluginModeEnum as m,PluginPgkUtil as g,SEARCH_SERVICE as y,SYSTEM_VAR_PREFIX as v,cssLoader as b,functionMap as w,innerVarIds as E,isMultipleOperator as D,operator2FuncMap as O,t as I,usePermissionStore as T}from"@gct-paas/core";import M from"dayjs";import*as S from"lodash-es";import{cloneDeep as N,differenceBy as C,get as _,isArray as R,isEqual as A,isNull as x,isUndefined as Y,merge as P,pick as $}from"lodash-es";import k from"bignumber.js";import*as F from"esprima-next";import H from"estraverse";import{computed as V,createElementBlock as B,createElementVNode as L,customRef as j,defineComponent as U,getCurrentInstance as G,getCurrentScope as K,inject as W,nextTick as q,onActivated as z,onBeforeUnmount as J,onMounted as Q,onScopeDispose as X,onUnmounted as Z,openBlock as ee,provide as te,reactive as ne,readonly as re,ref as ie,shallowReactive as oe,shallowRef as se,toRaw as ae,toRef as ue,toValue as le,unref as ce,watch as de}from"vue";import{DesignNodeMode as fe,extractFontStyle as pe,generateWrapperStyle as he,propsToStyle as me}from"@gct-paas/schema";import ge from"qs";var ye=Object.create,ve=Object.defineProperty,be=Object.getOwnPropertyDescriptor,we=Object.getOwnPropertyNames,Ee=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,Oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ie=(e,t)=>{let n={};for(var r in e)ve(n,r,{get:e[r],enumerable:!0});return t||ve(n,Symbol.toStringTag,{value:"Module"}),n},Te=(e,t,n)=>(n=null!=e?ye(Ee(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=we(t),s=0,a=o.length;s<a;s++)i=o[s],De.call(e,i)||void 0===i||ve(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=be(t,i))||r.enumerable});return e})(!t&&e&&e.__esModule?n:ve(n,"default",{value:e,enumerable:!0}),e));function Me(e){return Me="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},Me(e)}function Se(e,t,n){return(t=function(e){var t=function(e){if("object"!=Me(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Me(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ne=class{constructor(){Se(this,"map",/* @__PURE__ */new Map)}register(e,t){this.map.set(e,t)}unregister(e){this.map.delete(e)}get(e){return this.map.get(e)}keys(){return Array.from(this.map.keys())}},Ce="view-design",_e="id",Re=/* @__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}({}),Ae={WEEK_NOW:e=>{const t=M().startOf("week").add(1,"day"),n=M().endOf("week").add(1,"day"),r=t.valueOf(),i=n.valueOf();return{disabled:e<r||e>i,minDate:t,maxDate:n}},MONTH_NOW:e=>{const t=M().startOf("month"),n=M().endOf("month"),r=t.valueOf(),i=n.valueOf();return{disabled:e<r||e>i,minDate:t,maxDate:n}},QUARTER_NOW:e=>{const t=M().startOf("quarter"),n=M().endOf("quarter"),r=t.valueOf(),i=n.valueOf();return{disabled:e<r||e>i,minDate:t,maxDate:n}},YEAR_NOW:e=>{const t=M().startOf("year"),n=M().endOf("year"),r=t.valueOf(),i=n.valueOf();return{disabled:e<r||e>i,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(),i=n.valueOf();return{disabled:e<r||e>i,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(),i=n.valueOf();return{disabled:e<r||e>i,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(),i=n.valueOf();return{disabled:e<r||e>i,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(),i=n.valueOf();return{disabled:e<r||e>i,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}}},xe=(e,t)=>{const n=M(e).valueOf(),r=Ae[t];if(r){const{disabled:e}=r(n);return e}return!1},Ye=e=>{const t=Ae[e];if(t){const{minDate:e,maxDate:n}=t(0);return Object.assign({},e&&{minDate:new Date(e)},n&&{maxDate:new Date(n)})}return{}},Pe=(e,t)=>{let n;switch(e){case c.SYS_DATE:n=M().format(t??"YYYY-MM-DD");break;case c.SYS_DATE_TIME:n=M().format(t??"YYYY-MM-DD HH:mm:ss");break;case c.SYS_TIME:n=M().format(t??"HH:mm:ss")}return n},$e={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"]}},ke={[r.WEEK_NOW]:""},Fe=/* @__PURE__ */function(e){return e.DESIGN_RENDER="design-render",e}({}),He=/* @__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}({}),Ve=/* @__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}({}),Be=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,He.CUSTOM_HOME)}static registerDesignEditorNode(e,t){this.register(e,t,He.DESIGN_EDITOR)}static getCustomHome(e){return this.get(e,He.CUSTOM_HOME)}static getDesignEditorNode(e){return this.get(e,He.DESIGN_EDITOR)}};Se(Be,"map",/* @__PURE__ */new Map),Se(Be,"cache",/* @__PURE__ */new Map);var Le=/* @__PURE__ */Oe((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,i,o){var s=i.prototype;o.utc=function(e){return new i({date:e,utc:!0,args:arguments})},s.utc=function(t){var n=o(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},s.local=function(){return o(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 l=s.utcOffset;s.utcOffset=function(r,i){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?l.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 i=(""+r[0]).match(n)||["-",0,0],o=i[0],s=60*+i[1]+ +i[2];return 0===s?0:"+"===o?s:-s}(r),null===r))return this;var s=Math.abs(r)<=16?60*r:r;if(0===s)return this.utc(i);var a=this.clone();if(i)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 c=s.format;s.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.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?o(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(),i=o(e).local();return f.call(r,i,t,n)}}})}),je=/* @__PURE__ */Oe((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,i){var o,s=function(e,n,r){void 0===r&&(r={});var i=new Date(e);return function(e,n){void 0===n&&(n={});var r=n.timeZoneName||"short",i=e+"|"+r,o=t[i];return o||(o=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[i]=o),o}(n,r).formatToParts(i)},a=function(t,n){for(var r=s(t,n),o=[],a=0;a<r.length;a+=1){var u=r[a],l=u.type,c=u.value,d=e[l];d>=0&&(o[d]=parseInt(c,10))}var f=o[3],p=24===f?0:f,h=o[0]+"-"+o[1]+"-"+o[2]+" "+p+":"+o[4]+":"+o[5]+":000",m=+t;return(i.utc(h).valueOf()-(m-=m%1e3))/6e4},u=r.prototype;u.tz=function(e,t){void 0===e&&(e=o);var n,r=this.utcOffset(),s=this.toDate(),a=s.toLocaleString("en-US",{timeZone:e}),u=Math.round((s-new Date(a))/1e3/60),l=15*-Math.round(s.getTimezoneOffset()/15)-u;if(Number(l)){if(n=i(a,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(l,!0),t){var c=n.utcOffset();n=n.add(r-c,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},u.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),n=s(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var l=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var n=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(n,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,n){var r=n&&t,s=n||t||o,u=a(+i(),s);if("string"!=typeof e)return i(e).tz(s);var l=function(e,t,n){var r=e-60*t*1e3,i=a(r,n);if(t===i)return[r,t];var o=a(r-=60*(i-t)*1e3,n);return i===o?[r,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}(i.utc(e,r).valueOf(),u,s),c=l[0],d=l[1],f=i(c).utcOffset(d);return f.$x.$timezone=s,f},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){o=e}}})}),Ue=/* @__PURE__ */Oe((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 i=r.prototype;i.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var o=i.add;i.add=function(n,r){return n=Number(n),this.$utils().p(r)===t?this.add(3*n,e):o.bind(this)(n,r)};var s=i.startOf;i.startOf=function(n,r){var i=this.$utils(),o=!!i.u(r)||r;if(i.p(n)===t){var a=this.quarter()-1;return o?this.month(3*a).startOf(e).startOf("day"):this.month(3*a+2).endOf(e).endOf("day")}return s.bind(this)(n,r)}}})}),Ge=/* @__PURE__ */Oe((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]}}})}),Ke=/* @__PURE__ */Oe((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 i=function(t){return t.add(4-t.isoWeekday(),e)},o=n.prototype;o.isoWeekYear=function(){return i(this).year()},o.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,o,s,a=i(this),u=(n=this.isoWeekYear(),s=4-(o=(this.$u?r.utc:r)().year(n).startOf("year")).isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return a.diff(u,"week")+1},o.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var s=o.startOf;o.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)}}})}),We=/* @__PURE__ */Ie({ABS:()=>Ht,ADD:()=>St,AND:()=>rt,AVERAGE:()=>Ft,CONCAT:()=>ft,COUNT:()=>bn,DATE2TIMESTAMP:()=>zt,DATEFORMAT:()=>Jt,DAY:()=>tn,DIVISION:()=>_t,EQ:()=>ot,FINDSTR:()=>Dt,FIXED:()=>Rt,GE:()=>lt,GET:()=>Ut,GT:()=>ct,HEADPUSH:()=>Wt,HOUR:()=>nn,IF:()=>Ze,ISDATERANGE:()=>pn,ISEMPTY:()=>et,ISNULL:()=>tt,ISTIMERANGE:()=>hn,ISUNDEFINED:()=>nt,LARGE:()=>Pt,LASTMONTHRANGE:()=>un,LASTQUARTER:()=>fn,LASTWEEKRANGE:()=>sn,LASTYEARRANGE:()=>cn,LE:()=>at,LEN:()=>dt,LOWER:()=>gt,LT:()=>ut,LTRIM:()=>vt,MAX:()=>Yt,MIN:()=>$t,MINUTE:()=>rn,MOD:()=>Vt,MONTH:()=>en,MONTHRANGE:()=>an,MULTIPLICATION:()=>Ct,NE:()=>st,NOW:()=>Qt,OR:()=>it,PARSENUMBER:()=>It,POWER:()=>Lt,PUSH:()=>Kt,PUT:()=>Gt,QUARTER:()=>dn,REDUCE:()=>Nt,REPEAT:()=>wt,REPLACE:()=>Et,ROUND:()=>At,ROUNDUP:()=>xt,RTRIM:()=>bt,SEARCHSTR:()=>Ot,SEQMAP:()=>yn,SMALL:()=>kt,SPLIT:()=>Tt,SQRT:()=>jt,STDEV:()=>wn,SUBSTR:()=>ht,SUBSTRING:()=>pt,SUM:()=>Mt,SUMSQ:()=>vn,TIMESTAMP2DATE:()=>qt,TODAY:()=>Xt,TRIM:()=>yt,TUPLE:()=>gn,UPPER:()=>mt,WEEKRANGE:()=>on,YEAR:()=>Zt,YEARRANGE:()=>ln}),qe=/* @__PURE__ */Te(Le(),1),ze=/* @__PURE__ */Te(je(),1),Je=/* @__PURE__ */Te(Ue(),1),Qe=/* @__PURE__ */Te(Ge(),1),Xe=/* @__PURE__ */Te(Ke(),1);function Ze(e,t,n){return e?t:n}function et(e){return null==e||""===e||0===e}function tt(e){return x(e)}function nt(e){return Y(e)}function rt(...e){return(()=>{for(const t of e)if(!t)return!1;return!0})()}function it(...e){return e.some(e=>e)}function ot(e,t){return A(e,t)}function st(e,t){return e!==t}function at(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<=t}function ut(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<t}function lt(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>=t}function ct(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>t}function dt(e){return(null==e?void 0:e.length)||0}function ft(...e){return e.join("")}function pt(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 ht(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 mt(e=""){return e.toUpperCase()}function gt(e=""){return e.toLowerCase()}function yt(e=""){return e.trim()}function vt(e=""){return e.replace(/^\s\s*/,"")}function bt(e=""){return e.replace(/\s\s*$/,"")}function wt(e="",t=""){return(null===(n=e.match(new RegExp(t,"g")))||void 0===n?void 0:n.length)||null;var n}function Et(e="",t="",n=""){return e.replace(new RegExp(t,"g"),n)}function Dt(e="",t=""){return e.includes(t)}function Ot(e="",t=""){return(null===(n=e.match(new RegExp(t,"g")))||void 0===n?void 0:n.length)||0;var n}function It(e=""){return(()=>{const t=parseFloat(e);return isNaN(t)?null:t})()}function Tt(e="",t=""){return e.split(t)}function Mt(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?t.reduce(En,0):""}function St(...e){return e.flat().reduce(En,0)}function Nt(e,...t){return t.reduce(Dn,e)}function Ct(e,...t){const n=t.flat().filter(e=>""!==e&&null!=e);return n.length?n.reduce(On,e):""}function _t(e,...t){return t.reduce(In,e)}function Rt(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 i=r.split("");if(i.length>t)i=i.slice(0,t);else{const e=i.length;for(let n=0;n<t-e;n++)i.push("0")}return`${n}.${i.join("")}`})()}function At(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 i=r>0?(+(Math.round(Number(r+`e${n}`))+`e-${n}`)).toFixed(n):-(+(Math.round(Number(-r+`e${n}`))+`e-${n}`)).toFixed(n);return parseFloat(i+"")})()}function xt(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 k(e).decimalPlaces(t,k.ROUND_UP).toNumber()}function Yt(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.max.apply(null,t):""}function Pt(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 $t(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.min.apply(null,t):""}function kt(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 Ft(...e){const t=e.flat().filter(e=>""!==e&&null!=e),n=t.length;if(!n)return"";let r=new k(0);for(const i of t)r=r.plus(i);return r.dividedBy(n).toNumber()}function Ht(e){return Math.abs.call(null,e)}function Vt(e,t){return(()=>{if(0===e)throw new Error("The second value should not be zero.");const n=new k(e).mod(t).toNumber();return isNaN(n)?"":n})()}function Bt(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 Lt(e,t){return(()=>{const n=Bt(e),r=Bt(t);return null===n||null===r?NaN:Math.abs(r)>1e9?r>0?1/0:0:Math.pow(n,r)})()}function jt(e){return(()=>{const t=Bt(e);return null===t?NaN:Math.sqrt(t)})()}function Ut(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 Gt(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 Kt(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 Wt(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 qt(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 zt(e){if(e)return M(e).unix()}function Jt(e,t){if(e)return M(e).format(t)}function Qt(){return M().format("YYYY-MM-DD HH:MM:ss")}function Xt(){return M().format("YYYY-MM-DD")}function Zt(e){return M(e).year()}function en(e){return M(e).month()}function tn(e){return M(e).day()}function nn(e){return M(e).hour()}function rn(e){return M(e).minute()}function on(){return[mn(M().startOf("week").toDate()),mn(M().endOf("week").toDate())]}function sn(){return[mn(M().subtract(1,"week").startOf("week").toDate()),mn(M().subtract(1,"week").endOf("week").toDate())]}function an(){return[mn(M().startOf("month").toDate()),mn(M().endOf("month").toDate())]}function un(){return[mn(M().subtract(1,"month").startOf("month").toDate()),mn(M().subtract(1,"month").endOf("month").toDate())]}function ln(){return[mn(M().startOf("year").toDate()),mn(M().endOf("year").toDate())]}function cn(){return[mn(M().subtract(1,"year").startOf("year").toDate()),mn(M().subtract(1,"year").endOf("year").toDate())]}function dn(){return(()=>{const e=Math.floor((M().month()+3)/3);return[mn(M().quarter(e).startOf("quarter").toDate()),mn(M().quarter(e).endOf("quarter").toDate())]})()}function fn(){return(()=>{const e=Math.floor((M().month()+3)/3);return[mn(M().quarter(e-1).startOf("quarter").toDate()),mn(M().quarter(e-1).endOf("quarter").toDate())]})()}function pn(e,t){return(()=>{const[n,r]=t;return e>=n&&e<=r})()}function hn(e,t){return(()=>{const[n,r]=t,i=M(e,"HH:mm");if(n>r){const e=M(n,"HH:mm"),t=M(r,"HH:mm").add(1,"day");return i>=e||i<=t}return i>=M(n,"HH:mm")&&i<=M(r,"HH:mm")})()}function mn(e){return M(e).tz("America/Chicago").format("YYYY-MM-DD HH:mm:ss.SSSSSSSSS ZZ")}function gn(...e){return[...e]}function yn(...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 vn(...e){return 0===(e=e.flat().filter(e=>""!==e&&null!=e)).length?"":e.map(e=>{const t=On(e,e);return""!==t?t:new k(0).toNumber()}).reduce((e,t)=>En(e,t)||k(0).toNumber(),new k(0).toNumber())}function bn(e){return Array.isArray(e)?e.length:""}function wn(...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 En(e,t){const n=new k(e).plus(new k(t)).toNumber();return isNaN(n)?"":n}function Dn(e,t){const n=new k(e).minus(new k(t)).toNumber();return isNaN(n)?"":n}function On(e,t){const n=new k(e).multipliedBy(new k(t)).toNumber();return isNaN(n)?"":n}function In(e,t){const n=new k(e).div(new k(t)).toNumber();return isNaN(n)?"":n}M.extend(qe.default),M.extend(ze.default),M.extend(Je.default),M.extend(Qe.default),M.extend(Xe.default);var Tn="undefined"!=typeof window&&"undefined"!=typeof document,Mn=("undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),Object.prototype.toString),Sn=()=>{},Nn=e=>e();function Cn(e,t={}){let n,r,i=Sn;const o=e=>{clearTimeout(e),i(),i=Sn};let s;return a=>{const u=le(e),l=le(t.maxWait);return n&&o(n),u<=0||void 0!==l&&l<=0?(r&&(o(r),r=void 0),Promise.resolve(a())):new Promise((e,c)=>{i=t.rejectOnCancel?c:e,s=a,l&&!r&&(r=setTimeout(()=>{n&&o(n),r=void 0,e(s())},l)),n=setTimeout(()=>{r&&o(r),r=void 0,e(a())},u)})}}function _n(e){return Array.isArray(e)?e:[e]}function Rn(e){const t=Object.create(null);return n=>t[n]||(t[n]=e(n))}var An=/\B([A-Z])/g,xn=(Rn(e=>e.replace(An,"-$1").toLowerCase()),/-(\w)/g);function Yn(e,t,n={}){const{eventFilter:r=Nn,...i}=n;return de(e,(o=r,s=t,function(...e){return new Promise((t,n)=>{Promise.resolve(o(()=>s.apply(this,e),{fn:s,thisArg:this,args:e})).then(t).catch(n)})}),i);var o,s}function Pn(e,t=!0,n){!function(e){return e||G()}(n)?t?e():q(e):Q(e,n)}function $n(e,t,n={}){const{debounce:r=0,maxWait:i,...o}=n;return Yn(e,t,{...o,eventFilter:Cn(r,{maxWait:i})})}Rn(e=>e.replace(xn,(e,t)=>t?t.toUpperCase():""));var kn=Tn?window:void 0,Fn=Tn?window.document:void 0;function Hn(...e){const t=V(()=>{const t=_n(le(e[0])).filter(e=>null!=e);return t.every(e=>"string"!=typeof e)?t:void 0});return n=([e,t,n,r],i,o)=>{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]"===Mn.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))));o(()=>{u.forEach(e=>e())})},r={flush:"post"},de(()=>{var n,r;return[null!==(n=null===(r=t.value)||void 0===r?void 0:r.map(e=>function(e){var t;const n=le(e);return null!==(t=null==n?void 0:n.$el)&&void 0!==t?t:n}(e)))&&void 0!==n?n:[kn].filter(e=>null!=e),_n(le(t.value?e[1]:e[0])),_n(ce(t.value?e[2]:e[1])),le(t.value?e[3]:e[2])]},n,{...r,immediate:!0});var n,r}Tn&&window.navigator,Tn&&window.location;var Vn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Bn="__vueuse_ssr_handlers__",Ln=/* @__PURE__ */jn();function jn(){return Bn in Vn||(Vn[Bn]=Vn[Bn]||{}),Vn[Bn]}var Un={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()}},Gn="vueuse-storage";function Kn(e,t,n,r={}){var i;const{flush:o="pre",deep:s=!0,listenToStorageChanges:a=!0,writeDefaults:u=!0,mergeDefaults:l=!1,shallow:c,window:d=kn,eventFilter:f,onError:p=e=>{console.error(e)},initOnMounted:h}=r,m=(c?se:ie)("function"==typeof t?t():t),g=V(()=>le(e));if(!n)try{n=(Ln.getDefaultStorage||(()=>null==kn?void 0:kn.localStorage))()}catch(T){p(T)}if(!n)return m;const y=le(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!==(i=r.serializer)&&void 0!==i?i:Un[v],{pause:w,resume:E}=function(e,t,n={}){const{eventFilter:r,initialState:i="active",...o}=n,{eventFilter:s,pause:a,resume:u,isActive:l}=function(e=Nn,t={}){const{initialState:n="active"}=t,r=function(...e){if(1!==e.length)return ue(...e);const t=e[0];return"function"==typeof t?re(j(()=>({get:t,set:Sn}))):ie(t)}("active"===n);return{isActive:re(r),pause:function(){r.value=!1},resume:function(){r.value=!0},eventFilter:(...t)=>{r.value&&e(...t)}}}(r,{initialState:i});return{stop:Yn(e,t,{...o,eventFilter:s}),pause:a,resume:u,isActive:l}}(m,e=>function(e){try{const t=n.getItem(g.value);if(null==e)O(t,null),n.removeItem(g.value);else{const r=b.write(e);t!==r&&(n.setItem(g.value,r),O(t,r))}}catch(T){p(T)}}(e),{flush:o,deep:s,eventFilter:f});de(g,()=>I(),{flush:o});let D=!1;function O(e,t){if(d){const r={key:g.value,oldValue:e,newValue:t,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",r):new CustomEvent(Gn,{detail:r}))}}function I(e){if(!e||e.storageArea===n)if(e&&null==e.key)m.value=y;else if(!e||e.key===g.value){w();try{const t=b.write(m.value);void 0!==e&&(null==e?void 0:e.newValue)===t||(m.value=function(e){const t=e?e.newValue:n.getItem(g.value);if(null==t)return u&&null!=y&&n.setItem(g.value,b.write(y)),y;if(!e&&l){const e=b.read(t);return"function"==typeof l?l(e,y):"object"!==v||Array.isArray(e)?e:{...y,...e}}return"string"!=typeof t?t:b.read(t)}(e))}catch(T){p(T)}finally{e?q(E):E()}}}return d&&a&&(n instanceof Storage?Hn(d,"storage",e=>{h&&!D||I(e)},{passive:!0}):Hn(d,Gn,e=>{h&&!D||I(e.detail)})),h?Pn(()=>{D=!0,I()}):I(),m}function Wn(e,t){const n=(null==t?void 0:t.cache)?oe(t.cache):oe(/* @__PURE__ */new Map),r=(...e)=>(null==t?void 0:t.getKey)?t.getKey(...e):JSON.stringify(e),i=(t,...r)=>(n.set(t,e(...r)),n.get(t)),o=(...e)=>{const t=r(...e);return n.has(t)?n.get(t):i(t,...e)};return o.load=(...e)=>i(r(...e),...e),o.delete=(...e)=>{n.delete(r(...e))},o.clear=()=>{n.clear()},o.generateKey=r,o.cache=n,o}var qn=0;Number.POSITIVE_INFINITY,window._METHOD_DEBUG_=We;var zn=Wn(function(e,t=!1){const n=F.parse(e);let r=[];return H.traverse(n,{enter:function(e){if(e.type===F.Syntax.MemberExpression){const t=Qn(e);r.push(t),Object.assign(e,{name:t,type:F.Syntax.Identifier})}else e.type===F.Syntax.Identifier&&r.push(e.name);r=t?r.filter(e=>!w[e]&&"undefined"!==e):r.filter(e=>!(w[e]||"undefined"===e||E.includes(e)||e.startsWith(v)||e.startsWith("undefined.")))}}),[...new Set(r)]}),Jn=Wn(async function(e,t){const n=zn(e,!0),r=n.filter(e=>E.includes(e)).sort(),i=n.filter(e=>e.startsWith(v)).sort(),o=await Zn([...r,...i]),s=F.parse(e);H.replace(s,{enter(e){if(e.type===F.Syntax.BinaryExpression){const{operator:t}=e,n=O[t];return n?{type:F.Syntax.CallExpression,arguments:[e.left,e.right],callee:{type:F.Syntax.Identifier,name:n},optional:!1}:e}return e}}),H.traverse(s,{enter:function(e){e.type===F.Syntax.CallExpression&&e.callee.type===F.Syntax.Identifier&&(e.callee.name=`await Methods.${e.callee.name}`)}});const a={},u=[];o.forEach(e=>{u.push(`const ${e.key} = ${JSON.stringify(e.value)};`)}),Object.keys(t).map(e=>{if(e.includes(".")){const[n="",r]=e.split(".");a[n]||(u.push(`const ${n} = {};`),a[n]=!0),u.push(`${n}.${r} = ${JSON.stringify(t[e])};`)}else u.push(`const ${e} = ${JSON.stringify(t[e])};`)});const l=new Xn("Methods",[...u,"return new Promise(async(resolve)=>{","const res = ;","resolve(res);","})"].join("\n")),c=await l(We);return console.info("【表达式】",e),console.info("【参数】",t),console.info("【执行语句】",l.toString()),console.info("【执行结果】",c),c});function Qn(e){return e.type===F.Syntax.MemberExpression?`${e.object.type===F.Syntax.MemberExpression?Qn(e.object):e.object.name}.${e.property.name}`:e.type===F.Syntax.Identifier?e.name:""}var Xn=Object.getPrototypeOf(async function(){}).constructor,Zn=Wn(async function(e){let t=[];return e.length>0&&(t=await _gct.api.apaas.systemVar.getGetVarByKeys({keys:e.join(",")})),t});window.gct_expression={execute:Jn,identify:zn};var er={[l.TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[l.LONG_TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[l.INTEGER]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[l.LONG]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[l.DOUBLE]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[l.DECIMAL]:{attrsTransform:[{from:"specificConfig.digits",to:"precision"},{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]}},tr=(e,t)=>{const{attrsTransform:n=[]}=er[e]??{};return n.reduce((e,n)=>{const r=_(t,n.from);return e[n.to]=r,e},{})},nr=class extends g{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(m.MOBILE,e)}static loadPadPlugin(e=[]){return this.loadRenderPlugin(m.PAD,e)}static loadWebPlugin(e=[]){return this.loadRenderPlugin(m.WEB,e)}};function rr(e){const{style:t={}}=e||{},n="ignoringStyle"in e?e.ignoringStyle??[]:[],r=me(t);return{wrapperStyle:he(t,n),wStyle:r,labelFont:pe(t.labelFont),contentFont:pe(t.contentFont)}}var ir=e=>pe(e),or=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 sr(e,t=!1){const{modelKey:n,field:r,isCustomField:i,fieldName:o,readonly:s,fieldType:a}=e.props;if(!e.isField&&!t||"table_name_"===r)return{};let u;if(i?u={name:o,type:""}:n&&(u=await or.getConfigByField(n,r)),!(i||u&&u.type===a))throw new Error("该字段可能已经被删除");if(!u)return{};const{required:l,specificConfig:c}=u;return e.props.fieldRequired=!!l,l&&!s&&(e.props.required=!0),void 0!==(null==c?void 0:c.digits)&&(e.props.precision=c.digits),u}function ar(e,t){return(null==e?void 0:e.map(e=>ur(e,t)))||[]}function ur(e={},t={}){var n;const r=N(e);r._X_ROW_KEY=void 0;const i=(null===(n=Object.keys(t??{}))||void 0===n?void 0:n.length)?Object.keys(r).reduce((e,n)=>{const i=t[n],o=r[n];if(i&&o)try{const t=(o+"").split(",").map(e=>i[e]);e[n]={[o+""]:t}}catch{}return e},{}):r._DICT||{};return{...r,_DICT:i,_OPCT:r.__FOREIGN__&&"object"==typeof r.__FOREIGN__?ur(r.__FOREIGN__,t):{}}}function lr(e,t,n){"object"==typeof t&&P(e,ur(t,n))}function cr(e,t,n){if("object"!=typeof t)return;for(const i in e)"_OPCT"!==i&&"_NOSUBMIT"!==i&&delete e[i];const r=ur(t,n);r._X_ROW_KEY=t._X_ROW_KEY,P(e,r)}function dr(e,t={},n={}){const r=N(t.__FOREIGN__||t),i={_DICT:{}};return Object.keys(r).forEach(t=>{const o=`${e}.${t}`,s=n[t],a=r[t];if(s&&a)try{const e=(a+"").split(",").map(e=>s[e]);i._DICT[o]={[a+""]:e}}catch{}i[o]=a}),{...r,_OPCT:i}}function fr(e={},t={}){var n;const r=N(e);return(null===(n=Object.keys(t??{}))||void 0===n?void 0:n.length)?Object.keys(r).reduce((e,n)=>{const i=t[n]||{},o=r[n];try{e[n]=(o+"").split(",").map(e=>i[e]).join(",")}catch{e[n]=o}return e},{}):r}function pr(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 i="object"==typeof e?ge.stringify({...e,customApi:null}):e;let o=hr.get(i);return o||(o=(async()=>{try{return await t(e)}catch(n){throw hr.delete(i),n}})(),hr.set(i,o,5e3),o)}Se(or,"modelData",/* @__PURE__ */new Map),Se(or,"FiledData",/* @__PURE__ */new Map),Se(or,"responsePromise",/* @__PURE__ */new Map),Se(or,"silent",!1);var hr=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 mr({ids:e,refOriginField:t,refOriginFieldType:n,model:r,foreignFields:i}){if(!e)return Promise.reject();const o=await async function({refOriginFieldType:e,modelKey:t,foreignFields:n,ids:r}){if(e===l.RDO_REF){const{data:e={},dict:i={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"rdoGetVersionByRefId",modelCategory:a.ENTITY},{foreignFields:n},{refId:r});return{data:e,dict:i}}{const{data:e={},dict:i={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"getOne",modelCategory:a.ENTITY},{query:{"id_.eq":r},foreignFields:n},{});return{data:e,dict:i}}}({refOriginFieldType:n,modelKey:r,foreignFields:i,ids:e});return(null==o?void 0:o.data)?dr(t,o.data,o.dict):void 0}Se(hr,"cachedata",{});var gr=e=>pr(e,mr),yr=[y.CONTAINALL,y.CONTAINANY,y.IN,y.NOTIN];function vr(e,t,n){const{body:r,exp:i}=function(e){const r={};let i=n||"";return t.forEach(t=>{const n=t.props.fieldSearchKey||t.props.field,o=t.props.ope||[];let s=e[t.id];(null!=s||t.props.useMore)&&o.forEach(e=>{s=function(e,t){return yr.indexOf(t)>-1&&"string"==typeof e?e.split(","):e}(s,e);const o=`${n}.${e}:${t.id}`,a=`${t.id}.${e}`;r[o]=t.props.useMore?null:s,i=i.replace(a,o)})}),{body:r,exp:i}}(function(e,t){if(!t.length)return e;const n=t.filter(e=>e.props.fieldType===l.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:i}}var br=/* @__PURE__ */new Map;async function wr(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 D(e.props.ope)?[r.masterOrgId]:r.masterOrgId}return null}}async function Er(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 D(e.props.ope)?[r.userId]:r.userId}return null}}async function Dr(e,t={}){const{defaultValue:n}=e.props;return n&&0!==n.length?n:null}async function Or(e,t={}){const{defaultValue:n}=e.props;return null==n?null:n}function Ir(e,t,n={}){const{defaultValueType:r,defaultValue:o}=e.props;if(null==r||""==r)return null;const{isRang:s,fieldType:a}=e.props;if(!s){const e=a===l.DATE?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss";if(r===i.SystemDate)return M(/* @__PURE__ */new Date).format(e)}if(s){const e=a===l.DATE?"YYYY-MM-DD":"YYYY-MM-DD 00:00:00",t=a===l.DATE?"YYYY-MM-DD":"YYYY-MM-DD 23:59:59",n=null!=o?Number(o):0,u=M();switch(r){case i.SystemDate:return s?[u.format(e),u.format(t)]:u.format(e);case i.PastDays:return[u.subtract(n,"day").format(e),u.subtract(n>0?1:0,"day").format(t)];case i.PastWeeks:return[u.subtract(n,"week").startOf("isoWeek").format(e),u.subtract(n>0?1:0,"week").endOf("isoWeek").format(t)];case i.PastMonths:return[u.subtract(n,"month").startOf("month").format(e),u.subtract(n>0?1:0,"month").endOf("month").format(t)];case i.PastYears:return[u.subtract(n,"year").startOf("year").format(e),u.subtract(n>0?1:0,"year").endOf("year").format(t)];case i.Yesterday:{const n=u.subtract(1,"day");return[n.format(e),n.format(t)]}case i.Past7Days:return[u.subtract(6,"day").format(e),u.format(t)];case i.Past30Days:return[u.subtract(29,"day").format(e),u.format(t)];case i.ThisWeek:return[u.startOf("isoWeek").format(e),u.endOf("isoWeek").format(t)];case i.LastWeek:{const n=u.subtract(1,"week");return[n.startOf("isoWeek").format(e),n.endOf("isoWeek").format(t)]}case i.ThisMonth:return[u.startOf("month").format(e),u.endOf("month").format(t)];case i.LastMonth:{const n=u.subtract(1,"month");return[n.startOf("month").format(e),n.endOf("month").format(t)]}case i.ThisYear:return[u.startOf("year").format(e),u.endOf("year").format(t)];case i.LastYear:{const n=u.subtract(1,"year");return[n.startOf("year").format(e),n.endOf("year").format(t)]}default:return null}}return null}br.set(l.ORG,wr),br.set(l.ORG_MULTI,wr),br.set(l.USER,Er),br.set(l.USER_MULTI,Er),br.set(l.ENUM,Dr),br.set(l.ENUM_MULTI,Dr),br.set(l.INTEGER,Or),br.set(l.LONG,Or),br.set(l.DOUBLE,Or),br.set(l.DECIMAL,Or),br.set(l.TEXT,async function(e,t={}){const{defaultValue:n}=e.props;return n||null}),br.set(l.LONG_TEXT,Or),br.set(l.BOOLEAN,async function(e,t={}){const{defaultValue:n}=e.props;return null==n||""===n?null:n}),br.set(l.DATE,async function(e,t={}){return Ir(e)}),br.set(l.DATE_TIME,async function(e,t={}){return Ir(e)}),br.set(l.PRINTER,async function(e,t={}){const{defaultValue:n}=e.props;return n&&0!==n.length?n:null});var Tr=/* @__PURE__ */function(e){return e.SELECT_ID="$VAR_GCT_SELECT_ID",e}({}),Mr=function(e,t,n={}){const{window:r=kn}=n;return Kn(e,t,null==r?void 0:r.localStorage,n)}("GCT_APP_GlobalCache",{}),Sr=e=>{const t=V({get:()=>Mr.value[e]||{},set(t){Mr.value[e]=t}});return{selectID:V({get:()=>t.value[Tr.SELECT_ID],set(e){t.value[Tr.SELECT_ID]?t.value[Tr.SELECT_ID]=e:t.value={...t.value,[Tr.SELECT_ID]:e}}}),cacheMap:t}},Nr=class{static runApp({userInfo:e,env:t,aid:n}){this.ENV=t,this.AID=n,this.userInfo=e}};Se(Nr,"ENV",void 0),Se(Nr,"AID",void 0),Se(Nr,"userInfo",void 0);var Cr={[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"}},_r=/* @__PURE__ */function(e){return e.WEB="web_module",e.MOBILE="mobile_module",e.PAD="pad_module",e}({}),Rr={[_r.WEB]:{getPageInfo:_gct.api.apaas.webpage.getInfo},[_r.MOBILE]:{getPageInfo:_gct.api.apaas.mobilePage.getInfo},[_r.PAD]:{getPageInfo:_gct.api.apaas.padPage.getInfo}},Ar=ie({}),xr=ie({}),Yr=ie({});function Pr(e,t){Yr.value[e]=t}var $r=ie({pageStyle:{},pageConfig:{},pageName:""}),kr=ue(()=>{const{title:e}=$r.value.pageConfig||{};return e}),Fr=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||T().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);xr.value[t.key]=(({value:e,appredis:t,key:n,type:r})=>{var i;const o="dev"!==Nr.ENV&&t,{cacheMap:s}=Sr(`${Nr.AID}_${null===(i=Nr.userInfo)||void 0===i?void 0:i.userId}`);return new Proxy({value:e,type:r},{get:(e,t)=>o&&"value"===t?s.value[n]:Reflect.get(e,t),set:(e,t,r,i)=>(o&&"value"===t&&(s.value[n]?s.value[n]=r:s.value={...s.value,[n]:r}),Reflect.set(e,t,r,i))})})({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;Ar.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=xr.value[e];return t?t.value:console.warn("变量key不存在")}static async setGlobalVar(e,t){const n=xr.value[e];if(!n)return console.warn("变量key不存在");n.value=t}static getPageVar(e){const t=Ar.value[e];return t?t.value:console.warn("变量key不存在")}static async setPageVar(e,t){const n=Ar.value[e];if(!n)return console.warn("变量key不存在");await function(e,t){if(t===f.NULL)return!0;const{callback:n,message:r}=Cr[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),Ar.value[e]&&(Ar.value[e].value=t)}static getPageGlobalVar(e){var t;return null===(t=Ar.value[e])||void 0===t?void 0:t.value}static setPageGlobalVar(e,t){Ar.value[e]?Ar.value[e].value=t:Ar.value[e]={value:t,type:"string"}}static async initPageByid(e,t=_r.WEB){this.pageID=e;const n=Rr[t].getPageInfo,r=await n({id:e}),{runtimeJson:i,name:o}=r||{};if($r.value.pageName=o,!i)return Promise.reject();const s=JSON.parse(i);return s.widgets.filter(e=>"bottom-button-container"!==e.type).length?(await this.initGlobalS(s),$r.value.pageConfig=s.pageConfig||{},$r.value.pageStyle=s.pageStyle||{},{res:r,data:s,name:o}):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();$r.value.pageName=r;const i=JSON.parse(n);return await this.initGlobalS(i),$r.value.pageConfig=i.pageConfig||{},$r.value.pageStyle=i.pageStyle||{},{res:t,data:i,name:r}}static usePageHooks(t,n,r,i){const o=ie(!1);return Q(async()=>{await q();const e=null==n?void 0:n.pageBeforeMount;if((null==e?void 0:e.name)&&await t.runExportByName(e.name,e.extraParams),i&&await i(t),o.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)}),J(async()=>{$r.value={};const{extraParams:e,name:i}=(null==n?void 0:n.pageDestroyed)||{};if(i&&t.runExportByName(i,e),null==r?void 0:r.pageDestroyed)for(const t of this.globalHookCaches.pageDestroyed)await t()}),z(async()=>{if(e.setContextByKey(t.context),null==r?void 0:r.pageActivated)for(const e of this.globalHookCaches.pageActivated)await e();const{extraParams:i,name:o}=(null==n?void 0:n.pageActivated)||{};o&&t.runAsyncExportByName(o,i)}),{pageload:o}}};Se(Fr,"modalsCache",{}),Se(Fr,"pageID",""),Se(Fr,"permissions",{}),Se(Fr,"ContextCache",{}),Se(Fr,"startRuning",!1),Se(Fr,"globalHookCaches",{pageMounted:[],pageActivated:[],pageDestroyed:[]});var Hr=Fr.getPremission.bind(Fr),Vr=e=>(t,n={},r={},i={})=>e({modelKey:t.key,bsKey:t.action,modelCategory:t.modelCategory??a.ENTITY},n,r,i),Br={post:Vr(_gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey),get:Vr(_gct.api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey),put:Vr(_gct.api.apaas.modelComprehensive.putBizServiceModelCategoryModelKeyBsKey),delete:Vr(_gct.api.apaas.modelComprehensive.deleteBizServiceModelCategoryModelKeyBsKey)};async function Lr(e,n,...r){return Br[t[e.action]](e,n,...r)}async function jr(e,t,{body:n={},query:r={}}={},i={}){return await _gct.api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey({bsKey:t,modelKey:e,modelCategory:a.ENTITY},r,n,i)}var Ur=class e{constructor(){if(Se(this,"mask",void 0),Se(this,"container",void 0),Se(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=""}};Se(Ur,"instance",void 0);var Gr=new Ur,Kr=class{constructor({taskId:e,processInstanceId:t,examineAndApproveState:n=u.MY_CUSTOM,refFormId:r}){Se(this,"isHandle",!1),Se(this,"buttonConfig",{}),Se(this,"fieldConfig",{}),Se(this,"processId",""),Se(this,"dataId",""),Se(this,"taskId",void 0),Se(this,"processInstanceId",void 0),Se(this,"refFormId",void 0),Se(this,"examineAndApproveState",u.MY_CUSTOM),Se(this,"fieldStatus",""),Se(this,"viewPageKey",void 0),Se(this,"isviewPage",void 0),Se(this,"isAPPviewPage",void 0),Se(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:i,mobileViewPageKey:o}=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)||i,this.isAPPviewPage=!!(null==t?void 0:t.mobileViewPageKey)||!!o}if(this.examineAndApproveState===u.MY_APPLICATION){await this.getDataInfo();const{node:e,processDefId:r,withdrawOp:i}=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=!!i),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:i,taskId:o,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)&&!o?this.isviewPage=!0:this.viewPageKey=(null==e?void 0:e.webViewPageKey)||i}if(this.examineAndApproveState===u.MY_CUSTOM_Modal){await this.getDataInfo();const{node:e,btnList:n,taskId:r,processDefId:i,initiatorNode:o}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),s=n||[];this.withdrawByNode(o),this.transformByNode(e),this.processId=i;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=I(`sys.process.paasBpmnButtonEvent.${e.type}`);this.buttonConfig[e.type]={showModel:!1,title:I("sys.process.element.approval")+t,success:t+I("sys.success")+"!",show:e.enable,alias:e.alias,signature:!!e.signature,opinion:{},user:{}}})}transformByNode(e){if(e)try{const{opinionConfig:t,buttonConfig:r,fieldConfig:i}=e,o=JSON.parse(r||"[]"),s=JSON.parse(t||'{"enabled":false,"opinionType":[]}');o.forEach(e=>{const t=I(`sys.process.paasBpmnButtonEvent.${e.type}`);var r,i;this.buttonConfig[e.type]={showModel:![n.Resubmit,n.Withdraw,n.End].includes(e.type),title:I("sys.process.element.approval")+t,success:t+I("sys.success")+"!",show:e.enable,alias:e.alias,signature:!!e.signature,opinion:{show:s.enabled,required:(r=s.opinionType,i=e.type,!!r.includes(h.Required)||!r.includes(h.Optional)&&(r.includes(h.ApproveRequired)||r.includes(h.ApproveRequired)?i===n.Approve:r.includes(h.CountersignRequired)?i===n.Countersign:r.includes(h.ReassignRequired)?i===n.Reassign:r.includes(h.RejectRequired)?i===n.Reject:r.includes(h.RefuseRequired)?i===n.Refuse:void 0))},user:{show:[n.Reassign,n.Countersign].includes(e.type),multiple:n.Countersign===e.type,label:I(`sys.process.user.${e.type}`)}}}),this.fieldConfig=JSON.parse(i+"")}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 Wr.disabled:e.props.disabled=!0,e.props.readonly=!1;break;case Wr.editable:e.props.disabled=!1,e.props.readonly=!1;break;case Wr.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===Wr.hidden&&(e.props.hidden=!0)}}};var Wr=/* @__PURE__ */function(e){return e.hidden="hidden",e.readonly="readonly",e.disabled="disabled",e.editable="editable",e}({});function qr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function zr(e,t,n){qr(e,t),t.set(e,n)}function Jr(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 Qr(e,t,n){return e.set(Jr(e,t),n),n}function Xr(e,t){return e.get(Jr(e,t))}var Zr=/* @__PURE__ */new WeakMap,ei=/* @__PURE__ */new WeakMap,ti=/* @__PURE__ */new WeakSet,ni=class{constructor({js:e,css:t,pageKey:n,ContextVm:r}){var i;qr(this,i=ti),i.add(this),Se(this,"context",void 0),Se(this,"searchVNodes",void 0),Se(this,"cssData",void 0),Se(this,"pageKey",void 0),Se(this,"exports",void 0),zr(this,Zr,void 0),zr(this,ei,void 0),Se(this,"ProcessAppRoved",void 0),Se(this,"pageLayoutMode",void 0),this.cssData=Jr(ti,this,ri).call(this,t),this.searchVNodes={},this.exports={},Qr(ei,this,{}),Qr(Zr,this,{}),this.context=new r({$ref:this.getComponent.bind(this),$asyncRef:this.getSyncComponent.bind(this)}),Jr(ti,this,ii).call(this,e),Fr.setContextByKey(this.context,n),this.pageKey=n}async runProcessBySaskId({taskId:e,processInstanceId:t,examineAndApproveState:n,refFormId:r}){this.ProcessAppRoved=new Kr({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 i;if(r){if(Array.isArray(r))i=await async function(e,t,n){const r=e.map(li.bind(t,n));await Promise.all(r)}(r,this.context,n);else{const e=this.exports[r.name];if(!e)throw`函数${r.name}不存在`;i=await e(...n,ae(r.extraParams))}return i}}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&&(Xr(ei,this)[e]=t,Jr(ti,this,si).call(this,e,t))}destroyNode(e){delete Xr(ei,this)[e],delete Xr(Zr,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=Xr(ei,this)[e];if(t)return new ui(e,t);console.error(e+"组件不存在或者未初始化")}getSyncComponent(e){if(!e)return Promise.reject("标识不能为空");const t=Xr(ei,this)[e];return t?Promise.resolve(new ui(e,t)):new Promise((t,n)=>{const r=setTimeout(()=>{n(e+"不存在或者被隐藏")},3e4);Jr(ti,this,oi).call(this,e,n=>{clearTimeout(r),t(new ui(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:i,button:o}){const{taskId:s,processInstanceId:a}=this.ProcessAppRoved,u={procInstId:a,data:e,opinion:t,button:o,countersignUserIds:i,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(I("sys.process.processInstanceMismatch")):void 0:Promise.reject(I("sys.process.pleaseInitiateTheProcessFirst"))}};function ri(e,t={}){if(!e)return;const{css:n,load:r,unload:i}=function(e,t={}){const n=se(!1),{document:r=Fn,immediate:i=!0,manual:o=!1,id:s="vueuse_styletag_"+ ++qn}=t,a=se(e);let u=()=>{};const l=()=>{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=de(a,t=>{e.textContent=t},{immediate:!0}),n.value=!0)},c=()=>{r&&n.value&&(u(),r.head.removeChild(r.getElementById(s)),n.value=!1)};var d;return i&&!o&&Pn(l),o||(d=c,K()&&X(d,void 0)),{id:s,css:a,unload:c,load:l,isLoaded:re(n)}}(e,t);return{css:n,load:r,unload:i}}function ii(e){if(e)try{new Function("exports","CTX",e)(this.exports,this.context)}catch(t){console.error(t,"createFunction")}}function oi(e,t){const n=Xr(ei,this)[e];n?t(e,n):Xr(Zr,this)[e]?Xr(Zr,this)[e].push(t):Xr(Zr,this)[e]=[t]}function si(e,t){Xr(Zr,this)[e]&&Xr(Zr,this)[e].forEach(e=>{e(t)})}var ai=class{constructor({$ref:e,$asyncRef:t}){Se(this,"$ref",void 0),Se(this,"$asyncRef",void 0),Se(this,"$getModal",void 0),Se(this,"$closeModal",void 0),Se(this,"$customBizService",Br),Se(this,"gctWidgets",{}),Se(this,"$utility",{_:S,cloneDeep:N,differenceBy:C,dayjs:M,BigNumber:k,plus:(e,t)=>new k(e).plus(new k(t)).toNumber(),minus:(e,t)=>new k(e).minus(new k(t)).toNumber(),multipliedBy:(e,t)=>new k(e).multipliedBy(new k(t)).toNumber(),div:(e,t)=>new k(e).div(new k(t)).toNumber(),transformSourceData:ar,transformData:ur}),Se(this,"$httpBizService",Lr),Se(this,"$request",jr),Se(this,"$loading",Gr),this.$asyncRef=t,this.$ref=e}$getPremission(e){return Fr.getPremission(e)}$setPremission(e,t){Fr.setPremission(e,t)}$getAppGlobalVar(e){return Fr.getGlobalVar(e)}$setAppGlobalVar(e,t){Fr.setGlobalVar(e,t)}$getPageGlobalVar(e){return Fr.getPageGlobalVar(e)}$setPageGlobalVar(e,t){Fr.setPageGlobalVar(e,t)}$getPageVar(e){return Fr.getPageVar(e)}$setPageVar(e,t){Fr.setPageVar(e,t)}$getCtxById(e){return Fr.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 i in t)r[i]=t[i]}$getPropsByKey(e,t=[],n){const r=this.gctWidgets[e];if(!r)return{};const i=n||!r.props?r:r.props;return"string"==typeof t&&(t=[t]),t.reduce((e,t)=>(e[t]=i[t],e),{})}},ui=class{constructor(e,t){Se(this,"modelKey",void 0),Se(this,"getValue",void 0),Se(this,"setValue",void 0),Se(this,"submit",void 0),Se(this,"reload",void 0),Se(this,"key",void 0),this.key=e;const n=t.elRef;Object.keys(n).forEach(e=>{this[e]=n[e]})}};async function li(e,t){const{name:n,refId:r,scopeId:i,modalTitle:o}=t,s=(null==o?void 0:o.split("."))||[];let a;if(s.length>1){var u;const e=[];ci(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 l;a=null===(l=this.gctWidgets)||void 0===l?void 0:l[s[0]]}var c;n===p.OPEN_MODAL&&await this.$getModal(r).open({title:null==a||null===(c=a.props)||void 0===c?void 0:c.title}),n===p.CLOSE_MODAL&&(r?await this.$getModal(r).close():await this.$closeModal()),n===p.REFRESH_TABLE&&await(await this.$getCtxById(i).$asyncRef(r)).reload(e?e[0]:null)}function ci(e,t){const n=t.children||[];for(const i of n)if(i.type&&i.type==d.CustomButton)e.push(i);else{var r;(null===(r=i.children)||void 0===r?void 0:r.length)&&ci(e,i)}}function di({expression:e="",rowData:t=null},n){if(!e||"true"===e)return void n(!0);const r=zn(e),i=r.reduce((e,t)=>{const n=t.split(".");return e[t]={formKey:n[0],itemKey:n[1]},e},{}),o=V(()=>r.reduce((e,n)=>{const r=n.split("."),i=r[0]+"",o=r[1];if(o){var s;const n=(t?t[o]:null===(s=Yr.value[i])||void 0===s?void 0:s[o])??"";e[i]?e[i][o]=n:e[i]={[o]:n}}else if(i.startsWith("$VAR_")||i.startsWith("$IVAR_")){var a;e[i]=(null===(a=xr.value[i])||void 0===a?void 0:a.value)??""}else if(i.startsWith("$PAGERVAR_")||i.startsWith("$IPAGERVAR_")){var u;e[i]=(null===(u=Ar.value[i])||void 0===u?void 0:u.value)??""}return e},{}));function s(t){const r={};Object.keys(i).forEach(e=>{var n;const{formKey:o,itemKey:s}=i[e];r[e]=s?null===(n=t[o])||void 0===n?void 0:n[s]:t[o]}),Jn(e,r).then(n)}t&&s(o.value),$n(o,()=>{s(o.value)},{debounce:200,immediate:!t})}async function fi({expression:e="",rowData:t=null}){if(!e||"true"===e)return!0;const n=zn(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:i,itemKey:o}=n[e];let s="";var a;if(i.startsWith("$VAR_"))s=(null===(a=xr.value[i])||void 0===a?void 0:a.value)??"";else if(i.startsWith("$PAGERVAR_")){var u;s=(null===(u=Ar.value[i])||void 0===u?void 0:u.value)??""}else if(o){var l;s=(t?t[o]:null===(l=Yr.value[i])||void 0===l?void 0:l[o])??""}else s=(t?t[i]:Yr.value[i])??"";r[e]=s}),Jn(e,r)}function pi(e,t){return!!Hr(t)&&(e.displayType===s.CONFIG?ue(()=>!e.hidden):function(e){const t=ie(!1);return hi(e,e=>{t.value=!!e}),t}(e))}function hi({displayRule:e,tableForm:t},n){if(e){const r=zn(e),i=r.reduce((e,t)=>{const n=t.split(".");return e[t]={formKey:n[0],itemKey:n[1]},e},{}),o=ue(()=>r.reduce((e,n)=>{var r;const i=n.split("."),o=i[0]+"",s=i[1]+"",a=null===(r={...t,...Yr.value}[o])||void 0===r?void 0:r[s];return e[o]?e[o][s]=a:e[o]={[s]:a},e},{}));$n(o,()=>{!function(e,t,n,r){const i={};Object.keys(t).forEach(n=>{var r;const{formKey:o,itemKey:s}=t[n];i[n]=null==e||null===(r=e[o])||void 0===r?void 0:r[s]}),Jn(n,i).then(r)}(o.value,i,e,e=>{n(e)})},{immediate:!0,debounce:300})}else n(!0)}function mi(e,t){const n=ne({});return ue(()=>e?e.filter(e=>{const{displayRule:r,hidden:i,displayType:o}=e.props||e;return Hr(e.id)?o===s.CONFIG?n[e.id]=!i:hi({displayRule:r,tableForm:t},t=>{n[e.id]=t}):n[e.id]=!1,n[e.id]}):[])}function gi(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 i=yi(r,t),o=yi(n,t);return ue(()=>(null==i?void 0:i.value)||(null==o?void 0:o.value))}function yi(e,t){const n=ne({});if(e)return ue(()=>e.find(e=>{const{displayRule:r,hidden:i,displayType:o}=e.props||e;return o===s.CONFIG?n[e.id]=!i:hi({displayRule:r,tableForm:t},t=>{n[e.id]=t}),n[e.id]}))}function vi(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?pi(e.props,e.id):bi(e)}function bi(e,t){var n;if(!e.id)return!1;if(!Hr(e.id))return e.props.hidden=!0,!1;const r=W("useProcessFieldEvent",void 0);if(r)return r.useFieldToShow(e),!e.props.hidden;const{displayType:i,displayRule:a}=e.props||{},{value:u,expression:l}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[o.HIDDEN]||{};return u&&l?(e.props.hidden=!0,di({expression:l,rowData:t},t=>{e.props.hidden=!!t})):u?e.props.hidden=!0:i===s.RULE&&a&&(e.props.hidden=!0,di({expression:a,rowData:t},t=>{e.props.hidden=!t})),ue(()=>!e.props.hidden)}async function wi(e,t){var n;if(!e.id)return!1;if(!Hr(e.id))return e.props.hidden=!0,!1;const r=W("useProcessFieldEvent",void 0);if(r)return r.useFieldToShow(e),!e.props.hidden;const{displayType:i,displayRule:a}=e.props||{},{value:u,expression:l}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[o.HIDDEN]||{};return u&&l?(e.props.hidden=!0,e.props.hidden=!!(await fi({expression:l,rowData:t}))):u?e.props.hidden=!0:i===s.RULE&&a&&(e.props.hidden=!0,e.props.hidden=!!(await fi({expression:a,rowData:t}))),!e.props.hidden}function Ei(e,t){return e.forEach(e=>{bi(e,t)}),ue(()=>e.filter(e=>!e.props.hidden))}function Di(e,t){var n;const{value:r,expression:i}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[o.HIDDEN]||{};r&&i&&di({expression:i},e=>{t(e)}),t(e.props.hidden)}function Oi(e){var t;const n=(null===(t=e.props.componentDependency)||void 0===t?void 0:t.configDependency)||{},{value:r,expression:i}=n[o.HIDDEN]||{};r&&i&&di({expression:i},t=>{e.props.hidden=!!t});const{value:s,expression:a}=n[o.REQUIRED]||{};s&&a&&di({expression:a},t=>{e.props.required=!!t})}function Ii(t,n={},r=!1){var i,s,a;const{readonly:u,field:l,isFieldModel:c,bindFieldLink:d,refOriginField:f,refOriginModelKey:p,refOriginFieldType:h}=t.props,m=(null===(i=t.props.componentDependency)||void 0===i?void 0:i.configDependency)||{},g=W("formReadonly",void 0),y=W("useProcessFieldEvent",void 0);if(y&&y.useFieldWidget(t),!y&&t.formItem&&void 0!==(null==g?void 0:g.value)&&(t.props.readonly=(null==g?void 0:g.value)||t.props.readonly),!y&&!(null==g?void 0:g.value)){var v,b,w,E,D,O,I,T;const e=null===(v=m[o.READONLY])||void 0===v?void 0:v.expression,i=null===(b=m[o.READONLY])||void 0===b?void 0:b.fieldValue,s=null===(w=m[o.READONLY])||void 0===w?void 0:w.value;!i&&s&&e&&di({expression:e,rowData:r?n:null},e=>{t.props.readonly=!!e});const a=null===(E=m[o.REQUIRED])||void 0===E?void 0:E.expression,l=null===(D=m[o.REQUIRED])||void 0===D?void 0:D.value;!(null===(O=m[o.REQUIRED])||void 0===O?void 0:O.fieldValue)&&l&&a&&di({expression:a,rowData:r?n:null},e=>{t.props.required=!!e,t.props.readonly=!e&&u});const c=null===(I=m[o.DISABLED])||void 0===I?void 0:I.expression;(null===(T=m[o.DISABLED])||void 0===T?void 0:T.value)&&c&&di({expression:c,rowData:r?n:null},e=>{t.props.disabled=!!e,t.props.readonly=!e&&u})}const M=null===(s=m[o.ASSIGNMENT])||void 0===s?void 0:s.expression,S=null===(a=m[o.ASSIGNMENT])||void 0===a?void 0:a.strategy;M&&di({expression:M,rowData:r?n:null},e=>{n[l]=e});const N=c?null==d?void 0:d.join("."):l;n._OPCT||(n._OPCT={_DICT:{}});const C=V(()=>c?n._OPCT:n),_=V({get:()=>N?C.value[N]:"",set(t){M&&S===e.alwaysCover||(C.value[N]=t)}});if(c&&f){const e=ue(()=>n[d[0]]),t=d.length>2?[d[1]+".*"]:void 0;$n(e,async()=>{try{const n=await gr({ids:e.value,refOriginField:d[0],refOriginFieldType:h,model:p,foreignFields:t});C.value[N]=n._OPCT[N],C.value._DICT||(C.value._DICT={}),C.value._DICT[N]=n._OPCT._DICT[N]}catch{for(const e in C.value)e.startsWith(N)&&(C.value[e]=void 0)}},{debounce:100,immediate:!0})}return{value:_,formRowData:C,fieldKey:N}}function Ti(e){var t,n,r,i;const{readonly:s}=e.props,a=(null===(t=e.props.componentDependency)||void 0===t?void 0:t.configDependency)||{},u=null===(n=a[o.REQUIRED])||void 0===n?void 0:n.expression,l=null===(r=a[o.REQUIRED])||void 0===r?void 0:r.value;!(null===(i=a[o.REQUIRED])||void 0===i?void 0:i.fieldValue)&&l&&u&&di({expression:u},t=>{e.props.required=!!t,e.props.readonly=!t&&s})}function Mi(e,t=[]){return"ignoreCase"==(null==t?void 0:t[0])?null==e?void 0:e.replace(/\./g,".i"):e}function Si(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 Ni=({searchField:e,keyword:t})=>t&&(null==e?void 0:e.reduce((e,n)=>(e[n.split(".").length>1?n:n+".like"]=t,e),{}))||{},Ci=e=>{let t={},n="";if(R(e))t={...e.reduce((e,t)=>(e[t.key+"."+t.ope]=t.value,e),{})};else try{const i=JSON.parse(null==e?void 0:e.dataRule);n=null==i?void 0:i.exp;const o=(null==i?void 0:i.typeMap)||{},s=(null==i?void 0:i.query)||{};for(const e in s)if("VAR"===o[e]){var r;t[e]=null===(r=xr.value)||void 0===r||null===(r=r[s[e]])||void 0===r?void 0:r.value}else t[e]=s[e]}catch(i){console.log(i)}return{query:t,getExp:function(...e){const t=[n,...e].filter(e=>e),r=t.join(",");return t.length>1?`AND(${r})`:r}}},_i={class:"handwriting-pad"},Ri=["width","height"],Ai=/* @__PURE__ */(e=>{const t=e.__vccOpts||e;for(const[n,r]of[["__scopeId","data-v-d5b980b7"]])t[n]=r;return t})(/* @__PURE__ */U({__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=ie(null);let i=null,o=!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 l(e){e.preventDefault(),o=!0;const{x:t,y:n}=u(e);s=t,a=n}function c(e){if(!o||!i)return;e.preventDefault();const{x:t,y:n}=u(e);i.beginPath(),i.moveTo(s,a),i.lineTo(t,n),i.stroke(),i.closePath(),s=t,a=n}function d(e){e.preventDefault(),o=!1}return Q(()=>{i=r.value.getContext("2d"),"transparent"!==n.backgroundColor&&(i.fillStyle=n.backgroundColor,i.fillRect(0,0,n.width,n.height)),i.lineWidth=n.lineWidth,i.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==i||i.drawImage(t,0,0)}},clear:function(){null==i||i.clearRect(0,0,n.width,n.height),"transparent"!==n.backgroundColor&&(i.fillStyle=n.backgroundColor,i.fillRect(0,0,n.width,n.height))}}),(t,n)=>(ee(),B("div",_i,[L("canvas",{ref_key:"canvasRef",ref:r,width:e.width,height:e.height,class:"canvas",onMousedown:l,onMousemove:c,onMouseup:d,onMouseleave:d,onTouchstart:l,onTouchmove:c,onTouchend:d},null,40,Ri)]))}})),xi=class{constructor(){Se(this,"context",{})}},Yi=class{constructor(){Se(this,"isDestroy",!1)}},Pi=class{constructor(e){Se(this,"state",new Yi),this.model=e}mounted(){}destroy(){}},$i=class extends Pi{},ki=class extends Pi{},Fi=class{constructor(){Se(this,"state",new xi),Se(this,"prefix",""),Se(this,"preview",!1),Se(this,"item",/* @__PURE__ */new Map),Se(this,"nodes",[]),Se(this,"tree",[])}setTree(e){this.tree=e}setNodes(e){this.reset(),this.nodes=e,this.nodes.forEach(e=>{const t=Be.get(e.type,this.prefix);if(t){if(t.createController)return void this.item.set(e.id,t.createController(e));if(t.mode===fe.CONTAINER)return void this.item.set(e.id,new $i(e));if(t.mode===fe.ITEM)return void this.item.set(e.id,new ki(e))}this.item.set(e.id,new Pi(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 Hi(e){let t=W(Fe.DESIGN_RENDER);return t||(t=e?e():new Fi,t.state=ne(t.state),te(Fe.DESIGN_RENDER,t),Q(()=>{t.mounted()}),Z(()=>{t.unmounted()})),t}var Vi=()=>{const e=ie({});return{getFileAttrs:async function({modelKey:t,fieldKey:n}){const r=await or.getConfigByField(t,n);if(r&&r.specificConfig){const t=$(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 or.getConfigByField(t,n);r&&r.specificConfig&&(e.value={maxTagTextLength:($(r.specificConfig,["codeVisibleNum"])??{}).codeVisibleNum||12})}}};function Bi(){_gct.register.render?console.warn("渲染注册已存在,可能存在重复注册问题,请检查是否有重复引入渲染包的情况"):_gct.register.render=new Ne}var Li=(e,t,n)=>{if(t<0||t>=e.length||n<0||n>e.length)return void console.log("下标超出数组范围");const r=e.splice(t,1)[0];e.splice(n,0,r)},ji=new URL("./index.min.css",import.meta.url);b.load(ji.href);export{ai as Context,Fe as ControllerType,_e as DESIGN_DATA_KEY_TAG,Ce as DESIGN_TYPE,$e as DateFormat,Ae as DateRangeMap,ke as DatepickerRanges,Re as DesignItemAttribute,He as DesignRenderViewPrefix,ni as Events,or as FieldSchema,ui as GctComponent,Fr as Globals,Ai as HandwritingPad,_r as PageTypeEnum,Be as RenderNodeRegister,Ve as RenderNodeType,nr as RenderPluginPgkUtil,Ne as RenderRegister,lr as addDataByForm,pr as cacheAdapter,Jn as calculate,fi as calculateDepResult,br as defaultValMap,Li as deleteAndInsertArr,bi as dependencyToShow,wi as dependencyToShowSync,Yr as formMap,Pe as getDefaultDate,xe as getDisabledDate,Mi as getIExp,Si as getIKeywordFieldKeys,Ye as getMobileDateRange,kr as getPageTitle,Hr as getPremission,Ni as getQueryDateByKeyWord,gr as getRefInfoId,xr as globalVarCaches,zn as identify,sr as initFieldWidgetRuntime,di as insetDep,Bi as onInit,$r as pageDataforJson,Ar as pageGlobaVariables,ir as schemaToStyle,cr as setDataByForm,Pr as setFormData,Oi as tableWidgetByDept,Di as tableWidgetToShow,dr as transSelectData,ur as transformData,fr as transformDataToDict,tr as transformPropsField,ar as transformSourceData,Vi as useAsyncFileAttrs,Ii as useDependency,Ti as useDependencyByRequired,vi as useDependencyToShow,Ei as useDependencyToShowList,Hi as useDesignRenderController,gi as useDisplayRuleColumnByStyles,mi as useDisplayRuleOptions,Sr as useGctSelect,vr as useGetBodyBySearch,Ci as useQueryfilter,rr as useStyle,pi as useVisibileByRuleHook};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { calculate, identify } from "../../utils/expression/index.mjs";
|
|
2
|
-
import "../../utils/index.mjs";
|
|
3
2
|
import { formMap, globalVarCaches, pageGlobaVariables } from "../utils/runGlobalByPage.mjs";
|
|
3
|
+
import "../../utils/index.mjs";
|
|
4
4
|
import { watchDebounced } from "@vueuse/core";
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
//#region src/Event/Dependency/controller.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { calculate, identify } from "../../utils/expression/index.mjs";
|
|
2
|
-
import "../../utils/index.mjs";
|
|
3
2
|
import { formMap, getPremission } from "../utils/runGlobalByPage.mjs";
|
|
3
|
+
import "../../utils/index.mjs";
|
|
4
4
|
import { DisplayType } from "@gct-paas/core";
|
|
5
5
|
import { watchDebounced } from "@vueuse/core";
|
|
6
6
|
import { reactive, ref, toRef } from "vue";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getRefInfoId } from "../../utils/get-ref-data.mjs";
|
|
2
|
-
import "../../utils/index.mjs";
|
|
3
2
|
import "../utils/processRovedInfo.mjs";
|
|
4
3
|
import { insetDep } from "./controller.mjs";
|
|
4
|
+
import "../../utils/index.mjs";
|
|
5
5
|
import { ASSIGNMENTSTRATEGY_ENUM, Dependency_ENUM } from "@gct-paas/core";
|
|
6
6
|
import { watchDebounced } from "@vueuse/core";
|
|
7
7
|
import { computed, inject, toRef } from "vue";
|
package/es/Event/baseEvent.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { transformData, transformSourceData } from "../utils/model-transformer.mjs";
|
|
2
|
-
import "../utils/index.mjs";
|
|
3
2
|
import { Globals } from "./utils/runGlobalByPage.mjs";
|
|
4
3
|
import { $httpBizService, $request, BizService } from "./bizServiceRequest.mjs";
|
|
5
4
|
import { globalLoading } from "./utils/globalLoading.mjs";
|
|
6
5
|
import { ProcessAppRovedData } from "./utils/processRovedInfo.mjs";
|
|
6
|
+
import "../utils/index.mjs";
|
|
7
7
|
import { FormComponents, INNER_EVENT, t } from "@gct-paas/core";
|
|
8
8
|
import dayjs from "dayjs";
|
|
9
9
|
import * as _ from "lodash-es";
|
package/es/hooks/index.d.ts
CHANGED
package/es/hooks/index.mjs
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const useAsyncFileAttrs: () => {
|
|
2
|
+
getFileAttrs: ({ modelKey, fieldKey }: IObject) => Promise<void>;
|
|
3
|
+
attrObj: import('vue').Ref<{
|
|
4
|
+
maxSize?: number | undefined;
|
|
5
|
+
maxCount?: number | undefined;
|
|
6
|
+
accept?: string[] | undefined;
|
|
7
|
+
acceptStr?: string | undefined;
|
|
8
|
+
maxTagTextLength?: number | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
/** 单个文件大小 */
|
|
11
|
+
maxSize?: number;
|
|
12
|
+
/** 最大上传数量 */
|
|
13
|
+
maxCount?: number;
|
|
14
|
+
/** 支持的格式数组 */
|
|
15
|
+
accept?: string[];
|
|
16
|
+
/** 支持的格式 */
|
|
17
|
+
acceptStr?: string;
|
|
18
|
+
/** 最大字符显示个数 */
|
|
19
|
+
maxTagTextLength?: number;
|
|
20
|
+
} | {
|
|
21
|
+
maxSize?: number | undefined;
|
|
22
|
+
maxCount?: number | undefined;
|
|
23
|
+
accept?: string[] | undefined;
|
|
24
|
+
acceptStr?: string | undefined;
|
|
25
|
+
maxTagTextLength?: number | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
getmaxTagLength: ({ modelKey, fieldKey }: IObject) => Promise<void>;
|
|
28
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { FieldSchema } from "../../utils/getFieldSchema.mjs";
|
|
2
|
+
import { pick } from "lodash-es";
|
|
3
|
+
import { ref } from "vue";
|
|
4
|
+
//#region src/hooks/widgets/useFileAttrsHooks.ts
|
|
5
|
+
var useAsyncFileAttrs = () => {
|
|
6
|
+
const attrObj = ref({});
|
|
7
|
+
/** 获取附件、图片的的专属配置项信息 */
|
|
8
|
+
async function getFileAttrs({ modelKey, fieldKey }) {
|
|
9
|
+
const fieldInfo = await FieldSchema.getConfigByField(modelKey, fieldKey);
|
|
10
|
+
if (fieldInfo && fieldInfo.specificConfig) {
|
|
11
|
+
const attrsMap = pick(fieldInfo.specificConfig, [
|
|
12
|
+
"maxNumber",
|
|
13
|
+
"fileSize",
|
|
14
|
+
"fileTypes"
|
|
15
|
+
]) ?? {};
|
|
16
|
+
const _accept = attrsMap.fileTypes ?? [];
|
|
17
|
+
attrObj.value = {
|
|
18
|
+
maxSize: attrsMap.fileSize,
|
|
19
|
+
maxCount: attrsMap.maxNumber,
|
|
20
|
+
accept: _accept,
|
|
21
|
+
acceptStr: Array.isArray(_accept) && _accept.length !== 0 ? _accept.join("、") : ""
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** 获取部门多选、枚举多选、范围人员,模型多选最大字符显示个数 */
|
|
26
|
+
async function getmaxTagLength({ modelKey, fieldKey }) {
|
|
27
|
+
const fieldInfo = await FieldSchema.getConfigByField(modelKey, fieldKey);
|
|
28
|
+
if (fieldInfo && fieldInfo.specificConfig) attrObj.value = { maxTagTextLength: (pick(fieldInfo.specificConfig, ["codeVisibleNum"]) ?? {}).codeVisibleNum || 12 };
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
getFileAttrs,
|
|
32
|
+
attrObj,
|
|
33
|
+
getmaxTagLength
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { useAsyncFileAttrs };
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -14,9 +14,6 @@ import { cacheAdapter } from "./utils/cacheAdapter.mjs";
|
|
|
14
14
|
import { getRefInfoId } from "./utils/get-ref-data.mjs";
|
|
15
15
|
import { useGetBodyBySearch } from "./utils/search/search-hooks.mjs";
|
|
16
16
|
import { defaultValMap } from "./utils/search/search-default-value.mjs";
|
|
17
|
-
import "./utils/index.mjs";
|
|
18
|
-
import HandwritingPad_default from "./components/HandwritingPad.vue.mjs";
|
|
19
|
-
import "./components/index.mjs";
|
|
20
17
|
import { useGctSelect } from "./hooks/useStorageRef.mjs";
|
|
21
18
|
import { Globals, PageTypeEnum, formMap, getPageTitle, getPremission, globalVarCaches, pageDataforJson, pageGlobaVariables, setFormData } from "./Event/utils/runGlobalByPage.mjs";
|
|
22
19
|
import { Context, Events, GctComponent } from "./Event/baseEvent.mjs";
|
|
@@ -25,12 +22,25 @@ import { useDisplayRuleColumnByStyles, useDisplayRuleOptions, useVisibileByRuleH
|
|
|
25
22
|
import { dependencyToShow, dependencyToShowSync, tableWidgetByDept, tableWidgetToShow, useDependencyToShow, useDependencyToShowList } from "./Event/Dependency/useDependencyToShow.mjs";
|
|
26
23
|
import { useDependency, useDependencyByRequired } from "./Event/Dependency/useDependency.mjs";
|
|
27
24
|
import "./Event/index.mjs";
|
|
25
|
+
import { getIExp, getIKeywordFieldKeys, getQueryDateByKeyWord, useQueryfilter } from "./utils/search/listhook.mjs";
|
|
26
|
+
import "./utils/index.mjs";
|
|
27
|
+
import HandwritingPad_default from "./components/HandwritingPad.vue.mjs";
|
|
28
|
+
import "./components/index.mjs";
|
|
28
29
|
import { useDesignRenderController } from "./hooks/use-design-render-controller/use-design-render-controller.mjs";
|
|
30
|
+
import { useAsyncFileAttrs } from "./hooks/widgets/useFileAttrsHooks.mjs";
|
|
29
31
|
import "./hooks/index.mjs";
|
|
30
32
|
//#region src/index.ts
|
|
31
33
|
function onInit() {
|
|
32
34
|
if (!_gct.register.render) _gct.register.render = new RenderRegister();
|
|
33
35
|
else console.warn("渲染注册已存在,可能存在重复注册问题,请检查是否有重复引入渲染包的情况");
|
|
34
36
|
}
|
|
37
|
+
var deleteAndInsertArr = (arr, deleteIndex, insertIndex) => {
|
|
38
|
+
if (deleteIndex < 0 || deleteIndex >= arr.length || insertIndex < 0 || insertIndex > arr.length) {
|
|
39
|
+
console.log("下标超出数组范围");
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const deletedElement = arr.splice(deleteIndex, 1)[0];
|
|
43
|
+
arr.splice(insertIndex, 0, deletedElement);
|
|
44
|
+
};
|
|
35
45
|
//#endregion
|
|
36
|
-
export { Context, ControllerType, DESIGN_DATA_KEY_TAG, DESIGN_TYPE, DateFormat, DateRangeMap, DatepickerRanges, DesignItemAttribute, DesignRenderViewPrefix, Events, FieldSchema, GctComponent, Globals, HandwritingPad_default as HandwritingPad, PageTypeEnum, RenderNodeRegister, RenderNodeType, RenderPluginPgkUtil, RenderRegister, addDataByForm, cacheAdapter, calculate, calculateDepResult, defaultValMap, dependencyToShow, dependencyToShowSync, formMap, getDefaultDate, getDisabledDate, getMobileDateRange, getPageTitle, getPremission, getRefInfoId, globalVarCaches, identify, initFieldWidgetRuntime, insetDep, onInit, pageDataforJson, pageGlobaVariables, schemaToStyle, setDataByForm, setFormData, tableWidgetByDept, tableWidgetToShow, transSelectData, transformData, transformDataToDict, transformPropsField, transformSourceData, useDependency, useDependencyByRequired, useDependencyToShow, useDependencyToShowList, useDesignRenderController, useDisplayRuleColumnByStyles, useDisplayRuleOptions, useGctSelect, useGetBodyBySearch, useStyle, useVisibileByRuleHook };
|
|
46
|
+
export { Context, ControllerType, DESIGN_DATA_KEY_TAG, DESIGN_TYPE, DateFormat, DateRangeMap, DatepickerRanges, DesignItemAttribute, DesignRenderViewPrefix, Events, FieldSchema, GctComponent, Globals, HandwritingPad_default as HandwritingPad, PageTypeEnum, RenderNodeRegister, RenderNodeType, RenderPluginPgkUtil, RenderRegister, addDataByForm, cacheAdapter, calculate, calculateDepResult, defaultValMap, deleteAndInsertArr, dependencyToShow, dependencyToShowSync, formMap, getDefaultDate, getDisabledDate, getIExp, getIKeywordFieldKeys, getMobileDateRange, getPageTitle, getPremission, getQueryDateByKeyWord, getRefInfoId, globalVarCaches, identify, initFieldWidgetRuntime, insetDep, 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 };
|
package/es/utils/index.mjs
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare function getIExp(exp: string, ignoreOptions?: never[]): string;
|
|
2
|
+
export declare function getIKeywordFieldKeys(searchField: string[], ignoreOptions?: never[]): string[];
|
|
3
|
+
/**
|
|
4
|
+
* 关键字段搜索
|
|
5
|
+
* @param searchField 需要搜索的字段
|
|
6
|
+
* @param keyword 搜索的关键字
|
|
7
|
+
*/
|
|
8
|
+
export declare const getQueryDateByKeyWord: ({ searchField, keyword, }: IObject) => object;
|
|
9
|
+
/**
|
|
10
|
+
* 数据筛选生成查询条件
|
|
11
|
+
* @param datafilter
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export declare const useQueryfilter: (datafilter: IObject[] | IObject) => {
|
|
15
|
+
query: IObject;
|
|
16
|
+
getExp: (...arg: string[]) => string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { globalVarCaches } from "../../Event/utils/runGlobalByPage.mjs";
|
|
2
|
+
import "../../Event/index.mjs";
|
|
3
|
+
import { isArray } from "lodash-es";
|
|
4
|
+
//#region src/utils/search/listhook.ts
|
|
5
|
+
/** 数据类型 */
|
|
6
|
+
var ValueTypeEnum = {
|
|
7
|
+
FIXED: "FIXED",
|
|
8
|
+
SYS: "SYS",
|
|
9
|
+
FIELD: "FIELD",
|
|
10
|
+
VAR: "VAR"
|
|
11
|
+
};
|
|
12
|
+
function getIExp(exp, ignoreOptions = []) {
|
|
13
|
+
if (ignoreOptions?.[0] == "ignoreCase") return exp?.replace(/\./g, ".i");
|
|
14
|
+
return exp;
|
|
15
|
+
}
|
|
16
|
+
function getIKeywordFieldKeys(searchField, ignoreOptions = []) {
|
|
17
|
+
if (ignoreOptions?.[0] == "ignoreCase") return searchField?.map((i) => {
|
|
18
|
+
const arr = i.split(".");
|
|
19
|
+
return `${arr[0]}.i${arr[1]}`;
|
|
20
|
+
});
|
|
21
|
+
return searchField;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 关键字段搜索
|
|
25
|
+
* @param searchField 需要搜索的字段
|
|
26
|
+
* @param keyword 搜索的关键字
|
|
27
|
+
*/
|
|
28
|
+
var getQueryDateByKeyWord = ({ searchField, keyword }) => {
|
|
29
|
+
if (!keyword) return {};
|
|
30
|
+
return searchField?.reduce((total, filedKey) => {
|
|
31
|
+
const expkey = filedKey.split(".").length > 1 ? filedKey : filedKey + ".like";
|
|
32
|
+
total[expkey] = keyword;
|
|
33
|
+
return total;
|
|
34
|
+
}, {}) || {};
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* 数据筛选生成查询条件
|
|
38
|
+
* @param datafilter
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
var useQueryfilter = (datafilter) => {
|
|
42
|
+
let queryfilter = {}, exp = "";
|
|
43
|
+
if (isArray(datafilter)) queryfilter = { ...datafilter.reduce((total, curr) => {
|
|
44
|
+
const key = curr.key + "." + curr.ope;
|
|
45
|
+
total[key] = curr.value;
|
|
46
|
+
return total;
|
|
47
|
+
}, {}) };
|
|
48
|
+
else try {
|
|
49
|
+
const dataRule = JSON.parse(datafilter?.dataRule);
|
|
50
|
+
exp = dataRule?.exp;
|
|
51
|
+
const typeMap = dataRule?.typeMap || {};
|
|
52
|
+
const query = dataRule?.query || {};
|
|
53
|
+
for (const k in query) if (typeMap[k] === ValueTypeEnum.VAR) queryfilter[k] = globalVarCaches.value?.[query[k]]?.value;
|
|
54
|
+
else queryfilter[k] = query[k];
|
|
55
|
+
} catch (error) {
|
|
56
|
+
console.log(error);
|
|
57
|
+
}
|
|
58
|
+
function getExp(...arg) {
|
|
59
|
+
const explist = [exp, ...arg].filter((i) => i);
|
|
60
|
+
const expkey = explist.join(",");
|
|
61
|
+
if (explist.length > 1) return `AND(${expkey})`;
|
|
62
|
+
else return expkey;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
query: queryfilter,
|
|
66
|
+
getExp
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
export { getIExp, getIKeywordFieldKeys, getQueryDateByKeyWord, useQueryfilter };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/render",
|
|
3
|
-
"version": "0.1.5-dev.
|
|
3
|
+
"version": "0.1.5-dev.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台网页端底包",
|
|
6
6
|
"loader": "dist/loader.esm.min.js",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@gct-paas/api": "^0.1.2-dev.3",
|
|
46
|
-
"@gct-paas/core": "0.1.5-dev.
|
|
47
|
-
"@gct-paas/core-web": "0.1.5-dev.
|
|
48
|
-
"@gct-paas/schema": "0.1.5-dev.
|
|
49
|
-
"@gct-paas/scss": "0.1.5-dev.
|
|
46
|
+
"@gct-paas/core": "0.1.5-dev.1",
|
|
47
|
+
"@gct-paas/core-web": "0.1.5-dev.1",
|
|
48
|
+
"@gct-paas/schema": "0.1.5-dev.1",
|
|
49
|
+
"@gct-paas/scss": "0.1.5-dev.1",
|
|
50
50
|
"@vueuse/core": "^14.1.0",
|
|
51
51
|
"axios": "^1.13.2",
|
|
52
52
|
"bignumber.js": "^10.0.2",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"escodegen": "^2.1.0",
|
|
55
55
|
"esprima-next": "5.8.4",
|
|
56
56
|
"estraverse": "^5.3.0",
|
|
57
|
+
"lodash-es": "^4.17.23",
|
|
57
58
|
"qs": "^6.15.0",
|
|
58
59
|
"qx-util": "^0.4.8",
|
|
59
60
|
"vue": "^3.5.30"
|
|
@@ -64,12 +65,12 @@
|
|
|
64
65
|
"@types/estree": "^1.0.8"
|
|
65
66
|
},
|
|
66
67
|
"peerDependencies": {
|
|
67
|
-
"@gct-paas/api": "
|
|
68
|
+
"@gct-paas/api": "^0.1.2-dev.3",
|
|
68
69
|
"@gct-paas/core": "*",
|
|
69
70
|
"@gct-paas/core-web": "*",
|
|
70
71
|
"@gct-paas/schema": "*",
|
|
71
72
|
"@gct-paas/scss": "*",
|
|
72
73
|
"vue": ">=3"
|
|
73
74
|
},
|
|
74
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "d554696d0991c1d14dd5a2a43b277bafe3976371"
|
|
75
76
|
}
|