detect/detect.gui/Embedded/dist/assets/index-8e6298d7.js

2 lines
14 KiB
JavaScript
Raw Normal View History

2025-02-07 12:16:01 +08:00
var me=Object.defineProperty,he=Object.defineProperties;var ye=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols;var Ce=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;var ee=(e,o,l)=>o in e?me(e,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[o]=l,H=(e,o)=>{for(var l in o||(o={}))Ce.call(o,l)&&ee(e,l,o[l]);if(x)for(var l of x(o))Me.call(o,l)&&ee(e,l,o[l]);return e},E=(e,o)=>he(e,ye(o));var A=(e,o,l)=>new Promise((i,a)=>{var c=u=>{try{n(l.next(u))}catch(d){a(d)}},t=u=>{try{n(l.throw(u))}catch(d){a(d)}},n=u=>u.done?i(u.value):Promise.resolve(u.value).then(c,t);n((l=l.apply(e,o)).next())});import{v as se,F as be,d as He,aS as Se,N as Fe,K as ke,a4 as ve,aT as $e,_ as j,u as re,aB as Be,f as ie,aQ as Oe,h as Te,aF as ce,aq as Pe,w as we}from"./index.js";import{h as V,u as r,d as R,I as Ne,k as S,a9 as N,i as Re,f as m,c as F,w as ue,o as De,b as de,y as B,a6 as y,n as We,Z as M,a4 as T,a5 as g,m as _e,_ as z,ab as O,ad as Ee,F as je,a8 as Y,a1 as Le,G as Q,a0 as U,g as J,z as Ie,aa as te,a7 as ne,ag as oe,ah as ae,r as pe,J as q}from"./vue-72a104e4.js";import{M as Ae,T as qe,a3 as ze,a4 as Ve,Q as Xe,o as X,b as Ye}from"./antd-835b28bf.js";import{u as Qe}from"./useWindowSizeFn-7c45a656.js";const{t:le}=se(),Ue={open:{type:Boolean},scrollTop:{type:Boolean,default:!0},height:{type:Number},minHeight:{type:Number},draggable:{type:Boolean,default:!0},centered:{type:Boolean},cancelText:{type:String,default:le("common.cancelText")},okText:{type:String,default:le("common.okText")},closeFunc:Function},K=Object.assign({},Ue,{defaultFullscreen:{type:Boolean},canFullscreen:{type:Boolean,default:!0},wrapperFooterOffset:{type:Number,default:0},helpMessage:[String,Array],useWrapper:{type:Boolean,default:!0},loading:{type:Boolean},loadingTip:{type:String},showCancelBtn:{type:Boolean,default:!0},showOkBtn:{type:Boolean,default:!0},wrapperProps:Object,afterClose:Function,bodyStyle:Object,closable:{type:Boolean,default:!0},closeIcon:Object,confirmLoading:{type:Boolean},destroyOnClose:{type:Boolean},footer:Object,getContainer:Function,mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},maskStyle:Object,okType:{type:String,default:"primary"},okButtonProps:Object,cancelButtonProps:Object,title:{type:String},open:{type:Boolean},width:[String,Number],wrapClassName:{type:String},zIndex:{type:Number}});function Ge(e){const o=(a,c)=>getComputedStyle(a)[c],l=a=>{if(!a)return;a.setAttribute("data-drag",r(e.draggable));const c=a.querySelector(".ant-modal-header"),t=a.querySelector(".ant-modal");!c||!t||!r(e.draggable)||(c.style.cursor="move",c.onmousedown=n=>{if(!n)return;const u=n.clientX,d=n.clientY,p=document.body.clientWidth,f=document.documentElement.clientHeight,h=t.offsetWidth,b=t.offsetHeight,k=t.offsetLeft,v=p-t.offsetLeft-h,$=t.offsetTop,L=f-t.offsetTop-b,P=o(t,"left"),D=o(t,"top");let W=+P,_=+D;P.includes("%")?(W=+document.body.clientWidth*(+P.replace(/%/g,"")/100),_=+document.body.clientHeight*(+D.replace(/%/g,"")/100)):(W=+P.replace(/px/g,""),_=+D.replace(/px/g,"")),document.onmousemove=function(I){let s=I.clientX-u,C=I.clientY-d;-s>k?s=-k:s>v&&(s=v),-C>$?C=-$:C>L&&(C=L),t.style.cssText+=`;left:${s+W}px;top:${C+_}px;`},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null}})},i=()=>{const a=document.querySelectorAll(".ant-modal-wrap");for(const c of Array.from(a)){if(!c)continue;const t=o(c,"display"),n=c.getAttribute("data-drag");t!=="none"&&(n===null||r(e.destroyOnClose))&&l(c)}};V(()=>{!r(e.open)||!r(e.draggable)||be(()=>{i()},30)})}function Je(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Re(e)}const Ke=R({name:"Modal",inheritAttrs:!1,props:K,emits:["cancel"],setup(e,{slots:o,emit:l}){const{open:i,draggable:a,destroyOnClose:c}=Ne(e),t=He();Ge({open:i,destroyOnClose:c,draggable:a});const n=u=>{l("cancel",u)};return()=>{let u;const d=E(H(H({},r(t)),e),{onCancel:n});return S(Ae,N({class:"custom-modal"},d),Je(u=Se(o))?u:{default:()=>[u]})}}}),fe=Symbol();function Ze(e){return