@gct-paas/render 0.1.5-dev.3 → 0.1.5-dev.4

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.
Files changed (27) hide show
  1. package/dist/index.min.css +1 -1
  2. package/dist/loader.esm.min.js +1 -1
  3. package/es/Event/Dependency/controller.mjs +2 -2
  4. package/es/Event/Dependency/displayRule.mjs +2 -2
  5. package/es/Event/Dependency/useDependency.mjs +2 -2
  6. package/es/Event/baseEvent.mjs +5 -5
  7. package/es/Event/utils/runGlobalByPage.d.ts +4 -4
  8. package/es/Event/utils/runGlobalByPage.mjs +1 -1
  9. package/es/controller/design-render/design-render.controller.d.ts +1 -1
  10. package/es/hooks/useStorageRef.mjs +1 -1
  11. package/es/hooks/widgets/useFileAttrsHooks.d.ts +6 -6
  12. package/es/hooks/widgets/useFileAttrsHooks.mjs +1 -1
  13. package/es/index.d.ts +4 -2
  14. package/es/index.mjs +12 -9
  15. package/es/modules/vue3-dnd/components/vue3-dnd-draggable/vue3-dnd-draggable.css +73 -0
  16. package/es/modules/vue3-dnd/components/vue3-dnd-draggable/vue3-dnd-draggable.d.ts +70 -0
  17. package/es/modules/vue3-dnd/components/vue3-dnd-draggable/vue3-dnd-draggable.mjs +119 -0
  18. package/es/modules/vue3-dnd/components/vue3-dnd-draggable-item/vue3-dnd-draggable-item.css +74 -0
  19. package/es/modules/vue3-dnd/components/vue3-dnd-draggable-item/vue3-dnd-draggable-item.d.ts +69 -0
  20. package/es/modules/vue3-dnd/components/vue3-dnd-draggable-item/vue3-dnd-draggable-item.mjs +165 -0
  21. package/es/modules/vue3-dnd/index.d.ts +3 -0
  22. package/es/modules/vue3-dnd/index.mjs +2 -0
  23. package/es/modules/vue3-dnd/interface/i-vue3-dnd-draggable-options.d.ts +294 -0
  24. package/es/modules/vue3-dnd/interface/index.d.ts +1 -0
  25. package/es/utils/expression/index.mjs +1 -1
  26. package/es/utils/expression/regularExpression/methods.mjs +1 -1
  27. package/package.json +13 -12
@@ -1,2 +1,2 @@
1
- .handwriting-pad[data-v-d5b980b7]{display:inline-block}.canvas[data-v-d5b980b7]{touch-action:none;background:0 0;display:block}
1
+ .handwriting-pad[data-v-d5b980b7]{display:inline-block}.canvas[data-v-d5b980b7]{touch-action:none;background:0 0;display:block}.gct-vue3-dnd-draggable-item{position:relative}.gct-vue3-dnd-draggable-item.is-dragging .gct-vue3-dnd-draggable-preview{display:inline}.gct-vue3-dnd-draggable-item.is-dragging{opacity:.3}.gct-vue3-dnd-draggable .list-enter-active,.gct-vue3-dnd-draggable .list-leave-active{transition:all .5s}.gct-vue3-dnd-draggable .list-enter-from,.gct-vue3-dnd-draggable .list-leave-to{opacity:0;transform:translate(30px)}
2
2
  /*$vite$:1*/
@@ -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 _,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=({collation:e,collationSort:t,collationField:n})=>e?e.filter(e=>e.collationField).map(e=>({sortField:e.collationField,sortType:e.collationSort})):t?[{sortField:n,sortType:t}]:[],Ri=Object.prototype.toString;function Ai(e,t){return Ri.call(e)===`[object ${t}]`}function xi(e){return void 0!==e}function Yi(e){return!xi(e)}function Pi(e){return null!==e&&Ai(e,"Object")}function $i(e){return Wi(e)||ji(e)?0===e.length:e instanceof Map||e instanceof Set?0===e.size:!!Pi(e)&&0===Object.keys(e).length}function ki(e){return Ai(e,"Date")}function Fi(e){return null===e}function Hi(e){return Yi(e)&&Fi(e)}function Vi(e){return Yi(e)||Fi(e)}function Bi(e){return Ai(e,"Number")}function Li(e){return Ai(e,"Promise")&&Pi(e)&&Ui(e.then)&&Ui(e.then)}function ji(e){return Ai(e,"String")}function Ui(e){return"function"==typeof e}function Gi(e){return Ai(e,"Boolean")}function Ki(e){return Ai(e,"RegExp")}function Wi(e){return!!e&&Array.isArray(e)}function qi(e){return"undefined"!=typeof window&&Ai(e,"Window")}function zi(e){return Pi(e)&&!!e.tagName}function Ji(e){return Ai(e,"Map")}function Qi(e){return/^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?/.test(e)}function Xi(e){return void 0===e||!e&&0!==e&&"0"!==e||!/[^\s]/.test(e+"")}function Zi(e,t){const n=[],r=e.props.fieldType,i=V(()=>e.props.readonly&&r&&!n.includes(r)&&(void 0===t.value||""===t.value||null===t.value));return{RenderEmptyValue:/* @__PURE__ */U((e,t)=>()=>_gct.store.getEmptyDisplay),isEmpty:i}}var eo={class:"handwriting-pad"},to=["width","height"],no=/* @__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",eo,[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,to)]))}})),ro=class{constructor(){Se(this,"context",{})}},io=class{constructor(){Se(this,"isDestroy",!1)}},oo=class{constructor(e){Se(this,"state",new io),this.model=e}mounted(){}destroy(){}},so=class extends oo{},ao=class extends oo{},uo=class{constructor(){Se(this,"state",new ro),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 so(e));if(t.mode===fe.ITEM)return void this.item.set(e.id,new ao(e))}this.item.set(e.id,new oo(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 lo(e){let t=W(Fe.DESIGN_RENDER);return t||(t=e?e():new uo,t.state=ne(t.state),te(Fe.DESIGN_RENDER,t),Q(()=>{t.mounted()}),Z(()=>{t.unmounted()})),t}var co=()=>{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 fo(){_gct.register.render?console.warn("渲染注册已存在,可能存在重复注册问题,请检查是否有重复引入渲染包的情况"):_gct.register.render=new Ne}var po=(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)},ho=new URL("./index.min.css",import.meta.url);b.load(ho.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,no 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,po as deleteAndInsertArr,bi as dependencyToShow,wi as dependencyToShowSync,Zi as emptyValueDisplay,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,_i as getQuerySort,gr as getRefInfoId,xr as globalVarCaches,zn as identify,sr as initFieldWidgetRuntime,di as insetDep,Ai as is,Wi as isArray,Gi as isBoolean,ki as isDate,xi as isDef,zi as isElement,$i as isEmpty,Xi as isEmptyStr,Ui as isFunction,Ji as isMap,Fi as isNull,Hi as isNullAndUnDef,Vi as isNullOrUnDef,Bi as isNumber,Pi as isObject,Li as isPromise,Ki as isRegExp,ji as isString,Yi as isUnDef,Qi as isUrl,qi as isWindow,fo 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,co as useAsyncFileAttrs,Ii as useDependency,Ti as useDependencyByRequired,vi as useDependencyToShow,Ei as useDependencyToShowList,lo as useDesignRenderController,gi as useDisplayRuleColumnByStyles,mi as useDisplayRuleOptions,Sr as useGctSelect,vr as useGetBodyBySearch,Ci as useQueryfilter,rr as useStyle,pi 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 c,FieldSysVarDefaultValueEnum as l,FormComponents as d,GLOBAL_VAR_TYPE as f,INNER_EVENT as p,OpinionTypeEnum as h,PluginModeEnum as g,PluginPgkUtil as y,SEARCH_SERVICE as m,SYSTEM_VAR_PREFIX as v,cssLoader as b,functionMap as w,innerVarIds as O,isMultipleOperator as D,operator2FuncMap as E,t as I,useNamespace as S,usePermissionStore as T}from"@gct-paas/core";import C from"dayjs";import*as M from"vue";import{TransitionGroup as N,computed as x,createElementBlock as R,createElementVNode as P,createVNode as A,customRef as _,defineComponent as k,getCurrentInstance as Y,getCurrentScope as $,inject as j,isVNode as H,nextTick as V,onActivated as F,onBeforeUnmount as B,onMounted as U,onScopeDispose as L,onUnmounted as G,openBlock as W,provide as K,reactive as q,readonly as z,ref as J,shallowReactive as X,shallowRef as Q,toRaw as Z,toRef as ee,toRefs as te,toValue as ne,unref as re,watch as ie}from"vue";import{DesignNodeMode as oe,extractFontStyle as se,generateWrapperStyle as ae,propsToStyle as ue}from"@gct-paas/schema";import ce from"bignumber.js";import*as le from"lodash-es";import{cloneDeep as de,differenceBy as fe,get as pe,isArray as he,isEqual as ge,isNull as ye,isUndefined as me,merge as ve,pick as be}from"lodash-es";import*as we from"esprima-next";import Oe from"estraverse";import De from"qs";var Ee=Object.create,Ie=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,Te=Object.getOwnPropertyNames,Ce=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty,Ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xe=(e,t)=>{let n={};for(var r in e)Ie(n,r,{get:e[r],enumerable:!0});return t||Ie(n,Symbol.toStringTag,{value:"Module"}),n},Re=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=Te(t),s=0,a=o.length;s<a;s++)i=o[s],Me.call(e,i)||i===n||Ie(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=Se(t,i))||r.enumerable});return e},Pe=(e,t,n)=>(n=null!=e?Ee(Ce(e)):{},Re(!t&&e&&e.__esModule?n:Ie(n,"default",{value:e,enumerable:!0}),e));function Ae(e){return Ae="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},Ae(e)}function _e(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ae(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ae(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ke=class{constructor(){_e(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())}},Ye="view-design",$e="id",je=/* @__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}({}),He={WEEK_NOW:e=>{const t=C().startOf("week").add(1,"day"),n=C().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=C().startOf("month"),n=C().endOf("month"),r=t.valueOf(),i=n.valueOf();return{disabled:e<r||e>i,minDate:t,maxDate:n}},QUARTER_NOW:e=>{const t=C().startOf("quarter"),n=C().endOf("quarter"),r=t.valueOf(),i=n.valueOf();return{disabled:e<r||e>i,minDate:t,maxDate:n}},YEAR_NOW:e=>{const t=C().startOf("year"),n=C().endOf("year"),r=t.valueOf(),i=n.valueOf();return{disabled:e<r||e>i,minDate:t,maxDate:n}},WEEk_BEFORE:e=>{C.locale("zh-cn");const t=C().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=C().add(-1,"month").startOf("month"),n=C().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=C().add(-1,"quarter").startOf("quarter"),n=C().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=C().add(-1,"year").startOf("year"),n=C().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=C().add(-1,"day");return{disabled:e<t.valueOf(),maxDate:t}},DATE_AFTER:e=>{const t=C();return{disabled:e>t.valueOf(),minDate:t}}},Ve=(e,t)=>{const n=C(e).valueOf(),r=He[t];if(r){const{disabled:e}=r(n);return e}return!1},Fe=e=>{const t=He[e];if(t){const{minDate:e,maxDate:n}=t(0);return Object.assign({},e&&{minDate:new Date(e)},n&&{maxDate:new Date(n)})}return{}},Be=(e,t)=>{let n;switch(e){case l.SYS_DATE:n=C().format(t??"YYYY-MM-DD");break;case l.SYS_DATE_TIME:n=C().format(t??"YYYY-MM-DD HH:mm:ss");break;case l.SYS_TIME:n=C().format(t??"HH:mm:ss")}return n},Ue={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"]}},Le={[r.WEEK_NOW]:""},Ge=/* @__PURE__ */function(e){return e.DESIGN_RENDER="design-render",e}({}),We=/* @__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}({}),Ke=/* @__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}({}),qe=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,We.CUSTOM_HOME)}static registerDesignEditorNode(e,t){this.register(e,t,We.DESIGN_EDITOR)}static getCustomHome(e){return this.get(e,We.CUSTOM_HOME)}static getDesignEditorNode(e){return this.get(e,We.DESIGN_EDITOR)}};_e(qe,"map",/* @__PURE__ */new Map),_e(qe,"cache",/* @__PURE__ */new Map);var ze={class:"handwriting-pad"},Je=["width","height"],Xe=/* @__PURE__ */((e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n})(/* @__PURE__ */k({__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=J(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 c(e){e.preventDefault(),o=!0;const{x:t,y:n}=u(e);s=t,a=n}function l(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 U(()=>{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)=>(W(),R("div",ze,[P("canvas",{ref_key:"canvasRef",ref:r,width:e.width,height:e.height,class:"canvas",onMousedown:c,onMousemove:l,onMouseup:d,onMouseleave:d,onTouchstart:c,onTouchmove:l,onTouchend:d},null,40,Je)]))}}),[["__scopeId","data-v-d5b980b7"]]),Qe="undefined"!=typeof window&&"undefined"!=typeof document,Ze=("undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),Object.prototype.toString),et=()=>{},tt=e=>e();function nt(e,t={}){let n,r,i=et;const o=e=>{clearTimeout(e),i(),i=et};let s;return a=>{const u=ne(e),c=ne(t.maxWait);return n&&o(n),u<=0||void 0!==c&&c<=0?(r&&(o(r),r=void 0),Promise.resolve(a())):new Promise((e,l)=>{i=t.rejectOnCancel?l:e,s=a,c&&!r&&(r=setTimeout(()=>{n&&o(n),r=void 0,e(s())},c)),n=setTimeout(()=>{r&&o(r),r=void 0,e(a())},u)})}}function rt(e){return Array.isArray(e)?e:[e]}function it(e){const t=Object.create(null);return n=>t[n]||(t[n]=e(n))}var ot=/\B([A-Z])/g,st=(it(e=>e.replace(ot,"-$1").toLowerCase()),/-(\w)/g);function at(e,t,n={}){const{eventFilter:r=tt,...i}=n;return ie(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 ut(e,t=!0,n){!function(e){return e||Y()}(n)?t?e():V(e):U(e,n)}function ct(e,t,n={}){const{debounce:r=0,maxWait:i,...o}=n;return at(e,t,{...o,eventFilter:nt(r,{maxWait:i})})}it(e=>e.replace(st,(e,t)=>t?t.toUpperCase():""));var lt=Qe?window:void 0,dt=Qe?window.document:void 0;function ft(...e){const t=x(()=>{const t=rt(ne(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]"===Ze.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"},ie(()=>{var n,r;return[null!==(n=null===(r=t.value)||void 0===r?void 0:r.map(e=>function(e){var t;const n=ne(e);return null!==(t=null==n?void 0:n.$el)&&void 0!==t?t:n}(e)))&&void 0!==n?n:[lt].filter(e=>null!=e),rt(ne(t.value?e[1]:e[0])),rt(re(t.value?e[2]:e[1])),ne(t.value?e[3]:e[2])]},n,{...r,immediate:!0});var n,r}Qe&&window.navigator,Qe&&window.location;var pt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ht="__vueuse_ssr_handlers__",gt=/* @__PURE__ */yt();function yt(){return ht in pt||(pt[ht]=pt[ht]||{}),pt[ht]}var mt={boolean:{read:e=>"true"===e,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},vt="vueuse-storage";function bt(e,t,n,r={}){var i;const{flush:o="pre",deep:s=!0,listenToStorageChanges:a=!0,writeDefaults:u=!0,mergeDefaults:c=!1,shallow:l,window:d=lt,eventFilter:f,onError:p=e=>{console.error(e)},initOnMounted:h}=r,g=(l?Q:J)("function"==typeof t?t():t),y=x(()=>ne(e));if(!n)try{n=(gt.getDefaultStorage||(()=>null==lt?void 0:lt.localStorage))()}catch(S){p(S)}if(!n)return g;const m=ne(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"}(m),b=null!==(i=r.serializer)&&void 0!==i?i:mt[v],{pause:w,resume:O}=function(e,t,n={}){const{eventFilter:r,initialState:i="active",...o}=n,{eventFilter:s,pause:a,resume:u,isActive:c}=function(e=tt,t={}){const{initialState:n="active"}=t,r=function(...e){if(1!==e.length)return ee(...e);const t=e[0];return"function"==typeof t?z(_(()=>({get:t,set:et}))):J(t)}("active"===n);return{isActive:z(r),pause:function(){r.value=!1},resume:function(){r.value=!0},eventFilter:(...t)=>{r.value&&e(...t)}}}(r,{initialState:i});return{stop:at(e,t,{...o,eventFilter:s}),pause:a,resume:u,isActive:c}}(g,e=>function(e){try{const t=n.getItem(y.value);if(null==e)E(t,null),n.removeItem(y.value);else{const r=b.write(e);t!==r&&(n.setItem(y.value,r),E(t,r))}}catch(S){p(S)}}(e),{flush:o,deep:s,eventFilter:f});ie(y,()=>I(),{flush:o});let D=!1;function E(e,t){if(d){const r={key:y.value,oldValue:e,newValue:t,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",r):new CustomEvent(vt,{detail:r}))}}function I(e){if(!e||e.storageArea===n)if(e&&null==e.key)g.value=m;else if(!e||e.key===y.value){w();try{const t=b.write(g.value);void 0!==e&&(null==e?void 0:e.newValue)===t||(g.value=function(e){const t=e?e.newValue:n.getItem(y.value);if(null==t)return u&&null!=m&&n.setItem(y.value,b.write(m)),m;if(!e&&c){const e=b.read(t);return"function"==typeof c?c(e,m):"object"!==v||Array.isArray(e)?e:{...m,...e}}return"string"!=typeof t?t:b.read(t)}(e))}catch(S){p(S)}finally{e?V(O):O()}}}return d&&a&&(n instanceof Storage?ft(d,"storage",e=>{h&&!D||I(e)},{passive:!0}):ft(d,vt,e=>{h&&!D||I(e.detail)})),h?ut(()=>{D=!0,I()}):I(),g}function wt(e,t){const n=(null==t?void 0:t.cache)?X(t.cache):X(/* @__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 Ot=0;Number.POSITIVE_INFINITY;var Dt=/* @__PURE__ */function(e){return e.SELECT_ID="$VAR_GCT_SELECT_ID",e}({}),Et=function(e,t,n={}){const{window:r=lt}=n;return bt(e,t,null==r?void 0:r.localStorage,n)}("GCT_APP_GlobalCache",{}),It=e=>{const t=x({get:()=>Et.value[e]||{},set(t){Et.value[e]=t}});return{selectID:x({get:()=>t.value[Dt.SELECT_ID],set(e){t.value[Dt.SELECT_ID]?t.value[Dt.SELECT_ID]=e:t.value={...t.value,[Dt.SELECT_ID]:e}}}),cacheMap:t}},St=class{static runApp({userInfo:e,env:t,aid:n}){this.ENV=t,this.AID=n,this.userInfo=e}};_e(St,"ENV",void 0),_e(St,"AID",void 0),_e(St,"userInfo",void 0);var Tt={[f.DATE]:{callback:e=>C(e,["YYYY-MM-DD","YYYY/MM/DD"],!0).isValid(),message:"日期变量格式为YYYY-MM-DD,YYYY/MM/DD"},[f.TIME]:{callback:e=>C(e,"HH:mm:ss",!0).isValid(),message:"时间变量格式HH:mm:ss"},[f.DATETIME]:{callback:e=>C(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"}},Ct=/* @__PURE__ */function(e){return e.WEB="web_module",e.MOBILE="mobile_module",e.PAD="pad_module",e}({}),Mt={[Ct.WEB]:{getPageInfo:_gct.api.apaas.webpage.getInfo},[Ct.MOBILE]:{getPageInfo:_gct.api.apaas.mobilePage.getInfo},[Ct.PAD]:{getPageInfo:_gct.api.apaas.padPage.getInfo}},Nt=J({}),xt=J({}),Rt=J({});function Pt(e,t){Rt.value[e]=t}var At=J({pageStyle:{},pageConfig:{},pageName:""}),_t=ee(()=>{const{title:e}=At.value.pageConfig||{};return e}),kt=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);xt.value[t.key]=(({value:e,appredis:t,key:n,type:r})=>{var i;const o="dev"!==St.ENV&&t,{cacheMap:s}=It(`${St.AID}_${null===(i=St.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;Nt.value[e.key]={value:null===(t=e.varInfo)||void 0===t?void 0:t.defaultValue,type:e.varInfo.type}}),!this.startRuning){this.startRuning=!0;try{await Promise.all([this.initvars(),this.inithooks()])}catch(n){console.log(n)}}}static getGlobalVar(e){const t=xt.value[e];return t?t.value:console.warn("变量key不存在")}static async setGlobalVar(e,t){const n=xt.value[e];if(!n)return console.warn("变量key不存在");n.value=t}static getPageVar(e){const t=Nt.value[e];return t?t.value:console.warn("变量key不存在")}static async setPageVar(e,t){const n=Nt.value[e];if(!n)return console.warn("变量key不存在");await function(e,t){if(t===f.NULL)return!0;const{callback:n,message:r}=Tt[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),Nt.value[e]&&(Nt.value[e].value=t)}static getPageGlobalVar(e){var t;return null===(t=Nt.value[e])||void 0===t?void 0:t.value}static setPageGlobalVar(e,t){Nt.value[e]?Nt.value[e].value=t:Nt.value[e]={value:t,type:"string"}}static async initPageByid(e,t=Ct.WEB){this.pageID=e;const n=Mt[t].getPageInfo,r=await n({id:e}),{runtimeJson:i,name:o}=r||{};if(At.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),At.value.pageConfig=s.pageConfig||{},At.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();At.value.pageName=r;const i=JSON.parse(n);return await this.initGlobalS(i),At.value.pageConfig=i.pageConfig||{},At.value.pageStyle=i.pageStyle||{},{res:t,data:i,name:r}}static usePageHooks(t,n,r,i){const o=J(!1);return U(async()=>{await V();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)}),B(async()=>{At.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()}),F(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}}};_e(kt,"modalsCache",{}),_e(kt,"pageID",""),_e(kt,"permissions",{}),_e(kt,"ContextCache",{}),_e(kt,"startRuning",!1),_e(kt,"globalHookCaches",{pageMounted:[],pageActivated:[],pageDestroyed:[]});var Yt=kt.getPremission.bind(kt),$t=/* @__PURE__ */Ne((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 c=s.utcOffset;s.utcOffset=function(r,i){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var 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 l=s.format;s.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},s.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var d=s.toDate;s.toDate=function(e){return"s"===e&&this.$offset?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)}}})}),jt=/* @__PURE__ */Ne((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],c=u.type,l=u.value,d=e[c];d>=0&&(o[d]=parseInt(l,10))}var f=o[3],p=24===f?0:f,h=o[0]+"-"+o[1]+"-"+o[2]+" "+p+":"+o[4]+":"+o[5]+":000",g=+t;return(i.utc(h).valueOf()-(g-=g%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),c=15*-Math.round(s.getTimezoneOffset()/15)-u;if(Number(c)){if(n=i(a,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var l=n.utcOffset();n=n.add(r-l,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},u.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),n=s(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var c=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.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 c=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),l=c[0],d=c[1],f=i(l).utcOffset(d);return f.$x.$timezone=s,f},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){o=e}}})}),Ht=/* @__PURE__ */Ne((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)}}})}),Vt=/* @__PURE__ */Ne((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]}}})}),Ft=/* @__PURE__ */Ne((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)}}})}),Bt=/* @__PURE__ */xe({ABS:()=>kn,ADD:()=>En,AND:()=>Qt,AVERAGE:()=>_n,CONCAT:()=>un,COUNT:()=>hr,DATE2TIMESTAMP:()=>Gn,DATEFORMAT:()=>Wn,DAY:()=>Xn,DIVISION:()=>Tn,EQ:()=>en,FINDSTR:()=>vn,FIXED:()=>Cn,GE:()=>on,GET:()=>Vn,GT:()=>sn,HEADPUSH:()=>Un,HOUR:()=>Qn,IF:()=>qt,ISDATERANGE:()=>ur,ISEMPTY:()=>zt,ISNULL:()=>Jt,ISTIMERANGE:()=>cr,ISUNDEFINED:()=>Xt,LARGE:()=>Rn,LASTMONTHRANGE:()=>rr,LASTQUARTER:()=>ar,LASTWEEKRANGE:()=>tr,LASTYEARRANGE:()=>or,LE:()=>nn,LEN:()=>an,LOWER:()=>fn,LT:()=>rn,LTRIM:()=>hn,MAX:()=>xn,MIN:()=>Pn,MINUTE:()=>Zn,MOD:()=>Yn,MONTH:()=>Jn,MONTHRANGE:()=>nr,MULTIPLICATION:()=>Sn,NE:()=>tn,NOW:()=>Kn,OR:()=>Zt,PARSENUMBER:()=>wn,POWER:()=>jn,PUSH:()=>Bn,PUT:()=>Fn,QUARTER:()=>sr,REDUCE:()=>In,REPEAT:()=>yn,REPLACE:()=>mn,ROUND:()=>Mn,ROUNDUP:()=>Nn,RTRIM:()=>gn,SEARCHSTR:()=>bn,SEQMAP:()=>fr,SMALL:()=>An,SPLIT:()=>On,SQRT:()=>Hn,STDEV:()=>gr,SUBSTR:()=>ln,SUBSTRING:()=>cn,SUM:()=>Dn,SUMSQ:()=>pr,TIMESTAMP2DATE:()=>Ln,TODAY:()=>qn,TRIM:()=>pn,TUPLE:()=>dr,UPPER:()=>dn,WEEKRANGE:()=>er,YEAR:()=>zn,YEARRANGE:()=>ir}),Ut=/* @__PURE__ */Pe($t(),1),Lt=/* @__PURE__ */Pe(jt(),1),Gt=/* @__PURE__ */Pe(Ht(),1),Wt=/* @__PURE__ */Pe(Vt(),1),Kt=/* @__PURE__ */Pe(Ft(),1);function qt(e,t,n){return e?t:n}function zt(e){return null==e||""===e||0===e}function Jt(e){return ye(e)}function Xt(e){return me(e)}function Qt(...e){return(()=>{for(const t of e)if(!t)return!1;return!0})()}function Zt(...e){return e.some(e=>e)}function en(e,t){return ge(e,t)}function tn(e,t){return e!==t}function nn(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<=t}function rn(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<t}function on(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>=t}function sn(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>t}function an(e){return(null==e?void 0:e.length)||0}function un(...e){return e.join("")}function cn(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 ln(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 dn(e=""){return e.toUpperCase()}function fn(e=""){return e.toLowerCase()}function pn(e=""){return e.trim()}function hn(e=""){return e.replace(/^\s\s*/,"")}function gn(e=""){return e.replace(/\s\s*$/,"")}function yn(e="",t=""){return(null===(n=e.match(new RegExp(t,"g")))||void 0===n?void 0:n.length)||null;var n}function mn(e="",t="",n=""){return e.replace(new RegExp(t,"g"),n)}function vn(e="",t=""){return e.includes(t)}function bn(e="",t=""){return(null===(n=e.match(new RegExp(t,"g")))||void 0===n?void 0:n.length)||0;var n}function wn(e=""){return(()=>{const t=parseFloat(e);return isNaN(t)?null:t})()}function On(e="",t=""){return e.split(t)}function Dn(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?t.reduce(yr,0):""}function En(...e){return e.flat().reduce(yr,0)}function In(e,...t){return t.reduce(mr,e)}function Sn(e,...t){const n=t.flat().filter(e=>""!==e&&null!=e);return n.length?n.reduce(vr,e):""}function Tn(e,...t){return t.reduce(br,e)}function Cn(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 Mn(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 Nn(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 ce(e).decimalPlaces(t,ce.ROUND_UP).toNumber()}function xn(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.max.apply(null,t):""}function Rn(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 Pn(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.min.apply(null,t):""}function An(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 _n(...e){const t=e.flat().filter(e=>""!==e&&null!=e),n=t.length;if(!n)return"";let r=new ce(0);for(const i of t)r=r.plus(i);return r.dividedBy(n).toNumber()}function kn(e){return Math.abs.call(null,e)}function Yn(e,t){return(()=>{if(0===e)throw new Error("The second value should not be zero.");const n=new ce(e).mod(t).toNumber();return isNaN(n)?"":n})()}function $n(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 jn(e,t){return(()=>{const n=$n(e),r=$n(t);return null===n||null===r?NaN:Math.abs(r)>1e9?r>0?1/0:0:Math.pow(n,r)})()}function Hn(e){return(()=>{const t=$n(e);return null===t?NaN:Math.sqrt(t)})()}function Vn(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 Fn(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 Bn(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 Un(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 Ln(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 Gn(e){if(e)return C(e).unix()}function Wn(e,t){if(e)return C(e).format(t)}function Kn(){return C().format("YYYY-MM-DD HH:MM:ss")}function qn(){return C().format("YYYY-MM-DD")}function zn(e){return C(e).year()}function Jn(e){return C(e).month()}function Xn(e){return C(e).day()}function Qn(e){return C(e).hour()}function Zn(e){return C(e).minute()}function er(){return[lr(C().startOf("week").toDate()),lr(C().endOf("week").toDate())]}function tr(){return[lr(C().subtract(1,"week").startOf("week").toDate()),lr(C().subtract(1,"week").endOf("week").toDate())]}function nr(){return[lr(C().startOf("month").toDate()),lr(C().endOf("month").toDate())]}function rr(){return[lr(C().subtract(1,"month").startOf("month").toDate()),lr(C().subtract(1,"month").endOf("month").toDate())]}function ir(){return[lr(C().startOf("year").toDate()),lr(C().endOf("year").toDate())]}function or(){return[lr(C().subtract(1,"year").startOf("year").toDate()),lr(C().subtract(1,"year").endOf("year").toDate())]}function sr(){return(()=>{const e=Math.floor((C().month()+3)/3);return[lr(C().quarter(e).startOf("quarter").toDate()),lr(C().quarter(e).endOf("quarter").toDate())]})()}function ar(){return(()=>{const e=Math.floor((C().month()+3)/3);return[lr(C().quarter(e-1).startOf("quarter").toDate()),lr(C().quarter(e-1).endOf("quarter").toDate())]})()}function ur(e,t){return(()=>{const[n,r]=t;return e>=n&&e<=r})()}function cr(e,t){return(()=>{const[n,r]=t,i=C(e,"HH:mm");if(n>r){const e=C(n,"HH:mm"),t=C(r,"HH:mm").add(1,"day");return i>=e||i<=t}return i>=C(n,"HH:mm")&&i<=C(r,"HH:mm")})()}function lr(e){return C(e).tz("America/Chicago").format("YYYY-MM-DD HH:mm:ss.SSSSSSSSS ZZ")}function dr(...e){return[...e]}function fr(...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 pr(...e){return 0===(e=e.flat().filter(e=>""!==e&&null!=e)).length?"":e.map(e=>{const t=vr(e,e);return""!==t?t:new ce(0).toNumber()}).reduce((e,t)=>yr(e,t)||ce(0).toNumber(),new ce(0).toNumber())}function hr(e){return Array.isArray(e)?e.length:""}function gr(...e){const t=e.flat().map(e=>Number(e)).filter(e=>Number.isFinite(e));if(t.length<2)return"";const n=t.reduce((e,t)=>e+t,0)/t.length,r=t.reduce((e,t)=>{const r=t-n;return e+r*r},0)/(t.length-1);return Math.sqrt(r)}function yr(e,t){const n=new ce(e).plus(new ce(t)).toNumber();return isNaN(n)?"":n}function mr(e,t){const n=new ce(e).minus(new ce(t)).toNumber();return isNaN(n)?"":n}function vr(e,t){const n=new ce(e).multipliedBy(new ce(t)).toNumber();return isNaN(n)?"":n}function br(e,t){const n=new ce(e).div(new ce(t)).toNumber();return isNaN(n)?"":n}C.extend(Ut.default),C.extend(Lt.default),C.extend(Gt.default),C.extend(Wt.default),C.extend(Kt.default),window._METHOD_DEBUG_=Bt;var wr=wt(function(e,t=!1){const n=we.parse(e);let r=[];return Oe.traverse(n,{enter:function(e){if(e.type===we.Syntax.MemberExpression){const t=Dr(e);r.push(t),Object.assign(e,{name:t,type:we.Syntax.Identifier})}else e.type===we.Syntax.Identifier&&r.push(e.name);r=t?r.filter(e=>!w[e]&&"undefined"!==e):r.filter(e=>!(w[e]||"undefined"===e||O.includes(e)||e.startsWith(v)||e.startsWith("undefined.")))}}),[...new Set(r)]}),Or=wt(async function(e,t){const n=wr(e,!0),r=n.filter(e=>O.includes(e)).sort(),i=n.filter(e=>e.startsWith(v)).sort(),o=await Ir([...r,...i]),s=we.parse(e);Oe.replace(s,{enter(e){if(e.type===we.Syntax.BinaryExpression){const{operator:t}=e,n=E[t];return n?{type:we.Syntax.CallExpression,arguments:[e.left,e.right],callee:{type:we.Syntax.Identifier,name:n},optional:!1}:e}return e}}),Oe.traverse(s,{enter:function(e){e.type===we.Syntax.CallExpression&&e.callee.type===we.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 c=new Er("Methods",[...u,"return new Promise(async(resolve)=>{","const res = ;","resolve(res);","})"].join("\n")),l=await c(Bt);return console.info("【表达式】",e),console.info("【参数】",t),console.info("【执行语句】",c.toString()),console.info("【执行结果】",l),l});function Dr(e){return e.type===we.Syntax.MemberExpression?`${e.object.type===we.Syntax.MemberExpression?Dr(e.object):e.object.name}.${e.property.name}`:e.type===we.Syntax.Identifier?e.name:""}var Er=Object.getPrototypeOf(async function(){}).constructor,Ir=wt(async function(e){let t=[];return e.length>0&&(t=await _gct.api.apaas.systemVar.getGetVarByKeys({keys:e.join(",")})),t});window.gct_expression={execute:Or,identify:wr};var Sr={[c.TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[c.LONG_TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[c.INTEGER]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[c.LONG]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[c.DOUBLE]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[c.DECIMAL]:{attrsTransform:[{from:"specificConfig.digits",to:"precision"},{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]}},Tr=(e,t)=>{const{attrsTransform:n=[]}=Sr[e]??{};return n.reduce((e,n)=>{const r=pe(t,n.from);return e[n.to]=r,e},{})},Cr=class extends y{static async loadRenderPlugin(e,t=[]){try{const n=await this.loadPlugins(e,t);t.forEach(e=>{const t=e.key;n[t]?_gct.register.render.register(t,n[t].default):console.error(`${t} 插件加载失败,请检查插件配置是否正确`)})}catch(n){console.error(n)}}static loadMobilePlugin(e=[]){return this.loadRenderPlugin(g.MOBILE,e)}static loadPadPlugin(e=[]){return this.loadRenderPlugin(g.PAD,e)}static loadWebPlugin(e=[]){return this.loadRenderPlugin(g.WEB,e)}};function Mr(e){const{style:t={}}=e||{},n="ignoringStyle"in e?e.ignoringStyle??[]:[],r=ue(t);return{wrapperStyle:ae(t,n),wStyle:r,labelFont:se(t.labelFont),contentFont:se(t.contentFont)}}var Nr=e=>se(e),xr=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 Rr(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 xr.getConfigByField(n,r)),!(i||u&&u.type===a))throw new Error("该字段可能已经被删除");if(!u)return{};const{required:c,specificConfig:l}=u;return e.props.fieldRequired=!!c,c&&!s&&(e.props.required=!0),void 0!==(null==l?void 0:l.digits)&&(e.props.precision=l.digits),u}function Pr(e,t){return(null==e?void 0:e.map(e=>Ar(e,t)))||[]}function Ar(e={},t={}){var n;const r=de(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__?Ar(r.__FOREIGN__,t):{}}}function _r(e,t,n){"object"==typeof t&&ve(e,Ar(t,n))}function kr(e,t,n){if("object"!=typeof t)return;for(const i in e)"_OPCT"!==i&&"_NOSUBMIT"!==i&&delete e[i];const r=Ar(t,n);r._X_ROW_KEY=t._X_ROW_KEY,ve(e,r)}function Yr(e,t={},n={}){const r=de(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 $r(e={},t={}){var n;const r=de(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 jr(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?De.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)}_e(xr,"modelData",/* @__PURE__ */new Map),_e(xr,"FiledData",/* @__PURE__ */new Map),_e(xr,"responsePromise",/* @__PURE__ */new Map),_e(xr,"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 Vr({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===c.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)?Yr(t,o.data,o.dict):void 0}_e(Hr,"cachedata",{});var Fr=e=>jr(e,Vr),Br=[m.CONTAINALL,m.CONTAINANY,m.IN,m.NOTIN];function Ur(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 Br.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===c.RDO_REF);return n.length?(n.forEach(t=>{if(e[t.id]){if(!Array.isArray(e[t.id])){const[n,r]=e[t.id].split(":");return r||n}e[t.id]=e[t.id].map(e=>{if(!e)return;const[t,n]=e.split(":");return n||t})}}),e):e}(e,t));return{query:r,exp:i}}var Lr=/* @__PURE__ */new Map;async function Gr(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 Wr(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 Kr(e,t={}){const{defaultValue:n}=e.props;return n&&0!==n.length?n:null}async function qr(e,t={}){const{defaultValue:n}=e.props;return null==n?null:n}function zr(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===c.DATE?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss";if(r===i.SystemDate)return C(/* @__PURE__ */new Date).format(e)}if(s){const e=a===c.DATE?"YYYY-MM-DD":"YYYY-MM-DD 00:00:00",t=a===c.DATE?"YYYY-MM-DD":"YYYY-MM-DD 23:59:59",n=null!=o?Number(o):0,u=C();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}Lr.set(c.ORG,Gr),Lr.set(c.ORG_MULTI,Gr),Lr.set(c.USER,Wr),Lr.set(c.USER_MULTI,Wr),Lr.set(c.ENUM,Kr),Lr.set(c.ENUM_MULTI,Kr),Lr.set(c.INTEGER,qr),Lr.set(c.LONG,qr),Lr.set(c.DOUBLE,qr),Lr.set(c.DECIMAL,qr),Lr.set(c.TEXT,async function(e,t={}){const{defaultValue:n}=e.props;return n||null}),Lr.set(c.LONG_TEXT,qr),Lr.set(c.BOOLEAN,async function(e,t={}){const{defaultValue:n}=e.props;return null==n||""===n?null:n}),Lr.set(c.DATE,async function(e,t={}){return zr(e)}),Lr.set(c.DATE_TIME,async function(e,t={}){return zr(e)}),Lr.set(c.PRINTER,async function(e,t={}){const{defaultValue:n}=e.props;return n&&0!==n.length?n:null});function Jr(e,t=[]){return"ignoreCase"==(null==t?void 0:t[0])?null==e?void 0:e.replace(/\./g,".i"):e}function Xr(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 Qr=({searchField:e,keyword:t})=>t&&(null==e?void 0:e.reduce((e,n)=>(e[n.split(".").length>1?n:n+".like"]=t,e),{}))||{},Zr=e=>{let t={},n="";if(he(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=xt.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}}},ei=({collation:e,collationSort:t,collationField:n})=>e?e.filter(e=>e.collationField).map(e=>({sortField:e.collationField,sortType:e.collationSort})):t?[{sortField:n,sortType:t}]:[],ti=Object.prototype.toString;function ni(e,t){return ti.call(e)===`[object ${t}]`}function ri(e){return void 0!==e}function ii(e){return!ri(e)}function oi(e){return null!==e&&ni(e,"Object")}function si(e){return mi(e)||pi(e)?0===e.length:e instanceof Map||e instanceof Set?0===e.size:!!oi(e)&&0===Object.keys(e).length}function ai(e){return ni(e,"Date")}function ui(e){return null===e}function ci(e){return ii(e)&&ui(e)}function li(e){return ii(e)||ui(e)}function di(e){return ni(e,"Number")}function fi(e){return ni(e,"Promise")&&oi(e)&&hi(e.then)&&hi(e.then)}function pi(e){return ni(e,"String")}function hi(e){return"function"==typeof e}function gi(e){return ni(e,"Boolean")}function yi(e){return ni(e,"RegExp")}function mi(e){return!!e&&Array.isArray(e)}function vi(e){return"undefined"!=typeof window&&ni(e,"Window")}function bi(e){return oi(e)&&!!e.tagName}function wi(e){return ni(e,"Map")}function Oi(e){return/^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?/.test(e)}function Di(e){return void 0===e||!e&&0!==e&&"0"!==e||!/[^\s]/.test(e+"")}function Ei(e,t){const n=[],r=e.props.fieldType,i=x(()=>e.props.readonly&&r&&!n.includes(r)&&(void 0===t.value||""===t.value||null===t.value));return{RenderEmptyValue:/* @__PURE__ */k((e,t)=>()=>_gct.store.getEmptyDisplay),isEmpty:i}}var Ii=e=>(t,n={},r={},i={})=>e({modelKey:t.key,bsKey:t.action,modelCategory:t.modelCategory??a.ENTITY},n,r,i),Si={post:Ii(_gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey),get:Ii(_gct.api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey),put:Ii(_gct.api.apaas.modelComprehensive.putBizServiceModelCategoryModelKeyBsKey),delete:Ii(_gct.api.apaas.modelComprehensive.deleteBizServiceModelCategoryModelKeyBsKey)};async function Ti(e,n,...r){return Si[t[e.action]](e,n,...r)}async function Ci(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 Mi=class e{constructor(){if(_e(this,"mask",void 0),_e(this,"container",void 0),_e(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=""}};_e(Mi,"instance",void 0);var Ni=new Mi,xi=class{constructor({taskId:e,processInstanceId:t,examineAndApproveState:n=u.MY_CUSTOM,refFormId:r}){_e(this,"isHandle",!1),_e(this,"buttonConfig",{}),_e(this,"fieldConfig",{}),_e(this,"processId",""),_e(this,"dataId",""),_e(this,"taskId",void 0),_e(this,"processInstanceId",void 0),_e(this,"refFormId",void 0),_e(this,"examineAndApproveState",u.MY_CUSTOM),_e(this,"fieldStatus",""),_e(this,"viewPageKey",void 0),_e(this,"isviewPage",void 0),_e(this,"isAPPviewPage",void 0),_e(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 Ri.disabled:e.props.disabled=!0,e.props.readonly=!1;break;case Ri.editable:e.props.disabled=!1,e.props.readonly=!1;break;case Ri.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===Ri.hidden&&(e.props.hidden=!0)}}};var Ri=/* @__PURE__ */function(e){return e.hidden="hidden",e.readonly="readonly",e.disabled="disabled",e.editable="editable",e}({});function Pi(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ai(e,t,n){Pi(e,t),t.set(e,n)}function _i(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 ki(e,t,n){return e.set(_i(e,t),n),n}function Yi(e,t){return e.get(_i(e,t))}var $i=/* @__PURE__ */new WeakMap,ji=/* @__PURE__ */new WeakMap,Hi=/* @__PURE__ */new WeakSet,Vi=class{constructor({js:e,css:t,pageKey:n,ContextVm:r}){var i;Pi(this,i=Hi),i.add(this),_e(this,"context",void 0),_e(this,"searchVNodes",void 0),_e(this,"cssData",void 0),_e(this,"pageKey",void 0),_e(this,"exports",void 0),Ai(this,$i,void 0),Ai(this,ji,void 0),_e(this,"ProcessAppRoved",void 0),_e(this,"pageLayoutMode",void 0),this.cssData=_i(Hi,this,Fi).call(this,t),this.searchVNodes={},this.exports={},ki(ji,this,{}),ki($i,this,{}),this.context=new r({$ref:this.getComponent.bind(this),$asyncRef:this.getSyncComponent.bind(this)}),_i(Hi,this,Bi).call(this,e),kt.setContextByKey(this.context,n),this.pageKey=n}async runProcessBySaskId({taskId:e,processInstanceId:t,examineAndApproveState:n,refFormId:r}){this.ProcessAppRoved=new xi({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(Ki.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,Z(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&&(Yi(ji,this)[e]=t,_i(Hi,this,Li).call(this,e,t))}destroyNode(e){delete Yi(ji,this)[e],delete Yi($i,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=Yi(ji,this)[e];if(t)return new Wi(e,t);console.error(e+"组件不存在或者未初始化")}getSyncComponent(e){if(!e)return Promise.reject("标识不能为空");const t=Yi(ji,this)[e];return t?Promise.resolve(new Wi(e,t)):new Promise((t,n)=>{const r=setTimeout(()=>{n(e+"不存在或者被隐藏")},3e4);_i(Hi,this,Ui).call(this,e,n=>{clearTimeout(r),t(new Wi(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 Fi(e,t={}){if(!e)return;const{css:n,load:r,unload:i}=function(e,t={}){const n=Q(!1),{document:r=dt,immediate:i=!0,manual:o=!1,id:s="vueuse_styletag_"+ ++Ot}=t,a=Q(e);let u=()=>{};const c=()=>{if(!r)return;const e=r.getElementById(s)||r.createElement("style");e.isConnected||(e.id=s,t.nonce&&(e.nonce=t.nonce),t.media&&(e.media=t.media),r.head.appendChild(e)),n.value||(u=ie(a,t=>{e.textContent=t},{immediate:!0}),n.value=!0)},l=()=>{r&&n.value&&(u(),r.head.removeChild(r.getElementById(s)),n.value=!1)};var d;return i&&!o&&ut(c),o||(d=l,$()&&L(d,void 0)),{id:s,css:a,unload:l,load:c,isLoaded:z(n)}}(e,t);return{css:n,load:r,unload:i}}function Bi(e){if(e)try{new Function("exports","CTX",e)(this.exports,this.context)}catch(t){console.error(t,"createFunction")}}function Ui(e,t){const n=Yi(ji,this)[e];n?t(e,n):Yi($i,this)[e]?Yi($i,this)[e].push(t):Yi($i,this)[e]=[t]}function Li(e,t){Yi($i,this)[e]&&Yi($i,this)[e].forEach(e=>{e(t)})}var Gi=class{constructor({$ref:e,$asyncRef:t}){_e(this,"$ref",void 0),_e(this,"$asyncRef",void 0),_e(this,"$getModal",void 0),_e(this,"$closeModal",void 0),_e(this,"$customBizService",Si),_e(this,"gctWidgets",{}),_e(this,"$utility",{_:le,cloneDeep:de,differenceBy:fe,dayjs:C,BigNumber:ce,plus:(e,t)=>new ce(e).plus(new ce(t)).toNumber(),minus:(e,t)=>new ce(e).minus(new ce(t)).toNumber(),multipliedBy:(e,t)=>new ce(e).multipliedBy(new ce(t)).toNumber(),div:(e,t)=>new ce(e).div(new ce(t)).toNumber(),transformSourceData:Pr,transformData:Ar}),_e(this,"$httpBizService",Ti),_e(this,"$request",Ci),_e(this,"$loading",Ni),this.$asyncRef=t,this.$ref=e}$getPremission(e){return kt.getPremission(e)}$setPremission(e,t){kt.setPremission(e,t)}$getAppGlobalVar(e){return kt.getGlobalVar(e)}$setAppGlobalVar(e,t){kt.setGlobalVar(e,t)}$getPageGlobalVar(e){return kt.getPageGlobalVar(e)}$setPageGlobalVar(e,t){kt.setPageGlobalVar(e,t)}$getPageVar(e){return kt.getPageVar(e)}$setPageVar(e,t){kt.setPageVar(e,t)}$getCtxById(e){return kt.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),{})}},Wi=class{constructor(e,t){_e(this,"modelKey",void 0),_e(this,"getValue",void 0),_e(this,"setValue",void 0),_e(this,"submit",void 0),_e(this,"reload",void 0),_e(this,"key",void 0),this.key=e;const n=t.elRef;Object.keys(n).forEach(e=>{this[e]=n[e]})}};async function Ki(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=[];qi(e,(null===(u=this.gctWidgets)||void 0===u?void 0:u[s[0]])||{}),a=e.find(e=>e.id===s[1])||{}}else if(s.length){var c;a=null===(c=this.gctWidgets)||void 0===c?void 0:c[s[0]]}var l;n===p.OPEN_MODAL&&await this.$getModal(r).open({title:null==a||null===(l=a.props)||void 0===l?void 0:l.title}),n===p.CLOSE_MODAL&&(r?await this.$getModal(r).close():await this.$closeModal()),n===p.REFRESH_TABLE&&await(await this.$getCtxById(i).$asyncRef(r)).reload(e?e[0]:null)}function qi(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)&&qi(e,i)}}function zi({expression:e="",rowData:t=null},n){if(!e||"true"===e)return void n(!0);const r=wr(e),i=r.reduce((e,t)=>{const n=t.split(".");return e[t]={formKey:n[0],itemKey:n[1]},e},{}),o=x(()=>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=Rt.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=xt.value[i])||void 0===a?void 0:a.value)??""}else if(i.startsWith("$PAGERVAR_")||i.startsWith("$IPAGERVAR_")){var u;e[i]=(null===(u=Nt.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]}),Or(e,r).then(n)}t&&s(o.value),ct(o,()=>{s(o.value)},{debounce:200,immediate:!t})}async function Ji({expression:e="",rowData:t=null}){if(!e||"true"===e)return!0;const n=wr(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=xt.value[i])||void 0===a?void 0:a.value)??"";else if(i.startsWith("$PAGERVAR_")){var u;s=(null===(u=Nt.value[i])||void 0===u?void 0:u.value)??""}else if(o){var c;s=(t?t[o]:null===(c=Rt.value[i])||void 0===c?void 0:c[o])??""}else s=(t?t[i]:Rt.value[i])??"";r[e]=s}),Or(e,r)}function Xi(e,t){return!!Yt(t)&&(e.displayType===s.CONFIG?ee(()=>!e.hidden):function(e){const t=J(!1);return Qi(e,e=>{t.value=!!e}),t}(e))}function Qi({displayRule:e,tableForm:t},n){if(e){const r=wr(e),i=r.reduce((e,t)=>{const n=t.split(".");return e[t]={formKey:n[0],itemKey:n[1]},e},{}),o=ee(()=>r.reduce((e,n)=>{var r;const i=n.split("."),o=i[0]+"",s=i[1]+"",a=null===(r={...t,...Rt.value}[o])||void 0===r?void 0:r[s];return e[o]?e[o][s]=a:e[o]={[s]:a},e},{}));ct(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]}),Or(n,i).then(r)}(o.value,i,e,e=>{n(e)})},{immediate:!0,debounce:300})}else n(!0)}function Zi(e,t){const n=q({});return ee(()=>e?e.filter(e=>{const{displayRule:r,hidden:i,displayType:o}=e.props||e;return Yt(e.id)?o===s.CONFIG?n[e.id]=!i:Qi({displayRule:r,tableForm:t},t=>{n[e.id]=t}):n[e.id]=!1,n[e.id]}):[])}function eo(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=to(r,t),o=to(n,t);return ee(()=>(null==i?void 0:i.value)||(null==o?void 0:o.value))}function to(e,t){const n=q({});if(e)return ee(()=>e.find(e=>{const{displayRule:r,hidden:i,displayType:o}=e.props||e;return o===s.CONFIG?n[e.id]=!i:Qi({displayRule:r,tableForm:t},t=>{n[e.id]=t}),n[e.id]}))}function no(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?Xi(e.props,e.id):ro(e)}function ro(e,t){var n;if(!e.id)return!1;if(!Yt(e.id))return e.props.hidden=!0,!1;const r=j("useProcessFieldEvent",void 0);if(r)return r.useFieldToShow(e),!e.props.hidden;const{displayType:i,displayRule:a}=e.props||{},{value:u,expression:c}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[o.HIDDEN]||{};return u&&c?(e.props.hidden=!0,zi({expression:c,rowData:t},t=>{e.props.hidden=!!t})):u?e.props.hidden=!0:i===s.RULE&&a&&(e.props.hidden=!0,zi({expression:a,rowData:t},t=>{e.props.hidden=!t})),ee(()=>!e.props.hidden)}async function io(e,t){var n;if(!e.id)return!1;if(!Yt(e.id))return e.props.hidden=!0,!1;const r=j("useProcessFieldEvent",void 0);if(r)return r.useFieldToShow(e),!e.props.hidden;const{displayType:i,displayRule:a}=e.props||{},{value:u,expression:c}=((null===(n=e.props.componentDependency)||void 0===n?void 0:n.configDependency)||{})[o.HIDDEN]||{};return u&&c?(e.props.hidden=!0,e.props.hidden=!!(await Ji({expression:c,rowData:t}))):u?e.props.hidden=!0:i===s.RULE&&a&&(e.props.hidden=!0,e.props.hidden=!!(await Ji({expression:a,rowData:t}))),!e.props.hidden}function oo(e,t){return e.forEach(e=>{ro(e,t)}),ee(()=>e.filter(e=>!e.props.hidden))}function so(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&&zi({expression:i},e=>{t(e)}),t(e.props.hidden)}function ao(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&&zi({expression:i},t=>{e.props.hidden=!!t});const{value:s,expression:a}=n[o.REQUIRED]||{};s&&a&&zi({expression:a},t=>{e.props.required=!!t})}function uo(t,n={},r=!1){var i,s,a;const{readonly:u,field:c,isFieldModel:l,bindFieldLink:d,refOriginField:f,refOriginModelKey:p,refOriginFieldType:h}=t.props,g=(null===(i=t.props.componentDependency)||void 0===i?void 0:i.configDependency)||{},y=j("formReadonly",void 0),m=j("useProcessFieldEvent",void 0);if(m&&m.useFieldWidget(t),!m&&t.formItem&&void 0!==(null==y?void 0:y.value)&&(t.props.readonly=(null==y?void 0:y.value)||t.props.readonly),!m&&!(null==y?void 0:y.value)){var v,b,w,O,D,E,I,S;const e=null===(v=g[o.READONLY])||void 0===v?void 0:v.expression,i=null===(b=g[o.READONLY])||void 0===b?void 0:b.fieldValue,s=null===(w=g[o.READONLY])||void 0===w?void 0:w.value;!i&&s&&e&&zi({expression:e,rowData:r?n:null},e=>{t.props.readonly=!!e});const a=null===(O=g[o.REQUIRED])||void 0===O?void 0:O.expression,c=null===(D=g[o.REQUIRED])||void 0===D?void 0:D.value;!(null===(E=g[o.REQUIRED])||void 0===E?void 0:E.fieldValue)&&c&&a&&zi({expression:a,rowData:r?n:null},e=>{t.props.required=!!e,t.props.readonly=!e&&u});const l=null===(I=g[o.DISABLED])||void 0===I?void 0:I.expression;(null===(S=g[o.DISABLED])||void 0===S?void 0:S.value)&&l&&zi({expression:l,rowData:r?n:null},e=>{t.props.disabled=!!e,t.props.readonly=!e&&u})}const T=null===(s=g[o.ASSIGNMENT])||void 0===s?void 0:s.expression,C=null===(a=g[o.ASSIGNMENT])||void 0===a?void 0:a.strategy;T&&zi({expression:T,rowData:r?n:null},e=>{n[c]=e});const M=l?null==d?void 0:d.join("."):c;n._OPCT||(n._OPCT={_DICT:{}});const N=x(()=>l?n._OPCT:n),R=x({get:()=>M?N.value[M]:"",set(t){T&&C===e.alwaysCover||(N.value[M]=t)}});if(l&&f){const e=ee(()=>n[d[0]]),t=d.length>2?[d[1]+".*"]:void 0;ct(e,async()=>{try{const n=await Fr({ids:e.value,refOriginField:d[0],refOriginFieldType:h,model:p,foreignFields:t});N.value[M]=n._OPCT[M],N.value._DICT||(N.value._DICT={}),N.value._DICT[M]=n._OPCT._DICT[M]}catch{for(const e in N.value)e.startsWith(M)&&(N.value[e]=void 0)}},{debounce:100,immediate:!0})}return{value:R,formRowData:N,fieldKey:M}}function co(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,c=null===(r=a[o.REQUIRED])||void 0===r?void 0:r.value;!(null===(i=a[o.REQUIRED])||void 0===i?void 0:i.fieldValue)&&c&&u&&zi({expression:u},t=>{e.props.required=!!t,e.props.readonly=!t&&s})}var lo=class{constructor(){_e(this,"context",{})}},fo=class{constructor(){_e(this,"isDestroy",!1)}},po=class{constructor(e){_e(this,"state",new fo),this.model=e}mounted(){}destroy(){}},ho=class extends po{},go=class extends po{},yo=class{constructor(){_e(this,"state",new lo),_e(this,"prefix",""),_e(this,"preview",!1),_e(this,"item",/* @__PURE__ */new Map),_e(this,"nodes",[]),_e(this,"tree",[])}setTree(e){this.tree=e}setNodes(e){this.reset(),this.nodes=e,this.nodes.forEach(e=>{const t=qe.get(e.type,this.prefix);if(t){if(t.createController)return void this.item.set(e.id,t.createController(e));if(t.mode===oe.CONTAINER)return void this.item.set(e.id,new ho(e));if(t.mode===oe.ITEM)return void this.item.set(e.id,new go(e))}this.item.set(e.id,new po(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 mo(e){let t=j(Ge.DESIGN_RENDER);return t||(t=e?e():new yo,t.state=q(t.state),K(Ge.DESIGN_RENDER,t),U(()=>{t.mounted()}),G(()=>{t.unmounted()})),t}var vo=()=>{const e=J({});return{getFileAttrs:async function({modelKey:t,fieldKey:n}){const r=await xr.getConfigByField(t,n);if(r&&r.specificConfig){const t=be(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 xr.getConfigByField(t,n);r&&r.specificConfig&&(e.value={maxTagTextLength:(be(r.specificConfig,["codeVisibleNum"])??{}).codeVisibleNum||12})}}},bo=/* @__PURE__ */xe({Vue:()=>M,Vue2:()=>{},del:()=>Eo,install:()=>Oo,isVue2:()=>!1,isVue3:()=>!0,set:()=>Do});import*as wo from"vue";function Oo(){}function Do(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Eo(e,t){Array.isArray(e)?e.splice(t,1):delete e[t]}Re(bo,wo,"default");var Io=Symbol.for("DndContextType");function So(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var To="function"==typeof Symbol&&Symbol.observable||"@@observable",Co=function(){return Math.random().toString(36).substring(7).split("").join(".")},Mo={INIT:"@@redux/INIT"+Co(),REPLACE:"@@redux/REPLACE"+Co(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Co()}};function No(e){var t=typeof e;return"production"!==process.env.NODE_ENV&&(t=function(e){if(void 0===e)return"undefined";if(null===e)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";var n=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}(e)),t}function xo(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("production"===process.env.NODE_ENV?So(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("production"===process.env.NODE_ENV?So(1):"Expected the enhancer to be a function. Instead, received: '"+No(n)+"'");return n(xo)(e,t)}if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?So(2):"Expected the root reducer to be a function. Instead, received: '"+No(e)+"'");var i=e,o=t,s=[],a=s,u=!1;function c(){a===s&&(a=s.slice())}function l(){if(u)throw new Error("production"===process.env.NODE_ENV?So(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?So(4):"Expected the listener to be a function. Instead, received: '"+No(e)+"'");if(u)throw new Error("production"===process.env.NODE_ENV?So(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var t=!0;return c(),a.push(e),function(){if(t){if(u)throw new Error("production"===process.env.NODE_ENV?So(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,c();var n=a.indexOf(e);a.splice(n,1),s=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error("production"===process.env.NODE_ENV?So(7):"Actions must be plain objects. Instead, the actual type was: '"+No(e)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(void 0===e.type)throw new Error("production"===process.env.NODE_ENV?So(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(u)throw new Error("production"===process.env.NODE_ENV?So(9):"Reducers may not dispatch actions.");try{u=!0,o=i(o,e)}finally{u=!1}for(var t=s=a,n=0;n<t.length;n++)(0,t[n])();return e}return f({type:Mo.INIT}),(r={dispatch:f,subscribe:d,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?So(10):"Expected the nextReducer to be a function. Instead, received: '"+No(e));i=e,f({type:Mo.REPLACE})}})[To]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error("production"===process.env.NODE_ENV?So(11):"Expected the observer to be an object. Instead, received: '"+No(e)+"'");function n(){e.next&&e.next(l())}return n(),{unsubscribe:t(n)}}})[To]=function(){return this},e},r}function Ro(e,t,...n){if("undefined"!=typeof process&&"production"===process.env.NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=/* @__PURE__ */new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let r=0;e=new Error(t.replace(/%s/g,function(){return n[r++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function Po(e){return"object"==typeof e}var Ao="dnd-core/INIT_COORDS",_o="dnd-core/BEGIN_DRAG",ko="dnd-core/PUBLISH_DRAG_SOURCE",Yo="dnd-core/HOVER",$o="dnd-core/DROP",jo="dnd-core/END_DRAG";function Ho(e,t){return{type:Ao,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var Vo={type:Ao,payload:{clientOffset:null,sourceClientOffset:null}};function Fo(e){return function(t=[],n={publishSource:!0}){const{publishSource:r=!0,clientOffset:i,getSourceClientOffset:o}=n,s=e.getMonitor(),a=e.getRegistry();e.dispatch(Ho(i)),function(e,t,n){Ro(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){Ro(n.getSource(e),"Expected sourceIds to be registered.")})}(t,s,a);const u=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,s);if(null==u)return void e.dispatch(Vo);let c=null;if(i){if(!o)throw new Error("getSourceClientOffset must be defined");!function(e){Ro("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(o),c=o(u)}e.dispatch(Ho(i,c));const l=a.getSource(u).beginDrag(s,u);return null!=l?(function(e){Ro(Po(e),"Item must be an object.")}(l),a.pinSource(u),{type:_o,payload:{itemType:a.getSourceType(u),item:l,sourceId:u,clientOffset:i||null,sourceClientOffset:c||null,isSourcePublic:!!r}}):void 0}}function Bo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Bo(e,t,n[t])})}return e}function Lo(e){return function(t={}){const n=e.getMonitor(),r=e.getRegistry();!function(e){Ro(e.isDragging(),"Cannot call drop while not dragging."),Ro(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n),function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n).forEach((i,o)=>{const s={type:$o,payload:{dropResult:Uo({},t,Go(i,o,r,n))}};e.dispatch(s)})}}function Go(e,t,n,r){const i=n.getTarget(e);let o=i?i.drop(r,e):void 0;return function(e){Ro(void 0===e||Po(e),"Drop result must either be an object or undefined.")}(o),void 0===o&&(o=0===t?{}:r.getDropResult()),o}function Wo(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){Ro(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();return null!=r&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:jo}}}function Ko(e,t){return null===t?null===e:Array.isArray(e)?e.some(e=>e===t):e===t}function qo(e){return function(t,{clientOffset:n}={}){!function(e){Ro(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),i=e.getMonitor(),o=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const i=e[r];Ko(t.getTargetType(i),n)||e.splice(r,1)}}(r,o,i.getItemType()),function(e,t,n){Ro(t.isDragging(),"Cannot call hover while not dragging."),Ro(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r<e.length;r++){const t=e[r];Ro(e.lastIndexOf(t)===r,"Expected targetIds to be unique in the passed array."),Ro(n.getTarget(t),"Expected targetIds to be registered.")}}(r,i,o),function(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}(r,i,o),{type:Yo,payload:{targetIds:r,clientOffset:n||null}}}}function zo(e){return function(){if(e.getMonitor().isDragging())return{type:ko}}}var Jo=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store,n=function(e){return{beginDrag:Fo(e),publishDragSource:zo(e),hover:qo(e),drop:Lo(e),endDrag:Wo(e)}}(this);return Object.keys(n).reduce((r,i)=>{const o=n[i];var s;return r[i]=(s=o,(...n)=>{const r=s.apply(e,n);void 0!==r&&t(r)}),r},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function Xo(e,t){return{x:e.x-t.x,y:e.y-t.y}}var Qo=[],Zo=[];Qo.__IS_NONE__=!0,Zo.__IS_ALL__=!0;var es=class{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;Ro("function"==typeof e,"listener must be a function."),Ro(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe(()=>{const t=this.store.getState(),i=t.stateId;try{i===r||i===r+1&&!function(e,t){return e!==Qo&&(e===Zo||void 0===t||(n=t,r=e,n.filter(e=>r.indexOf(e)>-1)).length>0);var n,r}(t.dirtyHandlerIds,n)||e()}finally{r=i}})}subscribeToOffsetChange(e){Ro("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return Ro(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);return Ro(t,`Expected to find a valid target. targetId=${e}`),!(!this.isDragging()||this.didDrop())&&Ko(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);return Ro(t,`Expected to find a valid source. sourceId=${e}`),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!Ko(r,i))return!1;const o=this.getTargetIds();if(!o.length)return!1;const s=o.indexOf(e);return n?s===o.length-1:s>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?Xo((o=r,{x:(i=t).x+o.x,y:i.y+o.y}),n):null;var i,o}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?Xo(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},ts="undefined"!=typeof global?global:self,ns=ts.MutationObserver||ts.WebKitMutationObserver;function rs(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}var is,os="function"==typeof ns?function(e){let t=1;const n=new ns(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:rs,ss=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},as=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=os(this.flush),this.requestErrorThrow=rs(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},us=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new ss(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(as.registerPendingError),cs="dnd-core/ADD_SOURCE",ls="dnd-core/ADD_TARGET",ds="dnd-core/REMOVE_SOURCE",fs="dnd-core/REMOVE_TARGET";function ps(e,t){t&&Array.isArray(e)?e.forEach(e=>ps(e,!1)):Ro("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(is||(is={}));var hs=0;function gs(e){switch(e[0]){case"S":return is.SOURCE;case"T":return is.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function ys(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,i]}=n.next();if(i===t)return!0;r=!!e}while(!r);return!1}var ms=class{addSource(e,t){ps(e),function(e){Ro("function"==typeof e.canDrag,"Expected canDrag to be a function."),Ro("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),Ro("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(is.SOURCE,e,t);return this.store.dispatch(function(e){return{type:cs,payload:{sourceId:e}}}(n)),n}addTarget(e,t){ps(e,!0),function(e){Ro("function"==typeof e.canDrop,"Expected canDrop to be a function."),Ro("function"==typeof e.hover,"Expected hover to be a function."),Ro("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(is.TARGET,e,t);return this.store.dispatch(function(e){return{type:ls,payload:{targetId:e}}}(n)),n}containsHandler(e){return ys(this.dragSources,e)||ys(this.dropTargets,e)}getSource(e,t=!1){return Ro(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return Ro(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return Ro(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return Ro(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return gs(e)===is.SOURCE}isTargetId(e){return gs(e)===is.TARGET}removeSource(e){var t;Ro(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:ds,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},as.enqueueTask(us.create(t))}removeTarget(e){Ro(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:fs,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);Ro(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){Ro(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=function(e){const t=(hs++).toString();switch(e){case is.SOURCE:return`S${t}`;case is.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}(e);return this.types.set(r,t),e===is.SOURCE?this.dragSources.set(r,n):e===is.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=/* @__PURE__ */new Map,this.dragSources=/* @__PURE__ */new Map,this.dropTargets=/* @__PURE__ */new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}},vs=(e,t)=>e===t;function bs(e=Qo,t){switch(t.type){case Yo:break;case cs:case ls:case fs:case ds:return Qo;default:return Zo}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,i=function(e,t){const n=/* @__PURE__ */new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const i=[];return n.forEach((e,t)=>{1===e&&i.push(t)}),i}(n,r);if(!(i.length>0)&&function(e,t,n=vs){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(n,r))return Qo;const o=r[r.length-1],s=n[n.length-1];return o!==s&&(o&&i.push(o),s&&i.push(s)),i}function ws(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Os={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Ds(e=Os,t){const{payload:n}=t;switch(t.type){case Ao:case _o:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Yo:return r=e.clientOffset,i=n.clientOffset,!r&&!i||r&&i&&r.x===i.x&&r.y===i.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ws(e,t,n[t])})}return e}({},e,{clientOffset:n.clientOffset});case jo:case $o:return Os;default:return e}var r,i}function Es(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Is(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Es(e,t,n[t])})}return e}var Ss={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ts(e=Ss,t){const{payload:n}=t;switch(t.type){case _o:return Is({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case ko:return Is({},e,{isSourcePublic:!0});case Yo:return Is({},e,{targetIds:n.targetIds});case fs:return-1===e.targetIds.indexOf(n.targetId)?e:Is({},e,{targetIds:(r=e.targetIds,i=n.targetId,r.filter(e=>e!==i))});case $o:return Is({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case jo:return Is({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,i}function Cs(e=0,t){switch(t.type){case cs:case ls:return e+1;case ds:case fs:return e-1;default:return e}}function Ms(e=0){return e+1}function Ns(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Ns(e,t,n[t])})}return e}function Rs(e={},t){return{dirtyHandlerIds:bs(e.dirtyHandlerIds,{type:t.type,payload:xs({},t.payload,{prevTargetIds:(n=e,r=[],"dragOperation.targetIds".split(".").reduce((e,t)=>e&&e[t]?e[t]:r||null,n))})}),dragOffset:Ds(e.dragOffset,t),refCount:Cs(e.refCount,t),dragOperation:Ts(e.dragOperation,t),stateId:Ms(e.stateId)};var n,r}function Ps(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var As=0,_s=Symbol.for("__VUE_DND_CONTEXT_INSTANCE__");function ks(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ys(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=t;return i[_s]||(i[_s]=function(e,t,n={},r=!1){const i=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return xo(Rs,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),o=new Jo(i,new es(i,new ms(i))),s=e(o,t,n);return o.receiveBackend(s),o}(e,t,n,r)),i[_s]}function Ys(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:window}(0,bo.defineComponent)({name:"DndProvider",props:{manager:{type:Object},backend:{type:Function},context:{type:Object},options:{type:Object},debugMode:{type:Boolean}},setup:function(e,t){var n,r,i,o,s=t.slots,a=(i=function(e){return function(e){return"manager"in e&&e.manager}(e)?[e.manager,!1]:[ks(e.backend,e.context,e.options,e.debugMode),!e.context]}(e),o=2,function(e){if(Array.isArray(e))return e}(i)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(i,o)||function(e,t){if(e){if("string"==typeof e)return Ps(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ps(e,t):void 0}}(i,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=a[0],c=a[1];return c&&++As,(0,bo.onUnmounted)(function(){if(c){var e=Ys();0===--As&&(e[_s]=null)}}),n=u,(0,bo.provide)(Io,n),function(){var e;return null!==(r=null===(e=s.default)||void 0===e?void 0:e.call(s))&&void 0!==r?r:null}}}),(0,bo.defineComponent)({props:{connect:{type:Function,required:!0},src:{type:String,required:!0}},setup:function(e){return(0,bo.watchEffect)(function(){if("undefined"!=typeof Image){var t=!1,n=new Image;return n.src=e.src,n.onload=function(){e.connect(n),t=!0},function(){t&&e.connect(null)}}}),function(){return null}}});var $s=!1,js=!1,Hs=/* @__PURE__ */function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.sourceId=e},t.getHandlerId=function(){return this.sourceId},t.canDrag=function(){Ro(!$s,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return $s=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{$s=!1}},t.isDragging=function(){if(!this.sourceId)return!1;Ro(!js,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return js=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{js=!1}},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.isDraggingSource=function(e){return this.internalMonitor.isDraggingSource(e)},t.isOverTarget=function(e,t){return this.internalMonitor.isOverTarget(e,t)},t.getTargetIds=function(){return this.internalMonitor.getTargetIds()},t.isSourcePublic=function(){return this.internalMonitor.isSourcePublic()},t.getSourceId=function(){return this.internalMonitor.getSourceId()},t.subscribeToOffsetChange=function(e){return this.internalMonitor.subscribeToOffsetChange(e)},t.canDragSource=function(e){return this.internalMonitor.canDragSource(e)},t.canDropOnTarget=function(e){return this.internalMonitor.canDropOnTarget(e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}(),Vs=!1,Fs=/* @__PURE__ */function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.targetId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.targetId=e},t.getHandlerId=function(){return this.targetId},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.canDrop=function(){if(!this.targetId)return!1;Ro(!Vs,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Vs=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Vs=!1}},t.isOver=function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();function Bs(e){return function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if((t=n)&&t.__v_skip&&function(){throw new Error("Only native element nodes can now be passed to Vue DnD connectors.You can either wrap Component into a <div>, or turn it into a drag source or a drop target itself.")}(),!function(e){return!!(n=e)&&!0===n.__v_isVNode&&"symbol"!=((t=e.type)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t);var t,n}(n)){var i=n;return e(i,r),i}}}function Us(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var i=Bs(r);t[n]=function(){return i}}}),t}function Ls(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let u=0;u<o.length;u++){const s=o[u];if(!a(s))return!1;const c=e[s],l=t[s];if(i=n?n.call(r,c,l,s):void 0,!1===i||void 0===i&&c!==l)return!1}return!0}function Gs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ws=/* @__PURE__ */function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=Us({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,n.dragPreviewNode=e,n.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceOptionsInternal=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}var t,n,r=e.prototype;return r.receiveHandlerId=function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())},r.reconnect=function(){var e=this.reconnectDragSource();this.reconnectDragPreview(e)},r.reconnectDragSource=function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t},r.reconnectDragPreview=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)},r.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},r.didConnectedDragSourceChange=function(){return this.lastConnectedDragSource!==this.dragSource},r.didConnectedDragPreviewChange=function(){return this.lastConnectedDragPreview!==this.dragPreview},r.didDragSourceOptionsChange=function(){return!Ls(this.lastConnectedDragSourceOptions,this.dragSourceOptions)},r.didDragPreviewOptionsChange=function(){return!Ls(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)},r.disconnectDragSource=function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)},r.disconnectDragPreview=function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null)},r.clearDragSource=function(){this.dragSourceNode=null},r.clearDragPreview=function(){this.dragPreviewNode=null},t=e,(n=[{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"dragSource",get:function(){return this.dragSourceNode}},{key:"dragPreview",get:function(){return this.dragPreviewNode}}])&&Gs(t.prototype,n),e}();function Ks(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var qs=/* @__PURE__ */function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=Us({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,(0,bo.isRef)(e)?n.dropTargetRef=e:n.dropTargetNode=e,n.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}var t,n,r=e.prototype;return r.reconnect=function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)},r.receiveHandlerId=function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())},r.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},r.didDropTargetChange=function(){return this.lastConnectedDropTarget!==this.dropTarget},r.didOptionsChange=function(){return!Ls(this.lastConnectedDropTargetOptions,this.dropTargetOptions)},r.disconnectDropTarget=function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)},r.clearDropTarget=function(){this.dropTargetRef=null,this.dropTargetNode=null},t=e,(n=[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.value}}])&&Ks(t.prototype,n),e}(),zs=/* @__PURE__ */function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=n,this.connector=r}var t=e.prototype;return t.beginDrag=function(){var e,t=this.spec,n=this.monitor;return null!=(e="object"==typeof t.item?t.item:"function"==typeof t.item?t.item(n):{})?e:null},t.canDrag=function(){var e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)},t.isDragging=function(e,t){var n=this.spec,r=this.monitor,i=n.isDragging;return i?i(r):t===e.getSourceId()},t.endDrag=function(){var e=this.spec,t=this.monitor,n=this.connector,r=e.end;r&&r(t.getItem(),t),n.reconnect()},e}();function Js(){var e=(0,bo.inject)(Io);return Ro(null!=e,"Expected drag drop context"),e}function Xs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qs(e,t,n){var r=Js(),i=function(e,t,n){var r=(0,bo.computed)(function(){return new zs((0,bo.unref)(e),(0,bo.unref)(t),(0,bo.unref)(n))});return(0,bo.watchEffect)(function(){r.value.spec=(0,bo.unref)(e)}),r}(e,t,n),o=function(e){return(0,bo.computed)(function(){var t=(0,bo.unref)(e).type;return Ro(null!=t,"spec.type must be defined"),t})}(e);(0,bo.watchEffect)(function(e){if(null!=(0,bo.unref)(o)){var s=(c=function(e,t,n){var r=n.getRegistry(),i=r.addSource(e,t);return[i,function(){return r.removeSource(i)}]}((0,bo.unref)(o),(0,bo.unref)(i),(0,bo.unref)(r)),l=2,function(e){if(Array.isArray(e))return e}(c)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(c,l)||function(e,t){if(e){if("string"==typeof e)return Xs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xs(e,t):void 0}}(c,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=s[0],u=s[1];(0,bo.unref)(t).receiveHandlerId(a),(0,bo.unref)(n).receiveHandlerId(a),e(u)}var c,l})}function Zs(e){return(0,bo.computed)(function(){return"function"==typeof e?e():e})}var ea=/* @__PURE__ */Pe(/* @__PURE__ */Ne((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!==i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!==i--;){var s=o[i];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}})());function ta(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function na(e,t,n){var r,i,o=(r=function(e,t,n){var r=(0,bo.ref)((0,bo.unref)(t)((0,bo.unref)(e))),i=function(){var i=(0,bo.unref)(t)((0,bo.unref)(e));(0,ea.default)(r.value,i)||(r.value=i,n&&n())};return(0,bo.watchEffect)(i),[r,i]}(e,t,n),i=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(r,i)||function(e,t){if(e){if("string"==typeof e)return ta(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ta(e,t):void 0}}(r,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=o[0],a=o[1];return(0,bo.watchEffect)(function(t){var n=(0,bo.unref)(e).getHandlerId();null!=n&&t((0,bo.unref)(e).subscribeToStateChange(a,{handlerIds:[n]}))}),s}function ra(e,t,n){return na(t,e||function(){return{}},function(){return(0,bo.unref)(n).reconnect()})}function ia(e,t){var n=(0,bo.reactive)({el:null,options:(0,bo.unref)(t)});return(0,bo.watchEffect)(function(){e(n)},{flush:"post"}),function(e,r){Do(n,"el",e);var i=(0,bo.unref)(t)||r;return(0,ea.default)(n.options,i)||Do(n,"options",i),(0,bo.unref)(e)}}function oa(e,t){return ia(function(t){(0,bo.unref)(e).hooks.dragSource()(t.el,t.options)},(0,bo.computed)(function(){return(0,bo.unref)(t).options}))}function sa(e,t){return ia(function(t){(0,bo.unref)(e).hooks.dragPreview()(t.el,t.options)},(0,bo.computed)(function(){return(0,bo.unref)(t).previewOptions}))}var aa=/* @__PURE__ */function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=n}var t=e.prototype;return t.canDrop=function(){var e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)},t.hover=function(){var e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)},t.drop=function(){var e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)},e}();function ua(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ca(e,t,n){var r=Js(),i=function(e,t){var n=(0,bo.computed)(function(){return new aa((0,bo.unref)(e),(0,bo.unref)(t))});return(0,bo.watchEffect)(function(){n.value.spec=(0,bo.unref)(e)}),n}(e,t),o=function(e){return(0,bo.computed)(function(){var t=(0,bo.unref)(e).accept;return Ro(null!=t,"accept must be defined"),Array.isArray(t)?t:[t]})}(e);(0,bo.watchEffect)(function(e){var s,a,u=(s=function(e,t,n){var r=(0,bo.unref)(n).getRegistry(),i=r.addTarget((0,bo.unref)(e),(0,bo.unref)(t));return[i,function(){return r.removeTarget(i)}]}(o,i,r),a=2,function(e){if(Array.isArray(e))return e}(s)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(s,a)||function(e,t){if(e){if("string"==typeof e)return ua(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ua(e,t):void 0}}(s,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=u[0],l=u[1];(0,bo.unref)(t).receiveHandlerId(c),(0,bo.unref)(n).receiveHandlerId(c),e(l)})}function la(e,t){return ia(function(t){(0,bo.unref)(e).hooks.dropTarget()(t.el,t.options)},(0,bo.computed)(function(){return(0,bo.unref)(t).options}))}function da(e){var t,n=Zs(e),r=(t=Js(),(0,bo.computed)(function(){return new Fs((0,bo.unref)(t))})),i=function(e){var t=Js(),n=(0,bo.computed)(function(){return new qs((0,bo.unref)(t).getBackend())});return(0,bo.watchEffect)(function(t){n.value.dropTargetOptions=(0,bo.unref)(e)||null,n.value.reconnect(),t(function(){return n.value.disconnectDropTarget()})}),n}((0,bo.computed)(function(){return(0,bo.unref)(n).options}));return ca(n,r,i),[ra((0,bo.computed)(function(){return(0,bo.unref)(n).collect||function(){return{}}}),r,i),la(i,n)]}var fa=/* @__PURE__ */k({name:"Vue3DndDraggableItem",props:{group:{type:String,required:!0},index:{type:Number,required:!0},item:{type:Object,required:!0},config:{type:Object,required:!0},add:{type:Function,required:!0},remove:{type:Function,required:!0},move:{type:Function,required:!0}},setup(e){const t=S("vue3-dnd-draggable-item"),n=J(null),r=J(!1),{config:i}=e,[o,s,a]=(l={type:i.type,item:()=>({group:e.group,item:e.item}),collect:e=>({canDrag:e.canDrag(),isDragging:e.isDragging()}),canDrag:e=>!i.canDrag||i.canDrag(e),end(t,n){if(i.end)return i.end(t,n);const r=n.getDropResult();r&&r.group!==e.group&&e.remove(t)},options:i.dragOptions,previewOptions:i.previewOptions},f=Zs(l),d=Js(),p=(0,bo.computed)(function(){return new Hs((0,bo.unref)(d))}),h=function(e,t){var n=Js(),r=(0,bo.computed)(function(){return new Ws((0,bo.unref)(n).getBackend())});return(0,bo.watchEffect)(function(t){r.value.dragSourceOptions=(0,bo.unref)(e)||null,(0,bo.unref)(r).reconnect(),t(function(){r.value.disconnectDragSource()})}),(0,bo.watchEffect)(function(e){r.value.dragPreviewOptions=(0,bo.unref)(t)||null,(0,bo.unref)(r).reconnect(),e(function(){r.value.disconnectDragPreview()})}),r}((0,bo.computed)(function(){return(0,bo.unref)(f).options}),(0,bo.computed)(function(){return(0,bo.unref)(f).previewOptions})),Qs(f,p,h),[ra((0,bo.computed)(function(){return(0,bo.unref)(f).collect||function(){return{}}}),p,h),oa(h,f),sa(h,f)]),[u,c]=da({accept:i.type,collect:e=>({handlerId:e.getHandlerId(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0}),isOver:e.isOver()}),hover(t,s){if(i.hover)return i.hover(t,s);if(!1!==s.canDrop()&&!0!==o.value.isDragging&&e.item!==t.item&&s.isOver({shallow:!0})){const o=n.value.getBoundingClientRect(),a=s.getClientOffset(),u=i.offset??0;let c=0;if("vertical"===i.direction){const{top:e,height:t}=o,{y:n}=a;if(c=n-e-t/2,Math.abs(c)<u)return;r.value=c<0}else if("horizontal"===i.direction){const{left:e,width:t}=o,{x:n}=a;if(c=n-e-t/2,Math.abs(c)<u)return;r.value=c<0}const l=i.key??"id";t.group===e.group?e.move(r.value,e.item[l],t.item[l]):e.add(r.value,e.item[l],t.item)}},canDrop:(e,t)=>i.canDrop?i.canDrop(e,t):!0!==o.value.isDragging,drop:(t,n)=>i.drop?i.drop(t,n):{group:e.group},options:i.dropOptions});var l,d,f,p,h;return!0===e.config.isCustomHandle||e.config.handle||s(n),c(n),a(n),U(()=>{V(()=>{if(e.config.handle&&n.value){const t=n.value.querySelector(e.config.handle);t&&s(t)}})}),{ns:t,elRef:n,dragCollect:o,dropCollect:u,isBeforeHover:r,drag:s,preview:a}},render(){var e,t;return A("div",{ref:"elRef",class:[this.ns.b(),this.ns.is("dragging",this.dragCollect.isDragging),this.ns.is("shallow-over",this.dropCollect.isShallowOver)]},[null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t,{item:this.item,index:this.index,isDragging:this.dragCollect.isDragging,isShallowOver:this.dropCollect.isShallowOver,isOver:this.dropCollect.isOver,isBeforeHover:this.isBeforeHover,isAfterHover:!this.isBeforeHover,direction:this.config.direction,drag:this.drag,preview:this.preview})])}}),{toString:pa}=Object.prototype;function ha(){return(65536*(1+Math.random())|0).toString(16).substring(1)}var ga=/* @__PURE__ */k({name:"Vue3DndDraggable",props:{opts:{type:Object,default:()=>({})},items:{type:Array,required:!0}},emits:["add","remove","move"],setup(e,{emit:t}){const n=S("vue3-dnd-draggable"),r=`${ha()+ha()}-${ha()}-${ha()}-${ha()}-${ha()}${ha()}${ha()}`,i=J(null),{opts:o,items:s}=te(e),a=x(()=>u.value.key||"id"),u=x(()=>ve({type:"Vue3DndDraggable",direction:"vertical"},o.value)),[c,l]=da({accept:u.value.type,collect:e=>({handlerId:e.getHandlerId(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0})}),canDrop:(t,n)=>!(e.items.length>0)&&(!u.value.canDropContainer||u.value.canDropContainer(t,n)),drop:(e,t)=>u.value.dropContainer?u.value.dropContainer(e,t):(!1!==t.canDrop()&&s.value.push(e),{group:r})});return l(i),{ns:n,groupId:r,key:a,rootRef:i,collect:c,config:u,onAdd:(e,n,r)=>{const i=s.value.findIndex(e=>e[a.value]===n);s.value.splice(e?i:i+1,0,r),t("add",r,i)},onRemove:e=>{console.warn("onRemove 未实现",e)},onMove:(e,n,r)=>{const i=s.value.findIndex(e=>e[a.value]===n),o=s.value.findIndex(e=>e[a.value]===r),u=s.value[o],c=e?i:i+1;!e&&c===o||e&&c-1===o||(s.value.splice(c,0,u),c<o?s.value.splice(o+1,1):s.value.splice(o,1),t("move",i,c))}}},render(){let e;return A("div",{ref:"rootRef",class:[this.ns.b(),this.ns.is("over",this.collect.isShallowOver)]},[A(N,{name:"list"},(t=e=this.items.map((e,t)=>A(fa,{group:this.groupId,key:e[this.key]||t,index:t,item:e,config:this.config,add:this.onAdd,remove:this.onRemove,move:this.onMove},{default:e=>{var t,n;return null===(t=(n=this.$slots).draggableItem)||void 0===t?void 0:t.call(n,e)}})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!H(t)?e:{default:()=>[e]}))]);var t}});function ya(){_gct.register.render?console.warn("渲染注册已存在,可能存在重复注册问题,请检查是否有重复引入渲染包的情况"):_gct.register.render=new ke}var ma=(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)},va=new URL("./index.min.css",import.meta.url);b.load(va.href);export{Gi as Context,Ge as ControllerType,$e as DESIGN_DATA_KEY_TAG,Ye as DESIGN_TYPE,Ue as DateFormat,He as DateRangeMap,Le as DatepickerRanges,je as DesignItemAttribute,We as DesignRenderViewPrefix,Vi as Events,xr as FieldSchema,Wi as GctComponent,kt as Globals,Xe as HandwritingPad,Ct as PageTypeEnum,qe as RenderNodeRegister,Ke as RenderNodeType,Cr as RenderPluginPgkUtil,ke as RenderRegister,ga as Vue3DndDraggable,fa as Vue3DndDraggableItem,_r as addDataByForm,jr as cacheAdapter,Or as calculate,Ji as calculateDepResult,Lr as defaultValMap,ma as deleteAndInsertArr,ro as dependencyToShow,io as dependencyToShowSync,Ei as emptyValueDisplay,Rt as formMap,Be as getDefaultDate,Ve as getDisabledDate,Jr as getIExp,Xr as getIKeywordFieldKeys,Fe as getMobileDateRange,_t as getPageTitle,Yt as getPremission,Qr as getQueryDateByKeyWord,ei as getQuerySort,Fr as getRefInfoId,xt as globalVarCaches,wr as identify,Rr as initFieldWidgetRuntime,zi as insetDep,ni as is,mi as isArray,gi as isBoolean,ai as isDate,ri as isDef,bi as isElement,si as isEmpty,Di as isEmptyStr,hi as isFunction,wi as isMap,ui as isNull,ci as isNullAndUnDef,li as isNullOrUnDef,di as isNumber,oi as isObject,fi as isPromise,yi as isRegExp,pi as isString,ii as isUnDef,Oi as isUrl,vi as isWindow,ya as onInit,At as pageDataforJson,Nt as pageGlobaVariables,Nr as schemaToStyle,kr as setDataByForm,Pt as setFormData,ao as tableWidgetByDept,so as tableWidgetToShow,Yr as transSelectData,Ar as transformData,$r as transformDataToDict,Tr as transformPropsField,Pr as transformSourceData,vo as useAsyncFileAttrs,uo as useDependency,co as useDependencyByRequired,no as useDependencyToShow,oo as useDependencyToShowList,mo as useDesignRenderController,eo as useDisplayRuleColumnByStyles,Zi as useDisplayRuleOptions,It as useGctSelect,Ur as useGetBodyBySearch,Zr as useQueryfilter,Mr as useStyle,Xi as useVisibileByRuleHook};
@@ -1,8 +1,8 @@
1
- import { calculate, identify } from "../../utils/expression/index.mjs";
2
1
  import { formMap, globalVarCaches, pageGlobaVariables } from "../utils/runGlobalByPage.mjs";
2
+ import { calculate, identify } from "../../utils/expression/index.mjs";
3
3
  import "../../utils/index.mjs";
4
- import { watchDebounced } from "@vueuse/core";
5
4
  import { computed } from "vue";
5
+ import { watchDebounced } from "@vueuse/core";
6
6
  //#region src/Event/Dependency/controller.ts
7
7
  /**组件依赖触发器 */
8
8
  function insetDep({ expression = "", rowData = null }, callback) {
@@ -1,9 +1,9 @@
1
- import { calculate, identify } from "../../utils/expression/index.mjs";
2
1
  import { formMap, getPremission } from "../utils/runGlobalByPage.mjs";
2
+ import { calculate, identify } from "../../utils/expression/index.mjs";
3
3
  import "../../utils/index.mjs";
4
4
  import { DisplayType } from "@gct-paas/core";
5
- import { watchDebounced } from "@vueuse/core";
6
5
  import { reactive, ref, toRef } from "vue";
6
+ import { watchDebounced } from "@vueuse/core";
7
7
  //#region src/Event/Dependency/displayRule.ts
8
8
  /**单组件显隐控制 */
9
9
  function useVisibileByRuleHook(props, id) {
@@ -1,10 +1,10 @@
1
1
  import { getRefInfoId } from "../../utils/get-ref-data.mjs";
2
+ import "../../utils/index.mjs";
2
3
  import "../utils/processRovedInfo.mjs";
3
4
  import { insetDep } from "./controller.mjs";
4
- import "../../utils/index.mjs";
5
5
  import { ASSIGNMENTSTRATEGY_ENUM, Dependency_ENUM } from "@gct-paas/core";
6
- import { watchDebounced } from "@vueuse/core";
7
6
  import { computed, inject, toRef } from "vue";
7
+ import { watchDebounced } from "@vueuse/core";
8
8
  //#region src/Event/Dependency/useDependency.ts
9
9
  function useDependency(widget, formState = {}, isRow = false) {
10
10
  const { readonly, field, isFieldModel, bindFieldLink, refOriginField, refOriginModelKey, refOriginFieldType } = widget.props;
@@ -1,16 +1,16 @@
1
- import { transformData, transformSourceData } from "../utils/model-transformer.mjs";
2
1
  import { Globals } from "./utils/runGlobalByPage.mjs";
2
+ import { transformData, transformSourceData } from "../utils/model-transformer.mjs";
3
+ import "../utils/index.mjs";
3
4
  import { $httpBizService, $request, BizService } from "./bizServiceRequest.mjs";
4
5
  import { globalLoading } from "./utils/globalLoading.mjs";
5
6
  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
+ import { toRaw } from "vue";
10
+ import { useStyleTag } from "@vueuse/core";
11
+ import BigNumberJS from "bignumber.js";
9
12
  import * as _ from "lodash-es";
10
13
  import { cloneDeep, differenceBy } from "lodash-es";
11
- import BigNumberJS from "bignumber.js";
12
- import { useStyleTag } from "@vueuse/core";
13
- import { toRaw } from "vue";
14
14
  //#region src/Event/baseEvent.ts
15
15
  var Events = class {
16
16
  context;