@syhr/sy-graph 1.0.9-beta.3 → 1.0.9-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/graph.css +1 -1
- package/lib/sy-graph.cjs +2 -2
- package/lib/sy-graph.mjs +5 -2
- package/lib/sy-graph.umd.js +3 -3
- package/package.json +1 -1
package/lib/sy-graph.cjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...t){const n=new this(r);return t.forEach(l=>n.set(l)),n}static accessor(r){const n=(this[cs]=this[cs]={accessors:{}}).accessors,l=this.prototype;function a(o){const u=Ir(o);n[u]||(Rd(l,o),n[u]=!0)}return le.isArray(r)?r.forEach(a):a(r),this}};Je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);le.reduceDescriptors(Je.prototype,({value:e},r)=>{let t=r[0].toUpperCase()+r.slice(1);return{get:()=>e,set(n){this[t]=n}}});le.freezeMethods(Je);function ji(e,r){const t=this||Xr,n=r||t,l=Je.from(n.headers);let a=n.data;return le.forEach(e,function(u){a=u.call(t,a,l.normalize(),r?r.status:void 0)}),l.normalize(),a}function $u(e){return!!(e&&e.__CANCEL__)}let Zr=class extends be{constructor(r,t,n){super(r==null?"canceled":r,be.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function zu(e,r,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?e(t):r(new be("Request failed with status code "+t.status,[be.ERR_BAD_REQUEST,be.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function Od(e){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}function Pd(e,r){e=e||10;const t=new Array(e),n=new Array(e);let l=0,a=0,o;return r=r!==void 0?r:1e3,function(p){const s=Date.now(),i=n[a];o||(o=s),t[l]=p,n[l]=s;let d=a,c=0;for(;d!==l;)c+=t[d++],d=d%e;if(l=(l+1)%e,l===a&&(a=(a+1)%e),s-o<r)return;const f=i&&s-i;return f?Math.round(c*1e3/f):void 0}}function Nd(e,r){let t=0,n=1e3/r,l,a;const o=(s,i=Date.now())=>{t=i,l=null,a&&(clearTimeout(a),a=null),e(...s)};return[(...s)=>{const i=Date.now(),d=i-t;d>=n?o(s,i):(l=s,a||(a=setTimeout(()=>{a=null,o(l)},n-d)))},()=>l&&o(l)]}const Mn=(e,r,t=3)=>{let n=0;const l=Pd(50,250);return Nd(a=>{const o=a.loaded,u=a.lengthComputable?a.total:void 0,p=o-n,s=l(p),i=o<=u;n=o;const d={loaded:o,total:u,progress:u?o/u:void 0,bytes:p,rate:s||void 0,estimated:s&&u&&i?(u-o)/s:void 0,event:a,lengthComputable:u!=null,[r?"download":"upload"]:!0};e(d)},t)},fs=(e,r)=>{const t=e!=null;return[n=>r[0]({lengthComputable:t,total:e,loaded:n}),r[1]]},hs=e=>(...r)=>le.asap(()=>e(...r)),Md=Ke.hasStandardBrowserEnv?((e,r)=>t=>(t=new URL(t,Ke.origin),e.protocol===t.protocol&&e.host===t.host&&(r||e.port===t.port)))(new URL(Ke.origin),Ke.navigator&&/(msie|trident)/i.test(Ke.navigator.userAgent)):()=>!0,Ld=Ke.hasStandardBrowserEnv?{write(e,r,t,n,l,a,o){if(typeof document=="undefined")return;const u=[`${e}=${encodeURIComponent(r)}`];le.isNumber(t)&&u.push(`expires=${new Date(t).toUTCString()}`),le.isString(n)&&u.push(`path=${n}`),le.isString(l)&&u.push(`domain=${l}`),a===!0&&u.push("secure"),le.isString(o)&&u.push(`SameSite=${o}`),document.cookie=u.join("; ")},read(e){if(typeof document=="undefined")return null;const r=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return r?decodeURIComponent(r[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ud(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function qd(e,r){return r?e.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):e}function ju(e,r,t){let n=!Ud(r);return e&&(n||t==!1)?qd(e,r):r}const ps=e=>e instanceof Je?he({},e):e;function Yt(e,r){r=r||{};const t={};function n(s,i,d,c){return le.isPlainObject(s)&&le.isPlainObject(i)?le.merge.call({caseless:c},s,i):le.isPlainObject(i)?le.merge({},i):le.isArray(i)?i.slice():i}function l(s,i,d,c){if(le.isUndefined(i)){if(!le.isUndefined(s))return n(void 0,s,d,c)}else return n(s,i,d,c)}function a(s,i){if(!le.isUndefined(i))return n(void 0,i)}function o(s,i){if(le.isUndefined(i)){if(!le.isUndefined(s))return n(void 0,s)}else return n(void 0,i)}function u(s,i,d){if(d in r)return n(s,i);if(d in e)return n(void 0,s)}const p={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u,headers:(s,i,d)=>l(ps(s),ps(i),d,!0)};return le.forEach(Object.keys(he(he({},e),r)),function(i){if(i==="__proto__"||i==="constructor"||i==="prototype")return;const d=le.hasOwnProp(p,i)?p[i]:l,c=d(e[i],r[i],i);le.isUndefined(c)&&d!==u||(t[i]=c)}),t}const Hu=e=>{const r=Yt({},e);let{data:t,withXSRFToken:n,xsrfHeaderName:l,xsrfCookieName:a,headers:o,auth:u}=r;if(r.headers=o=Je.from(o),r.url=Uu(ju(r.baseURL,r.url,r.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&o.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),le.isFormData(t)){if(Ke.hasStandardBrowserEnv||Ke.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(le.isFunction(t.getHeaders)){const p=t.getHeaders(),s=["content-type","content-length"];Object.entries(p).forEach(([i,d])=>{s.includes(i.toLowerCase())&&o.set(i,d)})}}if(Ke.hasStandardBrowserEnv&&(n&&le.isFunction(n)&&(n=n(r)),n||n!==!1&&Md(r.url))){const p=l&&a&&Ld.read(a);p&&o.set(l,p)}return r},$d=typeof XMLHttpRequest!="undefined",zd=$d&&function(e){return new Promise(function(t,n){const l=Hu(e);let a=l.data;const o=Je.from(l.headers).normalize();let{responseType:u,onUploadProgress:p,onDownloadProgress:s}=l,i,d,c,f,h;function v(){f&&f(),h&&h(),l.cancelToken&&l.cancelToken.unsubscribe(i),l.signal&&l.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;m.open(l.method.toUpperCase(),l.url,!0),m.timeout=l.timeout;function g(){if(!m)return;const y=Je.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),k={data:!u||u==="text"||u==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:y,config:e,request:m};zu(function(I){t(I),v()},function(I){n(I),v()},k),m=null}"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(g)},m.onabort=function(){m&&(n(new be("Request aborted",be.ECONNABORTED,e,m)),m=null)},m.onerror=function(w){const k=w&&w.message?w.message:"Network Error",T=new be(k,be.ERR_NETWORK,e,m);T.event=w||null,n(T),m=null},m.ontimeout=function(){let w=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const k=l.transitional||sa;l.timeoutErrorMessage&&(w=l.timeoutErrorMessage),n(new be(w,k.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,m)),m=null},a===void 0&&o.setContentType(null),"setRequestHeader"in m&&le.forEach(o.toJSON(),function(w,k){m.setRequestHeader(k,w)}),le.isUndefined(l.withCredentials)||(m.withCredentials=!!l.withCredentials),u&&u!=="json"&&(m.responseType=l.responseType),s&&([c,h]=Mn(s,!0),m.addEventListener("progress",c)),p&&m.upload&&([d,f]=Mn(p),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",f)),(l.cancelToken||l.signal)&&(i=y=>{m&&(n(!y||y.type?new Zr(null,e,m):y),m.abort(),m=null)},l.cancelToken&&l.cancelToken.subscribe(i),l.signal&&(l.signal.aborted?i():l.signal.addEventListener("abort",i)));const x=Od(l.url);if(x&&Ke.protocols.indexOf(x)===-1){n(new be("Unsupported protocol "+x+":",be.ERR_BAD_REQUEST,e));return}m.send(a||null)})},jd=(e,r)=>{const{length:t}=e=e?e.filter(Boolean):[];if(r||t){let n=new AbortController,l;const a=function(s){if(!l){l=!0,u();const i=s instanceof Error?s:this.reason;n.abort(i instanceof be?i:new Zr(i instanceof Error?i.message:i))}};let o=r&&setTimeout(()=>{o=null,a(new be(`timeout of ${r}ms exceeded`,be.ETIMEDOUT))},r);const u=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(a):s.removeEventListener("abort",a)}),e=null)};e.forEach(s=>s.addEventListener("abort",a));const{signal:p}=n;return p.unsubscribe=()=>le.asap(u),p}},Hd=function*(e,r){let t=e.byteLength;if(t<r){yield e;return}let n=0,l;for(;n<t;)l=n+r,yield e.slice(n,l),n=l},Vd=function(e,r){return yi(this,null,function*(){try{for(var t=Ta(Wd(e)),n,l,a;n=!(l=yield new zt(t.next())).done;n=!1){const o=l.value;yield*gi(Hd(o,r))}}catch(l){a=[l]}finally{try{n&&(l=t.return)&&(yield new zt(l.call(t)))}finally{if(a)throw a[0]}}})},Wd=function(e){return yi(this,null,function*(){if(e[Symbol.asyncIterator]){yield*gi(e);return}const r=e.getReader();try{for(;;){const{done:t,value:n}=yield new zt(r.read());if(t)break;yield n}}finally{yield new zt(r.cancel())}})},ds=(e,r,t,n)=>{const l=Vd(e,r);let a=0,o,u=s=>{o||(o=!0,n&&n(s))};return new ReadableStream({pull(s){return je(this,null,function*(){try{const{done:i,value:d}=yield l.next();if(i){u(),s.close();return}let c=d.byteLength;if(t){let f=a+=c;t(f)}s.enqueue(new Uint8Array(d))}catch(i){throw u(i),i}})},cancel(s){return u(s),l.return()}},{highWaterMark:2})},ms=64*1024,{isFunction:dn}=le,Kd=(({Request:e,Response:r})=>({Request:e,Response:r}))(le.global),{ReadableStream:vs,TextEncoder:ys}=le.global,gs=(e,...r)=>{try{return!!e(...r)}catch(t){return!1}},Gd=e=>{e=le.merge.call({skipUndefined:!0},Kd,e);const{fetch:r,Request:t,Response:n}=e,l=r?dn(r):typeof fetch=="function",a=dn(t),o=dn(n);if(!l)return!1;const u=l&&dn(vs),p=l&&(typeof ys=="function"?(h=>v=>h.encode(v))(new ys):h=>je(exports,null,function*(){return new Uint8Array(yield new t(h).arrayBuffer())})),s=a&&u&&gs(()=>{let h=!1;const v=new t(Ke.origin,{body:new vs,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return h&&!v}),i=o&&u&&gs(()=>le.isReadableStream(new n("").body)),d={stream:i&&(h=>h.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!d[h]&&(d[h]=(v,m)=>{let g=v&&v[h];if(g)return g.call(v);throw new be(`Response type '${h}' is not supported`,be.ERR_NOT_SUPPORT,m)})});const c=h=>je(exports,null,function*(){if(h==null)return 0;if(le.isBlob(h))return h.size;if(le.isSpecCompliantForm(h))return(yield new t(Ke.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(le.isArrayBufferView(h)||le.isArrayBuffer(h))return h.byteLength;if(le.isURLSearchParams(h)&&(h=h+""),le.isString(h))return(yield p(h)).byteLength}),f=(h,v)=>je(exports,null,function*(){const m=le.toFiniteNumber(h.getContentLength());return m==null?c(v):m});return h=>je(exports,null,function*(){let{url:v,method:m,data:g,signal:x,cancelToken:y,timeout:w,onDownloadProgress:k,onUploadProgress:T,responseType:I,headers:D,withCredentials:X="same-origin",fetchOptions:V}=Hu(h),E=r||fetch;I=I?(I+"").toLowerCase():"text";let A=jd([x,y&&y.toAbortSignal()],w),C=null;const F=A&&A.unsubscribe&&(()=>{A.unsubscribe()});let j;try{if(T&&s&&m!=="get"&&m!=="head"&&(j=yield f(D,g))!==0){let L=new t(v,{method:"POST",body:g,duplex:"half"}),O;if(le.isFormData(g)&&(O=L.headers.get("content-type"))&&D.setContentType(O),L.body){const[H,W]=fs(j,Mn(hs(T)));g=ds(L.body,ms,H,W)}}le.isString(X)||(X=X?"include":"omit");const P=a&&"credentials"in t.prototype,J=_e(he({},V),{signal:A,method:m.toUpperCase(),headers:D.normalize().toJSON(),body:g,duplex:"half",credentials:P?X:void 0});C=a&&new t(v,J);let $=yield a?E(C,V):E(v,J);const U=i&&(I==="stream"||I==="response");if(i&&(k||U&&F)){const L={};["status","statusText","headers"].forEach(Z=>{L[Z]=$[Z]});const O=le.toFiniteNumber($.headers.get("content-length")),[H,W]=k&&fs(O,Mn(hs(k),!0))||[];$=new n(ds($.body,ms,H,()=>{W&&W(),F&&F()}),L)}I=I||"text";let K=yield d[le.findKey(d,I)||"text"]($,h);return!U&&F&&F(),yield new Promise((L,O)=>{zu(L,O,{data:K,headers:Je.from($.headers),status:$.status,statusText:$.statusText,config:h,request:C})})}catch(P){throw F&&F(),P&&P.name==="TypeError"&&/Load failed|fetch/i.test(P.message)?Object.assign(new be("Network Error",be.ERR_NETWORK,h,C,P&&P.response),{cause:P.cause||P}):be.from(P,P&&P.code,h,C,P&&P.response)}})},Qd=new Map,Vu=e=>{let r=e&&e.env||{};const{fetch:t,Request:n,Response:l}=r,a=[n,l,t];let o=a.length,u=o,p,s,i=Qd;for(;u--;)p=a[u],s=i.get(p),s===void 0&&i.set(p,s=u?new Map:Gd(r)),i=s;return s};Vu();const ua={http:hd,xhr:zd,fetch:{get:Vu}};le.forEach(ua,(e,r)=>{if(e){try{Object.defineProperty(e,"name",{value:r})}catch(t){}Object.defineProperty(e,"adapterName",{value:r})}});const xs=e=>`- ${e}`,Yd=e=>le.isFunction(e)||e===null||e===!1;function Xd(e,r){e=le.isArray(e)?e:[e];const{length:t}=e;let n,l;const a={};for(let o=0;o<t;o++){n=e[o];let u;if(l=n,!Yd(n)&&(l=ua[(u=String(n)).toLowerCase()],l===void 0))throw new be(`Unknown adapter '${u}'`);if(l&&(le.isFunction(l)||(l=l.get(r))))break;a[u||"#"+o]=l}if(!l){const o=Object.entries(a).map(([p,s])=>`adapter ${p} `+(s===!1?"is not supported by the environment":"is not available in the build"));let u=t?o.length>1?`since :
|
|
7
7
|
`+o.map(xs).join(`
|
|
8
8
|
`):" "+xs(o[0]):"as no adapter specified";throw new be("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return l}const Wu={getAdapter:Xd,adapters:ua};function Hi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Zr(null,e)}function bs(e){return Hi(e),e.headers=Je.from(e.headers),e.data=ji.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Wu.getAdapter(e.adapter||Xr.adapter,e)(e).then(function(n){return Hi(e),n.data=ji.call(e,e.transformResponse,n),n.headers=Je.from(n.headers),n},function(n){return $u(n)||(Hi(e),n&&n.response&&(n.response.data=ji.call(e,e.transformResponse,n.response),n.response.headers=Je.from(n.response.headers))),Promise.reject(n)})}const Ku="1.13.5",Xn={};["object","boolean","number","function","string","symbol"].forEach((e,r)=>{Xn[e]=function(n){return typeof n===e||"a"+(r<1?"n ":" ")+e}});const ws={};Xn.transitional=function(r,t,n){function l(a,o){return"[Axios v"+Ku+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,u)=>{if(r===!1)throw new be(l(o," has been removed"+(t?" in "+t:"")),be.ERR_DEPRECATED);return t&&!ws[o]&&(ws[o]=!0,console.warn(l(o," has been deprecated since v"+t+" and will be removed in the near future"))),r?r(a,o,u):!0}};Xn.spelling=function(r){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${r}`),!0)};function Zd(e,r,t){if(typeof e!="object")throw new be("options must be an object",be.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let l=n.length;for(;l-- >0;){const a=n[l],o=r[a];if(o){const u=e[a],p=u===void 0||o(u,a,e);if(p!==!0)throw new be("option "+a+" must be "+p,be.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new be("Unknown option "+a,be.ERR_BAD_OPTION)}}const In={assertOptions:Zd,validators:Xn},ot=In.validators;let Qt=class{constructor(r){this.defaults=r||{},this.interceptors={request:new us,response:new us}}request(r,t){return je(this,null,function*(){try{return yield this._request(r,t)}catch(n){if(n instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const a=l.stack?l.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
9
|
-
`+a):n.stack=a}catch(o){}}throw n}})}_request(r,t){typeof r=="string"?(t=t||{},t.url=r):t=r||{},t=Yt(this.defaults,t);const{transitional:n,paramsSerializer:l,headers:a}=t;n!==void 0&&In.assertOptions(n,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean),legacyInterceptorReqResOrdering:ot.transitional(ot.boolean)},!1),l!=null&&(le.isFunction(l)?t.paramsSerializer={serialize:l}:In.assertOptions(l,{encode:ot.function,serialize:ot.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),In.assertOptions(t,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=a&&le.merge(a.common,a[t.method]);a&&le.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),t.headers=Je.concat(o,a);const u=[];let p=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(t)===!1)return;p=p&&v.synchronous;const m=t.transitional||sa;m&&m.legacyInterceptorReqResOrdering?u.unshift(v.fulfilled,v.rejected):u.push(v.fulfilled,v.rejected)});const s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});let i,d=0,c;if(!p){const h=[bs.bind(this),void 0];for(h.unshift(...u),h.push(...s),c=h.length,i=Promise.resolve(t);d<c;)i=i.then(h[d++],h[d++]);return i}c=u.length;let f=t;for(;d<c;){const h=u[d++],v=u[d++];try{f=h(f)}catch(m){v.call(this,m);break}}try{i=bs.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,c=s.length;d<c;)i=i.then(s[d++],s[d++]);return i}getUri(r){r=Yt(this.defaults,r);const t=ju(r.baseURL,r.url,r.allowAbsoluteUrls);return Uu(t,r.params,r.paramsSerializer)}};le.forEach(["delete","get","head","options"],function(r){Qt.prototype[r]=function(t,n){return this.request(Yt(n||{},{method:r,url:t,data:(n||{}).data}))}});le.forEach(["post","put","patch"],function(r){function t(n){return function(a,o,u){return this.request(Yt(u||{},{method:r,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Qt.prototype[r]=t(),Qt.prototype[r+"Form"]=t(!0)});let Jd=class Gu{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});const n=this;this.promise.then(l=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](l);n._listeners=null}),this.promise.then=l=>{let a;const o=new Promise(u=>{n.subscribe(u),a=u}).then(l);return o.cancel=function(){n.unsubscribe(a)},o},r(function(a,o,u){n.reason||(n.reason=new Zr(a,o,u),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const t=this._listeners.indexOf(r);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const r=new AbortController,t=n=>{r.abort(n)};return this.subscribe(t),r.signal.unsubscribe=()=>this.unsubscribe(t),r.signal}static source(){let r;return{token:new Gu(function(l){r=l}),cancel:r}}};function e1(e){return function(t){return e.apply(null,t)}}function t1(e){return le.isObject(e)&&e.isAxiosError===!0}const zo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(zo).forEach(([e,r])=>{zo[r]=e});function Qu(e){const r=new Qt(e),t=ku(Qt.prototype.request,r);return le.extend(t,Qt.prototype,r,{allOwnKeys:!0}),le.extend(t,r,null,{allOwnKeys:!0}),t.create=function(l){return Qu(Yt(e,l))},t}const Re=Qu(Xr);Re.Axios=Qt;Re.CanceledError=Zr;Re.CancelToken=Jd;Re.isCancel=$u;Re.VERSION=Ku;Re.toFormData=Yn;Re.AxiosError=be;Re.Cancel=Re.CanceledError;Re.all=function(r){return Promise.all(r)};Re.spread=e1;Re.isAxiosError=t1;Re.mergeConfig=Yt;Re.AxiosHeaders=Je;Re.formToJSON=e=>qu(le.isHTMLForm(e)?new FormData(e):e);Re.getAdapter=Wu.getAdapter;Re.HttpStatusCode=zo;Re.default=Re;const{Axios:vg,AxiosError:yg,CanceledError:gg,isCancel:xg,CancelToken:bg,VERSION:wg,all:_g,Cancel:Eg,isAxiosError:Ag,spread:Cg,toFormData:Sg,AxiosHeaders:Bg,HttpStatusCode:kg,formToJSON:Tg,getAdapter:Fg,mergeConfig:Ig}=Re,nt={CUSTOM_MSG:"CUSTOM_MSG",OPEN_CAMERA:"OPEN_CAMERA",CLOSE_CAMERA:"CLOSE_CAMERA",OPEN_AUDIO:"OPEN_AUDIO",CLOSE_AUDIO:"CLOSE_AUDIO",CHANGE_GRAPH:"CHANGE_GRAPH",NOTIFY_DIALOG:"NOTIFY_DIALOG"},r1={OFFLINE:0},Se={NORMAL:"NORMAL",TEXT:"TEXT",AUDIO:"AUDIO",MP4:"MP4",CAMERA:"CAMERA",VIDEO_STREAM:"VIDEO_STREAM",POINT_VALUE:"POINT_VALUE",LIGHT_PLATE:"LIGHT_PLATE",SENSOR:"SENSOR",TABLE:"TABLE",SWITCH:"SWITCH",RADIO:"RADIO",SLIDER:"SLIDER",SELECT:"SELECT",CHECKBOX:"CHECKBOX",TIME:"TIME",BUTTON:"BUTTON",INPUT:"INPUT"},Vi={POINT:5,YX:6,YC:7},mn={Emit:7},n1={STOP:2},i1={1:1,2:2,3:3,4:4,5:5},Zn={WUJIE:"wujie",QIANKUN:"qiankun",MICROAPP:"microapp"},_s={GRAPH:{SOCKET:"GRAPH_SOCKET"}},Es={AC:{ALARM:"ac.channel.alarm",CONDITION:"ac.channel.gk",OPERATION:"ac.channel.op"},AUDIT:{MSG:"audit.msg",ALARM:"audit.alarm"},DATA:{TASK_STATUS:"data.patroldevice.taskstatus",TASK_RESULT:"data.patroldevice.taskresult"},HOST:{STATUS:"status.platform.hoststatus"},NEST:{BATTERY:"status.platform.nestbattery",HUMIDITY:"status.platform.nesthumidity",TEMPERATURE:"status.platform.nesttemperature",AIR_STATE:"status.platform.nestairstate",DOOR_STATE:"status.platform.nestdoorstate",CHARGE_STATE:"status.platform.nestchargestate",RUNNING_STATE:"status.platform.nestrunningstate",BATTERY_STATE:"status.platform.nestbatterystate",BATTERY_ENABLE:"status.platform.nestbatteryenable",BATTERY_VOLTAGE:"status.platform.nestbatteryvoltage",PLATFORM_STATE:"status.platform.nestsysstate"},MEDIA:{NVR_INFO:"status.platform.nvrinfo",NVR_STATUS:"status.platform.nvrstatus",CAMERA_STATUS:"status.platform.camerastatus"},DRONE:{STATUS:"status.platform.dronestatus",ELECTRICITY:"status.platform.droneelectricity",FLIGHT_TIME:"status.platform.flighttime",FLIGHT_HEIGHT:"status.platform.flightheight",FLIGHT_STATUS:"status.platform.flightstatus",FLIGHT_DISTANCE:"status.platform.flightdistance",PTZ_ELEVATION:"status.platform.ptzelevation",PTZ_YAW_ANGLE:"status.platform.ptzyawangle",PTZ_ROLL_ANGLE:"status.platform.ptzrollangle",LOW_BATTERY:"status.platform.lowbattery",COMM_ABNORMAL:"status.platform.commabnormal",DRIVE_EXCEPTION:"status.platform.driveexception",FAULT_ALARM:"status.platform.faultalarm",CONTROL_STATUS:"status.platform.controlstatus",MILEAGE:"status.platform.mileage",CONTROL_MODE:"status.platform.controlmode"},ROBOT:{SPEED:"status.platform.robotspeed",STATUS:"status.platform.robotstatus",BATTERY:"status.platform.robotbattery",MILEAGE:"status.platform.robotmileage",HUMIDITY:"status.platform.robothumidity",WINDSPEED:"status.platform.robotwindspeed",COORDINATE:"status.platform.robotcoordinate",COORDINATES:"status.platform.robotcoordinates",FAULT_ALARM:"status.platform.robotfaultalarm",LOW_BATTERY:"status.platform.robotlowbattery",TEMPERATURE:"status.platform.robottemperature",CONTROL_MODE:"status.platform.robotcontrolmode",COMM_ABNORMAL:"status.platform.robotcommabnormal",RUNNING_STATE:"status.platform.robotrunningstate",CONTROL_STATUS:"status.platform.robotcontrolstatus",DRIVE_EXCEPTION:"status.platform.robotdriveexception",TRANSPORT_STATUS:"status.platform.robottransportstatus",ULTRASONIC_STOPPING:"status.platform.robotultrasonicstopping"},VOICE:{STATUS:"voiceprint.status",DATA:"voice.data",VOICEPRINT:"voiceprint.data",TIME_DOMAIN:"voiceprint.time.domain",FREQ_DOMAIN:"voiceprint.freq.domain"},PATROL:{ALARM:"patrol.alarm",TASK_ITEM:"patrol.task.item",TASK_INDEX:"patrol.task.index",SINGLE_RESULT:"patrol.single.result",CAMERA_ITEM:"patrol.camera.item",PATROLDEVICE_TASKSTATUS:"data.patroldevice.taskstatus",PATROLDEVICE_TASKRESULT:"data.patroldevice.taskresult",MASTER_ALARM:"patrol.master.alarm",MASTER_SILENCE:"patrol.task.master.silence",MASTER_TASK_ITEM:"patrol.task.master.item",MASTER_TASK_INDEX:"patrol.task.master.index"},REPORT:{ALARM:"report.alarm.message",EXCEL:"report.excel.message",PATROL:"report.patrol.message",PICTURE:"report.picture.message"},ACPOINT:{YCVALUE:"status.platform.ycvalue",YXVALUE:"status.platform.yxvalue"},ALARM:{VOICE:"alarm.platform.alarm"},LINKAGE:{TASK:"linkage.record.task",CAMERA:"linkage.record.camera",PRESET:"linkage.record.preset",CONTROL:"linkage.record.control",PATROLPOINT:"linkage.record.patrolpoint"},METRICS:{SERVER:"metrics.metrics.server",CONTAINER:"metrics.metrics.container"},STATION:{SF6:"status.platform.stationsf6",OXYGEN:"status.platform.stationoxygen",HUMIDITY:"status.platform.stationhumidity",PRESSURE:"status.platform.stationpressure",RAINFALL:"status.platform.stationrainfall",WINDSPEED:"status.platform.stationwindspeed",TEMPERATURE:"status.platform.stationtemperature",WINDDIRECTION:"status.platform.stationwinddirection"},INTERFACE:{ANALYSIS:"analyse.pic.result",ALGORITHM:"algorithm.update.result"},PATROL_DEVICE:{BATTERY:"status.platform.battery",MILEAGE:"status.platform.mileage",GEOGRAPHY:"status.platform.coordinate_geography",COORDINATE:"status.platform.coordinate",COORDINATES:"status.platform.coordinates",ELECTRICITY:"status.platform.electricity",PTZYAWANGLE:"status.platform.ptzyawangle",PTZELEVATION:"status.platform.ptzelevation",PTZROLLANGLE:"status.platform.ptzrollangle",VERTICAL_SPEED:"status.platform.verticalspeed",HORIZONTAL_SPEED:"status.platform.horizontalspeed",FAULT_ALARM:"status.platform.faultalarm",LOW_BATTERY:"status.platform.lowbattery",CONTROL_MODE:"status.platform.controlmode",COMM_ABNORMAL:"status.platform.commabnormal",RUNNING_STATE:"status.platform.runningstate",CONTROL_STATUS:"status.platform.controlstatus",DRIVE_EXCEPTION:"status.platform.driveexception",TRANSPORT_STATUS:"status.platform.transportstatus",ULTRASONIC_STOPPING:"status.platform.ultrasonicstopping"}};var Jn={};/*!
|
|
9
|
+
`+a):n.stack=a}catch(o){}}throw n}})}_request(r,t){typeof r=="string"?(t=t||{},t.url=r):t=r||{},t=Yt(this.defaults,t);const{transitional:n,paramsSerializer:l,headers:a}=t;n!==void 0&&In.assertOptions(n,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean),legacyInterceptorReqResOrdering:ot.transitional(ot.boolean)},!1),l!=null&&(le.isFunction(l)?t.paramsSerializer={serialize:l}:In.assertOptions(l,{encode:ot.function,serialize:ot.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),In.assertOptions(t,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=a&&le.merge(a.common,a[t.method]);a&&le.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),t.headers=Je.concat(o,a);const u=[];let p=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(t)===!1)return;p=p&&v.synchronous;const m=t.transitional||sa;m&&m.legacyInterceptorReqResOrdering?u.unshift(v.fulfilled,v.rejected):u.push(v.fulfilled,v.rejected)});const s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});let i,d=0,c;if(!p){const h=[bs.bind(this),void 0];for(h.unshift(...u),h.push(...s),c=h.length,i=Promise.resolve(t);d<c;)i=i.then(h[d++],h[d++]);return i}c=u.length;let f=t;for(;d<c;){const h=u[d++],v=u[d++];try{f=h(f)}catch(m){v.call(this,m);break}}try{i=bs.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,c=s.length;d<c;)i=i.then(s[d++],s[d++]);return i}getUri(r){r=Yt(this.defaults,r);const t=ju(r.baseURL,r.url,r.allowAbsoluteUrls);return Uu(t,r.params,r.paramsSerializer)}};le.forEach(["delete","get","head","options"],function(r){Qt.prototype[r]=function(t,n){return this.request(Yt(n||{},{method:r,url:t,data:(n||{}).data}))}});le.forEach(["post","put","patch"],function(r){function t(n){return function(a,o,u){return this.request(Yt(u||{},{method:r,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Qt.prototype[r]=t(),Qt.prototype[r+"Form"]=t(!0)});let Jd=class Gu{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});const n=this;this.promise.then(l=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](l);n._listeners=null}),this.promise.then=l=>{let a;const o=new Promise(u=>{n.subscribe(u),a=u}).then(l);return o.cancel=function(){n.unsubscribe(a)},o},r(function(a,o,u){n.reason||(n.reason=new Zr(a,o,u),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const t=this._listeners.indexOf(r);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const r=new AbortController,t=n=>{r.abort(n)};return this.subscribe(t),r.signal.unsubscribe=()=>this.unsubscribe(t),r.signal}static source(){let r;return{token:new Gu(function(l){r=l}),cancel:r}}};function e1(e){return function(t){return e.apply(null,t)}}function t1(e){return le.isObject(e)&&e.isAxiosError===!0}const zo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(zo).forEach(([e,r])=>{zo[r]=e});function Qu(e){const r=new Qt(e),t=ku(Qt.prototype.request,r);return le.extend(t,Qt.prototype,r,{allOwnKeys:!0}),le.extend(t,r,null,{allOwnKeys:!0}),t.create=function(l){return Qu(Yt(e,l))},t}const Re=Qu(Xr);Re.Axios=Qt;Re.CanceledError=Zr;Re.CancelToken=Jd;Re.isCancel=$u;Re.VERSION=Ku;Re.toFormData=Yn;Re.AxiosError=be;Re.Cancel=Re.CanceledError;Re.all=function(r){return Promise.all(r)};Re.spread=e1;Re.isAxiosError=t1;Re.mergeConfig=Yt;Re.AxiosHeaders=Je;Re.formToJSON=e=>qu(le.isHTMLForm(e)?new FormData(e):e);Re.getAdapter=Wu.getAdapter;Re.HttpStatusCode=zo;Re.default=Re;const{Axios:vg,AxiosError:yg,CanceledError:gg,isCancel:xg,CancelToken:bg,VERSION:wg,all:_g,Cancel:Eg,isAxiosError:Ag,spread:Cg,toFormData:Sg,AxiosHeaders:Bg,HttpStatusCode:kg,formToJSON:Tg,getAdapter:Fg,mergeConfig:Ig}=Re,nt={CUSTOM_MSG:"CUSTOM_MSG",OPEN_CAMERA:"OPEN_CAMERA",CLOSE_CAMERA:"CLOSE_CAMERA",OPEN_AUDIO:"OPEN_AUDIO",CLOSE_AUDIO:"CLOSE_AUDIO",CHANGE_GRAPH:"CHANGE_GRAPH",NOTIFY_DIALOG:"NOTIFY_DIALOG",PROPS_PANEL:"PROPS_PANEL"},r1={OFFLINE:0},Se={NORMAL:"NORMAL",TEXT:"TEXT",AUDIO:"AUDIO",MP4:"MP4",CAMERA:"CAMERA",VIDEO_STREAM:"VIDEO_STREAM",POINT_VALUE:"POINT_VALUE",LIGHT_PLATE:"LIGHT_PLATE",SENSOR:"SENSOR",TABLE:"TABLE",SWITCH:"SWITCH",RADIO:"RADIO",SLIDER:"SLIDER",SELECT:"SELECT",CHECKBOX:"CHECKBOX",TIME:"TIME",BUTTON:"BUTTON",INPUT:"INPUT"},Vi={POINT:5,YX:6,YC:7},mn={Emit:7},n1={STOP:2},i1={1:1,2:2,3:3,4:4,5:5},Zn={WUJIE:"wujie",QIANKUN:"qiankun",MICROAPP:"microapp"},_s={GRAPH:{SOCKET:"GRAPH_SOCKET"}},Es={AC:{ALARM:"ac.channel.alarm",CONDITION:"ac.channel.gk",OPERATION:"ac.channel.op"},AUDIT:{MSG:"audit.msg",ALARM:"audit.alarm"},DATA:{TASK_STATUS:"data.patroldevice.taskstatus",TASK_RESULT:"data.patroldevice.taskresult"},HOST:{STATUS:"status.platform.hoststatus"},NEST:{BATTERY:"status.platform.nestbattery",HUMIDITY:"status.platform.nesthumidity",TEMPERATURE:"status.platform.nesttemperature",AIR_STATE:"status.platform.nestairstate",DOOR_STATE:"status.platform.nestdoorstate",CHARGE_STATE:"status.platform.nestchargestate",RUNNING_STATE:"status.platform.nestrunningstate",BATTERY_STATE:"status.platform.nestbatterystate",BATTERY_ENABLE:"status.platform.nestbatteryenable",BATTERY_VOLTAGE:"status.platform.nestbatteryvoltage",PLATFORM_STATE:"status.platform.nestsysstate"},MEDIA:{NVR_INFO:"status.platform.nvrinfo",NVR_STATUS:"status.platform.nvrstatus",CAMERA_STATUS:"status.platform.camerastatus"},DRONE:{STATUS:"status.platform.dronestatus",ELECTRICITY:"status.platform.droneelectricity",FLIGHT_TIME:"status.platform.flighttime",FLIGHT_HEIGHT:"status.platform.flightheight",FLIGHT_STATUS:"status.platform.flightstatus",FLIGHT_DISTANCE:"status.platform.flightdistance",PTZ_ELEVATION:"status.platform.ptzelevation",PTZ_YAW_ANGLE:"status.platform.ptzyawangle",PTZ_ROLL_ANGLE:"status.platform.ptzrollangle",LOW_BATTERY:"status.platform.lowbattery",COMM_ABNORMAL:"status.platform.commabnormal",DRIVE_EXCEPTION:"status.platform.driveexception",FAULT_ALARM:"status.platform.faultalarm",CONTROL_STATUS:"status.platform.controlstatus",MILEAGE:"status.platform.mileage",CONTROL_MODE:"status.platform.controlmode"},ROBOT:{SPEED:"status.platform.robotspeed",STATUS:"status.platform.robotstatus",BATTERY:"status.platform.robotbattery",MILEAGE:"status.platform.robotmileage",HUMIDITY:"status.platform.robothumidity",WINDSPEED:"status.platform.robotwindspeed",COORDINATE:"status.platform.robotcoordinate",COORDINATES:"status.platform.robotcoordinates",FAULT_ALARM:"status.platform.robotfaultalarm",LOW_BATTERY:"status.platform.robotlowbattery",TEMPERATURE:"status.platform.robottemperature",CONTROL_MODE:"status.platform.robotcontrolmode",COMM_ABNORMAL:"status.platform.robotcommabnormal",RUNNING_STATE:"status.platform.robotrunningstate",CONTROL_STATUS:"status.platform.robotcontrolstatus",DRIVE_EXCEPTION:"status.platform.robotdriveexception",TRANSPORT_STATUS:"status.platform.robottransportstatus",ULTRASONIC_STOPPING:"status.platform.robotultrasonicstopping"},VOICE:{STATUS:"voiceprint.status",DATA:"voice.data",VOICEPRINT:"voiceprint.data",TIME_DOMAIN:"voiceprint.time.domain",FREQ_DOMAIN:"voiceprint.freq.domain"},PATROL:{ALARM:"patrol.alarm",TASK_ITEM:"patrol.task.item",TASK_INDEX:"patrol.task.index",SINGLE_RESULT:"patrol.single.result",CAMERA_ITEM:"patrol.camera.item",PATROLDEVICE_TASKSTATUS:"data.patroldevice.taskstatus",PATROLDEVICE_TASKRESULT:"data.patroldevice.taskresult",MASTER_ALARM:"patrol.master.alarm",MASTER_SILENCE:"patrol.task.master.silence",MASTER_TASK_ITEM:"patrol.task.master.item",MASTER_TASK_INDEX:"patrol.task.master.index"},REPORT:{ALARM:"report.alarm.message",EXCEL:"report.excel.message",PATROL:"report.patrol.message",PICTURE:"report.picture.message"},ACPOINT:{YCVALUE:"status.platform.ycvalue",YXVALUE:"status.platform.yxvalue"},ALARM:{VOICE:"alarm.platform.alarm"},LINKAGE:{TASK:"linkage.record.task",CAMERA:"linkage.record.camera",PRESET:"linkage.record.preset",CONTROL:"linkage.record.control",PATROLPOINT:"linkage.record.patrolpoint"},METRICS:{SERVER:"metrics.metrics.server",CONTAINER:"metrics.metrics.container"},STATION:{SF6:"status.platform.stationsf6",OXYGEN:"status.platform.stationoxygen",HUMIDITY:"status.platform.stationhumidity",PRESSURE:"status.platform.stationpressure",RAINFALL:"status.platform.stationrainfall",WINDSPEED:"status.platform.stationwindspeed",TEMPERATURE:"status.platform.stationtemperature",WINDDIRECTION:"status.platform.stationwinddirection"},INTERFACE:{ANALYSIS:"analyse.pic.result",ALGORITHM:"algorithm.update.result"},PATROL_DEVICE:{BATTERY:"status.platform.battery",MILEAGE:"status.platform.mileage",GEOGRAPHY:"status.platform.coordinate_geography",COORDINATE:"status.platform.coordinate",COORDINATES:"status.platform.coordinates",ELECTRICITY:"status.platform.electricity",PTZYAWANGLE:"status.platform.ptzyawangle",PTZELEVATION:"status.platform.ptzelevation",PTZROLLANGLE:"status.platform.ptzrollangle",VERTICAL_SPEED:"status.platform.verticalspeed",HORIZONTAL_SPEED:"status.platform.horizontalspeed",FAULT_ALARM:"status.platform.faultalarm",LOW_BATTERY:"status.platform.lowbattery",CONTROL_MODE:"status.platform.controlmode",COMM_ABNORMAL:"status.platform.commabnormal",RUNNING_STATE:"status.platform.runningstate",CONTROL_STATUS:"status.platform.controlstatus",DRIVE_EXCEPTION:"status.platform.driveexception",TRANSPORT_STATUS:"status.platform.transportstatus",ULTRASONIC_STOPPING:"status.platform.ultrasonicstopping"}};var Jn={};/*!
|
|
10
10
|
* vite-plugin-qiankun.js v1.0.14
|
|
11
11
|
* (c) 2021-2022 Teng Mao Qing
|
|
12
12
|
* Released under the MIT License.
|
|
@@ -44,4 +44,4 @@ For more detail, please visit: ${l}
|
|
|
44
44
|
font-weight: 700;">${t}</div><div style="color: #00000073;">${Gy(l)}</div>
|
|
45
45
|
</div>
|
|
46
46
|
<span>${n}</span>
|
|
47
|
-
</div>`;e.message({content:a,duration:0,closeBtn:!0,placement:"right",height:75}),(o=r.payload.detail)!=null&&o.alarmConfigId&&Qy(e,(u=r.payload.detail)==null?void 0:u.alarmConfigId)}globalThis.doWarning=Ky;function Gy(e){const r=new Date(e),t=r.getFullYear(),n=(r.getMonth()+1+"").padStart(2,"0"),l=(r.getDate()+"").padStart(2,"0"),a=(r.getHours()+"").padStart(2,"0"),o=(r.getMinutes()+"").padStart(2,"0"),u=(r.getSeconds()+"").padStart(2,"0");return t+"-"+n+"-"+l+" "+a+":"+o+":"+u}function Qy(e,r){return je(this,null,function*(){const t=yield fetch(`/api/alarm/config/${r}`,{headers:{"X-Access-Token":localStorage.getItem("X-Access-Token")||new URLSearchParams(location.search).get("X-Access-Token")||"","Content-Type":"application/json"},method:"GET"});if(t.ok){let n=yield t.json();n.result.media&&K0(e,n.result.media,n.result.playTimes)}})}function K0(e,r,t){if(e.store.globalAudio||(e.store.globalAudio=document.createElement("audio")),e.store.globalAudio.src=r,e.store.globalAudio.play(),t===-1)e.store.globalAudio.loop=!0;else{e.store.globalAudio.loop=!1;let n=0;e.store.globalAudio.onended=()=>{n++,n<t&&e.store.globalAudio.play()}}}globalThis.createAudio=K0;const Yy="original_meta2d";function Xy(){return localStorage.removeItem(Yy)}let Or={};const Zy=e=>{const r=document.querySelectorAll("video");let t=null;if(r.forEach(l=>{l.getAttribute("src")===e.video&&(t=l)}),!t)return;t.setAttribute("muted","muted"),t.setAttribute("autoplay","autoplay"),t.setAttribute("loop","loop"),t.setAttribute("crossorigin",""),t.setAttribute("controls",""),t.style.display="none",t.parentElement.style.border="2px solid #ffc878";const n=new JessibucaPro({container:t.parentElement,background:"",hasControl:!1,controlAutoHide:!0,checkFirstIFrame:!0,debug:!1,decoder:"./wasm/decoder-pro.js",forceNoOffscreen:!0,hotKey:!1,hasAudio:!1,hasVideo:!0,hiddenAutoPause:!1,isFlv:!0,isResize:!1,isNotMute:!0,loadingIcon:!0,loadingText:"加载中...",networkDelayTimeoutReplay:!1,playbackForwardMaxRateDecodeIFrame:8,showBandwidth:!1,showPerformance:!1,syncAudioAndVideo:!0,supportDblclickFullscreen:!1,timeout:10,useMSE:!0,useWCS:!1,useSIMD:!0,useVideoRender:!0,useCanvasRender:!1,videoBuffer:.2,videoBufferDelay:1});return e.autoPlay&&e.streamUrl&&n.play(e.streamUrl),Or[e.id]=n,n},Jy=()=>{Object.keys(Or).forEach(e=>{Or[e].destroy(),Or[e]=null}),Or={}},ba=(e,r)=>{const t=e.__vccOpts||e;for(const[n,l]of r)t[n]=l;return t},eg={class:"sy-empty"},tg={key:1,class:"sy-empty-picture"},rg={class:"sy-empty-description"},ng=Object.assign({name:"SyEmpty"},{__name:"index",props:{image:{type:String,default:"empty"},imageSize:{type:Number,default:80},description:{type:String,default:"暂无数据"},onlyText:{type:Boolean,default:!1}},setup(e){N.useCssVars(l=>({dbdd1bf2:n.value.width,d36455f4:n.value.height}));const r=e,t=N.computed(()=>({"font-size":r.imageSize?`${r.imageSize}px`:"80px"})),n=N.computed(()=>r.imageSize?{width:r.imageSize*1.2+"px",height:r.imageSize+"px"}:{width:"187px",height:"144px"});return(l,a)=>{const o=N.resolveComponent("SyIcon"),u=N.resolveComponent("el-icon");return N.openBlock(),N.createElementBlock("div",eg,[e.image!=="empty"?(N.openBlock(),N.createElementBlock("span",{key:0,class:"sy-empty-image",style:N.normalizeStyle(t.value)},[e.image!=="loading"?(N.openBlock(),N.createBlock(o,{key:0,name:e.image,gradient:""},null,8,["name"])):(N.openBlock(),N.createBlock(u,{key:1,class:"is-loading",style:{color:"#1671d4"}},{default:N.withCtx(()=>[N.createVNode(N.unref(S0))]),_:1}))],4)):e.onlyText?N.createCommentVNode("",!0):(N.openBlock(),N.createElementBlock("span",tg)),N.createElementVNode("div",rg,[N.createElementVNode("p",null,N.toDisplayString(e.description),1)])])}}}),ig=ba(ng,[["__scopeId","data-v-c5e7d407"]]),og=Object.assign({name:"Meta2dEditor"},{__name:"index",props:{url:{type:String,default:""},data:{type:Object,default:()=>{}},local:{type:Boolean,default:!1},preview:{type:Boolean,default:!1},devConfig:{type:Object,default:()=>({isDev:!1,devServerUrl:"",devServerPort:8443})}},emits:["loaded","load-error"],setup(e,{expose:r,emit:t}){const n=t,l=e,a=N.ref(null),o=N.shallowRef(),u=N.computed(()=>!!(l.data||l.url));N.watch(()=>[l.data,l.url],()=>{u.value&&s()});let p=N.ref(!0);function s(){return je(this,null,function*(){try{if(p.value=!0,yield N.nextTick(),!a.value){console.error("未找到meta2d元素!");return}let g=null;if(l.data?g=l.data:l.url&&(g=yield v()),!g||!g.data){p.value=!1,console.log("图纸数据为空"),n("load-error");return}const x=g.options||{background:"#eee",disableAnchor:!1};if(o.value&&(o.value.destroy(!0),o.value=null),!a.value){console.error("Meta2D 容器元素不可用");return}o.value=new Pe.Meta2d(a.value,he({},x)),x.visibleLevel&&o.value.scale(x.visibleLevel),i(),d(),yield c(g.data),o.value.render(),f(),setTimeout(()=>{window.meta2dTools&&window.registerToolsNew()},1e3),n("loaded",o.value)}catch(g){console.error("初始化编辑器失败:",g)}})}function i(){if(!o.value)return;new Hy({}).initPlugin(o.value,"mindNode",{})}function d(){Pe.register(Fc.classPens()),Pe.register(Fa.flowPens()),Pe.registerAnchors(Fa.flowAnchors()),Pe.register(Ia.sequencePens()),Pe.registerCanvasDraw(Ia.sequencePensbyCtx()),Pe.register(Da.activityDiagram()),Pe.registerCanvasDraw(Da.activityDiagramByCtx()),Pe.registerCanvasDraw(Tc.formPens()),Pe.registerCanvasDraw(Ic.chartsPens()),Pe.register(xi.ftaPens()),Pe.registerAnchors(xi.ftaAnchors()),Pe.registerCanvasDraw(xi.ftaPensbyCtx())}function c(g){if(o.value){if(typeof g.locked=="undefined"&&(g.locked=0),g.bkImage&&o.value.setBackgroundImage(g.bkImage),g.pens&&g.pens.length>0){const x=[];g.pens.forEach(k=>{k.name==="video"&&k.streamUrl?x.push(k):k.name==="image"&&k.image&&(k.image=jy(k.image,l.devConfig))}),x.length>0&&setTimeout(()=>{x.forEach(k=>{Zy(k)})},500);const y=window.meta.graph.penCountThreshold||2e3;g.pens.length>y&&g.scale&&g.pens.forEach(k=>{const T=k.visibleLevel;T!==void 0?(k.visible=g.scale>=T,k.visible||(k.disabled=!0,k.locked=Pe.LockState.Disable)):(k.visible=!0,k.disabled=!1,k.locked=Pe.LockState.None)})}o.value.open(g)}}function f(){o.value&&o.value.on("scale",h)}const h=$n.debounce(g=>{var x,y,w,k;try{if(!o.value)return;Ho.emit("graph-scale",g);let T=o.value.store.data.pens;const I=window.meta.graph.penCountThreshold||2e3,D=T.length>I;for(let X=0;X<T.length;X++){const V=T[X];if([Se.VIDEO_STREAM,Se.MP4].includes(V.penType)){if(((y=(x=cr[V.id])==null?void 0:x.children)==null?void 0:y.length)===3){let E=cr[V.id].children[0],A=cr[V.id].children[2];E.style.width=A.currentTime/A.duration*V.calculative.worldRect.width+"px"}else if(((k=(w=cr[V.id])==null?void 0:w.children)==null?void 0:k.length)===2){let E=cr[V.id].children[0],A=cr[V.id].children[1];E.style.width=A.currentTime/A.duration*V.calculative.worldRect.width+"px"}}if(D){const E=V.visibleLevel!==void 0?g>=V.visibleLevel:!0;o.value._setValue({id:V.id,visible:E,disabled:!E,locked:E?Pe.LockState.None:Pe.LockState.Disable})}}o.value.render()}catch(T){console.error("处理缩放失败:",T)}},500);function v(){return je(this,null,function*(){if(!l.url)return st.error("图纸路径为空!"),null;try{return(yield jo.getGraphApi(l.url,{local:l.local}))||null}catch(g){return null}})}const m=()=>{o.value&&o.value.resize()};return N.onMounted(()=>{u.value&&s(),window.document.addEventListener("resize",m)}),N.onUnmounted(()=>{Jy(),Xy(),o.value&&(l.preview?(tu.clearLineCross(),o.value.destroy(!0)):o.value.off("scale",h)),window.document.removeEventListener("resize",m)}),r({stage:o}),(g,x)=>(N.openBlock(),N.createElementBlock("div",{ref_key:"meta2dRef",ref:a,class:"meta2d-editor"},[N.unref(p)?N.createCommentVNode("",!0):(N.openBlock(),N.createBlock(ig,{key:0,class:"meta2d-empty",description:"图纸不存在"}))],512))}}),ag=ba(og,[["__scopeId","data-v-d97cf5a2"]]),sg={class:"preview-container"},lg={key:0,class:"back-btn"},ug=Object.assign({name:"Meta2dPreview"},{__name:"index",props:{url:{type:String,default:""},gid:{type:String,default:""},data:{type:Object,default:null},local:{type:Boolean,default:!1},isInitData:{type:Boolean,default:!0},config:{type:Object,default:()=>({socketUrl:As,stationIdKey:Nl,enableToken:!0,userTokenKey:Pl,messageDelay:200,debounceDelay:100,enableAutoFit:!0,enableWebSocket:!0,graphSocket:_s.GRAPH.SOCKET})},showMap:{type:Boolean,default:!1},isFactory:{type:Boolean,default:!1},apiInstance:{type:Object,default:()=>jo},mittInstance:{type:Object,default:()=>Ho},customCallbacks:{type:Object,default:()=>({})},errorHandler:{type:Object,default:()=>({callback:null,showMessage:!0})},devConfig:{type:Object,default:()=>({isDev:!1,devServerUrl:"",devServerPort:8443})}},emits:["error","loaded","custom-msg","socket-msg"],setup(e,{expose:r,emit:t}){const n=t,l=e;let a=N.ref(!1),o=N.ref(""),u=N.ref(!1);const p=N.ref(null),s=N.ref(""),i=N.ref(!1),d=N.computed(()=>{var P;return(P=p.value)==null?void 0:P.stage}),c=N.computed(()=>{var P;return(P=d.value)==null?void 0:P.store}),f=N.computed(()=>he({socketUrl:As,stationIdKey:Nl,enableToken:!0,userTokenKey:Pl,messageDelay:200,debounceDelay:100,enableAutoFit:!0,fitPadding:10,enableWebSocket:!0,graphSocket:_s.GRAPH.SOCKET},l.config)),h=()=>l.apiInstance||jo,v=()=>l.mittInstance||Ho,m=(P,J="")=>{const $={error:P,message:J,timestamp:new Date().toISOString()};n("error",$),l.errorHandler.callback?l.errorHandler.callback($):l.errorHandler.showMessage&&st&&st.error(`${J}: ${P.message||P}`)},g=()=>{o.value&&(s.value=o.value,i.value=u.value)},x=P=>{var J,$,U,K,L,O;try{if(!P)return;if((J=P==null?void 0:P.includes)!=null&&J.call(P,"token 必传"))return st.warning(P);const H=typeof P=="string"?JSON.parse(P):P;if((H==null?void 0:H.data)==="服务错误"||(U=($=H==null?void 0:H.data)==null?void 0:$.includes)!=null&&U.call($,"token is expired"))return st.warning(H.data);switch(n("socket-msg",H),H.action){case Es.ACPOINT.YCVALUE:case Es.ACPOINT.YXVALUE:if((K=H==null?void 0:H.data)!=null&&K.point_id){const W=d.value.find(H.data.point_id);W&&C(W,H.data)}break;default:if(((L=H.data)==null?void 0:L.length)>0){const W=setTimeout(()=>{clearTimeout(W),d.value&&H.data.forEach(Z=>{const re=d.value.find(Z.dataId||Z.point_id);C(re,Z)})},f.value.messageDelay);l.customCallbacks.onWebSocketMessage&&l.customCallbacks.onWebSocketMessage(H),(O=window.customSocketFn)==null||O.call(window,P)}break}return!0}catch(H){return m(H,"WebSocket消息处理"),!0}},y=P=>je(this,null,function*(){try{if(P.msgName)switch(P.msgName){case nt.CHANGE_GRAPH:case nt.NOTIFY_DIALOG:w(P);break}else w(P);n("custom-msg",P),l.customCallbacks.onCustomMessage&&l.customCallbacks.onCustomMessage(P)}catch(J){m(J,"自定义消息处理")}}),w=P=>{var J;if(P.params){const $=JSON.parse(P.params);switch($.action){case nt.CHANGE_GRAPH:($==null?void 0:$.data)!=="图纸id"?(o.value=s.value,u.value=i.value,a.value=$.isBack,(J=$==null?void 0:$.data)!=null&&J.startsWith("/")?(s.value=$==null?void 0:$.data,i.value=!0):(i.value=!1,T($.data))):console.warn("切换图纸信息为空");break;case nt.NOTIFY_DIALOG:$.msg!=="通知内容"?Py(he({message:$.msg},$)):console.warn("通知内容为空");break}}},k=P=>{var J,$,U;try{n("loaded",P);const K=D(),L=f.value,O=Rl.getSession(L.stationIdKey),H=Rl.getSession(L.userTokenKey);L.enableWebSocket&&O&&H&&(($=(J=P.store)==null?void 0:J.data)!=null&&$.websocket?((U=P.store.data.websocket)!=null&&U.includes("station_id")||(P.store.data.websocket=`${P.store.data.websocket}?station_id=${O}`),L.enableToken?P.store.data.websocketProtocols=H:P.store.data.websocketProtocols=void 0,P.closeSocket(),P.connectSocket()):(P.store.data.websocket=`${L.socketUrl}?station_id=${O}`,L.enableToken?P.store.data.websocketProtocols=H:P.store.data.websocketProtocols=void 0,P.connectWebsocket())),(l.showMap||K.showMap==="true")&&P.showMap(),P.setRule({rule:!1}),P.setOptions({disableRuleLine:!0}),P.setGrid({grid:!1}),P.lock(Pe.LockState.DisableEdit),E().forEach(Z=>{var re;(re=Z==null?void 0:Z.events)!=null&&re.length?X({id:Z.id,locked:1},!1):X({id:Z.id,locked:10},!1)}),P.render(),L.enableAutoFit&&P.fitView(!0,L.fitPadding),Object.values(nt).forEach(Z=>{P.on(Z,re=>y(_e(he({},re),{msgName:Z})))}),P&&(P.socketFn=x),l.customCallbacks.onStageLoaded&&l.customCallbacks.onStageLoaded(P),l.isInitData&&I(P)}catch(K){m(K,"图纸加载完成处理")}},T=P=>je(this,null,function*(){var J;try{if(l.url){s.value=l.url,i.value=l.local;return}const $=D();if(P=P||l.gid||$.id,$.local==="true"&&(i.value=!0),P){const U=h();if(U&&U.getCommonApi){const K=yield U.getCommonApi(l.isFactory?"graph":"floorplan",{guid:P});if((J=K.data)!=null&&J.length)s.value=K.data[0].path,l.customCallbacks.onGraphLoaded&&l.customCallbacks.onGraphLoaded(s.value);else{const L="未找到图纸!";m(new Error(L),"获取图纸数据")}}else m(new Error("API实例不可用"),"初始化图纸数据!")}else s.value=l.url,i.value=l.local}catch($){m($,"获取图纸数据失败")}}),I=P=>je(this,null,function*(){var J,$,U;if(P){let K=[],L=[],O=[];const H=P.store.data.pens;for(let W=0;W<H.length;W++){const Z=H[W];Z.bindDataId&&(J=Z.form)!=null&&J.length&&Z.form.forEach(re=>{if(re.dataIds.dataId)switch(re.dataIds.dataType){case Vi.YC:K.push(_e(he({},re),{nodeName:re.dataIds.name,penId:Z.id,penName:Z.penName}));break;case Vi.YX:L.push(_e(he({},re),{nodeName:re.dataIds.name,penId:Z.id,penName:Z.penName}));break;case Vi.POINT:O.push(_e(he({},re),{nodeName:re.dataIds.name,penId:Z.id,penName:Z.penName}));break}})}if(K.length){const W=h();if(W&&W.postCommonApi){const Z=yield W.postCommonApi("queryrealtimepoint",{point_id:K.map(re=>{var oe;return(oe=re==null?void 0:re.dataIds)==null?void 0:oe.dataId}).join(",")});($=Z==null?void 0:Z.data)!=null&&$.length&&Z.data.forEach(re=>{const oe=P.find(re.guid);C(oe,_e(he({},re),{value:Ss(re.value)?Number(re.value):re.value,value_disp:re.value_disp,alarm_value:re.alarm_value,point_id:re.guid}))})}}if(L.length){const W=h();if(W&&W.postCommonApi){const Z=yield W.postCommonApi("queryrealtimepoint",{point_id:L.map(re=>{var oe;return(oe=re==null?void 0:re.dataIds)==null?void 0:oe.dataId}).join(",")});(U=Z==null?void 0:Z.data)!=null&&U.length&&Z.data.forEach(re=>{const oe=P.find(re.guid);C(oe,_e(he({},re),{value:Ss(re.value)?Number(re.value):re.value,value_disp:re.value_disp,alarm_value:re.alarm_value,point_id:re.guid}))})}}}}),D=()=>{var U;const P={},J=((U=window.location.href.split("?"))==null?void 0:U[1])||"",$=new URLSearchParams(J);for(const[K,L]of $.entries())P[K]=L;return P},X=(P,J=!0)=>{if(d.value)return d.value.setValue(P,{render:J})},V=()=>d.value,E=()=>{var P,J;return((J=(P=c.value)==null?void 0:P.data)==null?void 0:J.pens)||[]},A=()=>Se,C=(()=>{let P=null;const J=new Map,$=new Map,U=L=>{var H;if(!((H=L.children)!=null&&H.length))return[];const O=L.id||"";if(!O)return[];if(!$.has(O)&&c.value){const W=Pe.getAllChildren(L,c.value);$.set(O,W)}return $.get(O)||[]},K=()=>{if(J.size===0||!d.value||!c.value)return;const L=[],O=[],H=c.value.animates;J.forEach(({pen:W,dataItem:Z,formKey:re})=>{switch(re){case"showChild":X({id:W.id,showChild:Z.value},!1);break;case"text":X({id:W.id,text:Z.value_disp||Z.value},!1);break;case"light_plate":{const oe=Z.value===-1||Ol(Z)?"#999999":W0[Z.value!==void 0?Z.value:Z.alarm_value],ae=Z.value===-1||Ol(Z)?"#cccccc":V0[Z.value!==void 0?Z.value:Z.alarm_value];X({id:W.id,textColor:oe,background:ae},!1)}break;case"point_value":W.penType===Se.POINT_VALUE&&U(W).forEach(ae=>{ae.name==="text"&&X({id:ae.id,text:Z.value},!1)});break;case"online_state":{let oe=Z.value?void 0:"contrast(0%)";X({id:W.id,filter:oe},!1),U(W).forEach(b=>{X({id:b.id,filter:oe},!1)})}break;case"charged_state":{const oe=Z.value===r1.OFFLINE?"contrast(0%)":void 0;oe!==W.filter&&(X({id:W.id,filter:oe},!1),U(W).forEach(b=>{X({id:b.id,filter:oe},!1)}))}break;case"electric_direction":Z.value===n1.STOP?H!=null&&H.has(W)&&O.push(W):!!Z.value!==W.animateReverse&&(X({id:W.id,animateReverse:!!Z.value},!1),H!=null&&H.has(W)||L.push(W));break;case"electric_size":{const oe=i1[Z.value];oe!==void 0&&oe!==W.lineWidth&&X({id:W.id,lineWidth:oe},!1)}break;default:X({id:W.id,[re]:Z.value},!1);break}}),O.length>0&&d.value.stopAnimate(O),L.length>0&&d.value.startAnimate(L),J.clear(),d.value.render()};return(L,O)=>{L!=null&&L.length&&(L.forEach(H=>{const W=H.form;W!=null&&W.length&&W.forEach(Z=>{if(!(Array.isArray(Z.dataIds)?Z.dataIds:[Z.dataIds]).some(b=>(b==null?void 0:b.dataId)&&((b==null?void 0:b.dataId)===O.dataId||(b==null?void 0:b.dataId)===O.point_id)))return;const ae=`${H.id}-${Z.key}`;J.set(ae,{pen:H,dataItem:O,formKey:Z.key})})}),P&&clearTimeout(P),P=setTimeout(()=>{K(),P=null},f.value.debounceDelay))}})(),F=P=>{if(d.value){for(let J=0;J<P.length;J++){const $=P[J],U=d.value.find($.dataId);C(U,$)}d.value.render(),l.customCallbacks.onBatchUpdate&&l.customCallbacks.onBatchUpdate(P)}},j=(P,J=!1)=>{if(!d.value)return;const $=E();for(let U=0;U<$.length;U++){const K=$[U];let L=!1;J?L=P===K.dataProp:L=P===5?!0:K.dataProp<=P,X({id:K.id,visible:L},!1)}d.value.fitView(),d.value.render(),l.customCallbacks.onLevelChange&&l.customCallbacks.onLevelChange(P,J)};return N.watch(()=>[l.url,l.isFactory,l.local,l.data,l.gid],()=>{T()}),N.watch(()=>l.showMap,P=>{d.value&&(P?d.value.showMap():d.value.hideMap())}),N.onMounted(()=>{const P=v();P&&P.on&&P.on(f.value.graphSocket,x),T()}),N.onUnmounted(()=>{const P=v();P&&P.off&&P.off(f.value.graphSocket,x)}),r({setValue:X,getStage:V,getAllPens:E,getCustomPenType:A,batchUpdatePen:F,handleLineCross:tu.handleLineCross,changeVisibleByLevel:j}),(P,J)=>(N.openBlock(),N.createElementBlock("div",sg,[N.createVNode(ag,{ref_key:"graphRef",ref:p,url:s.value,local:i.value,data:l.data,"dev-config":l.devConfig,preview:"",onLoaded:k},null,8,["url","local","data","dev-config"]),N.unref(a)?(N.openBlock(),N.createElementBlock("div",lg,[N.createVNode(N.unref(ay),{type:"primary",onClick:g},{default:N.withCtx(()=>[...J[0]||(J[0]=[N.createTextVNode("返回",-1)])]),_:1})])):N.createCommentVNode("",!0)]))}}),Hr=ba(ug,[["__scopeId","data-v-2a1fecdf"]]);Hr.name||(Hr.name="SyGraph");const cg=e=>{e.component(Hr.name||"SyGraph",Hr)},fg={install:cg};exports.SyGraph=Hr;exports.default=fg;
|
|
47
|
+
</div>`;e.message({content:a,duration:0,closeBtn:!0,placement:"right",height:75}),(o=r.payload.detail)!=null&&o.alarmConfigId&&Qy(e,(u=r.payload.detail)==null?void 0:u.alarmConfigId)}globalThis.doWarning=Ky;function Gy(e){const r=new Date(e),t=r.getFullYear(),n=(r.getMonth()+1+"").padStart(2,"0"),l=(r.getDate()+"").padStart(2,"0"),a=(r.getHours()+"").padStart(2,"0"),o=(r.getMinutes()+"").padStart(2,"0"),u=(r.getSeconds()+"").padStart(2,"0");return t+"-"+n+"-"+l+" "+a+":"+o+":"+u}function Qy(e,r){return je(this,null,function*(){const t=yield fetch(`/api/alarm/config/${r}`,{headers:{"X-Access-Token":localStorage.getItem("X-Access-Token")||new URLSearchParams(location.search).get("X-Access-Token")||"","Content-Type":"application/json"},method:"GET"});if(t.ok){let n=yield t.json();n.result.media&&K0(e,n.result.media,n.result.playTimes)}})}function K0(e,r,t){if(e.store.globalAudio||(e.store.globalAudio=document.createElement("audio")),e.store.globalAudio.src=r,e.store.globalAudio.play(),t===-1)e.store.globalAudio.loop=!0;else{e.store.globalAudio.loop=!1;let n=0;e.store.globalAudio.onended=()=>{n++,n<t&&e.store.globalAudio.play()}}}globalThis.createAudio=K0;const Yy="original_meta2d";function Xy(){return localStorage.removeItem(Yy)}let Or={};const Zy=e=>{const r=document.querySelectorAll("video");let t=null;if(r.forEach(l=>{l.getAttribute("src")===e.video&&(t=l)}),!t)return;t.setAttribute("muted","muted"),t.setAttribute("autoplay","autoplay"),t.setAttribute("loop","loop"),t.setAttribute("crossorigin",""),t.setAttribute("controls",""),t.style.display="none",t.parentElement.style.border="2px solid #ffc878";const n=new JessibucaPro({container:t.parentElement,background:"",hasControl:!1,controlAutoHide:!0,checkFirstIFrame:!0,debug:!1,decoder:"./wasm/decoder-pro.js",forceNoOffscreen:!0,hotKey:!1,hasAudio:!1,hasVideo:!0,hiddenAutoPause:!1,isFlv:!0,isResize:!1,isNotMute:!0,loadingIcon:!0,loadingText:"加载中...",networkDelayTimeoutReplay:!1,playbackForwardMaxRateDecodeIFrame:8,showBandwidth:!1,showPerformance:!1,syncAudioAndVideo:!0,supportDblclickFullscreen:!1,timeout:10,useMSE:!0,useWCS:!1,useSIMD:!0,useVideoRender:!0,useCanvasRender:!1,videoBuffer:.2,videoBufferDelay:1});return e.autoPlay&&e.streamUrl&&n.play(e.streamUrl),Or[e.id]=n,n},Jy=()=>{Object.keys(Or).forEach(e=>{Or[e].destroy(),Or[e]=null}),Or={}},ba=(e,r)=>{const t=e.__vccOpts||e;for(const[n,l]of r)t[n]=l;return t},eg={class:"sy-empty"},tg={key:1,class:"sy-empty-picture"},rg={class:"sy-empty-description"},ng=Object.assign({name:"SyEmpty"},{__name:"index",props:{image:{type:String,default:"empty"},imageSize:{type:Number,default:80},description:{type:String,default:"暂无数据"},onlyText:{type:Boolean,default:!1}},setup(e){N.useCssVars(l=>({dbdd1bf2:n.value.width,d36455f4:n.value.height}));const r=e,t=N.computed(()=>({"font-size":r.imageSize?`${r.imageSize}px`:"80px"})),n=N.computed(()=>r.imageSize?{width:r.imageSize*1.2+"px",height:r.imageSize+"px"}:{width:"187px",height:"144px"});return(l,a)=>{const o=N.resolveComponent("SyIcon"),u=N.resolveComponent("el-icon");return N.openBlock(),N.createElementBlock("div",eg,[e.image!=="empty"?(N.openBlock(),N.createElementBlock("span",{key:0,class:"sy-empty-image",style:N.normalizeStyle(t.value)},[e.image!=="loading"?(N.openBlock(),N.createBlock(o,{key:0,name:e.image,gradient:""},null,8,["name"])):(N.openBlock(),N.createBlock(u,{key:1,class:"is-loading",style:{color:"#1671d4"}},{default:N.withCtx(()=>[N.createVNode(N.unref(S0))]),_:1}))],4)):e.onlyText?N.createCommentVNode("",!0):(N.openBlock(),N.createElementBlock("span",tg)),N.createElementVNode("div",rg,[N.createElementVNode("p",null,N.toDisplayString(e.description),1)])])}}}),ig=ba(ng,[["__scopeId","data-v-c5e7d407"]]),og=Object.assign({name:"Meta2dEditor"},{__name:"index",props:{url:{type:String,default:""},data:{type:Object,default:()=>{}},local:{type:Boolean,default:!1},preview:{type:Boolean,default:!1},devConfig:{type:Object,default:()=>({isDev:!1,devServerUrl:"",devServerPort:8443})}},emits:["loaded","load-error"],setup(e,{expose:r,emit:t}){const n=t,l=e,a=N.ref(null),o=N.shallowRef(),u=N.computed(()=>!!(l.data||l.url));N.watch(()=>[l.data,l.url],()=>{u.value&&s()});let p=N.ref(!0);function s(){return je(this,null,function*(){try{if(p.value=!0,yield N.nextTick(),!a.value){console.error("未找到meta2d元素!");return}let g=null;if(l.data?g=l.data:l.url&&(g=yield v()),!g||!g.data){p.value=!1,console.log("图纸数据为空"),n("load-error");return}const x=g.options||{background:"#eee",disableAnchor:!1};if(o.value&&(o.value.destroy(!0),o.value=null),!a.value){console.error("Meta2D 容器元素不可用");return}o.value=new Pe.Meta2d(a.value,he({},x)),x.visibleLevel&&o.value.scale(x.visibleLevel),i(),d(),yield c(g.data),o.value.render(),f(),setTimeout(()=>{window.meta2dTools&&window.registerToolsNew()},1e3),n("loaded",o.value)}catch(g){console.error("初始化编辑器失败:",g)}})}function i(){if(!o.value)return;new Hy({}).initPlugin(o.value,"mindNode",{})}function d(){Pe.register(Fc.classPens()),Pe.register(Fa.flowPens()),Pe.registerAnchors(Fa.flowAnchors()),Pe.register(Ia.sequencePens()),Pe.registerCanvasDraw(Ia.sequencePensbyCtx()),Pe.register(Da.activityDiagram()),Pe.registerCanvasDraw(Da.activityDiagramByCtx()),Pe.registerCanvasDraw(Tc.formPens()),Pe.registerCanvasDraw(Ic.chartsPens()),Pe.register(xi.ftaPens()),Pe.registerAnchors(xi.ftaAnchors()),Pe.registerCanvasDraw(xi.ftaPensbyCtx())}function c(g){if(o.value){if(typeof g.locked=="undefined"&&(g.locked=0),g.bkImage&&o.value.setBackgroundImage(g.bkImage),g.pens&&g.pens.length>0){const x=[];g.pens.forEach(k=>{k.name==="video"&&k.streamUrl?x.push(k):k.name==="image"&&k.image&&(k.image=jy(k.image,l.devConfig))}),x.length>0&&setTimeout(()=>{x.forEach(k=>{Zy(k)})},500);const y=window.meta.graph.penCountThreshold||2e3;g.pens.length>y&&g.scale&&g.pens.forEach(k=>{const T=k.visibleLevel;T!==void 0?(k.visible=g.scale>=T,k.visible||(k.disabled=!0,k.locked=Pe.LockState.Disable)):(k.visible=!0,k.disabled=!1,k.locked=Pe.LockState.None)})}o.value.open(g)}}function f(){o.value&&o.value.on("scale",h)}const h=$n.debounce(g=>{var x,y,w,k;try{if(!o.value)return;Ho.emit("graph-scale",g);let T=o.value.store.data.pens;const I=window.meta.graph.penCountThreshold||2e3,D=T.length>I;for(let X=0;X<T.length;X++){const V=T[X];if([Se.VIDEO_STREAM,Se.MP4].includes(V.penType)){if(((y=(x=cr[V.id])==null?void 0:x.children)==null?void 0:y.length)===3){let E=cr[V.id].children[0],A=cr[V.id].children[2];E.style.width=A.currentTime/A.duration*V.calculative.worldRect.width+"px"}else if(((k=(w=cr[V.id])==null?void 0:w.children)==null?void 0:k.length)===2){let E=cr[V.id].children[0],A=cr[V.id].children[1];E.style.width=A.currentTime/A.duration*V.calculative.worldRect.width+"px"}}if(D){const E=V.visibleLevel!==void 0?g>=V.visibleLevel:!0;o.value._setValue({id:V.id,visible:E,disabled:!E,locked:E?Pe.LockState.None:Pe.LockState.Disable})}}o.value.render()}catch(T){console.error("处理缩放失败:",T)}},500);function v(){return je(this,null,function*(){if(!l.url)return st.error("图纸路径为空!"),null;try{return(yield jo.getGraphApi(l.url,{local:l.local}))||null}catch(g){return null}})}const m=()=>{o.value&&o.value.resize()};return N.onMounted(()=>{u.value&&s(),window.document.addEventListener("resize",m)}),N.onUnmounted(()=>{Jy(),Xy(),o.value&&(l.preview?(tu.clearLineCross(),o.value.destroy(!0)):o.value.off("scale",h)),window.document.removeEventListener("resize",m)}),r({stage:o}),(g,x)=>(N.openBlock(),N.createElementBlock("div",{ref_key:"meta2dRef",ref:a,class:"meta2d-editor"},[N.unref(p)?N.createCommentVNode("",!0):(N.openBlock(),N.createBlock(ig,{key:0,class:"meta2d-empty",description:"图纸不存在"}))],512))}}),ag=ba(og,[["__scopeId","data-v-d97cf5a2"]]),sg={class:"preview-container"},lg={key:0,class:"back-btn"},ug=Object.assign({name:"Meta2dPreview"},{__name:"index",props:{url:{type:String,default:""},gid:{type:String,default:""},data:{type:Object,default:null},local:{type:Boolean,default:!1},isInitData:{type:Boolean,default:!0},config:{type:Object,default:()=>({socketUrl:As,stationIdKey:Nl,enableToken:!0,userTokenKey:Pl,messageDelay:200,debounceDelay:100,enableAutoFit:!0,enableWebSocket:!0,graphSocket:_s.GRAPH.SOCKET})},showMap:{type:Boolean,default:!1},isFactory:{type:Boolean,default:!1},apiInstance:{type:Object,default:()=>jo},mittInstance:{type:Object,default:()=>Ho},customCallbacks:{type:Object,default:()=>({})},errorHandler:{type:Object,default:()=>({callback:null,showMessage:!0})},devConfig:{type:Object,default:()=>({isDev:!1,devServerUrl:"",devServerPort:8443})}},emits:["error","loaded","custom-msg","socket-msg"],setup(e,{expose:r,emit:t}){const n=t,l=e;let a=N.ref(!1),o=N.ref(""),u=N.ref(!1);const p=N.ref(null),s=N.ref(""),i=N.ref(!1),d=N.computed(()=>{var P;return(P=p.value)==null?void 0:P.stage}),c=N.computed(()=>{var P;return(P=d.value)==null?void 0:P.store}),f=N.computed(()=>he({socketUrl:As,stationIdKey:Nl,enableToken:!0,userTokenKey:Pl,messageDelay:200,debounceDelay:100,enableAutoFit:!0,fitPadding:10,enableWebSocket:!0,graphSocket:_s.GRAPH.SOCKET},l.config)),h=()=>l.apiInstance||jo,v=()=>l.mittInstance||Ho,m=(P,J="")=>{const $={error:P,message:J,timestamp:new Date().toISOString()};n("error",$),l.errorHandler.callback?l.errorHandler.callback($):l.errorHandler.showMessage&&st&&st.error(`${J}: ${P.message||P}`)},g=()=>{o.value&&(s.value=o.value,i.value=u.value)},x=P=>{var J,$,U,K,L,O;try{if(!P)return;if((J=P==null?void 0:P.includes)!=null&&J.call(P,"token 必传"))return st.warning(P);const H=typeof P=="string"?JSON.parse(P):P;if((H==null?void 0:H.data)==="服务错误"||(U=($=H==null?void 0:H.data)==null?void 0:$.includes)!=null&&U.call($,"token is expired"))return st.warning(H.data);switch(n("socket-msg",H),H.action){case Es.ACPOINT.YCVALUE:case Es.ACPOINT.YXVALUE:if((K=H==null?void 0:H.data)!=null&&K.point_id){const W=d.value.find(H.data.point_id);W&&C(W,H.data)}break;default:if(((L=H.data)==null?void 0:L.length)>0){const W=setTimeout(()=>{clearTimeout(W),d.value&&H.data.forEach(Z=>{const re=d.value.find(Z.dataId||Z.point_id);C(re,Z)})},f.value.messageDelay);l.customCallbacks.onWebSocketMessage&&l.customCallbacks.onWebSocketMessage(H),(O=window.customSocketFn)==null||O.call(window,P)}break}return!0}catch(H){return m(H,"WebSocket消息处理"),!0}},y=P=>je(this,null,function*(){console.log("🚀 ~ onCustomMsg ~ msg:",P);try{if(P.msgName)switch(P.msgName){case nt.CHANGE_GRAPH:case nt.NOTIFY_DIALOG:w(P);break}else w(P);n("custom-msg",P),l.customCallbacks.onCustomMessage&&l.customCallbacks.onCustomMessage(P)}catch(J){m(J,"自定义消息处理")}}),w=P=>{var J;if(P.params){const $=JSON.parse(P.params);switch($.action){case nt.CHANGE_GRAPH:($==null?void 0:$.data)!=="图纸id"?(o.value=s.value,u.value=i.value,a.value=$.isBack,(J=$==null?void 0:$.data)!=null&&J.startsWith("/")?(s.value=$==null?void 0:$.data,i.value=!0):(i.value=!1,T($.data))):console.warn("切换图纸信息为空");break;case nt.NOTIFY_DIALOG:$.msg!=="通知内容"?Py(he({message:$.msg},$)):console.warn("通知内容为空");break}}},k=P=>{var J,$,U;try{n("loaded",P);const K=D(),L=f.value,O=Rl.getSession(L.stationIdKey),H=Rl.getSession(L.userTokenKey);L.enableWebSocket&&O&&H&&(($=(J=P.store)==null?void 0:J.data)!=null&&$.websocket?((U=P.store.data.websocket)!=null&&U.includes("station_id")||(P.store.data.websocket=`${P.store.data.websocket}?station_id=${O}`),L.enableToken?P.store.data.websocketProtocols=H:P.store.data.websocketProtocols=void 0,P.closeSocket(),P.connectSocket()):(P.store.data.websocket=`${L.socketUrl}?station_id=${O}`,L.enableToken?P.store.data.websocketProtocols=H:P.store.data.websocketProtocols=void 0,P.connectWebsocket())),(l.showMap||K.showMap==="true")&&P.showMap(),P.setRule({rule:!1}),P.setOptions({disableRuleLine:!0}),P.setGrid({grid:!1}),P.lock(Pe.LockState.DisableEdit),E().forEach(Z=>{var re;(re=Z==null?void 0:Z.events)!=null&&re.length?X({id:Z.id,locked:1},!1):X({id:Z.id,locked:10},!1)}),P.render(),L.enableAutoFit&&P.fitView(!0,L.fitPadding),Object.values(nt).forEach(Z=>{P.on(Z,re=>y(_e(he({},re),{msgName:Z})))}),P&&(P.socketFn=x),l.customCallbacks.onStageLoaded&&l.customCallbacks.onStageLoaded(P),l.isInitData&&I(P)}catch(K){m(K,"图纸加载完成处理")}},T=P=>je(this,null,function*(){var J;try{if(l.url){s.value=l.url,i.value=l.local;return}const $=D();if(P=P||l.gid||$.id,$.local==="true"&&(i.value=!0),P){const U=h();if(U&&U.getCommonApi){const K=yield U.getCommonApi(l.isFactory?"graph":"floorplan",{guid:P});if((J=K.data)!=null&&J.length)s.value=K.data[0].path,l.customCallbacks.onGraphLoaded&&l.customCallbacks.onGraphLoaded(s.value);else{const L="未找到图纸!";m(new Error(L),"获取图纸数据")}}else m(new Error("API实例不可用"),"初始化图纸数据!")}else s.value=l.url,i.value=l.local}catch($){m($,"获取图纸数据失败")}}),I=P=>je(this,null,function*(){var J,$,U;if(P){let K=[],L=[],O=[];const H=P.store.data.pens;for(let W=0;W<H.length;W++){const Z=H[W];Z.bindDataId&&(J=Z.form)!=null&&J.length&&Z.form.forEach(re=>{if(re.dataIds.dataId)switch(re.dataIds.dataType){case Vi.YC:K.push(_e(he({},re),{nodeName:re.dataIds.name,penId:Z.id,penName:Z.penName}));break;case Vi.YX:L.push(_e(he({},re),{nodeName:re.dataIds.name,penId:Z.id,penName:Z.penName}));break;case Vi.POINT:O.push(_e(he({},re),{nodeName:re.dataIds.name,penId:Z.id,penName:Z.penName}));break}})}if(K.length){const W=h();if(W&&W.postCommonApi){const Z=yield W.postCommonApi("queryrealtimepoint",{point_id:K.map(re=>{var oe;return(oe=re==null?void 0:re.dataIds)==null?void 0:oe.dataId}).join(",")});($=Z==null?void 0:Z.data)!=null&&$.length&&Z.data.forEach(re=>{const oe=P.find(re.guid);C(oe,_e(he({},re),{value:Ss(re.value)?Number(re.value):re.value,value_disp:re.value_disp,alarm_value:re.alarm_value,point_id:re.guid}))})}}if(L.length){const W=h();if(W&&W.postCommonApi){const Z=yield W.postCommonApi("queryrealtimepoint",{point_id:L.map(re=>{var oe;return(oe=re==null?void 0:re.dataIds)==null?void 0:oe.dataId}).join(",")});(U=Z==null?void 0:Z.data)!=null&&U.length&&Z.data.forEach(re=>{const oe=P.find(re.guid);C(oe,_e(he({},re),{value:Ss(re.value)?Number(re.value):re.value,value_disp:re.value_disp,alarm_value:re.alarm_value,point_id:re.guid}))})}}}}),D=()=>{var U;const P={},J=((U=window.location.href.split("?"))==null?void 0:U[1])||"",$=new URLSearchParams(J);for(const[K,L]of $.entries())P[K]=L;return P},X=(P,J=!0)=>{if(d.value)return d.value.setValue(P,{render:J})},V=()=>d.value,E=()=>{var P,J;return((J=(P=c.value)==null?void 0:P.data)==null?void 0:J.pens)||[]},A=()=>Se,C=(()=>{let P=null;const J=new Map,$=new Map,U=L=>{var H;if(!((H=L.children)!=null&&H.length))return[];const O=L.id||"";if(!O)return[];if(!$.has(O)&&c.value){const W=Pe.getAllChildren(L,c.value);$.set(O,W)}return $.get(O)||[]},K=()=>{if(J.size===0||!d.value||!c.value)return;const L=[],O=[],H=c.value.animates;J.forEach(({pen:W,dataItem:Z,formKey:re})=>{switch(re){case"showChild":X({id:W.id,showChild:Z.value},!1);break;case"text":X({id:W.id,text:Z.value_disp||Z.value},!1);break;case"light_plate":{const oe=Z.value===-1||Ol(Z)?"#999999":W0[Z.value!==void 0?Z.value:Z.alarm_value],ae=Z.value===-1||Ol(Z)?"#cccccc":V0[Z.value!==void 0?Z.value:Z.alarm_value];X({id:W.id,textColor:oe,background:ae},!1)}break;case"point_value":W.penType===Se.POINT_VALUE&&U(W).forEach(ae=>{ae.name==="text"&&X({id:ae.id,text:Z.value},!1)});break;case"online_state":{let oe=Z.value?void 0:"contrast(0%)";X({id:W.id,filter:oe},!1),U(W).forEach(b=>{X({id:b.id,filter:oe},!1)})}break;case"charged_state":{const oe=Z.value===r1.OFFLINE?"contrast(0%)":void 0;oe!==W.filter&&(X({id:W.id,filter:oe},!1),U(W).forEach(b=>{X({id:b.id,filter:oe},!1)}))}break;case"electric_direction":Z.value===n1.STOP?H!=null&&H.has(W)&&O.push(W):!!Z.value!==W.animateReverse&&(X({id:W.id,animateReverse:!!Z.value},!1),H!=null&&H.has(W)||L.push(W));break;case"electric_size":{const oe=i1[Z.value];oe!==void 0&&oe!==W.lineWidth&&X({id:W.id,lineWidth:oe},!1)}break;default:X({id:W.id,[re]:Z.value},!1);break}}),O.length>0&&d.value.stopAnimate(O),L.length>0&&d.value.startAnimate(L),J.clear(),d.value.render()};return(L,O)=>{L!=null&&L.length&&(L.forEach(H=>{const W=H.form;W!=null&&W.length&&W.forEach(Z=>{if(!(Array.isArray(Z.dataIds)?Z.dataIds:[Z.dataIds]).some(b=>(b==null?void 0:b.dataId)&&((b==null?void 0:b.dataId)===O.dataId||(b==null?void 0:b.dataId)===O.point_id)))return;const ae=`${H.id}-${Z.key}`;J.set(ae,{pen:H,dataItem:O,formKey:Z.key})})}),P&&clearTimeout(P),P=setTimeout(()=>{K(),P=null},f.value.debounceDelay))}})(),F=P=>{if(d.value){for(let J=0;J<P.length;J++){const $=P[J],U=d.value.find($.dataId);C(U,$)}d.value.render(),l.customCallbacks.onBatchUpdate&&l.customCallbacks.onBatchUpdate(P)}},j=(P,J=!1)=>{if(!d.value)return;const $=E();for(let U=0;U<$.length;U++){const K=$[U];let L=!1;J?L=P===K.dataProp:L=P===5?!0:K.dataProp<=P,X({id:K.id,visible:L},!1)}d.value.fitView(),d.value.render(),l.customCallbacks.onLevelChange&&l.customCallbacks.onLevelChange(P,J)};return N.watch(()=>[l.url,l.isFactory,l.local,l.data,l.gid],()=>{T()}),N.watch(()=>l.showMap,P=>{d.value&&(P?d.value.showMap():d.value.hideMap())}),N.onMounted(()=>{const P=v();P&&P.on&&P.on(f.value.graphSocket,x),T()}),N.onUnmounted(()=>{const P=v();P&&P.off&&P.off(f.value.graphSocket,x)}),r({setValue:X,getStage:V,getAllPens:E,getCustomPenType:A,batchUpdatePen:F,handleLineCross:tu.handleLineCross,changeVisibleByLevel:j}),(P,J)=>(N.openBlock(),N.createElementBlock("div",sg,[N.createVNode(ag,{ref_key:"graphRef",ref:p,url:s.value,local:i.value,data:l.data,"dev-config":l.devConfig,preview:"",onLoaded:k},null,8,["url","local","data","dev-config"]),N.unref(a)?(N.openBlock(),N.createElementBlock("div",lg,[N.createVNode(N.unref(ay),{type:"primary",onClick:g},{default:N.withCtx(()=>[...J[0]||(J[0]=[N.createTextVNode("返回",-1)])]),_:1})])):N.createCommentVNode("",!0)]))}}),Hr=ba(ug,[["__scopeId","data-v-c4b2c873"]]);Hr.name||(Hr.name="SyGraph");const cg=e=>{e.component(Hr.name||"SyGraph",Hr)},fg={install:cg};exports.SyGraph=Hr;exports.default=fg;
|
package/lib/sy-graph.mjs
CHANGED
|
@@ -3397,8 +3397,10 @@ const {
|
|
|
3397
3397
|
// 关闭音频弹窗
|
|
3398
3398
|
CHANGE_GRAPH: "CHANGE_GRAPH",
|
|
3399
3399
|
// 切换图纸
|
|
3400
|
-
NOTIFY_DIALOG: "NOTIFY_DIALOG"
|
|
3400
|
+
NOTIFY_DIALOG: "NOTIFY_DIALOG",
|
|
3401
3401
|
// 通知弹窗
|
|
3402
|
+
PROPS_PANEL: "PROPS_PANEL"
|
|
3403
|
+
// 属性面板
|
|
3402
3404
|
}, am = {
|
|
3403
3405
|
OFFLINE: 0
|
|
3404
3406
|
}, ke = {
|
|
@@ -22168,6 +22170,7 @@ const rx = (e) => {
|
|
|
22168
22170
|
return m(H, "WebSocket消息处理"), !0;
|
|
22169
22171
|
}
|
|
22170
22172
|
}, y = (P) => Ge(this, null, function* () {
|
|
22173
|
+
console.log("🚀 ~ onCustomMsg ~ msg:", P);
|
|
22171
22174
|
try {
|
|
22172
22175
|
if (P.msgName)
|
|
22173
22176
|
switch (P.msgName) {
|
|
@@ -22495,7 +22498,7 @@ const rx = (e) => {
|
|
|
22495
22498
|
])) : mt("", !0)
|
|
22496
22499
|
]));
|
|
22497
22500
|
}
|
|
22498
|
-
}), fi = /* @__PURE__ */ Va(px, [["__scopeId", "data-v-
|
|
22501
|
+
}), fi = /* @__PURE__ */ Va(px, [["__scopeId", "data-v-c4b2c873"]]);
|
|
22499
22502
|
fi.name || (fi.name = "SyGraph");
|
|
22500
22503
|
const dx = (e) => {
|
|
22501
22504
|
e.component(fi.name || "SyGraph", fi);
|