@ibiz-template/core 0.7.38-alpha.32 → 0.7.38-alpha.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -2036,6 +2036,7 @@ var LoginMode = /* @__PURE__ */ ((LoginMode2) => {
2036
2036
  LoginMode2["DEFAULT"] = "DEFAULT";
2037
2037
  LoginMode2["CUSTOM"] = "CUSTOM";
2038
2038
  LoginMode2["CAS"] = "CAS";
2039
+ LoginMode2["OAUTH"] = "OAUTH";
2039
2040
  return LoginMode2;
2040
2041
  })(LoginMode || {});
2041
2042
 
@@ -2340,7 +2341,9 @@ var Environment = {
2340
2341
  enableTitle: true,
2341
2342
  tokenHeader: "",
2342
2343
  tokenPrefix: "",
2343
- customParams: {}
2344
+ customParams: {},
2345
+ oauthOpenAccessId: "",
2346
+ enableEncryption: false
2344
2347
  };
2345
2348
 
2346
2349
  // src/error/http-error/http-error.ts
@@ -2668,6 +2671,21 @@ function calcOpenModeStyle(value, type) {
2668
2671
  function showTitle(str) {
2669
2672
  return ibiz.env.enableTitle ? str : void 0;
2670
2673
  }
2674
+ function fixJsonString(str) {
2675
+ let fixedString = str.replace(/'/g, '"');
2676
+ fixedString = fixedString.replace(/([{,])\s*([a-zA-Z0-9_]+)\s*:/g, '$1"$2":');
2677
+ fixedString = fixedString.replace(/,(\s*[\}\]])/g, "$1");
2678
+ fixedString = fixedString.trim();
2679
+ try {
2680
+ return JSON.parse(fixedString);
2681
+ } catch (e) {
2682
+ ibiz.log.error(str);
2683
+ return null;
2684
+ }
2685
+ }
2686
+ function getRandomInt(min = 0, max = 1e3) {
2687
+ return Math.floor(Math.random() * (max - min + 1)) + min;
2688
+ }
2671
2689
 
2672
2690
  // src/utils/interceptor/interceptor.ts
2673
2691
  var Interceptor = class {
@@ -4908,6 +4926,8 @@ export {
4908
4926
  fetchEventSource,
4909
4927
  fileListToArr,
4910
4928
  findRecursiveChild,
4929
+ fixJsonString,
4930
+ getRandomInt,
4911
4931
  getToken,
4912
4932
  install,
4913
4933
  isBase64,
@@ -1 +1 @@
1
- System.register(["ramda","lodash-es","qx-util","axios","qs","loglevel","loglevel-plugin-prefix"],(function(e){"use strict";var t,n,s,r,i,o,a,c,l,d,u,h,p,m,f,g,b,w,y;return{setters:[function(e){t=e.clone,n=e.isNotNil,s=e.isNil,r=e.mergeDeepRight},function(e){i=e.debounce,o=e.merge,a=e.cloneDeepWith,c=e.cloneWith,l=e.isObject,d=e.isFunction,u=e.uniqueId,e.round,e.cloneDeep},function(e){h=e.getCookie,p=e.notNilEmpty,m=e.createUUID,f=e.QXEvent},function(e){g=e.default},function(e){b=e.default},function(e){w=e.default},function(e){y=e.default}],execute:function(){function v(e){let t,n,s,r=!1;return function(i){void 0===t?(t=i,n=0,s=-1):t=function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(t,i);const o=t.length;let a=0;for(;n<o;){r&&(10===t[n]&&(a=++n),r=!1);let i=-1;for(;n<o&&-1===i;++n)switch(t[n]){case 58:-1===s&&(s=n-a);break;case 13:r=!0;case 10:i=n}if(-1===i)break;e(t.subarray(a,i),s),a=n,s=-1}a===o?t=void 0:0!==a&&(t=t.subarray(a),n-=a)}}e({awaitTimeout:async function(e,t,n){if(await new Promise((t=>{setTimeout((()=>{t(!0)}),e)})),t)return t(...n||[])},base64ToBlob:function(e){const t=atob(e.split(",")[1]),n=t.length,s=new Uint8Array(n);for(let e=0;e<n;e++)s[e]=t.charCodeAt(e);return new Blob([s])},base64ToStr:function(e){return decodeURIComponent(atob(e))},calcMimeByFileName:ve,calcOpenModeStyle:function(e,t){if(e>=0&&e<=100)return"".concat(e,"%");if(e>100)return"drawer"===t?e:"".concat(e,"px");return ibiz.log.error(ibiz.i18n.t("core.utils.invalidInputValue")),""},clone:function(e,t){if(r(Ae,t||{}).deep)return a(e,Ce);return c(e,Ce)},colorBlend:function(e,t,n=.5,s="hex"){e=e.trim(),t=t.trim();const r=ye(e),i=ye(t),o=[we((1-n)*r[0]+n*i[0]),we((1-n)*r[1]+n*i[1]),we((1-n)*r[2]+n*i[2]),(1-n)*r[3]+n*i[3]];if("hex"===s){const e=[o[0].toString(16).padStart(2,"0"),o[1].toString(16).padStart(2,"0"),o[2].toString(16).padStart(2,"0"),0===o[3]?"00":we(255*o[3]).toString(16).padStart(2,"0")];return"#".concat(e[0]).concat(e[1]).concat(e[2]).concat(e[3])}return"rgb(".concat(o[0]," ").concat(o[1]," ").concat(o[2]," / ").concat(o[3],")")},compareArr:function(e,t,n){const s=new Set([...e,...t]),r=[],i=[],o=[];if(n){const a=e.map((e=>e[n])),c=t.map((e=>e[n]));s.forEach((e=>{a.includes(e[n])?c.includes(e[n])?o.push(e):r.push(e):i.push(e)}))}else s.forEach((n=>{e.includes(n)?t.includes(n)?o.push(n):r.push(n):i.push(n)}));return{more:r,less:i,same:o}},debounce:function(e,t,n){let s;return function(...r){if(s&&clearTimeout(s),n){const n=!s;s=setTimeout((()=>{s=null}),t),n&&e.apply(this,r)}else s=setTimeout((()=>{e.apply(this,r)}),t)}},debounceAndAsyncMerge:function(e,t,n){let s,r=[];const o=i((async(...t)=>{s=void 0;try{const n=await e(...t);return r.forEach((e=>{e.resolve(n)})),r=[],n}catch(e){r.forEach((t=>{t.reject(e)})),r=[]}}),n);return async(...e)=>{let n=e;return s&&(n=t(s,n)),s=n,o(...n),new Promise(((e,t)=>{r.push({resolve:e,reject:t})}))}},debounceAndMerge:function(e,t,n){let s;const r=i(((...t)=>(s=void 0,e(...t))),n);return(...e)=>{let n=e;return s&&(n=t(s,n)),s=n,r(...n)}},downloadFileFromBlob:function(e,t){const n=ve(t),s=new Blob([e],{type:n}),r=URL.createObjectURL(s),i=document.createElement("a");i.href=r,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)},eventPath:he,fetchEventSource:R,fileListToArr:Ee,findRecursiveChild:function(e,t,n){const{compareField:s,compareCallback:i}=r(Te,n||{}),o=i||(e=>e[s]===t);let a;return Re(e,(e=>{if(o(e,t,s))return a=e,!0}),n),a},getToken:V,install:function(){if(window.ibiz)throw new Error(ibiz.i18n.t("core.noReInstall"));window.ibiz=new ke},isBase64:function(e){return/^[A-Za-z0-9+/=]+$/.test(e)&&e.length%4==0},isBase64Image:function(e){return/^data:image\/[a-zA-Z+]+;base64,([/+=\w\s]+|[^,]+)$/.test(e)},isElementSame:function(e,t,n){if(e.length!==t.length)return!1;const s=n?[...e.map((e=>e[n])),...t.map((e=>e[n]))]:[...e,...t];return Array.from(new Set(s)).length===e.length},isEmoji:function(e){return-1!==z.findIndex((t=>K(t)===e))},isEventInside:me,isImage:function(e){const t=e.includes(".")?e.split(".").pop():"";if(!t)return!1;return["jpeg","jpg","gif","png","bmp","svg"].includes(t)},isOverlap:function(e,t){return Array.from(new Set([...e,...t])).length!==e.length+t.length},isSvg:function(e){return W.test(e)},listenJSEvent:pe,mergeDefaultInLeft:function(e,t){Object.keys(t).forEach((r=>{n(t[r])&&s(e[r])&&(e[r]=t[r])}))},mergeInLeft:function(e,t){Object.keys(t).forEach((s=>{n(t[s])&&(e[s]=t[s])}))},onClickOutside:function(e,t,n={}){const{window:s=be,ignore:r=[],capture:i=!0}=n;if(!e)throw new q(ibiz.i18n.t("core.utils.targetElement"));if(!s)throw new q(ibiz.i18n.t("core.utils.cannotFindWindow"));let o=!0;const a=t=>![e,...r].some((e=>me(t,e)));let c=!1;let l;const d=e=>{c||(s.clearTimeout(l),o&&a(e)&&t(e))},u=[pe(s,"click",d,{passive:!0,capture:i}),pe(s,"pointerdown",(e=>{c||(o=a(e))}),{passive:!0}),pe(s,"pointerup",(e=>{if(!c&&0===e.button){const t=he(e);e.composedPath=()=>t,l=s.setTimeout((()=>d(e)),50)}}),{passive:!0})].filter(Boolean);return{stop:()=>u.forEach((e=>e())),pause:()=>{c=!0},proceed:()=>{c=!1}}},plus:function(e,t){let n,s;try{n=e.toString().split(".")[1].length}catch(e){n=0}try{s=t.toString().split(".")[1].length}catch(e){s=0}const r=10**Math.max(n,s);return(e*r+t*r)/r},recursiveIterate:Re,selectFile:xe,setRemoteStyle:async function(e){try{const t=await ibiz.net.get(e),n=document.createElement("style");n.setAttribute("title","app-style-css"),n.innerText=t.data,document.head.appendChild(n)}catch(t){ibiz.log.debug(ibiz.i18n.t("core.utils.remoteStylesheet"),e)}},showTitle:function(e){return ibiz.env.enableTitle?e:void 0},strToBase64:K,throttle:function(e,t){let n=null;return function(...s){n||(n=setTimeout((()=>{e.apply(this,s),n=null}),t))}},toDisposable:U,toNumberOrNil:function(e){if(s(e))return;const t=Number(e);if(Number.isNaN(t))return;return t},updateKeyDefine:function(e,t){t.forEach((t=>{Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,writable:!0,value:void 0})}))},uploadFile:function(e){const t=o({multiple:!0,accept:"",separate:!0,beforeUpload:(e,t)=>!0,finish:e=>{},success:(e,t)=>{},error:(e,t)=>{},progress:e=>{}},e),n=async e=>{const n=e.map((e=>({status:"uploading",name:e.name,uid:u(),percentage:0})));if(!t.beforeUpload(e,n))return n.forEach((e=>{e.status="cancel"})),ibiz.log.debug("取消上传",n),n;try{const s=await(async e=>{if(t.request&&d(t.request))return t.request(e);const n=new FormData;throw e.forEach((e=>{n.append("file",e)})),new q(ibiz.i18n.t("core.utils.multiApplicationMode"))})(e);n.forEach((e=>{e.status="finished"})),t.success(n,s),n.forEach((e=>{e.response=s}))}catch(s){n.forEach((e=>{e.status="fail"})),t.error(n,s),n.forEach((e=>{e.error=s})),ibiz.log.error(s),ibiz.log.error(ibiz.i18n.t("core.utils.uploadFailed",{file:e.map((e=>e.name)).join(",")}))}return n};xe({accept:t.accept,multiple:t.multiple,onSelected:e=>{(async e=>{const s=t.separate?e.map((e=>[e])):[e],r=await Promise.allSettled(s.map((async e=>n(e)))),i=[];r.forEach((e=>{"fulfilled"===e.status&&i.push(...e.value)})),t.finish(i)})(e)}})}});var E=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n},x=e("EventStreamContentType","text/event-stream"),_=1e3,O="last-event-id";function R(e,t){var{signal:n,headers:s,onopen:r,onmessage:i,onclose:o,onerror:a,openWhenHidden:c,fetch:l}=t,d=E(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((t,u)=>{const h=Object.assign({},s);let p;function m(){p.abort(),document.hidden||E()}h.accept||(h.accept=x),c||document.addEventListener("visibilitychange",m);let f=_,g=0;function b(){document.removeEventListener("visibilitychange",m),window.clearTimeout(g),p.abort()}null==n||n.addEventListener("abort",(()=>{b(),t()}));const w=null!=l?l:window.fetch,y=null!=r?r:T;async function E(){var n;p=new AbortController;try{const n=await w(e,Object.assign(Object.assign({},d),{headers:h,signal:p.signal}));await y(n),await async function(e,t){const n=e.getReader();let s;for(;!(s=await n.read()).done;)t(s.value)}(n.body,v(function(e,t,n){let s={data:"",event:"",id:"",retry:void 0};const r=new TextDecoder;return function(i,o){if(0===i.length)null==n||n(s),s={data:"",event:"",id:"",retry:void 0};else if(o>0){const n=r.decode(i.subarray(0,o)),a=o+(32===i[o+1]?2:1),c=r.decode(i.subarray(a));switch(n){case"data":s.data=s.data?s.data+"\n"+c:c;break;case"event":s.event=c;break;case"id":e(s.id=c);break;case"retry":const n=parseInt(c,10);isNaN(n)||t(s.retry=n)}}}}((e=>{e?h[O]=e:delete h[O]}),(e=>{f=e}),i))),null==o||o(),b(),t()}catch(e){if(!p.signal.aborted)try{const t=null!==(n=null==a?void 0:a(e))&&void 0!==n?n:f;window.clearTimeout(g),g=window.setTimeout(E,t)}catch(e){b(),u(e)}}}E()}))}function T(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(x)))throw new Error("Expected content-type to be ".concat(x,", Actual: ").concat(t))}var C=class e{constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}};C.Undefined=new C(void 0);var A=C,I=e("LinkedList",class{constructor(){this._first=A.Undefined,this._last=A.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===A.Undefined}clear(){let e=this._first;for(;e!==A.Undefined;){const{next:t}=e;e.prev=A.Undefined,e.next=A.Undefined,e=t}this._first=A.Undefined,this._last=A.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new A(e);if(this._first===A.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(n))}}shift(){if(this._first===A.Undefined)return;const e=this._first.element;return this._remove(this._first),e}pop(){if(this._last===A.Undefined)return;const e=this._last.element;return this._remove(this._last),e}_remove(e){if(e.prev!==A.Undefined&&e.next!==A.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===A.Undefined&&e.next===A.Undefined?(this._first=A.Undefined,this._last=A.Undefined):e.next===A.Undefined?(this._last=this._last.prev,this._last.next=A.Undefined):e.prev===A.Undefined&&(this._first=this._first.next,this._first.prev=A.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==A.Undefined;)yield e.element,e=e.next}});function M(e){const t=this;let n,s=!1;return function(){return s||(s=!0,n=e.apply(t,arguments)),n}}function U(e){return{dispose:M((()=>{e()}))}}var k=e("CommandsRegistry",class{constructor(){this.commands=new Map}registerCommand(e,t,n){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t,opts:n})}const{id:s}=e;let r=this.commands.get(s);r||(r=new I,this.commands.set(s,r));const i=r.unshift(e);return U((()=>{i();const e=this.commands.get(s);(null==e?void 0:e.isEmpty())&&this.commands.delete(s)}))}hasCommand(e){return this.commands.has(e)}getCommand(e){const t=this.commands.get(e);if(t&&!t.isEmpty())return t[Symbol.iterator]().next().value}getCommands(){const e=new Map,t=this.commands.keys();for(const n of t){const t=this.getCommand(n);t&&e.set(n,t)}return e}getCommandOpt(e){const t=this.getCommand(e);return null==t?void 0:t.opts}}),N=e("CommandController",class{constructor(){this.commandRegister=new k}register(e,t,n){return this.commandRegister.registerCommand(e,t,n)}async execute(e,...t){const n=this.commandRegister.getCommand(e);if(n)return n.handler(...t);throw new Error(ibiz.i18n.t("core.command.unregisteredCommand",{id:e}))}hasCommand(e,t){const n=!!this.commandRegister.hasCommand(e);if(!0===t&&!0===n)throw new Error("未注册指令: ".concat(e,",请先注册指令"));return n}getCommandOpts(e){return this.commandRegister.getCommandOpt(e)}}),P=(e("commands",new N),e("CoreConst",class{}));P.DEFAULT_MODEL_SERVICE_TAG="default",P.TOKEN="ibzuaa-token",P.REFRESH_TOKEN="ibzuaa-refresh-token",P.TOKEN_EXPIRES="ibzuaa-token-expires",P.TOKEN_REMEMBER="ibizuaa-token-remember",P.IS_ANONYMOUS="ibizuaa-is-anonymous";var S=e("NOOP",(()=>{})),z=e("EMOJILIST",["😀","😃","😄","😁","😆","😅","😂","🤣","😌","😊","😇","🙂","🙃","😉","😌","😍","😘","😗","😙","😚","😋","😜","😝","😛","🤑","🤗","🤓","😎","🤡","🤠","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","😤","😠","😡","😶","😐","😑","😯","😦","😧","😮","😲","😵","😳","😱","😨","😰","😢","😥","🤤","😭","😓","😪","😴","🙄","🤔","🤥","😬","🤐","🤢","🤧","😷","🤒","🤕","😈","👿","👹","👺","💩","👻","💀","☠️","👽","👾","🤖","🎃","😺","😸","😹","😻","😼","😽","🙀","😿","😾","👐","🙌","👏","🙏","🤝","👍","👎","👊","✊","🤛","🤜","🤞","✌️","🤘","👌","👈","👉","👆","👇","☝️","✋","🤚","🖐","🖖","👋","🤙","💪","🖕","✍️","🤳","💅","💍","💄","💋","👄","👅","👂","👃","👣","👁","👀","🗣","👤","👥","👶","👦","👧","👨","👩","👱‍♀","👱","👴","👵","👲","👳‍♀","👳","👮‍♀","👮","👷‍♀","👷","💂‍♀","💂","👩‍⚕","👨‍⚕","👩‍🌾","👨‍🌾","👩‍🍳","👨‍🍳","👩‍🎓","👨‍🎓","👩‍🎤","👨‍🎤","👩‍🏫","👨‍🏫","👩‍🏭","👨‍🏭","👩‍💻","👨‍💻","👩‍💼","👨‍💼","👩‍🔧","👨‍🔧","👩‍🔬","👨‍🔬","👩‍🎨","👨‍🎨","👩‍🚒","👨‍🚒","👩‍🚀","👨‍🚀","🤶","🎅","👸","🤴","👰","🤵","👼","🤰","🙇‍♀","🙇","💁","💁‍♂","🙅","🙅‍♂","🙆","🙆‍♂","🙋","🙋‍♂","🤦‍♀","🤦‍♂","🤷‍♀","🤷‍♂","🙎","🙎‍♂","🙍","🙍‍♂","💇","💇‍♂","💆","💆‍♂","🕴","💃","🕺","👯","👯‍♂","🚶‍♀","🚶","🏃‍♀","🏃","👫","👭","👬","💑","👩‍❤️‍👩","👨‍❤️‍👨","💏","👩‍❤️‍💋‍👩","👨‍❤️‍💋‍👨","👪","👨‍👩‍👧","👨‍👩‍👧‍👦","👨‍👩‍👦‍👦","👨‍👩‍👧‍👧","👩‍👩‍👦","👩‍👩‍👧","👩‍👩‍👧‍👦","👩‍👩‍👦‍👦","👩‍👩‍👧‍👧","👨‍👨‍👦","👨‍👨‍👧","👨‍👨‍👧‍👦","👨‍👨‍👦‍👦","👨‍👨‍👧‍👧","👩‍👦","👩‍👧","👩‍👧‍👦","👩‍👦‍👦","👩‍👧‍👧","👨‍👦","👨‍👧","👨‍👧‍👦","👨‍👦‍👦","👨‍👧‍👧","👚","👕","👖","👔","👗","👙","👘","👠","👡","👢","👞","👟","👒","🎩","🎓","👑","⛑","🎒","👝","👛","👜","💼","👓","🕶","🌂","☂️","🐶","🐱","🐭","🐹","🐰","🦊","🐻","🐼","🐨","🐯","🦁","🐮","🐷","🐽","🐸","🐵","🙈","🙉","🙊","🐒","🐔","🐧","🐦","🐤","🐣","🐥","🦆","🦅","🦉","🦇","🐺","🐗","🐴","🦄","🐝","🐛","🦋","🐌","🐚","🐞","🐜","🕷","🕸","🐢","🐍","🦎","🦂","🦀","🦑","🐙","🦐","🐠","🐟","🐡","🐬","🦈","🐳","🐋","🐊","🐆","🐅","🐃","🐂","🐄","🦌","🐪","🐫","🐘","🦏","🦍","🐎","🐖","🐐","🐏","🐑","🐕","🐩","🐈","🐓","🦃","🕊","🐇","🐁","🐀","🐿","🐾","🐉","🐲","🌵","🎄","🌲","🌳","🌴","🌱","🌿","☘️","🍀","🎍","🎋","🍃","🍂","🍁","🍄","🌾","💐","🌷","🌹","🥀","🌻","🌼","🌸","🌺","🌎","🌍","🌏","🌕","🌖","🌗","🌘","🌑","🌒","🌓","🌔","🌚","🌝","🌞","🌛","🌜","🌙","💫","⭐️","🌟","✨","⚡️","🔥","💥","☄","☀️","🌤","⛅️","🌥","🌦","🌈","☁️","🌧","⛈","🌩","🌨","☃️","⛄️","❄️","🌬","💨","🌪","🌫","🌊","💧","💦","☔️","🍏","🍎","🍐","🍊","🍋","🍌","🍉","🍇","🍓","🍈","🍒","🍑","🍍","🥝","🥑","🍅","🍆","🥒","🥕","🌽","🌶","🥔","🍠","🌰","🥜","🍯","🥐","🍞","🥖","🧀","🥚","🍳","🥓","🥞","🍤","🍗","🍖","🍕","🌭","🍔","🍟","🥙","🌮","🌯","🥗","🥘","🍝","🍜","🍲","🍥","🍣","🍱","🍛","🍚","🍙","🍘","🍢","🍡","🍧","🍨","🍦","🍰","🎂","🍮","🍭","🍬","🍫","🍿","🍩","🍪","🥛","🍼","☕️","🍵","🍶","🍺","🍻","🥂","🍷","🥃","🍸","🍹","🍾","🥄","🍴","🍽","⚽️","🏀","🏈","⚾️","🎾","🏐","🏉","🎱","🏓","🏸","🥅","🏒","🏑","🏏","⛳️","🏹","🎣","🥊","🥋","⛸","🎿","⛷","🏂","🏋️‍♀️","🏋","🤺","🤼‍♀","🤼‍♂","🤸‍♀","🤸‍♂","⛹️‍♀️","⛹","🤾‍♀","🤾‍♂","🏌️‍♀️","🏌","🏄‍♀","🏄","🏊‍♀","🏊","🤽‍♀","🤽‍♂","🚣‍♀","🚣","🏇","🚴‍♀","🚴","🚵‍♀","🚵","🎽","🏅","🎖","🥇","🥈","🥉","🏆","🏵","🎗","🎫","🎟","🎪","🤹‍♀","🤹‍♂","🎭","🎨","🎬","🎤","🎧","🎼","🎹","🥁","🎷","🎺","🎸","🎻","🎲","🎯","🎳","🎮","🎰","🚗","🚕","🚙","🚌","🚎","🏎","🚓","🚑","🚒","🚐","🚚","🚛","🚜","🛴","🚲","🛵","🏍","🚨","🚔","🚍","🚘","🚖","🚡","🚠","🚟","🚃","🚋","🚞","🚝","🚄","🚅","🚈","🚂","🚆","🚇","🚊","🚉","🚁","🛩","✈️","🛫","🛬","🚀","🛰","💺","🛶","⛵️","🛥","🚤","🛳","⛴","🚢","⚓️","🚧","⛽️","🚏","🚦","🚥","🗺","🗿","🗽","⛲️","🗼","🏰","🏯","🏟","🎡","🎢","🎠","⛱","🏖","🏝","⛰","🏔","🗻","🌋","🏜","🏕","⛺️","🛤","🛣","🏗","🏭","🏠","🏡","🏘","🏚","🏢","🏬","🏣","🏤","🏥","🏦","🏨","🏪","🏫","🏩","💒","🏛","⛪️","🕌","🕍","🕋","⛩","🗾","🎑","🏞","🌅","🌄","🌠","🎇","🎆","🌇","🌆","🏙","🌃","🌌","🌉","🌁","⌚️","📱","📲","💻","⌨️","🖥","🖨","🖱","🖲","🕹","🗜","💽","💾","💿","📀","📼","📷","📸","📹","🎥","📽","🎞","📞","☎️","📟","📠","📺","📻","🎙","🎚","🎛","⏱","⏲","⏰","🕰","⌛️","⏳","📡","🔋","🔌","💡","🔦","🕯","🗑","🛢","💸","💵","💴","💶","💷","💰","💳","💎","⚖️","🔧","🔨","⚒","🛠","⛏","🔩","⚙️","⛓","🔫","💣","🔪","🗡","⚔️","🛡","🚬","⚰️","⚱️","🏺","🔮","📿","💈","⚗️","🔭","🔬","🕳","💊","💉","🌡","🚽","🚰","🚿","🛁","🛀","🛎","🔑","🗝","🚪","🛋","🛏","🛌","🖼","🛍","🛒","🎁","🎈","🎏","🎀","🎊","🎉","🎎","🏮","🎐","✉️","📩","📨","📧","💌","📥","📤","📦","🏷","📪","📫","📬","📭","📮","📯","📜","📃","📄","📑","📊","📈","📉","🗒","🗓","📆","📅","📇","🗃","🗳","🗄","📋","📁","📂","🗂","🗞","📰","📓","📔","📒","📕","📗","📘","📙","📚","📖","🔖","🔗","📎","🖇","📐","📏","📌","📍","✂️","🖊","🖋","✒️","🖌","🖍","📝","✏️","🔍","🔎","🔏","🔐","🔒","🔓","❤️","💛","💚","💙","💜","🖤","💔","❣️","💕","💞","💓","💗","💖","💘","💝","💟","☮️","✝️","☪️","🕉","☸️","✡️","🔯","🕎","☯️","☦️","🛐","⛎","♈️","♉️","♊️","♋️","♌️","♍️","♎️","♏️","♐️","♑️","♒️","♓️","🆔","⚛️","🉑","☢️","☣️","📴","📳","🈶","🈚️","🈸","🈺","🈷️","✴️","🆚","💮","🉐","㊙️","㊗️","🈴","🈵","🈹","🈲","🅰️","🅱️","🆎","🆑","🅾️","🆘","❌","⭕️","🛑","⛔️","📛","🚫","💯","💢","♨️","🚷","🚯","🚳","🚱","🔞","📵","🚭","❗️","❕","❓","❔","‼️","⁉️","🔅","🔆","〽️","⚠️","🚸","🔱","⚜️","🔰","♻️","✅","🈯️","💹","❇️","✳️","❎","🌐","💠","Ⓜ️","🌀","💤","🏧","🚾","♿️","🅿️","🈳","🈂️","🛂","🛃","🛄","🛅","🚹","🚺","🚼","🚻","🚮","🎦","📶","🈁","🔣","ℹ️","🔤","🔡","🔠","🆖","🆗","🆙","🆒","🆕","🆓","0️⃣","1️⃣","2️⃣","3️⃣","4️⃣","5️⃣","6️⃣","7️⃣","8️⃣","9️⃣","🔟","🔢","#️⃣","*️⃣","▶️","⏸","⏯","⏹","⏺","⏭","⏮","⏩","⏪","⏫","⏬","◀️","🔼","🔽","➡️","⬅️","⬆️","⬇️","↗️","↘️","↙️","↖️","↕️","↔️","↪️","↩️","⤴️","⤵️","🔀","🔁","🔂","🔄","🔃","🎵","🎶","➕","➖","➗","✖️","💲","💱","™️","©️","®️","〰️","➰","➿","🔚","🔙","🔛","🔝","🔜","✔️","☑️","🔘","⚪️","⚫️","🔴","🔵","🔺","🔻","🔸","🔹","🔶","🔷","🔳","🔲","▪️","▫️","◾️","◽️","◼️","◻️","⬛️","⬜️","🔈","🔇","🔉","🔊","🔔","🔕","📣","📢","👁‍🗨","💬","💭","🗯","♠️","♣️","♥️","♦️","🃏","🎴","🀄️","🕐","🕑","🕒","🕓","🕔","🕕","🕖","🕗","🕘","🕙","🕚","🕛","🕜","🕝","🕞","🕟","🕠","🕡","🕢","🕣","🕤","🕥","🕦","🕧","🏳️","🏴","🏁","🚩","🏳️‍🌈","🇦🇫","🇦🇽","🇦🇱","🇩🇿","🇦🇸","🇦🇩","🇦🇴","🇦🇮","🇦🇶","🇦🇬","🇦🇷","🇦🇲","🇦🇼","🇦🇺","🇦🇹","🇦🇿","🇧🇸","🇧🇭","🇧🇩","🇧🇧","🇧🇾","🇧🇪","🇧🇿","🇧🇯","🇧🇲","🇧🇹","🇧🇴","🇧🇶","🇧🇦","🇧🇼","🇧🇷","🇮🇴","🇻🇬","🇧🇳","🇧🇬","🇧🇫","🇧🇮","🇨🇻","🇰🇭","🇨🇲","🇨🇦","🇮🇨","🇰🇾","🇨🇫","🇹🇩","🇨🇱","🇨🇳","🇨🇽","🇨🇨","🇨🇴","🇰🇲","🇨🇬","🇨🇩","🇨🇰","🇨🇷","🇨🇮","🇭🇷","🇨🇺","🇨🇼","🇨🇾","🇨🇿","🇩🇰","🇩🇯","🇩🇲","🇩🇴","🇪🇨","🇪🇬","🇸🇻","🇬🇶","🇪🇷","🇪🇪","🇪🇹","🇪🇺","🇫🇰","🇫🇴","🇫🇯","🇫🇮","🇫🇷","🇬🇫","🇵🇫","🇹🇫","🇬🇦","🇬🇲","🇬🇪","🇩🇪","🇬🇭","🇬🇮","🇬🇷","🇬🇱","🇬🇩","🇬🇵","🇬🇺","🇬🇹","🇬🇬","🇬🇳","🇬🇼","🇬🇾","🇭🇹","🇭🇳","🇭🇰","🇭🇺","🇮🇸","🇮🇳","🇮🇩","🇮🇷","🇮🇶","🇮🇪","🇮🇲","🇮🇱","🇮🇹","🇯🇲","🇯🇵","🎌","🇯🇪","🇯🇴","🇰🇿","🇰🇪","🇰🇮","🇽🇰","🇰🇼","🇰🇬","🇱🇦","🇱🇻","🇱🇧","🇱🇸","🇱🇷","🇱🇾","🇱🇮","🇱🇹","🇱🇺","🇲🇴","🇲🇰","🇲🇬","🇲🇼","🇲🇾","🇲🇻","🇲🇱","🇲🇹","🇲🇭","🇲🇶","🇲🇷","🇲🇺","🇾🇹","🇲🇽","🇫🇲","🇲🇩","🇲🇨","🇲🇳","🇲🇪","🇲🇸","🇲🇦","🇲🇿","🇲🇲","🇳🇦","🇳🇷","🇳🇵","🇳🇱","🇳🇨","🇳🇿","🇳🇮","🇳🇪","🇳🇬","🇳🇺","🇳🇫","🇲🇵","🇰🇵","🇳🇴","🇴🇲","🇵🇰","🇵🇼","🇵🇸","🇵🇦","🇵🇬","🇵🇾","🇵🇪","🇵🇭","🇵🇳","🇵🇱","🇵🇹","🇵🇷","🇶🇦","🇷🇪","🇷🇴","🇷🇺","🇷🇼","🇧🇱","🇸🇭","🇰🇳","🇱🇨","🇵🇲","🇻🇨","🇼🇸","🇸🇲","🇸🇹","🇸🇦","🇸🇳","🇷🇸","🇸🇨","🇸🇱","🇸🇬","🇸🇽","🇸🇰","🇸🇮","🇸🇧","🇸🇴","🇿🇦","🇬🇸","🇰🇷","🇸🇸","🇪🇸","🇱🇰","🇸🇩","🇸🇷","🇸🇿","🇸🇪","🇨🇭","🇸🇾","🇹🇼","🇹🇯","🇹🇿","🇹🇭","🇹🇱","🇹🇬","🇹🇰","🇹🇴","🇹🇹","🇹🇳","🇹🇷","🇹🇲","🇹🇨","🇹🇻","🇺🇬","🇺🇦","🇦🇪","🇬🇧","🇺🇸","🇻🇮","🇺🇾","🇺🇿","🇻🇺","🇻🇦","🇻🇪","🇻🇳","🇼🇫","🇪🇭","🇾🇪","🇿🇲","🇿🇼"]),L=(e("HttpStatusMessageConst",{200:"服务器成功返回请求的数据。",201:"新建或修改数据成功。",202:"一个请求已经进入后台排队(异步任务)。",204:"删除数据成功。",400:"发出的请求有错误,服务器没有进行新建或修改数据的操作。",401:"用户没有权限(令牌、用户名、密码错误)。",403:"用户得到授权,但是访问是被禁止的。",404:"发出的请求针对的是不存在的记录,服务器没有进行操作。",406:"请求的格式不可得。",410:"请求的资源被永久删除,且不会再得到的。",422:"当创建一个对象时,发生一个验证错误。",500:"服务器发生错误,请检查服务器。",502:"网关错误。",503:"服务不可用,服务器暂时过载或维护。",504:"网关超时。"}),e("LoginMode",(e=>(e.DEFAULT="DEFAULT",e.CUSTOM="CUSTOM",e.CAS="CAS",e))(L||{}))),j=e("MenuPermissionMode",(e=>(e.MIXIN="MIXIN",e.RESOURCE="RESOURCE",e.RT="RT",e))(j||{})),D=(e("IBizContext",class e{constructor(e={},t){Object.defineProperty(this,"_associationContext",{enumerable:!1,configurable:!0,value:[]}),t&&this.initWithParent(t),Object.assign(this,e)}initWithParent(e){const t=this;Object.defineProperty(this,"_parent",{enumerable:!1,writable:!0,value:e}),Object.defineProperty(this,"_context",{enumerable:!1,writable:!0,value:{}});const n={};Object.keys(e).forEach((e=>{Object.prototype.hasOwnProperty.call(this,e)||(n[e]={enumerable:!0,configurable:!0,set(n){t._context[e]=null==n?null:n},get:()=>void 0!==t._context[e]?t._context[e]:t._parent?t._parent[e]:""})})),Object.defineProperties(this,n)}getOwnContext(){const e={};return Object.keys(this).forEach((t=>{this._parent&&Object.prototype.hasOwnProperty.call(this._parent,t)&&!Object.prototype.hasOwnProperty.call(this._context,t)||(e[t]=this[t])})),e}destroy(){this._parent=void 0,this._context={},this._associationContext.forEach((e=>{e.destroy()}))}clone(){const n=new e(t(this.getOwnContext()),this._parent);return this._associationContext.push(n),n}deepClone(){const e={};return Object.keys(this).forEach((t=>{e[t]=this[t]})),e}reset(e={},t){this._associationContext.forEach((e=>{e.destroy()})),this._parent&&(this._parent={},this._context={}),Object.keys(this).forEach((e=>{try{delete this[e]}catch(e){}})),t&&this.initWithParent(t),Object.assign(this,e)}static create(t,n){return new e(t,n)}}),e("IBizParams",class{constructor(e,t){return Object.defineProperty(this,"_parent",{enumerable:!1,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_params",{enumerable:!1,configurable:!0,writable:!0,value:e||{}}),this.createProxy()}createProxy(){return new Proxy(this,{set:(e,t,n)=>(["_params","_parent"].includes(t)?e[t]=n:e._params[t]=n,!0),get:(e,t,n)=>void 0!==e[t]?e[t]:void 0!==e._params[t]?e._params[t]:e._parent&&void 0!==e._parent[t]?e._parent[t]:void 0,ownKeys(e){const t=[...new Set([...Object.keys(e._params),...Object.keys(e._parent||{})])];return function(e,t){t.forEach((t=>{Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,writable:!0,value:void 0})}))}(e,t),t}})}reset(e,t){this._params=e||{},this._parent=t}destroy(){this._params={},this._parent=void 0}}),e("Environment",{dev:!1,hub:!0,enableMqtt:!1,mqttUrl:"/portal/mqtt/mqtt",isEnableMultiLan:!1,anonymousUser:"",anonymousPwd:"",enableAnonymous:!1,logLevel:"ERROR",baseUrl:"/api",appId:"",pluginBaseUrl:"http://172.16.240.221",isLocalModel:!1,remoteModelUrl:"/remotemodel",assetsUrl:"./assets",dcSystem:"",downloadFileUrl:"/ibizutil/download/{cat}",uploadFileUrl:"/ibizutil/upload/{cat}",casLoginUrl:"",loginMode:"DEFAULT",menuPermissionMode:"MIXIN",enablePermission:!0,routePlaceholder:"-",enableWfAllHistory:!1,isMob:!1,isSaaSMode:!0,AppTitle:"",favicon:"./favicon.ico",enableTitle:!0,tokenHeader:"",tokenPrefix:"",customParams:{}})),B=e("HttpError",class extends Error{constructor(e){super("HttpError"),this.name="HttpError";const t=e.response;this.response=e.response,this.tag="",t?(t.data?this.message=t.data.message:this.message=t.statusText,this.message||(this.message=ibiz.i18n.t("core.error.networkAbnormality")),this.status=t.status):(this.message=e.message||"",this.status=500)}}),q=(e("ModelError",class extends Error{constructor(e,t){super(ibiz.i18n.t("core.error.modelMsg",{id:e.id,msg:t?": ".concat(t):""})),this.model=e,this.name=ibiz.i18n.t("core.error.unsupportedModels")}}),e("RuntimeError",class extends Error{constructor(e){super(e),this.message=e,this.name="Runtime Error"}})),F=(e("RuntimeModelError",class extends Error{constructor(e,t){super(ibiz.i18n.t("core.error.modelMsg",{id:e.id,msg:t?": ".concat(t):""})),this.model=e,this.name=ibiz.i18n.t("core.error.modelConfigurationMissing")}}),e("NoticeError",class extends Error{constructor(e,t){super(e),this.message=e,this.duration=t,this.name="notice Error"}}),e("EntityError",class extends B{constructor(e){if(super(e),this.name="EntityError",this.details=[],this.response){const{details:e=[]}=this.response.data;this.details=e.map((e=>({name:e.fieldname.toLowerCase(),logicName:e.fieldlogicname,errorType:e.fielderrortype,errorInfo:e.fielderrorinfo})))}}})),H=e("HttpErrorFactory",class{static getInstance(e){const{response:t}=e;if(!t||!t.data)return new B(e);const{type:n}=t.data;return"EntityException"===n?new F(e):new B(e)}});function V(){return h(P.TOKEN)}var W=/<svg\b[^>]*>[\s\S]*?<\/svg>/;function K(e){return btoa(encodeURIComponent(e))}var Y=e("Interceptor",class{async onBeforeRequest(e){return e}onRequestError(e){return Promise.reject(e)}async onResponseSuccess(e){return e}onResponseError(e){return Promise.reject(e)}use(e){this.requestTag=e.interceptors.request.use(this.onBeforeRequest,this.onRequestError),this.responseTag=e.interceptors.response.use(this.onResponseSuccess,this.onResponseError)}eject(e){this.requestTag&&e.interceptors.request.eject(this.requestTag),this.responseTag&&e.interceptors.response.eject(this.responseTag)}}),J=e("CoreInterceptor",class extends Y{async onBeforeRequest(e){e=await super.onBeforeRequest(e);const{headers:t}=e;t.set("".concat(ibiz.env.tokenHeader,"Authorization"),"".concat(ibiz.env.tokenPrefix,"Bearer ").concat(V()));let n=ibiz.env.dcSystem;const{orgData:s}=ibiz;return s&&(s.systemid&&(n=s.systemid),s.orgid&&t.set("srforgid",s.orgid)),t.set("srfsystemid",n),e}}),$=class{constructor(e){this.parent=e,this.evt=new f(1e3)}next(e){this.evt.emit("all",e),this.parent&&this.nextParent(e)}nextParent(e){this.parent&&(this.parent.evt.emit("all",e),this.parent.nextParent(e))}on(e){this.evt.on("all",e)}off(e){this.evt.off("all",e)}},G=class extends ${},X=class extends ${sendCommand(e,t,n){const s={messageid:m(),messagename:"command",type:"COMMAND",subtype:t,triggerKey:n,data:e};this.next(s)}},Z=class extends X{send(e,t){this.sendCommand(e,"OBJECTCREATED",null==t?void 0:t.triggerKey)}},Q=class extends X{send(e,t){this.sendCommand(e,"OBJECTUPDATED",null==t?void 0:t.triggerKey)}},ee=class extends X{send(e,t){this.sendCommand(e,"OBJECTREMOVED",null==t?void 0:t.triggerKey)}},te=class extends X{},ne=class extends X{send(e){this.sendCommand(e,"ASYNCACTION")}},se=class extends X{send(e){this.sendCommand(e,"INTERNALMESSAGE")}},re=class extends X{send(e){this.sendCommand(e,"MARKOPENDATA")}},ie=class extends ${constructor(){super(...arguments),this.change=new te,this.create=new Z(this),this.update=new Q(this),this.remove=new ee(this),this.asyncAction=new ne(this),this.internalMessage=new se(this),this.markOpenData=new re(this)}next(e){switch(e.subtype){case"OBJECTCREATED":this.create.next(e),this.change.next(e);break;case"OBJECTUPDATED":this.update.next(e),this.change.next(e);break;case"OBJECTREMOVED":this.remove.next(e),this.change.next(e);break;case"ASYNCACTION":this.asyncAction.next(e);break;case"INTERNALMESSAGE":this.internalMessage.next(e);break;case"MARKOPENDATA":this.markOpenData.next(e);break;default:super.next(e)}}nextParent(e){switch(e.subtype){case"OBJECTCREATED":case"OBJECTUPDATED":case"OBJECTREMOVED":this.change.next(e)}super.nextParent(e)}send(e,t,n){const s={messageid:m(),messagename:"command",type:"COMMAND",subtype:t,triggerKey:n,data:e};this.next(s)}},oe=class extends ${send(e){const t={messageid:m(),messagename:"console",type:"CONSOLE",data:e};this.next(t)}},ae=class extends ${send(e){const t={messageid:m(),messagename:"error",type:"ERROR",data:e};this.next(t)}},ce=e("MessageCenter",class{constructor(){this.all=new G,this.command=new ie(this.all),this.console=new oe(this.all),this.error=new ae(this.all)}next(e){"COMMAND"===e.type?this.command.next(e):"CONSOLE"===e.type?this.console.next(e):this.all.next(e)}on(e){this.all.on(e)}off(e){this.all.off(e)}});function le(e,t,n,s,r){let i="".concat(e,"-").concat(t);return n&&(i+="-".concat(n)),s&&(i+="__".concat(s)),r&&(i+="--".concat(r)),i}e("Namespace",class{constructor(e,t){this.block=e,this.namespace=t||"ibiz"}b(e=""){return le(this.namespace,this.block,e,"","")}e(e){return e?le(this.namespace,this.block,"",e,""):""}m(e){return e?le(this.namespace,this.block,"","",e):""}be(e,t){return e&&t?le(this.namespace,this.block,e,t,""):""}em(e,t){return e&&t?le(this.namespace,this.block,"",e,t):""}bm(e,t){return e&&t?le(this.namespace,this.block,e,"",t):""}bem(e,t,n){return e&&t&&n?le(this.namespace,this.block,e,t,n):""}is(e,t){return e&&t?"".concat("is-").concat(e):""}cssVar(e){const t={};for(const n in e)e[n]&&(t[this.cssVarName(n)]=e[n]);return t}cssVarBlock(e){const t={};for(const n in e)e[n]&&(t[this.cssVarBlockName(n)]=e[n]);return t}cssVarName(e){return"--".concat(this.namespace,"-").concat(e)}cssVarBlockName(e){return"--".concat(this.namespace,"-").concat(this.block,"-").concat(e)}}),e("HttpResponse",class{constructor(e,t,n){this.local=!0,this.ok=!1,this.headers={},this.config={headers:new g.AxiosHeaders},this.data=e,this.status=t||200,this.statusText=n||"",this.status>=200&&this.status<300&&(this.ok=!0)}});var de=e("Net",class{constructor(e){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.waitRequest=new Map,this.interceptors=new Map,this.instance=g.create(e),this.addInterceptor("Default",new J)}get baseUrl(){return this.instance.defaults.baseURL||"".concat(ibiz.env.baseUrl,"/").concat(ibiz.env.appId)}addInterceptor(e,t){t.use(this.instance),this.interceptors.set(e,t)}removeInterceptor(e){const t=this.interceptors.get(e);t&&(t.eject(this.instance),this.interceptors.delete(e))}get presetConfig(){return{baseURL:this.baseUrl,headers:{"Content-Type":"application/json;charset=UTF-8",Accept:"application/json"}}}mergeConfig(...e){const t=this.presetConfig;if(0===e.length)return t;const{url:n}=e[0];return n&&this.urlReg.test(n)&&delete t.baseURL,o(t,...e)}async post(e,t,n={},s={}){e=this.handleAppPresetParam(e,n,t);try{const n=await this.request(e,{method:"post",data:t,headers:s});return this.doResponseResult(n)}catch(e){throw H.getInstance(e)}}async get(e,t={},n={},s={}){e=this.attachUrlParam(e,t);try{const t=await this.request(e,o({method:"get",headers:n},s));return this.doResponseResult(t)}catch(e){throw H.getInstance(e)}}async delete(e,t={},n={}){e=this.handleAppPresetParam(e,t);try{const t=await this.request(e,{method:"delete",headers:n});return this.doResponseResult(t)}catch(e){throw H.getInstance(e)}}async put(e,t,n={},s={}){e=this.handleAppPresetParam(e,n);try{const n=await this.request(e,{method:"put",data:t,headers:s});return this.doResponseResult(n)}catch(e){throw H.getInstance(e)}}async getModel(e,t={}){try{const n=await this.instance.get(e,{headers:t});return this.doResponseResult(n)}catch(e){throw H.getInstance(e)}}async request(e,t={}){const n=this.mergeConfig({url:e},t),s=JSON.stringify(n);try{let e=null;this.waitRequest.has(s)?e=this.waitRequest.get(s):(e=this.instance.request(n),this.waitRequest.set(s,e));const t=await e;return this.waitRequest.has(s)&&this.waitRequest.delete(s),this.doResponseResult(t)}catch(e){throw this.waitRequest.has(s)&&this.waitRequest.delete(s),H.getInstance(e)}}axios(e){return g(e)}async sse(e,t,n={}){e=this.attachUrlParam(this.baseUrl+e,t),n.headers||(n.headers={});const s=n.headers;{s["".concat(ibiz.env.tokenHeader,"Authorization")]="".concat(ibiz.env.tokenPrefix,"Bearer ").concat(V());let e=ibiz.env.dcSystem;const{orgData:t}=ibiz;t&&(t.systemid&&(e=t.systemid),t.orgid&&(s.srforgid=t.orgid)),s.srfsystemid=e}const i=r({openWhenHidden:!0,method:"POST"},n);await R(e,i)}doResponseResult(e){const t=e;if(t.status>=200&&t.status<=299){t.ok=!0;const e=t.data;""!==e&&null!==e||(t.data=void 0)}return t}handleAppPresetParam(e,t,n={}){return n&&Object.prototype.hasOwnProperty.call(n,"srfversionid")&&(t.srfversionid=n.srfversionid),t&&Object.prototype.hasOwnProperty.call(t,"srfdefdata")&&delete t.srfdefdata,t?this.attachUrlParam(e,t):e}attachUrlParam(e,t){t&&Object.prototype.hasOwnProperty.call(t,"srfdefdata")&&delete t.srfdefdata;{const t=e.split("?");t[0]=t[0].split("/").map((e=>encodeURIComponent(e))).join("/"),e=t.length>1?t.join("?"):t[0]}const n=b.stringify(t);return p(n)&&(e=e.endsWith("?")||-1!==e.indexOf("?")&&e.endsWith("&")?"".concat(e).concat(n):-1===e.indexOf("?")||e.endsWith("&")?"".concat(e,"?").concat(n):"".concat(e,"&").concat(n)),e}}),ue=e("StringUtil",class{static fill(e,t,n){if(p(e)){if(p(t)){const n=e.match(this.contextReg);null==n||n.forEach((n=>{const s=n.slice(10,n.length-1);e=e.replace("${context.".concat(s,"}"),t[s]||"")}))}if(p(n)){const t=e.match(this.dataReg);null==t||t.forEach((t=>{const s=t.slice(7,t.length-1);e=e.replace("${data.".concat(s,"}"),n[s]||"")}))}}return e}});ue.contextReg=/\$\{context.[a-zA-Z_$][a-zA-Z0-9_$]{1,}\}/g,ue.dataReg=/\$\{data.[a-zA-Z_$][a-zA-Z0-9_$]{1,}\}/g;e("UrlHelper",class{static get routeBase(){const e=window.location.href.lastIndexOf("#/");return window.location.href.slice(0,e+1)}static get appBase(){const{origin:e,pathname:t}=window.location;return"".concat(e).concat(t).replace(/\/$/,"")}static get routePath(){return window.location.hash.replace("#","")}static get fullPath(){return window.location.href}});function he(e){const t=e.composedPath&&e.composedPath()||e.path;if(null!=t)return t;return[e.target].concat(function e(t,n=[]){const s=t.parentNode;return s?e(s,n.concat([s])):n}(e.target))}function pe(e,t,n,s={}){e.addEventListener(t,n,s);let r=()=>{e.removeEventListener(t,n,s),r=S};return()=>{r()}}function me(e,t){return t&&(e.target===t||he(e).includes(t))}var fe=class e{constructor(t={}){this.data=t,this._prev=e.Undefined,this._next=e.Undefined}clone(){throw new q(ibiz.i18n.t("core.utils.unrealized"))}};fe.Undefined=new fe(void 0);var ge=e("HistoryItem",fe),be=(e("HistoryList",class e{get data(){return this._cur.data}constructor(e){this._cur=new ge(e)}assign(e){e&&(this.save(),Object.assign(this._cur.data,e))}save(){const e=this._cur,n=t(e.data),s=new ge(n);s._prev=e,e._next._prev=ge.Undefined,this._clear(e._next),e._next=s,this._cur=s}prev(){return!(!this._cur._prev||this._cur._prev===ge.Undefined)&&(this._cur=this._cur._prev,!0)}next(){return!(!this._cur._next||this._cur._next===ge.Undefined)&&(this._cur=this._cur._next,!0)}_clear(e){e._prev&&e._prev!==ge.Undefined&&(e._prev._next=ge.Undefined,this._clear(e._prev),e._prev=ge.Undefined),e._next&&e._next!==ge.Undefined&&(e._next._prev=ge.Undefined,this._clear(e._next),e._next=ge.Undefined),e.data={}}clone(){return new e({})._cur=t(this._cur),this}destroy(){this._clear(this._cur)}}),"undefined"!=typeof window?window:void 0);var we=Math.round;function ye(e){const t=e.length,n=[];if("rgb"===e.slice(0,3).toLowerCase()){const t=e.match(/([\d|.%]{1,3})/g);n[0]=parseInt(t[0],10),n[1]=parseInt(t[1],10),n[2]=parseInt(t[2],10),n[3]=t[3]?-1!==t[3].indexOf("%")?parseInt(t[3],10)/100:parseFloat(t[3]):1}else{let s;s=t<6?parseInt(String(e[1])+e[1]+e[2]+e[2]+e[3]+e[3]+(t>4?String(e[4])+e[4]:""),16):parseInt(e.slice(1),16),n[0]=s>>16&255,n[1]=s>>8&255,n[2]=255&s,n[3]=9===t||5===t?we((s>>24&255)/255*1e4)/1e4:1}return n}function ve(e){let t="";switch(e.includes(".")?e.split(".").pop():""){case"wps":t="application/kswps";break;case"doc":t="application/msword";break;case"docx":t="application/vnd.openxmlformats-officedocument.wordprocessingml.document";break;case"txt":t="text/plain";break;case"zip":t="application/zip";break;case"png":t="image/png";break;case"gif":t="image/gif";break;case"jpeg":case"jpg":t="image/jpeg";break;case"rtf":t="application/rtf";break;case"avi":t="video/x-msvideo";break;case"gz":t="application/x-gzip";break;case"tar":t="application/x-tar";break;case"xlsx":t="application/vnd.ms-excel";break;default:t=""}return t}function Ee(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n]);return t}function xe(e){const t=o({multiple:!0,accept:""},e),n=document.createElement("input");n.setAttribute("type","file"),n.setAttribute("multiple","".concat(t.multiple)),n.setAttribute("accept",t.accept);let s=!0;n.onchange=e=>{const n=e.target,r=n.files?Ee(n.files):[];0!==r.length&&(s=!1,t.onSelected(r),n.value="")},document.body.appendChild(n),n.click(),window.addEventListener("focus",(()=>{setTimeout((()=>{s&&t.onCancel&&t.onCancel()}),300)}),{once:!0}),document.body.removeChild(n)}e("CountLatch",class{constructor(){this.promise=null,this.resolve=null,this.count=0}startPromise(){this.promise=new Promise((e=>{this.resolve=e}))}endPromise(){this.resolve&&(this.resolve(),this.resolve=null,this.promise=null)}lock(){this.count+=1,this.promise||this.startPromise()}unlock(){if(this.count<1)throw new q(ibiz.i18n.t("core.utils.notMatchLockUnlock"));this.count-=1,0===this.count&&this.endPromise()}async await(){this.promise&&await this.promise}});var _e={childrenFields:["children"]},Oe=new Error("中断操作");function Re(e,t,n){try{!function(e,t,n){const{childrenFields:s}=r(_e,n||{}),i=function(e,t){var n;for(const s of t)if(null==(n=e[s])?void 0:n.length)return e[s]}(e,s);if(null==i?void 0:i.length)for(const s of i){if(t(s,e))throw Oe;Re(s,t,n)}}(e,t,n)}catch(e){if(e!==Oe)throw e}}var Te={..._e,compareField:"name"};function Ce(e){if(l(e)&&d(e.clone))return e.clone()}e("DataTypes",class{static isNumber(e){return["BIGINT","BINARY","DECIMAL","FLOAT","INT","MONEY","NUMERIC","REAL","SMALLINT","SMALLMONEY","TINYINT","VARBINARY"].includes(this.toString(e))}static isDate(e){return["DATETIME","SMALLDATETIME","DATE","TIME"].includes(this.toString(e))}static toString(e){return this.typeMap[e]}}).typeMap={0:"UNKNOWN",1:"BIGINT",2:"BINARY",3:"BIT",4:"CHAR",5:"DATETIME",6:"DECIMAL",7:"FLOAT",8:"IMAGE",9:"INT",10:"MONEY",11:"NCHAR",12:"NTEXT",13:"NVARCHAR",14:"NUMERIC",15:"REAL",16:"SMALLDATETIME",17:"SMALLINT",18:"SMALLMONEY",19:"SQL_VARIANT",20:"SYSNAME",21:"TEXT",22:"TIMESTAMP",23:"TINYINT",24:"VARBINARY",25:"VARCHAR",26:"UNIQUEIDENTIFIER",27:"DATE",28:"TIME",29:"BIGDECIMAL"};var Ae={deep:!0};function Ie(e){return!(!e||e&e-1)}function Me(e){if(!Ie(e))throw new q(ibiz.i18n.t("core.utils.powerOfTwo",{permission:e}))}e("BitMask",{validate:Ie,setPermission:function(e=0,t){return Me(t),e|t},removePermission:function(e=0,t){return Me(t),e&~t},checkPermission:function(e=0,t){return Me(t),!!(e&t)}}),e("en",{core:{command:{unregisteredCommand:"Unregistered command: {id}, please register the command first"},error:{networkAbnormality:"Network abnormality, please try again later",modelMsg:"「{id}」 model {msg}",unsupportedModels:"Unsupported models",modelConfigurationMissing:"Model Configuration Missing"},utils:{powerOfTwo:"{permission} is not a power of two.",targetElement:"The target element does not exist",cannotFindWindow:"Cannot find window",unrealized:"unrealized",remoteStylesheet:"Failed to load remote stylesheet",notMatchLockUnlock:"The lock and unlock counts do not match!",multiApplicationMode:"Multi-application mode waiting for reimplementation requests",uploadFailed:"{file}Upload failed",invalidInputValue:"Invalid input value, must be >= 0"},noReInstall:"ibiz already exists, no need to re-install it"}}),e("zhCn",{core:{command:{unregisteredCommand:"未注册指令: {id},请先注册指令"},error:{networkAbnormality:"网络异常,请稍后重试",modelMsg:"「{id}」模型 {msg}",unsupportedModels:"未支持的模型",modelConfigurationMissing:"模型配置缺失"},utils:{powerOfTwo:"{permission}不是2的幂",targetElement:"target元素不存在",cannotFindWindow:"找不到window",unrealized:"未实现",remoteStylesheet:"未实现加载远程样式表失败",notMatchLockUnlock:"lock和unlock次数不匹配!",multiApplicationMode:"多应用模式等待重新实现请求",uploadFailed:"{file}Upload failed",invalidInputValue:"无效输入值,必须>=0"},noReInstall:"ibiz 已经存在, 无需重复安装"}});var Ue=w.noConflict();y.reg(Ue),y.apply(Ue);var ke=e("IBizSys",class{constructor(){this.env=D,this.log=Ue,this.net=new de,this.commands=new N,this.mc=new ce}})}}}));
1
+ System.register(["ramda","lodash-es","qx-util","axios","qs","loglevel","loglevel-plugin-prefix"],(function(e){"use strict";var t,n,s,r,i,o,a,c,l,d,u,h,p,m,f,g,b,w,y;return{setters:[function(e){t=e.clone,n=e.isNotNil,s=e.isNil,r=e.mergeDeepRight},function(e){i=e.debounce,o=e.merge,a=e.cloneDeepWith,c=e.cloneWith,l=e.isObject,d=e.isFunction,u=e.uniqueId,e.round,e.cloneDeep},function(e){h=e.getCookie,p=e.notNilEmpty,m=e.createUUID,f=e.QXEvent},function(e){g=e.default},function(e){b=e.default},function(e){w=e.default},function(e){y=e.default}],execute:function(){function v(e){let t,n,s,r=!1;return function(i){void 0===t?(t=i,n=0,s=-1):t=function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(t,i);const o=t.length;let a=0;for(;n<o;){r&&(10===t[n]&&(a=++n),r=!1);let i=-1;for(;n<o&&-1===i;++n)switch(t[n]){case 58:-1===s&&(s=n-a);break;case 13:r=!0;case 10:i=n}if(-1===i)break;e(t.subarray(a,i),s),a=n,s=-1}a===o?t=void 0:0!==a&&(t=t.subarray(a),n-=a)}}e({awaitTimeout:async function(e,t,n){if(await new Promise((t=>{setTimeout((()=>{t(!0)}),e)})),t)return t(...n||[])},base64ToBlob:function(e){const t=atob(e.split(",")[1]),n=t.length,s=new Uint8Array(n);for(let e=0;e<n;e++)s[e]=t.charCodeAt(e);return new Blob([s])},base64ToStr:function(e){return decodeURIComponent(atob(e))},calcMimeByFileName:ve,calcOpenModeStyle:function(e,t){if(e>=0&&e<=100)return"".concat(e,"%");if(e>100)return"drawer"===t?e:"".concat(e,"px");return ibiz.log.error(ibiz.i18n.t("core.utils.invalidInputValue")),""},clone:function(e,t){if(r(Ce,t||{}).deep)return a(e,Re);return c(e,Re)},colorBlend:function(e,t,n=.5,s="hex"){e=e.trim(),t=t.trim();const r=ye(e),i=ye(t),o=[we((1-n)*r[0]+n*i[0]),we((1-n)*r[1]+n*i[1]),we((1-n)*r[2]+n*i[2]),(1-n)*r[3]+n*i[3]];if("hex"===s){const e=[o[0].toString(16).padStart(2,"0"),o[1].toString(16).padStart(2,"0"),o[2].toString(16).padStart(2,"0"),0===o[3]?"00":we(255*o[3]).toString(16).padStart(2,"0")];return"#".concat(e[0]).concat(e[1]).concat(e[2]).concat(e[3])}return"rgb(".concat(o[0]," ").concat(o[1]," ").concat(o[2]," / ").concat(o[3],")")},compareArr:function(e,t,n){const s=new Set([...e,...t]),r=[],i=[],o=[];if(n){const a=e.map((e=>e[n])),c=t.map((e=>e[n]));s.forEach((e=>{a.includes(e[n])?c.includes(e[n])?o.push(e):r.push(e):i.push(e)}))}else s.forEach((n=>{e.includes(n)?t.includes(n)?o.push(n):r.push(n):i.push(n)}));return{more:r,less:i,same:o}},debounce:function(e,t,n){let s;return function(...r){if(s&&clearTimeout(s),n){const n=!s;s=setTimeout((()=>{s=null}),t),n&&e.apply(this,r)}else s=setTimeout((()=>{e.apply(this,r)}),t)}},debounceAndAsyncMerge:function(e,t,n){let s,r=[];const o=i((async(...t)=>{s=void 0;try{const n=await e(...t);return r.forEach((e=>{e.resolve(n)})),r=[],n}catch(e){r.forEach((t=>{t.reject(e)})),r=[]}}),n);return async(...e)=>{let n=e;return s&&(n=t(s,n)),s=n,o(...n),new Promise(((e,t)=>{r.push({resolve:e,reject:t})}))}},debounceAndMerge:function(e,t,n){let s;const r=i(((...t)=>(s=void 0,e(...t))),n);return(...e)=>{let n=e;return s&&(n=t(s,n)),s=n,r(...n)}},downloadFileFromBlob:function(e,t){const n=ve(t),s=new Blob([e],{type:n}),r=URL.createObjectURL(s),i=document.createElement("a");i.href=r,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)},eventPath:he,fetchEventSource:T,fileListToArr:Ee,findRecursiveChild:function(e,t,n){const{compareField:s,compareCallback:i}=r(Ae,n||{}),o=i||(e=>e[s]===t);let a;return Te(e,(e=>{if(o(e,t,s))return a=e,!0}),n),a},fixJsonString:function(e){let t=e.replace(/'/g,'"');t=t.replace(/([{,])\s*([a-zA-Z0-9_]+)\s*:/g,'$1"$2":'),t=t.replace(/,(\s*[\}\]])/g,"$1"),t=t.trim();try{return JSON.parse(t)}catch(t){return ibiz.log.error(e),null}},getRandomInt:function(e=0,t=1e3){return Math.floor(Math.random()*(t-e+1))+e},getToken:V,install:function(){if(window.ibiz)throw new Error(ibiz.i18n.t("core.noReInstall"));window.ibiz=new ke},isBase64:function(e){return/^[A-Za-z0-9+/=]+$/.test(e)&&e.length%4==0},isBase64Image:function(e){return/^data:image\/[a-zA-Z+]+;base64,([/+=\w\s]+|[^,]+)$/.test(e)},isElementSame:function(e,t,n){if(e.length!==t.length)return!1;const s=n?[...e.map((e=>e[n])),...t.map((e=>e[n]))]:[...e,...t];return Array.from(new Set(s)).length===e.length},isEmoji:function(e){return-1!==z.findIndex((t=>K(t)===e))},isEventInside:me,isImage:function(e){const t=e.includes(".")?e.split(".").pop():"";if(!t)return!1;return["jpeg","jpg","gif","png","bmp","svg"].includes(t)},isOverlap:function(e,t){return Array.from(new Set([...e,...t])).length!==e.length+t.length},isSvg:function(e){return W.test(e)},listenJSEvent:pe,mergeDefaultInLeft:function(e,t){Object.keys(t).forEach((r=>{n(t[r])&&s(e[r])&&(e[r]=t[r])}))},mergeInLeft:function(e,t){Object.keys(t).forEach((s=>{n(t[s])&&(e[s]=t[s])}))},onClickOutside:function(e,t,n={}){const{window:s=be,ignore:r=[],capture:i=!0}=n;if(!e)throw new q(ibiz.i18n.t("core.utils.targetElement"));if(!s)throw new q(ibiz.i18n.t("core.utils.cannotFindWindow"));let o=!0;const a=t=>![e,...r].some((e=>me(t,e)));let c=!1;let l;const d=e=>{c||(s.clearTimeout(l),o&&a(e)&&t(e))},u=[pe(s,"click",d,{passive:!0,capture:i}),pe(s,"pointerdown",(e=>{c||(o=a(e))}),{passive:!0}),pe(s,"pointerup",(e=>{if(!c&&0===e.button){const t=he(e);e.composedPath=()=>t,l=s.setTimeout((()=>d(e)),50)}}),{passive:!0})].filter(Boolean);return{stop:()=>u.forEach((e=>e())),pause:()=>{c=!0},proceed:()=>{c=!1}}},plus:function(e,t){let n,s;try{n=e.toString().split(".")[1].length}catch(e){n=0}try{s=t.toString().split(".")[1].length}catch(e){s=0}const r=10**Math.max(n,s);return(e*r+t*r)/r},recursiveIterate:Te,selectFile:xe,setRemoteStyle:async function(e){try{const t=await ibiz.net.get(e),n=document.createElement("style");n.setAttribute("title","app-style-css"),n.innerText=t.data,document.head.appendChild(n)}catch(t){ibiz.log.debug(ibiz.i18n.t("core.utils.remoteStylesheet"),e)}},showTitle:function(e){return ibiz.env.enableTitle?e:void 0},strToBase64:K,throttle:function(e,t){let n=null;return function(...s){n||(n=setTimeout((()=>{e.apply(this,s),n=null}),t))}},toDisposable:U,toNumberOrNil:function(e){if(s(e))return;const t=Number(e);if(Number.isNaN(t))return;return t},updateKeyDefine:function(e,t){t.forEach((t=>{Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,writable:!0,value:void 0})}))},uploadFile:function(e){const t=o({multiple:!0,accept:"",separate:!0,beforeUpload:(e,t)=>!0,finish:e=>{},success:(e,t)=>{},error:(e,t)=>{},progress:e=>{}},e),n=async e=>{const n=e.map((e=>({status:"uploading",name:e.name,uid:u(),percentage:0})));if(!t.beforeUpload(e,n))return n.forEach((e=>{e.status="cancel"})),ibiz.log.debug("取消上传",n),n;try{const s=await(async e=>{if(t.request&&d(t.request))return t.request(e);const n=new FormData;throw e.forEach((e=>{n.append("file",e)})),new q(ibiz.i18n.t("core.utils.multiApplicationMode"))})(e);n.forEach((e=>{e.status="finished"})),t.success(n,s),n.forEach((e=>{e.response=s}))}catch(s){n.forEach((e=>{e.status="fail"})),t.error(n,s),n.forEach((e=>{e.error=s})),ibiz.log.error(s),ibiz.log.error(ibiz.i18n.t("core.utils.uploadFailed",{file:e.map((e=>e.name)).join(",")}))}return n};xe({accept:t.accept,multiple:t.multiple,onSelected:e=>{(async e=>{const s=t.separate?e.map((e=>[e])):[e],r=await Promise.allSettled(s.map((async e=>n(e)))),i=[];r.forEach((e=>{"fulfilled"===e.status&&i.push(...e.value)})),t.finish(i)})(e)}})}});var E=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n},x=e("EventStreamContentType","text/event-stream"),_=1e3,O="last-event-id";function T(e,t){var{signal:n,headers:s,onopen:r,onmessage:i,onclose:o,onerror:a,openWhenHidden:c,fetch:l}=t,d=E(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((t,u)=>{const h=Object.assign({},s);let p;function m(){p.abort(),document.hidden||E()}h.accept||(h.accept=x),c||document.addEventListener("visibilitychange",m);let f=_,g=0;function b(){document.removeEventListener("visibilitychange",m),window.clearTimeout(g),p.abort()}null==n||n.addEventListener("abort",(()=>{b(),t()}));const w=null!=l?l:window.fetch,y=null!=r?r:A;async function E(){var n;p=new AbortController;try{const n=await w(e,Object.assign(Object.assign({},d),{headers:h,signal:p.signal}));await y(n),await async function(e,t){const n=e.getReader();let s;for(;!(s=await n.read()).done;)t(s.value)}(n.body,v(function(e,t,n){let s={data:"",event:"",id:"",retry:void 0};const r=new TextDecoder;return function(i,o){if(0===i.length)null==n||n(s),s={data:"",event:"",id:"",retry:void 0};else if(o>0){const n=r.decode(i.subarray(0,o)),a=o+(32===i[o+1]?2:1),c=r.decode(i.subarray(a));switch(n){case"data":s.data=s.data?s.data+"\n"+c:c;break;case"event":s.event=c;break;case"id":e(s.id=c);break;case"retry":const n=parseInt(c,10);isNaN(n)||t(s.retry=n)}}}}((e=>{e?h[O]=e:delete h[O]}),(e=>{f=e}),i))),null==o||o(),b(),t()}catch(e){if(!p.signal.aborted)try{const t=null!==(n=null==a?void 0:a(e))&&void 0!==n?n:f;window.clearTimeout(g),g=window.setTimeout(E,t)}catch(e){b(),u(e)}}}E()}))}function A(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(x)))throw new Error("Expected content-type to be ".concat(x,", Actual: ").concat(t))}var R=class e{constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}};R.Undefined=new R(void 0);var C=R,I=e("LinkedList",class{constructor(){this._first=C.Undefined,this._last=C.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===C.Undefined}clear(){let e=this._first;for(;e!==C.Undefined;){const{next:t}=e;e.prev=C.Undefined,e.next=C.Undefined,e=t}this._first=C.Undefined,this._last=C.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new C(e);if(this._first===C.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(n))}}shift(){if(this._first===C.Undefined)return;const e=this._first.element;return this._remove(this._first),e}pop(){if(this._last===C.Undefined)return;const e=this._last.element;return this._remove(this._last),e}_remove(e){if(e.prev!==C.Undefined&&e.next!==C.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===C.Undefined&&e.next===C.Undefined?(this._first=C.Undefined,this._last=C.Undefined):e.next===C.Undefined?(this._last=this._last.prev,this._last.next=C.Undefined):e.prev===C.Undefined&&(this._first=this._first.next,this._first.prev=C.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==C.Undefined;)yield e.element,e=e.next}});function M(e){const t=this;let n,s=!1;return function(){return s||(s=!0,n=e.apply(t,arguments)),n}}function U(e){return{dispose:M((()=>{e()}))}}var k=e("CommandsRegistry",class{constructor(){this.commands=new Map}registerCommand(e,t,n){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t,opts:n})}const{id:s}=e;let r=this.commands.get(s);r||(r=new I,this.commands.set(s,r));const i=r.unshift(e);return U((()=>{i();const e=this.commands.get(s);(null==e?void 0:e.isEmpty())&&this.commands.delete(s)}))}hasCommand(e){return this.commands.has(e)}getCommand(e){const t=this.commands.get(e);if(t&&!t.isEmpty())return t[Symbol.iterator]().next().value}getCommands(){const e=new Map,t=this.commands.keys();for(const n of t){const t=this.getCommand(n);t&&e.set(n,t)}return e}getCommandOpt(e){const t=this.getCommand(e);return null==t?void 0:t.opts}}),S=e("CommandController",class{constructor(){this.commandRegister=new k}register(e,t,n){return this.commandRegister.registerCommand(e,t,n)}async execute(e,...t){const n=this.commandRegister.getCommand(e);if(n)return n.handler(...t);throw new Error(ibiz.i18n.t("core.command.unregisteredCommand",{id:e}))}hasCommand(e,t){const n=!!this.commandRegister.hasCommand(e);if(!0===t&&!0===n)throw new Error("未注册指令: ".concat(e,",请先注册指令"));return n}getCommandOpts(e){return this.commandRegister.getCommandOpt(e)}}),N=(e("commands",new S),e("CoreConst",class{}));N.DEFAULT_MODEL_SERVICE_TAG="default",N.TOKEN="ibzuaa-token",N.REFRESH_TOKEN="ibzuaa-refresh-token",N.TOKEN_EXPIRES="ibzuaa-token-expires",N.TOKEN_REMEMBER="ibizuaa-token-remember",N.IS_ANONYMOUS="ibizuaa-is-anonymous";var P=e("NOOP",(()=>{})),z=e("EMOJILIST",["😀","😃","😄","😁","😆","😅","😂","🤣","😌","😊","😇","🙂","🙃","😉","😌","😍","😘","😗","😙","😚","😋","😜","😝","😛","🤑","🤗","🤓","😎","🤡","🤠","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","😤","😠","😡","😶","😐","😑","😯","😦","😧","😮","😲","😵","😳","😱","😨","😰","😢","😥","🤤","😭","😓","😪","😴","🙄","🤔","🤥","😬","🤐","🤢","🤧","😷","🤒","🤕","😈","👿","👹","👺","💩","👻","💀","☠️","👽","👾","🤖","🎃","😺","😸","😹","😻","😼","😽","🙀","😿","😾","👐","🙌","👏","🙏","🤝","👍","👎","👊","✊","🤛","🤜","🤞","✌️","🤘","👌","👈","👉","👆","👇","☝️","✋","🤚","🖐","🖖","👋","🤙","💪","🖕","✍️","🤳","💅","💍","💄","💋","👄","👅","👂","👃","👣","👁","👀","🗣","👤","👥","👶","👦","👧","👨","👩","👱‍♀","👱","👴","👵","👲","👳‍♀","👳","👮‍♀","👮","👷‍♀","👷","💂‍♀","💂","👩‍⚕","👨‍⚕","👩‍🌾","👨‍🌾","👩‍🍳","👨‍🍳","👩‍🎓","👨‍🎓","👩‍🎤","👨‍🎤","👩‍🏫","👨‍🏫","👩‍🏭","👨‍🏭","👩‍💻","👨‍💻","👩‍💼","👨‍💼","👩‍🔧","👨‍🔧","👩‍🔬","👨‍🔬","👩‍🎨","👨‍🎨","👩‍🚒","👨‍🚒","👩‍🚀","👨‍🚀","🤶","🎅","👸","🤴","👰","🤵","👼","🤰","🙇‍♀","🙇","💁","💁‍♂","🙅","🙅‍♂","🙆","🙆‍♂","🙋","🙋‍♂","🤦‍♀","🤦‍♂","🤷‍♀","🤷‍♂","🙎","🙎‍♂","🙍","🙍‍♂","💇","💇‍♂","💆","💆‍♂","🕴","💃","🕺","👯","👯‍♂","🚶‍♀","🚶","🏃‍♀","🏃","👫","👭","👬","💑","👩‍❤️‍👩","👨‍❤️‍👨","💏","👩‍❤️‍💋‍👩","👨‍❤️‍💋‍👨","👪","👨‍👩‍👧","👨‍👩‍👧‍👦","👨‍👩‍👦‍👦","👨‍👩‍👧‍👧","👩‍👩‍👦","👩‍👩‍👧","👩‍👩‍👧‍👦","👩‍👩‍👦‍👦","👩‍👩‍👧‍👧","👨‍👨‍👦","👨‍👨‍👧","👨‍👨‍👧‍👦","👨‍👨‍👦‍👦","👨‍👨‍👧‍👧","👩‍👦","👩‍👧","👩‍👧‍👦","👩‍👦‍👦","👩‍👧‍👧","👨‍👦","👨‍👧","👨‍👧‍👦","👨‍👦‍👦","👨‍👧‍👧","👚","👕","👖","👔","👗","👙","👘","👠","👡","👢","👞","👟","👒","🎩","🎓","👑","⛑","🎒","👝","👛","👜","💼","👓","🕶","🌂","☂️","🐶","🐱","🐭","🐹","🐰","🦊","🐻","🐼","🐨","🐯","🦁","🐮","🐷","🐽","🐸","🐵","🙈","🙉","🙊","🐒","🐔","🐧","🐦","🐤","🐣","🐥","🦆","🦅","🦉","🦇","🐺","🐗","🐴","🦄","🐝","🐛","🦋","🐌","🐚","🐞","🐜","🕷","🕸","🐢","🐍","🦎","🦂","🦀","🦑","🐙","🦐","🐠","🐟","🐡","🐬","🦈","🐳","🐋","🐊","🐆","🐅","🐃","🐂","🐄","🦌","🐪","🐫","🐘","🦏","🦍","🐎","🐖","🐐","🐏","🐑","🐕","🐩","🐈","🐓","🦃","🕊","🐇","🐁","🐀","🐿","🐾","🐉","🐲","🌵","🎄","🌲","🌳","🌴","🌱","🌿","☘️","🍀","🎍","🎋","🍃","🍂","🍁","🍄","🌾","💐","🌷","🌹","🥀","🌻","🌼","🌸","🌺","🌎","🌍","🌏","🌕","🌖","🌗","🌘","🌑","🌒","🌓","🌔","🌚","🌝","🌞","🌛","🌜","🌙","💫","⭐️","🌟","✨","⚡️","🔥","💥","☄","☀️","🌤","⛅️","🌥","🌦","🌈","☁️","🌧","⛈","🌩","🌨","☃️","⛄️","❄️","🌬","💨","🌪","🌫","🌊","💧","💦","☔️","🍏","🍎","🍐","🍊","🍋","🍌","🍉","🍇","🍓","🍈","🍒","🍑","🍍","🥝","🥑","🍅","🍆","🥒","🥕","🌽","🌶","🥔","🍠","🌰","🥜","🍯","🥐","🍞","🥖","🧀","🥚","🍳","🥓","🥞","🍤","🍗","🍖","🍕","🌭","🍔","🍟","🥙","🌮","🌯","🥗","🥘","🍝","🍜","🍲","🍥","🍣","🍱","🍛","🍚","🍙","🍘","🍢","🍡","🍧","🍨","🍦","🍰","🎂","🍮","🍭","🍬","🍫","🍿","🍩","🍪","🥛","🍼","☕️","🍵","🍶","🍺","🍻","🥂","🍷","🥃","🍸","🍹","🍾","🥄","🍴","🍽","⚽️","🏀","🏈","⚾️","🎾","🏐","🏉","🎱","🏓","🏸","🥅","🏒","🏑","🏏","⛳️","🏹","🎣","🥊","🥋","⛸","🎿","⛷","🏂","🏋️‍♀️","🏋","🤺","🤼‍♀","🤼‍♂","🤸‍♀","🤸‍♂","⛹️‍♀️","⛹","🤾‍♀","🤾‍♂","🏌️‍♀️","🏌","🏄‍♀","🏄","🏊‍♀","🏊","🤽‍♀","🤽‍♂","🚣‍♀","🚣","🏇","🚴‍♀","🚴","🚵‍♀","🚵","🎽","🏅","🎖","🥇","🥈","🥉","🏆","🏵","🎗","🎫","🎟","🎪","🤹‍♀","🤹‍♂","🎭","🎨","🎬","🎤","🎧","🎼","🎹","🥁","🎷","🎺","🎸","🎻","🎲","🎯","🎳","🎮","🎰","🚗","🚕","🚙","🚌","🚎","🏎","🚓","🚑","🚒","🚐","🚚","🚛","🚜","🛴","🚲","🛵","🏍","🚨","🚔","🚍","🚘","🚖","🚡","🚠","🚟","🚃","🚋","🚞","🚝","🚄","🚅","🚈","🚂","🚆","🚇","🚊","🚉","🚁","🛩","✈️","🛫","🛬","🚀","🛰","💺","🛶","⛵️","🛥","🚤","🛳","⛴","🚢","⚓️","🚧","⛽️","🚏","🚦","🚥","🗺","🗿","🗽","⛲️","🗼","🏰","🏯","🏟","🎡","🎢","🎠","⛱","🏖","🏝","⛰","🏔","🗻","🌋","🏜","🏕","⛺️","🛤","🛣","🏗","🏭","🏠","🏡","🏘","🏚","🏢","🏬","🏣","🏤","🏥","🏦","🏨","🏪","🏫","🏩","💒","🏛","⛪️","🕌","🕍","🕋","⛩","🗾","🎑","🏞","🌅","🌄","🌠","🎇","🎆","🌇","🌆","🏙","🌃","🌌","🌉","🌁","⌚️","📱","📲","💻","⌨️","🖥","🖨","🖱","🖲","🕹","🗜","💽","💾","💿","📀","📼","📷","📸","📹","🎥","📽","🎞","📞","☎️","📟","📠","📺","📻","🎙","🎚","🎛","⏱","⏲","⏰","🕰","⌛️","⏳","📡","🔋","🔌","💡","🔦","🕯","🗑","🛢","💸","💵","💴","💶","💷","💰","💳","💎","⚖️","🔧","🔨","⚒","🛠","⛏","🔩","⚙️","⛓","🔫","💣","🔪","🗡","⚔️","🛡","🚬","⚰️","⚱️","🏺","🔮","📿","💈","⚗️","🔭","🔬","🕳","💊","💉","🌡","🚽","🚰","🚿","🛁","🛀","🛎","🔑","🗝","🚪","🛋","🛏","🛌","🖼","🛍","🛒","🎁","🎈","🎏","🎀","🎊","🎉","🎎","🏮","🎐","✉️","📩","📨","📧","💌","📥","📤","📦","🏷","📪","📫","📬","📭","📮","📯","📜","📃","📄","📑","📊","📈","📉","🗒","🗓","📆","📅","📇","🗃","🗳","🗄","📋","📁","📂","🗂","🗞","📰","📓","📔","📒","📕","📗","📘","📙","📚","📖","🔖","🔗","📎","🖇","📐","📏","📌","📍","✂️","🖊","🖋","✒️","🖌","🖍","📝","✏️","🔍","🔎","🔏","🔐","🔒","🔓","❤️","💛","💚","💙","💜","🖤","💔","❣️","💕","💞","💓","💗","💖","💘","💝","💟","☮️","✝️","☪️","🕉","☸️","✡️","🔯","🕎","☯️","☦️","🛐","⛎","♈️","♉️","♊️","♋️","♌️","♍️","♎️","♏️","♐️","♑️","♒️","♓️","🆔","⚛️","🉑","☢️","☣️","📴","📳","🈶","🈚️","🈸","🈺","🈷️","✴️","🆚","💮","🉐","㊙️","㊗️","🈴","🈵","🈹","🈲","🅰️","🅱️","🆎","🆑","🅾️","🆘","❌","⭕️","🛑","⛔️","📛","🚫","💯","💢","♨️","🚷","🚯","🚳","🚱","🔞","📵","🚭","❗️","❕","❓","❔","‼️","⁉️","🔅","🔆","〽️","⚠️","🚸","🔱","⚜️","🔰","♻️","✅","🈯️","💹","❇️","✳️","❎","🌐","💠","Ⓜ️","🌀","💤","🏧","🚾","♿️","🅿️","🈳","🈂️","🛂","🛃","🛄","🛅","🚹","🚺","🚼","🚻","🚮","🎦","📶","🈁","🔣","ℹ️","🔤","🔡","🔠","🆖","🆗","🆙","🆒","🆕","🆓","0️⃣","1️⃣","2️⃣","3️⃣","4️⃣","5️⃣","6️⃣","7️⃣","8️⃣","9️⃣","🔟","🔢","#️⃣","*️⃣","▶️","⏸","⏯","⏹","⏺","⏭","⏮","⏩","⏪","⏫","⏬","◀️","🔼","🔽","➡️","⬅️","⬆️","⬇️","↗️","↘️","↙️","↖️","↕️","↔️","↪️","↩️","⤴️","⤵️","🔀","🔁","🔂","🔄","🔃","🎵","🎶","➕","➖","➗","✖️","💲","💱","™️","©️","®️","〰️","➰","➿","🔚","🔙","🔛","🔝","🔜","✔️","☑️","🔘","⚪️","⚫️","🔴","🔵","🔺","🔻","🔸","🔹","🔶","🔷","🔳","🔲","▪️","▫️","◾️","◽️","◼️","◻️","⬛️","⬜️","🔈","🔇","🔉","🔊","🔔","🔕","📣","📢","👁‍🗨","💬","💭","🗯","♠️","♣️","♥️","♦️","🃏","🎴","🀄️","🕐","🕑","🕒","🕓","🕔","🕕","🕖","🕗","🕘","🕙","🕚","🕛","🕜","🕝","🕞","🕟","🕠","🕡","🕢","🕣","🕤","🕥","🕦","🕧","🏳️","🏴","🏁","🚩","🏳️‍🌈","🇦🇫","🇦🇽","🇦🇱","🇩🇿","🇦🇸","🇦🇩","🇦🇴","🇦🇮","🇦🇶","🇦🇬","🇦🇷","🇦🇲","🇦🇼","🇦🇺","🇦🇹","🇦🇿","🇧🇸","🇧🇭","🇧🇩","🇧🇧","🇧🇾","🇧🇪","🇧🇿","🇧🇯","🇧🇲","🇧🇹","🇧🇴","🇧🇶","🇧🇦","🇧🇼","🇧🇷","🇮🇴","🇻🇬","🇧🇳","🇧🇬","🇧🇫","🇧🇮","🇨🇻","🇰🇭","🇨🇲","🇨🇦","🇮🇨","🇰🇾","🇨🇫","🇹🇩","🇨🇱","🇨🇳","🇨🇽","🇨🇨","🇨🇴","🇰🇲","🇨🇬","🇨🇩","🇨🇰","🇨🇷","🇨🇮","🇭🇷","🇨🇺","🇨🇼","🇨🇾","🇨🇿","🇩🇰","🇩🇯","🇩🇲","🇩🇴","🇪🇨","🇪🇬","🇸🇻","🇬🇶","🇪🇷","🇪🇪","🇪🇹","🇪🇺","🇫🇰","🇫🇴","🇫🇯","🇫🇮","🇫🇷","🇬🇫","🇵🇫","🇹🇫","🇬🇦","🇬🇲","🇬🇪","🇩🇪","🇬🇭","🇬🇮","🇬🇷","🇬🇱","🇬🇩","🇬🇵","🇬🇺","🇬🇹","🇬🇬","🇬🇳","🇬🇼","🇬🇾","🇭🇹","🇭🇳","🇭🇰","🇭🇺","🇮🇸","🇮🇳","🇮🇩","🇮🇷","🇮🇶","🇮🇪","🇮🇲","🇮🇱","🇮🇹","🇯🇲","🇯🇵","🎌","🇯🇪","🇯🇴","🇰🇿","🇰🇪","🇰🇮","🇽🇰","🇰🇼","🇰🇬","🇱🇦","🇱🇻","🇱🇧","🇱🇸","🇱🇷","🇱🇾","🇱🇮","🇱🇹","🇱🇺","🇲🇴","🇲🇰","🇲🇬","🇲🇼","🇲🇾","🇲🇻","🇲🇱","🇲🇹","🇲🇭","🇲🇶","🇲🇷","🇲🇺","🇾🇹","🇲🇽","🇫🇲","🇲🇩","🇲🇨","🇲🇳","🇲🇪","🇲🇸","🇲🇦","🇲🇿","🇲🇲","🇳🇦","🇳🇷","🇳🇵","🇳🇱","🇳🇨","🇳🇿","🇳🇮","🇳🇪","🇳🇬","🇳🇺","🇳🇫","🇲🇵","🇰🇵","🇳🇴","🇴🇲","🇵🇰","🇵🇼","🇵🇸","🇵🇦","🇵🇬","🇵🇾","🇵🇪","🇵🇭","🇵🇳","🇵🇱","🇵🇹","🇵🇷","🇶🇦","🇷🇪","🇷🇴","🇷🇺","🇷🇼","🇧🇱","🇸🇭","🇰🇳","🇱🇨","🇵🇲","🇻🇨","🇼🇸","🇸🇲","🇸🇹","🇸🇦","🇸🇳","🇷🇸","🇸🇨","🇸🇱","🇸🇬","🇸🇽","🇸🇰","🇸🇮","🇸🇧","🇸🇴","🇿🇦","🇬🇸","🇰🇷","🇸🇸","🇪🇸","🇱🇰","🇸🇩","🇸🇷","🇸🇿","🇸🇪","🇨🇭","🇸🇾","🇹🇼","🇹🇯","🇹🇿","🇹🇭","🇹🇱","🇹🇬","🇹🇰","🇹🇴","🇹🇹","🇹🇳","🇹🇷","🇹🇲","🇹🇨","🇹🇻","🇺🇬","🇺🇦","🇦🇪","🇬🇧","🇺🇸","🇻🇮","🇺🇾","🇺🇿","🇻🇺","🇻🇦","🇻🇪","🇻🇳","🇼🇫","🇪🇭","🇾🇪","🇿🇲","🇿🇼"]),L=(e("HttpStatusMessageConst",{200:"服务器成功返回请求的数据。",201:"新建或修改数据成功。",202:"一个请求已经进入后台排队(异步任务)。",204:"删除数据成功。",400:"发出的请求有错误,服务器没有进行新建或修改数据的操作。",401:"用户没有权限(令牌、用户名、密码错误)。",403:"用户得到授权,但是访问是被禁止的。",404:"发出的请求针对的是不存在的记录,服务器没有进行操作。",406:"请求的格式不可得。",410:"请求的资源被永久删除,且不会再得到的。",422:"当创建一个对象时,发生一个验证错误。",500:"服务器发生错误,请检查服务器。",502:"网关错误。",503:"服务不可用,服务器暂时过载或维护。",504:"网关超时。"}),e("LoginMode",(e=>(e.DEFAULT="DEFAULT",e.CUSTOM="CUSTOM",e.CAS="CAS",e.OAUTH="OAUTH",e))(L||{}))),j=e("MenuPermissionMode",(e=>(e.MIXIN="MIXIN",e.RESOURCE="RESOURCE",e.RT="RT",e))(j||{})),D=(e("IBizContext",class e{constructor(e={},t){Object.defineProperty(this,"_associationContext",{enumerable:!1,configurable:!0,value:[]}),t&&this.initWithParent(t),Object.assign(this,e)}initWithParent(e){const t=this;Object.defineProperty(this,"_parent",{enumerable:!1,writable:!0,value:e}),Object.defineProperty(this,"_context",{enumerable:!1,writable:!0,value:{}});const n={};Object.keys(e).forEach((e=>{Object.prototype.hasOwnProperty.call(this,e)||(n[e]={enumerable:!0,configurable:!0,set(n){t._context[e]=null==n?null:n},get:()=>void 0!==t._context[e]?t._context[e]:t._parent?t._parent[e]:""})})),Object.defineProperties(this,n)}getOwnContext(){const e={};return Object.keys(this).forEach((t=>{this._parent&&Object.prototype.hasOwnProperty.call(this._parent,t)&&!Object.prototype.hasOwnProperty.call(this._context,t)||(e[t]=this[t])})),e}destroy(){this._parent=void 0,this._context={},this._associationContext.forEach((e=>{e.destroy()}))}clone(){const n=new e(t(this.getOwnContext()),this._parent);return this._associationContext.push(n),n}deepClone(){const e={};return Object.keys(this).forEach((t=>{e[t]=this[t]})),e}reset(e={},t){this._associationContext.forEach((e=>{e.destroy()})),this._parent&&(this._parent={},this._context={}),Object.keys(this).forEach((e=>{try{delete this[e]}catch(e){}})),t&&this.initWithParent(t),Object.assign(this,e)}static create(t,n){return new e(t,n)}}),e("IBizParams",class{constructor(e,t){return Object.defineProperty(this,"_parent",{enumerable:!1,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_params",{enumerable:!1,configurable:!0,writable:!0,value:e||{}}),this.createProxy()}createProxy(){return new Proxy(this,{set:(e,t,n)=>(["_params","_parent"].includes(t)?e[t]=n:e._params[t]=n,!0),get:(e,t,n)=>void 0!==e[t]?e[t]:void 0!==e._params[t]?e._params[t]:e._parent&&void 0!==e._parent[t]?e._parent[t]:void 0,ownKeys(e){const t=[...new Set([...Object.keys(e._params),...Object.keys(e._parent||{})])];return function(e,t){t.forEach((t=>{Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,writable:!0,value:void 0})}))}(e,t),t}})}reset(e,t){this._params=e||{},this._parent=t}destroy(){this._params={},this._parent=void 0}}),e("Environment",{dev:!1,hub:!0,enableMqtt:!1,mqttUrl:"/portal/mqtt/mqtt",isEnableMultiLan:!1,anonymousUser:"",anonymousPwd:"",enableAnonymous:!1,logLevel:"ERROR",baseUrl:"/api",appId:"",pluginBaseUrl:"http://172.16.240.221",isLocalModel:!1,remoteModelUrl:"/remotemodel",assetsUrl:"./assets",dcSystem:"",downloadFileUrl:"/ibizutil/download/{cat}",uploadFileUrl:"/ibizutil/upload/{cat}",casLoginUrl:"",loginMode:"DEFAULT",menuPermissionMode:"MIXIN",enablePermission:!0,routePlaceholder:"-",enableWfAllHistory:!1,isMob:!1,isSaaSMode:!0,AppTitle:"",favicon:"./favicon.ico",enableTitle:!0,tokenHeader:"",tokenPrefix:"",customParams:{},oauthOpenAccessId:"",enableEncryption:!1})),B=e("HttpError",class extends Error{constructor(e){super("HttpError"),this.name="HttpError";const t=e.response;this.response=e.response,this.tag="",t?(t.data?this.message=t.data.message:this.message=t.statusText,this.message||(this.message=ibiz.i18n.t("core.error.networkAbnormality")),this.status=t.status):(this.message=e.message||"",this.status=500)}}),q=(e("ModelError",class extends Error{constructor(e,t){super(ibiz.i18n.t("core.error.modelMsg",{id:e.id,msg:t?": ".concat(t):""})),this.model=e,this.name=ibiz.i18n.t("core.error.unsupportedModels")}}),e("RuntimeError",class extends Error{constructor(e){super(e),this.message=e,this.name="Runtime Error"}})),F=(e("RuntimeModelError",class extends Error{constructor(e,t){super(ibiz.i18n.t("core.error.modelMsg",{id:e.id,msg:t?": ".concat(t):""})),this.model=e,this.name=ibiz.i18n.t("core.error.modelConfigurationMissing")}}),e("NoticeError",class extends Error{constructor(e,t){super(e),this.message=e,this.duration=t,this.name="notice Error"}}),e("EntityError",class extends B{constructor(e){if(super(e),this.name="EntityError",this.details=[],this.response){const{details:e=[]}=this.response.data;this.details=e.map((e=>({name:e.fieldname.toLowerCase(),logicName:e.fieldlogicname,errorType:e.fielderrortype,errorInfo:e.fielderrorinfo})))}}})),H=e("HttpErrorFactory",class{static getInstance(e){const{response:t}=e;if(!t||!t.data)return new B(e);const{type:n}=t.data;return"EntityException"===n?new F(e):new B(e)}});function V(){return h(N.TOKEN)}var W=/<svg\b[^>]*>[\s\S]*?<\/svg>/;function K(e){return btoa(encodeURIComponent(e))}var J=e("Interceptor",class{async onBeforeRequest(e){return e}onRequestError(e){return Promise.reject(e)}async onResponseSuccess(e){return e}onResponseError(e){return Promise.reject(e)}use(e){this.requestTag=e.interceptors.request.use(this.onBeforeRequest,this.onRequestError),this.responseTag=e.interceptors.response.use(this.onResponseSuccess,this.onResponseError)}eject(e){this.requestTag&&e.interceptors.request.eject(this.requestTag),this.responseTag&&e.interceptors.response.eject(this.responseTag)}}),Y=e("CoreInterceptor",class extends J{async onBeforeRequest(e){e=await super.onBeforeRequest(e);const{headers:t}=e;t.set("".concat(ibiz.env.tokenHeader,"Authorization"),"".concat(ibiz.env.tokenPrefix,"Bearer ").concat(V()));let n=ibiz.env.dcSystem;const{orgData:s}=ibiz;return s&&(s.systemid&&(n=s.systemid),s.orgid&&t.set("srforgid",s.orgid)),t.set("srfsystemid",n),e}}),$=class{constructor(e){this.parent=e,this.evt=new f(1e3)}next(e){this.evt.emit("all",e),this.parent&&this.nextParent(e)}nextParent(e){this.parent&&(this.parent.evt.emit("all",e),this.parent.nextParent(e))}on(e){this.evt.on("all",e)}off(e){this.evt.off("all",e)}},G=class extends ${},X=class extends ${sendCommand(e,t,n){const s={messageid:m(),messagename:"command",type:"COMMAND",subtype:t,triggerKey:n,data:e};this.next(s)}},Z=class extends X{send(e,t){this.sendCommand(e,"OBJECTCREATED",null==t?void 0:t.triggerKey)}},Q=class extends X{send(e,t){this.sendCommand(e,"OBJECTUPDATED",null==t?void 0:t.triggerKey)}},ee=class extends X{send(e,t){this.sendCommand(e,"OBJECTREMOVED",null==t?void 0:t.triggerKey)}},te=class extends X{},ne=class extends X{send(e){this.sendCommand(e,"ASYNCACTION")}},se=class extends X{send(e){this.sendCommand(e,"INTERNALMESSAGE")}},re=class extends X{send(e){this.sendCommand(e,"MARKOPENDATA")}},ie=class extends ${constructor(){super(...arguments),this.change=new te,this.create=new Z(this),this.update=new Q(this),this.remove=new ee(this),this.asyncAction=new ne(this),this.internalMessage=new se(this),this.markOpenData=new re(this)}next(e){switch(e.subtype){case"OBJECTCREATED":this.create.next(e),this.change.next(e);break;case"OBJECTUPDATED":this.update.next(e),this.change.next(e);break;case"OBJECTREMOVED":this.remove.next(e),this.change.next(e);break;case"ASYNCACTION":this.asyncAction.next(e);break;case"INTERNALMESSAGE":this.internalMessage.next(e);break;case"MARKOPENDATA":this.markOpenData.next(e);break;default:super.next(e)}}nextParent(e){switch(e.subtype){case"OBJECTCREATED":case"OBJECTUPDATED":case"OBJECTREMOVED":this.change.next(e)}super.nextParent(e)}send(e,t,n){const s={messageid:m(),messagename:"command",type:"COMMAND",subtype:t,triggerKey:n,data:e};this.next(s)}},oe=class extends ${send(e){const t={messageid:m(),messagename:"console",type:"CONSOLE",data:e};this.next(t)}},ae=class extends ${send(e){const t={messageid:m(),messagename:"error",type:"ERROR",data:e};this.next(t)}},ce=e("MessageCenter",class{constructor(){this.all=new G,this.command=new ie(this.all),this.console=new oe(this.all),this.error=new ae(this.all)}next(e){"COMMAND"===e.type?this.command.next(e):"CONSOLE"===e.type?this.console.next(e):this.all.next(e)}on(e){this.all.on(e)}off(e){this.all.off(e)}});function le(e,t,n,s,r){let i="".concat(e,"-").concat(t);return n&&(i+="-".concat(n)),s&&(i+="__".concat(s)),r&&(i+="--".concat(r)),i}e("Namespace",class{constructor(e,t){this.block=e,this.namespace=t||"ibiz"}b(e=""){return le(this.namespace,this.block,e,"","")}e(e){return e?le(this.namespace,this.block,"",e,""):""}m(e){return e?le(this.namespace,this.block,"","",e):""}be(e,t){return e&&t?le(this.namespace,this.block,e,t,""):""}em(e,t){return e&&t?le(this.namespace,this.block,"",e,t):""}bm(e,t){return e&&t?le(this.namespace,this.block,e,"",t):""}bem(e,t,n){return e&&t&&n?le(this.namespace,this.block,e,t,n):""}is(e,t){return e&&t?"".concat("is-").concat(e):""}cssVar(e){const t={};for(const n in e)e[n]&&(t[this.cssVarName(n)]=e[n]);return t}cssVarBlock(e){const t={};for(const n in e)e[n]&&(t[this.cssVarBlockName(n)]=e[n]);return t}cssVarName(e){return"--".concat(this.namespace,"-").concat(e)}cssVarBlockName(e){return"--".concat(this.namespace,"-").concat(this.block,"-").concat(e)}}),e("HttpResponse",class{constructor(e,t,n){this.local=!0,this.ok=!1,this.headers={},this.config={headers:new g.AxiosHeaders},this.data=e,this.status=t||200,this.statusText=n||"",this.status>=200&&this.status<300&&(this.ok=!0)}});var de=e("Net",class{constructor(e){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.waitRequest=new Map,this.interceptors=new Map,this.instance=g.create(e),this.addInterceptor("Default",new Y)}get baseUrl(){return this.instance.defaults.baseURL||"".concat(ibiz.env.baseUrl,"/").concat(ibiz.env.appId)}addInterceptor(e,t){t.use(this.instance),this.interceptors.set(e,t)}removeInterceptor(e){const t=this.interceptors.get(e);t&&(t.eject(this.instance),this.interceptors.delete(e))}get presetConfig(){return{baseURL:this.baseUrl,headers:{"Content-Type":"application/json;charset=UTF-8",Accept:"application/json"}}}mergeConfig(...e){const t=this.presetConfig;if(0===e.length)return t;const{url:n}=e[0];return n&&this.urlReg.test(n)&&delete t.baseURL,o(t,...e)}async post(e,t,n={},s={}){e=this.handleAppPresetParam(e,n,t);try{const n=await this.request(e,{method:"post",data:t,headers:s});return this.doResponseResult(n)}catch(e){throw H.getInstance(e)}}async get(e,t={},n={},s={}){e=this.attachUrlParam(e,t);try{const t=await this.request(e,o({method:"get",headers:n},s));return this.doResponseResult(t)}catch(e){throw H.getInstance(e)}}async delete(e,t={},n={}){e=this.handleAppPresetParam(e,t);try{const t=await this.request(e,{method:"delete",headers:n});return this.doResponseResult(t)}catch(e){throw H.getInstance(e)}}async put(e,t,n={},s={}){e=this.handleAppPresetParam(e,n);try{const n=await this.request(e,{method:"put",data:t,headers:s});return this.doResponseResult(n)}catch(e){throw H.getInstance(e)}}async getModel(e,t={}){try{const n=await this.instance.get(e,{headers:t});return this.doResponseResult(n)}catch(e){throw H.getInstance(e)}}async request(e,t={}){const n=this.mergeConfig({url:e},t),s=JSON.stringify(n);try{let e=null;this.waitRequest.has(s)?e=this.waitRequest.get(s):(e=this.instance.request(n),this.waitRequest.set(s,e));const t=await e;return this.waitRequest.has(s)&&this.waitRequest.delete(s),this.doResponseResult(t)}catch(e){throw this.waitRequest.has(s)&&this.waitRequest.delete(s),H.getInstance(e)}}axios(e){return g(e)}async sse(e,t,n={}){e=this.attachUrlParam(this.baseUrl+e,t),n.headers||(n.headers={});const s=n.headers;{s["".concat(ibiz.env.tokenHeader,"Authorization")]="".concat(ibiz.env.tokenPrefix,"Bearer ").concat(V());let e=ibiz.env.dcSystem;const{orgData:t}=ibiz;t&&(t.systemid&&(e=t.systemid),t.orgid&&(s.srforgid=t.orgid)),s.srfsystemid=e}const i=r({openWhenHidden:!0,method:"POST"},n);await T(e,i)}doResponseResult(e){const t=e;if(t.status>=200&&t.status<=299){t.ok=!0;const e=t.data;""!==e&&null!==e||(t.data=void 0)}return t}handleAppPresetParam(e,t,n={}){return n&&Object.prototype.hasOwnProperty.call(n,"srfversionid")&&(t.srfversionid=n.srfversionid),t&&Object.prototype.hasOwnProperty.call(t,"srfdefdata")&&delete t.srfdefdata,t?this.attachUrlParam(e,t):e}attachUrlParam(e,t){t&&Object.prototype.hasOwnProperty.call(t,"srfdefdata")&&delete t.srfdefdata;{const t=e.split("?");t[0]=t[0].split("/").map((e=>encodeURIComponent(e))).join("/"),e=t.length>1?t.join("?"):t[0]}const n=b.stringify(t);return p(n)&&(e=e.endsWith("?")||-1!==e.indexOf("?")&&e.endsWith("&")?"".concat(e).concat(n):-1===e.indexOf("?")||e.endsWith("&")?"".concat(e,"?").concat(n):"".concat(e,"&").concat(n)),e}}),ue=e("StringUtil",class{static fill(e,t,n){if(p(e)){if(p(t)){const n=e.match(this.contextReg);null==n||n.forEach((n=>{const s=n.slice(10,n.length-1);e=e.replace("${context.".concat(s,"}"),t[s]||"")}))}if(p(n)){const t=e.match(this.dataReg);null==t||t.forEach((t=>{const s=t.slice(7,t.length-1);e=e.replace("${data.".concat(s,"}"),n[s]||"")}))}}return e}});ue.contextReg=/\$\{context.[a-zA-Z_$][a-zA-Z0-9_$]{1,}\}/g,ue.dataReg=/\$\{data.[a-zA-Z_$][a-zA-Z0-9_$]{1,}\}/g;e("UrlHelper",class{static get routeBase(){const e=window.location.href.lastIndexOf("#/");return window.location.href.slice(0,e+1)}static get appBase(){const{origin:e,pathname:t}=window.location;return"".concat(e).concat(t).replace(/\/$/,"")}static get routePath(){return window.location.hash.replace("#","")}static get fullPath(){return window.location.href}});function he(e){const t=e.composedPath&&e.composedPath()||e.path;if(null!=t)return t;return[e.target].concat(function e(t,n=[]){const s=t.parentNode;return s?e(s,n.concat([s])):n}(e.target))}function pe(e,t,n,s={}){e.addEventListener(t,n,s);let r=()=>{e.removeEventListener(t,n,s),r=P};return()=>{r()}}function me(e,t){return t&&(e.target===t||he(e).includes(t))}var fe=class e{constructor(t={}){this.data=t,this._prev=e.Undefined,this._next=e.Undefined}clone(){throw new q(ibiz.i18n.t("core.utils.unrealized"))}};fe.Undefined=new fe(void 0);var ge=e("HistoryItem",fe),be=(e("HistoryList",class e{get data(){return this._cur.data}constructor(e){this._cur=new ge(e)}assign(e){e&&(this.save(),Object.assign(this._cur.data,e))}save(){const e=this._cur,n=t(e.data),s=new ge(n);s._prev=e,e._next._prev=ge.Undefined,this._clear(e._next),e._next=s,this._cur=s}prev(){return!(!this._cur._prev||this._cur._prev===ge.Undefined)&&(this._cur=this._cur._prev,!0)}next(){return!(!this._cur._next||this._cur._next===ge.Undefined)&&(this._cur=this._cur._next,!0)}_clear(e){e._prev&&e._prev!==ge.Undefined&&(e._prev._next=ge.Undefined,this._clear(e._prev),e._prev=ge.Undefined),e._next&&e._next!==ge.Undefined&&(e._next._prev=ge.Undefined,this._clear(e._next),e._next=ge.Undefined),e.data={}}clone(){return new e({})._cur=t(this._cur),this}destroy(){this._clear(this._cur)}}),"undefined"!=typeof window?window:void 0);var we=Math.round;function ye(e){const t=e.length,n=[];if("rgb"===e.slice(0,3).toLowerCase()){const t=e.match(/([\d|.%]{1,3})/g);n[0]=parseInt(t[0],10),n[1]=parseInt(t[1],10),n[2]=parseInt(t[2],10),n[3]=t[3]?-1!==t[3].indexOf("%")?parseInt(t[3],10)/100:parseFloat(t[3]):1}else{let s;s=t<6?parseInt(String(e[1])+e[1]+e[2]+e[2]+e[3]+e[3]+(t>4?String(e[4])+e[4]:""),16):parseInt(e.slice(1),16),n[0]=s>>16&255,n[1]=s>>8&255,n[2]=255&s,n[3]=9===t||5===t?we((s>>24&255)/255*1e4)/1e4:1}return n}function ve(e){let t="";switch(e.includes(".")?e.split(".").pop():""){case"wps":t="application/kswps";break;case"doc":t="application/msword";break;case"docx":t="application/vnd.openxmlformats-officedocument.wordprocessingml.document";break;case"txt":t="text/plain";break;case"zip":t="application/zip";break;case"png":t="image/png";break;case"gif":t="image/gif";break;case"jpeg":case"jpg":t="image/jpeg";break;case"rtf":t="application/rtf";break;case"avi":t="video/x-msvideo";break;case"gz":t="application/x-gzip";break;case"tar":t="application/x-tar";break;case"xlsx":t="application/vnd.ms-excel";break;default:t=""}return t}function Ee(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n]);return t}function xe(e){const t=o({multiple:!0,accept:""},e),n=document.createElement("input");n.setAttribute("type","file"),n.setAttribute("multiple","".concat(t.multiple)),n.setAttribute("accept",t.accept);let s=!0;n.onchange=e=>{const n=e.target,r=n.files?Ee(n.files):[];0!==r.length&&(s=!1,t.onSelected(r),n.value="")},document.body.appendChild(n),n.click(),window.addEventListener("focus",(()=>{setTimeout((()=>{s&&t.onCancel&&t.onCancel()}),300)}),{once:!0}),document.body.removeChild(n)}e("CountLatch",class{constructor(){this.promise=null,this.resolve=null,this.count=0}startPromise(){this.promise=new Promise((e=>{this.resolve=e}))}endPromise(){this.resolve&&(this.resolve(),this.resolve=null,this.promise=null)}lock(){this.count+=1,this.promise||this.startPromise()}unlock(){if(this.count<1)throw new q(ibiz.i18n.t("core.utils.notMatchLockUnlock"));this.count-=1,0===this.count&&this.endPromise()}async await(){this.promise&&await this.promise}});var _e={childrenFields:["children"]},Oe=new Error("中断操作");function Te(e,t,n){try{!function(e,t,n){const{childrenFields:s}=r(_e,n||{}),i=function(e,t){var n;for(const s of t)if(null==(n=e[s])?void 0:n.length)return e[s]}(e,s);if(null==i?void 0:i.length)for(const s of i){if(t(s,e))throw Oe;Te(s,t,n)}}(e,t,n)}catch(e){if(e!==Oe)throw e}}var Ae={..._e,compareField:"name"};function Re(e){if(l(e)&&d(e.clone))return e.clone()}e("DataTypes",class{static isNumber(e){return["BIGINT","BINARY","DECIMAL","FLOAT","INT","MONEY","NUMERIC","REAL","SMALLINT","SMALLMONEY","TINYINT","VARBINARY"].includes(this.toString(e))}static isDate(e){return["DATETIME","SMALLDATETIME","DATE","TIME"].includes(this.toString(e))}static toString(e){return this.typeMap[e]}}).typeMap={0:"UNKNOWN",1:"BIGINT",2:"BINARY",3:"BIT",4:"CHAR",5:"DATETIME",6:"DECIMAL",7:"FLOAT",8:"IMAGE",9:"INT",10:"MONEY",11:"NCHAR",12:"NTEXT",13:"NVARCHAR",14:"NUMERIC",15:"REAL",16:"SMALLDATETIME",17:"SMALLINT",18:"SMALLMONEY",19:"SQL_VARIANT",20:"SYSNAME",21:"TEXT",22:"TIMESTAMP",23:"TINYINT",24:"VARBINARY",25:"VARCHAR",26:"UNIQUEIDENTIFIER",27:"DATE",28:"TIME",29:"BIGDECIMAL"};var Ce={deep:!0};function Ie(e){return!(!e||e&e-1)}function Me(e){if(!Ie(e))throw new q(ibiz.i18n.t("core.utils.powerOfTwo",{permission:e}))}e("BitMask",{validate:Ie,setPermission:function(e=0,t){return Me(t),e|t},removePermission:function(e=0,t){return Me(t),e&~t},checkPermission:function(e=0,t){return Me(t),!!(e&t)}}),e("en",{core:{command:{unregisteredCommand:"Unregistered command: {id}, please register the command first"},error:{networkAbnormality:"Network abnormality, please try again later",modelMsg:"「{id}」 model {msg}",unsupportedModels:"Unsupported models",modelConfigurationMissing:"Model Configuration Missing"},utils:{powerOfTwo:"{permission} is not a power of two.",targetElement:"The target element does not exist",cannotFindWindow:"Cannot find window",unrealized:"unrealized",remoteStylesheet:"Failed to load remote stylesheet",notMatchLockUnlock:"The lock and unlock counts do not match!",multiApplicationMode:"Multi-application mode waiting for reimplementation requests",uploadFailed:"{file}Upload failed",invalidInputValue:"Invalid input value, must be >= 0"},noReInstall:"ibiz already exists, no need to re-install it"}}),e("zhCn",{core:{command:{unregisteredCommand:"未注册指令: {id},请先注册指令"},error:{networkAbnormality:"网络异常,请稍后重试",modelMsg:"「{id}」模型 {msg}",unsupportedModels:"未支持的模型",modelConfigurationMissing:"模型配置缺失"},utils:{powerOfTwo:"{permission}不是2的幂",targetElement:"target元素不存在",cannotFindWindow:"找不到window",unrealized:"未实现",remoteStylesheet:"未实现加载远程样式表失败",notMatchLockUnlock:"lock和unlock次数不匹配!",multiApplicationMode:"多应用模式等待重新实现请求",uploadFailed:"{file}Upload failed",invalidInputValue:"无效输入值,必须>=0"},noReInstall:"ibiz 已经存在, 无需重复安装"}});var Ue=w.noConflict();y.reg(Ue),y.apply(Ue);var ke=e("IBizSys",class{constructor(){this.env=D,this.log=Ue,this.net=new de,this.commands=new S,this.mc=new ce}})}}}));
@@ -18,6 +18,10 @@ export declare enum LoginMode {
18
18
  /**
19
19
  * 中央认证登录
20
20
  */
21
- CAS = "CAS"
21
+ CAS = "CAS",
22
+ /**
23
+ * oauth登录
24
+ */
25
+ OAUTH = "OAUTH"
22
26
  }
23
27
  //# sourceMappingURL=login-mode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"login-mode.d.ts","sourceRoot":"","sources":["../../../src/constant/login-mode/login-mode.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AACH,oBAAY,SAAS;IACnB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,GAAG,QAAQ;CACZ"}
1
+ {"version":3,"file":"login-mode.d.ts","sourceRoot":"","sources":["../../../src/constant/login-mode/login-mode.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AACH,oBAAY,SAAS;IACnB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,GAAG,QAAQ;IAEX;;OAEG;IACH,KAAK,UAAU;CAChB"}
@@ -21,4 +21,8 @@ export var LoginMode;
21
21
  * 中央认证登录
22
22
  */
23
23
  LoginMode["CAS"] = "CAS";
24
+ /**
25
+ * oauth登录
26
+ */
27
+ LoginMode["OAUTH"] = "OAUTH";
24
28
  })(LoginMode || (LoginMode = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/environment/environment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAoCzB,CAAC"}
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/environment/environment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAsCzB,CAAC"}
@@ -38,4 +38,6 @@ export const Environment = {
38
38
  tokenHeader: '',
39
39
  tokenPrefix: '',
40
40
  customParams: {},
41
+ oauthOpenAccessId: '',
42
+ enableEncryption: false,
41
43
  };
@@ -92,6 +92,14 @@ export interface IEnvironment {
92
92
  * @type {LoginMode}
93
93
  */
94
94
  loginMode: LoginMode;
95
+ /**
96
+ * oauth 开放接入标识
97
+ *
98
+ * @author tony001
99
+ * @date 2024-12-22 10:12:02
100
+ * @type {string}
101
+ */
102
+ oauthOpenAccessId: string;
95
103
  /**
96
104
  * 中央认证登录地址
97
105
  *
@@ -178,6 +186,13 @@ export interface IEnvironment {
178
186
  * @memberof IEnvironment
179
187
  */
180
188
  enableWfAllHistory: boolean;
189
+ /**
190
+ * 是否启用加密
191
+ *
192
+ * @type {boolean}
193
+ * @memberof IEnvironment
194
+ */
195
+ enableEncryption: boolean;
181
196
  /**
182
197
  * 应用标题
183
198
  *
@@ -1 +1 @@
1
- {"version":3,"file":"i-environment.d.ts","sourceRoot":"","sources":["../../../src/interface/i-environment/i-environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;OAOG;IACH,GAAG,EAAE,OAAO,CAAC;IAEb;;;;;;OAMG;IACH,GAAG,EAAE,OAAO,CAAC;IAEb;;;;;;OAMG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;;;;OAOG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;OAMG;IACH,QAAQ,EAAE,YAAY,CAAC;IAEvB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;IACH,SAAS,EAAE,SAAS,CAAC;IAErB;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,YAAY,EAAE,OAAO,CAAC;IAEtB;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;;;OAMG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAE1B;;;;;;OAMG;IACH,kBAAkB,EAAE,kBAAkB,CAAC;IAEvC;;;;;OAKG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;;OAKG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,cAAc,CAAC;IAE/B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB"}
1
+ {"version":3,"file":"i-environment.d.ts","sourceRoot":"","sources":["../../../src/interface/i-environment/i-environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;OAOG;IACH,GAAG,EAAE,OAAO,CAAC;IAEb;;;;;;OAMG;IACH,GAAG,EAAE,OAAO,CAAC;IAEb;;;;;;OAMG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;;;;OAOG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;OAMG;IACH,QAAQ,EAAE,YAAY,CAAC;IAEvB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;IACH,SAAS,EAAE,SAAS,CAAC;IAErB;;;;;;OAMG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,YAAY,EAAE,OAAO,CAAC;IAEtB;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;;;OAMG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAE1B;;;;;;OAMG;IACH,kBAAkB,EAAE,kBAAkB,CAAC;IAEvC;;;;;OAKG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;;OAKG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;;;OAKG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAE1B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,cAAc,CAAC;IAE/B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB"}
@@ -358,4 +358,25 @@ export declare function calcOpenModeStyle(value: number, type: 'drawer' | 'modal
358
358
  * @return {*} {string | undefined}
359
359
  */
360
360
  export declare function showTitle(str: string | undefined): string | undefined;
361
+ /**
362
+ * 将非标准JSON字符串转为JSON对象(自动修复常见的格式问题)
363
+ *
364
+ * 1. 将单引号替换为双引号
365
+ * 2. 给对象的属性名加上双引号
366
+ * 3. 去除最后一个元素后的多余逗号
367
+ * 4. 去除多余的空格和换行符
368
+ * @export
369
+ * @param {string} str
370
+ * @return {*} {*}
371
+ */
372
+ export declare function fixJsonString(str: string): any;
373
+ /**
374
+ * 获取随机数
375
+ * - 默认获取 0 - 1000 的随机数
376
+ * @export
377
+ * @param {number} [min=0] 随机数最小值
378
+ * @param {number} [max=1000] 随机数最大值
379
+ * @return {*} {number}
380
+ */
381
+ export declare function getRandomInt(min?: number, max?: number): number;
361
382
  //# sourceMappingURL=util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/utils/util/util.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/utils/util/util.ts"],"names":[],"mappings":"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"}
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-useless-escape */
1
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
3
  import { debounce } from 'lodash-es';
3
4
  import { getCookie } from 'qx-util';
@@ -552,3 +553,43 @@ export function calcOpenModeStyle(value, type) {
552
553
  export function showTitle(str) {
553
554
  return ibiz.env.enableTitle ? str : undefined;
554
555
  }
556
+ /**
557
+ * 将非标准JSON字符串转为JSON对象(自动修复常见的格式问题)
558
+ *
559
+ * 1. 将单引号替换为双引号
560
+ * 2. 给对象的属性名加上双引号
561
+ * 3. 去除最后一个元素后的多余逗号
562
+ * 4. 去除多余的空格和换行符
563
+ * @export
564
+ * @param {string} str
565
+ * @return {*} {*}
566
+ */
567
+ export function fixJsonString(str) {
568
+ // 1. 将单引号替换为双引号
569
+ let fixedString = str.replace(/'/g, '"');
570
+ // 2. 给对象的属性名加上双引号
571
+ fixedString = fixedString.replace(/([{,])\s*([a-zA-Z0-9_]+)\s*:/g, '$1"$2":');
572
+ // 3. 去除最后一个元素后的多余逗号
573
+ fixedString = fixedString.replace(/,(\s*[\}\]])/g, '$1');
574
+ // 4. 去除多余的空格和换行符
575
+ fixedString = fixedString.trim();
576
+ // 5. 尝试解析为有效的 JSON 字符串
577
+ try {
578
+ return JSON.parse(fixedString);
579
+ }
580
+ catch (e) {
581
+ ibiz.log.error(str);
582
+ return null;
583
+ }
584
+ }
585
+ /**
586
+ * 获取随机数
587
+ * - 默认获取 0 - 1000 的随机数
588
+ * @export
589
+ * @param {number} [min=0] 随机数最小值
590
+ * @param {number} [max=1000] 随机数最大值
591
+ * @return {*} {number}
592
+ */
593
+ export function getRandomInt(min = 0, max = 1000) {
594
+ return Math.floor(Math.random() * (max - min + 1)) + min;
595
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/core",
3
- "version": "0.7.38-alpha.32",
3
+ "version": "0.7.38-alpha.43",
4
4
  "description": "核心包",
5
5
  "type": "module",
6
6
  "main": "out/index.js",