@partex/one-core 2.0.25 → 2.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (function(b,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("naive-ui"),require("vue-i18n"),require("vue-router"),require("axios"),require("md5"),require("jsqr"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","vue","naive-ui","vue-i18n","vue-router","axios","md5","jsqr","vuedraggable"],t):(b=typeof globalThis<"u"?globalThis:b||self,t(b.OneCore={},b.Vue,b["naive-ui"],b["vue-i18n"],b["vue-router"],b.axios,b.md5,b.jsQR,b.vuedraggable))})(this,function(b,t,u,de,oe,pt,qe,ra,la){"use strict";var Og=Object.defineProperty;var Pg=(b,t,u)=>t in b?Og(b,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):b[t]=u;var dt=(b,t,u)=>(Pg(b,typeof t!="symbol"?t+"":t,u),u);function sa(e,o){for(var n=0;n<o.length;n++){const r=o[n];if(typeof r!="string"&&!Array.isArray(r)){for(const l in r)if(l!=="default"&&!(l in e)){const i=Object.getOwnPropertyDescriptor(r,l);i&&Object.defineProperty(e,l,i.get?i:{enumerable:!0,get:()=>r[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ut(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var co={exports:{}};(function(e,o){(function(n,r){e.exports=r()})(Ae,function(){var n=1e3,r=6e4,l=36e5,i="millisecond",s="second",c="minute",d="hour",m="day",g="week",f="month",h="quarter",w="year",S="date",T="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var C=["th","st","nd","rd"],$=B%100;return"["+B+(C[($-20)%10]||C[$]||C[0])+"]"}},p=function(B,C,$){var k=String(B);return!k||k.length>=C?B:""+Array(C+1-k.length).join($)+B},D={s:p,z:function(B){var C=-B.utcOffset(),$=Math.abs(C),k=Math.floor($/60),V=$%60;return(C<=0?"+":"-")+p(k,2,"0")+":"+p(V,2,"0")},m:function B(C,$){if(C.date()<$.date())return-B($,C);var k=12*($.year()-C.year())+($.month()-C.month()),V=C.clone().add(k,f),P=$-V<0,M=C.clone().add(k+(P?-1:1),f);return+(-(k+($-V)/(P?V-M:M-V))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:f,y:w,w:g,d:m,D:S,h:d,m:c,s,ms:i,Q:h}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},z="en",O={};O[z]=j;var Q="$isDayjsObject",a=function(B){return B instanceof N||!(!B||!B[Q])},E=function B(C,$,k){var V;if(!C)return z;if(typeof C=="string"){var P=C.toLowerCase();O[P]&&(V=P),$&&(O[P]=$,V=P);var M=C.split("-");if(!V&&M.length>1)return B(M[0])}else{var q=C.name;O[q]=C,V=q}return!k&&V&&(z=V),V||!k&&z},K=function(B,C){if(a(B))return B.clone();var $=typeof C=="object"?C:{};return $.date=B,$.args=arguments,new N($)},x=D;x.l=E,x.i=a,x.w=function(B,C){return K(B,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var N=function(){function B($){this.$L=E($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[Q]=!0}var C=B.prototype;return C.parse=function($){this.$d=function(k){var V=k.date,P=k.utc;if(V===null)return new Date(NaN);if(x.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var M=V.match(y);if(M){var q=M[2]-1||0,H=(M[7]||"0").substring(0,3);return P?new Date(Date.UTC(M[1],q,M[3]||1,M[4]||0,M[5]||0,M[6]||0,H)):new Date(M[1],q,M[3]||1,M[4]||0,M[5]||0,M[6]||0,H)}}return new Date(V)}($),this.init()},C.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},C.$utils=function(){return x},C.isValid=function(){return this.$d.toString()!==T},C.isSame=function($,k){var V=K($);return this.startOf(k)<=V&&V<=this.endOf(k)},C.isAfter=function($,k){return K($)<this.startOf(k)},C.isBefore=function($,k){return this.endOf(k)<K($)},C.$g=function($,k,V){return x.u($)?this[k]:this.set(V,$)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function($,k){var V=this,P=!!x.u(k)||k,M=x.p($),q=function(ie,X){var se=x.w(V.$u?Date.UTC(V.$y,X,ie):new Date(V.$y,X,ie),V);return P?se:se.endOf(m)},H=function(ie,X){return x.w(V.toDate()[ie].apply(V.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(X)),V)},Y=this.$W,F=this.$M,J=this.$D,te="set"+(this.$u?"UTC":"");switch(M){case w:return P?q(1,0):q(31,11);case f:return P?q(1,F):q(0,F+1);case g:var v=this.$locale().weekStart||0,ce=(Y<v?Y+7:Y)-v;return q(P?J-ce:J+(6-ce),F);case m:case S:return H(te+"Hours",0);case d:return H(te+"Minutes",1);case c:return H(te+"Seconds",2);case s:return H(te+"Milliseconds",3);default:return this.clone()}},C.endOf=function($){return this.startOf($,!1)},C.$set=function($,k){var V,P=x.p($),M="set"+(this.$u?"UTC":""),q=(V={},V[m]=M+"Date",V[S]=M+"Date",V[f]=M+"Month",V[w]=M+"FullYear",V[d]=M+"Hours",V[c]=M+"Minutes",V[s]=M+"Seconds",V[i]=M+"Milliseconds",V)[P],H=P===m?this.$D+(k-this.$W):k;if(P===f||P===w){var Y=this.clone().set(S,1);Y.$d[q](H),Y.init(),this.$d=Y.set(S,Math.min(this.$D,Y.daysInMonth())).$d}else q&&this.$d[q](H);return this.init(),this},C.set=function($,k){return this.clone().$set($,k)},C.get=function($){return this[x.p($)]()},C.add=function($,k){var V,P=this;$=Number($);var M=x.p(k),q=function(F){var J=K(P);return x.w(J.date(J.date()+Math.round(F*$)),P)};if(M===f)return this.set(f,this.$M+$);if(M===w)return this.set(w,this.$y+$);if(M===m)return q(1);if(M===g)return q(7);var H=(V={},V[c]=r,V[d]=l,V[s]=n,V)[M]||1,Y=this.$d.getTime()+$*H;return x.w(Y,this)},C.subtract=function($,k){return this.add(-1*$,k)},C.format=function($){var k=this,V=this.$locale();if(!this.isValid())return V.invalidDate||T;var P=$||"YYYY-MM-DDTHH:mm:ssZ",M=x.z(this),q=this.$H,H=this.$m,Y=this.$M,F=V.weekdays,J=V.months,te=V.meridiem,v=function(X,se,we,_e){return X&&(X[se]||X(k,P))||we[se].slice(0,_e)},ce=function(X){return x.s(q%12||12,X,"0")},ie=te||function(X,se,we){var _e=X<12?"AM":"PM";return we?_e.toLowerCase():_e};return P.replace(I,function(X,se){return se||function(we){switch(we){case"YY":return String(k.$y).slice(-2);case"YYYY":return x.s(k.$y,4,"0");case"M":return Y+1;case"MM":return x.s(Y+1,2,"0");case"MMM":return v(V.monthsShort,Y,J,3);case"MMMM":return v(J,Y);case"D":return k.$D;case"DD":return x.s(k.$D,2,"0");case"d":return String(k.$W);case"dd":return v(V.weekdaysMin,k.$W,F,2);case"ddd":return v(V.weekdaysShort,k.$W,F,3);case"dddd":return F[k.$W];case"H":return String(q);case"HH":return x.s(q,2,"0");case"h":return ce(1);case"hh":return ce(2);case"a":return ie(q,H,!0);case"A":return ie(q,H,!1);case"m":return String(H);case"mm":return x.s(H,2,"0");case"s":return String(k.$s);case"ss":return x.s(k.$s,2,"0");case"SSS":return x.s(k.$ms,3,"0");case"Z":return M}return null}(X)||M.replace(":","")})},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function($,k,V){var P,M=this,q=x.p(k),H=K($),Y=(H.utcOffset()-this.utcOffset())*r,F=this-H,J=function(){return x.m(M,H)};switch(q){case w:P=J()/12;break;case f:P=J();break;case h:P=J()/3;break;case g:P=(F-Y)/6048e5;break;case m:P=(F-Y)/864e5;break;case d:P=F/l;break;case c:P=F/r;break;case s:P=F/n;break;default:P=F}return V?P:x.a(P)},C.daysInMonth=function(){return this.endOf(f).$D},C.$locale=function(){return O[this.$L]},C.locale=function($,k){if(!$)return this.$L;var V=this.clone(),P=E($,k,!0);return P&&(V.$L=P),V},C.clone=function(){return x.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},B}(),R=N.prototype;return K.prototype=R,[["$ms",i],["$s",s],["$m",c],["$H",d],["$W",m],["$M",f],["$y",w],["$D",S]].forEach(function(B){R[B[1]]=function(C){return this.$g(C,B[0],B[1])}}),K.extend=function(B,C){return B.$i||(B(C,N,K),B.$i=!0),K},K.locale=E,K.isDayjs=a,K.unix=function(B){return K(1e3*B)},K.en=O[z],K.Ls=O,K.p={},K})})(co);var io=co.exports;const po=ut(io),ca=sa({__proto__:null,default:po},[io]),uo=t.defineComponent({name:"OcActionButton",props:{data:{required:!0,type:Array,default:()=>[]}},setup(e){return()=>ge(e.data)}}),A=(e,o)=>{const n=e.__vccOpts||e;for(const[r,l]of o)n[r]=l;return n},ia={},da={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},pa=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M11.75 3a.75.75 0 0 1 .743.648l.007.102l.001 7.25h7.253a.75.75 0 0 1 .102 1.493l-.102.007h-7.253l.002 7.25a.75.75 0 0 1-1.493.101l-.007-.102l-.002-7.249H3.752a.75.75 0 0 1-.102-1.493L3.752 11h7.25L11 3.75a.75.75 0 0 1 .75-.75z",fill:"currentColor"})],-1)];function ua(e,o){return t.openBlock(),t.createElementBlock("svg",da,pa)}const Ge=A(ia,[["render",ua]]),fa={},ma={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ha=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z",fill:"currentColor"})],-1)];function ga(e,o){return t.openBlock(),t.createElementBlock("svg",ma,ha)}const ft=A(fa,[["render",ga]]),wa={},Na={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ya=[t.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{d:"M8 6h12"}),t.createElementVNode("path",{d:"M6 12h12"}),t.createElementVNode("path",{d:"M4 18h12"})],-1)];function Ca(e,o){return t.openBlock(),t.createElementBlock("svg",Na,ya)}const mt=A(wa,[["render",Ca]]),ba={},_a={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},$a=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M15.53 4.22a.75.75 0 0 1 0 1.06L8.81 12l6.72 6.72a.75.75 0 1 1-1.06 1.06l-7.25-7.25a.75.75 0 0 1 0-1.06l7.25-7.25a.75.75 0 0 1 1.06 0z",fill:"currentColor"})],-1)];function ka(e,o){return t.openBlock(),t.createElementBlock("svg",_a,$a)}const ht=A(ba,[["render",ka]]),Va={},Sa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ta=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M16.53 11.72l-.084-.072a.75.75 0 0 0-.976.072l-2.72 2.72V7.75l-.007-.102A.75.75 0 0 0 12 7l-.102.007a.75.75 0 0 0-.648.743v6.692L8.53 11.72l-.085-.073a.75.75 0 0 0-.976 1.133l4 4.002l.084.072a.75.75 0 0 0 .976-.072l4.001-4l.073-.085a.75.75 0 0 0-.073-.977zM6.25 3A3.25 3.25 0 0 0 3 6.25v11.5A3.25 3.25 0 0 0 6.25 21h11.5A3.25 3.25 0 0 0 21 17.75V6.25A3.25 3.25 0 0 0 17.75 3H6.25zM4.5 6.25c0-.966.784-1.75 1.75-1.75h11.5c.966 0 1.75.784 1.75 1.75v11.5a1.75 1.75 0 0 1-1.75 1.75H6.25a1.75 1.75 0 0 1-1.75-1.75V6.25z",fill:"currentColor"})],-1)];function Ba(e,o){return t.openBlock(),t.createElementBlock("svg",Sa,Ta)}const gt=A(Va,[["render",Ba]]),Ia={},Da={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Oa=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M20.026 17.001c-2.762 4.784-8.879 6.423-13.663 3.661A9.965 9.965 0 0 1 3.13 17.68a.75.75 0 0 1 .365-1.132c3.767-1.348 5.785-2.91 6.956-5.146c1.232-2.353 1.551-4.93.689-8.463a.75.75 0 0 1 .769-.927a9.961 9.961 0 0 1 4.457 1.327c4.784 2.762 6.423 8.879 3.66 13.662z",fill:"currentColor"})],-1)];function Pa(e,o){return t.openBlock(),t.createElementBlock("svg",Da,Oa)}const wt=A(Ia,[["render",Pa]]),Aa={},Ma={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ea=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 2a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 2zm5 10a5 5 0 1 1-10 0a5 5 0 0 1 10 0zm4.25.75a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5h1.5zM12 19a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 19zm-7.75-6.25a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5h1.5zm-.03-8.53a.75.75 0 0 1 1.06 0l1.5 1.5a.75.75 0 0 1-1.06 1.06l-1.5-1.5a.75.75 0 0 1 0-1.06zm1.06 15.56a.75.75 0 1 1-1.06-1.06l1.5-1.5a.75.75 0 1 1 1.06 1.06l-1.5 1.5zm14.5-15.56a.75.75 0 0 0-1.06 0l-1.5 1.5a.75.75 0 0 0 1.06 1.06l1.5-1.5a.75.75 0 0 0 0-1.06zm-1.06 15.56a.75.75 0 1 0 1.06-1.06l-1.5-1.5a.75.75 0 1 0-1.06 1.06l1.5 1.5z",fill:"currentColor"})],-1)];function ja(e,o){return t.openBlock(),t.createElementBlock("svg",Ma,Ea)}const Nt=A(Aa,[["render",ja]]),Fa={},za={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},xa=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 17a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 17a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7-7a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 10a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7-7a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 3a2 2 0 1 1 0 4a2 2 0 0 1 0-4z",fill:"currentColor"})],-1)];function La(e,o){return t.openBlock(),t.createElementBlock("svg",za,xa)}const yt=A(Fa,[["render",La]]),Ra={},qa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ga=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",fill:"currentColor"})],-1)];function Ha(e,o){return t.openBlock(),t.createElementBlock("svg",qa,Ga)}const He=A(Ra,[["render",Ha]]),Ua={},Ka={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Wa=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 4.5a7.5 7.5 0 1 0 7.419 6.392c-.067-.454.265-.892.724-.892c.37 0 .696.256.752.623A9 9 0 1 1 18 5.292V4.25a.75.75 0 0 1 1.5 0v3a.75.75 0 0 1-.75.75h-3a.75.75 0 0 1 0-1.5h1.35a7.474 7.474 0 0 0-5.1-2z",fill:"currentColor"})],-1)];function Ja(e,o){return t.openBlock(),t.createElementBlock("svg",Ka,Wa)}const ke=A(Ua,[["render",Ja]]),Ya={},Qa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Za=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M17.75 3A3.25 3.25 0 0 1 21 6.25v5.772a6.471 6.471 0 0 0-1.5-.709V8.5h-15v9.25c0 .966.784 1.75 1.75 1.75h5.063c.173.534.412 1.037.709 1.5H6.25A3.25 3.25 0 0 1 3 17.75V6.25A3.25 3.25 0 0 1 6.25 3h11.5zm0 1.5H6.25A1.75 1.75 0 0 0 4.5 6.25V7h15v-.75a1.75 1.75 0 0 0-1.75-1.75zm5.25 13a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0zm-5-3a.5.5 0 0 0-1 0v4.793l-1.646-1.647a.5.5 0 0 0-.708.708l2.5 2.5a.5.5 0 0 0 .708 0l2.5-2.5a.5.5 0 0 0-.708-.708L18 19.293V14.5z",fill:"currentColor"})],-1)];function Xa(e,o){return t.openBlock(),t.createElementBlock("svg",Qa,Za)}const Me=A(Ya,[["render",Xa]]),va={},er={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},tr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M13.5 16a.75.75 0 0 1 0 1.5h-3a.75.75 0 0 1 0-1.5h3zm3-5a.75.75 0 0 1 0 1.5h-9a.75.75 0 0 1 0-1.5h9zm3-5a.75.75 0 0 1 0 1.5h-15a.75.75 0 0 1 0-1.5h15z",fill:"currentColor"})],-1)];function or(e,o){return t.openBlock(),t.createElementBlock("svg",er,tr)}const Ue=A(va,[["render",or]]),nr={},ar={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},rr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M4.5 5.75c0-.69.56-1.25 1.25-1.25h2a.75.75 0 0 0 0-1.5h-2A2.75 2.75 0 0 0 3 5.75v2a.75.75 0 0 0 1.5 0v-2zm0 12.5c0 .69.56 1.25 1.25 1.25h2a.75.75 0 0 1 0 1.5h-2A2.75 2.75 0 0 1 3 18.25v-2a.75.75 0 0 1 1.5 0v2zM18.25 4.5c.69 0 1.25.56 1.25 1.25v2a.75.75 0 0 0 1.5 0v-2A2.75 2.75 0 0 0 18.25 3h-2a.75.75 0 0 0 0 1.5h2zm1.25 13.75c0 .69-.56 1.25-1.25 1.25h-2a.75.75 0 0 0 0 1.5h2A2.75 2.75 0 0 0 21 18.25v-2a.75.75 0 0 0-1.5 0v2z",fill:"currentColor"})],-1)];function lr(e,o){return t.openBlock(),t.createElementBlock("svg",ar,rr)}const fo=A(nr,[["render",lr]]),sr={},cr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ir=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 1.75a3.25 3.25 0 0 1 3.245 3.066L15.25 5h5.25a.75.75 0 0 1 .102 1.493L20.5 6.5h-.796l-1.28 13.02a2.75 2.75 0 0 1-2.561 2.474l-.176.006H8.313a2.75 2.75 0 0 1-2.714-2.307l-.023-.174L4.295 6.5H3.5a.75.75 0 0 1-.743-.648L2.75 5.75a.75.75 0 0 1 .648-.743L3.5 5h5.25A3.25 3.25 0 0 1 12 1.75zm6.197 4.75H5.802l1.267 12.872a1.25 1.25 0 0 0 1.117 1.122l.127.006h7.374c.6 0 1.109-.425 1.225-1.002l.02-.126L18.196 6.5zM13.75 9.25a.75.75 0 0 1 .743.648L14.5 10v7a.75.75 0 0 1-1.493.102L13 17v-7a.75.75 0 0 1 .75-.75zm-3.5 0a.75.75 0 0 1 .743.648L11 10v7a.75.75 0 0 1-1.493.102L9.5 17v-7a.75.75 0 0 1 .75-.75zm1.75-6a1.75 1.75 0 0 0-1.744 1.606L10.25 5h3.5A1.75 1.75 0 0 0 12 3.25z",fill:"currentColor"})],-1)];function dr(e,o){return t.openBlock(),t.createElementBlock("svg",cr,ir)}const Ct=A(sr,[["render",dr]]),pr={},ur={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},fr=[t.createElementVNode("path",{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 0 0 0 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3c7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176s176-78.8 176-176s-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112s112 50.1 112 112s-50.1 112-112 112z",fill:"currentColor"},null,-1)];function mr(e,o){return t.openBlock(),t.createElementBlock("svg",ur,fr)}const Ke=A(pr,[["render",mr]]),hr={},gr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},wr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M20 4.746a2.75 2.75 0 0 0-2.75-2.75H4.75A2.75 2.75 0 0 0 2 4.746v12.5a2.75 2.75 0 0 0 2.75 2.75h6.666l.105-.42c.096-.384.253-.748.463-1.08H4.75c-.69 0-1.25-.56-1.25-1.25v-12.5c0-.69.56-1.25 1.25-1.25h12.5c.69 0 1.25.56 1.25 1.25v7.113c.437-.4.956-.66 1.5-.781V4.746zm-4 9.608V6.73l-.007-.1A.744.744 0 0 0 15.25 6a.74.74 0 0 0-.75.73v8.541l.007.099c.017.125.067.24.142.337L16 14.355zm-8.507-5.71A.75.75 0 0 0 6.75 8a.748.748 0 0 0-.75.747v6.507l.007.101c.05.365.363.645.743.645c.414 0 .75-.334.75-.746V8.746l-.007-.101zm4.214 2.973a.73.73 0 0 0-.732-.62a.73.73 0 0 0-.725.733l.035 3.547l.008.099a.731.731 0 0 0 .732.62a.73.73 0 0 0 .725-.733l-.035-3.548l-.008-.098zm7.393 1.052l-5.903 5.902a2.686 2.686 0 0 0-.706 1.248l-.458 1.83a1.087 1.087 0 0 0 1.319 1.319l1.83-.458a2.685 2.685 0 0 0 1.248-.706l5.902-5.903A2.286 2.286 0 0 0 19.1 12.67z",fill:"currentColor"})],-1)];function Nr(e,o){return t.openBlock(),t.createElementBlock("svg",gr,wr)}const bt=A(hr,[["render",Nr]]),yr={},Cr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},br=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M4.397 4.554l.073-.084a.75.75 0 0 1 .976-.073l.084.073L12 10.939l6.47-6.47a.75.75 0 1 1 1.06 1.061L13.061 12l6.47 6.47a.75.75 0 0 1 .072.976l-.073.084a.75.75 0 0 1-.976.073l-.084-.073L12 13.061l-6.47 6.47a.75.75 0 0 1-1.06-1.061L10.939 12l-6.47-6.47a.75.75 0 0 1-.072-.976l.073-.084l-.073.084z",fill:"currentColor"})],-1)];function _r(e,o){return t.openBlock(),t.createElementBlock("svg",Cr,br)}const he=A(yr,[["render",_r]]),$r={},kr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Vr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M22 6.5a5.5 5.5 0 1 0-11 0a5.5 5.5 0 0 0 11 0zM17 7l.001 2.504a.5.5 0 1 1-1 0V7h-2.505a.5.5 0 0 1 0-1H16V3.5a.5.5 0 0 1 1 0V6h2.503a.5.5 0 1 1 0 1h-2.502zm2.5 7v-1.732A6.518 6.518 0 0 0 21 11.19v7.56a3.25 3.25 0 0 1-3.066 3.245L17.75 22H6.25a3.25 3.25 0 0 1-3.245-3.066L3 18.75V7.25a3.25 3.25 0 0 1 3.066-3.245L6.25 4h4.248a6.451 6.451 0 0 0-.422 1.5H6.25a1.75 1.75 0 0 0-1.744 1.606L4.5 7.25V14H9a.75.75 0 0 1 .743.648l.007.102a2.25 2.25 0 0 0 4.495.154l.005-.154a.75.75 0 0 1 .648-.743L15 14h4.5zm-15 1.5v3.25a1.75 1.75 0 0 0 1.606 1.744l.144.006h11.5a1.75 1.75 0 0 0 1.744-1.607l.006-.143V15.5h-3.825a3.752 3.752 0 0 1-3.475 2.995l-.2.005a3.752 3.752 0 0 1-3.632-2.812l-.043-.188H4.5z",fill:"currentColor"})],-1)];function Sr(e,o){return t.openBlock(),t.createElementBlock("svg",kr,Vr)}const Ee=A($r,[["render",Sr]]),Tr={},Br={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ir=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M6.087 7.75a5.752 5.752 0 0 1 11.326 0h.087a4 4 0 0 1 3.962 4.552a6.534 6.534 0 0 0-1.597-1.364A2.501 2.501 0 0 0 17.5 9.25h-.756a.75.75 0 0 1-.75-.713a4.25 4.25 0 0 0-8.489 0a.75.75 0 0 1-.749.713H6a2.5 2.5 0 0 0 0 5h4.4a6.458 6.458 0 0 0-.357 1.5H6a4 4 0 0 1 0-8h.087zM22 16.5a5.5 5.5 0 1 0-11 0a5.5 5.5 0 0 0 11 0zm-6-3a.5.5 0 0 1 1 0v4.793l1.646-1.647a.5.5 0 0 1 .708.708l-2.5 2.5a.5.5 0 0 1-.708 0l-2.5-2.5a.5.5 0 0 1 .708-.708L16 18.293V13.5z",fill:"currentColor"})],-1)];function Dr(e,o){return t.openBlock(),t.createElementBlock("svg",Br,Ir)}const We=A(Tr,[["render",Dr]]),Or={},Pr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ar=[t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 160h352"},null,-1),t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 256h352"},null,-1),t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 352h352"},null,-1)];function Mr(e,o){return t.openBlock(),t.createElementBlock("svg",Pr,Ar)}const Je=A(Or,[["render",Mr]]),Er={},jr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Fr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M16.242 2.932l4.826 4.826a2.75 2.75 0 0 1-.715 4.404l-4.87 2.435a.75.75 0 0 0-.374.426l-1.44 4.166a1.25 1.25 0 0 1-2.065.476L8.5 16.561L4.06 21H3v-1.062L7.44 15.5l-3.105-3.104a1.25 1.25 0 0 1 .476-2.066l4.166-1.439a.75.75 0 0 0 .426-.374l2.435-4.87a2.75 2.75 0 0 1 4.405-.715zm3.766 5.886l-4.826-4.825a1.25 1.25 0 0 0-2.002.324l-2.435 4.871a2.25 2.25 0 0 1-1.278 1.12l-3.789 1.31l6.705 6.704l1.308-3.788a2.25 2.25 0 0 1 1.12-1.278l4.872-2.436a1.25 1.25 0 0 0 .325-2.002z",fill:"currentColor"})],-1)];function zr(e,o){return t.openBlock(),t.createElementBlock("svg",jr,Fr)}const _t=A(Er,[["render",zr]]),xr={},Lr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Rr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M4.22 8.47a.75.75 0 0 1 1.06 0L12 15.19l6.72-6.72a.75.75 0 1 1 1.06 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L4.22 9.53a.75.75 0 0 1 0-1.06z",fill:"currentColor"})],-1)];function qr(e,o){return t.openBlock(),t.createElementBlock("svg",Lr,Rr)}const Ye=A(xr,[["render",qr]]),Gr={},Hr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ur=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M4.22 15.53a.75.75 0 0 0 1.06 0L12 8.81l6.72 6.72a.75.75 0 1 0 1.06-1.06l-7.25-7.25a.75.75 0 0 0-1.06 0l-7.25 7.25a.75.75 0 0 0 0 1.06z",fill:"currentColor"})],-1)];function Kr(e,o){return t.openBlock(),t.createElementBlock("svg",Hr,Ur)}const $t=A(Gr,[["render",Kr]]),Wr={},Jr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Yr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M16.25 5.18a.75.75 0 0 0 .142 1.051a7.251 7.251 0 0 1-3.599 12.976l.677-.677a.75.75 0 0 0-.977-1.133l-.084.073l-2 2a.75.75 0 0 0-.073.976l.073.084l2 2a.75.75 0 0 0 1.133-.976l-.072-.084l-.75-.75A8.75 8.75 0 0 0 17.301 5.04a.75.75 0 0 0-1.051.141zm-5.72-3.71a.75.75 0 0 0 0 1.06l.75.75a8.75 8.75 0 0 0-4.85 15.47a.75.75 0 1 0 .956-1.157a7.251 7.251 0 0 1 3.82-12.8l-.676.677a.75.75 0 1 0 1.061 1.06l2-2a.75.75 0 0 0 0-1.06l-2-2a.75.75 0 0 0-1.06 0z",fill:"currentColor"})],-1)];function Qr(e,o){return t.openBlock(),t.createElementBlock("svg",Jr,Yr)}const kt=A(Wr,[["render",Qr]]),Zr={},Xr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},vr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M17.754 14a2.249 2.249 0 0 1 2.249 2.25v.918a2.75 2.75 0 0 1-.513 1.598c-1.545 2.164-4.07 3.235-7.49 3.235c-3.421 0-5.944-1.072-7.486-3.236a2.75 2.75 0 0 1-.51-1.596v-.92A2.249 2.249 0 0 1 6.251 14h11.502zM12 2.005a5 5 0 1 1 0 10a5 5 0 0 1 0-10z",fill:"currentColor"})],-1)];function el(e,o){return t.openBlock(),t.createElementBlock("svg",Xr,vr)}const Vt=A(Zr,[["render",el]]),St=window.localStorage;function Tt(e,o){St.setItem(e,JSON.stringify(o))}function mo(e){const o=St.getItem(e);return o?JSON.parse(o):null}function tl(e){St.removeItem(e)}function ho(){return Date.parse(String(new Date))}const ol="local-";class nl{constructor(o=""){dt(this,"namespace");dt(this,"mapKey");dt(this,"map");this.namespace=o,this.mapKey=ol+this.namespace,this.map=mo(this.mapKey)||{}}set(o,n,r=0){const l=this.getReallyKey(o),i={expires:r,time:ho()};Tt(l,n),this.map[o]=i,Tt(this.mapKey,this.map)}getReallyKey(o){return this.namespace+"-"+o}get(o,n){const r=this.getReallyKey(o),l=this.map[o];if(l){const i=mo(r);if(l.expires>0){if(ho()-l.time<=l.expires)return i===!1||i?i:n;this.delete(o)}else return i===!1||i?i:n}return n}delete(o){const n=this.getReallyKey(o);delete this.map[o],Tt(this.mapKey,this.map),tl(n)}deleteAll(){for(const o in this.map)this.delete(o)}}const Bt=new nl("partex");function pe(e,o,n=3e4){if(typeof n=="string"){let r=0;const l=n.split(" ");switch(l[1]){case"Minutes":r=6e4;break;case"Hours":r=36e5;break;case"Day":r=864e5;break;case"Week":r=6048e5;break}n=Number(l[0])*r}Bt.set(e,o,n)}function re(e,o){return Bt.get(e,o)}const je=e=>{Bt.delete(e)},Qe=(e=0)=>{const o=document.documentElement;o&&(o.scrollTop=e,setTimeout(()=>{o.scrollTop=e},100))},go=()=>{const e=document.querySelectorAll(".partex-loading");e&&e.length>0&&e.forEach(o=>{const n=o.parentNode;n==null||n.removeChild(o)})};function Fe(e,o=!1){let n=e.records;o&&(n=n.map((l,i)=>({key:i,...l})));const r=parseInt(e.size);return{query:{page:Number(e.current),pageCount:parseInt(e.pages),pageSize:r>29?r:30,itemCount:parseInt(e.total),pageSizes:[30,40,50],showQuickJumper:!0,showSizePicker:!0,pageSlot:8,prefix:()=>t.h("div",{},{default:()=>`共${e.total}条`})},records:n}}function ze(e){if(!e.query)return e;const o={};return e.query.page&&(o.current=e.query.page),e.query.pageSize&&(o.size=e.query.pageSize),e.query.isGetAll&&(o.isGetAll=e.query.isGetAll),e.query.keyword&&(o.keyword=e.query.keyword),e.query.columnKey&&(o.columnKey=e.query.columnKey),e.query.order&&(o.order=e.query.order),{...e,query:o}}const ue=(e,o="yyyy-MM-dd")=>{if(!e)return"";typeof e=="string"&&(e=e.replace(/年/g,"-").replace(/月/g,"-").replace(/日/g,""));let n=new Date(e);if(typeof e=="string"&&isNaN(n.getTime())&&(n=new Date(parseInt(e))),isNaN(n.getTime()))return"---";const r={"M+":n.getMonth()+1,"d+":n.getDate(),"h+":n.getHours(),"m+":n.getMinutes(),"s+":n.getSeconds()};/(y+)/.test(o)&&(o=o.replace(RegExp.$1,(n.getFullYear()+"").substr(4-RegExp.$1.length)));for(const l in r)if(new RegExp("("+l+")").test(o)){let i=r[l];RegExp.$1.length!==1&&(i=("00"+r[l]).substr((""+r[l]).length)),o=o.replace(RegExp.$1,i)}return o},Ne=e=>{try{return window.btoa(encodeURI(JSON.stringify(e)))}catch{return""}},xe=e=>{try{return JSON.parse(decodeURI(window.atob(e)))}catch{return""}},al=(e,o=500)=>{const n=e;let r;const l=function(...s){r||(r=setTimeout(function(){r&&clearTimeout(r),r=void 0,n.apply(l,s)},o))};return l};function rl(e,o){e.requestFullscreen?(o&&(e.onfullscreenchange=o),e.requestFullscreen()):e.mozRequestFullScreen?(o&&(e.onmozfullscreenchange=o),e.mozRequestFullScreen()):e.webkitRequestFullscreen?(o&&(e.onwebkitfullscreenchange=o),e.webkitRequestFullscreen()):e.msRequestFullscreen&&(o&&(e.onmsfullscreenchange=o),e.msRequestFullscreen())}function ll(e,o=0){const n=["","k","m","b","t"],r=Math.floor(Math.log10(Math.abs(e))/3),l=Math.max(0,Math.min(r,n.length-1)),i=n[l];return i?(e/Math.pow(10,l*3)).toFixed(o)+i:(e/Math.pow(10,l*3)).toFixed(0)}const sl={Platform:{components:"组件库",iot:"智能效率监测平台",tdm:"智能刀具管理平台",qms:"智能质量检测平台",twin:"智能数字大屏平台",maintain:"智能设备维保平台",order:"智能工单平台"},Notice:{success:"操作成功",error:"操作失败,请稍后重试"},Common:{validDays:"报表文件具有七天有效期",add:"新增",edit:"编辑",apply:"保存",cancel:"取消",search:"查询",refresh:"刷新",filter:"筛选",reset:"重置",more:"更多",export:"导出",success:"成功",failed:"失败",processing:"处理中",action:"操作",back:"返回",title:"零捷互联智能云平台",message:{title:"消息列表",title2:"消息",unRead:"未读",all:"全部",read:"已读",readAll:"一键已读"},login:{mobile:"手机号",mobilePlaceholder:"请输入手机号码",mobileMessage:"请输入正确的手机号码",password:"密码",passwordPlaceholder:"请输入密码",passwordMessage:"请输入密码",userName:"用户名",userNamePlaceholder:"请输入用户名",userNameMessage:"请输入正确的用户名",in:"登录"},my:{title:"我的信息",tenantCode:"租户代码",tenantName:"租户名称",name:"名称",email:"邮箱",emailMessage:"邮箱格式不正确",realName:"真实姓名",phone:"手机",phoneMessage:"手机号码格式不正确",submit:"更新",password:"修改密码",oldPassword:"旧密码",newPassword:"新密码",checkPassword:"确认新密码",oldPasswordMessage:"请填写旧密码",newPasswordMessage:"请填写新密码",checkPasswordMessage:"请填写确认新密码"},dropdownMenu:{software:"零捷软件",android:"安卓APP",ios:"iOS APP",chrome:"Chrome浏览器",edge:"Edge浏览器",dashboard_IoT:"大屏机加工版本",dashboard_Prt:"大屏印刷版本",report:"个性化报表",info:"我的信息",logout:"退出"},importer:{title:"导入",file:"导入文件",download:"下载模版",btnDownload:"下载",fileName:"文件名称",status:"状态",createTime:"创建时间",retry:"重试"}}},cl={Platform:{components:"Components",iot:"SMART LEAN IOT PLATFORM",tdm:"SMART TOOL MANAGEMENT PLATFORM",qms:"SMART QUALITY MANAGEMENT PLATFORM",twin:"SMART DASHBOARD PLATFORM",maintain:"SMART MAINTAIN PLATFORM",order:"SMART ORDER PLATFORM"},Notice:{success:"Success",error:"An error occurred, please try again later"},Common:{validDays:"Files are valid for seven days",add:"Insert",edit:"Edit",apply:"Apply",cancel:"Cancel",search:"Search",refresh:"Refresh",filter:"Filter",reset:"Reset",more:"More",export:"Export",success:"Success",failed:"Failed",processing:"Processing",action:"Action",back:"Back",title:"Partex",message:{title:"Messages",title2:"Message",unRead:"Unread",all:"All",read:"Read",readAll:"Read All"},login:{mobile:"Mobile",mobilePlaceholder:"Please Input Mobile",mobileMessage:"Mobile is not correct",password:"Password",passwordPlaceholder:"Please Input Password",passwordMessage:"Please Input Password",userName:"UserName",userNamePlaceholder:"Please Input UserName",userNameMessage:"UserName is not correct",in:"Sign in"},my:{title:"Info",tenantCode:"TenantCode",tenantName:"TenantName",name:"Name",email:"Email",emailMessage:"Email is not correct",realName:"RealName",phone:"Mobile",phoneMessage:"Mobile is not correct",submit:"Apply",password:"Change Password",oldPassword:"Current",newPassword:"New",checkPassword:"Check",oldPasswordMessage:"Please Input Current Password",newPasswordMessage:"Please Input New Password",checkPasswordMessage:"Please Check New Password"},dropdownMenu:{software:"Software",android:"Android APP",ios:"iOS APP",chrome:"Chrome",edge:"Edge",dashboard:"Dashboard",dashboard_IoT:"Dashboard_IoT",dashboard_Prt:"Dashboard_Print",report:"Reports",info:"UserInfo",logout:"Logout"},importer:{title:"Import",file:"Import File",download:"Download Template",btnDownload:"Download",fileName:"FileName",status:"Status",createTime:"CreateTime",retry:"Retry"}}},ne=de.createI18n({legacy:!1,locale:"zh-CN",messages:{"en-US":{...cl},"zh-CN":{...sl},"fr-FR":{}}}),wo="2.0.25",No={Components:{platformName:()=>`${ne.global.t("Platform.components")} v${wo}`,platformType:"T0",platformUrl:"/",platformMainUrl:""},iot:{platformName:()=>ne.global.t("Platform.iot"),platformType:"T1",platformUrl:"/iot/home/all",platformMainUrl:""},tdm:{platformName:()=>ne.global.t("Platform.tdm"),platformType:"T2",platformUrl:"/tdm/home",platformMainUrl:"/iot/home/all"},qms:{platformName:()=>ne.global.t("Platform.qms"),platformType:"T3",platformUrl:"/qms/home",platformMainUrl:"/iot/home/all"},twin:{platformName:()=>ne.global.t("Platform.twin"),platformType:"T4",platformUrl:"/twin/home",platformMainUrl:"/prt/home/all"},maintain:{platformName:()=>ne.global.t("Platform.maintain"),platformType:"T5",platformUrl:"/maintain/home",platformMainUrl:"auto"},order:{platformName:()=>ne.global.t("Platform.order"),platformType:"T6",platformUrl:"/order/home",platformMainUrl:"/prt/home/all"}},L=t.reactive({needUpdate:!1,download:!1,theme:!1,isMobile:!1,language:!1,lang:"zh-CN",platformName:()=>ne.global.t("Platform.iot"),platformType:"T1",platformUrl:"/iot/home/all",platformMainUrl:""});function It(e){L.download=e}function il(e){L.language=e}function Ve(e){let o;e?o=e:L.lang==="zh-CN"?o="en-US":o="zh-CN",pe("lang",o,0),L.lang=o;const n=document.body;n.dataset.lang=o,ne.global.locale.value=o}function dl(e){const o=No[e]||No.iot;L.platformName=o.platformName,L.platformType=o.platformType,L.platformUrl=o.platformUrl,L.platformMainUrl=o.platformMainUrl||"auto",document.title=o.platformName()}function Ze(e){L.theme=e;const o=document.body,n=document.querySelector("meta[name=theme-color]");e?o.dataset.theme="dark":o.dataset.theme="",n&&(e?n.setAttribute("content","#2b2b2d"):n.setAttribute("content","#ffffff"))}function pl(e){L.needUpdate=e}const yo=()=>{L.isMobile=window.screen.availWidth<769};window.addEventListener("resize",yo),yo();const Xe=(e,o)=>t.h(u.NTooltip,{style:{"max-width":"300px"}},{trigger:()=>e,default:()=>o}),fe=(e,o="default",n,r,l)=>{const i={size:"small",type:o,text:!0,disabled:e.disabled||!1,loading:e.loading||!1},s={default:()=>e.buttonText||null};if(!e.confirmText){if(e.onClick&&typeof e.onClick=="string"){const c=e.onClick;i.onClick=()=>{new Function("rowData","rowIndex",c)(r,l)}}e.onClick&&typeof e.onClick=="function"&&(i.onClick=e.onClick.bind(void 0,r,l))}return n&&(s.icon=()=>t.h(u.NIcon,{},{default:()=>t.h(n,{},{default:()=>null})})),t.h(u.NButton,i,s)},Dt=(e,o,n,r)=>{const l={placement:"left"};if(typeof o.onClick=="string"){const i=o.onClick;l["on-positive-click"]=()=>{new Function("rowData","rowIndex",i)(n,r)}}else o.onClick&&(l["on-positive-click"]=o.onClick.bind(void 0,n,r));return t.h(u.NPopconfirm,l,{default:()=>t.h("span",{style:{"max-width":"300px"}},{default:()=>o.confirmText}),trigger:()=>e})},ul=(e,o,n)=>{let r;if(e.type==="detail"){const l=fe(e,e.color?e.color:"primary",e.icon?e.icon:Ke,o,n);e.buttonText?r=l:r=Xe(l,L.lang==="zh-CN"?"详情":"Detail")}if(e.type==="edit"){const l=fe(e,e.color?e.color:"success",e.icon?e.icon:bt,o,n);e.buttonText?r=l:r=Xe(l,L.lang==="zh-CN"?"编辑":"Edit")}if(e.type==="delete"){let l=fe({...e,onClick:""},e.color?e.color:"error",e.icon?e.icon:Ct,o,n);e.buttonText?l=l:l=Xe(l,L.lang==="zh-CN"?"删除":"Delete"),r=Dt(l,{...e,confirmText:L.lang==="zh-CN"?"删除后无法恢复,是否确认删除?":"Are you sure you want to delete ?"},o,n)}if(e.type==="custom"){const l=fe(e.confirmText?{...e,onClick:""}:e,e.color,e.icon,o,n);e.buttonText?r=l:r=Xe(l,e.tooltipText)}return e.confirmText&&(r=Dt(r,e,o,n)),r},fl=(e,o,n)=>{const r=[];return e.forEach(l=>{let i;l.type==="detail"&&(i=fe({...l,buttonText:L.lang==="zh-CN"?"详情":"Detail"},"primary",void 0,o,n)),l.type==="edit"&&(i=fe({...l,buttonText:L.lang==="zh-CN"?"编辑":"Edit"},"success",void 0,o,n)),l.type==="delete"&&(i=Dt(fe({...l,onClick:"",buttonText:L.lang==="zh-CN"?"删除":"Delete"},"error",void 0,o,n),{...l,confirmText:L.lang==="zh-CN"?"删除后无法恢复,是否确认删除?":"Are you sure you want to delete ?"},o,n)),l.type==="custom"?r.push(fe(l,l.color,void 0,o,n)):r.push(i)}),r},ge=(e,o,n)=>{const r=[];return e.forEach(l=>{if(l.type==="group"){if(l.children.length>0){const i=fl(l.children,o,n);r.push(t.h(u.NPopover,{trigger:"click"},{trigger:()=>fe({buttonText:l.buttonText,disabled:l.disabled,loading:l.loading},l.color,l.icon,o,n),default:()=>t.h(u.NFlex,{vertical:!0},{default:()=>i})}))}}else{const i=ul(l,o,n);r.push(i)}}),t.h("div",{class:"action-flex"},{default:()=>r})},ml=t.defineComponent({name:"OcAuth",setup(){const e=oe.useRoute(),o=oe.useRouter(),{auth:n}=e.query;n?pe("token",n,0):je("token"),o.replace(L.platformUrl)}}),hl={class:"com-card flex-center",style:{flex:"1"}},gl=[t.createElementVNode("p",{class:"oc-miss-title"},"登录中...",-1)];function wl(e,o,n,r,l,i){return t.openBlock(),t.createElementBlock("div",hl,gl)}const Co=A(ml,[["render",wl]]),Nl=t.defineComponent({name:"OcBack",components:{IconChevronLeft:ht,NButton:u.NButton,NIcon:u.NIcon},props:{to:{type:String,default:""}},setup(e){const o=oe.useRouter();return{back:()=>{e.to?o.push(e.to):o.back()}}}});function yl(e,o,n,r,l,i){const s=t.resolveComponent("IconChevronLeft"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton");return t.openBlock(),t.createBlock(d,{text:"",onClick:e.back},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(e.$t("Common.back")),1)]),_:1},8,["onClick"])}const bo=A(Nl,[["render",yl]]),Cl=t.defineComponent({name:"OcCircle",components:{NPopover:u.NPopover},props:{circle:{required:!0,type:Number,default:0},pointA:{type:Number,default:void 0},pointB:{type:Number,default:void 0},pointSize:{type:Number,default:3},styles:{type:Object,default:()=>({backgroundBg:"rgba(255, 255, 255, 0.1)",processBg:"#fff",pointABg:"#f2a651",pointBBg:"#67c67e"})}},setup(e){const o=t.ref({show:!1,text:"",x:0,y:0});return{popover:o,calculateCircle:()=>{let c=314-e.circle*Math.PI;return c<=0&&(c=0),`stroke-dashoffset: ${c}`},calculatePointA:()=>e.pointA?`rotate(${-90+e.pointA*3.6} 100 80) translate(50, 0)`:"",calculatePointB:()=>e.pointB?`rotate(${-90+e.pointB*3.6} 100 80) translate(50, 0)`:"",mouseOver:(c,d)=>{const m=d==="a"?e.pointA:e.pointB;o.value={show:!0,text:`${m}%`,x:c.clientX,y:c.clientY}},mouseOut:()=>{o.value.show=!1}}}}),bl={viewBox:"40 20 120 120"},_l=t.createElementVNode("defs",null,[t.createElementVNode("filter",{id:"blurs"},[t.createElementVNode("feOffset",{result:"offOut",in:"SourceGraphic",dx:"0",dy:"0"}),t.createElementVNode("feGaussianBlur",{result:"blurOut",in:"offOut",stdDeviation:"0.8"}),t.createElementVNode("feBlend",{in:"SourceGraphic",in2:"blurOut",mode:"normal"})])],-1),$l=["stroke"],kl=["stroke"],Vl=["r","transform","fill"],Sl=["r","transform","fill"],Tl={dx:"100",dy:"90",fill:"#333","text-anchor":"middle",style:{"font-size":"28px"}};function Bl(e,o,n,r,l,i){const s=t.resolveComponent("NPopover");return t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",bl,[_l,t.createElementVNode("circle",{transform:"rotate(-90 100 80)",cx:"100",cy:"80",r:"50",fill:"none","stroke-width":"10","stroke-dashoffset":"0",stroke:e.styles.backgroundBg},null,8,$l),t.createElementVNode("circle",{class:"oc-circle-round","stroke-linecap":"round",transform:"rotate(-90 100 80)",cx:"100",cy:"80",r:"50",fill:"none","stroke-width":"10",style:t.normalizeStyle(e.calculateCircle()),stroke:e.styles.processBg},null,12,kl),e.pointA?(t.openBlock(),t.createElementBlock("circle",{key:0,class:"oc-circle-round",filter:"url(#blurs)",cx:"100",cy:"80",r:e.pointSize,"stroke-width":"0",transform:e.calculatePointA(),fill:e.styles.pointABg,onMouseover:o[0]||(o[0]=c=>{e.mouseOver(c,"a")}),onMouseout:o[1]||(o[1]=(...c)=>e.mouseOut&&e.mouseOut(...c))},null,40,Vl)):t.createCommentVNode("",!0),e.pointB?(t.openBlock(),t.createElementBlock("circle",{key:1,class:"oc-circle-round",filter:"url(#blurs)",cx:"100",cy:"80",r:e.pointSize,"stroke-width":"0",transform:e.calculatePointB(),fill:e.styles.pointBBg,onMouseover:o[2]||(o[2]=c=>{e.mouseOver(c,"b")}),onMouseout:o[3]||(o[3]=(...c)=>e.mouseOut&&e.mouseOut(...c))},null,40,Sl)):t.createCommentVNode("",!0),t.createElementVNode("text",Tl,t.toDisplayString(e.circle)+"% ",1)])),t.createVNode(s,{show:e.popover.show,x:e.popover.x,y:e.popover.y,"show-arrow":!1,trigger:"manual"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.popover.text),1)]),_:1},8,["show","x","y"])],64)}const _o=A(Cl,[["render",Bl]]),me=oe.createRouter({history:oe.createWebHistory(),routes:[],scrollBehavior:()=>({left:0,top:0})}),Ot=document.querySelector("html");me.beforeEach(()=>{Ot==null||Ot.removeAttribute("style")});const Il=t.defineComponent({name:"OcError",components:{NButton:u.NButton},props:{type:{type:String,default:"404"}},setup(e){const o={404:{img:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/404.jpg",txt:"404",title:"404 页面走丢了",title2:"Something's missing."},500:{img:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/500.png",txt:"500",title:"服务暂时中断,请稍后重试.",title2:"Oops! No Internet connection found."}},n=t.ref({img:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/404.jpg",txt:"404",title:"404 页面走丢了",title2:"Something's missing."}),r=()=>{me.push(L.platformUrl)},l=t.ref();return t.onMounted(()=>{n.value=o[e.type],l.value=setInterval(()=>{me.push(L.platformUrl)},3e3)}),t.onBeforeUnmount(()=>{clearInterval(l.value)}),{goBack:r,content:n}}}),Dl={class:"com-card flex-center oc-error"},Ol=["src","alt"],Pl={class:"oc-miss-txt"},Al={class:"oc-miss-title"},Ml={class:"oc-miss-title2"};function El(e,o,n,r,l,i){const s=t.resolveComponent("NButton");return t.openBlock(),t.createElementBlock("div",Dl,[t.createElementVNode("img",{src:e.content.img,alt:e.content.txt,width:"360"},null,8,Ol),t.createElementVNode("div",Pl,t.toDisplayString(e.content.txt),1),t.createElementVNode("p",Al,t.toDisplayString(e.content.title),1),t.createElementVNode("p",Ml,t.toDisplayString(e.content.title2),1),t.createVNode(s,{tertiary:"",onClick:e.goBack},{default:t.withCtx(()=>[t.createTextVNode("返回首页")]),_:1},8,["onClick"])])}const $o=A(Il,[["render",El]]),jl=t.defineComponent({name:"OcFooter",props:{version:{type:String,default:""}}}),Fl={class:"oc-footer"},zl=t.createElementVNode("span",{style:{"font-family":"Arial, Helvetica, sans-serif"}},"©",-1),xl=t.createElementVNode("a",{href:"https://beian.miit.gov.cn/",target:"_blank",class:"oc-footer-record"}," 沪ICP备 18025935号-3 ",-1);function Ll(e,o,n,r,l,i){return t.openBlock(),t.createElementBlock("footer",Fl,[t.createTextVNode(" Copyright "),zl,t.createTextVNode(" 2020-2024 "+t.toDisplayString(e.$t("Common.title"))+" ",1),e.version?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("v"+t.toDisplayString(e.version)+" ",1)],64)):t.createCommentVNode("",!0),xl])}const ko=A(jl,[["render",Ll]]);function Rl(){this.__data__=[],this.size=0}var ql=Rl;function Gl(e,o){return e===o||e!==e&&o!==o}var Vo=Gl,Hl=Vo;function Ul(e,o){for(var n=e.length;n--;)if(Hl(e[n][0],o))return n;return-1}var ve=Ul,Kl=ve,Wl=Array.prototype,Jl=Wl.splice;function Yl(e){var o=this.__data__,n=Kl(o,e);if(n<0)return!1;var r=o.length-1;return n==r?o.pop():Jl.call(o,n,1),--this.size,!0}var Ql=Yl,Zl=ve;function Xl(e){var o=this.__data__,n=Zl(o,e);return n<0?void 0:o[n][1]}var vl=Xl,es=ve;function ts(e){return es(this.__data__,e)>-1}var os=ts,ns=ve;function as(e,o){var n=this.__data__,r=ns(n,e);return r<0?(++this.size,n.push([e,o])):n[r][1]=o,this}var rs=as,ls=ql,ss=Ql,cs=vl,is=os,ds=rs;function Se(e){var o=-1,n=e==null?0:e.length;for(this.clear();++o<n;){var r=e[o];this.set(r[0],r[1])}}Se.prototype.clear=ls,Se.prototype.delete=ss,Se.prototype.get=cs,Se.prototype.has=is,Se.prototype.set=ds;var et=Se,ps=et;function us(){this.__data__=new ps,this.size=0}var fs=us;function ms(e){var o=this.__data__,n=o.delete(e);return this.size=o.size,n}var hs=ms;function gs(e){return this.__data__.get(e)}var ws=gs;function Ns(e){return this.__data__.has(e)}var ys=Ns,Cs=typeof Ae=="object"&&Ae&&Ae.Object===Object&&Ae,So=Cs,bs=So,_s=typeof self=="object"&&self&&self.Object===Object&&self,$s=bs||_s||Function("return this")(),le=$s,ks=le,Vs=ks.Symbol,Pt=Vs,To=Pt,Bo=Object.prototype,Ss=Bo.hasOwnProperty,Ts=Bo.toString,Le=To?To.toStringTag:void 0;function Bs(e){var o=Ss.call(e,Le),n=e[Le];try{e[Le]=void 0;var r=!0}catch{}var l=Ts.call(e);return r&&(o?e[Le]=n:delete e[Le]),l}var Is=Bs,Ds=Object.prototype,Os=Ds.toString;function Ps(e){return Os.call(e)}var As=Ps,Io=Pt,Ms=Is,Es=As,js="[object Null]",Fs="[object Undefined]",Do=Io?Io.toStringTag:void 0;function zs(e){return e==null?e===void 0?Fs:js:Do&&Do in Object(e)?Ms(e):Es(e)}var Re=zs;function xs(e){var o=typeof e;return e!=null&&(o=="object"||o=="function")}var ye=xs,Ls=Re,Rs=ye,qs="[object AsyncFunction]",Gs="[object Function]",Hs="[object GeneratorFunction]",Us="[object Proxy]";function Ks(e){if(!Rs(e))return!1;var o=Ls(e);return o==Gs||o==Hs||o==qs||o==Us}var Oo=Ks,Ws=le,Js=Ws["__core-js_shared__"],Ys=Js,At=Ys,Po=function(){var e=/[^.]+$/.exec(At&&At.keys&&At.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Qs(e){return!!Po&&Po in e}var Zs=Qs,Xs=Function.prototype,vs=Xs.toString;function ec(e){if(e!=null){try{return vs.call(e)}catch{}try{return e+""}catch{}}return""}var Ao=ec,tc=Oo,oc=Zs,nc=ye,ac=Ao,rc=/[\\^$.*+?()[\]{}|]/g,lc=/^\[object .+?Constructor\]$/,sc=Function.prototype,cc=Object.prototype,ic=sc.toString,dc=cc.hasOwnProperty,pc=RegExp("^"+ic.call(dc).replace(rc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function uc(e){if(!nc(e)||oc(e))return!1;var o=tc(e)?pc:lc;return o.test(ac(e))}var fc=uc;function mc(e,o){return e==null?void 0:e[o]}var hc=mc,gc=fc,wc=hc;function Nc(e,o){var n=wc(e,o);return gc(n)?n:void 0}var Ce=Nc,yc=Ce,Cc=le,bc=yc(Cc,"Map"),Mt=bc,_c=Ce,$c=_c(Object,"create"),tt=$c,Mo=tt;function kc(){this.__data__=Mo?Mo(null):{},this.size=0}var Vc=kc;function Sc(e){var o=this.has(e)&&delete this.__data__[e];return this.size-=o?1:0,o}var Tc=Sc,Bc=tt,Ic="__lodash_hash_undefined__",Dc=Object.prototype,Oc=Dc.hasOwnProperty;function Pc(e){var o=this.__data__;if(Bc){var n=o[e];return n===Ic?void 0:n}return Oc.call(o,e)?o[e]:void 0}var Ac=Pc,Mc=tt,Ec=Object.prototype,jc=Ec.hasOwnProperty;function Fc(e){var o=this.__data__;return Mc?o[e]!==void 0:jc.call(o,e)}var zc=Fc,xc=tt,Lc="__lodash_hash_undefined__";function Rc(e,o){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=xc&&o===void 0?Lc:o,this}var qc=Rc,Gc=Vc,Hc=Tc,Uc=Ac,Kc=zc,Wc=qc;function Te(e){var o=-1,n=e==null?0:e.length;for(this.clear();++o<n;){var r=e[o];this.set(r[0],r[1])}}Te.prototype.clear=Gc,Te.prototype.delete=Hc,Te.prototype.get=Uc,Te.prototype.has=Kc,Te.prototype.set=Wc;var Jc=Te,Eo=Jc,Yc=et,Qc=Mt;function Zc(){this.size=0,this.__data__={hash:new Eo,map:new(Qc||Yc),string:new Eo}}var Xc=Zc;function vc(e){var o=typeof e;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?e!=="__proto__":e===null}var ei=vc,ti=ei;function oi(e,o){var n=e.__data__;return ti(o)?n[typeof o=="string"?"string":"hash"]:n.map}var ot=oi,ni=ot;function ai(e){var o=ni(this,e).delete(e);return this.size-=o?1:0,o}var ri=ai,li=ot;function si(e){return li(this,e).get(e)}var ci=si,ii=ot;function di(e){return ii(this,e).has(e)}var pi=di,ui=ot;function fi(e,o){var n=ui(this,e),r=n.size;return n.set(e,o),this.size+=n.size==r?0:1,this}var mi=fi,hi=Xc,gi=ri,wi=ci,Ni=pi,yi=mi;function Be(e){var o=-1,n=e==null?0:e.length;for(this.clear();++o<n;){var r=e[o];this.set(r[0],r[1])}}Be.prototype.clear=hi,Be.prototype.delete=gi,Be.prototype.get=wi,Be.prototype.has=Ni,Be.prototype.set=yi;var Ci=Be,bi=et,_i=Mt,$i=Ci,ki=200;function Vi(e,o){var n=this.__data__;if(n instanceof bi){var r=n.__data__;if(!_i||r.length<ki-1)return r.push([e,o]),this.size=++n.size,this;n=this.__data__=new $i(r)}return n.set(e,o),this.size=n.size,this}var Si=Vi,Ti=et,Bi=fs,Ii=hs,Di=ws,Oi=ys,Pi=Si;function Ie(e){var o=this.__data__=new Ti(e);this.size=o.size}Ie.prototype.clear=Bi,Ie.prototype.delete=Ii,Ie.prototype.get=Di,Ie.prototype.has=Oi,Ie.prototype.set=Pi;var Ai=Ie;function Mi(e,o){for(var n=-1,r=e==null?0:e.length;++n<r&&o(e[n],n,e)!==!1;);return e}var Ei=Mi,ji=Ce,Fi=function(){try{var e=ji(Object,"defineProperty");return e({},"",{}),e}catch{}}(),zi=Fi,jo=zi;function xi(e,o,n){o=="__proto__"&&jo?jo(e,o,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[o]=n}var Fo=xi,Li=Fo,Ri=Vo,qi=Object.prototype,Gi=qi.hasOwnProperty;function Hi(e,o,n){var r=e[o];(!(Gi.call(e,o)&&Ri(r,n))||n===void 0&&!(o in e))&&Li(e,o,n)}var zo=Hi,Ui=zo,Ki=Fo;function Wi(e,o,n,r){var l=!n;n||(n={});for(var i=-1,s=o.length;++i<s;){var c=o[i],d=r?r(n[c],e[c],c,n,e):void 0;d===void 0&&(d=e[c]),l?Ki(n,c,d):Ui(n,c,d)}return n}var nt=Wi;function Ji(e,o){for(var n=-1,r=Array(e);++n<e;)r[n]=o(n);return r}var Yi=Ji;function Qi(e){return e!=null&&typeof e=="object"}var De=Qi,Zi=Re,Xi=De,vi="[object Arguments]";function ed(e){return Xi(e)&&Zi(e)==vi}var td=ed,xo=td,od=De,Lo=Object.prototype,nd=Lo.hasOwnProperty,ad=Lo.propertyIsEnumerable,rd=xo(function(){return arguments}())?xo:function(e){return od(e)&&nd.call(e,"callee")&&!ad.call(e,"callee")},ld=rd,sd=Array.isArray,Et=sd,at={exports:{}};function cd(){return!1}var id=cd;at.exports,function(e,o){var n=le,r=id,l=o&&!o.nodeType&&o,i=l&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===l,c=s?n.Buffer:void 0,d=c?c.isBuffer:void 0,m=d||r;e.exports=m}(at,at.exports);var Ro=at.exports,dd=9007199254740991,pd=/^(?:0|[1-9]\d*)$/;function ud(e,o){var n=typeof e;return o=o??dd,!!o&&(n=="number"||n!="symbol"&&pd.test(e))&&e>-1&&e%1==0&&e<o}var fd=ud,md=9007199254740991;function hd(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=md}var qo=hd,gd=Re,wd=qo,Nd=De,yd="[object Arguments]",Cd="[object Array]",bd="[object Boolean]",_d="[object Date]",$d="[object Error]",kd="[object Function]",Vd="[object Map]",Sd="[object Number]",Td="[object Object]",Bd="[object RegExp]",Id="[object Set]",Dd="[object String]",Od="[object WeakMap]",Pd="[object ArrayBuffer]",Ad="[object DataView]",Md="[object Float32Array]",Ed="[object Float64Array]",jd="[object Int8Array]",Fd="[object Int16Array]",zd="[object Int32Array]",xd="[object Uint8Array]",Ld="[object Uint8ClampedArray]",Rd="[object Uint16Array]",qd="[object Uint32Array]",W={};W[Md]=W[Ed]=W[jd]=W[Fd]=W[zd]=W[xd]=W[Ld]=W[Rd]=W[qd]=!0,W[yd]=W[Cd]=W[Pd]=W[bd]=W[Ad]=W[_d]=W[$d]=W[kd]=W[Vd]=W[Sd]=W[Td]=W[Bd]=W[Id]=W[Dd]=W[Od]=!1;function Gd(e){return Nd(e)&&wd(e.length)&&!!W[gd(e)]}var Hd=Gd;function Ud(e){return function(o){return e(o)}}var jt=Ud,rt={exports:{}};rt.exports,function(e,o){var n=So,r=o&&!o.nodeType&&o,l=r&&!0&&e&&!e.nodeType&&e,i=l&&l.exports===r,s=i&&n.process,c=function(){try{var d=l&&l.require&&l.require("util").types;return d||s&&s.binding&&s.binding("util")}catch{}}();e.exports=c}(rt,rt.exports);var Ft=rt.exports,Kd=Hd,Wd=jt,Go=Ft,Ho=Go&&Go.isTypedArray,Jd=Ho?Wd(Ho):Kd,Yd=Jd,Qd=Yi,Zd=ld,Xd=Et,vd=Ro,ep=fd,tp=Yd,op=Object.prototype,np=op.hasOwnProperty;function ap(e,o){var n=Xd(e),r=!n&&Zd(e),l=!n&&!r&&vd(e),i=!n&&!r&&!l&&tp(e),s=n||r||l||i,c=s?Qd(e.length,String):[],d=c.length;for(var m in e)(o||np.call(e,m))&&!(s&&(m=="length"||l&&(m=="offset"||m=="parent")||i&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||ep(m,d)))&&c.push(m);return c}var Uo=ap,rp=Object.prototype;function lp(e){var o=e&&e.constructor,n=typeof o=="function"&&o.prototype||rp;return e===n}var zt=lp;function sp(e,o){return function(n){return e(o(n))}}var Ko=sp,cp=Ko,ip=cp(Object.keys,Object),dp=ip,pp=zt,up=dp,fp=Object.prototype,mp=fp.hasOwnProperty;function hp(e){if(!pp(e))return up(e);var o=[];for(var n in Object(e))mp.call(e,n)&&n!="constructor"&&o.push(n);return o}var gp=hp,wp=Oo,Np=qo;function yp(e){return e!=null&&Np(e.length)&&!wp(e)}var Wo=yp,Cp=Uo,bp=gp,_p=Wo;function $p(e){return _p(e)?Cp(e):bp(e)}var xt=$p,kp=nt,Vp=xt;function Sp(e,o){return e&&kp(o,Vp(o),e)}var Tp=Sp;function Bp(e){var o=[];if(e!=null)for(var n in Object(e))o.push(n);return o}var Ip=Bp,Dp=ye,Op=zt,Pp=Ip,Ap=Object.prototype,Mp=Ap.hasOwnProperty;function Ep(e){if(!Dp(e))return Pp(e);var o=Op(e),n=[];for(var r in e)r=="constructor"&&(o||!Mp.call(e,r))||n.push(r);return n}var jp=Ep,Fp=Uo,zp=jp,xp=Wo;function Lp(e){return xp(e)?Fp(e,!0):zp(e)}var Lt=Lp,Rp=nt,qp=Lt;function Gp(e,o){return e&&Rp(o,qp(o),e)}var Hp=Gp,lt={exports:{}};lt.exports,function(e,o){var n=le,r=o&&!o.nodeType&&o,l=r&&!0&&e&&!e.nodeType&&e,i=l&&l.exports===r,s=i?n.Buffer:void 0,c=s?s.allocUnsafe:void 0;function d(m,g){if(g)return m.slice();var f=m.length,h=c?c(f):new m.constructor(f);return m.copy(h),h}e.exports=d}(lt,lt.exports);var Up=lt.exports;function Kp(e,o){var n=-1,r=e.length;for(o||(o=Array(r));++n<r;)o[n]=e[n];return o}var Wp=Kp;function Jp(e,o){for(var n=-1,r=e==null?0:e.length,l=0,i=[];++n<r;){var s=e[n];o(s,n,e)&&(i[l++]=s)}return i}var Yp=Jp;function Qp(){return[]}var Jo=Qp,Zp=Yp,Xp=Jo,vp=Object.prototype,eu=vp.propertyIsEnumerable,Yo=Object.getOwnPropertySymbols,tu=Yo?function(e){return e==null?[]:(e=Object(e),Zp(Yo(e),function(o){return eu.call(e,o)}))}:Xp,Rt=tu,ou=nt,nu=Rt;function au(e,o){return ou(e,nu(e),o)}var ru=au;function lu(e,o){for(var n=-1,r=o.length,l=e.length;++n<r;)e[l+n]=o[n];return e}var Qo=lu,su=Ko,cu=su(Object.getPrototypeOf,Object),Zo=cu,iu=Qo,du=Zo,pu=Rt,uu=Jo,fu=Object.getOwnPropertySymbols,mu=fu?function(e){for(var o=[];e;)iu(o,pu(e)),e=du(e);return o}:uu,Xo=mu,hu=nt,gu=Xo;function wu(e,o){return hu(e,gu(e),o)}var Nu=wu,yu=Qo,Cu=Et;function bu(e,o,n){var r=o(e);return Cu(e)?r:yu(r,n(e))}var vo=bu,_u=vo,$u=Rt,ku=xt;function Vu(e){return _u(e,ku,$u)}var Su=Vu,Tu=vo,Bu=Xo,Iu=Lt;function Du(e){return Tu(e,Iu,Bu)}var Ou=Du,Pu=Ce,Au=le,Mu=Pu(Au,"DataView"),Eu=Mu,ju=Ce,Fu=le,zu=ju(Fu,"Promise"),xu=zu,Lu=Ce,Ru=le,qu=Lu(Ru,"Set"),Gu=qu,Hu=Ce,Uu=le,Ku=Hu(Uu,"WeakMap"),Wu=Ku,qt=Eu,Gt=Mt,Ht=xu,Ut=Gu,Kt=Wu,en=Re,Oe=Ao,tn="[object Map]",Ju="[object Object]",on="[object Promise]",nn="[object Set]",an="[object WeakMap]",rn="[object DataView]",Yu=Oe(qt),Qu=Oe(Gt),Zu=Oe(Ht),Xu=Oe(Ut),vu=Oe(Kt),be=en;(qt&&be(new qt(new ArrayBuffer(1)))!=rn||Gt&&be(new Gt)!=tn||Ht&&be(Ht.resolve())!=on||Ut&&be(new Ut)!=nn||Kt&&be(new Kt)!=an)&&(be=function(e){var o=en(e),n=o==Ju?e.constructor:void 0,r=n?Oe(n):"";if(r)switch(r){case Yu:return rn;case Qu:return tn;case Zu:return on;case Xu:return nn;case vu:return an}return o});var Wt=be,ef=Object.prototype,tf=ef.hasOwnProperty;function of(e){var o=e.length,n=new e.constructor(o);return o&&typeof e[0]=="string"&&tf.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var nf=of,af=le,rf=af.Uint8Array,lf=rf,ln=lf;function sf(e){var o=new e.constructor(e.byteLength);return new ln(o).set(new ln(e)),o}var Jt=sf,cf=Jt;function df(e,o){var n=o?cf(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var pf=df,uf=/\w*$/;function ff(e){var o=new e.constructor(e.source,uf.exec(e));return o.lastIndex=e.lastIndex,o}var mf=ff,sn=Pt,cn=sn?sn.prototype:void 0,dn=cn?cn.valueOf:void 0;function hf(e){return dn?Object(dn.call(e)):{}}var gf=hf,wf=Jt;function Nf(e,o){var n=o?wf(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var yf=Nf,Cf=Jt,bf=pf,_f=mf,$f=gf,kf=yf,Vf="[object Boolean]",Sf="[object Date]",Tf="[object Map]",Bf="[object Number]",If="[object RegExp]",Df="[object Set]",Of="[object String]",Pf="[object Symbol]",Af="[object ArrayBuffer]",Mf="[object DataView]",Ef="[object Float32Array]",jf="[object Float64Array]",Ff="[object Int8Array]",zf="[object Int16Array]",xf="[object Int32Array]",Lf="[object Uint8Array]",Rf="[object Uint8ClampedArray]",qf="[object Uint16Array]",Gf="[object Uint32Array]";function Hf(e,o,n){var r=e.constructor;switch(o){case Af:return Cf(e);case Vf:case Sf:return new r(+e);case Mf:return bf(e,n);case Ef:case jf:case Ff:case zf:case xf:case Lf:case Rf:case qf:case Gf:return kf(e,n);case Tf:return new r;case Bf:case Of:return new r(e);case If:return _f(e);case Df:return new r;case Pf:return $f(e)}}var Uf=Hf,Kf=ye,pn=Object.create,Wf=function(){function e(){}return function(o){if(!Kf(o))return{};if(pn)return pn(o);e.prototype=o;var n=new e;return e.prototype=void 0,n}}(),Jf=Wf,Yf=Jf,Qf=Zo,Zf=zt;function Xf(e){return typeof e.constructor=="function"&&!Zf(e)?Yf(Qf(e)):{}}var vf=Xf,em=Wt,tm=De,om="[object Map]";function nm(e){return tm(e)&&em(e)==om}var am=nm,rm=am,lm=jt,un=Ft,fn=un&&un.isMap,sm=fn?lm(fn):rm,cm=sm,im=Wt,dm=De,pm="[object Set]";function um(e){return dm(e)&&im(e)==pm}var fm=um,mm=fm,hm=jt,mn=Ft,hn=mn&&mn.isSet,gm=hn?hm(hn):mm,wm=gm,Nm=Ai,ym=Ei,Cm=zo,bm=Tp,_m=Hp,$m=Up,km=Wp,Vm=ru,Sm=Nu,Tm=Su,Bm=Ou,Im=Wt,Dm=nf,Om=Uf,Pm=vf,Am=Et,Mm=Ro,Em=cm,jm=ye,Fm=wm,zm=xt,xm=Lt,Lm=1,Rm=2,qm=4,gn="[object Arguments]",Gm="[object Array]",Hm="[object Boolean]",Um="[object Date]",Km="[object Error]",wn="[object Function]",Wm="[object GeneratorFunction]",Jm="[object Map]",Ym="[object Number]",Nn="[object Object]",Qm="[object RegExp]",Zm="[object Set]",Xm="[object String]",vm="[object Symbol]",eh="[object WeakMap]",th="[object ArrayBuffer]",oh="[object DataView]",nh="[object Float32Array]",ah="[object Float64Array]",rh="[object Int8Array]",lh="[object Int16Array]",sh="[object Int32Array]",ch="[object Uint8Array]",ih="[object Uint8ClampedArray]",dh="[object Uint16Array]",ph="[object Uint32Array]",U={};U[gn]=U[Gm]=U[th]=U[oh]=U[Hm]=U[Um]=U[nh]=U[ah]=U[rh]=U[lh]=U[sh]=U[Jm]=U[Ym]=U[Nn]=U[Qm]=U[Zm]=U[Xm]=U[vm]=U[ch]=U[ih]=U[dh]=U[ph]=!0,U[Km]=U[wn]=U[eh]=!1;function st(e,o,n,r,l,i){var s,c=o&Lm,d=o&Rm,m=o&qm;if(n&&(s=l?n(e,r,l,i):n(e)),s!==void 0)return s;if(!jm(e))return e;var g=Am(e);if(g){if(s=Dm(e),!c)return km(e,s)}else{var f=Im(e),h=f==wn||f==Wm;if(Mm(e))return $m(e,c);if(f==Nn||f==gn||h&&!l){if(s=d||h?{}:Pm(e),!c)return d?Sm(e,_m(s,e)):Vm(e,bm(s,e))}else{if(!U[f])return l?e:{};s=Om(e,f,c)}}i||(i=new Nm);var w=i.get(e);if(w)return w;i.set(e,s),Fm(e)?e.forEach(function(y){s.add(st(y,o,n,y,e,i))}):Em(e)&&e.forEach(function(y,I){s.set(I,st(y,o,n,I,e,i))});var S=m?d?Bm:Tm:d?xm:zm,T=g?void 0:S(e);return ym(T||e,function(y,I){T&&(I=y,y=e[I]),Cm(s,I,st(y,o,n,I,e,i))}),s}var uh=st,fh=uh,mh=1,hh=4;function gh(e){return fh(e,mh|hh)}var wh=gh;const ae=ut(wh),Nh=t.defineComponent({name:"OcForm",components:{NIcon:u.NIcon,NGrid:u.NGrid,NForm:u.NForm,NFormItemGi:u.NFormItemGi,NButton:u.NButton,NInput:u.NInput,NSelect:u.NSelect,NInputNumber:u.NInputNumber,NDatePicker:u.NDatePicker,NTimePicker:u.NTimePicker,NSwitch:u.NSwitch,NUpload:u.NUpload,NUploadDragger:u.NUploadDragger,IconMailInboxAdd:Ee},props:{items:{required:!0,type:Array,default:()=>[]},data:{required:!0,type:Object,default:()=>({})},edit:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},labelWidth:{type:[String,Number],default:"auto"},labelAlign:{type:String,default:"left"},labelPlacement:{type:String,default:"top"}},setup(e,{expose:o}){const n=t.ref(),r=t.ref({}),l=t.ref([]),i=h=>!(e.edit&&h.edit&&!h.edit.show),s=()=>{const h=ae(e.items);h.forEach(w=>{if(w.rule&&w.rule.validator&&typeof w.rule.validator=="string"){const S=w.rule.validator,T=new Function("rule","value",S);w.rule.validator=(y,I)=>T(y,I)}}),l.value=h},c=(h,w)=>{if(h.updateValue){const S=ae(r.value);if(typeof h.updateValue=="string"){const T=h.updateValue;new Function("value","formValue",T)(w,S)}else h.updateValue(w,S)}},d=(h,w)=>new Promise((S,T)=>{h.file.file&&(r.value[w]=h.file.file,S()),T()}),m=(h,w)=>{h.length===0&&(r.value[w]="")},g=()=>new Promise((h,w)=>{var S;(S=n.value)==null||S.validate(T=>{T?w():h(ae(r.value))})}),f=()=>{var h;(h=n.value)==null||h.restoreValidation()};return t.onMounted(()=>{r.value=ae(e.data),s()}),o({validate:g,restoreValidation:f}),t.watch(()=>e.items,()=>{s()},{deep:!0}),t.watch(()=>e.data,h=>{r.value=ae(h)},{deep:!0}),{formRef:n,formValue:r,formItems:l,cloneDeep:ae,updateValue:c,beforeUpload:d,uploadChange:m,elementShow:i}}}),yh=t.createElementVNode("br",null,null,-1),Ch=t.createElementVNode("p",null,"点击或者拖动文件到该区域来上传",-1),bh=t.createElementVNode("p",null," 请不要上传敏感数据,比如你的银行卡号和密码,信用卡号有效期和安全码 ",-1);function _h(e,o,n,r,l,i){const s=t.resolveComponent("NInput"),c=t.resolveComponent("NInputNumber"),d=t.resolveComponent("NDatePicker"),m=t.resolveComponent("NSelect"),g=t.resolveComponent("NTimePicker"),f=t.resolveComponent("NSwitch"),h=t.resolveComponent("IconMailInboxAdd"),w=t.resolveComponent("NIcon"),S=t.resolveComponent("NUploadDragger"),T=t.resolveComponent("NUpload"),y=t.resolveComponent("NFormItemGi"),I=t.resolveComponent("NGrid"),j=t.resolveComponent("NForm");return t.openBlock(),t.createBlock(j,{ref:"formRef",model:e.formValue,disabled:e.disabled,inline:e.inline,labelWidth:e.labelWidth,labelAlign:e.labelAlign,labelPlacement:e.labelPlacement},{default:t.withCtx(()=>[t.createVNode(I,{cols:12,"x-gap":8},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.formItems,p=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:p.key},[e.elementShow(p)?(t.openBlock(),t.createBlock(y,{key:0,span:p.span||6,label:p.label,path:p.key,rule:p.rule},{default:t.withCtx(()=>[p.input==="input"?(t.openBlock(),t.createBlock(s,{key:0,value:e.formValue[p.key],"onUpdate:value":D=>e.formValue[p.key]=D,type:p.type,placeholder:p.placeholder,disabled:e.edit&&p.edit?p.edit.disabled:p.disabled,readonly:e.edit&&p.edit?p.edit.readonly:p.readonly,clearable:p.clearable,minlength:p.minlength,maxlength:p.maxlength,rows:p.rows,"show-count":!!p.maxlength,"on-update:value":D=>{e.formValue[p.key]=D,e.updateValue(p,D)}},null,8,["value","onUpdate:value","type","placeholder","disabled","readonly","clearable","minlength","maxlength","rows","show-count","on-update:value"])):t.createCommentVNode("",!0),p.input==="number"?(t.openBlock(),t.createBlock(c,{key:1,value:e.formValue[p.key],"onUpdate:value":D=>e.formValue[p.key]=D,placeholder:p.placeholder,disabled:e.edit&&p.edit?p.edit.disabled:p.disabled,readonly:e.edit&&p.edit?p.edit.readonly:p.readonly,clearable:p.clearable,min:p.min,max:p.max,step:p.step,showButton:p.showButton,"on-update:value":D=>{e.formValue[p.key]=D,e.updateValue(p,D)}},null,8,["value","onUpdate:value","placeholder","disabled","readonly","clearable","min","max","step","showButton","on-update:value"])):t.createCommentVNode("",!0),p.input==="date"?(t.openBlock(),t.createBlock(d,{key:2,value:e.formValue[p.key],"onUpdate:value":D=>e.formValue[p.key]=D,type:p.type,placeholder:p.placeholder,disabled:e.edit&&p.edit?p.edit.disabled:p.disabled,"input-readonly":e.edit&&p.edit?p.edit.readonly:p.readonly,clearable:p.clearable,"close-on-select":"","on-update:value":D=>{e.formValue[p.key]=D,e.updateValue(p,D)}},null,8,["value","onUpdate:value","type","placeholder","disabled","input-readonly","clearable","on-update:value"])):t.createCommentVNode("",!0),p.input==="select"?(t.openBlock(),t.createBlock(m,{key:3,value:e.formValue[p.key],"onUpdate:value":D=>e.formValue[p.key]=D,placeholder:p.placeholder,options:p.options,disabled:e.edit&&p.edit?p.edit.disabled:p.disabled,readonly:e.edit&&p.edit?p.edit.readonly:p.readonly,clearable:p.clearable,filterable:p.filterable,multiple:p.multiple,maxTagCount:p.maxTagCount,"on-update:value":D=>{e.formValue[p.key]=D,e.updateValue(p,D)}},null,8,["value","onUpdate:value","placeholder","options","disabled","readonly","clearable","filterable","multiple","maxTagCount","on-update:value"])):t.createCommentVNode("",!0),p.input==="time"?(t.openBlock(),t.createBlock(g,{key:4,value:e.formValue[p.key],"onUpdate:value":D=>e.formValue[p.key]=D,placeholder:p.placeholder,disabled:e.edit&&p.edit?p.edit.disabled:p.disabled,readonly:e.edit&&p.edit?p.edit.readonly:p.readonly,clearable:p.clearable,"on-update:value":D=>{e.formValue[p.key]=D,e.updateValue(p,D)}},null,8,["value","onUpdate:value","placeholder","disabled","readonly","clearable","on-update:value"])):t.createCommentVNode("",!0),p.input==="switch"?(t.openBlock(),t.createBlock(f,{key:5,value:e.formValue[p.key],"onUpdate:value":D=>e.formValue[p.key]=D,disabled:e.edit&&p.edit?p.edit.disabled:p.disabled,size:"large","on-update:value":D=>{e.formValue[p.key]=D,e.updateValue(p,D)}},null,8,["value","onUpdate:value","disabled","on-update:value"])):t.createCommentVNode("",!0),p.input==="upload"?(t.openBlock(),t.createBlock(T,{key:6,"default-file-list":e.formValue[p.key]?[{id:"1",name:"File",status:"finished",url:e.formValue[p.key]}]:void 0,"on-before-upload":D=>{e.beforeUpload(D,p.key)},accept:p.accept,disabled:e.edit&&p.edit?p.edit.disabled:p.disabled,max:p.max,"on-update:file-list":D=>{e.uploadChange(D,p.key)},"directory-dnd":""},{default:t.withCtx(()=>[t.withDirectives(t.createVNode(S,null,{default:t.withCtx(()=>[t.createVNode(w,{size:"32"},{default:t.withCtx(()=>[t.createVNode(h)]),_:1}),yh,Ch,bh]),_:2},1536),[[t.vShow,!e.formValue[p.key]]])]),_:2},1032,["default-file-list","on-before-upload","accept","disabled","max","on-update:file-list"])):t.createCommentVNode("",!0)]),_:2},1032,["span","label","path","rule"])):t.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1},8,["model","disabled","inline","labelWidth","labelAlign","labelPlacement"])}const yn=A(Nh,[["render",_h]]),$h=Object.prototype.hasOwnProperty;function Cn(e,o){const n=[];for(const r in e){if(!$h.call(e,r))continue;const l=e[r],i=encodeURIComponent(r);let s;typeof l=="object"?s=Cn(l,o?o+"["+i+"]":i):s=(o?o+"["+i+"]":i)+"="+encodeURIComponent(l),n.push(s)}return n.join("&")}const{notification:Yt}=u.createDiscreteApi(["notification"],{configProviderProps:{themeOverrides:{common:{borderRadius:"16px",borderRadiusSmall:"8px",primaryColor:"#8e54c8",primaryColorHover:"#9b66d0",primaryColorPressed:"#8e54c8",primaryColorSuppl:"#8e54c8",infoColor:"#2080f0",infoColorHover:"#57a4fd",infoColorPressed:"#2080f0",infoColorSuppl:"#2080f0",successColor:"#5dae57",successColorHover:"#70ce69",successColorPressed:"#5dae57",successColorSuppl:"#5dae57",warningColor:"#f0973a",warningColorHover:"#ffb05d",warningColorPressed:"#f0973a",warningColorSuppl:"#f0973a",errorColor:"#e65444",errorColorHover:"#fc6c5d",errorColorPressed:"#e65444",errorColorSuppl:"#e65444",cardColor:"#fff"},Button:{textColor:"rgb(var(--font))"},Notification:{borderRadius:"16px"}}},notificationProviderProps:{placement:"top"}}),Pe=pt.create({timeout:3e5,responseType:"json",headers:{platformType:"T1"}});let Qt=pt.CancelToken.source();Pe.interceptors.request.use(e=>{var n;e.cancelToken=Qt.token;const o=re("token",!1);if(e.headers&&o&&(e.headers["X-Auth-Token"]=o),((n=e.method)==null?void 0:n.toLocaleUpperCase())==="GET"){const r=Cn(e.data);r&&(e.url=`${e.url}?${r}`)}return e},e=>Promise.reject(e)),Pe.interceptors.response.use(e=>{const o=e.data;if(e.config.responseType==="blob"||e.config.responseType==="text")return Promise.resolve(e.data);if(o.ok)return Promise.resolve(o.data);{let n=o.message;return(n.indexOf("Connection refused")>-1||n.indexOf("finishConnect")>-1)&&(n="网络错误,请稍后重试"),Yt.error({content:n,duration:3e3}),Promise.reject(n)}},e=>{if(e&&e.code==="ECONNABORTED"&&e.config&&e.config.url&&e.config.url.indexOf("auth/user/getCurrentUserInfo")>-1&&(go(),me.replace("/custom/500")),e&&e.response)switch(e.response.status){case 401:case 403:je("token"),window.location.href="/login";break;default:return Yt.destroyAll(),Yt.error({content:"系统正在维护中,请稍后再试!",duration:3e3}),Promise.reject()}else return Promise.reject()});const kh=()=>{Qt.cancel(),Qt=pt.CancelToken.source()},Zt="/apiserver/",bn=(e,o,n="json")=>Pe({url:`${Zt}${e}`,method:"GET",data:o,responseType:n}),ee=(e,o={},n="json",r=3e5)=>Pe({url:`${Zt}${e}`,method:"POST",data:o,responseType:n,timeout:r}),Vh=e=>Pe(e),Xt=(e,o)=>Pe({headers:{"Content-Type":"multipart/form-data"},url:`${Zt}${e}`,method:"POST",data:o}),_n=e=>{const o=JSON.parse(JSON.stringify(e));return o.password=qe(o.password),ee("api/user/v2/login",o)},Sh=()=>new Promise((e,o)=>{ee("api/auth/user/getCurrentUserInfo",{},"json",1e4).then(n=>{const r=["046459"];n.commissioner=!1,r.includes(String(n.tenantLoginCode))&&(n.commissioner=!0);const l=n.ownedProducts?JSON.parse(n.ownedProducts):[];switch(l.includes(2)?n.platform_tdm=!0:n.platform_tdm=!1,l.includes(3)?n.platform_qms=!0:n.platform_qms=!1,l.includes(4)?n.platform_twin=!0:n.platform_twin=!1,l.includes(5)?n.platform_maintain=!0:n.platform_maintain=!1,l.includes(6)?n.platform_simple_tdm=!0:n.platform_simple_tdm=!1,n.systemType){case"Premium":n.systemType=1;break;case"Flagship":n.systemType=2;break;default:n.systemType=0;break}n.info=JSON.parse(n.info),e(n)}).catch(()=>{o()})}),Th=()=>ee("api/auth/user/logout"),Bh=()=>ee("api/manager/message/markReadAll"),Ih=()=>ee("api/auth/user/updateTenantRenewalStatus"),Dh=e=>ee("api/manager/job/remove",e),Oh=e=>ee("api/manager/job/retry",{jobId:e}),Ph=e=>new Promise((o,n)=>{const r=ze(e);ee("api/manager/job/page",r).then(l=>{const i=Fe(l);o(i)}).catch(()=>{n()})}),vt=e=>new Promise((o,n)=>{const r=new FormData;r.append("jobType","EXPORT"),Object.keys(e).forEach(l=>{e.query&&l==="query"?r.append("query",JSON.stringify(e.query)):r.append(l,e[l])}),Xt("api/manager/job/submit",r).then(()=>{It(!0),o()}).catch(l=>{n(l)})}),Ah=e=>new Promise((o,n)=>{const r=ze(e);r.status===-1&&(r.status=""),ee("api/manager/message/messagePage",r).then(l=>{const i=Fe(l);o({data:i,unRead:l.unRead})}).catch(()=>{n()})}),Mh=e=>ee("api/manager/message/markRead",{messageId:e});let $n=!0;const _=t.reactive({commissioner:!1,factoryId:"",tenantLoginCode:"",thirdUserId:"",userId:"",email:"",name:"",realName:"",phone:"",description:"",tenantName:"",oeeStatus:0,ncFlg:0,info:{type:0,id:"",viewType:1,interval:5,theme:"light"},kind:0,systemType:0,password:"",enable:!0,platform_tdm:!1,platform_qms:!1,platform_twin:!1,platform_maintain:!1,platform_simple_tdm:!1,authorizationGroupArray:[],authorizationMachineArray:[],iot_menu_authorization:[],tdm_menu_authorization:[],qms_menu_authorization:[],maintain_menu_authorization:[],endTime:0,tenantStatus:1,renewalStatus:0,roleId:1,industryCategory:"0"});function Eh(e){$n=e}function eo(e){const o=window.location.host;if(o.includes("partexiot")){const n=re("token",!1);_.industryCategory=e.industryCategory||"0",!o.includes("vpn")&&$n&&(e.industryCategory==="0"&&o.includes("printing")&&(window.location.href=`https://www.partexiot.cn/auth?auth=${n}`),e.industryCategory==="1"&&!o.includes("printing")&&(window.location.href=`https://printing.partexiot.cn/auth?auth=${n}`))}if(_.commissioner=e.commissioner,_.factoryId=e.factoryId,_.tenantLoginCode=e.tenantLoginCode,_.userId=e.userId,_.email=e.email,_.name=e.name,_.realName=e.realName,_.tenantName=e.tenantName,_.phone=e.phone,_.info=e.info,_.kind=e.kind,_.oeeStatus=e.oeeStatus||0,_.ncFlg=e.ncFlg||0,_.systemType=e.systemType,_.platform_tdm=e.platform_tdm,_.platform_qms=e.platform_qms,_.platform_twin=e.platform_twin,_.platform_maintain=e.platform_maintain,_.platform_simple_tdm=e.platform_simple_tdm,_.authorizationGroupArray=e.authorizationGroupArray||[],_.authorizationMachineArray=e.authorizationMachineArray||[],_.iot_menu_authorization=e.iot_menu_authorization||[],_.tdm_menu_authorization=e.tdm_menu_authorization||[],_.qms_menu_authorization=e.qms_menu_authorization||[],_.maintain_menu_authorization=e.maintain_menu_authorization||[],_.endTime=e.endTime??0,_.tenantStatus=e.tenantStatus??1,_.renewalStatus=e.renewalStatus??0,_.roleId=e.roleId||0,_.kind===1){const n=e.info,r=String(e.info.type);r==="0"&&me.replace(`/dashboard/list?machGroupId=${n.id}&theme=${n.theme||"light"}`),r==="1"&&me.replace(`/dashboard/single?machId=${n.id}&type=${n.viewType??1}&theme=${n.theme||"light"}`),r==="2"&&me.push(`/dashboard/carousel?theme=${n.theme||"light"}`),r==="3"&&me.push(`/dashboard/carouselist?theme=${n.theme||"light"}`),r==="4"&&me.push(`/dashboard/performance?schemeId=${n.id}&theme=${n.theme||"light"}`)}}function ct(){return new Promise((e,o)=>{Sh().then(n=>{eo(n),e(n)}).catch(()=>{o()})})}function it(){_.factoryId="",_.commissioner=!1,_.tenantLoginCode="",_.userId="",_.email="",_.name="",_.realName="",_.tenantName="",_.phone="",_.description="",_.info={type:0,id:"",viewType:1,interval:5,theme:"light"},_.kind=0,_.systemType=0,_.oeeStatus=0,_.ncFlg=0,_.password="",_.enable=!0,_.platform_tdm=!1,_.platform_qms=!1,_.platform_twin=!1,_.platform_maintain=!1,_.platform_simple_tdm=!1,_.authorizationGroupArray=[],_.authorizationMachineArray=[],_.iot_menu_authorization=[],_.tdm_menu_authorization=[],_.qms_menu_authorization=[],_.maintain_menu_authorization=[],_.endTime=0,_.tenantStatus=1,_.renewalStatus=0,_.roleId=1}async function to(){await Th().catch(()=>null),je("token"),it(),window.location.href="/login"}const jh=t.defineComponent({name:"HeaderPop",components:{NFlex:u.NFlex,NInput:u.NInput,NPopover:u.NPopover,NTooltip:u.NTooltip,NButton:u.NButton,NIcon:u.NIcon,NDataTable:u.NDataTable,IconSearch:He,IconArrowClockwise:ke,IconArrowSquareDown:gt},setup(){const{t:e}=de.useI18n(),o=t.ref(!1),n=u.useNotification(),r=t.ref([]),l=t.ref(""),i=t.ref(!1),s=t.ref({page:1,pageCount:1,pageSize:30}),c=t.ref([{title:()=>e("Common.importer.fileName"),key:"jobName",width:300,render(w){return t.h("div",{},{default:()=>[t.h("p",{},{default:()=>w.jobName||"--"}),t.h("p",{style:{color:"rgba(var(--font), 0.6)"}},{default:()=>ue(w.commitTime,"yyyy-MM-dd hh:mm:ss")})]})}},{title:()=>e("Common.importer.status"),key:"jobStatus",align:"center",width:90,render(w){let S=e("Common.processing");return w.jobStatus===1&&(S=e("Common.success")),w.jobStatus===2&&(S=e("Common.failed")),t.h("span",{},{default:()=>S})}},{title:()=>e("Common.action"),key:"action",align:"center",fixed:"right",width:90,render(w){const S=[{type:"delete",onClick:()=>{Dh([w.jobId]).then(()=>{n.success({content:()=>e("Notice.success"),duration:3e3}),f()}).catch(()=>{n.error({content:()=>e("Notice.error"),duration:3e3})})}}];return w.jobStatus===2?S.unshift({type:"custom",onClick:()=>{Oh(w.jobId).then(()=>{n.success({content:()=>e("Notice.success"),duration:3e3}),f()}).catch(()=>{n.error({content:()=>e("Notice.error"),duration:3e3})})},icon:ke,color:"info",tooltipText:e("Common.importer.retry")}):S.unshift({type:"custom",disabled:w.jobStatus!==1,onClick:()=>{window.open(w.downloadUrl)},icon:Me,color:"success",tooltipText:e("Common.importer.btnDownload")}),ge(S)}}]),d=w=>{s.value.page=w,f()},m=w=>{s.value.pageSize=w,s.value.page=1,f()},g=()=>{s.value.page=1,f()},f=()=>{i.value||(i.value=!0,Ph({jobType:"EXPORT",jobName:l.value,query:s.value}).then(w=>{s.value=w.query,r.value=w.records,i.value=!1}).catch(()=>{i.value=!1}))},h=w=>{It(w),o.value=w};return f(),t.watch(()=>L.download,w=>{o.value=w,w&&f()}),{jobName:l,loading:i,columns:c,coldata:r,query:s,popDownload:o,init:f,pageChange:d,pageSizeChange:m,doSearch:g,popDownloadUpdate:h}}}),Fh={class:"oc-header-download"};function zh(e,o,n,r,l,i){const s=t.resolveComponent("IconArrowSquareDown"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),m=t.resolveComponent("NInput"),g=t.resolveComponent("IconSearch"),f=t.resolveComponent("NTooltip"),h=t.resolveComponent("IconArrowClockwise"),w=t.resolveComponent("NFlex"),S=t.resolveComponent("NDataTable"),T=t.resolveComponent("NPopover");return t.openBlock(),t.createBlock(T,{trigger:"click",placement:"bottom-end",show:e.popDownload,"show-arrow":!1,"on-update:show":e.popDownloadUpdate,style:{width:"650px"}},{trigger:t.withCtx(()=>[t.createVNode(d,{text:"",style:{"margin-left":"15px"}},{icon:t.withCtx(()=>[t.createVNode(c,{class:"com-header-icon"},{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),_:1})]),default:t.withCtx(()=>[t.createVNode(w,{justify:"end",wrap:!1},{default:t.withCtx(()=>[t.createElementVNode("span",Fh,t.toDisplayString(e.$t("Common.validDays")),1),t.createVNode(m,{value:e.jobName,"onUpdate:value":o[0]||(o[0]=y=>e.jobName=y),type:"text",clearable:"",autosize:"",style:{width:"200px"},placeholder:e.$t("Common.importer.fileName")},null,8,["value","placeholder"]),t.createVNode(f,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{loading:e.loading,class:"button-primary",onClick:e.doSearch},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(g)]),_:1})]),_:1},8,["loading","onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.search")),1)]),_:1}),t.createVNode(f,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{onClick:e.init},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(h)]),_:1})]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.refresh")),1)]),_:1})]),_:1}),t.createVNode(S,{columns:e.columns,data:e.coldata,pagination:e.query,loading:e.loading,"on-update:page":e.pageChange,"on-update:page-size":e.pageSizeChange,"min-height":300,"max-height":505,class:"n-table-dark","scroll-x":"600",style:{"margin-top":"8px"},remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:1},8,["show","on-update:show"])}const xh=A(jh,[["render",zh]]),Lh=t.defineComponent({name:"HeaderPop",components:{NBadge:u.NBadge,NPopover:u.NPopover,NFlex:u.NFlex,NTooltip:u.NTooltip,NButton:u.NButton,NIcon:u.NIcon,NDataTable:u.NDataTable,NRadioGroup:u.NRadioGroup,NRadioButton:u.NRadioButton,IconAlert:ft,IconClear:mt,IconArrowClockwise:ke},setup(){const{t:e}=de.useI18n(),o=t.ref(0),n=t.ref(0),r=t.ref([]),l=t.ref(""),i=t.ref(!1),s=t.ref({page:1,pageCount:1,pageSize:30}),c=t.ref([{title:()=>e("Common.message.title2"),key:"messageContent",width:300,render(w){return[t.h("div",{class:w.status===1?"card-grey-txt":""},{default:()=>w.messageContent}),t.h("div",{class:"card-grey-txt"},{default:()=>ue(w.createTime,"yyyy-MM-dd hh:mm:ss")})]}},{title:()=>e("Common.action"),key:"action",align:"center",fixed:"right",width:90,render(w){return w.status===0?ge([{type:"custom",color:"primary",tooltipText:e("Common.message.read"),buttonText:e("Common.message.read"),onClick:()=>{Mh(w.messageId).then(()=>{h()}).catch(()=>{h()})}}]):t.h("div",{},{default:()=>`${w.updateByName} ${e("Common.message.read")}`})}}]),d=w=>{s.value.page=1,o.value=w,h()},m=()=>{Bh().then(()=>{h()}).catch(()=>{h()})},g=w=>{s.value.page=w,h()},f=w=>{s.value.pageSize=w,s.value.page=1,h()},h=()=>{i.value||(i.value=!0,Ah({status:o.value,query:s.value}).then(w=>{n.value=w.unRead,s.value=w.data.query,r.value=w.data.records,i.value=!1}).catch(()=>{i.value=!1}))};return h(),{badge:n,radios:o,jobName:l,loading:i,columns:c,coldata:r,query:s,clearAll:m,pageChange:g,pageSizeChange:f,init:h,radiosChecked:d}}}),Rh={class:"com-title"};function qh(e,o,n,r,l,i){const s=t.resolveComponent("IconAlert"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),m=t.resolveComponent("NBadge"),g=t.resolveComponent("NRadioButton"),f=t.resolveComponent("NRadioGroup"),h=t.resolveComponent("IconClear"),w=t.resolveComponent("NTooltip"),S=t.resolveComponent("IconArrowClockwise"),T=t.resolveComponent("NFlex"),y=t.resolveComponent("NDataTable"),I=t.resolveComponent("NPopover");return t.openBlock(),t.createBlock(I,{trigger:"click",placement:"bottom-end","show-arrow":!1,style:{width:"650px"}},{trigger:t.withCtx(()=>[t.createVNode(m,{value:e.badge,max:99},{default:t.withCtx(()=>[t.createVNode(d,{text:"",style:{"margin-left":"30px"}},{icon:t.withCtx(()=>[t.createVNode(c,{class:"com-header-icon"},{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),_:1})]),_:1},8,["value"])]),default:t.withCtx(()=>[t.createVNode(T,{justify:"space-between"},{default:t.withCtx(()=>[t.createElementVNode("div",Rh,t.toDisplayString(e.$t("Common.message.title")),1),t.createVNode(f,{value:e.radios,"onUpdate:value":o[0]||(o[0]=j=>e.radios=j),name:"radios","on-update:value":e.radiosChecked},{default:t.withCtx(()=>[t.createVNode(g,{key:"0",value:0,label:e.$t("Common.message.unRead")},null,8,["label"]),t.createVNode(g,{key:"-1",value:-1,label:e.$t("Common.message.all")},null,8,["label"]),t.createVNode(g,{key:"1",value:1,label:e.$t("Common.message.read")},null,8,["label"])]),_:1},8,["value","on-update:value"]),t.createElementVNode("div",null,[t.createVNode(w,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{onClick:e.clearAll},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(h)]),_:1})]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.message.readAll")),1)]),_:1}),t.createVNode(w,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{onClick:e.init},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(S)]),_:1})]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.refresh")),1)]),_:1})])]),_:1}),t.createVNode(y,{columns:e.columns,data:e.coldata,pagination:e.query,loading:e.loading,"on-update:page":e.pageChange,"on-update:page-size":e.pageSizeChange,"min-height":300,"max-height":505,class:"n-table-dark","scroll-x":"600",style:{"margin-top":"8px"},remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:1})}const Gh=A(Lh,[["render",qh]]),Hh=t.defineComponent({name:"OcHeader",components:{Pop:xh,Message:Gh,NDropdown:u.NDropdown,NMenu:u.NMenu,NIcon:u.NIcon,NButton:u.NButton,NDrawer:u.NDrawer,NFlex:u.NFlex,NDrawerContent:u.NDrawerContent,NCard:u.NCard,IconWeatherSunny:Nt,IconWeatherMoon:wt,IconGridDots:yt,IconDismiss:he,IconNavigation:Je,IconUser:Vt},props:{menuOptions:{required:!0,type:Array,default:()=>[]},qiankun:{type:Boolean,default:!1},mainUrl:{type:String,default:"https://www.partexiot.cn"},report:{type:Boolean,default:!1},download:{type:Boolean,default:!0},message:{type:Boolean,default:!0}},setup(e){const{t:o}=de.useI18n(),n=oe.useRoute(),r=oe.useRouter(),l=u.useNotification(),i=t.ref("/iot/home"),s=t.ref(!1),c=t.ref(!1),d=t.ref(void 0),m=t.ref(10),g=t.ref([]),f=t.ref(""),h=N=>{s.value=N,Ze(N),pe("theme",N,0)},w=N=>{const R=N.split("/");i.value=`/${R[1]}/${R[2]}`,Qe()},S=N=>{N.disabled||(w(N.key),r.push(N.key))},T=N=>{if(!N.disabled){if(N.children)return;w(N.key),r.push(N.key),c.value=!1}},y=N=>t.h("div",{onClick:()=>S(N)},{default:()=>N.label}),I=N=>t.h("div",{onClick:()=>T(N)},{default:()=>N.label}),j=N=>N.icon?t.h(u.NIcon,{size:24,onClick:()=>S(N)},{default:()=>N.icon&&N.icon()}):!1,p=N=>{e.qiankun?window.location.href=`${e.mainUrl||"https://www.partexiot.cn"}${N}`:r.replace(N)},D=()=>{c.value=!1},z=()=>{let N=L.platformMainUrl||L.platformUrl;L.platformMainUrl==="auto"&&(_.industryCategory==="0"?N="https://www.partexiot.cn":_.industryCategory==="1"&&(N="https://printing.partexiot.cn"));const R=[{label:o("Platform.iot"),key:N}];return _.platform_tdm&&R.push({label:o("Platform.tdm"),key:"/tdm/home"}),_.platform_qms&&R.push({label:o("Platform.qms"),key:"/qms/home"}),_.platform_twin&&R.push({label:o("Platform.twin"),key:"/twin/home"}),_.platform_maintain&&R.push({label:o("Platform.maintain"),key:"/maintain/home"}),R},O=()=>{const N=[{label:_.tenantName,key:"tenantName"}];return L.isMobile&&N.push({label:`语言 ${L.lang==="zh-CN"?"EN":"中文"}`,key:"language"}),L.language&&N.push({label:`语言 ${L.lang==="zh-CN"?"EN":"中文"}`,key:"language"}),N.push({label:o("Common.dropdownMenu.software"),key:"app",children:[{label:o("Common.dropdownMenu.android"),key:"android"},{label:o("Common.dropdownMenu.ios"),key:"ios"},{label:o("Common.dropdownMenu.chrome"),key:"chrome"},{label:o("Common.dropdownMenu.edge"),key:"edge"},{label:o("Common.dropdownMenu.dashboard_IoT"),key:"dashboard_IoT"},{label:o("Common.dropdownMenu.dashboard_Prt"),key:"dashboard_Prt"}]}),e.report&&N.push({label:o("Common.dropdownMenu.report"),key:"report"}),N.push({label:o("Common.dropdownMenu.info"),key:"info"},{label:o("Common.dropdownMenu.logout"),key:"logout"}),N},Q=async N=>{N==="logout"&&to(),N==="theme"&&h(!s.value),N==="language"&&Ve(),N==="info"&&r.push("/custom/my"),N==="report"&&r.push("/custom/report"),N==="android"&&window.open("http://miiot.partexiot.cn/dk7u"),N==="ios"&&window.open("https://apps.apple.com/cn/app/id1587313547"),N==="chrome"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/chrome_installer.exe"),N==="edge"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/MicrosoftEdgeSetup.exe"),N==="dashboard_IoT"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/%E9%9B%B6%E6%8D%B7%E4%BA%92%E8%81%94IoT_v1.2.0.zip"),N==="dashboard_Prt"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/%E9%9B%B6%E6%8D%B7%E4%BA%92%E8%81%94%E5%8D%B0%E5%88%B7%E7%89%88_v1.2.0.zip")},a=()=>{Ih().then(()=>{l.success({content:"续订请求已发送,七个工作日内将会有专人联系",duration:3e3})}).catch(()=>{l.error({content:()=>o("Notice.error"),duration:3e3})})},E=()=>{if(_.tenantStatus===0&&_.renewalStatus===0){const N=document.getElementById("app");N&&N.classList.add("outrange"),l.info({action:()=>t.h(u.NFlex,{size:[15,15]},{default:()=>t.h(u.NButton,{class:"button-primary","on-click":()=>{a()}},{default:()=>"立即续订"})}),closable:!1,content:`您的订阅已于${ue(_.endTime)}到期,如需继续使用请联系我们`,title:"到期提示"})}if(_.tenantStatus===2&&_.renewalStatus===0){let N=`您的订阅即将于${ue(_.endTime)}到期,请联系管理员进行续订`,R=[t.h(u.NButton,{secondary:!0,"on-click":()=>{l.destroyAll()}},{default:()=>"了解"})];_.kind===99&&(N=`您的订阅即将于${ue(_.endTime)}到期,为保证持续有效的提供服务请立即续订`,R=[t.h(u.NButton,{secondary:!0,"on-click":()=>{l.destroyAll()}},{default:()=>"稍后提示我"}),t.h(u.NButton,{class:"button-primary","on-click":()=>{a()}},{default:()=>"立即续订"})]),l.info({action:()=>t.h(u.NFlex,{size:[15,15]},{default:()=>R}),closable:!1,content:N,title:"温馨提示"})}},K=()=>{r.push(L.platformUrl)};"backdropFilter"in document.documentElement.style||"WebkitBackdropFilter"in document.documentElement.style||document.body.classList.add("not-support-backdrop");const x=()=>{if(_.tenantStatus===0){const N=document.body;N&&N.classList.add("outrange")}};return t.onMounted(()=>{E(),w(n.path),x(),g.value=z()}),t.watch(()=>L.isMobile,()=>{window.screen.availWidth<=1300&&window.screen.availWidth>=1030?f.value="tiny-menu":window.screen.availWidth<769?f.value="hide-menu":f.value=""}),t.watch(()=>n.path,N=>{w(N),x()}),t.watch(()=>L.needUpdate,N=>{if(N){d.value=setInterval(()=>{m.value=m.value-1,m.value<=0&&(clearInterval(window.versionMonitor),clearInterval(d.value),d.value=void 0,R.destroy())},1e3);const R=l.create({title:"检测到系统有新版本需要更新",content:()=>`是否立即更新?更新需要重新加载页面,请确保所有项目都已经保存完毕。${m.value}秒后自动关闭`,meta:ue(new Date,"yyyy-MM-dd hh:mm:ss"),onClose:()=>{clearInterval(window.versionMonitor)},action:()=>t.h(u.NFlex,{justify:"space-between"},{default:()=>[t.h(u.NButton,{quaternary:!0,onClick:()=>{clearInterval(window.versionMonitor),R.destroy()}},{default:()=>"稍后"}),t.h(u.NButton,{type:"primary",onClick:()=>{window.location.reload()}},{default:()=>"更新"})]})})}}),{userStore:_,commonStore:L,theme:s,activeMenu:i,platformOption:g,fnSetLang:Ve,showMenu:c,menuType:f,setDropdownMenu:O,renderMenuLabel:y,renderMenuLabel2:I,renderMenuIcon:j,indexClick:K,platformClick:p,dropdownClick:Q,changeTheme:h,closeModel:D}}}),Uh={class:"oc-header"},Kh={class:"menu"};function Wh(e,o,n,r,l,i){const s=t.resolveComponent("IconGridDots"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),m=t.resolveComponent("NDropdown"),g=t.resolveComponent("NMenu"),f=t.resolveComponent("IconNavigation"),h=t.resolveComponent("Pop"),w=t.resolveComponent("Message"),S=t.resolveComponent("IconWeatherMoon"),T=t.resolveComponent("IconWeatherSunny"),y=t.resolveComponent("IconUser"),I=t.resolveComponent("NDrawerContent"),j=t.resolveComponent("NDrawer");return t.openBlock(),t.createElementBlock("header",Uh,[e.platformOption.length>1?(t.openBlock(),t.createBlock(m,{key:0,trigger:"hover",placement:"bottom-start",size:"huge",options:e.platformOption,onSelect:e.platformClick},{default:t.withCtx(()=>[t.createVNode(d,{style:{padding:"0 14px 0 0"}},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),_:1})]),_:1},8,["options","onSelect"])):t.createCommentVNode("",!0),t.createElementVNode("a",{href:"javascript:;",class:"logo",onClick:o[0]||(o[0]=(...p)=>e.indexClick&&e.indexClick(...p))}),t.createElementVNode("a",{href:"javascript:;",class:"platform-txt",onClick:o[1]||(o[1]=(...p)=>e.indexClick&&e.indexClick(...p))}," | "+t.toDisplayString(e.commonStore.platformName()),1),t.createElementVNode("div",Kh,[t.createVNode(g,{value:e.activeMenu,"onUpdate:value":o[2]||(o[2]=p=>e.activeMenu=p),mode:"horizontal",options:e.menuOptions,"render-icon":e.renderMenuIcon,"render-label":e.renderMenuLabel,class:t.normalizeClass(["header-menu",e.menuType])},null,8,["value","options","render-icon","render-label","class"]),e.commonStore.isMobile?(t.openBlock(),t.createBlock(d,{key:0,onClick:o[3]||(o[3]=p=>e.showMenu=!0)},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(f)]),_:1})]),_:1})):t.createCommentVNode("",!0),e.download&&!e.commonStore.isMobile?(t.openBlock(),t.createBlock(h,{key:1})):t.createCommentVNode("",!0),e.message&&!e.commonStore.isMobile?(t.openBlock(),t.createBlock(w,{key:2})):t.createCommentVNode("",!0),e.commonStore.isMobile?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(d,{key:3,style:{"margin-left":"15px"},onClick:o[4]||(o[4]=p=>e.changeTheme(!e.theme))},{icon:t.withCtx(()=>[t.withDirectives(t.createVNode(c,{color:"#8e54c8"},{default:t.withCtx(()=>[t.createVNode(S)]),_:1},512),[[t.vShow,e.theme]]),t.withDirectives(t.createVNode(c,{color:"#f2a651"},{default:t.withCtx(()=>[t.createVNode(T)]),_:1},512),[[t.vShow,!e.theme]])]),_:1})),e.commonStore.language&&!e.commonStore.isMobile?(t.openBlock(),t.createBlock(d,{key:4,class:"com-header-icon",onClick:o[5]||(o[5]=p=>e.fnSetLang())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.commonStore.lang==="zh-CN"?"EN":"中文"),1)]),_:1})):t.createCommentVNode("",!0),e.userStore.name?(t.openBlock(),t.createBlock(m,{key:5,trigger:"click",placement:"bottom-end",options:e.setDropdownMenu(),onSelect:e.dropdownClick},{default:t.withCtx(()=>[t.createVNode(d,{text:"",class:"user",title:e.userStore.name},t.createSlots({default:t.withCtx(()=>[e.commonStore.isMobile?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(e.userStore.name),1)],64))]),_:2},[e.commonStore.isMobile?{name:"icon",fn:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(y)]),_:1})]),key:"0"}:void 0]),1032,["title"])]),_:1},8,["options","onSelect"])):t.createCommentVNode("",!0)]),t.createVNode(j,{show:e.showMenu,"onUpdate:show":o[7]||(o[7]=p=>e.showMenu=p)},{default:t.withCtx(()=>[t.createVNode(I,{title:e.commonStore.platformName(),"native-scrollbar":!1,closable:""},{default:t.withCtx(()=>[t.createVNode(g,{value:e.activeMenu,"onUpdate:value":o[6]||(o[6]=p=>e.activeMenu=p),"default-expand-all":!0,options:e.menuOptions,"render-label":e.renderMenuLabel2},null,8,["value","options","render-label"])]),_:1},8,["title"])]),_:1},8,["show"])])}const kn=A(Hh,[["render",Wh]]),Vn=e=>{const o=new FormData;return Object.keys(e).forEach(n=>{e.query&&n==="query"?o.append("query",JSON.stringify(e.query)):o.append(n,e[n])}),Xt("api/manager/job/submit",o)},Jh=e=>new Promise((o,n)=>{const r=ze(e);ee("api/manager/job/page",r).then(l=>{const i=Fe(l);o(i)}).catch(()=>{n()})}),Yh=(e,o={})=>bn(e,o,"blob"),Qh=t.defineComponent({name:"OcImporter",components:{IconDismiss:he,IconArrowClockwise:ke,IconMailInboxAdd:Ee,IconCloudArrowDown:We,NModal:u.NModal,NCard:u.NCard,NFlex:u.NFlex,NUpload:u.NUpload,NButton:u.NButton,NTooltip:u.NTooltip,NIcon:u.NIcon,NDataTable:u.NDataTable},props:{show:{required:!0,type:Boolean,default:!1},data:{required:!0,type:Object,default:()=>({type:"",file:""})}},emits:["update:show"],setup(e,{emit:o}){const{t:n}=de.useI18n(),r=u.useNotification(),l=t.ref(!1),i=t.ref(!1),s=t.ref({page:1,pageCount:1,pageSize:30}),c=t.ref([{title:"#",width:60,align:"center",key:"index",render(T,y){return t.h("span",{},{default:()=>y+1})}},{title:n("Common.importer.fileName"),key:"jobName",fixed:"left"},{title:n("Common.importer.status"),key:"jobStatus",width:120,render(T){let y=n("Common.processing");return T.jobStatus===1&&(y=n("Common.success")),T.jobStatus===2&&(y=n("Common.failed")),t.h("span",{},{default:()=>y})}},{title:n("Common.importer.createTime"),key:"commitTime",width:200,render(T){return t.h("div",{},{default:()=>ue(T.commitTime,"yyyy-MM-dd hh:mm:ss")})}},{title:n("Common.action"),key:"action",align:"center",fixed:"right",width:120,render(T){return ge([{type:"custom",disabled:T.jobStatus===0,onClick:()=>{window.open(T.downloadUrl)},icon:Me,color:"success",tooltipText:n("Common.importer.btnDownload")}])}}]),d=t.ref([]),m=()=>{o("update:show",!1)},g=T=>{s.value.page=T,w()},f=T=>{s.value.pageSize=T,s.value.page=1,w()},h=T=>new Promise((y,I)=>{T.file.file&&Vn({jobType:"IMPORT",jobTypeName:e.data.type,jobParams:e.data.params,file:T.file.file}).then(()=>{w(),y()}).catch(()=>{w(),I()}),I()}),w=()=>{i.value=!0,Jh({jobType:"IMPORT",jobTypeName:e.data.type,query:s.value}).then(T=>{i.value=!1,d.value=T.records,s.value=T.query}).catch(()=>{i.value=!1})},S=()=>{e.data.steam?Yh(e.data.file).then(T=>{const y=document.createElement("a");y.style.display="none",y.download="刀组品号导入模板.xls",y.href=URL.createObjectURL(T),document.body.appendChild(y),y.click(),URL.revokeObjectURL(y.href),document.body.removeChild(y)}).catch(()=>{r.error({content:()=>n("Notice.error"),duration:3e3})}):window.open(`${e.data.file}?v=${Date.now()}`)};return t.watch(()=>e.show,T=>{l.value=T,T&&(s.value={page:1,pageCount:1,pageSize:30},w())}),{modal:l,columns:c,coldata:d,query:s,loading:i,init:w,closeModel:m,pageChange:g,pageSizeChange:f,beforeUpload:h,downloadFile:S}}}),Zh={class:"oc-header-download"};function Xh(e,o,n,r,l,i){const s=t.resolveComponent("IconMailInboxAdd"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),m=t.resolveComponent("NUpload"),g=t.resolveComponent("IconCloudArrowDown"),f=t.resolveComponent("IconArrowClockwise"),h=t.resolveComponent("NTooltip"),w=t.resolveComponent("IconDismiss"),S=t.resolveComponent("NFlex"),T=t.resolveComponent("NDataTable"),y=t.resolveComponent("NCard"),I=t.resolveComponent("NModal");return t.openBlock(),t.createBlock(I,{show:e.modal,"onUpdate:show":o[0]||(o[0]=j=>e.modal=j),"on-mask-click":e.closeModel},{default:t.withCtx(()=>[t.createVNode(y,{style:{width:"900px"}},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.$t("Common.importer.title"))+" ",1),t.createElementVNode("span",Zh,t.toDisplayString(e.$t("Common.validDays")),1)]),"header-extra":t.withCtx(()=>[t.createVNode(S,{justify:"end",wrap:!1},{default:t.withCtx(()=>[t.createVNode(m,{"on-before-upload":e.beforeUpload,accept:".xlsx,.xls","show-file-list":!1},{default:t.withCtx(()=>[t.createVNode(d,null,{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.importer.file")),1)]),_:1})]),_:1},8,["on-before-upload"]),t.renderSlot(e.$slots,"default"),t.createVNode(d,{onClick:e.downloadFile},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(g)]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.importer.download")),1)]),_:1},8,["onClick"]),t.createVNode(h,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{loading:e.loading,onClick:e.init},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(f)]),_:1})]),_:1},8,["loading","onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.refresh")),1)]),_:1}),t.createVNode(d,{quaternary:"",onClick:e.closeModel},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(w)]),_:1})]),_:1},8,["onClick"])]),_:3})]),default:t.withCtx(()=>[t.createVNode(T,{columns:e.columns,data:e.coldata,pagination:e.query,loading:e.loading,"on-update:page":e.pageChange,"on-update:page-size":e.pageSizeChange,"min-height":"500","max-height":"500","scroll-x":"600",remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:3})]),_:3},8,["show","on-mask-click"])}const oo=A(Qh,[["render",Xh]]),vh=t.defineComponent({name:"OcLogin",components:{NTabs:u.NTabs,NTabPane:u.NTabPane,NForm:u.NForm,NFormItem:u.NFormItem,NDropdown:u.NDropdown,NInput:u.NInput,NButton:u.NButton,NGrid:u.NGrid,NGi:u.NGi,NPopover:u.NPopover},props:{platform:{required:!1,type:String,default:"智能效率监测平台"},version:{type:String,default:""},info:{required:!1,type:Object,default:()=>({href:"",text:""})}},setup(){const{t:e}=de.useI18n(),o=u.useNotification(),n=oe.useRouter(),r=t.ref("1"),l=t.ref(),i=t.ref(),s=t.ref(),c=t.ref(),d=t.ref(!1),m=t.ref(!1),g=t.ref(!1),f=t.ref({phone:"",name:"",password:""}),h=t.ref({name:{required:!0,message:()=>e("Common.login.userNameMessage"),trigger:"blur"},phone:{required:!0,validator:(B,C)=>C?/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(C):!1,message:()=>e("Common.login.mobileMessage"),trigger:"blur"},password:{required:!0,message:()=>e("Common.login.passwordMessage"),trigger:"input"}}),w=t.ref([]),S=t.ref([]),T=t.ref([]),y=t.ref([]),I=()=>{const B=re("loginOption",{}),C=[];Object.keys(B).forEach($=>{C.push({label:$,key:$})}),w.value=C,S.value=C},j=()=>{const B=re("phoneOption",{}),C=[];Object.keys(B).forEach($=>{C.push({label:$,key:$})}),T.value=C,y.value=C},p=B=>{pe("token",B,0),ct().then(C=>{o.success({content:()=>e("Notice.success"),duration:3e3}),C.kind!==1&&n.replace(L.platformUrl)}).catch(()=>{o.error({content:()=>e("Notice.error"),duration:3e3}),f.value.password="",d.value=!1})},D=()=>{var B,C;d.value||(d.value=!0,r.value==="0"?(B=i.value)==null||B.validate($=>{$?d.value=!1:_n({type:r.value,...f.value}).then(k=>{const V=re("loginOption",{});V[f.value.name]=!0,pe("loginOption",V,0),p(k)}).catch(()=>{f.value.password="",d.value=!1})}):(C=l.value)==null||C.validate($=>{$?d.value=!1:_n({type:r.value,...f.value}).then(k=>{const V=re("phoneOption",{});V[f.value.name]=!0,pe("phoneOption",V,0),p(k)}).catch(()=>{f.value.password="",d.value=!1})}))},z=B=>{f.value.name=B;const C=S.value.filter($=>$.label.indexOf(B)>-1);w.value=C,C.length===0?g.value=!1:g.value=!0},O=B=>{f.value.name=B,g.value=!1,s.value.focus(),setTimeout(()=>{var C;(C=i.value)==null||C.restoreValidation()},80)},Q=B=>{var C;w.value.length===0?g.value=!1:g.value=B,(C=i.value)==null||C.restoreValidation()},a=B=>{f.value.phone=B;const C=y.value.filter($=>$.label.indexOf(B)>-1);T.value=C,C.length===0?m.value=!1:m.value=!0},E=B=>{f.value.phone=B,m.value=!1,c.value.focus(),setTimeout(()=>{var C;(C=l.value)==null||C.restoreValidation()},80)},K=B=>{var C;T.value.length===0?m.value=!1:m.value=B,(C=l.value)==null||C.restoreValidation()},x=B=>{var C,$;r.value=B,f.value={phone:"",name:"",password:""},(C=i.value)==null||C.restoreValidation(),($=l.value)==null||$.restoreValidation()},N=B=>t.h("div",{style:{position:"relative"}},{default:()=>[t.h("div",{},{default:()=>B.label}),t.h(he,{class:"oc-login-drop-menu",onclick:C=>{C.stopPropagation(),C.stopImmediatePropagation();const $=re("loginOption",{});delete $[B.label],pe("loginOption",$,0),I();const k=f.value.name,V=S.value.filter(P=>P.label.indexOf(k)>-1);w.value=V}},{default:()=>""})]}),R=B=>t.h("div",{style:{position:"relative"}},{default:()=>[t.h("div",{},{default:()=>B.label}),t.h(he,{class:"oc-login-drop-menu",onclick:C=>{C.stopPropagation(),C.stopImmediatePropagation();const $=re("phoneOption",{});delete $[B.label],pe("phoneOption",$,0),j();const k=f.value.name,V=y.value.filter(P=>P.label.indexOf(k)>-1);T.value=V}},{default:()=>""})]});return it(),je("token"),I(),j(),{tabs:r,commonStore:L,pwdRef:s,pwdPhoneRef:c,formRef:i,formPhoneRef:l,formValue:f,formRules:h,showPhoneDropdown:m,showNameDropdown:g,optionsName:w,optionsPhone:T,loading:d,submit:D,tabChange:x,nameChange:z,phoneChange:a,fnSetLang:Ve,dropNameSelect:O,dropPhoneSelect:E,showDropdownNameChange:Q,showDropdownPhoneChange:K,renderDropdownNameLabel:N,renderDropdownPhoneLabel:R}}}),e1={class:"oc-login"},t1=t.createElementVNode("div",{class:"oc-login-left"},[t.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/login.png",alt:"logo",class:"oc-login-img"})],-1),o1={class:"oc-login-right"},n1=t.createElementVNode("div",{class:"oc-login-title"},null,-1),a1={class:"oc-login-platform"},r1={class:"oc-login-form"},l1=t.createElementVNode("br",null,null,-1),s1=t.createElementVNode("br",null,null,-1),c1={class:"oc-login-submit"},i1=["href"],d1=t.createElementVNode("div",{class:"oc-google-play"},null,-1),p1=t.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/android_qr.png",alt:"AndroidQr",width:"300",height:"300"},null,-1),u1=t.createElementVNode("div",{class:"oc-app-store"},null,-1),f1=t.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/ios_qr.png",alt:"iOSQr",width:"300",height:"300"},null,-1),m1={class:"oc-login-footer"},h1=t.createElementVNode("span",{style:{"font-family":"Arial, Helvetica, sans-serif"}},"©",-1),g1=t.createElementVNode("a",{href:"https://beian.miit.gov.cn/",target:"_blank",class:"oc-footer-record"}," 沪ICP备 18025935号-3 ",-1);function w1(e,o,n,r,l,i){const s=t.resolveComponent("NButton"),c=t.resolveComponent("NInput"),d=t.resolveComponent("NDropdown"),m=t.resolveComponent("NFormItem"),g=t.resolveComponent("NForm"),f=t.resolveComponent("NTabPane"),h=t.resolveComponent("NTabs"),w=t.resolveComponent("NPopover"),S=t.resolveComponent("NGi"),T=t.resolveComponent("NGrid");return t.openBlock(),t.createElementBlock("div",e1,[t1,t.createElementVNode("div",o1,[e.commonStore.language?(t.openBlock(),t.createBlock(s,{key:0,class:"oc-login-language",onClick:o[0]||(o[0]=y=>e.fnSetLang())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.commonStore.lang==="zh-CN"?"EN":"中文"),1)]),_:1})):t.createCommentVNode("",!0),n1,t.createElementVNode("div",a1,t.toDisplayString(e.platform),1),t.createElementVNode("div",r1,[t.createVNode(h,{value:e.tabs,"on-update:value":e.tabChange,type:"segment","justify-content":"end",animated:""},{default:t.withCtx(()=>[t.createVNode(f,{name:"1",tab:e.$t("Common.login.mobile")},{default:t.withCtx(()=>[l1,t.createVNode(g,{ref:"formPhoneRef",model:e.formValue,rules:e.formRules,"show-require-mark":!1,"label-placement":"top",onKeyup:t.withKeys(e.submit,["enter"])},{default:t.withCtx(()=>[t.createVNode(m,{label:e.$t("Common.login.mobile"),path:"phone"},{default:t.withCtx(()=>[t.createVNode(d,{show:e.showPhoneDropdown,options:e.optionsPhone,"render-label":e.renderDropdownPhoneLabel,width:"trigger",onClickoutside:o[4]||(o[4]=()=>{e.showPhoneDropdown=!1}),onSelect:e.dropPhoneSelect},{default:t.withCtx(()=>[t.createVNode(c,{value:e.formValue.phone,"onUpdate:value":o[1]||(o[1]=y=>e.formValue.phone=y),placeholder:e.$t("Common.login.mobilePlaceholder"),"on-update:value":e.phoneChange,onClick:o[2]||(o[2]=y=>e.showDropdownPhoneChange(!0)),onFocus:o[3]||(o[3]=y=>e.showDropdownPhoneChange(!0))},null,8,["value","placeholder","on-update:value"])]),_:1},8,["show","options","render-label","onSelect"])]),_:1},8,["label"]),t.createVNode(m,{label:e.$t("Common.login.password"),path:"password"},{default:t.withCtx(()=>[t.createVNode(c,{ref:"pwdPhoneRef",value:e.formValue.password,"onUpdate:value":o[5]||(o[5]=y=>e.formValue.password=y),type:"password","show-password-on":"click",placeholder:e.$t("Common.login.passwordPlaceholder"),onFocus:o[6]||(o[6]=y=>e.showDropdownPhoneChange(!1))},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules","onKeyup"])]),_:1},8,["tab"]),t.createVNode(f,{name:"0",tab:e.$t("Common.login.userName")},{default:t.withCtx(()=>[s1,t.createVNode(g,{ref:"formRef",model:e.formValue,rules:e.formRules,"show-require-mark":!1,"label-placement":"top",onKeyup:t.withKeys(e.submit,["enter"])},{default:t.withCtx(()=>[t.createVNode(m,{label:e.$t("Common.login.userName"),path:"name"},{default:t.withCtx(()=>[t.createVNode(d,{show:e.showNameDropdown,options:e.optionsName,"render-label":e.renderDropdownNameLabel,width:"trigger",onClickoutside:o[10]||(o[10]=()=>{e.showNameDropdown=!1}),onSelect:e.dropNameSelect},{default:t.withCtx(()=>[t.createVNode(c,{value:e.formValue.name,"onUpdate:value":o[7]||(o[7]=y=>e.formValue.name=y),placeholder:e.$t("Common.login.userNamePlaceholder"),"on-update:value":e.nameChange,onClick:o[8]||(o[8]=y=>e.showDropdownNameChange(!0)),onFocus:o[9]||(o[9]=y=>e.showDropdownNameChange(!0))},null,8,["value","placeholder","on-update:value"])]),_:1},8,["show","options","render-label","onSelect"])]),_:1},8,["label"]),t.createVNode(m,{label:e.$t("Common.login.password"),path:"password"},{default:t.withCtx(()=>[t.createVNode(c,{ref:"pwdRef",value:e.formValue.password,"onUpdate:value":o[11]||(o[11]=y=>e.formValue.password=y),type:"password","show-password-on":"click",placeholder:e.$t("Common.login.passwordPlaceholder")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules","onKeyup"])]),_:1},8,["tab"])]),_:1},8,["value","on-update:value"]),t.createElementVNode("div",c1,[t.createVNode(s,{loading:e.loading,class:"button-primary",onClick:e.submit},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.$t("Common.login.in")),1)]),_:1},8,["loading","onClick"])]),e.info.href?(t.openBlock(),t.createElementBlock("a",{key:0,href:e.info.href,class:"oc-login-other"},t.toDisplayString(e.info.text),9,i1)):t.createCommentVNode("",!0),t.createVNode(T,{"x-gap":"15",cols:2},{default:t.withCtx(()=>[t.createVNode(S,null,{default:t.withCtx(()=>[t.createVNode(w,{trigger:"hover",placement:"top"},{trigger:t.withCtx(()=>[d1]),default:t.withCtx(()=>[p1]),_:1})]),_:1}),t.createVNode(S,null,{default:t.withCtx(()=>[t.createVNode(w,{trigger:"hover",placement:"top"},{trigger:t.withCtx(()=>[u1]),default:t.withCtx(()=>[f1]),_:1})]),_:1})]),_:1})]),t.createElementVNode("footer",m1,[t.createTextVNode(" Copyright "),h1,t.createTextVNode(" 2020-2024 "+t.toDisplayString(e.$t("Common.title"))+" ",1),e.version?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("v"+t.toDisplayString(e.version)+" ",1)],64)):t.createCommentVNode("",!0),g1])])])}const Sn=A(vh,[["render",w1]]),N1=t.defineComponent({name:"OcNumberRoll",props:{value:{required:!0,type:[Number,String],default:0},duration:{type:Number,default:1e3},precision:{type:Number,default:0},format:{type:Function,default:void 0}},setup(e){const o=t.ref(!1),n=t.ref(0),r=c=>1-Math.pow(1-c,5),l=c=>e.format?e.format(c):c;function i(c,d,m=e.duration){const g=()=>{const h=performance.now(),w=Math.min(h-f,m),S=c+(d-c)*r(w/m);if(w===m){n.value=l(Number(e.value)),o.value=!1;return}const T=Number(S.toFixed(e.precision));n.value=l(T),requestAnimationFrame(g)},f=performance.now();g()}const s=(c=0,d=e.value)=>{o.value=!0,n.value=l(c),String(c)!==String(d)&&i(c,Number(d))};return t.watch(()=>e.value,(c,d)=>{s(Number(d)||0,Number(c))}),t.onMounted(()=>{s()}),{displayedValueRef:n}}});function y1(e,o,n,r,l,i){return t.toDisplayString(e.displayedValueRef)}const no=A(N1,[["render",y1]]),C1=t.defineComponent({name:"OcLogo",components:{NGrid:u.NGrid,NGi:u.NGi,NDivider:u.NDivider,NumberRoll:no},props:{text:{type:String,default:"智能效率监测平台"}},setup(){const e=t.ref(Date.now()),o=t.ref(void 0),n=r=>ue(r,"yyyy-MM-dd hh:mm:ss");return t.onMounted(()=>{o.value=setInterval(()=>{e.value=Date.now()},1e3)}),t.onBeforeUnmount(()=>{clearInterval(o.value),o.value=void 0}),{time:e,numFormat:n}}}),b1=t.createElementVNode("div",{class:"oc-logo"},null,-1);function _1(e,o,n,r,l,i){const s=t.resolveComponent("NGi"),c=t.resolveComponent("NDivider"),d=t.resolveComponent("NumberRoll"),m=t.resolveComponent("NGrid");return t.openBlock(),t.createBlock(m,{cols:5,class:"oc-dashboard-logo"},{default:t.withCtx(()=>[t.createVNode(s,{span:"1",class:"flex-center-left"},{default:t.withCtx(()=>[b1]),_:1}),t.createVNode(s,{span:"3",class:"flex-center"},{default:t.withCtx(()=>[t.createVNode(c,{class:"oc-dashboard-title-show"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.text),1)]),_:1})]),_:1}),t.createVNode(s,{span:"1",class:"flex-center-right oc-time"},{default:t.withCtx(()=>[t.createVNode(d,{value:e.time,format:e.numFormat},null,8,["value","format"])]),_:1})]),_:1})}const Tn=A(C1,[["render",_1]]);u.darkTheme.common.cardColor="#32323b",u.darkTheme.common.primaryColor="#b274ef",u.darkTheme.common.primaryColorHover="#b274ef",u.darkTheme.common.borderRadius="16px",u.darkTheme.common.borderRadiusSmall="8px",u.darkTheme.DataTable.tdColor="#2d2d31";const Bn={common:{borderRadius:"16px",borderRadiusSmall:"8px",primaryColor:"#8e54c8",primaryColorHover:"#9b66d0",primaryColorPressed:"#8e54c8",primaryColorSuppl:"#8e54c8",infoColor:"#2080f0",infoColorHover:"#57a4fd",infoColorPressed:"#2080f0",infoColorSuppl:"#2080f0",successColor:"#5dae57",successColorHover:"#70ce69",successColorPressed:"#5dae57",successColorSuppl:"#5dae57",warningColor:"#f0973a",warningColorHover:"#ffb05d",warningColorPressed:"#f0973a",warningColorSuppl:"#f0973a",errorColor:"#e65444",errorColorHover:"#fc6c5d",errorColorPressed:"#e65444",errorColorSuppl:"#e65444",cardColor:"#fff"},Button:{textColor:"rgb(var(--font))"},Notification:{borderRadius:"16px"}},In=u.darkTheme,$1=t.defineComponent({name:"OcMain",components:{NConfigProvider:u.NConfigProvider,NDialogProvider:u.NDialogProvider,NNotificationProvider:u.NNotificationProvider},props:{hljs:{type:Object,default:void 0}},setup(){return{zhCN:u.zhCN,dateZhCN:u.dateZhCN,commonStore:L,lightTheme:Bn,darkTheme:In}}});function k1(e,o,n,r,l,i){const s=t.resolveComponent("NNotificationProvider"),c=t.resolveComponent("NDialogProvider"),d=t.resolveComponent("NConfigProvider");return t.openBlock(),t.createBlock(d,{theme:e.commonStore.theme?{name:"darkTheme"}:null,"theme-overrides":e.commonStore.theme?e.darkTheme:e.lightTheme,locale:e.commonStore.lang==="zh-CN"?e.zhCN:null,"date-locale":e.commonStore.lang==="zh-CN"?e.dateZhCN:null,hljs:e.hljs,"inline-theme-disabled":"",abstract:""},{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s,{placement:"top"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3})]),_:3})]),_:3},8,["theme","theme-overrides","locale","date-locale","hljs"])}const Dn=A($1,[["render",k1]]),V1=e=>{const o=JSON.parse(JSON.stringify(e));return o.oldPassword=qe(o.oldPassword),o.newPassword=qe(o.newPassword),o.comfirmPassword=qe(o.comfirmPassword),ee("api/auth/user/modifyPassword",o)},S1=e=>ee("api/auth/user/update",e),T1=t.defineComponent({name:"OcMy",components:{NGrid:u.NGrid,NGi:u.NGi,NForm:u.NForm,NFormItem:u.NFormItem,NInput:u.NInput,NButton:u.NButton},setup(){const{t:e}=de.useI18n(),o=u.useNotification(),n=t.ref(),r=t.ref(),l=t.ref(!1),i=t.ref({oldPassword:"",newPassword:"",comfirmPassword:""}),s=t.ref({oldPassword:{required:!0,message:()=>e("Common.my.oldPasswordMessage"),trigger:"blur"},newPassword:{required:!0,message:()=>e("Common.my.newPasswordMessage"),trigger:"blur"},comfirmPassword:{required:!0,message:()=>e("Common.my.checkPasswordMessage"),trigger:"blur"}}),c=t.ref(_),d=t.ref({email:{required:!1,trigger:"blur",validator:(f,h)=>h?/^[0-9a-zA-Z_.-]+[@][0-9a-zA-Z_.-]+([.][a-zA-Z]+){1,2}$/.test(h):!0,message:()=>e("Common.my.emailMessage")},phone:{required:!1,trigger:"blur",validator:(f,h)=>h?/^[1][3,4,5,7,8,9][0-9]{9}$/.test(h):!0,message:()=>e("Common.my.phoneMessage")}});return{formRef:r,pwdRef:n,pwdValue:i,formValue:c,pwdRules:s,formRules:d,loading:l,pwdSubmit:()=>{var f;l.value||(l.value=!0,(f=n.value)==null||f.validate(h=>{h?l.value=!1:V1(i.value).then(()=>{var w;i.value={oldPassword:"",newPassword:"",comfirmPassword:""},(w=n.value)==null||w.restoreValidation(),o.success({content:()=>e("Notice.success"),duration:3e3}),setTimeout(()=>{window.location.href="/login"},1e3)}).catch(()=>{l.value=!1})}))},formSubmit:()=>{var f;l.value||(l.value=!0,(f=r.value)==null||f.validate(h=>{h?l.value=!1:S1(c.value).then(()=>{o.success({content:()=>e("Notice.success"),duration:3e3}),l.value=!1,ct().catch(()=>null)}).catch(()=>{l.value=!1})}))}}}}),B1={class:"com-card"},I1={class:"com-title"},D1=t.createElementVNode("br",null,null,-1),O1={class:"text-right"},P1={class:"com-card"},A1={class:"com-title"},M1=t.createElementVNode("br",null,null,-1),E1={class:"text-right"};function j1(e,o,n,r,l,i){const s=t.resolveComponent("NInput"),c=t.resolveComponent("NFormItem"),d=t.resolveComponent("NForm"),m=t.resolveComponent("NButton"),g=t.resolveComponent("NGi"),f=t.resolveComponent("NGrid");return t.openBlock(),t.createBlock(f,{"x-gap":"15","y-gap":"15",cols:2},{default:t.withCtx(()=>[t.createVNode(g,{span:"1"},{default:t.withCtx(()=>[t.createElementVNode("div",B1,[t.createElementVNode("div",I1,t.toDisplayString(e.$t("Common.my.title")),1),D1,t.createVNode(d,{ref:"formRef",model:e.formValue,rules:e.formRules,"label-placement":"top"},{default:t.withCtx(()=>[t.createVNode(c,{label:e.$t("Common.my.tenantCode"),path:"tenantLoginCode"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.formValue.tenantLoginCode,"onUpdate:value":o[0]||(o[0]=h=>e.formValue.tenantLoginCode=h),readonly:""},null,8,["value"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.tenantName"),path:"tenantName"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.formValue.tenantName,"onUpdate:value":o[1]||(o[1]=h=>e.formValue.tenantName=h),readonly:""},null,8,["value"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.name"),path:"name"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.formValue.name,"onUpdate:value":o[2]||(o[2]=h=>e.formValue.name=h),readonly:""},null,8,["value"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.email"),path:"email"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.formValue.email,"onUpdate:value":o[3]||(o[3]=h=>e.formValue.email=h),placeholder:"邮箱"},null,8,["value"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.realName"),path:"realName"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.formValue.realName,"onUpdate:value":o[4]||(o[4]=h=>e.formValue.realName=h),placeholder:"真实姓名"},null,8,["value"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.phone"),path:"phone"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.formValue.phone,"onUpdate:value":o[5]||(o[5]=h=>e.formValue.phone=h),placeholder:"手机"},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),t.createElementVNode("div",O1,[t.createVNode(m,{loading:e.loading,class:"button-primary",onClick:e.formSubmit},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.$t("Common.my.submit")),1)]),_:1},8,["loading","onClick"])])])]),_:1}),t.createVNode(g,{span:"1"},{default:t.withCtx(()=>[t.createElementVNode("div",P1,[t.createElementVNode("div",A1,t.toDisplayString(e.$t("Common.my.password")),1),M1,t.createVNode(d,{ref:"pwdRef",model:e.pwdValue,rules:e.pwdRules,"label-placement":"top"},{default:t.withCtx(()=>[t.createVNode(c,{label:e.$t("Common.my.oldPassword"),path:"oldPassword"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.pwdValue.oldPassword,"onUpdate:value":o[6]||(o[6]=h=>e.pwdValue.oldPassword=h),type:"password",placeholder:e.$t("Common.my.oldPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.newPassword"),path:"newPassword"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.pwdValue.newPassword,"onUpdate:value":o[7]||(o[7]=h=>e.pwdValue.newPassword=h),type:"password",placeholder:e.$t("Common.my.newPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.checkPassword"),path:"comfirmPassword"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.pwdValue.comfirmPassword,"onUpdate:value":o[8]||(o[8]=h=>e.pwdValue.comfirmPassword=h),type:"password",placeholder:e.$t("Common.my.checkPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),t.createElementVNode("div",E1,[t.createVNode(m,{loading:e.loading,class:"button-primary",onClick:e.pwdSubmit},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.$t("Common.my.submit")),1)]),_:1},8,["loading","onClick"])])])]),_:1})]),_:1})}const On=A(T1,[["render",j1]]);function F1(e){return new Promise((o,n)=>{ee("api/manager/factory-params/detail",{keyName:e}).then(r=>{const l=JSON.parse(r.valueJson??"[]");o(l)}).catch(()=>{n()})})}const z1=t.defineComponent({name:"OcReport",components:{NFlex:u.NFlex,NDataTable:u.NDataTable,NDatePicker:u.NDatePicker,NInputGroup:u.NInputGroup,NInputGroupLabel:u.NInputGroupLabel},setup(){const{t:e}=de.useI18n(),o=t.ref(!0),n=u.useNotification(),r=t.ref([{title:"#",width:60,align:"center",key:"index",render(d,m){return t.h("span",{},{default:()=>m+1})}},{title:"名称",key:"name"},{title:"备注",key:"content"},{title:"操作",key:"action",align:"center",fixed:"right",width:120,render(d){return ge([{type:"custom",onClick:()=>{s(d.key)},icon:Me,color:"success",tooltipText:"下载"}])}}]),l=t.ref([]),i=t.ref([Date.now(),Date.now()]),s=d=>{o.value=!0,Vn({jobType:"EXPORT",jobTypeName:d,jobParams:JSON.stringify({startDate:i.value[0],endDate:i.value[1]})}).then(()=>{o.value=!1,n.success({content:()=>e("Notice.success"),duration:3e3}),It(!0)}).catch(()=>{o.value=!1,n.error({content:()=>e("Notice.error"),duration:3e3})})},c=d=>d>Date.now();return F1("individuation_report_download").then(d=>{l.value=d.map(m=>({key:m.key,name:m.name,content:"默认导出最近30天的数据。每个企业租户下的所有账号,每天累计最多下载10次,采用异步下载"})),o.value=!1}).catch(()=>{o.value=!1}),{columns:r,columnData:l,loading:o,range:i,isRangeDateDisabled:c}}}),x1={class:"com-card"},L1=t.createElementVNode("br",null,null,-1);function R1(e,o,n,r,l,i){const s=t.resolveComponent("NInputGroupLabel"),c=t.resolveComponent("NDatePicker"),d=t.resolveComponent("NInputGroup"),m=t.resolveComponent("NFlex"),g=t.resolveComponent("n-data-table");return t.openBlock(),t.createElementBlock("div",x1,[t.createVNode(m,{justify:"end"},{default:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(s,{class:"oc-group-label"},{default:t.withCtx(()=>[t.createTextVNode("日期")]),_:1}),t.createVNode(c,{value:e.range,"onUpdate:value":o[0]||(o[0]=f=>e.range=f),type:"daterange","is-date-disabled":e.isRangeDateDisabled,style:{width:"300px"}},null,8,["value","is-date-disabled"])]),_:1})]),_:1}),L1,t.createVNode(g,{columns:e.columns,data:e.columnData,loading:e.loading,"min-height":"calc(100vh - 180px)","max-height":"calc(100vh - 180px)"},null,8,["columns","data","loading"])])}const Pn=A(z1,[["render",R1]]),q1=t.defineComponent({name:"OcScan",components:{NButton:u.NButton,NModal:u.NModal,NCard:u.NCard,NFlex:u.NFlex,NIcon:u.NIcon,IconDismiss:he},emits:["on-update:value"],setup(e,{emit:o}){const n=t.ref(),r=t.ref(!1),l=t.ref(!1),i=u.useNotification(),s=1280,c=720;let d=null,m=null;const g=(p,D)=>{d.beginPath(),d.moveTo(p.x,p.y),d.lineTo(D.x,D.y),d.lineWidth=2,d.strokeStyle="green",d.stroke()},f=()=>{if(m&&m.readyState===m.HAVE_ENOUGH_DATA){m.width=s,m.height=c,d.drawImage(n.value,0,0,s,c);const p=d.getImageData(0,0,s,c);try{const D=ra(p.data,s,c);if(D){const{location:z,data:O}=D;g(z.topLeftCorner,z.topRightCorner),g(z.topRightCorner,z.bottomRightCorner),g(z.bottomRightCorner,z.bottomLeftCorner),g(z.bottomLeftCorner,z.topLeftCorner),o("on-update:value",O),w()}}catch{i.error({content:"扫描失败,请重试",duration:3e3})}}h()},h=()=>{l.value&&requestAnimationFrame(f)},w=()=>{n.value&&n.value.srcObject&&(n.value.srcObject.getTracks().forEach(p=>p.stop()),l.value=!1,d=null,m=null,n.value.srcObject=null,n.value.src=null),r.value=!1},S=p=>{n.value.srcObject!==void 0?n.value.srcObject=p:window.videoEl.mozSrcObject!==void 0?n.value.mozSrcObject=p:window.URL.createObjectURL?n.value.src=window.URL.createObjectURL(p):window.webkitURL?n.value.src=window.webkitURL.createObjectURL(p):n.value.src=p,n.value.play().then(h)},T=()=>{r.value=!0,t.nextTick(()=>{navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?(l.value=!0,m=document.getElementById("oc-scan-canvas"),m&&(d=m.getContext("2d",{willReadFrequently:!0})),navigator.mediaDevices.getUserMedia({video:!0}).then(S).catch(function(p){console.log(p)})):(l.value=!1,i.error({content:"您的设备未检测到摄像头,无法进行扫码识别",duration:3e3}))})};let y="",I=0;function j(p){if(p.code==="Enter"){y&&o("on-update:value",y),y="",I=0;return}let D=new Date().getTime();I>0&&(D-I<=100?y+=p.key:D-I>500&&(y="",I=0)),I=D}return t.onMounted(()=>{window.addEventListener("keypress",j)}),t.onBeforeUnmount(()=>{window.removeEventListener("keypress",j),w()}),{videoRef:n,modal:r,loading:l,doScan:T,closeAll:w}}}),G1=t.createElementVNode("div",{class:"oc-scan-canvas-main"},[t.createElementVNode("canvas",{id:"oc-scan-canvas",width:"1280",height:"720"})],-1),H1={class:"oc-scan-video"},U1={ref:"videoRef",playsInline:""};function K1(e,o,n,r,l,i){const s=t.resolveComponent("NButton"),c=t.resolveComponent("IconDismiss"),d=t.resolveComponent("NIcon"),m=t.resolveComponent("NFlex"),g=t.resolveComponent("NCard"),f=t.resolveComponent("NModal");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(s,{type:"primary",loading:e.loading,onClick:e.doScan},{default:t.withCtx(()=>[t.createTextVNode("扫一扫")]),_:1},8,["loading","onClick"]),t.createVNode(f,{show:e.modal,"onUpdate:show":o[0]||(o[0]=h=>e.modal=h),"on-mask-click":e.closeAll},{default:t.withCtx(()=>[t.createVNode(g,{style:{width:"1320px"}},{header:t.withCtx(()=>[t.createTextVNode("扫一扫")]),"header-extra":t.withCtx(()=>[t.createVNode(m,{justify:"end"},{default:t.withCtx(()=>[t.createVNode(s,{quaternary:"",onClick:e.closeAll},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(c)]),_:1})]),_:1},8,["onClick"])]),_:1})]),default:t.withCtx(()=>[G1]),_:1})]),_:1},8,["show","on-mask-click"]),t.createElementVNode("div",H1,[t.createElementVNode("video",U1,null,512)])],64)}const An=A(q1,[["render",K1]]),W1=t.defineComponent({name:"OcTimePickRange",components:{NInputGroup:u.NInputGroup,NTimePicker:u.NTimePicker},props:{value:{required:!0,type:Array,default:()=>[]},format:{required:!1,type:String,default:"HH:mm"},disabled:{required:!1,type:Boolean,default:!1},clearable:{required:!1,type:Boolean,default:!1}},emits:["on-update:value"],setup(e,{emit:o}){const n=t.ref(null),r=t.ref(null),l=s=>{n.value=s,o("on-update:value",[n.value,r.value])},i=s=>{r.value=s,o("on-update:value",[n.value,r.value])};return t.onMounted(()=>{e.value&&(n.value=e.value[0],r.value=e.value[1])}),t.watch(()=>e.value,s=>{s&&(n.value=s[0],r.value=s[1])}),{startTime:n,endTime:r,updateStartValue:l,updateEndValue:i}}}),J1=t.createElementVNode("span",{class:"oc-time-picker-separator"},"-",-1);function Y1(e,o,n,r,l,i){const s=t.resolveComponent("NTimePicker"),c=t.resolveComponent("NInputGroup");return t.openBlock(),t.createBlock(c,{class:"oc-time-picker"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.startTime,clearable:e.clearable,"on-update:value":e.updateStartValue,format:e.format,disabled:e.disabled},null,8,["value","clearable","on-update:value","format","disabled"]),J1,t.createVNode(s,{value:e.endTime,clearable:e.clearable,format:e.format,disabled:e.disabled,"on-update:value":e.updateEndValue},null,8,["value","clearable","format","disabled","on-update:value"])]),_:1})}const Q1=A(W1,[["render",Y1]]),Z1=t.defineComponent({name:"OcSearchBarItem",components:{NIcon:u.NIcon,NButton:u.NButton,NGrid:u.NGrid,NGridItem:u.NGridItem,NInput:u.NInput,NInputNumber:u.NInputNumber,NSelect:u.NSelect,NTooltip:u.NTooltip,NPopover:u.NPopover,NDataTable:u.NDataTable,NCascader:u.NCascader,NTreeSelect:u.NTreeSelect,NDatePicker:u.NDatePicker,NInputGroup:u.NInputGroup,NInputGroupLabel:u.NInputGroupLabel,OcTimePickRange:Q1,IconArrowDown:Ye,IconArrowUp:$t},props:{cols:{type:Number,default:4},small:{type:Boolean,default:!1}},setup(e,{expose:o}){const n=t.ref({}),r=t.ref(!0),l=t.ref(!0),i=t.ref(0),s=t.ref({}),c=t.ref({}),d=t.ref([{key:"label"}]),m=(y,I,j)=>{const p=new Date;return po(Date.now()).set("year",y||p.getFullYear()).set("month",I||p.getMonth()).set("date",j||p.getDate()).set("hour",0).set("minute",0).set("second",0).set("millisecond",0).valueOf()},g=(y,I,j)=>{const p=j.options.filter(D=>String(D.label).toLocaleLowerCase().indexOf(String(I).toLocaleLowerCase())>-1)||[];s.value[y].options=p,p.length===0?s.value[y].display=!1:s.value[y].display=!0},f=y=>{var D;Object.keys(y).forEach(z=>{const O=y[z];O.show=O.show??!0,O.type==="dropdown"&&(s.value[z]={display:!1,options:O.options}),O.type==="group"&&(c.value[z]||(c.value[z]=O.options[0].value),O.inputTemp=O.input.options[c.value[z]?c.value[z]:O.options[0].value])});let I=0;const j=e.small?1:e.cols,p=Object.keys(y);if(Object.keys(y).length>0)for(let z=0;z<=j;z++)(D=y[p[z]])!=null&&D.show&&(I=I+1);i.value=j-I>=0?j-I-1:-1,I>j?l.value=!0:l.value=!1,e.small&&(r.value=!1,l.value=!1),n.value=y},h=y=>{s.value[y].options.length===0?s.value[y].display=!1:s.value[y].display=!0},w=()=>{r.value=!r.value},S=()=>{const y=JSON.stringify(c.value,(I,j)=>j===void 0?null:j);return JSON.parse(y)},T=y=>{y&&(c.value=y)};return o({getValues:S,setValues:T,dataFactory:f}),{more:l,offset:i,dataList:n,collapsed:r,searchData:c,dropDisplay:s,columnsPopover:d,showMore:w,setValues:T,dropValueChange:g,dropDisplayToggle:h,getDate:m}}}),X1={class:"oc-search-bar-line"},v1={key:0,class:"oc-search-action-more"};function e0(e,o,n,r,l,i){const s=t.resolveComponent("NGridItem"),c=t.resolveComponent("NInputGroupLabel"),d=t.resolveComponent("NInput"),m=t.resolveComponent("NInputNumber"),g=t.resolveComponent("NSelect"),f=t.resolveComponent("NDataTable"),h=t.resolveComponent("NPopover"),w=t.resolveComponent("NCascader"),S=t.resolveComponent("NTreeSelect"),T=t.resolveComponent("OcTimePickRange"),y=t.resolveComponent("NDatePicker"),I=t.resolveComponent("NInputGroup"),j=t.resolveComponent("NGrid"),p=t.resolveComponent("IconArrowDown"),D=t.resolveComponent("NIcon"),z=t.resolveComponent("IconArrowUp"),O=t.resolveComponent("NButton"),Q=t.resolveComponent("NTooltip");return t.openBlock(),t.createElementBlock("div",X1,[t.createVNode(j,{"x-gap":"15","y-gap":"15",cols:e.small?1:e.cols,"collapsed-rows":1,collapsed:e.collapsed},{default:t.withCtx(()=>[e.offset>-1?(t.openBlock(),t.createBlock(s,{key:0,offset:e.offset},null,8,["offset"])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.dataList,(a,E,K)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${E}_${K}`},[a.show?(t.openBlock(),t.createBlock(s,{key:0,span:e.small?1:a.span||1},{default:t.withCtx(()=>[a.type!=="group"?(t.openBlock(),t.createBlock(I,{key:0},{default:t.withCtx(()=>{var x;return[t.createVNode(c,{class:"oc-group-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(typeof a.title=="string"?a.title:a.title&&a.title()),1)]),_:2},1024),a.type==="input"?(t.openBlock(),t.createBlock(d,{key:0,value:e.searchData[E],"onUpdate:value":N=>e.searchData[E]=N,disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),"on-update:value":N=>{a.updateValue?a.updateValue(N,JSON.parse(JSON.stringify(e.searchData)),R=>e.setValues(R)):e.searchData[E]=N},clearable:a.clearable??!0},null,8,["value","onUpdate:value","disabled","placeholder","on-update:value","clearable"])):t.createCommentVNode("",!0),a.type==="number"?(t.openBlock(),t.createBlock(m,{key:1,value:e.searchData[E],"onUpdate:value":N=>e.searchData[E]=N,disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),min:a==null?void 0:a.min,max:a==null?void 0:a.max,step:(a==null?void 0:a.step)||1,"show-button":(a==null?void 0:a.showButton)||!0,"update-value-on-input":!1,validator:a==null?void 0:a.validator,"on-update:value":N=>{a.updateValue?a.updateValue(N,JSON.parse(JSON.stringify(e.searchData)),R=>e.setValues(R)):e.searchData[E]=N},clearable:a.clearable??!0},t.createSlots({_:2},[a!=null&&a.suffix?{name:"suffix",fn:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a==null?void 0:a.suffix),1)]),key:"0"}:void 0]),1032,["value","onUpdate:value","disabled","placeholder","min","max","step","show-button","validator","on-update:value","clearable"])):t.createCommentVNode("",!0),a.type==="select"?(t.openBlock(),t.createBlock(g,{key:2,value:e.searchData[E],"onUpdate:value":N=>e.searchData[E]=N,"show-checkmark":!1,disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),options:a.options,multiple:a.multiple,"on-update:value":N=>{a.updateValue?a.updateValue(N,JSON.parse(JSON.stringify(e.searchData)),R=>e.setValues(R)):e.searchData[E]=N},clearable:a.clearable??!0,"max-tag-count":"responsive",filterable:"",style:{flex:"1",width:"0"}},null,8,["value","onUpdate:value","disabled","placeholder","options","multiple","on-update:value","clearable"])):t.createCommentVNode("",!0),a.type==="dropdown"?(t.openBlock(),t.createBlock(h,{key:3,width:"trigger",trigger:"manual",style:{padding:"5px"},"show-arrow":!1,show:(x=e.dropDisplay[E])==null?void 0:x.display,"on-clickoutside":()=>{e.dropDisplay[E].display=!1}},{trigger:t.withCtx(()=>[t.createVNode(d,{value:e.searchData[E],disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),clearable:a.clearable??!0,"on-update:value":N=>{e.searchData[E]=N,e.dropValueChange(E,N,a)},onClick:N=>e.dropDisplayToggle(E),onFocus:N=>e.dropDisplayToggle(E)},null,8,["value","disabled","placeholder","clearable","on-update:value","onClick","onFocus"])]),default:t.withCtx(()=>{var N;return[t.createVNode(f,{columns:e.columnsPopover,data:((N=e.dropDisplay[E])==null?void 0:N.options)||[],"max-height":300,bordered:!1,"bottom-bordered":!1,"row-props":R=>({style:"cursor: pointer;",onClick:()=>{e.searchData[E]=R.value,e.dropDisplay[E].display=!1}}),size:"small","virtual-scroll":"",class:"oc-popover-table"},null,8,["columns","data","row-props"])]}),_:2},1032,["show","on-clickoutside"])):t.createCommentVNode("",!0),a.type==="cascader"?(t.openBlock(),t.createBlock(w,{key:4,value:e.searchData[E],"onUpdate:value":N=>e.searchData[E]=N,disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),options:a.options,"check-strategy":a.checkStrategy||"all",multiple:a.multiple,"on-update:value":N=>{a.updateValue?a.updateValue(N,JSON.parse(JSON.stringify(e.searchData)),R=>e.setValues(R)):e.searchData[E]=N},clearable:a.clearable??!0,"max-tag-count":"responsive",filterable:""},null,8,["value","onUpdate:value","disabled","placeholder","options","check-strategy","multiple","on-update:value","clearable"])):t.createCommentVNode("",!0),a.type==="treeSelect"?(t.openBlock(),t.createBlock(S,{key:5,value:e.searchData[E],"onUpdate:value":N=>e.searchData[E]=N,disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),options:a.options,"check-strategy":a.checkStrategy||"all",multiple:a.multiple,"on-update:value":N=>{a.updateValue?a.updateValue(N,JSON.parse(JSON.stringify(e.searchData)),R=>e.setValues(R)):e.searchData[E]=N},clearable:a.clearable??!0,"max-tag-count":"responsive",filterable:""},null,8,["value","onUpdate:value","disabled","placeholder","options","check-strategy","multiple","on-update:value","clearable"])):t.createCommentVNode("",!0),a.type==="timePicker"?(t.openBlock(),t.createBlock(T,{key:6,value:e.searchData[E],"onUpdate:value":N=>e.searchData[E]=N,disabled:a==null?void 0:a.disabled,"onOnUpdate:value":N=>{a.updateValue?a.updateValue(N,JSON.parse(JSON.stringify(e.searchData)),R=>e.setValues(R)):e.searchData[E]=[...N]},format:a==null?void 0:a.format,clearable:a.clearable??!0},null,8,["value","onUpdate:value","disabled","onOnUpdate:value","format","clearable"])):t.createCommentVNode("",!0),a.type==="datePicker"?(t.openBlock(),t.createBlock(y,{key:7,value:e.searchData[E],"onUpdate:value":N=>e.searchData[E]=N,disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),type:a.dateType,format:a==null?void 0:a.format,"is-date-disabled":a==null?void 0:a.isDateDisabled,shortcuts:a==null?void 0:a.shortcuts,"update-value-on-close":a.dateType!=="year","on-update:value":N=>{a.updateValue?a.updateValue(N,JSON.parse(JSON.stringify(e.searchData)),R=>e.setValues(R)):e.searchData[E]=N},clearable:a.clearable??!0,"close-on-select":""},null,8,["value","onUpdate:value","disabled","placeholder","type","format","is-date-disabled","shortcuts","update-value-on-close","on-update:value","clearable"])):t.createCommentVNode("",!0)]}),_:2},1024)):t.createCommentVNode("",!0),a.type==="group"?(t.openBlock(),t.createBlock(I,{key:1},{default:t.withCtx(()=>{var x,N,R,B,C,$,k,V,P,M,q,H,Y,F,J,te,v,ce,ie,X,se,we,_e,Yn,Qn,Zn,Xn,vn,ea,ta,oa,na,aa;return[t.createVNode(g,{value:e.searchData[E],"onUpdate:value":G=>e.searchData[E]=G,options:a.options,"show-checkmark":!1,style:t.normalizeStyle(a.width?typeof a.width=="number"?{width:`${a.width}px`}:{width:a.width}:{}),"on-update:value":G=>{if(a.inputTemp=a.input.options[G],a.inputTemp.type==="datePicker"){let Z=0;(a.inputTemp.dateType.indexOf("date")>-1||a.inputTemp.dateType.indexOf("quarter")>-1||a.inputTemp.dateType.indexOf("week")>-1)&&(Z=e.getDate()),a.inputTemp.dateType.indexOf("month")>-1&&(Z=e.getDate(void 0,void 0,1)),a.inputTemp.dateType.indexOf("year")>-1&&(Z=e.getDate(void 0,1,1)),a.inputTemp.dateType.indexOf("range")>-1&&(Z=[Z,Z]),e.searchData[a.input.key]=Z}else a.inputTemp.type==="number"?e.searchData[a.input.key]=null:e.searchData[a.input.key]="";a.updateValue?a.updateValue(G,JSON.parse(JSON.stringify(e.searchData)),Z=>e.setValues(Z)):e.searchData[E]=G},class:"oc-group-select",placeholder:" "},null,8,["value","onUpdate:value","options","style","on-update:value"]),((x=a.inputTemp)==null?void 0:x.type)==="input"?(t.openBlock(),t.createBlock(d,{key:0,value:e.searchData[a.input.key],"onUpdate:value":G=>e.searchData[a.input.key]=G,disabled:(N=a.inputTemp)==null?void 0:N.disabled,placeholder:typeof((R=a.inputTemp)==null?void 0:R.placeholder)=="string"?(B=a.inputTemp)==null?void 0:B.placeholder:((C=a.inputTemp)==null?void 0:C.placeholder)&&(($=a.inputTemp)==null?void 0:$.placeholder()),"on-update:value":G=>{var Z;(Z=a.inputTemp)!=null&&Z.updateValue?a.inputTemp.updateValue(G,JSON.parse(JSON.stringify(e.searchData)),$e=>e.setValues($e)):e.searchData[a.input.key]=G},clearable:a.inputTemp.clearable??!0,style:{flex:"1"}},null,8,["value","onUpdate:value","disabled","placeholder","on-update:value","clearable"])):t.createCommentVNode("",!0),((k=a.inputTemp)==null?void 0:k.type)==="number"?(t.openBlock(),t.createBlock(m,{key:1,value:e.searchData[a.input.key],"onUpdate:value":G=>e.searchData[a.input.key]=G,disabled:(V=a.inputTemp)==null?void 0:V.disabled,placeholder:typeof((P=a.inputTemp)==null?void 0:P.placeholder)=="string"?(M=a.inputTemp)==null?void 0:M.placeholder:((q=a.inputTemp)==null?void 0:q.placeholder)&&((H=a.inputTemp)==null?void 0:H.placeholder()),min:(Y=a.inputTemp)==null?void 0:Y.min,max:(F=a.inputTemp)==null?void 0:F.max,step:((J=a.inputTemp)==null?void 0:J.step)||1,"show-button":((te=a.inputTemp)==null?void 0:te.showButton)||!0,"update-value-on-input":!1,validator:(v=a.inputTemp)==null?void 0:v.validator,"on-update:value":G=>{var Z;(Z=a.inputTemp)!=null&&Z.updateValue?a.inputTemp.updateValue(G,JSON.parse(JSON.stringify(e.searchData)),$e=>e.setValues($e)):e.searchData[a.input.key]=G},clearable:a.inputTemp.clearable??!0,style:{flex:"1"}},t.createSlots({_:2},[(ce=a.inputTemp)!=null&&ce.suffix?{name:"suffix",fn:t.withCtx(()=>{var G;return[t.createTextVNode(t.toDisplayString((G=a.inputTemp)==null?void 0:G.suffix),1)]}),key:"0"}:void 0]),1032,["value","onUpdate:value","disabled","placeholder","min","max","step","show-button","validator","on-update:value","clearable"])):t.createCommentVNode("",!0),((ie=a.inputTemp)==null?void 0:ie.type)==="datePicker"?(t.openBlock(),t.createBlock(y,{key:2,value:e.searchData[a.input.key],"onUpdate:value":G=>e.searchData[a.input.key]=G,disabled:(X=a.inputTemp)==null?void 0:X.disabled,placeholder:typeof((se=a.inputTemp)==null?void 0:se.placeholder)=="string"?(we=a.inputTemp)==null?void 0:we.placeholder:((_e=a.inputTemp)==null?void 0:_e.placeholder)&&((Yn=a.inputTemp)==null?void 0:Yn.placeholder()),type:a.inputTemp.dateType,format:(Qn=a.inputTemp)==null?void 0:Qn.format,"is-date-disabled":(Zn=a.inputTemp)==null?void 0:Zn.isDateDisabled,shortcuts:(Xn=a.inputTemp)==null?void 0:Xn.shortcuts,"update-value-on-close":a.inputTemp.dateType!=="year","on-update:value":G=>{var Z;(Z=a.inputTemp)!=null&&Z.updateValue?a.inputTemp.updateValue(G,JSON.parse(JSON.stringify(e.searchData)),$e=>e.setValues($e)):e.searchData[a.input.key]=G},clearable:a.inputTemp.clearable??!0,"close-on-select":"",style:{flex:"1"}},null,8,["value","onUpdate:value","disabled","placeholder","type","format","is-date-disabled","shortcuts","update-value-on-close","on-update:value","clearable"])):t.createCommentVNode("",!0),((vn=a.inputTemp)==null?void 0:vn.type)==="select"?(t.openBlock(),t.createBlock(g,{key:3,value:e.searchData[a.input.key],"onUpdate:value":G=>e.searchData[a.input.key]=G,"show-checkmark":!1,disabled:(ea=a.inputTemp)==null?void 0:ea.disabled,placeholder:typeof((ta=a.inputTemp)==null?void 0:ta.placeholder)=="string"?(oa=a.inputTemp)==null?void 0:oa.placeholder:((na=a.inputTemp)==null?void 0:na.placeholder)&&((aa=a.inputTemp)==null?void 0:aa.placeholder()),options:a.inputTemp.options,multiple:a.inputTemp.multiple,"on-update:value":G=>{var Z;(Z=a.inputTemp)!=null&&Z.updateValue?a.inputTemp.updateValue(G,JSON.parse(JSON.stringify(e.searchData)),$e=>e.setValues($e)):e.searchData[a.input.key]=G},clearable:a.inputTemp.clearable??!0,"max-tag-count":"responsive",filterable:"",style:{flex:"1",width:"0"}},null,8,["value","onUpdate:value","disabled","placeholder","options","multiple","on-update:value","clearable"])):t.createCommentVNode("",!0)]}),_:2},1024)):t.createCommentVNode("",!0)]),_:2},1032,["span"])):t.createCommentVNode("",!0)],64))),128))]),_:1},8,["cols","collapsed"]),e.more?(t.openBlock(),t.createElementBlock("div",v1,[t.createVNode(Q,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(O,{onClick:e.showMore},{icon:t.withCtx(()=>[e.collapsed?(t.openBlock(),t.createBlock(D,{key:0},{default:t.withCtx(()=>[t.createVNode(p)]),_:1})):(t.openBlock(),t.createBlock(D,{key:1},{default:t.withCtx(()=>[t.createVNode(z)]),_:1}))]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.more")),1)]),_:1})])):t.createCommentVNode("",!0)])}const t0=A(Z1,[["render",e0]]),o0=t.defineComponent({name:"OcSearchBarPop",props:{value:{required:!0,type:Boolean,default:!1}},emits:["on-update:value"],setup(e,{emit:o}){return{close:()=>{o("on-update:value",!1)}}}}),n0={class:"oc-search-bar-pop"},a0={class:"oc-search-bar-pop-plan"},r0={class:"oc-search-bar-pop-action"},l0={class:"oc-search-bar-pop-content"};function s0(e,o,n,r,l,i){return t.withDirectives((t.openBlock(),t.createElementBlock("div",n0,[t.createElementVNode("div",{class:"oc-search-bar-pop-mask",onClick:o[0]||(o[0]=(...s)=>e.close&&e.close(...s))}),t.createElementVNode("div",a0,[t.createElementVNode("div",r0,[t.renderSlot(e.$slots,"action")]),t.createElementVNode("div",l0,[t.renderSlot(e.$slots,"default")])])],512)),[[t.vShow,e.value]])}const c0=A(o0,[["render",s0]]),i0=t.defineComponent({name:"OcSearchBar",components:{NFlex:u.NFlex,NIcon:u.NIcon,NTooltip:u.NTooltip,NButton:u.NButton,NPopover:u.NPopover,IconArrowDown:Ye,IconReset:kt,IconSearch:He,IconFilter:Ue,OcSearchBarItem:t0,OcSearchBarPop:c0},props:{value:{required:!0,type:Object,default:()=>({})},defaultValue:{required:!0,type:Object,default:()=>({})},data:{required:!0,type:Object,default:()=>({})},loading:{type:Boolean,default:!1},cols:{type:Number,default:4},small:{type:Boolean,default:!1},autoSubmit:{type:Boolean,default:!0},cache:{type:Boolean,default:!0},resetButton:{type:Boolean,default:!0}},emits:["update:loading","on-update:value"],setup(e,{emit:o,slots:n,expose:r}){const l=oe.useRoute(),i=oe.useRouter(),s=t.ref(),c=t.ref({}),d=t.ref(!1),m=t.ref(!!n.header),g=t.ref(!!n.action),f=(T=!1)=>{if(!e.loading&&s.value){const y=s.value.getValues();if(!T&&y.query&&(y.query.page=1),o("update:loading",!0),o("on-update:value",y),e.cache){const I=l.path,j=Ne(y),p=Ne(I);i.replace(`${I}?cursor=${j}&routerId=${p}`)}}},h=()=>{e.loading||(w(JSON.parse(JSON.stringify(e.defaultValue))),f())},w=(T,y=!1)=>{if(s.value&&s.value.setValues(JSON.parse(JSON.stringify(T))),y)i.replace(l.path);else if(e.cache){const I=l.path,j=Ne(T),p=Ne(I);i.replace(`${I}?cursor=${j}&routerId=${p}`)}};return r({setValues:w,setData:T=>{s.value&&s.value.dataFactory(T)}}),t.onMounted(()=>{setTimeout(()=>{let T=e.value;if(e.cache){const{cursor:y,routerId:I}=l.query;if(y&&I){const j=l.path,p=xe(I),D=xe(y);p===j&&(T=D)}}s.value&&s.value.setValues(JSON.parse(JSON.stringify(T))),s.value&&s.value.dataFactory(e.data),e.autoSubmit&&f(!0)},100)}),{itemRef:s,drawer:d,isSlotHeader:m,isSlotAction:g,commonStore:L,itemData:c,doSearch:f,clearAll:h}}}),d0={key:0,class:"oc-search-bar-title"},p0={key:1,class:"oc-search-bar-popover"},u0={key:0},f0={class:"oc-search-bar-center"};function m0(e,o,n,r,l,i){const s=t.resolveComponent("OcSearchBarItem"),c=t.resolveComponent("IconArrowDown"),d=t.resolveComponent("NIcon"),m=t.resolveComponent("NButton"),g=t.resolveComponent("IconReset"),f=t.resolveComponent("IconSearch"),h=t.resolveComponent("NFlex"),w=t.resolveComponent("OcSearchBarPop"),S=t.resolveComponent("IconFilter"),T=t.resolveComponent("NTooltip");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["oc-search-bar",{small:!e.isSlotHeader&&(e.small||e.commonStore.isMobile)}]),onKeyup:o[6]||(o[6]=t.withKeys(y=>e.doSearch(!1),["enter"]))},[e.isSlotHeader?(t.openBlock(),t.createElementBlock("span",d0,[t.renderSlot(e.$slots,"header")])):t.createCommentVNode("",!0),e.small||e.commonStore.isMobile?(t.openBlock(),t.createElementBlock("div",p0,[t.createVNode(w,{value:e.drawer,"onUpdate:value":o[2]||(o[2]=y=>e.drawer=y),"onOnUpdate:value":o[3]||(o[3]=y=>e.drawer=y)},{action:t.withCtx(()=>[t.createVNode(h,{size:15,justify:"space-between",wrap:!1},{default:t.withCtx(()=>[t.createVNode(m,{onClick:o[0]||(o[0]=y=>e.drawer=!1)},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(c)]),_:1})]),_:1}),e.resetButton?(t.openBlock(),t.createBlock(m,{key:0,loading:e.loading,onClick:e.clearAll},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(g)]),_:1})]),_:1},8,["loading","onClick"])):t.createCommentVNode("",!0),e.data&&Object.keys(e.data).length>0?(t.openBlock(),t.createBlock(m,{key:1,loading:e.loading,class:"button-primary",onClick:o[1]||(o[1]=()=>{e.drawer=!1,e.doSearch(!1)})},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(f)]),_:1})]),_:1},8,["loading"])):t.createCommentVNode("",!0)]),_:1}),e.isSlotAction?(t.openBlock(),t.createElementBlock("br",u0)):t.createCommentVNode("",!0),e.isSlotAction?(t.openBlock(),t.createBlock(h,{key:1,size:15,justify:"space-between",class:"oc-search-action"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"action")]),_:3})):t.createCommentVNode("",!0)]),default:t.withCtx(()=>[t.createVNode(s,{ref:"itemRef",loading:e.loading,small:""},null,8,["loading"])]),_:3},8,["value"]),t.createVNode(m,{onClick:o[4]||(o[4]=y=>e.drawer=!0)},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(S)]),_:1})]),_:1})])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createElementVNode("div",f0,[t.createVNode(s,{ref:"itemRef",loading:e.loading,cols:e.cols},null,8,["loading","cols"]),t.createVNode(h,{size:5,wrap:!1,style:{"padding-left":"15px"}},{default:t.withCtx(()=>[e.data&&Object.keys(e.data).length>0?(t.openBlock(),t.createBlock(T,{key:0,trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(m,{loading:e.loading,class:"button-primary",onClick:o[5]||(o[5]=y=>e.doSearch(!1))},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(f)]),_:1})]),_:1},8,["loading"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.search")),1)]),_:1})):t.createCommentVNode("",!0),e.resetButton?(t.openBlock(),t.createBlock(T,{key:1,trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(m,{loading:e.loading,onClick:e.clearAll},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(g)]),_:1})]),_:1},8,["loading","onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.reset")),1)]),_:1})):t.createCommentVNode("",!0)]),_:1})]),t.createVNode(h,{size:0,wrap:!1,class:"oc-search-action"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"action")]),_:3})],64))],34)}const ao=A(i0,[["render",m0]]),h0=t.defineComponent({name:"OcSkeleton",components:{NGrid:u.NGrid,NGi:u.NGi,NSkeleton:u.NSkeleton},props:{cols:{type:Number,default:6},num:{type:Array,default:()=>[[12,1]]}},setup(){return{}}}),g0={class:"com-skeleton"};function w0(e,o,n,r,l,i){const s=t.resolveComponent("NSkeleton"),c=t.resolveComponent("NGi"),d=t.resolveComponent("NGrid");return t.openBlock(),t.createElementBlock("div",g0,[t.createVNode(d,{"x-gap":"15","y-gap":"15",cols:e.cols,"item-responsive":"",responsive:"screen"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.num,(m,g)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`skeleton_${g}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.num[g][0],(f,h)=>(t.openBlock(),t.createBlock(c,{key:`skeleton_${g}_${h}`,span:`${e.cols/2} m:2 l:${e.num[g][1]}`},{default:t.withCtx(()=>[t.createVNode(s)]),_:2},1032,["span"]))),128))],64))),128))]),_:1},8,["cols"])])}const Mn=A(h0,[["render",w0]]),N0=t.defineComponent({name:"OcTable",components:{NDataTable:u.NDataTable,NTooltip:u.NTooltip,NPopover:u.NPopover,NButton:u.NButton,NIcon:u.NIcon,NFlex:u.NFlex,NPopconfirm:u.NPopconfirm,IconFilter:Ue,IconNavigation:Je,IconEye:Ke,IconPin:_t,IconAdd:Ge,IconMailInboxAdd:Ee,IconCloudArrowDown:We,Draggable:la,OcSearchBar:ao,OcImporter:oo},props:{columns:{required:!0,type:Array,default:()=>[]},actions:{type:Array,default:void 0},fetch:{required:!0,type:Function,default:()=>Promise.resolve()},defaultCheckedRowKeys:{type:Array,default:()=>[]},pagination:{type:Boolean,default:!0},scrollX:{type:[Number,String],default:void 0},flexHeight:{type:Boolean,default:!1},height:{type:[Number,String],default:void 0},minHeight:{type:[Number,String],default:void 0},maxHeight:{type:[Number,String],default:void 0},autoSubmit:{type:Boolean,default:!0},cache:{type:Boolean,default:!0},resetButton:{type:Boolean,default:!0},realtime:{type:Boolean,default:!1},addFn:{type:Function,default:void 0},importer:{type:Object,default:void 0},exporter:{type:Object,default:void 0}},emits:["update:loading","on-update:value"],setup(e,{emit:o,expose:n}){const r=t.ref(),{t:l}=de.useI18n(),i=oe.useRoute(),s=oe.useRouter(),c=u.useNotification(),d=t.ref(!1),m=t.ref(!1),g=t.ref(!1),f=t.ref([]),h=t.ref([]),w=t.ref([]),S=t.ref({query:{page:1}}),T=t.ref({}),y=t.ref({}),I=t.ref(void 0),j=t.ref(void 0),p=i.path,D=t.computed(()=>({animation:200,group:"description",ghostClass:"ghost"})),z=k=>{d.value=!0,o("update:loading",!0),k&&(S.value.query={...S.value.query,...k});const V=ze(S.value);e.fetch&&e.fetch(V).then(P=>{const M=Fe(P);S.value.query=M.query,w.value=M.records,r.value&&r.value.setValues(S.value),d.value=!1,o("on-update:value",ae(S.value)),o("update:loading",!1)}).catch(()=>{d.value=!1,o("update:loading",!1)})},O=k=>{S.value.query.page=k,Qe(),z()},Q=k=>{S.value.query.pageSize=k,S.value.query.page=1,Qe(),z()},a=k=>{k?(S.value.query.columnKey=k.columnKey,S.value.query.order=k.order):(S.value.query.columnKey=null,S.value.query.order=null),z()},E=k=>{k.pin=!k.pin},K=k=>{k.show=!k.show},x=()=>{const k=[];h.value.forEach(V=>{V.show&&k.push(V)}),f.value=k},N=k=>{if(S.value=k,e.cache){const V=Ne(p),P=Ne(S.value);s.replace(`${p}?cursor=${P}&routerId=${V}`)}z()},R=()=>{m.value=!0,vt({...e.exporter,jobParams:JSON.stringify(S.value)}).then(()=>{c.success({content:()=>l("Notice.success"),duration:3e3}),setTimeout(()=>{m.value=!1},2e3)}).catch(()=>{m.value=!1})},B=(k=!1)=>{const V=ae(e.columns),P=[],M=[],q={},H={};let Y={};if(V.forEach(F=>{if(F.search){F.search.title||(F.search.title=F.title),F.search.defaultValue&&(q[F.search.key||F.key]=F.search.defaultValue);const J=ae(F.search);H[F.search.key||F.key]=J}if(delete F.search,F.render&&typeof F.render=="string"){const J=F.render,te=new Function("rowData","rowIndex","h",J);F.render=(v,ce)=>te(v,ce,t.h)}P.push(ae(F)),T.value=ae(q),M.push({...F,show:F.show??!0,pin:F.pin??!1})}),k&&e.cache){const{cursor:F,routerId:J}=i.query;if(F&&J){const te=xe(J),v=xe(F);te===p&&(Y=v)}}if(e.actions&&e.actions.length>0){const F=ae(e.actions),J={title:()=>l("Common.action"),key:"action",align:"center",fixed:"right",minWidth:180,resizable:!0,checked:!0,show:!0,hide:!0,render(te,v){return ge(F,te,v)}};P.push(J),M.push(J)}f.value=P,y.value=H,S.value={...S.value,...q,...Y},h.value=M,r.value&&r.value.setValues(JSON.parse(JSON.stringify(S.value))),r.value&&r.value.setData(JSON.parse(JSON.stringify(y.value)))},C=k=>typeof k=="number"?`${k}px`:k,$=()=>{if(e.height){const k=C(e.height);I.value=k,j.value=k;return}e.minHeight&&(I.value=C(e.minHeight)),e.maxHeight&&(j.value=C(e.maxHeight))};return n({init:z}),t.onMounted(()=>{B(!0),$()}),t.watch(()=>h.value,()=>{x()},{deep:!0}),t.watch(()=>e.columns,()=>{e.realtime&&B()},{deep:!0}),t.watch(()=>e.actions,()=>{e.realtime&&B()},{deep:!0}),{loading:d,minH:I,maxH:j,searchRef:r,exportLoading:m,tableColumns:f,tableData:w,tableQuery:S,searchDefaultValue:T,searchData:y,baseColumns:h,dragOptions:D,showImporter:g,pageChange:O,pageSizeChange:Q,pageSorter:a,pinChange:E,showChange:K,submit:N,exportData:R}}}),y0={class:"com-card"};function C0(e,o,n,r,l,i){const s=t.resolveComponent("IconAdd"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),m=t.resolveComponent("NTooltip"),g=t.resolveComponent("IconMailInboxAdd"),f=t.resolveComponent("IconCloudArrowDown"),h=t.resolveComponent("NPopconfirm"),w=t.resolveComponent("IconFilter"),S=t.resolveComponent("IconNavigation"),T=t.resolveComponent("IconPin"),y=t.resolveComponent("IconEye"),I=t.resolveComponent("Draggable"),j=t.resolveComponent("NPopover"),p=t.resolveComponent("OcSearchBar"),D=t.resolveComponent("NDataTable"),z=t.resolveComponent("OcImporter");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(p,{ref:"searchRef",value:e.tableQuery,defaultValue:e.searchDefaultValue,data:e.searchData,loading:e.loading,cache:!1,autoSubmit:e.autoSubmit,resetButton:e.resetButton,"onOnUpdate:value":e.submit},{header:t.withCtx(()=>[t.renderSlot(e.$slots,"header")]),action:t.withCtx(()=>[e.addFn?(t.openBlock(),t.createBlock(m,{key:0,trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{onClick:e.addFn},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.add")),1)]),_:1})):t.createCommentVNode("",!0),e.importer?(t.openBlock(),t.createBlock(m,{key:1,trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{onClick:o[0]||(o[0]=O=>e.showImporter=!0)},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(g)]),_:1})]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.importer.title")),1)]),_:1})):t.createCommentVNode("",!0),e.exporter?(t.openBlock(),t.createBlock(m,{key:2,trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(h,{"positive-text":e.$t("Common.export"),placement:"bottom-end",onPositiveClick:e.exportData},{trigger:t.withCtx(()=>[t.createVNode(d,{loading:e.exportLoading},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(f)]),_:1})]),_:1},8,["loading"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.export"))+"? ",1)]),_:1},8,["positive-text","onPositiveClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.export")),1)]),_:1})):t.createCommentVNode("",!0),t.createVNode(m,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(j,{placement:"bottom-end",trigger:"click","show-arrow":!1},{trigger:t.withCtx(()=>[t.createVNode(d,null,{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(w)]),_:1})]),_:1})]),default:t.withCtx(()=>[t.createVNode(I,t.mergeProps({modelValue:e.baseColumns,"onUpdate:modelValue":o[1]||(o[1]=O=>e.baseColumns=O),"component-data":{tag:"div"}},e.dragOptions,{"item-key":"key",handle:".oc-drag-handle"}),{item:t.withCtx(({element:O})=>[O.hide?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:O.key,class:"oc-table-sort"},[t.createVNode(d,{quaternary:"",class:"oc-drag-handle"},{icon:t.withCtx(()=>[t.createVNode(c,{size:"24"},{default:t.withCtx(()=>[t.createVNode(S)]),_:1})]),_:1}),t.createVNode(d,{quaternary:"",class:"oc-table-sort-title"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(typeof O.title=="string"?O.title:O.title&&O.title()),1)]),_:2},1024),t.createVNode(d,{type:O.pin?"primary":"tertiary",onClick:Q=>e.pinChange(O),quaternary:""},{icon:t.withCtx(()=>[t.createVNode(c,{size:"24"},{default:t.withCtx(()=>[t.createVNode(T)]),_:1})]),_:2},1032,["type","onClick"]),t.createVNode(d,{type:O.show?"primary":"tertiary",onClick:Q=>e.showChange(O),quaternary:""},{icon:t.withCtx(()=>[t.createVNode(c,{size:"24"},{default:t.withCtx(()=>[t.createVNode(y)]),_:1})]),_:2},1032,["type","onClick"])]))]),_:1},16,["modelValue"])]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.filter")),1)]),_:1}),t.renderSlot(e.$slots,"action")]),_:3},8,["value","defaultValue","data","loading","autoSubmit","resetButton","onOnUpdate:value"]),t.createElementVNode("div",y0,[t.createVNode(D,{columns:e.tableColumns,data:e.tableData,pagination:e.pagination&&e.tableQuery.query,loading:e.loading,"default-checked-row-keys":e.defaultCheckedRowKeys,"scroll-x":e.scrollX,"flex-height":e.flexHeight,"min-height":e.minH,"max-height":e.maxH,"on-update:page":e.pageChange,"on-update:page-size":e.pageSizeChange,"on-update:sorter":e.pageSorter,remote:""},null,8,["columns","data","pagination","loading","default-checked-row-keys","scroll-x","flex-height","min-height","max-height","on-update:page","on-update:page-size","on-update:sorter"])]),e.importer?(t.openBlock(),t.createBlock(z,{key:0,show:e.showImporter,"onUpdate:show":o[2]||(o[2]=O=>e.showImporter=O),data:e.importer},null,8,["show","data"])):t.createCommentVNode("",!0)],64)}const En=A(N0,[["render",C0]]),b0=t.defineComponent({name:"OcWorkflowAdd",components:{IconAdd:Ge,NButton:u.NButton,NIcon:u.NIcon,NPopover:u.NPopover},emits:["update:add"],setup(e,{emit:o}){const n=t.ref(!1);return{showPopover:n,submit:l=>{n.value=!1,o("update:add",l)}}}});function _0(e,o,n,r,l,i){const s=t.resolveComponent("IconAdd"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),m=t.resolveComponent("NFlex"),g=t.resolveComponent("NPopover");return t.openBlock(),t.createBlock(g,{trigger:"manual",show:e.showPopover},{trigger:t.withCtx(()=>[t.createVNode(d,{type:"primary",onClick:o[0]||(o[0]=f=>e.showPopover=!0)},{default:t.withCtx(()=>[t.createVNode(c,{size:"18"},{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),_:1})]),default:t.withCtx(()=>[t.createVNode(m,null,{default:t.withCtx(()=>[t.createVNode(d,{type:"primary",onClick:o[1]||(o[1]=f=>e.submit(2))},{default:t.withCtx(()=>[t.createTextVNode("节点")]),_:1}),t.createVNode(d,{type:"primary",onClick:o[2]||(o[2]=f=>e.submit(1))},{default:t.withCtx(()=>[t.createTextVNode("分支")]),_:1})]),_:1})]),_:1},8,["show"])}const jn=A(b0,[["render",_0]]),$0=t.defineComponent({name:"OcWorkflowCard",components:{NFlex:u.NFlex,OcWorkflowAdd:jn,IconDismiss:he},props:{data:{type:Object,default:()=>({})}},emits:["update:add","update:delete"],setup(e,{emit:o}){return{addOne:l=>{o("update:add",l)},doDelete:()=>{o("update:delete",!0)}}}}),k0={class:"oc-workflow-node"},V0={class:"oc-workflow-node-ctx"},S0=t.createElementVNode("div",{class:"oc-workflow-node-desc"},"功能",-1),T0={class:"oc-workflow-node-more"};function B0(e,o,n,r,l,i){const s=t.resolveComponent("IconDismiss"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),m=t.resolveComponent("NFlex"),g=t.resolveComponent("OcWorkflowAdd");return t.openBlock(),t.createElementBlock("div",k0,[t.createElementVNode("div",V0,[t.createVNode(m,{justify:"space-between",class:"oc-workflow-node-title"},{default:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(e.data.title),1),e.data.type===1||e.data.type===2?(t.openBlock(),t.createBlock(d,{key:0,onClick:e.doDelete},{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),_:1},8,["onClick"])):t.createCommentVNode("",!0)]),_:1}),S0]),t.createElementVNode("div",T0,[t.createVNode(g,{"onUpdate:add":o[0]||(o[0]=f=>{e.addOne(f)})})])])}const I0=A($0,[["render",B0]]),D0=t.defineComponent({name:"OcWorkflowNode",components:{NButton:u.NButton,OcWorkflowAdd:jn,OcWorkflowCard:I0},props:{data:{type:Array,default:()=>[]}},setup(e){function o(g){const f=String(Date.now());return{title:"IF",type:1,key:f,parentKey:String(g),children:[{title:"条件1",type:1,key:`${f}1`,parentKey:f,children:[]},{title:"条件2",type:1,key:`${f}2`,parentKey:f,children:[]}]}}function n(g){const f=String(Date.now());return{title:`功能${Math.floor(Math.random()*101)}`,type:2,key:f,parentKey:String(g),children:[]}}return{addStartOne:g=>{e.data.splice(1,0,g===1?o(""):n(""))},addNodeOne:(g,f)=>{if(g.parentKey)e.data.push(f===1?o(g.parentKey):n(g.parentKey));else{const h=e.data.indexOf(g);e.data.splice(h+1,0,f===1?o(""):n(""))}},addCondition:g=>{const f=String(Date.now());g.children.push({title:`条件${g.children.length+1}`,type:1,key:f,parentKey:g.key,children:[]})},addConditionBottom:(g,f)=>{if(g.parentKey)e.data.push(f===1?o(g.parentKey):n(g.parentKey));else{const h=e.data.indexOf(g);e.data.splice(h+1,0,f===1?o(""):n(""))}},addConditionSide:(g,f)=>{g.children.length===0?g.children.push(f===1?o(g.parentKey):n(g.parentKey)):g.children.unshift(f===1?o(g.parentKey):n(g.parentKey))},deleteNodeOne:g=>{e.data.splice(g,1)},deleteConditionSide:(g,f)=>{if(g.children.length===2){const h=e.data.indexOf(g);e.data.splice(h,1)}else g.children.splice(f,1)}}}}),O0={key:2},P0={class:"oc-workflow-node-branch-add"},A0={class:"oc-workflow-branch-ctx"},M0={class:"oc-workflow-node-branch-add-bottom"},E0={key:3,class:"oc-workflow-node-end"},j0=[t.createElementVNode("div",{class:"oc-workflow-node-title-end"},"流程结束",-1)];function F0(e,o,n,r,l,i){const s=t.resolveComponent("OcWorkflowCard"),c=t.resolveComponent("NButton"),d=t.resolveComponent("OcWorkflowNode"),m=t.resolveComponent("OcWorkflowAdd");return t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.data,(g,f)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:g.key},[g.type===0?(t.openBlock(),t.createBlock(s,{data:g,key:f,"onUpdate:add":e.addStartOne},null,8,["data","onUpdate:add"])):t.createCommentVNode("",!0),g.type===2?(t.openBlock(),t.createBlock(s,{data:g,key:f,class:"arrow","onUpdate:add":h=>{e.addNodeOne(g,h)},"onUpdate:delete":h=>e.deleteNodeOne(f)},null,8,["data","onUpdate:add","onUpdate:delete"])):t.createCommentVNode("",!0),g.type===1?(t.openBlock(),t.createElementBlock("div",O0,[(t.openBlock(),t.createElementBlock("div",{class:"oc-workflow-branch",key:f},[t.createElementVNode("div",P0,[t.createVNode(c,{type:"success",onClick:h=>e.addCondition(g)},{default:t.withCtx(()=>[t.createTextVNode("添加条件")]),_:2},1032,["onClick"])]),t.createElementVNode("div",A0,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.children,(h,w)=>(t.openBlock(),t.createElementBlock("div",{key:`children-${w}`},[t.createVNode(s,{data:h,"onUpdate:add":S=>{e.addConditionSide(h,S)},"onUpdate:delete":S=>e.deleteConditionSide(g,w)},null,8,["data","onUpdate:add","onUpdate:delete"]),t.createVNode(d,{data:h.children},null,8,["data"])]))),128))])])),t.createElementVNode("div",M0,[t.createVNode(m,{"onUpdate:add":h=>{e.addConditionBottom(g,h)}},null,8,["onUpdate:add"])])])):t.createCommentVNode("",!0),g.type===99?(t.openBlock(),t.createElementBlock("div",E0,j0)):t.createCommentVNode("",!0)],64))),128)}const z0=A(D0,[["render",F0]]),x0=t.defineComponent({name:"OcWorkflow",components:{OcWorkflowNode:z0,NSlider:u.NSlider,NSelect:u.NSelect},props:{data:{type:Array,default:()=>[{title:"流程开始",type:0,key:"1",parentKey:"",children:[]},{title:"流程结束",type:99,key:"2",parentKey:"",children:[]}]}},setup(){const e=t.ref(1),o=t.ref(100),n=t.ref([{label:"50%",value:50},{label:"80%",value:80},{label:"100%",value:100},{label:"120%",value:120},{label:"150%",value:150}]);return{scaleShow:e,scaleFilter:o,scaleOption:n,scaleHandle:s=>{o.value=s,e.value=s/100},formatTooltip:s=>`${s}%`,renderSelectLabel:s=>t.h("div",{},{default:()=>`${s.value}%`})}}}),L0={class:"oc-workflow"},R0={class:"oc-workflow-tools"},q0={class:"oc-workflow-ctx"},G0={class:"oc-workflow-main"};function H0(e,o,n,r,l,i){const s=t.resolveComponent("NSelect"),c=t.resolveComponent("NSlider"),d=t.resolveComponent("OcWorkflowNode");return t.openBlock(),t.createElementBlock("div",L0,[t.createElementVNode("div",R0,[t.createVNode(s,{value:e.scaleFilter,"onUpdate:value":o[0]||(o[0]=m=>e.scaleFilter=m),options:e.scaleOption,"render-label":e.renderSelectLabel,"on-update:value":e.scaleHandle,style:{width:"100px"}},null,8,["value","options","render-label","on-update:value"]),t.createVNode(c,{value:e.scaleFilter,"onUpdate:value":o[1]||(o[1]=m=>e.scaleFilter=m),min:50,max:150,step:10,style:{width:"100px"},"on-update:value":e.scaleHandle,"format-tooltip":e.formatTooltip,class:"oc-workflow-slider"},null,8,["value","on-update:value","format-tooltip"])]),t.createElementVNode("div",q0,[t.createElementVNode("div",G0,[t.createElementVNode("div",{class:"oc-workflow-warp",style:t.normalizeStyle({transform:`scale(${e.scaleShow})`})},[t.createVNode(d,{data:e.data},null,8,["data"])],4)])])])}const Fn=A(x0,[["render",H0]]),zn=ca,xn=Object.freeze(Object.defineProperty({__proto__:null,IconAdd:Ge,IconAlert:ft,IconArrowClockwise:ke,IconArrowDown:Ye,IconArrowSquareDown:gt,IconArrowUp:$t,IconCalendarArrowDown:Me,IconChevronLeft:ht,IconClear:mt,IconCloudArrowDown:We,IconDelete:Ct,IconDismiss:he,IconDrafts:bt,IconEye:Ke,IconFilter:Ue,IconFullScreenMaximize:fo,IconGridDots:yt,IconMailInboxAdd:Ee,IconNavigation:Je,IconPin:_t,IconReset:kt,IconSearch:He,IconUser:Vt,IconWeatherMoon:wt,IconWeatherSunny:Nt,OcActionButton:uo,OcAuth:Co,OcBack:bo,OcCircle:_o,OcError:$o,OcFooter:ko,OcForm:yn,OcHeader:kn,OcImporter:oo,OcLogin:Sn,OcLogo:Tn,OcMain:Dn,OcMy:On,OcNumberRoll:no,OcReport:Pn,OcScan:An,OcSearchBar:ao,OcSkeleton:Mn,OcTable:En,OcWorkflow:Fn,commonStore:L,dayjs:zn,fnClearUser:it,fnDownload:vt,fnGetUser:ct,fnRenderAction:ge,fnSetLang:Ve,fnSetTheme:Ze,fnSetUser:eo,fnUserLogout:to,i18n:ne,userStore:_},Symbol.toStringTag,{value:"Module"}));var U0=le,K0=function(){return U0.Date.now()},W0=K0,J0=/\s/;function Y0(e){for(var o=e.length;o--&&J0.test(e.charAt(o)););return o}var Q0=Y0,Z0=Q0,X0=/^\s+/;function v0(e){return e&&e.slice(0,Z0(e)+1).replace(X0,"")}var eg=v0,tg=Re,og=De,ng="[object Symbol]";function ag(e){return typeof e=="symbol"||og(e)&&tg(e)==ng}var rg=ag,lg=eg,Ln=ye,sg=rg,Rn=NaN,cg=/^[-+]0x[0-9a-f]+$/i,ig=/^0b[01]+$/i,dg=/^0o[0-7]+$/i,pg=parseInt;function ug(e){if(typeof e=="number")return e;if(sg(e))return Rn;if(Ln(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=Ln(o)?o+"":o}if(typeof e!="string")return e===0?e:+e;e=lg(e);var n=ig.test(e);return n||dg.test(e)?pg(e.slice(2),n?2:8):cg.test(e)?Rn:+e}var fg=ug,mg=ye,ro=W0,qn=fg,hg="Expected a function",gg=Math.max,wg=Math.min;function Ng(e,o,n){var r,l,i,s,c,d,m=0,g=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(hg);o=qn(o)||0,mg(n)&&(g=!!n.leading,f="maxWait"in n,i=f?gg(qn(n.maxWait)||0,o):i,h="trailing"in n?!!n.trailing:h);function w(O){var Q=r,a=l;return r=l=void 0,m=O,s=e.apply(a,Q),s}function S(O){return m=O,c=setTimeout(I,o),g?w(O):s}function T(O){var Q=O-d,a=O-m,E=o-Q;return f?wg(E,i-a):E}function y(O){var Q=O-d,a=O-m;return d===void 0||Q>=o||Q<0||f&&a>=i}function I(){var O=ro();if(y(O))return j(O);c=setTimeout(I,T(O))}function j(O){return c=void 0,h&&r?w(O):(r=l=void 0,s)}function p(){c!==void 0&&clearTimeout(c),m=0,r=d=l=c=void 0}function D(){return c===void 0?s:j(ro())}function z(){var O=ro(),Q=y(O);if(r=arguments,l=this,d=O,Q){if(c===void 0)return S(d);if(f)return clearTimeout(c),c=setTimeout(I,o),w(d)}return c===void 0&&(c=setTimeout(I,o)),s}return z.cancel=p,z.flush=D,z}var yg=Ng;const Cg=ut(yg);let lo=3840,so=2160;const Gn=t.reactive({scale:1});function bg(e,o){lo=e,so=o}function Hn(){let e=1;const o=window.innerWidth,n=window.innerHeight,r=lo,l=so,i=parseFloat((r/l).toFixed(5));if(parseFloat((o/n).toFixed(5))>i){const c=parseFloat((n*i/r).toFixed(5));e=c>1?1:c}else{const c=parseFloat((o/i/l).toFixed(5));e=c>1?1:c}Gn.scale=e}function _g(){const e=Cg(Hn,200);return e(),window.addEventListener("resize",e),()=>{lo=3840,so=2160,window.removeEventListener("resize",e)}}const $g=e=>!!(_.kind===-1||_.kind===99||_.iot_menu_authorization.includes(e)),kg=e=>_.platform_tdm?_.kind===-1||_.kind===99||e==="home"?!0:_.tdm_menu_authorization.includes(e):!1,Vg=e=>_.platform_qms?_.kind===-1||_.kind===99||e==="home"?!0:_.qms_menu_authorization.includes(e):!1,Sg=e=>_.platform_twin?(_.kind===-1||_.kind===99||e==="home",!0):!1,Tg=e=>!!(_.kind===-1||_.kind===99||_.maintain_menu_authorization.includes(e));let Un;async function Kn(){const e=await fetch(`${window.location.protocol}//${window.location.host}`,{method:"HEAD",cache:"no-cache"});return e.headers.get("etag")||e.headers.get("last-modified")}async function Bg(){const e=await Kn();Un!==e&&pl(!0)}async function Ig(){Un=await Kn(),window.versionMonitor&&clearInterval(window.versionMonitor),window.versionMonitor=setInterval(()=>{Bg()},60*1e3)}function Wn({components:e=[]}={}){const o=[];function n(l,i,s){l.component(i)||l.component(i,s)}function r(l,i){if(!o.includes(l)&&(o.push(l),e.forEach(s=>{const{name:c,alias:d}=s;n(l,c,s),d&&d.forEach(m=>{n(l,m,s)})}),i)){const{platform:s="iot",versionMonitor:c=!0,enableRedirect:d=!0,language:m=!1,local:g="zh-CN"}=i;dl(s),Eh(d),il(m);const f=re("theme",!1),h=re("lang",g);Ve(h),Ze(f),ne.global.locale.value=h,c&&Ig()}}return{version:wo,install:r}}const Jn=Wn({components:Object.keys(xn).map(e=>xn[e])}),Dg=Jn.install;b.CUSTOM=Vh,b.FILE=Xt,b.GET=bn,b.IconAdd=Ge,b.IconAlert=ft,b.IconArrowClockwise=ke,b.IconArrowDown=Ye,b.IconArrowSquareDown=gt,b.IconArrowUp=$t,b.IconCalendarArrowDown=Me,b.IconChevronLeft=ht,b.IconClear=mt,b.IconCloudArrowDown=We,b.IconDelete=Ct,b.IconDismiss=he,b.IconDrafts=bt,b.IconEye=Ke,b.IconFilter=Ue,b.IconFullScreenMaximize=fo,b.IconGridDots=yt,b.IconMailInboxAdd=Ee,b.IconNavigation=Je,b.IconPin=_t,b.IconReset=kt,b.IconSearch=He,b.IconUser=Vt,b.IconWeatherMoon=wt,b.IconWeatherSunny=Nt,b.OcActionButton=uo,b.OcAuth=Co,b.OcBack=bo,b.OcCircle=_o,b.OcError=$o,b.OcFooter=ko,b.OcForm=yn,b.OcHeader=kn,b.OcImporter=oo,b.OcLogin=Sn,b.OcLogo=Tn,b.OcMain=Dn,b.OcMy=On,b.OcNumberRoll=no,b.OcReport=Pn,b.OcScan=An,b.OcSearchBar=ao,b.OcSkeleton=Mn,b.OcTable=En,b.OcWorkflow=Fn,b.POST=ee,b.commonStore=L,b.create=Wn,b.darkTheme=In,b.dayjs=zn,b.default=Jn,b.fnCancelFetch=kh,b.fnCheckDashRole=Sg,b.fnCheckIoTRole=$g,b.fnCheckMaintainRole=Tg,b.fnCheckQMSRole=Vg,b.fnCheckTDMRole=kg,b.fnClearUser=it,b.fnComputedScale=Hn,b.fnDecodeCursor=xe,b.fnDelStorage=je,b.fnDeleteLoad=go,b.fnDownload=vt,b.fnEncodeCursor=Ne,b.fnFormatTime=ue,b.fnFormatUnits=ll,b.fnFullScreen=rl,b.fnGetStorage=re,b.fnGetUser=ct,b.fnListenerScale=_g,b.fnPageModel2Naive=Fe,b.fnPageNaive2Model=ze,b.fnRenderAction=ge,b.fnScrollTop=Qe,b.fnSetLang=Ve,b.fnSetNormalWidthAndHeight=bg,b.fnSetStorage=pe,b.fnSetTheme=Ze,b.fnSetUser=eo,b.fnThrottle=al,b.fnUserLogout=to,b.i18n=ne,b.install=Dg,b.lightTheme=Bn,b.scaleStore=Gn,b.userStore=_,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(y,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("naive-ui"),require("vue-router"),require("vue-i18n"),require("axios"),require("md5"),require("jsqr"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","vue","naive-ui","vue-router","vue-i18n","axios","md5","jsqr","vuedraggable"],t):(y=typeof globalThis<"u"?globalThis:y||self,t(y.OneCore={},y.Vue,y["naive-ui"],y["vue-router"],y["vue-i18n"],y.axios,y.md5,y.jsQR,y.vuedraggable))})(this,function(y,t,f,J,Y,dt,je,da,pa){"use strict";var zg=Object.defineProperty;var Lg=(y,t,f)=>t in y?zg(y,t,{enumerable:!0,configurable:!0,writable:!0,value:f}):y[t]=f;var it=(y,t,f)=>(Lg(y,typeof t!="symbol"?t+"":t,f),f);const lo=t.defineComponent({name:"OcActionButton",props:{data:{required:!0,type:Array,default:()=>[]}},setup(e){return()=>de(e.data)}}),I=(e,o)=>{const n=e.__vccOpts||e;for(const[r,l]of o)n[r]=l;return n},fa={},ua={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ma=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M11.75 3a.75.75 0 0 1 .743.648l.007.102l.001 7.25h7.253a.75.75 0 0 1 .102 1.493l-.102.007h-7.253l.002 7.25a.75.75 0 0 1-1.493.101l-.007-.102l-.002-7.249H3.752a.75.75 0 0 1-.102-1.493L3.752 11h7.25L11 3.75a.75.75 0 0 1 .75-.75z",fill:"currentColor"})],-1)];function ha(e,o){return t.openBlock(),t.createElementBlock("svg",ua,ma)}const xe=I(fa,[["render",ha]]),ga={},wa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Na=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z",fill:"currentColor"})],-1)];function ya(e,o){return t.openBlock(),t.createElementBlock("svg",wa,Na)}const pt=I(ga,[["render",ya]]),Ca={},ba={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},_a=[t.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{d:"M8 6h12"}),t.createElementVNode("path",{d:"M6 12h12"}),t.createElementVNode("path",{d:"M4 18h12"})],-1)];function ka(e,o){return t.openBlock(),t.createElementBlock("svg",ba,_a)}const ft=I(Ca,[["render",ka]]),$a={},Va={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ta=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M15.53 4.22a.75.75 0 0 1 0 1.06L8.81 12l6.72 6.72a.75.75 0 1 1-1.06 1.06l-7.25-7.25a.75.75 0 0 1 0-1.06l7.25-7.25a.75.75 0 0 1 1.06 0z",fill:"currentColor"})],-1)];function Sa(e,o){return t.openBlock(),t.createElementBlock("svg",Va,Ta)}const ut=I($a,[["render",Sa]]),Ba={},Ia={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Oa=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M16.53 11.72l-.084-.072a.75.75 0 0 0-.976.072l-2.72 2.72V7.75l-.007-.102A.75.75 0 0 0 12 7l-.102.007a.75.75 0 0 0-.648.743v6.692L8.53 11.72l-.085-.073a.75.75 0 0 0-.976 1.133l4 4.002l.084.072a.75.75 0 0 0 .976-.072l4.001-4l.073-.085a.75.75 0 0 0-.073-.977zM6.25 3A3.25 3.25 0 0 0 3 6.25v11.5A3.25 3.25 0 0 0 6.25 21h11.5A3.25 3.25 0 0 0 21 17.75V6.25A3.25 3.25 0 0 0 17.75 3H6.25zM4.5 6.25c0-.966.784-1.75 1.75-1.75h11.5c.966 0 1.75.784 1.75 1.75v11.5a1.75 1.75 0 0 1-1.75 1.75H6.25a1.75 1.75 0 0 1-1.75-1.75V6.25z",fill:"currentColor"})],-1)];function Da(e,o){return t.openBlock(),t.createElementBlock("svg",Ia,Oa)}const mt=I(Ba,[["render",Da]]),Pa={},Ea={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Aa=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M20.026 17.001c-2.762 4.784-8.879 6.423-13.663 3.661A9.965 9.965 0 0 1 3.13 17.68a.75.75 0 0 1 .365-1.132c3.767-1.348 5.785-2.91 6.956-5.146c1.232-2.353 1.551-4.93.689-8.463a.75.75 0 0 1 .769-.927a9.961 9.961 0 0 1 4.457 1.327c4.784 2.762 6.423 8.879 3.66 13.662z",fill:"currentColor"})],-1)];function Ma(e,o){return t.openBlock(),t.createElementBlock("svg",Ea,Aa)}const ht=I(Pa,[["render",Ma]]),Fa={},ja={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},xa=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 2a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 2zm5 10a5 5 0 1 1-10 0a5 5 0 0 1 10 0zm4.25.75a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5h1.5zM12 19a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 19zm-7.75-6.25a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5h1.5zm-.03-8.53a.75.75 0 0 1 1.06 0l1.5 1.5a.75.75 0 0 1-1.06 1.06l-1.5-1.5a.75.75 0 0 1 0-1.06zm1.06 15.56a.75.75 0 1 1-1.06-1.06l1.5-1.5a.75.75 0 1 1 1.06 1.06l-1.5 1.5zm14.5-15.56a.75.75 0 0 0-1.06 0l-1.5 1.5a.75.75 0 0 0 1.06 1.06l1.5-1.5a.75.75 0 0 0 0-1.06zm-1.06 15.56a.75.75 0 1 0 1.06-1.06l-1.5-1.5a.75.75 0 1 0-1.06 1.06l1.5 1.5z",fill:"currentColor"})],-1)];function za(e,o){return t.openBlock(),t.createElementBlock("svg",ja,xa)}const gt=I(Fa,[["render",za]]),La={},Ra={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},qa=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 17a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 17a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7-7a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 10a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7-7a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 3a2 2 0 1 1 0 4a2 2 0 0 1 0-4z",fill:"currentColor"})],-1)];function Ga(e,o){return t.openBlock(),t.createElementBlock("svg",Ra,qa)}const wt=I(La,[["render",Ga]]),Ha={},Ua={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ka=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",fill:"currentColor"})],-1)];function Wa(e,o){return t.openBlock(),t.createElementBlock("svg",Ua,Ka)}const ze=I(Ha,[["render",Wa]]),Ja={},Xa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Qa=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 4.5a7.5 7.5 0 1 0 7.419 6.392c-.067-.454.265-.892.724-.892c.37 0 .696.256.752.623A9 9 0 1 1 18 5.292V4.25a.75.75 0 0 1 1.5 0v3a.75.75 0 0 1-.75.75h-3a.75.75 0 0 1 0-1.5h1.35a7.474 7.474 0 0 0-5.1-2z",fill:"currentColor"})],-1)];function Ya(e,o){return t.openBlock(),t.createElementBlock("svg",Xa,Qa)}const we=I(Ja,[["render",Ya]]),Za={},va={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},er=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M17.75 3A3.25 3.25 0 0 1 21 6.25v5.772a6.471 6.471 0 0 0-1.5-.709V8.5h-15v9.25c0 .966.784 1.75 1.75 1.75h5.063c.173.534.412 1.037.709 1.5H6.25A3.25 3.25 0 0 1 3 17.75V6.25A3.25 3.25 0 0 1 6.25 3h11.5zm0 1.5H6.25A1.75 1.75 0 0 0 4.5 6.25V7h15v-.75a1.75 1.75 0 0 0-1.75-1.75zm5.25 13a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0zm-5-3a.5.5 0 0 0-1 0v4.793l-1.646-1.647a.5.5 0 0 0-.708.708l2.5 2.5a.5.5 0 0 0 .708 0l2.5-2.5a.5.5 0 0 0-.708-.708L18 19.293V14.5z",fill:"currentColor"})],-1)];function tr(e,o){return t.openBlock(),t.createElementBlock("svg",va,er)}const Te=I(Za,[["render",tr]]),or={},nr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ar=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M13.5 16a.75.75 0 0 1 0 1.5h-3a.75.75 0 0 1 0-1.5h3zm3-5a.75.75 0 0 1 0 1.5h-9a.75.75 0 0 1 0-1.5h9zm3-5a.75.75 0 0 1 0 1.5h-15a.75.75 0 0 1 0-1.5h15z",fill:"currentColor"})],-1)];function rr(e,o){return t.openBlock(),t.createElementBlock("svg",nr,ar)}const Le=I(or,[["render",rr]]),lr={},sr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},cr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M4.5 5.75c0-.69.56-1.25 1.25-1.25h2a.75.75 0 0 0 0-1.5h-2A2.75 2.75 0 0 0 3 5.75v2a.75.75 0 0 0 1.5 0v-2zm0 12.5c0 .69.56 1.25 1.25 1.25h2a.75.75 0 0 1 0 1.5h-2A2.75 2.75 0 0 1 3 18.25v-2a.75.75 0 0 1 1.5 0v2zM18.25 4.5c.69 0 1.25.56 1.25 1.25v2a.75.75 0 0 0 1.5 0v-2A2.75 2.75 0 0 0 18.25 3h-2a.75.75 0 0 0 0 1.5h2zm1.25 13.75c0 .69-.56 1.25-1.25 1.25h-2a.75.75 0 0 0 0 1.5h2A2.75 2.75 0 0 0 21 18.25v-2a.75.75 0 0 0-1.5 0v2z",fill:"currentColor"})],-1)];function ir(e,o){return t.openBlock(),t.createElementBlock("svg",sr,cr)}const so=I(lr,[["render",ir]]),dr={},pr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},fr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 1.75a3.25 3.25 0 0 1 3.245 3.066L15.25 5h5.25a.75.75 0 0 1 .102 1.493L20.5 6.5h-.796l-1.28 13.02a2.75 2.75 0 0 1-2.561 2.474l-.176.006H8.313a2.75 2.75 0 0 1-2.714-2.307l-.023-.174L4.295 6.5H3.5a.75.75 0 0 1-.743-.648L2.75 5.75a.75.75 0 0 1 .648-.743L3.5 5h5.25A3.25 3.25 0 0 1 12 1.75zm6.197 4.75H5.802l1.267 12.872a1.25 1.25 0 0 0 1.117 1.122l.127.006h7.374c.6 0 1.109-.425 1.225-1.002l.02-.126L18.196 6.5zM13.75 9.25a.75.75 0 0 1 .743.648L14.5 10v7a.75.75 0 0 1-1.493.102L13 17v-7a.75.75 0 0 1 .75-.75zm-3.5 0a.75.75 0 0 1 .743.648L11 10v7a.75.75 0 0 1-1.493.102L9.5 17v-7a.75.75 0 0 1 .75-.75zm1.75-6a1.75 1.75 0 0 0-1.744 1.606L10.25 5h3.5A1.75 1.75 0 0 0 12 3.25z",fill:"currentColor"})],-1)];function ur(e,o){return t.openBlock(),t.createElementBlock("svg",pr,fr)}const Nt=I(dr,[["render",ur]]),mr={},hr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},gr=[t.createElementVNode("path",{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 0 0 0 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3c7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176s176-78.8 176-176s-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112s112 50.1 112 112s-50.1 112-112 112z",fill:"currentColor"},null,-1)];function wr(e,o){return t.openBlock(),t.createElementBlock("svg",hr,gr)}const Re=I(mr,[["render",wr]]),Nr={},yr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Cr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M20 4.746a2.75 2.75 0 0 0-2.75-2.75H4.75A2.75 2.75 0 0 0 2 4.746v12.5a2.75 2.75 0 0 0 2.75 2.75h6.666l.105-.42c.096-.384.253-.748.463-1.08H4.75c-.69 0-1.25-.56-1.25-1.25v-12.5c0-.69.56-1.25 1.25-1.25h12.5c.69 0 1.25.56 1.25 1.25v7.113c.437-.4.956-.66 1.5-.781V4.746zm-4 9.608V6.73l-.007-.1A.744.744 0 0 0 15.25 6a.74.74 0 0 0-.75.73v8.541l.007.099c.017.125.067.24.142.337L16 14.355zm-8.507-5.71A.75.75 0 0 0 6.75 8a.748.748 0 0 0-.75.747v6.507l.007.101c.05.365.363.645.743.645c.414 0 .75-.334.75-.746V8.746l-.007-.101zm4.214 2.973a.73.73 0 0 0-.732-.62a.73.73 0 0 0-.725.733l.035 3.547l.008.099a.731.731 0 0 0 .732.62a.73.73 0 0 0 .725-.733l-.035-3.548l-.008-.098zm7.393 1.052l-5.903 5.902a2.686 2.686 0 0 0-.706 1.248l-.458 1.83a1.087 1.087 0 0 0 1.319 1.319l1.83-.458a2.685 2.685 0 0 0 1.248-.706l5.902-5.903A2.286 2.286 0 0 0 19.1 12.67z",fill:"currentColor"})],-1)];function br(e,o){return t.openBlock(),t.createElementBlock("svg",yr,Cr)}const yt=I(Nr,[["render",br]]),_r={},kr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},$r=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M4.397 4.554l.073-.084a.75.75 0 0 1 .976-.073l.084.073L12 10.939l6.47-6.47a.75.75 0 1 1 1.06 1.061L13.061 12l6.47 6.47a.75.75 0 0 1 .072.976l-.073.084a.75.75 0 0 1-.976.073l-.084-.073L12 13.061l-6.47 6.47a.75.75 0 0 1-1.06-1.061L10.939 12l-6.47-6.47a.75.75 0 0 1-.072-.976l.073-.084l-.073.084z",fill:"currentColor"})],-1)];function Vr(e,o){return t.openBlock(),t.createElementBlock("svg",kr,$r)}const ce=I(_r,[["render",Vr]]),Tr={},Sr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Br=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M22 6.5a5.5 5.5 0 1 0-11 0a5.5 5.5 0 0 0 11 0zM17 7l.001 2.504a.5.5 0 1 1-1 0V7h-2.505a.5.5 0 0 1 0-1H16V3.5a.5.5 0 0 1 1 0V6h2.503a.5.5 0 1 1 0 1h-2.502zm2.5 7v-1.732A6.518 6.518 0 0 0 21 11.19v7.56a3.25 3.25 0 0 1-3.066 3.245L17.75 22H6.25a3.25 3.25 0 0 1-3.245-3.066L3 18.75V7.25a3.25 3.25 0 0 1 3.066-3.245L6.25 4h4.248a6.451 6.451 0 0 0-.422 1.5H6.25a1.75 1.75 0 0 0-1.744 1.606L4.5 7.25V14H9a.75.75 0 0 1 .743.648l.007.102a2.25 2.25 0 0 0 4.495.154l.005-.154a.75.75 0 0 1 .648-.743L15 14h4.5zm-15 1.5v3.25a1.75 1.75 0 0 0 1.606 1.744l.144.006h11.5a1.75 1.75 0 0 0 1.744-1.607l.006-.143V15.5h-3.825a3.752 3.752 0 0 1-3.475 2.995l-.2.005a3.752 3.752 0 0 1-3.632-2.812l-.043-.188H4.5z",fill:"currentColor"})],-1)];function Ir(e,o){return t.openBlock(),t.createElementBlock("svg",Sr,Br)}const Se=I(Tr,[["render",Ir]]),Or={},Dr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Pr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M6.087 7.75a5.752 5.752 0 0 1 11.326 0h.087a4 4 0 0 1 3.962 4.552a6.534 6.534 0 0 0-1.597-1.364A2.501 2.501 0 0 0 17.5 9.25h-.756a.75.75 0 0 1-.75-.713a4.25 4.25 0 0 0-8.489 0a.75.75 0 0 1-.749.713H6a2.5 2.5 0 0 0 0 5h4.4a6.458 6.458 0 0 0-.357 1.5H6a4 4 0 0 1 0-8h.087zM22 16.5a5.5 5.5 0 1 0-11 0a5.5 5.5 0 0 0 11 0zm-6-3a.5.5 0 0 1 1 0v4.793l1.646-1.647a.5.5 0 0 1 .708.708l-2.5 2.5a.5.5 0 0 1-.708 0l-2.5-2.5a.5.5 0 0 1 .708-.708L16 18.293V13.5z",fill:"currentColor"})],-1)];function Er(e,o){return t.openBlock(),t.createElementBlock("svg",Dr,Pr)}const qe=I(Or,[["render",Er]]),Ar={},Mr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Fr=[t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 160h352"},null,-1),t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 256h352"},null,-1),t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 352h352"},null,-1)];function jr(e,o){return t.openBlock(),t.createElementBlock("svg",Mr,Fr)}const Ge=I(Ar,[["render",jr]]),xr={},zr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Lr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M16.242 2.932l4.826 4.826a2.75 2.75 0 0 1-.715 4.404l-4.87 2.435a.75.75 0 0 0-.374.426l-1.44 4.166a1.25 1.25 0 0 1-2.065.476L8.5 16.561L4.06 21H3v-1.062L7.44 15.5l-3.105-3.104a1.25 1.25 0 0 1 .476-2.066l4.166-1.439a.75.75 0 0 0 .426-.374l2.435-4.87a2.75 2.75 0 0 1 4.405-.715zm3.766 5.886l-4.826-4.825a1.25 1.25 0 0 0-2.002.324l-2.435 4.871a2.25 2.25 0 0 1-1.278 1.12l-3.789 1.31l6.705 6.704l1.308-3.788a2.25 2.25 0 0 1 1.12-1.278l4.872-2.436a1.25 1.25 0 0 0 .325-2.002z",fill:"currentColor"})],-1)];function Rr(e,o){return t.openBlock(),t.createElementBlock("svg",zr,Lr)}const Ct=I(xr,[["render",Rr]]),qr={},Gr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Hr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M4.22 8.47a.75.75 0 0 1 1.06 0L12 15.19l6.72-6.72a.75.75 0 1 1 1.06 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L4.22 9.53a.75.75 0 0 1 0-1.06z",fill:"currentColor"})],-1)];function Ur(e,o){return t.openBlock(),t.createElementBlock("svg",Gr,Hr)}const He=I(qr,[["render",Ur]]),Kr={},Wr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Jr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M4.22 15.53a.75.75 0 0 0 1.06 0L12 8.81l6.72 6.72a.75.75 0 1 0 1.06-1.06l-7.25-7.25a.75.75 0 0 0-1.06 0l-7.25 7.25a.75.75 0 0 0 0 1.06z",fill:"currentColor"})],-1)];function Xr(e,o){return t.openBlock(),t.createElementBlock("svg",Wr,Jr)}const bt=I(Kr,[["render",Xr]]),Qr={},Yr={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Zr=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M16.25 5.18a.75.75 0 0 0 .142 1.051a7.251 7.251 0 0 1-3.599 12.976l.677-.677a.75.75 0 0 0-.977-1.133l-.084.073l-2 2a.75.75 0 0 0-.073.976l.073.084l2 2a.75.75 0 0 0 1.133-.976l-.072-.084l-.75-.75A8.75 8.75 0 0 0 17.301 5.04a.75.75 0 0 0-1.051.141zm-5.72-3.71a.75.75 0 0 0 0 1.06l.75.75a8.75 8.75 0 0 0-4.85 15.47a.75.75 0 1 0 .956-1.157a7.251 7.251 0 0 1 3.82-12.8l-.676.677a.75.75 0 1 0 1.061 1.06l2-2a.75.75 0 0 0 0-1.06l-2-2a.75.75 0 0 0-1.06 0z",fill:"currentColor"})],-1)];function vr(e,o){return t.openBlock(),t.createElementBlock("svg",Yr,Zr)}const _t=I(Qr,[["render",vr]]),el={},tl={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ol=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M17.754 14a2.249 2.249 0 0 1 2.249 2.25v.918a2.75 2.75 0 0 1-.513 1.598c-1.545 2.164-4.07 3.235-7.49 3.235c-3.421 0-5.944-1.072-7.486-3.236a2.75 2.75 0 0 1-.51-1.596v-.92A2.249 2.249 0 0 1 6.251 14h11.502zM12 2.005a5 5 0 1 1 0 10a5 5 0 0 1 0-10z",fill:"currentColor"})],-1)];function nl(e,o){return t.openBlock(),t.createElementBlock("svg",tl,ol)}const kt=I(el,[["render",nl]]),$t=window.localStorage;function Vt(e,o){$t.setItem(e,JSON.stringify(o))}function co(e){const o=$t.getItem(e);return o?JSON.parse(o):null}function al(e){$t.removeItem(e)}function io(){return Date.parse(String(new Date))}const rl="local-";class ll{constructor(o=""){it(this,"namespace");it(this,"mapKey");it(this,"map");this.namespace=o,this.mapKey=rl+this.namespace,this.map=co(this.mapKey)||{}}set(o,n,r=0){const l=this.getReallyKey(o),p={expires:r,time:io()};Vt(l,n),this.map[o]=p,Vt(this.mapKey,this.map)}getReallyKey(o){return this.namespace+"-"+o}get(o,n){const r=this.getReallyKey(o),l=this.map[o];if(l){const p=co(r);if(l.expires>0){if(io()-l.time<=l.expires)return p===!1||p?p:n;this.delete(o)}else return p===!1||p?p:n}return n}delete(o){const n=this.getReallyKey(o);delete this.map[o],Vt(this.mapKey,this.map),al(n)}deleteAll(){for(const o in this.map)this.delete(o)}}const Tt=new ll("partex");function oe(e,o,n=3e4){if(typeof n=="string"){let r=0;const l=n.split(" ");switch(l[1]){case"Minutes":r=6e4;break;case"Hours":r=36e5;break;case"Day":r=864e5;break;case"Week":r=6048e5;break}n=Number(l[0])*r}Tt.set(e,o,n)}function Z(e,o){return Tt.get(e,o)}const Be=e=>{Tt.delete(e)},Ue=(e=0)=>{const o=document.documentElement;o&&(o.scrollTop=e,setTimeout(()=>{o.scrollTop=e},100))},po=()=>{const e=document.querySelectorAll(".partex-loading");e&&e.length>0&&e.forEach(o=>{const n=o.parentNode;n==null||n.removeChild(o)})};function Ie(e,o=!1){let n=e.records;o&&(n=n.map((l,p)=>({key:p,...l})));const r=parseInt(e.size);return{query:{page:Number(e.current),pageCount:parseInt(e.pages),pageSize:r>29?r:30,itemCount:parseInt(e.total),pageSizes:[30,40,50],showQuickJumper:!0,showSizePicker:!0,pageSlot:8,prefix:()=>t.h("div",{},{default:()=>E.lang==="zh-CN"?`共${e.total}条`:e.total})},records:n}}function Oe(e){if(!e.query)return e;const o={};return e.query.page&&(o.current=e.query.page),e.query.pageSize&&(o.size=e.query.pageSize),e.query.isGetAll&&(o.isGetAll=e.query.isGetAll),e.query.keyword&&(o.keyword=e.query.keyword),e.query.columnKey&&(o.columnKey=e.query.columnKey),e.query.order&&(o.order=e.query.order),{...e,query:o}}const ne=(e,o="yyyy-MM-dd")=>{if(!e)return"";typeof e=="string"&&(e=e.replace(/年/g,"-").replace(/月/g,"-").replace(/日/g,""));let n=new Date(e);if(typeof e=="string"&&isNaN(n.getTime())&&(n=new Date(parseInt(e))),isNaN(n.getTime()))return"---";const r={"M+":n.getMonth()+1,"d+":n.getDate(),"h+":n.getHours(),"m+":n.getMinutes(),"s+":n.getSeconds()};/(y+)/.test(o)&&(o=o.replace(RegExp.$1,(n.getFullYear()+"").substr(4-RegExp.$1.length)));for(const l in r)if(new RegExp("("+l+")").test(o)){let p=r[l];RegExp.$1.length!==1&&(p=("00"+r[l]).substr((""+r[l]).length)),o=o.replace(RegExp.$1,p)}return o},ie=e=>{try{return window.btoa(encodeURI(JSON.stringify(e)))}catch{return""}},De=e=>{try{return JSON.parse(decodeURI(window.atob(e)))}catch{return""}},sl=(e,o=500)=>{const n=e;let r;const l=function(...s){r||(r=setTimeout(function(){r&&clearTimeout(r),r=void 0,n.apply(l,s)},o))};return l};function cl(e,o){e.requestFullscreen?(o&&(e.onfullscreenchange=o),e.requestFullscreen()):e.mozRequestFullScreen?(o&&(e.onmozfullscreenchange=o),e.mozRequestFullScreen()):e.webkitRequestFullscreen?(o&&(e.onwebkitfullscreenchange=o),e.webkitRequestFullscreen()):e.msRequestFullscreen&&(o&&(e.onmsfullscreenchange=o),e.msRequestFullscreen())}function il(e,o=0){const n=["","k","m","b","t"],r=Math.floor(Math.log10(Math.abs(e))/3),l=Math.max(0,Math.min(r,n.length-1)),p=n[l];return p?(e/Math.pow(10,l*3)).toFixed(o)+p:(e/Math.pow(10,l*3)).toFixed(0)}const dl={Platform:{components:"组件库",iot:"智能效率监测平台",tdm:"智能刀具管理平台",qms:"智能质量检测平台",twin:"智能数字大屏平台",maintain:"智能设备维保平台",order:"智能工单平台"},Notice:{success:"操作成功",error:"操作失败,请稍后重试"},Common:{validDays:"报表文件具有七天有效期",add:"新增",edit:"编辑",apply:"保存",cancel:"取消",search:"查询",refresh:"刷新",filter:"筛选",reset:"重置",more:"更多",export:"导出",success:"成功",failed:"失败",processing:"处理中",action:"操作",back:"返回",title:"零捷互联智能云平台",message:{title:"消息列表",title2:"消息",unRead:"未读",all:"全部",read:"已读",readAll:"一键已读"},login:{mobile:"手机号",mobilePlaceholder:"请输入手机号码",mobileMessage:"请输入正确的手机号码",password:"密码",passwordPlaceholder:"请输入密码",passwordMessage:"请输入密码",userName:"用户名",userNamePlaceholder:"请输入用户名",userNameMessage:"请输入正确的用户名",in:"登录"},my:{title:"我的信息",tenantCode:"租户代码",tenantName:"租户名称",name:"名称",email:"邮箱",emailMessage:"邮箱格式不正确",realName:"真实姓名",phone:"手机",phoneMessage:"手机号码格式不正确",submit:"更新",password:"修改密码",oldPassword:"旧密码",newPassword:"新密码",checkPassword:"确认新密码",oldPasswordMessage:"请填写旧密码",newPasswordMessage:"请填写新密码",checkPasswordMessage:"请填写确认新密码"},dropdownMenu:{software:"零捷软件",android:"安卓APP",ios:"iOS APP",chrome:"Chrome浏览器",edge:"Edge浏览器",dashboard_IoT:"大屏机加工版本",dashboard_Prt:"大屏印刷版本",report:"个性化报表",info:"我的信息",logout:"退出"},importer:{title:"导入",file:"导入文件",download:"下载模版",btnDownload:"下载",fileName:"文件名称",status:"状态",createTime:"创建时间",retry:"重试"}}},pl={Platform:{components:"Components",iot:"SMART LEAN IOT PLATFORM",tdm:"SMART TOOL MANAGEMENT PLATFORM",qms:"SMART QUALITY MANAGEMENT PLATFORM",twin:"SMART DASHBOARD PLATFORM",maintain:"SMART MAINTAIN PLATFORM",order:"SMART ORDER PLATFORM"},Notice:{success:"Success",error:"An error occurred, please try again later"},Common:{validDays:"Files are valid for seven days",add:"Insert",edit:"Edit",apply:"Apply",cancel:"Cancel",search:"Search",refresh:"Refresh",filter:"Filter",reset:"Reset",more:"More",export:"Export",success:"Success",failed:"Failed",processing:"Processing",action:"Action",back:"Back",title:"Partex",message:{title:"Messages",title2:"Message",unRead:"Unread",all:"All",read:"Read",readAll:"Read All"},login:{mobile:"Mobile",mobilePlaceholder:"Please Input Mobile",mobileMessage:"Mobile is not correct",password:"Password",passwordPlaceholder:"Please Input Password",passwordMessage:"Please Input Password",userName:"UserName",userNamePlaceholder:"Please Input UserName",userNameMessage:"UserName is not correct",in:"Sign in"},my:{title:"Info",tenantCode:"TenantCode",tenantName:"TenantName",name:"Name",email:"Email",emailMessage:"Email is not correct",realName:"RealName",phone:"Mobile",phoneMessage:"Mobile is not correct",submit:"Apply",password:"Change Password",oldPassword:"Current",newPassword:"New",checkPassword:"Check",oldPasswordMessage:"Please Input Current Password",newPasswordMessage:"Please Input New Password",checkPasswordMessage:"Please Check New Password"},dropdownMenu:{software:"Software",android:"Android APP",ios:"iOS APP",chrome:"Chrome",edge:"Edge",dashboard:"Dashboard",dashboard_IoT:"Dashboard_IoT",dashboard_Prt:"Dashboard_Print",report:"Reports",info:"UserInfo",logout:"Logout"},importer:{title:"Import",file:"Import File",download:"Download Template",btnDownload:"Download",fileName:"FileName",status:"Status",createTime:"CreateTime",retry:"Retry"}}},X=Y.createI18n({legacy:!1,locale:"zh-CN",messages:{"en-US":{...pl},"zh-CN":{...dl},"fr-FR":{}}}),fo="2.0.29",uo={Components:{platformName:()=>`${X.global.t("Platform.components")} v${fo}`,platformType:"T0",platformUrl:"/",platformMainUrl:""},iot:{platformName:()=>X.global.t("Platform.iot"),platformType:"T1",platformUrl:"/iot/home/all",platformMainUrl:""},tdm:{platformName:()=>X.global.t("Platform.tdm"),platformType:"T2",platformUrl:"/tdm/home",platformMainUrl:"/iot/home/all"},qms:{platformName:()=>X.global.t("Platform.qms"),platformType:"T3",platformUrl:"/qms/home",platformMainUrl:"/iot/home/all"},twin:{platformName:()=>X.global.t("Platform.twin"),platformType:"T4",platformUrl:"/twin/home",platformMainUrl:"/prt/home/all"},maintain:{platformName:()=>X.global.t("Platform.maintain"),platformType:"T5",platformUrl:"/maintain/home",platformMainUrl:"auto"},order:{platformName:()=>X.global.t("Platform.order"),platformType:"T6",platformUrl:"/order/home",platformMainUrl:"/prt/home/all"}},E=t.reactive({needUpdate:!1,download:!1,theme:!1,isMobile:!1,language:!1,lang:"zh-CN",platformName:()=>X.global.t("Platform.iot"),platformType:"T1",platformUrl:"/iot/home/all",platformMainUrl:""});function St(e){E.download=e}function fl(e){E.language=e}function Ne(e){let o;e?o=e:E.lang==="zh-CN"?o="en-US":o="zh-CN",oe("lang",o,0),E.lang=o;const n=document.body;n.dataset.lang=o,X.global.locale.value=o}function ul(e){const o=uo[e]||uo.iot;E.platformName=o.platformName,E.platformType=o.platformType,E.platformUrl=o.platformUrl,E.platformMainUrl=o.platformMainUrl||"auto",document.title=o.platformName()}function Ke(e){E.theme=e;const o=document.body,n=document.querySelector("meta[name=theme-color]");e?o.dataset.theme="dark":o.dataset.theme="",n&&(e?n.setAttribute("content","#2b2b2d"):n.setAttribute("content","#ffffff"))}function ml(e){E.needUpdate=e}const mo=()=>{E.isMobile=window.screen.availWidth<769};window.addEventListener("resize",mo),mo();const We=(e,o)=>t.h(f.NTooltip,{style:{"max-width":"300px"}},{trigger:()=>e,default:()=>o}),ae=(e,o="default",n,r,l)=>{const p={size:"small",type:o,text:!0,disabled:e.disabled||!1,loading:e.loading||!1},s={default:()=>e.buttonText||null};if(!e.confirmText){if(e.onClick&&typeof e.onClick=="string"){const c=e.onClick;p.onClick=()=>{new Function("rowData","rowIndex",c)(r,l)}}e.onClick&&typeof e.onClick=="function"&&(p.onClick=e.onClick.bind(void 0,r,l))}return n&&(s.icon=()=>t.h(f.NIcon,{},{default:()=>t.h(n,{},{default:()=>null})})),t.h(f.NButton,p,s)},Bt=(e,o,n,r)=>{const l={placement:"left"};if(typeof o.onClick=="string"){const p=o.onClick;l["on-positive-click"]=()=>{new Function("rowData","rowIndex",p)(n,r)}}else o.onClick&&(l["on-positive-click"]=o.onClick.bind(void 0,n,r));return t.h(f.NPopconfirm,l,{default:()=>t.h("span",{style:{"max-width":"300px"}},{default:()=>o.confirmText}),trigger:()=>e})},hl=(e,o,n)=>{let r;if(e.type==="detail"){const l=ae(e,e.color?e.color:"primary",e.icon?e.icon:Re,o,n);e.buttonText?r=l:r=We(l,E.lang==="zh-CN"?"详情":"Detail")}if(e.type==="edit"){const l=ae(e,e.color?e.color:"success",e.icon?e.icon:yt,o,n);e.buttonText?r=l:r=We(l,E.lang==="zh-CN"?"编辑":"Edit")}if(e.type==="delete"){let l=ae({...e,onClick:""},e.color?e.color:"error",e.icon?e.icon:Nt,o,n);e.buttonText?l=l:l=We(l,E.lang==="zh-CN"?"删除":"Delete"),r=Bt(l,{...e,confirmText:E.lang==="zh-CN"?"删除后无法恢复,是否确认删除?":"Are you sure you want to delete ?"},o,n)}if(e.type==="custom"){const l=ae(e.confirmText?{...e,onClick:""}:e,e.color,e.icon,o,n);e.buttonText?r=l:r=We(l,e.tooltipText)}return e.confirmText&&(r=Bt(r,e,o,n)),r},gl=(e,o,n)=>{const r=[];return e.forEach(l=>{let p;l.type==="detail"&&(p=ae({...l,buttonText:E.lang==="zh-CN"?"详情":"Detail"},"primary",void 0,o,n)),l.type==="edit"&&(p=ae({...l,buttonText:E.lang==="zh-CN"?"编辑":"Edit"},"success",void 0,o,n)),l.type==="delete"&&(p=Bt(ae({...l,onClick:"",buttonText:E.lang==="zh-CN"?"删除":"Delete"},"error",void 0,o,n),{...l,confirmText:E.lang==="zh-CN"?"删除后无法恢复,是否确认删除?":"Are you sure you want to delete ?"},o,n)),l.type==="custom"?r.push(ae(l,l.color,void 0,o,n)):r.push(p)}),r},de=(e,o,n)=>{const r=[];return e.forEach(l=>{if(l.type==="group"){if(l.children.length>0){const p=gl(l.children,o,n);r.push(t.h(f.NPopover,{trigger:"click"},{trigger:()=>ae({buttonText:l.buttonText,disabled:l.disabled,loading:l.loading},l.color,l.icon,o,n),default:()=>t.h(f.NFlex,{vertical:!0},{default:()=>p})}))}}else{const p=hl(l,o,n);r.push(p)}}),t.h("div",{class:"action-flex"},{default:()=>r})},wl=t.defineComponent({name:"OcAuth",setup(){const e=J.useRoute(),o=J.useRouter(),{auth:n}=e.query;n?oe("token",n,0):Be("token"),o.replace(E.platformUrl)}}),Nl={class:"com-card flex-center",style:{flex:"1"}},yl=[t.createElementVNode("p",{class:"oc-miss-title"},"登录中...",-1)];function Cl(e,o,n,r,l,p){return t.openBlock(),t.createElementBlock("div",Nl,yl)}const ho=I(wl,[["render",Cl]]),bl=t.defineComponent({name:"OcBack",components:{IconChevronLeft:ut,NButton:f.NButton,NIcon:f.NIcon},props:{to:{type:String,default:""}},setup(e){const o=J.useRouter();return{back:()=>{e.to?o.push(e.to):o.back()}}}});function _l(e,o,n,r,l,p){const s=t.resolveComponent("IconChevronLeft"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton");return t.openBlock(),t.createBlock(d,{text:"",onClick:e.back},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(e.$t("Common.back")),1)]),_:1},8,["onClick"])}const go=I(bl,[["render",_l]]),kl=t.defineComponent({name:"OcCircle",components:{NPopover:f.NPopover},props:{circle:{required:!0,type:Number,default:0},pointA:{type:Number,default:void 0},pointB:{type:Number,default:void 0},pointSize:{type:Number,default:3},styles:{type:Object,default:()=>({backgroundBg:"rgba(255, 255, 255, 0.1)",processBg:"#fff",pointABg:"#f2a651",pointBBg:"#67c67e"})}},setup(e){const o=t.ref({show:!1,text:"",x:0,y:0});return{popover:o,calculateCircle:()=>{let c=314-e.circle*Math.PI;return c<=0&&(c=0),`stroke-dashoffset: ${c}`},calculatePointA:()=>e.pointA?`rotate(${-90+e.pointA*3.6} 100 80) translate(50, 0)`:"",calculatePointB:()=>e.pointB?`rotate(${-90+e.pointB*3.6} 100 80) translate(50, 0)`:"",mouseOver:(c,d)=>{const u=d==="a"?e.pointA:e.pointB;o.value={show:!0,text:`${u}%`,x:c.clientX,y:c.clientY}},mouseOut:()=>{o.value.show=!1}}}}),$l={viewBox:"40 20 120 120"},Vl=t.createElementVNode("defs",null,[t.createElementVNode("filter",{id:"blurs"},[t.createElementVNode("feOffset",{result:"offOut",in:"SourceGraphic",dx:"0",dy:"0"}),t.createElementVNode("feGaussianBlur",{result:"blurOut",in:"offOut",stdDeviation:"0.8"}),t.createElementVNode("feBlend",{in:"SourceGraphic",in2:"blurOut",mode:"normal"})])],-1),Tl=["stroke"],Sl=["stroke"],Bl=["r","transform","fill"],Il=["r","transform","fill"],Ol={dx:"100",dy:"90",fill:"#333","text-anchor":"middle",style:{"font-size":"28px"}};function Dl(e,o,n,r,l,p){const s=t.resolveComponent("NPopover");return t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createElementBlock("svg",$l,[Vl,t.createElementVNode("circle",{transform:"rotate(-90 100 80)",cx:"100",cy:"80",r:"50",fill:"none","stroke-width":"10","stroke-dashoffset":"0",stroke:e.styles.backgroundBg},null,8,Tl),t.createElementVNode("circle",{class:"oc-circle-round","stroke-linecap":"round",transform:"rotate(-90 100 80)",cx:"100",cy:"80",r:"50",fill:"none","stroke-width":"10",style:t.normalizeStyle(e.calculateCircle()),stroke:e.styles.processBg},null,12,Sl),e.pointA?(t.openBlock(),t.createElementBlock("circle",{key:0,class:"oc-circle-round",filter:"url(#blurs)",cx:"100",cy:"80",r:e.pointSize,"stroke-width":"0",transform:e.calculatePointA(),fill:e.styles.pointABg,onMouseover:o[0]||(o[0]=c=>{e.mouseOver(c,"a")}),onMouseout:o[1]||(o[1]=(...c)=>e.mouseOut&&e.mouseOut(...c))},null,40,Bl)):t.createCommentVNode("",!0),e.pointB?(t.openBlock(),t.createElementBlock("circle",{key:1,class:"oc-circle-round",filter:"url(#blurs)",cx:"100",cy:"80",r:e.pointSize,"stroke-width":"0",transform:e.calculatePointB(),fill:e.styles.pointBBg,onMouseover:o[2]||(o[2]=c=>{e.mouseOver(c,"b")}),onMouseout:o[3]||(o[3]=(...c)=>e.mouseOut&&e.mouseOut(...c))},null,40,Il)):t.createCommentVNode("",!0),t.createElementVNode("text",Ol,t.toDisplayString(e.circle)+"% ",1)])),t.createVNode(s,{show:e.popover.show,x:e.popover.x,y:e.popover.y,"show-arrow":!1,trigger:"manual"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.popover.text),1)]),_:1},8,["show","x","y"])],64)}const wo=I(kl,[["render",Dl]]),re=J.createRouter({history:J.createWebHistory(),routes:[],scrollBehavior:()=>({left:0,top:0})}),It=document.querySelector("html");re.beforeEach(()=>{It==null||It.removeAttribute("style")});const Pl=t.defineComponent({name:"OcError",components:{NButton:f.NButton},props:{type:{type:String,default:"404"}},setup(e){const o={404:{img:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/404.jpg",txt:"404",title:"404 页面走丢了",title2:"Something's missing."},500:{img:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/500.png",txt:"500",title:"服务暂时中断,请稍后重试.",title2:"Oops! No Internet connection found."}},n=t.ref({img:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/404.jpg",txt:"404",title:"404 页面走丢了",title2:"Something's missing."}),r=()=>{re.push(E.platformUrl)},l=t.ref();return t.onMounted(()=>{n.value=o[e.type],l.value=setInterval(()=>{re.push(E.platformUrl)},3e3)}),t.onBeforeUnmount(()=>{clearInterval(l.value)}),{goBack:r,content:n}}}),El={class:"com-card flex-center oc-error"},Al=["src","alt"],Ml={class:"oc-miss-txt"},Fl={class:"oc-miss-title"},jl={class:"oc-miss-title2"};function xl(e,o,n,r,l,p){const s=t.resolveComponent("NButton");return t.openBlock(),t.createElementBlock("div",El,[t.createElementVNode("img",{src:e.content.img,alt:e.content.txt,width:"360"},null,8,Al),t.createElementVNode("div",Ml,t.toDisplayString(e.content.txt),1),t.createElementVNode("p",Fl,t.toDisplayString(e.content.title),1),t.createElementVNode("p",jl,t.toDisplayString(e.content.title2),1),t.createVNode(s,{tertiary:"",onClick:e.goBack},{default:t.withCtx(()=>[t.createTextVNode("返回首页")]),_:1},8,["onClick"])])}const No=I(Pl,[["render",xl]]),zl=t.defineComponent({name:"OcFooter",props:{version:{type:String,default:""}}}),Ll={class:"oc-footer"},Rl=t.createElementVNode("span",{style:{"font-family":"Arial, Helvetica, sans-serif"}},"©",-1),ql=t.createElementVNode("a",{href:"https://beian.miit.gov.cn/",target:"_blank",class:"oc-footer-record"}," 沪ICP备 18025935号-3 ",-1);function Gl(e,o,n,r,l,p){return t.openBlock(),t.createElementBlock("footer",Ll,[t.createTextVNode(" Copyright "),Rl,t.createTextVNode(" 2020-2024 "+t.toDisplayString(e.$t("Common.title"))+" ",1),e.version?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("v"+t.toDisplayString(e.version)+" ",1)],64)):t.createCommentVNode("",!0),ql])}const yo=I(zl,[["render",Gl]]);var Je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Co(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Hl(){this.__data__=[],this.size=0}var Ul=Hl;function Kl(e,o){return e===o||e!==e&&o!==o}var bo=Kl,Wl=bo;function Jl(e,o){for(var n=e.length;n--;)if(Wl(e[n][0],o))return n;return-1}var Xe=Jl,Xl=Xe,Ql=Array.prototype,Yl=Ql.splice;function Zl(e){var o=this.__data__,n=Xl(o,e);if(n<0)return!1;var r=o.length-1;return n==r?o.pop():Yl.call(o,n,1),--this.size,!0}var vl=Zl,es=Xe;function ts(e){var o=this.__data__,n=es(o,e);return n<0?void 0:o[n][1]}var os=ts,ns=Xe;function as(e){return ns(this.__data__,e)>-1}var rs=as,ls=Xe;function ss(e,o){var n=this.__data__,r=ls(n,e);return r<0?(++this.size,n.push([e,o])):n[r][1]=o,this}var cs=ss,is=Ul,ds=vl,ps=os,fs=rs,us=cs;function ye(e){var o=-1,n=e==null?0:e.length;for(this.clear();++o<n;){var r=e[o];this.set(r[0],r[1])}}ye.prototype.clear=is,ye.prototype.delete=ds,ye.prototype.get=ps,ye.prototype.has=fs,ye.prototype.set=us;var Qe=ye,ms=Qe;function hs(){this.__data__=new ms,this.size=0}var gs=hs;function ws(e){var o=this.__data__,n=o.delete(e);return this.size=o.size,n}var Ns=ws;function ys(e){return this.__data__.get(e)}var Cs=ys;function bs(e){return this.__data__.has(e)}var _s=bs,ks=typeof Je=="object"&&Je&&Je.Object===Object&&Je,_o=ks,$s=_o,Vs=typeof self=="object"&&self&&self.Object===Object&&self,Ts=$s||Vs||Function("return this")(),v=Ts,Ss=v,Bs=Ss.Symbol,Ot=Bs,ko=Ot,$o=Object.prototype,Is=$o.hasOwnProperty,Os=$o.toString,Pe=ko?ko.toStringTag:void 0;function Ds(e){var o=Is.call(e,Pe),n=e[Pe];try{e[Pe]=void 0;var r=!0}catch{}var l=Os.call(e);return r&&(o?e[Pe]=n:delete e[Pe]),l}var Ps=Ds,Es=Object.prototype,As=Es.toString;function Ms(e){return As.call(e)}var Fs=Ms,Vo=Ot,js=Ps,xs=Fs,zs="[object Null]",Ls="[object Undefined]",To=Vo?Vo.toStringTag:void 0;function Rs(e){return e==null?e===void 0?Ls:zs:To&&To in Object(e)?js(e):xs(e)}var Ee=Rs;function qs(e){var o=typeof e;return e!=null&&(o=="object"||o=="function")}var me=qs,Gs=Ee,Hs=me,Us="[object AsyncFunction]",Ks="[object Function]",Ws="[object GeneratorFunction]",Js="[object Proxy]";function Xs(e){if(!Hs(e))return!1;var o=Gs(e);return o==Ks||o==Ws||o==Us||o==Js}var So=Xs,Qs=v,Ys=Qs["__core-js_shared__"],Zs=Ys,Dt=Zs,Bo=function(){var e=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function vs(e){return!!Bo&&Bo in e}var ec=vs,tc=Function.prototype,oc=tc.toString;function nc(e){if(e!=null){try{return oc.call(e)}catch{}try{return e+""}catch{}}return""}var Io=nc,ac=So,rc=ec,lc=me,sc=Io,cc=/[\\^$.*+?()[\]{}|]/g,ic=/^\[object .+?Constructor\]$/,dc=Function.prototype,pc=Object.prototype,fc=dc.toString,uc=pc.hasOwnProperty,mc=RegExp("^"+fc.call(uc).replace(cc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hc(e){if(!lc(e)||rc(e))return!1;var o=ac(e)?mc:ic;return o.test(sc(e))}var gc=hc;function wc(e,o){return e==null?void 0:e[o]}var Nc=wc,yc=gc,Cc=Nc;function bc(e,o){var n=Cc(e,o);return yc(n)?n:void 0}var he=bc,_c=he,kc=v,$c=_c(kc,"Map"),Pt=$c,Vc=he,Tc=Vc(Object,"create"),Ye=Tc,Oo=Ye;function Sc(){this.__data__=Oo?Oo(null):{},this.size=0}var Bc=Sc;function Ic(e){var o=this.has(e)&&delete this.__data__[e];return this.size-=o?1:0,o}var Oc=Ic,Dc=Ye,Pc="__lodash_hash_undefined__",Ec=Object.prototype,Ac=Ec.hasOwnProperty;function Mc(e){var o=this.__data__;if(Dc){var n=o[e];return n===Pc?void 0:n}return Ac.call(o,e)?o[e]:void 0}var Fc=Mc,jc=Ye,xc=Object.prototype,zc=xc.hasOwnProperty;function Lc(e){var o=this.__data__;return jc?o[e]!==void 0:zc.call(o,e)}var Rc=Lc,qc=Ye,Gc="__lodash_hash_undefined__";function Hc(e,o){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=qc&&o===void 0?Gc:o,this}var Uc=Hc,Kc=Bc,Wc=Oc,Jc=Fc,Xc=Rc,Qc=Uc;function Ce(e){var o=-1,n=e==null?0:e.length;for(this.clear();++o<n;){var r=e[o];this.set(r[0],r[1])}}Ce.prototype.clear=Kc,Ce.prototype.delete=Wc,Ce.prototype.get=Jc,Ce.prototype.has=Xc,Ce.prototype.set=Qc;var Yc=Ce,Do=Yc,Zc=Qe,vc=Pt;function ei(){this.size=0,this.__data__={hash:new Do,map:new(vc||Zc),string:new Do}}var ti=ei;function oi(e){var o=typeof e;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?e!=="__proto__":e===null}var ni=oi,ai=ni;function ri(e,o){var n=e.__data__;return ai(o)?n[typeof o=="string"?"string":"hash"]:n.map}var Ze=ri,li=Ze;function si(e){var o=li(this,e).delete(e);return this.size-=o?1:0,o}var ci=si,ii=Ze;function di(e){return ii(this,e).get(e)}var pi=di,fi=Ze;function ui(e){return fi(this,e).has(e)}var mi=ui,hi=Ze;function gi(e,o){var n=hi(this,e),r=n.size;return n.set(e,o),this.size+=n.size==r?0:1,this}var wi=gi,Ni=ti,yi=ci,Ci=pi,bi=mi,_i=wi;function be(e){var o=-1,n=e==null?0:e.length;for(this.clear();++o<n;){var r=e[o];this.set(r[0],r[1])}}be.prototype.clear=Ni,be.prototype.delete=yi,be.prototype.get=Ci,be.prototype.has=bi,be.prototype.set=_i;var ki=be,$i=Qe,Vi=Pt,Ti=ki,Si=200;function Bi(e,o){var n=this.__data__;if(n instanceof $i){var r=n.__data__;if(!Vi||r.length<Si-1)return r.push([e,o]),this.size=++n.size,this;n=this.__data__=new Ti(r)}return n.set(e,o),this.size=n.size,this}var Ii=Bi,Oi=Qe,Di=gs,Pi=Ns,Ei=Cs,Ai=_s,Mi=Ii;function _e(e){var o=this.__data__=new Oi(e);this.size=o.size}_e.prototype.clear=Di,_e.prototype.delete=Pi,_e.prototype.get=Ei,_e.prototype.has=Ai,_e.prototype.set=Mi;var Fi=_e;function ji(e,o){for(var n=-1,r=e==null?0:e.length;++n<r&&o(e[n],n,e)!==!1;);return e}var xi=ji,zi=he,Li=function(){try{var e=zi(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Ri=Li,Po=Ri;function qi(e,o,n){o=="__proto__"&&Po?Po(e,o,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[o]=n}var Eo=qi,Gi=Eo,Hi=bo,Ui=Object.prototype,Ki=Ui.hasOwnProperty;function Wi(e,o,n){var r=e[o];(!(Ki.call(e,o)&&Hi(r,n))||n===void 0&&!(o in e))&&Gi(e,o,n)}var Ao=Wi,Ji=Ao,Xi=Eo;function Qi(e,o,n,r){var l=!n;n||(n={});for(var p=-1,s=o.length;++p<s;){var c=o[p],d=r?r(n[c],e[c],c,n,e):void 0;d===void 0&&(d=e[c]),l?Xi(n,c,d):Ji(n,c,d)}return n}var ve=Qi;function Yi(e,o){for(var n=-1,r=Array(e);++n<e;)r[n]=o(n);return r}var Zi=Yi;function vi(e){return e!=null&&typeof e=="object"}var ke=vi,ed=Ee,td=ke,od="[object Arguments]";function nd(e){return td(e)&&ed(e)==od}var ad=nd,Mo=ad,rd=ke,Fo=Object.prototype,ld=Fo.hasOwnProperty,sd=Fo.propertyIsEnumerable,cd=Mo(function(){return arguments}())?Mo:function(e){return rd(e)&&ld.call(e,"callee")&&!sd.call(e,"callee")},id=cd,dd=Array.isArray,Et=dd,et={exports:{}};function pd(){return!1}var fd=pd;et.exports,function(e,o){var n=v,r=fd,l=o&&!o.nodeType&&o,p=l&&!0&&e&&!e.nodeType&&e,s=p&&p.exports===l,c=s?n.Buffer:void 0,d=c?c.isBuffer:void 0,u=d||r;e.exports=u}(et,et.exports);var jo=et.exports,ud=9007199254740991,md=/^(?:0|[1-9]\d*)$/;function hd(e,o){var n=typeof e;return o=o??ud,!!o&&(n=="number"||n!="symbol"&&md.test(e))&&e>-1&&e%1==0&&e<o}var gd=hd,wd=9007199254740991;function Nd(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=wd}var xo=Nd,yd=Ee,Cd=xo,bd=ke,_d="[object Arguments]",kd="[object Array]",$d="[object Boolean]",Vd="[object Date]",Td="[object Error]",Sd="[object Function]",Bd="[object Map]",Id="[object Number]",Od="[object Object]",Dd="[object RegExp]",Pd="[object Set]",Ed="[object String]",Ad="[object WeakMap]",Md="[object ArrayBuffer]",Fd="[object DataView]",jd="[object Float32Array]",xd="[object Float64Array]",zd="[object Int8Array]",Ld="[object Int16Array]",Rd="[object Int32Array]",qd="[object Uint8Array]",Gd="[object Uint8ClampedArray]",Hd="[object Uint16Array]",Ud="[object Uint32Array]",q={};q[jd]=q[xd]=q[zd]=q[Ld]=q[Rd]=q[qd]=q[Gd]=q[Hd]=q[Ud]=!0,q[_d]=q[kd]=q[Md]=q[$d]=q[Fd]=q[Vd]=q[Td]=q[Sd]=q[Bd]=q[Id]=q[Od]=q[Dd]=q[Pd]=q[Ed]=q[Ad]=!1;function Kd(e){return bd(e)&&Cd(e.length)&&!!q[yd(e)]}var Wd=Kd;function Jd(e){return function(o){return e(o)}}var At=Jd,tt={exports:{}};tt.exports,function(e,o){var n=_o,r=o&&!o.nodeType&&o,l=r&&!0&&e&&!e.nodeType&&e,p=l&&l.exports===r,s=p&&n.process,c=function(){try{var d=l&&l.require&&l.require("util").types;return d||s&&s.binding&&s.binding("util")}catch{}}();e.exports=c}(tt,tt.exports);var Mt=tt.exports,Xd=Wd,Qd=At,zo=Mt,Lo=zo&&zo.isTypedArray,Yd=Lo?Qd(Lo):Xd,Zd=Yd,vd=Zi,ep=id,tp=Et,op=jo,np=gd,ap=Zd,rp=Object.prototype,lp=rp.hasOwnProperty;function sp(e,o){var n=tp(e),r=!n&&ep(e),l=!n&&!r&&op(e),p=!n&&!r&&!l&&ap(e),s=n||r||l||p,c=s?vd(e.length,String):[],d=c.length;for(var u in e)(o||lp.call(e,u))&&!(s&&(u=="length"||l&&(u=="offset"||u=="parent")||p&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||np(u,d)))&&c.push(u);return c}var Ro=sp,cp=Object.prototype;function ip(e){var o=e&&e.constructor,n=typeof o=="function"&&o.prototype||cp;return e===n}var Ft=ip;function dp(e,o){return function(n){return e(o(n))}}var qo=dp,pp=qo,fp=pp(Object.keys,Object),up=fp,mp=Ft,hp=up,gp=Object.prototype,wp=gp.hasOwnProperty;function Np(e){if(!mp(e))return hp(e);var o=[];for(var n in Object(e))wp.call(e,n)&&n!="constructor"&&o.push(n);return o}var yp=Np,Cp=So,bp=xo;function _p(e){return e!=null&&bp(e.length)&&!Cp(e)}var Go=_p,kp=Ro,$p=yp,Vp=Go;function Tp(e){return Vp(e)?kp(e):$p(e)}var jt=Tp,Sp=ve,Bp=jt;function Ip(e,o){return e&&Sp(o,Bp(o),e)}var Op=Ip;function Dp(e){var o=[];if(e!=null)for(var n in Object(e))o.push(n);return o}var Pp=Dp,Ep=me,Ap=Ft,Mp=Pp,Fp=Object.prototype,jp=Fp.hasOwnProperty;function xp(e){if(!Ep(e))return Mp(e);var o=Ap(e),n=[];for(var r in e)r=="constructor"&&(o||!jp.call(e,r))||n.push(r);return n}var zp=xp,Lp=Ro,Rp=zp,qp=Go;function Gp(e){return qp(e)?Lp(e,!0):Rp(e)}var xt=Gp,Hp=ve,Up=xt;function Kp(e,o){return e&&Hp(o,Up(o),e)}var Wp=Kp,ot={exports:{}};ot.exports,function(e,o){var n=v,r=o&&!o.nodeType&&o,l=r&&!0&&e&&!e.nodeType&&e,p=l&&l.exports===r,s=p?n.Buffer:void 0,c=s?s.allocUnsafe:void 0;function d(u,m){if(m)return u.slice();var h=u.length,g=c?c(h):new u.constructor(h);return u.copy(g),g}e.exports=d}(ot,ot.exports);var Jp=ot.exports;function Xp(e,o){var n=-1,r=e.length;for(o||(o=Array(r));++n<r;)o[n]=e[n];return o}var Qp=Xp;function Yp(e,o){for(var n=-1,r=e==null?0:e.length,l=0,p=[];++n<r;){var s=e[n];o(s,n,e)&&(p[l++]=s)}return p}var Zp=Yp;function vp(){return[]}var Ho=vp,ef=Zp,tf=Ho,of=Object.prototype,nf=of.propertyIsEnumerable,Uo=Object.getOwnPropertySymbols,af=Uo?function(e){return e==null?[]:(e=Object(e),ef(Uo(e),function(o){return nf.call(e,o)}))}:tf,zt=af,rf=ve,lf=zt;function sf(e,o){return rf(e,lf(e),o)}var cf=sf;function df(e,o){for(var n=-1,r=o.length,l=e.length;++n<r;)e[l+n]=o[n];return e}var Ko=df,pf=qo,ff=pf(Object.getPrototypeOf,Object),Wo=ff,uf=Ko,mf=Wo,hf=zt,gf=Ho,wf=Object.getOwnPropertySymbols,Nf=wf?function(e){for(var o=[];e;)uf(o,hf(e)),e=mf(e);return o}:gf,Jo=Nf,yf=ve,Cf=Jo;function bf(e,o){return yf(e,Cf(e),o)}var _f=bf,kf=Ko,$f=Et;function Vf(e,o,n){var r=o(e);return $f(e)?r:kf(r,n(e))}var Xo=Vf,Tf=Xo,Sf=zt,Bf=jt;function If(e){return Tf(e,Bf,Sf)}var Of=If,Df=Xo,Pf=Jo,Ef=xt;function Af(e){return Df(e,Ef,Pf)}var Mf=Af,Ff=he,jf=v,xf=Ff(jf,"DataView"),zf=xf,Lf=he,Rf=v,qf=Lf(Rf,"Promise"),Gf=qf,Hf=he,Uf=v,Kf=Hf(Uf,"Set"),Wf=Kf,Jf=he,Xf=v,Qf=Jf(Xf,"WeakMap"),Yf=Qf,Lt=zf,Rt=Pt,qt=Gf,Gt=Wf,Ht=Yf,Qo=Ee,$e=Io,Yo="[object Map]",Zf="[object Object]",Zo="[object Promise]",vo="[object Set]",en="[object WeakMap]",tn="[object DataView]",vf=$e(Lt),eu=$e(Rt),tu=$e(qt),ou=$e(Gt),nu=$e(Ht),ge=Qo;(Lt&&ge(new Lt(new ArrayBuffer(1)))!=tn||Rt&&ge(new Rt)!=Yo||qt&&ge(qt.resolve())!=Zo||Gt&&ge(new Gt)!=vo||Ht&&ge(new Ht)!=en)&&(ge=function(e){var o=Qo(e),n=o==Zf?e.constructor:void 0,r=n?$e(n):"";if(r)switch(r){case vf:return tn;case eu:return Yo;case tu:return Zo;case ou:return vo;case nu:return en}return o});var Ut=ge,au=Object.prototype,ru=au.hasOwnProperty;function lu(e){var o=e.length,n=new e.constructor(o);return o&&typeof e[0]=="string"&&ru.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var su=lu,cu=v,iu=cu.Uint8Array,du=iu,on=du;function pu(e){var o=new e.constructor(e.byteLength);return new on(o).set(new on(e)),o}var Kt=pu,fu=Kt;function uu(e,o){var n=o?fu(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var mu=uu,hu=/\w*$/;function gu(e){var o=new e.constructor(e.source,hu.exec(e));return o.lastIndex=e.lastIndex,o}var wu=gu,nn=Ot,an=nn?nn.prototype:void 0,rn=an?an.valueOf:void 0;function Nu(e){return rn?Object(rn.call(e)):{}}var yu=Nu,Cu=Kt;function bu(e,o){var n=o?Cu(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var _u=bu,ku=Kt,$u=mu,Vu=wu,Tu=yu,Su=_u,Bu="[object Boolean]",Iu="[object Date]",Ou="[object Map]",Du="[object Number]",Pu="[object RegExp]",Eu="[object Set]",Au="[object String]",Mu="[object Symbol]",Fu="[object ArrayBuffer]",ju="[object DataView]",xu="[object Float32Array]",zu="[object Float64Array]",Lu="[object Int8Array]",Ru="[object Int16Array]",qu="[object Int32Array]",Gu="[object Uint8Array]",Hu="[object Uint8ClampedArray]",Uu="[object Uint16Array]",Ku="[object Uint32Array]";function Wu(e,o,n){var r=e.constructor;switch(o){case Fu:return ku(e);case Bu:case Iu:return new r(+e);case ju:return $u(e,n);case xu:case zu:case Lu:case Ru:case qu:case Gu:case Hu:case Uu:case Ku:return Su(e,n);case Ou:return new r;case Du:case Au:return new r(e);case Pu:return Vu(e);case Eu:return new r;case Mu:return Tu(e)}}var Ju=Wu,Xu=me,ln=Object.create,Qu=function(){function e(){}return function(o){if(!Xu(o))return{};if(ln)return ln(o);e.prototype=o;var n=new e;return e.prototype=void 0,n}}(),Yu=Qu,Zu=Yu,vu=Wo,em=Ft;function tm(e){return typeof e.constructor=="function"&&!em(e)?Zu(vu(e)):{}}var om=tm,nm=Ut,am=ke,rm="[object Map]";function lm(e){return am(e)&&nm(e)==rm}var sm=lm,cm=sm,im=At,sn=Mt,cn=sn&&sn.isMap,dm=cn?im(cn):cm,pm=dm,fm=Ut,um=ke,mm="[object Set]";function hm(e){return um(e)&&fm(e)==mm}var gm=hm,wm=gm,Nm=At,dn=Mt,pn=dn&&dn.isSet,ym=pn?Nm(pn):wm,Cm=ym,bm=Fi,_m=xi,km=Ao,$m=Op,Vm=Wp,Tm=Jp,Sm=Qp,Bm=cf,Im=_f,Om=Of,Dm=Mf,Pm=Ut,Em=su,Am=Ju,Mm=om,Fm=Et,jm=jo,xm=pm,zm=me,Lm=Cm,Rm=jt,qm=xt,Gm=1,Hm=2,Um=4,fn="[object Arguments]",Km="[object Array]",Wm="[object Boolean]",Jm="[object Date]",Xm="[object Error]",un="[object Function]",Qm="[object GeneratorFunction]",Ym="[object Map]",Zm="[object Number]",mn="[object Object]",vm="[object RegExp]",eh="[object Set]",th="[object String]",oh="[object Symbol]",nh="[object WeakMap]",ah="[object ArrayBuffer]",rh="[object DataView]",lh="[object Float32Array]",sh="[object Float64Array]",ch="[object Int8Array]",ih="[object Int16Array]",dh="[object Int32Array]",ph="[object Uint8Array]",fh="[object Uint8ClampedArray]",uh="[object Uint16Array]",mh="[object Uint32Array]",R={};R[fn]=R[Km]=R[ah]=R[rh]=R[Wm]=R[Jm]=R[lh]=R[sh]=R[ch]=R[ih]=R[dh]=R[Ym]=R[Zm]=R[mn]=R[vm]=R[eh]=R[th]=R[oh]=R[ph]=R[fh]=R[uh]=R[mh]=!0,R[Xm]=R[un]=R[nh]=!1;function nt(e,o,n,r,l,p){var s,c=o&Gm,d=o&Hm,u=o&Um;if(n&&(s=l?n(e,r,l,p):n(e)),s!==void 0)return s;if(!zm(e))return e;var m=Fm(e);if(m){if(s=Em(e),!c)return Sm(e,s)}else{var h=Pm(e),g=h==un||h==Qm;if(jm(e))return Tm(e,c);if(h==mn||h==fn||g&&!l){if(s=d||g?{}:Mm(e),!c)return d?Im(e,Vm(s,e)):Bm(e,$m(s,e))}else{if(!R[h])return l?e:{};s=Am(e,h,c)}}p||(p=new bm);var N=p.get(e);if(N)return N;p.set(e,s),Lm(e)?e.forEach(function(b){s.add(nt(b,o,n,b,e,p))}):xm(e)&&e.forEach(function(b,V){s.set(V,nt(b,o,n,V,e,p))});var k=u?d?Dm:Om:d?qm:Rm,_=m?void 0:k(e);return _m(_||e,function(b,V){_&&(V=b,b=e[V]),km(s,V,nt(b,o,n,V,e,p))}),s}var hh=nt,gh=hh,wh=1,Nh=4;function yh(e){return gh(e,wh|Nh)}var Ch=yh;const Q=Co(Ch),bh=t.defineComponent({name:"OcForm",components:{NIcon:f.NIcon,NGrid:f.NGrid,NForm:f.NForm,NFormItemGi:f.NFormItemGi,NButton:f.NButton,NInput:f.NInput,NSelect:f.NSelect,NInputNumber:f.NInputNumber,NDatePicker:f.NDatePicker,NTimePicker:f.NTimePicker,NSwitch:f.NSwitch,NUpload:f.NUpload,NUploadDragger:f.NUploadDragger,IconMailInboxAdd:Se},props:{items:{required:!0,type:Array,default:()=>[]},data:{required:!0,type:Object,default:()=>({})},edit:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},labelWidth:{type:[String,Number],default:"auto"},labelAlign:{type:String,default:"left"},labelPlacement:{type:String,default:"top"}},setup(e,{expose:o}){const n=t.ref(),r=t.ref({}),l=t.ref([]),{t:p}=Y.useI18n(),s=k=>!(e.edit&&k.edit&&!k.edit.show),c=()=>{const k=Q(e.items);k.forEach(_=>{if(_.rule&&_.rule.validator&&typeof _.rule.validator=="string"){const b=_.rule.validator,V=new Function("rule","value",b);_.rule.validator=(T,i)=>V(T,i)}if(_.input==="date"&&_.isDateDisabled&&typeof _.isDateDisabled=="string"){const b=_.isDateDisabled,V=new Function("ts","detail",b);_.isDateDisabled=(T,i)=>V(T,i)}_.input==="select"&&_.fallbackOption&&_.multiple&&(!r.value[_.key]||r.value[_.key].length===0)&&(r.value[_.key]=[""])}),l.value=k},d=(k,_)=>{if(k.updateValue){const b=Q(r.value);if(typeof k.updateValue=="string"){const V=k.updateValue;new Function("value","formValue",V)(_,b)}else k.updateValue(_,b)}},u=(k,_)=>new Promise((b,V)=>{k.file.file&&(r.value[_]=k.file.file,b()),V()}),m=(k,_)=>{k.length===0&&(r.value[_]="")},h=k=>k.fallbackOption?typeof k.fallbackOption=="boolean"?()=>({label:p("Common.message.all"),value:"",disabled:!0}):k.fallbackOption:!1,g=()=>new Promise((k,_)=>{var b;(b=n.value)==null||b.validate(V=>{V?_():k(Q(r.value))})}),N=()=>{var k;(k=n.value)==null||k.restoreValidation()};return t.onMounted(()=>{r.value=Q(e.data),c()}),o({validate:g,restoreValidation:N}),t.watch(()=>e.items,()=>{c()},{deep:!0}),t.watch(()=>e.data,k=>{r.value=Q(k)},{deep:!0}),{formRef:n,formValue:r,formItems:l,cloneDeep:Q,updateValue:d,beforeUpload:u,uploadChange:m,elementShow:s,selectFallback:h}}}),_h=t.createElementVNode("br",null,null,-1),kh=t.createElementVNode("p",null,"点击或者拖动文件到该区域来上传",-1),$h=t.createElementVNode("p",null," 请不要上传敏感数据,比如你的银行卡号和密码,信用卡号有效期和安全码 ",-1);function Vh(e,o,n,r,l,p){const s=t.resolveComponent("NInput"),c=t.resolveComponent("NInputNumber"),d=t.resolveComponent("NDatePicker"),u=t.resolveComponent("NSelect"),m=t.resolveComponent("NTimePicker"),h=t.resolveComponent("NSwitch"),g=t.resolveComponent("IconMailInboxAdd"),N=t.resolveComponent("NIcon"),k=t.resolveComponent("NUploadDragger"),_=t.resolveComponent("NUpload"),b=t.resolveComponent("NFormItemGi"),V=t.resolveComponent("NGrid"),T=t.resolveComponent("NForm");return t.openBlock(),t.createBlock(T,{ref:"formRef",model:e.formValue,disabled:e.disabled,inline:e.inline,labelWidth:e.labelWidth,labelAlign:e.labelAlign,labelPlacement:e.labelPlacement},{default:t.withCtx(()=>[t.createVNode(V,{cols:12,"x-gap":8},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.formItems,i=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:i.key},[e.elementShow(i)?(t.openBlock(),t.createBlock(b,{key:0,span:i.span||6,label:i.label,path:i.key,rule:i.rule},{default:t.withCtx(()=>[i.input==="input"?(t.openBlock(),t.createBlock(s,{key:0,value:e.formValue[i.key],"onUpdate:value":$=>e.formValue[i.key]=$,type:i.type,placeholder:i.placeholder,disabled:e.edit&&i.edit?i.edit.disabled:i.disabled,readonly:e.edit&&i.edit?i.edit.readonly:i.readonly,clearable:i.clearable,minlength:i.minlength,maxlength:i.maxlength,rows:i.rows,"show-count":!!i.maxlength,"on-update:value":$=>{e.formValue[i.key]=$,e.updateValue(i,$)}},null,8,["value","onUpdate:value","type","placeholder","disabled","readonly","clearable","minlength","maxlength","rows","show-count","on-update:value"])):t.createCommentVNode("",!0),i.input==="number"?(t.openBlock(),t.createBlock(c,{key:1,value:e.formValue[i.key],"onUpdate:value":$=>e.formValue[i.key]=$,placeholder:i.placeholder,disabled:e.edit&&i.edit?i.edit.disabled:i.disabled,readonly:e.edit&&i.edit?i.edit.readonly:i.readonly,clearable:i.clearable,min:i.min,max:i.max,step:i.step,showButton:i.showButton,"on-update:value":$=>{e.formValue[i.key]=$,e.updateValue(i,$)}},null,8,["value","onUpdate:value","placeholder","disabled","readonly","clearable","min","max","step","showButton","on-update:value"])):t.createCommentVNode("",!0),i.input==="date"&&!i.format?(t.openBlock(),t.createBlock(d,{key:2,value:e.formValue[i.key],"onUpdate:value":$=>e.formValue[i.key]=$,type:i.type,placeholder:i.placeholder,disabled:e.edit&&i.edit?i.edit.disabled:i.disabled,"input-readonly":e.edit&&i.edit?i.edit.readonly:i.readonly,clearable:i.clearable,"is-date-disabled":($,D)=>i.isDateDisabled?i.isDateDisabled($,D):!1,"close-on-select":"","on-update:value":$=>{e.formValue[i.key]=$,e.updateValue(i,$)}},null,8,["value","onUpdate:value","type","placeholder","disabled","input-readonly","clearable","is-date-disabled","on-update:value"])):t.createCommentVNode("",!0),i.input==="date"&&i.format?(t.openBlock(),t.createBlock(d,{key:3,"formatted-value":e.formValue[i.key],"onUpdate:formattedValue":$=>e.formValue[i.key]=$,type:i.type,placeholder:i.placeholder,disabled:e.edit&&i.edit?i.edit.disabled:i.disabled,"input-readonly":e.edit&&i.edit?i.edit.readonly:i.readonly,clearable:i.clearable,format:i.format,"is-date-disabled":($,D)=>i.isDateDisabled?i.isDateDisabled($,D):!1,"close-on-select":"","on-update:formatted-value":$=>{e.formValue[i.key]=$,e.updateValue(i,$)}},null,8,["formatted-value","onUpdate:formattedValue","type","placeholder","disabled","input-readonly","clearable","format","is-date-disabled","on-update:formatted-value"])):t.createCommentVNode("",!0),i.input==="select"?(t.openBlock(),t.createBlock(u,{key:4,value:e.formValue[i.key],"onUpdate:value":$=>e.formValue[i.key]=$,placeholder:i.placeholder,options:i.options,disabled:e.edit&&i.edit?i.edit.disabled:i.disabled,readonly:e.edit&&i.edit?i.edit.readonly:i.readonly,clearable:i.clearable,filterable:i.filterable,multiple:i.multiple,"fallback-option":e.selectFallback(i),maxTagCount:i.maxTagCount,"on-update:value":$=>{let D=$,B=$;if(i.multiple){let F=$.filter(a=>a);F.length===0?(D=[""],B=[]):(D=F,B=F)}e.formValue[i.key]=D,e.updateValue(i,B)}},null,8,["value","onUpdate:value","placeholder","options","disabled","readonly","clearable","filterable","multiple","fallback-option","maxTagCount","on-update:value"])):t.createCommentVNode("",!0),i.input==="time"?(t.openBlock(),t.createBlock(m,{key:5,value:e.formValue[i.key],"onUpdate:value":$=>e.formValue[i.key]=$,placeholder:i.placeholder,format:i.format,disabled:e.edit&&i.edit?i.edit.disabled:i.disabled,readonly:e.edit&&i.edit?i.edit.readonly:i.readonly,clearable:i.clearable,"on-update:value":$=>{e.formValue[i.key]=$,e.updateValue(i,$)}},null,8,["value","onUpdate:value","placeholder","format","disabled","readonly","clearable","on-update:value"])):t.createCommentVNode("",!0),i.input==="switch"?(t.openBlock(),t.createBlock(h,{key:6,value:e.formValue[i.key],"onUpdate:value":$=>e.formValue[i.key]=$,disabled:e.edit&&i.edit?i.edit.disabled:i.disabled,size:"large","on-update:value":$=>{e.formValue[i.key]=$,e.updateValue(i,$)}},null,8,["value","onUpdate:value","disabled","on-update:value"])):t.createCommentVNode("",!0),i.input==="upload"?(t.openBlock(),t.createBlock(_,{key:7,"default-file-list":e.formValue[i.key]?[{id:"1",name:"File",status:"finished",url:e.formValue[i.key]}]:void 0,"on-before-upload":$=>{e.beforeUpload($,i.key)},accept:i.accept,disabled:e.edit&&i.edit?i.edit.disabled:i.disabled,max:i.max,"on-update:file-list":$=>{e.uploadChange($,i.key)},"directory-dnd":""},{default:t.withCtx(()=>[t.withDirectives(t.createVNode(k,null,{default:t.withCtx(()=>[t.createVNode(N,{size:"32"},{default:t.withCtx(()=>[t.createVNode(g)]),_:1}),_h,kh,$h]),_:2},1536),[[t.vShow,!e.formValue[i.key]]])]),_:2},1032,["default-file-list","on-before-upload","accept","disabled","max","on-update:file-list"])):t.createCommentVNode("",!0)]),_:2},1032,["span","label","path","rule"])):t.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1},8,["model","disabled","inline","labelWidth","labelAlign","labelPlacement"])}const hn=I(bh,[["render",Vh]]),Th=Object.prototype.hasOwnProperty;function gn(e,o){const n=[];for(const r in e){if(!Th.call(e,r))continue;const l=e[r],p=encodeURIComponent(r);let s;typeof l=="object"?s=gn(l,o?o+"["+p+"]":p):s=(o?o+"["+p+"]":p)+"="+encodeURIComponent(l),n.push(s)}return n.join("&")}const{notification:Wt}=f.createDiscreteApi(["notification"],{configProviderProps:{themeOverrides:{common:{borderRadius:"16px",borderRadiusSmall:"8px",primaryColor:"#8e54c8",primaryColorHover:"#9b66d0",primaryColorPressed:"#8e54c8",primaryColorSuppl:"#8e54c8",infoColor:"#2080f0",infoColorHover:"#57a4fd",infoColorPressed:"#2080f0",infoColorSuppl:"#2080f0",successColor:"#5dae57",successColorHover:"#70ce69",successColorPressed:"#5dae57",successColorSuppl:"#5dae57",warningColor:"#f0973a",warningColorHover:"#ffb05d",warningColorPressed:"#f0973a",warningColorSuppl:"#f0973a",errorColor:"#e65444",errorColorHover:"#fc6c5d",errorColorPressed:"#e65444",errorColorSuppl:"#e65444",cardColor:"#fff"},Button:{textColor:"rgb(var(--font))"},Notification:{borderRadius:"16px"}}},notificationProviderProps:{placement:"top"}}),Ve=dt.create({timeout:3e5,responseType:"json",headers:{platformType:"T1"}});let Jt=dt.CancelToken.source();Ve.interceptors.request.use(e=>{var n;e.cancelToken=Jt.token;const o=Z("token",!1);if(e.headers&&o&&(e.headers["X-Auth-Token"]=o),((n=e.method)==null?void 0:n.toLocaleUpperCase())==="GET"){const r=gn(e.data);r&&(e.url=`${e.url}?${r}`)}return e},e=>Promise.reject(e)),Ve.interceptors.response.use(e=>{const o=e.data;if(e.config.responseType==="blob"||e.config.responseType==="text")return Promise.resolve(e.data);if(o.ok)return Promise.resolve(o.data);{let n=o.message;return(n.indexOf("Connection refused")>-1||n.indexOf("finishConnect")>-1)&&(n="网络错误,请稍后重试"),Wt.error({content:n,duration:3e3}),Promise.reject(n)}},e=>{if(e&&e.code==="ECONNABORTED"&&e.config&&e.config.url&&e.config.url.indexOf("auth/user/getCurrentUserInfo")>-1&&(po(),re.replace("/custom/500")),e&&e.response)switch(e.response.status){case 401:case 403:Be("token"),window.location.href="/login";break;default:return Wt.destroyAll(),Wt.error({content:"系统正在维护中,请稍后再试!",duration:3e3}),Promise.reject()}else return Promise.reject()});const Sh=()=>{Jt.cancel(),Jt=dt.CancelToken.source()},Xt="/apiserver/",wn=(e,o,n="json")=>Ve({url:`${Xt}${e}`,method:"GET",data:o,responseType:n}),U=(e,o={},n="json",r=3e5)=>Ve({url:`${Xt}${e}`,method:"POST",data:o,responseType:n,timeout:r}),Bh=e=>Ve(e),Qt=(e,o)=>Ve({headers:{"Content-Type":"multipart/form-data"},url:`${Xt}${e}`,method:"POST",data:o}),Nn=e=>{const o=JSON.parse(JSON.stringify(e));return o.password=je(o.password),U("api/user/v2/login",o)},Ih=()=>new Promise((e,o)=>{U("api/auth/user/getCurrentUserInfo",{},"json",1e4).then(n=>{const r=["046459"];n.commissioner=!1,r.includes(String(n.tenantLoginCode))&&(n.commissioner=!0);const l=n.ownedProducts?JSON.parse(n.ownedProducts):[];switch(l.includes(2)?n.platform_tdm=!0:n.platform_tdm=!1,l.includes(3)?n.platform_qms=!0:n.platform_qms=!1,l.includes(4)?n.platform_twin=!0:n.platform_twin=!1,l.includes(5)?n.platform_maintain=!0:n.platform_maintain=!1,l.includes(6)?n.platform_simple_tdm=!0:n.platform_simple_tdm=!1,n.systemType){case"Premium":n.systemType=1;break;case"Flagship":n.systemType=2;break;default:n.systemType=0;break}n.info=JSON.parse(n.info),e(n)}).catch(()=>{o()})}),Oh=()=>U("api/auth/user/logout"),Dh=()=>U("api/manager/message/markReadAll"),Ph=()=>U("api/auth/user/updateTenantRenewalStatus"),Eh=e=>U("api/manager/job/remove",e),Ah=e=>U("api/manager/job/retry",{jobId:e}),Mh=e=>new Promise((o,n)=>{const r=Oe(e);U("api/manager/job/page",r).then(l=>{const p=Ie(l);o(p)}).catch(()=>{n()})}),Yt=e=>new Promise((o,n)=>{const r=new FormData;r.append("jobType","EXPORT"),Object.keys(e).forEach(l=>{e.query&&l==="query"?r.append("query",JSON.stringify(e.query)):r.append(l,e[l])}),Qt("api/manager/job/submit",r).then(()=>{St(!0),o()}).catch(l=>{n(l)})}),Fh=e=>new Promise((o,n)=>{const r=Oe(e);r.status===-1&&(r.status=""),U("api/manager/message/messagePage",r).then(l=>{const p=Ie(l);o({data:p,unRead:l.unRead})}).catch(()=>{n()})}),jh=e=>U("api/manager/message/markRead",{messageId:e});let yn=!0;const C=t.reactive({commissioner:!1,factoryId:"",tenantLoginCode:"",thirdUserId:"",userId:"",email:"",name:"",realName:"",phone:"",description:"",tenantName:"",oeeStatus:0,ncFlg:0,info:{type:0,id:"",viewType:1,interval:5,theme:"light"},kind:0,systemType:0,password:"",enable:!0,platform_tdm:!1,platform_qms:!1,platform_twin:!1,platform_maintain:!1,platform_simple_tdm:!1,authorizationGroupArray:[],authorizationMachineArray:[],iot_menu_authorization:[],tdm_menu_authorization:[],qms_menu_authorization:[],maintain_menu_authorization:[],endTime:0,tenantStatus:1,renewalStatus:0,roleId:1,industryCategory:"0"});function xh(e){yn=e}function Zt(e){const o=window.location.host;if(o.includes("partexiot")){const n=Z("token",!1);C.industryCategory=e.industryCategory||"0",!o.includes("vpn")&&yn&&(e.industryCategory==="0"&&o.includes("printing")&&(window.location.href=`https://www.partexiot.cn/auth?auth=${n}`),e.industryCategory==="1"&&!o.includes("printing")&&(window.location.href=`https://printing.partexiot.cn/auth?auth=${n}`))}if(C.commissioner=e.commissioner,C.factoryId=e.factoryId,C.tenantLoginCode=e.tenantLoginCode,C.userId=e.userId,C.email=e.email,C.name=e.name,C.realName=e.realName,C.tenantName=e.tenantName,C.phone=e.phone,C.info=e.info,C.kind=e.kind,C.oeeStatus=e.oeeStatus||0,C.ncFlg=e.ncFlg||0,C.systemType=e.systemType,C.platform_tdm=e.platform_tdm,C.platform_qms=e.platform_qms,C.platform_twin=e.platform_twin,C.platform_maintain=e.platform_maintain,C.platform_simple_tdm=e.platform_simple_tdm,C.authorizationGroupArray=e.authorizationGroupArray||[],C.authorizationMachineArray=e.authorizationMachineArray||[],C.iot_menu_authorization=e.iot_menu_authorization||[],C.tdm_menu_authorization=e.tdm_menu_authorization||[],C.qms_menu_authorization=e.qms_menu_authorization||[],C.maintain_menu_authorization=e.maintain_menu_authorization||[],C.endTime=e.endTime??0,C.tenantStatus=e.tenantStatus??1,C.renewalStatus=e.renewalStatus??0,C.roleId=e.roleId||0,C.kind===1){const n=e.info,r=String(e.info.type);r==="0"&&re.replace(`/dashboard/list?machGroupId=${n.id}&theme=${n.theme||"light"}`),r==="1"&&re.replace(`/dashboard/single?machId=${n.id}&type=${n.viewType??1}&theme=${n.theme||"light"}`),r==="2"&&re.push(`/dashboard/carousel?theme=${n.theme||"light"}`),r==="3"&&re.push(`/dashboard/carouselist?theme=${n.theme||"light"}`),r==="4"&&re.push(`/dashboard/performance?schemeId=${n.id}&theme=${n.theme||"light"}`)}}function at(){return new Promise((e,o)=>{Ih().then(n=>{Zt(n),e(n)}).catch(()=>{o()})})}function rt(){C.factoryId="",C.commissioner=!1,C.tenantLoginCode="",C.userId="",C.email="",C.name="",C.realName="",C.tenantName="",C.phone="",C.description="",C.info={type:0,id:"",viewType:1,interval:5,theme:"light"},C.kind=0,C.systemType=0,C.oeeStatus=0,C.ncFlg=0,C.password="",C.enable=!0,C.platform_tdm=!1,C.platform_qms=!1,C.platform_twin=!1,C.platform_maintain=!1,C.platform_simple_tdm=!1,C.authorizationGroupArray=[],C.authorizationMachineArray=[],C.iot_menu_authorization=[],C.tdm_menu_authorization=[],C.qms_menu_authorization=[],C.maintain_menu_authorization=[],C.endTime=0,C.tenantStatus=1,C.renewalStatus=0,C.roleId=1}async function vt(){await Oh().catch(()=>null),Be("token"),rt(),window.location.href="/login"}const zh=t.defineComponent({name:"HeaderPop",components:{NFlex:f.NFlex,NInput:f.NInput,NPopover:f.NPopover,NTooltip:f.NTooltip,NButton:f.NButton,NIcon:f.NIcon,NDataTable:f.NDataTable,IconSearch:ze,IconArrowClockwise:we,IconArrowSquareDown:mt},setup(){const{t:e}=Y.useI18n(),o=t.ref(!1),n=f.useNotification(),r=t.ref([]),l=t.ref(""),p=t.ref(!1),s=t.ref({page:1,pageCount:1,pageSize:30}),c=t.ref([{title:()=>e("Common.importer.fileName"),key:"jobName",width:300,render(N){return t.h("div",{},{default:()=>[t.h("p",{},{default:()=>N.jobName||"--"}),t.h("p",{style:{color:"rgba(var(--font), 0.6)"}},{default:()=>ne(N.commitTime,"yyyy-MM-dd hh:mm:ss")})]})}},{title:()=>e("Common.importer.status"),key:"jobStatus",align:"center",width:90,render(N){let k=e("Common.processing");return N.jobStatus===1&&(k=e("Common.success")),N.jobStatus===2&&(k=e("Common.failed")),t.h("span",{},{default:()=>k})}},{title:()=>e("Common.action"),key:"action",align:"center",fixed:"right",width:90,render(N){const k=[{type:"delete",onClick:()=>{Eh([N.jobId]).then(()=>{n.success({content:()=>e("Notice.success"),duration:3e3}),h()}).catch(()=>{n.error({content:()=>e("Notice.error"),duration:3e3})})}}];return N.jobStatus===2?k.unshift({type:"custom",onClick:()=>{Ah(N.jobId).then(()=>{n.success({content:()=>e("Notice.success"),duration:3e3}),h()}).catch(()=>{n.error({content:()=>e("Notice.error"),duration:3e3})})},icon:we,color:"info",tooltipText:e("Common.importer.retry")}):k.unshift({type:"custom",disabled:N.jobStatus!==1,onClick:()=>{window.open(N.downloadUrl)},icon:Te,color:"success",tooltipText:e("Common.importer.btnDownload")}),de(k)}}]),d=N=>{s.value.page=N,h()},u=N=>{s.value.pageSize=N,s.value.page=1,h()},m=()=>{s.value.page=1,h()},h=()=>{p.value||(p.value=!0,Mh({jobType:"EXPORT",jobName:l.value,query:s.value}).then(N=>{s.value=N.query,r.value=N.records,p.value=!1}).catch(()=>{p.value=!1}))},g=N=>{St(N),o.value=N};return h(),t.watch(()=>E.download,N=>{o.value=N,N&&h()}),{jobName:l,loading:p,columns:c,coldata:r,query:s,popDownload:o,init:h,pageChange:d,pageSizeChange:u,doSearch:m,popDownloadUpdate:g}}}),Lh={class:"oc-header-download"};function Rh(e,o,n,r,l,p){const s=t.resolveComponent("IconArrowSquareDown"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),u=t.resolveComponent("NInput"),m=t.resolveComponent("IconSearch"),h=t.resolveComponent("NTooltip"),g=t.resolveComponent("IconArrowClockwise"),N=t.resolveComponent("NFlex"),k=t.resolveComponent("NDataTable"),_=t.resolveComponent("NPopover");return t.openBlock(),t.createBlock(_,{trigger:"click",placement:"bottom-end",show:e.popDownload,"show-arrow":!1,"on-update:show":e.popDownloadUpdate,style:{width:"650px"}},{trigger:t.withCtx(()=>[t.createVNode(d,{text:"",style:{"margin-left":"15px"}},{icon:t.withCtx(()=>[t.createVNode(c,{class:"com-header-icon"},{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),_:1})]),default:t.withCtx(()=>[t.createVNode(N,{justify:"end",wrap:!1},{default:t.withCtx(()=>[t.createElementVNode("span",Lh,t.toDisplayString(e.$t("Common.validDays")),1),t.createVNode(u,{value:e.jobName,"onUpdate:value":o[0]||(o[0]=b=>e.jobName=b),type:"text",clearable:"",autosize:"",style:{width:"200px"},placeholder:e.$t("Common.importer.fileName")},null,8,["value","placeholder"]),t.createVNode(h,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{loading:e.loading,class:"button-primary",onClick:e.doSearch},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(m)]),_:1})]),_:1},8,["loading","onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.search")),1)]),_:1}),t.createVNode(h,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{onClick:e.init},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(g)]),_:1})]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.refresh")),1)]),_:1})]),_:1}),t.createVNode(k,{columns:e.columns,data:e.coldata,pagination:{...e.query,simple:!0},loading:e.loading,"on-update:page":e.pageChange,"on-update:page-size":e.pageSizeChange,"min-height":300,"max-height":505,class:"n-table-dark","scroll-x":"600",style:{"margin-top":"8px"},remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:1},8,["show","on-update:show"])}const qh=I(zh,[["render",Rh]]),Gh=t.defineComponent({name:"HeaderPop",components:{NBadge:f.NBadge,NPopover:f.NPopover,NFlex:f.NFlex,NTooltip:f.NTooltip,NButton:f.NButton,NIcon:f.NIcon,NDataTable:f.NDataTable,NRadioGroup:f.NRadioGroup,NRadioButton:f.NRadioButton,IconAlert:pt,IconClear:ft,IconArrowClockwise:we},setup(){const{t:e}=Y.useI18n(),o=t.ref(0),n=t.ref(0),r=t.ref([]),l=t.ref(""),p=t.ref(!1),s=t.ref({page:1,pageCount:1,pageSize:30}),c=t.ref([{title:()=>e("Common.message.title2"),key:"messageContent",width:300,render(N){return[t.h("div",{class:N.status===1?"card-grey-txt":""},{default:()=>N.messageContent}),t.h("div",{class:"card-grey-txt"},{default:()=>ne(N.createTime,"yyyy-MM-dd hh:mm:ss")})]}},{title:()=>e("Common.action"),key:"action",align:"center",fixed:"right",width:90,render(N){return N.status===0?de([{type:"custom",color:"primary",tooltipText:e("Common.message.read"),buttonText:e("Common.message.read"),onClick:()=>{jh(N.messageId).then(()=>{g()}).catch(()=>{g()})}}]):t.h("div",{},{default:()=>`${N.updateByName} ${e("Common.message.read")}`})}}]),d=N=>{s.value.page=1,o.value=N,g()},u=()=>{Dh().then(()=>{g()}).catch(()=>{g()})},m=N=>{s.value.page=N,g()},h=N=>{s.value.pageSize=N,s.value.page=1,g()},g=()=>{p.value||(p.value=!0,Fh({status:o.value,query:s.value}).then(N=>{n.value=N.unRead,s.value=N.data.query,r.value=N.data.records,p.value=!1}).catch(()=>{p.value=!1}))};return g(),{badge:n,radios:o,jobName:l,loading:p,columns:c,coldata:r,query:s,clearAll:u,pageChange:m,pageSizeChange:h,init:g,radiosChecked:d}}}),Hh={class:"com-title"};function Uh(e,o,n,r,l,p){const s=t.resolveComponent("IconAlert"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),u=t.resolveComponent("NBadge"),m=t.resolveComponent("NRadioButton"),h=t.resolveComponent("NRadioGroup"),g=t.resolveComponent("IconClear"),N=t.resolveComponent("NTooltip"),k=t.resolveComponent("IconArrowClockwise"),_=t.resolveComponent("NFlex"),b=t.resolveComponent("NDataTable"),V=t.resolveComponent("NPopover");return t.openBlock(),t.createBlock(V,{trigger:"click",placement:"bottom-end","show-arrow":!1,style:{width:"650px"}},{trigger:t.withCtx(()=>[t.createVNode(u,{value:e.badge,max:99},{default:t.withCtx(()=>[t.createVNode(d,{text:"",style:{"margin-left":"30px"}},{icon:t.withCtx(()=>[t.createVNode(c,{class:"com-header-icon"},{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),_:1})]),_:1},8,["value"])]),default:t.withCtx(()=>[t.createVNode(_,{justify:"space-between"},{default:t.withCtx(()=>[t.createElementVNode("div",Hh,t.toDisplayString(e.$t("Common.message.title")),1),t.createVNode(h,{value:e.radios,"onUpdate:value":o[0]||(o[0]=T=>e.radios=T),name:"radios","on-update:value":e.radiosChecked},{default:t.withCtx(()=>[t.createVNode(m,{key:"0",value:0,label:e.$t("Common.message.unRead")},null,8,["label"]),t.createVNode(m,{key:"-1",value:-1,label:e.$t("Common.message.all")},null,8,["label"]),t.createVNode(m,{key:"1",value:1,label:e.$t("Common.message.read")},null,8,["label"])]),_:1},8,["value","on-update:value"]),t.createElementVNode("div",null,[t.createVNode(N,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{onClick:e.clearAll},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(g)]),_:1})]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.message.readAll")),1)]),_:1}),t.createVNode(N,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{onClick:e.init},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(k)]),_:1})]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.refresh")),1)]),_:1})])]),_:1}),t.createVNode(b,{columns:e.columns,data:e.coldata,pagination:{...e.query,simple:!0},loading:e.loading,"on-update:page":e.pageChange,"on-update:page-size":e.pageSizeChange,"min-height":300,"max-height":505,class:"n-table-dark","scroll-x":"600",style:{"margin-top":"8px"},remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:1})}const Kh=I(Gh,[["render",Uh]]),Wh=t.defineComponent({name:"OcHeader",components:{Pop:qh,Message:Kh,NDropdown:f.NDropdown,NMenu:f.NMenu,NIcon:f.NIcon,NButton:f.NButton,NDrawer:f.NDrawer,NFlex:f.NFlex,NDrawerContent:f.NDrawerContent,NCard:f.NCard,IconWeatherSunny:gt,IconWeatherMoon:ht,IconGridDots:wt,IconDismiss:ce,IconNavigation:Ge,IconUser:kt},props:{menuOptions:{required:!0,type:Array,default:()=>[]},qiankun:{type:Boolean,default:!1},mainUrl:{type:String,default:"https://www.partexiot.cn"},report:{type:Boolean,default:!1},download:{type:Boolean,default:!0},message:{type:Boolean,default:!0}},setup(e){const{t:o}=Y.useI18n(),n=J.useRoute(),r=J.useRouter(),l=f.useNotification(),p=t.ref("/iot/home"),s=t.ref(!1),c=t.ref(!1),d=t.ref(void 0),u=t.ref(10),m=t.ref([]),h=t.ref(""),g=w=>{s.value=w,Ke(w),oe("theme",w,0)},N=w=>{const M=w.split("/");p.value=`/${M[1]}/${M[2]}`,Ue()},k=w=>{w.disabled||(N(w.key),r.push(w.key))},_=w=>{if(!w.disabled){if(w.children)return;N(w.key),r.push(w.key),c.value=!1}},b=w=>t.h("div",{onClick:()=>k(w)},{default:()=>w.label}),V=w=>t.h("div",{onClick:()=>_(w)},{default:()=>w.label}),T=w=>w.icon?t.h(f.NIcon,{size:24,onClick:()=>k(w)},{default:()=>w.icon&&w.icon()}):!1,i=w=>{e.qiankun?window.location.href=`${e.mainUrl||"https://www.partexiot.cn"}${w}`:r.replace(w)},$=()=>{c.value=!1},D=()=>{let w=E.platformMainUrl||E.platformUrl;E.platformMainUrl==="auto"&&(C.industryCategory==="0"?w="https://www.partexiot.cn":C.industryCategory==="1"&&(w="https://printing.partexiot.cn"));const M=[{label:o("Platform.iot"),key:w}];return C.platform_tdm&&M.push({label:o("Platform.tdm"),key:"/tdm/home"}),C.platform_qms&&M.push({label:o("Platform.qms"),key:"/qms/home"}),C.platform_twin&&M.push({label:o("Platform.twin"),key:"/twin/home"}),C.platform_maintain&&M.push({label:o("Platform.maintain"),key:"/maintain/home"}),M},B=()=>{const w=[{label:C.tenantName,key:"tenantName"}];return E.isMobile&&w.push({label:`语言 ${E.lang==="zh-CN"?"EN":"中文"}`,key:"language"}),E.language&&w.push({label:`语言 ${E.lang==="zh-CN"?"EN":"中文"}`,key:"language"}),w.push({label:o("Common.dropdownMenu.software"),key:"app",children:[{label:o("Common.dropdownMenu.android"),key:"android"},{label:o("Common.dropdownMenu.ios"),key:"ios"},{label:o("Common.dropdownMenu.chrome"),key:"chrome"},{label:o("Common.dropdownMenu.edge"),key:"edge"},{label:o("Common.dropdownMenu.dashboard_IoT"),key:"dashboard_IoT"},{label:o("Common.dropdownMenu.dashboard_Prt"),key:"dashboard_Prt"}]}),e.report&&w.push({label:o("Common.dropdownMenu.report"),key:"report"}),w.push({label:o("Common.dropdownMenu.info"),key:"info"},{label:o("Common.dropdownMenu.logout"),key:"logout"}),w},F=async w=>{w==="logout"&&vt(),w==="theme"&&g(!s.value),w==="language"&&Ne(),w==="info"&&r.push("/custom/my"),w==="report"&&r.push("/custom/report"),w==="android"&&window.open("http://miiot.partexiot.cn/dk7u"),w==="ios"&&window.open("https://apps.apple.com/cn/app/id1587313547"),w==="chrome"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/chrome_installer.exe"),w==="edge"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/MicrosoftEdgeSetup.exe"),w==="dashboard_IoT"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/%E9%9B%B6%E6%8D%B7%E4%BA%92%E8%81%94IoT_v1.2.0.zip"),w==="dashboard_Prt"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/%E9%9B%B6%E6%8D%B7%E4%BA%92%E8%81%94%E5%8D%B0%E5%88%B7%E7%89%88_v1.2.0.zip")},a=()=>{Ph().then(()=>{l.success({content:"续订请求已发送,七个工作日内将会有专人联系",duration:3e3})}).catch(()=>{l.error({content:()=>o("Notice.error"),duration:3e3})})},O=()=>{if(C.tenantStatus===0&&C.renewalStatus===0){const w=document.getElementById("app");w&&w.classList.add("outrange"),l.info({action:()=>t.h(f.NFlex,{size:[15,15]},{default:()=>t.h(f.NButton,{class:"button-primary","on-click":()=>{a()}},{default:()=>"立即续订"})}),closable:!1,content:`您的订阅已于${ne(C.endTime)}到期,如需继续使用请联系我们`,title:"到期提示"})}if(C.tenantStatus===2&&C.renewalStatus===0){let w=`您的订阅即将于${ne(C.endTime)}到期,请联系管理员进行续订`,M=[t.h(f.NButton,{secondary:!0,"on-click":()=>{l.destroyAll()}},{default:()=>"了解"})];C.kind===99&&(w=`您的订阅即将于${ne(C.endTime)}到期,为保证持续有效的提供服务请立即续订`,M=[t.h(f.NButton,{secondary:!0,"on-click":()=>{l.destroyAll()}},{default:()=>"稍后提示我"}),t.h(f.NButton,{class:"button-primary","on-click":()=>{a()}},{default:()=>"立即续订"})]),l.info({action:()=>t.h(f.NFlex,{size:[15,15]},{default:()=>M}),closable:!1,content:w,title:"温馨提示"})}},ee=()=>{r.push(E.platformUrl)};"backdropFilter"in document.documentElement.style||"WebkitBackdropFilter"in document.documentElement.style||document.body.classList.add("not-support-backdrop");const K=()=>{if(C.tenantStatus===0){const w=document.body;w&&w.classList.add("outrange")}};return t.onMounted(()=>{O(),N(n.path),K(),m.value=D()}),t.watch(()=>E.isMobile,()=>{window.screen.availWidth<=1300&&window.screen.availWidth>=1030?h.value="tiny-menu":window.screen.availWidth<769?h.value="hide-menu":h.value=""}),t.watch(()=>n.path,w=>{N(w),K()}),t.watch(()=>E.needUpdate,w=>{if(w){d.value=setInterval(()=>{u.value=u.value-1,u.value<=0&&(clearInterval(window.versionMonitor),clearInterval(d.value),d.value=void 0,M.destroy())},1e3);const M=l.create({title:"检测到系统有新版本需要更新",content:()=>`是否立即更新?更新需要重新加载页面,请确保所有项目都已经保存完毕。${u.value}秒后自动关闭`,meta:ne(new Date,"yyyy-MM-dd hh:mm:ss"),onClose:()=>{clearInterval(window.versionMonitor)},action:()=>t.h(f.NFlex,{justify:"space-between"},{default:()=>[t.h(f.NButton,{quaternary:!0,onClick:()=>{clearInterval(window.versionMonitor),M.destroy()}},{default:()=>"稍后"}),t.h(f.NButton,{type:"primary",onClick:()=>{window.location.reload()}},{default:()=>"更新"})]})})}}),{userStore:C,commonStore:E,theme:s,activeMenu:p,platformOption:m,fnSetLang:Ne,showMenu:c,menuType:h,setDropdownMenu:B,renderMenuLabel:b,renderMenuLabel2:V,renderMenuIcon:T,indexClick:ee,platformClick:i,dropdownClick:F,changeTheme:g,closeModel:$}}}),Jh={class:"oc-header"},Xh={class:"menu"};function Qh(e,o,n,r,l,p){const s=t.resolveComponent("IconGridDots"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),u=t.resolveComponent("NDropdown"),m=t.resolveComponent("NMenu"),h=t.resolveComponent("IconNavigation"),g=t.resolveComponent("Pop"),N=t.resolveComponent("Message"),k=t.resolveComponent("IconWeatherMoon"),_=t.resolveComponent("IconWeatherSunny"),b=t.resolveComponent("IconUser"),V=t.resolveComponent("NDrawerContent"),T=t.resolveComponent("NDrawer");return t.openBlock(),t.createElementBlock("header",Jh,[e.platformOption.length>1?(t.openBlock(),t.createBlock(u,{key:0,trigger:"hover",placement:"bottom-start",size:"huge",options:e.platformOption,onSelect:e.platformClick},{default:t.withCtx(()=>[t.createVNode(d,{style:{padding:"0 14px 0 0"}},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),_:1})]),_:1},8,["options","onSelect"])):t.createCommentVNode("",!0),t.createElementVNode("a",{href:"javascript:;",class:"logo",onClick:o[0]||(o[0]=(...i)=>e.indexClick&&e.indexClick(...i))}),t.createElementVNode("a",{href:"javascript:;",class:"platform-txt",onClick:o[1]||(o[1]=(...i)=>e.indexClick&&e.indexClick(...i))}," | "+t.toDisplayString(e.commonStore.platformName()),1),t.createElementVNode("div",Xh,[t.createVNode(m,{value:e.activeMenu,"onUpdate:value":o[2]||(o[2]=i=>e.activeMenu=i),mode:"horizontal",options:e.menuOptions,"render-icon":e.renderMenuIcon,"render-label":e.renderMenuLabel,class:t.normalizeClass(["header-menu",e.menuType])},null,8,["value","options","render-icon","render-label","class"]),e.commonStore.isMobile?(t.openBlock(),t.createBlock(d,{key:0,onClick:o[3]||(o[3]=i=>e.showMenu=!0)},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(h)]),_:1})]),_:1})):t.createCommentVNode("",!0),e.download&&!e.commonStore.isMobile?(t.openBlock(),t.createBlock(g,{key:1})):t.createCommentVNode("",!0),e.message&&!e.commonStore.isMobile?(t.openBlock(),t.createBlock(N,{key:2})):t.createCommentVNode("",!0),e.commonStore.isMobile?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(d,{key:3,style:{"margin-left":"15px"},onClick:o[4]||(o[4]=i=>e.changeTheme(!e.theme))},{icon:t.withCtx(()=>[t.withDirectives(t.createVNode(c,{color:"#8e54c8"},{default:t.withCtx(()=>[t.createVNode(k)]),_:1},512),[[t.vShow,e.theme]]),t.withDirectives(t.createVNode(c,{color:"#f2a651"},{default:t.withCtx(()=>[t.createVNode(_)]),_:1},512),[[t.vShow,!e.theme]])]),_:1})),e.commonStore.language&&!e.commonStore.isMobile?(t.openBlock(),t.createBlock(d,{key:4,class:"com-header-icon",onClick:o[5]||(o[5]=i=>e.fnSetLang())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.commonStore.lang==="zh-CN"?"EN":"中文"),1)]),_:1})):t.createCommentVNode("",!0),e.userStore.name?(t.openBlock(),t.createBlock(u,{key:5,trigger:"click",placement:"bottom-end",options:e.setDropdownMenu(),onSelect:e.dropdownClick},{default:t.withCtx(()=>[t.createVNode(d,{text:"",class:"user",title:e.userStore.name},t.createSlots({default:t.withCtx(()=>[e.commonStore.isMobile?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(e.userStore.name),1)],64))]),_:2},[e.commonStore.isMobile?{name:"icon",fn:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(b)]),_:1})]),key:"0"}:void 0]),1032,["title"])]),_:1},8,["options","onSelect"])):t.createCommentVNode("",!0)]),t.createVNode(T,{show:e.showMenu,"onUpdate:show":o[7]||(o[7]=i=>e.showMenu=i)},{default:t.withCtx(()=>[t.createVNode(V,{title:e.commonStore.platformName(),"native-scrollbar":!1,closable:""},{default:t.withCtx(()=>[t.createVNode(m,{value:e.activeMenu,"onUpdate:value":o[6]||(o[6]=i=>e.activeMenu=i),"default-expand-all":!0,options:e.menuOptions,"render-label":e.renderMenuLabel2},null,8,["value","options","render-label"])]),_:1},8,["title"])]),_:1},8,["show"])])}const Cn=I(Wh,[["render",Qh]]),bn=e=>{const o=new FormData;return Object.keys(e).forEach(n=>{e.query&&n==="query"?o.append("query",JSON.stringify(e.query)):o.append(n,e[n])}),Qt("api/manager/job/submit",o)},Yh=e=>new Promise((o,n)=>{const r=Oe(e);U("api/manager/job/page",r).then(l=>{const p=Ie(l);o(p)}).catch(()=>{n()})}),Zh=(e,o={})=>wn(e,o,"blob"),vh=t.defineComponent({name:"OcImporter",components:{IconDismiss:ce,IconArrowClockwise:we,IconMailInboxAdd:Se,IconCloudArrowDown:qe,NModal:f.NModal,NCard:f.NCard,NFlex:f.NFlex,NUpload:f.NUpload,NButton:f.NButton,NTooltip:f.NTooltip,NIcon:f.NIcon,NDataTable:f.NDataTable},props:{show:{required:!0,type:Boolean,default:!1},data:{required:!0,type:Object,default:()=>({type:"",file:""})}},emits:["update:show"],setup(e,{emit:o}){const{t:n}=Y.useI18n(),r=f.useNotification(),l=t.ref(!1),p=t.ref(!1),s=t.ref({page:1,pageCount:1,pageSize:30}),c=t.ref([{title:"#",width:60,align:"center",key:"index",render(_,b){return t.h("span",{},{default:()=>b+1})}},{title:n("Common.importer.fileName"),key:"jobName",fixed:"left"},{title:n("Common.importer.status"),key:"jobStatus",width:120,render(_){let b=n("Common.processing");return _.jobStatus===1&&(b=n("Common.success")),_.jobStatus===2&&(b=n("Common.failed")),t.h("span",{},{default:()=>b})}},{title:n("Common.importer.createTime"),key:"commitTime",width:200,render(_){return t.h("div",{},{default:()=>ne(_.commitTime,"yyyy-MM-dd hh:mm:ss")})}},{title:n("Common.action"),key:"action",align:"center",fixed:"right",width:120,render(_){return de([{type:"custom",disabled:_.jobStatus===0,onClick:()=>{window.open(_.downloadUrl)},icon:Te,color:"success",tooltipText:n("Common.importer.btnDownload")}])}}]),d=t.ref([]),u=()=>{o("update:show",!1)},m=_=>{s.value.page=_,N()},h=_=>{s.value.pageSize=_,s.value.page=1,N()},g=_=>new Promise((b,V)=>{_.file.file&&bn({jobType:"IMPORT",jobTypeName:e.data.type,jobParams:e.data.params,file:_.file.file}).then(()=>{N(),b()}).catch(()=>{N(),V()}),V()}),N=()=>{p.value=!0,Yh({jobType:"IMPORT",jobTypeName:e.data.type,query:s.value}).then(_=>{p.value=!1,d.value=_.records,s.value=_.query}).catch(()=>{p.value=!1})},k=()=>{e.data.steam?Zh(e.data.file).then(_=>{const b=document.createElement("a");b.style.display="none",b.download="刀组品号导入模板.xls",b.href=URL.createObjectURL(_),document.body.appendChild(b),b.click(),URL.revokeObjectURL(b.href),document.body.removeChild(b)}).catch(()=>{r.error({content:()=>n("Notice.error"),duration:3e3})}):window.open(`${e.data.file}?v=${Date.now()}`)};return t.watch(()=>e.show,_=>{l.value=_,_&&(s.value={page:1,pageCount:1,pageSize:30},N())}),{modal:l,columns:c,coldata:d,query:s,loading:p,init:N,closeModel:u,pageChange:m,pageSizeChange:h,beforeUpload:g,downloadFile:k}}}),e1={class:"oc-header-download"};function t1(e,o,n,r,l,p){const s=t.resolveComponent("IconMailInboxAdd"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),u=t.resolveComponent("NUpload"),m=t.resolveComponent("IconCloudArrowDown"),h=t.resolveComponent("IconArrowClockwise"),g=t.resolveComponent("NTooltip"),N=t.resolveComponent("IconDismiss"),k=t.resolveComponent("NFlex"),_=t.resolveComponent("NDataTable"),b=t.resolveComponent("NCard"),V=t.resolveComponent("NModal");return t.openBlock(),t.createBlock(V,{show:e.modal,"onUpdate:show":o[0]||(o[0]=T=>e.modal=T),"on-mask-click":e.closeModel},{default:t.withCtx(()=>[t.createVNode(b,{style:{width:"900px"}},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.$t("Common.importer.title"))+" ",1),t.createElementVNode("span",e1,t.toDisplayString(e.$t("Common.validDays")),1)]),"header-extra":t.withCtx(()=>[t.createVNode(k,{justify:"end",wrap:!1},{default:t.withCtx(()=>[t.createVNode(u,{"on-before-upload":e.beforeUpload,accept:".xlsx,.xls","show-file-list":!1},{default:t.withCtx(()=>[t.createVNode(d,null,{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.importer.file")),1)]),_:1})]),_:1},8,["on-before-upload"]),t.renderSlot(e.$slots,"default"),t.createVNode(d,{onClick:e.downloadFile},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(m)]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.importer.download")),1)]),_:1},8,["onClick"]),t.createVNode(g,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{loading:e.loading,onClick:e.init},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(h)]),_:1})]),_:1},8,["loading","onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.refresh")),1)]),_:1}),t.createVNode(d,{quaternary:"",onClick:e.closeModel},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(N)]),_:1})]),_:1},8,["onClick"])]),_:3})]),default:t.withCtx(()=>[t.createVNode(_,{columns:e.columns,data:e.coldata,pagination:e.query,loading:e.loading,"on-update:page":e.pageChange,"on-update:page-size":e.pageSizeChange,"min-height":"500","max-height":"500","scroll-x":"600",remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:3})]),_:3},8,["show","on-mask-click"])}const eo=I(vh,[["render",t1]]),o1=t.defineComponent({name:"OcLogin",components:{NTabs:f.NTabs,NTabPane:f.NTabPane,NForm:f.NForm,NFormItem:f.NFormItem,NDropdown:f.NDropdown,NInput:f.NInput,NButton:f.NButton,NGrid:f.NGrid,NGi:f.NGi,NPopover:f.NPopover},props:{platform:{required:!1,type:String,default:"智能效率监测平台"},version:{type:String,default:""},info:{required:!1,type:Object,default:()=>({href:"",text:""})}},setup(){const{t:e}=Y.useI18n(),o=f.useNotification(),n=J.useRouter(),r=t.ref("1"),l=t.ref(),p=t.ref(),s=t.ref(),c=t.ref(),d=t.ref(!1),u=t.ref(!1),m=t.ref(!1),h=t.ref({phone:"",name:"",password:""}),g=t.ref({name:{required:!0,message:()=>e("Common.login.userNameMessage"),trigger:"blur"},phone:{required:!0,validator:(P,S)=>S?/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(S):!1,message:()=>e("Common.login.mobileMessage"),trigger:"blur"},password:{required:!0,message:()=>e("Common.login.passwordMessage"),trigger:"input"}}),N=t.ref([]),k=t.ref([]),_=t.ref([]),b=t.ref([]),V=()=>{const P=Z("loginOption",{}),S=[];Object.keys(P).forEach(z=>{S.push({label:z,key:z})}),N.value=S,k.value=S},T=()=>{const P=Z("phoneOption",{}),S=[];Object.keys(P).forEach(z=>{S.push({label:z,key:z})}),_.value=S,b.value=S},i=P=>{oe("token",P,0),at().then(S=>{o.success({content:()=>e("Notice.success"),duration:3e3}),S.kind!==1&&n.replace(E.platformUrl)}).catch(()=>{o.error({content:()=>e("Notice.error"),duration:3e3}),h.value.password="",d.value=!1})},$=()=>{var P,S;d.value||(d.value=!0,r.value==="0"?(P=p.value)==null||P.validate(z=>{z?d.value=!1:Nn({type:r.value,...h.value}).then(A=>{const H=Z("loginOption",{});H[h.value.name]=!0,oe("loginOption",H,0),i(A)}).catch(()=>{h.value.password="",d.value=!1})}):(S=l.value)==null||S.validate(z=>{z?d.value=!1:Nn({type:r.value,...h.value}).then(A=>{const H=Z("phoneOption",{});H[h.value.name]=!0,oe("phoneOption",H,0),i(A)}).catch(()=>{h.value.password="",d.value=!1})}))},D=P=>{h.value.name=P;const S=k.value.filter(z=>z.label.indexOf(P)>-1);N.value=S,S.length===0?m.value=!1:m.value=!0},B=P=>{h.value.name=P,m.value=!1,s.value.focus(),setTimeout(()=>{var S;(S=p.value)==null||S.restoreValidation()},80)},F=P=>{var S;N.value.length===0?m.value=!1:m.value=P,(S=p.value)==null||S.restoreValidation()},a=P=>{h.value.phone=P;const S=b.value.filter(z=>z.label.indexOf(P)>-1);_.value=S,S.length===0?u.value=!1:u.value=!0},O=P=>{h.value.phone=P,u.value=!1,c.value.focus(),setTimeout(()=>{var S;(S=l.value)==null||S.restoreValidation()},80)},ee=P=>{var S;_.value.length===0?u.value=!1:u.value=P,(S=l.value)==null||S.restoreValidation()},K=P=>{var S,z;r.value=P,h.value={phone:"",name:"",password:""},(S=p.value)==null||S.restoreValidation(),(z=l.value)==null||z.restoreValidation()},w=P=>t.h("div",{style:{position:"relative"}},{default:()=>[t.h("div",{},{default:()=>P.label}),t.h(ce,{class:"oc-login-drop-menu",onclick:S=>{S.stopPropagation(),S.stopImmediatePropagation();const z=Z("loginOption",{});delete z[P.label],oe("loginOption",z,0),V();const A=h.value.name,H=k.value.filter(W=>W.label.indexOf(A)>-1);N.value=H}},{default:()=>""})]}),M=P=>t.h("div",{style:{position:"relative"}},{default:()=>[t.h("div",{},{default:()=>P.label}),t.h(ce,{class:"oc-login-drop-menu",onclick:S=>{S.stopPropagation(),S.stopImmediatePropagation();const z=Z("phoneOption",{});delete z[P.label],oe("phoneOption",z,0),T();const A=h.value.name,H=b.value.filter(W=>W.label.indexOf(A)>-1);_.value=H}},{default:()=>""})]});return rt(),Be("token"),V(),T(),{tabs:r,commonStore:E,pwdRef:s,pwdPhoneRef:c,formRef:p,formPhoneRef:l,formValue:h,formRules:g,showPhoneDropdown:u,showNameDropdown:m,optionsName:N,optionsPhone:_,loading:d,submit:$,tabChange:K,nameChange:D,phoneChange:a,fnSetLang:Ne,dropNameSelect:B,dropPhoneSelect:O,showDropdownNameChange:F,showDropdownPhoneChange:ee,renderDropdownNameLabel:w,renderDropdownPhoneLabel:M}}}),n1={class:"oc-login"},a1=t.createElementVNode("div",{class:"oc-login-left"},[t.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/login.png",alt:"logo",class:"oc-login-img"})],-1),r1={class:"oc-login-right"},l1=t.createElementVNode("div",{class:"oc-login-title"},null,-1),s1={class:"oc-login-platform"},c1={class:"oc-login-form"},i1=t.createElementVNode("br",null,null,-1),d1=t.createElementVNode("br",null,null,-1),p1={class:"oc-login-submit"},f1=["href"],u1=t.createElementVNode("div",{class:"oc-google-play"},null,-1),m1=t.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/android_qr.png",alt:"AndroidQr",width:"300",height:"300"},null,-1),h1=t.createElementVNode("div",{class:"oc-app-store"},null,-1),g1=t.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/ios_qr.png",alt:"iOSQr",width:"300",height:"300"},null,-1),w1={class:"oc-login-footer"},N1=t.createElementVNode("span",{style:{"font-family":"Arial, Helvetica, sans-serif"}},"©",-1),y1=t.createElementVNode("a",{href:"https://beian.miit.gov.cn/",target:"_blank",class:"oc-footer-record"}," 沪ICP备 18025935号-3 ",-1);function C1(e,o,n,r,l,p){const s=t.resolveComponent("NButton"),c=t.resolveComponent("NInput"),d=t.resolveComponent("NDropdown"),u=t.resolveComponent("NFormItem"),m=t.resolveComponent("NForm"),h=t.resolveComponent("NTabPane"),g=t.resolveComponent("NTabs"),N=t.resolveComponent("NPopover"),k=t.resolveComponent("NGi"),_=t.resolveComponent("NGrid");return t.openBlock(),t.createElementBlock("div",n1,[a1,t.createElementVNode("div",r1,[e.commonStore.language?(t.openBlock(),t.createBlock(s,{key:0,class:"oc-login-language",onClick:o[0]||(o[0]=b=>e.fnSetLang())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.commonStore.lang==="zh-CN"?"EN":"中文"),1)]),_:1})):t.createCommentVNode("",!0),l1,t.createElementVNode("div",s1,t.toDisplayString(e.platform),1),t.createElementVNode("div",c1,[t.createVNode(g,{value:e.tabs,"on-update:value":e.tabChange,type:"segment","justify-content":"end",animated:""},{default:t.withCtx(()=>[t.createVNode(h,{name:"1",tab:e.$t("Common.login.mobile")},{default:t.withCtx(()=>[i1,t.createVNode(m,{ref:"formPhoneRef",model:e.formValue,rules:e.formRules,"show-require-mark":!1,"label-placement":"top",onKeyup:t.withKeys(e.submit,["enter"])},{default:t.withCtx(()=>[t.createVNode(u,{label:e.$t("Common.login.mobile"),path:"phone"},{default:t.withCtx(()=>[t.createVNode(d,{show:e.showPhoneDropdown,options:e.optionsPhone,"render-label":e.renderDropdownPhoneLabel,width:"trigger",onClickoutside:o[4]||(o[4]=()=>{e.showPhoneDropdown=!1}),onSelect:e.dropPhoneSelect},{default:t.withCtx(()=>[t.createVNode(c,{value:e.formValue.phone,"onUpdate:value":o[1]||(o[1]=b=>e.formValue.phone=b),placeholder:e.$t("Common.login.mobilePlaceholder"),"on-update:value":e.phoneChange,onClick:o[2]||(o[2]=b=>e.showDropdownPhoneChange(!0)),onFocus:o[3]||(o[3]=b=>e.showDropdownPhoneChange(!0))},null,8,["value","placeholder","on-update:value"])]),_:1},8,["show","options","render-label","onSelect"])]),_:1},8,["label"]),t.createVNode(u,{label:e.$t("Common.login.password"),path:"password"},{default:t.withCtx(()=>[t.createVNode(c,{ref:"pwdPhoneRef",value:e.formValue.password,"onUpdate:value":o[5]||(o[5]=b=>e.formValue.password=b),type:"password","show-password-on":"click",placeholder:e.$t("Common.login.passwordPlaceholder"),onFocus:o[6]||(o[6]=b=>e.showDropdownPhoneChange(!1))},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules","onKeyup"])]),_:1},8,["tab"]),t.createVNode(h,{name:"0",tab:e.$t("Common.login.userName")},{default:t.withCtx(()=>[d1,t.createVNode(m,{ref:"formRef",model:e.formValue,rules:e.formRules,"show-require-mark":!1,"label-placement":"top",onKeyup:t.withKeys(e.submit,["enter"])},{default:t.withCtx(()=>[t.createVNode(u,{label:e.$t("Common.login.userName"),path:"name"},{default:t.withCtx(()=>[t.createVNode(d,{show:e.showNameDropdown,options:e.optionsName,"render-label":e.renderDropdownNameLabel,width:"trigger",onClickoutside:o[10]||(o[10]=()=>{e.showNameDropdown=!1}),onSelect:e.dropNameSelect},{default:t.withCtx(()=>[t.createVNode(c,{value:e.formValue.name,"onUpdate:value":o[7]||(o[7]=b=>e.formValue.name=b),placeholder:e.$t("Common.login.userNamePlaceholder"),"on-update:value":e.nameChange,onClick:o[8]||(o[8]=b=>e.showDropdownNameChange(!0)),onFocus:o[9]||(o[9]=b=>e.showDropdownNameChange(!0))},null,8,["value","placeholder","on-update:value"])]),_:1},8,["show","options","render-label","onSelect"])]),_:1},8,["label"]),t.createVNode(u,{label:e.$t("Common.login.password"),path:"password"},{default:t.withCtx(()=>[t.createVNode(c,{ref:"pwdRef",value:e.formValue.password,"onUpdate:value":o[11]||(o[11]=b=>e.formValue.password=b),type:"password","show-password-on":"click",placeholder:e.$t("Common.login.passwordPlaceholder")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules","onKeyup"])]),_:1},8,["tab"])]),_:1},8,["value","on-update:value"]),t.createElementVNode("div",p1,[t.createVNode(s,{loading:e.loading,class:"button-primary",onClick:e.submit},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.$t("Common.login.in")),1)]),_:1},8,["loading","onClick"])]),e.info.href?(t.openBlock(),t.createElementBlock("a",{key:0,href:e.info.href,class:"oc-login-other"},t.toDisplayString(e.info.text),9,f1)):t.createCommentVNode("",!0),t.createVNode(_,{"x-gap":"15",cols:2},{default:t.withCtx(()=>[t.createVNode(k,null,{default:t.withCtx(()=>[t.createVNode(N,{trigger:"hover",placement:"top"},{trigger:t.withCtx(()=>[u1]),default:t.withCtx(()=>[m1]),_:1})]),_:1}),t.createVNode(k,null,{default:t.withCtx(()=>[t.createVNode(N,{trigger:"hover",placement:"top"},{trigger:t.withCtx(()=>[h1]),default:t.withCtx(()=>[g1]),_:1})]),_:1})]),_:1})]),t.createElementVNode("footer",w1,[t.createTextVNode(" Copyright "),N1,t.createTextVNode(" 2020-2024 "+t.toDisplayString(e.$t("Common.title"))+" ",1),e.version?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("v"+t.toDisplayString(e.version)+" ",1)],64)):t.createCommentVNode("",!0),y1])])])}const _n=I(o1,[["render",C1]]),b1=t.defineComponent({name:"OcNumberRoll",props:{value:{required:!0,type:[Number,String],default:0},duration:{type:Number,default:1e3},precision:{type:Number,default:0},format:{type:Function,default:void 0}},setup(e){const o=t.ref(!1),n=t.ref(0),r=c=>1-Math.pow(1-c,5),l=c=>e.format?e.format(c):c;function p(c,d,u=e.duration){const m=()=>{const g=performance.now(),N=Math.min(g-h,u),k=c+(d-c)*r(N/u);if(N===u){n.value=l(Number(e.value)),o.value=!1;return}const _=Number(k.toFixed(e.precision));n.value=l(_),requestAnimationFrame(m)},h=performance.now();m()}const s=(c=0,d=e.value)=>{o.value=!0,n.value=l(c),String(c)!==String(d)&&p(c,Number(d))};return t.watch(()=>e.value,(c,d)=>{s(Number(d)||0,Number(c))}),t.onMounted(()=>{s()}),{displayedValueRef:n}}});function _1(e,o,n,r,l,p){return t.toDisplayString(e.displayedValueRef)}const to=I(b1,[["render",_1]]),k1=t.defineComponent({name:"OcLogo",components:{NGrid:f.NGrid,NGi:f.NGi,NDivider:f.NDivider,NumberRoll:to},props:{text:{type:String,default:"智能效率监测平台"}},setup(){const e=t.ref(Date.now()),o=t.ref(void 0),n=r=>ne(r,"yyyy-MM-dd hh:mm:ss");return t.onMounted(()=>{o.value=setInterval(()=>{e.value=Date.now()},1e3)}),t.onBeforeUnmount(()=>{clearInterval(o.value),o.value=void 0}),{time:e,numFormat:n}}}),$1=t.createElementVNode("div",{class:"oc-logo"},null,-1);function V1(e,o,n,r,l,p){const s=t.resolveComponent("NGi"),c=t.resolveComponent("NDivider"),d=t.resolveComponent("NumberRoll"),u=t.resolveComponent("NGrid");return t.openBlock(),t.createBlock(u,{cols:5,class:"oc-dashboard-logo"},{default:t.withCtx(()=>[t.createVNode(s,{span:"1",class:"flex-center-left"},{default:t.withCtx(()=>[$1]),_:1}),t.createVNode(s,{span:"3",class:"flex-center"},{default:t.withCtx(()=>[t.createVNode(c,{class:"oc-dashboard-title-show"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.text),1)]),_:1})]),_:1}),t.createVNode(s,{span:"1",class:"flex-center-right oc-time"},{default:t.withCtx(()=>[t.createVNode(d,{value:e.time,format:e.numFormat},null,8,["value","format"])]),_:1})]),_:1})}const kn=I(k1,[["render",V1]]);f.darkTheme.common.cardColor="#32323b",f.darkTheme.common.primaryColor="#b274ef",f.darkTheme.common.primaryColorHover="#b274ef",f.darkTheme.common.borderRadius="16px",f.darkTheme.common.borderRadiusSmall="8px",f.darkTheme.DataTable.tdColor="#2d2d31";const $n={common:{borderRadius:"16px",borderRadiusSmall:"8px",primaryColor:"#8e54c8",primaryColorHover:"#9b66d0",primaryColorPressed:"#8e54c8",primaryColorSuppl:"#8e54c8",infoColor:"#2080f0",infoColorHover:"#57a4fd",infoColorPressed:"#2080f0",infoColorSuppl:"#2080f0",successColor:"#5dae57",successColorHover:"#70ce69",successColorPressed:"#5dae57",successColorSuppl:"#5dae57",warningColor:"#f0973a",warningColorHover:"#ffb05d",warningColorPressed:"#f0973a",warningColorSuppl:"#f0973a",errorColor:"#e65444",errorColorHover:"#fc6c5d",errorColorPressed:"#e65444",errorColorSuppl:"#e65444",cardColor:"#fff"},Button:{textColor:"rgb(var(--font))"},Notification:{borderRadius:"16px"}},Vn=f.darkTheme,T1=t.defineComponent({name:"OcMain",components:{NConfigProvider:f.NConfigProvider,NDialogProvider:f.NDialogProvider,NNotificationProvider:f.NNotificationProvider},props:{hljs:{type:Object,default:void 0}},setup(){return{zhCN:f.zhCN,dateZhCN:f.dateZhCN,commonStore:E,lightTheme:$n,darkTheme:Vn}}});function S1(e,o,n,r,l,p){const s=t.resolveComponent("NNotificationProvider"),c=t.resolveComponent("NDialogProvider"),d=t.resolveComponent("NConfigProvider");return t.openBlock(),t.createBlock(d,{theme:e.commonStore.theme?{name:"darkTheme"}:null,"theme-overrides":e.commonStore.theme?e.darkTheme:e.lightTheme,locale:e.commonStore.lang==="zh-CN"?e.zhCN:null,"date-locale":e.commonStore.lang==="zh-CN"?e.dateZhCN:null,hljs:e.hljs,"inline-theme-disabled":"",abstract:""},{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s,{placement:"top"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3})]),_:3})]),_:3},8,["theme","theme-overrides","locale","date-locale","hljs"])}const Tn=I(T1,[["render",S1]]),B1=e=>{const o=JSON.parse(JSON.stringify(e));return o.oldPassword=je(o.oldPassword),o.newPassword=je(o.newPassword),o.comfirmPassword=je(o.comfirmPassword),U("api/auth/user/modifyPassword",o)},I1=e=>U("api/auth/user/update",e),O1=t.defineComponent({name:"OcMy",components:{NGrid:f.NGrid,NGi:f.NGi,NForm:f.NForm,NFormItem:f.NFormItem,NInput:f.NInput,NButton:f.NButton},setup(){const{t:e}=Y.useI18n(),o=f.useNotification(),n=t.ref(),r=t.ref(),l=t.ref(!1),p=t.ref({oldPassword:"",newPassword:"",comfirmPassword:""}),s=t.ref({oldPassword:{required:!0,message:()=>e("Common.my.oldPasswordMessage"),trigger:"blur"},newPassword:{required:!0,message:()=>e("Common.my.newPasswordMessage"),trigger:"blur"},comfirmPassword:{required:!0,message:()=>e("Common.my.checkPasswordMessage"),trigger:"blur"}}),c=t.ref(C),d=t.ref({email:{required:!1,trigger:"blur",validator:(h,g)=>g?/^[0-9a-zA-Z_.-]+[@][0-9a-zA-Z_.-]+([.][a-zA-Z]+){1,2}$/.test(g):!0,message:()=>e("Common.my.emailMessage")},phone:{required:!1,trigger:"blur",validator:(h,g)=>g?/^[1][3,4,5,7,8,9][0-9]{9}$/.test(g):!0,message:()=>e("Common.my.phoneMessage")}});return{formRef:r,pwdRef:n,pwdValue:p,formValue:c,pwdRules:s,formRules:d,loading:l,pwdSubmit:()=>{var h;l.value||(l.value=!0,(h=n.value)==null||h.validate(g=>{g?l.value=!1:B1(p.value).then(()=>{var N;p.value={oldPassword:"",newPassword:"",comfirmPassword:""},(N=n.value)==null||N.restoreValidation(),o.success({content:()=>e("Notice.success"),duration:3e3}),setTimeout(()=>{window.location.href="/login"},1e3)}).catch(()=>{l.value=!1})}))},formSubmit:()=>{var h;l.value||(l.value=!0,(h=r.value)==null||h.validate(g=>{g?l.value=!1:I1(c.value).then(()=>{o.success({content:()=>e("Notice.success"),duration:3e3}),l.value=!1,at().catch(()=>null)}).catch(()=>{l.value=!1})}))}}}}),D1={class:"com-card"},P1={class:"com-title"},E1=t.createElementVNode("br",null,null,-1),A1={class:"text-right"},M1={class:"com-card"},F1={class:"com-title"},j1=t.createElementVNode("br",null,null,-1),x1={class:"text-right"};function z1(e,o,n,r,l,p){const s=t.resolveComponent("NInput"),c=t.resolveComponent("NFormItem"),d=t.resolveComponent("NForm"),u=t.resolveComponent("NButton"),m=t.resolveComponent("NGi"),h=t.resolveComponent("NGrid");return t.openBlock(),t.createBlock(h,{"x-gap":"15","y-gap":"15",cols:2},{default:t.withCtx(()=>[t.createVNode(m,{span:"1"},{default:t.withCtx(()=>[t.createElementVNode("div",D1,[t.createElementVNode("div",P1,t.toDisplayString(e.$t("Common.my.title")),1),E1,t.createVNode(d,{ref:"formRef",model:e.formValue,rules:e.formRules,"label-placement":"top"},{default:t.withCtx(()=>[t.createVNode(c,{label:e.$t("Common.my.tenantCode"),path:"tenantLoginCode"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.formValue.tenantLoginCode,"onUpdate:value":o[0]||(o[0]=g=>e.formValue.tenantLoginCode=g),readonly:""},null,8,["value"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.tenantName"),path:"tenantName"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.formValue.tenantName,"onUpdate:value":o[1]||(o[1]=g=>e.formValue.tenantName=g),readonly:""},null,8,["value"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.name"),path:"name"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.formValue.name,"onUpdate:value":o[2]||(o[2]=g=>e.formValue.name=g),readonly:""},null,8,["value"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.email"),path:"email"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.formValue.email,"onUpdate:value":o[3]||(o[3]=g=>e.formValue.email=g),placeholder:"邮箱"},null,8,["value"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.realName"),path:"realName"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.formValue.realName,"onUpdate:value":o[4]||(o[4]=g=>e.formValue.realName=g),placeholder:"真实姓名"},null,8,["value"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.phone"),path:"phone"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.formValue.phone,"onUpdate:value":o[5]||(o[5]=g=>e.formValue.phone=g),placeholder:"手机"},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),t.createElementVNode("div",A1,[t.createVNode(u,{loading:e.loading,class:"button-primary",onClick:e.formSubmit},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.$t("Common.my.submit")),1)]),_:1},8,["loading","onClick"])])])]),_:1}),t.createVNode(m,{span:"1"},{default:t.withCtx(()=>[t.createElementVNode("div",M1,[t.createElementVNode("div",F1,t.toDisplayString(e.$t("Common.my.password")),1),j1,t.createVNode(d,{ref:"pwdRef",model:e.pwdValue,rules:e.pwdRules,"label-placement":"top"},{default:t.withCtx(()=>[t.createVNode(c,{label:e.$t("Common.my.oldPassword"),path:"oldPassword"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.pwdValue.oldPassword,"onUpdate:value":o[6]||(o[6]=g=>e.pwdValue.oldPassword=g),type:"password",placeholder:e.$t("Common.my.oldPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.newPassword"),path:"newPassword"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.pwdValue.newPassword,"onUpdate:value":o[7]||(o[7]=g=>e.pwdValue.newPassword=g),type:"password",placeholder:e.$t("Common.my.newPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"]),t.createVNode(c,{label:e.$t("Common.my.checkPassword"),path:"comfirmPassword"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.pwdValue.comfirmPassword,"onUpdate:value":o[8]||(o[8]=g=>e.pwdValue.comfirmPassword=g),type:"password",placeholder:e.$t("Common.my.checkPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),t.createElementVNode("div",x1,[t.createVNode(u,{loading:e.loading,class:"button-primary",onClick:e.pwdSubmit},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.$t("Common.my.submit")),1)]),_:1},8,["loading","onClick"])])])]),_:1})]),_:1})}const Sn=I(O1,[["render",z1]]);function L1(e){return new Promise((o,n)=>{U("api/manager/factory-params/detail",{keyName:e}).then(r=>{const l=JSON.parse(r.valueJson??"[]");o(l)}).catch(()=>{n()})})}const R1=t.defineComponent({name:"OcReport",components:{NFlex:f.NFlex,NDataTable:f.NDataTable,NDatePicker:f.NDatePicker,NInputGroup:f.NInputGroup,NInputGroupLabel:f.NInputGroupLabel},setup(){const{t:e}=Y.useI18n(),o=t.ref(!0),n=f.useNotification(),r=t.ref([{title:"#",width:60,align:"center",key:"index",render(d,u){return t.h("span",{},{default:()=>u+1})}},{title:"名称",key:"name"},{title:"备注",key:"content"},{title:"操作",key:"action",align:"center",fixed:"right",width:120,render(d){return de([{type:"custom",onClick:()=>{s(d.key)},icon:Te,color:"success",tooltipText:"下载"}])}}]),l=t.ref([]),p=t.ref([Date.now(),Date.now()]),s=d=>{o.value=!0,bn({jobType:"EXPORT",jobTypeName:d,jobParams:JSON.stringify({startDate:p.value[0],endDate:p.value[1]})}).then(()=>{o.value=!1,n.success({content:()=>e("Notice.success"),duration:3e3}),St(!0)}).catch(()=>{o.value=!1,n.error({content:()=>e("Notice.error"),duration:3e3})})},c=d=>d>Date.now();return L1("individuation_report_download").then(d=>{l.value=d.map(u=>({key:u.key,name:u.name,content:"默认导出最近30天的数据。每个企业租户下的所有账号,每天累计最多下载10次,采用异步下载"})),o.value=!1}).catch(()=>{o.value=!1}),{columns:r,columnData:l,loading:o,range:p,isRangeDateDisabled:c}}}),q1={class:"com-card"},G1=t.createElementVNode("br",null,null,-1);function H1(e,o,n,r,l,p){const s=t.resolveComponent("NInputGroupLabel"),c=t.resolveComponent("NDatePicker"),d=t.resolveComponent("NInputGroup"),u=t.resolveComponent("NFlex"),m=t.resolveComponent("n-data-table");return t.openBlock(),t.createElementBlock("div",q1,[t.createVNode(u,{justify:"end"},{default:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(s,{class:"oc-group-label"},{default:t.withCtx(()=>[t.createTextVNode("日期")]),_:1}),t.createVNode(c,{value:e.range,"onUpdate:value":o[0]||(o[0]=h=>e.range=h),type:"daterange","is-date-disabled":e.isRangeDateDisabled,style:{width:"300px"}},null,8,["value","is-date-disabled"])]),_:1})]),_:1}),G1,t.createVNode(m,{columns:e.columns,data:e.columnData,loading:e.loading,"min-height":"calc(100vh - 180px)","max-height":"calc(100vh - 180px)"},null,8,["columns","data","loading"])])}const Bn=I(R1,[["render",H1]]),U1=t.defineComponent({name:"OcScan",components:{NButton:f.NButton,NModal:f.NModal,NCard:f.NCard,NFlex:f.NFlex,NIcon:f.NIcon,IconDismiss:ce},emits:["on-update:value"],setup(e,{emit:o}){const n=t.ref(),r=t.ref(!1),l=t.ref(!1),p=f.useNotification(),s=1280,c=720;let d=null,u=null;const m=(i,$)=>{d.beginPath(),d.moveTo(i.x,i.y),d.lineTo($.x,$.y),d.lineWidth=2,d.strokeStyle="green",d.stroke()},h=()=>{if(u&&u.readyState===u.HAVE_ENOUGH_DATA){u.width=s,u.height=c,d.drawImage(n.value,0,0,s,c);const i=d.getImageData(0,0,s,c);try{const $=da(i.data,s,c);if($){const{location:D,data:B}=$;m(D.topLeftCorner,D.topRightCorner),m(D.topRightCorner,D.bottomRightCorner),m(D.bottomRightCorner,D.bottomLeftCorner),m(D.bottomLeftCorner,D.topLeftCorner),o("on-update:value",B),N()}}catch{p.error({content:"扫描失败,请重试",duration:3e3})}}g()},g=()=>{l.value&&requestAnimationFrame(h)},N=()=>{n.value&&n.value.srcObject&&(n.value.srcObject.getTracks().forEach(i=>i.stop()),l.value=!1,d=null,u=null,n.value.srcObject=null,n.value.src=null),r.value=!1},k=i=>{n.value.srcObject!==void 0?n.value.srcObject=i:window.videoEl.mozSrcObject!==void 0?n.value.mozSrcObject=i:window.URL.createObjectURL?n.value.src=window.URL.createObjectURL(i):window.webkitURL?n.value.src=window.webkitURL.createObjectURL(i):n.value.src=i,n.value.play().then(g)},_=()=>{r.value=!0,t.nextTick(()=>{navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?(l.value=!0,u=document.getElementById("oc-scan-canvas"),u&&(d=u.getContext("2d",{willReadFrequently:!0})),navigator.mediaDevices.getUserMedia({video:!0}).then(k).catch(function(i){console.log(i)})):(l.value=!1,p.error({content:"您的设备未检测到摄像头,无法进行扫码识别",duration:3e3}))})};let b="",V=0;function T(i){if(i.code==="Enter"){b&&o("on-update:value",b),b="",V=0;return}let $=new Date().getTime();V>0&&($-V<=100?b+=i.key:$-V>500&&(b="",V=0)),V=$}return t.onMounted(()=>{window.addEventListener("keypress",T)}),t.onBeforeUnmount(()=>{window.removeEventListener("keypress",T),N()}),{videoRef:n,modal:r,loading:l,doScan:_,closeAll:N}}}),K1=t.createElementVNode("div",{class:"oc-scan-canvas-main"},[t.createElementVNode("canvas",{id:"oc-scan-canvas",width:"1280",height:"720"})],-1),W1={class:"oc-scan-video"},J1={ref:"videoRef",playsInline:""};function X1(e,o,n,r,l,p){const s=t.resolveComponent("NButton"),c=t.resolveComponent("IconDismiss"),d=t.resolveComponent("NIcon"),u=t.resolveComponent("NFlex"),m=t.resolveComponent("NCard"),h=t.resolveComponent("NModal");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(s,{type:"primary",loading:e.loading,onClick:e.doScan},{default:t.withCtx(()=>[t.createTextVNode("扫一扫")]),_:1},8,["loading","onClick"]),t.createVNode(h,{show:e.modal,"onUpdate:show":o[0]||(o[0]=g=>e.modal=g),"on-mask-click":e.closeAll},{default:t.withCtx(()=>[t.createVNode(m,{style:{width:"1320px"}},{header:t.withCtx(()=>[t.createTextVNode("扫一扫")]),"header-extra":t.withCtx(()=>[t.createVNode(u,{justify:"end"},{default:t.withCtx(()=>[t.createVNode(s,{quaternary:"",onClick:e.closeAll},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(c)]),_:1})]),_:1},8,["onClick"])]),_:1})]),default:t.withCtx(()=>[K1]),_:1})]),_:1},8,["show","on-mask-click"]),t.createElementVNode("div",W1,[t.createElementVNode("video",J1,null,512)])],64)}const In=I(U1,[["render",X1]]),Q1=t.defineComponent({name:"OcTimePickRange",components:{NInputGroup:f.NInputGroup,NTimePicker:f.NTimePicker},props:{value:{required:!0,type:Array,default:()=>[]},format:{required:!1,type:String,default:"HH:mm"},disabled:{required:!1,type:Boolean,default:!1},clearable:{required:!1,type:Boolean,default:!1}},emits:["on-update:value"],setup(e,{emit:o}){const n=t.ref(null),r=t.ref(null),l=s=>{n.value=s,o("on-update:value",[n.value,r.value])},p=s=>{r.value=s,o("on-update:value",[n.value,r.value])};return t.onMounted(()=>{e.value&&(n.value=e.value[0],r.value=e.value[1])}),t.watch(()=>e.value,s=>{s&&(n.value=s[0],r.value=s[1])}),{startTime:n,endTime:r,updateStartValue:l,updateEndValue:p}}}),Y1=t.createElementVNode("span",{class:"oc-time-picker-separator"},"-",-1);function Z1(e,o,n,r,l,p){const s=t.resolveComponent("NTimePicker"),c=t.resolveComponent("NInputGroup");return t.openBlock(),t.createBlock(c,{class:"oc-time-picker"},{default:t.withCtx(()=>[t.createVNode(s,{value:e.startTime,clearable:e.clearable,"on-update:value":e.updateStartValue,format:e.format,disabled:e.disabled},null,8,["value","clearable","on-update:value","format","disabled"]),Y1,t.createVNode(s,{value:e.endTime,clearable:e.clearable,format:e.format,disabled:e.disabled,"on-update:value":e.updateEndValue},null,8,["value","clearable","format","disabled","on-update:value"])]),_:1})}const v1=I(Q1,[["render",Z1]]),e0=t.defineComponent({name:"OcSearchBarItem",components:{NIcon:f.NIcon,NButton:f.NButton,NGrid:f.NGrid,NGridItem:f.NGridItem,NInput:f.NInput,NInputNumber:f.NInputNumber,NSelect:f.NSelect,NTooltip:f.NTooltip,NPopover:f.NPopover,NDataTable:f.NDataTable,NCascader:f.NCascader,NTreeSelect:f.NTreeSelect,NDatePicker:f.NDatePicker,NInputGroup:f.NInputGroup,NInputGroupLabel:f.NInputGroupLabel,OcTimePickRange:v1,IconArrowDown:He,IconArrowUp:bt},props:{cols:{type:Number,default:4},small:{type:Boolean,default:!1}},setup(e,{expose:o}){const{t:n}=Y.useI18n(),r=t.ref({}),l=t.ref(!0),p=t.ref(!0),s=t.ref(0),c=t.ref({}),d=t.ref({}),u=t.ref([{key:"label"}]),m=(T,i,$)=>{const D=new Date;return new Date(`${T||D.getFullYear()}-${i||D.getMonth()+1}-${$||D.getDate()} 00:00:00`).getTime()},h=T=>T.fallbackOption?typeof T.fallbackOption=="boolean"?()=>({label:n("Common.message.all"),value:"",disabled:!0}):T.fallbackOption:!1,g=(T,i,$)=>{const D=$.options.filter(B=>String(B.label).toLocaleLowerCase().indexOf(String(i).toLocaleLowerCase())>-1)||[];c.value[T].options=D,D.length===0?c.value[T].display=!1:c.value[T].display=!0},N=T=>{var B;Object.keys(T).forEach(F=>{var O,ee,K;const a=T[F];a.show=a.show??!0,a.type==="dropdown"&&(c.value[F]={display:!1,options:a.options}),a.type==="select"&&a.fallbackOption&&a.multiple&&d.value[F].length===0&&(d.value[F]=[""]),a.type==="group"&&(d.value[F]||(d.value[F]=a.options[0].value),a.inputTemp=a.input.options[d.value[F]?d.value[F]:a.options[0].value],((O=a.inputTemp)==null?void 0:O.type)==="select"&&((ee=a.inputTemp)!=null&&ee.fallbackOption)&&((K=a.inputTemp)!=null&&K.multiple)&&d.value[a.input.key].length===0&&(d.value[a.input.key]=[""]))});let i=0;const $=e.small?1:e.cols,D=Object.keys(T);if(Object.keys(T).length>0)for(let F=0;F<=$;F++)(B=T[D[F]])!=null&&B.show&&(i=i+1);s.value=$-i>=0?$-i-1:-1,i>$?p.value=!0:p.value=!1,e.small&&(l.value=!1,p.value=!1),r.value=T},k=T=>{c.value[T].options.length===0?c.value[T].display=!1:c.value[T].display=!0},_=()=>{l.value=!l.value},b=()=>{const T=JSON.stringify(d.value,(i,$)=>$===void 0?null:Array.isArray($)?$.filter(D=>D):$);return JSON.parse(T)},V=T=>{T&&(d.value=T)};return o({getValues:b,setValues:V,dataFactory:N}),{more:p,offset:s,dataList:r,collapsed:l,searchData:d,dropDisplay:c,columnsPopover:u,showMore:_,setValues:V,dropValueChange:g,dropDisplayToggle:k,getDate:m,selectFallback:h}}}),t0={class:"oc-search-bar-line"},o0={key:0,class:"oc-search-action-more"};function n0(e,o,n,r,l,p){const s=t.resolveComponent("NGridItem"),c=t.resolveComponent("NInputGroupLabel"),d=t.resolveComponent("NInput"),u=t.resolveComponent("NInputNumber"),m=t.resolveComponent("NSelect"),h=t.resolveComponent("NDataTable"),g=t.resolveComponent("NPopover"),N=t.resolveComponent("NCascader"),k=t.resolveComponent("NTreeSelect"),_=t.resolveComponent("OcTimePickRange"),b=t.resolveComponent("NDatePicker"),V=t.resolveComponent("NInputGroup"),T=t.resolveComponent("NGrid"),i=t.resolveComponent("IconArrowDown"),$=t.resolveComponent("NIcon"),D=t.resolveComponent("IconArrowUp"),B=t.resolveComponent("NButton"),F=t.resolveComponent("NTooltip");return t.openBlock(),t.createElementBlock("div",t0,[t.createVNode(T,{"x-gap":"15","y-gap":"15",cols:e.small?1:e.cols,"collapsed-rows":1,collapsed:e.collapsed},{default:t.withCtx(()=>[e.offset>-1?(t.openBlock(),t.createBlock(s,{key:0,offset:e.offset},null,8,["offset"])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.dataList,(a,O,ee)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${O}_${ee}`},[a.show?(t.openBlock(),t.createBlock(s,{key:0,span:e.small?1:a.span||1},{default:t.withCtx(()=>[a.type!=="group"?(t.openBlock(),t.createBlock(V,{key:0},{default:t.withCtx(()=>{var K;return[t.createVNode(c,{class:"oc-group-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(typeof a.title=="string"?a.title:a.title&&a.title()),1)]),_:2},1024),a.type==="input"?(t.openBlock(),t.createBlock(d,{key:0,value:e.searchData[O],"onUpdate:value":w=>e.searchData[O]=w,disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),"on-update:value":w=>{a.updateValue?a.updateValue(w,JSON.parse(JSON.stringify(e.searchData)),M=>e.setValues(M)):e.searchData[O]=w},clearable:a.clearable??!0},null,8,["value","onUpdate:value","disabled","placeholder","on-update:value","clearable"])):t.createCommentVNode("",!0),a.type==="number"?(t.openBlock(),t.createBlock(u,{key:1,value:e.searchData[O],"onUpdate:value":w=>e.searchData[O]=w,disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),min:a==null?void 0:a.min,max:a==null?void 0:a.max,step:(a==null?void 0:a.step)||1,"show-button":(a==null?void 0:a.showButton)||!0,"update-value-on-input":!1,validator:a==null?void 0:a.validator,"on-update:value":w=>{a.updateValue?a.updateValue(w,JSON.parse(JSON.stringify(e.searchData)),M=>e.setValues(M)):e.searchData[O]=w},clearable:a.clearable??!0},t.createSlots({_:2},[a!=null&&a.suffix?{name:"suffix",fn:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a==null?void 0:a.suffix),1)]),key:"0"}:void 0]),1032,["value","onUpdate:value","disabled","placeholder","min","max","step","show-button","validator","on-update:value","clearable"])):t.createCommentVNode("",!0),a.type==="select"?(t.openBlock(),t.createBlock(m,{key:2,value:e.searchData[O],"onUpdate:value":w=>e.searchData[O]=w,"show-checkmark":!1,disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),options:a.options,multiple:a.multiple,"fallback-option":e.selectFallback(a),"on-update:value":w=>{let M=w,P=w;if(a.multiple){let S=w.filter(z=>z);S.length===0?(M=[""],P=[]):(M=S,P=S)}a.updateValue?a.updateValue(P,JSON.parse(JSON.stringify(e.searchData)),S=>e.setValues(S)):e.searchData[O]=M},clearable:a.clearable??!0,"max-tag-count":"responsive",filterable:"",style:{flex:"1",width:"0"}},null,8,["value","onUpdate:value","disabled","placeholder","options","multiple","fallback-option","on-update:value","clearable"])):t.createCommentVNode("",!0),a.type==="dropdown"?(t.openBlock(),t.createBlock(g,{key:3,width:"trigger",trigger:"manual",style:{padding:"5px"},"show-arrow":!1,show:(K=e.dropDisplay[O])==null?void 0:K.display,"on-clickoutside":()=>{e.dropDisplay[O].display=!1}},{trigger:t.withCtx(()=>[t.createVNode(d,{value:e.searchData[O],disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),clearable:a.clearable??!0,"on-update:value":w=>{e.searchData[O]=w,e.dropValueChange(O,w,a)},onClick:w=>e.dropDisplayToggle(O),onFocus:w=>e.dropDisplayToggle(O)},null,8,["value","disabled","placeholder","clearable","on-update:value","onClick","onFocus"])]),default:t.withCtx(()=>{var w;return[t.createVNode(h,{columns:e.columnsPopover,data:((w=e.dropDisplay[O])==null?void 0:w.options)||[],"max-height":300,bordered:!1,"bottom-bordered":!1,"row-props":M=>({style:"cursor: pointer;",onClick:()=>{e.searchData[O]=M.value,e.dropDisplay[O].display=!1}}),size:"small","virtual-scroll":"",class:"oc-popover-table"},null,8,["columns","data","row-props"])]}),_:2},1032,["show","on-clickoutside"])):t.createCommentVNode("",!0),a.type==="cascader"?(t.openBlock(),t.createBlock(N,{key:4,value:e.searchData[O],"onUpdate:value":w=>e.searchData[O]=w,disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),options:a.options,"check-strategy":a.checkStrategy||"all",multiple:a.multiple,"on-update:value":w=>{a.updateValue?a.updateValue(w,JSON.parse(JSON.stringify(e.searchData)),M=>e.setValues(M)):e.searchData[O]=w},clearable:a.clearable??!0,"max-tag-count":"responsive",filterable:""},null,8,["value","onUpdate:value","disabled","placeholder","options","check-strategy","multiple","on-update:value","clearable"])):t.createCommentVNode("",!0),a.type==="treeSelect"?(t.openBlock(),t.createBlock(k,{key:5,value:e.searchData[O],"onUpdate:value":w=>e.searchData[O]=w,disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),options:a.options,"check-strategy":a.checkStrategy||"all",multiple:a.multiple,"on-update:value":w=>{a.updateValue?a.updateValue(w,JSON.parse(JSON.stringify(e.searchData)),M=>e.setValues(M)):e.searchData[O]=w},clearable:a.clearable??!0,"max-tag-count":"responsive",filterable:""},null,8,["value","onUpdate:value","disabled","placeholder","options","check-strategy","multiple","on-update:value","clearable"])):t.createCommentVNode("",!0),a.type==="timePicker"?(t.openBlock(),t.createBlock(_,{key:6,value:e.searchData[O],"onUpdate:value":w=>e.searchData[O]=w,disabled:a==null?void 0:a.disabled,"onOnUpdate:value":w=>{a.updateValue?a.updateValue(w,JSON.parse(JSON.stringify(e.searchData)),M=>e.setValues(M)):e.searchData[O]=[...w]},format:a==null?void 0:a.format,clearable:a.clearable??!0},null,8,["value","onUpdate:value","disabled","onOnUpdate:value","format","clearable"])):t.createCommentVNode("",!0),a.type==="datePicker"?(t.openBlock(),t.createBlock(b,{key:7,value:e.searchData[O],"onUpdate:value":w=>e.searchData[O]=w,disabled:a==null?void 0:a.disabled,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),type:a.dateType,format:a==null?void 0:a.format,"is-date-disabled":a==null?void 0:a.isDateDisabled,shortcuts:a==null?void 0:a.shortcuts,"update-value-on-close":a.dateType!=="year","on-update:value":w=>{a.updateValue?a.updateValue(w,JSON.parse(JSON.stringify(e.searchData)),M=>e.setValues(M)):e.searchData[O]=w},clearable:a.clearable??!0,"close-on-select":""},null,8,["value","onUpdate:value","disabled","placeholder","type","format","is-date-disabled","shortcuts","update-value-on-close","on-update:value","clearable"])):t.createCommentVNode("",!0)]}),_:2},1024)):t.createCommentVNode("",!0),a.type==="group"?(t.openBlock(),t.createBlock(V,{key:1},{default:t.withCtx(()=>{var K,w,M,P,S,z,A,H,W,le,pe,Ae,Me,j,te,fe,ue,ct,Kn,Wn,Jn,Xn,Qn,Yn,Zn,vn,ea,ta,oa,na,aa,ra,la;return[t.createVNode(m,{value:e.searchData[O],"onUpdate:value":L=>e.searchData[O]=L,options:a.options,"show-checkmark":!1,style:t.normalizeStyle(a.width?typeof a.width=="number"?{width:`${a.width}px`}:{width:a.width}:{}),"on-update:value":L=>{if(a.inputTemp=a.input.options[L],a.inputTemp.type==="datePicker"){let G=0;(a.inputTemp.dateType.indexOf("date")>-1||a.inputTemp.dateType.indexOf("quarter")>-1||a.inputTemp.dateType.indexOf("week")>-1)&&(G=e.getDate()),a.inputTemp.dateType.indexOf("month")>-1&&(G=e.getDate(void 0,void 0,1)),a.inputTemp.dateType.indexOf("year")>-1&&(G=e.getDate(void 0,1,1)),a.inputTemp.dateType.indexOf("range")>-1&&(G=[G,G]),e.searchData[a.input.key]=G}else a.inputTemp.type==="number"?e.searchData[a.input.key]=null:a.inputTemp.type==="select"&&a.inputTemp.fallbackOption&&a.inputTemp.multiple?e.searchData[a.input.key]=[""]:e.searchData[a.input.key]="";a.updateValue?a.updateValue(L,JSON.parse(JSON.stringify(e.searchData)),G=>e.setValues(G)):e.searchData[O]=L},class:"oc-group-select",placeholder:" "},null,8,["value","onUpdate:value","options","style","on-update:value"]),((K=a.inputTemp)==null?void 0:K.type)==="input"?(t.openBlock(),t.createBlock(d,{key:0,value:e.searchData[a.input.key],"onUpdate:value":L=>e.searchData[a.input.key]=L,disabled:(w=a.inputTemp)==null?void 0:w.disabled,placeholder:typeof((M=a.inputTemp)==null?void 0:M.placeholder)=="string"?(P=a.inputTemp)==null?void 0:P.placeholder:((S=a.inputTemp)==null?void 0:S.placeholder)&&((z=a.inputTemp)==null?void 0:z.placeholder()),"on-update:value":L=>{var G;(G=a.inputTemp)!=null&&G.updateValue?a.inputTemp.updateValue(L,JSON.parse(JSON.stringify(e.searchData)),se=>e.setValues(se)):e.searchData[a.input.key]=L},clearable:a.inputTemp.clearable??!0,style:{flex:"1"}},null,8,["value","onUpdate:value","disabled","placeholder","on-update:value","clearable"])):t.createCommentVNode("",!0),((A=a.inputTemp)==null?void 0:A.type)==="number"?(t.openBlock(),t.createBlock(u,{key:1,value:e.searchData[a.input.key],"onUpdate:value":L=>e.searchData[a.input.key]=L,disabled:(H=a.inputTemp)==null?void 0:H.disabled,placeholder:typeof((W=a.inputTemp)==null?void 0:W.placeholder)=="string"?(le=a.inputTemp)==null?void 0:le.placeholder:((pe=a.inputTemp)==null?void 0:pe.placeholder)&&((Ae=a.inputTemp)==null?void 0:Ae.placeholder()),min:(Me=a.inputTemp)==null?void 0:Me.min,max:(j=a.inputTemp)==null?void 0:j.max,step:((te=a.inputTemp)==null?void 0:te.step)||1,"show-button":((fe=a.inputTemp)==null?void 0:fe.showButton)||!0,"update-value-on-input":!1,validator:(ue=a.inputTemp)==null?void 0:ue.validator,"on-update:value":L=>{var G;(G=a.inputTemp)!=null&&G.updateValue?a.inputTemp.updateValue(L,JSON.parse(JSON.stringify(e.searchData)),se=>e.setValues(se)):e.searchData[a.input.key]=L},clearable:a.inputTemp.clearable??!0,style:{flex:"1"}},t.createSlots({_:2},[(ct=a.inputTemp)!=null&&ct.suffix?{name:"suffix",fn:t.withCtx(()=>{var L;return[t.createTextVNode(t.toDisplayString((L=a.inputTemp)==null?void 0:L.suffix),1)]}),key:"0"}:void 0]),1032,["value","onUpdate:value","disabled","placeholder","min","max","step","show-button","validator","on-update:value","clearable"])):t.createCommentVNode("",!0),((Kn=a.inputTemp)==null?void 0:Kn.type)==="datePicker"?(t.openBlock(),t.createBlock(b,{key:2,value:e.searchData[a.input.key],"onUpdate:value":L=>e.searchData[a.input.key]=L,disabled:(Wn=a.inputTemp)==null?void 0:Wn.disabled,placeholder:typeof((Jn=a.inputTemp)==null?void 0:Jn.placeholder)=="string"?(Xn=a.inputTemp)==null?void 0:Xn.placeholder:((Qn=a.inputTemp)==null?void 0:Qn.placeholder)&&((Yn=a.inputTemp)==null?void 0:Yn.placeholder()),type:a.inputTemp.dateType,format:(Zn=a.inputTemp)==null?void 0:Zn.format,"is-date-disabled":(vn=a.inputTemp)==null?void 0:vn.isDateDisabled,shortcuts:(ea=a.inputTemp)==null?void 0:ea.shortcuts,"update-value-on-close":a.inputTemp.dateType!=="year","on-update:value":L=>{var G;(G=a.inputTemp)!=null&&G.updateValue?a.inputTemp.updateValue(L,JSON.parse(JSON.stringify(e.searchData)),se=>e.setValues(se)):e.searchData[a.input.key]=L},clearable:a.inputTemp.clearable??!0,"close-on-select":"",style:{flex:"1"}},null,8,["value","onUpdate:value","disabled","placeholder","type","format","is-date-disabled","shortcuts","update-value-on-close","on-update:value","clearable"])):t.createCommentVNode("",!0),((ta=a.inputTemp)==null?void 0:ta.type)==="select"?(t.openBlock(),t.createBlock(m,{key:3,value:e.searchData[a.input.key],"onUpdate:value":L=>e.searchData[a.input.key]=L,"show-checkmark":!1,disabled:(oa=a.inputTemp)==null?void 0:oa.disabled,placeholder:typeof((na=a.inputTemp)==null?void 0:na.placeholder)=="string"?(aa=a.inputTemp)==null?void 0:aa.placeholder:((ra=a.inputTemp)==null?void 0:ra.placeholder)&&((la=a.inputTemp)==null?void 0:la.placeholder()),options:a.inputTemp.options,multiple:a.inputTemp.multiple,"fallback-option":e.selectFallback(a.inputTemp),"on-update:value":L=>{var sa,ca,ia;let G=L,se=L;if(((sa=a.inputTemp)==null?void 0:sa.type)==="select"&&((ca=a.inputTemp)!=null&&ca.multiple)){let Fe=L.filter(xg=>xg);Fe.length===0?(G=[""],se=[]):(G=Fe,se=Fe)}(ia=a.inputTemp)!=null&&ia.updateValue?a.inputTemp.updateValue(se,JSON.parse(JSON.stringify(e.searchData)),Fe=>e.setValues(Fe)):e.searchData[a.input.key]=G},clearable:a.inputTemp.clearable??!0,"max-tag-count":"responsive",filterable:"",style:{flex:"1",width:"0"}},null,8,["value","onUpdate:value","disabled","placeholder","options","multiple","fallback-option","on-update:value","clearable"])):t.createCommentVNode("",!0)]}),_:2},1024)):t.createCommentVNode("",!0)]),_:2},1032,["span"])):t.createCommentVNode("",!0)],64))),128))]),_:1},8,["cols","collapsed"]),e.more?(t.openBlock(),t.createElementBlock("div",o0,[t.createVNode(F,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(B,{onClick:e.showMore},{icon:t.withCtx(()=>[e.collapsed?(t.openBlock(),t.createBlock($,{key:0},{default:t.withCtx(()=>[t.createVNode(i)]),_:1})):(t.openBlock(),t.createBlock($,{key:1},{default:t.withCtx(()=>[t.createVNode(D)]),_:1}))]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.more")),1)]),_:1})])):t.createCommentVNode("",!0)])}const a0=I(e0,[["render",n0]]),r0=t.defineComponent({name:"OcSearchBarPop",props:{value:{required:!0,type:Boolean,default:!1}},emits:["on-update:value"],setup(e,{emit:o}){return{close:()=>{o("on-update:value",!1)}}}}),l0={class:"oc-search-bar-pop"},s0={class:"oc-search-bar-pop-plan"},c0={class:"oc-search-bar-pop-action"},i0={class:"oc-search-bar-pop-content"};function d0(e,o,n,r,l,p){return t.withDirectives((t.openBlock(),t.createElementBlock("div",l0,[t.createElementVNode("div",{class:"oc-search-bar-pop-mask",onClick:o[0]||(o[0]=(...s)=>e.close&&e.close(...s))}),t.createElementVNode("div",s0,[t.createElementVNode("div",c0,[t.renderSlot(e.$slots,"action")]),t.createElementVNode("div",i0,[t.renderSlot(e.$slots,"default")])])],512)),[[t.vShow,e.value]])}const p0=I(r0,[["render",d0]]),f0=t.defineComponent({name:"OcSearchBar",components:{NFlex:f.NFlex,NIcon:f.NIcon,NTooltip:f.NTooltip,NButton:f.NButton,NPopover:f.NPopover,IconArrowDown:He,IconReset:_t,IconSearch:ze,IconFilter:Le,OcSearchBarItem:a0,OcSearchBarPop:p0},props:{value:{required:!0,type:Object,default:()=>({})},defaultValue:{required:!0,type:Object,default:()=>({})},data:{required:!0,type:Object,default:()=>({})},loading:{type:Boolean,default:!1},cols:{type:Number,default:4},small:{type:Boolean,default:!1},autoSubmit:{type:Boolean,default:!0},cache:{type:Boolean,default:!0},resetButton:{type:Boolean,default:!0}},emits:["update:loading","on-update:value"],setup(e,{emit:o,slots:n,expose:r}){const l=J.useRoute(),p=J.useRouter(),s=t.ref(),c=t.ref({}),d=t.ref(!1),u=t.ref(!!n.header),m=t.ref(!!n.action),h=(_=!1)=>{if(!e.loading&&s.value){const b=s.value.getValues();if(!_&&b.query&&(b.query.page=1),o("update:loading",!0),o("on-update:value",b),e.cache){const V=l.path,T=ie(b),i=ie(V);p.replace(`${V}?cursor=${T}&routerId=${i}`)}}},g=()=>{e.loading||(N(JSON.parse(JSON.stringify(e.defaultValue))),h())},N=(_,b=!1)=>{if(s.value&&s.value.setValues(JSON.parse(JSON.stringify(_))),b)p.replace(l.path);else if(e.cache){const V=l.path,T=ie(_),i=ie(V);p.replace(`${V}?cursor=${T}&routerId=${i}`)}};return r({setValues:N,setData:_=>{s.value&&s.value.dataFactory(_)}}),t.onMounted(()=>{setTimeout(()=>{let _=e.value;if(e.cache){const{cursor:b,routerId:V}=l.query;if(b&&V){const T=l.path,i=De(V),$=De(b);i===T&&(_=$)}}s.value&&s.value.setValues(JSON.parse(JSON.stringify(_))),s.value&&s.value.dataFactory(e.data),e.autoSubmit&&h(!0)},100)}),{itemRef:s,drawer:d,isSlotHeader:u,isSlotAction:m,commonStore:E,itemData:c,doSearch:h,clearAll:g}}}),u0={key:0,class:"oc-search-bar-title"},m0={key:1,class:"oc-search-bar-popover"},h0={key:0},g0={class:"oc-search-bar-center"};function w0(e,o,n,r,l,p){const s=t.resolveComponent("OcSearchBarItem"),c=t.resolveComponent("IconArrowDown"),d=t.resolveComponent("NIcon"),u=t.resolveComponent("NButton"),m=t.resolveComponent("IconReset"),h=t.resolveComponent("IconSearch"),g=t.resolveComponent("NFlex"),N=t.resolveComponent("OcSearchBarPop"),k=t.resolveComponent("IconFilter"),_=t.resolveComponent("NTooltip");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["oc-search-bar",{small:!e.isSlotHeader&&(e.small||e.commonStore.isMobile)}]),onKeyup:o[6]||(o[6]=t.withKeys(b=>e.doSearch(!1),["enter"]))},[e.isSlotHeader?(t.openBlock(),t.createElementBlock("span",u0,[t.renderSlot(e.$slots,"header")])):t.createCommentVNode("",!0),e.small||e.commonStore.isMobile?(t.openBlock(),t.createElementBlock("div",m0,[t.createVNode(N,{value:e.drawer,"onUpdate:value":o[2]||(o[2]=b=>e.drawer=b),"onOnUpdate:value":o[3]||(o[3]=b=>e.drawer=b)},{action:t.withCtx(()=>[t.createVNode(g,{size:15,justify:"space-between",wrap:!1},{default:t.withCtx(()=>[t.createVNode(u,{onClick:o[0]||(o[0]=b=>e.drawer=!1)},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(c)]),_:1})]),_:1}),e.resetButton?(t.openBlock(),t.createBlock(u,{key:0,loading:e.loading,onClick:e.clearAll},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(m)]),_:1})]),_:1},8,["loading","onClick"])):t.createCommentVNode("",!0),e.data&&Object.keys(e.data).length>0?(t.openBlock(),t.createBlock(u,{key:1,loading:e.loading,class:"button-primary",onClick:o[1]||(o[1]=()=>{e.drawer=!1,e.doSearch(!1)})},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(h)]),_:1})]),_:1},8,["loading"])):t.createCommentVNode("",!0)]),_:1}),e.isSlotAction?(t.openBlock(),t.createElementBlock("br",h0)):t.createCommentVNode("",!0),e.isSlotAction?(t.openBlock(),t.createBlock(g,{key:1,size:15,justify:"space-between",class:"oc-search-action"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"action")]),_:3})):t.createCommentVNode("",!0)]),default:t.withCtx(()=>[t.createVNode(s,{ref:"itemRef",loading:e.loading,small:""},null,8,["loading"])]),_:3},8,["value"]),t.createVNode(u,{onClick:o[4]||(o[4]=b=>e.drawer=!0)},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(k)]),_:1})]),_:1})])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createElementVNode("div",g0,[t.createVNode(s,{ref:"itemRef",loading:e.loading,cols:e.cols},null,8,["loading","cols"]),t.createVNode(g,{size:5,wrap:!1,style:{"padding-left":"15px"}},{default:t.withCtx(()=>[e.data&&Object.keys(e.data).length>0?(t.openBlock(),t.createBlock(_,{key:0,trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(u,{loading:e.loading,class:"button-primary",onClick:o[5]||(o[5]=b=>e.doSearch(!1))},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(h)]),_:1})]),_:1},8,["loading"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.search")),1)]),_:1})):t.createCommentVNode("",!0),e.resetButton?(t.openBlock(),t.createBlock(_,{key:1,trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(u,{loading:e.loading,onClick:e.clearAll},{icon:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(m)]),_:1})]),_:1},8,["loading","onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.reset")),1)]),_:1})):t.createCommentVNode("",!0)]),_:1})]),t.createVNode(g,{size:0,wrap:!1,class:"oc-search-action"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"action")]),_:3})],64))],34)}const oo=I(f0,[["render",w0]]),N0=t.defineComponent({name:"OcSkeleton",components:{NGrid:f.NGrid,NGi:f.NGi,NSkeleton:f.NSkeleton},props:{cols:{type:Number,default:6},num:{type:Array,default:()=>[[12,1]]}},setup(){return{}}}),y0={class:"com-skeleton"};function C0(e,o,n,r,l,p){const s=t.resolveComponent("NSkeleton"),c=t.resolveComponent("NGi"),d=t.resolveComponent("NGrid");return t.openBlock(),t.createElementBlock("div",y0,[t.createVNode(d,{"x-gap":"15","y-gap":"15",cols:e.cols,"item-responsive":"",responsive:"screen"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.num,(u,m)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`skeleton_${m}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.num[m][0],(h,g)=>(t.openBlock(),t.createBlock(c,{key:`skeleton_${m}_${g}`,span:`${e.cols/2} m:2 l:${e.num[m][1]}`},{default:t.withCtx(()=>[t.createVNode(s)]),_:2},1032,["span"]))),128))],64))),128))]),_:1},8,["cols"])])}const On=I(N0,[["render",C0]]),b0=t.defineComponent({name:"OcTable",components:{NDataTable:f.NDataTable,NTooltip:f.NTooltip,NPopover:f.NPopover,NButton:f.NButton,NIcon:f.NIcon,NFlex:f.NFlex,NPopconfirm:f.NPopconfirm,IconFilter:Le,IconNavigation:Ge,IconEye:Re,IconPin:Ct,IconAdd:xe,IconMailInboxAdd:Se,IconCloudArrowDown:qe,Draggable:pa,OcSearchBar:oo,OcImporter:eo},props:{columns:{required:!0,type:Array,default:()=>[]},actions:{type:Array,default:void 0},fetch:{required:!0,type:Function,default:()=>Promise.resolve()},defaultCheckedRowKeys:{type:Array,default:()=>[]},pagination:{type:Boolean,default:!0},scrollX:{type:[Number,String],default:void 0},flexHeight:{type:Boolean,default:!1},height:{type:[Number,String],default:void 0},minHeight:{type:[Number,String],default:void 0},maxHeight:{type:[Number,String],default:void 0},autoSubmit:{type:Boolean,default:!0},cache:{type:Boolean,default:!0},resetButton:{type:Boolean,default:!0},realtime:{type:Boolean,default:!1},addFn:{type:Function,default:void 0},importer:{type:Object,default:void 0},exporter:{type:Object,default:void 0}},emits:["update:loading","on-update:value"],setup(e,{emit:o,expose:n}){const r=t.ref(),{t:l}=Y.useI18n(),p=J.useRoute(),s=J.useRouter(),c=f.useNotification(),d=t.ref(!1),u=t.ref(!1),m=t.ref(!1),h=t.ref([]),g=t.ref([]),N=t.ref([]),k=t.ref({query:{page:1}}),_=t.ref({}),b=t.ref({}),V=t.ref(void 0),T=t.ref(void 0),i=p.path,$=t.computed(()=>({animation:200,group:"description",ghostClass:"ghost"})),D=A=>{d.value=!0,o("update:loading",!0),A&&(k.value.query={...k.value.query,...A});const H=Oe(k.value);e.fetch&&e.fetch(H).then(W=>{const le=Ie(W);k.value.query=le.query,N.value=le.records,r.value&&r.value.setValues(k.value),d.value=!1,o("on-update:value",Q(k.value)),o("update:loading",!1)}).catch(()=>{d.value=!1,o("update:loading",!1)})},B=A=>{k.value.query.page=A,Ue(),D()},F=A=>{k.value.query.pageSize=A,k.value.query.page=1,Ue(),D()},a=A=>{A?(k.value.query.columnKey=A.columnKey,k.value.query.order=A.order):(k.value.query.columnKey=null,k.value.query.order=null),D()},O=A=>{A.pin=!A.pin},ee=A=>{A.show=!A.show},K=()=>{const A=[];g.value.forEach(H=>{H.show&&A.push(H)}),h.value=A},w=A=>{if(k.value=A,e.cache){const H=ie(i),W=ie(k.value);s.replace(`${i}?cursor=${W}&routerId=${H}`)}D()},M=()=>{u.value=!0,Yt({...e.exporter,jobParams:JSON.stringify(k.value)}).then(()=>{c.success({content:()=>l("Notice.success"),duration:3e3}),setTimeout(()=>{u.value=!1},2e3)}).catch(()=>{u.value=!1})},P=(A=!1)=>{const H=Q(e.columns),W=[],le=[],pe={},Ae={};let Me={};if(H.forEach(j=>{if(j.search&&(j.search.title||(j.search.title=j.title),j.search.defaultValue?pe[j.search.key||j.key]=j.search.defaultValue:j.search.type==="select"&&j.search.multiple&&(j.search.fallbackOption?pe[j.search.key||j.key]=[""]:pe[j.search.key||j.key]=[]),Ae[j.search.key||j.key]=Q(j.search)),delete j.search,j.render&&typeof j.render=="string"){const te=j.render,fe=new Function("rowData","rowIndex","h",te);j.render=(ue,ct)=>fe(ue,ct,t.h)}W.push(Q(j)),_.value=Q(pe),le.push({...j,show:j.show??!0,pin:j.pin??!1})}),A&&e.cache){const{cursor:j,routerId:te}=p.query;if(j&&te){const fe=De(te),ue=De(j);fe===i&&(Me=ue)}}if(e.actions&&e.actions.length>0){const j=Q(e.actions),te={title:()=>l("Common.action"),key:"action",align:"center",fixed:"right",minWidth:180,resizable:!0,checked:!0,show:!0,hide:!0,render(fe,ue){return de(j,fe,ue)}};W.push(te),le.push(te)}h.value=W,b.value=Ae,k.value={...k.value,...pe,...Me},g.value=le,r.value&&r.value.setValues(JSON.parse(JSON.stringify(k.value))),r.value&&r.value.setData(JSON.parse(JSON.stringify(b.value)))},S=A=>typeof A=="number"?`${A}px`:A,z=()=>{if(e.height){const A=S(e.height);V.value=A,T.value=A;return}e.minHeight&&(V.value=S(e.minHeight)),e.maxHeight&&(T.value=S(e.maxHeight))};return n({init:D}),t.onMounted(()=>{P(!0),z()}),t.watch(()=>g.value,()=>{K()},{deep:!0}),t.watch(()=>e.columns,()=>{e.realtime&&P()},{deep:!0}),t.watch(()=>e.actions,()=>{e.realtime&&P()},{deep:!0}),{loading:d,minH:V,maxH:T,searchRef:r,exportLoading:u,tableColumns:h,tableData:N,tableQuery:k,searchDefaultValue:_,searchData:b,baseColumns:g,dragOptions:$,showImporter:m,pageChange:B,pageSizeChange:F,pageSorter:a,pinChange:O,showChange:ee,submit:w,exportData:M}}}),_0={class:"com-card"};function k0(e,o,n,r,l,p){const s=t.resolveComponent("IconAdd"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),u=t.resolveComponent("NTooltip"),m=t.resolveComponent("IconMailInboxAdd"),h=t.resolveComponent("IconCloudArrowDown"),g=t.resolveComponent("NPopconfirm"),N=t.resolveComponent("IconFilter"),k=t.resolveComponent("IconNavigation"),_=t.resolveComponent("IconPin"),b=t.resolveComponent("IconEye"),V=t.resolveComponent("Draggable"),T=t.resolveComponent("NPopover"),i=t.resolveComponent("OcSearchBar"),$=t.resolveComponent("NDataTable"),D=t.resolveComponent("OcImporter");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(i,{ref:"searchRef",value:e.tableQuery,defaultValue:e.searchDefaultValue,data:e.searchData,loading:e.loading,cache:!1,autoSubmit:e.autoSubmit,resetButton:e.resetButton,"onOnUpdate:value":e.submit},{header:t.withCtx(()=>[t.renderSlot(e.$slots,"header")]),action:t.withCtx(()=>[e.addFn?(t.openBlock(),t.createBlock(u,{key:0,trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{onClick:e.addFn},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.add")),1)]),_:1})):t.createCommentVNode("",!0),e.importer?(t.openBlock(),t.createBlock(u,{key:1,trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(d,{onClick:o[0]||(o[0]=B=>e.showImporter=!0)},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(m)]),_:1})]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.importer.title")),1)]),_:1})):t.createCommentVNode("",!0),e.exporter?(t.openBlock(),t.createBlock(u,{key:2,trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(g,{"positive-text":e.$t("Common.export"),placement:"bottom-end",onPositiveClick:e.exportData},{trigger:t.withCtx(()=>[t.createVNode(d,{loading:e.exportLoading},{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(h)]),_:1})]),_:1},8,["loading"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.export"))+"? ",1)]),_:1},8,["positive-text","onPositiveClick"])]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.export")),1)]),_:1})):t.createCommentVNode("",!0),t.createVNode(u,{trigger:"hover"},{trigger:t.withCtx(()=>[t.createVNode(T,{placement:"bottom-end",trigger:"click","show-arrow":!1},{trigger:t.withCtx(()=>[t.createVNode(d,null,{icon:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(N)]),_:1})]),_:1})]),default:t.withCtx(()=>[t.createVNode(V,t.mergeProps({modelValue:e.baseColumns,"onUpdate:modelValue":o[1]||(o[1]=B=>e.baseColumns=B),"component-data":{tag:"div"}},e.dragOptions,{"item-key":"key",handle:".oc-drag-handle"}),{item:t.withCtx(({element:B})=>[B.hide?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:B.key,class:"oc-table-sort"},[t.createVNode(d,{quaternary:"",class:"oc-drag-handle"},{icon:t.withCtx(()=>[t.createVNode(c,{size:"24"},{default:t.withCtx(()=>[t.createVNode(k)]),_:1})]),_:1}),t.createVNode(d,{quaternary:"",class:"oc-table-sort-title"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(typeof B.title=="string"?B.title:B.title&&B.title()),1)]),_:2},1024),t.createVNode(d,{type:B.pin?"primary":"tertiary",onClick:F=>e.pinChange(B),quaternary:""},{icon:t.withCtx(()=>[t.createVNode(c,{size:"24"},{default:t.withCtx(()=>[t.createVNode(_)]),_:1})]),_:2},1032,["type","onClick"]),t.createVNode(d,{type:B.show?"primary":"tertiary",onClick:F=>e.showChange(B),quaternary:""},{icon:t.withCtx(()=>[t.createVNode(c,{size:"24"},{default:t.withCtx(()=>[t.createVNode(b)]),_:1})]),_:2},1032,["type","onClick"])]))]),_:1},16,["modelValue"])]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(e.$t("Common.filter")),1)]),_:1}),t.renderSlot(e.$slots,"action")]),_:3},8,["value","defaultValue","data","loading","autoSubmit","resetButton","onOnUpdate:value"]),t.createElementVNode("div",_0,[t.createVNode($,{columns:e.tableColumns,data:e.tableData,pagination:e.pagination&&e.tableQuery.query,loading:e.loading,"default-checked-row-keys":e.defaultCheckedRowKeys,"scroll-x":e.scrollX,"flex-height":e.flexHeight,"min-height":e.minH,"max-height":e.maxH,"on-update:page":e.pageChange,"on-update:page-size":e.pageSizeChange,"on-update:sorter":e.pageSorter,remote:""},null,8,["columns","data","pagination","loading","default-checked-row-keys","scroll-x","flex-height","min-height","max-height","on-update:page","on-update:page-size","on-update:sorter"])]),e.importer?(t.openBlock(),t.createBlock(D,{key:0,show:e.showImporter,"onUpdate:show":o[2]||(o[2]=B=>e.showImporter=B),data:e.importer},null,8,["show","data"])):t.createCommentVNode("",!0)],64)}const Dn=I(b0,[["render",k0]]),$0=t.defineComponent({name:"OcWorkflowAdd",components:{IconAdd:xe,NButton:f.NButton,NIcon:f.NIcon,NPopover:f.NPopover},emits:["update:add"],setup(e,{emit:o}){const n=t.ref(!1);return{showPopover:n,submit:l=>{n.value=!1,o("update:add",l)}}}});function V0(e,o,n,r,l,p){const s=t.resolveComponent("IconAdd"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),u=t.resolveComponent("NFlex"),m=t.resolveComponent("NPopover");return t.openBlock(),t.createBlock(m,{trigger:"manual",show:e.showPopover},{trigger:t.withCtx(()=>[t.createVNode(d,{type:"primary",onClick:o[0]||(o[0]=h=>e.showPopover=!0)},{default:t.withCtx(()=>[t.createVNode(c,{size:"18"},{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),_:1})]),default:t.withCtx(()=>[t.createVNode(u,null,{default:t.withCtx(()=>[t.createVNode(d,{type:"primary",onClick:o[1]||(o[1]=h=>e.submit(2))},{default:t.withCtx(()=>[t.createTextVNode("节点")]),_:1}),t.createVNode(d,{type:"primary",onClick:o[2]||(o[2]=h=>e.submit(1))},{default:t.withCtx(()=>[t.createTextVNode("分支")]),_:1})]),_:1})]),_:1},8,["show"])}const Pn=I($0,[["render",V0]]),T0=t.defineComponent({name:"OcWorkflowCard",components:{NFlex:f.NFlex,OcWorkflowAdd:Pn,IconDismiss:ce},props:{data:{type:Object,default:()=>({})}},emits:["update:add","update:delete"],setup(e,{emit:o}){return{addOne:l=>{o("update:add",l)},doDelete:()=>{o("update:delete",!0)}}}}),S0={class:"oc-workflow-node"},B0={class:"oc-workflow-node-ctx"},I0=t.createElementVNode("div",{class:"oc-workflow-node-desc"},"功能",-1),O0={class:"oc-workflow-node-more"};function D0(e,o,n,r,l,p){const s=t.resolveComponent("IconDismiss"),c=t.resolveComponent("NIcon"),d=t.resolveComponent("NButton"),u=t.resolveComponent("NFlex"),m=t.resolveComponent("OcWorkflowAdd");return t.openBlock(),t.createElementBlock("div",S0,[t.createElementVNode("div",B0,[t.createVNode(u,{justify:"space-between",class:"oc-workflow-node-title"},{default:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(e.data.title),1),e.data.type===1||e.data.type===2?(t.openBlock(),t.createBlock(d,{key:0,onClick:e.doDelete},{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s)]),_:1})]),_:1},8,["onClick"])):t.createCommentVNode("",!0)]),_:1}),I0]),t.createElementVNode("div",O0,[t.createVNode(m,{"onUpdate:add":o[0]||(o[0]=h=>{e.addOne(h)})})])])}const P0=I(T0,[["render",D0]]),E0=t.defineComponent({name:"OcWorkflowNode",components:{NButton:f.NButton,OcWorkflowAdd:Pn,OcWorkflowCard:P0},props:{data:{type:Array,default:()=>[]}},setup(e){function o(m){const h=String(Date.now());return{title:"IF",type:1,key:h,parentKey:String(m),children:[{title:"条件1",type:1,key:`${h}1`,parentKey:h,children:[]},{title:"条件2",type:1,key:`${h}2`,parentKey:h,children:[]}]}}function n(m){const h=String(Date.now());return{title:`功能${Math.floor(Math.random()*101)}`,type:2,key:h,parentKey:String(m),children:[]}}return{addStartOne:m=>{e.data.splice(1,0,m===1?o(""):n(""))},addNodeOne:(m,h)=>{if(m.parentKey)e.data.push(h===1?o(m.parentKey):n(m.parentKey));else{const g=e.data.indexOf(m);e.data.splice(g+1,0,h===1?o(""):n(""))}},addCondition:m=>{const h=String(Date.now());m.children.push({title:`条件${m.children.length+1}`,type:1,key:h,parentKey:m.key,children:[]})},addConditionBottom:(m,h)=>{if(m.parentKey)e.data.push(h===1?o(m.parentKey):n(m.parentKey));else{const g=e.data.indexOf(m);e.data.splice(g+1,0,h===1?o(""):n(""))}},addConditionSide:(m,h)=>{m.children.length===0?m.children.push(h===1?o(m.parentKey):n(m.parentKey)):m.children.unshift(h===1?o(m.parentKey):n(m.parentKey))},deleteNodeOne:m=>{e.data.splice(m,1)},deleteConditionSide:(m,h)=>{if(m.children.length===2){const g=e.data.indexOf(m);e.data.splice(g,1)}else m.children.splice(h,1)}}}}),A0={key:2},M0={class:"oc-workflow-node-branch-add"},F0={class:"oc-workflow-branch-ctx"},j0={class:"oc-workflow-node-branch-add-bottom"},x0={key:3,class:"oc-workflow-node-end"},z0=[t.createElementVNode("div",{class:"oc-workflow-node-title-end"},"流程结束",-1)];function L0(e,o,n,r,l,p){const s=t.resolveComponent("OcWorkflowCard"),c=t.resolveComponent("NButton"),d=t.resolveComponent("OcWorkflowNode"),u=t.resolveComponent("OcWorkflowAdd");return t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.data,(m,h)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:m.key},[m.type===0?(t.openBlock(),t.createBlock(s,{data:m,key:h,"onUpdate:add":e.addStartOne},null,8,["data","onUpdate:add"])):t.createCommentVNode("",!0),m.type===2?(t.openBlock(),t.createBlock(s,{data:m,key:h,class:"arrow","onUpdate:add":g=>{e.addNodeOne(m,g)},"onUpdate:delete":g=>e.deleteNodeOne(h)},null,8,["data","onUpdate:add","onUpdate:delete"])):t.createCommentVNode("",!0),m.type===1?(t.openBlock(),t.createElementBlock("div",A0,[(t.openBlock(),t.createElementBlock("div",{class:"oc-workflow-branch",key:h},[t.createElementVNode("div",M0,[t.createVNode(c,{type:"success",onClick:g=>e.addCondition(m)},{default:t.withCtx(()=>[t.createTextVNode("添加条件")]),_:2},1032,["onClick"])]),t.createElementVNode("div",F0,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.children,(g,N)=>(t.openBlock(),t.createElementBlock("div",{key:`children-${N}`},[t.createVNode(s,{data:g,"onUpdate:add":k=>{e.addConditionSide(g,k)},"onUpdate:delete":k=>e.deleteConditionSide(m,N)},null,8,["data","onUpdate:add","onUpdate:delete"]),t.createVNode(d,{data:g.children},null,8,["data"])]))),128))])])),t.createElementVNode("div",j0,[t.createVNode(u,{"onUpdate:add":g=>{e.addConditionBottom(m,g)}},null,8,["onUpdate:add"])])])):t.createCommentVNode("",!0),m.type===99?(t.openBlock(),t.createElementBlock("div",x0,z0)):t.createCommentVNode("",!0)],64))),128)}const R0=I(E0,[["render",L0]]),q0=t.defineComponent({name:"OcWorkflow",components:{OcWorkflowNode:R0,NSlider:f.NSlider,NSelect:f.NSelect},props:{data:{type:Array,default:()=>[{title:"流程开始",type:0,key:"1",parentKey:"",children:[]},{title:"流程结束",type:99,key:"2",parentKey:"",children:[]}]}},setup(){const e=t.ref(1),o=t.ref(100),n=t.ref([{label:"50%",value:50},{label:"80%",value:80},{label:"100%",value:100},{label:"120%",value:120},{label:"150%",value:150}]);return{scaleShow:e,scaleFilter:o,scaleOption:n,scaleHandle:s=>{o.value=s,e.value=s/100},formatTooltip:s=>`${s}%`,renderSelectLabel:s=>t.h("div",{},{default:()=>`${s.value}%`})}}}),G0={class:"oc-workflow"},H0={class:"oc-workflow-tools"},U0={class:"oc-workflow-ctx"},K0={class:"oc-workflow-main"};function W0(e,o,n,r,l,p){const s=t.resolveComponent("NSelect"),c=t.resolveComponent("NSlider"),d=t.resolveComponent("OcWorkflowNode");return t.openBlock(),t.createElementBlock("div",G0,[t.createElementVNode("div",H0,[t.createVNode(s,{value:e.scaleFilter,"onUpdate:value":o[0]||(o[0]=u=>e.scaleFilter=u),options:e.scaleOption,"render-label":e.renderSelectLabel,"on-update:value":e.scaleHandle,style:{width:"100px"}},null,8,["value","options","render-label","on-update:value"]),t.createVNode(c,{value:e.scaleFilter,"onUpdate:value":o[1]||(o[1]=u=>e.scaleFilter=u),min:50,max:150,step:10,style:{width:"100px"},"on-update:value":e.scaleHandle,"format-tooltip":e.formatTooltip,class:"oc-workflow-slider"},null,8,["value","on-update:value","format-tooltip"])]),t.createElementVNode("div",U0,[t.createElementVNode("div",K0,[t.createElementVNode("div",{class:"oc-workflow-warp",style:t.normalizeStyle({transform:`scale(${e.scaleShow})`})},[t.createVNode(d,{data:e.data},null,8,["data"])],4)])])])}const En=I(q0,[["render",W0]]),An=Object.freeze(Object.defineProperty({__proto__:null,IconAdd:xe,IconAlert:pt,IconArrowClockwise:we,IconArrowDown:He,IconArrowSquareDown:mt,IconArrowUp:bt,IconCalendarArrowDown:Te,IconChevronLeft:ut,IconClear:ft,IconCloudArrowDown:qe,IconDelete:Nt,IconDismiss:ce,IconDrafts:yt,IconEye:Re,IconFilter:Le,IconFullScreenMaximize:so,IconGridDots:wt,IconMailInboxAdd:Se,IconNavigation:Ge,IconPin:Ct,IconReset:_t,IconSearch:ze,IconUser:kt,IconWeatherMoon:ht,IconWeatherSunny:gt,OcActionButton:lo,OcAuth:ho,OcBack:go,OcCircle:wo,OcError:No,OcFooter:yo,OcForm:hn,OcHeader:Cn,OcImporter:eo,OcLogin:_n,OcLogo:kn,OcMain:Tn,OcMy:Sn,OcNumberRoll:to,OcReport:Bn,OcScan:In,OcSearchBar:oo,OcSkeleton:On,OcTable:Dn,OcWorkflow:En,commonStore:E,fnClearUser:rt,fnDownload:Yt,fnGetUser:at,fnRenderAction:de,fnSetLang:Ne,fnSetTheme:Ke,fnSetUser:Zt,fnUserLogout:vt,i18n:X,userStore:C},Symbol.toStringTag,{value:"Module"}));var J0=v,X0=function(){return J0.Date.now()},Q0=X0,Y0=/\s/;function Z0(e){for(var o=e.length;o--&&Y0.test(e.charAt(o)););return o}var v0=Z0,eg=v0,tg=/^\s+/;function og(e){return e&&e.slice(0,eg(e)+1).replace(tg,"")}var ng=og,ag=Ee,rg=ke,lg="[object Symbol]";function sg(e){return typeof e=="symbol"||rg(e)&&ag(e)==lg}var cg=sg,ig=ng,Mn=me,dg=cg,Fn=NaN,pg=/^[-+]0x[0-9a-f]+$/i,fg=/^0b[01]+$/i,ug=/^0o[0-7]+$/i,mg=parseInt;function hg(e){if(typeof e=="number")return e;if(dg(e))return Fn;if(Mn(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=Mn(o)?o+"":o}if(typeof e!="string")return e===0?e:+e;e=ig(e);var n=fg.test(e);return n||ug.test(e)?mg(e.slice(2),n?2:8):pg.test(e)?Fn:+e}var gg=hg,wg=me,no=Q0,jn=gg,Ng="Expected a function",yg=Math.max,Cg=Math.min;function bg(e,o,n){var r,l,p,s,c,d,u=0,m=!1,h=!1,g=!0;if(typeof e!="function")throw new TypeError(Ng);o=jn(o)||0,wg(n)&&(m=!!n.leading,h="maxWait"in n,p=h?yg(jn(n.maxWait)||0,o):p,g="trailing"in n?!!n.trailing:g);function N(B){var F=r,a=l;return r=l=void 0,u=B,s=e.apply(a,F),s}function k(B){return u=B,c=setTimeout(V,o),m?N(B):s}function _(B){var F=B-d,a=B-u,O=o-F;return h?Cg(O,p-a):O}function b(B){var F=B-d,a=B-u;return d===void 0||F>=o||F<0||h&&a>=p}function V(){var B=no();if(b(B))return T(B);c=setTimeout(V,_(B))}function T(B){return c=void 0,g&&r?N(B):(r=l=void 0,s)}function i(){c!==void 0&&clearTimeout(c),u=0,r=d=l=c=void 0}function $(){return c===void 0?s:T(no())}function D(){var B=no(),F=b(B);if(r=arguments,l=this,d=B,F){if(c===void 0)return k(d);if(h)return clearTimeout(c),c=setTimeout(V,o),N(d)}return c===void 0&&(c=setTimeout(V,o)),s}return D.cancel=i,D.flush=$,D}var _g=bg;const kg=Co(_g);let ao=3840,ro=2160;const xn=t.reactive({scale:1});function $g(e,o){ao=e,ro=o}function zn(){let e=1;const o=window.innerWidth,n=window.innerHeight,r=ao,l=ro,p=parseFloat((r/l).toFixed(5));if(parseFloat((o/n).toFixed(5))>p){const c=parseFloat((n*p/r).toFixed(5));e=c>1?1:c}else{const c=parseFloat((o/p/l).toFixed(5));e=c>1?1:c}xn.scale=e}function Vg(){const e=kg(zn,200);return e(),window.addEventListener("resize",e),()=>{ao=3840,ro=2160,window.removeEventListener("resize",e)}}const Tg=e=>!!(C.kind===-1||C.kind===99||C.iot_menu_authorization.includes(e)),Sg=e=>C.platform_tdm?C.kind===-1||C.kind===99||e==="home"?!0:C.tdm_menu_authorization.includes(e):!1,Bg=e=>C.platform_qms?C.kind===-1||C.kind===99||e==="home"?!0:C.qms_menu_authorization.includes(e):!1,Ig=e=>C.platform_twin?(C.kind===-1||C.kind===99||e==="home",!0):!1,Og=e=>!!(C.kind===-1||C.kind===99||C.maintain_menu_authorization.includes(e));let lt="";const x=navigator.userAgent.toLocaleUpperCase(),Dg=()=>{const e=/WINDOWS NT 5.[\d]+/,o=/WINDOWS NT 6.[\d]+/,n=/WINDOWS NT 7.[\d]+/,r=/WINDOWS NT 10.[\d]+/,l=/WINDOWS NT 11.[\d]+/,p=/ANDROID [\d.]+/,s=/IPHONE/,c=/IPAD/,d=/MAC/;if(e.test(x))return"Windows XP";if(o.test(x))return"Windows 7";if(n.test(x))return"Windows 8";if(r.test(x))return"Windows 10";if(l.test(x))return"Windows 11";if(p.test(x)){const u=p.exec(x);return`Android ${u?u[0].split(" ")[1]:""}`}if(s.test(x)){const m=/OS [\d_]+/.exec(x);return`iPhone ${m?m[0].split(" ")[1].replace(/_/g,"."):""}`}if(c.test(x)){const m=/OS [\d_]+/.exec(x);return`iPad${m?m[0].split(" ")[1].replace(/_/g,"."):""}`}if(d.test(x)){const m=/ [\d_]+/.exec(x);return`MAC ${m?m[0].replace(/_/g,".").replace(/ /g,""):""}`}return"Other Platform"},Pg=()=>{const e=/MSIE [\d]+/,o=/EDG\/[\d.]+/,n=/FIREFOX\/[\d.]+/,r=/CHROME\/[\d.]+/,l=/SAFARI\/[\d.]+/,p=/OPR\/[\d.]+/,s=/SE \d/,c=/UCBROWSER/,d=/ANDROID [\d.]+/;if(e.test(x)&&s.test(x))return"SogouIE";if(s.test(x))return"SogouFast";if(c.test(x))return"UC";if(d.test(x))return"Android";if(p.test(x))return"Opera";if(e.test(x)){const u=e.exec(x);return`IE ${u?u[0].split("/")[1]:""}`}if(o.test(x)){const u=o.exec(x);return`Edge ${u?u[0].split("/")[1]:""}`}if(r.test(x)){const u=r.exec(x);return`Chrome ${u?u[0].split("/")[1]:""}`}if(n.test(x)){const u=n.exec(x);return`Firefox ${u?u[0].split("/")[1]:""}`}if(l.test(x)){const u=l.exec(x);return`Safari ${u?u[0].split("/")[1]:""}`}return"Others"};function Ln(e,o,n,r=!1){if(e!==void 0&&(o in e||r)){const l=e[o],p=n(l);typeof p=="function"&&(e[o]=p)}}function Rn(e,o,n,r=!1){e.addEventListener(o,n,r)}function Eg(){if(!("XMLHttpRequest"in window))return;const e=XMLHttpRequest.prototype;Ln(e,"open",o=>function(...n){this.xhr={method:n[0].toUpperCase(),url:n[1],startTime:Date.now(),type:"xhr"},this.ontimeout=function(){console.log("超时",this)},this.timeout=1e4,Rn(this,"error",function(){st(3,this.xhr.url,["Request",this.status])}),o.apply(this,n)}),Ln(e,"send",o=>function(...n){Rn(this,"loadend",function(){st(3,this.xhr.url,["Response",this.status])}),o.apply(this,n)})}function Ag(e,o){lt=typeof o=="string"?o:lt,!(!o||!lt)&&(Eg(),window.addEventListener("error",function(n){st(1,window.location.href,n)}),window.addEventListener("unhandledrejection",function(n){console.log("捕获到异常",n),n.preventDefault()}),e.config.errorHandler=n=>{st(2,window.location.href,n)})}const st=(e,o,n)=>{if(n==="ResizeObserver loop limit exceeded")return;const r={type:e,time:Date.now(),url:encodeURIComponent(o||location.href),title:document.title,browser:Pg(),platform:Dg(),message:e===1||e===2?n.message:n,user:{userId:C.userId,factoryId:C.factoryId,systemType:C.systemType,tenantLoginCode:C.tenantLoginCode,tenantName:C.tenantName,tenantStatus:C.tenantStatus,userAgent:x}},l=ie(r),p=document.body,s=document.createElement("iframe"),c=document.createElement("form"),d=document.createElement("input");s.name="xhrFrame",s.style.visibility="hidden",s.style.width="0px",s.style.height="0px",s.style.overflow="hidden",s.onload=function(){p.removeChild(s),p.removeChild(c)},d.name="data",d.value=l,c.target="xhrFrame",c.method="POST",c.action=lt,c.style.visibility="hidden",c.style.width="0px",c.style.height="0px",c.style.overflow="hidden",c.append(d),p.append(s),p.append(c),c.submit(),e!==3&&console.error(n)};let qn;async function Gn(){const e=await fetch(`${window.location.protocol}//${window.location.host}`,{method:"HEAD",cache:"no-cache"});return e.headers.get("etag")||e.headers.get("last-modified")}async function Mg(){const e=await Gn();qn!==e&&ml(!0)}async function Fg(){qn=await Gn(),window.versionMonitor&&clearInterval(window.versionMonitor),window.versionMonitor=setInterval(()=>{Mg()},60*1e3)}function Hn({components:e=[]}={}){const o=[];function n(l,p,s){l.component(p)||l.component(p,s)}function r(l,p){if(!o.includes(l)&&(o.push(l),e.forEach(s=>{const{name:c,alias:d}=s;n(l,c,s),d&&d.forEach(u=>{n(l,u,s)})}),p)){const{platform:s="iot",monitor:c=!1,versionMonitor:d=!0,enableRedirect:u=!0,language:m=!1,local:h="zh-CN"}=p,g=Z("theme",!1),N=Z("lang",h);ul(s),xh(u),fl(m),Ne(N),Ke(g),X.global.locale.value=N,d&&Fg(),c&&Ag(l,c)}}return{version:fo,install:r}}const Un=Hn({components:Object.keys(An).map(e=>An[e])}),jg=Un.install;y.CUSTOM=Bh,y.FILE=Qt,y.GET=wn,y.IconAdd=xe,y.IconAlert=pt,y.IconArrowClockwise=we,y.IconArrowDown=He,y.IconArrowSquareDown=mt,y.IconArrowUp=bt,y.IconCalendarArrowDown=Te,y.IconChevronLeft=ut,y.IconClear=ft,y.IconCloudArrowDown=qe,y.IconDelete=Nt,y.IconDismiss=ce,y.IconDrafts=yt,y.IconEye=Re,y.IconFilter=Le,y.IconFullScreenMaximize=so,y.IconGridDots=wt,y.IconMailInboxAdd=Se,y.IconNavigation=Ge,y.IconPin=Ct,y.IconReset=_t,y.IconSearch=ze,y.IconUser=kt,y.IconWeatherMoon=ht,y.IconWeatherSunny=gt,y.OcActionButton=lo,y.OcAuth=ho,y.OcBack=go,y.OcCircle=wo,y.OcError=No,y.OcFooter=yo,y.OcForm=hn,y.OcHeader=Cn,y.OcImporter=eo,y.OcLogin=_n,y.OcLogo=kn,y.OcMain=Tn,y.OcMy=Sn,y.OcNumberRoll=to,y.OcReport=Bn,y.OcScan=In,y.OcSearchBar=oo,y.OcSkeleton=On,y.OcTable=Dn,y.OcWorkflow=En,y.POST=U,y.commonStore=E,y.create=Hn,y.darkTheme=Vn,y.default=Un,y.fnCancelFetch=Sh,y.fnCheckDashRole=Ig,y.fnCheckIoTRole=Tg,y.fnCheckMaintainRole=Og,y.fnCheckQMSRole=Bg,y.fnCheckTDMRole=Sg,y.fnClearUser=rt,y.fnComputedScale=zn,y.fnDecodeCursor=De,y.fnDelStorage=Be,y.fnDeleteLoad=po,y.fnDownload=Yt,y.fnEncodeCursor=ie,y.fnFormatTime=ne,y.fnFormatUnits=il,y.fnFullScreen=cl,y.fnGetStorage=Z,y.fnGetUser=at,y.fnListenerScale=Vg,y.fnPageModel2Naive=Ie,y.fnPageNaive2Model=Oe,y.fnRenderAction=de,y.fnScrollTop=Ue,y.fnSetLang=Ne,y.fnSetNormalWidthAndHeight=$g,y.fnSetStorage=oe,y.fnSetTheme=Ke,y.fnSetUser=Zt,y.fnThrottle=sl,y.fnUserLogout=vt,y.i18n=X,y.install=jg,y.lightTheme=$n,y.scaleStore=xn,y.userStore=C,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});