leiting-bim 2.1.124 → 2.1.126

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.
@@ -10,7 +10,7 @@
10
10
  material.diffuse *= u_tilesBrightness;
11
11
  }
12
12
  `});d.isModelAdjustment=!0,a.customShader=d}else{let d="color('white')";e!==1&&(d=`${d} * ${e}`),a.style=new n.Cesium3DTileStyle({color:d})}}}}var Rs=typeof global=="object"&&global&&global.Object===Object&&global,Gl=typeof self=="object"&&self&&self.Object===Object&&self,gt=Rs||Gl||Function("return this")(),Mi=gt.Symbol,Os=Object.prototype,Hl=Os.hasOwnProperty,Yl=Os.toString,$t=Mi?Mi.toStringTag:void 0;function Vl(i){var e=Hl.call(i,$t),t=i[$t];try{i[$t]=void 0;var n=!0}catch{}var s=Yl.call(i);return n&&(e?i[$t]=t:delete i[$t]),s}var zl=Object.prototype,Wl=zl.toString;function jl(i){return Wl.call(i)}var Kl="[object Null]",$l="[object Undefined]",Ls=Mi?Mi.toStringTag:void 0;function Xt(i){return i==null?i===void 0?$l:Kl:Ls&&Ls in Object(i)?Vl(i):jl(i)}function kt(i){return i!=null&&typeof i=="object"}var Xl="[object Symbol]";function ql(i){return typeof i=="symbol"||kt(i)&&Xt(i)==Xl}var bn=Array.isArray,Jl=/\s/;function Zl(i){for(var e=i.length;e--&&Jl.test(i.charAt(e)););return e}var ec=/^\s+/;function tc(i){return i&&i.slice(0,Zl(i)+1).replace(ec,"")}function Ve(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}var Ns=NaN,ic=/^[-+]0x[0-9a-f]+$/i,nc=/^0b[01]+$/i,sc=/^0o[0-7]+$/i,oc=parseInt;function Us(i){if(typeof i=="number")return i;if(ql(i))return Ns;if(Ve(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=Ve(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=tc(i);var t=nc.test(i);return t||sc.test(i)?oc(i.slice(2),t?2:8):ic.test(i)?Ns:+i}function _s(i){return i}var rc="[object AsyncFunction]",ac="[object Function]",lc="[object GeneratorFunction]",cc="[object Proxy]";function vn(i){if(!Ve(i))return!1;var e=Xt(i);return e==ac||e==lc||e==rc||e==cc}var In=gt["__core-js_shared__"],Qs=(function(){var i=/[^.]+$/.exec(In&&In.keys&&In.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function dc(i){return!!Qs&&Qs in i}var hc=Function.prototype,uc=hc.toString;function fc(i){if(i!=null){try{return uc.call(i)}catch{}try{return i+""}catch{}}return""}var pc=/[\\^$.*+?()[\]{}|]/g,gc=/^\[object .+?Constructor\]$/,mc=Function.prototype,Ac=Object.prototype,yc=mc.toString,Cc=Ac.hasOwnProperty,Ec=RegExp("^"+yc.call(Cc).replace(pc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wc(i){if(!Ve(i)||dc(i))return!1;var e=vn(i)?Ec:gc;return e.test(fc(i))}function bc(i,e){return i?.[e]}function Bn(i,e){var t=bc(i,e);return wc(t)?t:void 0}var Gs=Object.create,vc=(function(){function i(){}return function(e){if(!Ve(e))return{};if(Gs)return Gs(e);i.prototype=e;var t=new i;return i.prototype=void 0,t}})();function Ic(i,e,t){switch(t.length){case 0:return i.call(e);case 1:return i.call(e,t[0]);case 2:return i.call(e,t[0],t[1]);case 3:return i.call(e,t[0],t[1],t[2])}return i.apply(e,t)}function Bc(i,e){var t=-1,n=i.length;for(e||(e=Array(n));++t<n;)e[t]=i[t];return e}var xc=800,Sc=16,Tc=Date.now;function Mc(i){var e=0,t=0;return function(){var n=Tc(),s=Sc-(n-t);if(t=n,s>0){if(++e>=xc)return arguments[0]}else e=0;return i.apply(void 0,arguments)}}function Dc(i){return function(){return i}}var Di=(function(){try{var i=Bn(Object,"defineProperty");return i({},"",{}),i}catch{}})(),kc=Di?function(i,e){return Di(i,"toString",{configurable:!0,enumerable:!1,value:Dc(e),writable:!0})}:_s,Pc=Mc(kc),Fc=9007199254740991,Rc=/^(?:0|[1-9]\d*)$/;function Hs(i,e){var t=typeof i;return e=e??Fc,!!e&&(t=="number"||t!="symbol"&&Rc.test(i))&&i>-1&&i%1==0&&i<e}function xn(i,e,t){e=="__proto__"&&Di?Di(i,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):i[e]=t}function ki(i,e){return i===e||i!==i&&e!==e}var Oc=Object.prototype,Lc=Oc.hasOwnProperty;function Nc(i,e,t){var n=i[e];(!(Lc.call(i,e)&&ki(n,t))||t===void 0&&!(e in i))&&xn(i,e,t)}function Uc(i,e,t,n){var s=!t;t||(t={});for(var o=-1,r=e.length;++o<r;){var l=e[o],a=void 0;a===void 0&&(a=i[l]),s?xn(t,l,a):Nc(t,l,a)}return t}var Ys=Math.max;function _c(i,e,t){return e=Ys(e===void 0?i.length-1:e,0),function(){for(var n=arguments,s=-1,o=Ys(n.length-e,0),r=Array(o);++s<o;)r[s]=n[e+s];s=-1;for(var l=Array(e+1);++s<e;)l[s]=n[s];return l[e]=t(r),Ic(i,this,l)}}function Qc(i,e){return Pc(_c(i,e,_s),i+"")}var Gc=9007199254740991;function Vs(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=Gc}function Sn(i){return i!=null&&Vs(i.length)&&!vn(i)}function Hc(i,e,t){if(!Ve(t))return!1;var n=typeof e;return(n=="number"?Sn(t)&&Hs(e,t.length):n=="string"&&e in t)?ki(t[e],i):!1}function Yc(i){return Qc(function(e,t){var n=-1,s=t.length,o=s>1?t[s-1]:void 0,r=s>2?t[2]:void 0;for(o=i.length>3&&typeof o=="function"?(s--,o):void 0,r&&Hc(t[0],t[1],r)&&(o=s<3?void 0:o,s=1),e=Object(e);++n<s;){var l=t[n];l&&i(e,l,n,o)}return e})}var Vc=Object.prototype;function zs(i){var e=i&&i.constructor,t=typeof e=="function"&&e.prototype||Vc;return i===t}function zc(i,e){for(var t=-1,n=Array(i);++t<i;)n[t]=e(t);return n}var Wc="[object Arguments]";function Ws(i){return kt(i)&&Xt(i)==Wc}var js=Object.prototype,jc=js.hasOwnProperty,Kc=js.propertyIsEnumerable,Tn=Ws((function(){return arguments})())?Ws:function(i){return kt(i)&&jc.call(i,"callee")&&!Kc.call(i,"callee")};function $c(){return!1}var Ks=typeof N=="object"&&N&&!N.nodeType&&N,$s=Ks&&typeof module=="object"&&module&&!module.nodeType&&module,Xc=$s&&$s.exports===Ks,Xs=Xc?gt.Buffer:void 0,qc=Xs?Xs.isBuffer:void 0,qs=qc||$c,Jc="[object Arguments]",Zc="[object Array]",ed="[object Boolean]",td="[object Date]",id="[object Error]",nd="[object Function]",sd="[object Map]",od="[object Number]",rd="[object Object]",ad="[object RegExp]",ld="[object Set]",cd="[object String]",dd="[object WeakMap]",hd="[object ArrayBuffer]",ud="[object DataView]",fd="[object Float32Array]",pd="[object Float64Array]",gd="[object Int8Array]",md="[object Int16Array]",Ad="[object Int32Array]",yd="[object Uint8Array]",Cd="[object Uint8ClampedArray]",Ed="[object Uint16Array]",wd="[object Uint32Array]",de={};de[fd]=de[pd]=de[gd]=de[md]=de[Ad]=de[yd]=de[Cd]=de[Ed]=de[wd]=!0,de[Jc]=de[Zc]=de[hd]=de[ed]=de[ud]=de[td]=de[id]=de[nd]=de[sd]=de[od]=de[rd]=de[ad]=de[ld]=de[cd]=de[dd]=!1;function bd(i){return kt(i)&&Vs(i.length)&&!!de[Xt(i)]}function vd(i){return function(e){return i(e)}}var Js=typeof N=="object"&&N&&!N.nodeType&&N,qt=Js&&typeof module=="object"&&module&&!module.nodeType&&module,Id=qt&&qt.exports===Js,Mn=Id&&Rs.process,Zs=(function(){try{var i=qt&&qt.require&&qt.require("util").types;return i||Mn&&Mn.binding&&Mn.binding("util")}catch{}})(),eo=Zs&&Zs.isTypedArray,to=eo?vd(eo):bd;function Bd(i,e){var t=bn(i),n=!t&&Tn(i),s=!t&&!n&&qs(i),o=!t&&!n&&!s&&to(i),r=t||n||s||o,l=r?zc(i.length,String):[],a=l.length;for(var d in i)r&&(d=="length"||s&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Hs(d,a))||l.push(d);return l}function xd(i,e){return function(t){return i(e(t))}}function Sd(i){var e=[];if(i!=null)for(var t in Object(i))e.push(t);return e}var Td=Object.prototype,Md=Td.hasOwnProperty;function Dd(i){if(!Ve(i))return Sd(i);var e=zs(i),t=[];for(var n in i)n=="constructor"&&(e||!Md.call(i,n))||t.push(n);return t}function io(i){return Sn(i)?Bd(i):Dd(i)}var Jt=Bn(Object,"create");function kd(){this.__data__=Jt?Jt(null):{},this.size=0}function Pd(i){var e=this.has(i)&&delete this.__data__[i];return this.size-=e?1:0,e}var Fd="__lodash_hash_undefined__",Rd=Object.prototype,Od=Rd.hasOwnProperty;function Ld(i){var e=this.__data__;if(Jt){var t=e[i];return t===Fd?void 0:t}return Od.call(e,i)?e[i]:void 0}var Nd=Object.prototype,Ud=Nd.hasOwnProperty;function _d(i){var e=this.__data__;return Jt?e[i]!==void 0:Ud.call(e,i)}var Qd="__lodash_hash_undefined__";function Gd(i,e){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=Jt&&e===void 0?Qd:e,this}function mt(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var n=i[e];this.set(n[0],n[1])}}mt.prototype.clear=kd,mt.prototype.delete=Pd,mt.prototype.get=Ld,mt.prototype.has=_d,mt.prototype.set=Gd;function Hd(){this.__data__=[],this.size=0}function Pi(i,e){for(var t=i.length;t--;)if(ki(i[t][0],e))return t;return-1}var Yd=Array.prototype,Vd=Yd.splice;function zd(i){var e=this.__data__,t=Pi(e,i);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():Vd.call(e,t,1),--this.size,!0}function Wd(i){var e=this.__data__,t=Pi(e,i);return t<0?void 0:e[t][1]}function jd(i){return Pi(this.__data__,i)>-1}function Kd(i,e){var t=this.__data__,n=Pi(t,i);return n<0?(++this.size,t.push([i,e])):t[n][1]=e,this}function qe(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var n=i[e];this.set(n[0],n[1])}}qe.prototype.clear=Hd,qe.prototype.delete=zd,qe.prototype.get=Wd,qe.prototype.has=jd,qe.prototype.set=Kd;var no=Bn(gt,"Map");function $d(){this.size=0,this.__data__={hash:new mt,map:new(no||qe),string:new mt}}function Xd(i){var e=typeof i;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?i!=="__proto__":i===null}function Fi(i,e){var t=i.__data__;return Xd(e)?t[typeof e=="string"?"string":"hash"]:t.map}function qd(i){var e=Fi(this,i).delete(i);return this.size-=e?1:0,e}function Jd(i){return Fi(this,i).get(i)}function Zd(i){return Fi(this,i).has(i)}function eh(i,e){var t=Fi(this,i),n=t.size;return t.set(i,e),this.size+=t.size==n?0:1,this}function Pt(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var n=i[e];this.set(n[0],n[1])}}Pt.prototype.clear=$d,Pt.prototype.delete=qd,Pt.prototype.get=Jd,Pt.prototype.has=Zd,Pt.prototype.set=eh;var so=xd(Object.getPrototypeOf,Object),th="[object Object]",ih=Function.prototype,nh=Object.prototype,oo=ih.toString,sh=nh.hasOwnProperty,oh=oo.call(Object);function rh(i){if(!kt(i)||Xt(i)!=th)return!1;var e=so(i);if(e===null)return!0;var t=sh.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&oo.call(t)==oh}function ah(){this.__data__=new qe,this.size=0}function lh(i){var e=this.__data__,t=e.delete(i);return this.size=e.size,t}function ch(i){return this.__data__.get(i)}function dh(i){return this.__data__.has(i)}var hh=200;function uh(i,e){var t=this.__data__;if(t instanceof qe){var n=t.__data__;if(!no||n.length<hh-1)return n.push([i,e]),this.size=++t.size,this;t=this.__data__=new Pt(n)}return t.set(i,e),this.size=t.size,this}function Ft(i){var e=this.__data__=new qe(i);this.size=e.size}Ft.prototype.clear=ah,Ft.prototype.delete=lh,Ft.prototype.get=ch,Ft.prototype.has=dh,Ft.prototype.set=uh;var ro=typeof N=="object"&&N&&!N.nodeType&&N,ao=ro&&typeof module=="object"&&module&&!module.nodeType&&module,fh=ao&&ao.exports===ro,lo=fh?gt.Buffer:void 0;lo&&lo.allocUnsafe;function ph(i,e){return i.slice()}var co=gt.Uint8Array;function gh(i){var e=new i.constructor(i.byteLength);return new co(e).set(new co(i)),e}function mh(i,e){var t=gh(i.buffer);return new i.constructor(t,i.byteOffset,i.length)}function Ah(i){return typeof i.constructor=="function"&&!zs(i)?vc(so(i)):{}}function yh(i){return function(e,t,n){for(var s=-1,o=Object(e),r=n(e),l=r.length;l--;){var a=r[++s];if(t(o[a],a,o)===!1)break}return e}}var Ch=yh(),Dn=function(){return gt.Date.now()},Eh="Expected a function",wh=Math.max,bh=Math.min;function kn(i,e,t){var n,s,o,r,l,a,d=0,h=!1,p=!1,f=!0;if(typeof i!="function")throw new TypeError(Eh);e=Us(e)||0,Ve(t)&&(h=!!t.leading,p="maxWait"in t,o=p?wh(Us(t.maxWait)||0,e):o,f="trailing"in t?!!t.trailing:f);function u(I){var B=n,g=s;return n=s=void 0,d=I,r=i.apply(g,B),r}function m(I){return d=I,l=setTimeout(C,e),h?u(I):r}function E(I){var B=I-a,g=I-d,P=e-B;return p?bh(P,o-g):P}function A(I){var B=I-a,g=I-d;return a===void 0||B>=e||B<0||p&&g>=o}function C(){var I=Dn();if(A(I))return v(I);l=setTimeout(C,E(I))}function v(I){return l=void 0,f&&n?u(I):(n=s=void 0,r)}function S(){l!==void 0&&clearTimeout(l),d=0,n=a=s=l=void 0}function D(){return l===void 0?r:v(Dn())}function O(){var I=Dn(),B=A(I);if(n=arguments,s=this,a=I,B){if(l===void 0)return m(a);if(p)return clearTimeout(l),l=setTimeout(C,e),u(a)}return l===void 0&&(l=setTimeout(C,e)),r}return O.cancel=S,O.flush=D,O}function Pn(i,e,t){(t!==void 0&&!ki(i[e],t)||t===void 0&&!(e in i))&&xn(i,e,t)}function vh(i){return kt(i)&&Sn(i)}function Fn(i,e){if(!(e==="constructor"&&typeof i[e]=="function")&&e!="__proto__")return i[e]}function Ih(i){return Uc(i,io(i))}function Bh(i,e,t,n,s,o,r){var l=Fn(i,t),a=Fn(e,t),d=r.get(a);if(d){Pn(i,t,d);return}var h=o?o(l,a,t+"",i,e,r):void 0,p=h===void 0;if(p){var f=bn(a),u=!f&&qs(a),m=!f&&!u&&to(a);h=a,f||u||m?bn(l)?h=l:vh(l)?h=Bc(l):u?(p=!1,h=ph(a)):m?(p=!1,h=mh(a)):h=[]:rh(a)||Tn(a)?(h=l,Tn(l)?h=Ih(l):(!Ve(l)||vn(l))&&(h=Ah(a))):p=!1}p&&(r.set(a,h),s(h,a,n,o,r),r.delete(a)),Pn(i,t,h)}function ho(i,e,t,n,s){i!==e&&Ch(e,function(o,r){if(s||(s=new Ft),Ve(o))Bh(i,e,r,t,ho,n,s);else{var l=n?n(Fn(i,r),o,r+"",i,e,s):void 0;l===void 0&&(l=o),Pn(i,r,l)}},io)}var xh=Yc(function(i,e,t){ho(i,e,t)});function Rn({Cesium:i,tileset:e}){const t=e.leiting;if(!t||!t.model||!t.model.formData)return;const n=t.model.formData,s=t.box,o=i.Quaternion.fromAxisAngle(i.Cartesian3.UNIT_Z,i.Math.toRadians(n.totalRotation||0)),r=i.Matrix4.fromRotationTranslation(i.Matrix3.fromQuaternion(o),i.Cartesian3.ZERO),l=i.Cartesian3.fromDegrees(n.longitude,n.latitude,n.height),a=i.Transforms.eastNorthUpToFixedFrame(l),d=i.Matrix4.multiply(a,r,new i.Matrix4);if(e._root){if(!s){e._root.transform=d;return}try{const{center:h}=s,p=e.root.boundingVolume.boundingSphere,f=new i.Cartesian3(h.x,h.y,0),u=i.Matrix4.multiplyByPoint(d,f,new i.Cartesian3),m=i.Cartographic.fromCartesian(u),E=p.center,A=i.Transforms.eastNorthUpToFixedFrame(new i.Cartesian3(E.x,E.y,E.z)),C=new i.Cartesian3(-h.x+(n.X||0),-h.y+(n.Y||0),n.Z||0),v=i.Matrix4.fromTranslation(C),S=i.Matrix4.multiply(r,v,new i.Matrix4),D=i.Cartesian3.fromDegrees(m.longitude/Math.PI*180,m.latitude/Math.PI*180,n.height),O=i.Transforms.eastNorthUpToFixedFrame(D),I=i.Matrix4.multiply(O,S,new i.Matrix4);i.Matrix4.multiply(A,S,A),e._root.transform=I}catch(h){console.error("Update model position failed:",h)}}}const Rt={NotLoaded:0,Loading:1,Loaded:2,Error:3},At=4294967295,ze=65535,On=255,Sh=8,uo=9,Th=0,Mh=99,Dh=67324752,fo=134695760,kh=fo,po=33639248,Ph=101010256,go=101075792,Fh=117853008,Ot=22,Ln=20,Nn=56,Rh=12,Oh=20,mo=4,Lh=1,Nh=39169,Uh=10,_h=1,Qh=21589,Gh=28789,Hh=25461,Yh=6534,Vh=30837,zh=30805,Ao=1,Wh=6,yo=8,Co=2048,jh=16,Kh=1,$h=2,Xh=4,qh=32,Eo=61440,Un=16384,_n=73,Jh=420,Zh=2048,eu=1024,tu=512,iu="/",Qn=30,nu=10,su=14,ou=18,he=void 0,nt="undefined",yt="function",ru=64;let wo=2;try{typeof navigator!=nt&&navigator.hardwareConcurrency&&(wo=navigator.hardwareConcurrency)}catch{}const au={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:64*1024,maxWorkers:wo,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,CompressionStream:typeof CompressionStream!=nt&&CompressionStream,DecompressionStream:typeof DecompressionStream!=nt&&DecompressionStream},bo=Object.assign({},au);function lu(){return bo}function cu(i){return Math.max(i.chunkSize,ru)}function Ri(i){const{baseURI:e,chunkSize:t,maxWorkers:n,terminateWorkerTimeout:s,useCompressionStream:o,useWebWorkers:r,CompressionStream:l,DecompressionStream:a,CompressionStreamZlib:d,DecompressionStreamZlib:h,workerURI:p,wasmURI:f}=i;Oe("baseURI",e),Oe("wasmURI",f),Oe("workerURI",p),Oe("chunkSize",t),Oe("maxWorkers",n),Oe("terminateWorkerTimeout",s),Oe("useCompressionStream",o),Oe("useWebWorkers",r),Oe("CompressionStream",l),Oe("DecompressionStream",a),Oe("CompressionStreamZlib",d),Oe("DecompressionStreamZlib",h)}function Oe(i,e){e!==he&&(bo[i]=e)}function du(i){let e;i({workerURI:()=>(e||(e="data:text/javascript,"+encodeURIComponent(`(t=>{"function"==typeof define&&define.amd?define(t):t()})(function(){"use strict";const{Array:t,Object:e,Number:n,Math:s,Error:r,Uint8Array:o,Uint16Array:i,Uint32Array:c,Int32Array:a,Map:h,DataView:f,Promise:l,TextEncoder:u,crypto:w,postMessage:p,TransformStream:d,ReadableStream:y,WritableStream:m,CompressionStream:g,DecompressionStream:S}=self,b=void 0,v="undefined",k="function",z=[];for(let t=0;256>t;t++){let e=t;for(let t=0;8>t;t++)1&e?e=e>>>1^3988292384:e>>>=1;z[t]=e}class C{constructor(t){this.t=t||-1}append(t){let e=0|this.t;for(let n=0,s=0|t.length;s>n;n++)e=e>>>8^z[255&(e^t[n])];this.t=e}get(){return~this.t}}class A extends d{constructor(){let t;const e=new C;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new o(4);new f(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}const x={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],s=x.o(n);return 32===s?t.concat(e):x.i(e,s,0|n,t.slice(0,t.length-1))},h(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+x.o(n)},l(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,s.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=x.u(e,t[n-1]&2147483648>>e-1,1)),t},u:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,o:t=>s.round(t/1099511627776)||32,i(t,e,n,s){for(void 0===s&&(s=[]);e>=32;e-=32)s.push(n),n=0;if(0===e)return s.concat(t);for(let r=0;r<t.length;r++)s.push(n|t[r]>>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,o=x.o(r);return s.push(x.u(e+o&31,e+o>32?n:s.pop(),1)),s}},I={bytes:{p(t){const e=x.h(t)/8,n=new o(e);let s;for(let r=0;e>r;r++)3&r||(s=t[r/4]),n[r]=s>>>24,s<<=8;return n},m(t){const e=[];let n,s=0;for(n=0;n<t.length;n++)s=s<<8|t[n],3&~n||(e.push(s),s=0);return 3&n&&e.push(x.u(8*(3&n),s)),e}}},R=class{constructor(t){const e=this;e.blockSize=512,e.S=[1732584193,4023233417,2562383102,271733878,3285377520],e.v=[1518500249,1859775393,2400959708,3395469782],t?(e.k=t.k.slice(0),e.C=t.C.slice(0),e.A=t.A):e.reset()}reset(){const t=this;return t.k=t.S.slice(0),t.C=[],t.A=0,t}update(t){const e=this;"string"==typeof t&&(t=I.I.m(t));const n=e.C=x.concat(e.C,t),s=e.A,o=e.A=s+x.h(t);if(o>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const i=new c(n);let a=0;for(let t=e.blockSize+s-(e.blockSize+s&e.blockSize-1);o>=t;t+=e.blockSize)e.R(i.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),e}P(){const t=this;let e=t.C;const n=t.k;e=x.concat(e,[x.u(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(s.floor(t.A/4294967296)),e.push(0|t.A);e.length;)t.R(e.splice(0,16));return t.reset(),n}U(t,e,n,s){return t>19?t>39?t>59?t>79?void 0:e^n^s:e&n|e&s|n&s:e^n^s:e&n|~e&s}V(t,e){return e<<t|e>>>32-t}R(e){const n=this,r=n.k,o=t(80);for(let t=0;16>t;t++)o[t]=e[t];let i=r[0],c=r[1],a=r[2],h=r[3],f=r[4];for(let t=0;79>=t;t++){16>t||(o[t]=n.V(1,o[t-3]^o[t-8]^o[t-14]^o[t-16]));const e=n.V(5,i)+n.U(t,c,a,h)+f+o[t]+n.v[s.floor(t/20)]|0;f=h,h=a,a=n.V(30,c),c=i,i=e}r[0]=r[0]+i|0,r[1]=r[1]+c|0,r[2]=r[2]+a|0,r[3]=r[3]+h|0,r[4]=r[4]+f|0}},P={getRandomValues(t){const e=new c(t.buffer),n=t=>{let e=987654321;const n=4294967295;return()=>(e=36969*(65535&e)+(e>>16)&n,(((e<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let r,o=0;o<t.length;o+=4){const t=n(4294967296*(r||s.random()));r=987654071*t(),e[o/4]=4294967296*t()|0}return t}},U={importKey:t=>new U.M(I.bytes.m(t)),_(t,e,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const o=1+(s>>5)<<2;let i,c,a,h,l;const u=new ArrayBuffer(o),w=new f(u);let p=0;const d=x;for(e=I.bytes.m(e),l=1;(o||1)>p;l++){for(i=c=t.encrypt(d.concat(e,[l])),a=1;n>a;a++)for(c=t.encrypt(c),h=0;h<c.length;h++)i[h]^=c[h];for(a=0;(o||1)>p&&a<i.length;a++)w.setInt32(p,i[a]),p+=4}return u.slice(0,s/8)},M:class{constructor(t){const e=this,n=e.B=R,s=[[],[]];e.D=[new n,new n];const r=e.D[0].blockSize/32;t.length>r&&(t=(new n).update(t).P());for(let e=0;r>e;e++)s[0][e]=909522486^t[e],s[1][e]=1549556828^t[e];e.D[0].update(s[0]),e.D[1].update(s[1]),e.W=new n(e.D[0])}reset(){const t=this;t.W=new t.B(t.D[0]),t.K=!1}update(t){this.K=!0,this.W.update(t)}digest(){const t=this,e=t.W.P(),n=new t.B(t.D[1]).update(e).P();return t.reset(),n}encrypt(t){if(this.K)throw new r("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},V=typeof w!=v&&typeof w.getRandomValues==k,M="Invalid password",_="Invalid signature",B="zipjs-abort-check-password";function D(t){return V?w.getRandomValues(t):P.getRandomValues(t)}const W=16,K={name:"PBKDF2"},E=e.assign({hash:{name:"HMAC"}},K),L=e.assign({iterations:1e3,hash:{name:"SHA-1"}},K),O=["deriveBits"],T=[8,12,16],j=[16,24,32],H=10,Z=[0,0,0,0],F=typeof w!=v,N=F&&w.subtle,q=F&&typeof N!=v,G=I.bytes,J=class{constructor(t){const e=this;e.L=[[[],[],[],[],[]],[[],[],[],[],[]]],e.L[0][0][0]||e.O();const n=e.L[0][4],s=e.L[1],o=t.length;let i,c,a,h=1;if(4!==o&&6!==o&&8!==o)throw new r("invalid aes key size");for(e.v=[c=t.slice(0),a=[]],i=o;4*o+28>i;i++){let t=c[i-1];(i%o===0||8===o&&i%o===4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],i%o===0&&(t=t<<8^t>>>24^h<<24,h=h<<1^283*(h>>7))),c[i]=c[i-o]^t}for(let t=0;i;t++,i--){const e=c[3&t?i:i-4];a[t]=4>=i||4>t?e:s[0][n[e>>>24]]^s[1][n[e>>16&255]]^s[2][n[e>>8&255]]^s[3][n[255&e]]}}encrypt(t){return this.T(t,0)}decrypt(t){return this.T(t,1)}O(){const t=this.L[0],e=this.L[1],n=t[4],s=e[4],r=[],o=[];let i,c,a,h;for(let t=0;256>t;t++)o[(r[t]=t<<1^283*(t>>7))^t]=t;for(let f=i=0;!n[f];f^=c||1,i=o[i]||1){let o=i^i<<1^i<<2^i<<3^i<<4;o=o>>8^255&o^99,n[f]=o,s[o]=f,h=r[a=r[c=r[f]]];let l=16843009*h^65537*a^257*c^16843008*f,u=257*r[o]^16843008*o;for(let n=0;4>n;n++)t[n][f]=u=u<<24^u>>>8,e[n][o]=l=l<<24^l>>>8}for(let n=0;5>n;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}T(t,e){if(4!==t.length)throw new r("invalid aes block size");const n=this.v[e],s=n.length/4-2,o=[0,0,0,0],i=this.L[e],c=i[0],a=i[1],h=i[2],f=i[3],l=i[4];let u,w,p,d=t[0]^n[0],y=t[e?3:1]^n[1],m=t[2]^n[2],g=t[e?1:3]^n[3],S=4;for(let t=0;s>t;t++)u=c[d>>>24]^a[y>>16&255]^h[m>>8&255]^f[255&g]^n[S],w=c[y>>>24]^a[m>>16&255]^h[g>>8&255]^f[255&d]^n[S+1],p=c[m>>>24]^a[g>>16&255]^h[d>>8&255]^f[255&y]^n[S+2],g=c[g>>>24]^a[d>>16&255]^h[y>>8&255]^f[255&m]^n[S+3],S+=4,d=u,y=w,m=p;for(let t=0;4>t;t++)o[e?3&-t:t]=l[d>>>24]<<24^l[y>>16&255]<<16^l[m>>8&255]<<8^l[255&g]^n[S++],u=d,d=y,y=m,m=g,g=u;return o}},Q=class{constructor(t,e){this.j=t,this.H=e,this.Z=e}reset(){this.Z=this.H}update(t){return this.F(this.j,t,this.Z)}N(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,n=t>>8&255,s=255&t;255===e?(e=0,255===n?(n=0,255===s?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}return t}q(t){0===(t[0]=this.N(t[0]))&&(t[1]=this.N(t[1]))}F(t,e,n){let s;if(!(s=e.length))return[];const r=x.h(e);for(let r=0;s>r;r+=4){this.q(n);const s=t.encrypt(n);e[r]^=s[0],e[r+1]^=s[1],e[r+2]^=s[2],e[r+3]^=s[3]}return x.l(e,r)}},X=U.M;let Y=F&&q&&typeof N.importKey==k,$=F&&q&&typeof N.deriveBits==k;class tt extends d{constructor({password:t,rawPassword:n,signed:s,encryptionStrength:i,checkPasswordOnly:c}){super({start(){e.assign(this,{ready:new l(t=>this.G=t),password:rt(t,n),signed:s,J:i-1,pending:new o})},async transform(t,e){const n=this,{password:s,J:i,G:a,ready:h}=n;s?(await(async(t,e,n,s)=>{const o=await st(t,e,n,it(s,0,T[e])),i=it(s,T[e]);if(o[0]!=i[0]||o[1]!=i[1])throw new r(M)})(n,i,s,it(t,0,T[i]+2)),t=it(t,T[i]+2),c?e.error(new r(B)):a()):await h;const f=new o(t.length-H-(t.length-H)%W);e.enqueue(nt(n,t,f,0,H,!0))},async flush(t){const{signed:e,X:n,Y:s,pending:i,ready:c}=this;if(s&&n){await c;const a=it(i,0,i.length-H),h=it(i,i.length-H);let f=new o;if(a.length){const t=at(G,a);s.update(t);const e=n.update(t);f=ct(G,e)}if(e){const t=it(ct(G,s.digest()),0,H);for(let e=0;H>e;e++)if(t[e]!=h[e])throw new r(_)}t.enqueue(f)}}})}}class et extends d{constructor({password:t,rawPassword:n,encryptionStrength:s}){let r;super({start(){e.assign(this,{ready:new l(t=>this.G=t),password:rt(t,n),J:s-1,pending:new o})},async transform(t,e){const n=this,{password:s,J:r,G:i,ready:c}=n;let a=new o;s?(a=await(async(t,e,n)=>{const s=D(new o(T[e]));return ot(s,await st(t,e,n,s))})(n,r,s),i()):await c;const h=new o(a.length+t.length-t.length%W);h.set(a,0),e.enqueue(nt(n,t,h,a.length,0))},async flush(t){const{X:e,Y:n,pending:s,ready:i}=this;if(n&&e){await i;let c=new o;if(s.length){const t=e.update(at(G,s));n.update(t),c=ct(G,t)}r.signature=ct(G,n.digest()).slice(0,H),t.enqueue(ot(c,r.signature))}}}),r=this}}function nt(t,e,n,s,r,i){const{X:c,Y:a,pending:h}=t,f=e.length-r;let l;for(h.length&&(e=ot(h,e),n=((t,e)=>{if(e&&e>t.length){const n=t;(t=new o(e)).set(n,0)}return t})(n,f-f%W)),l=0;f-W>=l;l+=W){const t=at(G,it(e,l,l+W));i&&a.update(t);const r=c.update(t);i||a.update(r),n.set(ct(G,r),l+s)}return t.pending=it(e,l),n}async function st(n,s,r,i){n.password=null;const c=await(async(t,e,n,s,r)=>{if(!Y)return U.importKey(e);try{return await N.importKey("raw",e,n,!1,r)}catch{return Y=!1,U.importKey(e)}})(0,r,E,0,O),a=await(async(t,e,n)=>{if(!$)return U._(e,t.salt,L.iterations,n);try{return await N.deriveBits(t,e,n)}catch{return $=!1,U._(e,t.salt,L.iterations,n)}})(e.assign({salt:i},L),c,8*(2*j[s]+2)),h=new o(a),f=at(G,it(h,0,j[s])),l=at(G,it(h,j[s],2*j[s])),u=it(h,2*j[s]);return e.assign(n,{keys:{key:f,$:l,passwordVerification:u},X:new Q(new J(f),t.from(Z)),Y:new X(l)}),u}function rt(t,e){return e===b?(t=>{if(typeof u==v){const e=new o((t=unescape(encodeURIComponent(t))).length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new u).encode(t)})(t):e}function ot(t,e){let n=t;return t.length+e.length&&(n=new o(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function it(t,e,n){return t.subarray(e,n)}function ct(t,e){return t.p(e)}function at(t,e){return t.m(e)}class ht extends d{constructor({password:t,passwordVerification:n,checkPasswordOnly:s}){super({start(){e.assign(this,{password:t,passwordVerification:n}),wt(this,t)},transform(t,e){const n=this;if(n.password){const e=lt(n,t.subarray(0,12));if(n.password=null,e.at(-1)!=n.passwordVerification)throw new r(M);t=t.subarray(12)}s?e.error(new r(B)):e.enqueue(lt(n,t))}})}}class ft extends d{constructor({password:t,passwordVerification:n}){super({start(){e.assign(this,{password:t,passwordVerification:n}),wt(this,t)},transform(t,e){const n=this;let s,r;if(n.password){n.password=null;const e=D(new o(12));e[11]=n.passwordVerification,s=new o(t.length+e.length),s.set(ut(n,e),0),r=12}else s=new o(t.length),r=0;s.set(ut(n,t),r),e.enqueue(s)}})}}function lt(t,e){const n=new o(e.length);for(let s=0;s<e.length;s++)n[s]=dt(t)^e[s],pt(t,n[s]);return n}function ut(t,e){const n=new o(e.length);for(let s=0;s<e.length;s++)n[s]=dt(t)^e[s],pt(t,e[s]);return n}function wt(t,n){const s=[305419896,591751049,878082192];e.assign(t,{keys:s,tt:new C(s[0]),et:new C(s[2])});for(let e=0;e<n.length;e++)pt(t,n.charCodeAt(e))}function pt(t,e){let[n,r,o]=t.keys;t.tt.append([e]),n=~t.tt.get(),r=mt(s.imul(mt(r+yt(n)),134775813)+1),t.et.append([r>>>24]),o=~t.et.get(),t.keys=[n,r,o]}function dt(t){const e=2|t.keys[2];return yt(s.imul(e,1^e)>>>8)}function yt(t){return 255&t}function mt(t){return 4294967295&t}class gt extends d{constructor(t,{chunkSize:e,nt:n,CompressionStream:s}){super({});const{compressed:r,encrypted:o,useCompressionStream:i,zipCrypto:c,signed:a,level:h}=t,l=this;let u,w,p=super.readable;o&&!c||!a||(u=new A,p=kt(p,u)),r&&(p=vt(p,i,{level:h,chunkSize:e},s,n,s)),o&&(c?p=kt(p,new ft(t)):(w=new et(t),p=kt(p,w))),bt(l,p,()=>{let t;o&&!c&&(t=w.signature),o&&!c||!a||(t=new f(u.value.buffer).getUint32(0)),l.signature=t})}}class St extends d{constructor(t,{chunkSize:e,st:n,DecompressionStream:s}){super({});const{zipCrypto:o,encrypted:i,signed:c,signature:a,compressed:h,useCompressionStream:l,rt:u}=t;let w,p,d=super.readable;i&&(o?d=kt(d,new ht(t)):(p=new tt(t),d=kt(d,p))),h&&(d=vt(d,l,{chunkSize:e,rt:u},s,n,s)),i&&!o||!c||(w=new A,d=kt(d,w)),bt(this,d,()=>{if((!i||o)&&c){const t=new f(w.value.buffer);if(a!=t.getUint32(0,!1))throw new r(_)}})}}function bt(t,n,s){n=kt(n,new d({flush:s})),e.defineProperty(t,"readable",{get:()=>n})}function vt(t,e,n,s,r,o){const i=e&&s?s:r||o,c=n.rt?"deflate64-raw":"deflate-raw";try{t=kt(t,new i(c,n))}catch(s){if(!e)throw s;if(r)t=kt(t,new r(c,n));else{if(!o)throw s;t=kt(t,new o(c,n))}}return t}function kt(t,e){return t.pipeThrough(e)}const zt="data",Ct="close";class At extends d{constructor(t,n){super({});const s=this,{codecType:o}=t;let i;o.startsWith("deflate")?i=gt:o.startsWith("inflate")&&(i=St),s.outputSize=0;let c=0;const a=new i(t,n),h=super.readable,f=new d({transform(t,e){t&&t.length&&(c+=t.length,e.enqueue(t))},flush(){e.assign(s,{inputSize:c})}}),l=new d({transform(e,n){if(e&&e.length&&(n.enqueue(e),s.outputSize+=e.length,t.outputSize!==b&&s.outputSize>t.outputSize))throw new r("Invalid uncompressed size")},flush(){const{signature:t}=a;e.assign(s,{signature:t,inputSize:c})}});e.defineProperty(s,"readable",{get:()=>h.pipeThrough(f).pipeThrough(a).pipeThrough(l)})}}class xt extends d{constructor(t){let e;super({transform:function n(s,r){if(e){const t=new o(e.length+s.length);t.set(e),t.set(s,e.length),s=t,e=null}s.length>t?(r.enqueue(s.slice(0,t)),n(s.slice(t),r)):e=s},flush(t){e&&e.length&&t.enqueue(e)}})}}const It=new h,Rt=new h;let Pt,Ut,Vt,Mt,_t,Bt=0;async function Dt(t){try{const{options:e,config:s}=t;if(!e.useCompressionStream)try{await self.initModule(t.config)}catch{e.useCompressionStream=!0}s.CompressionStream=self.CompressionStream,s.DecompressionStream=self.DecompressionStream;const r={highWaterMark:1},o=t.readable||new y({async pull(t){const e=new l(t=>It.set(Bt,t));Wt({type:"pull",messageId:Bt}),Bt=(Bt+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await e;t.enqueue(s),r&&t.close()}},r),i=t.writable||new m({async write(t){let e;const s=new l(t=>e=t);Rt.set(Bt,e),Wt({type:zt,value:t,messageId:Bt}),Bt=(Bt+1)%n.MAX_SAFE_INTEGER,await s}},r),c=new At(e,s);Pt=new AbortController;const{signal:a}=Pt;await o.pipeThrough(c).pipeThrough(new xt(s.chunkSize)).pipeTo(i,{signal:a,preventClose:!0,preventAbort:!0}),await i.getWriter().close();const{signature:h,inputSize:f,outputSize:u}=c;Wt({type:Ct,result:{signature:h,inputSize:f,outputSize:u}})}catch(t){t.outputSize=0,Kt(t)}}function Wt(t){let{value:e}=t;if(e)if(e.length)try{e=new o(e),t.value=e.buffer,p(t,[t.value])}catch{p(t)}else p(t);else p(t)}function Kt(t=new r("Unknown error")){const{message:e,stack:n,code:s,name:o,outputSize:i}=t;p({error:{message:e,stack:n,code:s,name:o,outputSize:i}})}function Et(t,e,n={}){const i="number"==typeof n.level?n.level:-1,c="number"==typeof n.ot?n.ot:65536,a="number"==typeof n.it?n.it:65536;return new d({start(){let n;if(this.ct=Vt(c),this.in=Vt(a),this.it=a,this.ht=new o(c),t?(this.ft=Ut.deflate_process,this.lt=Ut.deflate_last_consumed,this.ut=Ut.deflate_end,this.wt=Ut.deflate_new(),n="gzip"===e?Ut.deflate_init_gzip(this.wt,i):"deflate-raw"===e?Ut.deflate_init_raw(this.wt,i):Ut.deflate_init(this.wt,i)):"deflate64-raw"===e?(this.ft=Ut.inflate9_process,this.lt=Ut.inflate9_last_consumed,this.ut=Ut.inflate9_end,this.wt=Ut.inflate9_new(),n=Ut.inflate9_init_raw(this.wt)):(this.ft=Ut.inflate_process,this.lt=Ut.inflate_last_consumed,this.ut=Ut.inflate_end,this.wt=Ut.inflate_new(),n="deflate-raw"===e?Ut.inflate_init_raw(this.wt):"gzip"===e?Ut.inflate_init_gzip(this.wt):Ut.inflate_init(this.wt)),0!==n)throw new r("init failed:"+n)},transform(e,n){try{const i=e,a=new o(_t.buffer),h=this.ft,f=this.lt,l=this.ct,u=this.ht;let w=0;for(;w<i.length;){const e=s.min(i.length-w,32768);this.in&&this.it>=e||(this.in&&Mt&&Mt(this.in),this.in=Vt(e),this.it=e),a.set(i.subarray(w,w+e),this.in);const o=h(this.wt,this.in,e,l,c,0),p=16777215&o;if(p&&(u.set(a.subarray(l,l+p),0),n.enqueue(u.slice(0,p))),!t){const t=o>>24&255,e=128&t?t-256:t;if(0>e)throw new r("process error:"+e)}const d=f(this.wt);if(0===d)break;w+=d}}catch(t){this.ut&&this.wt&&this.ut(this.wt),this.in&&Mt&&Mt(this.in),this.ct&&Mt&&Mt(this.ct),n.error(t)}},flush(e){try{const n=new o(_t.buffer),s=this.ft,i=this.ct,a=this.ht;for(;;){const o=s(this.wt,0,0,i,c,4),h=16777215&o,f=o>>24&255;if(!t){const t=128&f?f-256:f;if(0>t)throw new r("process error:"+t)}if(h&&(a.set(n.subarray(i,i+h),0),e.enqueue(a.slice(0,h))),1===f||0===h)break}}catch(t){e.error(t)}finally{if(this.ut&&this.wt){const t=this.ut(this.wt);0!==t&&e.error(new r("end error:"+t))}this.in&&Mt&&Mt(this.in),this.ct&&Mt&&Mt(this.ct)}}})}addEventListener("message",({data:t})=>{const{type:e,messageId:n,value:s,done:r}=t;try{if("start"==e&&Dt(t),e==zt){const t=It.get(n);It.delete(n),t({value:new o(s),done:r})}if("ack"==e){const t=Rt.get(n);Rt.delete(n),t()}e==Ct&&Pt.abort()}catch(t){Kt(t)}});class Lt{constructor(t="deflate",e){return Et(!0,t,e)}}class Ot{constructor(t="deflate",e){return Et(!1,t,e)}}let Tt=!1;self.initModule=async t=>{try{const e=await(async(t,{baseURI:e})=>{if(!Tt){let n,s;try{try{s=new URL(t,e)}catch{}const r=await fetch(s);n=await r.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;n=(t=>{const e=t.split(",")[1],n=atob(e),s=n.length,r=new o(s);for(let t=0;s>t;++t)r[t]=n.charCodeAt(t);return r.buffer})(t)}(t=>{if(Ut=t,({malloc:Vt,free:Mt,memory:_t}=Ut),"function"!=typeof Vt||"function"!=typeof Mt||!_t)throw Ut=Vt=Mt=_t=null,new r("Invalid WASM module")})((await WebAssembly.instantiate(n)).instance.exports),Tt=!0}})(t.wasmURI,t);return t.nt=Lt,t.st=Ot,e}catch{}}});
13
- `)),e)})}const vo=[];for(let i=0;i<256;i++){let e=i;for(let t=0;t<8;t++)e&1?e=e>>>1^3988292384:e=e>>>1;vo[i]=e}class Oi{constructor(e){this.crc=e||-1}append(e){let t=this.crc|0;for(let n=0,s=e.length|0;n<s;n++)t=t>>>8^vo[(t^e[n])&255];this.crc=t}get(){return~this.crc}}class Io extends TransformStream{constructor(){let e;const t=new Oi;super({transform(n,s){t.append(n),s.enqueue(n)},flush(){const n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function hu(i){if(typeof TextEncoder==nt){i=unescape(encodeURIComponent(i));const e=new Uint8Array(i.length);for(let t=0;t<e.length;t++)e[t]=i.charCodeAt(t);return e}else return new TextEncoder().encode(i)}const De={concat(i,e){if(i.length===0||e.length===0)return i.concat(e);const t=i[i.length-1],n=De.getPartial(t);return n===32?i.concat(e):De._shiftRight(e,n,t|0,i.slice(0,i.length-1))},bitLength(i){const e=i.length;if(e===0)return 0;const t=i[e-1];return(e-1)*32+De.getPartial(t)},clamp(i,e){if(i.length*32<e)return i;i=i.slice(0,Math.ceil(e/32));const t=i.length;return e=e&31,t>0&&e&&(i[t-1]=De.partial(e,i[t-1]&2147483648>>e-1,1)),i},partial(i,e,t){return i===32?e:(t?e|0:e<<32-i)+i*1099511627776},getPartial(i){return Math.round(i/1099511627776)||32},_shiftRight(i,e,t,n){for(n===void 0&&(n=[]);e>=32;e-=32)n.push(t),t=0;if(e===0)return n.concat(i);for(let r=0;r<i.length;r++)n.push(t|i[r]>>>e),t=i[r]<<32-e;const s=i.length?i[i.length-1]:0,o=De.getPartial(s);return n.push(De.partial(e+o&31,e+o>32?t:n.pop(),1)),n}},Li={bytes:{fromBits(i){const t=De.bitLength(i)/8,n=new Uint8Array(t);let s;for(let o=0;o<t;o++)(o&3)===0&&(s=i[o/4]),n[o]=s>>>24,s<<=8;return n},toBits(i){const e=[];let t,n=0;for(t=0;t<i.length;t++)n=n<<8|i[t],(t&3)===3&&(e.push(n),n=0);return t&3&&e.push(De.partial(8*(t&3),n)),e}}},Bo={};Bo.sha1=class{constructor(i){const e=this;e.blockSize=512,e._init=[1732584193,4023233417,2562383102,271733878,3285377520],e._key=[1518500249,1859775393,2400959708,3395469782],i?(e._h=i._h.slice(0),e._buffer=i._buffer.slice(0),e._length=i._length):e.reset()}reset(){const i=this;return i._h=i._init.slice(0),i._buffer=[],i._length=0,i}update(i){const e=this;typeof i=="string"&&(i=Li.utf8String.toBits(i));const t=e._buffer=De.concat(e._buffer,i),n=e._length,s=e._length=n+De.bitLength(i);if(s>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const o=new Uint32Array(t);let r=0;for(let l=e.blockSize+n-(e.blockSize+n&e.blockSize-1);l<=s;l+=e.blockSize)e._block(o.subarray(16*r,16*(r+1))),r+=1;return t.splice(0,16*r),e}finalize(){const i=this;let e=i._buffer;const t=i._h;e=De.concat(e,[De.partial(1,1)]);for(let n=e.length+2;n&15;n++)e.push(0);for(e.push(Math.floor(i._length/4294967296)),e.push(i._length|0);e.length;)i._block(e.splice(0,16));return i.reset(),t}_f(i,e,t,n){if(i<=19)return e&t|~e&n;if(i<=39)return e^t^n;if(i<=59)return e&t|e&n|t&n;if(i<=79)return e^t^n}_S(i,e){return e<<i|e>>>32-i}_block(i){const e=this,t=e._h,n=Array(80);for(let d=0;d<16;d++)n[d]=i[d];let s=t[0],o=t[1],r=t[2],l=t[3],a=t[4];for(let d=0;d<=79;d++){d>=16&&(n[d]=e._S(1,n[d-3]^n[d-8]^n[d-14]^n[d-16]));const h=e._S(5,s)+e._f(d,o,r,l)+a+n[d]+e._key[Math.floor(d/20)]|0;a=l,l=r,r=e._S(30,o),o=s,s=h}t[0]=t[0]+s|0,t[1]=t[1]+o|0,t[2]=t[2]+r|0,t[3]=t[3]+l|0,t[4]=t[4]+a|0}};const xo={};xo.aes=class{constructor(i){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const t=e._tables[0][4],n=e._tables[1],s=i.length;let o,r,l,a=1;if(s!==4&&s!==6&&s!==8)throw new Error("invalid aes key size");for(e._key=[r=i.slice(0),l=[]],o=s;o<4*s+28;o++){let d=r[o-1];(o%s===0||s===8&&o%s===4)&&(d=t[d>>>24]<<24^t[d>>16&255]<<16^t[d>>8&255]<<8^t[d&255],o%s===0&&(d=d<<8^d>>>24^a<<24,a=a<<1^(a>>7)*283)),r[o]=r[o-s]^d}for(let d=0;o;d++,o--){const h=r[d&3?o:o-4];o<=4||d<4?l[d]=h:l[d]=n[0][t[h>>>24]]^n[1][t[h>>16&255]]^n[2][t[h>>8&255]]^n[3][t[h&255]]}}encrypt(i){return this._crypt(i,0)}decrypt(i){return this._crypt(i,1)}_precompute(){const i=this._tables[0],e=this._tables[1],t=i[4],n=e[4],s=[],o=[];let r,l,a,d;for(let h=0;h<256;h++)o[(s[h]=h<<1^(h>>7)*283)^h]=h;for(let h=r=0;!t[h];h^=l||1,r=o[r]||1){let p=r^r<<1^r<<2^r<<3^r<<4;p=p>>8^p&255^99,t[h]=p,n[p]=h,d=s[a=s[l=s[h]]];let f=d*16843009^a*65537^l*257^h*16843008,u=s[p]*257^p*16843008;for(let m=0;m<4;m++)i[m][h]=u=u<<24^u>>>8,e[m][p]=f=f<<24^f>>>8}for(let h=0;h<5;h++)i[h]=i[h].slice(0),e[h]=e[h].slice(0)}_crypt(i,e){if(i.length!==4)throw new Error("invalid aes block size");const t=this._key[e],n=t.length/4-2,s=[0,0,0,0],o=this._tables[e],r=o[0],l=o[1],a=o[2],d=o[3],h=o[4];let p=i[0]^t[0],f=i[e?3:1]^t[1],u=i[2]^t[2],m=i[e?1:3]^t[3],E=4,A,C,v;for(let S=0;S<n;S++)A=r[p>>>24]^l[f>>16&255]^a[u>>8&255]^d[m&255]^t[E],C=r[f>>>24]^l[u>>16&255]^a[m>>8&255]^d[p&255]^t[E+1],v=r[u>>>24]^l[m>>16&255]^a[p>>8&255]^d[f&255]^t[E+2],m=r[m>>>24]^l[p>>16&255]^a[f>>8&255]^d[u&255]^t[E+3],E+=4,p=A,f=C,u=v;for(let S=0;S<4;S++)s[e?3&-S:S]=h[p>>>24]<<24^h[f>>16&255]<<16^h[u>>8&255]<<8^h[m&255]^t[E++],A=p,p=f,f=u,u=m,m=A;return s}};const uu={getRandomValues(i){const e=new Uint32Array(i.buffer),t=n=>{let s=987654321;const o=4294967295;return function(){return s=36969*(s&65535)+(s>>16)&o,n=18e3*(n&65535)+(n>>16)&o,(((s<<16)+n&o)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let n=0,s;n<i.length;n+=4){const o=t((s||Math.random())*4294967296);s=o()*987654071,e[n/4]=o()*4294967296|0}return i}},So={};So.ctrGladman=class{constructor(i,e){this._prf=i,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(i){return this.calculate(this._prf,i,this._iv)}incWord(i){if((i>>24&255)===255){let e=i>>16&255,t=i>>8&255,n=i&255;e===255?(e=0,t===255?(t=0,n===255?n=0:++n):++t):++e,i=0,i+=e<<16,i+=t<<8,i+=n}else i+=1<<24;return i}incCounter(i){(i[0]=this.incWord(i[0]))===0&&(i[1]=this.incWord(i[1]))}calculate(i,e,t){let n;if(!(n=e.length))return[];const s=De.bitLength(e);for(let o=0;o<n;o+=4){this.incCounter(t);const r=i.encrypt(t);e[o]^=r[0],e[o+1]^=r[1],e[o+2]^=r[2],e[o+3]^=r[3]}return De.clamp(e,s)}};const Ct={importKey(i){return new Ct.hmacSha1(Li.bytes.toBits(i))},pbkdf2(i,e,t,n){if(t=t||1e4,n<0||t<0)throw new Error("invalid params to pbkdf2");const s=(n>>5)+1<<2;let o,r,l,a,d;const h=new ArrayBuffer(s),p=new DataView(h);let f=0;const u=De;for(e=Li.bytes.toBits(e),d=1;f<(s||1);d++){for(o=r=i.encrypt(u.concat(e,[d])),l=1;l<t;l++)for(r=i.encrypt(r),a=0;a<r.length;a++)o[a]^=r[a];for(l=0;f<(s||1)&&l<o.length;l++)p.setInt32(f,o[l]),f+=4}return h.slice(0,n/8)}};Ct.hmacSha1=class{constructor(i){const e=this,t=e._hash=Bo.sha1,n=[[],[]];e._baseHash=[new t,new t];const s=e._baseHash[0].blockSize/32;i.length>s&&(i=new t().update(i).finalize());for(let o=0;o<s;o++)n[0][o]=i[o]^909522486,n[1][o]=i[o]^1549556828;e._baseHash[0].update(n[0]),e._baseHash[1].update(n[1]),e._resultHash=new t(e._baseHash[0])}reset(){const i=this;i._resultHash=new i._hash(i._baseHash[0]),i._updated=!1}update(i){const e=this;e._updated=!0,e._resultHash.update(i)}digest(){const i=this,e=i._resultHash.finalize(),t=new i._hash(i._baseHash[1]).update(e).finalize();return i.reset(),t}encrypt(i){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(i),this.digest(i)}};const fu=typeof crypto!=nt&&typeof crypto.getRandomValues==yt,To="Invalid password",Mo="Invalid signature",Gn="zipjs-abort-check-password";function Do(i){return fu?crypto.getRandomValues(i):uu.getRandomValues(i)}const Lt=16,pu="raw",ko={name:"PBKDF2"},gu={name:"HMAC"},mu="SHA-1",Au=Object.assign({hash:gu},ko),Hn=Object.assign({iterations:1e3,hash:{name:mu}},ko),yu=["deriveBits"],Zt=[8,12,16],ei=[16,24,32],st=10,Cu=[0,0,0,0],Ni=typeof crypto!=nt,ti=Ni&&crypto.subtle,Po=Ni&&typeof ti!=nt,We=Li.bytes,Eu=xo.aes,wu=So.ctrGladman,bu=Ct.hmacSha1;let Fo=Ni&&Po&&typeof ti.importKey==yt,Ro=Ni&&Po&&typeof ti.deriveBits==yt;class vu extends TransformStream{constructor({password:e,rawPassword:t,signed:n,encryptionStrength:s,checkPasswordOnly:o}){super({start(){Object.assign(this,{ready:new Promise(r=>this.resolveReady=r),password:No(e,t),signed:n,strength:s-1,pending:new Uint8Array})},async transform(r,l){const a=this,{password:d,strength:h,resolveReady:p,ready:f}=a;d?(await Bu(a,h,d,Le(r,0,Zt[h]+2)),r=Le(r,Zt[h]+2),o?l.error(new Error(Gn)):p()):await f;const u=new Uint8Array(r.length-st-(r.length-st)%Lt);l.enqueue(Oo(a,r,u,0,st,!0))},async flush(r){const{signed:l,ctr:a,hmac:d,pending:h,ready:p}=this;if(d&&a){await p;const f=Le(h,0,h.length-st),u=Le(h,h.length-st);let m=new Uint8Array;if(f.length){const E=ni(We,f);d.update(E);const A=a.update(E);m=ii(We,A)}if(l){const E=Le(ii(We,d.digest()),0,st);for(let A=0;A<st;A++)if(E[A]!=u[A])throw new Error(Mo)}r.enqueue(m)}}})}}class Iu extends TransformStream{constructor({password:e,rawPassword:t,encryptionStrength:n}){let s;super({start(){Object.assign(this,{ready:new Promise(o=>this.resolveReady=o),password:No(e,t),strength:n-1,pending:new Uint8Array})},async transform(o,r){const l=this,{password:a,strength:d,resolveReady:h,ready:p}=l;let f=new Uint8Array;a?(f=await xu(l,d,a),h()):await p;const u=new Uint8Array(f.length+o.length-o.length%Lt);u.set(f,0),r.enqueue(Oo(l,o,u,f.length,0))},async flush(o){const{ctr:r,hmac:l,pending:a,ready:d}=this;if(l&&r){await d;let h=new Uint8Array;if(a.length){const p=r.update(ni(We,a));l.update(p),h=ii(We,p)}s.signature=ii(We,l.digest()).slice(0,st),o.enqueue(Yn(h,s.signature))}}}),s=this}}function Oo(i,e,t,n,s,o){const{ctr:r,hmac:l,pending:a}=i,d=e.length-s;a.length&&(e=Yn(a,e),t=Mu(t,d-d%Lt));let h;for(h=0;h<=d-Lt;h+=Lt){const p=ni(We,Le(e,h,h+Lt));o&&l.update(p);const f=r.update(p);o||l.update(f),t.set(ii(We,f),h+n)}return i.pending=Le(e,h),t}async function Bu(i,e,t,n){const s=await Lo(i,e,t,Le(n,0,Zt[e])),o=Le(n,Zt[e]);if(s[0]!=o[0]||s[1]!=o[1])throw new Error(To)}async function xu(i,e,t){const n=Do(new Uint8Array(Zt[e])),s=await Lo(i,e,t,n);return Yn(n,s)}async function Lo(i,e,t,n){i.password=null;const s=await Su(pu,t,Au,!1,yu),o=await Tu(Object.assign({salt:n},Hn),s,8*(ei[e]*2+2)),r=new Uint8Array(o),l=ni(We,Le(r,0,ei[e])),a=ni(We,Le(r,ei[e],ei[e]*2)),d=Le(r,ei[e]*2);return Object.assign(i,{keys:{key:l,authentication:a,passwordVerification:d},ctr:new wu(new Eu(l),Array.from(Cu)),hmac:new bu(a)}),d}async function Su(i,e,t,n,s){if(Fo)try{return await ti.importKey(i,e,t,n,s)}catch{return Fo=!1,Ct.importKey(e)}else return Ct.importKey(e)}async function Tu(i,e,t){if(Ro)try{return await ti.deriveBits(i,e,t)}catch{return Ro=!1,Ct.pbkdf2(e,i.salt,Hn.iterations,t)}else return Ct.pbkdf2(e,i.salt,Hn.iterations,t)}function No(i,e){return e===he?hu(i):e}function Yn(i,e){let t=i;return i.length+e.length&&(t=new Uint8Array(i.length+e.length),t.set(i,0),t.set(e,i.length)),t}function Mu(i,e){if(e&&e>i.length){const t=i;i=new Uint8Array(e),i.set(t,0)}return i}function Le(i,e,t){return i.subarray(e,t)}function ii(i,e){return i.fromBits(e)}function ni(i,e){return i.toBits(e)}const si=12;class Du extends TransformStream{constructor({password:e,passwordVerification:t,checkPasswordOnly:n}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),Qo(this,e)},transform(s,o){const r=this;if(r.password){const l=Uo(r,s.subarray(0,si));if(r.password=null,l.at(-1)!=r.passwordVerification)throw new Error(To);s=s.subarray(si)}n?o.error(new Error(Gn)):o.enqueue(Uo(r,s))}})}}class ku extends TransformStream{constructor({password:e,passwordVerification:t}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),Qo(this,e)},transform(n,s){const o=this;let r,l;if(o.password){o.password=null;const a=Do(new Uint8Array(si));a[si-1]=o.passwordVerification,r=new Uint8Array(n.length+a.length),r.set(_o(o,a),0),l=si}else r=new Uint8Array(n.length),l=0;r.set(_o(o,n),l),s.enqueue(r)}})}}function Uo(i,e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=Go(i)^e[n],Vn(i,t[n]);return t}function _o(i,e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=Go(i)^e[n],Vn(i,e[n]);return t}function Qo(i,e){const t=[305419896,591751049,878082192];Object.assign(i,{keys:t,crcKey0:new Oi(t[0]),crcKey2:new Oi(t[2])});for(let n=0;n<e.length;n++)Vn(i,e.charCodeAt(n))}function Vn(i,e){let[t,n,s]=i.keys;i.crcKey0.append([e]),t=~i.crcKey0.get(),n=Yo(Math.imul(Yo(n+Ho(t)),134775813)+1),i.crcKey2.append([n>>>24]),s=~i.crcKey2.get(),i.keys=[t,n,s]}function Go(i){const e=i.keys[2]|2;return Ho(Math.imul(e,e^1)>>>8)}function Ho(i){return i&255}function Yo(i){return i&4294967295}const Vo="Invalid uncompressed size",Pu="deflate-raw",Fu="deflate64-raw";class Ru extends TransformStream{constructor(e,{chunkSize:t,CompressionStreamZlib:n,CompressionStream:s}){super({});const{compressed:o,encrypted:r,useCompressionStream:l,zipCrypto:a,signed:d,level:h}=e,p=this;let f,u,m=super.readable;(!r||a)&&d&&(f=new Io,m=je(m,f)),o&&(m=Wo(m,l,{level:h,chunkSize:t},s,n,s)),r&&(a?m=je(m,new ku(e)):(u=new Iu(e),m=je(m,u))),zo(p,m,()=>{let E;r&&!a&&(E=u.signature),(!r||a)&&d&&(E=new DataView(f.value.buffer).getUint32(0)),p.signature=E})}}class Ou extends TransformStream{constructor(e,{chunkSize:t,DecompressionStreamZlib:n,DecompressionStream:s}){super({});const{zipCrypto:o,encrypted:r,signed:l,signature:a,compressed:d,useCompressionStream:h,deflate64:p}=e;let f,u,m=super.readable;r&&(o?m=je(m,new Du(e)):(u=new vu(e),m=je(m,u))),d&&(m=Wo(m,h,{chunkSize:t,deflate64:p},s,n,s)),(!r||o)&&l&&(f=new Io,m=je(m,f)),zo(this,m,()=>{if((!r||o)&&l){const E=new DataView(f.value.buffer);if(a!=E.getUint32(0,!1))throw new Error(Mo)}})}}function zo(i,e,t){e=je(e,new TransformStream({flush:t})),Object.defineProperty(i,"readable",{get(){return e}})}function Wo(i,e,t,n,s,o){const r=e&&n?n:s||o,l=t.deflate64?Fu:Pu;try{i=je(i,new r(l,t))}catch(a){if(e)if(s)i=je(i,new s(l,t));else if(o)i=je(i,new o(l,t));else throw a;else throw a}return i}function je(i,e){return i.pipeThrough(e)}const Lu="message",Nu="start",Uu="pull",jo="data",_u="ack",Ko="close",Qu="deflate",$o="inflate";class Gu extends TransformStream{constructor(e,t){super({});const n=this,{codecType:s}=e;let o;s.startsWith(Qu)?o=Ru:s.startsWith($o)&&(o=Ou),n.outputSize=0;let r=0;const l=new o(e,t),a=super.readable,d=new TransformStream({transform(p,f){p&&p.length&&(r+=p.length,f.enqueue(p))},flush(){Object.assign(n,{inputSize:r})}}),h=new TransformStream({transform(p,f){if(p&&p.length&&(f.enqueue(p),n.outputSize+=p.length,e.outputSize!==he&&n.outputSize>e.outputSize))throw new Error(Vo)},flush(){const{signature:p}=l;Object.assign(n,{signature:p,inputSize:r})}});Object.defineProperty(n,"readable",{get(){return a.pipeThrough(d).pipeThrough(l).pipeThrough(h)}})}}class Hu extends TransformStream{constructor(e){let t;super({transform:n,flush(s){t&&t.length&&s.enqueue(t)}});function n(s,o){if(t){const r=new Uint8Array(t.length+s.length);r.set(t),r.set(s,t.length),s=r,t=null}s.length>e?(o.enqueue(s.slice(0,e)),n(s.slice(e),o)):t=s}}}let Xo=typeof Worker!=nt,qo=()=>{};function Yu({initModule:i}){qo=i}class zn{constructor(e,{readable:t,writable:n},{options:s,config:o,streamOptions:r,useWebWorkers:l,transferStreams:a,workerURI:d},h){const{signal:p}=r;return Object.assign(e,{busy:!0,readable:t.pipeThrough(new Hu(o.chunkSize)).pipeThrough(new Vu(r),{signal:p}),writable:n,options:Object.assign({},s),workerURI:d,transferStreams:a,terminate(){return new Promise(f=>{const{worker:u,busy:m}=e;u?(m?e.resolveTerminated=f:(u.terminate(),f()),e.interface=null):f()})},onTaskFinished(){const{resolveTerminated:f}=e;f&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),f()),e.busy=!1,h(e)}}),(l&&Xo?zu:Jo)(e,o)}}class Vu extends TransformStream{constructor({onstart:e,onprogress:t,size:n,onend:s}){let o=0;super({async start(){e&&await Wn(e,n)},async transform(r,l){o+=r.length,t&&await Wn(t,o,n),l.enqueue(r)},async flush(){s&&await Wn(s,o)}})}}async function Wn(i,...e){try{await i(...e)}catch{}}function Jo(i,e){return{run:()=>Wu(i,e)}}function zu(i,e){const{baseURI:t,chunkSize:n}=e;let{wasmURI:s}=e;if(!i.interface){typeof s==yt&&(s=s());let o;try{o=$u(i.workerURI,t,i)}catch{return Xo=!1,Jo(i,e)}Object.assign(i,{worker:o,interface:{run:()=>ju(i,{chunkSize:n,wasmURI:s,baseURI:t})}})}return i.interface}async function Wu({options:i,readable:e,writable:t,onTaskFinished:n},s){let o;try{if(!i.useCompressionStream)try{await qo(s)}catch{i.useCompressionStream=!0}o=new Gu(i,s),await e.pipeThrough(o).pipeTo(t,{preventClose:!0,preventAbort:!0});const{signature:r,inputSize:l,outputSize:a}=o;return{signature:r,inputSize:l,outputSize:a}}catch(r){throw o&&(r.outputSize=o.outputSize),r}finally{n()}}async function ju(i,e){let t,n;const s=new Promise((p,f)=>{t=p,n=f});Object.assign(i,{reader:null,writer:null,resolveResult:t,rejectResult:n,result:s});const{readable:o,options:r}=i,{writable:l,closed:a}=Ku(i.writable),d=Ui({type:Nu,options:r,config:e,readable:o,writable:l},i);d||Object.assign(i,{reader:o.getReader(),writer:l.getWriter()});const h=await s;return d||await l.getWriter().close(),await a,h}function Ku(i){let e;const t=new Promise(s=>e=s);return{writable:new WritableStream({async write(s){const o=i.getWriter();await o.ready,await o.write(s),o.releaseLock()},close(){e()},abort(s){return i.getWriter().abort(s)}}),closed:t}}let Zo=!0;function $u(i,e,t){const n={type:"module"};let s,o;if(typeof i==yt&&(i=i()),i.startsWith("data:")||i.startsWith("blob:"))try{o=new Worker(i)}catch{o=new Worker(i,n)}else{try{s=new URL(i,e)}catch{s=i}o=new Worker(s,n)}return o.addEventListener(Lu,r=>Xu(r,t)),o}function Ui(i,{worker:e,writer:t,onTaskFinished:n,transferStreams:s}){try{const{value:o,readable:r,writable:l}=i,a=[];if(o&&(i.value=o,a.push(i.value.buffer)),s&&Zo?(r&&a.push(r),l&&a.push(l)):i.readable=i.writable=null,a.length)try{return e.postMessage(i,a),!0}catch{Zo=!1,i.readable=i.writable=null,e.postMessage(i)}else e.postMessage(i)}catch(o){throw t&&t.releaseLock(),n(),o}}async function Xu({data:i},e){const{type:t,value:n,messageId:s,result:o,error:r}=i,{reader:l,writer:a,resolveResult:d,rejectResult:h,onTaskFinished:p}=e;try{if(r){const{message:u,stack:m,code:E,name:A,outputSize:C}=r,v=new Error(u);Object.assign(v,{stack:m,code:E,name:A,outputSize:C}),f(v)}else{if(t==Uu){const{value:u,done:m}=await l.read();Ui({type:jo,value:u,done:m,messageId:s},e)}t==jo&&(await a.ready,await a.write(new Uint8Array(n)),Ui({type:_u,messageId:s},e)),t==Ko&&f(null,o)}}catch(u){Ui({type:Ko,messageId:s},e),f(u)}function f(u,m){u?h(u):d(m),a&&a.releaseLock(),p()}}let Et=[];const jn=[];let er=0;async function qu(i,e){const{options:t,config:n}=e,{transferStreams:s,useWebWorkers:o,useCompressionStream:r,compressed:l,signed:a,encrypted:d}=t,{workerURI:h,maxWorkers:p}=n;e.transferStreams=s||s===he;const f=!l&&!a&&!d&&!e.transferStreams;return e.useWebWorkers=!f&&(o||o===he&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&h?h:he,t.useCompressionStream=r||r===he&&n.useCompressionStream,(await u()).run();async function u(){const E=Et.find(A=>!A.busy);if(E)return tr(E),new zn(E,i,e,m);if(Et.length<p){const A={indexWorker:er};return er++,Et.push(A),new zn(A,i,e,m)}else return new Promise(A=>jn.push({resolve:A,stream:i,workerOptions:e}))}function m(E){if(jn.length){const[{resolve:A,stream:C,workerOptions:v}]=jn.splice(0,1);A(new zn(E,C,v,m))}else E.worker?(tr(E),Ju(E,e)):Et=Et.filter(A=>A!=E)}}function Ju(i,e){const{config:t}=e,{terminateWorkerTimeout:n}=t;Number.isFinite(n)&&n>=0&&(i.terminated?i.terminated=!1:i.terminateTimeout=setTimeout(async()=>{Et=Et.filter(s=>s!=i);try{await i.terminate()}catch{}},n))}function tr(i){const{terminateTimeout:e}=i;e&&(clearTimeout(e),i.terminateTimeout=null)}const Zu="Writer iterator completed too soon",ef="Content-Type",tf=64*1024,ir="writable";class Kn{constructor(){this.size=0}init(){this.initialized=!0}}class nr extends Kn{get readable(){const e=this,{chunkSize:t=tf}=e,n=new ReadableStream({start(){this.chunkOffset=0},async pull(s){const{offset:o=0,size:r,diskNumberStart:l}=n,{chunkOffset:a}=this,d=r===he?t:Math.min(t,r-a),h=await Be(e,o+a,d,l);s.enqueue(h),a+t>r||r===he&&!h.length&&d?s.close():this.chunkOffset+=t}});return n}}class $n extends nr{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,s=e+t;let r=await(e||s<n.size?n.blob.slice(e,s):n.blob).arrayBuffer();return r.byteLength>t&&(r=r.slice(e,s)),new Uint8Array(r)}}class nf extends Kn{constructor(e){super();const t=this,n=new TransformStream,s=[];e&&s.push([ef,e]),Object.defineProperty(t,ir,{get(){return n.writable}}),t.blob=new Response(n.readable,{headers:s}).blob()}getData(){return this.blob}}class sf extends nf{constructor(e){super(e),Object.assign(this,{encoding:e,utf8:!e||e.toLowerCase()=="utf-8"})}async getData(){const{encoding:e,utf8:t}=this,n=await super.getData();if(n.text&&t)return n.text();{const s=new FileReader;return new Promise((o,r)=>{Object.assign(s,{onload:({target:l})=>o(l.result),onerror:()=>r(s.error)}),s.readAsText(n,e)})}}}class of extends nr{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await Promise.all(t.map(async(n,s)=>{await n.init(),s!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size})),super.init()}async readUint8Array(e,t,n=0){const s=this,{readers:o}=this;let r,l=n;l==-1&&(l=o.length-1);let a=e;for(;o[l]&&a>=o[l].size;)a-=o[l].size,l++;const d=o[l];if(d){const h=d.size;if(a+t<=h)r=await Be(d,a,t);else{const p=h-a;r=new Uint8Array(t);const f=await Be(d,a,p);r.set(f,0);const u=await s.readUint8Array(e+p,t-p,n);r.set(u,p),f.length+u.length<t&&(r=r.subarray(0,f.length+u.length))}}else r=new Uint8Array;return s.lastDiskNumber=Math.max(l,s.lastDiskNumber),r}}class sr extends Kn{constructor(e,t=4294967295){super();const n=this;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});let s,o,r;const l=new WritableStream({async write(h){const{availableSize:p}=n;if(r)h.length>=p?(await a(h.subarray(0,p)),await d(),n.diskOffset+=s.size,n.diskNumber++,r=null,await this.write(h.subarray(p))):await a(h);else{const{value:f,done:u}=await e.next();if(u&&!f)throw new Error(Zu);s=f,s.size=0,s.maxSize&&(n.maxSize=s.maxSize),n.availableSize=n.maxSize,await _i(s),o=f.writable,r=o.getWriter(),await this.write(h)}},async close(){await r.ready,await d()}});Object.defineProperty(n,ir,{get(){return l}});async function a(h){const p=h.length;p&&(await r.ready,await r.write(h),s.size+=p,n.size+=p,n.availableSize-=p)}async function d(){await r.close()}}}class rf{constructor(e){return Array.isArray(e)&&(e=new of(e)),e instanceof ReadableStream&&(e={readable:e}),e}}class af{constructor(e){return e.writable===he&&typeof e.next==yt&&(e=new sr(e)),e instanceof WritableStream&&(e={writable:e}),e.size===he&&(e.size=0),e instanceof sr||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}}async function _i(i,e){if(i.init&&!i.initialized)await i.init(e);else return Promise.resolve()}function Be(i,e,t,n){return i.readUint8Array(e,t,n)}const or="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),lf=or.length==256;function cf(i){if(lf){let e="";for(let t=0;t<i.length;t++)e+=or[i[t]];return e}else return new TextDecoder().decode(i)}function Qi(i,e){return e&&e.trim().toLowerCase()=="cp437"?cf(i):new TextDecoder(e).decode(i)}const rr="filename",ar="rawFilename",lr="comment",cr="rawComment",dr="uncompressedSize",hr="compressedSize",ur="offset",fr="diskNumberStart",Xn="lastModDate",qn="rawLastModDate",pr="lastAccessDate",df="rawLastAccessDate",gr="creationDate",mr="rawCreationDate",hf=[rr,ar,dr,hr,Xn,qn,lr,cr,pr,gr,mr,ur,fr,"internalFileAttributes","externalFileAttributes","msdosAttributesRaw","msdosAttributes","msDosCompatible","zip64","encrypted","version","versionMadeBy","zipCrypto","directory","executable","compressionMethod","signature","extraField","extraFieldUnix","extraFieldInfoZip","uid","gid","unixMode","setuid","setgid","sticky","bitFlag","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Ar{constructor(e){hf.forEach(t=>this[t]=e[t])}}const uf="filenameEncoding",ff="commentEncoding",pf="decodeText",gf="extractPrependedData",mf="extractAppendedData",Af="password",yf="rawPassword",Cf="passThrough",Ef="signal",wf="checkPasswordOnly",bf="checkOverlappingEntryOnly",vf="checkOverlappingEntry",If="checkSignature",Bf="useWebWorkers",xf="useCompressionStream",Sf="transferStreams",Tf="preventClose",Jn="File format is not recognized",Mf="End of central directory not found",Df="End of Zip64 central directory locator not found",kf="Central directory header not found",Pf="Local file header not found",Ff="Zip64 extra field not found",Rf="File contains encrypted entry",Of="Encryption method not supported",yr="Compression method not supported",Cr="Split zip file",Lf="Overlapping entry found",Er="utf-8",Nf="UTF8",wr="cp437",Uf=[[dr,At],[hr,At],[ur,At],[fr,ze]],_f={[ze]:{getValue:ue,bytes:4},[At]:{getValue:Nt,bytes:8}};class br{constructor(e,t={}){Object.assign(this,{reader:new rf(e),options:t,config:lu(),readRanges:[]})}async*getEntriesGenerator(e={}){const t=this;let{reader:n}=t;const{config:s}=t;if(await _i(n),(n.size===he||!n.readUint8Array)&&(n=new $n(await new Response(n.readable).blob()),await _i(n)),n.size<Ot)throw new Error(Jn);n.chunkSize=cu(s);const o=await Wf(n,Ph,n.size,Ot,ze*16);if(!o){const x=await Be(n,0,4),F=fe(x);throw ue(F)==fo?new Error(Cr):new Error(Mf)}const r=fe(o);let l=ue(r,12),a=ue(r,16);const d=o.offset,h=Ie(r,20),p=d+Ot+h;let f=Ie(r,4);const u=n.lastDiskNumber||0;let m=Ie(r,6),E=Ie(r,8),A=0,C=0;if(a==At||l==At||E==ze||m==ze){const x=await Be(n,o.offset-Ln,Ln),F=fe(x);if(ue(F,0)==Fh){a=Nt(F,8);let _=await Be(n,a,Nn,-1),H=fe(_);const L=o.offset-Ln-Nn;if(ue(H,0)!=go&&a!=L){const w=a;a=L,a>w&&(A=a-w),_=await Be(n,a,Nn,-1),H=fe(_)}if(ue(H,0)!=go)throw new Error(Df);f==ze&&(f=ue(H,16)),m==ze&&(m=ue(H,20)),E==ze&&(E=Nt(H,32)),l==At&&(l=Nt(H,40)),a-=l}}if(a>=n.size&&(A=n.size-a-l-Ot,a=n.size-l-Ot),u!=f)throw new Error(Cr);if(a<0)throw new Error(Jn);let v=0,S=await Be(n,a,l,m),D=fe(S);if(l){const x=o.offset-l;if(ue(D,v)!=po&&a!=x){const F=a;a=x,a>F&&(A+=a-F),S=await Be(n,a,l,m),D=fe(S)}}const O=o.offset-a-(n.lastDiskOffset||0);if(l!=O&&O>=0&&(l=O,S=await Be(n,a,l,m),D=fe(S)),a<0||a>=n.size)throw new Error(Jn);const I=xe(t,e,uf),B=xe(t,e,ff);for(let x=0;x<E;x++){const F=new Qf(n,s,t.options);if(ue(D,v)!=po)throw new Error(kf);vr(F,D,v+6);const _=!!F.bitFlag.languageEncodingFlag,H=v+46,L=H+F.filenameLength,w=L+F.extraFieldLength,y=Ie(D,v+4),b=y>>8==0,M=y>>8==3,k=S.subarray(H,L),Q=Ie(D,v+32),R=w+Q,T=S.subarray(w,R),U=_,V=_,W=ue(D,v+38),X=W&On,ee={readOnly:!!(X&Kh),hidden:!!(X&$h),system:!!(X&Xh),directory:!!(X&jh),archive:!!(X&qh)},oe=ue(D,v+42)+A,ne=xe(t,e,pf)||Qi,Y=U?Er:I||wr,j=V?Er:B||wr;let te=ne(k,Y);te===he&&(te=Qi(k,Y));let le=ne(T,j);le===he&&(le=Qi(T,j)),Object.assign(F,{versionMadeBy:y,msDosCompatible:b,compressedSize:0,uncompressedSize:0,commentLength:Q,offset:oe,diskNumberStart:Ie(D,v+34),internalFileAttributes:Ie(D,v+36),externalFileAttributes:W,msdosAttributesRaw:X,msdosAttributes:ee,rawFilename:k,filenameUTF8:U,commentUTF8:V,rawExtraField:S.subarray(L,w),rawComment:T,filename:te,comment:le}),C=Math.max(oe,C),Ir(F,F,D,v+6);const re=F.externalFileAttributes>>16&ze;F.unixMode===he&&(re&(Jh|_n|Un))!=0&&(F.unixMode=re);const ce=!!(F.unixMode&Zh),ve=!!(F.unixMode&eu),Te=!!(F.unixMode&tu),et=F.unixMode!==he?(F.unixMode&_n)!=0:M&&(re&_n)!=0,xt=F.unixMode!==he&&(F.unixMode&Eo)==Un,gn=(re&Eo)==Un;Object.assign(F,{setuid:ce,setgid:ve,sticky:Te,unixExternalUpper:re,internalFileAttribute:F.internalFileAttributes,externalFileAttribute:F.externalFileAttributes,executable:et,directory:xt||gn||b&&ee.directory||te.endsWith(iu)&&!F.uncompressedSize,zipCrypto:F.encrypted&&!F.extraFieldAES});const St=new Ar(F);St.getData=(vi,Wt)=>F.getData(vi,St,t.readRanges,Wt),St.arrayBuffer=async vi=>{const Wt=new TransformStream,[ks]=await Promise.all([new Response(Wt.readable).arrayBuffer(),F.getData(Wt,St,t.readRanges,vi)]);return ks},v=R;const{onprogress:mn}=e;if(mn)try{await mn(x+1,E,new Ar(F))}catch{}yield St}const g=xe(t,e,gf),P=xe(t,e,mf);return g&&(t.prependedData=C>0?await Be(n,0,C):new Uint8Array),t.comment=h?await Be(n,d+Ot,h):new Uint8Array,P&&(t.appendedData=p<n.size?await Be(n,p,n.size-p):new Uint8Array),!0}async getEntries(e={}){const t=[];for await(const n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}}class Qf{constructor(e,t,n){Object.assign(this,{reader:e,config:t,options:n})}async getData(e,t,n,s={}){const o=this,{reader:r,offset:l,diskNumberStart:a,extraFieldAES:d,extraFieldZip64:h,compressionMethod:p,config:f,bitFlag:u,signature:m,rawLastModDate:E,uncompressedSize:A,compressedSize:C}=o,{dataDescriptor:v}=u,S=t.localDirectory={},D=await Be(r,l,Qn,a),O=fe(D);let I=xe(o,s,Af),B=xe(o,s,yf);const g=xe(o,s,Cf);if(I=I&&I.length&&I,B=B&&B.length&&B,d&&d.originalCompressionMethod!=Mh)throw new Error(yr);if(p!=Th&&p!=Sh&&p!=uo&&!g)throw new Error(yr);if(ue(O,0)!=Dh)throw new Error(Pf);vr(S,O,4);const{extraFieldLength:P,filenameLength:x,lastAccessDate:F,creationDate:_}=S;S.rawExtraField=P?await Be(r,l+Qn+x,P,a):new Uint8Array,Ir(o,S,O,4,!0),Object.assign(t,{lastAccessDate:F,creationDate:_});const H=o.encrypted&&S.encrypted&&!g,L=H&&!d;if(g||(t.zipCrypto=L),H){if(!L&&d.strength===he)throw new Error(Of);if(!I&&!B)throw new Error(Rf)}const w=l+Qn+x+P,y=C,b=r.readable;Object.assign(b,{diskNumberStart:a,offset:w,size:y});const M=xe(o,s,Ef),k=xe(o,s,wf);let Q=xe(o,s,vf);const R=xe(o,s,bf);R&&(Q=!0);const{onstart:T,onprogress:U,onend:V}=s,W=p==uo;let X=xe(o,s,xf);W&&(X=!1);const ee={options:{codecType:$o,password:I,rawPassword:B,zipCrypto:L,encryptionStrength:d&&d.strength,signed:xe(o,s,If)&&!g,passwordVerification:L&&(v?E>>>8&On:m>>>24&On),outputSize:g?C:A,signature:m,compressed:p!=0&&!g,encrypted:o.encrypted&&!g,useWebWorkers:xe(o,s,Bf),useCompressionStream:X,transferStreams:xe(o,s,Sf),deflate64:W,checkPasswordOnly:k},config:f,streamOptions:{signal:M,size:y,onstart:T,onprogress:U,onend:V}};Q&&await zf({reader:r,fileEntry:t,offset:l,diskNumberStart:a,signature:m,compressedSize:C,uncompressedSize:A,dataOffset:w,dataDescriptor:v||S.bitFlag.dataDescriptor,extraFieldZip64:h||S.extraFieldZip64,readRanges:n});let oe;try{if(!R){k&&(e=new WritableStream),e=new af(e),await _i(e,g?C:A),{writable:oe}=e;const{outputSize:ne}=await qu({readable:b,writable:oe},ee);if(e.size+=ne,ne!=(g?C:A))throw new Error(Vo)}}catch(ne){if(ne.outputSize!==he&&(e.size+=ne.outputSize),!k||ne.message!=Gn)throw ne}finally{!xe(o,s,Tf)&&oe&&!oe.locked&&await oe.getWriter().close()}return k||R?he:e.getData?e.getData():oe}}function vr(i,e,t){const n=i.rawBitFlag=Ie(e,t+2),s=(n&Ao)==Ao,o=ue(e,t+6);Object.assign(i,{encrypted:s,version:Ie(e,t),bitFlag:{level:(n&Wh)>>1,dataDescriptor:(n&yo)==yo,languageEncodingFlag:(n&Co)==Co},rawLastModDate:o,lastModDate:jf(o),filenameLength:Ie(e,t+22),extraFieldLength:Ie(e,t+24)})}function Ir(i,e,t,n,s){const{rawExtraField:o}=e,r=e.extraField=new Map,l=fe(new Uint8Array(o));let a=0;try{for(;a<o.length;){const v=Ie(l,a),S=Ie(l,a+2);r.set(v,{type:v,data:o.slice(a+4,a+4+S)}),a+=4+S}}catch{}const d=Ie(t,n+4);Object.assign(e,{signature:ue(t,n+nu),compressedSize:ue(t,n+su),uncompressedSize:ue(t,n+ou)});const h=r.get(Lh);h&&(Gf(h,e),e.extraFieldZip64=h);const p=r.get(Gh);p&&(Br(p,rr,ar,e,i),e.extraFieldUnicodePath=p);const f=r.get(Hh);f&&(Br(f,lr,cr,e,i),e.extraFieldUnicodeComment=f);const u=r.get(Nh);u?(Hf(u,e,d),e.extraFieldAES=u):e.compressionMethod=d;const m=r.get(Uh);m&&(Yf(m,e),e.extraFieldNTFS=m);const E=r.get(zh);if(E)xr(E,e,!1),e.extraFieldUnix=E;else{const v=r.get(Vh);v&&(xr(v,e,!0),e.extraFieldInfoZip=v)}const A=r.get(Qh);A&&(Vf(A,e,s),e.extraFieldExtendedTimestamp=A);const C=r.get(Yh);C&&(e.extraFieldUSDZ=C)}function Gf(i,e){e.zip64=!0;const t=fe(i.data),n=Uf.filter(([s,o])=>e[s]==o);for(let s=0,o=0;s<n.length;s++){const[r,l]=n[s];if(e[r]==l){const a=_f[l];e[r]=i[r]=a.getValue(t,o),o+=a.bytes}else if(i[r])throw new Error(Ff)}}function Br(i,e,t,n,s){const o=fe(i.data),r=new Oi;r.append(s[t]);const l=fe(new Uint8Array(4));l.setUint32(0,r.get(),!0);const a=ue(o,1);Object.assign(i,{version:ot(o,0),[e]:Qi(i.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&a==ue(l,0)}),i.valid&&(n[e]=i[e],n[e+Nf]=!0)}function Hf(i,e,t){const n=fe(i.data),s=ot(n,4);Object.assign(i,{vendorVersion:ot(n,0),vendorId:ot(n,2),strength:s,originalCompressionMethod:t,compressionMethod:Ie(n,5)}),e.compressionMethod=i.compressionMethod}function Yf(i,e){const t=fe(i.data);let n=4,s;try{for(;n<i.data.length&&!s;){const o=Ie(t,n),r=Ie(t,n+2);o==_h&&(s=i.data.slice(n+4,n+4+r)),n+=4+r}}catch{}try{if(s&&s.length==24){const o=fe(s),r=o.getBigUint64(0,!0),l=o.getBigUint64(8,!0),a=o.getBigUint64(16,!0);Object.assign(i,{rawLastModDate:r,rawLastAccessDate:l,rawCreationDate:a});const d=Zn(r),h=Zn(l),p=Zn(a),f={lastModDate:d,lastAccessDate:h,creationDate:p};Object.assign(i,f),Object.assign(e,f)}}catch{}}function xr(i,e,t){try{const n=fe(new Uint8Array(i.data));let s=0;const o=ot(n,s++),r=ot(n,s++),l=i.data.subarray(s,s+r);s+=r;const a=Sr(l),d=ot(n,s++),h=i.data.subarray(s,s+d);s+=d;const p=Sr(h);let f=he;if(!t&&s+2<=i.data.length){const u=i.data;f=new DataView(u.buffer,u.byteOffset+s,2).getUint16(0,!0)}Object.assign(i,{version:o,uid:a,gid:p,unixMode:f}),a!==he&&(e.uid=a),p!==he&&(e.gid=p),f!==he&&(e.unixMode=f)}catch{}}function Sr(i){const e=new Uint8Array(4);return e.set(i,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function Vf(i,e,t){const n=fe(i.data),s=ot(n,0),o=[],r=[];t?((s&1)==1&&(o.push(Xn),r.push(qn)),(s&2)==2&&(o.push(pr),r.push(df)),(s&4)==4&&(o.push(gr),r.push(mr))):i.data.length>=5&&(o.push(Xn),r.push(qn));let l=1;o.forEach((a,d)=>{if(i.data.length>=l+4){const h=ue(n,l);e[a]=i[a]=new Date(h*1e3);const p=r[d];i[p]=h}l+=4})}async function zf({reader:i,fileEntry:e,offset:t,diskNumberStart:n,signature:s,compressedSize:o,uncompressedSize:r,dataOffset:l,dataDescriptor:a,extraFieldZip64:d,readRanges:h}){let p=0;if(n)for(let m=0;m<n;m++){const E=i.readers[m];p+=E.size}let f=0;if(a&&(d?f=Oh:f=Rh),f){const m=await Be(i,l+o,f+mo,n);if(ue(fe(m),0)==kh){const A=ue(fe(m),4);let C,v;d?(C=Nt(fe(m),8),v=Nt(fe(m),16)):(C=ue(fe(m),8),v=ue(fe(m),12)),(e.encrypted&&!e.zipCrypto||A==s)&&C==o&&v==r&&(f+=mo)}}const u={start:p+t,end:p+l+o+f,fileEntry:e};for(const m of h)if(m.fileEntry!=e&&u.start>=m.start&&u.start<m.end){const E=new Error(Lf);throw E.overlappingEntry=m.fileEntry,E}h.push(u)}async function Wf(i,e,t,n,s){const o=new Uint8Array(4),r=fe(o);Kf(r,0,e);const l=n+s;return await a(n)||await a(Math.min(l,t));async function a(d){const h=t-d,p=await Be(i,h,d);for(let f=p.length-n;f>=0;f--)if(p[f]==o[0]&&p[f+1]==o[1]&&p[f+2]==o[2]&&p[f+3]==o[3])return{offset:h+f,buffer:p.slice(f,f+n).buffer}}}function xe(i,e,t){return e[t]===he?i.options[t]:e[t]}function jf(i){const e=(i&4294901760)>>16,t=i&ze;try{return new Date(1980+((e&65024)>>9),((e&480)>>5)-1,e&31,(t&63488)>>11,(t&2016)>>5,(t&31)*2,0)}catch{}}function Zn(i){return new Date(Number(i/BigInt(1e4)-BigInt(116444736e5)))}function ot(i,e){return i.getUint8(e)}function Ie(i,e){return i.getUint16(e,!0)}function ue(i,e){return i.getUint32(e,!0)}function Nt(i,e){return Number(i.getBigUint64(e,!0))}function Kf(i,e,t){i.setUint32(e,t,!0)}function fe(i){return new DataView(i.buffer)}try{Ri({baseURI:typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Cn&&Cn.tagName.toUpperCase()==="SCRIPT"&&Cn.src||new URL("leiting-bim.umd.js",document.baseURI).href})}catch{}const Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function $f(i){let e;i({wasmURI:()=>(e||(e="data:application/wasm;base64,"+(t=>{t=(r=>{const l=(r=(r+"").replace(/[^A-Za-z0-9+/=]/g,"")).length,a=[];for(let d=0;l>d;d+=4){const h=Pe.indexOf(r[d])<<18|Pe.indexOf(r[d+1])<<12|(63&Pe.indexOf(r[d+2]))<<6|63&Pe.indexOf(r[d+3]);a.push(h>>16&255),r[d+2]!=="="&&a.push(h>>8&255),r[d+3]!=="="&&a.push(255&h)}return new Uint8Array(a)})(t);let n=new Uint8Array(1024),s=0;for(let r=0;r<t.length;){const l=t[r++];if(128&l){const a=3+(127&l),d=t[r++]<<8|t[r++],h=s-d;o(s+a);for(let p=0;a>p;p++)n[s++]=n[h+p]}else{const a=l;o(s+a);for(let d=0;a>d&&r<t.length;d++)n[s++]=t[r++]}}return(r=>{let l="";const a=r.length;let d=0;for(;a>d+2;d+=3){const p=r[d]<<16|r[d+1]<<8|r[d+2];l+=Pe[p>>18&63]+Pe[p>>12&63]+Pe[p>>6&63]+Pe[63&p]}const h=a-d;if(h===1){const p=r[d]<<16;l+=Pe[p>>18&63]+Pe[p>>12&63]+"=="}else if(h===2){const p=r[d]<<16|r[d+1]<<8;l+=Pe[p>>18&63]+Pe[p>>12&63]+Pe[p>>6&63]+"="}return l})(new Uint8Array(n.buffer.slice(0,s)));function o(r){if(n.length<r){let l=2*n.length;for(;r>l;)l*=2;const a=new Uint8Array(l);a.set(n.subarray(0,s)),n=a}}})("FQBhc20BAAAAAUULYAF/AX9gAn9/AIEABYAACwIDf4IABwEBgAARAQaAAAuDAA6BABUDAGAAgAADgAANAQSBABUDAGAHgwAegAAfEgNCQQcABAEABAgIAAIABQIKAIAAB4EAAwEFgQAHAgICgQAHEAEDAAUGAAMDBQQJBAQJAQaAAAEeAAIEAwIEAgIBBAcDAwQFAXABDQ0FBgEBggKCAgYIgACYIkHQ1QQLB4oEHAZtZW1vcnkCAAxpbmZsYXRlOV9uZXcABw2GAA8HaW5pdAAIEYoAEAdfcmF3AAoQhgAUCXByb2Nlc3MAC4cARgZlbmQADhaGAA8QbGFzdF9jb25zdW1lZAARC4QAGYMAbYUANoMAbAEShQBYhwBrARSFAH+DABMHZ3ppcAAVD4UAFIUAfgEWhgBWgQB9AhgVhQAOjQB8AmRliQB8hQAOggB8AhoQiQAPggB8AhsRigATggB8AhwPhQAUhQB8AR2GAFaBAHwJHwRmcmVlAAIVhQAVjACDCgZtYWxsb2MAAQuCAFUKaWFsaXplAAAZX4AADxZkaXJlY3RfZnVuY3Rpb25fdGFibGUBgAAcG2Vtc2NyaXB0ZW5fc3RhY2tfcmVzdG9yZQAFHI4AGwJnZYAAbw51cnJlbnQABiJfX2N4YYAAWwRjcmVtgAASBl9leGNlcIIAXQZyZWZjb3WAACUtPQkSAQBBAQsMACEiDA8XGR4+NTg7CqHlAkECAAu/JwELfyMAQRBrIgokAAJAjwACEiAAQfQBTQRAQaQnKAIAIgNBEIAAEgYLakH4A3GBAAkQSRsiBkEDdiIAdiIBQQNxBIEAMgYBQX9zQQGAAB8GaiICQQN0gAAZDMwnaiIAIAEoAtQnIoAABgQIIgVGggBSCSADQX4gAndxNoACphEBCyAFIAA2AgwgACAFNgIIC4AASAMIaiGAADcBIIIARoAABQRyNgIEgQAPA2oiAYEATQMEQQGBABIHDAsLIAZBrIIAnw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AEBF4wAAQEYnAABARmcAAEBGpwAAQEbmwABARyBffsEBAQFBYHB1QEHgAABAQiEAAGAXSqCAAEBCowAAYAnsooAAYEBMJkAAYEBTJkAAYEBaLkAAYEBpLkAAYIDdYABzoUBvI0BqJ0BkLwBgAIbHLwAAQEdvAABgA9PgH05A9AqAQ==")),e)})}let Ae,Ut,Fe,oi;function Xf(i){if(Ae=i,{malloc:Ut,free:Fe,memory:oi}=Ae,typeof Ut!="function"||typeof Fe!="function"||!oi)throw Ae=Ut=Fe=oi=null,new Error("Invalid WASM module")}function Tr(i,e,t={}){const n=typeof t.level=="number"?t.level:-1,s=typeof t.outBuffer=="number"?t.outBuffer:64*1024,o=typeof t.inBufferSize=="number"?t.inBufferSize:64*1024;return new TransformStream({start(){let r;if(this.out=Ut(s),this.in=Ut(o),this.inBufferSize=o,this._scratch=new Uint8Array(s),i?(this._process=Ae.deflate_process,this._last_consumed=Ae.deflate_last_consumed,this._end=Ae.deflate_end,this.streamHandle=Ae.deflate_new(),e==="gzip"?r=Ae.deflate_init_gzip(this.streamHandle,n):e==="deflate-raw"?r=Ae.deflate_init_raw(this.streamHandle,n):r=Ae.deflate_init(this.streamHandle,n)):e==="deflate64-raw"?(this._process=Ae.inflate9_process,this._last_consumed=Ae.inflate9_last_consumed,this._end=Ae.inflate9_end,this.streamHandle=Ae.inflate9_new(),r=Ae.inflate9_init_raw(this.streamHandle)):(this._process=Ae.inflate_process,this._last_consumed=Ae.inflate_last_consumed,this._end=Ae.inflate_end,this.streamHandle=Ae.inflate_new(),e==="deflate-raw"?r=Ae.inflate_init_raw(this.streamHandle):e==="gzip"?r=Ae.inflate_init_gzip(this.streamHandle):r=Ae.inflate_init(this.streamHandle)),r!==0)throw new Error("init failed:"+r)},transform(r,l){try{const a=r,d=new Uint8Array(oi.buffer),h=this._process,p=this._last_consumed,f=this.out,u=this._scratch;let m=0;for(;m<a.length;){const E=Math.min(a.length-m,32768);(!this.in||this.inBufferSize<E)&&(this.in&&Fe&&Fe(this.in),this.in=Ut(E),this.inBufferSize=E),d.set(a.subarray(m,m+E),this.in);const A=h(this.streamHandle,this.in,E,f,s,0),C=A&16777215;if(C&&(u.set(d.subarray(f,f+C),0),l.enqueue(u.slice(0,C))),!i){const S=A>>24&255,D=S&128?S-256:S;if(D<0)throw new Error("process error:"+D)}const v=p(this.streamHandle);if(v===0)break;m+=v}}catch(a){this._end&&this.streamHandle&&this._end(this.streamHandle),this.in&&Fe&&Fe(this.in),this.out&&Fe&&Fe(this.out),l.error(a)}},flush(r){try{const l=new Uint8Array(oi.buffer),a=this._process,d=this.out,h=this._scratch;for(;;){const p=a(this.streamHandle,0,0,d,s,4),f=p&16777215,u=p>>24&255;if(!i){const m=u&128?u-256:u;if(m<0)throw new Error("process error:"+m)}if(f&&(h.set(l.subarray(d,d+f),0),r.enqueue(h.slice(0,f))),u===1||f===0)break}}catch(l){r.error(l)}finally{if(this._end&&this.streamHandle){const l=this._end(this.streamHandle);l!==0&&r.error(new Error("end error:"+l))}this.in&&Fe&&Fe(this.in),this.out&&Fe&&Fe(this.out)}}})}class qf{constructor(e="deflate",t){return Tr(!0,e,t)}}class Jf{constructor(e="deflate",t){return Tr(!1,e,t)}}let Mr=!1;async function Zf(i,{baseURI:e}){if(!Mr){let t,n;try{try{n=new URL(i,e)}catch{}t=await(await fetch(n)).arrayBuffer()}catch(o){if(i.startsWith("data:application/wasm;base64,"))t=ep(i);else throw o}const s=await WebAssembly.instantiate(t);Xf(s.instance.exports),Mr=!0}}function ep(i){const e=i.split(",")[1],t=atob(e),n=t.length,s=new Uint8Array(n);for(let o=0;o<n;++o)s[o]=t.charCodeAt(o);return s.buffer}let es;$f(Ri),Yu({initModule:i=>{if(!es){let{wasmURI:e}=i;typeof e==yt&&(e=e()),es=Zf(e,i)}return es}}),Ri({CompressionStreamZlib:qf,DecompressionStreamZlib:Jf});const ts={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin","cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot","wiz"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf","xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","xpdl"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot","ppa","pwz"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":["odm","otm"],"vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw","vsdx","vssx","vstx","vssm","vstm"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-director":["dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-latex":"latex","x-lyx":"lyx","x-lzx":"lzx","x-maker":["frm","fb","fbdoc"],"x-ms-wmd":"wmd","x-msdos-program":["com","exe","bat","dll"],"x-netcdf":["nc"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":["rpm","rpa"],"x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":["mathml","mml"],mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","application/x-ms-installer":"msi","x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-perfmon":["pma","pmc","pmr","pmw"],"ynd.ms-pkipko":"pko",gzip:["gz","tgz"],"smil+xml":["smi","smil"],"vnd.debian.binary-package":["deb","udeb"],"vnd.hzn-3d-crossword":"x3d","vnd.sqlite3":["db","sqlite","sqlite3","db-wal","sqlite-wal","db-shm","sqlite-shm"],"vnd.wap.sic":"sic","vnd.wap.slc":"slc","x-krita":["kra","krz"],"x-perl":["pm","pl"],yaml:["yaml","yml"]},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":"aifc","x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",aac:"aac",aiff:["aiff","aif","aff"],opus:"opus",wav:"wav"},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":"mmod","x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":"sd","x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":"val","x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},font:{otf:"otf",woff:"woff",woff2:"woff2"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe","jfif","jfif-tbnl","jif"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",avif:"avifs",heic:["heif","heic"],pjpeg:["pjpg"],"vnd.adobe.photoshop":"psd","x-adobe-dng":"dng","x-fuji-raf":"raf","x-icns":"icns","x-kodak-dcr":"dcr","x-kodak-k25":"k25","x-kodak-kdc":"kdc","x-minolta-mrw":"mrw","x-panasonic-raw":["raw","rw2","rwl"],"x-pentax-pef":["pef","ptx"],"x-sigma-x3f":"x3f","x-sony-arw":"arw","x-sony-sr2":"sr2","x-sony-srf":"srf"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":"x3dz","x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.usdz+zip":"usdz","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",plain:["txt","text","brf","conf","def","list","log","in","bas","diff","ksh"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:"tm","tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":"patch","x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas","pp","inc"],"x-pcs-gcd":"gcd","x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","h","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt",javascript:"js",json:"json",markdown:["md","markdown","mdown","markdn"],"vnd.wap.si":"si","vnd.wap.sl":"sl"},video:{avif:"avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv",mp2t:"ts"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","flr","wrz","xaf","xof"]}};(()=>{const i={};for(const e of Object.keys(ts))for(const t of Object.keys(ts[e])){const n=ts[e][t];if(typeof n=="string")i[n]=e+"/"+t;else for(let s=0;s<n.length;s++)i[n[s]]=e+"/"+t}return i})(),du(Ri);const tp="E84#E3C4!8C4&A1";async function rt(i){try{const e=await fetch(i);if(!e.ok)return!1;const t=await e.blob();try{const n=new br(new $n(t),{password:tp}),o=(await n.getEntries()).find(l=>!l.directory&&l.filename.endsWith(".json"));if(!o)return await n.close(),!1;const r=await o.getData(new sf);return await n.close(),JSON.parse(r.trim())}catch{const n=await t.text();try{return JSON.parse(n.trim())}catch(s){throw console.error(`[loadModelFile] JSON parse error: ${i}`,s),s}}}catch(e){return console.error("[loadModelFile] 加载失败",`${i} ${e}`),!1}}async function ip(i){if(!i)return null;try{const e=`/cx_dzpt/bim/modelComponentTree/list?dbName=${encodeURIComponent(i)}`,t=await fetch(e);if(!t.ok)return console.warn(`[loadTreeFromApi] API 请求失败: ${e} ${t.status}`),null;const n=await t.json();return Array.isArray(n)?np(n):(console.warn("[loadTreeFromApi] API 返回格式错误: 期望数组",n),null)}catch(e){return console.error("[loadTreeFromApi] 加载异常:",e),null}}function np(i){const e={},t=[];return i.forEach(n=>{n.id&&(e[n.id]={...n,children:[]})}),i.forEach(n=>{if(!n.id)return;const s=e[n.id];if(!s)return;const o=n.parentId;o&&e[o]?e[o].children?.push(s):t.push(s)}),t}async function sp(i){if(!i||i.length===0)return null;try{const e=await fetch("/cx_dzpt/bim/modelComponent/listByDbNameAndElementId",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return e.ok?await e.json():(console.warn(`[fetchComponentDetails] API 请求失败: ${e.status}`),null)}catch(e){return console.error("[fetchComponentDetails] 加载异常:",e),null}}function op(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){const e=Math.random()*16|0;return(i==="x"?e:e&3|8).toString(16)})}class Gi{events={};on(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)}emit(e,...t){this.events[e]&&this.events[e].forEach(n=>n(...t))}off(e,t){this.events[e]&&(this.events[e]=this.events[e].filter(n=>n!==t))}}class Dr{cesium;viewer;modelList=[];hasLoaded3dTiles={};mapRecordModelId={};mapTileset={};BIMmodelId="";lazyLoadingCount=0;events=new Gi;options={flyTo:!0,flyToDuration:0,loadTreeNodeDetails:!0,loadTreeNodeDetailsUrl:"/elementInfo.zip",loadTree:!0,loadTreeUrl:"/allElementsInfo.zip",boxRegionUrl:"/BoundingBoxInfo.zip",regionUrl:"/region.zip",batchIDInfoUrl:"/batchIDInfo.zip",enabledSection:!0,delay:0,tilesetOptions:{cullWithChildrenBounds:!0,cullRequestsWhileMoving:!0,cullRequestsWhileMovingMultiplier:10,backFaceCulling:!0,colorBlendAmount:0,minimumPixelSize:128,maximumScreenSpaceError:32,skipLevelOfDetail:!0,baseScreenSpaceError:1024,skipScreenSpaceErrorFactor:128,skipLevels:5,immediatelyLoadDesiredLevelOfDetail:!1,loadSiblings:!1,maximumMemoryUsage:4096*10,preloadWhenHidden:!0,preferLeaves:!0,progressiveResolutionHeightFraction:.5,dynamicScreenSpaceErrorDensity:.002,dynamicScreenSpaceErrorFactor:4,dynamicScreenSpaceError:!0,dynamicScreenSpaceErrorHeightFalloff:.25,foveatedConeSize:0,foveatedTimeDelay:10,foveatedMinimumScreenSpaceErrorRelaxation:0}};constructor(e){this.cesium=e.cesium,this.viewer=e.viewer,this.options.tilesetOptions&&(this.options.tilesetOptions.colorBlendMode=this.cesium.Cesium3DTileColorBlendMode.REPLACE)}deleteAllModels(){const e=[];return Object.keys(this.mapTileset).forEach(t=>{const n=this.mapTileset[t];n&&(this.viewer.scene.primitives.remove(n),e.push(t)),delete this.mapTileset[t],delete this.hasLoaded3dTiles[t],delete this.mapRecordModelId[t]}),this.modelList=[],this.viewer.scene.requestRender(),this.events.emit("updateModels",{modelList:[]}),e}deleteModels(e){const t=[];return e.forEach(({modelId:n})=>{const s=this.mapTileset[n];s&&(this.viewer.scene.primitives.remove(s),t.push(n)),delete this.mapTileset[n],delete this.hasLoaded3dTiles[n],delete this.mapRecordModelId[n]}),this.modelList=this.modelList.filter(n=>!t.includes(n.modelId)),this.viewer.scene.requestRender(),this.events.emit("updateModels",{modelList:this.modelList}),t}showModels(e){const t=[];return e.forEach(n=>{const s=`${n.modelId}`,o=this.mapTileset[s];o&&(o.show=!!n.show,t.push(s))}),t.length&&this.viewer.scene.requestRender(),t}async addModels({files:e,fileNames:t,options:n}){const s=e||t||[];s.length>0&&await this.add3DTilesModel(s,n)}async add3DTilesModel(e,t){const n=t?xh({},this.options,t):{...this.options};if(e?.length){for(const s of e){const o=`${s.modelId}`;if(this.mapRecordModelId[o])continue;const r=`${s.outPutPath}${s.dbName}/tileset.json`;this.modelList.push({...s,url:r,state:Rt.NotLoaded}),this.mapRecordModelId[o]=!1}await this.load3DTilesModel(n)}}async load3DTilesModel(e){const t=this.modelList.filter(r=>r.state===Rt.NotLoaded);if(!t.length)return;const n=t.length;this.events.emit("loadingStatus",`正在加载 ${n} 个模型`);let s=0,o=!1;for(const r of t){s++;try{r.state=Rt.Loading;const l=r.url,a=this.getBaseUrlPath(l);e.loadTreeNodeDetails=!1,e.loadTreeNodeDetails&&this.events.emit("loadingStatus",`正在加载第 ${s}/${n} 个模型: 加载${r.modelName}构件信息`);let d=e.loadTreeNodeDetails?await rt(`${a}${e.loadTreeNodeDetailsUrl}`):!1;e.loadTree=!1,e.loadTree&&this.events.emit("loadingStatus",`正在加载第 ${s}/${n} 个模型: 加载${r.modelName}目录树`);const h=e.loadTree?await rt(`${a}${e.loadTreeUrl}`):!1;this.events.emit("loadingStatus",`正在加载第 ${s}/${n} 个模型: 加载${r.modelName}模型数据`);const p=e.boxRegionUrl?await rt(`${a}${e.boxRegionUrl}`):!1,f=e.batchIDInfoUrl?await rt(`${a}${e.batchIDInfoUrl}`):!1;f&&(d||(d=f));const u=await this.loadTilesetWithZipSupport(l,r.modelId,e.tilesetOptions||{},this.cesium);this.viewer.scene.primitives.add(u),await u.readyPromise;const m=`${u?.asset?.tilesetVersion??r.modelId}`;this.mapTileset[`${r.modelId}`]=u;const E={versionId:m,selectedFn:e.selectedFn,model:{modelId:r.modelId,modelName:r.modelName,dbName:r.dbName,fileType:r.fileType,outPutPath:r.outPutPath,url:r.url,treeUrl:`${a}${e.loadTreeUrl}`,nodeUrl:`${a}${e.loadTreeNodeDetailsUrl}`,formData:r.formData,type:"BIM"},node:d||null,tree:h||null,box:null};if(p?.min&&p?.max){const A={x:p.min.X,y:p.min.Y,z:p.min.Z},C={x:p.max.X,y:p.max.Y,z:p.max.Z},v={x:(A.x+C.x)/2,y:(A.y+C.y)/2,z:(A.z+C.z)/2};E.box={min:A,max:C,center:v}}if(!r.formData){const A=await rt(`${r.outPutPath}${r.dbName}${e.regionUrl}`);if(A)r.formData={modelId:r.modelId.toString(),longitude:A.Longitude,latitude:A.Latitude,distance:1e-6,rotation:30,totalRotation:A.DAngle||0,height:A.MinHeight,lonlat:1e-5,heightDistance:1,modelOptions:[{value:r.modelId.toString(),label:r.modelName}],X:A?.X||0,Y:A?.Y||0,Z:A?.Z||0};else{const C=t.indexOf(r);r.formData={modelId:r.modelId.toString(),longitude:118.12548706388897,latitude:24.596796919444404,distance:1e-5,rotation:0,totalRotation:0,heightDistance:1,height:0,lonlat:1e-5,modelOptions:[{value:C+1,label:r.modelName}],X:0,Y:0,Z:0}}}r.formData&&(r.formData.heightDistance=r.formData.heightDistance??1,E.model.formData=r.formData),u.leiting=E,Rn({Cesium:this.cesium,tileset:u}),r.state=Rt.Loaded,this.mapRecordModelId[r.modelId]=!0,this.events.emit("tilesetLoaded",u),e.tilesLoad3dTiles&&e.tilesLoad3dTiles(u),!o&&e.flyTo&&(this.BIMmodelId=r.modelId,this.flyToTileset({modelId:this.BIMmodelId,options:{duration:e.flyToDuration??0}}),o=!0),e.delay&&await new Promise(A=>setTimeout(A,e.delay))}catch(l){console.error(`模型 ${r.modelName} 加载失败:`,l),this.events.emit("loadingStatus",`模型 ${r.modelName} 加载失败`),r.state=Rt.Error}}e.mountAll3Dtiles&&e.mountAll3Dtiles(this.modelList),e.onMountAll3Dtiles&&e.onMountAll3Dtiles(this.modelList),this.events.emit("loadingStatus",""),this.events.emit("mountAll3Dtiles",{modelList:this.modelList,mapTileset:this.mapTileset})}async addOSGB({files:e,options:t}){const n=this.cesium;if(!e?.length)return;this.events.emit("loadingStatus",`正在加载 ${e.length} 个倾斜摄影模型`);let s=!1,o=0;for(const r of e){o++,this.events.emit("loadingStatus",`正在加载第 ${o}/${e.length} 个模型: 加载${r.modelName}`);try{const{outPutPath:l,dbName:a,modelId:d}=r,h=`${l}${a}/tileset.json`,p=await n.Cesium3DTileset.fromUrl(h,{maximumScreenSpaceError:16,preferLeaves:!0,cullWithChildrenBounds:!0,...t?.tilesetOptions});if(p.colorBlendMode=this.cesium.Cesium3DTileColorBlendMode.REPLACE,this.viewer.scene.primitives.add(p),await p.readyPromise,this.mapTileset[`${d}`]=p,this.hasLoaded3dTiles[`${d}`]=(this.hasLoaded3dTiles[`${d}`]||0)+1,this.mapRecordModelId[`${d}`]=!0,!r?.formData){const f=p.root.computedTransform;if(f){const u=n.Matrix4.fromColumnMajorArray(f),m=n.Matrix4.getTranslation(u,new n.Cartesian3),E=n.Ellipsoid.WGS84.cartesianToCartographic(m),A=n.Math.toDegrees(E.longitude),C=n.Math.toDegrees(E.latitude),v=E.height;r.formData={modelId:r.modelId.toString(),longitude:A,latitude:C,distance:1e-5,rotation:0,totalRotation:0,heightDistance:1,height:v,lonlat:1e-5,modelOptions:[{value:r.modelId.toString(),label:r.modelName}],X:0,Y:0,Z:0}}else console.warn(`OSGB模型 ${d} 无法获取初始位置信息`)}r.formData&&(r.formData.heightDistance=r.formData.heightDistance??1),p.leiting={versionId:`${p?.asset?.tilesetVersion??d}`,selectedFn:t?.selectedFn,model:{modelId:r.modelId,modelName:r.modelName,dbName:r.dbName,fileType:r.fileType,outPutPath:r.outPutPath,url:h,formData:r.formData,type:"OSGB"},box:null},Rn({Cesium:this.cesium,tileset:p}),this.modelList.push({...r,url:h,state:Rt.Loaded}),!s&&t?.flyTo&&(this.viewer.zoomTo(p),s=!0)}catch(l){console.error(`OSGB模型 ${r.dbName} 加载失败:`,l);continue}}this.events.emit("loadingStatus",""),this.events.emit("onMountAllOsgb3Dtiles",{modelList:this.modelList,mapTileset:this.mapTileset})}updateOSGBMatrix(e){const{X:t,Y:n,Z:s,modelId:o}=e,r=this.cesium,l=this.mapTileset[o];if(!l){console.warn("tileSet not found for modelId:",o);return}let a=t||0,d=n||0,h=s||0;const p=l.boundingSphere.center,f=r.Transforms.eastNorthUpToFixedFrame(p),u=new r.Cartesian3(a,d,h),m=r.Matrix4.multiplyByPoint(f,u,new r.Cartesian3(0,0,0)),E=r.Cartesian3.subtract(m,p,new r.Cartesian3);l.modelMatrix=r.Matrix4.fromTranslation(E)}flyToTileset({modelId:e=this.BIMmodelId,options:t={}}={}){const s=this.getMapTileset()[e];if(!s||!this.viewer)return;const{complete:o,cancel:r,...l}=t,a={duration:0,...l};this.viewer.flyTo(s,a).then(d=>{d?o&&o():r&&r()}).catch(d=>{r&&r(),console.error("FlyTo error",d)})}getMapTileset(){return this.mapTileset}getBIMmodelId(){return this.BIMmodelId}getModelList(){return this.modelList}setMapTileset(e){this.mapTileset=e}setBIMmodelId(e){this.BIMmodelId=e}setModelList(e){this.modelList=e}getBaseUrlPath(e){const t=e.lastIndexOf("/");return t===-1?".":e.substr(0,t)}async loadTilesetWithZipSupport(e,t,n,s){const o=`${this.getBaseUrlPath(e)}/tileset.zip`;if((await fetch(o,{method:"HEAD"})).status===200){const a=await rt(o);if(a){const d=new Blob([JSON.stringify(a)],{type:"application/json"}),h=URL.createObjectURL(d);class p{getURL(A){return A.includes("blob://")?A.replace(/blob:\/\//g,u):A}}const f=new p,u=this.getBaseUrlPath(e),m=new s.Resource({url:h,proxy:f});try{return await s.Cesium3DTileset.fromUrl(m,{id:t,...n})}catch{return await s.Cesium3DTileset.fromUrl(e,{url:e,id:t,...n})}}}return await s.Cesium3DTileset.fromUrl(e,{url:e,id:t,...n})}async loadTreeForModel(e){const t=this.mapTileset[e];if(!t||!t.leiting)return null;if(t.leiting.tree)return t.leiting.tree;const n=t.leiting.model?.modelName||e,s=t.leiting.model?.treeUrl,o=t.leiting.model?.dbName;if(!o&&!s)return null;this.lazyLoadingCount++,this.events.emit("loadingStatus",`正在加载 ${n} 目录树...`);try{if(o){const r=await ip(o);if(r&&r.length>0)return t.leiting.tree=r,r}if(s){const r=await rt(s);if(r)return t.leiting.tree=r,r}}catch(r){console.error(`Failed to load tree for model ${e}:`,r)}finally{this.lazyLoadingCount--,this.lazyLoadingCount<=0&&(this.lazyLoadingCount=0,this.events.emit("loadingStatus",""))}return null}async loadNodeDetailsForModel(e){const t=this.mapTileset[e];if(!t||!t.leiting)return null;if(t.leiting?.node?.nodeExtras)return t.leiting.node;const n=t.leiting.model?.nodeUrl,s=t.leiting.model?.modelName||e;if(!n)return null;this.lazyLoadingCount++,this.events.emit("loadingStatus",`正在加载 ${s} 构件详情...`);try{const o=await rt(n);if(o)return o.batchIdEIDInfos||(o.batchIdEIDInfos=t.leiting.node.batchIdEIDInfos),t.leiting.node=o,o}catch(o){console.error(`Failed to load node details for model ${e}:`,o)}finally{this.lazyLoadingCount--,this.lazyLoadingCount<=0&&(this.lazyLoadingCount=0,this.events.emit("loadingStatus",""))}return null}}const kr={normal:0,process:2},rp={color:1};function Pr(i){return i===1||i==="exist"?1:i===2||i==="process"?2:0}function _t(i){return Number.isNaN(i)?0:i<=1?Math.min(Math.max(i,0),1):Math.min(Math.max(i/255,0),1)}function Fr(i){return Number.isNaN(i)?1:i<=1?Math.min(Math.max(i,0),1):1}function is(i){if(!i)return null;const e=Number(i.r),t=Number(i.g),n=Number(i.b),s=i.a===void 0?1:Number(i.a);if([e,t,n,s].some(a=>Number.isNaN(a)))return null;const o=Math.round(e*255),r=Math.round(t*255),l=Math.round(n*255);return`rgba(${o},${r},${l},${s})`}function ap(i){if(!i||typeof i!="string")return null;const t=i.replace(/\s+/g,"").match(/^rgba?\((\d+),(\d+),(\d+)(?:,([0-9.]+))?\)$/i);if(!t)return null;const n=Number(t[1]),s=Number(t[2]),o=Number(t[3]),r=t[4]===void 0?1:Number(t[4]);return[n,s,o,r].some(l=>Number.isNaN(l))?null:{r:Math.min(Math.max(n/255,0),1),g:Math.min(Math.max(s/255,0),1),b:Math.min(Math.max(o/255,0),1),a:Math.min(Math.max(r,0),1)}}function lp(i){if(i==null)return null;const e=Number(i);return Number.isNaN(e)?null:e}function cp(i){const e=i.lastIndexOf("-"),t=i.substring(0,e),n=i.substring(e+1);return[t,n]}function ns(i){if(!i)return null;const e=i.Min??i.min,t=i.Max??i.max;if(!e||!t)return null;const n=Number(e.x??e.X),s=Number(e.y??e.Y),o=Number(e.z??e.Z),r=Number(t.x??t.X),l=Number(t.y??t.Y),a=Number(t.z??t.Z);return[n,s,o,r,l,a].some(d=>Number.isNaN(d))?null:{min:{x:n,y:s,z:o},max:{x:r,y:l,z:a}}}function ri(i,e){if(e)return`${e}`;const t=i?.leiting?.model?.modelId??i?.modelId??i?.id;return t==null?null:`${t}`}function dp(i,e){if(e==null)return null;const t=i?.leiting?.node;if(!t)return null;const n=`${e}`,s=t?.[n],o=ns(s?.box3??s?.box);if(o)return o;const r=t?.element?.[n]??t?.elements?.[n]??t?.nodeExtras?.element?.[n]??t?.nodeExtras?.elements?.[n];return ns(r?.box3??r?.box)}function hp(i){const e=i?.leiting?.box;return e?ns({min:e.min,max:e.max}):null}class up{base;constructor(e){this.base=e}initTime(){const t=this.base.cesium.JulianDate.fromDate(new Date(2023,3,21,10,0));this.base.viewer.clock.currentTime=t,this.base.start=this.base.viewer.clock.currentTime.secondsOfDay*1e3}processAnimation(e,t,n,s=null){if(this.base.start==null)return;const o=this.base.start+(e?.delay??0),r=this.base.start+(e?.playtime??0)+(e?.delay??0);t<=o&&(e.cash=!0,e.groupData.forEach(l=>{const{batchIds:a,modelId:d,rgba:h}=l;if(Array.isArray(a)&&a[0]){a[0][1]=h;const p=n[d];p?p.push(a[0]):n[d]=[a[0]]}})),t>=o&&t<r&&(s!==null&&(this.base.viewer.scene.ambientLightIntensity=s),e.cash=!1,e.playCash=!0,e.groupData.forEach(l=>{const{batchIds:a,playTimeColor:d,modelId:h}=l;if(Array.isArray(a)&&a[0]){a[0][1]=d;const p=n[h];p?p.push(a[0]):n[h]=[a[0]]}})),t>=r&&(e.finished=!0)}onTick=e=>{if(!this.base.cesium||!this.base.viewer)return;const t=e?.currentTime?.secondsOfDay?e.currentTime.secondsOfDay*1e3:this.base.viewer.clock.currentTime.secondsOfDay*1e3,n={};Array.isArray(this.base.data)&&this.base.data.forEach(o=>{this.processAnimation(o,t,n,.1)});const s=Object.entries(n);if(s.forEach(([o,r])=>{this.base.setTileSyltByConstructionProcessTracking({modelId:o,batchIds:r})}),Object.keys(this.base.mapAnimations).forEach(o=>{const r=this.base.mapAnimations[o];r.length&&r.every(l=>l.finished)&&!this.base.clearedModelIds.has(o)&&(this.base.setTileSyltByConstructionProcessTracking({modelId:o,batchIds:[]}),this.base.clearedModelIds.add(o))}),this.base.recoverStaus){s.length&&(this.base.recoverStaus=!1);return}s.length===0&&Array.isArray(this.base.data)&&this.base.data.forEach(o=>{o.groupData.forEach(r=>{const{modelId:l}=r;this.base.setTileSyltByConstructionProcessTracking({modelId:l,batchIds:[]})}),this.base.recoverStaus=!0})};enableConstructionProgressTracking(){this.base.clearedModelIds.clear(),this.initTime(),this.base.groupBatchIds={},Array.isArray(this.base.data)&&(this.base.data.forEach(e=>{e.cash=!1,e.playCash=!1,e.groupData.forEach(t=>{const{batchIds:n,modelId:s,rgba:o}=t;if(Array.isArray(n)&&n[0]){n[0][1]=o;const r=this.base.groupBatchIds[s];r?r.push(n[0]):this.base.groupBatchIds[s]=[n[0]]}})}),Object.entries(this.base.groupBatchIds).forEach(([e,t])=>{this.base.setTileSyltByConstructionProcessTracking({modelId:e,batchIds:t})})),this.base.viewer.clock.onTick.addEventListener(this.onTick)}disableConstructionProgressTracking(){this.base.viewer.clock.onTick.removeEventListener(this.onTick),this.base.viewer.scene.ambientLightIntensity=1,Array.isArray(this.base.data)&&this.base.data.forEach(e=>{e.cash=!0,e.playCash=!0,e.groupData.forEach(t=>{const{modelId:n}=t,s=[];this.base.setTileSyltByConstructionProcessTracking({modelId:n,batchIds:s})})}),this.base.start=null}freshConstructionProgressTracking(){const e=this.base.viewer.clock.currentTime.secondsOfDay*1e3,t={};Array.isArray(this.base.data)&&this.base.data.forEach(s=>{s.playCash=!1,this.processAnimation(s,e,t)});const n=Object.entries(t);n.forEach(([s,o])=>{this.base.setTileSyltByConstructionProcessTracking({modelId:s,batchIds:o})}),n.length===0&&Array.isArray(this.base.data)&&this.base.data.forEach(s=>{s.groupData.forEach(o=>{const{modelId:r}=o;this.base.setTileSyltByConstructionProcessTracking({modelId:r,batchIds:[]})})})}reStartAnimation(){let e={};this.base.clearedModelIds.clear(),Array.isArray(this.base.data)&&this.base.data.forEach(t=>{t.cash=!1,t.playCash=!1,t.groupData.forEach(n=>{const{batchIds:s,modelId:o,rgba:r}=n;if(Array.isArray(s)&&s[0]){s[0][1]=r;const l=e[o];l?l.push(s[0]):e[o]=[s[0]]}})}),Object.entries(e).forEach(([t,n])=>{this.base.setTileSyltByConstructionProcessTracking({modelId:t,batchIds:n})}),this.initTime()}setAllConstructionProgressTracking(e){this.base.data=e,Array.isArray(this.base.data)&&this.base.data.forEach(t=>{t.cash=!1,t.playCash=!1,t.groupData=[],t.finished=!1,t.mergeCpts.forEach(n=>{const s=[];n.cpts.forEach(a=>{s.push({dbName:n.linkModelId,modelId:n.modelId,elementId:`${a}`,show:!0,rgba:t.rgba??{r:.2,g:.2,b:.2,a:.2}})});const o=kr.process,r=rp.color,{allElements:l}=this.base.groupByModelId(s);this.base.mapAnimations[n.modelId]=this.base.mapAnimations[n.modelId]||[],this.base.mapAnimations[n.modelId].push(t),Object.entries(l).forEach(([a,d])=>{const[h,p]=cp(a),f=this.base.getTileSyltByConstructionProcessTracking({elementIds:d,modelId:h,color:p,colorRank:o,show:!0,selectionRank:r}),u=t?.playTimeColor?.r??1,m=t?.playTimeColor?.g??1,E=t?.playTimeColor?.b??0,A=t?.playTimeColor?.a??.1,C=this.base.setColor({r:u,g:m,b:E,a:A}),v=this.base.setColor(t.rgba??{r:.2,g:.2,b:.2,a:.2});t.groupData.push({modelId:h,batchIds:f,playTimeColor:C,rgba:v})})})})}}class fp{base;constructor(e){this.base=e}attachTileset(e,t,n){const s=this.base.cesium;this.base.handler||(this.base.handler=new s.ScreenSpaceEventHandler(this.base.viewer.scene.canvas));const o=ri(e,n);o&&(this.base.tilesetMap[o]=e),t&&(this.base.selectedColor=t),this.bindInputs()}bindInputs(){if(!this.base.handler)return;const e=this.base.cesium;this.base.handler.setInputAction(async t=>{let n;try{n=this.base.viewer.scene.pick(t.position)}catch{}if(e.defined(n)&&n instanceof e.Cesium3DTileFeature){await this.base.clearSelection();const s=ri(n.tileset);if(!s||!this.base.tilesetMap[s])return;const o=this.base.getFeatureId(n);if(o==="-1")return;let r;const l=this.base.viewer.scene.pickPosition(t.position);if(e.defined(l)){const h=e.Cartographic.fromCartesian(l),p=e.Math.toDegrees(h.longitude),f=e.Math.toDegrees(h.latitude),u=h.height;r=[p,f,u]}const d=(this.base.hasSelectedFeaturesMap[s]||[]).filter(h=>h.rank!==0);if(this.base.hasSelectedFeaturesMap[s]=[...d,{batchId:o,selectedColor:this.base.selectedColor,rank:0,point:r}],this.base.setBaseStyle(s),await this.base.triggerSelectionChange(s),n.tileset.leiting?.selectedFn)if(n.tileset.leiting.node){const h=n.tileset.leiting.node.batchIdEIDInfos[o].elementID,p=n.tileset.leiting.node.nodeExtras.element[h];p.elementId=h,p.modelId=n.tileset.leiting.model.modelId,n.tileset.leiting.selectedFn({elementInfo:p,elementId:h,point:r,modelId:n.tileset.leiting.model.modelId,_propsData:p})}else n.tileset.leiting.selectedFn(null)}else await this.base.clearSelection()},e.ScreenSpaceEventType.LEFT_CLICK),this.base.handler.setInputAction(async t=>{let n;try{n=this.base.viewer.scene.pick(t.position)}catch{}if(e.defined(n)&&n instanceof e.Cesium3DTileFeature){const s=ri(n.tileset);if(!s||!this.base.tilesetMap[s])return;const o=this.base.getFeatureId(n);if(o==="-1")return;let r;const l=this.base.viewer.scene.pickPosition(t.position);if(e.defined(l)){const a=e.Cartographic.fromCartesian(l),d=e.Math.toDegrees(a.longitude),h=e.Math.toDegrees(a.latitude),p=a.height;r=[d,h,p]}await this.base.toggleMultiSelect(s,o,this.base.selectedColor,r)}},e.ScreenSpaceEventType.LEFT_CLICK,e.KeyboardEventModifier.CTRL),this.base.handler.setInputAction(t=>{this.base.ensureSelectionDiv();const n=this.base.viewer?.scene?.screenSpaceCameraController;n&&this.base.cameraControllerState===null&&(this.base.cameraControllerState={enableRotate:n.enableRotate,enableTilt:n.enableTilt,enableLook:n.enableLook},n.enableRotate=!1,n.enableTilt=!1,n.enableLook=!1),this.base.selectStart=this.base.cesium.Cartesian2.clone(t.position),this.base.selectEnd=null,this.base.selectionDiv&&this.base.selectStart&&(this.base.selectionDiv.style.left=`${this.base.selectStart.x}px`,this.base.selectionDiv.style.top=`${this.base.selectStart.y}px`,this.base.selectionDiv.style.width="0px",this.base.selectionDiv.style.height="0px",this.base.selectionDiv.style.display="block")},e.ScreenSpaceEventType.LEFT_DOWN,e.KeyboardEventModifier.CTRL),this.base.handler.setInputAction(t=>{if(!this.base.selectStart||!this.base.selectionDiv)return;const n=performance.now();if(n-this.base.lastDrawTime<20)return;this.base.lastDrawTime=n,this.base.selectEnd=this.base.cesium.Cartesian2.clone(t.endPosition);const s=Math.min(this.base.selectStart.x,this.base.selectEnd.x),o=Math.min(this.base.selectStart.y,this.base.selectEnd.y),r=Math.abs(this.base.selectStart.x-this.base.selectEnd.x),l=Math.abs(this.base.selectStart.y-this.base.selectEnd.y);this.base.selectionDiv.style.left=`${s}px`,this.base.selectionDiv.style.top=`${o}px`,this.base.selectionDiv.style.width=`${r}px`,this.base.selectionDiv.style.height=`${l}px`,this.base.selectionDiv.style.backgroundColor="rgba(0, 255, 255, 0.5)",this.base.selectionDiv.style.position="absolute",this.base.selectionDiv.style.zIndex="2"},e.ScreenSpaceEventType.MOUSE_MOVE,e.KeyboardEventModifier.CTRL),this.base.handler.setInputAction(async()=>{if(!this.base.selectStart||!this.base.selectionDiv)return;if(!this.base.selectStart||!this.base.selectEnd){this.base.selectionDiv.style.display="none";const n=this.base.viewer?.scene?.screenSpaceCameraController;n&&this.base.cameraControllerState!==null&&(n.enableRotate=this.base.cameraControllerState.enableRotate,n.enableTilt=this.base.cameraControllerState.enableTilt,n.enableLook=this.base.cameraControllerState.enableLook,this.base.cameraControllerState=null);return}this.base.selectionDiv.style.display="none",await this.base.selectTilesInRectangle(this.base.selectStart,this.base.selectEnd,this.base.selectedColor),this.base.viewer.scene.requestRender(),this.base.selectStart=null,this.base.selectEnd=null;const t=this.base.viewer?.scene?.screenSpaceCameraController;t&&this.base.cameraControllerState!==null&&(t.enableRotate=this.base.cameraControllerState.enableRotate,t.enableTilt=this.base.cameraControllerState.enableTilt,t.enableLook=this.base.cameraControllerState.enableLook,this.base.cameraControllerState=null)},e.ScreenSpaceEventType.LEFT_UP,e.KeyboardEventModifier.CTRL)}unbindInputs(){if(!this.base.handler)return;const e=this.base.cesium;this.base.handler.removeInputAction(e.ScreenSpaceEventType.LEFT_CLICK),this.base.handler.removeInputAction(e.ScreenSpaceEventType.LEFT_CLICK,e.KeyboardEventModifier.CTRL),this.base.handler.removeInputAction(e.ScreenSpaceEventType.LEFT_DOWN,e.KeyboardEventModifier.CTRL),this.base.handler.removeInputAction(e.ScreenSpaceEventType.MOUSE_MOVE,e.KeyboardEventModifier.CTRL),this.base.handler.removeInputAction(e.ScreenSpaceEventType.LEFT_UP,e.KeyboardEventModifier.CTRL)}}class pp{cesium;viewer;data;handler;selectedColor="rgba(255,0,0,1.0)";tilesetMap={};hasSelectedFeaturesMap={};colorRankColor=[];showStateMap={};selectedPosition={x:null,y:null};selectionDiv=null;lastDrawTime=0;selectStart=null;selectEnd=null;cameraControllerState=null;start=null;groupBatchIds={};recoverStaus=!1;mapAnimations={};clearedModelIds=new Set;eidToBatchIdMap={};batchIdToElementIdMap={};animationModule;selectionModule;onSelectionChangeCallbacks=[];loadNodeDetailsForModel;loadNodeDetailsCallback;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer,this.animationModule=new up(this),this.selectionModule=new fp(this)}attachTileset(e,t,n){this.selectionModule.attachTileset(e,t,n)}setLoadNodeDetailsCallback(e){this.loadNodeDetailsCallback=e}selectionChange(e){e&&typeof e=="function"&&this.onSelectionChangeCallbacks.push(e)}removeSelectionChange(e){this.onSelectionChangeCallbacks=this.onSelectionChangeCallbacks.filter(t=>t!==e)}async triggerSelectionChange(e){if(e)await this.loadNodeDetailsForModel(e);else{const t=Object.keys(this.hasSelectedFeaturesMap);t.length>0&&await Promise.all(t.map(n=>{try{return this.loadNodeDetailsForModel(n)}catch(s){return console.error(`Error loading node details for model ${n}:`,s),Promise.resolve()}}))}if(this.onSelectionChangeCallbacks.length>0){const t=await this.getSelected({rank:0});this.onSelectionChangeCallbacks.forEach(n=>{try{n(t)}catch(s){console.error("Selection callback error:",s)}})}}enableSelection(){this.selectionModule.bindInputs()}disableSelection(){this.selectionModule.unbindInputs()}async clearSelection(e){this.getTargetModelIds(e).forEach(n=>{const s=this.hasSelectedFeaturesMap[n];if(!s?.length)return;const o=s.filter(r=>r.rank!==0);o.length?(this.hasSelectedFeaturesMap[n]=o,this.setBaseStyle(n)):(delete this.hasSelectedFeaturesMap[n],this.applyShowStyleOnly(n))}),this.viewer.scene.requestRender(),await this.triggerSelectionChange(e)}clearExist(e){this.getTargetModelIds(e).forEach(n=>{const s=this.hasSelectedFeaturesMap[n];if(!s?.length)return;const o=s.filter(r=>r.rank!==1);o.length?(this.hasSelectedFeaturesMap[n]=o,this.setBaseStyle(n)):(delete this.hasSelectedFeaturesMap[n],this.applyShowStyleOnly(n))}),this.viewer.scene.requestRender()}clearProcess(e){this.getTargetModelIds(e).forEach(n=>{const s=this.hasSelectedFeaturesMap[n];if(!s?.length)return;const o=s.filter(r=>r.rank!==2);o.length?(this.hasSelectedFeaturesMap[n]=o,this.setBaseStyle(n)):(delete this.hasSelectedFeaturesMap[n],this.applyShowStyleOnly(n))}),this.viewer.scene.requestRender()}async clearAllHaveSelected(){this.getTargetModelIds().forEach(t=>{this.hasSelectedFeaturesMap[t]&&(delete this.hasSelectedFeaturesMap[t],this.applyShowStyleOnly(t))}),this.viewer.scene.requestRender(),await this.triggerSelectionChange()}async loadAllNodeDetailsForModel(){for(const e of Object.keys(this.tilesetMap))await this.loadNodeDetailsForModel(e)}getSelected(e){const t=e&&typeof e=="object"&&"rank"in e?e.rank:e,n=Pr(t),s=[];for(const o of Object.keys(this.hasSelectedFeaturesMap))(this.hasSelectedFeaturesMap[o]||[]).forEach(l=>{if(l.rank!==n)return;const a=ap(l.selectedColor);let d=this.getBatchIdToElementIdSync(l.batchId,o);d===null&&(d=l.batchId),s.push({elementId:d,modelId:o,rgba:a||void 0,point:l?.point||void 0})});return s}getBatchIdToElementIdSync(e,t){if(this.batchIdToElementIdMap[t])return this.batchIdToElementIdMap[t].get(e)??null;const s=this.tilesetMap[t]?.leiting?.node?.batchIdEIDInfos;if(s&&Array.isArray(s)){const o=new Map;return s.forEach(r=>{r&&r.elementID&&o.set(`${r.batchId}`,`${r.elementID}`)}),this.batchIdToElementIdMap[t]=o,o.get(e)??null}return null}setAllConstructionProgressTracking(e){this.animationModule.setAllConstructionProgressTracking(e)}initTime(){this.animationModule.initTime()}processAnimation(e,t,n,s=null){this.animationModule.processAnimation(e,t,n,s)}onTick=e=>{this.animationModule.onTick(e)};enableConstructionProgressTracking(){this.animationModule.enableConstructionProgressTracking()}disableConstructionProgressTracking(){this.animationModule.disableConstructionProgressTracking()}freshConstructionProgressTracking(){this.animationModule.freshConstructionProgressTracking()}reStartAnimation(){this.animationModule.reStartAnimation()}setTileSyltByConstructionProcessTracking({modelId:e,batchIds:t}){const n=this.tilesetMap[e];if(!n)return;const s=n?.style?.show?.conditionsExpression?.conditions;Array.isArray(t)&&t.length?s?n.style=new this.cesium.Cesium3DTileStyle({show:{conditions:s},color:{conditions:t}}):n.style=new this.cesium.Cesium3DTileStyle({color:{conditions:t}}):this.applyShowStyleOnly(e),this.viewer.scene.requestRender()}resumeFlyTo(){this.viewer.clock.shouldAnimate=!0}pauseFlyTo(){this.viewer.clock.shouldAnimate=!1}async flyToObjects({selectCpts:e,options:t}){if(!Array.isArray(e)||e.length===0)return;await this.clearSelection(),await this.setSelectColorUserModelCpt(e,{rank:0});const n=this.cesium,s=t?.scale??1,o=[];for(const r of e){const l=r?.modelId;if(l==null)continue;await this.loadNodeDetailsForModel(l);const a=r?.elementId,d=this.tilesetMap[`${l}`];if(!d)continue;const p=dp(d,a)||hp(d);if(!p)continue;const f=new n.Cartesian3(p.min.x,p.min.y,p.min.z),u=new n.Cartesian3(p.max.x,p.max.y,p.max.z),m=d?.root?.computedTransform??d?.modelMatrix;if(m){const E=n.Matrix4.multiplyByPoint(m,f,new n.Cartesian3),A=n.Matrix4.multiplyByPoint(m,u,new n.Cartesian3);o.push(E,A)}else o.push(f,u)}if(o.length){const r=n.BoundingSphere.fromPoints(o);r.radius=r.radius*s;const l=this.viewer.scene.camera,a=new n.HeadingPitchRange(l.heading,l.pitch,0);l.flyToBoundingSphere(r,{duration:t?.duration??0,complete:t?.complete,offset:a})}else{const r=e[0]?.modelId,l=r?this.tilesetMap[`${r}`]:null;l&&this.viewer.flyTo(l,{duration:t?.duration??0,complete:t?.complete})}}setBaseStyle(e){this.getTargetModelIds(e).forEach(n=>{this.setColorStyle(n)})}setColorStyle(e){this.updateTilesetStyle(e)}buildColorConditions(e){const t=this.tilesetMap[e],n=this.hasSelectedFeaturesMap[e];if(!t||!n?.length)return;const s=new Map;n.forEach(a=>{const d=s.get(a.batchId);(!d||a.rank>=d.rank)&&s.set(a.batchId,a)});const o=new Map;if(s.forEach(({batchId:a,selectedColor:d})=>{o.has(d)||o.set(d,new Set),o.get(d)?.add(a)}),this.colorRankColor.length){const a=new Set;this.colorRankColor.forEach(d=>{const h=o.get(d);h&&h.forEach(p=>a.add(p))}),o.forEach((d,h)=>{if(this.colorRankColor.includes(h))return;const p=new Set;d.forEach(f=>{a.has(f)||p.add(f)}),o.set(h,p)})}const r=[...this.colorRankColor.filter(a=>o.has(a)),...Array.from(o.keys()).filter(a=>!this.colorRankColor.includes(a))],l=[];return r.forEach(a=>{const d=o.get(a);if(!d||!d.size)return;const h=Array.from(d).join("|");h&&l.push([`(regExp('^(${h})$').test(\${id}))`,a])}),l.length?l:void 0}updateTilesetStyle(e){const t=this.tilesetMap[e];if(!t)return;t.colorBlendMode=this.cesium.Cesium3DTileColorBlendMode.REPLACE;const n=this.showStateMap[e],s=n?this.buildShowConditions(n.batchIds,n.mode):void 0,o=this.buildColorConditions(e);s||o?t.style=new this.cesium.Cesium3DTileStyle({show:s?{conditions:s}:void 0,color:o?{conditions:o}:void 0}):t.style=void 0,this.viewer.scene.requestRender()}setShowStyle(e){this.getTargetModelIds(e?.modelId).forEach(n=>{const s=this.showStateMap[n]||{batchIds:[],mode:"include"};this.showStateMap[n]={batchIds:e?.batchIds??s.batchIds,mode:e?.mode??s.mode},this.updateTilesetStyle(n)})}setColor(e){if(!e)return this.selectedColor;if(typeof e=="string")return e;const t=_t(Number(e.r)),n=_t(Number(e.g)),s=_t(Number(e.b)),o=Fr(e.a===void 0?1:Number(e.a));return is({r:t,g:n,b:s,a:o})||this.selectedColor}groupByModelId(e){const t={};return e.forEach(n=>{const s=n?.modelId,o=n?.elementId;if(s==null||o===void 0||o===null)return;const r=n?.color??n?.rgba,l=this.setColor(r??{r:.4,g:.4,b:.4,a:.1}),a=`${s}-${l}`;t[a]||(t[a]=[]),t[a].push(`${o}`)}),{allElements:t,transform:null,box:null}}getBatchId(e,t){const n=`${t}`,s=`${e}`;if(this.eidToBatchIdMap[n]){const a=this.eidToBatchIdMap[n].get(s);if(a!==void 0)return a;if(!a)return s}const r=this.tilesetMap[n]?.leiting?.node?.batchIdEIDInfos;if(r&&Array.isArray(r)){const a=new Map;r.forEach(h=>{a.set(`${h.elementID}`,`${h.batchId}`)}),this.eidToBatchIdMap[n]=a;const d=a.get(s);if(d!==void 0)return d}const l=lp(e);return l!=null?String(l):null}async setComponentVisibility(e){if(Array.isArray(e)){Object.keys(this.showStateMap).forEach(t=>{this.showStateMap[t]={batchIds:[],mode:"exclude"}});for(const t of e){const n=`${t.modelId}`;this.showStateMap[n]||(this.showStateMap[n]={batchIds:[],mode:"exclude"});const s=this.showStateMap[n];if(!t.show){const o=this.getBatchId(t.elementId,n);s.batchIds.push(o)}}Object.keys(this.showStateMap).forEach(t=>{this.updateTilesetStyle(t)})}}async isolateComponentVisibility(e){const t={};e.forEach(n=>{const s=`${n.modelId}`;t[s]||(t[s]=new Set),t[s].add(`${n.elementId}`)});for(const n of Object.keys(this.tilesetMap)){await this.loadNodeDetailsForModel(n);const o=this.tilesetMap[n]?.leiting?.node?.batchIdEIDInfos;if(!o)continue;this.showStateMap[n]={batchIds:[],mode:"exclude"};const r=t[n];if(r&&r.size>0){const l=[];for(const a of o)r.has(`${a.elementID}`)||l.push(`${a.batchId}`);this.showStateMap[n].batchIds=l;continue}this.showStateMap[n].batchIds=o.map(l=>l.batchId)}Object.keys(this.showStateMap).forEach(n=>{this.updateTilesetStyle(n)})}async setAllComponentsVisibility(e){const t=this.getTargetModelIds();for(const n of t)await this.loadNodeDetailsForModel(n),e?this.setShowStyle({modelId:n,batchIds:[],mode:"exclude"}):this.setShowStyle({modelId:n,batchIds:[],mode:"include"})}getComponentsByVisibility(e){const t=[];return Object.keys(this.showStateMap).forEach(n=>{const s=this.showStateMap[n],o=this.tilesetMap[n];if(!o?.leiting?.node?.batchIdEIDInfos)return;const r=o.leiting.node.batchIdEIDInfos,l=new Set(s?.batchIds??[]);r.forEach(a=>{const d=l.has(`${a.batchId}`);(s?.mode==="include"?d:!d)===e&&t.push({elementId:`${a.elementID}`,modelId:n})})}),t}getTileSyltByConstructionProcessTracking({elementIds:e,modelId:t,color:n,colorRank:s,show:o,selectionRank:r}){const l=this.tilesetMap[t];if(!Array.isArray(e))return[];const a=l.leiting.node,d=new Set(e),h=a.batchIdEIDInfos.filter(f=>d.has(`${f.elementID}`)).map(f=>String(f.batchId));return h.length?(s===kr.normal&&!this.colorRankColor.includes(n)&&(this.colorRankColor=[n]),[[`(regExp('^(${h.join("|")})$').test(\${id}))`,n]]):[]}async setSelectColorUserModelCpt(e,t){if(!Array.isArray(e))return;const n=new Map,s=t?.rank===void 0?"exist":t?.rank,o=Pr(s);for(const r of e){const l=r?.modelId;if(l==null)continue;const a=`${l}`;await this.loadNodeDetailsForModel(a);const d=Array.isArray(r?.elementIds)?r.elementIds:r?.elementId?[r.elementId]:[];if(!d.length)continue;const h=is(r?.rgba)||this.selectedColor;for(const p of d){const f=this.getBatchId(p,a);f!==null&&(n.has(a)||n.set(a,[]),n.get(a)?.push({batchId:f,selectedColor:h,rank:o}))}}for(const[r,l]of n){const a=this.mergeSelections(r,l);this.hasSelectedFeaturesMap[r]=a,this.setBaseStyle(r)}await this.triggerSelectionChange()}async setAllSelectColorUserModelCpt({modelId:e,rgba:t}){if(!e)return;await this.loadNodeDetailsForModel(e);const n=String(e),s=this.tilesetMap[n];if(!s)return;const o=s?.leiting?.node?.batchIdEIDInfos;if(!o||!Array.isArray(o))return;const r=[];o.forEach(l=>{l&&l.elementID!==void 0&&r.push(l.elementID)}),r.length!==0&&await this.setSelectColorUserModelCpt([{modelId:n,elementIds:r,rgba:t}],{rank:0})}getFeatureId(e){if(this.cesium.defined(e)&&this.cesium.defined(e.getProperty)){const t=e.getProperty("id");return t!=null?String(t):"-1"}return"-1"}getTargetModelIds(e){return e?[e]:Object.keys(this.tilesetMap)}buildShowConditions(e,t){const n=e.join("|");return n?t==="include"?[[`(regExp('^(${n})$').test(\${id}))`,"true"],["true","false"]]:[[`(regExp('^(${n})$').test(\${id}))`,"false"],["true","true"]]:t==="include"?[["true","false"]]:void 0}applyShowStyleOnly(e){const t=this.tilesetMap[e];if(!t)return;const n=this.showStateMap[e],s=n?this.buildShowConditions(n.batchIds,n.mode):void 0;s?t.style=new this.cesium.Cesium3DTileStyle({show:{conditions:s}}):t.style=void 0}setSelectedColorRgba(e,t,n,s=1){const o=_t(e),r=_t(t),l=_t(n),a=Fr(s),d=is({r:o,g:r,b:l,a});d&&(this.selectedColor=d)}mergeSelections(e,t){const n=new Map;return(this.hasSelectedFeaturesMap[e]||[]).forEach(o=>n.set(o.batchId,o)),t.forEach(o=>{const r=n.get(o.batchId);(!r||o.rank>r.rank||o.rank===r.rank)&&n.set(o.batchId,o)}),Array.from(n.values())}async toggleMultiSelect(e,t,n,s){const o=this.hasSelectedFeaturesMap[e]||[],r=o.filter(p=>p.rank!==0),l=o.filter(p=>p.rank===0),d=l.some(p=>p.batchId===t)?l.filter(p=>p.batchId!==t):[...l,{batchId:t,selectedColor:n,rank:0,point:s}],h=[...r,...d];h.length?(this.hasSelectedFeaturesMap[e]=h,this.setBaseStyle(e)):(delete this.hasSelectedFeaturesMap[e],this.applyShowStyleOnly(e)),await this.triggerSelectionChange(e)}ensureSelectionDiv(){if(this.selectionDiv)return;const e=document.createElement("div");e.style.display="none",e.style.pointerEvents="none",e.style.border="1px solid rgba(0, 255, 255, 0.8)",this.viewer.container.appendChild(e),this.selectionDiv=e}isRepeatedClick(e){const t=e?.position;return!t||typeof t.x!="number"||typeof t.y!="number"?!1:this.selectedPosition.x===t.x&&this.selectedPosition.y===t.y?!0:(this.selectedPosition.x=t.x,this.selectedPosition.y=t.y,!1)}async selectTilesInRectangle(e,t,n){const s=Math.min(e.x,t.x),o=Math.max(e.x,t.x),r=Math.min(e.y,t.y),l=Math.max(e.y,t.y),a=o-s,d=l-r;if(Math.abs(a)<15||Math.abs(d)<15)return;const h=s+a/2,p=r+d/2,f=new this.cesium.Cartesian2(h,p),u=this.viewer.scene.drillPick(f,void 0,a,d);if(!Array.isArray(u))return;const m=new Map;u.forEach(E=>{if(!(E instanceof this.cesium.Cesium3DTileFeature))return;const A=ri(E.tileset);if(!A||!this.tilesetMap[A])return;const C=this.getFeatureId(E);C!=="-1"&&(m.has(A)||m.set(A,new Set),m.get(A)?.add(C))}),m.forEach((E,A)=>{const C=this.hasSelectedFeaturesMap[A]||[],v=C.filter(I=>I.rank!==0),S=new Set(C.filter(I=>I.rank===0).map(I=>I.batchId)),D=[];E.forEach(I=>{S.has(I)||D.push({batchId:I,selectedColor:n,rank:0})});const O=C.filter(I=>I.rank===0);this.hasSelectedFeaturesMap[A]=[...v,...O,...D],this.setBaseStyle(A)}),await this.triggerSelectionChange()}}class gp{cesium;viewer;tilesetMap={};planeEntities=[];clippingPlanesMap={};activeModelIds=new Set;boxMatrix=null;boxInverseMatrix=null;boxCenter=null;boxOrientation=null;targetZPlus=0;targetZMinus=0;targetXPlus=0;targetXMinus=0;targetYPlus=0;targetYMinus=0;currentPlaneType="";selectedPlane=null;hoveredPlane=null;dragStartPoint=null;moveCallBack=null;downHandler=null;upHandler=null;moveHandler=null;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer}attachTileset(e,t){this.tilesetMap[t]=e}open(e,t){!this.tilesetMap[e]||this.activeModelIds.has(e)||(this.activeModelIds.add(e),this.moveCallBack=t?.moveCallBack,this.fitToModels(),this.activeModelIds.size===1&&(this.createPlaneEntities(),this.initEventHandlers()))}setupClippingPlanes(e){const t=this.cesium,n=this.tilesetMap[e];if(!n||!this.boxMatrix)return;const s=new t.ClippingPlaneCollection({planes:[new t.ClippingPlane(new t.Cartesian3(1,0,0),this.targetXMinus),new t.ClippingPlane(new t.Cartesian3(-1,0,0),this.targetXPlus),new t.ClippingPlane(new t.Cartesian3(0,1,0),this.targetYMinus),new t.ClippingPlane(new t.Cartesian3(0,-1,0),this.targetYPlus),new t.ClippingPlane(new t.Cartesian3(0,0,1),this.targetZMinus),new t.ClippingPlane(new t.Cartesian3(0,0,-1),this.targetZPlus)],edgeWidth:2,edgeColor:t.Color.WHITE,enabled:!0,unionClippingRegions:!0}),o=t.Matrix4.inverse(n.root.transform,new t.Matrix4);s.modelMatrix=t.Matrix4.multiply(o,this.boxMatrix,new t.Matrix4),n.clippingPlanes=s,this.clippingPlanesMap[e]=s}createPlaneEntities(){const e=this.cesium,t=this.viewer;this.planeEntities.forEach(s=>t.entities.remove(s)),this.planeEntities=[];const n=["left","right","behind","front","top","down"];for(const s of n){const o=t.entities.add({name:s,position:new e.CallbackProperty(()=>{if(!this.boxMatrix)return e.Cartesian3.ZERO;const r=this.getPlaneOffsetCartesian(s);return e.Matrix4.multiplyByPoint(this.boxMatrix,r,new e.Cartesian3)},!1),orientation:new e.CallbackProperty(()=>this.boxOrientation||e.Quaternion.IDENTITY,!1),plane:{dimensions:new e.CallbackProperty(()=>{if(this.activeModelIds.size===0)return new e.Cartesian2(0,0);const r=.1,l=Math.max(r,this.targetXMinus+this.targetXPlus),a=Math.max(r,this.targetYPlus+this.targetYMinus),d=Math.max(r,this.targetZPlus+this.targetZMinus);return s==="top"||s==="down"?new e.Cartesian2(l,a):s==="left"||s==="right"?new e.Cartesian2(a,d):new e.Cartesian2(l,d)},!1),material:e.Color.WHITE.withAlpha(.1),outline:!0,outlineColor:e.Color.YELLOW,plane:new e.CallbackProperty(()=>new e.Plane(this.getNormalByType(s),0),!1)}});this.planeEntities.push(o)}}getPlaneOffsetCartesian(e){const t=(this.targetXPlus-this.targetXMinus)/2,n=(this.targetYPlus-this.targetYMinus)/2,s=(this.targetZPlus-this.targetZMinus)/2;switch(e){case"left":return new this.cesium.Cartesian3(-this.targetXMinus,n,s);case"right":return new this.cesium.Cartesian3(this.targetXPlus,n,s);case"behind":return new this.cesium.Cartesian3(t,-this.targetYMinus,s);case"front":return new this.cesium.Cartesian3(t,this.targetYPlus,s);case"top":return new this.cesium.Cartesian3(t,n,this.targetZPlus);case"down":return new this.cesium.Cartesian3(t,n,-this.targetZMinus);default:return this.cesium.Cartesian3.ZERO}}getNormalByType(e){const t=this.cesium;switch(e){case"left":return new t.Cartesian3(1,0,0);case"right":return new t.Cartesian3(-1,0,0);case"behind":return new t.Cartesian3(0,1,0);case"front":return new t.Cartesian3(0,-1,0);case"top":return new t.Cartesian3(0,0,-1);case"down":return new t.Cartesian3(0,0,1);default:return t.Cartesian3.UNIT_X}}getPlaneByType(e){const t=this.cesium,n=this.getNormalByType(e),s=t.Cartesian3.negate(n,new t.Cartesian3);let o=0;switch(e){case"left":o=this.targetXMinus;break;case"right":o=this.targetXPlus;break;case"behind":o=this.targetYMinus;break;case"front":o=this.targetYPlus;break;case"top":o=this.targetZPlus;break;case"down":o=this.targetZMinus;break}return new t.Plane(s,-o)}initEventHandlers(){const e=this.cesium,t=this.viewer.scene.canvas,n=this.viewer.scene;this.downHandler=new e.ScreenSpaceEventHandler(t),this.upHandler=new e.ScreenSpaceEventHandler(t),this.moveHandler=new e.ScreenSpaceEventHandler(t),this.moveHandler.setInputAction(s=>{if(this.selectedPlane)return;let o;try{o=n.pick(s.endPosition)}catch{}e.defined(o)&&o.id&&o.id.plane?this.hoveredPlane!==o.id.plane&&(this.hoveredPlane&&(this.hoveredPlane.material=e.Color.WHITE.withAlpha(.1)),this.hoveredPlane=o.id.plane,this.hoveredPlane.material=e.Color.YELLOW.withAlpha(.3),t.style.cursor="pointer"):this.hoveredPlane&&(this.hoveredPlane.material=e.Color.WHITE.withAlpha(.1),this.hoveredPlane=null,t.style.cursor="default")},e.ScreenSpaceEventType.MOUSE_MOVE),this.downHandler.setInputAction(s=>{let o;try{o=n.pick(s.position)}catch{}if(e.defined(o)&&o.id&&o.id.plane){this.currentPlaneType=o.id.name,this.selectedPlane=o.id.plane,this.selectedPlane.material=e.Color.RED.withAlpha(.4),n.screenSpaceCameraController.enableInputs=!1;const r=n.camera.getPickRay(s.position),l=this.boxInverseMatrix,a=e.Matrix4.multiplyByPoint(l,r.origin,new e.Cartesian3),d=e.Matrix4.multiplyByPointAsVector(l,r.direction,new e.Cartesian3);e.Cartesian3.normalize(d,d);const h=new e.Ray(a,d),p=this.getPlaneByType(this.currentPlaneType);this.dragStartPoint=e.IntersectionTests.rayPlane(h,p,new e.Cartesian3),this.dragStartPoint||(this.dragStartPoint=this.getPlaneOffsetCartesian(this.currentPlaneType))}},e.ScreenSpaceEventType.LEFT_DOWN),this.moveHandler.setInputAction(s=>{if(!this.selectedPlane||!this.dragStartPoint)return;const o=n.camera.getPickRay(s.endPosition),r=this.boxInverseMatrix,l=e.Matrix4.multiplyByPoint(r,o.origin,new e.Cartesian3),a=e.Matrix4.multiplyByPointAsVector(r,o.direction,new e.Cartesian3);e.Cartesian3.normalize(a,a);const d=new e.Ray(l,a);let h=new e.Cartesian3;this.currentPlaneType==="top"||this.currentPlaneType==="down"?h=Math.abs(a.x)>Math.abs(a.y)?e.Cartesian3.UNIT_X:e.Cartesian3.UNIT_Y:this.currentPlaneType==="left"||this.currentPlaneType==="right"?h=Math.abs(a.y)>Math.abs(a.z)?e.Cartesian3.UNIT_Y:e.Cartesian3.UNIT_Z:h=Math.abs(a.x)>Math.abs(a.z)?e.Cartesian3.UNIT_X:e.Cartesian3.UNIT_Z;const p=-e.Cartesian3.dot(this.dragStartPoint,h),f=new e.Plane(h,p);let u=e.IntersectionTests.rayPlane(d,f,new e.Cartesian3);if(!u){const E=h===e.Cartesian3.UNIT_X?e.Cartesian3.UNIT_Y:h===e.Cartesian3.UNIT_Y&&(this.currentPlaneType==="top"||this.currentPlaneType==="down")?e.Cartesian3.UNIT_X:e.Cartesian3.UNIT_Z,A=-e.Cartesian3.dot(this.dragStartPoint,E);u=e.IntersectionTests.rayPlane(d,new e.Plane(E,A),new e.Cartesian3)}if(!u)return;const m=.01;switch(this.currentPlaneType){case"left":this.targetXMinus=Math.max(-this.targetXPlus+m,-u.x);break;case"right":this.targetXPlus=Math.max(-this.targetXMinus+m,u.x);break;case"behind":this.targetYMinus=Math.max(-this.targetYPlus+m,-u.y);break;case"front":this.targetYPlus=Math.max(-this.targetYMinus+m,u.y);break;case"top":this.targetZPlus=Math.max(-this.targetZMinus+m,u.z);break;case"down":this.targetZMinus=Math.max(-this.targetZPlus+m,-u.z);break}this.syncClippingPlanes(),this.moveCallBack&&this.moveCallBack(this.getRangeParams())},e.ScreenSpaceEventType.MOUSE_MOVE),this.upHandler.setInputAction(()=>{this.selectedPlane&&(this.selectedPlane.material=e.Color.WHITE.withAlpha(.1),this.selectedPlane=null,this.currentPlaneType="",this.dragStartPoint=null),n.screenSpaceCameraController.enableInputs=!0,t.style.cursor="default"},e.ScreenSpaceEventType.LEFT_UP)}syncClippingPlanes(){this.activeModelIds.size!==0&&Object.keys(this.clippingPlanesMap).forEach(e=>{const t=this.clippingPlanesMap[e],n=this.tilesetMap[e];if(t&&n&&!t.isDestroyed()){const s=this.cesium;t.get(0).distance=this.targetXMinus,t.get(1).distance=this.targetXPlus,t.get(2).distance=this.targetYMinus,t.get(3).distance=this.targetYPlus,t.get(4).distance=this.targetZMinus,t.get(5).distance=this.targetZPlus;const o=s.Matrix4.inverse(n.root.transform,new s.Matrix4);t.modelMatrix=s.Matrix4.multiply(o,this.boxMatrix,new s.Matrix4)}})}fitToModels(){const e=this.cesium;if(this.activeModelIds.size===0)return;let t=[];if(this.activeModelIds.forEach(p=>{const f=this.tilesetMap[p];f&&f.boundingSphere&&t.push(f.boundingSphere.center)}),t.length===0)return;const n=new e.Cartesian3;t.forEach(p=>e.Cartesian3.add(n,p,n)),this.boxCenter=e.Cartesian3.divideByScalar(n,t.length,new e.Cartesian3),this.boxMatrix=e.Transforms.eastNorthUpToFixedFrame(this.boxCenter),this.boxInverseMatrix=e.Matrix4.inverse(this.boxMatrix,new e.Matrix4),this.boxOrientation=e.Quaternion.fromRotationMatrix(e.Matrix4.getMatrix3(this.boxMatrix,new e.Matrix3));let s=1/0,o=-1/0,r=1/0,l=-1/0,a=1/0,d=-1/0;this.activeModelIds.forEach(p=>{const f=this.tilesetMap[p];if(!f)return;const u=[],m=f.leiting?.box,E=f.root?.boundingVolume?.boundingVolume;if(m&&m.min&&m.max){const{min:A,max:C}=m,v=[new e.Cartesian3(A.x,A.y,A.z),new e.Cartesian3(C.x,A.y,A.z),new e.Cartesian3(A.x,C.y,A.z),new e.Cartesian3(C.x,C.y,A.z),new e.Cartesian3(A.x,A.y,C.z),new e.Cartesian3(C.x,A.y,C.z),new e.Cartesian3(A.x,C.y,C.z),new e.Cartesian3(C.x,C.y,C.z)],S=f.root.transform;v.forEach(D=>{u.push(e.Matrix4.multiplyByPoint(S,D,new e.Cartesian3))})}else if(E&&E.halfAxes){const A=E.center,C=E.halfAxes,v=e.Matrix3.getColumn(C,0,new e.Cartesian3),S=e.Matrix3.getColumn(C,1,new e.Cartesian3),D=e.Matrix3.getColumn(C,2,new e.Cartesian3);for(let O=0;O<8;O++){const I=e.Cartesian3.clone(A,new e.Cartesian3);e.Cartesian3.add(I,e.Cartesian3.multiplyByScalar(v,O&1?1:-1,new e.Cartesian3),I),e.Cartesian3.add(I,e.Cartesian3.multiplyByScalar(S,O&2?1:-1,new e.Cartesian3),I),e.Cartesian3.add(I,e.Cartesian3.multiplyByScalar(D,O&4?1:-1,new e.Cartesian3),I),u.push(I)}}else if(f.boundingSphere){const A=f.boundingSphere,C=A.center,v=A.radius,S=e.Matrix4.multiplyByPoint(this.boxInverseMatrix,C,new e.Cartesian3);s=Math.min(s,S.x-v),o=Math.max(o,S.x+v),r=Math.min(r,S.y-v),l=Math.max(l,S.y+v),a=Math.min(a,S.z-v),d=Math.max(d,S.z+v)}u.forEach(A=>{const C=e.Matrix4.multiplyByPoint(this.boxInverseMatrix,A,new e.Cartesian3);s=Math.min(s,C.x),o=Math.max(o,C.x),r=Math.min(r,C.y),l=Math.max(l,C.y),a=Math.min(a,C.z),d=Math.max(d,C.z)})});const h=1.01;this.targetXMinus=Math.abs(s)*h,this.targetXPlus=Math.abs(o)*h,this.targetYMinus=Math.abs(r)*h,this.targetYPlus=Math.abs(l)*h,this.targetZMinus=Math.abs(a)*h,this.targetZPlus=Math.abs(d)*h,this.activeModelIds.forEach(p=>{this.setupClippingPlanes(p)}),this.viewer.scene.requestRender()}getRangeParams(){const e=this.cesium;return{targetZPlus:this.targetZPlus,targetZMinus:this.targetZMinus,targetXPlus:this.targetXPlus,targetXMinus:this.targetXMinus,targetYPlus:this.targetYPlus,targetYMinus:this.targetYMinus,maxBox:new e.Cartesian3(this.targetXPlus,this.targetYPlus,this.targetZPlus),minBox:new e.Cartesian3(-this.targetXMinus,-this.targetYMinus,-this.targetZMinus)}}updateRange(e){if(!this.boxMatrix)return;e.targetXMinus!==void 0&&(this.targetXMinus=e.targetXMinus),e.targetXPlus!==void 0&&(this.targetXPlus=e.targetXPlus),e.targetYMinus!==void 0&&(this.targetYMinus=e.targetYMinus),e.targetYPlus!==void 0&&(this.targetYPlus=e.targetYPlus),e.targetZPlus!==void 0&&(this.targetZPlus=e.targetZPlus),e.targetZMinus!==void 0&&(this.targetZMinus=e.targetZMinus);const t=.1;this.targetXMinus+this.targetXPlus<t&&(this.targetXPlus=t-this.targetXMinus),this.targetYPlus+this.targetYMinus<t&&(this.targetYPlus=t-this.targetYMinus),this.targetZPlus+this.targetZMinus<t&&(this.targetZPlus=t-this.targetZMinus),this.syncClippingPlanes(),this.viewer.scene.requestRender()}getRange(){return this.getRangeParams()}setBoxVisibility(e){this.planeEntities.forEach(t=>{t.show=e}),this.viewer.scene.requestRender()}close(e){if(e){const t=this.tilesetMap[e];t&&(t.clippingPlanes&&(t.clippingPlanes.enabled=!1),t.clippingPlanes=void 0),delete this.clippingPlanesMap[e],this.activeModelIds.delete(e),this.activeModelIds.size>0&&this.fitToModels()}else Object.keys(this.clippingPlanesMap).forEach(t=>{const n=this.tilesetMap[t];n&&(n.clippingPlanes&&(n.clippingPlanes.enabled=!1),n.clippingPlanes=void 0)}),this.clippingPlanesMap={},this.activeModelIds.clear();this.activeModelIds.size===0&&(this.planeEntities.forEach(t=>{this.viewer.entities.remove(t)}),this.planeEntities=[],this.destroyEventHandlers(),this.boxMatrix=null,this.boxInverseMatrix=null),this.viewer.scene.requestRender()}destroyEventHandlers(){this.downHandler?.destroy(),this.upHandler?.destroy(),this.moveHandler?.destroy(),this.downHandler=this.upHandler=this.moveHandler=null}}let ss=performance.now();const mp=10;class Ap{cesium;viewer;modelInfo={modelName:"Person",modelId:"player_111",url:"person/model.glb",scale:.0032};startTime=0;radian=0;speed=.1;speedVector;position;hpRoll;cameralHpRoll;fixedFrameTransforms;model;transparentTest=!0;gravityTestByMove=!1;gravityTest=!0;lastMoveTime=0;moveInterval=.01;collisionTest=!0;wheelCount=2;isLeftDragging=!1;lastScreenY=0;lastScreenX=0;pauseAnimationFn;resumeAnimationFn;selectedColor;selectedColorRecover;handler;moveState={moveFront:!1,moveBack:!1,moveLeft:!1,moveRight:!1,moveUp:!1,moveDown:!1};onLoading=null;onSuccess=null;onError=null;constructor({cesium:e,viewer:t,modelInfo:n,callbacks:s}){this.cesium=e,this.viewer=t,this.radian=this.cesium.Math.toRadians(4),this.speedVector=new this.cesium.Cartesian3,this.position=new this.cesium.Cartesian3,this.hpRoll=new this.cesium.HeadingPitchRoll,this.cameralHpRoll=new this.cesium.HeadingPitchRoll,this.fixedFrameTransforms=new this.cesium.Transforms.localFrameToFixedFrameGenerator("north","west"),n&&(this.modelInfo=Object.assign(this.modelInfo,n)),s&&(this.onLoading=s.onLoading||null,this.onSuccess=s.onSuccess||null,this.onError=s.onError||null),this.selectedColor=new this.cesium.Color(1,1,1,.4),this.selectedColorRecover=new this.cesium.Color(1,1,1,1);const o=this.viewer.scene.canvas;this.handler=new this.cesium.ScreenSpaceEventHandler(o)}getModel(){return this.model}setPauseAnimation(e){this.pauseAnimationFn=e}setResumeAnimationFn(e){this.resumeAnimationFn=e}async setPersonPosition(e){e&&(this.position=e),this.getModel()?(this.model.modelMatrix=this.cesium.Transforms.headingPitchRollToFixedFrame(e,this.hpRoll,this.cesium.Ellipsoid.WGS84,this.fixedFrameTransforms),this.model.show=!0,this.initKeyBoard()):await this.openPlayer(),this.setCameralDefault(!1)}setModelInfo(e){e&&(this.modelInfo=Object.assign(this.modelInfo,e))}async openPlayer(){if(this.enablePositionSelection(),this.model){this.model.show=!0,this.initKeyBoard(),this.setCameralDefault(!1);return}this.position&&!(this.position.x===0&&this.position.y===0&&this.position.z===0)?(await this.loadModel(),this.initKeyBoard(),this.setCameralDefault(!1)):this.onLoading&&this.onLoading("请按住 Ctrl + 左键点击场景选择初始位置...")}enablePositionSelection(){this._positionHandler&&(this._positionHandler.destroy(),this._positionHandler=null);const e=new this.cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);e.setInputAction(async t=>{const n=this.viewer.scene;let s;try{s=n.pickPosition(t.position)}catch(o){console.warn("pickPosition failed:",o)}s&&(this.position=s,this.model?(this.model.modelMatrix=this.cesium.Transforms.headingPitchRollToFixedFrame(this.position,this.hpRoll,this.cesium.Ellipsoid.WGS84,this.fixedFrameTransforms),this.updatedCamera(),this.onSuccess&&this.onSuccess("已更新漫游位置")):(this.onSuccess&&this.onSuccess("位置已选择,正在加载模型..."),await this.loadModel(),this.initKeyBoard(),this.setCameralDefault(!1)))},this.cesium.ScreenSpaceEventType.LEFT_CLICK,this.cesium.KeyboardEventModifier.CTRL),this._positionHandler=e}_positionHandler;setDefaultPosition(){const e=this.viewer.scene,t=this.viewer.camera,n=new this.cesium.Cartesian2(e.canvas.clientWidth/2,e.canvas.clientHeight/2);let s;try{s=e.pickPosition(n)}catch(o){console.warn("pickPosition failed:",o)}if(s)this.position=s;else{const o=t.direction,l=this.cesium.Cartesian3.add(t.positionWC,this.cesium.Cartesian3.multiplyByScalar(o,10,new this.cesium.Cartesian3),new this.cesium.Cartesian3);this.position=l}}async loadModel(){let e;try{this.onLoading&&this.onLoading("正在加载漫游人物...");const t=await this.cesium.Model.fromGltfAsync({id:this.modelInfo.modelId,url:this.modelInfo.url,modelMatrix:this.cesium.Transforms.headingPitchRollToFixedFrame(this.position,this.hpRoll,this.cesium.Ellipsoid.WGS84,this.fixedFrameTransforms),scale:this.modelInfo.scale,allowPicking:!1,debugShowBoundingVolume:!1,debugWireframe:!1,cull:!1,gltfCallback:s=>{e=s.animations},backFaceCulling:!1}),n=()=>{if(e&&e.length>0){console.log("Model has animations:",e.length);try{t.activeAnimations.add({index:0,loop:this.cesium.ModelAnimationLoop.REPEAT,multiplier:1})}catch(s){console.error("Failed to add animation:",s)}this.pauseAnimationFn=()=>{this.viewer.clock.shouldAnimate=!1},this.resumeAnimationFn=()=>{this.viewer.clock.shouldAnimate=!0},this.viewer.clock.shouldAnimate=!1}else console.warn("No animations found in the model.")};t.ready?n():t.readyEvent.addEventListener(n),this.model=await this.viewer.scene.primitives.add(t),this.updatedCamera(),this.onLoading&&this.onLoading(""),this.onSuccess&&this.onSuccess("漫游模型加载完成")}catch(t){console.error("Failed to load model:",t),this.onLoading&&this.onLoading(""),this.onError&&this.onError("漫游模型加载失败")}}initKeyBoard(){const e=this.handler,t=this.cesium;ss=performance.now();const n=(o,r)=>{const l=o.code,a=o.keyCode;l==="KeyA"||a===65?this.moveState.moveLeft=r:l==="KeyW"||a===87?this.moveState.moveFront=r:l==="KeyD"||a===68?this.moveState.moveRight=r:l==="KeyS"||a===83?this.moveState.moveBack=r:l==="KeyQ"||a===81?this.moveState.moveUp=r:(l==="KeyE"||a===69)&&(this.moveState.moveDown=r)};e.setInputAction(o=>{this.wheelCount-=o*.001,this.wheelCount<.1&&(this.wheelCount=.1),this.updatedCamera()},t.ScreenSpaceEventType.WHEEL),this._keydownHandler=o=>{o.target.tagName==="INPUT"||o.target.tagName==="TEXTAREA"||(n(o,!0),this.resumeAnimationFn&&this.resumeAnimationFn())},this._keyupHandler=o=>{o.target.tagName==="INPUT"||o.target.tagName==="TEXTAREA"||(n(o,!1),Object.keys(this.moveState).every(r=>this.moveState[r]==!1)&&this.pauseAnimationFn&&this.pauseAnimationFn())},document.addEventListener("keydown",this._keydownHandler),document.addEventListener("keyup",this._keyupHandler),e.setInputAction(o=>{this.isLeftDragging=!0,this.lastScreenY=o.position.y,this.lastScreenX=o.position.x},this.cesium.ScreenSpaceEventType.LEFT_DOWN),e.setInputAction(o=>{if(!this.isLeftDragging)return;const r=o.endPosition.x,l=o.endPosition.y,a=l-this.lastScreenY,d=r-this.lastScreenX;Math.abs(a)<Math.abs(d)&&(d>0?(this.cameralHpRoll.heading+=this.radian,this.hpRoll.heading+=this.radian):(this.cameralHpRoll.heading-=this.radian,this.hpRoll.heading-=this.radian),s(0),this.lastScreenX=r),this.lastScreenY=l;const h=this.viewer.camera;this.cameralHpRoll.pitch=h.pitch+this.cesium.Math.toRadians(-a*.1),this.updatedCamera()},t.ScreenSpaceEventType.MOUSE_MOVE),e.setInputAction(()=>{this.isLeftDragging&&(this.isLeftDragging=!1)},t.ScreenSpaceEventType.LEFT_UP);const s=o=>{const r=performance.now();if(r-ss<mp)return;ss=r;const l=1.75;if(o===1?(this.speedVector=this.cesium.Cartesian3.multiplyByScalar(this.cesium.Cartesian3.UNIT_X,this.speed,this.speedVector),this.gravityTestByMove=!0):o===-1?(this.speedVector=this.cesium.Cartesian3.multiplyByScalar(this.cesium.Cartesian3.UNIT_X,-this.speed,this.speedVector),this.gravityTestByMove=!0):o===0?(this.speedVector=this.cesium.Cartesian3.multiplyByScalar(this.cesium.Cartesian3.UNIT_X,0,this.speedVector),this.gravityTestByMove=!1):o===2?(this.speedVector=this.cesium.Cartesian3.multiplyByScalar(this.cesium.Cartesian3.UNIT_Z,.05,this.speedVector),this.gravityTestByMove=!1):o===-2&&(this.speedVector=this.cesium.Cartesian3.multiplyByScalar(this.cesium.Cartesian3.UNIT_Z,-.05,this.speedVector),this.gravityTestByMove=!1),!this.viewer||!this.model)return;const a=(h,p)=>new this.cesium.Ray(h,p),d=new this.cesium.Cartesian3;if(this.cesium.Matrix4.getColumn(this.model.modelMatrix,0,d),this.cesium.Cartesian3.normalize(d,d),Math.abs(o)!=2&&this.collisionTest){const h=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),p=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,l),h),f=a(p,d),u=this.viewer.scene.pickFromRay(f,[this.model],1);if(u&&u.position&&this.cesium.Cartesian3.distance(p,u.position)<.9&&o===1)return}if(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,this.speedVector,this.position),this.cesium.Transforms.headingPitchRollToFixedFrame(this.position,this.hpRoll,this.cesium.Ellipsoid.WGS84,this.fixedFrameTransforms,this.model.modelMatrix),this.gravityTest){const h=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),p=.5,f=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,p),h),u=new this.cesium.Cartesian3;this.cesium.Cartesian3.subtract(this.position,f,u),this.cesium.Cartesian3.normalize(u,u);const m=a(f,u),E=this.viewer.scene.pickFromRay(m,[this.model],1),A=l,C=this.cesium.Cartesian3.add(f,this.cesium.Cartesian3.multiplyByScalar(d,A,new this.cesium.Cartesian3),new this.cesium.Cartesian3);if(t.defined(E)){const v=t.Cartesian3.distance(f,E.position);v-p>.2&&(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,-.2),this.position)),v-p<-.1&&v<2&&(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,.2),this.position))}if(!E&&this.gravityTestByMove){const v=a(this.position,u),S=this.viewer.scene.pickFromRay(v,[this.model],1);if(S){const D=this.cesium.Cartesian3.distance(this.position,S.position);Math.abs(D-1)>.05&&D<2&&(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,-.2),this.position))}}if(E&&this.gravityTestByMove&&this.gravityTest){const v=this.cesium.Cartesian3.distance(C,E.position);Math.abs(v-l)>.1&&(this.cesium.Transforms.headingPitchRollToFixedFrame(this.position,this.hpRoll,this.cesium.Ellipsoid.WGS84,this.fixedFrameTransforms,this.model.modelMatrix),this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,(l-v)/Math.abs(l-v)*.05),this.position))}}if(this.transparentTest){const h=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),p=1.75,f=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,p),h),u=this.viewer.camera.positionWC,m=f,E=t.Cartesian3.subtract(m,u,new t.Cartesian3),A=t.Cartesian3.distance(f,u),C=t.Cartesian3.normalize(E,new t.Cartesian3),v=new t.Ray(u,C);let S;try{S=this.viewer.scene.pickFromRay(v,void 0,1)}catch{}t.defined(S)&&S.primitive!==this.model&&S.position&&t.Cartesian3.distance(u,S.position)<A&&(this.wheelCount-=.1,this.wheelCount<.1&&(this.wheelCount=.1))}this.cesium.Transforms.headingPitchRollToFixedFrame(this.position,this.hpRoll,this.cesium.Ellipsoid.WGS84,this.fixedFrameTransforms,this.model.modelMatrix),this.updatedCamera()};this._tickHandler=()=>{const o=performance.now()/1e3;(o-this.lastMoveTime>=this.moveInterval||this.lastMoveTime==0)&&(this.moveState.moveFront?(this.moveState.moveLeft&&(this.hpRoll.heading-=this.radian,this.cameralHpRoll.heading-=this.radian),this.moveState.moveRight&&(this.hpRoll.heading+=this.radian,this.cameralHpRoll.heading+=this.radian),s(1)):this.moveState.moveBack?(this.moveState.moveLeft&&(this.hpRoll.heading-=this.radian,this.cameralHpRoll.heading-=this.radian),this.moveState.moveRight&&(this.hpRoll.heading+=this.radian,this.cameralHpRoll.heading+=this.radian),s(-1)):(this.moveState.moveUp&&s(2),this.moveState.moveDown&&s(-2),this.moveState.moveLeft&&(this.hpRoll.heading-=this.radian,this.cameralHpRoll.heading-=this.radian,s(0)),this.moveState.moveRight&&(this.hpRoll.heading+=this.radian,this.cameralHpRoll.heading+=this.radian,s(0))),this.lastMoveTime=o)},this.viewer.clock.onTick.addEventListener(this._tickHandler)}updatedCamera(){if(!this.model)return;const e=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),t=1.75,n=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,t),e);this.viewer.camera.viewBoundingSphere(new this.cesium.BoundingSphere(n,this.wheelCount),this.cameralHpRoll)}_keydownHandler;_keyupHandler;_tickHandler;_uiEventListeners=[];bindUiKeys(e){this.unbindUiKeys(),Object.entries(e).forEach(([t,n])=>{if(!n)return;const s=()=>this.setMoveState(t,!0),o=()=>this.setMoveState(t,!1);n.addEventListener("mousedown",s),n.addEventListener("mouseup",o),n.addEventListener("mouseleave",o),n.addEventListener("touchstart",r=>{r.preventDefault(),s()}),n.addEventListener("touchend",r=>{r.preventDefault(),o()}),this._uiEventListeners.push(()=>{n.removeEventListener("mousedown",s),n.removeEventListener("mouseup",o),n.removeEventListener("mouseleave",o),n.removeEventListener("touchstart",s),n.removeEventListener("touchend",o)})})}unbindUiKeys(){this._uiEventListeners.forEach(e=>e()),this._uiEventListeners=[]}closePlayer(){const e=this.cesium;this.model&&(this.model.show=!1),this.setCameralDefault(!0),this.handler&&(this.handler.removeInputAction(e.ScreenSpaceEventType.LEFT_DOWN),this.handler.removeInputAction(e.ScreenSpaceEventType.MOUSE_MOVE),this.handler.removeInputAction(e.ScreenSpaceEventType.LEFT_UP),this.handler.removeInputAction(e.ScreenSpaceEventType.WHEEL)),this._positionHandler&&(this._positionHandler.destroy(),this._positionHandler=null),this._keydownHandler&&document.removeEventListener("keydown",this._keydownHandler),this._keyupHandler&&document.removeEventListener("keyup",this._keyupHandler),this._tickHandler&&this.viewer.clock.onTick.removeEventListener(this._tickHandler),this.unbindUiKeys(),this.viewer.camera.lookAtTransform(e.Matrix4.IDENTITY),this.onLoading&&this.onLoading("")}setSpeed({speed:e}){this.speed=e/50}setParams({gravityTest:e,collisionTest:t,transparentTest:n}){e!==void 0&&(this.gravityTest=e),t!==void 0&&(this.collisionTest=t),n!==void 0&&(this.transparentTest=n)}setMoveState(e,t){this.moveState.hasOwnProperty(e)&&(this.moveState[e]=t,t?this.resumeAnimationFn&&this.resumeAnimationFn():Object.keys(this.moveState).every(n=>this.moveState[n]==!1)&&this.pauseAnimationFn&&this.pauseAnimationFn())}setCameralDefault(e){const t=this.viewer;t.scene.screenSpaceCameraController.enableRotate=e,t.scene.screenSpaceCameraController.enableTranslate=e,t.scene.screenSpaceCameraController.enableZoom=e,t.scene.screenSpaceCameraController.enableLook=e,t.scene.screenSpaceCameraController.enableTilt=e}}class yp{cesium;viewer;baseCesium;baseTiles;baseCompt;baseSection;basePlayer;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer,this.baseCesium=new Ql(e),this.baseTiles=new Dr(e),this.baseCompt=new pp(e),this.baseSection=new gp(e),this.basePlayer=new Ap({cesium:e.cesium,viewer:e.viewer,modelInfo:{url:e.options?.playerUrl,modelName:e.options?.playerModelName,modelId:e.options?.playerModelId,scale:e.options?.playerScale},callbacks:e.callbacks})}getCesium(){return this.cesium}getViewer(){return this.viewer}setSceneOptions(...e){this.baseCesium.setSceneOptions(...e)}getSnapDomSImageBase64(...e){return this.baseCesium.getSnapDomSImageBase64(...e)}clearBackground(){this.baseCesium.clearBackground()}enableTestLabel(){this.baseCesium.enableTestLabel()}enableCesiumFXAA(e){this.baseCesium.enableCesiumFXAA(e)}updateModelEffect(e){this.baseCesium.updateModelEffect(e)}addModels(...e){return this.baseTiles.addModels(...e)}}class Cp{cesium;viewer;mapLayers={};renderGen={};renderGenAll=0;renderGenByModel={};modelId="default";options={flyTo:!0};dxfModelsList=[];open=!1;events=new Gi;showGlobal=!0;constructor({viewer:e,cesium:t}){this.viewer=e,this.cesium=t}getMapLayers(e){const t=typeof e=="object"?e?.modelId:e;return t?this.mapLayers[t]||{}:this.mapLayers}setModelId(e){this.modelId=e}getModelId(){return this.modelId}flyToCadModel(e={}){const t=e.modelId||this.modelId,n=this.dxfModelsList.find(s=>s.modelId===t);n&&this.flyToBounds(n)}setDxfOpen(e){this.open=e}getDxfOpen(){return this.open}getDxfModelsList(){return this.dxfModelsList}getDxfModels(e){const t=typeof e=="object"?e?.modelId:e;return t?this.dxfModelsList.find(n=>n.modelId===t):this.dxfModelsList}showJson({modelId:e,show:t}){this.mapLayers[e]&&Object.values(this.mapLayers[e]).forEach(s=>{s.forEach(o=>{o.primitive&&(o.primitive.show=t)})});const n=this.dxfModelsList.find(s=>s.modelId===e);n&&(n.show=t)}showJsonByLayer({modelId:e,show:t,layers:n}){const s=this.dxfModelsList.find(r=>r.modelId===e);if(!s){console.error("Tileset not found for modelId:",e);return}s.hiddenBatchIds||(s.hiddenBatchIds=new Set),s.layerMap&&Array.isArray(n)&&n.forEach(r=>{const l=s.layerMap[r];l!==void 0&&(t?s.hiddenBatchIds.delete(l):s.hiddenBatchIds.add(l))});const o=Array.from(s.hiddenBatchIds);if(o.length>0){const r=o.map(l=>`\${_BATCHID} !== ${l}`).join(" && ");s.style=new this.cesium.Cesium3DTileStyle({show:r})}else s.style=new this.cesium.Cesium3DTileStyle({show:!0});s.hasVisibilityListener||(s.hasVisibilityListener=!0,s.tileVisible.addEventListener(r=>{const l=r.content,a=l.featuresLength;if(a>0&&s.hiddenBatchIds)for(let d=0;d<a;d++)s.hiddenBatchIds.has(d)?l.getFeature(d).show=!1:l.getFeature(d).show=!0}))}flyToBounds(e,t){const n=this.cesium,s=e.boundingSphere?.radius||1e3,o={offset:new n.HeadingPitchRange(0,n.Math.toRadians(-90),s*2),...t},r=o.duration??0;e&&this.viewer.flyTo(e,{duration:r,offset:o.offset})}async loadModelFile(e){try{if(!e||typeof e!="string")return!1;const t=await fetch(e,{cache:"no-store"});if(!t.ok)throw new Error(`HTTP ${t.status} for ${e}`);if(e.endsWith(".json")||t.headers.get("content-type")?.includes("application/json"))return await t.json();const n=await t.blob(),s=new br(new $n(n),{password:"abc!?123",useWebWorkers:!1}),r=(await s.getEntries()).find(d=>!d.directory&&d.filename.endsWith(".json"));if(!r)return console.error("未找到 JSON 文件"),await s.close(),!1;const l=await r.arrayBuffer({useWebWorkers:!1});await s.close();const a=new TextDecoder().decode(l);return JSON.parse(a.trim())}catch(t){return console.error("解压或获取失败:",t),!1}}async addDxfModel({fileNames:e,options:t}){const n=this.renderGenAll;if(e?.length){for(const s of e){if(this.renderGenAll!==n)return;const o=this.renderGenByModel[s.modelId]||0;if((this.renderGenByModel[s.modelId]||0)!==o)return;const r=`${s.outPutPath}${s.dbName}/tileset.json`,l={...this.options,...t};try{const a=`${s.outPutPath}${s.dbName}/layerInfo.zip`,d=await this.loadModelFile(a);if(this.renderGenAll!==n||(this.renderGenByModel[s.modelId]||0)!==o)return;const h=await this.cesium.Cesium3DTileset.fromUrl(r,{allowPicking:!1});if(h.maximumScreenSpaceError=0,this.renderGenAll!==n||(this.renderGenByModel[s.modelId]||0)!==o)return;if(Object.assign(h,{modelId:s.modelId,modelName:s.modelName,deltaLatitude:s.deltaLatitude||0,deltaLongitude:s.deltaLongitude||0,relocated:!0,dbName:s.dbName,outPutPath:s.outPutPath,totalRotation:s.totalRotation||0,layerInfo:d}),s.formData?h.formData=s.formData:h.formData={modelId:h.modelId,longitude:h.deltaLongitude,latitude:h.deltaLatitude,distance:1e-6,rotation:0,totalRotation:h.totalRotation,heightDistance:1,height:0,lonlat:1e-6,modelOptions:[{value:h.modelId,label:h.modelName}],selectPoint:{longitude:0,latitude:0,height:0},selectedMode:!1,X:0,Y:0,Z:0},this.adjustingModelByCad({...h.formData,tileset:h}),Array.isArray(d)){const p=d;h.layerMap={};let f=this.mapLayers[s.modelId];f||(f={},this.mapLayers[s.modelId]=f),p.forEach(u=>{h.layerMap[u.layerName]=u.batchId,f[u.layerName]||(f[u.layerName]=[]),f[u.layerName].push({batchId:u.batchId,color:u.layerColor})})}if(this.dxfModelsList.push(h),this.setModelId(s.modelId),this.viewer.scene.primitives.add(h),this.renderGenAll!==n||(this.renderGenByModel[s.modelId]||0)!==o)return;l.flyTo&&this.flyToBounds(h),l.onSuccess&&l.onSuccess(h)}catch(a){console.error(`Failed to load tileset or layer info: ${r}`,a)}}this.events.emit("mountAllCad",this.dxfModelsList)}}adjustingModelByCad(e){const t=this.cesium,n=t.Quaternion.fromAxisAngle(t.Cartesian3.UNIT_Z,t.Math.toRadians(e.totalRotation)),s=t.Matrix4.fromRotationTranslation(t.Matrix3.fromQuaternion(n),new t.Cartesian3(0,0,0)),o=t.Cartesian3.fromDegrees(e.longitude,e.latitude,e.height),r=t.Transforms.eastNorthUpToFixedFrame(o);t.Matrix4.multiply(r,s,r),e.tileset?._root&&(e.tileset._root.transform=r)}deleteCad({modelId:e}){this.mapLayers[e]&&(Object.values(this.mapLayers[e]).forEach(n=>{n.forEach(s=>{this.viewer.scene.primitives.remove(s.primitive),s.primitive?.destroy()})}),delete this.mapLayers[e]),this.renderGen[e]=(this.renderGen[e]||0)+1,this.renderGenByModel[e]=(this.renderGenByModel[e]||0)+1;const t=this.dxfModelsList.findIndex(n=>n.modelId===e);if(t>-1){const n=this.dxfModelsList[t];this.viewer.scene.primitives.remove(n),n.destroy&&!n.isDestroyed()&&n.destroy(),this.dxfModelsList.splice(t,1)}}deleteAllCad(){Object.keys(this.mapLayers).forEach(e=>{this.deleteCad({modelId:e})}),[...this.dxfModelsList].forEach(e=>{e.modelId&&this.deleteCad({modelId:e.modelId})})}}class at{constructor(e,t){if(this.viewer=e,!this.viewer)return;this.type="prompt",t=t||{};const n=t.type==null?1:t.type;let s={id:new Date().getTime()+""+Math.floor(Math.random()*1e4),type:n,anchor:n==2,closeBtn:n==2,offset:n==2?{x:0,y:-20}:{x:10,y:10},content:"",show:!0,style:{background:"rgba(0,0,0,0.5)",color:"white"}};this.opt=Object.assign(s,t),this.attr=this.opt;const o=this.viewer.container.id;this.isShow=this.opt.show==null?!0:this.opt.show;let r="",l="";const a=this.opt.style.background,d=this.opt.style.color;this.opt.anchor&&(r+=`
13
+ `)),e)})}const vo=[];for(let i=0;i<256;i++){let e=i;for(let t=0;t<8;t++)e&1?e=e>>>1^3988292384:e=e>>>1;vo[i]=e}class Oi{constructor(e){this.crc=e||-1}append(e){let t=this.crc|0;for(let n=0,s=e.length|0;n<s;n++)t=t>>>8^vo[(t^e[n])&255];this.crc=t}get(){return~this.crc}}class Io extends TransformStream{constructor(){let e;const t=new Oi;super({transform(n,s){t.append(n),s.enqueue(n)},flush(){const n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function hu(i){if(typeof TextEncoder==nt){i=unescape(encodeURIComponent(i));const e=new Uint8Array(i.length);for(let t=0;t<e.length;t++)e[t]=i.charCodeAt(t);return e}else return new TextEncoder().encode(i)}const De={concat(i,e){if(i.length===0||e.length===0)return i.concat(e);const t=i[i.length-1],n=De.getPartial(t);return n===32?i.concat(e):De._shiftRight(e,n,t|0,i.slice(0,i.length-1))},bitLength(i){const e=i.length;if(e===0)return 0;const t=i[e-1];return(e-1)*32+De.getPartial(t)},clamp(i,e){if(i.length*32<e)return i;i=i.slice(0,Math.ceil(e/32));const t=i.length;return e=e&31,t>0&&e&&(i[t-1]=De.partial(e,i[t-1]&2147483648>>e-1,1)),i},partial(i,e,t){return i===32?e:(t?e|0:e<<32-i)+i*1099511627776},getPartial(i){return Math.round(i/1099511627776)||32},_shiftRight(i,e,t,n){for(n===void 0&&(n=[]);e>=32;e-=32)n.push(t),t=0;if(e===0)return n.concat(i);for(let r=0;r<i.length;r++)n.push(t|i[r]>>>e),t=i[r]<<32-e;const s=i.length?i[i.length-1]:0,o=De.getPartial(s);return n.push(De.partial(e+o&31,e+o>32?t:n.pop(),1)),n}},Li={bytes:{fromBits(i){const t=De.bitLength(i)/8,n=new Uint8Array(t);let s;for(let o=0;o<t;o++)(o&3)===0&&(s=i[o/4]),n[o]=s>>>24,s<<=8;return n},toBits(i){const e=[];let t,n=0;for(t=0;t<i.length;t++)n=n<<8|i[t],(t&3)===3&&(e.push(n),n=0);return t&3&&e.push(De.partial(8*(t&3),n)),e}}},Bo={};Bo.sha1=class{constructor(i){const e=this;e.blockSize=512,e._init=[1732584193,4023233417,2562383102,271733878,3285377520],e._key=[1518500249,1859775393,2400959708,3395469782],i?(e._h=i._h.slice(0),e._buffer=i._buffer.slice(0),e._length=i._length):e.reset()}reset(){const i=this;return i._h=i._init.slice(0),i._buffer=[],i._length=0,i}update(i){const e=this;typeof i=="string"&&(i=Li.utf8String.toBits(i));const t=e._buffer=De.concat(e._buffer,i),n=e._length,s=e._length=n+De.bitLength(i);if(s>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const o=new Uint32Array(t);let r=0;for(let l=e.blockSize+n-(e.blockSize+n&e.blockSize-1);l<=s;l+=e.blockSize)e._block(o.subarray(16*r,16*(r+1))),r+=1;return t.splice(0,16*r),e}finalize(){const i=this;let e=i._buffer;const t=i._h;e=De.concat(e,[De.partial(1,1)]);for(let n=e.length+2;n&15;n++)e.push(0);for(e.push(Math.floor(i._length/4294967296)),e.push(i._length|0);e.length;)i._block(e.splice(0,16));return i.reset(),t}_f(i,e,t,n){if(i<=19)return e&t|~e&n;if(i<=39)return e^t^n;if(i<=59)return e&t|e&n|t&n;if(i<=79)return e^t^n}_S(i,e){return e<<i|e>>>32-i}_block(i){const e=this,t=e._h,n=Array(80);for(let d=0;d<16;d++)n[d]=i[d];let s=t[0],o=t[1],r=t[2],l=t[3],a=t[4];for(let d=0;d<=79;d++){d>=16&&(n[d]=e._S(1,n[d-3]^n[d-8]^n[d-14]^n[d-16]));const h=e._S(5,s)+e._f(d,o,r,l)+a+n[d]+e._key[Math.floor(d/20)]|0;a=l,l=r,r=e._S(30,o),o=s,s=h}t[0]=t[0]+s|0,t[1]=t[1]+o|0,t[2]=t[2]+r|0,t[3]=t[3]+l|0,t[4]=t[4]+a|0}};const xo={};xo.aes=class{constructor(i){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const t=e._tables[0][4],n=e._tables[1],s=i.length;let o,r,l,a=1;if(s!==4&&s!==6&&s!==8)throw new Error("invalid aes key size");for(e._key=[r=i.slice(0),l=[]],o=s;o<4*s+28;o++){let d=r[o-1];(o%s===0||s===8&&o%s===4)&&(d=t[d>>>24]<<24^t[d>>16&255]<<16^t[d>>8&255]<<8^t[d&255],o%s===0&&(d=d<<8^d>>>24^a<<24,a=a<<1^(a>>7)*283)),r[o]=r[o-s]^d}for(let d=0;o;d++,o--){const h=r[d&3?o:o-4];o<=4||d<4?l[d]=h:l[d]=n[0][t[h>>>24]]^n[1][t[h>>16&255]]^n[2][t[h>>8&255]]^n[3][t[h&255]]}}encrypt(i){return this._crypt(i,0)}decrypt(i){return this._crypt(i,1)}_precompute(){const i=this._tables[0],e=this._tables[1],t=i[4],n=e[4],s=[],o=[];let r,l,a,d;for(let h=0;h<256;h++)o[(s[h]=h<<1^(h>>7)*283)^h]=h;for(let h=r=0;!t[h];h^=l||1,r=o[r]||1){let p=r^r<<1^r<<2^r<<3^r<<4;p=p>>8^p&255^99,t[h]=p,n[p]=h,d=s[a=s[l=s[h]]];let f=d*16843009^a*65537^l*257^h*16843008,u=s[p]*257^p*16843008;for(let m=0;m<4;m++)i[m][h]=u=u<<24^u>>>8,e[m][p]=f=f<<24^f>>>8}for(let h=0;h<5;h++)i[h]=i[h].slice(0),e[h]=e[h].slice(0)}_crypt(i,e){if(i.length!==4)throw new Error("invalid aes block size");const t=this._key[e],n=t.length/4-2,s=[0,0,0,0],o=this._tables[e],r=o[0],l=o[1],a=o[2],d=o[3],h=o[4];let p=i[0]^t[0],f=i[e?3:1]^t[1],u=i[2]^t[2],m=i[e?1:3]^t[3],E=4,A,C,v;for(let S=0;S<n;S++)A=r[p>>>24]^l[f>>16&255]^a[u>>8&255]^d[m&255]^t[E],C=r[f>>>24]^l[u>>16&255]^a[m>>8&255]^d[p&255]^t[E+1],v=r[u>>>24]^l[m>>16&255]^a[p>>8&255]^d[f&255]^t[E+2],m=r[m>>>24]^l[p>>16&255]^a[f>>8&255]^d[u&255]^t[E+3],E+=4,p=A,f=C,u=v;for(let S=0;S<4;S++)s[e?3&-S:S]=h[p>>>24]<<24^h[f>>16&255]<<16^h[u>>8&255]<<8^h[m&255]^t[E++],A=p,p=f,f=u,u=m,m=A;return s}};const uu={getRandomValues(i){const e=new Uint32Array(i.buffer),t=n=>{let s=987654321;const o=4294967295;return function(){return s=36969*(s&65535)+(s>>16)&o,n=18e3*(n&65535)+(n>>16)&o,(((s<<16)+n&o)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let n=0,s;n<i.length;n+=4){const o=t((s||Math.random())*4294967296);s=o()*987654071,e[n/4]=o()*4294967296|0}return i}},So={};So.ctrGladman=class{constructor(i,e){this._prf=i,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(i){return this.calculate(this._prf,i,this._iv)}incWord(i){if((i>>24&255)===255){let e=i>>16&255,t=i>>8&255,n=i&255;e===255?(e=0,t===255?(t=0,n===255?n=0:++n):++t):++e,i=0,i+=e<<16,i+=t<<8,i+=n}else i+=1<<24;return i}incCounter(i){(i[0]=this.incWord(i[0]))===0&&(i[1]=this.incWord(i[1]))}calculate(i,e,t){let n;if(!(n=e.length))return[];const s=De.bitLength(e);for(let o=0;o<n;o+=4){this.incCounter(t);const r=i.encrypt(t);e[o]^=r[0],e[o+1]^=r[1],e[o+2]^=r[2],e[o+3]^=r[3]}return De.clamp(e,s)}};const Ct={importKey(i){return new Ct.hmacSha1(Li.bytes.toBits(i))},pbkdf2(i,e,t,n){if(t=t||1e4,n<0||t<0)throw new Error("invalid params to pbkdf2");const s=(n>>5)+1<<2;let o,r,l,a,d;const h=new ArrayBuffer(s),p=new DataView(h);let f=0;const u=De;for(e=Li.bytes.toBits(e),d=1;f<(s||1);d++){for(o=r=i.encrypt(u.concat(e,[d])),l=1;l<t;l++)for(r=i.encrypt(r),a=0;a<r.length;a++)o[a]^=r[a];for(l=0;f<(s||1)&&l<o.length;l++)p.setInt32(f,o[l]),f+=4}return h.slice(0,n/8)}};Ct.hmacSha1=class{constructor(i){const e=this,t=e._hash=Bo.sha1,n=[[],[]];e._baseHash=[new t,new t];const s=e._baseHash[0].blockSize/32;i.length>s&&(i=new t().update(i).finalize());for(let o=0;o<s;o++)n[0][o]=i[o]^909522486,n[1][o]=i[o]^1549556828;e._baseHash[0].update(n[0]),e._baseHash[1].update(n[1]),e._resultHash=new t(e._baseHash[0])}reset(){const i=this;i._resultHash=new i._hash(i._baseHash[0]),i._updated=!1}update(i){const e=this;e._updated=!0,e._resultHash.update(i)}digest(){const i=this,e=i._resultHash.finalize(),t=new i._hash(i._baseHash[1]).update(e).finalize();return i.reset(),t}encrypt(i){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(i),this.digest(i)}};const fu=typeof crypto!=nt&&typeof crypto.getRandomValues==yt,To="Invalid password",Mo="Invalid signature",Gn="zipjs-abort-check-password";function Do(i){return fu?crypto.getRandomValues(i):uu.getRandomValues(i)}const Lt=16,pu="raw",ko={name:"PBKDF2"},gu={name:"HMAC"},mu="SHA-1",Au=Object.assign({hash:gu},ko),Hn=Object.assign({iterations:1e3,hash:{name:mu}},ko),yu=["deriveBits"],Zt=[8,12,16],ei=[16,24,32],st=10,Cu=[0,0,0,0],Ni=typeof crypto!=nt,ti=Ni&&crypto.subtle,Po=Ni&&typeof ti!=nt,We=Li.bytes,Eu=xo.aes,wu=So.ctrGladman,bu=Ct.hmacSha1;let Fo=Ni&&Po&&typeof ti.importKey==yt,Ro=Ni&&Po&&typeof ti.deriveBits==yt;class vu extends TransformStream{constructor({password:e,rawPassword:t,signed:n,encryptionStrength:s,checkPasswordOnly:o}){super({start(){Object.assign(this,{ready:new Promise(r=>this.resolveReady=r),password:No(e,t),signed:n,strength:s-1,pending:new Uint8Array})},async transform(r,l){const a=this,{password:d,strength:h,resolveReady:p,ready:f}=a;d?(await Bu(a,h,d,Le(r,0,Zt[h]+2)),r=Le(r,Zt[h]+2),o?l.error(new Error(Gn)):p()):await f;const u=new Uint8Array(r.length-st-(r.length-st)%Lt);l.enqueue(Oo(a,r,u,0,st,!0))},async flush(r){const{signed:l,ctr:a,hmac:d,pending:h,ready:p}=this;if(d&&a){await p;const f=Le(h,0,h.length-st),u=Le(h,h.length-st);let m=new Uint8Array;if(f.length){const E=ni(We,f);d.update(E);const A=a.update(E);m=ii(We,A)}if(l){const E=Le(ii(We,d.digest()),0,st);for(let A=0;A<st;A++)if(E[A]!=u[A])throw new Error(Mo)}r.enqueue(m)}}})}}class Iu extends TransformStream{constructor({password:e,rawPassword:t,encryptionStrength:n}){let s;super({start(){Object.assign(this,{ready:new Promise(o=>this.resolveReady=o),password:No(e,t),strength:n-1,pending:new Uint8Array})},async transform(o,r){const l=this,{password:a,strength:d,resolveReady:h,ready:p}=l;let f=new Uint8Array;a?(f=await xu(l,d,a),h()):await p;const u=new Uint8Array(f.length+o.length-o.length%Lt);u.set(f,0),r.enqueue(Oo(l,o,u,f.length,0))},async flush(o){const{ctr:r,hmac:l,pending:a,ready:d}=this;if(l&&r){await d;let h=new Uint8Array;if(a.length){const p=r.update(ni(We,a));l.update(p),h=ii(We,p)}s.signature=ii(We,l.digest()).slice(0,st),o.enqueue(Yn(h,s.signature))}}}),s=this}}function Oo(i,e,t,n,s,o){const{ctr:r,hmac:l,pending:a}=i,d=e.length-s;a.length&&(e=Yn(a,e),t=Mu(t,d-d%Lt));let h;for(h=0;h<=d-Lt;h+=Lt){const p=ni(We,Le(e,h,h+Lt));o&&l.update(p);const f=r.update(p);o||l.update(f),t.set(ii(We,f),h+n)}return i.pending=Le(e,h),t}async function Bu(i,e,t,n){const s=await Lo(i,e,t,Le(n,0,Zt[e])),o=Le(n,Zt[e]);if(s[0]!=o[0]||s[1]!=o[1])throw new Error(To)}async function xu(i,e,t){const n=Do(new Uint8Array(Zt[e])),s=await Lo(i,e,t,n);return Yn(n,s)}async function Lo(i,e,t,n){i.password=null;const s=await Su(pu,t,Au,!1,yu),o=await Tu(Object.assign({salt:n},Hn),s,8*(ei[e]*2+2)),r=new Uint8Array(o),l=ni(We,Le(r,0,ei[e])),a=ni(We,Le(r,ei[e],ei[e]*2)),d=Le(r,ei[e]*2);return Object.assign(i,{keys:{key:l,authentication:a,passwordVerification:d},ctr:new wu(new Eu(l),Array.from(Cu)),hmac:new bu(a)}),d}async function Su(i,e,t,n,s){if(Fo)try{return await ti.importKey(i,e,t,n,s)}catch{return Fo=!1,Ct.importKey(e)}else return Ct.importKey(e)}async function Tu(i,e,t){if(Ro)try{return await ti.deriveBits(i,e,t)}catch{return Ro=!1,Ct.pbkdf2(e,i.salt,Hn.iterations,t)}else return Ct.pbkdf2(e,i.salt,Hn.iterations,t)}function No(i,e){return e===he?hu(i):e}function Yn(i,e){let t=i;return i.length+e.length&&(t=new Uint8Array(i.length+e.length),t.set(i,0),t.set(e,i.length)),t}function Mu(i,e){if(e&&e>i.length){const t=i;i=new Uint8Array(e),i.set(t,0)}return i}function Le(i,e,t){return i.subarray(e,t)}function ii(i,e){return i.fromBits(e)}function ni(i,e){return i.toBits(e)}const si=12;class Du extends TransformStream{constructor({password:e,passwordVerification:t,checkPasswordOnly:n}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),Qo(this,e)},transform(s,o){const r=this;if(r.password){const l=Uo(r,s.subarray(0,si));if(r.password=null,l.at(-1)!=r.passwordVerification)throw new Error(To);s=s.subarray(si)}n?o.error(new Error(Gn)):o.enqueue(Uo(r,s))}})}}class ku extends TransformStream{constructor({password:e,passwordVerification:t}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),Qo(this,e)},transform(n,s){const o=this;let r,l;if(o.password){o.password=null;const a=Do(new Uint8Array(si));a[si-1]=o.passwordVerification,r=new Uint8Array(n.length+a.length),r.set(_o(o,a),0),l=si}else r=new Uint8Array(n.length),l=0;r.set(_o(o,n),l),s.enqueue(r)}})}}function Uo(i,e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=Go(i)^e[n],Vn(i,t[n]);return t}function _o(i,e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=Go(i)^e[n],Vn(i,e[n]);return t}function Qo(i,e){const t=[305419896,591751049,878082192];Object.assign(i,{keys:t,crcKey0:new Oi(t[0]),crcKey2:new Oi(t[2])});for(let n=0;n<e.length;n++)Vn(i,e.charCodeAt(n))}function Vn(i,e){let[t,n,s]=i.keys;i.crcKey0.append([e]),t=~i.crcKey0.get(),n=Yo(Math.imul(Yo(n+Ho(t)),134775813)+1),i.crcKey2.append([n>>>24]),s=~i.crcKey2.get(),i.keys=[t,n,s]}function Go(i){const e=i.keys[2]|2;return Ho(Math.imul(e,e^1)>>>8)}function Ho(i){return i&255}function Yo(i){return i&4294967295}const Vo="Invalid uncompressed size",Pu="deflate-raw",Fu="deflate64-raw";class Ru extends TransformStream{constructor(e,{chunkSize:t,CompressionStreamZlib:n,CompressionStream:s}){super({});const{compressed:o,encrypted:r,useCompressionStream:l,zipCrypto:a,signed:d,level:h}=e,p=this;let f,u,m=super.readable;(!r||a)&&d&&(f=new Io,m=je(m,f)),o&&(m=Wo(m,l,{level:h,chunkSize:t},s,n,s)),r&&(a?m=je(m,new ku(e)):(u=new Iu(e),m=je(m,u))),zo(p,m,()=>{let E;r&&!a&&(E=u.signature),(!r||a)&&d&&(E=new DataView(f.value.buffer).getUint32(0)),p.signature=E})}}class Ou extends TransformStream{constructor(e,{chunkSize:t,DecompressionStreamZlib:n,DecompressionStream:s}){super({});const{zipCrypto:o,encrypted:r,signed:l,signature:a,compressed:d,useCompressionStream:h,deflate64:p}=e;let f,u,m=super.readable;r&&(o?m=je(m,new Du(e)):(u=new vu(e),m=je(m,u))),d&&(m=Wo(m,h,{chunkSize:t,deflate64:p},s,n,s)),(!r||o)&&l&&(f=new Io,m=je(m,f)),zo(this,m,()=>{if((!r||o)&&l){const E=new DataView(f.value.buffer);if(a!=E.getUint32(0,!1))throw new Error(Mo)}})}}function zo(i,e,t){e=je(e,new TransformStream({flush:t})),Object.defineProperty(i,"readable",{get(){return e}})}function Wo(i,e,t,n,s,o){const r=e&&n?n:s||o,l=t.deflate64?Fu:Pu;try{i=je(i,new r(l,t))}catch(a){if(e)if(s)i=je(i,new s(l,t));else if(o)i=je(i,new o(l,t));else throw a;else throw a}return i}function je(i,e){return i.pipeThrough(e)}const Lu="message",Nu="start",Uu="pull",jo="data",_u="ack",Ko="close",Qu="deflate",$o="inflate";class Gu extends TransformStream{constructor(e,t){super({});const n=this,{codecType:s}=e;let o;s.startsWith(Qu)?o=Ru:s.startsWith($o)&&(o=Ou),n.outputSize=0;let r=0;const l=new o(e,t),a=super.readable,d=new TransformStream({transform(p,f){p&&p.length&&(r+=p.length,f.enqueue(p))},flush(){Object.assign(n,{inputSize:r})}}),h=new TransformStream({transform(p,f){if(p&&p.length&&(f.enqueue(p),n.outputSize+=p.length,e.outputSize!==he&&n.outputSize>e.outputSize))throw new Error(Vo)},flush(){const{signature:p}=l;Object.assign(n,{signature:p,inputSize:r})}});Object.defineProperty(n,"readable",{get(){return a.pipeThrough(d).pipeThrough(l).pipeThrough(h)}})}}class Hu extends TransformStream{constructor(e){let t;super({transform:n,flush(s){t&&t.length&&s.enqueue(t)}});function n(s,o){if(t){const r=new Uint8Array(t.length+s.length);r.set(t),r.set(s,t.length),s=r,t=null}s.length>e?(o.enqueue(s.slice(0,e)),n(s.slice(e),o)):t=s}}}let Xo=typeof Worker!=nt,qo=()=>{};function Yu({initModule:i}){qo=i}class zn{constructor(e,{readable:t,writable:n},{options:s,config:o,streamOptions:r,useWebWorkers:l,transferStreams:a,workerURI:d},h){const{signal:p}=r;return Object.assign(e,{busy:!0,readable:t.pipeThrough(new Hu(o.chunkSize)).pipeThrough(new Vu(r),{signal:p}),writable:n,options:Object.assign({},s),workerURI:d,transferStreams:a,terminate(){return new Promise(f=>{const{worker:u,busy:m}=e;u?(m?e.resolveTerminated=f:(u.terminate(),f()),e.interface=null):f()})},onTaskFinished(){const{resolveTerminated:f}=e;f&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),f()),e.busy=!1,h(e)}}),(l&&Xo?zu:Jo)(e,o)}}class Vu extends TransformStream{constructor({onstart:e,onprogress:t,size:n,onend:s}){let o=0;super({async start(){e&&await Wn(e,n)},async transform(r,l){o+=r.length,t&&await Wn(t,o,n),l.enqueue(r)},async flush(){s&&await Wn(s,o)}})}}async function Wn(i,...e){try{await i(...e)}catch{}}function Jo(i,e){return{run:()=>Wu(i,e)}}function zu(i,e){const{baseURI:t,chunkSize:n}=e;let{wasmURI:s}=e;if(!i.interface){typeof s==yt&&(s=s());let o;try{o=$u(i.workerURI,t,i)}catch{return Xo=!1,Jo(i,e)}Object.assign(i,{worker:o,interface:{run:()=>ju(i,{chunkSize:n,wasmURI:s,baseURI:t})}})}return i.interface}async function Wu({options:i,readable:e,writable:t,onTaskFinished:n},s){let o;try{if(!i.useCompressionStream)try{await qo(s)}catch{i.useCompressionStream=!0}o=new Gu(i,s),await e.pipeThrough(o).pipeTo(t,{preventClose:!0,preventAbort:!0});const{signature:r,inputSize:l,outputSize:a}=o;return{signature:r,inputSize:l,outputSize:a}}catch(r){throw o&&(r.outputSize=o.outputSize),r}finally{n()}}async function ju(i,e){let t,n;const s=new Promise((p,f)=>{t=p,n=f});Object.assign(i,{reader:null,writer:null,resolveResult:t,rejectResult:n,result:s});const{readable:o,options:r}=i,{writable:l,closed:a}=Ku(i.writable),d=Ui({type:Nu,options:r,config:e,readable:o,writable:l},i);d||Object.assign(i,{reader:o.getReader(),writer:l.getWriter()});const h=await s;return d||await l.getWriter().close(),await a,h}function Ku(i){let e;const t=new Promise(s=>e=s);return{writable:new WritableStream({async write(s){const o=i.getWriter();await o.ready,await o.write(s),o.releaseLock()},close(){e()},abort(s){return i.getWriter().abort(s)}}),closed:t}}let Zo=!0;function $u(i,e,t){const n={type:"module"};let s,o;if(typeof i==yt&&(i=i()),i.startsWith("data:")||i.startsWith("blob:"))try{o=new Worker(i)}catch{o=new Worker(i,n)}else{try{s=new URL(i,e)}catch{s=i}o=new Worker(s,n)}return o.addEventListener(Lu,r=>Xu(r,t)),o}function Ui(i,{worker:e,writer:t,onTaskFinished:n,transferStreams:s}){try{const{value:o,readable:r,writable:l}=i,a=[];if(o&&(i.value=o,a.push(i.value.buffer)),s&&Zo?(r&&a.push(r),l&&a.push(l)):i.readable=i.writable=null,a.length)try{return e.postMessage(i,a),!0}catch{Zo=!1,i.readable=i.writable=null,e.postMessage(i)}else e.postMessage(i)}catch(o){throw t&&t.releaseLock(),n(),o}}async function Xu({data:i},e){const{type:t,value:n,messageId:s,result:o,error:r}=i,{reader:l,writer:a,resolveResult:d,rejectResult:h,onTaskFinished:p}=e;try{if(r){const{message:u,stack:m,code:E,name:A,outputSize:C}=r,v=new Error(u);Object.assign(v,{stack:m,code:E,name:A,outputSize:C}),f(v)}else{if(t==Uu){const{value:u,done:m}=await l.read();Ui({type:jo,value:u,done:m,messageId:s},e)}t==jo&&(await a.ready,await a.write(new Uint8Array(n)),Ui({type:_u,messageId:s},e)),t==Ko&&f(null,o)}}catch(u){Ui({type:Ko,messageId:s},e),f(u)}function f(u,m){u?h(u):d(m),a&&a.releaseLock(),p()}}let Et=[];const jn=[];let er=0;async function qu(i,e){const{options:t,config:n}=e,{transferStreams:s,useWebWorkers:o,useCompressionStream:r,compressed:l,signed:a,encrypted:d}=t,{workerURI:h,maxWorkers:p}=n;e.transferStreams=s||s===he;const f=!l&&!a&&!d&&!e.transferStreams;return e.useWebWorkers=!f&&(o||o===he&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&h?h:he,t.useCompressionStream=r||r===he&&n.useCompressionStream,(await u()).run();async function u(){const E=Et.find(A=>!A.busy);if(E)return tr(E),new zn(E,i,e,m);if(Et.length<p){const A={indexWorker:er};return er++,Et.push(A),new zn(A,i,e,m)}else return new Promise(A=>jn.push({resolve:A,stream:i,workerOptions:e}))}function m(E){if(jn.length){const[{resolve:A,stream:C,workerOptions:v}]=jn.splice(0,1);A(new zn(E,C,v,m))}else E.worker?(tr(E),Ju(E,e)):Et=Et.filter(A=>A!=E)}}function Ju(i,e){const{config:t}=e,{terminateWorkerTimeout:n}=t;Number.isFinite(n)&&n>=0&&(i.terminated?i.terminated=!1:i.terminateTimeout=setTimeout(async()=>{Et=Et.filter(s=>s!=i);try{await i.terminate()}catch{}},n))}function tr(i){const{terminateTimeout:e}=i;e&&(clearTimeout(e),i.terminateTimeout=null)}const Zu="Writer iterator completed too soon",ef="Content-Type",tf=64*1024,ir="writable";class Kn{constructor(){this.size=0}init(){this.initialized=!0}}class nr extends Kn{get readable(){const e=this,{chunkSize:t=tf}=e,n=new ReadableStream({start(){this.chunkOffset=0},async pull(s){const{offset:o=0,size:r,diskNumberStart:l}=n,{chunkOffset:a}=this,d=r===he?t:Math.min(t,r-a),h=await Be(e,o+a,d,l);s.enqueue(h),a+t>r||r===he&&!h.length&&d?s.close():this.chunkOffset+=t}});return n}}class $n extends nr{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,s=e+t;let r=await(e||s<n.size?n.blob.slice(e,s):n.blob).arrayBuffer();return r.byteLength>t&&(r=r.slice(e,s)),new Uint8Array(r)}}class nf extends Kn{constructor(e){super();const t=this,n=new TransformStream,s=[];e&&s.push([ef,e]),Object.defineProperty(t,ir,{get(){return n.writable}}),t.blob=new Response(n.readable,{headers:s}).blob()}getData(){return this.blob}}class sf extends nf{constructor(e){super(e),Object.assign(this,{encoding:e,utf8:!e||e.toLowerCase()=="utf-8"})}async getData(){const{encoding:e,utf8:t}=this,n=await super.getData();if(n.text&&t)return n.text();{const s=new FileReader;return new Promise((o,r)=>{Object.assign(s,{onload:({target:l})=>o(l.result),onerror:()=>r(s.error)}),s.readAsText(n,e)})}}}class of extends nr{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await Promise.all(t.map(async(n,s)=>{await n.init(),s!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size})),super.init()}async readUint8Array(e,t,n=0){const s=this,{readers:o}=this;let r,l=n;l==-1&&(l=o.length-1);let a=e;for(;o[l]&&a>=o[l].size;)a-=o[l].size,l++;const d=o[l];if(d){const h=d.size;if(a+t<=h)r=await Be(d,a,t);else{const p=h-a;r=new Uint8Array(t);const f=await Be(d,a,p);r.set(f,0);const u=await s.readUint8Array(e+p,t-p,n);r.set(u,p),f.length+u.length<t&&(r=r.subarray(0,f.length+u.length))}}else r=new Uint8Array;return s.lastDiskNumber=Math.max(l,s.lastDiskNumber),r}}class sr extends Kn{constructor(e,t=4294967295){super();const n=this;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});let s,o,r;const l=new WritableStream({async write(h){const{availableSize:p}=n;if(r)h.length>=p?(await a(h.subarray(0,p)),await d(),n.diskOffset+=s.size,n.diskNumber++,r=null,await this.write(h.subarray(p))):await a(h);else{const{value:f,done:u}=await e.next();if(u&&!f)throw new Error(Zu);s=f,s.size=0,s.maxSize&&(n.maxSize=s.maxSize),n.availableSize=n.maxSize,await _i(s),o=f.writable,r=o.getWriter(),await this.write(h)}},async close(){await r.ready,await d()}});Object.defineProperty(n,ir,{get(){return l}});async function a(h){const p=h.length;p&&(await r.ready,await r.write(h),s.size+=p,n.size+=p,n.availableSize-=p)}async function d(){await r.close()}}}class rf{constructor(e){return Array.isArray(e)&&(e=new of(e)),e instanceof ReadableStream&&(e={readable:e}),e}}class af{constructor(e){return e.writable===he&&typeof e.next==yt&&(e=new sr(e)),e instanceof WritableStream&&(e={writable:e}),e.size===he&&(e.size=0),e instanceof sr||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}}async function _i(i,e){if(i.init&&!i.initialized)await i.init(e);else return Promise.resolve()}function Be(i,e,t,n){return i.readUint8Array(e,t,n)}const or="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),lf=or.length==256;function cf(i){if(lf){let e="";for(let t=0;t<i.length;t++)e+=or[i[t]];return e}else return new TextDecoder().decode(i)}function Qi(i,e){return e&&e.trim().toLowerCase()=="cp437"?cf(i):new TextDecoder(e).decode(i)}const rr="filename",ar="rawFilename",lr="comment",cr="rawComment",dr="uncompressedSize",hr="compressedSize",ur="offset",fr="diskNumberStart",Xn="lastModDate",qn="rawLastModDate",pr="lastAccessDate",df="rawLastAccessDate",gr="creationDate",mr="rawCreationDate",hf=[rr,ar,dr,hr,Xn,qn,lr,cr,pr,gr,mr,ur,fr,"internalFileAttributes","externalFileAttributes","msdosAttributesRaw","msdosAttributes","msDosCompatible","zip64","encrypted","version","versionMadeBy","zipCrypto","directory","executable","compressionMethod","signature","extraField","extraFieldUnix","extraFieldInfoZip","uid","gid","unixMode","setuid","setgid","sticky","bitFlag","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Ar{constructor(e){hf.forEach(t=>this[t]=e[t])}}const uf="filenameEncoding",ff="commentEncoding",pf="decodeText",gf="extractPrependedData",mf="extractAppendedData",Af="password",yf="rawPassword",Cf="passThrough",Ef="signal",wf="checkPasswordOnly",bf="checkOverlappingEntryOnly",vf="checkOverlappingEntry",If="checkSignature",Bf="useWebWorkers",xf="useCompressionStream",Sf="transferStreams",Tf="preventClose",Jn="File format is not recognized",Mf="End of central directory not found",Df="End of Zip64 central directory locator not found",kf="Central directory header not found",Pf="Local file header not found",Ff="Zip64 extra field not found",Rf="File contains encrypted entry",Of="Encryption method not supported",yr="Compression method not supported",Cr="Split zip file",Lf="Overlapping entry found",Er="utf-8",Nf="UTF8",wr="cp437",Uf=[[dr,At],[hr,At],[ur,At],[fr,ze]],_f={[ze]:{getValue:ue,bytes:4},[At]:{getValue:Nt,bytes:8}};class br{constructor(e,t={}){Object.assign(this,{reader:new rf(e),options:t,config:lu(),readRanges:[]})}async*getEntriesGenerator(e={}){const t=this;let{reader:n}=t;const{config:s}=t;if(await _i(n),(n.size===he||!n.readUint8Array)&&(n=new $n(await new Response(n.readable).blob()),await _i(n)),n.size<Ot)throw new Error(Jn);n.chunkSize=cu(s);const o=await Wf(n,Ph,n.size,Ot,ze*16);if(!o){const x=await Be(n,0,4),F=fe(x);throw ue(F)==fo?new Error(Cr):new Error(Mf)}const r=fe(o);let l=ue(r,12),a=ue(r,16);const d=o.offset,h=Ie(r,20),p=d+Ot+h;let f=Ie(r,4);const u=n.lastDiskNumber||0;let m=Ie(r,6),E=Ie(r,8),A=0,C=0;if(a==At||l==At||E==ze||m==ze){const x=await Be(n,o.offset-Ln,Ln),F=fe(x);if(ue(F,0)==Fh){a=Nt(F,8);let _=await Be(n,a,Nn,-1),H=fe(_);const L=o.offset-Ln-Nn;if(ue(H,0)!=go&&a!=L){const w=a;a=L,a>w&&(A=a-w),_=await Be(n,a,Nn,-1),H=fe(_)}if(ue(H,0)!=go)throw new Error(Df);f==ze&&(f=ue(H,16)),m==ze&&(m=ue(H,20)),E==ze&&(E=Nt(H,32)),l==At&&(l=Nt(H,40)),a-=l}}if(a>=n.size&&(A=n.size-a-l-Ot,a=n.size-l-Ot),u!=f)throw new Error(Cr);if(a<0)throw new Error(Jn);let v=0,S=await Be(n,a,l,m),D=fe(S);if(l){const x=o.offset-l;if(ue(D,v)!=po&&a!=x){const F=a;a=x,a>F&&(A+=a-F),S=await Be(n,a,l,m),D=fe(S)}}const O=o.offset-a-(n.lastDiskOffset||0);if(l!=O&&O>=0&&(l=O,S=await Be(n,a,l,m),D=fe(S)),a<0||a>=n.size)throw new Error(Jn);const I=xe(t,e,uf),B=xe(t,e,ff);for(let x=0;x<E;x++){const F=new Qf(n,s,t.options);if(ue(D,v)!=po)throw new Error(kf);vr(F,D,v+6);const _=!!F.bitFlag.languageEncodingFlag,H=v+46,L=H+F.filenameLength,w=L+F.extraFieldLength,y=Ie(D,v+4),b=y>>8==0,M=y>>8==3,k=S.subarray(H,L),Q=Ie(D,v+32),R=w+Q,T=S.subarray(w,R),U=_,V=_,W=ue(D,v+38),X=W&On,ee={readOnly:!!(X&Kh),hidden:!!(X&$h),system:!!(X&Xh),directory:!!(X&jh),archive:!!(X&qh)},oe=ue(D,v+42)+A,ne=xe(t,e,pf)||Qi,Y=U?Er:I||wr,j=V?Er:B||wr;let te=ne(k,Y);te===he&&(te=Qi(k,Y));let le=ne(T,j);le===he&&(le=Qi(T,j)),Object.assign(F,{versionMadeBy:y,msDosCompatible:b,compressedSize:0,uncompressedSize:0,commentLength:Q,offset:oe,diskNumberStart:Ie(D,v+34),internalFileAttributes:Ie(D,v+36),externalFileAttributes:W,msdosAttributesRaw:X,msdosAttributes:ee,rawFilename:k,filenameUTF8:U,commentUTF8:V,rawExtraField:S.subarray(L,w),rawComment:T,filename:te,comment:le}),C=Math.max(oe,C),Ir(F,F,D,v+6);const re=F.externalFileAttributes>>16&ze;F.unixMode===he&&(re&(Jh|_n|Un))!=0&&(F.unixMode=re);const ce=!!(F.unixMode&Zh),ve=!!(F.unixMode&eu),Te=!!(F.unixMode&tu),et=F.unixMode!==he?(F.unixMode&_n)!=0:M&&(re&_n)!=0,xt=F.unixMode!==he&&(F.unixMode&Eo)==Un,gn=(re&Eo)==Un;Object.assign(F,{setuid:ce,setgid:ve,sticky:Te,unixExternalUpper:re,internalFileAttribute:F.internalFileAttributes,externalFileAttribute:F.externalFileAttributes,executable:et,directory:xt||gn||b&&ee.directory||te.endsWith(iu)&&!F.uncompressedSize,zipCrypto:F.encrypted&&!F.extraFieldAES});const St=new Ar(F);St.getData=(vi,Wt)=>F.getData(vi,St,t.readRanges,Wt),St.arrayBuffer=async vi=>{const Wt=new TransformStream,[ks]=await Promise.all([new Response(Wt.readable).arrayBuffer(),F.getData(Wt,St,t.readRanges,vi)]);return ks},v=R;const{onprogress:mn}=e;if(mn)try{await mn(x+1,E,new Ar(F))}catch{}yield St}const g=xe(t,e,gf),P=xe(t,e,mf);return g&&(t.prependedData=C>0?await Be(n,0,C):new Uint8Array),t.comment=h?await Be(n,d+Ot,h):new Uint8Array,P&&(t.appendedData=p<n.size?await Be(n,p,n.size-p):new Uint8Array),!0}async getEntries(e={}){const t=[];for await(const n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}}class Qf{constructor(e,t,n){Object.assign(this,{reader:e,config:t,options:n})}async getData(e,t,n,s={}){const o=this,{reader:r,offset:l,diskNumberStart:a,extraFieldAES:d,extraFieldZip64:h,compressionMethod:p,config:f,bitFlag:u,signature:m,rawLastModDate:E,uncompressedSize:A,compressedSize:C}=o,{dataDescriptor:v}=u,S=t.localDirectory={},D=await Be(r,l,Qn,a),O=fe(D);let I=xe(o,s,Af),B=xe(o,s,yf);const g=xe(o,s,Cf);if(I=I&&I.length&&I,B=B&&B.length&&B,d&&d.originalCompressionMethod!=Mh)throw new Error(yr);if(p!=Th&&p!=Sh&&p!=uo&&!g)throw new Error(yr);if(ue(O,0)!=Dh)throw new Error(Pf);vr(S,O,4);const{extraFieldLength:P,filenameLength:x,lastAccessDate:F,creationDate:_}=S;S.rawExtraField=P?await Be(r,l+Qn+x,P,a):new Uint8Array,Ir(o,S,O,4,!0),Object.assign(t,{lastAccessDate:F,creationDate:_});const H=o.encrypted&&S.encrypted&&!g,L=H&&!d;if(g||(t.zipCrypto=L),H){if(!L&&d.strength===he)throw new Error(Of);if(!I&&!B)throw new Error(Rf)}const w=l+Qn+x+P,y=C,b=r.readable;Object.assign(b,{diskNumberStart:a,offset:w,size:y});const M=xe(o,s,Ef),k=xe(o,s,wf);let Q=xe(o,s,vf);const R=xe(o,s,bf);R&&(Q=!0);const{onstart:T,onprogress:U,onend:V}=s,W=p==uo;let X=xe(o,s,xf);W&&(X=!1);const ee={options:{codecType:$o,password:I,rawPassword:B,zipCrypto:L,encryptionStrength:d&&d.strength,signed:xe(o,s,If)&&!g,passwordVerification:L&&(v?E>>>8&On:m>>>24&On),outputSize:g?C:A,signature:m,compressed:p!=0&&!g,encrypted:o.encrypted&&!g,useWebWorkers:xe(o,s,Bf),useCompressionStream:X,transferStreams:xe(o,s,Sf),deflate64:W,checkPasswordOnly:k},config:f,streamOptions:{signal:M,size:y,onstart:T,onprogress:U,onend:V}};Q&&await zf({reader:r,fileEntry:t,offset:l,diskNumberStart:a,signature:m,compressedSize:C,uncompressedSize:A,dataOffset:w,dataDescriptor:v||S.bitFlag.dataDescriptor,extraFieldZip64:h||S.extraFieldZip64,readRanges:n});let oe;try{if(!R){k&&(e=new WritableStream),e=new af(e),await _i(e,g?C:A),{writable:oe}=e;const{outputSize:ne}=await qu({readable:b,writable:oe},ee);if(e.size+=ne,ne!=(g?C:A))throw new Error(Vo)}}catch(ne){if(ne.outputSize!==he&&(e.size+=ne.outputSize),!k||ne.message!=Gn)throw ne}finally{!xe(o,s,Tf)&&oe&&!oe.locked&&await oe.getWriter().close()}return k||R?he:e.getData?e.getData():oe}}function vr(i,e,t){const n=i.rawBitFlag=Ie(e,t+2),s=(n&Ao)==Ao,o=ue(e,t+6);Object.assign(i,{encrypted:s,version:Ie(e,t),bitFlag:{level:(n&Wh)>>1,dataDescriptor:(n&yo)==yo,languageEncodingFlag:(n&Co)==Co},rawLastModDate:o,lastModDate:jf(o),filenameLength:Ie(e,t+22),extraFieldLength:Ie(e,t+24)})}function Ir(i,e,t,n,s){const{rawExtraField:o}=e,r=e.extraField=new Map,l=fe(new Uint8Array(o));let a=0;try{for(;a<o.length;){const v=Ie(l,a),S=Ie(l,a+2);r.set(v,{type:v,data:o.slice(a+4,a+4+S)}),a+=4+S}}catch{}const d=Ie(t,n+4);Object.assign(e,{signature:ue(t,n+nu),compressedSize:ue(t,n+su),uncompressedSize:ue(t,n+ou)});const h=r.get(Lh);h&&(Gf(h,e),e.extraFieldZip64=h);const p=r.get(Gh);p&&(Br(p,rr,ar,e,i),e.extraFieldUnicodePath=p);const f=r.get(Hh);f&&(Br(f,lr,cr,e,i),e.extraFieldUnicodeComment=f);const u=r.get(Nh);u?(Hf(u,e,d),e.extraFieldAES=u):e.compressionMethod=d;const m=r.get(Uh);m&&(Yf(m,e),e.extraFieldNTFS=m);const E=r.get(zh);if(E)xr(E,e,!1),e.extraFieldUnix=E;else{const v=r.get(Vh);v&&(xr(v,e,!0),e.extraFieldInfoZip=v)}const A=r.get(Qh);A&&(Vf(A,e,s),e.extraFieldExtendedTimestamp=A);const C=r.get(Yh);C&&(e.extraFieldUSDZ=C)}function Gf(i,e){e.zip64=!0;const t=fe(i.data),n=Uf.filter(([s,o])=>e[s]==o);for(let s=0,o=0;s<n.length;s++){const[r,l]=n[s];if(e[r]==l){const a=_f[l];e[r]=i[r]=a.getValue(t,o),o+=a.bytes}else if(i[r])throw new Error(Ff)}}function Br(i,e,t,n,s){const o=fe(i.data),r=new Oi;r.append(s[t]);const l=fe(new Uint8Array(4));l.setUint32(0,r.get(),!0);const a=ue(o,1);Object.assign(i,{version:ot(o,0),[e]:Qi(i.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&a==ue(l,0)}),i.valid&&(n[e]=i[e],n[e+Nf]=!0)}function Hf(i,e,t){const n=fe(i.data),s=ot(n,4);Object.assign(i,{vendorVersion:ot(n,0),vendorId:ot(n,2),strength:s,originalCompressionMethod:t,compressionMethod:Ie(n,5)}),e.compressionMethod=i.compressionMethod}function Yf(i,e){const t=fe(i.data);let n=4,s;try{for(;n<i.data.length&&!s;){const o=Ie(t,n),r=Ie(t,n+2);o==_h&&(s=i.data.slice(n+4,n+4+r)),n+=4+r}}catch{}try{if(s&&s.length==24){const o=fe(s),r=o.getBigUint64(0,!0),l=o.getBigUint64(8,!0),a=o.getBigUint64(16,!0);Object.assign(i,{rawLastModDate:r,rawLastAccessDate:l,rawCreationDate:a});const d=Zn(r),h=Zn(l),p=Zn(a),f={lastModDate:d,lastAccessDate:h,creationDate:p};Object.assign(i,f),Object.assign(e,f)}}catch{}}function xr(i,e,t){try{const n=fe(new Uint8Array(i.data));let s=0;const o=ot(n,s++),r=ot(n,s++),l=i.data.subarray(s,s+r);s+=r;const a=Sr(l),d=ot(n,s++),h=i.data.subarray(s,s+d);s+=d;const p=Sr(h);let f=he;if(!t&&s+2<=i.data.length){const u=i.data;f=new DataView(u.buffer,u.byteOffset+s,2).getUint16(0,!0)}Object.assign(i,{version:o,uid:a,gid:p,unixMode:f}),a!==he&&(e.uid=a),p!==he&&(e.gid=p),f!==he&&(e.unixMode=f)}catch{}}function Sr(i){const e=new Uint8Array(4);return e.set(i,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function Vf(i,e,t){const n=fe(i.data),s=ot(n,0),o=[],r=[];t?((s&1)==1&&(o.push(Xn),r.push(qn)),(s&2)==2&&(o.push(pr),r.push(df)),(s&4)==4&&(o.push(gr),r.push(mr))):i.data.length>=5&&(o.push(Xn),r.push(qn));let l=1;o.forEach((a,d)=>{if(i.data.length>=l+4){const h=ue(n,l);e[a]=i[a]=new Date(h*1e3);const p=r[d];i[p]=h}l+=4})}async function zf({reader:i,fileEntry:e,offset:t,diskNumberStart:n,signature:s,compressedSize:o,uncompressedSize:r,dataOffset:l,dataDescriptor:a,extraFieldZip64:d,readRanges:h}){let p=0;if(n)for(let m=0;m<n;m++){const E=i.readers[m];p+=E.size}let f=0;if(a&&(d?f=Oh:f=Rh),f){const m=await Be(i,l+o,f+mo,n);if(ue(fe(m),0)==kh){const A=ue(fe(m),4);let C,v;d?(C=Nt(fe(m),8),v=Nt(fe(m),16)):(C=ue(fe(m),8),v=ue(fe(m),12)),(e.encrypted&&!e.zipCrypto||A==s)&&C==o&&v==r&&(f+=mo)}}const u={start:p+t,end:p+l+o+f,fileEntry:e};for(const m of h)if(m.fileEntry!=e&&u.start>=m.start&&u.start<m.end){const E=new Error(Lf);throw E.overlappingEntry=m.fileEntry,E}h.push(u)}async function Wf(i,e,t,n,s){const o=new Uint8Array(4),r=fe(o);Kf(r,0,e);const l=n+s;return await a(n)||await a(Math.min(l,t));async function a(d){const h=t-d,p=await Be(i,h,d);for(let f=p.length-n;f>=0;f--)if(p[f]==o[0]&&p[f+1]==o[1]&&p[f+2]==o[2]&&p[f+3]==o[3])return{offset:h+f,buffer:p.slice(f,f+n).buffer}}}function xe(i,e,t){return e[t]===he?i.options[t]:e[t]}function jf(i){const e=(i&4294901760)>>16,t=i&ze;try{return new Date(1980+((e&65024)>>9),((e&480)>>5)-1,e&31,(t&63488)>>11,(t&2016)>>5,(t&31)*2,0)}catch{}}function Zn(i){return new Date(Number(i/BigInt(1e4)-BigInt(116444736e5)))}function ot(i,e){return i.getUint8(e)}function Ie(i,e){return i.getUint16(e,!0)}function ue(i,e){return i.getUint32(e,!0)}function Nt(i,e){return Number(i.getBigUint64(e,!0))}function Kf(i,e,t){i.setUint32(e,t,!0)}function fe(i){return new DataView(i.buffer)}try{Ri({baseURI:typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Cn&&Cn.tagName.toUpperCase()==="SCRIPT"&&Cn.src||new URL("leiting-bim.umd.js",document.baseURI).href})}catch{}const Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function $f(i){let e;i({wasmURI:()=>(e||(e="data:application/wasm;base64,"+(t=>{t=(r=>{const l=(r=(r+"").replace(/[^A-Za-z0-9+/=]/g,"")).length,a=[];for(let d=0;l>d;d+=4){const h=Pe.indexOf(r[d])<<18|Pe.indexOf(r[d+1])<<12|(63&Pe.indexOf(r[d+2]))<<6|63&Pe.indexOf(r[d+3]);a.push(h>>16&255),r[d+2]!=="="&&a.push(h>>8&255),r[d+3]!=="="&&a.push(255&h)}return new Uint8Array(a)})(t);let n=new Uint8Array(1024),s=0;for(let r=0;r<t.length;){const l=t[r++];if(128&l){const a=3+(127&l),d=t[r++]<<8|t[r++],h=s-d;o(s+a);for(let p=0;a>p;p++)n[s++]=n[h+p]}else{const a=l;o(s+a);for(let d=0;a>d&&r<t.length;d++)n[s++]=t[r++]}}return(r=>{let l="";const a=r.length;let d=0;for(;a>d+2;d+=3){const p=r[d]<<16|r[d+1]<<8|r[d+2];l+=Pe[p>>18&63]+Pe[p>>12&63]+Pe[p>>6&63]+Pe[63&p]}const h=a-d;if(h===1){const p=r[d]<<16;l+=Pe[p>>18&63]+Pe[p>>12&63]+"=="}else if(h===2){const p=r[d]<<16|r[d+1]<<8;l+=Pe[p>>18&63]+Pe[p>>12&63]+Pe[p>>6&63]+"="}return l})(new Uint8Array(n.buffer.slice(0,s)));function o(r){if(n.length<r){let l=2*n.length;for(;r>l;)l*=2;const a=new Uint8Array(l);a.set(n.subarray(0,s)),n=a}}})("FQBhc20BAAAAAUULYAF/AX9gAn9/AIEABYAACwIDf4IABwEBgAARAQaAAAuDAA6BABUDAGAAgAADgAANAQSBABUDAGAHgwAegAAfEgNCQQcABAEABAgIAAIABQIKAIAAB4EAAwEFgQAHAgICgQAHEAEDAAUGAAMDBQQJBAQJAQaAAAEeAAIEAwIEAgIBBAcDAwQFAXABDQ0FBgEBggKCAgYIgACYIkHQ1QQLB4oEHAZtZW1vcnkCAAxpbmZsYXRlOV9uZXcABw2GAA8HaW5pdAAIEYoAEAdfcmF3AAoQhgAUCXByb2Nlc3MAC4cARgZlbmQADhaGAA8QbGFzdF9jb25zdW1lZAARC4QAGYMAbYUANoMAbAEShQBYhwBrARSFAH+DABMHZ3ppcAAVD4UAFIUAfgEWhgBWgQB9AhgVhQAOjQB8AmRliQB8hQAOggB8AhoQiQAPggB8AhsRigATggB8AhwPhQ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WIgQAEgQEKgQAEgQGSgQAEgIS2ggAEAQuEAAQBDIQABIAF24FHeQTgHQsjhQBfhQXLAhARgAVtBgcJBgoFC4A6uAQNAg4BgAclBJQeC2mFAJCFAIiFAICFAHiBAGiBAFyBBh8BEIAABAEUgAAEARiAAAQBHIAABAEggAAEASiAAAQBMIAABAE4gAAEAUCAAAQBUIAABIEGvQFwgAAEAYCAAAQBoIAABAHAgAAEAeCAAG8DHwtyjQBvgQBrgQBngQBjgQBfgQBbgQBXgQBTgQBPgQBLgQBHgQBDgQE8AYCvAEGAUc0CC22BAMcBBIAAAgEIgAAEgQEzgQJLARCAAA6DAAyBnqyAqmuEACSBB3OBAE8BCIAACIEAGIUADIEIt4MADAEggQCUgDKEgQBrAYCBCC8BBIMADIA/SAoBABAMAEGRIQv/gCUfgMDAgIKxBQgJCQoKgEk3gAABAQ2AAAEBDoAAAQEPgAABARCEAAEBEYQAAQEShAABAROEAAEBFIwAAQEVjAABARaMAAEBF4wAAQEYnAABARmcAAEBGpwAAQEbmwABARyBffsEBAQFBYHB1QEHgAABAQiEAAGAXSqCAAEBCowAAYAnsooAAYEBMJkAAYEBTJkAAYEBaLkAAYEBpLkAAYIDdYABzoUBvI0BqJ0BkLwBgAIbHLwAAQEdvAABgA9PgH05A9AqAQ==")),e)})}let Ae,Ut,Fe,oi;function Xf(i){if(Ae=i,{malloc:Ut,free:Fe,memory:oi}=Ae,typeof Ut!="function"||typeof Fe!="function"||!oi)throw Ae=Ut=Fe=oi=null,new Error("Invalid WASM module")}function Tr(i,e,t={}){const n=typeof t.level=="number"?t.level:-1,s=typeof t.outBuffer=="number"?t.outBuffer:64*1024,o=typeof t.inBufferSize=="number"?t.inBufferSize:64*1024;return new TransformStream({start(){let r;if(this.out=Ut(s),this.in=Ut(o),this.inBufferSize=o,this._scratch=new Uint8Array(s),i?(this._process=Ae.deflate_process,this._last_consumed=Ae.deflate_last_consumed,this._end=Ae.deflate_end,this.streamHandle=Ae.deflate_new(),e==="gzip"?r=Ae.deflate_init_gzip(this.streamHandle,n):e==="deflate-raw"?r=Ae.deflate_init_raw(this.streamHandle,n):r=Ae.deflate_init(this.streamHandle,n)):e==="deflate64-raw"?(this._process=Ae.inflate9_process,this._last_consumed=Ae.inflate9_last_consumed,this._end=Ae.inflate9_end,this.streamHandle=Ae.inflate9_new(),r=Ae.inflate9_init_raw(this.streamHandle)):(this._process=Ae.inflate_process,this._last_consumed=Ae.inflate_last_consumed,this._end=Ae.inflate_end,this.streamHandle=Ae.inflate_new(),e==="deflate-raw"?r=Ae.inflate_init_raw(this.streamHandle):e==="gzip"?r=Ae.inflate_init_gzip(this.streamHandle):r=Ae.inflate_init(this.streamHandle)),r!==0)throw new Error("init failed:"+r)},transform(r,l){try{const a=r,d=new Uint8Array(oi.buffer),h=this._process,p=this._last_consumed,f=this.out,u=this._scratch;let m=0;for(;m<a.length;){const E=Math.min(a.length-m,32768);(!this.in||this.inBufferSize<E)&&(this.in&&Fe&&Fe(this.in),this.in=Ut(E),this.inBufferSize=E),d.set(a.subarray(m,m+E),this.in);const A=h(this.streamHandle,this.in,E,f,s,0),C=A&16777215;if(C&&(u.set(d.subarray(f,f+C),0),l.enqueue(u.slice(0,C))),!i){const S=A>>24&255,D=S&128?S-256:S;if(D<0)throw new Error("process error:"+D)}const v=p(this.streamHandle);if(v===0)break;m+=v}}catch(a){this._end&&this.streamHandle&&this._end(this.streamHandle),this.in&&Fe&&Fe(this.in),this.out&&Fe&&Fe(this.out),l.error(a)}},flush(r){try{const l=new Uint8Array(oi.buffer),a=this._process,d=this.out,h=this._scratch;for(;;){const p=a(this.streamHandle,0,0,d,s,4),f=p&16777215,u=p>>24&255;if(!i){const m=u&128?u-256:u;if(m<0)throw new Error("process error:"+m)}if(f&&(h.set(l.subarray(d,d+f),0),r.enqueue(h.slice(0,f))),u===1||f===0)break}}catch(l){r.error(l)}finally{if(this._end&&this.streamHandle){const l=this._end(this.streamHandle);l!==0&&r.error(new Error("end error:"+l))}this.in&&Fe&&Fe(this.in),this.out&&Fe&&Fe(this.out)}}})}class qf{constructor(e="deflate",t){return Tr(!0,e,t)}}class Jf{constructor(e="deflate",t){return Tr(!1,e,t)}}let Mr=!1;async function Zf(i,{baseURI:e}){if(!Mr){let t,n;try{try{n=new URL(i,e)}catch{}t=await(await fetch(n)).arrayBuffer()}catch(o){if(i.startsWith("data:application/wasm;base64,"))t=ep(i);else throw o}const s=await WebAssembly.instantiate(t);Xf(s.instance.exports),Mr=!0}}function ep(i){const e=i.split(",")[1],t=atob(e),n=t.length,s=new Uint8Array(n);for(let o=0;o<n;++o)s[o]=t.charCodeAt(o);return s.buffer}let es;$f(Ri),Yu({initModule:i=>{if(!es){let{wasmURI:e}=i;typeof e==yt&&(e=e()),es=Zf(e,i)}return es}}),Ri({CompressionStreamZlib:qf,DecompressionStreamZlib:Jf});const ts={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin","cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot","wiz"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf","xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","xpdl"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot","ppa","pwz"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":["odm","otm"],"vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw","vsdx","vssx","vstx","vssm","vstm"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-director":["dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-latex":"latex","x-lyx":"lyx","x-lzx":"lzx","x-maker":["frm","fb","fbdoc"],"x-ms-wmd":"wmd","x-msdos-program":["com","exe","bat","dll"],"x-netcdf":["nc"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":["rpm","rpa"],"x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":["mathml","mml"],mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","application/x-ms-installer":"msi","x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-perfmon":["pma","pmc","pmr","pmw"],"ynd.ms-pkipko":"pko",gzip:["gz","tgz"],"smil+xml":["smi","smil"],"vnd.debian.binary-package":["deb","udeb"],"vnd.hzn-3d-crossword":"x3d","vnd.sqlite3":["db","sqlite","sqlite3","db-wal","sqlite-wal","db-shm","sqlite-shm"],"vnd.wap.sic":"sic","vnd.wap.slc":"slc","x-krita":["kra","krz"],"x-perl":["pm","pl"],yaml:["yaml","yml"]},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":"aifc","x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",aac:"aac",aiff:["aiff","aif","aff"],opus:"opus",wav:"wav"},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":"mmod","x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":"sd","x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":"val","x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},font:{otf:"otf",woff:"woff",woff2:"woff2"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe","jfif","jfif-tbnl","jif"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",avif:"avifs",heic:["heif","heic"],pjpeg:["pjpg"],"vnd.adobe.photoshop":"psd","x-adobe-dng":"dng","x-fuji-raf":"raf","x-icns":"icns","x-kodak-dcr":"dcr","x-kodak-k25":"k25","x-kodak-kdc":"kdc","x-minolta-mrw":"mrw","x-panasonic-raw":["raw","rw2","rwl"],"x-pentax-pef":["pef","ptx"],"x-sigma-x3f":"x3f","x-sony-arw":"arw","x-sony-sr2":"sr2","x-sony-srf":"srf"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":"x3dz","x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.usdz+zip":"usdz","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",plain:["txt","text","brf","conf","def","list","log","in","bas","diff","ksh"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:"tm","tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":"patch","x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas","pp","inc"],"x-pcs-gcd":"gcd","x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","h","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt",javascript:"js",json:"json",markdown:["md","markdown","mdown","markdn"],"vnd.wap.si":"si","vnd.wap.sl":"sl"},video:{avif:"avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv",mp2t:"ts"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","flr","wrz","xaf","xof"]}};(()=>{const i={};for(const e of Object.keys(ts))for(const t of Object.keys(ts[e])){const n=ts[e][t];if(typeof n=="string")i[n]=e+"/"+t;else for(let s=0;s<n.length;s++)i[n[s]]=e+"/"+t}return i})(),du(Ri);const tp="E84#E3C4!8C4&A1";async function rt(i){try{const e=await fetch(i);if(!e.ok)return!1;const t=await e.blob();try{const n=new br(new $n(t),{password:tp}),o=(await n.getEntries()).find(l=>!l.directory&&l.filename.endsWith(".json"));if(!o)return await n.close(),!1;const r=await o.getData(new sf);return await n.close(),JSON.parse(r.trim())}catch{const n=await t.text();try{return JSON.parse(n.trim())}catch(s){throw console.error(`[loadModelFile] JSON parse error: ${i}`,s),s}}}catch(e){return console.error("[loadModelFile] 加载失败",`${i} ${e}`),!1}}async function ip(i){if(!i)return null;try{const e=`/cx_dzpt/bim/modelComponentTree/list?dbName=${encodeURIComponent(i)}`,t=await fetch(e);if(!t.ok)return console.warn(`[loadTreeFromApi] API 请求失败: ${e} ${t.status}`),null;const n=await t.json();return Array.isArray(n)?np(n):(console.warn("[loadTreeFromApi] API 返回格式错误: 期望数组",n),null)}catch(e){return console.error("[loadTreeFromApi] 加载异常:",e),null}}function np(i){const e={},t=[];return i.forEach(n=>{n.id&&(e[n.id]={...n,children:[]})}),i.forEach(n=>{if(!n.id)return;const s=e[n.id];if(!s)return;const o=n.parentId;o&&e[o]?e[o].children?.push(s):t.push(s)}),t}async function sp(i){if(!i||i.length===0)return null;try{const e=await fetch("/cx_dzpt/bim/modelComponent/listByDbNameAndElementId",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return e.ok?await e.json():(console.warn(`[fetchComponentDetails] API 请求失败: ${e.status}`),null)}catch(e){return console.error("[fetchComponentDetails] 加载异常:",e),null}}function op(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){const e=Math.random()*16|0;return(i==="x"?e:e&3|8).toString(16)})}class Gi{events={};on(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)}emit(e,...t){this.events[e]&&this.events[e].forEach(n=>n(...t))}off(e,t){this.events[e]&&(this.events[e]=this.events[e].filter(n=>n!==t))}}class Dr{cesium;viewer;modelList=[];hasLoaded3dTiles={};mapRecordModelId={};mapTileset={};BIMmodelId="";lazyLoadingCount=0;events=new Gi;options={flyTo:!0,flyToDuration:0,loadTreeNodeDetails:!0,loadTreeNodeDetailsUrl:"/elementInfo.zip",loadTree:!0,loadTreeUrl:"/allElementsInfo.zip",boxRegionUrl:"/BoundingBoxInfo.zip",regionUrl:"/region.zip",batchIDInfoUrl:"/batchIDInfo.zip",enabledSection:!0,delay:0,tilesetOptions:{cullWithChildrenBounds:!0,cullRequestsWhileMoving:!0,cullRequestsWhileMovingMultiplier:10,backFaceCulling:!0,colorBlendAmount:0,minimumPixelSize:128,maximumScreenSpaceError:32,skipLevelOfDetail:!0,baseScreenSpaceError:1024,skipScreenSpaceErrorFactor:128,skipLevels:5,immediatelyLoadDesiredLevelOfDetail:!1,loadSiblings:!1,maximumMemoryUsage:4096*10,preloadWhenHidden:!0,preferLeaves:!0,progressiveResolutionHeightFraction:.5,dynamicScreenSpaceErrorDensity:.002,dynamicScreenSpaceErrorFactor:4,dynamicScreenSpaceError:!0,dynamicScreenSpaceErrorHeightFalloff:.25,foveatedConeSize:0,foveatedTimeDelay:10,foveatedMinimumScreenSpaceErrorRelaxation:0}};constructor(e){this.cesium=e.cesium,this.viewer=e.viewer,this.options.tilesetOptions&&(this.options.tilesetOptions.colorBlendMode=this.cesium.Cesium3DTileColorBlendMode.REPLACE)}deleteAllModels(){const e=[];return Object.keys(this.mapTileset).forEach(t=>{const n=this.mapTileset[t];n&&(this.viewer.scene.primitives.remove(n),e.push(t)),delete this.mapTileset[t],delete this.hasLoaded3dTiles[t],delete this.mapRecordModelId[t]}),this.modelList=[],this.viewer.scene.requestRender(),this.events.emit("updateModels",{modelList:[]}),e}deleteModels(e){const t=[];return e.forEach(({modelId:n})=>{const s=this.mapTileset[n];s&&(this.viewer.scene.primitives.remove(s),t.push(n)),delete this.mapTileset[n],delete this.hasLoaded3dTiles[n],delete this.mapRecordModelId[n]}),this.modelList=this.modelList.filter(n=>!t.includes(n.modelId)),this.viewer.scene.requestRender(),this.events.emit("updateModels",{modelList:this.modelList}),t}showModels(e){const t=[];return e.forEach(n=>{const s=`${n.modelId}`,o=this.mapTileset[s];o&&(o.show=!!n.show,t.push(s))}),t.length&&this.viewer.scene.requestRender(),t}async addModels({files:e,fileNames:t,options:n}){const s=e||t||[];s.length>0&&await this.add3DTilesModel(s,n)}async add3DTilesModel(e,t){const n=t?xh({},this.options,t):{...this.options};if(e?.length){for(const s of e){const o=`${s.modelId}`;if(this.mapRecordModelId[o])continue;const r=`${s.outPutPath}${s.dbName}/tileset.json`;this.modelList.push({...s,url:r,state:Rt.NotLoaded}),this.mapRecordModelId[o]=!1}await this.load3DTilesModel(n)}}async load3DTilesModel(e){const t=this.modelList.filter(r=>r.state===Rt.NotLoaded);if(!t.length)return;const n=t.length;this.events.emit("loadingStatus",`正在加载 ${n} 个模型`);let s=0,o=!1;for(const r of t){s++;try{r.state=Rt.Loading;const l=r.url,a=this.getBaseUrlPath(l);e.loadTreeNodeDetails=!1,e.loadTreeNodeDetails&&this.events.emit("loadingStatus",`正在加载第 ${s}/${n} 个模型: 加载${r.modelName}构件信息`);let d=e.loadTreeNodeDetails?await rt(`${a}${e.loadTreeNodeDetailsUrl}`):!1;e.loadTree=!1,e.loadTree&&this.events.emit("loadingStatus",`正在加载第 ${s}/${n} 个模型: 加载${r.modelName}目录树`);const h=e.loadTree?await rt(`${a}${e.loadTreeUrl}`):!1;this.events.emit("loadingStatus",`正在加载第 ${s}/${n} 个模型: 加载${r.modelName}模型数据`);const p=e.boxRegionUrl?await rt(`${a}${e.boxRegionUrl}`):!1,f=e.batchIDInfoUrl?await rt(`${a}${e.batchIDInfoUrl}`):!1;f&&(d||(d=f));const u=await this.loadTilesetWithZipSupport(l,r.modelId,e.tilesetOptions||{},this.cesium);this.viewer.scene.primitives.add(u),await u.readyPromise;const m=`${u?.asset?.tilesetVersion??r.modelId}`;this.mapTileset[`${r.modelId}`]=u;const E={versionId:m,selectedFn:e.selectedFn,model:{modelId:r.modelId,modelName:r.modelName,dbName:r.dbName,fileType:r.fileType,outPutPath:r.outPutPath,url:r.url,treeUrl:`${a}${e.loadTreeUrl}`,nodeUrl:`${a}${e.loadTreeNodeDetailsUrl}`,formData:r.formData,type:"BIM"},node:d||null,tree:h||null,box:null};if(p?.min&&p?.max){const A={x:p.min.X,y:p.min.Y,z:p.min.Z},C={x:p.max.X,y:p.max.Y,z:p.max.Z},v={x:(A.x+C.x)/2,y:(A.y+C.y)/2,z:(A.z+C.z)/2};E.box={min:A,max:C,center:v}}if(!r.formData){const A=await rt(`${r.outPutPath}${r.dbName}${e.regionUrl}`);if(A)r.formData={modelId:r.modelId.toString(),longitude:A.Longitude,latitude:A.Latitude,distance:1e-6,rotation:30,totalRotation:A.DAngle||0,height:A.MinHeight,lonlat:1e-5,heightDistance:1,modelOptions:[{value:r.modelId.toString(),label:r.modelName}],X:A?.X||0,Y:A?.Y||0,Z:A?.Z||0};else{const C=t.indexOf(r);r.formData={modelId:r.modelId.toString(),longitude:118.12548706388897,latitude:24.596796919444404,distance:1e-5,rotation:0,totalRotation:0,heightDistance:1,height:0,lonlat:1e-5,modelOptions:[{value:C+1,label:r.modelName}],X:0,Y:0,Z:0}}}r.formData&&(r.formData.heightDistance=r.formData.heightDistance??1,E.model.formData=r.formData),u.leiting=E,Rn({Cesium:this.cesium,tileset:u}),r.state=Rt.Loaded,this.mapRecordModelId[r.modelId]=!0,this.events.emit("tilesetLoaded",u),e.tilesLoad3dTiles&&e.tilesLoad3dTiles(u),!o&&e.flyTo&&(this.BIMmodelId=r.modelId,this.flyToTileset({modelId:this.BIMmodelId,options:{duration:e.flyToDuration??0}}),o=!0),e.delay&&await new Promise(A=>setTimeout(A,e.delay))}catch(l){console.error(`模型 ${r.modelName} 加载失败:`,l),this.events.emit("loadingStatus",`模型 ${r.modelName} 加载失败`),r.state=Rt.Error}}e.mountAll3Dtiles&&e.mountAll3Dtiles(this.modelList),e.onMountAll3Dtiles&&e.onMountAll3Dtiles(this.modelList),this.events.emit("loadingStatus",""),this.events.emit("mountAll3Dtiles",{modelList:this.modelList,mapTileset:this.mapTileset})}async addOSGB({files:e,options:t}){const n=this.cesium;if(!e?.length)return;this.events.emit("loadingStatus",`正在加载 ${e.length} 个倾斜摄影模型`);let s=!1,o=0;for(const r of e){o++,this.events.emit("loadingStatus",`正在加载第 ${o}/${e.length} 个模型: 加载${r.modelName}`);try{const{outPutPath:l,dbName:a,modelId:d}=r,h=`${l}${a}/tileset.json`,p=await n.Cesium3DTileset.fromUrl(h,{maximumScreenSpaceError:16,preferLeaves:!0,cullWithChildrenBounds:!0,...t?.tilesetOptions});if(p.colorBlendMode=this.cesium.Cesium3DTileColorBlendMode.REPLACE,this.viewer.scene.primitives.add(p),await p.readyPromise,this.mapTileset[`${d}`]=p,this.hasLoaded3dTiles[`${d}`]=(this.hasLoaded3dTiles[`${d}`]||0)+1,this.mapRecordModelId[`${d}`]=!0,!r?.formData){const f=p.root.computedTransform;if(f){const u=n.Matrix4.fromColumnMajorArray(f),m=n.Matrix4.getTranslation(u,new n.Cartesian3),E=n.Ellipsoid.WGS84.cartesianToCartographic(m),A=n.Math.toDegrees(E.longitude),C=n.Math.toDegrees(E.latitude),v=E.height;r.formData={modelId:r.modelId.toString(),longitude:A,latitude:C,distance:1e-5,rotation:0,totalRotation:0,heightDistance:1,height:v,lonlat:1e-5,modelOptions:[{value:r.modelId.toString(),label:r.modelName}],X:0,Y:0,Z:0}}else console.warn(`OSGB模型 ${d} 无法获取初始位置信息`)}r.formData&&(r.formData.heightDistance=r.formData.heightDistance??1),p.leiting={versionId:`${p?.asset?.tilesetVersion??d}`,selectedFn:t?.selectedFn,model:{modelId:r.modelId,modelName:r.modelName,dbName:r.dbName,fileType:r.fileType,outPutPath:r.outPutPath,url:h,formData:r.formData,type:"OSGB"},box:null},Rn({Cesium:this.cesium,tileset:p}),this.modelList.push({...r,url:h,state:Rt.Loaded}),!s&&t?.flyTo&&(this.BIMmodelId=r.modelId,this.viewer.zoomTo(p),s=!0)}catch(l){console.error(`OSGB模型 ${r.dbName} 加载失败:`,l);continue}}this.events.emit("loadingStatus",""),this.events.emit("onMountAllOsgb3Dtiles",{modelList:this.modelList,mapTileset:this.mapTileset})}updateOSGBMatrix(e){const{X:t,Y:n,Z:s,modelId:o}=e,r=this.cesium,l=this.mapTileset[o];if(!l){console.warn("tileSet not found for modelId:",o);return}let a=t||0,d=n||0,h=s||0;const p=l.boundingSphere.center,f=r.Transforms.eastNorthUpToFixedFrame(p),u=new r.Cartesian3(a,d,h),m=r.Matrix4.multiplyByPoint(f,u,new r.Cartesian3(0,0,0)),E=r.Cartesian3.subtract(m,p,new r.Cartesian3);l.modelMatrix=r.Matrix4.fromTranslation(E)}flyToTileset({modelId:e=this.BIMmodelId,options:t={}}={}){const s=this.getMapTileset()[e];if(!s||!this.viewer)return;const{complete:o,cancel:r,...l}=t,a={duration:0,...l};this.viewer.flyTo(s,a).then(d=>{d?o&&o():r&&r()}).catch(d=>{r&&r(),console.error("FlyTo error",d)})}getMapTileset(){return this.mapTileset}getBIMmodelId(){return this.BIMmodelId}getModelList(){return this.modelList}setMapTileset(e){this.mapTileset=e}setBIMmodelId(e){this.BIMmodelId=e}setModelList(e){this.modelList=e}getBaseUrlPath(e){const t=e.lastIndexOf("/");return t===-1?".":e.substr(0,t)}async loadTilesetWithZipSupport(e,t,n,s){const o=`${this.getBaseUrlPath(e)}/tileset.zip`;if((await fetch(o,{method:"HEAD"})).status===200){const a=await rt(o);if(a){const d=new Blob([JSON.stringify(a)],{type:"application/json"}),h=URL.createObjectURL(d);class p{getURL(A){return A.includes("blob://")?A.replace(/blob:\/\//g,u):A}}const f=new p,u=this.getBaseUrlPath(e),m=new s.Resource({url:h,proxy:f});try{return await s.Cesium3DTileset.fromUrl(m,{id:t,...n})}catch{return await s.Cesium3DTileset.fromUrl(e,{url:e,id:t,...n})}}}return await s.Cesium3DTileset.fromUrl(e,{url:e,id:t,...n})}async loadTreeForModel(e){const t=this.mapTileset[e];if(!t||!t.leiting)return null;if(t.leiting.tree)return t.leiting.tree;const n=t.leiting.model?.modelName||e,s=t.leiting.model?.treeUrl,o=t.leiting.model?.dbName;if(!o&&!s)return null;this.lazyLoadingCount++,this.events.emit("loadingStatus",`正在加载 ${n} 目录树...`);try{if(o){const r=await ip(o);if(r&&r.length>0)return t.leiting.tree=r,r}if(s){const r=await rt(s);if(r)return t.leiting.tree=r,r}}catch(r){console.error(`Failed to load tree for model ${e}:`,r)}finally{this.lazyLoadingCount--,this.lazyLoadingCount<=0&&(this.lazyLoadingCount=0,this.events.emit("loadingStatus",""))}return null}async loadNodeDetailsForModel(e){const t=this.mapTileset[e];if(!t||!t.leiting)return null;if(t.leiting?.node?.nodeExtras)return t.leiting.node;const n=t.leiting.model?.nodeUrl,s=t.leiting.model?.modelName||e;if(!n)return null;this.lazyLoadingCount++,this.events.emit("loadingStatus",`正在加载 ${s} 构件详情...`);try{const o=await rt(n);if(o)return o.batchIdEIDInfos||(o.batchIdEIDInfos=t.leiting.node.batchIdEIDInfos),t.leiting.node=o,o}catch(o){console.error(`Failed to load node details for model ${e}:`,o)}finally{this.lazyLoadingCount--,this.lazyLoadingCount<=0&&(this.lazyLoadingCount=0,this.events.emit("loadingStatus",""))}return null}}const kr={normal:0,process:2},rp={color:1};function Pr(i){return i===1||i==="exist"?1:i===2||i==="process"?2:0}function _t(i){return Number.isNaN(i)?0:i<=1?Math.min(Math.max(i,0),1):Math.min(Math.max(i/255,0),1)}function Fr(i){return Number.isNaN(i)?1:i<=1?Math.min(Math.max(i,0),1):1}function is(i){if(!i)return null;const e=Number(i.r),t=Number(i.g),n=Number(i.b),s=i.a===void 0?1:Number(i.a);if([e,t,n,s].some(a=>Number.isNaN(a)))return null;const o=Math.round(e*255),r=Math.round(t*255),l=Math.round(n*255);return`rgba(${o},${r},${l},${s})`}function ap(i){if(!i||typeof i!="string")return null;const t=i.replace(/\s+/g,"").match(/^rgba?\((\d+),(\d+),(\d+)(?:,([0-9.]+))?\)$/i);if(!t)return null;const n=Number(t[1]),s=Number(t[2]),o=Number(t[3]),r=t[4]===void 0?1:Number(t[4]);return[n,s,o,r].some(l=>Number.isNaN(l))?null:{r:Math.min(Math.max(n/255,0),1),g:Math.min(Math.max(s/255,0),1),b:Math.min(Math.max(o/255,0),1),a:Math.min(Math.max(r,0),1)}}function lp(i){if(i==null)return null;const e=Number(i);return Number.isNaN(e)?null:e}function cp(i){const e=i.lastIndexOf("-"),t=i.substring(0,e),n=i.substring(e+1);return[t,n]}function ns(i){if(!i)return null;const e=i.Min??i.min,t=i.Max??i.max;if(!e||!t)return null;const n=Number(e.x??e.X),s=Number(e.y??e.Y),o=Number(e.z??e.Z),r=Number(t.x??t.X),l=Number(t.y??t.Y),a=Number(t.z??t.Z);return[n,s,o,r,l,a].some(d=>Number.isNaN(d))?null:{min:{x:n,y:s,z:o},max:{x:r,y:l,z:a}}}function ri(i,e){if(e)return`${e}`;const t=i?.leiting?.model?.modelId??i?.modelId??i?.id;return t==null?null:`${t}`}function dp(i,e){if(e==null)return null;const t=i?.leiting?.node;if(!t)return null;const n=`${e}`,s=t?.[n],o=ns(s?.box3??s?.box);if(o)return o;const r=t?.element?.[n]??t?.elements?.[n]??t?.nodeExtras?.element?.[n]??t?.nodeExtras?.elements?.[n];return ns(r?.box3??r?.box)}function hp(i){const e=i?.leiting?.box;return e?ns({min:e.min,max:e.max}):null}class up{base;constructor(e){this.base=e}initTime(){const t=this.base.cesium.JulianDate.fromDate(new Date(2023,3,21,10,0));this.base.viewer.clock.currentTime=t,this.base.start=this.base.viewer.clock.currentTime.secondsOfDay*1e3}processAnimation(e,t,n,s=null){if(this.base.start==null)return;const o=this.base.start+(e?.delay??0),r=this.base.start+(e?.playtime??0)+(e?.delay??0);t<=o&&(e.cash=!0,e.groupData.forEach(l=>{const{batchIds:a,modelId:d,rgba:h}=l;if(Array.isArray(a)&&a[0]){a[0][1]=h;const p=n[d];p?p.push(a[0]):n[d]=[a[0]]}})),t>=o&&t<r&&(s!==null&&(this.base.viewer.scene.ambientLightIntensity=s),e.cash=!1,e.playCash=!0,e.groupData.forEach(l=>{const{batchIds:a,playTimeColor:d,modelId:h}=l;if(Array.isArray(a)&&a[0]){a[0][1]=d;const p=n[h];p?p.push(a[0]):n[h]=[a[0]]}})),t>=r&&(e.finished=!0)}onTick=e=>{if(!this.base.cesium||!this.base.viewer)return;const t=e?.currentTime?.secondsOfDay?e.currentTime.secondsOfDay*1e3:this.base.viewer.clock.currentTime.secondsOfDay*1e3,n={};Array.isArray(this.base.data)&&this.base.data.forEach(o=>{this.processAnimation(o,t,n,.1)});const s=Object.entries(n);if(s.forEach(([o,r])=>{this.base.setTileSyltByConstructionProcessTracking({modelId:o,batchIds:r})}),Object.keys(this.base.mapAnimations).forEach(o=>{const r=this.base.mapAnimations[o];r.length&&r.every(l=>l.finished)&&!this.base.clearedModelIds.has(o)&&(this.base.setTileSyltByConstructionProcessTracking({modelId:o,batchIds:[]}),this.base.clearedModelIds.add(o))}),this.base.recoverStaus){s.length&&(this.base.recoverStaus=!1);return}s.length===0&&Array.isArray(this.base.data)&&this.base.data.forEach(o=>{o.groupData.forEach(r=>{const{modelId:l}=r;this.base.setTileSyltByConstructionProcessTracking({modelId:l,batchIds:[]})}),this.base.recoverStaus=!0})};enableConstructionProgressTracking(){this.base.clearedModelIds.clear(),this.initTime(),this.base.groupBatchIds={},Array.isArray(this.base.data)&&(this.base.data.forEach(e=>{e.cash=!1,e.playCash=!1,e.groupData.forEach(t=>{const{batchIds:n,modelId:s,rgba:o}=t;if(Array.isArray(n)&&n[0]){n[0][1]=o;const r=this.base.groupBatchIds[s];r?r.push(n[0]):this.base.groupBatchIds[s]=[n[0]]}})}),Object.entries(this.base.groupBatchIds).forEach(([e,t])=>{this.base.setTileSyltByConstructionProcessTracking({modelId:e,batchIds:t})})),this.base.viewer.clock.onTick.addEventListener(this.onTick)}disableConstructionProgressTracking(){this.base.viewer.clock.onTick.removeEventListener(this.onTick),this.base.viewer.scene.ambientLightIntensity=1,Array.isArray(this.base.data)&&this.base.data.forEach(e=>{e.cash=!0,e.playCash=!0,e.groupData.forEach(t=>{const{modelId:n}=t,s=[];this.base.setTileSyltByConstructionProcessTracking({modelId:n,batchIds:s})})}),this.base.start=null}freshConstructionProgressTracking(){const e=this.base.viewer.clock.currentTime.secondsOfDay*1e3,t={};Array.isArray(this.base.data)&&this.base.data.forEach(s=>{s.playCash=!1,this.processAnimation(s,e,t)});const n=Object.entries(t);n.forEach(([s,o])=>{this.base.setTileSyltByConstructionProcessTracking({modelId:s,batchIds:o})}),n.length===0&&Array.isArray(this.base.data)&&this.base.data.forEach(s=>{s.groupData.forEach(o=>{const{modelId:r}=o;this.base.setTileSyltByConstructionProcessTracking({modelId:r,batchIds:[]})})})}reStartAnimation(){let e={};this.base.clearedModelIds.clear(),Array.isArray(this.base.data)&&this.base.data.forEach(t=>{t.cash=!1,t.playCash=!1,t.groupData.forEach(n=>{const{batchIds:s,modelId:o,rgba:r}=n;if(Array.isArray(s)&&s[0]){s[0][1]=r;const l=e[o];l?l.push(s[0]):e[o]=[s[0]]}})}),Object.entries(e).forEach(([t,n])=>{this.base.setTileSyltByConstructionProcessTracking({modelId:t,batchIds:n})}),this.initTime()}setAllConstructionProgressTracking(e){this.base.data=e,Array.isArray(this.base.data)&&this.base.data.forEach(t=>{t.cash=!1,t.playCash=!1,t.groupData=[],t.finished=!1,t.mergeCpts.forEach(n=>{const s=[];n.cpts.forEach(a=>{s.push({dbName:n.linkModelId,modelId:n.modelId,elementId:`${a}`,show:!0,rgba:t.rgba??{r:.2,g:.2,b:.2,a:.2}})});const o=kr.process,r=rp.color,{allElements:l}=this.base.groupByModelId(s);this.base.mapAnimations[n.modelId]=this.base.mapAnimations[n.modelId]||[],this.base.mapAnimations[n.modelId].push(t),Object.entries(l).forEach(([a,d])=>{const[h,p]=cp(a),f=this.base.getTileSyltByConstructionProcessTracking({elementIds:d,modelId:h,color:p,colorRank:o,show:!0,selectionRank:r}),u=t?.playTimeColor?.r??1,m=t?.playTimeColor?.g??1,E=t?.playTimeColor?.b??0,A=t?.playTimeColor?.a??.1,C=this.base.setColor({r:u,g:m,b:E,a:A}),v=this.base.setColor(t.rgba??{r:.2,g:.2,b:.2,a:.2});t.groupData.push({modelId:h,batchIds:f,playTimeColor:C,rgba:v})})})})}}class fp{base;constructor(e){this.base=e}attachTileset(e,t,n){const s=this.base.cesium;this.base.handler||(this.base.handler=new s.ScreenSpaceEventHandler(this.base.viewer.scene.canvas));const o=ri(e,n);o&&(this.base.tilesetMap[o]=e),t&&(this.base.selectedColor=t),this.bindInputs()}bindInputs(){if(!this.base.handler)return;const e=this.base.cesium;this.base.handler.setInputAction(async t=>{let n;try{n=this.base.viewer.scene.pick(t.position)}catch{}if(e.defined(n)&&n instanceof e.Cesium3DTileFeature){await this.base.clearSelection();const s=ri(n.tileset);if(!s||!this.base.tilesetMap[s])return;const o=this.base.getFeatureId(n);if(o==="-1")return;let r;const l=this.base.viewer.scene.pickPosition(t.position);if(e.defined(l)){const h=e.Cartographic.fromCartesian(l),p=e.Math.toDegrees(h.longitude),f=e.Math.toDegrees(h.latitude),u=h.height;r=[p,f,u]}const d=(this.base.hasSelectedFeaturesMap[s]||[]).filter(h=>h.rank!==0);if(this.base.hasSelectedFeaturesMap[s]=[...d,{batchId:o,selectedColor:this.base.selectedColor,rank:0,point:r}],this.base.setBaseStyle(s),await this.base.triggerSelectionChange(s),n.tileset.leiting?.selectedFn)if(n.tileset.leiting.node){const h=n.tileset.leiting.node.batchIdEIDInfos[o].elementID,p=n.tileset.leiting.node.nodeExtras.element[h];p.elementId=h,p.modelId=n.tileset.leiting.model.modelId,n.tileset.leiting.selectedFn({elementInfo:p,elementId:h,point:r,modelId:n.tileset.leiting.model.modelId,_propsData:p})}else n.tileset.leiting.selectedFn(null)}else await this.base.clearSelection()},e.ScreenSpaceEventType.LEFT_CLICK),this.base.handler.setInputAction(async t=>{let n;try{n=this.base.viewer.scene.pick(t.position)}catch{}if(e.defined(n)&&n instanceof e.Cesium3DTileFeature){const s=ri(n.tileset);if(!s||!this.base.tilesetMap[s])return;const o=this.base.getFeatureId(n);if(o==="-1")return;let r;const l=this.base.viewer.scene.pickPosition(t.position);if(e.defined(l)){const a=e.Cartographic.fromCartesian(l),d=e.Math.toDegrees(a.longitude),h=e.Math.toDegrees(a.latitude),p=a.height;r=[d,h,p]}await this.base.toggleMultiSelect(s,o,this.base.selectedColor,r)}},e.ScreenSpaceEventType.LEFT_CLICK,e.KeyboardEventModifier.CTRL),this.base.handler.setInputAction(t=>{this.base.ensureSelectionDiv();const n=this.base.viewer?.scene?.screenSpaceCameraController;n&&this.base.cameraControllerState===null&&(this.base.cameraControllerState={enableRotate:n.enableRotate,enableTilt:n.enableTilt,enableLook:n.enableLook},n.enableRotate=!1,n.enableTilt=!1,n.enableLook=!1),this.base.selectStart=this.base.cesium.Cartesian2.clone(t.position),this.base.selectEnd=null,this.base.selectionDiv&&this.base.selectStart&&(this.base.selectionDiv.style.left=`${this.base.selectStart.x}px`,this.base.selectionDiv.style.top=`${this.base.selectStart.y}px`,this.base.selectionDiv.style.width="0px",this.base.selectionDiv.style.height="0px",this.base.selectionDiv.style.display="block")},e.ScreenSpaceEventType.LEFT_DOWN,e.KeyboardEventModifier.CTRL),this.base.handler.setInputAction(t=>{if(!this.base.selectStart||!this.base.selectionDiv)return;const n=performance.now();if(n-this.base.lastDrawTime<20)return;this.base.lastDrawTime=n,this.base.selectEnd=this.base.cesium.Cartesian2.clone(t.endPosition);const s=Math.min(this.base.selectStart.x,this.base.selectEnd.x),o=Math.min(this.base.selectStart.y,this.base.selectEnd.y),r=Math.abs(this.base.selectStart.x-this.base.selectEnd.x),l=Math.abs(this.base.selectStart.y-this.base.selectEnd.y);this.base.selectionDiv.style.left=`${s}px`,this.base.selectionDiv.style.top=`${o}px`,this.base.selectionDiv.style.width=`${r}px`,this.base.selectionDiv.style.height=`${l}px`,this.base.selectionDiv.style.backgroundColor="rgba(0, 255, 255, 0.5)",this.base.selectionDiv.style.position="absolute",this.base.selectionDiv.style.zIndex="2"},e.ScreenSpaceEventType.MOUSE_MOVE,e.KeyboardEventModifier.CTRL),this.base.handler.setInputAction(async()=>{if(!this.base.selectStart||!this.base.selectionDiv)return;if(!this.base.selectStart||!this.base.selectEnd){this.base.selectionDiv.style.display="none";const n=this.base.viewer?.scene?.screenSpaceCameraController;n&&this.base.cameraControllerState!==null&&(n.enableRotate=this.base.cameraControllerState.enableRotate,n.enableTilt=this.base.cameraControllerState.enableTilt,n.enableLook=this.base.cameraControllerState.enableLook,this.base.cameraControllerState=null);return}this.base.selectionDiv.style.display="none",await this.base.selectTilesInRectangle(this.base.selectStart,this.base.selectEnd,this.base.selectedColor),this.base.viewer.scene.requestRender(),this.base.selectStart=null,this.base.selectEnd=null;const t=this.base.viewer?.scene?.screenSpaceCameraController;t&&this.base.cameraControllerState!==null&&(t.enableRotate=this.base.cameraControllerState.enableRotate,t.enableTilt=this.base.cameraControllerState.enableTilt,t.enableLook=this.base.cameraControllerState.enableLook,this.base.cameraControllerState=null)},e.ScreenSpaceEventType.LEFT_UP,e.KeyboardEventModifier.CTRL)}unbindInputs(){if(!this.base.handler)return;const e=this.base.cesium;this.base.handler.removeInputAction(e.ScreenSpaceEventType.LEFT_CLICK),this.base.handler.removeInputAction(e.ScreenSpaceEventType.LEFT_CLICK,e.KeyboardEventModifier.CTRL),this.base.handler.removeInputAction(e.ScreenSpaceEventType.LEFT_DOWN,e.KeyboardEventModifier.CTRL),this.base.handler.removeInputAction(e.ScreenSpaceEventType.MOUSE_MOVE,e.KeyboardEventModifier.CTRL),this.base.handler.removeInputAction(e.ScreenSpaceEventType.LEFT_UP,e.KeyboardEventModifier.CTRL)}}class pp{cesium;viewer;data;handler;selectedColor="rgba(255,0,0,1.0)";tilesetMap={};hasSelectedFeaturesMap={};colorRankColor=[];showStateMap={};selectedPosition={x:null,y:null};selectionDiv=null;lastDrawTime=0;selectStart=null;selectEnd=null;cameraControllerState=null;start=null;groupBatchIds={};recoverStaus=!1;mapAnimations={};clearedModelIds=new Set;eidToBatchIdMap={};batchIdToElementIdMap={};animationModule;selectionModule;onSelectionChangeCallbacks=[];loadNodeDetailsForModel;loadNodeDetailsCallback;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer,this.animationModule=new up(this),this.selectionModule=new fp(this)}attachTileset(e,t,n){this.selectionModule.attachTileset(e,t,n)}setLoadNodeDetailsCallback(e){this.loadNodeDetailsCallback=e}selectionChange(e){e&&typeof e=="function"&&this.onSelectionChangeCallbacks.push(e)}removeSelectionChange(e){this.onSelectionChangeCallbacks=this.onSelectionChangeCallbacks.filter(t=>t!==e)}async triggerSelectionChange(e){if(e)await this.loadNodeDetailsForModel(e);else{const t=Object.keys(this.hasSelectedFeaturesMap);t.length>0&&await Promise.all(t.map(n=>{try{return this.loadNodeDetailsForModel(n)}catch(s){return console.error(`Error loading node details for model ${n}:`,s),Promise.resolve()}}))}if(this.onSelectionChangeCallbacks.length>0){const t=await this.getSelected({rank:0});this.onSelectionChangeCallbacks.forEach(n=>{try{n(t)}catch(s){console.error("Selection callback error:",s)}})}}enableSelection(){this.selectionModule.bindInputs()}disableSelection(){this.selectionModule.unbindInputs()}async clearSelection(e){this.getTargetModelIds(e).forEach(n=>{const s=this.hasSelectedFeaturesMap[n];if(!s?.length)return;const o=s.filter(r=>r.rank!==0);o.length?(this.hasSelectedFeaturesMap[n]=o,this.setBaseStyle(n)):(delete this.hasSelectedFeaturesMap[n],this.applyShowStyleOnly(n))}),this.viewer.scene.requestRender(),await this.triggerSelectionChange(e)}clearExist(e){this.getTargetModelIds(e).forEach(n=>{const s=this.hasSelectedFeaturesMap[n];if(!s?.length)return;const o=s.filter(r=>r.rank!==1);o.length?(this.hasSelectedFeaturesMap[n]=o,this.setBaseStyle(n)):(delete this.hasSelectedFeaturesMap[n],this.applyShowStyleOnly(n))}),this.viewer.scene.requestRender()}clearProcess(e){this.getTargetModelIds(e).forEach(n=>{const s=this.hasSelectedFeaturesMap[n];if(!s?.length)return;const o=s.filter(r=>r.rank!==2);o.length?(this.hasSelectedFeaturesMap[n]=o,this.setBaseStyle(n)):(delete this.hasSelectedFeaturesMap[n],this.applyShowStyleOnly(n))}),this.viewer.scene.requestRender()}async clearAllHaveSelected(){this.getTargetModelIds().forEach(t=>{this.hasSelectedFeaturesMap[t]&&(delete this.hasSelectedFeaturesMap[t],this.applyShowStyleOnly(t))}),this.viewer.scene.requestRender(),await this.triggerSelectionChange()}async loadAllNodeDetailsForModel(){for(const e of Object.keys(this.tilesetMap))await this.loadNodeDetailsForModel(e)}getSelected(e){const t=e&&typeof e=="object"&&"rank"in e?e.rank:e,n=Pr(t),s=[];for(const o of Object.keys(this.hasSelectedFeaturesMap))(this.hasSelectedFeaturesMap[o]||[]).forEach(l=>{if(l.rank!==n)return;const a=ap(l.selectedColor);let d=this.getBatchIdToElementIdSync(l.batchId,o);d===null&&(d=l.batchId),s.push({elementId:d,modelId:o,rgba:a||void 0,point:l?.point||void 0})});return s}getBatchIdToElementIdSync(e,t){if(this.batchIdToElementIdMap[t])return this.batchIdToElementIdMap[t].get(e)??null;const s=this.tilesetMap[t]?.leiting?.node?.batchIdEIDInfos;if(s&&Array.isArray(s)){const o=new Map;return s.forEach(r=>{r&&r.elementID&&o.set(`${r.batchId}`,`${r.elementID}`)}),this.batchIdToElementIdMap[t]=o,o.get(e)??null}return null}setAllConstructionProgressTracking(e){this.animationModule.setAllConstructionProgressTracking(e)}initTime(){this.animationModule.initTime()}processAnimation(e,t,n,s=null){this.animationModule.processAnimation(e,t,n,s)}onTick=e=>{this.animationModule.onTick(e)};enableConstructionProgressTracking(){this.animationModule.enableConstructionProgressTracking()}disableConstructionProgressTracking(){this.animationModule.disableConstructionProgressTracking()}freshConstructionProgressTracking(){this.animationModule.freshConstructionProgressTracking()}reStartAnimation(){this.animationModule.reStartAnimation()}setTileSyltByConstructionProcessTracking({modelId:e,batchIds:t}){const n=this.tilesetMap[e];if(!n)return;const s=n?.style?.show?.conditionsExpression?.conditions;Array.isArray(t)&&t.length?s?n.style=new this.cesium.Cesium3DTileStyle({show:{conditions:s},color:{conditions:t}}):n.style=new this.cesium.Cesium3DTileStyle({color:{conditions:t}}):this.applyShowStyleOnly(e),this.viewer.scene.requestRender()}resumeFlyTo(){this.viewer.clock.shouldAnimate=!0}pauseFlyTo(){this.viewer.clock.shouldAnimate=!1}async flyToObjects({selectCpts:e,options:t}){if(!Array.isArray(e)||e.length===0)return;await this.clearSelection(),await this.setSelectColorUserModelCpt(e,{rank:0});const n=this.cesium,s=t?.scale??1,o=[];for(const r of e){const l=r?.modelId;if(l==null)continue;await this.loadNodeDetailsForModel(l);const a=r?.elementId,d=this.tilesetMap[`${l}`];if(!d)continue;const p=dp(d,a)||hp(d);if(!p)continue;const f=new n.Cartesian3(p.min.x,p.min.y,p.min.z),u=new n.Cartesian3(p.max.x,p.max.y,p.max.z),m=d?.root?.computedTransform??d?.modelMatrix;if(m){const E=n.Matrix4.multiplyByPoint(m,f,new n.Cartesian3),A=n.Matrix4.multiplyByPoint(m,u,new n.Cartesian3);o.push(E,A)}else o.push(f,u)}if(o.length){const r=n.BoundingSphere.fromPoints(o);r.radius=r.radius*s;const l=this.viewer.scene.camera,a=new n.HeadingPitchRange(l.heading,l.pitch,0);l.flyToBoundingSphere(r,{duration:t?.duration??0,complete:t?.complete,offset:a})}else{const r=e[0]?.modelId,l=r?this.tilesetMap[`${r}`]:null;l&&this.viewer.flyTo(l,{duration:t?.duration??0,complete:t?.complete})}}setBaseStyle(e){this.getTargetModelIds(e).forEach(n=>{this.setColorStyle(n)})}setColorStyle(e){this.updateTilesetStyle(e)}buildColorConditions(e){const t=this.tilesetMap[e],n=this.hasSelectedFeaturesMap[e];if(!t||!n?.length)return;const s=new Map;n.forEach(a=>{const d=s.get(a.batchId);(!d||a.rank>=d.rank)&&s.set(a.batchId,a)});const o=new Map;if(s.forEach(({batchId:a,selectedColor:d})=>{o.has(d)||o.set(d,new Set),o.get(d)?.add(a)}),this.colorRankColor.length){const a=new Set;this.colorRankColor.forEach(d=>{const h=o.get(d);h&&h.forEach(p=>a.add(p))}),o.forEach((d,h)=>{if(this.colorRankColor.includes(h))return;const p=new Set;d.forEach(f=>{a.has(f)||p.add(f)}),o.set(h,p)})}const r=[...this.colorRankColor.filter(a=>o.has(a)),...Array.from(o.keys()).filter(a=>!this.colorRankColor.includes(a))],l=[];return r.forEach(a=>{const d=o.get(a);if(!d||!d.size)return;const h=Array.from(d).join("|");h&&l.push([`(regExp('^(${h})$').test(\${id}))`,a])}),l.length?l:void 0}updateTilesetStyle(e){const t=this.tilesetMap[e];if(!t)return;t.colorBlendMode=this.cesium.Cesium3DTileColorBlendMode.REPLACE;const n=this.showStateMap[e],s=n?this.buildShowConditions(n.batchIds,n.mode):void 0,o=this.buildColorConditions(e);s||o?t.style=new this.cesium.Cesium3DTileStyle({show:s?{conditions:s}:void 0,color:o?{conditions:o}:void 0}):t.style=void 0,this.viewer.scene.requestRender()}setShowStyle(e){this.getTargetModelIds(e?.modelId).forEach(n=>{const s=this.showStateMap[n]||{batchIds:[],mode:"include"};this.showStateMap[n]={batchIds:e?.batchIds??s.batchIds,mode:e?.mode??s.mode},this.updateTilesetStyle(n)})}setColor(e){if(!e)return this.selectedColor;if(typeof e=="string")return e;const t=_t(Number(e.r)),n=_t(Number(e.g)),s=_t(Number(e.b)),o=Fr(e.a===void 0?1:Number(e.a));return is({r:t,g:n,b:s,a:o})||this.selectedColor}groupByModelId(e){const t={};return e.forEach(n=>{const s=n?.modelId,o=n?.elementId;if(s==null||o===void 0||o===null)return;const r=n?.color??n?.rgba,l=this.setColor(r??{r:.4,g:.4,b:.4,a:.1}),a=`${s}-${l}`;t[a]||(t[a]=[]),t[a].push(`${o}`)}),{allElements:t,transform:null,box:null}}getBatchId(e,t){const n=`${t}`,s=`${e}`;if(this.eidToBatchIdMap[n]){const a=this.eidToBatchIdMap[n].get(s);if(a!==void 0)return a;if(!a)return s}const r=this.tilesetMap[n]?.leiting?.node?.batchIdEIDInfos;if(r&&Array.isArray(r)){const a=new Map;r.forEach(h=>{a.set(`${h.elementID}`,`${h.batchId}`)}),this.eidToBatchIdMap[n]=a;const d=a.get(s);if(d!==void 0)return d}const l=lp(e);return l!=null?String(l):null}async setComponentVisibility(e){if(Array.isArray(e)){Object.keys(this.showStateMap).forEach(t=>{this.showStateMap[t]={batchIds:[],mode:"exclude"}});for(const t of e){const n=`${t.modelId}`;this.showStateMap[n]||(this.showStateMap[n]={batchIds:[],mode:"exclude"});const s=this.showStateMap[n];if(!t.show){const o=this.getBatchId(t.elementId,n);s.batchIds.push(o)}}Object.keys(this.showStateMap).forEach(t=>{this.updateTilesetStyle(t)})}}async isolateComponentVisibility(e){const t={};e.forEach(n=>{const s=`${n.modelId}`;t[s]||(t[s]=new Set),t[s].add(`${n.elementId}`)});for(const n of Object.keys(this.tilesetMap)){await this.loadNodeDetailsForModel(n);const o=this.tilesetMap[n]?.leiting?.node?.batchIdEIDInfos;if(!o)continue;this.showStateMap[n]={batchIds:[],mode:"exclude"};const r=t[n];if(r&&r.size>0){const l=[];for(const a of o)r.has(`${a.elementID}`)||l.push(`${a.batchId}`);this.showStateMap[n].batchIds=l;continue}this.showStateMap[n].batchIds=o.map(l=>l.batchId)}Object.keys(this.showStateMap).forEach(n=>{this.updateTilesetStyle(n)})}async setAllComponentsVisibility(e){const t=this.getTargetModelIds();for(const n of t)await this.loadNodeDetailsForModel(n),e?this.setShowStyle({modelId:n,batchIds:[],mode:"exclude"}):this.setShowStyle({modelId:n,batchIds:[],mode:"include"})}getComponentsByVisibility(e){const t=[];return Object.keys(this.showStateMap).forEach(n=>{const s=this.showStateMap[n],o=this.tilesetMap[n];if(!o?.leiting?.node?.batchIdEIDInfos)return;const r=o.leiting.node.batchIdEIDInfos,l=new Set(s?.batchIds??[]);r.forEach(a=>{const d=l.has(`${a.batchId}`);(s?.mode==="include"?d:!d)===e&&t.push({elementId:`${a.elementID}`,modelId:n})})}),t}getTileSyltByConstructionProcessTracking({elementIds:e,modelId:t,color:n,colorRank:s,show:o,selectionRank:r}){const l=this.tilesetMap[t];if(!Array.isArray(e))return[];const a=l.leiting.node,d=new Set(e),h=a.batchIdEIDInfos.filter(f=>d.has(`${f.elementID}`)).map(f=>String(f.batchId));return h.length?(s===kr.normal&&!this.colorRankColor.includes(n)&&(this.colorRankColor=[n]),[[`(regExp('^(${h.join("|")})$').test(\${id}))`,n]]):[]}async setSelectColorUserModelCpt(e,t){if(!Array.isArray(e))return;const n=new Map,s=t?.rank===void 0?"exist":t?.rank,o=Pr(s);for(const r of e){const l=r?.modelId;if(l==null)continue;const a=`${l}`;await this.loadNodeDetailsForModel(a);const d=Array.isArray(r?.elementIds)?r.elementIds:r?.elementId?[r.elementId]:[];if(!d.length)continue;const h=is(r?.rgba)||this.selectedColor;for(const p of d){const f=this.getBatchId(p,a);f!==null&&(n.has(a)||n.set(a,[]),n.get(a)?.push({batchId:f,selectedColor:h,rank:o}))}}for(const[r,l]of n){const a=this.mergeSelections(r,l);this.hasSelectedFeaturesMap[r]=a,this.setBaseStyle(r)}await this.triggerSelectionChange()}async setAllSelectColorUserModelCpt({modelId:e,rgba:t}){if(!e)return;await this.loadNodeDetailsForModel(e);const n=String(e),s=this.tilesetMap[n];if(!s)return;const o=s?.leiting?.node?.batchIdEIDInfos;if(!o||!Array.isArray(o))return;const r=[];o.forEach(l=>{l&&l.elementID!==void 0&&r.push(l.elementID)}),r.length!==0&&await this.setSelectColorUserModelCpt([{modelId:n,elementIds:r,rgba:t}],{rank:0})}getFeatureId(e){if(this.cesium.defined(e)&&this.cesium.defined(e.getProperty)){const t=e.getProperty("id");return t!=null?String(t):"-1"}return"-1"}getTargetModelIds(e){return e?[e]:Object.keys(this.tilesetMap)}buildShowConditions(e,t){const n=e.join("|");return n?t==="include"?[[`(regExp('^(${n})$').test(\${id}))`,"true"],["true","false"]]:[[`(regExp('^(${n})$').test(\${id}))`,"false"],["true","true"]]:t==="include"?[["true","false"]]:void 0}applyShowStyleOnly(e){const t=this.tilesetMap[e];if(!t)return;const n=this.showStateMap[e],s=n?this.buildShowConditions(n.batchIds,n.mode):void 0;s?t.style=new this.cesium.Cesium3DTileStyle({show:{conditions:s}}):t.style=void 0}setSelectedColorRgba(e,t,n,s=1){const o=_t(e),r=_t(t),l=_t(n),a=Fr(s),d=is({r:o,g:r,b:l,a});d&&(this.selectedColor=d)}mergeSelections(e,t){const n=new Map;return(this.hasSelectedFeaturesMap[e]||[]).forEach(o=>n.set(o.batchId,o)),t.forEach(o=>{const r=n.get(o.batchId);(!r||o.rank>r.rank||o.rank===r.rank)&&n.set(o.batchId,o)}),Array.from(n.values())}async toggleMultiSelect(e,t,n,s){const o=this.hasSelectedFeaturesMap[e]||[],r=o.filter(p=>p.rank!==0),l=o.filter(p=>p.rank===0),d=l.some(p=>p.batchId===t)?l.filter(p=>p.batchId!==t):[...l,{batchId:t,selectedColor:n,rank:0,point:s}],h=[...r,...d];h.length?(this.hasSelectedFeaturesMap[e]=h,this.setBaseStyle(e)):(delete this.hasSelectedFeaturesMap[e],this.applyShowStyleOnly(e)),await this.triggerSelectionChange(e)}ensureSelectionDiv(){if(this.selectionDiv)return;const e=document.createElement("div");e.style.display="none",e.style.pointerEvents="none",e.style.border="1px solid rgba(0, 255, 255, 0.8)",this.viewer.container.appendChild(e),this.selectionDiv=e}isRepeatedClick(e){const t=e?.position;return!t||typeof t.x!="number"||typeof t.y!="number"?!1:this.selectedPosition.x===t.x&&this.selectedPosition.y===t.y?!0:(this.selectedPosition.x=t.x,this.selectedPosition.y=t.y,!1)}async selectTilesInRectangle(e,t,n){const s=Math.min(e.x,t.x),o=Math.max(e.x,t.x),r=Math.min(e.y,t.y),l=Math.max(e.y,t.y),a=o-s,d=l-r;if(Math.abs(a)<15||Math.abs(d)<15)return;const h=s+a/2,p=r+d/2,f=new this.cesium.Cartesian2(h,p),u=this.viewer.scene.drillPick(f,void 0,a,d);if(!Array.isArray(u))return;const m=new Map;u.forEach(E=>{if(!(E instanceof this.cesium.Cesium3DTileFeature))return;const A=ri(E.tileset);if(!A||!this.tilesetMap[A])return;const C=this.getFeatureId(E);C!=="-1"&&(m.has(A)||m.set(A,new Set),m.get(A)?.add(C))}),m.forEach((E,A)=>{const C=this.hasSelectedFeaturesMap[A]||[],v=C.filter(I=>I.rank!==0),S=new Set(C.filter(I=>I.rank===0).map(I=>I.batchId)),D=[];E.forEach(I=>{S.has(I)||D.push({batchId:I,selectedColor:n,rank:0})});const O=C.filter(I=>I.rank===0);this.hasSelectedFeaturesMap[A]=[...v,...O,...D],this.setBaseStyle(A)}),await this.triggerSelectionChange()}}class gp{cesium;viewer;tilesetMap={};planeEntities=[];clippingPlanesMap={};activeModelIds=new Set;boxMatrix=null;boxInverseMatrix=null;boxCenter=null;boxOrientation=null;targetZPlus=0;targetZMinus=0;targetXPlus=0;targetXMinus=0;targetYPlus=0;targetYMinus=0;currentPlaneType="";selectedPlane=null;hoveredPlane=null;dragStartPoint=null;moveCallBack=null;downHandler=null;upHandler=null;moveHandler=null;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer}attachTileset(e,t){this.tilesetMap[t]=e}open(e,t){!this.tilesetMap[e]||this.activeModelIds.has(e)||(this.activeModelIds.add(e),this.moveCallBack=t?.moveCallBack,this.fitToModels(),this.activeModelIds.size===1&&(this.createPlaneEntities(),this.initEventHandlers()))}setupClippingPlanes(e){const t=this.cesium,n=this.tilesetMap[e];if(!n||!this.boxMatrix)return;const s=new t.ClippingPlaneCollection({planes:[new t.ClippingPlane(new t.Cartesian3(1,0,0),this.targetXMinus),new t.ClippingPlane(new t.Cartesian3(-1,0,0),this.targetXPlus),new t.ClippingPlane(new t.Cartesian3(0,1,0),this.targetYMinus),new t.ClippingPlane(new t.Cartesian3(0,-1,0),this.targetYPlus),new t.ClippingPlane(new t.Cartesian3(0,0,1),this.targetZMinus),new t.ClippingPlane(new t.Cartesian3(0,0,-1),this.targetZPlus)],edgeWidth:2,edgeColor:t.Color.WHITE,enabled:!0,unionClippingRegions:!0}),o=t.Matrix4.inverse(n.root.transform,new t.Matrix4);s.modelMatrix=t.Matrix4.multiply(o,this.boxMatrix,new t.Matrix4),n.clippingPlanes=s,this.clippingPlanesMap[e]=s}createPlaneEntities(){const e=this.cesium,t=this.viewer;this.planeEntities.forEach(s=>t.entities.remove(s)),this.planeEntities=[];const n=["left","right","behind","front","top","down"];for(const s of n){const o=t.entities.add({name:s,position:new e.CallbackProperty(()=>{if(!this.boxMatrix)return e.Cartesian3.ZERO;const r=this.getPlaneOffsetCartesian(s);return e.Matrix4.multiplyByPoint(this.boxMatrix,r,new e.Cartesian3)},!1),orientation:new e.CallbackProperty(()=>this.boxOrientation||e.Quaternion.IDENTITY,!1),plane:{dimensions:new e.CallbackProperty(()=>{if(this.activeModelIds.size===0)return new e.Cartesian2(0,0);const r=.1,l=Math.max(r,this.targetXMinus+this.targetXPlus),a=Math.max(r,this.targetYPlus+this.targetYMinus),d=Math.max(r,this.targetZPlus+this.targetZMinus);return s==="top"||s==="down"?new e.Cartesian2(l,a):s==="left"||s==="right"?new e.Cartesian2(a,d):new e.Cartesian2(l,d)},!1),material:e.Color.WHITE.withAlpha(.1),outline:!0,outlineColor:e.Color.YELLOW,plane:new e.CallbackProperty(()=>new e.Plane(this.getNormalByType(s),0),!1)}});this.planeEntities.push(o)}}getPlaneOffsetCartesian(e){const t=(this.targetXPlus-this.targetXMinus)/2,n=(this.targetYPlus-this.targetYMinus)/2,s=(this.targetZPlus-this.targetZMinus)/2;switch(e){case"left":return new this.cesium.Cartesian3(-this.targetXMinus,n,s);case"right":return new this.cesium.Cartesian3(this.targetXPlus,n,s);case"behind":return new this.cesium.Cartesian3(t,-this.targetYMinus,s);case"front":return new this.cesium.Cartesian3(t,this.targetYPlus,s);case"top":return new this.cesium.Cartesian3(t,n,this.targetZPlus);case"down":return new this.cesium.Cartesian3(t,n,-this.targetZMinus);default:return this.cesium.Cartesian3.ZERO}}getNormalByType(e){const t=this.cesium;switch(e){case"left":return new t.Cartesian3(1,0,0);case"right":return new t.Cartesian3(-1,0,0);case"behind":return new t.Cartesian3(0,1,0);case"front":return new t.Cartesian3(0,-1,0);case"top":return new t.Cartesian3(0,0,-1);case"down":return new t.Cartesian3(0,0,1);default:return t.Cartesian3.UNIT_X}}getPlaneByType(e){const t=this.cesium,n=this.getNormalByType(e),s=t.Cartesian3.negate(n,new t.Cartesian3);let o=0;switch(e){case"left":o=this.targetXMinus;break;case"right":o=this.targetXPlus;break;case"behind":o=this.targetYMinus;break;case"front":o=this.targetYPlus;break;case"top":o=this.targetZPlus;break;case"down":o=this.targetZMinus;break}return new t.Plane(s,-o)}initEventHandlers(){const e=this.cesium,t=this.viewer.scene.canvas,n=this.viewer.scene;this.downHandler=new e.ScreenSpaceEventHandler(t),this.upHandler=new e.ScreenSpaceEventHandler(t),this.moveHandler=new e.ScreenSpaceEventHandler(t),this.moveHandler.setInputAction(s=>{if(this.selectedPlane)return;let o;try{o=n.pick(s.endPosition)}catch{}e.defined(o)&&o.id&&o.id.plane?this.hoveredPlane!==o.id.plane&&(this.hoveredPlane&&(this.hoveredPlane.material=e.Color.WHITE.withAlpha(.1)),this.hoveredPlane=o.id.plane,this.hoveredPlane.material=e.Color.YELLOW.withAlpha(.3),t.style.cursor="pointer"):this.hoveredPlane&&(this.hoveredPlane.material=e.Color.WHITE.withAlpha(.1),this.hoveredPlane=null,t.style.cursor="default")},e.ScreenSpaceEventType.MOUSE_MOVE),this.downHandler.setInputAction(s=>{let o;try{o=n.pick(s.position)}catch{}if(e.defined(o)&&o.id&&o.id.plane){this.currentPlaneType=o.id.name,this.selectedPlane=o.id.plane,this.selectedPlane.material=e.Color.RED.withAlpha(.4),n.screenSpaceCameraController.enableInputs=!1;const r=n.camera.getPickRay(s.position),l=this.boxInverseMatrix,a=e.Matrix4.multiplyByPoint(l,r.origin,new e.Cartesian3),d=e.Matrix4.multiplyByPointAsVector(l,r.direction,new e.Cartesian3);e.Cartesian3.normalize(d,d);const h=new e.Ray(a,d),p=this.getPlaneByType(this.currentPlaneType);this.dragStartPoint=e.IntersectionTests.rayPlane(h,p,new e.Cartesian3),this.dragStartPoint||(this.dragStartPoint=this.getPlaneOffsetCartesian(this.currentPlaneType))}},e.ScreenSpaceEventType.LEFT_DOWN),this.moveHandler.setInputAction(s=>{if(!this.selectedPlane||!this.dragStartPoint)return;const o=n.camera.getPickRay(s.endPosition),r=this.boxInverseMatrix,l=e.Matrix4.multiplyByPoint(r,o.origin,new e.Cartesian3),a=e.Matrix4.multiplyByPointAsVector(r,o.direction,new e.Cartesian3);e.Cartesian3.normalize(a,a);const d=new e.Ray(l,a);let h=new e.Cartesian3;this.currentPlaneType==="top"||this.currentPlaneType==="down"?h=Math.abs(a.x)>Math.abs(a.y)?e.Cartesian3.UNIT_X:e.Cartesian3.UNIT_Y:this.currentPlaneType==="left"||this.currentPlaneType==="right"?h=Math.abs(a.y)>Math.abs(a.z)?e.Cartesian3.UNIT_Y:e.Cartesian3.UNIT_Z:h=Math.abs(a.x)>Math.abs(a.z)?e.Cartesian3.UNIT_X:e.Cartesian3.UNIT_Z;const p=-e.Cartesian3.dot(this.dragStartPoint,h),f=new e.Plane(h,p);let u=e.IntersectionTests.rayPlane(d,f,new e.Cartesian3);if(!u){const E=h===e.Cartesian3.UNIT_X?e.Cartesian3.UNIT_Y:h===e.Cartesian3.UNIT_Y&&(this.currentPlaneType==="top"||this.currentPlaneType==="down")?e.Cartesian3.UNIT_X:e.Cartesian3.UNIT_Z,A=-e.Cartesian3.dot(this.dragStartPoint,E);u=e.IntersectionTests.rayPlane(d,new e.Plane(E,A),new e.Cartesian3)}if(!u)return;const m=.01;switch(this.currentPlaneType){case"left":this.targetXMinus=Math.max(-this.targetXPlus+m,-u.x);break;case"right":this.targetXPlus=Math.max(-this.targetXMinus+m,u.x);break;case"behind":this.targetYMinus=Math.max(-this.targetYPlus+m,-u.y);break;case"front":this.targetYPlus=Math.max(-this.targetYMinus+m,u.y);break;case"top":this.targetZPlus=Math.max(-this.targetZMinus+m,u.z);break;case"down":this.targetZMinus=Math.max(-this.targetZPlus+m,-u.z);break}this.syncClippingPlanes(),this.moveCallBack&&this.moveCallBack(this.getRangeParams())},e.ScreenSpaceEventType.MOUSE_MOVE),this.upHandler.setInputAction(()=>{this.selectedPlane&&(this.selectedPlane.material=e.Color.WHITE.withAlpha(.1),this.selectedPlane=null,this.currentPlaneType="",this.dragStartPoint=null),n.screenSpaceCameraController.enableInputs=!0,t.style.cursor="default"},e.ScreenSpaceEventType.LEFT_UP)}syncClippingPlanes(){this.activeModelIds.size!==0&&Object.keys(this.clippingPlanesMap).forEach(e=>{const t=this.clippingPlanesMap[e],n=this.tilesetMap[e];if(t&&n&&!t.isDestroyed()){const s=this.cesium;t.get(0).distance=this.targetXMinus,t.get(1).distance=this.targetXPlus,t.get(2).distance=this.targetYMinus,t.get(3).distance=this.targetYPlus,t.get(4).distance=this.targetZMinus,t.get(5).distance=this.targetZPlus;const o=s.Matrix4.inverse(n.root.transform,new s.Matrix4);t.modelMatrix=s.Matrix4.multiply(o,this.boxMatrix,new s.Matrix4)}})}fitToModels(){const e=this.cesium;if(this.activeModelIds.size===0)return;let t=[];if(this.activeModelIds.forEach(p=>{const f=this.tilesetMap[p];f&&f.boundingSphere&&t.push(f.boundingSphere.center)}),t.length===0)return;const n=new e.Cartesian3;t.forEach(p=>e.Cartesian3.add(n,p,n)),this.boxCenter=e.Cartesian3.divideByScalar(n,t.length,new e.Cartesian3),this.boxMatrix=e.Transforms.eastNorthUpToFixedFrame(this.boxCenter),this.boxInverseMatrix=e.Matrix4.inverse(this.boxMatrix,new e.Matrix4),this.boxOrientation=e.Quaternion.fromRotationMatrix(e.Matrix4.getMatrix3(this.boxMatrix,new e.Matrix3));let s=1/0,o=-1/0,r=1/0,l=-1/0,a=1/0,d=-1/0;this.activeModelIds.forEach(p=>{const f=this.tilesetMap[p];if(!f)return;const u=[],m=f.leiting?.box,E=f.root?.boundingVolume?.boundingVolume;if(m&&m.min&&m.max){const{min:A,max:C}=m,v=[new e.Cartesian3(A.x,A.y,A.z),new e.Cartesian3(C.x,A.y,A.z),new e.Cartesian3(A.x,C.y,A.z),new e.Cartesian3(C.x,C.y,A.z),new e.Cartesian3(A.x,A.y,C.z),new e.Cartesian3(C.x,A.y,C.z),new e.Cartesian3(A.x,C.y,C.z),new e.Cartesian3(C.x,C.y,C.z)],S=f.root.transform;v.forEach(D=>{u.push(e.Matrix4.multiplyByPoint(S,D,new e.Cartesian3))})}else if(E&&E.halfAxes){const A=E.center,C=E.halfAxes,v=e.Matrix3.getColumn(C,0,new e.Cartesian3),S=e.Matrix3.getColumn(C,1,new e.Cartesian3),D=e.Matrix3.getColumn(C,2,new e.Cartesian3);for(let O=0;O<8;O++){const I=e.Cartesian3.clone(A,new e.Cartesian3);e.Cartesian3.add(I,e.Cartesian3.multiplyByScalar(v,O&1?1:-1,new e.Cartesian3),I),e.Cartesian3.add(I,e.Cartesian3.multiplyByScalar(S,O&2?1:-1,new e.Cartesian3),I),e.Cartesian3.add(I,e.Cartesian3.multiplyByScalar(D,O&4?1:-1,new e.Cartesian3),I),u.push(I)}}else if(f.boundingSphere){const A=f.boundingSphere,C=A.center,v=A.radius,S=e.Matrix4.multiplyByPoint(this.boxInverseMatrix,C,new e.Cartesian3);s=Math.min(s,S.x-v),o=Math.max(o,S.x+v),r=Math.min(r,S.y-v),l=Math.max(l,S.y+v),a=Math.min(a,S.z-v),d=Math.max(d,S.z+v)}u.forEach(A=>{const C=e.Matrix4.multiplyByPoint(this.boxInverseMatrix,A,new e.Cartesian3);s=Math.min(s,C.x),o=Math.max(o,C.x),r=Math.min(r,C.y),l=Math.max(l,C.y),a=Math.min(a,C.z),d=Math.max(d,C.z)})});const h=1.01;this.targetXMinus=Math.abs(s)*h,this.targetXPlus=Math.abs(o)*h,this.targetYMinus=Math.abs(r)*h,this.targetYPlus=Math.abs(l)*h,this.targetZMinus=Math.abs(a)*h,this.targetZPlus=Math.abs(d)*h,this.activeModelIds.forEach(p=>{this.setupClippingPlanes(p)}),this.viewer.scene.requestRender()}getRangeParams(){const e=this.cesium;return{targetZPlus:this.targetZPlus,targetZMinus:this.targetZMinus,targetXPlus:this.targetXPlus,targetXMinus:this.targetXMinus,targetYPlus:this.targetYPlus,targetYMinus:this.targetYMinus,maxBox:new e.Cartesian3(this.targetXPlus,this.targetYPlus,this.targetZPlus),minBox:new e.Cartesian3(-this.targetXMinus,-this.targetYMinus,-this.targetZMinus)}}updateRange(e){if(!this.boxMatrix)return;e.targetXMinus!==void 0&&(this.targetXMinus=e.targetXMinus),e.targetXPlus!==void 0&&(this.targetXPlus=e.targetXPlus),e.targetYMinus!==void 0&&(this.targetYMinus=e.targetYMinus),e.targetYPlus!==void 0&&(this.targetYPlus=e.targetYPlus),e.targetZPlus!==void 0&&(this.targetZPlus=e.targetZPlus),e.targetZMinus!==void 0&&(this.targetZMinus=e.targetZMinus);const t=.1;this.targetXMinus+this.targetXPlus<t&&(this.targetXPlus=t-this.targetXMinus),this.targetYPlus+this.targetYMinus<t&&(this.targetYPlus=t-this.targetYMinus),this.targetZPlus+this.targetZMinus<t&&(this.targetZPlus=t-this.targetZMinus),this.syncClippingPlanes(),this.viewer.scene.requestRender()}getRange(){return this.getRangeParams()}setBoxVisibility(e){this.planeEntities.forEach(t=>{t.show=e}),this.viewer.scene.requestRender()}close(e){if(e){const t=this.tilesetMap[e];t&&(t.clippingPlanes&&(t.clippingPlanes.enabled=!1),t.clippingPlanes=void 0),delete this.clippingPlanesMap[e],this.activeModelIds.delete(e),this.activeModelIds.size>0&&this.fitToModels()}else Object.keys(this.clippingPlanesMap).forEach(t=>{const n=this.tilesetMap[t];n&&(n.clippingPlanes&&(n.clippingPlanes.enabled=!1),n.clippingPlanes=void 0)}),this.clippingPlanesMap={},this.activeModelIds.clear();this.activeModelIds.size===0&&(this.planeEntities.forEach(t=>{this.viewer.entities.remove(t)}),this.planeEntities=[],this.destroyEventHandlers(),this.boxMatrix=null,this.boxInverseMatrix=null),this.viewer.scene.requestRender()}destroyEventHandlers(){this.downHandler?.destroy(),this.upHandler?.destroy(),this.moveHandler?.destroy(),this.downHandler=this.upHandler=this.moveHandler=null}}let ss=performance.now();const mp=10;class Ap{cesium;viewer;modelInfo={modelName:"Person",modelId:"player_111",url:"person/model.glb",scale:.0032};startTime=0;radian=0;speed=.1;speedVector;position;hpRoll;cameralHpRoll;fixedFrameTransforms;model;transparentTest=!0;gravityTestByMove=!1;gravityTest=!0;lastMoveTime=0;moveInterval=.01;collisionTest=!0;wheelCount=2;isLeftDragging=!1;lastScreenY=0;lastScreenX=0;pauseAnimationFn;resumeAnimationFn;selectedColor;selectedColorRecover;handler;moveState={moveFront:!1,moveBack:!1,moveLeft:!1,moveRight:!1,moveUp:!1,moveDown:!1};onLoading=null;onSuccess=null;onError=null;constructor({cesium:e,viewer:t,modelInfo:n,callbacks:s}){this.cesium=e,this.viewer=t,this.radian=this.cesium.Math.toRadians(4),this.speedVector=new this.cesium.Cartesian3,this.position=new this.cesium.Cartesian3,this.hpRoll=new this.cesium.HeadingPitchRoll,this.cameralHpRoll=new this.cesium.HeadingPitchRoll,this.fixedFrameTransforms=new this.cesium.Transforms.localFrameToFixedFrameGenerator("north","west"),n&&(this.modelInfo=Object.assign(this.modelInfo,n)),s&&(this.onLoading=s.onLoading||null,this.onSuccess=s.onSuccess||null,this.onError=s.onError||null),this.selectedColor=new this.cesium.Color(1,1,1,.4),this.selectedColorRecover=new this.cesium.Color(1,1,1,1);const o=this.viewer.scene.canvas;this.handler=new this.cesium.ScreenSpaceEventHandler(o)}getModel(){return this.model}setPauseAnimation(e){this.pauseAnimationFn=e}setResumeAnimationFn(e){this.resumeAnimationFn=e}async setPersonPosition(e){e&&(this.position=e),this.getModel()?(this.model.modelMatrix=this.cesium.Transforms.headingPitchRollToFixedFrame(e,this.hpRoll,this.cesium.Ellipsoid.WGS84,this.fixedFrameTransforms),this.model.show=!0,this.initKeyBoard()):await this.openPlayer(),this.setCameralDefault(!1)}setModelInfo(e){e&&(this.modelInfo=Object.assign(this.modelInfo,e))}async openPlayer(){if(this.enablePositionSelection(),this.model){this.model.show=!0,this.initKeyBoard(),this.setCameralDefault(!1);return}this.position&&!(this.position.x===0&&this.position.y===0&&this.position.z===0)?(await this.loadModel(),this.initKeyBoard(),this.setCameralDefault(!1)):this.onLoading&&this.onLoading("请按住 Ctrl + 左键点击场景选择初始位置...")}enablePositionSelection(){this._positionHandler&&(this._positionHandler.destroy(),this._positionHandler=null);const e=new this.cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);e.setInputAction(async t=>{const n=this.viewer.scene;let s;try{s=n.pickPosition(t.position)}catch(o){console.warn("pickPosition failed:",o)}s&&(this.position=s,this.model?(this.model.modelMatrix=this.cesium.Transforms.headingPitchRollToFixedFrame(this.position,this.hpRoll,this.cesium.Ellipsoid.WGS84,this.fixedFrameTransforms),this.updatedCamera(),this.onSuccess&&this.onSuccess("已更新漫游位置")):(this.onSuccess&&this.onSuccess("位置已选择,正在加载模型..."),await this.loadModel(),this.initKeyBoard(),this.setCameralDefault(!1)))},this.cesium.ScreenSpaceEventType.LEFT_CLICK,this.cesium.KeyboardEventModifier.CTRL),this._positionHandler=e}_positionHandler;setDefaultPosition(){const e=this.viewer.scene,t=this.viewer.camera,n=new this.cesium.Cartesian2(e.canvas.clientWidth/2,e.canvas.clientHeight/2);let s;try{s=e.pickPosition(n)}catch(o){console.warn("pickPosition failed:",o)}if(s)this.position=s;else{const o=t.direction,l=this.cesium.Cartesian3.add(t.positionWC,this.cesium.Cartesian3.multiplyByScalar(o,10,new this.cesium.Cartesian3),new this.cesium.Cartesian3);this.position=l}}async loadModel(){let e;try{this.onLoading&&this.onLoading("正在加载漫游人物...");const t=await this.cesium.Model.fromGltfAsync({id:this.modelInfo.modelId,url:this.modelInfo.url,modelMatrix:this.cesium.Transforms.headingPitchRollToFixedFrame(this.position,this.hpRoll,this.cesium.Ellipsoid.WGS84,this.fixedFrameTransforms),scale:this.modelInfo.scale,allowPicking:!1,debugShowBoundingVolume:!1,debugWireframe:!1,cull:!1,gltfCallback:s=>{e=s.animations},backFaceCulling:!1}),n=()=>{if(e&&e.length>0){console.log("Model has animations:",e.length);try{t.activeAnimations.add({index:0,loop:this.cesium.ModelAnimationLoop.REPEAT,multiplier:1})}catch(s){console.error("Failed to add animation:",s)}this.pauseAnimationFn=()=>{this.viewer.clock.shouldAnimate=!1},this.resumeAnimationFn=()=>{this.viewer.clock.shouldAnimate=!0},this.viewer.clock.shouldAnimate=!1}else console.warn("No animations found in the model.")};t.ready?n():t.readyEvent.addEventListener(n),this.model=await this.viewer.scene.primitives.add(t),this.updatedCamera(),this.onLoading&&this.onLoading(""),this.onSuccess&&this.onSuccess("漫游模型加载完成")}catch(t){console.error("Failed to load model:",t),this.onLoading&&this.onLoading(""),this.onError&&this.onError("漫游模型加载失败")}}initKeyBoard(){const e=this.handler,t=this.cesium;ss=performance.now();const n=(o,r)=>{const l=o.code,a=o.keyCode;l==="KeyA"||a===65?this.moveState.moveLeft=r:l==="KeyW"||a===87?this.moveState.moveFront=r:l==="KeyD"||a===68?this.moveState.moveRight=r:l==="KeyS"||a===83?this.moveState.moveBack=r:l==="KeyQ"||a===81?this.moveState.moveUp=r:(l==="KeyE"||a===69)&&(this.moveState.moveDown=r)};e.setInputAction(o=>{this.wheelCount-=o*.001,this.wheelCount<.1&&(this.wheelCount=.1),this.updatedCamera()},t.ScreenSpaceEventType.WHEEL),this._keydownHandler=o=>{o.target.tagName==="INPUT"||o.target.tagName==="TEXTAREA"||(n(o,!0),this.resumeAnimationFn&&this.resumeAnimationFn())},this._keyupHandler=o=>{o.target.tagName==="INPUT"||o.target.tagName==="TEXTAREA"||(n(o,!1),Object.keys(this.moveState).every(r=>this.moveState[r]==!1)&&this.pauseAnimationFn&&this.pauseAnimationFn())},document.addEventListener("keydown",this._keydownHandler),document.addEventListener("keyup",this._keyupHandler),e.setInputAction(o=>{this.isLeftDragging=!0,this.lastScreenY=o.position.y,this.lastScreenX=o.position.x},this.cesium.ScreenSpaceEventType.LEFT_DOWN),e.setInputAction(o=>{if(!this.isLeftDragging)return;const r=o.endPosition.x,l=o.endPosition.y,a=l-this.lastScreenY,d=r-this.lastScreenX;Math.abs(a)<Math.abs(d)&&(d>0?(this.cameralHpRoll.heading+=this.radian,this.hpRoll.heading+=this.radian):(this.cameralHpRoll.heading-=this.radian,this.hpRoll.heading-=this.radian),s(0),this.lastScreenX=r),this.lastScreenY=l;const h=this.viewer.camera;this.cameralHpRoll.pitch=h.pitch+this.cesium.Math.toRadians(-a*.1),this.updatedCamera()},t.ScreenSpaceEventType.MOUSE_MOVE),e.setInputAction(()=>{this.isLeftDragging&&(this.isLeftDragging=!1)},t.ScreenSpaceEventType.LEFT_UP);const s=o=>{const r=performance.now();if(r-ss<mp)return;ss=r;const l=1.75;if(o===1?(this.speedVector=this.cesium.Cartesian3.multiplyByScalar(this.cesium.Cartesian3.UNIT_X,this.speed,this.speedVector),this.gravityTestByMove=!0):o===-1?(this.speedVector=this.cesium.Cartesian3.multiplyByScalar(this.cesium.Cartesian3.UNIT_X,-this.speed,this.speedVector),this.gravityTestByMove=!0):o===0?(this.speedVector=this.cesium.Cartesian3.multiplyByScalar(this.cesium.Cartesian3.UNIT_X,0,this.speedVector),this.gravityTestByMove=!1):o===2?(this.speedVector=this.cesium.Cartesian3.multiplyByScalar(this.cesium.Cartesian3.UNIT_Z,.05,this.speedVector),this.gravityTestByMove=!1):o===-2&&(this.speedVector=this.cesium.Cartesian3.multiplyByScalar(this.cesium.Cartesian3.UNIT_Z,-.05,this.speedVector),this.gravityTestByMove=!1),!this.viewer||!this.model)return;const a=(h,p)=>new this.cesium.Ray(h,p),d=new this.cesium.Cartesian3;if(this.cesium.Matrix4.getColumn(this.model.modelMatrix,0,d),this.cesium.Cartesian3.normalize(d,d),Math.abs(o)!=2&&this.collisionTest){const h=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),p=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,l),h),f=a(p,d),u=this.viewer.scene.pickFromRay(f,[this.model],1);if(u&&u.position&&this.cesium.Cartesian3.distance(p,u.position)<.9&&o===1)return}if(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,this.speedVector,this.position),this.cesium.Transforms.headingPitchRollToFixedFrame(this.position,this.hpRoll,this.cesium.Ellipsoid.WGS84,this.fixedFrameTransforms,this.model.modelMatrix),this.gravityTest){const h=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),p=.5,f=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,p),h),u=new this.cesium.Cartesian3;this.cesium.Cartesian3.subtract(this.position,f,u),this.cesium.Cartesian3.normalize(u,u);const m=a(f,u),E=this.viewer.scene.pickFromRay(m,[this.model],1),A=l,C=this.cesium.Cartesian3.add(f,this.cesium.Cartesian3.multiplyByScalar(d,A,new this.cesium.Cartesian3),new this.cesium.Cartesian3);if(t.defined(E)){const v=t.Cartesian3.distance(f,E.position);v-p>.2&&(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,-.2),this.position)),v-p<-.1&&v<2&&(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,.2),this.position))}if(!E&&this.gravityTestByMove){const v=a(this.position,u),S=this.viewer.scene.pickFromRay(v,[this.model],1);if(S){const D=this.cesium.Cartesian3.distance(this.position,S.position);Math.abs(D-1)>.05&&D<2&&(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,-.2),this.position))}}if(E&&this.gravityTestByMove&&this.gravityTest){const v=this.cesium.Cartesian3.distance(C,E.position);Math.abs(v-l)>.1&&(this.cesium.Transforms.headingPitchRollToFixedFrame(this.position,this.hpRoll,this.cesium.Ellipsoid.WGS84,this.fixedFrameTransforms,this.model.modelMatrix),this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,(l-v)/Math.abs(l-v)*.05),this.position))}}if(this.transparentTest){const h=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),p=1.75,f=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,p),h),u=this.viewer.camera.positionWC,m=f,E=t.Cartesian3.subtract(m,u,new t.Cartesian3),A=t.Cartesian3.distance(f,u),C=t.Cartesian3.normalize(E,new t.Cartesian3),v=new t.Ray(u,C);let S;try{S=this.viewer.scene.pickFromRay(v,void 0,1)}catch{}t.defined(S)&&S.primitive!==this.model&&S.position&&t.Cartesian3.distance(u,S.position)<A&&(this.wheelCount-=.1,this.wheelCount<.1&&(this.wheelCount=.1))}this.cesium.Transforms.headingPitchRollToFixedFrame(this.position,this.hpRoll,this.cesium.Ellipsoid.WGS84,this.fixedFrameTransforms,this.model.modelMatrix),this.updatedCamera()};this._tickHandler=()=>{const o=performance.now()/1e3;(o-this.lastMoveTime>=this.moveInterval||this.lastMoveTime==0)&&(this.moveState.moveFront?(this.moveState.moveLeft&&(this.hpRoll.heading-=this.radian,this.cameralHpRoll.heading-=this.radian),this.moveState.moveRight&&(this.hpRoll.heading+=this.radian,this.cameralHpRoll.heading+=this.radian),s(1)):this.moveState.moveBack?(this.moveState.moveLeft&&(this.hpRoll.heading-=this.radian,this.cameralHpRoll.heading-=this.radian),this.moveState.moveRight&&(this.hpRoll.heading+=this.radian,this.cameralHpRoll.heading+=this.radian),s(-1)):(this.moveState.moveUp&&s(2),this.moveState.moveDown&&s(-2),this.moveState.moveLeft&&(this.hpRoll.heading-=this.radian,this.cameralHpRoll.heading-=this.radian,s(0)),this.moveState.moveRight&&(this.hpRoll.heading+=this.radian,this.cameralHpRoll.heading+=this.radian,s(0))),this.lastMoveTime=o)},this.viewer.clock.onTick.addEventListener(this._tickHandler)}updatedCamera(){if(!this.model)return;const e=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),t=1.75,n=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,t),e);this.viewer.camera.viewBoundingSphere(new this.cesium.BoundingSphere(n,this.wheelCount),this.cameralHpRoll)}_keydownHandler;_keyupHandler;_tickHandler;_uiEventListeners=[];bindUiKeys(e){this.unbindUiKeys(),Object.entries(e).forEach(([t,n])=>{if(!n)return;const s=()=>this.setMoveState(t,!0),o=()=>this.setMoveState(t,!1);n.addEventListener("mousedown",s),n.addEventListener("mouseup",o),n.addEventListener("mouseleave",o),n.addEventListener("touchstart",r=>{r.preventDefault(),s()}),n.addEventListener("touchend",r=>{r.preventDefault(),o()}),this._uiEventListeners.push(()=>{n.removeEventListener("mousedown",s),n.removeEventListener("mouseup",o),n.removeEventListener("mouseleave",o),n.removeEventListener("touchstart",s),n.removeEventListener("touchend",o)})})}unbindUiKeys(){this._uiEventListeners.forEach(e=>e()),this._uiEventListeners=[]}closePlayer(){const e=this.cesium;this.model&&(this.model.show=!1),this.setCameralDefault(!0),this.handler&&(this.handler.removeInputAction(e.ScreenSpaceEventType.LEFT_DOWN),this.handler.removeInputAction(e.ScreenSpaceEventType.MOUSE_MOVE),this.handler.removeInputAction(e.ScreenSpaceEventType.LEFT_UP),this.handler.removeInputAction(e.ScreenSpaceEventType.WHEEL)),this._positionHandler&&(this._positionHandler.destroy(),this._positionHandler=null),this._keydownHandler&&document.removeEventListener("keydown",this._keydownHandler),this._keyupHandler&&document.removeEventListener("keyup",this._keyupHandler),this._tickHandler&&this.viewer.clock.onTick.removeEventListener(this._tickHandler),this.unbindUiKeys(),this.viewer.camera.lookAtTransform(e.Matrix4.IDENTITY),this.onLoading&&this.onLoading("")}setSpeed({speed:e}){this.speed=e/50}setParams({gravityTest:e,collisionTest:t,transparentTest:n}){e!==void 0&&(this.gravityTest=e),t!==void 0&&(this.collisionTest=t),n!==void 0&&(this.transparentTest=n)}setMoveState(e,t){this.moveState.hasOwnProperty(e)&&(this.moveState[e]=t,t?this.resumeAnimationFn&&this.resumeAnimationFn():Object.keys(this.moveState).every(n=>this.moveState[n]==!1)&&this.pauseAnimationFn&&this.pauseAnimationFn())}setCameralDefault(e){const t=this.viewer;t.scene.screenSpaceCameraController.enableRotate=e,t.scene.screenSpaceCameraController.enableTranslate=e,t.scene.screenSpaceCameraController.enableZoom=e,t.scene.screenSpaceCameraController.enableLook=e,t.scene.screenSpaceCameraController.enableTilt=e}}class yp{cesium;viewer;baseCesium;baseTiles;baseCompt;baseSection;basePlayer;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer,this.baseCesium=new Ql(e),this.baseTiles=new Dr(e),this.baseCompt=new pp(e),this.baseSection=new gp(e),this.basePlayer=new Ap({cesium:e.cesium,viewer:e.viewer,modelInfo:{url:e.options?.playerUrl,modelName:e.options?.playerModelName,modelId:e.options?.playerModelId,scale:e.options?.playerScale},callbacks:e.callbacks})}getCesium(){return this.cesium}getViewer(){return this.viewer}setSceneOptions(...e){this.baseCesium.setSceneOptions(...e)}getSnapDomSImageBase64(...e){return this.baseCesium.getSnapDomSImageBase64(...e)}clearBackground(){this.baseCesium.clearBackground()}enableTestLabel(){this.baseCesium.enableTestLabel()}enableCesiumFXAA(e){this.baseCesium.enableCesiumFXAA(e)}updateModelEffect(e){this.baseCesium.updateModelEffect(e)}addModels(...e){return this.baseTiles.addModels(...e)}}class Cp{cesium;viewer;mapLayers={};renderGen={};renderGenAll=0;renderGenByModel={};modelId="default";options={flyTo:!0};dxfModelsList=[];open=!1;events=new Gi;showGlobal=!0;constructor({viewer:e,cesium:t}){this.viewer=e,this.cesium=t}getMapLayers(e){const t=typeof e=="object"?e?.modelId:e;return t?this.mapLayers[t]||{}:this.mapLayers}setModelId(e){this.modelId=e}getModelId(){return this.modelId}flyToCadModel(e={}){const t=e.modelId||this.modelId,n=this.dxfModelsList.find(s=>s.modelId===t);n&&this.flyToBounds(n)}setDxfOpen(e){this.open=e}getDxfOpen(){return this.open}getDxfModelsList(){return this.dxfModelsList}getDxfModels(e){const t=typeof e=="object"?e?.modelId:e;return t?this.dxfModelsList.find(n=>n.modelId===t):this.dxfModelsList}showJson({modelId:e,show:t}){this.mapLayers[e]&&Object.values(this.mapLayers[e]).forEach(s=>{s.forEach(o=>{o.primitive&&(o.primitive.show=t)})});const n=this.dxfModelsList.find(s=>s.modelId===e);n&&(n.show=t)}showJsonByLayer({modelId:e,show:t,layers:n}){const s=this.dxfModelsList.find(r=>r.modelId===e);if(!s){console.error("Tileset not found for modelId:",e);return}s.hiddenBatchIds||(s.hiddenBatchIds=new Set),s.layerMap&&Array.isArray(n)&&n.forEach(r=>{const l=s.layerMap[r];l!==void 0&&(t?s.hiddenBatchIds.delete(l):s.hiddenBatchIds.add(l))});const o=Array.from(s.hiddenBatchIds);if(o.length>0){const r=o.map(l=>`\${_BATCHID} !== ${l}`).join(" && ");s.style=new this.cesium.Cesium3DTileStyle({show:r})}else s.style=new this.cesium.Cesium3DTileStyle({show:!0});s.hasVisibilityListener||(s.hasVisibilityListener=!0,s.tileVisible.addEventListener(r=>{const l=r.content,a=l.featuresLength;if(a>0&&s.hiddenBatchIds)for(let d=0;d<a;d++)s.hiddenBatchIds.has(d)?l.getFeature(d).show=!1:l.getFeature(d).show=!0}))}flyToBounds(e,t){const n=this.cesium,s=e.boundingSphere?.radius||1e3,o={offset:new n.HeadingPitchRange(0,n.Math.toRadians(-90),s*2),...t},r=o.duration??0;e&&this.viewer.flyTo(e,{duration:r,offset:o.offset})}async loadModelFile(e){try{if(!e||typeof e!="string")return!1;const t=await fetch(e,{cache:"no-store"});if(!t.ok)throw new Error(`HTTP ${t.status} for ${e}`);if(e.endsWith(".json")||t.headers.get("content-type")?.includes("application/json"))return await t.json();const n=await t.blob(),s=new br(new $n(n),{password:"abc!?123",useWebWorkers:!1}),r=(await s.getEntries()).find(d=>!d.directory&&d.filename.endsWith(".json"));if(!r)return console.error("未找到 JSON 文件"),await s.close(),!1;const l=await r.arrayBuffer({useWebWorkers:!1});await s.close();const a=new TextDecoder().decode(l);return JSON.parse(a.trim())}catch(t){return console.error("解压或获取失败:",t),!1}}async addDxfModel({fileNames:e,options:t}){const n=this.renderGenAll;if(e?.length){for(const s of e){if(this.renderGenAll!==n)return;const o=this.renderGenByModel[s.modelId]||0;if((this.renderGenByModel[s.modelId]||0)!==o)return;const r=`${s.outPutPath}${s.dbName}/tileset.json`,l={...this.options,...t};try{const a=`${s.outPutPath}${s.dbName}/layerInfo.zip`,d=await this.loadModelFile(a);if(this.renderGenAll!==n||(this.renderGenByModel[s.modelId]||0)!==o)return;const h=await this.cesium.Cesium3DTileset.fromUrl(r,{allowPicking:!1});if(h.maximumScreenSpaceError=0,this.renderGenAll!==n||(this.renderGenByModel[s.modelId]||0)!==o)return;if(Object.assign(h,{modelId:s.modelId,modelName:s.modelName,deltaLatitude:s.deltaLatitude||0,deltaLongitude:s.deltaLongitude||0,relocated:!0,dbName:s.dbName,outPutPath:s.outPutPath,totalRotation:s.totalRotation||0,layerInfo:d}),s.formData?h.formData=s.formData:h.formData={modelId:h.modelId,longitude:h.deltaLongitude,latitude:h.deltaLatitude,distance:1e-6,rotation:0,totalRotation:h.totalRotation,heightDistance:1,height:0,lonlat:1e-6,modelOptions:[{value:h.modelId,label:h.modelName}],selectPoint:{longitude:0,latitude:0,height:0},selectedMode:!1,X:0,Y:0,Z:0},this.adjustingModelByCad({...h.formData,tileset:h}),Array.isArray(d)){const p=d;h.layerMap={};let f=this.mapLayers[s.modelId];f||(f={},this.mapLayers[s.modelId]=f),p.forEach(u=>{h.layerMap[u.layerName]=u.batchId,f[u.layerName]||(f[u.layerName]=[]),f[u.layerName].push({batchId:u.batchId,color:u.layerColor})})}if(this.dxfModelsList.push(h),this.setModelId(s.modelId),this.viewer.scene.primitives.add(h),this.renderGenAll!==n||(this.renderGenByModel[s.modelId]||0)!==o)return;l.flyTo&&this.flyToBounds(h),l.onSuccess&&l.onSuccess(h)}catch(a){console.error(`Failed to load tileset or layer info: ${r}`,a)}}this.events.emit("mountAllCad",this.dxfModelsList)}}adjustingModelByCad(e){const t=this.cesium,n=t.Quaternion.fromAxisAngle(t.Cartesian3.UNIT_Z,t.Math.toRadians(e.totalRotation)),s=t.Matrix4.fromRotationTranslation(t.Matrix3.fromQuaternion(n),new t.Cartesian3(0,0,0)),o=t.Cartesian3.fromDegrees(e.longitude,e.latitude,e.height),r=t.Transforms.eastNorthUpToFixedFrame(o);t.Matrix4.multiply(r,s,r),e.tileset?._root&&(e.tileset._root.transform=r)}deleteCad({modelId:e}){this.mapLayers[e]&&(Object.values(this.mapLayers[e]).forEach(n=>{n.forEach(s=>{this.viewer.scene.primitives.remove(s.primitive),s.primitive?.destroy()})}),delete this.mapLayers[e]),this.renderGen[e]=(this.renderGen[e]||0)+1,this.renderGenByModel[e]=(this.renderGenByModel[e]||0)+1;const t=this.dxfModelsList.findIndex(n=>n.modelId===e);if(t>-1){const n=this.dxfModelsList[t];this.viewer.scene.primitives.remove(n),n.destroy&&!n.isDestroyed()&&n.destroy(),this.dxfModelsList.splice(t,1)}}deleteAllCad(){Object.keys(this.mapLayers).forEach(e=>{this.deleteCad({modelId:e})}),[...this.dxfModelsList].forEach(e=>{e.modelId&&this.deleteCad({modelId:e.modelId})})}}class at{constructor(e,t){if(this.viewer=e,!this.viewer)return;this.type="prompt",t=t||{};const n=t.type==null?1:t.type;let s={id:new Date().getTime()+""+Math.floor(Math.random()*1e4),type:n,anchor:n==2,closeBtn:n==2,offset:n==2?{x:0,y:-20}:{x:10,y:10},content:"",show:!0,style:{background:"rgba(0,0,0,0.5)",color:"white"}};this.opt=Object.assign(s,t),this.attr=this.opt;const o=this.viewer.container.id;this.isShow=this.opt.show==null?!0:this.opt.show;let r="",l="";const a=this.opt.style.background,d=this.opt.style.color;this.opt.anchor&&(r+=`
14
14
  <div class="prompt-anchor-container">
15
15
  <div class="prompt-anchor" style="background:${a} !important;">
16
16
  </div>
@@ -115,4 +115,4 @@
115
115
  // 通常不需要 clamp,除非开启 HDR 后期望超亮,但负值需要避免
116
116
  material.diffuse = max(material.diffuse, vec3(0.0));
117
117
  }
118
- `});f.isModelAdjustment=!0,p.customShader=f}else e.brightness!==void 0&&e.brightness!==1&&!p.style&&(p.style=new n.Cesium3DTileStyle({color:`color('white') * ${e.brightness}`}))}}setModelBrightness(e){this.setModelColorAdjustment({brightness:e})}_defaultSkyBox=null;_updateLightDirection=e=>{e.light instanceof this.cesium.DirectionalLight&&(e.light.direction=e.camera.directionWC)};setEnvironmentMapEnable(e){this.is2d||(e?(this.viewer.scene.light=new this.cesium.DirectionalLight({direction:this.viewer.scene.camera.directionWC}),this.viewer.scene.preRender.addEventListener(this._updateLightDirection)):(this._defaultSkyBox&&(this.viewer.scene.skyBox=this._defaultSkyBox),this.viewer.scene.preRender.removeEventListener(this._updateLightDirection),this.viewer.scene.light=new this.cesium.SunLight),this.viewer.scene.imageBasedLighting&&(this.viewer.scene.imageBasedLighting.imageBasedLightingFactor=e?new this.cesium.Cartesian2(2,2):new this.cesium.Cartesian2(1,1)))}setAmbientOcclusion(e){if(this.is2d)return;const t=this.viewer.scene;if(!t||!t.postProcessStages||!t.postProcessStages.ambientOcclusion)return;const n=t.postProcessStages.ambientOcclusion;n.enabled=e,e&&(n.uniforms.ambientOcclusionOnly=!1,n.uniforms.intensity=3,n.uniforms.bias=.1,n.uniforms.lengthCap=.03,n.uniforms.stepSize=1,n.uniforms.blurStepSize=.86)}setCollisionDetection(e){if(this.is2d){this.viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1;return}const t=this.viewer.scene.screenSpaceCameraController;t.enableCollisionDetection=e,e||t.minimumZoomDistance<1&&(t.minimumZoomDistance=1)}_customZoomHandler=null;_zoomInertiaListener=null;setHeightBasedZoom(e){const t=this.viewer.scene.screenSpaceCameraController,n=this.cesium;if(this.viewer.camera.frustum.near=1e-5,this.viewer.camera.frustum.far=1e8,e||(this.viewer.camera.frustum.near=.1),this._customZoomHandler&&(this._customZoomHandler.destroy(),this._customZoomHandler=null),this._zoomInertiaListener&&(this._zoomInertiaListener(),this._zoomInertiaListener=null),!e){t.zoomEventTypes.includes(n.CameraEventType.WHEEL)||t.zoomEventTypes.push(n.CameraEventType.WHEEL);return}t.zoomEventTypes=t.zoomEventTypes.filter(l=>l!==n.CameraEventType.WHEEL),this._customZoomHandler=new n.ScreenSpaceEventHandler(this.viewer.scene.canvas);let s=null;this._customZoomHandler.setInputAction(l=>{s=l.endPosition},n.ScreenSpaceEventType.MOUSE_MOVE);let o=0,r=null;this._zoomInertiaListener=this.viewer.scene.preUpdate.addEventListener(()=>{if(Math.abs(o)<.001||!r){o=0;return}const l=this.viewer.camera,a=o*.2;if(s){const h=l.getPickRay(s);if(h){let p=this.viewer.scene.pickPosition(s);if(!p){const f=n.IntersectionTests.rayEllipsoid(h,this.viewer.scene.globe.ellipsoid);f&&(p=n.Ray.getPoint(h,f.start))}if(p){const f=n.Cartesian3.distance(l.position,p);if(a>0&&a>f-.01){if(o=0,f>.01){const u=n.Cartesian3.multiplyByScalar(r,f-.01,new n.Cartesian3);l.position=n.Cartesian3.add(l.position,u,new n.Cartesian3)}return}}}}const d=n.Cartesian3.multiplyByScalar(r,a,new n.Cartesian3);l.position=n.Cartesian3.add(l.position,d,new n.Cartesian3),o-=a}),this._customZoomHandler.setInputAction(l=>{const a=this.viewer.camera,d=a.positionCartographic.height;let h=.1;d<4?h=.08+d/4*.08:d>1e3&&(h=.1+Math.min((d-1e3)/1e3,1)*.1);let p=d*h;p=Math.max(.001,p);const f=Math.sign(l);if(d<.2&&f>0){pe.warning("无法继续放大");return}if(!s)r=a.direction;else{const u=a.getPickRay(s);if(u){let m=this.viewer.scene.pickPosition(s);if(!m){const E=n.IntersectionTests.rayEllipsoid(u,this.viewer.scene.globe.ellipsoid);E&&(m=n.Ray.getPoint(u,E.start))}if(m){const E=n.Cartesian3.subtract(m,a.position,new n.Cartesian3);r=n.Cartesian3.normalize(E,new n.Cartesian3)}else r=a.direction}else r=a.direction}o+=f>0?p:-p},n.ScreenSpaceEventType.WHEEL)}setMouseHabit(e){if(this.is2d)return;const t=this.viewer.scene.screenSpaceCameraController;t.enableTranslate=!0,t.enableRotate=!0,t.enableZoom=!0,t.enableTilt=!0,t.enableLook=!1,t.lookEventTypes=[],e===1?(t.rotateEventTypes=[this.cesium.CameraEventType.RIGHT_DRAG],t.zoomEventTypes=[this.cesium.CameraEventType.MIDDLE_DRAG,this.cesium.CameraEventType.WHEEL,this.cesium.CameraEventType.PINCH],t.tiltEventTypes=[this.cesium.CameraEventType.PINCH,this.cesium.CameraEventType.LEFT_DRAG]):(t.rotateEventTypes=[this.cesium.CameraEventType.LEFT_DRAG],t.zoomEventTypes=[this.cesium.CameraEventType.RIGHT_DRAG,this.cesium.CameraEventType.WHEEL,this.cesium.CameraEventType.PINCH],t.tiltEventTypes=[this.cesium.CameraEventType.PINCH,this.cesium.CameraEventType.MIDDLE_DRAG])}}class hy{cesium;viewer;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer}getCameraView(){const e=this.viewer.camera;return{position:{x:e.position.x,y:e.position.y,z:e.position.z},destination:{x:e.position.x,y:e.position.y,z:e.position.z},orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},duration:1}}flyToCameraView(e){const{position:t,orientation:n,duration:s}=e,o=new this.cesium.Cartesian3(t.x,t.y,t.z),r=new this.cesium.HeadingPitchRoll(n.heading,n.pitch,n.roll);!s||s<=0?this.viewer.camera.setView({destination:o,orientation:r}):this.viewer.camera.flyTo({destination:o,orientation:r,duration:s})}getCurrentCameraPositionAndTarget(){const e=this.getCameraView();return{position:e.position,target:{heading:e.orientation.heading,pitch:e.orientation.pitch,roll:e.orientation.roll},duration:e.duration}}setCameraView(e){const t=e.target||e.orientation||{},n=e.destination||e.position||{};this.flyToCameraView({position:{x:Number(n.x),y:Number(n.y),z:Number(n.z)},destination:{x:Number(n.x),y:Number(n.y),z:Number(n.z)},orientation:{heading:Number(t.heading||0),pitch:Number(t.pitch||0),roll:Number(t.roll||0)},duration:e.duration})}flyToLonLatHeight(e,t,n,s=1){const o=this.cesium.Cartesian3.fromDegrees(e,t,n),r={heading:this.cesium.Math.toRadians(0),pitch:this.cesium.Math.toRadians(-90),roll:0};!s||s<=0?this.viewer.camera.setView({destination:o,orientation:r}):this.viewer.camera.flyTo({destination:o,orientation:r,duration:s})}}function uy(i){const{container:e,appContext:t,methods:n,viewerOptions:s,options:o,callbacks:r}=i,l=new Gi,a=window.Cesium;if(!a)throw new Error("Cesium is not loaded");e.id=`cesium-container-${op()}`;const d={animation:!1,timeline:!1,infoBox:!1,homeButton:!1,fullscreenButton:!1,sceneModePicker:!1,navigationHelpButton:!1,geocoder:!1,baseLayerPicker:!1,selectionIndicator:!1,heightBasedZoom:!0,creditContainer:document.createElement("div"),contextOptions:{webgl:{alpha:!0}}},h=t?.config?.globalProperties?.$leitingBimOptions,p={...d,...h?.viewerOptions??{},...s??{}},f=new a.Viewer(e,p);f.camera.setView({destination:a.Cartesian3.fromDegrees(108,32,1e7),orientation:{heading:a.Math.toRadians(0),pitch:a.Math.toRadians(-90),roll:0}});let u=n;if(!u&&h&&(h.methods||(h.methods={}),u=h.methods),u){const m=new yp({cesium:a,viewer:f,options:o,callbacks:r}),E=new Dr({cesium:a,viewer:f}),A=new dy({cesium:a,viewer:f}),C=new Cp({cesium:a,viewer:f}),v=new hy({cesium:a,viewer:f});let S;const D=new tl({cesium:a,viewer:f});o&&(o.globe!==void 0&&A.setGlobeEnvironmentVisible(o.globe),o.terrain!==void 0&&A.setTerrainEnable(o.terrain),o.depthTest!==void 0&&A.setDepthTestEnable(o.depthTest),o.mapProvider&&o.mode!=="2d"&&A.changeBaseMap(o.mapProvider,{token:o.tiandituToken,layerType:o.tiandituLayerType,showAnnotation:o.tiandituShowLabel,url:o.arcgisUrl}),o.shadows!==void 0&&A.setShadowsEnable(o.shadows),o.environmentMap!==void 0&&A.setEnvironmentMapEnable(o.environmentMap),o.ambientOcclusion!==void 0&&A.setAmbientOcclusion(o.ambientOcclusion),o.time!==void 0&&A.setTime(o.time),o.brightness!==void 0&&A.setModelBrightness(o.brightness),o.backgroundColor!==void 0&&A.setBackgroundColor(o.backgroundColor),o.collision!==void 0&&A.setCollisionDetection(o.collision),o.mouseHabit!==void 0&&A.setMouseHabit(o.mouseHabit),o.heightBasedZoom!==void 0&&A.setHeightBasedZoom(o.heightBasedZoom)),o&&o.mode==="2d"&&(console.log("InitMap: Setting CAD Mode 2D"),A.setCadMode("2d"),S=new el({cesium:a,viewer:f})),E.events.on("tilesetLoaded",g=>{m.baseCompt.attachTileset(g,m.baseCompt.selectedColor),m.baseSection.attachTileset(g,g.leiting?.model?.modelId),u&&u.tilesLoad3dTiles&&u.tilesLoad3dTiles(g),o?.tilesLoad3dTiles&&o.tilesLoad3dTiles(g.leiting)}),E.events.on("loadingStatus",g=>{u&&u.onLoadingStatus&&u.onLoadingStatus(g)}),E.events.on("mountAll3Dtiles",({modelList:g})=>{o?.mountAll3Dtiles&&o.mountAll3Dtiles(g),u?.mountAll3Dtiles&&u.mountAll3Dtiles(g)}),E.events.on("updateModels",({modelList:g})=>{o?.updateModels&&o.updateModels(g),u?.updateModels&&u.updateModels(g)}),C.events.on("mountAllCad",g=>{o?.mountAllCad&&o.mountAllCad(g),u?.mountAllCad&&u.mountAllCad(g)}),m.baseCompt.loadNodeDetailsForModel=g=>E.loadNodeDetailsForModel(g),m.baseCompt.selectionChange(g=>{g.length!==0&&(o?.selectionChange&&o.selectionChange(g),u?.selectionChange&&u.selectionChange(g))}),u.onSearchComponent=g=>{o?.searchComponent&&o.searchComponent(g),u?.searchComponent&&u.searchComponent(g)};const O=u.saveRegion;u.saveRegion=g=>{o?.saveRegion&&o.saveRegion(g),O&&O!==o?.saveRegion&&O(g)};const I=u.saveCadCalibration;u.saveCadCalibration=g=>{o?.saveCadCalibration&&o.saveCadCalibration(g),I&&I!==o?.saveCadCalibration&&I(g)};const B=u.saveCadRegion;u.saveCadRegion=g=>{o?.saveCadRegion&&o.saveCadRegion(g),B&&B!==o?.saveCadRegion&&B(g)},u.getCesium=()=>a,u.getViewer=()=>f,u.getAnnotationInstance=()=>S,u.getMeasureInstance=()=>D,u.flyToCamera=g=>{v.setCameraView(g)},u.flyToLonLatHeight=(g,P,x,F=1)=>{v.flyToLonLatHeight(g,P,x,F)},u.flyTo=u.flyToCamera,u.getCameraState=()=>v.getCameraView(),u.getCameraInfo=u.getCameraState,u.restoreCameraState=g=>v.flyToCameraView(g),u.flyToCameraView=u.restoreCameraState,u.getCameraPositionTarget=()=>v.getCurrentCameraPositionAndTarget(),u.getCurrentCameraPositionAndTarget=u.getCameraPositionTarget,u.setCameraLookAt=g=>v.setCameraView(g),u.setCameraView=u.setCameraLookAt,u.setCanvasBackground=g=>A.setBackgroundColor(g),u.setBackgroundColor=u.setCanvasBackground,u.setAntiAliasing=g=>m.enableCesiumFXAA(g),u.enableCesiumFXAA=u.setAntiAliasing,u.setSceneVisibility=g=>m.setSceneOptions(g),u.setSceneOptions=u.setSceneVisibility,u.addDebugPoint=(g,P,x=0)=>{f.entities.add({position:a.Cartesian3.fromDegrees(g,P,x),point:{pixelSize:10,color:a.Color.RED}})},u.addPoint=u.addDebugPoint,u.toggleDebugLabels=()=>m.enableTestLabel(),u.enableTestLabel=u.toggleDebugLabels,u.captureScreenshot=()=>{const g=f.scene.canvas;return f.render(),g.toDataURL("image/png")},u.getImageBase64=u.captureScreenshot,u.captureDomScreenshot=(g,P)=>m.getSnapDomSImageBase64(g,P),u.getSnapDomSImageBase64=u.captureDomScreenshot,u.addModels=g=>E.addModels(g),u.add3DtilesModel=u.addModels,u.addObliquePhotography=g=>E.addOSGB(g),u.addOSGB=u.addObliquePhotography,u.adjustOSGBModelMatrix=g=>E.updateOSGBMatrix(g),u.updateOSGBMatrix=u.adjustOSGBModelMatrix,u.setModelVisibility=g=>E.showModels(g),u.showModels=u.setModelVisibility,u.showTileset=u.setModelVisibility,u.removeModels=g=>E.deleteModels(g),u.deleteModels=u.removeModels,u.clearAllModels=()=>{E.deleteAllModels(),l.emit("deleteAllModels")},u.deleteAllModelList=u.clearAllModels,u.deleteAllModels=u.clearAllModels,u.flyToModel=g=>E.flyToTileset(g),u.flyToTileset=u.flyToModel,u.flyToByModelId=u.flyToModel,u.setModelBrightness=g=>m.updateModelEffect(g),u.updateModelEffect=u.setModelBrightness,u.getAllTilesets=()=>E.getMapTileset(),u.getMapTileset=u.getAllTilesets,u.getCurrentModelId=()=>E.getBIMmodelId(),u.getBIMmodelId=u.getCurrentModelId,u.getLoadedModels=()=>E.getModelList(),u.getModelList=u.getLoadedModels,u.loadModelStructure=async g=>{const P=typeof g=="string"?g:g?.modelId;if(!P){console.warn("loadModelStructure: modelId is required");return}return await E.loadTreeForModel(P)},u.loadTreeForModel=u.loadModelStructure,u.loadModelDetails=async g=>{const P=typeof g=="string"?g:g?.modelId;if(!P){console.warn("loadModelDetails: modelId is required");return}return await E.loadNodeDetailsForModel(P)},u.loadNodeDetailsForModel=u.loadModelDetails,u.setMapTileset=g=>E.setMapTileset(g),u.setCurrentModelId=g=>E.setBIMmodelId(g),u.setBIMmodelId=u.setCurrentModelId,u.setModelList=g=>E.setModelList(g),u.highlightComponents=(g,P={})=>m.baseCompt.setSelectColorUserModelCpt(g,P),u.setSelectColorUserModelCpt=u.highlightComponents,m.baseCompt.setLoadNodeDetailsCallback(g=>E.loadNodeDetailsForModel(g)),u.highlightAllComponents=g=>m.baseCompt.setAllSelectColorUserModelCpt(g),u.setAllSelectColorUserModelCpt=u.highlightAllComponents,u.setSelectColorUserModelCptByClear=(g,P)=>{m.baseCompt.clearAllHaveSelected(),m.baseCompt.setSelectColorUserModelCpt(g.selectCpts,P??{rank:0})},u.clearSelectColorUserModelCpt=()=>m.baseCompt.clearAllHaveSelected(),u.selectComponents=(g,P)=>{m.baseCompt.clearAllHaveSelected(),m.baseCompt.setSelectColorUserModelCpt(g,P??{rank:0})},u.setSelecteds=u.selectComponents,u.setSelectionColor=(g,P,x,F)=>m.baseCompt.setSelectedColorRgba(g,P,x,F),u.setSelectedColor=u.setSelectionColor,u.clearSelection=()=>m.baseCompt.clearAllHaveSelected(),u.clearAllHaveSelected=u.clearSelection,u.getSelectedComponents=g=>m.baseCompt.getSelected(g),u.getSelected=u.getSelectedComponents,u.onSelectionChange=g=>{m.baseCompt.selectionChange(g)},u.selectionChange=u.onSelectionChange,u.flyToComponents=g=>m.baseCompt.flyToObjects(g),u.flyToObjects=u.flyToComponents,u.setConstructionData=async g=>{if(g&&Array.isArray(g)){const P=new Set;g.forEach(x=>{x.mergeCpts&&Array.isArray(x.mergeCpts)&&x.mergeCpts.forEach(F=>{F.modelId&&P.add(F.modelId)})}),P.size>0&&await Promise.all(Array.from(P).map(x=>u.loadNodeDetailsForModel(x)))}m.baseCompt.setAllConstructionProgressTracking(g)},u.setAllConstructionProgressTracking=u.setConstructionData,u.startConstructionSimulation=()=>m.baseCompt.enableConstructionProgressTracking(),u.enableAllConstructionProgressTracking=u.startConstructionSimulation,u.stopConstructionSimulation=()=>m.baseCompt.disableConstructionProgressTracking(),u.disableConstructionProgressTracking=u.stopConstructionSimulation,u.disableAllConstructionProgressTracking=u.stopConstructionSimulation,u.resetConstructionSimulation=()=>m.baseCompt.freshConstructionProgressTracking(),u.freshConstructionProgressTracking=u.resetConstructionSimulation,u.restartConstructionSimulation=()=>m.baseCompt.reStartAnimation(),u.reStartAnimation=u.restartConstructionSimulation,u.resumeFlyTo=()=>m.baseCompt.resumeFlyTo(),u.pauseConstructionSimulation=()=>m.baseCompt.pauseFlyTo(),u.pauseFlyTo=u.pauseConstructionSimulation,u.pauseAnimation=u.pauseConstructionSimulation,u.resumeConstructionSimulation=()=>m.baseCompt.resumeFlyTo(),u.resumeAnimation=u.resumeConstructionSimulation,u.setComponentsVisibility=async g=>await m.baseCompt.setComponentVisibility(g),u.setElementsListVisible=u.setComponentsVisibility,u.setAllComponentsVisibility=async g=>await m.baseCompt.setAllComponentsVisibility(g),u.setAllElementsVisible=u.setAllComponentsVisibility,u.getComponentsByVisibility=g=>m.baseCompt.getComponentsByVisibility(g),u.getShowCpts=g=>m.baseCompt.getComponentsByVisibility(g),u.getElementsVisible=u.getComponentsByVisibility,u.setComponentVisibility=u.setComponentsVisibility,u.enableSectioning=(g,P)=>m.baseSection.open(g,P),u.openSection=u.enableSectioning,u.disableSectioning=g=>m.baseSection.close(g),u.closeSection=u.disableSectioning,u.updateSectionBox=g=>m.baseSection.updateRange(g),u.updateSectionRange=u.updateSectionBox,u.getSectionBox=()=>m.baseSection.getRange(),u.getSectionRange=u.getSectionBox,u.fitSectionToModel=()=>m.baseSection.fitToModels(),u.fitToModels=u.fitSectionToModel,u.setSectionBoxVisibility=g=>m.baseSection.setBoxVisibility(g),u.startFirstPersonMode=()=>{m.baseCompt.disableSelection(),m.basePlayer.openPlayer()},u.openPlayer=u.startFirstPersonMode,u.stopFirstPersonMode=()=>{m.basePlayer.closePlayer(),m.baseCompt.enableSelection()},u.closePlayer=u.stopFirstPersonMode,u.setPlayerPosition=g=>m.basePlayer.setPersonPosition(g),u.setPersonPosition=u.setPlayerPosition,u.setWalkSpeed=g=>m.basePlayer.setSpeed({speed:g}),u.setPlayerSpeed=u.setWalkSpeed,u.setPlayerConfig=g=>m.basePlayer.setParams(g),u.setPlayerParams=u.setPlayerConfig,u.setPlayerAction=(g,P)=>m.basePlayer.setMoveState(g,P),u.setPlayerMoveState=u.setPlayerAction,u.bindPlayerControls=g=>m.basePlayer.bindUiKeys(g),u.bindPlayerUiKeys=u.bindPlayerControls,u.setGlobeVisibility=g=>A.setGlobeEnvironmentVisible(g),u.setGlobeEnvironmentVisible=u.setGlobeVisibility,u.setTerrainVisibility=g=>A.setTerrainEnable(g),u.setTerrainEnable=u.setTerrainVisibility,u.setDepthTest=g=>A.setDepthTestEnable(g),u.setDepthTestEnable=u.setDepthTest,u.setBaseMap=(g,P)=>A.changeBaseMap(g,P),u.changeBaseMap=u.setBaseMap,u.setWorldTime=g=>A.setTime(g),u.setTime=u.setWorldTime,u.setGisOptions=g=>{g.globe!==void 0&&A.setGlobeEnvironmentVisible(g.globe),g.elevation!==void 0&&A.setTerrainEnable(g.elevation),g.depthTestAgainstTerrain!==void 0&&A.setDepthTestEnable(g.depthTestAgainstTerrain),g.rendering!==void 0&&A.setAmbientOcclusion(g.rendering)},u.setShadowVisibility=g=>A.setShadowsEnable(g),u.setShadowsEnable=u.setShadowVisibility,u.setEnvironmentMapVisibility=g=>A.setEnvironmentMapEnable(g),u.setEnvironmentMapEnable=u.setEnvironmentMapVisibility,u.setAOVisibility=g=>A.setAmbientOcclusion(g),u.setAmbientOcclusion=u.setAOVisibility,u.setBackgroundColor=g=>A.setGlobeColor(g),u.setGlobeColor=u.setBackgroundColor,u.setModelBrightness=g=>A.setModelBrightness(g),u.adjustModelColor=g=>A.setModelColorAdjustment(g),u.setModelColorAdjustment=u.adjustModelColor,u.setShadowIntensity=g=>{A.setShadowDarkness?A.setShadowDarkness(g):console.warn("baseSetting.setShadowDarkness is not available. Please reload the page.")},u.setShadowDarkness=u.setShadowIntensity,u.switchSceneMode=async g=>{const P=g?"2d":"3d";await A.setCadMode(P),g&&!S&&(S=new el({cesium:a,viewer:f}),u.setGlobeVisibility(!0)),l.emit("setMode",P)},u.setSceneMode=u.switchSceneMode,u.set2d=g=>u.switchSceneMode(g),u.is2dMode=()=>A.is2d,u.setMouseControlMode=g=>A.setMouseHabit(g),u.setMouseHabit=u.setMouseControlMode,u.setCollisionEnabled=g=>A.setCollisionDetection(g),u.setCollisionDetection=u.setCollisionEnabled,u.searchAndLocate=(g,P)=>A.searchLocation(g,P),u.searchLocation=u.searchAndLocate,u.getConfigure=()=>(console.warn("getConfigure is not initialized. Please ensure LeitingSetting component is mounted."),{}),u.setConfigure=g=>{console.warn("setConfigure is not initialized. Please ensure LeitingSetting component is mounted.",g)},u.addCadModel=g=>{const P={...g};return P.files&&!P.fileNames&&(P.fileNames=P.files),P.fileNames||(P.fileNames=[]),C.addDxfModel(P)},u.addDxfModel=u.addCadModel,u.deleteCad=g=>C.deleteCad(g),u.deleteAllCad=()=>C.deleteAllCad(),u.showCadModel=g=>C.showJson(g),u.showGeoJson=g=>C.showJson(g),u.showDxfModel=u.showCadModel,u.showCadLayer=g=>C.showJsonByLayer(g),u.showDxfLayer=u.showCadLayer,u.flyToCadModel=(g={})=>C.flyToCadModel(g),u.getCadModels=g=>C.getDxfModels(g),u.getDxfModels=u.getCadModels,u.getCadLayers=g=>C.getMapLayers(g),u.getDxfLayers=u.getCadLayers,u.getCadModelId=()=>C.getModelId(),u.setCadOpen=g=>C.setDxfOpen(g),u.setDxfOpen=u.setCadOpen,u.getCadOpen=()=>C.getDxfOpen(),u.getDxfOpen=u.getCadOpen,u.adjustCadModel=g=>C.adjustingModelByCad(g),u.adjustingModelByCad=u.adjustCadModel,u.saveAnnotations=()=>{let g=null;return S&&(g=S.saveAnnotations()),o?.saveAnnotations&&o.saveAnnotations(g),g},u.loadAnnotations=g=>S?S.loadAnnotations(g):!1,u.flyToTopView=()=>{C.flyToCadModel()},u.menuEvents=l,u.addMenuItems=g=>{l.emit("insertMenu",g)},u.insertMenu=u.addMenuItems,u.filterMenuItems=g=>{l.emit("setMenuListFilter",g)},u.setMenuListFilter=u.filterMenuItems,u.setMenuVisibility=g=>{l.emit("showMenu",g)},u.showMenu=u.setMenuVisibility,u.setPanelVisibility=(g,P)=>{l.emit("setMenuActive",g,P)},u.setMenuActive=u.setPanelVisibility,u.addContextMenuItems=g=>{console.warn("addContextMenuItems is not initialized yet. Please wait for LeitingBIM component to mount.",g)},u.insertContextMenu=u.addContextMenuItems,u.removeContextMenuItems=g=>{console.warn("removeContextMenuItems is not initialized yet.",g)},u.deleteContextMenu=u.removeContextMenuItems,u.closeContextMenu=()=>{console.warn("closeContextMenu is not initialized yet.")},u.hideContextMenu=u.closeContextMenu,u.getModelTree=()=>{const g=[],P=E.getMapTileset();return Object.keys(P).forEach(x=>{const F=P[x];if(F&&F.leiting&&F.leiting.tree){const _=F.leiting.tree;Array.isArray(_)?g.push(..._):g.push(_)}}),g},u.getTree=u.getModelTree,u.getAllComponentDetails=()=>{const g=E.getMapTileset(),P={},x=[];try{Object.keys(g).forEach(F=>{const _=g[F];if(!_||!_.leiting)return;const H=_.leiting,L=H.node,w=H.model.formData,y=H.box;if(!L||!L.nodeExtras)return;const b=H.model.modelId;P[b]=L.nodeExtras;const M=L.nodeExtras.element;if(!M)return;const k=y?y.center:{x:0,y:0,z:0};Object.values(M).forEach(Q=>{if(Q.box3)try{const R=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(w.totalRotation||0)),T=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(R),new a.Cartesian3(0,0,0)),U=a.Cartesian3.fromDegrees(w.longitude,w.latitude,w.height),V=a.Transforms.eastNorthUpToFixedFrame(U);a.Matrix4.multiply(V,T,V);const W=new a.Cartesian3(k.x,k.y,0),X=new a.Cartesian3;a.Matrix4.multiplyByPoint(V,W,X);const ee=a.Cartographic.fromCartesian(X),oe=Q.box3?.Center?.x||0,ne=Q.box3?.Center?.y||0,Y=Q.box3?.Center?.z||0,j=new a.Cartesian3(-k.x+oe,-k.y+ne,0+Y),te=a.Matrix4.fromTranslation(j),le=a.Matrix4.clone(te);a.Matrix4.multiply(T,le,le);const re=a.Cartesian3.fromDegrees(ee.longitude/Math.PI*180,ee.latitude/Math.PI*180,w.height),ce=a.Transforms.eastNorthUpToFixedFrame(re);a.Matrix4.multiply(ce,le,ce);const ve=a.Cartographic.fromCartesian(new a.Cartesian3(ce[12],ce[13],ce[14]));Q.box3.cartographic={longitude:ve.longitude/Math.PI*180,latitude:ve.latitude/Math.PI*180,height:ve.height};const Te={id:Q.uniqueId,billboard:[{theme:"Tag9999",position:[Q.box3.cartographic.longitude,Q.box3.cartographic.latitude,Q.box3.cartographic.height],options:{text:Q.name}}]};x.push(Te)}catch(R){console.warn("Error calculating component position:",R)}})})}catch(F){console.error("getAllComponents error:",F)}return P},u.getAllComponents=u.getAllComponentDetails,u.getComponentInfoList=g=>{if(!Array.isArray(g))return[];const P=E.getMapTileset(),x=[],F={};g.forEach(_=>{!_.modelId||!_.elementId||(F[_.modelId]||(F[_.modelId]=[]),F[_.modelId]?.push(_.elementId))});try{Object.keys(F).forEach(_=>{const H=P[_];if(!H||!H.leiting)return;const L=H.leiting,w=L.node,y=L.model.formData,b=L.box;if(!w||!w.nodeExtras)return;const M=w.nodeExtras.element;if(!M)return;const k=b?b.center:{x:0,y:0,z:0};F[_]?.forEach(Q=>{const R=M[Q];if(R&&R.box3)try{const T=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(y.totalRotation||0)),U=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(T),new a.Cartesian3(0,0,0)),V=a.Cartesian3.fromDegrees(y.longitude,y.latitude,y.height),W=a.Transforms.eastNorthUpToFixedFrame(V);a.Matrix4.multiply(W,U,W);const X=new a.Cartesian3(k.x,k.y,0),ee=new a.Cartesian3;a.Matrix4.multiplyByPoint(W,X,ee);const oe=a.Cartographic.fromCartesian(ee),ne=R.box3?.Center?.x||0,Y=R.box3?.Center?.y||0,j=R.box3?.Center?.z||0,te=new a.Cartesian3(-k.x+ne,-k.y+Y,0+j),le=a.Matrix4.fromTranslation(te),re=a.Matrix4.clone(le);a.Matrix4.multiply(U,re,re);const ce=a.Cartesian3.fromDegrees(oe.longitude/Math.PI*180,oe.latitude/Math.PI*180,y.height),ve=a.Transforms.eastNorthUpToFixedFrame(ce);a.Matrix4.multiply(ve,re,ve);const Te=a.Cartographic.fromCartesian(new a.Cartesian3(ve[12],ve[13],ve[14]));R.box3.cartographic={longitude:Te.longitude/Math.PI*180,latitude:Te.latitude/Math.PI*180,height:Te.height},R.elementId=Q,R.modelId=_,x.push(R)}catch(T){console.warn("Error calculating component position:",T)}})})}catch(_){console.error("getCptInfos error:",_)}return x},u.getCptInfos=u.getComponentInfoList,u.baseCompt=m.baseCompt,window.Methods=u}return console.log("methods",u),{Cesium:a,viewer:f,methods:u,menuEvents:l}}function Ms(i){return c.getCurrentScope()?(c.onScopeDispose(i),!0):!1}function Ds(i){return typeof i=="function"?i():c.unref(i)}const fy=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const py=Object.prototype.toString,gy=i=>py.call(i)==="[object Object]",my=()=>{};function Ay(i){return c.getCurrentInstance()}function sl(i,e=!0,t){Ay()?c.onMounted(i,t):e?i():c.nextTick(i)}function Bt(i){var e;const t=Ds(i);return(e=t?.$el)!=null?e:t}const mi=fy?window:void 0;function yy(...i){let e,t,n,s;if(typeof i[0]=="string"||Array.isArray(i[0])?([t,n,s]=i,e=mi):[e,t,n,s]=i,!e)return my;Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);const o=[],r=()=>{o.forEach(h=>h()),o.length=0},l=(h,p,f,u)=>(h.addEventListener(p,f,u),()=>h.removeEventListener(p,f,u)),a=c.watch(()=>[Bt(e),Ds(s)],([h,p])=>{if(r(),!h)return;const f=gy(p)?{...p}:p;o.push(...t.flatMap(u=>n.map(m=>l(h,u,m,f))))},{immediate:!0,flush:"post"}),d=()=>{a(),r()};return Ms(d),d}function Cy(){const i=c.ref(!1),e=c.getCurrentInstance();return e&&c.onMounted(()=>{i.value=!0},e),i}function ol(i){const e=Cy();return c.computed(()=>(e.value,!!i()))}function Ey(i,e={}){const{window:t=mi}=e,n=ol(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let s;const o=c.ref(!1),r=d=>{o.value=d.matches},l=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",r):s.removeListener(r))},a=c.watchEffect(()=>{n.value&&(l(),s=t.matchMedia(Ds(i)),"addEventListener"in s?s.addEventListener("change",r):s.addListener(r),o.value=s.matches)});return Ms(()=>{a(),l(),s=void 0}),o}function wy(i,e,t={}){const{window:n=mi,...s}=t;let o;const r=ol(()=>n&&"ResizeObserver"in n),l=()=>{o&&(o.disconnect(),o=void 0)},a=c.computed(()=>Array.isArray(i)?i.map(p=>Bt(p)):[Bt(i)]),d=c.watch(a,p=>{if(l(),r.value&&n){o=new ResizeObserver(e);for(const f of p)f&&o.observe(f,s)}},{immediate:!0,flush:"post"}),h=()=>{l(),d()};return Ms(h),{isSupported:r,stop:h}}function by(i,e={width:0,height:0},t={}){const{window:n=mi,box:s="content-box"}=t,o=c.computed(()=>{var p,f;return(f=(p=Bt(i))==null?void 0:p.namespaceURI)==null?void 0:f.includes("svg")}),r=c.ref(e.width),l=c.ref(e.height),{stop:a}=wy(i,([p])=>{const f=s==="border-box"?p.borderBoxSize:s==="content-box"?p.contentBoxSize:p.devicePixelContentBoxSize;if(n&&o.value){const u=Bt(i);if(u){const m=u.getBoundingClientRect();r.value=m.width,l.value=m.height}}else if(f){const u=Array.isArray(f)?f:[f];r.value=u.reduce((m,{inlineSize:E})=>m+E,0),l.value=u.reduce((m,{blockSize:E})=>m+E,0)}else r.value=p.contentRect.width,l.value=p.contentRect.height},t);sl(()=>{const p=Bt(i);p&&(r.value="offsetWidth"in p?p.offsetWidth:e.width,l.value="offsetHeight"in p?p.offsetHeight:e.height)});const d=c.watch(()=>Bt(i),p=>{r.value=p?e.width:0,l.value=p?e.height:0});function h(){a(),d()}return{width:r,height:l,stop:h}}function vy(i={}){const{window:e=mi,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:n=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:o=!0}=i,r=c.ref(t),l=c.ref(n),a=()=>{e&&(o?(r.value=e.innerWidth,l.value=e.innerHeight):(r.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight))};if(a(),sl(a),yy("resize",a,{passive:!0}),s){const d=Ey("(orientation: portrait)");c.watch(d,()=>a())}return{width:r,height:l}}const Iy={class:"title"},By={class:"actions"},xy={class:"card-body"},Sy=c.defineComponent({__name:"LeitingDraggableCard",props:{visible:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},title:{type:String,default:"Title"},initialPosition:{type:Object,default:()=>({x:0,y:0})},width:{type:[Number,String],default:300},minWidth:{type:Number,default:200},fullHeight:{type:Boolean,default:!1},align:{type:String,default:""}},emits:["update:visible","update:open","close"],setup(i,{emit:e}){const t=i,n=c.inject("leiting-theme",c.ref("dark")),s=e,o=c.computed({get:()=>t.open!==void 0?t.open:t.visible,set:D=>{s("update:visible",D),s("update:open",D)}}),r=c.ref(null),l=c.ref(t.initialPosition?.x||0),a=c.ref(t.initialPosition?.y||0),d=c.ref(t.width),h=c.ref(t.fullHeight?"100%":"600px");c.watch(()=>t.fullHeight,D=>{D?h.value="100%":h.value==="100%"&&(h.value="600px")});const{height:p}=vy();c.watch(p,()=>{t.fullHeight&&(h.value="100%")});const f=c.ref(!1),u=D=>{f.value=!0,D.preventDefault(),D.stopPropagation();const O=D.clientX,I=D.clientY,B=typeof d.value=="number"?d.value:r.value?.offsetWidth||0,g=typeof h.value=="number"?h.value:r.value?.offsetHeight||0,P=F=>{if(!f.value)return;F.preventDefault();const _=F.clientX-O,H=F.clientY-I,L=B+_,w=g+H;L>100&&(d.value=L),w>100&&(h.value=w)},x=()=>{f.value=!1,document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",x)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",x)},m=c.computed(()=>({left:`${l.value}px`,top:`${a.value}px`,width:typeof d.value=="number"?`${d.value}px`:d.value,height:typeof h.value=="number"?`${h.value}px`:h.value,position:"absolute",zIndex:2e3})),E=()=>{c.nextTick(()=>{if(r.value){const D=r.value.offsetParent||document.body,O=D.clientWidth,I=D.clientHeight,B=typeof d.value=="number"?d.value:r.value.offsetWidth||350,g=typeof h.value=="number"?h.value:r.value.offsetHeight||600;l.value+B>O&&(l.value=Math.max(0,O-B-20)),a.value+g>I&&(a.value=Math.max(0,I-g-20)),l.value<0&&(l.value=0),a.value<0&&(a.value=0)}})},A=c.ref(!1),C=D=>{if(D.target.closest(".close-btn")||D.target.closest(".actions"))return;A.value=!0,D.preventDefault(),D.stopPropagation();const O=D.clientX,I=D.clientY,B=l.value,g=a.value,P=F=>{if(!A.value)return;F.preventDefault();const _=F.clientX-O,H=F.clientY-I;l.value=B+_,a.value=g+H},x=()=>{A.value=!1,document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",x),E()};document.addEventListener("mousemove",P),document.addEventListener("mouseup",x)},v=()=>{c.nextTick(()=>{if(t.align&&r.value){const D=r.value.offsetParent||document.body,O=typeof d.value=="number"?d.value:r.value.offsetWidth||350;t.align==="right"?l.value=Math.max(0,D.clientWidth-O-20):t.align==="center"&&(l.value=Math.max(0,(D.clientWidth-O)/2))}E()})};c.onMounted(()=>{t.align?v():E()}),c.watch(o,D=>{D&&(t.align?v():E())});const S=()=>{o.value=!1,s("close")};return(D,O)=>c.withDirectives((c.openBlock(),c.createElementBlock("div",{ref_key:"cardRef",ref:r,class:c.normalizeClass(["draggable-card leiting-scroll",["leiting-theme-"+c.unref(n)]]),style:c.normalizeStyle(m.value)},[c.createElementVNode("div",{ref:"headerRef",class:"card-header",onMousedown:C},[c.createElementVNode("span",Iy,c.toDisplayString(i.title),1),c.createElementVNode("div",By,[c.renderSlot(D.$slots,"header-extra",{},void 0,!0),c.createElementVNode("span",{class:"close-btn",onClick:S},"×")])],544),c.createElementVNode("div",xy,[c.renderSlot(D.$slots,"default",{},void 0,!0)]),c.createElementVNode("div",{class:"resize-handle",onMousedown:u},[...O[0]||(O[0]=[c.createElementVNode("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"currentColor"},[c.createElementVNode("path",{d:"M10 10 L10 2 L2 10 Z"})],-1)])],32)],6)),[[c.vShow,o.value]])}}),Re=(i,e)=>{const t=i.__vccOpts||i;for(const[n,s]of e)t[n]=s;return t},ke=Re(Sy,[["__scopeId","data-v-50bf6126"]]);function Ty(i){const e=c.ref([]),t=c.ref([]),n=c.ref([]),s=c.ref(""),o=c.ref(!0);c.watch(()=>c.unref(i),p=>{if(!p||p.length===0)return;const f=[],u=(A,C)=>{A.forEach(v=>{const S=v.id||v.key||v.$id,D=v.modelId||C;D&&(v.modelId=D),S&&f.push(S),v.children&&v.children.length>0&&u(v.children,D)})};u(p);const m=new Set(n.value);let E=!1;f.forEach(A=>{m.has(A)||(m.add(A),E=!0)}),E&&(n.value=Array.from(m))},{immediate:!0,deep:!0});const r=c.computed(()=>{const p=c.unref(i);if(!p)return[];const f=[],u=(m,E)=>{m.forEach(A=>{const C=A.id||A.key||A.$id,v=A.name||A.title;f.push({key:C,title:v,parentKey:E}),A.children&&A.children.length>0&&u(A.children,C)})};return u(p),f}),l=p=>{e.value=p,o.value=!1},a=p=>{n.value=p},d=p=>{t.value=p},h=p=>r.value.find(u=>u.key===p)?.parentKey;return c.watch(s,p=>{if(!p)return;const u=r.value.filter(E=>E.title&&E.title.toLowerCase().includes(p.toLowerCase())).map(E=>E.parentKey),m=new Set;u.forEach(E=>{let A=E;for(;A;)m.add(A),A=h(A)}),e.value=[...m],o.value=!0}),{expandedKeys:e,selectedKeys:t,checkedKeys:n,searchValue:s,autoExpandParent:o,onExpand:l,onCheck:a,onSelect:d}}const My={class:"search-box"},Dy={key:0},ky={style:{color:"#f50"}},Py={key:1},Fy={key:1,class:"empty-tip"},rn=Re(c.defineComponent({__name:"LeitingTree",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"构件树"},width:{type:[Number,String],default:320},treeData:{type:Array,default:()=>[]},initialPosition:{type:Object,default:()=>({x:0,y:0})},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close","select","check"],setup(i,{emit:e}){const t=me.Input.Search,n=me.Tree,s=i,o=e,r=c.inject("leiting-theme",c.ref("dark")),l=c.inject("leitingMethods"),a=g=>{l?.value?.onSearchComponent&&l.value.onSearchComponent(g)},d=c.computed({get:()=>s.open!==void 0?s.open:s.visible,set:g=>{o("update:visible",g),o("update:open",g)}}),h=c.ref(null),{height:p}=by(h),f=c.computed(()=>p.value||300),u=c.ref({children:"children",title:"name",key:"id"}),{expandedKeys:m,selectedKeys:E,checkedKeys:A,searchValue:C,autoExpandParent:v}=Ty(c.toRef(s,"treeData")),S=g=>{m.value=g,v.value=!1},D=g=>{const P=[],x=F=>{if(!F.children||F.children.length===0){const H=F.element_Id;F.modelId&&H&&P.push({modelId:F.modelId,elementId:H})}else F.children.forEach(x)};return x(g),P},O=(g,P)=>{A.value=g,o("check",g,P);const x=[],F=new Set(g.map(H=>String(H))),_=H=>{for(let L=0;L<H.length;L++){const w=H[L];if(!w.children||w.children.length===0){if(!F.has(String(w.id))){const M=w.element_Id;w.modelId&&M&&x.push({modelId:w.modelId,elementId:M,show:!1})}}else w.children&&_(w.children)}};s.treeData&&_(s.treeData),l?.value?.setComponentVisibility&&l.value.setComponentVisibility(x),l?.value?.onTreeCheck&&l.value.onTreeCheck(g,P)},I=(g,P)=>{if(E.value=g,o("select",g,P),P.selected){const x=D(P.node);x.length>0&&l?.value?.flyToObjects&&l.value.flyToObjects({selectCpts:x})}l?.value?.onTreeSelect&&l.value.onTreeSelect(g,P)},B=()=>{o("update:visible",!1),o("close")};return(g,P)=>(c.openBlock(),c.createBlock(ke,{visible:d.value,"onUpdate:visible":P[1]||(P[1]=x=>d.value=x),title:i.title,"initial-position":i.initialPosition,"full-height":i.fullHeight,onClose:B},{default:c.withCtx(()=>[c.createElementVNode("div",{class:c.normalizeClass(["leiting-tree-container",[`theme-${c.unref(r)}`]])},[c.createElementVNode("div",My,[c.createVNode(c.unref(t),{value:c.unref(C),"onUpdate:value":P[0]||(P[0]=x=>c.isRef(C)?C.value=x:null),placeholder:"搜索构件","allow-clear":"","enter-button":"",onSearch:a},null,8,["value"])]),c.createElementVNode("div",{class:"tree-wrapper",ref_key:"treeWrapperRef",ref:h},[i.treeData&&i.treeData.length?(c.openBlock(),c.createBlock(c.unref(n),{key:0,"tree-data":i.treeData,"field-names":u.value,height:f.value,"expanded-keys":c.unref(m),"auto-expand-parent":c.unref(v),"selected-keys":c.unref(E),"checked-keys":c.unref(A),checkable:"","block-node":"",onExpand:S,onSelect:I,onCheck:O},{title:c.withCtx(({name:x,title:F})=>[(x||F)&&c.unref(C)&&(x||F).toLowerCase().indexOf(c.unref(C).toLowerCase())>-1?(c.openBlock(),c.createElementBlock("span",Dy,[c.createTextVNode(c.toDisplayString((x||F).substr(0,(x||F).toLowerCase().indexOf(c.unref(C).toLowerCase())))+" ",1),c.createElementVNode("span",ky,c.toDisplayString(c.unref(C)),1),c.createTextVNode(" "+c.toDisplayString((x||F).substr((x||F).toLowerCase().indexOf(c.unref(C).toLowerCase())+c.unref(C).length)),1)])):(c.openBlock(),c.createElementBlock("span",Py,c.toDisplayString(x||F),1))]),_:1},8,["tree-data","field-names","height","expanded-keys","auto-expand-parent","selected-keys","checked-keys"])):(c.openBlock(),c.createElementBlock("div",Fy,"暂无数据"))],512)],2)]),_:1},8,["visible","title","initial-position","full-height"]))}}),[["__scopeId","data-v-8a468895"]]),Ry="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEhSURBVDhP1ZRhkcIwEIWJAsDBOTgkgAJAAYcCQAFFAUgoDjgFh4Q7B+cAUFC+19kyS0hL+Ulm3nS6+/ZLNkkbOk9GURRDWUIIxyZraEoCWZLfmmcOLK/z14KAqGiGvq14zDMHNk/BHkAAehh/0ABtKMxUSFzPNfpFI+JnD7wDYVaxIIov41bIfxHfoROakhe0HDeQmbQfFzTxJj+zTXYg1kWrarISRFKzLNAfGsbL9iDzq/0j+kQZ/k1wm7onoKW3Hq42F0jLVK//Tcebott2fJAbVK1lvKwBNd6rRIsFsfJka0G2qdpQPy7+EPC0AumexKAzoH5FbgvSbHuUW6EOYubbfwX0cLPfFJS4K6mPNrbdHb+uvP498dhVn4v9FWo9V3RZzFxAv8L9AAAAAElFTkSuQmCC",rl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAERSURBVDhPvZTrEYIwEISTCrQD6EA7gA60AylBK1Aq0A7ECrQDoQPsADrACuLuTMJkIiHxjzezgyR7H3d5KJVSqRAigcaQUjYYX2JgZY/P/O4lEgYYFo7pgPcc2kSCBoIUzDeo0klPPEsNYlX7AKzA/M6ASrRzYoIGG5DAOCvzBvzMOxqQazSgLLI1QdAW5jWpUAPV0AVKIc7FRCuNy7RkWozJtj1BED7ANbpDXHhffFXUwUnZwRYp7qw7Rx8/lLkV9R4QD2w1A8pjW3sA4h5au+pXEBS76P8D6Ut9/nXXaiRQdnBXqBfEC+4GdzSxW5v6F7CTeHnbCVCBsWIE+RYVrdF4DSz6OwgiADDexbmT3X0A4fSDfDjUugcAAAAASUVORK5CYII=",Oy="data:image/png;base64,iVBORw0KGgoAAAANSUh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uZKrv3IwCFcNqVmoPlal7QJ9q/wZCbk7Ioo9/tehE9q1r0nIxNQbG4YEXdkVjQ5J2OZXbB88gVrgQIJNj9aaT4LboPK7J6O0Ktb1KYtc/aYxGff6h3AYY6Nvzk2GQ1WQTVj4BST70jYaqceXAAAAAElFTkSuQmCC",Ny="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADhSURBVHgBvVOBEYIwDEw9B2ADO4IjuIEjwAa6Aa7ABMAEuIIjOIFsUDao37vgxVZbBI+/+0tI0+fJBaIIrLUFaMAHmNNcsMAIE+vdJLQykQ+0wFHBrsyiT/sL2I1DDTac/+4Klzobov7WHxt29qGmaYaQnlhLCmUTa2l4C2ljvamFlEvY0xpCW/kA924GblfGWciZaJyXQvSmlOoDITSdXQBbcA8eKfy/nHDFeY470FIX8tzUIu84FmLWuTzz7yhRLPm54dKJ4+A5uoJ3HgHBUfUmxGIa4QDuKA4n3kLk9ZInw0qu5b1R1aYAAAAASUVORK5CYII=",Uy="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAADFSURBVDhPxVPBDYMwDIwnKJu0G9ANYJMyQrsBbNIRGAE2gEnSO6mpIMJxkBC1lEds52zfOeK9b51zV5wte4lIr8RWbgGQh2fGmaIHJe4EetKPtDpRcA5AvwcB7FtgCcTOH0p3YzaQNd75QBiVXJG3LRtCRyQ6Jvsekd3gTsJVoDcihZLQQjXGTRMzIzPhOCCQyNYvSuEue7Qdm02yK0u1nM2m/FQyKb8JZHH+l81Ofdpdm82tvikjThyNlbSEBvIPFj+MfwA76qSYUG3g9QAAAABJRU5ErkJggg==",_y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6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AAAAASUVORK5CYII=",Gy="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACDSURBVHgB1ZFhDYAgEIWfzgBGIIINpIEViGAkG2gEbWADjWADfMw/iDgUfji/7e3gxt3uHsDXZFrrlrFBHJNpsPAgEEmORArn3lFroEZQCjcTbAhzepPsgbuCgn8FBWvsUAMfFR5OIPGS5G80JkrG2sopHKbO1BCoHy8ZNhRUT5X4BTu6qyNSwwCiMAAAAABJRU5ErkJggg==",Hy={class:"menu-container"},Yy=["onClick","title"],Vy={class:"menu-icon"},zy=["src","alt"],Wy={key:3,style:{"font-size":"12px"}},jy={key:0,class:"sub-menu"},Ky=["onClick"],Ai=c.defineComponent({__name:"LeitingMenu",props:{visible:{type:Boolean,default:!0},activeIds:{type:Array,default:()=>[]},is2d:{type:Boolean,default:!1},customItems:{type:Array,default:()=>[]}},emits:["action"],setup(i,{emit:e}){const t=i,n=c.inject("leiting-theme",c.ref("dark")),s=c.inject("leiting-menu-size",c.ref("medium")),o=c.inject("leitingMethods",c.ref({})),r=c.computed(()=>n.value||n),l=c.computed(()=>s.value||s),a=c.ref([{ID:"home",title:"主视角",src:Ry,key:"homeView"},{ID:"tree",title:"目录树",src:rl,key:"componentTree"},{ID:"cadLayer",title:"图层",src:rl,key:"cadLayer"},{ID:"measure",title:"量算",src:Oy,key:"measurement"},{ID:"section",title:"剖切",src:Ly,key:"section"},{ID:"roam",title:"人物漫游",src:Ny,key:"roam"},{ID:"info",title:"构件信息",src:Uy,key:"componentInfo"},{ID:"cadPosition",title:"调整位置",src:_y,key:"cadPosition"},{ID:"annotation",title:"标注",src:Gy,key:"annotation"},{ID:"setting",title:"设置",src:Qy,key:"setting"}]),d=c.ref([]),h=c.ref([...t.activeIds]);c.watch(()=>t.activeIds,D=>{h.value=[...D]},{deep:!0});const p=c.computed(()=>t.visible);o.value&&o.value.menuEvents&&(o.value.menuEvents.on("setMenuListFilter",D=>{d.value=D}),o.value.menuEvents.on("setMenuActive",(D,O)=>{O?h.value.includes(D)||h.value.push(D):h.value=h.value.filter(I=>I!==D)}));const f=c.computed(()=>{let D=a.value;if(t.is2d){const O=["homeView","measurement","cadLayer","annotation"];D=D.filter(I=>I.key&&O.includes(I.key))}else{const O=["cadLayer","cadPosition","annotation"];D=D.filter(I=>!I.key||!O.includes(I.key))}if(d.value.length>0&&(D=D.filter(O=>!O.key||!d.value.includes(O.key))),t.customItems&&t.customItems.length>0){const O=t.customItems.map(I=>({...I,key:I.ID,src:I.src||I.icon}));return[...D,...O]}return D}),u=e,m=D=>{const O=["homeView"];if(D.key&&O.includes(D.key))h.value.includes(D.ID)||(h.value.push(D.ID),setTimeout(()=>{const B=h.value.indexOf(D.ID);B>-1&&h.value.splice(B,1)},1e3));else{const B=h.value.indexOf(D.ID);B>-1?h.value.splice(B,1):h.value.push(D.ID)}const I=h.value.includes(D.ID);D.func&&D.func(D),D.key&&u("action",D.key,I)},E=D=>{d.value=D},A=D=>{console.log("LeitingMenu received showMenu event:",D)},C=(D,O)=>{const I=f.value.find(B=>B.ID===D||B.key===D);if(I){const B=h.value.indexOf(I.ID);O&&B===-1?h.value.push(I.ID):!O&&B>-1&&h.value.splice(B,1)}};let v=null;const S=()=>{o.value?.menuEvents&&(v&&(v.off("setMenuListFilter",E),v.off("showMenu",A),v.off("setMenuActive",C)),v=o.value.menuEvents,v.on("setMenuListFilter",E),v.on("showMenu",A),v.on("setMenuActive",C))};return c.onMounted(()=>{S()}),c.onUnmounted(()=>{v&&(v.off("setMenuListFilter",E),v.off("showMenu",A),v.off("setMenuActive",C))}),c.watch(o,()=>{S()},{deep:!0}),(D,O)=>c.withDirectives((c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["leiting-menu-wrapper",["leiting-theme-"+r.value,"size-"+l.value]])},[c.createElementVNode("div",Hy,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(f.value,I=>(c.openBlock(),c.createElementBlock("div",{key:I.ID,class:c.normalizeClass(["menu-item",{active:h.value.includes(I.ID)}]),onClick:B=>m(I),title:I.title},[c.createElementVNode("div",Vy,[I.src?(c.openBlock(),c.createElementBlock("img",{key:0,src:I.src,alt:I.title},null,8,zy)):typeof I.icon=="object"?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(I.icon),{key:1})):typeof I.icon=="string"?(c.openBlock(),c.createElementBlock("i",{key:2,class:c.normalizeClass(["iconfont",`icon-${I.icon}`])},null,2)):(c.openBlock(),c.createElementBlock("span",Wy,c.toDisplayString(I.title.substring(0,2)),1))]),I.children&&I.children.length>0?(c.openBlock(),c.createElementBlock("div",jy,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(I.children,B=>(c.openBlock(),c.createElementBlock("div",{key:B.ID,class:c.normalizeClass(["sub-menu-item",{active:h.value.includes(B.ID)}]),onClick:c.withModifiers(g=>m(B),["stop"])},c.toDisplayString(B.title),11,Ky))),128))])):c.createCommentVNode("",!0)],10,Yy))),128))])],2)),[[c.vShow,p.value]])}}),$y={class:"leiting-section-content"},Xy={class:"section-form-item"},qy={class:"radio-group"},Jy={class:"section-form-item"},Zy={class:"switch-container"},e0={class:"switch"},t0={class:"status-text"},i0={class:"section-form-item slider-item"},n0={class:"slider-wrapper"},s0={class:"section-form-item slider-item"},o0={class:"slider-wrapper"},r0={class:"section-form-item slider-item"},a0={class:"slider-wrapper"},l0={class:"section-form-item table-item"},c0={class:"model-table-container"},d0={class:"model-table"},h0={width:"40"},u0=["checked"],f0=["onClick"],p0=["value"],g0={class:"model-name"},yi=Re(c.defineComponent({__name:"LeitingSection",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"剖切控制"},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close"],setup(i,{emit:e}){const t=i,n=e,s=c.inject("leitingMethods"),o=c.computed({get:()=>t.open!==void 0?t.open:t.visible,set:L=>{n("update:visible",L),n("update:open",L)}}),r=c.ref("Box"),l=c.ref(!1),a=c.ref([]),d=c.ref([]),h=c.computed(()=>d.value.length===0?!1:d.value.every(L=>a.value.includes(L.modelId))),p=L=>{L.target.checked?a.value=d.value.map(y=>y.modelId):a.value=[],P()},f=c.ref([-10,10]),u=c.ref([-10,10]),m=c.ref([-10,10]),E=c.ref([-100,100]),A=c.ref([-100,100]),C=c.ref([-100,100]);let v=!1;const S=L=>{v=!0;const{targetZPlus:w,targetZMinus:y,targetXPlus:b,targetXMinus:M,targetYPlus:k,targetYMinus:Q}=L;m.value=[-y,w],f.value=[-M,b],u.value=[-Q,k],setTimeout(()=>{v=!1},100)},D=()=>{v||a.value.length===0||!s?.value?.updateSectionRange||s.value.updateSectionRange({targetZPlus:m.value[1],targetZMinus:-m.value[0],targetXPlus:f.value[1],targetXMinus:-f.value[0],targetYPlus:u.value[1],targetYMinus:-u.value[0]})},O=()=>{s?.value?.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)},I=L=>{if(!s?.value?.getMapTileset||!s?.value?.openSection)return;const y=s.value.getMapTileset()[L];if(y&&y.leiting?.box){const{min:b,max:M}=y.leiting.box,k=(M.x-b.x)/2,Q=(M.y-b.y)/2,R=(M.z-b.z)/2;a.value.length<=1&&(E.value=[-k*2,k*2],A.value=[-Q*2,Q*2],C.value=[-R*2,R*2],f.value=[-k,k],u.value=[-Q,Q],m.value=[-R,R],s.value.updateSectionRange&&s.value.updateSectionRange({targetZPlus:R,targetZMinus:R,targetXPlus:k,targetXMinus:k,targetYPlus:Q,targetYMinus:Q})),s.value.openSection(L,{moveCallBack:S}),s.value.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)}},B=L=>{const w=a.value.indexOf(L);w>-1?a.value.splice(w,1):a.value.push(L),P()};let g=[];const P=()=>{const L=a.value.filter(y=>!g.includes(y)),w=g.filter(y=>!a.value.includes(y));L.forEach(y=>I(y)),w.forEach(y=>{s?.value?.closeSection&&s.value.closeSection(y)}),g=[...a.value]},x=()=>{},F=()=>{o.value=!1,n("close")},_=()=>{l.value=!1,a.value=[],g=[],f.value=[-10,10],u.value=[-10,10],m.value=[-10,10],E.value=[-100,100],A.value=[-100,100],C.value=[-100,100]};c.watch(()=>t.visible,L=>{L?H():(s?.value?.closeSection&&s.value.closeSection(),_())});const H=()=>{s?.value&&typeof s.value.getModelList=="function"&&(d.value=s.value.getModelList()||[],d.value.length>0&&a.value.length===0&&(a.value=[d.value[0].modelId],g=[...a.value]),t.visible&&a.value.length>0&&(l.value=!0,a.value.forEach(L=>I(L))))};return c.watch(()=>s?.value,()=>{H()},{immediate:!0,deep:!0}),c.onMounted(()=>{H()}),(L,w)=>(c.openBlock(),c.createBlock(ke,{visible:o.value,title:"剖切分析","full-height":i.fullHeight,"onUpdate:visible":F},{default:c.withCtx(()=>[c.createElementVNode("div",$y,[c.createElementVNode("div",Xy,[w[8]||(w[8]=c.createElementVNode("span",{class:"label"},"模式",-1)),c.createElementVNode("div",qy,[c.createElementVNode("label",{class:c.normalizeClass(["radio-item",{active:r.value==="Box"}])},[c.withDirectives(c.createElementVNode("input",{type:"radio",value:"Box","onUpdate:modelValue":w[0]||(w[0]=y=>r.value=y),onChange:x},null,544),[[c.vModelRadio,r.value]]),w[7]||(w[7]=c.createTextVNode(" 剖切盒 ",-1))],2)])]),c.createElementVNode("div",Jy,[w[10]||(w[10]=c.createElementVNode("span",{class:"label"},"显示",-1)),c.createElementVNode("div",Zy,[c.createElementVNode("label",e0,[c.withDirectives(c.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":w[1]||(w[1]=y=>l.value=y),onChange:O},null,544),[[c.vModelCheckbox,l.value]]),w[9]||(w[9]=c.createElementVNode("span",{class:"slider round"},null,-1))]),c.createElementVNode("span",t0,c.toDisplayString(l.value?"显示":"隐藏"),1)])]),c.createElementVNode("div",i0,[w[11]||(w[11]=c.createElementVNode("span",{class:"label"},"X 轴",-1)),c.createElementVNode("div",n0,[c.createVNode(c.unref(me.Slider),{value:f.value,"onUpdate:value":w[2]||(w[2]=y=>f.value=y),range:"",min:E.value[0],max:E.value[1],step:.1,onChange:D},null,8,["value","min","max"])])]),c.createElementVNode("div",s0,[w[12]||(w[12]=c.createElementVNode("span",{class:"label"},"Y 轴",-1)),c.createElementVNode("div",o0,[c.createVNode(c.unref(me.Slider),{value:u.value,"onUpdate:value":w[3]||(w[3]=y=>u.value=y),range:"",min:A.value[0],max:A.value[1],step:.1,onChange:D},null,8,["value","min","max"])])]),c.createElementVNode("div",r0,[w[13]||(w[13]=c.createElementVNode("span",{class:"label"},"Z 轴",-1)),c.createElementVNode("div",a0,[c.createVNode(c.unref(me.Slider),{value:m.value,"onUpdate:value":w[4]||(w[4]=y=>m.value=y),range:"",min:C.value[0],max:C.value[1],step:.1,onChange:D},null,8,["value","min","max"])])]),c.createElementVNode("div",l0,[w[15]||(w[15]=c.createElementVNode("span",{class:"label"},"模型",-1)),c.createElementVNode("div",c0,[c.createElementVNode("table",d0,[c.createElementVNode("thead",null,[c.createElementVNode("tr",null,[c.createElementVNode("th",h0,[c.createElementVNode("input",{type:"checkbox",checked:h.value,onChange:p},null,40,u0)]),w[14]||(w[14]=c.createElementVNode("th",null,"名称",-1))])]),c.createElementVNode("tbody",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(d.value,y=>(c.openBlock(),c.createElementBlock("tr",{key:y.modelId,class:c.normalizeClass({selected:a.value.includes(y.modelId)}),onClick:b=>B(y.modelId)},[c.createElementVNode("td",null,[c.withDirectives(c.createElementVNode("input",{type:"checkbox",value:y.modelId,"onUpdate:modelValue":w[5]||(w[5]=b=>a.value=b),onClick:w[6]||(w[6]=c.withModifiers(()=>{},["stop"])),onChange:P},null,40,p0),[[c.vModelCheckbox,a.value]])]),c.createElementVNode("td",g0,c.toDisplayString(y.modelName),1)],10,f0))),128))])])])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-ee4d9a12"]]),m0={class:"leiting-player-content"},A0={class:"player-form-item"},y0={class:"switch-container"},C0={class:"switch"},E0={class:"status-text"},w0={class:"player-form-item"},b0={class:"switch-container"},v0={class:"switch"},I0={class:"status-text"},B0={class:"player-form-item"},x0={class:"switch-container"},S0={class:"switch"},T0={class:"status-text"},M0={class:"player-form-item slider-item"},D0={class:"slider-wrapper"},k0={class:"value-text"},P0={class:"instructions"},F0={class:"key-map"},R0={class:"key-row"},O0={class:"key-row"},L0={class:"key-row"},N0={class:"key-row"},U0={class:"key-row"},_0={class:"key-row"},Ci=Re(c.defineComponent({__name:"LeitingPlayer",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"漫游控制"},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close"],setup(i,{emit:e}){const t=i,n=e,s=c.inject("leitingMethods"),o=c.ref(!1),r=c.ref(!1),l=c.ref(!0),a=c.ref(5),d=c.computed({get:()=>t.open!==void 0?t.open:t.visible,set:I=>{n("update:visible",I),n("update:open",I)}}),h=c.ref(null),p=c.ref(null),f=c.ref(null),u=c.ref(null),m=c.ref(null),E=c.ref(null),A=()=>{o.value?v():S()},C=()=>{s?.value?.setPlayerParams&&s.value.setPlayerParams({gravityTest:r.value,collisionTest:l.value})},v=async()=>{s?.value?.openPlayer&&(await s.value.openPlayer(),s.value.setPlayerSpeed&&s.value.setPlayerSpeed(a.value),C(),s.value.bindPlayerUiKeys&&(await c.nextTick(),s.value.bindPlayerUiKeys({moveFront:h.value,moveBack:p.value,moveLeft:f.value,moveRight:u.value,moveUp:m.value,moveDown:E.value})))},S=()=>{s?.value?.closePlayer&&s.value.closePlayer()},D=()=>{s?.value?.setPlayerSpeed&&s.value.setPlayerSpeed(a.value)},O=()=>{d.value=!1,n("close")};return c.watch(()=>t.visible,I=>{I?(o.value=!0,s?.value?v():setTimeout(()=>{s?.value&&v()},100)):o.value&&(o.value=!1,S())},{immediate:!0}),(I,B)=>(c.openBlock(),c.createBlock(ke,{title:i.title,visible:d.value,"full-height":i.fullHeight,"onUpdate:visible":O},{default:c.withCtx(()=>[c.createElementVNode("div",m0,[c.createElementVNode("div",A0,[B[5]||(B[5]=c.createElementVNode("span",{class:"label"},"启用",-1)),c.createElementVNode("div",y0,[c.createElementVNode("label",C0,[c.withDirectives(c.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":B[0]||(B[0]=g=>o.value=g),onChange:A},null,544),[[c.vModelCheckbox,o.value]]),B[4]||(B[4]=c.createElementVNode("span",{class:"slider round"},null,-1))]),c.createElementVNode("span",E0,c.toDisplayString(o.value?"开启":"关闭"),1)])]),c.createElementVNode("div",w0,[B[7]||(B[7]=c.createElementVNode("span",{class:"label"},"重力",-1)),c.createElementVNode("div",b0,[c.createElementVNode("label",v0,[c.withDirectives(c.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":B[1]||(B[1]=g=>r.value=g),onChange:C},null,544),[[c.vModelCheckbox,r.value]]),B[6]||(B[6]=c.createElementVNode("span",{class:"slider round"},null,-1))]),c.createElementVNode("span",I0,c.toDisplayString(r.value?"开启":"关闭"),1)])]),c.createElementVNode("div",B0,[B[9]||(B[9]=c.createElementVNode("span",{class:"label"},"碰撞",-1)),c.createElementVNode("div",x0,[c.createElementVNode("label",S0,[c.withDirectives(c.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":B[2]||(B[2]=g=>l.value=g),onChange:C},null,544),[[c.vModelCheckbox,l.value]]),B[8]||(B[8]=c.createElementVNode("span",{class:"slider round"},null,-1))]),c.createElementVNode("span",T0,c.toDisplayString(l.value?"开启":"关闭"),1)])]),c.createElementVNode("div",M0,[B[10]||(B[10]=c.createElementVNode("span",{class:"label"},"速度",-1)),c.createElementVNode("div",D0,[c.createVNode(c.unref(me.Slider),{value:a.value,"onUpdate:value":B[3]||(B[3]=g=>a.value=g),min:1,max:10,step:1,onChange:D},null,8,["value"])]),c.createElementVNode("span",k0,c.toDisplayString(a.value),1)]),B[19]||(B[19]=c.createElementVNode("div",{class:"divider"},null,-1)),c.createElementVNode("div",P0,[B[18]||(B[18]=c.createElementVNode("div",{class:"instruction-title"},"操作说明",-1)),c.createElementVNode("div",F0,[c.createElementVNode("div",R0,[c.createElementVNode("span",{class:"key",ref_key:"btnFront",ref:h},"W",512),B[11]||(B[11]=c.createTextVNode(" 前进 ",-1))]),c.createElementVNode("div",O0,[c.createElementVNode("span",{class:"key",ref_key:"btnBack",ref:p},"S",512),B[12]||(B[12]=c.createTextVNode(" 后退 ",-1))]),c.createElementVNode("div",L0,[c.createElementVNode("span",{class:"key",ref_key:"btnLeft",ref:f},"A",512),B[13]||(B[13]=c.createTextVNode(" 左移 ",-1))]),c.createElementVNode("div",N0,[c.createElementVNode("span",{class:"key",ref_key:"btnRight",ref:u},"D",512),B[14]||(B[14]=c.createTextVNode(" 右移 ",-1))]),c.createElementVNode("div",U0,[c.createElementVNode("span",{class:"key",ref_key:"btnUp",ref:m},"Q",512),B[15]||(B[15]=c.createTextVNode(" 上升 ",-1))]),c.createElementVNode("div",_0,[c.createElementVNode("span",{class:"key",ref_key:"btnDown",ref:E},"E",512),B[16]||(B[16]=c.createTextVNode(" 下降 ",-1))]),B[17]||(B[17]=c.createElementVNode("div",{class:"key-row"},[c.createElementVNode("span",{class:"mouse-icon"},"🖱️"),c.createTextVNode(" 按住左键拖拽旋转视角 ")],-1))])])])]),_:1},8,["title","visible","full-height"]))}}),[["__scopeId","data-v-ff3f266e"]]),Q0={class:"info-content"},G0={key:0,class:"component-title"},Ei=Re(c.defineComponent({__name:"LeitingInfo",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close"],setup(i,{emit:e}){const t=i,n=e,s=c.inject("leitingMethods"),o=c.ref([]),r=c.ref(!1),l=c.ref([]),a=c.ref([]),d=c.ref(0),h=c.computed({get:()=>t.open!==void 0?t.open:t.visible,set:C=>{n("update:visible",C),n("update:open",C)}}),p=()=>{h.value=!1},f=C=>({elementID:"构件ID",elementName:"构件名",categoryName:"类别",familySymbolName:"族类型",levelName:"标高",modelName:"文件名",length:"长",width:"宽",height:"高"})[C]||C,u=["elementName","elementID","modelName","length","width","height","levelName","categoryName","familySymbolName"],m=async C=>{const v=++d.value;if(a.value=C,!C||C.length===0){o.value=[];return}if(!h.value)return;let S=C;C.length>10&&(pe.warning(`选中构件数量过多(${C.length}个),仅显示前10个`),S=C.slice(0,10));const D=s?.value;let O=D?.getMapTileset?D.getMapTileset():{};r.value=!0;const I=[],B={};if(S.forEach(x=>{const _=O[x.modelId]?.leiting?.model?.dbName;_&&x.elementId&&I.push({dbName:_,elementId:x.elementId,modelId:x.modelId})}),I.length>0){try{const x=I.map(_=>({dbName:_.dbName,elementId:_.elementId})),F=await sp(x);F&&Array.isArray(F)&&F.forEach(_=>{const H=I.find(L=>L.dbName===_.dbName&&L.elementId===_.elementId);if(H){const L=`${H.modelId}_${_.elementId}`;B[L]=_}})}catch(x){console.warn("API fetch component details failed, falling back to local data",x)}console.log("123")}const g=new Set;if(S.forEach(x=>{const F=O[x.modelId],_=`${x.modelId}_${x.elementId}`;B[_]||F&&F.leiting&&!F.leiting?.node?.nodeExtras&&F.leiting.model?.nodeUrl&&g.add(x.modelId)}),g.size>0&&D?.loadNodeDetailsForModel)try{const x=Array.from(g).map(F=>D.loadNodeDetailsForModel(F));await Promise.all(x)}catch(x){console.error("Failed to load node details",x)}if(v!==d.value)return;O=D?.getMapTileset?D.getMapTileset():{};const P=[];S.forEach((x,F)=>{const H=O[x.modelId]?.leiting||{},L=B[`${x.modelId}_${x.elementId}`];let w={modelName:H.model?.modelId||x.modelId};w.elementID||(w.elementID=x.elementId);let y=null;if(L)y=L;else{const k=H.node?.nodeExtras?.element||H.node?.nodeExtras;if(k){const Q=w.elementID;k[Q]&&(y=k[Q])}}y&&y.box3&&(w.length=`${y.box3.length?.toFixed(2)||0}米`,w.width=`${y.box3.width?.toFixed(2)||0}米`,w.height=`${y.box3.height?.toFixed(2)||0}米`);const b=[];y&&(y.name&&(w.elementName=y.name),y.categoryName&&(w.categoryName=y.categoryName),y.familySymbolName&&(w.familySymbolName=y.familySymbolName),y.levelName&&(w.levelName=y.levelName));const M={};if(u.forEach(k=>{w[k]!==void 0&&(M[k]=w[k])}),b.push({name:"基础信息",params:M}),y){const k=Array.isArray(y)?y:Array.isArray(y?.parameters)?y.parameters:null;if(k){if(k.flat().forEach(R=>{if(R&&R.GroupName&&Array.isArray(R.Parameters)){const T={};R.Parameters.forEach(U=>{U.name&&(T[U.name]=U.value??"")}),Object.keys(T).length>0&&b.push({name:R.GroupName,params:T})}}),!Array.isArray(y)){const{parameters:R,...T}=y,U={};Object.keys(T).forEach(V=>{!u.includes(V)&&V!=="uniqueId"&&typeof T[V]!="object"&&(U[V]=T[V])}),Object.keys(U).length>0&&b.push({name:"其他属性",params:U})}}else{let Q=!1;if(Object.keys(y).forEach(R=>{y[R]&&typeof y[R]=="object"&&!Array.isArray(y[R])&&(Q=!0,b.push({name:R,params:y[R]}))}),!Q){const R={};Object.keys(y).forEach(T=>{if(!u.includes(T)&&T!=="batchId"){const U=y[T];typeof U=="string"&&U.length>500?R[T]=U.substring(0,500)+"...":R[T]=U}}),Object.keys(R).length>0&&b.push({name:"属性",params:R})}}}P.push({id:F,title:`${w.modelName}${w.elementName?` - ${w.elementName}`:""}`,groups:b})}),o.value=P,v===d.value&&(r.value=!1),P.length>0?l.value=[`${P[0].id}-基础信息`]:l.value=[]};let E=!1;const A=()=>{if(E)return;const C=s?.value;C&&C.selectionChange&&(C.selectionChange(m),E=!0)};return c.watch(()=>s?.value,()=>{A()},{deep:!0,immediate:!0}),c.watch(h,C=>{C&&a.value.length>0&&m(a.value)}),c.onMounted(()=>{A()}),(C,v)=>(c.openBlock(),c.createBlock(ke,{visible:h.value,title:"构件详情",width:350,align:"right","initial-position":{x:0,y:0},"full-height":i.fullHeight,onClose:p,"onUpdate:visible":v[1]||(v[1]=S=>h.value=S),class:"base-info-card"},{default:c.withCtx(()=>[c.createElementVNode("div",Q0,[c.createVNode(c.unref(me.Spin),{spinning:r.value},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,S=>(c.openBlock(),c.createElementBlock("div",{key:S.id,class:"component-block"},[o.value.length>1?(c.openBlock(),c.createElementBlock("div",G0,c.toDisplayString(S.title),1)):c.createCommentVNode("",!0),c.createVNode(c.unref(me.Collapse),{activeKey:l.value,"onUpdate:activeKey":v[0]||(v[0]=D=>l.value=D),ghost:"","expand-icon-position":"end"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(S.groups,D=>(c.openBlock(),c.createBlock(c.unref(me.CollapsePanel),{key:`${S.id}-${D.name}`,header:D.name},{default:c.withCtx(()=>[c.createVNode(c.unref(me.Descriptions),{size:"small",bordered:"",column:1,labelStyle:{width:"100px",background:"rgba(255,255,255,0.05)",color:"#aaa"},contentStyle:{color:"#fff"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(D.params,(O,I)=>(c.openBlock(),c.createBlock(c.unref(me.DescriptionsItem),{key:I,label:f(String(I))},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(O),1)]),_:2},1032,["label"]))),128))]),_:2},1024)]),_:2},1032,["header"]))),128))]),_:2},1032,["activeKey"])]))),128))]),_:1},8,["spinning"])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-cd881bde"]]);class al{viewer;Cesium;pickHandler=null;bimEntityId="";mapEntityId="";constructor(e,t){this.viewer=e,this.Cesium=t}removeMarker(e){if(!this.viewer)return;const t=e==="BIM"?this.bimEntityId:this.mapEntityId;t&&(this.viewer.entities.removeById(t),e==="BIM"?this.bimEntityId="":this.mapEntityId="")}clearMarkers(){this.removeMarker("BIM"),this.removeMarker("MAP")}addMarker(e,t){if(!this.viewer||!this.Cesium)return;this.removeMarker(e);const n=`adjust-marker-${e}-${Date.now()}`;e==="BIM"?this.bimEntityId=n:this.mapEntityId=n,this.viewer.entities.add({id:n,position:this.Cesium.Cartesian3.fromDegrees(t.longitude,t.latitude,t.height),point:{pixelSize:10,color:e==="BIM"?this.Cesium.Color.RED:this.Cesium.Color.ORANGE,outlineColor:this.Cesium.Color.WHITE,outlineWidth:2,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:`${e==="BIM"?"BIM":"地图"}标记点`,font:"14pt sans-serif",style:this.Cesium.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:this.Cesium.VerticalOrigin.BOTTOM,pixelOffset:new this.Cesium.Cartesian2(0,-10),fillColor:this.Cesium.Color.WHITE,outlineColor:this.Cesium.Color.BLACK,backgroundColor:new this.Cesium.Color(.1,.1,.1,.8),showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}})}registerPickHandler(e){this.destroyPickHandler(),!(!this.Cesium||!this.viewer)&&(this.pickHandler=new this.Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.pickHandler.setInputAction(t=>{let n;try{n=this.viewer.scene.pickPosition(t.position)}catch(s){console.warn("pickPosition failed:",s)}if(!n){const s=this.viewer.camera.getPickRay(t.position);n=this.viewer.scene.globe.pick(s,this.viewer.scene)}if(n||(n=this.viewer.camera.pickEllipsoid(t.position,this.viewer.scene.globe.ellipsoid)),n){const s=this.Cesium.Cartographic.fromCartesian(n),o=this.Cesium.Math.toDegrees(s.longitude),r=this.Cesium.Math.toDegrees(s.latitude),l=s.height;e({longitude:o,latitude:r,height:l})}},this.Cesium.ScreenSpaceEventType.LEFT_CLICK,this.Cesium.KeyboardEventModifier.SHIFT))}destroyPickHandler(){this.pickHandler&&(this.pickHandler.destroy(),this.pickHandler=null)}calculateOffset(e,t){return{dLon:t.longitude-e.longitude,dLat:t.latitude-e.latitude,dHeight:t.height-e.height}}}const H0={class:"adjust-panel"},Y0={class:"control-panel"},V0={class:"form-item"},z0={class:"radio-group"},W0={class:"form-item"},j0={class:"radio-group"},K0={class:"form-item"},$0={class:"value"},X0={class:"param-row"},q0={class:"param-row"},J0={class:"param-row"},Z0={class:"param-row"},eC={class:"param-row"},tC={class:"param-row"},iC={class:"param-row"},nC={class:"button-grid"},sC={key:1,class:"pick-mode-ui"},oC={class:"form-item",style:{display:"block","margin-bottom":"15px"}},rC={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},aC=["checked"],lC={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},cC={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},dC={class:"form-item",style:{display:"block","margin-bottom":"15px"}},hC={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},uC=["checked"],fC={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},pC={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},gC={class:"list-panel"},mC={class:"list-header"},AC={class:"col-check"},yC=["checked"],CC={class:"list-body"},EC={class:"col-check"},wC=["onUpdate:modelValue"],bC={class:"col-index"},vC=["title"],IC={class:"col-main"},BC=["checked","onChange"],wi=Re(c.defineComponent({__name:"LeitingPosition",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close","save"],setup(i,{expose:e,emit:t}){const n=i,s=t,o=c.computed({get:()=>n.open!==void 0?n.open:n.visible,set:R=>{s("update:visible",R),s("update:open",R)}}),r=c.inject("leitingMethods"),l=c.ref("BIM"),a=c.ref("param"),d=c.ref(""),h=c.ref([]),p=c.ref("BIM"),f=c.ref(null),u=c.ref(null),m=c.ref(null),E=()=>(!m.value&&r?.value?.getViewer&&r?.value?.getCesium&&(m.value=new al(r.value.getViewer(),r.value.getCesium())),m.value),A=()=>{E()?.clearMarkers(),f.value=null,u.value=null},C=(R,T)=>{R==="BIM"?f.value=T:u.value=T,E()?.addMarker(R,T),pe.success(`${R==="BIM"?"BIM":"地图"}标记点已添加`)},v=()=>{E()?.registerPickHandler(R=>{C(p.value,R)})},S=()=>{E()?.destroyPickHandler()},D=()=>{if(!f.value||!u.value){pe.warning("请先选择BIM标记点和地图标记点");return}if(!d.value){pe.warning("请先选择主模型");return}const R=E();let T=0,U=0,V=0;if(R){const{dLon:W,dLat:X,dHeight:ee}=R.calculateOffset(f.value,u.value);T=W,U=X,V=ee}else T=u.value.longitude-f.value.longitude,U=u.value.latitude-f.value.latitude,V=u.value.height-f.value.height;I.value.longitude+=T,I.value.latitude+=U,I.value.height+=V,y(d.value,{longitude:I.value.longitude,latitude:I.value.latitude,height:I.value.height}),pe.success("位置已调整")};c.watch(()=>a.value,R=>{R==="pick"?v():S()}),e({addMarker:C,setModelType:R=>{(R==="BIM"||R==="OSGB")&&(l.value=R)}});const I=c.ref({longitude:0,latitude:0,lonlat:1e-6,heightDistance:1,rotation:30,totalRotation:0,height:0,X:0,Y:0,Z:0}),B=c.computed(()=>{const R=h.value.find(T=>T.modelId===d.value);return R?R.modelName:""}),g=c.computed(()=>x.value.length>0&&x.value.every(R=>R.selected)),P=()=>{o.value=!1,s("close")},x=c.computed(()=>h.value.filter(R=>R.type===l.value)),F=R=>{const T=R.target.checked;x.value.forEach(U=>U.selected=T)},_=()=>{if(!r?.value)return;const R=r.value,T=R.getMapTileset?R.getMapTileset():{},U=[];if(Object.keys(T).forEach(V=>{const X=T[V].leiting||{};X.model&&U.push({modelId:X.model.modelId,modelName:X.model.modelName,selected:!1,formData:X.model.formData||{},dbName:X.model.dbName,url:X.model.url,type:X.model.type||"BIM"})}),h.value=U,U.length>0){const V=R.getBIMmodelId?R.getBIMmodelId():"";V&&U.find(W=>W.modelId===V)?L(V):L(U[0].modelId),U.forEach(W=>W.selected=!0)}},H=()=>{pe.info("拖动右下角标,可显示模型列表",void 0,2)},L=R=>{d.value=R;const T=h.value.find(U=>U.modelId===R);T&&T.formData&&Object.keys(I.value).forEach(U=>{T.formData[U]!==void 0&&(I.value[U]=T.formData[U])})},w=R=>r?.value?.getMapTileset?r.value.getMapTileset()[R]:null,y=(R,T)=>{const U=w(R),V=r.value.getCesium();if(U&&V){if(U.leiting?.model){U.leiting.model.formData={...U.leiting.model.formData,...T};const W=h.value.find(X=>X.modelId===R);W&&(W.formData=U.leiting.model.formData)}Rn({Cesium:V,tileset:U})}},b=R=>{if(!d.value)return;const U=h.value.find(X=>X.modelId===d.value)?.formData?.[R]??0,V=I.value[R],W=V-U;y(d.value,{[R]:V}),W!==0&&x.value.filter(ee=>ee.selected&&ee.modelId!==d.value).forEach(ee=>{const ne=(ee.formData?.[R]??0)+W;y(ee.modelId,{[R]:ne})})},M=R=>{const T=x.value.filter(X=>X.selected);if(T.length===0){pe.warning("请先选择要调整的模型");return}const{lonlat:U,heightDistance:V,rotation:W}=I.value;T.forEach(X=>{const ee={...X.formData};switch(R){case"north":ee.latitude+=U;break;case"south":ee.latitude-=U;break;case"east":ee.longitude+=U;break;case"west":ee.longitude-=U;break;case"up":ee.height+=V;break;case"down":ee.height-=V;break;case"rotateLeft":ee.totalRotation=(ee.totalRotation||0)+W;break;case"rotateRight":ee.totalRotation=(ee.totalRotation||0)-W;break}X.modelId===d.value&&(ee.lonlat=U,ee.heightDistance=V,ee.rotation=W,Object.assign(I.value,ee)),y(X.modelId,ee)})},k=()=>{if(!d.value){pe.warning("请先选择主模型");return}const R=w(d.value);if(!R||!r?.value?.getViewer)return;const T=r.value.getViewer(),U=r.value.getCesium(),V=R.boundingSphere;T.camera.flyToBoundingSphere(V,{offset:new U.HeadingPitchRange(0,U.Math.toRadians(-90),V.radius*2),duration:1.5})},Q=()=>{r?.value?.saveRegion?(r.value.saveRegion(h.value),s("save",c.unref(h))):(console.log("Save models:",h.value),pe.warning("未找到保存接口,数据已打印控制台"))};return c.watch(()=>n.visible,R=>{R?(_(),H(),a.value==="pick"&&v()):(S(),A())}),c.onMounted(()=>{n.visible&&(_(),H(),a.value==="pick"&&v())}),(R,T)=>(c.openBlock(),c.createBlock(ke,{visible:o.value,title:"调整位置(调整前可选择正北俯视)","full-height":i.fullHeight,width:274,"onUpdate:visible":T[25]||(T[25]=U=>o.value=U),onClose:P,onSave:Q},{default:c.withCtx(()=>[c.createElementVNode("div",H0,[c.createElementVNode("div",Y0,[c.createElementVNode("div",V0,[T[26]||(T[26]=c.createElementVNode("label",null,"模型类型:",-1)),c.createElementVNode("div",z0,[c.createElementVNode("span",{class:c.normalizeClass({active:l.value==="BIM"}),onClick:T[0]||(T[0]=U=>l.value="BIM")},"BIM模型",2),c.createElementVNode("span",{class:c.normalizeClass({active:l.value==="OSGB"}),onClick:T[1]||(T[1]=U=>l.value="OSGB")},"倾斜摄影",2)])]),c.createElementVNode("div",W0,[T[27]||(T[27]=c.createElementVNode("label",null,"调整操作:",-1)),c.createElementVNode("div",j0,[c.createElementVNode("span",{class:c.normalizeClass({active:a.value==="param"}),onClick:T[2]||(T[2]=U=>a.value="param")},"参数模式",2),c.createElementVNode("span",{class:c.normalizeClass({active:a.value==="pick"}),onClick:T[3]||(T[3]=U=>a.value="pick")},"地图点选",2)])]),c.createElementVNode("div",K0,[T[28]||(T[28]=c.createElementVNode("label",null,"当前主模型:",-1)),c.createElementVNode("span",$0,c.toDisplayString(B.value||"未选择"),1)]),T[42]||(T[42]=c.createElementVNode("div",{class:"separator"},null,-1)),a.value==="param"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[T[36]||(T[36]=c.createElementVNode("div",{class:"group-header"},"当前状态",-1)),c.createElementVNode("div",X0,[T[29]||(T[29]=c.createElementVNode("label",null,"经度(东西):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[4]||(T[4]=U=>I.value.longitude=U),onChange:T[5]||(T[5]=U=>b("longitude")),step:"0.000001"},null,544),[[c.vModelText,I.value.longitude,void 0,{number:!0}]])]),c.createElementVNode("div",q0,[T[30]||(T[30]=c.createElementVNode("label",null,"纬度(南北):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[6]||(T[6]=U=>I.value.latitude=U),onChange:T[7]||(T[7]=U=>b("latitude")),step:"0.000001"},null,544),[[c.vModelText,I.value.latitude,void 0,{number:!0}]])]),c.createElementVNode("div",J0,[T[31]||(T[31]=c.createElementVNode("label",null,"高度(m):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[8]||(T[8]=U=>I.value.height=U),onChange:T[9]||(T[9]=U=>b("height")),step:"0.1"},null,544),[[c.vModelText,I.value.height,void 0,{number:!0}]])]),c.createElementVNode("div",Z0,[T[32]||(T[32]=c.createElementVNode("label",null,"累计旋转(°):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[10]||(T[10]=U=>I.value.totalRotation=U),onChange:T[11]||(T[11]=U=>b("totalRotation")),step:"1"},null,544),[[c.vModelText,I.value.totalRotation,void 0,{number:!0}]])]),T[37]||(T[37]=c.createElementVNode("div",{class:"separator"},null,-1)),T[38]||(T[38]=c.createElementVNode("div",{class:"group-header"},"调整步长",-1)),c.createElementVNode("div",eC,[T[33]||(T[33]=c.createElementVNode("label",null,"经纬步长(°):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[12]||(T[12]=U=>I.value.lonlat=U),step:"0.000001"},null,512),[[c.vModelText,I.value.lonlat,void 0,{number:!0}]])]),c.createElementVNode("div",tC,[T[34]||(T[34]=c.createElementVNode("label",null,"高度步长(m):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[13]||(T[13]=U=>I.value.heightDistance=U),step:"0.1"},null,512),[[c.vModelText,I.value.heightDistance,void 0,{number:!0}]])]),c.createElementVNode("div",iC,[T[35]||(T[35]=c.createElementVNode("label",null,"旋转步长(°):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[14]||(T[14]=U=>I.value.rotation=U),step:"1"},null,512),[[c.vModelText,I.value.rotation,void 0,{number:!0}]])]),c.createElementVNode("div",nC,[c.createElementVNode("button",{onClick:T[15]||(T[15]=U=>M("rotateLeft"))},"左转"),c.createElementVNode("button",{onClick:T[16]||(T[16]=U=>M("north"))},"北移"),c.createElementVNode("button",{onClick:T[17]||(T[17]=U=>M("rotateRight"))},"右转"),c.createElementVNode("button",{onClick:T[18]||(T[18]=U=>M("west"))},"西移"),c.createElementVNode("button",{onClick:T[19]||(T[19]=U=>M("south"))},"南移"),c.createElementVNode("button",{onClick:T[20]||(T[20]=U=>M("east"))},"东移"),c.createElementVNode("button",{onClick:T[21]||(T[21]=U=>M("up"))},"上移"),c.createElementVNode("button",{onClick:T[22]||(T[22]=U=>M("down"))},"下移"),c.createElementVNode("button",{onClick:k,class:"primary-btn"},"正北俯视"),c.createElementVNode("button",{onClick:Q,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):a.value==="pick"?(c.openBlock(),c.createElementBlock("div",sC,[c.createElementVNode("div",oC,[c.createElementVNode("div",rC,[c.createElementVNode("div",{onClick:T[23]||(T[23]=U=>p.value="BIM"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[c.createElementVNode("input",{type:"radio",checked:p.value==="BIM",style:{"margin-right":"5px"}},null,8,aC),T[39]||(T[39]=c.createElementVNode("span",{style:{"font-weight":"bold"}},"BIM标记点:",-1))]),f.value?(c.openBlock(),c.createElementBlock("div",lC,[c.createElementVNode("div",null,"经度:"+c.toDisplayString(f.value.longitude.toFixed(10)),1),c.createElementVNode("div",null,"纬度:"+c.toDisplayString(f.value.latitude.toFixed(10)),1)])):(c.openBlock(),c.createElementBlock("div",cC,"未选择"))])]),c.createElementVNode("div",dC,[c.createElementVNode("div",hC,[c.createElementVNode("div",{onClick:T[24]||(T[24]=U=>p.value="MAP"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[c.createElementVNode("input",{type:"radio",checked:p.value==="MAP",style:{"margin-right":"5px"}},null,8,uC),T[40]||(T[40]=c.createElementVNode("span",{style:{"font-weight":"bold"}},"地图标记点:",-1))]),u.value?(c.openBlock(),c.createElementBlock("div",fC,[c.createElementVNode("div",null,"经度:"+c.toDisplayString(u.value.longitude.toFixed(10)),1),c.createElementVNode("div",null,"纬度:"+c.toDisplayString(u.value.latitude.toFixed(10)),1)])):(c.openBlock(),c.createElementBlock("div",pC,"未选择"))])]),c.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[c.createElementVNode("button",{onClick:D},"调整位置"),c.createElementVNode("button",{onClick:Q},"保存")]),T[41]||(T[41]=c.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[c.createElementVNode("div",null,"操作指南:"),c.createElementVNode("div",null,"1. 勾选上方 BIM 或 地图 标记点选项。"),c.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),c.createElementVNode("div",null,"3. 采集两点后,点击“调整位置”进行校准。")],-1))])):c.createCommentVNode("",!0)]),c.createElementVNode("div",gC,[c.createElementVNode("div",mC,[c.createElementVNode("div",AC,[c.createElementVNode("input",{type:"checkbox",checked:g.value,onChange:F},null,40,yC)]),T[43]||(T[43]=c.createElementVNode("div",{class:"col-index"},"序号",-1)),T[44]||(T[44]=c.createElementVNode("div",{class:"col-name"},"名称",-1)),T[45]||(T[45]=c.createElementVNode("div",{class:"col-main"},"主模型",-1))]),c.createElementVNode("div",CC,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(x.value,(U,V)=>(c.openBlock(),c.createElementBlock("div",{key:U.modelId,class:c.normalizeClass(["list-item",{active:U.modelId===d.value}])},[c.createElementVNode("div",EC,[c.withDirectives(c.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":W=>U.selected=W},null,8,wC),[[c.vModelCheckbox,U.selected]])]),c.createElementVNode("div",bC,c.toDisplayString(V+1),1),c.createElementVNode("div",{class:"col-name",title:U.modelName},c.toDisplayString(U.modelName),9,vC),c.createElementVNode("div",IC,[c.createElementVNode("input",{type:"radio",name:"mainModel",checked:U.modelId===d.value,onChange:W=>L(U.modelId)},null,40,BC)])],2))),128))])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-3489beaa"]]);function an(){return an=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},an.apply(null,arguments)}const xC={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},SC={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},ll={lang:an({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},xC),timePickerLocale:an({},SC)};ll.lang.ok="确定";var ln={exports:{}},TC=ln.exports,cl;function dl(){return cl||(cl=1,(function(i,e){(function(t,n){i.exports=n()})(TC,(function(){var t=1e3,n=6e4,s=36e5,o="millisecond",r="second",l="minute",a="hour",d="day",h="week",p="month",f="quarter",u="year",m="date",E="Invalid Date",A=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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,v={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(L){var w=["th","st","nd","rd"],y=L%100;return"["+L+(w[(y-20)%10]||w[y]||w[0])+"]"}},S=function(L,w,y){var b=String(L);return!b||b.length>=w?L:""+Array(w+1-b.length).join(y)+L},D={s:S,z:function(L){var w=-L.utcOffset(),y=Math.abs(w),b=Math.floor(y/60),M=y%60;return(w<=0?"+":"-")+S(b,2,"0")+":"+S(M,2,"0")},m:function L(w,y){if(w.date()<y.date())return-L(y,w);var b=12*(y.year()-w.year())+(y.month()-w.month()),M=w.clone().add(b,p),k=y-M<0,Q=w.clone().add(b+(k?-1:1),p);return+(-(b+(y-M)/(k?M-Q:Q-M))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:p,y:u,w:h,d,D:m,h:a,m:l,s:r,ms:o,Q:f}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},O="en",I={};I[O]=v;var B="$isDayjsObject",g=function(L){return L instanceof _||!(!L||!L[B])},P=function L(w,y,b){var M;if(!w)return O;if(typeof w=="string"){var k=w.toLowerCase();I[k]&&(M=k),y&&(I[k]=y,M=k);var Q=w.split("-");if(!M&&Q.length>1)return L(Q[0])}else{var R=w.name;I[R]=w,M=R}return!b&&M&&(O=M),M||!b&&O},x=function(L,w){if(g(L))return L.clone();var y=typeof w=="object"?w:{};return y.date=L,y.args=arguments,new _(y)},F=D;F.l=P,F.i=g,F.w=function(L,w){return x(L,{locale:w.$L,utc:w.$u,x:w.$x,$offset:w.$offset})};var _=(function(){function L(y){this.$L=P(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[B]=!0}var w=L.prototype;return w.parse=function(y){this.$d=(function(b){var M=b.date,k=b.utc;if(M===null)return new Date(NaN);if(F.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var Q=M.match(A);if(Q){var R=Q[2]-1||0,T=(Q[7]||"0").substring(0,3);return k?new Date(Date.UTC(Q[1],R,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,T)):new Date(Q[1],R,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,T)}}return new Date(M)})(y),this.init()},w.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},w.$utils=function(){return F},w.isValid=function(){return this.$d.toString()!==E},w.isSame=function(y,b){var M=x(y);return this.startOf(b)<=M&&M<=this.endOf(b)},w.isAfter=function(y,b){return x(y)<this.startOf(b)},w.isBefore=function(y,b){return this.endOf(b)<x(y)},w.$g=function(y,b,M){return F.u(y)?this[b]:this.set(M,y)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(y,b){var M=this,k=!!F.u(b)||b,Q=F.p(y),R=function(ne,Y){var j=F.w(M.$u?Date.UTC(M.$y,Y,ne):new Date(M.$y,Y,ne),M);return k?j:j.endOf(d)},T=function(ne,Y){return F.w(M.toDate()[ne].apply(M.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(Y)),M)},U=this.$W,V=this.$M,W=this.$D,X="set"+(this.$u?"UTC":"");switch(Q){case u:return k?R(1,0):R(31,11);case p:return k?R(1,V):R(0,V+1);case h:var ee=this.$locale().weekStart||0,oe=(U<ee?U+7:U)-ee;return R(k?W-oe:W+(6-oe),V);case d:case m:return T(X+"Hours",0);case a:return T(X+"Minutes",1);case l:return T(X+"Seconds",2);case r:return T(X+"Milliseconds",3);default:return this.clone()}},w.endOf=function(y){return this.startOf(y,!1)},w.$set=function(y,b){var M,k=F.p(y),Q="set"+(this.$u?"UTC":""),R=(M={},M[d]=Q+"Date",M[m]=Q+"Date",M[p]=Q+"Month",M[u]=Q+"FullYear",M[a]=Q+"Hours",M[l]=Q+"Minutes",M[r]=Q+"Seconds",M[o]=Q+"Milliseconds",M)[k],T=k===d?this.$D+(b-this.$W):b;if(k===p||k===u){var U=this.clone().set(m,1);U.$d[R](T),U.init(),this.$d=U.set(m,Math.min(this.$D,U.daysInMonth())).$d}else R&&this.$d[R](T);return this.init(),this},w.set=function(y,b){return this.clone().$set(y,b)},w.get=function(y){return this[F.p(y)]()},w.add=function(y,b){var M,k=this;y=Number(y);var Q=F.p(b),R=function(V){var W=x(k);return F.w(W.date(W.date()+Math.round(V*y)),k)};if(Q===p)return this.set(p,this.$M+y);if(Q===u)return this.set(u,this.$y+y);if(Q===d)return R(1);if(Q===h)return R(7);var T=(M={},M[l]=n,M[a]=s,M[r]=t,M)[Q]||1,U=this.$d.getTime()+y*T;return F.w(U,this)},w.subtract=function(y,b){return this.add(-1*y,b)},w.format=function(y){var b=this,M=this.$locale();if(!this.isValid())return M.invalidDate||E;var k=y||"YYYY-MM-DDTHH:mm:ssZ",Q=F.z(this),R=this.$H,T=this.$m,U=this.$M,V=M.weekdays,W=M.months,X=M.meridiem,ee=function(Y,j,te,le){return Y&&(Y[j]||Y(b,k))||te[j].slice(0,le)},oe=function(Y){return F.s(R%12||12,Y,"0")},ne=X||function(Y,j,te){var le=Y<12?"AM":"PM";return te?le.toLowerCase():le};return k.replace(C,(function(Y,j){return j||(function(te){switch(te){case"YY":return String(b.$y).slice(-2);case"YYYY":return F.s(b.$y,4,"0");case"M":return U+1;case"MM":return F.s(U+1,2,"0");case"MMM":return ee(M.monthsShort,U,W,3);case"MMMM":return ee(W,U);case"D":return b.$D;case"DD":return F.s(b.$D,2,"0");case"d":return String(b.$W);case"dd":return ee(M.weekdaysMin,b.$W,V,2);case"ddd":return ee(M.weekdaysShort,b.$W,V,3);case"dddd":return V[b.$W];case"H":return String(R);case"HH":return F.s(R,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return ne(R,T,!0);case"A":return ne(R,T,!1);case"m":return String(T);case"mm":return F.s(T,2,"0");case"s":return String(b.$s);case"ss":return F.s(b.$s,2,"0");case"SSS":return F.s(b.$ms,3,"0");case"Z":return Q}return null})(Y)||Q.replace(":","")}))},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(y,b,M){var k,Q=this,R=F.p(b),T=x(y),U=(T.utcOffset()-this.utcOffset())*n,V=this-T,W=function(){return F.m(Q,T)};switch(R){case u:k=W()/12;break;case p:k=W();break;case f:k=W()/3;break;case h:k=(V-U)/6048e5;break;case d:k=(V-U)/864e5;break;case a:k=V/s;break;case l:k=V/n;break;case r:k=V/t;break;default:k=V}return M?k:F.a(k)},w.daysInMonth=function(){return this.endOf(p).$D},w.$locale=function(){return I[this.$L]},w.locale=function(y,b){if(!y)return this.$L;var M=this.clone(),k=P(y,b,!0);return k&&(M.$L=k),M},w.clone=function(){return F.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},L})(),H=_.prototype;return x.prototype=H,[["$ms",o],["$s",r],["$m",l],["$H",a],["$W",d],["$M",p],["$y",u],["$D",m]].forEach((function(L){H[L[1]]=function(w){return this.$g(w,L[0],L[1])}})),x.extend=function(L,w){return L.$i||(L(w,_,x),L.$i=!0),x},x.locale=P,x.isDayjs=g,x.unix=function(L){return x(1e3*L)},x.en=I[O],x.Ls=I,x.p={},x}))})(ln)),ln.exports}var MC=dl();const He=Qt(MC);var cn={exports:{}},DC=cn.exports,hl;function kC(){return hl||(hl=1,(function(i,e){(function(t,n){i.exports=n(dl())})(DC,(function(t){function n(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var s=n(t),o={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(r,l){return l==="W"?r+"周":r+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(r,l){var a=100*r+l;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};return s.default.locale(o,null,!0),o}))})(cn)),cn.exports}kC();var dn={exports:{}},PC=dn.exports,ul;function FC(){return ul||(ul=1,(function(i,e){(function(t,n){i.exports=n()})(PC,(function(){return function(t,n,s){var o=n.prototype,r=function(p){return p&&(p.indexOf?p:p.s)},l=function(p,f,u,m,E){var A=p.name?p:p.$locale(),C=r(A[f]),v=r(A[u]),S=C||v.map((function(O){return O.slice(0,m)}));if(!E)return S;var D=A.weekStart;return S.map((function(O,I){return S[(I+(D||0))%7]}))},a=function(){return s.Ls[s.locale()]},d=function(p,f){return p.formats[f]||(function(u){return u.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(m,E,A){return E||A.slice(1)}))})(p.formats[f.toUpperCase()])},h=function(){var p=this;return{months:function(f){return f?f.format("MMMM"):l(p,"months")},monthsShort:function(f){return f?f.format("MMM"):l(p,"monthsShort","months",3)},firstDayOfWeek:function(){return p.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):l(p,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):l(p,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):l(p,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return d(p.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return h.bind(this)()},s.localeData=function(){var p=a();return{firstDayOfWeek:function(){return p.weekStart||0},weekdays:function(){return s.weekdays()},weekdaysShort:function(){return s.weekdaysShort()},weekdaysMin:function(){return s.weekdaysMin()},months:function(){return s.months()},monthsShort:function(){return s.monthsShort()},longDateFormat:function(f){return d(p,f)},meridiem:p.meridiem,ordinal:p.ordinal}},s.months=function(){return l(a(),"months")},s.monthsShort=function(){return l(a(),"monthsShort","months",3)},s.weekdays=function(p){return l(a(),"weekdays",null,null,p)},s.weekdaysShort=function(p){return l(a(),"weekdaysShort","weekdays",3,p)},s.weekdaysMin=function(p){return l(a(),"weekdaysMin","weekdays",2,p)}}}))})(dn)),dn.exports}var RC=FC();const OC=Qt(RC);var hn={exports:{}},LC=hn.exports,fl;function NC(){return fl||(fl=1,(function(i,e){(function(t,n){i.exports=n()})(LC,(function(){return function(t,n){n.prototype.weekday=function(s){var o=this.$locale().weekStart||0,r=this.$W,l=(r<o?r+7:r)-o;return this.$utils().u(s)?l:this.subtract(l,"day").add(s,"day")}}}))})(hn)),hn.exports}var UC=NC();const _C=Qt(UC);var un={exports:{}},QC=un.exports,pl;function GC(){return pl||(pl=1,(function(i,e){(function(t,n){i.exports=n()})(QC,(function(){var t="week",n="year";return function(s,o,r){var l=o.prototype;l.week=function(a){if(a===void 0&&(a=null),a!==null)return this.add(7*(a-this.week()),"day");var d=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var h=r(this).startOf(n).add(1,n).date(d),p=r(this).endOf(t);if(h.isBefore(p))return 1}var f=r(this).startOf(n).date(d).startOf(t).subtract(1,"millisecond"),u=this.diff(f,t,!0);return u<0?r(this).startOf("week").week():Math.ceil(u)},l.weeks=function(a){return a===void 0&&(a=null),this.week(a)}}}))})(un)),un.exports}var HC=GC();const YC=Qt(HC);var fn={exports:{}},VC=fn.exports,gl;function zC(){return gl||(gl=1,(function(i,e){(function(t,n){i.exports=n()})(VC,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,o=/\d\d/,r=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,a={},d=function(A){return(A=+A)+(A>68?1900:2e3)},h=function(A){return function(C){this[A]=+C}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(A){(this.zone||(this.zone={})).offset=(function(C){if(!C||C==="Z")return 0;var v=C.match(/([+-]|\d\d)/g),S=60*v[1]+(+v[2]||0);return S===0?0:v[0]==="+"?-S:S})(A)}],f=function(A){var C=a[A];return C&&(C.indexOf?C:C.s.concat(C.f))},u=function(A,C){var v,S=a.meridiem;if(S){for(var D=1;D<=24;D+=1)if(A.indexOf(S(D,0,C))>-1){v=D>12;break}}else v=A===(C?"pm":"PM");return v},m={A:[l,function(A){this.afternoon=u(A,!1)}],a:[l,function(A){this.afternoon=u(A,!0)}],Q:[s,function(A){this.month=3*(A-1)+1}],S:[s,function(A){this.milliseconds=100*+A}],SS:[o,function(A){this.milliseconds=10*+A}],SSS:[/\d{3}/,function(A){this.milliseconds=+A}],s:[r,h("seconds")],ss:[r,h("seconds")],m:[r,h("minutes")],mm:[r,h("minutes")],H:[r,h("hours")],h:[r,h("hours")],HH:[r,h("hours")],hh:[r,h("hours")],D:[r,h("day")],DD:[o,h("day")],Do:[l,function(A){var C=a.ordinal,v=A.match(/\d+/);if(this.day=v[0],C)for(var S=1;S<=31;S+=1)C(S).replace(/\[|\]/g,"")===A&&(this.day=S)}],w:[r,h("week")],ww:[o,h("week")],M:[r,h("month")],MM:[o,h("month")],MMM:[l,function(A){var C=f("months"),v=(f("monthsShort")||C.map((function(S){return S.slice(0,3)}))).indexOf(A)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[l,function(A){var C=f("months").indexOf(A)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,h("year")],YY:[o,function(A){this.year=d(A)}],YYYY:[/\d{4}/,h("year")],Z:p,ZZ:p};function E(A){var C,v;C=A,v=a&&a.formats;for(var S=(A=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,F,_){var H=_&&_.toUpperCase();return F||v[_]||t[_]||v[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(L,w,y){return w||y.slice(1)}))}))).match(n),D=S.length,O=0;O<D;O+=1){var I=S[O],B=m[I],g=B&&B[0],P=B&&B[1];S[O]=P?{regex:g,parser:P}:I.replace(/^\[|\]$/g,"")}return function(x){for(var F={},_=0,H=0;_<D;_+=1){var L=S[_];if(typeof L=="string")H+=L.length;else{var w=L.regex,y=L.parser,b=x.slice(H),M=w.exec(b)[0];y.call(F,M),x=x.replace(M,"")}}return(function(k){var Q=k.afternoon;if(Q!==void 0){var R=k.hours;Q?R<12&&(k.hours+=12):R===12&&(k.hours=0),delete k.afternoon}})(F),F}}return function(A,C,v){v.p.customParseFormat=!0,A&&A.parseTwoDigitYear&&(d=A.parseTwoDigitYear);var S=C.prototype,D=S.parse;S.parse=function(O){var I=O.date,B=O.utc,g=O.args;this.$u=B;var P=g[1];if(typeof P=="string"){var x=g[2]===!0,F=g[3]===!0,_=x||F,H=g[2];F&&(H=g[2]),a=this.$locale(),!x&&H&&(a=v.Ls[H]),this.$d=(function(b,M,k,Q){try{if(["x","X"].indexOf(M)>-1)return new Date((M==="X"?1e3:1)*b);var R=E(M)(b),T=R.year,U=R.month,V=R.day,W=R.hours,X=R.minutes,ee=R.seconds,oe=R.milliseconds,ne=R.zone,Y=R.week,j=new Date,te=V||(T||U?1:j.getDate()),le=T||j.getFullYear(),re=0;T&&!U||(re=U>0?U-1:j.getMonth());var ce,ve=W||0,Te=X||0,et=ee||0,xt=oe||0;return ne?new Date(Date.UTC(le,re,te,ve,Te,et,xt+60*ne.offset*1e3)):k?new Date(Date.UTC(le,re,te,ve,Te,et,xt)):(ce=new Date(le,re,te,ve,Te,et,xt),Y&&(ce=Q(ce).week(Y).toDate()),ce)}catch{return new Date("")}})(I,P,B,v),this.init(),H&&H!==!0&&(this.$L=this.locale(H).$L),_&&I!=this.format(P)&&(this.$d=new Date("")),a={}}else if(P instanceof Array)for(var L=P.length,w=1;w<=L;w+=1){g[1]=P[w-1];var y=v.apply(this,g);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}w===L&&(this.$d=new Date(""))}else D.call(this,O)}}}))})(fn)),fn.exports}var WC=zC();const jC=Qt(WC),KC={class:"setting-panel"},$C={class:"tabs-header"},XC={class:"tab-content"},qC={key:0,class:"section"},JC={class:"setting-item"},ZC={class:"setting-item"},eE={class:"setting-item"},tE={key:1,class:"section"},iE={class:"tabs-header",style:{"margin-bottom":"8px"}},nE={key:0},sE={class:"setting-item column"},oE={class:"setting-item column"},rE={class:"setting-item"},aE={key:1},lE={class:"setting-item column"},cE={class:"setting-item column",style:{"margin-top":"12px","border-top":"1px solid rgba(255,255,255,0.1)","padding-top":"8px"}},dE={class:"search-box"},hE={key:2,class:"section"},uE={class:"setting-item"},fE={key:0,class:"setting-item column"},pE={class:"sub-label"},gE={class:"setting-item"},mE={class:"setting-item"},AE={class:"setting-item column"},yE={class:"setting-item column"},CE={class:"sub-label"},EE={class:"setting-item column"},wE={class:"sub-label"},bE={class:"setting-item column"},vE={class:"sub-label"},IE={class:"setting-item column"},BE={style:{display:"flex",gap:"8px","margin-bottom":"8px"}},xE=["onClick","title"],SE={style:{display:"flex",gap:"8px","align-items":"center"}},TE={key:3,class:"section"},ME={class:"setting-item"},DE={class:"setting-item column"},bi=Re(c.defineComponent({__name:"LeitingSetting",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean,default:!1},tiandituToken:{type:String,default:""},initialConfig:{type:Object,default:()=>({})}},emits:["update:visible","update:open","close"],setup(i,{emit:e}){He.locale("zh-cn"),He.extend(OC),He.extend(_C),He.extend(YC),He.extend(jC);const t=me.Switch,n=me.Radio.Group,s=me.Radio,o=me.Input,r=me.Slider,l=me.Select,a=me.Select.Option,d=me.DatePicker,h=i,p=e,f=c.inject("leitingMethods"),u=c.computed({get:()=>h.open!==void 0?h.open:h.visible,set:w=>{p("update:visible",w),p("update:open",w)}}),m=c.ref("GIS"),E=c.reactive({globe:!1,terrain:!1,depthTest:!1}),A=c.reactive({provider:"tianditu",tianditu:{token:"c25f14fb6bd4397cf8fe45144ff768d6",layerType:"img_w",showLabel:!1},arcgis:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},baseMap:"tianditu"}),C=c.reactive({shadows:!1,shadowDarkness:.7,environmentMap:!1,ambientOcclusion:!1,time:He("2025-06-22 10:00"),brightness:1.5,contrast:1,saturation:1,backgroundColor:"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)"}),v=c.reactive({collision:!1,habit:0}),S=w=>{w&&(w.globe!==void 0&&(E.globe=w.globe),w.terrain!==void 0&&(E.terrain=w.terrain),w.depthTest!==void 0&&(E.depthTest=w.depthTest),w.mapProvider!==void 0&&(A.provider=w.mapProvider),w.tiandituLayerType!==void 0&&(A.tianditu.layerType=w.tiandituLayerType),w.tiandituShowLabel!==void 0&&(A.tianditu.showLabel=w.tiandituShowLabel),w.arcgisUrl!==void 0&&(A.arcgis.url=w.arcgisUrl),w.shadows!==void 0&&(C.shadows=w.shadows),w.shadowDarkness!==void 0&&(C.shadowDarkness=w.shadowDarkness),w.environmentMap!==void 0&&(C.environmentMap=w.environmentMap),w.ambientOcclusion!==void 0&&(C.ambientOcclusion=w.ambientOcclusion),w.time!==void 0&&(typeof w.time=="number"?C.time=He().startOf("day").add(w.time,"hour"):C.time=He(w.time)),w.brightness!==void 0&&(C.brightness=w.brightness),w.contrast!==void 0&&(C.contrast=w.contrast),w.saturation!==void 0&&(C.saturation=w.saturation),w.backgroundColor!==void 0&&(C.backgroundColor=w.backgroundColor),w.collision!==void 0&&(v.collision=w.collision),w.mouseHabit!==void 0&&(v.habit=w.mouseHabit))};c.watch(()=>h.initialConfig,w=>{S(w)},{deep:!0,immediate:!0});const D=["linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)","linear-gradient(0deg, #0f2027 0%, #203a43 50%, #2c5364 100%)","linear-gradient(0deg, #cfd9df 0%, #e2ebf0 100%)"],O=[{label:"全球影像地图服务(墨卡托)",value:"img_w"},{label:"全球影像地图服务(经纬度)",value:"img_c"},{label:"全球矢量地图服务(墨卡托)",value:"vec_w"},{label:"全球矢量地图服务(经纬度)",value:"vec_c"},{label:"全球地形晕渲服务(墨卡托)",value:"ter_w"},{label:"全球地形晕渲服务(经纬度)",value:"ter_c"}],I=()=>{const w=A.provider,y={};w==="tianditu"?(y.token=A.tianditu.token,y.layerType=A.tianditu.layerType,y.showAnnotation=A.tianditu.showLabel):w==="arcgis"&&(y.url=A.arcgis.url),f.value?.changeBaseMap?.(w,y)};c.watch(()=>A.provider,I),c.watch(()=>A.tianditu.layerType,I),c.watch(()=>A.tianditu.showLabel,I),c.watch(()=>A.tianditu.token,kn(I,1e3)),c.watch(()=>A.arcgis.url,kn(I,1e3)),c.onMounted(()=>{h.tiandituToken&&(A.tianditu.token=h.tiandituToken)}),c.watch(()=>E.globe,w=>f.value?.setGlobeEnvironmentVisible?.(w)),c.watch(()=>E.terrain,w=>f.value?.setTerrainEnable?.(w)),c.watch(()=>E.depthTest,w=>f.value?.setDepthTestEnable?.(w)),c.watch(()=>f?.value,w=>{if(w){if(w.getConfigure=()=>({globe:E.globe,terrain:E.terrain,depthTest:E.depthTest,mapProvider:A.provider,tiandituLayerType:A.tianditu.layerType,tiandituShowLabel:A.tianditu.showLabel,arcgisUrl:A.arcgis.url,shadows:C.shadows,shadowDarkness:C.shadowDarkness,environmentMap:C.environmentMap,ambientOcclusion:C.ambientOcclusion,time:He.isDayjs(C.time)?C.time.format("YYYY-MM-DD HH:mm"):C.time,brightness:C.brightness,contrast:C.contrast,saturation:C.saturation,backgroundColor:C.backgroundColor,collision:v.collision,mouseHabit:v.habit}),w.setConfigure=y=>{S(y)},w.setBackgroundColor&&C.backgroundColor&&w.setBackgroundColor(C.backgroundColor),w.setGlobeEnvironmentVisible&&w.setGlobeEnvironmentVisible(E.globe),w.setShadowsEnable&&w.setShadowsEnable(C.shadows),w.setShadowDarkness&&w.setShadowDarkness(C.shadowDarkness),w.setEnvironmentMapEnable&&w.setEnvironmentMapEnable(C.environmentMap),w.setAmbientOcclusion&&w.setAmbientOcclusion(C.ambientOcclusion),w.setTime){const y=He.isDayjs(C.time)?C.time.toDate():new Date;w.setTime(y)}w.setModelBrightness&&w.setModelBrightness(C.brightness),w.setCollisionDetection&&w.setCollisionDetection(v.collision),w.setMouseHabit&&w.setMouseHabit(v.habit),w.changeBaseMap&&A.baseMap&&w.changeBaseMap(A.baseMap,{token:A.tianditu.token,layerType:A.tianditu.layerType,showAnnotation:A.tianditu.showLabel,url:A.arcgis.url})}},{immediate:!0});const B=c.computed({get:()=>{const w=C.backgroundColor;return/^#[0-9A-Fa-f]{6}$/.test(w)?w:"#ffffff"},set:w=>{C.backgroundColor=w}}),g=c.ref(""),P=c.ref(!1),x=c.ref([]);c.watch(()=>E.globe,w=>f.value?.setGlobeEnvironmentVisible?.(w)),c.watch(()=>E.terrain,w=>f.value?.setTerrainEnable?.(w)),c.watch(()=>A.baseMap,w=>{f.value?.changeBaseMap?.(w,{token:h.tiandituToken})}),c.watch(()=>C.shadows,w=>f.value?.setShadowsEnable?.(w)),c.watch(()=>C.shadowDarkness,w=>f.value?.setShadowDarkness?.(w)),c.watch(()=>C.environmentMap,w=>f.value?.setEnvironmentMapEnable?.(w)),c.watch(()=>C.ambientOcclusion,w=>f.value?.setAmbientOcclusion?.(w)),c.watch(()=>C.time,w=>{const y=He.isDayjs(w)?w.toDate():new Date;f.value?.setTime?.(y)}),c.watch(()=>[C.brightness,C.contrast,C.saturation],([w,y,b])=>{const M=f.value;M?.setModelColorAdjustment?M.setModelColorAdjustment({brightness:w,contrast:y,saturation:b}):M?.setModelBrightness?.(w)}),c.watch(()=>C.backgroundColor,w=>{if(f.value?.setBackgroundColor)f.value.setBackgroundColor(w);else{const y=document.querySelector(".cesium-viewer");y&&(y.style.background=w)}}),c.watch(()=>v.collision,w=>f.value?.setCollisionDetection?.(w)),c.watch(()=>v.habit,w=>f.value?.setMouseHabit?.(w));const F=w=>{if(w?.pois&&Array.isArray(w.pois)&&w.pois.length>0){const y=w.pois[0],b=y.lonlat.split(/[, ]/).map(Number);if(b.length>=2&&!isNaN(b[0])&&!isNaN(b[1]))return{name:y.name,lon:b[0],lat:b[1],raw:y}}if(w?.area&&w.area.lonlat){const y=w.area,b=y.lonlat.split(/[, ]/).map(Number);if(b.length>=2&&!isNaN(b[0])&&!isNaN(b[1]))return{name:y.name,lon:b[0],lat:b[1],raw:y}}return null},H=kn(async()=>{const w=(g.value||"").trim();if(!w)return;const y=h.tiandituToken||"c25f14fb6bd4397cf8fe45144ff768d6";P.value=!0,x.value=[];try{if(f.value?.searchLocation){const b=await f.value.searchLocation(w,y),M=F(b);M&&(x.value=[M],pe.success(`找到:${M.name||""}`),f.value.flyToLonLatHeight(M.lon,M.lat,5e3))}else{const M=`https://api.tianditu.gov.cn/v2/search?postStr=${encodeURIComponent(JSON.stringify({keyWord:w,level:12,mapBound:"-180,-90,180,90",queryType:1,start:0,count:10}))}&type=query&tk=${encodeURIComponent(y)}`,k=await fetch(M);if(!k.ok)throw new Error(`HTTP ${k.status}`);const Q=await k.json(),R=F(Q);R&&(x.value=[R],pe.success(`找到:${R.name||""}`),f.value?.flyToLonLatHeight?.(R.lon,R.lat,5e3))}}catch(b){console.error("tianditu search error",b)}finally{P.value=!1}},800);c.watch(g,()=>{H()});const L=()=>{u.value=!1,p("close")};return c.onMounted(()=>{}),(w,y)=>(c.openBlock(),c.createBlock(ke,{visible:u.value,title:"设置","full-height":i.fullHeight,onClose:L,"onUpdate:visible":y[26]||(y[26]=b=>u.value=b)},{default:c.withCtx(()=>[c.createElementVNode("div",KC,[c.createElementVNode("div",$C,[c.createElementVNode("div",{class:c.normalizeClass(["tab-item",{active:m.value==="GIS"}]),onClick:y[0]||(y[0]=b=>m.value="GIS")},"GIS",2),c.createElementVNode("div",{class:c.normalizeClass(["tab-item",{active:m.value==="MAP"}]),onClick:y[1]||(y[1]=b=>m.value="MAP")},"地图",2),c.createElementVNode("div",{class:c.normalizeClass(["tab-item",{active:m.value==="RENDER"}]),onClick:y[2]||(y[2]=b=>m.value="RENDER")},"渲染",2),c.createElementVNode("div",{class:c.normalizeClass(["tab-item",{active:m.value==="MOUSE"}]),onClick:y[3]||(y[3]=b=>m.value="MOUSE")},"鼠标",2)]),c.createElementVNode("div",XC,[m.value==="GIS"?(c.openBlock(),c.createElementBlock("div",qC,[c.createElementVNode("div",JC,[y[27]||(y[27]=c.createElementVNode("span",null,"地球 (含大气/日月/星空)",-1)),c.createVNode(c.unref(t),{checked:E.globe,"onUpdate:checked":y[4]||(y[4]=b=>E.globe=b),size:"small"},null,8,["checked"])]),c.createElementVNode("div",ZC,[y[28]||(y[28]=c.createElementVNode("span",null,"地形 (高程)",-1)),c.createVNode(c.unref(t),{checked:E.terrain,"onUpdate:checked":y[5]||(y[5]=b=>E.terrain=b),size:"small"},null,8,["checked"])]),c.createElementVNode("div",eE,[y[29]||(y[29]=c.createElementVNode("span",null,"地形遮挡",-1)),c.createVNode(c.unref(t),{checked:E.depthTest,"onUpdate:checked":y[6]||(y[6]=b=>E.depthTest=b),size:"small"},null,8,["checked"])])])):c.createCommentVNode("",!0),m.value==="MAP"?(c.openBlock(),c.createElementBlock("div",tE,[c.createElementVNode("div",iE,[c.createElementVNode("div",{class:c.normalizeClass(["tab-item",{active:A.provider==="tianditu"}]),onClick:y[7]||(y[7]=b=>A.provider="tianditu")},"天地图",2),c.createElementVNode("div",{class:c.normalizeClass(["tab-item",{active:A.provider==="arcgis"}]),onClick:y[8]||(y[8]=b=>A.provider="arcgis")},"ArcGIS",2)]),A.provider==="tianditu"?(c.openBlock(),c.createElementBlock("div",nE,[c.createElementVNode("div",sE,[y[30]||(y[30]=c.createElementVNode("div",{class:"sub-label"},"Token",-1)),c.createVNode(c.unref(o),{value:A.tianditu.token,"onUpdate:value":y[9]||(y[9]=b=>A.tianditu.token=b),size:"small",placeholder:"输入天地图Token"},null,8,["value"])]),c.createElementVNode("div",oE,[y[31]||(y[31]=c.createElementVNode("div",{class:"sub-label"},"地图风格",-1)),c.createVNode(c.unref(l),{value:A.tianditu.layerType,"onUpdate:value":y[10]||(y[10]=b=>A.tianditu.layerType=b),size:"small",style:{width:"100%"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(O,b=>c.createVNode(c.unref(a),{key:b.value,value:b.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(b.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),c.createElementVNode("div",rE,[y[32]||(y[32]=c.createElementVNode("span",null,"叠加注记",-1)),c.createVNode(c.unref(t),{checked:A.tianditu.showLabel,"onUpdate:checked":y[11]||(y[11]=b=>A.tianditu.showLabel=b),size:"small"},null,8,["checked"])])])):c.createCommentVNode("",!0),A.provider==="arcgis"?(c.openBlock(),c.createElementBlock("div",aE,[c.createElementVNode("div",lE,[y[33]||(y[33]=c.createElementVNode("div",{class:"sub-label"},"服务地址",-1)),c.createVNode(c.unref(o),{value:A.arcgis.url,"onUpdate:value":y[12]||(y[12]=b=>A.arcgis.url=b),size:"small",placeholder:"输入ArcGIS MapServer地址"},null,8,["value"])])])):c.createCommentVNode("",!0),c.createElementVNode("div",cE,[y[34]||(y[34]=c.createElementVNode("div",{class:"sub-label"},"位置搜索 (天地图)",-1)),c.createElementVNode("div",dE,[c.createVNode(c.unref(o),{value:g.value,"onUpdate:value":y[13]||(y[13]=b=>g.value=b),placeholder:"输入地名搜索",size:"small","allow-clear":""},null,8,["value"])])])])):c.createCommentVNode("",!0),m.value==="RENDER"?(c.openBlock(),c.createElementBlock("div",hE,[c.createElementVNode("div",uE,[y[35]||(y[35]=c.createElementVNode("span",null,"阴影",-1)),c.createVNode(c.unref(t),{checked:C.shadows,"onUpdate:checked":y[14]||(y[14]=b=>C.shadows=b),size:"small"},null,8,["checked"])]),C.shadows?(c.openBlock(),c.createElementBlock("div",fE,[c.createElementVNode("div",pE,"阴影暗度 ("+c.toDisplayString(C.shadowDarkness.toFixed(2))+")",1),c.createVNode(c.unref(r),{value:C.shadowDarkness,"onUpdate:value":y[15]||(y[15]=b=>C.shadowDarkness=b),min:0,max:1,step:.05,size:"small"},null,8,["value"])])):c.createCommentVNode("",!0),c.createElementVNode("div",gE,[y[36]||(y[36]=c.createElementVNode("span",null,"环境贴图 (HDR)",-1)),c.createVNode(c.unref(t),{checked:C.environmentMap,"onUpdate:checked":y[16]||(y[16]=b=>C.environmentMap=b),size:"small"},null,8,["checked"])]),c.createElementVNode("div",mE,[y[37]||(y[37]=c.createElementVNode("span",null,"环境光遮蔽 (AO)",-1)),c.createVNode(c.unref(t),{checked:C.ambientOcclusion,"onUpdate:checked":y[17]||(y[17]=b=>C.ambientOcclusion=b),size:"small"},null,8,["checked"])]),c.createElementVNode("div",AE,[y[38]||(y[38]=c.createElementVNode("div",{class:"sub-label"},"日期时间",-1)),c.createVNode(c.unref(d),{value:C.time,"onUpdate:value":y[18]||(y[18]=b=>C.time=b),"show-time":"",locale:c.unref(ll),format:"YYYY-MM-DD HH:mm",size:"small",style:{width:"100%"}},null,8,["value","locale"])]),c.createElementVNode("div",yE,[c.createElementVNode("div",CE,"模型亮度 ("+c.toDisplayString(C.brightness.toFixed(1))+")",1),c.createVNode(c.unref(r),{value:C.brightness,"onUpdate:value":y[19]||(y[19]=b=>C.brightness=b),min:0,max:5,step:.1,size:"small"},null,8,["value"])]),c.createElementVNode("div",EE,[c.createElementVNode("div",wE,"模型对比度 ("+c.toDisplayString(C.contrast.toFixed(1))+")",1),c.createVNode(c.unref(r),{value:C.contrast,"onUpdate:value":y[20]||(y[20]=b=>C.contrast=b),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),c.createElementVNode("div",bE,[c.createElementVNode("div",vE,"模型饱和度 ("+c.toDisplayString(C.saturation.toFixed(1))+")",1),c.createVNode(c.unref(r),{value:C.saturation,"onUpdate:value":y[21]||(y[21]=b=>C.saturation=b),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),c.createElementVNode("div",IE,[y[39]||(y[39]=c.createElementVNode("div",{class:"sub-label"},"背景颜色",-1)),c.createElementVNode("div",BE,[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(D,(b,M)=>c.createElementVNode("div",{key:M,style:c.normalizeStyle({background:b,width:"32px",height:"24px",borderRadius:"2px",cursor:"pointer",border:"1px solid #d9d9d9",flexShrink:0}),onClick:k=>C.backgroundColor=b,title:"预设 "+(M+1)},null,12,xE)),64))]),c.createElementVNode("div",SE,[c.withDirectives(c.createElementVNode("input",{type:"color","onUpdate:modelValue":y[22]||(y[22]=b=>B.value=b),style:{width:"40px",height:"24px",padding:"0",border:"1px solid #d9d9d9"}},null,512),[[c.vModelText,B.value]]),c.createVNode(c.unref(o),{value:C.backgroundColor,"onUpdate:value":y[23]||(y[23]=b=>C.backgroundColor=b),size:"small",style:{flex:"1"},placeholder:"CSS 颜色值"},null,8,["value"])])])])):c.createCommentVNode("",!0),m.value==="MOUSE"?(c.openBlock(),c.createElementBlock("div",TE,[c.createElementVNode("div",ME,[y[40]||(y[40]=c.createElementVNode("span",null,"碰撞检测",-1)),c.createVNode(c.unref(t),{checked:v.collision,"onUpdate:checked":y[24]||(y[24]=b=>v.collision=b),size:"small"},null,8,["checked"])]),c.createElementVNode("div",DE,[y[43]||(y[43]=c.createElementVNode("div",{class:"sub-label"},"操作习惯",-1)),c.createVNode(c.unref(n),{value:v.habit,"onUpdate:value":y[25]||(y[25]=b=>v.habit=b),size:"small"},{default:c.withCtx(()=>[c.createVNode(c.unref(s),{value:0},{default:c.withCtx(()=>[...y[41]||(y[41]=[c.createTextVNode("默认 (中键旋转)",-1)])]),_:1}),c.createVNode(c.unref(s),{value:1},{default:c.withCtx(()=>[...y[42]||(y[42]=[c.createTextVNode("习惯1 (左键旋转)",-1)])]),_:1})]),_:1},8,["value"])])])):c.createCommentVNode("",!0)])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-79494025"]]),kE={class:"cad-layer-panel"},PE={class:"layer-list-container"},FE={class:"list-header"},RE={class:"col-check"},OE=["checked"],LE={class:"list-body"},NE={class:"col-check"},UE=["checked","onChange"],_E={class:"col-index"},QE=["title"],GE={class:"col-color"},HE=["value"],YE={key:0,class:"empty-text"},VE=Re(c.defineComponent({__name:"LeitingCadLayer",props:{visible:{type:Boolean,default:!1},currentModelId:{type:String,default:""}},emits:["update:visible","handleCloseCardByCadCard"],setup(i,{emit:e}){const t=i,n=e,s=c.inject("leitingMethods",c.ref({})),o=c.ref(""),r=c.ref([]),l=()=>{s.value&&s.value.getDxfModels&&(r.value=s.value.getDxfModels().map(v=>({modelId:v.modelId,modelName:v.modelName}))||[])},a=c.computed(()=>r.value.map(v=>({value:v.modelId,label:v.modelName}))),d=c.ref([]),h=c.ref([]),p=c.computed(()=>d.value.length>0&&h.value.length===d.value.length),f=({modelId:v})=>{if(d.value=[],h.value=[],s.value&&s.value.getDxfLayers){const S=s.value.getDxfLayers({modelId:v});S&&Object.keys(S).forEach((D,O)=>{S[D].length&&(d.value.push({index:O+1,layerName:D,layerColor:S[D][0].color||"#ffffff",key:D}),h.value.push(D))})}},u=v=>{o.value=v,f({modelId:v})},m=v=>{v.target.checked?h.value=d.value.map(D=>D.key):h.value=[],A()},E=(v,S)=>{S.target.checked?h.value.includes(v)||h.value.push(v):h.value=h.value.filter(O=>O!==v),A()},A=()=>{if(s.value&&s.value.showDxfLayer&&(s.value.showDxfLayer({modelId:o.value,show:!0,layers:h.value}),s.value.getDxfLayers)){const v=s.value.getDxfLayers({modelId:o.value});if(v){const S=Object.keys(v).filter(D=>!h.value.includes(D));s.value.showDxfLayer({modelId:o.value,show:!1,layers:S})}}},C=()=>{n("update:visible",!1),n("handleCloseCardByCadCard")};return c.watch(()=>t.visible,v=>{v&&(l(),t.currentModelId?(o.value=t.currentModelId,f({modelId:t.currentModelId})):a.value.length>0&&(o.value=a.value[0]?.value,f({modelId:o.value})))}),c.watch(()=>t.currentModelId,v=>{v&&t.visible&&(o.value=v,f({modelId:v}))}),(v,S)=>(c.openBlock(),c.createBlock(ke,{visible:i.visible,title:"CAD图层","onUpdate:visible":S[3]||(S[3]=D=>v.$emit("update:visible",D)),onClose:C,width:360,align:"right","initial-position":{x:0,y:60}},{"header-extra":c.withCtx(()=>[c.createElementVNode("div",{class:"header-select-container",onMousedown:S[2]||(S[2]=c.withModifiers(()=>{},["stop"]))},[S[4]||(S[4]=c.createElementVNode("span",{class:"header-label"},"图纸:",-1)),c.createVNode(c.unref(me.Select),{value:o.value,"onUpdate:value":S[0]||(S[0]=D=>o.value=D),options:a.value,onChange:S[1]||(S[1]=D=>u(D)),placeholder:"选择模型",style:{width:"140px"},bordered:!1,class:"custom-header-select",popupClassName:"leiting-select-dropdown",size:"small"},null,8,["value","options"])],32)]),default:c.withCtx(()=>[c.createElementVNode("div",kE,[c.createElementVNode("div",PE,[c.createElementVNode("div",FE,[c.createElementVNode("div",RE,[c.createElementVNode("input",{type:"checkbox",checked:p.value,onChange:m},null,40,OE)]),S[5]||(S[5]=c.createElementVNode("div",{class:"col-index"},"序号",-1)),S[6]||(S[6]=c.createElementVNode("div",{class:"col-name"},"图层名称",-1)),S[7]||(S[7]=c.createElementVNode("div",{class:"col-color"},"颜色",-1))]),c.createElementVNode("div",LE,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(d.value,D=>(c.openBlock(),c.createElementBlock("div",{key:D.key,class:"list-item"},[c.createElementVNode("div",NE,[c.createElementVNode("input",{type:"checkbox",checked:h.value.includes(D.key),onChange:O=>E(D.key,O)},null,40,UE)]),c.createElementVNode("div",_E,c.toDisplayString(D.index),1),c.createElementVNode("div",{class:"col-name",title:D.layerName},c.toDisplayString(D.layerName),9,QE),c.createElementVNode("div",GE,[c.createElementVNode("input",{type:"color",value:D.layerColor,disabled:""},null,8,HE)])]))),128)),d.value.length===0?(c.openBlock(),c.createElementBlock("div",YE,"暂无数据")):c.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-a4db4977"]]),zE={class:"adjust-panel"},WE={class:"control-panel"},jE={class:"form-item"},KE={class:"radio-group"},$E={class:"form-item"},XE=["title"],qE={class:"param-row"},JE=["step"],ZE={class:"param-row"},ew=["step"],tw={class:"param-row"},iw=["step"],nw={class:"param-row"},sw=["step"],ow={class:"param-row"},rw=["step"],aw={class:"param-row"},lw=["step"],cw={class:"param-row"},dw=["step"],hw={class:"button-grid"},uw={key:1,class:"pick-mode-ui"},fw=["onClick"],pw=["checked"],gw={style:{"font-size":"12px",color:"#aaa","padding-left":"10px"}},mw={class:"param-row"},Aw={style:{width:"40px"}},yw=["onUpdate:modelValue"],Cw={class:"param-row"},Ew={style:{width:"40px"}},ww=["onUpdate:modelValue"],bw={class:"param-row"},vw={style:{width:"40px"}},Iw=["onUpdate:modelValue"],Bw={class:"list-panel"},xw={class:"list-header"},Sw={class:"col-check"},Tw=["checked"],Mw={class:"list-body"},Dw={class:"col-check"},kw=["onUpdate:modelValue"],Pw={class:"col-index"},Fw=["title"],Rw={class:"col-main"},Ow=["checked","onChange"],Lw={key:0,style:{padding:"10px","text-align":"center",color:"#999"}},Nw=Re(c.defineComponent({__name:"LeitingCadPosition",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","handleSavingByCadCard","clearBimPointList","save"],setup(i,{expose:e,emit:t}){const n=i,s=t,o=c.inject("leitingMethods"),r=c.ref([]),l=c.ref(""),a=c.computed(()=>r.value.length>0&&r.value.every(y=>y.selected)),d=c.ref("param"),h=c.ref("bimPoint1"),p=c.ref(null),f=c.ref("bimPoint1"),u=c.reactive({bimPoint1:{longitude:void 0,latitude:void 0,type:"CAD标记点",longitudeText:"经度",latitudeText:"纬度",heightText:"高程",height:void 0},bimPoint2:{longitude:void 0,latitude:void 0,type:"地图标记点",longitudeText:"经度",latitudeText:"纬度",heightText:"高程",height:void 0}}),m=c.ref(1e-6),E=c.reactive({modelId:"",longitude:0,latitude:0,distance:1e-6,rotation:1,totalRotation:0,heightDistance:1,height:0,lonlat:1e-6,modelOptions:[],selectPoint:{longitude:0,latitude:0,height:0},selectedMode:!1,X:0,Y:0,Z:0}),A=c.computed(()=>{const y=r.value.find(b=>b.modelId===l.value);return y?y.modelName:""}),C=()=>{s("update:visible",!1)},v=()=>(!p.value&&o?.value?.getViewer&&o?.value?.getCesium&&(p.value=new al(o.value.getViewer(),o.value.getCesium())),p.value),S=()=>{v()?.clearMarkers(),u.bimPoint1.longitude=void 0,u.bimPoint1.latitude=void 0,u.bimPoint1.height=void 0,u.bimPoint2.longitude=void 0,u.bimPoint2.latitude=void 0,u.bimPoint2.height=void 0},D=y=>{const b=h.value,M=u[b];if(M){M.longitude=y.longitude,M.latitude=y.latitude,M.height=y.height;const k=b==="bimPoint1"?"BIM":"MAP";v()?.addMarker(k,y),pe.success(`${M.type}已添加`)}},O=()=>{v()?.registerPickHandler(y=>{D(y)})},I=()=>{v()?.destroyPickHandler()},B=y=>{d.value=y,y!=="pick"&&s("clearBimPointList")};c.watch(()=>d.value,y=>{y==="pick"?O():I()}),c.onUnmounted(()=>{I()});const g=()=>{if(!o?.value?.getDxfModels)return;const y=o.value.getDxfModels();if(Array.isArray(y)?r.value=y.map(b=>({modelId:b.modelId,modelName:b.modelName,formData:b.formData||{},selected:!1,tileset:b})):r.value=[],r.value.length>0){const b=o.value.getCadModelId?o.value.getCadModelId():"";b&&r.value.find(M=>M.modelId===b)?P(b):P(r.value[0].modelId),r.value.forEach(M=>M.selected=!0)}},P=y=>{l.value=y;const b=r.value.find(M=>M.modelId===y);b&&b.formData&&Object.keys(E).forEach(M=>{b.formData[M]!==void 0&&(E[M]=b.formData[M])})},x=(y,b)=>{if(!o?.value?.adjustingModelByCad)return;const M=r.value.find(k=>k.modelId===y);M&&M.tileset&&(M.formData={...M.formData,...b},M.tileset.formData=M.formData,o.value.adjustingModelByCad({...M.formData,tileset:M.tileset}))},F=y=>{if(!l.value)return;const b=E[y];x(l.value,{[y]:b})},_=y=>{const b=r.value.filter(R=>R.selected);if(b.length===0){pe.warning("请先选择要调整的模型");return}const{distance:M,heightDistance:k,rotation:Q}=E;b.forEach(R=>{const T={...R.formData};switch(y){case"north":T.latitude+=M;break;case"south":T.latitude-=M;break;case"east":T.longitude+=M;break;case"west":T.longitude-=M;break;case"up":T.height+=k;break;case"down":T.height-=k;break;case"rotateLeft":T.totalRotation=(T.totalRotation||0)-Q;break;case"rotateRight":T.totalRotation=(T.totalRotation||0)+Q;break}R.modelId===l.value&&Object.assign(E,T),x(R.modelId,T)})},H=y=>{const b=y.target.checked;r.value.forEach(M=>M.selected=b)},L=()=>{s("handleSavingByCadCard",r.value),s("save",r.value)},w=()=>{const y=u.bimPoint1,b=u.bimPoint2;if(y.longitude===void 0||b.longitude===void 0){pe.warning("请先完成点选操作");return}const M=r.value.filter(U=>U.selected);if(M.length===0){pe.warning("请先选择要调整的模型");return}let k=0,Q=0,R=0;const T=v();if(T){const{dLon:U,dLat:V,dHeight:W}=T.calculateOffset(y,b);k=U,Q=V,R=W}else k=b.longitude-y.longitude,Q=b.latitude-y.latitude,R=b.height-y.height;M.forEach(U=>{const V={...U.formData};V.longitude+=k,V.latitude+=Q,V.height+=R,U.modelId===l.value&&Object.assign(E,V),x(U.modelId,V)}),pe.success("位置已调整")};return c.watch(()=>n.visible,y=>{y?g():(I(),S())}),c.onMounted(()=>{n.visible&&g()}),e({setBIMPointsList:({longitude:y,latitude:b,height:M})=>{u[f.value].longitude=y,u[f.value].latitude=b,u[f.value].height=M},addGltfOr3dTilesModelList:y=>{console.warn("addGltfOr3dTilesModelList is deprecated, use internal loading")}}),(y,b)=>(c.openBlock(),c.createBlock(ke,{visible:n.visible,title:"Cad校准",width:282,height:600,"onUpdate:visible":b[21]||(b[21]=M=>s("update:visible",M)),onClose:C},{default:c.withCtx(()=>[c.createElementVNode("div",zE,[c.createElementVNode("div",WE,[c.createElementVNode("div",jE,[b[22]||(b[22]=c.createElementVNode("label",null,"调整操作:",-1)),c.createElementVNode("div",KE,[c.createElementVNode("span",{class:c.normalizeClass({active:d.value==="param"}),onClick:b[0]||(b[0]=M=>B("param"))},"参数模式",2),c.createElementVNode("span",{class:c.normalizeClass({active:d.value==="pick"}),onClick:b[1]||(b[1]=M=>B("pick"))},"地图点选",2)])]),c.createElementVNode("div",$E,[b[23]||(b[23]=c.createElementVNode("label",null,"当前主模型:",-1)),c.createElementVNode("span",{class:"value",title:A.value},c.toDisplayString(A.value||"未选择"),9,XE)]),b[35]||(b[35]=c.createElementVNode("div",{class:"separator"},null,-1)),d.value==="param"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[b[31]||(b[31]=c.createElementVNode("div",{class:"group-header"},"当前状态",-1)),c.createElementVNode("div",qE,[b[24]||(b[24]=c.createElementVNode("label",null,"经度(东西):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[2]||(b[2]=M=>E.longitude=M),onChange:b[3]||(b[3]=M=>F("longitude")),step:m.value},null,40,JE),[[c.vModelText,E.longitude,void 0,{number:!0}]])]),c.createElementVNode("div",ZE,[b[25]||(b[25]=c.createElementVNode("label",null,"纬度(南北):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[4]||(b[4]=M=>E.latitude=M),onChange:b[5]||(b[5]=M=>F("latitude")),step:m.value},null,40,ew),[[c.vModelText,E.latitude,void 0,{number:!0}]])]),c.createElementVNode("div",tw,[b[26]||(b[26]=c.createElementVNode("label",null,"高度(m):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[6]||(b[6]=M=>E.height=M),onChange:b[7]||(b[7]=M=>F("height")),step:m.value},null,40,iw),[[c.vModelText,E.height,void 0,{number:!0}]])]),c.createElementVNode("div",nw,[b[27]||(b[27]=c.createElementVNode("label",null,"累计旋转(°):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[8]||(b[8]=M=>E.totalRotation=M),onChange:b[9]||(b[9]=M=>F("totalRotation")),step:m.value},null,40,sw),[[c.vModelText,E.totalRotation,void 0,{number:!0}]])]),b[32]||(b[32]=c.createElementVNode("div",{class:"separator"},null,-1)),b[33]||(b[33]=c.createElementVNode("div",{class:"group-header"},"调整步长",-1)),c.createElementVNode("div",ow,[b[28]||(b[28]=c.createElementVNode("label",null,"经纬步长(°):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[10]||(b[10]=M=>E.distance=M),step:m.value},null,8,rw),[[c.vModelText,E.distance,void 0,{number:!0}]])]),c.createElementVNode("div",aw,[b[29]||(b[29]=c.createElementVNode("label",null,"高度步长(m):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[11]||(b[11]=M=>E.heightDistance=M),step:m.value},null,8,lw),[[c.vModelText,E.heightDistance,void 0,{number:!0}]])]),c.createElementVNode("div",cw,[b[30]||(b[30]=c.createElementVNode("label",null,"旋转步长(°):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[12]||(b[12]=M=>E.rotation=M),step:m.value},null,8,dw),[[c.vModelText,E.rotation,void 0,{number:!0}]])]),c.createElementVNode("div",hw,[c.createElementVNode("button",{onClick:b[13]||(b[13]=M=>_("rotateLeft"))},"左转"),c.createElementVNode("button",{onClick:b[14]||(b[14]=M=>_("north"))},"北移"),c.createElementVNode("button",{onClick:b[15]||(b[15]=M=>_("rotateRight"))},"右转"),c.createElementVNode("button",{onClick:b[16]||(b[16]=M=>_("west"))},"西移"),c.createElementVNode("button",{onClick:b[17]||(b[17]=M=>_("south"))},"南移"),c.createElementVNode("button",{onClick:b[18]||(b[18]=M=>_("east"))},"东移"),c.createElementVNode("button",{onClick:b[19]||(b[19]=M=>_("up"))},"上移"),c.createElementVNode("button",{onClick:b[20]||(b[20]=M=>_("down"))},"下移"),c.createElementVNode("button",{onClick:L,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):(c.openBlock(),c.createElementBlock("div",uw,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u,(M,k)=>(c.openBlock(),c.createElementBlock("div",{key:k,class:"form-item",style:{display:"block","margin-bottom":"15px"}},[c.createElementVNode("div",{style:{"font-weight":"bold","margin-bottom":"5px",cursor:"pointer",display:"flex","align-items":"center"},onClick:Q=>h.value=k},[c.createElementVNode("input",{type:"radio",checked:h.value===k,style:{"margin-right":"5px"}},null,8,pw),c.createTextVNode(" "+c.toDisplayString(M.type)+": ",1)],8,fw),c.createElementVNode("div",gw,[c.createElementVNode("div",mw,[c.createElementVNode("label",Aw,c.toDisplayString(M.longitudeText),1),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":Q=>M.longitude=Q,readonly:"",style:{width:"100px"}},null,8,yw),[[c.vModelText,M.longitude,void 0,{number:!0}]])]),c.createElementVNode("div",Cw,[c.createElementVNode("label",Ew,c.toDisplayString(M.latitudeText),1),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":Q=>M.latitude=Q,readonly:"",style:{width:"100px"}},null,8,ww),[[c.vModelText,M.latitude,void 0,{number:!0}]])]),c.createElementVNode("div",bw,[c.createElementVNode("label",vw,c.toDisplayString(M.heightText),1),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":Q=>M.height=Q,readonly:"",style:{width:"100px"}},null,8,Iw),[[c.vModelText,M.height,void 0,{number:!0}]])])])]))),128)),c.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[c.createElementVNode("button",{onClick:w,class:"primary-btn"},"应用校准"),c.createElementVNode("button",{onClick:L},"保存")]),b[34]||(b[34]=c.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[c.createElementVNode("div",null,"操作指南:"),c.createElementVNode("div",null,"1. 勾选上方 CAD 或 地图 标记点选项。"),c.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),c.createElementVNode("div",null,"3. 采集两点后,点击“应用校准”进行校准。")],-1))]))]),c.createElementVNode("div",Bw,[c.createElementVNode("div",xw,[c.createElementVNode("div",Sw,[c.createElementVNode("input",{type:"checkbox",checked:a.value,onChange:H},null,40,Tw)]),b[36]||(b[36]=c.createElementVNode("div",{class:"col-index"},"序号",-1)),b[37]||(b[37]=c.createElementVNode("div",{class:"col-name"},"名称",-1)),b[38]||(b[38]=c.createElementVNode("div",{class:"col-main"},"主模型",-1))]),c.createElementVNode("div",Mw,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.value,(M,k)=>(c.openBlock(),c.createElementBlock("div",{key:M.modelId,class:c.normalizeClass(["list-item",{active:M.modelId===l.value}])},[c.createElementVNode("div",Dw,[c.withDirectives(c.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":Q=>M.selected=Q},null,8,kw),[[c.vModelCheckbox,M.selected]])]),c.createElementVNode("div",Pw,c.toDisplayString(k+1),1),c.createElementVNode("div",{class:"col-name",title:M.modelName},c.toDisplayString(M.modelName),9,Fw),c.createElementVNode("div",Rw,[c.createElementVNode("input",{type:"radio",name:"mainModel",checked:M.modelId===l.value,onChange:Q=>P(M.modelId)},null,40,Ow)])],2))),128)),r.value.length===0?(c.openBlock(),c.createElementBlock("div",Lw,"暂无数据")):c.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-e8abd49d"]]),Uw={class:"annotation-content"},_w={class:"annotation-tools"},Qw={class:"annotation-controls"},Gw={class:"control-group",title:"颜色"},Hw={class:"tool-item color-tool"},Yw={class:"control-group line-width-container",title:"线宽"},Vw=["onClick"],zw={class:"option-label"},Ww=Re(c.defineComponent({__name:"LeitingAnnotationCard",props:{visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(i,{emit:e}){const t=i,n=e,s=c.inject("leitingMethods"),o=c.ref(""),r=c.ref("#ff0000"),l=c.ref(1),a=c.ref(!1),d=c.ref(null),h=c.ref(null),p=c.ref({top:"0px",left:"0px"}),f=[{value:6,label:"粗"},{value:3,label:"中"},{value:1,label:"细"}],u=()=>s?.value?.getAnnotationInstance?s.value.getAnnotationInstance():null,m=()=>{n("update:visible",!1)},E=B=>{o.value=B;const g=u();if(g)switch(B){case"freehandLine":g.startFreehandLine();break;case"arrow":g.startArrow();break;case"straightLine":g.startStraightLine();break;case"rectangle":g.startRectangle();break;case"ellipse":g.startEllipse();break}},A=()=>{const B=u();B&&(B.setCurrentColor(r.value),B.changeColor(r.value))},C=()=>{if(!a.value&&d.value){const B=d.value.getBoundingClientRect();p.value={top:`${B.top}px`,left:`${B.right+8}px`}}a.value=!a.value},v=B=>{l.value=B,a.value=!1;const g=u();g&&(g.setCurrentWidth(B),g.changeWidth(B))},S=()=>{const B=u();B&&B.deleteSelectedEntity()},D=()=>{const B=u();B&&B.clearAll()},O=()=>{if(s?.value?.saveAnnotations){s.value.saveAnnotations();return}const B=u();B&&B.saveAnnotations()},I=B=>{const g=B.target,P=d.value&&d.value.contains(g),x=h.value&&h.value.contains(g);!P&&!x&&(a.value=!1)};return c.onMounted(()=>{document.addEventListener("click",I)}),c.onUnmounted(()=>{document.removeEventListener("click",I)}),(B,g)=>(c.openBlock(),c.createBlock(ke,{visible:t.visible,title:"标注",width:70,"min-width":70,height:480,"onUpdate:visible":g[6]||(g[6]=P=>n("update:visible",P)),onClose:m},{default:c.withCtx(()=>[c.createElementVNode("div",Uw,[c.createElementVNode("div",_w,[c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:o.value==="freehandLine"}]),onClick:g[0]||(g[0]=P=>E("freehandLine")),title:"手绘线"},[...g[7]||(g[7]=[c.createElementVNode("div",{class:"tool-icon"},"✏️",-1)])],2),c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:o.value==="arrow"}]),onClick:g[1]||(g[1]=P=>E("arrow")),title:"箭头"},[...g[8]||(g[8]=[c.createElementVNode("div",{class:"tool-icon"},"↗️",-1)])],2),c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:o.value==="straightLine"}]),onClick:g[2]||(g[2]=P=>E("straightLine")),title:"直线"},[...g[9]||(g[9]=[c.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:o.value==="rectangle"}]),onClick:g[3]||(g[3]=P=>E("rectangle")),title:"矩形"},[...g[10]||(g[10]=[c.createElementVNode("div",{class:"tool-icon"},"▭",-1)])],2),c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:o.value==="ellipse"}]),onClick:g[4]||(g[4]=P=>E("ellipse")),title:"椭圆"},[...g[11]||(g[11]=[c.createElementVNode("div",{class:"tool-icon"},"⭕",-1)])],2)]),g[13]||(g[13]=c.createElementVNode("div",{class:"separator"},null,-1)),c.createElementVNode("div",Qw,[c.createElementVNode("div",Gw,[c.createElementVNode("div",Hw,[c.createElementVNode("div",{class:"color-swatch",style:c.normalizeStyle({backgroundColor:r.value})},null,4),c.withDirectives(c.createElementVNode("input",{type:"color","onUpdate:modelValue":g[5]||(g[5]=P=>r.value=P),onChange:A,class:"color-input-overlay"},null,544),[[c.vModelText,r.value]])])]),c.createElementVNode("div",Yw,[c.createElementVNode("div",{ref_key:"lineWidthBtnRef",ref:d,class:"tool-item",onClick:c.withModifiers(C,["stop"])},[c.createElementVNode("div",{class:"current-width-preview",style:c.normalizeStyle({height:l.value+"px",backgroundColor:"#fff"})},null,4)],512),(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[a.value?(c.openBlock(),c.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:h,class:"line-width-dropdown",style:c.normalizeStyle(p.value)},[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(f,P=>c.createElementVNode("div",{key:P.value,class:c.normalizeClass(["line-width-option",{selected:l.value===P.value}]),onClick:c.withModifiers(x=>v(P.value),["stop"])},[c.createElementVNode("span",zw,c.toDisplayString(P.label),1),c.createElementVNode("div",{class:"line-preview",style:c.normalizeStyle({height:P.value+"px",backgroundColor:l.value===P.value?"#1890ff":"#ddd"})},null,4)],10,Vw)),64))],4)):c.createCommentVNode("",!0)]))]),g[12]||(g[12]=c.createElementVNode("div",{class:"separator"},null,-1)),c.createElementVNode("div",{class:"action-buttons"},[c.createElementVNode("button",{class:"control-btn",onClick:S,title:"删除选中"}," 🗑️ "),c.createElementVNode("button",{class:"control-btn",onClick:D,title:"清空"}," ❌ "),c.createElementVNode("button",{class:"control-btn",onClick:O,title:"保存"}," 💾 ")])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-3cfc8415"]]),jw={class:"measure-content"},Kw={class:"measure-tools"},$w={key:0,class:"measure-results"},Xw={class:"result-row"},qw={class:"result-value"},Jw={class:"result-row"},Zw={class:"result-value"},eb={class:"result-row"},tb={class:"result-value"},ib={class:"result-row"},nb={class:"result-value"},sb={key:1,class:"result-row"},ob={class:"result-value"},rb={key:2,class:"result-row"},ab={class:"result-value"},lb={class:"measure-controls"},cb={class:"control-group",title:"单位"},db={class:"unit-display"},hb=["onClick"],ub=Re(c.defineComponent({__name:"LeitingMeasurement",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","close"],setup(i,{emit:e}){const t=i,n=e,s=c.inject("leitingMethods",c.ref({})),o=c.ref(null),r=c.ref(null),l=c.ref("m"),a=c.ref(!1),d=c.ref(null),h=c.ref(!1),p=c.ref({}),f=c.ref(null),u=[{label:"米 (m)",value:"m"},{label:"厘米 (cm)",value:"cm"},{label:"毫米 (mm)",value:"mm"}],m=B=>{const g=l.value;return g==="mm"?`${(B*1e3).toFixed(0)}mm`:g==="cm"?`${(B*100).toFixed(1)}cm`:`${B.toFixed(2)}m`},E=B=>B>1e6?`${(B/1e6).toFixed(2)} km²`:`${B.toFixed(2)} m²`,A=()=>{if(!o.value&&s.value?.getViewer){const B=s.value.getViewer(),g=s.value.getCesium();B&&g&&(o.value=new tl({viewer:B,cesium:g}),o.value.setUnit(l.value),o.value.setSnapping(a.value),o.value.onMeasure=P=>{d.value=P})}},C=B=>{o.value||A(),r.value===B?(r.value=null,o.value?.stop()):(r.value=B,o.value?.start(B))},v=B=>{l.value=B,h.value=!1},S=()=>{o.value&&(o.value.clearAll(),r.value=null,o.value.stop())},D=()=>{n("update:visible",!1)},O=B=>{if(h.value){h.value=!1;return}const P=B.currentTarget.getBoundingClientRect();p.value={position:"fixed",top:`${P.top}px`,left:`${P.right+5}px`,zIndex:3e3},h.value=!0},I=B=>{h.value&&f.value&&!f.value.contains(B.target)&&(h.value=!1)};return c.onMounted(()=>{document.addEventListener("click",I),t.visible&&c.nextTick(()=>A())}),c.onUnmounted(()=>{document.removeEventListener("click",I),o.value&&o.value.destroy()}),c.watch(()=>t.visible,B=>{B?c.nextTick(()=>A()):o.value&&(o.value.stop(),r.value=null)}),c.watch(s,B=>{B&&B.getViewer&&!o.value&&t.visible&&A()}),c.watch(l,B=>{o.value&&o.value.setUnit(B)}),(B,g)=>(c.openBlock(),c.createBlock(ke,{visible:t.visible,title:"量算",width:70,"min-width":70,height:480,"onUpdate:visible":g[3]||(g[3]=P=>n("update:visible",P)),onClose:D},{default:c.withCtx(()=>[c.createElementVNode("div",jw,[c.createElementVNode("div",Kw,[c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:r.value==="distance"}]),onClick:g[0]||(g[0]=P=>C("distance")),title:"距离测量"},[...g[4]||(g[4]=[c.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:r.value==="angle"}]),onClick:g[1]||(g[1]=P=>C("angle")),title:"角度测量"},[...g[5]||(g[5]=[c.createElementVNode("div",{class:"tool-icon"},"📐",-1)])],2),c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:r.value==="area"}]),onClick:g[2]||(g[2]=P=>C("area")),title:"面积测量"},[...g[6]||(g[6]=[c.createElementVNode("div",{class:"tool-icon"},"🔳",-1)])],2)]),g[15]||(g[15]=c.createElementVNode("div",{class:"separator"},null,-1)),d.value?(c.openBlock(),c.createElementBlock("div",$w,[d.value.type==="distance"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createElementVNode("div",Xw,[g[7]||(g[7]=c.createElementVNode("span",{class:"result-label"},"总长:",-1)),c.createElementVNode("span",qw,c.toDisplayString(m(d.value.dist)),1)]),c.createElementVNode("div",Jw,[g[8]||(g[8]=c.createElementVNode("span",{class:"result-label",style:{color:"#ff4d4f"}},"ΔX:",-1)),c.createElementVNode("span",Zw,c.toDisplayString(m(d.value.dx)),1)]),c.createElementVNode("div",eb,[g[9]||(g[9]=c.createElementVNode("span",{class:"result-label",style:{color:"#52c41a"}},"ΔY:",-1)),c.createElementVNode("span",tb,c.toDisplayString(m(d.value.dy)),1)]),c.createElementVNode("div",ib,[g[10]||(g[10]=c.createElementVNode("span",{class:"result-label",style:{color:"#1890ff"}},"ΔZ:",-1)),c.createElementVNode("span",nb,c.toDisplayString(m(d.value.dz)),1)])],64)):c.createCommentVNode("",!0),d.value.type==="angle"?(c.openBlock(),c.createElementBlock("div",sb,[g[11]||(g[11]=c.createElementVNode("span",{class:"result-label"},"角度:",-1)),c.createElementVNode("span",ob,c.toDisplayString(d.value.angle.toFixed(1))+"°",1)])):c.createCommentVNode("",!0),d.value.type==="area"?(c.openBlock(),c.createElementBlock("div",rb,[g[12]||(g[12]=c.createElementVNode("span",{class:"result-label"},"面积:",-1)),c.createElementVNode("span",ab,c.toDisplayString(E(d.value.area)),1)])):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),c.createElementVNode("div",lb,[c.createElementVNode("div",cb,[c.createElementVNode("div",{class:"tool-item",onClick:c.withModifiers(O,["stop"])},[c.createElementVNode("div",db,c.toDisplayString(l.value),1)]),(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[h.value?(c.openBlock(),c.createElementBlock("div",{key:0,ref_key:"unitDropdownRef",ref:f,class:"unit-dropdown",style:c.normalizeStyle(p.value)},[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(u,P=>c.createElementVNode("div",{key:P.value,class:c.normalizeClass(["unit-option",{selected:l.value===P.value}]),onClick:c.withModifiers(x=>v(P.value),["stop"])},c.toDisplayString(P.label),11,hb)),64))],4)):c.createCommentVNode("",!0)]))]),g[14]||(g[14]=c.createElementVNode("div",{class:"separator"},null,-1)),c.createElementVNode("div",{class:"action-buttons"},[c.createElementVNode("div",{class:"tool-item control-btn",onClick:S,title:"清空"},[...g[13]||(g[13]=[c.createElementVNode("div",{class:"tool-icon"},"🗑️",-1)])])])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-b766acb4"]]);function fb(){const i=c.ref(!1),e=c.reactive({x:0,y:0}),t=c.ref([]),n=c.ref(null);return{visible:i,position:e,items:t,contextData:n,show:(a,d,h)=>{a instanceof MouseEvent?(a.preventDefault(),e.x=a.clientX,e.y=a.clientY):(e.x=a.x,e.y=a.y),t.value=d,n.value=h,i.value=!0},hide:()=>{i.value=!1},addItem:a=>{t.value.push(a)},removeItem:a=>{t.value=t.value.filter(d=>d.id!==a)}}}const pb=["onClick"],gb={class:"menu-label"},mb={key:0,class:"menu-arrow"},Ab=Re(c.defineComponent({__name:"LeitingContextMenu",props:{visible:{type:Boolean},position:{},items:{}},emits:["update:visible","action"],setup(i,{emit:e}){const t=i,n=e,s=r=>{r.disabled||(r.action&&r.action(),n("action",r),n("update:visible",!1))},o=()=>{t.visible&&n("update:visible",!1)};return c.onMounted(()=>{document.addEventListener("click",o),document.addEventListener("contextmenu",r=>{r.target.closest(".leiting-context-menu")||o()})}),c.onUnmounted(()=>{document.removeEventListener("click",o)}),(r,l)=>c.withDirectives((c.openBlock(),c.createElementBlock("div",{class:"leiting-context-menu",style:c.normalizeStyle({left:i.position.x+"px",top:i.position.y+"px"}),onContextmenu:l[0]||(l[0]=c.withModifiers(()=>{},["prevent"]))},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.items,a=>(c.openBlock(),c.createElementBlock("div",{key:a.id,class:c.normalizeClass(["menu-item",{"menu-divided":a.divided,"menu-disabled":a.disabled}]),onClick:d=>s(a)},[c.createElementVNode("span",gb,c.toDisplayString(a.label),1),a.children?(c.openBlock(),c.createElementBlock("span",mb,"▶")):c.createCommentVNode("",!0)],10,pb))),128))],36)),[[c.vShow,i.visible]])}}),[["__scopeId","data-v-f288753b"]]),pn=Re(c.defineComponent({__name:"LeitingBIM",props:{accessToken:{},cesiumUrl:{},cesiumCssUrl:{},methods:{},viewerOptions:{},treeProps:{},showTree:{type:Boolean,default:!0},showMenu:{type:Boolean,default:!1},playerUrl:{default:"https://leiting.chenxisoft.com/resource/person/person.glb"},playerModelName:{default:"Person"},playerModelId:{default:"player_111"},playerScale:{default:.0032},tiandituToken:{default:"c25f14fb6bd4397cf8fe45144ff768d6"},globe:{type:Boolean,default:void 0},terrain:{type:Boolean,default:void 0},depthTest:{type:Boolean,default:void 0},mapProvider:{},tiandituLayerType:{},tiandituShowLabel:{type:Boolean,default:void 0},arcgisUrl:{},shadows:{type:Boolean,default:void 0},environmentMap:{type:Boolean,default:void 0},ambientOcclusion:{type:Boolean,default:void 0},time:{},brightness:{},backgroundColor:{},collision:{type:Boolean,default:void 0},mouseHabit:{},mode:{default:"3d"},mountAll3Dtiles:{},mountAllCad:{},saveRegion:{},saveCadRegion:{},saveCadCalibration:{},selectionChange:{},searchComponent:{}},emits:["register","init","ready"],setup(i,{emit:e}){const t=c.ref(),n=c.ref(),s=c.getCurrentInstance(),o=c.ref(!1),r=c.ref(""),l=c.ref({}),a=c.ref("3d"),d=i,h={title:"构件树",treeData:[]},p=c.ref(!1),f=c.ref(!1),u=c.ref(!1),m=c.ref(!1),E=c.ref(!1),A=c.ref(!1),C=c.ref(!1),v=c.ref(!1),S=c.ref(!1),D=c.ref(!1),{visible:O,position:I,items:B,show:g,hide:P}=fb(),x=c.ref([]),F=Y=>{x.value.push(Y)},_=Y=>{x.value=x.value.filter(j=>j.id!==Y)},H=c.ref([]),L=c.ref(""),w=c.ref(null),y=c.ref([]),b=c.reactive({tree:!1,section:!1,roam:!1,info:!1,adjustModel:!1,setting:!1,cadLayer:!1,cadPosition:!1,annotation:!1}),M=(Y,j)=>{Y==="componentTree"&&(Y="tree"),Y==="componentInfo"&&(Y="info"),Y in b&&(b[Y]=j)},k=c.shallowRef({});c.provide("leitingMethods",k);const Q=c.ref(d.showMenu),R=c.ref([]);c.watch(()=>d.showMenu,Y=>{Q.value=Y},{immediate:!0}),c.watch(()=>d.mode,Y=>{Y&&k.value?.set2d&&k.value.set2d(Y==="2d")});const T=c.ref("dark");c.provide("leiting-theme",T);const U=c.ref([]),V=c.computed(()=>{const Y=[];return p.value&&(Y.push("tree"),Y.push("componentTree")),f.value&&Y.push("section"),u.value&&Y.push("roam"),m.value&&(Y.push("info"),Y.push("componentInfo")),E.value&&Y.push("adjust"),A.value&&Y.push("setting"),C.value&&Y.push("cadLayer"),v.value&&Y.push("cadPosition"),S.value&&Y.push("annotation"),D.value&&(Y.push("measure"),Y.push("measurement")),Y.push(...U.value),Y}),W=c.ref(null),X=(Y,j)=>{Y==="componentTree"||Y==="tree"?p.value=j:Y==="section"?f.value=j:Y==="roam"?u.value=j:Y==="componentInfo"||Y==="info"?m.value=j:Y==="homeView"?k.value?.is2dMode?.()?k.value?.flyToTopView?.({}):k.value?.flyToTileset?.({}):Y==="adjustModel"?(E.value=j,j&&W.value&&W.value.setModelType("BIM")):Y==="osgbAdjust"?(E.value=j,j&&W.value&&W.value.setModelType("OSGB")):Y==="setting"?A.value=j:Y==="cadLayer"?C.value=j:Y==="cadPosition"?v.value=j:Y==="annotation"?S.value=j:Y==="measurement"?D.value=j:j?U.value.includes(Y)||U.value.push(Y):U.value=U.value.filter(te=>te!==Y)};c.watch(p,async Y=>{if(Y&&k.value?.loadTreeForModel&&k.value?.getMapTileset){const j=k.value.getMapTileset(),te=Object.values(j).map(async le=>{if(le.leiting&&le.leiting.model?.treeUrl){const re=le.leiting.model.modelId;try{le.leiting?.node?.batchIdEIDInfos||await k.value.loadNodeDetailsForModel(re);const ce=await k.value.loadTreeForModel(re);ce&&(Array.isArray(ce)?ce:[ce]).forEach(Te=>{Te&&!y.value.find(et=>et.id===Te.id)&&(Te.modelId=re,y.value=[...y.value,Te])})}catch(ce){console.warn(`Failed to lazy load tree for ${re}`,ce)}}});await Promise.all(te)}});const ee=()=>{k.value&&(k.value.getDxfModels&&(H.value=k.value.getDxfModels()||[]),k.value.getCadModelId&&(L.value=k.value.getCadModelId()||""))};c.watch(C,Y=>{Y&&ee()}),c.watch(v,Y=>{Y&&(ee(),w.value&&H.value.length&&w.value.addGltfOr3dTilesModelList(H.value))});const oe=e,ne=Y=>{k.value&&k.value.saveCadCalibration&&k.value.saveCadCalibration(Y),k.value&&k.value.saveCadRegion&&k.value.saveCadRegion(Y)};return c.onMounted(async()=>{if(n.value&&pe.setContainer(n.value),!!t.value)try{const Y={...ft,cesiumUrl:d.cesiumUrl||ft.cesiumUrl,cesiumCssUrl:d.cesiumCssUrl||ft.cesiumCssUrl,accessToken:d.accessToken||wn()||ft.accessToken};await En(Y);const j=d.accessToken||wn()||ft.accessToken;j&&(Cesium.Ion.defaultAccessToken=j),o.value=!0;const te=async(re={},ce)=>{if(t.value){const{showMenu:ve,showTree:Te,globe:et,terrain:xt,depthTest:gn,mapProvider:St,tiandituLayerType:mn,tiandituShowLabel:vi,arcgisUrl:Wt,shadows:ks,environmentMap:Eb,ambientOcclusion:wb,time:bb,brightness:vb,backgroundColor:Ib,collision:Bb,mouseHabit:xb,heightBasedZoom:Sb,mode:Al,...Xe}=re||{},Tb=d.showMenu!==void 0?d.showMenu:ve!==void 0?ve:!0;Q.value=Tb;const Me=(q,Ce,Ye)=>q!==void 0?q:Ce!==void 0?Ce:Ye,yl=Me(d.globe,et,!1),Cl=Me(d.terrain,xt,!1),El=Me(d.depthTest,gn,!1),wl=Me(d.mapProvider,St,"tianditu"),bl=Me(d.tiandituLayerType,mn,"img_w"),vl=Me(d.tiandituShowLabel,vi,!1),Il=Me(d.arcgisUrl,Wt,"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"),Bl=Me(d.shadows,ks,!1),xl=Me(d.environmentMap,Eb,!1),Sl=Me(d.ambientOcclusion,wb,!1),Tl=Me(d.time,bb,void 0),Ml=Me(d.brightness,vb,1),An=d.mode||Al||"3d";console.log("LeitingBIM Mode:",An,"Props:",d.mode,"Options:",Al),a.value=An;const Mb=An==="2d"?"#000000":"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)",Dl=Me(d.backgroundColor,Ib,Mb),kl=Me(d.collision,Bb,!1),Pl=Me(d.mouseHabit,xb,0),Fl=Me(d.heightBasedZoom,Sb,!1);l.value={globe:yl,terrain:Cl,depthTest:El,mapProvider:wl,tiandituLayerType:bl,tiandituShowLabel:vl,arcgisUrl:Il,shadows:Bl,environmentMap:xl,ambientOcclusion:Sl,time:Tl,brightness:Ml,backgroundColor:Dl,collision:kl,mouseHabit:Pl,heightBasedZoom:Fl};const Ii=uy({container:t.value,appContext:s?.appContext,methods:{...k.value,handleMenuAction:X,setCardFullHeight:M,onLoadingStatus:q=>{q?pe.loading(q,"",n.value):pe.close()},...Xe,tilesLoad3dTiles:async q=>{let Ce=q.leiting?.tree;const Ye=q.leiting?.model?.modelId;if(!Ce&&p.value&&k.value?.loadTreeForModel)try{Ce=await k.value.loadTreeForModel(Ye)}catch(xi){console.warn("Failed to lazy load tree",xi)}Ce&&(Array.isArray(Ce)?Ce:[Ce]).forEach(Mt=>{Mt&&!y.value.find(Ol=>Ol.id===Mt.id)&&(Mt.modelId=Ye,y.value=[...y.value,Mt])});const{brightness:Ps,contrast:Fs,saturation:tt}=Ii.methods.getConfigure();Ii.methods.setModelColorAdjustment({brightness:Ps,contrast:Fs,saturation:tt}),Xe.tilesLoad3dTiles?.(q)},mountAll3Dtiles:q=>{d.mountAll3Dtiles&&d.mountAll3Dtiles(q),Xe.mountAll3Dtiles?.(q)},updateModels:q=>{if(Array.isArray(q))if(q.length===0)y.value=[];else{const Ce=q.map(Ye=>Ye.modelId);y.value=y.value.filter(Ye=>Ce.includes(Ye.modelId))}},mountAllCad:q=>{if(Ii.methods.setModelBrightness){const Ce=d.brightness!==void 0?d.brightness:l.value.brightness;Ce!==void 0&&Ii.methods.setModelBrightness(Ce)}d.mountAllCad&&d.mountAllCad(q),Xe.mountAllCad?.(q)},saveRegion:q=>{d.saveRegion&&d.saveRegion(q),Xe.saveRegion?.(q)},saveCadRegion:q=>{d.saveCadRegion&&d.saveCadRegion(q),Xe.saveCadRegion?.(q)},saveCadCalibration:q=>{d.saveCadCalibration&&d.saveCadCalibration(q),Xe.saveCadCalibration?.(q)},selectionChange:q=>{d.selectionChange&&d.selectionChange(q),Xe.selectionChange?.(q)},onSearchComponent:q=>{d.searchComponent&&d.searchComponent(q),Xe.searchComponent?.(q)}},viewerOptions:d.viewerOptions,options:{...Xe,mode:An,playerUrl:d.playerUrl,playerModelName:d.playerModelName,playerModelId:d.playerModelId,playerScale:d.playerScale,globe:yl,terrain:Cl,depthTest:El,mapProvider:wl,tiandituLayerType:bl,tiandituShowLabel:vl,tiandituToken:d.tiandituToken,arcgisUrl:Il,shadows:Bl,environmentMap:xl,ambientOcclusion:Sl,time:Tl,brightness:Ml,backgroundColor:Dl,collision:kl,mouseHabit:Pl,heightBasedZoom:Fl},callbacks:{onLoading:q=>q?pe.loading(q,"",n.value):pe.close(),onSuccess:q=>pe.success(q,"",void 0,n.value),onError:q=>pe.error(q,"",void 0,n.value)}}),{Cesium:Tt,viewer:jt,methods:yn,menuEvents:Bi}=Ii,ge=yn;Bi.on("showMenu",q=>{Q.value=q}),Bi.on("insertMenu",q=>{R.value=[...R.value,...q]}),Bi.on("setMenuActive",(q,Ce)=>{X(q,Ce)}),k.value=ge,ce&&(ce.value=ge),Bi.on("setMode",q=>{a.value=q}),Bi.on("deleteAllModels",()=>{y.value=[]}),new Tt.ScreenSpaceEventHandler(jt.scene.canvas).setInputAction(async q=>{if(P(),a.value==="2d")return;const Ce=jt.scene.pick(q.position),Ye=jt.container.getBoundingClientRect(),Ps=Ye.left+q.position.x,Fs=Ye.top+q.position.y,tt=[];if(Tt.defined(Ce)&&Ce instanceof Tt.Cesium3DTileFeature){const xi=ge.baseCompt.getFeatureId(Ce),Mt=ri(Ce.tileset);ge.baseCompt.hasSelectedFeaturesMap[Mt]?.some(Si=>Si.batchId===xi&&Si.rank===0)||(await ge.baseCompt.clearSelection(),await ge.baseCompt.toggleMultiSelect(Mt,xi,ge.baseCompt.selectedColor)),tt.push({id:"details",label:"构件详情",action:()=>{m.value=!0}}),tt.push({id:"hide",label:"隐藏选中构件",action:async()=>{const Ti=(await ge.baseCompt.getSelected()).map(it=>({elementId:it.elementId,modelId:it.modelId,show:!1}));ge.baseCompt.setComponentVisibility(Ti)}}),tt.push({id:"translucent",label:"半透明选中构件",action:async()=>{const Ti=(await ge.baseCompt.getSelected()).map(it=>({elementId:it.elementId,modelId:it.modelId,rgba:{...it.rgba,a:.3}}));await ge.baseCompt.setSelectColorUserModelCpt(Ti,{rank:0})}}),tt.push({id:"isolate",label:"隔离选中构件",divided:!0,action:async()=>{await ge.baseCompt.loadAllNodeDetailsForModel();const Ti=(await ge.baseCompt.getSelected()).map(it=>({elementId:it.elementId,modelId:it.modelId,show:!0}));ge.baseCompt.isolateComponentVisibility(Ti)}})}tt.push({id:"showAll",label:"显示所有",action:async()=>{ge.baseCompt.setAllComponentsVisibility(!0),await ge.baseCompt.clearSelection()}}),tt.push(...x.value),g({x:Ps,y:Fs},tt)},Tt.ScreenSpaceEventType.RIGHT_CLICK),ge.addContextMenuItems=F,ge.insertContextMenu=ge.addContextMenuItems,ge.removeContextMenuItems=_,ge.deleteContextMenu=ge.removeContextMenuItems,ge.closeContextMenu=P,ge.hideContextMenu=ge.closeContextMenu,await c.nextTick();const Rl=re?.onLoaded||re?.onloaded;Rl&&Rl({Cesium:Tt,viewer:jt,methods:yn}),oe("init",{Cesium:Tt,viewer:jt,methods:yn}),oe("ready",{Cesium:Tt,viewer:jt,methods:yn})}};let le=!1;oe("register",(re,ce)=>{le=!0,te(re,ce)}),le||setTimeout(()=>{k.value.getViewer||te()},0)}catch(Y){r.value="Failed to load Cesium: "+(Y.message||Y),console.error(Y)}}),c.onUnmounted(()=>{pe.setContainer(null)}),(Y,j)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["leiting-bim-container",[`theme-${T.value}`]]),onContextmenu:j[11]||(j[11]=c.withModifiers(()=>{},["prevent","stop"]))},[!o.value&&!r.value?(c.openBlock(),c.createBlock(c.unref(me.Spin),{key:0,class:"loading",size:"large",tip:"加载基础组件中..."})):c.createCommentVNode("",!0),r.value?(c.openBlock(),c.createBlock(c.unref(me.Alert),{key:1,class:"error",type:"error",message:r.value,"show-icon":""},null,8,["message"])):c.createCommentVNode("",!0),c.createElementVNode("div",{ref_key:"containerRef",ref:t,class:"cesium-viewer"},[c.createElementVNode("div",{ref_key:"uiOverlayRef",ref:n,class:"leiting-ui-overlay"},[c.createVNode(Ei,{visible:m.value,"full-height":b.info,"onUpdate:visible":j[0]||(j[0]=te=>m.value=te)},null,8,["visible","full-height"]),c.createVNode(wi,{ref_key:"LeitingPositionRef",ref:W,visible:E.value,"full-height":b.adjustModel,"onUpdate:visible":j[1]||(j[1]=te=>E.value=te)},null,8,["visible","full-height"]),c.createVNode(bi,{visible:A.value,"full-height":b.setting,"tianditu-token":d.tiandituToken,"initial-config":l.value,"onUpdate:visible":j[2]||(j[2]=te=>A.value=te)},null,8,["visible","full-height","tianditu-token","initial-config"]),i.showTree!==!1?(c.openBlock(),c.createBlock(rn,c.mergeProps({key:0},{...h,...i.treeProps},{visible:p.value,"full-height":b.tree,"tree-data":y.value.length>0?y.value:i.treeProps?.treeData||[],"onUpdate:visible":j[3]||(j[3]=te=>{p.value=te})}),null,16,["visible","full-height","tree-data"])):c.createCommentVNode("",!0),c.createVNode(Ww,{visible:S.value,"onUpdate:visible":j[4]||(j[4]=te=>S.value=te)},null,8,["visible"]),c.createVNode(ub,{visible:D.value,"onUpdate:visible":j[5]||(j[5]=te=>D.value=te)},null,8,["visible"]),c.createVNode(yi,{visible:f.value,"full-height":b.section,"onUpdate:visible":j[6]||(j[6]=te=>f.value=te)},null,8,["visible","full-height"]),c.createVNode(Ci,{visible:u.value,"full-height":b.roam,"onUpdate:visible":j[7]||(j[7]=te=>u.value=te)},null,8,["visible","full-height"]),c.createVNode(Ai,{visible:Q.value,"active-ids":V.value,"custom-items":R.value,onAction:X,"is-2d":a.value==="2d"},null,8,["visible","active-ids","custom-items","is-2d"]),c.createVNode(VE,{visible:C.value,"current-model-id":L.value,"onUpdate:visible":j[8]||(j[8]=te=>C.value=te)},null,8,["visible","current-model-id"]),c.createVNode(Nw,{ref_key:"cadPositionRef",ref:w,visible:v.value,"onUpdate:visible":j[9]||(j[9]=te=>v.value=te),onSave:ne},null,8,["visible"]),c.createVNode(Ab,{visible:c.unref(O),position:c.unref(I),items:c.unref(B),"onUpdate:visible":j[10]||(j[10]=te=>O.value=te)},null,8,["visible","position","items"]),c.renderSlot(Y.$slots,"default",c.normalizeProps(c.guardReactiveProps({methods:k.value,isReady:o.value})),void 0,!0)],512)],512)],34))}}),[["__scopeId","data-v-3ac9f73e"]]);function ml(i){const e=c.ref(),t=c.ref(i.theme||"dark"),n=c.ref(i.menuSize||"medium");c.provide("leiting-theme",t),c.provide("leiting-menu-size",n);function s(l){c.onUnmounted(()=>{e.value=null}),l(i,e)}function o(){const l=c.unref(e);return l||console.error("未获取到leiting实例!"),l}const r=new Proxy({},{get(l,a){const d=o();if(!d)return;const h=d[a];return typeof h=="function"?h.bind(d):h},set(l,a,d){const h=o();return h?(h[a]=d,!0):!1}});return[s,r]}const yb=ft,Cb={install:(i,e)=>{if(i.component("LeitingBIM",pn),i.component("LeitingTree",rn),i.component("LeitingDraggableCard",ke),i.component("leiting-draggable-card",ke),i.component("LeitingMenu",Ai),i.component("leiting-menu",Ai),i.component("LeitingSection",yi),i.component("leiting-section",yi),i.component("LeitingPlayer",Ci),i.component("leiting-player",Ci),i.component("LeitingInfo",Ei),i.component("leiting-info",Ei),i.component("LeitingPosition",wi),i.component("leiting-position",wi),i.component("LeitingSetting",bi),i.component("leiting-setting",bi),!e)return;const t={...yb,...e};t.cesiumUrl&&En(t).catch(n=>{console.error("[LeitingBim] Failed to load Cesium resources:",n)}),i.config.globalProperties.$leitingBimOptions=t}};N.DEFAULT_CESIUM_CONFIG=ft,N.LeiTingBIM=pn,N.LeiTingDraggableCard=ke,N.LeiTingInfo=Ei,N.LeiTingMenu=Ai,N.LeiTingPlayer=Ci,N.LeiTingPosition=wi,N.LeiTingSection=yi,N.LeiTingSetting=bi,N.LeiTingTree=rn,N.LeitingBIM=pn,N.LeitingDraggableCard=ke,N.LeitingInfo=Ei,N.LeitingMenu=Ai,N.LeitingPlayer=Ci,N.LeitingPosition=wi,N.LeitingSection=yi,N.LeitingSetting=bi,N.LeitingTree=rn,N.default=Cb,N.getAccessToken=wn,N.leitingBim=pn,N.loadCesium=En,N.useLeiTing=ml,N.useLeiting=ml,N.waitForCesium=_l,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
118
+ `});f.isModelAdjustment=!0,p.customShader=f}else e.brightness!==void 0&&e.brightness!==1&&!p.style&&(p.style=new n.Cesium3DTileStyle({color:`color('white') * ${e.brightness}`}))}}setModelBrightness(e){this.setModelColorAdjustment({brightness:e})}_defaultSkyBox=null;_updateLightDirection=e=>{e.light instanceof this.cesium.DirectionalLight&&(e.light.direction=e.camera.directionWC)};setEnvironmentMapEnable(e){this.is2d||(e?(this.viewer.scene.light=new this.cesium.DirectionalLight({direction:this.viewer.scene.camera.directionWC}),this.viewer.scene.preRender.addEventListener(this._updateLightDirection)):(this._defaultSkyBox&&(this.viewer.scene.skyBox=this._defaultSkyBox),this.viewer.scene.preRender.removeEventListener(this._updateLightDirection),this.viewer.scene.light=new this.cesium.SunLight),this.viewer.scene.imageBasedLighting&&(this.viewer.scene.imageBasedLighting.imageBasedLightingFactor=e?new this.cesium.Cartesian2(2,2):new this.cesium.Cartesian2(1,1)))}setAmbientOcclusion(e){if(this.is2d)return;const t=this.viewer.scene;if(!t||!t.postProcessStages||!t.postProcessStages.ambientOcclusion)return;const n=t.postProcessStages.ambientOcclusion;n.enabled=e,e&&(n.uniforms.ambientOcclusionOnly=!1,n.uniforms.intensity=3,n.uniforms.bias=.1,n.uniforms.lengthCap=.03,n.uniforms.stepSize=1,n.uniforms.blurStepSize=.86)}setCollisionDetection(e){if(this.is2d){this.viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1;return}const t=this.viewer.scene.screenSpaceCameraController;t.enableCollisionDetection=e,e||t.minimumZoomDistance<1&&(t.minimumZoomDistance=1)}_customZoomHandler=null;_zoomInertiaListener=null;setHeightBasedZoom(e){const t=this.viewer.scene.screenSpaceCameraController,n=this.cesium;if(this.viewer.camera.frustum.near=1e-5,this.viewer.camera.frustum.far=1e8,e||(this.viewer.camera.frustum.near=.1),this._customZoomHandler&&(this._customZoomHandler.destroy(),this._customZoomHandler=null),this._zoomInertiaListener&&(this._zoomInertiaListener(),this._zoomInertiaListener=null),!e){t.zoomEventTypes.includes(n.CameraEventType.WHEEL)||t.zoomEventTypes.push(n.CameraEventType.WHEEL);return}t.zoomEventTypes=t.zoomEventTypes.filter(l=>l!==n.CameraEventType.WHEEL),this._customZoomHandler=new n.ScreenSpaceEventHandler(this.viewer.scene.canvas);let s=null;this._customZoomHandler.setInputAction(l=>{s=l.endPosition},n.ScreenSpaceEventType.MOUSE_MOVE);let o=0,r=null;this._zoomInertiaListener=this.viewer.scene.preUpdate.addEventListener(()=>{if(Math.abs(o)<.001||!r){o=0;return}const l=this.viewer.camera,a=o*.2;if(s){const h=l.getPickRay(s);if(h){let p=this.viewer.scene.pickPosition(s);if(!p){const f=n.IntersectionTests.rayEllipsoid(h,this.viewer.scene.globe.ellipsoid);f&&(p=n.Ray.getPoint(h,f.start))}if(p){const f=n.Cartesian3.distance(l.position,p);if(a>0&&a>f-.01){if(o=0,f>.01){const u=n.Cartesian3.multiplyByScalar(r,f-.01,new n.Cartesian3);l.position=n.Cartesian3.add(l.position,u,new n.Cartesian3)}return}}}}const d=n.Cartesian3.multiplyByScalar(r,a,new n.Cartesian3);l.position=n.Cartesian3.add(l.position,d,new n.Cartesian3),o-=a}),this._customZoomHandler.setInputAction(l=>{const a=this.viewer.camera,d=a.positionCartographic.height;let h=.1;d<4?h=.08+d/4*.08:d>1e3&&(h=.1+Math.min((d-1e3)/1e3,1)*.1);let p=d*h;p=Math.max(.001,p);const f=Math.sign(l);if(d<.2&&f>0){pe.warning("无法继续放大");return}if(!s)r=a.direction;else{const u=a.getPickRay(s);if(u){let m=this.viewer.scene.pickPosition(s);if(!m){const E=n.IntersectionTests.rayEllipsoid(u,this.viewer.scene.globe.ellipsoid);E&&(m=n.Ray.getPoint(u,E.start))}if(m){const E=n.Cartesian3.subtract(m,a.position,new n.Cartesian3);r=n.Cartesian3.normalize(E,new n.Cartesian3)}else r=a.direction}else r=a.direction}o+=f>0?p:-p},n.ScreenSpaceEventType.WHEEL)}setMouseHabit(e){if(this.is2d)return;const t=this.viewer.scene.screenSpaceCameraController;t.enableTranslate=!0,t.enableRotate=!0,t.enableZoom=!0,t.enableTilt=!0,t.enableLook=!1,t.lookEventTypes=[],e===1?(t.rotateEventTypes=[this.cesium.CameraEventType.RIGHT_DRAG],t.zoomEventTypes=[this.cesium.CameraEventType.MIDDLE_DRAG,this.cesium.CameraEventType.WHEEL,this.cesium.CameraEventType.PINCH],t.tiltEventTypes=[this.cesium.CameraEventType.PINCH,this.cesium.CameraEventType.LEFT_DRAG]):(t.rotateEventTypes=[this.cesium.CameraEventType.LEFT_DRAG],t.zoomEventTypes=[this.cesium.CameraEventType.RIGHT_DRAG,this.cesium.CameraEventType.WHEEL,this.cesium.CameraEventType.PINCH],t.tiltEventTypes=[this.cesium.CameraEventType.PINCH,this.cesium.CameraEventType.MIDDLE_DRAG])}}class hy{cesium;viewer;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer}getCameraView(){const e=this.viewer.camera;return{position:{x:e.position.x,y:e.position.y,z:e.position.z},destination:{x:e.position.x,y:e.position.y,z:e.position.z},orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},duration:1}}flyToCameraView(e){const{position:t,orientation:n,duration:s}=e,o=new this.cesium.Cartesian3(t.x,t.y,t.z),r=new this.cesium.HeadingPitchRoll(n.heading,n.pitch,n.roll);!s||s<=0?this.viewer.camera.setView({destination:o,orientation:r}):this.viewer.camera.flyTo({destination:o,orientation:r,duration:s})}getCurrentCameraPositionAndTarget(){const e=this.getCameraView();return{position:e.position,target:{heading:e.orientation.heading,pitch:e.orientation.pitch,roll:e.orientation.roll},duration:e.duration}}setCameraView(e){const t=e.target||e.orientation||{},n=e.destination||e.position||{};this.flyToCameraView({position:{x:Number(n.x),y:Number(n.y),z:Number(n.z)},destination:{x:Number(n.x),y:Number(n.y),z:Number(n.z)},orientation:{heading:Number(t.heading||0),pitch:Number(t.pitch||0),roll:Number(t.roll||0)},duration:e.duration})}flyToLonLatHeight(e,t,n,s=1){const o=this.cesium.Cartesian3.fromDegrees(e,t,n),r={heading:this.cesium.Math.toRadians(0),pitch:this.cesium.Math.toRadians(-90),roll:0};!s||s<=0?this.viewer.camera.setView({destination:o,orientation:r}):this.viewer.camera.flyTo({destination:o,orientation:r,duration:s})}}function uy(i){const{container:e,appContext:t,methods:n,viewerOptions:s,options:o,callbacks:r}=i,l=new Gi,a=window.Cesium;if(!a)throw new Error("Cesium is not loaded");e.id=`cesium-container-${op()}`;const d={animation:!1,timeline:!1,infoBox:!1,homeButton:!1,fullscreenButton:!1,sceneModePicker:!1,navigationHelpButton:!1,geocoder:!1,baseLayerPicker:!1,selectionIndicator:!1,heightBasedZoom:!0,creditContainer:document.createElement("div"),contextOptions:{webgl:{alpha:!0}}},h=t?.config?.globalProperties?.$leitingBimOptions,p={...d,...h?.viewerOptions??{},...s??{}},f=new a.Viewer(e,p);f.camera.setView({destination:a.Cartesian3.fromDegrees(108,32,1e7),orientation:{heading:a.Math.toRadians(0),pitch:a.Math.toRadians(-90),roll:0}});let u=n;if(!u&&h&&(h.methods||(h.methods={}),u=h.methods),u){const m=new yp({cesium:a,viewer:f,options:o,callbacks:r}),E=new Dr({cesium:a,viewer:f}),A=new dy({cesium:a,viewer:f}),C=new Cp({cesium:a,viewer:f}),v=new hy({cesium:a,viewer:f});let S;const D=new tl({cesium:a,viewer:f});o&&(o.globe!==void 0&&A.setGlobeEnvironmentVisible(o.globe),o.terrain!==void 0&&A.setTerrainEnable(o.terrain),o.depthTest!==void 0&&A.setDepthTestEnable(o.depthTest),o.mapProvider&&o.mode!=="2d"&&A.changeBaseMap(o.mapProvider,{token:o.tiandituToken,layerType:o.tiandituLayerType,showAnnotation:o.tiandituShowLabel,url:o.arcgisUrl}),o.shadows!==void 0&&A.setShadowsEnable(o.shadows),o.environmentMap!==void 0&&A.setEnvironmentMapEnable(o.environmentMap),o.ambientOcclusion!==void 0&&A.setAmbientOcclusion(o.ambientOcclusion),o.time!==void 0&&A.setTime(o.time),o.brightness!==void 0&&A.setModelBrightness(o.brightness),o.backgroundColor!==void 0&&A.setBackgroundColor(o.backgroundColor),o.collision!==void 0&&A.setCollisionDetection(o.collision),o.mouseHabit!==void 0&&A.setMouseHabit(o.mouseHabit),o.heightBasedZoom!==void 0&&A.setHeightBasedZoom(o.heightBasedZoom)),o&&o.mode==="2d"&&(console.log("InitMap: Setting CAD Mode 2D"),A.setCadMode("2d"),S=new el({cesium:a,viewer:f})),E.events.on("tilesetLoaded",g=>{m.baseCompt.attachTileset(g,m.baseCompt.selectedColor),m.baseSection.attachTileset(g,g.leiting?.model?.modelId),u&&u.tilesLoad3dTiles&&u.tilesLoad3dTiles(g),o?.tilesLoad3dTiles&&o.tilesLoad3dTiles(g.leiting)}),E.events.on("loadingStatus",g=>{u&&u.onLoadingStatus&&u.onLoadingStatus(g)}),E.events.on("mountAll3Dtiles",({modelList:g})=>{o?.mountAll3Dtiles&&o.mountAll3Dtiles(g),u?.mountAll3Dtiles&&u.mountAll3Dtiles(g)}),E.events.on("updateModels",({modelList:g})=>{o?.updateModels&&o.updateModels(g),u?.updateModels&&u.updateModels(g)}),C.events.on("mountAllCad",g=>{o?.mountAllCad&&o.mountAllCad(g),u?.mountAllCad&&u.mountAllCad(g)}),m.baseCompt.loadNodeDetailsForModel=g=>E.loadNodeDetailsForModel(g),m.baseCompt.selectionChange(g=>{g.length!==0&&(o?.selectionChange&&o.selectionChange(g),u?.selectionChange&&u.selectionChange(g))}),u.onSearchComponent=g=>{o?.searchComponent&&o.searchComponent(g),u?.searchComponent&&u.searchComponent(g)};const O=u.saveRegion;u.saveRegion=g=>{o?.saveRegion&&o.saveRegion(g),O&&O!==o?.saveRegion&&O(g)};const I=u.saveCadCalibration;u.saveCadCalibration=g=>{o?.saveCadCalibration&&o.saveCadCalibration(g),I&&I!==o?.saveCadCalibration&&I(g)};const B=u.saveCadRegion;u.saveCadRegion=g=>{o?.saveCadRegion&&o.saveCadRegion(g),B&&B!==o?.saveCadRegion&&B(g)},u.getCesium=()=>a,u.getViewer=()=>f,u.getAnnotationInstance=()=>S,u.getMeasureInstance=()=>D,u.flyToCamera=g=>{v.setCameraView(g)},u.flyToLonLatHeight=(g,P,x,F=1)=>{v.flyToLonLatHeight(g,P,x,F)},u.flyTo=u.flyToCamera,u.getCameraState=()=>v.getCameraView(),u.getCameraInfo=u.getCameraState,u.restoreCameraState=g=>v.flyToCameraView(g),u.flyToCameraView=u.restoreCameraState,u.getCameraPositionTarget=()=>v.getCurrentCameraPositionAndTarget(),u.getCurrentCameraPositionAndTarget=u.getCameraPositionTarget,u.setCameraLookAt=g=>v.setCameraView(g),u.setCameraView=u.setCameraLookAt,u.setCanvasBackground=g=>A.setBackgroundColor(g),u.setBackgroundColor=u.setCanvasBackground,u.setAntiAliasing=g=>m.enableCesiumFXAA(g),u.enableCesiumFXAA=u.setAntiAliasing,u.setSceneVisibility=g=>m.setSceneOptions(g),u.setSceneOptions=u.setSceneVisibility,u.addDebugPoint=(g,P,x=0)=>{f.entities.add({position:a.Cartesian3.fromDegrees(g,P,x),point:{pixelSize:10,color:a.Color.RED}})},u.addPoint=u.addDebugPoint,u.toggleDebugLabels=()=>m.enableTestLabel(),u.enableTestLabel=u.toggleDebugLabels,u.captureScreenshot=()=>{const g=f.scene.canvas;return f.render(),g.toDataURL("image/png")},u.getImageBase64=u.captureScreenshot,u.captureDomScreenshot=(g,P)=>m.getSnapDomSImageBase64(g,P),u.getSnapDomSImageBase64=u.captureDomScreenshot,u.addModels=g=>E.addModels(g),u.add3DtilesModel=u.addModels,u.addObliquePhotography=g=>E.addOSGB(g),u.addOSGB=u.addObliquePhotography,u.adjustOSGBModelMatrix=g=>E.updateOSGBMatrix(g),u.updateOSGBMatrix=u.adjustOSGBModelMatrix,u.setModelVisibility=g=>E.showModels(g),u.showModels=u.setModelVisibility,u.showTileset=u.setModelVisibility,u.removeModels=g=>E.deleteModels(g),u.deleteModels=u.removeModels,u.clearAllModels=()=>{E.deleteAllModels(),l.emit("deleteAllModels")},u.deleteAllModelList=u.clearAllModels,u.deleteAllModels=u.clearAllModels,u.flyToModel=g=>E.flyToTileset(g),u.flyToTileset=u.flyToModel,u.flyToByModelId=u.flyToModel,u.setModelBrightness=g=>m.updateModelEffect(g),u.updateModelEffect=u.setModelBrightness,u.getAllTilesets=()=>E.getMapTileset(),u.getMapTileset=u.getAllTilesets,u.getCurrentModelId=()=>E.getBIMmodelId(),u.getBIMmodelId=u.getCurrentModelId,u.getLoadedModels=()=>E.getModelList(),u.getModelList=u.getLoadedModels,u.loadModelStructure=async g=>{const P=typeof g=="string"?g:g?.modelId;if(!P){console.warn("loadModelStructure: modelId is required");return}return await E.loadTreeForModel(P)},u.loadTreeForModel=u.loadModelStructure,u.loadModelDetails=async g=>{const P=typeof g=="string"?g:g?.modelId;if(!P){console.warn("loadModelDetails: modelId is required");return}return await E.loadNodeDetailsForModel(P)},u.loadNodeDetailsForModel=u.loadModelDetails,u.setMapTileset=g=>E.setMapTileset(g),u.setCurrentModelId=g=>E.setBIMmodelId(g),u.setBIMmodelId=u.setCurrentModelId,u.setModelList=g=>E.setModelList(g),u.highlightComponents=(g,P={})=>m.baseCompt.setSelectColorUserModelCpt(g,P),u.setSelectColorUserModelCpt=u.highlightComponents,m.baseCompt.setLoadNodeDetailsCallback(g=>E.loadNodeDetailsForModel(g)),u.highlightAllComponents=g=>m.baseCompt.setAllSelectColorUserModelCpt(g),u.setAllSelectColorUserModelCpt=u.highlightAllComponents,u.setSelectColorUserModelCptByClear=(g,P)=>{m.baseCompt.clearAllHaveSelected(),m.baseCompt.setSelectColorUserModelCpt(g.selectCpts,P??{rank:0})},u.clearSelectColorUserModelCpt=()=>m.baseCompt.clearAllHaveSelected(),u.selectComponents=(g,P)=>{m.baseCompt.clearAllHaveSelected(),m.baseCompt.setSelectColorUserModelCpt(g,P??{rank:0})},u.setSelecteds=u.selectComponents,u.setSelectionColor=(g,P,x,F)=>m.baseCompt.setSelectedColorRgba(g,P,x,F),u.setSelectedColor=u.setSelectionColor,u.clearSelection=()=>m.baseCompt.clearAllHaveSelected(),u.clearAllHaveSelected=u.clearSelection,u.getSelectedComponents=g=>m.baseCompt.getSelected(g),u.getSelected=u.getSelectedComponents,u.onSelectionChange=g=>{m.baseCompt.selectionChange(g)},u.selectionChange=u.onSelectionChange,u.flyToComponents=g=>m.baseCompt.flyToObjects(g),u.flyToObjects=u.flyToComponents,u.setConstructionData=async g=>{if(g&&Array.isArray(g)){const P=new Set;g.forEach(x=>{x.mergeCpts&&Array.isArray(x.mergeCpts)&&x.mergeCpts.forEach(F=>{F.modelId&&P.add(F.modelId)})}),P.size>0&&await Promise.all(Array.from(P).map(x=>u.loadNodeDetailsForModel(x)))}m.baseCompt.setAllConstructionProgressTracking(g)},u.setAllConstructionProgressTracking=u.setConstructionData,u.startConstructionSimulation=()=>m.baseCompt.enableConstructionProgressTracking(),u.enableAllConstructionProgressTracking=u.startConstructionSimulation,u.stopConstructionSimulation=()=>m.baseCompt.disableConstructionProgressTracking(),u.disableConstructionProgressTracking=u.stopConstructionSimulation,u.disableAllConstructionProgressTracking=u.stopConstructionSimulation,u.resetConstructionSimulation=()=>m.baseCompt.freshConstructionProgressTracking(),u.freshConstructionProgressTracking=u.resetConstructionSimulation,u.restartConstructionSimulation=()=>m.baseCompt.reStartAnimation(),u.reStartAnimation=u.restartConstructionSimulation,u.resumeFlyTo=()=>m.baseCompt.resumeFlyTo(),u.pauseConstructionSimulation=()=>m.baseCompt.pauseFlyTo(),u.pauseFlyTo=u.pauseConstructionSimulation,u.pauseAnimation=u.pauseConstructionSimulation,u.resumeConstructionSimulation=()=>m.baseCompt.resumeFlyTo(),u.resumeAnimation=u.resumeConstructionSimulation,u.setComponentsVisibility=async g=>await m.baseCompt.setComponentVisibility(g),u.setElementsListVisible=u.setComponentsVisibility,u.setAllComponentsVisibility=async g=>await m.baseCompt.setAllComponentsVisibility(g),u.setAllElementsVisible=u.setAllComponentsVisibility,u.isolateComponents=g=>m.baseCompt.isolateComponentVisibility(g),u.isolateComponentVisibility=u.isolateComponents,u.getComponentsByVisibility=g=>m.baseCompt.getComponentsByVisibility(g),u.getShowCpts=g=>m.baseCompt.getComponentsByVisibility(g),u.getElementsVisible=u.getComponentsByVisibility,u.setComponentVisibility=u.setComponentsVisibility,u.enableSectioning=(g,P)=>m.baseSection.open(g,P),u.openSection=u.enableSectioning,u.disableSectioning=g=>m.baseSection.close(g),u.closeSection=u.disableSectioning,u.updateSectionBox=g=>m.baseSection.updateRange(g),u.updateSectionRange=u.updateSectionBox,u.getSectionBox=()=>m.baseSection.getRange(),u.getSectionRange=u.getSectionBox,u.fitSectionToModel=()=>m.baseSection.fitToModels(),u.fitToModels=u.fitSectionToModel,u.setSectionBoxVisibility=g=>m.baseSection.setBoxVisibility(g),u.startFirstPersonMode=()=>{m.baseCompt.disableSelection(),m.basePlayer.openPlayer()},u.openPlayer=u.startFirstPersonMode,u.stopFirstPersonMode=()=>{m.basePlayer.closePlayer(),m.baseCompt.enableSelection()},u.closePlayer=u.stopFirstPersonMode,u.setPlayerPosition=g=>m.basePlayer.setPersonPosition(g),u.setPersonPosition=u.setPlayerPosition,u.setWalkSpeed=g=>m.basePlayer.setSpeed({speed:g}),u.setPlayerSpeed=u.setWalkSpeed,u.setPlayerConfig=g=>m.basePlayer.setParams(g),u.setPlayerParams=u.setPlayerConfig,u.setPlayerAction=(g,P)=>m.basePlayer.setMoveState(g,P),u.setPlayerMoveState=u.setPlayerAction,u.bindPlayerControls=g=>m.basePlayer.bindUiKeys(g),u.bindPlayerUiKeys=u.bindPlayerControls,u.setGlobeVisibility=g=>A.setGlobeEnvironmentVisible(g),u.setGlobeEnvironmentVisible=u.setGlobeVisibility,u.setTerrainVisibility=g=>A.setTerrainEnable(g),u.setTerrainEnable=u.setTerrainVisibility,u.setDepthTest=g=>A.setDepthTestEnable(g),u.setDepthTestEnable=u.setDepthTest,u.setBaseMap=(g,P)=>A.changeBaseMap(g,P),u.changeBaseMap=u.setBaseMap,u.setWorldTime=g=>A.setTime(g),u.setTime=u.setWorldTime,u.setGisOptions=g=>{g.globe!==void 0&&A.setGlobeEnvironmentVisible(g.globe),g.elevation!==void 0&&A.setTerrainEnable(g.elevation),g.depthTestAgainstTerrain!==void 0&&A.setDepthTestEnable(g.depthTestAgainstTerrain),g.rendering!==void 0&&A.setAmbientOcclusion(g.rendering)},u.setShadowVisibility=g=>A.setShadowsEnable(g),u.setShadowsEnable=u.setShadowVisibility,u.setEnvironmentMapVisibility=g=>A.setEnvironmentMapEnable(g),u.setEnvironmentMapEnable=u.setEnvironmentMapVisibility,u.setAOVisibility=g=>A.setAmbientOcclusion(g),u.setAmbientOcclusion=u.setAOVisibility,u.setBackgroundColor=g=>A.setGlobeColor(g),u.setGlobeColor=u.setBackgroundColor,u.setModelBrightness=g=>A.setModelBrightness(g),u.adjustModelColor=g=>A.setModelColorAdjustment(g),u.setModelColorAdjustment=u.adjustModelColor,u.setShadowIntensity=g=>{A.setShadowDarkness?A.setShadowDarkness(g):console.warn("baseSetting.setShadowDarkness is not available. Please reload the page.")},u.setShadowDarkness=u.setShadowIntensity,u.switchSceneMode=async g=>{const P=g?"2d":"3d";await A.setCadMode(P),g&&!S&&(S=new el({cesium:a,viewer:f}),u.setGlobeVisibility(!0)),l.emit("setMode",P)},u.setSceneMode=u.switchSceneMode,u.set2d=g=>u.switchSceneMode(g),u.is2dMode=()=>A.is2d,u.setMouseControlMode=g=>A.setMouseHabit(g),u.setMouseHabit=u.setMouseControlMode,u.setCollisionEnabled=g=>A.setCollisionDetection(g),u.setCollisionDetection=u.setCollisionEnabled,u.searchAndLocate=(g,P)=>A.searchLocation(g,P),u.searchLocation=u.searchAndLocate,u.getConfigure=()=>(console.warn("getConfigure is not initialized. Please ensure LeitingSetting component is mounted."),{}),u.setConfigure=g=>{console.warn("setConfigure is not initialized. Please ensure LeitingSetting component is mounted.",g)},u.addCadModel=g=>{const P={...g};return P.files&&!P.fileNames&&(P.fileNames=P.files),P.fileNames||(P.fileNames=[]),C.addDxfModel(P)},u.addDxfModel=u.addCadModel,u.deleteCad=g=>C.deleteCad(g),u.deleteAllCad=()=>C.deleteAllCad(),u.showCadModel=g=>C.showJson(g),u.showGeoJson=g=>C.showJson(g),u.showDxfModel=u.showCadModel,u.showCadLayer=g=>C.showJsonByLayer(g),u.showDxfLayer=u.showCadLayer,u.flyToCadModel=(g={})=>C.flyToCadModel(g),u.getCadModels=g=>C.getDxfModels(g),u.getDxfModels=u.getCadModels,u.getCadLayers=g=>C.getMapLayers(g),u.getDxfLayers=u.getCadLayers,u.getCadModelId=()=>C.getModelId(),u.setCadOpen=g=>C.setDxfOpen(g),u.setDxfOpen=u.setCadOpen,u.getCadOpen=()=>C.getDxfOpen(),u.getDxfOpen=u.getCadOpen,u.adjustCadModel=g=>C.adjustingModelByCad(g),u.adjustingModelByCad=u.adjustCadModel,u.saveAnnotations=()=>{let g=null;return S&&(g=S.saveAnnotations()),o?.saveAnnotations&&o.saveAnnotations(g),g},u.loadAnnotations=g=>S?S.loadAnnotations(g):!1,u.flyToTopView=()=>{C.flyToCadModel()},u.menuEvents=l,u.addMenuItems=g=>{l.emit("insertMenu",g)},u.insertMenu=u.addMenuItems,u.filterMenuItems=g=>{l.emit("setMenuListFilter",g)},u.setMenuListFilter=u.filterMenuItems,u.setMenuVisibility=g=>{l.emit("showMenu",g)},u.showMenu=u.setMenuVisibility,u.setPanelVisibility=(g,P)=>{l.emit("setMenuActive",g,P)},u.setMenuActive=u.setPanelVisibility,u.addContextMenuItems=g=>{console.warn("addContextMenuItems is not initialized yet. Please wait for LeitingBIM component to mount.",g)},u.insertContextMenu=u.addContextMenuItems,u.removeContextMenuItems=g=>{console.warn("removeContextMenuItems is not initialized yet.",g)},u.deleteContextMenu=u.removeContextMenuItems,u.closeContextMenu=()=>{console.warn("closeContextMenu is not initialized yet.")},u.hideContextMenu=u.closeContextMenu,u.getModelTree=()=>{const g=[],P=E.getMapTileset();return Object.keys(P).forEach(x=>{const F=P[x];if(F&&F.leiting&&F.leiting.tree){const _=F.leiting.tree;Array.isArray(_)?g.push(..._):g.push(_)}}),g},u.getTree=u.getModelTree,u.getAllComponentDetails=()=>{const g=E.getMapTileset(),P={},x=[];try{Object.keys(g).forEach(F=>{const _=g[F];if(!_||!_.leiting)return;const H=_.leiting,L=H.node,w=H.model.formData,y=H.box;if(!L||!L.nodeExtras)return;const b=H.model.modelId;P[b]=L.nodeExtras;const M=L.nodeExtras.element;if(!M)return;const k=y?y.center:{x:0,y:0,z:0};Object.values(M).forEach(Q=>{if(Q.box3)try{const R=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(w.totalRotation||0)),T=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(R),new a.Cartesian3(0,0,0)),U=a.Cartesian3.fromDegrees(w.longitude,w.latitude,w.height),V=a.Transforms.eastNorthUpToFixedFrame(U);a.Matrix4.multiply(V,T,V);const W=new a.Cartesian3(k.x,k.y,0),X=new a.Cartesian3;a.Matrix4.multiplyByPoint(V,W,X);const ee=a.Cartographic.fromCartesian(X),oe=Q.box3?.Center?.x||0,ne=Q.box3?.Center?.y||0,Y=Q.box3?.Center?.z||0,j=new a.Cartesian3(-k.x+oe,-k.y+ne,0+Y),te=a.Matrix4.fromTranslation(j),le=a.Matrix4.clone(te);a.Matrix4.multiply(T,le,le);const re=a.Cartesian3.fromDegrees(ee.longitude/Math.PI*180,ee.latitude/Math.PI*180,w.height),ce=a.Transforms.eastNorthUpToFixedFrame(re);a.Matrix4.multiply(ce,le,ce);const ve=a.Cartographic.fromCartesian(new a.Cartesian3(ce[12],ce[13],ce[14]));Q.box3.cartographic={longitude:ve.longitude/Math.PI*180,latitude:ve.latitude/Math.PI*180,height:ve.height};const Te={id:Q.uniqueId,billboard:[{theme:"Tag9999",position:[Q.box3.cartographic.longitude,Q.box3.cartographic.latitude,Q.box3.cartographic.height],options:{text:Q.name}}]};x.push(Te)}catch(R){console.warn("Error calculating component position:",R)}})})}catch(F){console.error("getAllComponents error:",F)}return P},u.getAllComponents=u.getAllComponentDetails,u.getComponentInfoList=g=>{if(!Array.isArray(g))return[];const P=E.getMapTileset(),x=[],F={};g.forEach(_=>{!_.modelId||!_.elementId||(F[_.modelId]||(F[_.modelId]=[]),F[_.modelId]?.push(_.elementId))});try{Object.keys(F).forEach(_=>{const H=P[_];if(!H||!H.leiting)return;const L=H.leiting,w=L.node,y=L.model.formData,b=L.box;if(!w||!w.nodeExtras)return;const M=w.nodeExtras.element;if(!M)return;const k=b?b.center:{x:0,y:0,z:0};F[_]?.forEach(Q=>{const R=M[Q];if(R&&R.box3)try{const T=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(y.totalRotation||0)),U=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(T),new a.Cartesian3(0,0,0)),V=a.Cartesian3.fromDegrees(y.longitude,y.latitude,y.height),W=a.Transforms.eastNorthUpToFixedFrame(V);a.Matrix4.multiply(W,U,W);const X=new a.Cartesian3(k.x,k.y,0),ee=new a.Cartesian3;a.Matrix4.multiplyByPoint(W,X,ee);const oe=a.Cartographic.fromCartesian(ee),ne=R.box3?.Center?.x||0,Y=R.box3?.Center?.y||0,j=R.box3?.Center?.z||0,te=new a.Cartesian3(-k.x+ne,-k.y+Y,0+j),le=a.Matrix4.fromTranslation(te),re=a.Matrix4.clone(le);a.Matrix4.multiply(U,re,re);const ce=a.Cartesian3.fromDegrees(oe.longitude/Math.PI*180,oe.latitude/Math.PI*180,y.height),ve=a.Transforms.eastNorthUpToFixedFrame(ce);a.Matrix4.multiply(ve,re,ve);const Te=a.Cartographic.fromCartesian(new a.Cartesian3(ve[12],ve[13],ve[14]));R.box3.cartographic={longitude:Te.longitude/Math.PI*180,latitude:Te.latitude/Math.PI*180,height:Te.height},R.elementId=Q,R.modelId=_,x.push(R)}catch(T){console.warn("Error calculating component position:",T)}})})}catch(_){console.error("getCptInfos error:",_)}return x},u.getCptInfos=u.getComponentInfoList,u.baseCompt=m.baseCompt,window.Methods=u}return console.log("methods",u),{Cesium:a,viewer:f,methods:u,menuEvents:l}}function Ms(i){return c.getCurrentScope()?(c.onScopeDispose(i),!0):!1}function Ds(i){return typeof i=="function"?i():c.unref(i)}const fy=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const py=Object.prototype.toString,gy=i=>py.call(i)==="[object Object]",my=()=>{};function Ay(i){return c.getCurrentInstance()}function sl(i,e=!0,t){Ay()?c.onMounted(i,t):e?i():c.nextTick(i)}function Bt(i){var e;const t=Ds(i);return(e=t?.$el)!=null?e:t}const mi=fy?window:void 0;function yy(...i){let e,t,n,s;if(typeof i[0]=="string"||Array.isArray(i[0])?([t,n,s]=i,e=mi):[e,t,n,s]=i,!e)return my;Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);const o=[],r=()=>{o.forEach(h=>h()),o.length=0},l=(h,p,f,u)=>(h.addEventListener(p,f,u),()=>h.removeEventListener(p,f,u)),a=c.watch(()=>[Bt(e),Ds(s)],([h,p])=>{if(r(),!h)return;const f=gy(p)?{...p}:p;o.push(...t.flatMap(u=>n.map(m=>l(h,u,m,f))))},{immediate:!0,flush:"post"}),d=()=>{a(),r()};return Ms(d),d}function Cy(){const i=c.ref(!1),e=c.getCurrentInstance();return e&&c.onMounted(()=>{i.value=!0},e),i}function ol(i){const e=Cy();return c.computed(()=>(e.value,!!i()))}function Ey(i,e={}){const{window:t=mi}=e,n=ol(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let s;const o=c.ref(!1),r=d=>{o.value=d.matches},l=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",r):s.removeListener(r))},a=c.watchEffect(()=>{n.value&&(l(),s=t.matchMedia(Ds(i)),"addEventListener"in s?s.addEventListener("change",r):s.addListener(r),o.value=s.matches)});return Ms(()=>{a(),l(),s=void 0}),o}function wy(i,e,t={}){const{window:n=mi,...s}=t;let o;const r=ol(()=>n&&"ResizeObserver"in n),l=()=>{o&&(o.disconnect(),o=void 0)},a=c.computed(()=>Array.isArray(i)?i.map(p=>Bt(p)):[Bt(i)]),d=c.watch(a,p=>{if(l(),r.value&&n){o=new ResizeObserver(e);for(const f of p)f&&o.observe(f,s)}},{immediate:!0,flush:"post"}),h=()=>{l(),d()};return Ms(h),{isSupported:r,stop:h}}function by(i,e={width:0,height:0},t={}){const{window:n=mi,box:s="content-box"}=t,o=c.computed(()=>{var p,f;return(f=(p=Bt(i))==null?void 0:p.namespaceURI)==null?void 0:f.includes("svg")}),r=c.ref(e.width),l=c.ref(e.height),{stop:a}=wy(i,([p])=>{const f=s==="border-box"?p.borderBoxSize:s==="content-box"?p.contentBoxSize:p.devicePixelContentBoxSize;if(n&&o.value){const u=Bt(i);if(u){const m=u.getBoundingClientRect();r.value=m.width,l.value=m.height}}else if(f){const u=Array.isArray(f)?f:[f];r.value=u.reduce((m,{inlineSize:E})=>m+E,0),l.value=u.reduce((m,{blockSize:E})=>m+E,0)}else r.value=p.contentRect.width,l.value=p.contentRect.height},t);sl(()=>{const p=Bt(i);p&&(r.value="offsetWidth"in p?p.offsetWidth:e.width,l.value="offsetHeight"in p?p.offsetHeight:e.height)});const d=c.watch(()=>Bt(i),p=>{r.value=p?e.width:0,l.value=p?e.height:0});function h(){a(),d()}return{width:r,height:l,stop:h}}function vy(i={}){const{window:e=mi,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:n=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:o=!0}=i,r=c.ref(t),l=c.ref(n),a=()=>{e&&(o?(r.value=e.innerWidth,l.value=e.innerHeight):(r.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight))};if(a(),sl(a),yy("resize",a,{passive:!0}),s){const d=Ey("(orientation: portrait)");c.watch(d,()=>a())}return{width:r,height:l}}const Iy={class:"title"},By={class:"actions"},xy={class:"card-body"},Sy=c.defineComponent({__name:"LeitingDraggableCard",props:{visible:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},title:{type:String,default:"Title"},initialPosition:{type:Object,default:()=>({x:0,y:0})},width:{type:[Number,String],default:300},minWidth:{type:Number,default:200},fullHeight:{type:Boolean,default:!1},align:{type:String,default:""}},emits:["update:visible","update:open","close"],setup(i,{emit:e}){const t=i,n=c.inject("leiting-theme",c.ref("dark")),s=e,o=c.computed({get:()=>t.open!==void 0?t.open:t.visible,set:D=>{s("update:visible",D),s("update:open",D)}}),r=c.ref(null),l=c.ref(t.initialPosition?.x||0),a=c.ref(t.initialPosition?.y||0),d=c.ref(t.width),h=c.ref(t.fullHeight?"100%":"600px");c.watch(()=>t.fullHeight,D=>{D?h.value="100%":h.value==="100%"&&(h.value="600px")});const{height:p}=vy();c.watch(p,()=>{t.fullHeight&&(h.value="100%")});const f=c.ref(!1),u=D=>{f.value=!0,D.preventDefault(),D.stopPropagation();const O=D.clientX,I=D.clientY,B=typeof d.value=="number"?d.value:r.value?.offsetWidth||0,g=typeof h.value=="number"?h.value:r.value?.offsetHeight||0,P=F=>{if(!f.value)return;F.preventDefault();const _=F.clientX-O,H=F.clientY-I,L=B+_,w=g+H;L>100&&(d.value=L),w>100&&(h.value=w)},x=()=>{f.value=!1,document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",x)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",x)},m=c.computed(()=>({left:`${l.value}px`,top:`${a.value}px`,width:typeof d.value=="number"?`${d.value}px`:d.value,height:typeof h.value=="number"?`${h.value}px`:h.value,position:"absolute",zIndex:2e3})),E=()=>{c.nextTick(()=>{if(r.value){const D=r.value.offsetParent||document.body,O=D.clientWidth,I=D.clientHeight,B=typeof d.value=="number"?d.value:r.value.offsetWidth||350,g=typeof h.value=="number"?h.value:r.value.offsetHeight||600;l.value+B>O&&(l.value=Math.max(0,O-B-20)),a.value+g>I&&(a.value=Math.max(0,I-g-20)),l.value<0&&(l.value=0),a.value<0&&(a.value=0)}})},A=c.ref(!1),C=D=>{if(D.target.closest(".close-btn")||D.target.closest(".actions"))return;A.value=!0,D.preventDefault(),D.stopPropagation();const O=D.clientX,I=D.clientY,B=l.value,g=a.value,P=F=>{if(!A.value)return;F.preventDefault();const _=F.clientX-O,H=F.clientY-I;l.value=B+_,a.value=g+H},x=()=>{A.value=!1,document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",x),E()};document.addEventListener("mousemove",P),document.addEventListener("mouseup",x)},v=()=>{c.nextTick(()=>{if(t.align&&r.value){const D=r.value.offsetParent||document.body,O=typeof d.value=="number"?d.value:r.value.offsetWidth||350;t.align==="right"?l.value=Math.max(0,D.clientWidth-O-20):t.align==="center"&&(l.value=Math.max(0,(D.clientWidth-O)/2))}E()})};c.onMounted(()=>{t.align?v():E()}),c.watch(o,D=>{D&&(t.align?v():E())});const S=()=>{o.value=!1,s("close")};return(D,O)=>c.withDirectives((c.openBlock(),c.createElementBlock("div",{ref_key:"cardRef",ref:r,class:c.normalizeClass(["draggable-card leiting-scroll",["leiting-theme-"+c.unref(n)]]),style:c.normalizeStyle(m.value)},[c.createElementVNode("div",{ref:"headerRef",class:"card-header",onMousedown:C},[c.createElementVNode("span",Iy,c.toDisplayString(i.title),1),c.createElementVNode("div",By,[c.renderSlot(D.$slots,"header-extra",{},void 0,!0),c.createElementVNode("span",{class:"close-btn",onClick:S},"×")])],544),c.createElementVNode("div",xy,[c.renderSlot(D.$slots,"default",{},void 0,!0)]),c.createElementVNode("div",{class:"resize-handle",onMousedown:u},[...O[0]||(O[0]=[c.createElementVNode("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"currentColor"},[c.createElementVNode("path",{d:"M10 10 L10 2 L2 10 Z"})],-1)])],32)],6)),[[c.vShow,o.value]])}}),Re=(i,e)=>{const t=i.__vccOpts||i;for(const[n,s]of e)t[n]=s;return t},ke=Re(Sy,[["__scopeId","data-v-50bf6126"]]);function Ty(i){const e=c.ref([]),t=c.ref([]),n=c.ref([]),s=c.ref(""),o=c.ref(!0);c.watch(()=>c.unref(i),p=>{if(!p||p.length===0)return;const f=[],u=(A,C)=>{A.forEach(v=>{const S=v.id||v.key||v.$id,D=v.modelId||C;D&&(v.modelId=D),S&&f.push(S),v.children&&v.children.length>0&&u(v.children,D)})};u(p);const m=new Set(n.value);let E=!1;f.forEach(A=>{m.has(A)||(m.add(A),E=!0)}),E&&(n.value=Array.from(m))},{immediate:!0,deep:!0});const r=c.computed(()=>{const p=c.unref(i);if(!p)return[];const f=[],u=(m,E)=>{m.forEach(A=>{const C=A.id||A.key||A.$id,v=A.name||A.title;f.push({key:C,title:v,parentKey:E}),A.children&&A.children.length>0&&u(A.children,C)})};return u(p),f}),l=p=>{e.value=p,o.value=!1},a=p=>{n.value=p},d=p=>{t.value=p},h=p=>r.value.find(u=>u.key===p)?.parentKey;return c.watch(s,p=>{if(!p)return;const u=r.value.filter(E=>E.title&&E.title.toLowerCase().includes(p.toLowerCase())).map(E=>E.parentKey),m=new Set;u.forEach(E=>{let A=E;for(;A;)m.add(A),A=h(A)}),e.value=[...m],o.value=!0}),{expandedKeys:e,selectedKeys:t,checkedKeys:n,searchValue:s,autoExpandParent:o,onExpand:l,onCheck:a,onSelect:d}}const My={class:"search-box"},Dy={key:0},ky={style:{color:"#f50"}},Py={key:1},Fy={key:1,class:"empty-tip"},rn=Re(c.defineComponent({__name:"LeitingTree",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"构件树"},width:{type:[Number,String],default:320},treeData:{type:Array,default:()=>[]},initialPosition:{type:Object,default:()=>({x:0,y:0})},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close","select","check"],setup(i,{emit:e}){const t=me.Input.Search,n=me.Tree,s=i,o=e,r=c.inject("leiting-theme",c.ref("dark")),l=c.inject("leitingMethods"),a=g=>{l?.value?.onSearchComponent&&l.value.onSearchComponent(g)},d=c.computed({get:()=>s.open!==void 0?s.open:s.visible,set:g=>{o("update:visible",g),o("update:open",g)}}),h=c.ref(null),{height:p}=by(h),f=c.computed(()=>p.value||300),u=c.ref({children:"children",title:"name",key:"id"}),{expandedKeys:m,selectedKeys:E,checkedKeys:A,searchValue:C,autoExpandParent:v}=Ty(c.toRef(s,"treeData")),S=g=>{m.value=g,v.value=!1},D=g=>{const P=[],x=F=>{if(!F.children||F.children.length===0){const H=F.element_Id;F.modelId&&H&&P.push({modelId:F.modelId,elementId:H})}else F.children.forEach(x)};return x(g),P},O=(g,P)=>{A.value=g,o("check",g,P);const x=[],F=new Set(g.map(H=>String(H))),_=H=>{for(let L=0;L<H.length;L++){const w=H[L];if(!w.children||w.children.length===0){if(!F.has(String(w.id))){const M=w.element_Id;w.modelId&&M&&x.push({modelId:w.modelId,elementId:M,show:!1})}}else w.children&&_(w.children)}};s.treeData&&_(s.treeData),l?.value?.setComponentVisibility&&l.value.setComponentVisibility(x),l?.value?.onTreeCheck&&l.value.onTreeCheck(g,P)},I=(g,P)=>{if(E.value=g,o("select",g,P),P.selected){const x=D(P.node);x.length>0&&l?.value?.flyToObjects&&l.value.flyToObjects({selectCpts:x})}l?.value?.onTreeSelect&&l.value.onTreeSelect(g,P)},B=()=>{o("update:visible",!1),o("close")};return(g,P)=>(c.openBlock(),c.createBlock(ke,{visible:d.value,"onUpdate:visible":P[1]||(P[1]=x=>d.value=x),title:i.title,"initial-position":i.initialPosition,"full-height":i.fullHeight,onClose:B},{default:c.withCtx(()=>[c.createElementVNode("div",{class:c.normalizeClass(["leiting-tree-container",[`theme-${c.unref(r)}`]])},[c.createElementVNode("div",My,[c.createVNode(c.unref(t),{value:c.unref(C),"onUpdate:value":P[0]||(P[0]=x=>c.isRef(C)?C.value=x:null),placeholder:"搜索构件","allow-clear":"","enter-button":"",onSearch:a},null,8,["value"])]),c.createElementVNode("div",{class:"tree-wrapper",ref_key:"treeWrapperRef",ref:h},[i.treeData&&i.treeData.length?(c.openBlock(),c.createBlock(c.unref(n),{key:0,"tree-data":i.treeData,"field-names":u.value,height:f.value,"expanded-keys":c.unref(m),"auto-expand-parent":c.unref(v),"selected-keys":c.unref(E),"checked-keys":c.unref(A),checkable:"","block-node":"",onExpand:S,onSelect:I,onCheck:O},{title:c.withCtx(({name:x,title:F})=>[(x||F)&&c.unref(C)&&(x||F).toLowerCase().indexOf(c.unref(C).toLowerCase())>-1?(c.openBlock(),c.createElementBlock("span",Dy,[c.createTextVNode(c.toDisplayString((x||F).substr(0,(x||F).toLowerCase().indexOf(c.unref(C).toLowerCase())))+" ",1),c.createElementVNode("span",ky,c.toDisplayString(c.unref(C)),1),c.createTextVNode(" "+c.toDisplayString((x||F).substr((x||F).toLowerCase().indexOf(c.unref(C).toLowerCase())+c.unref(C).length)),1)])):(c.openBlock(),c.createElementBlock("span",Py,c.toDisplayString(x||F),1))]),_:1},8,["tree-data","field-names","height","expanded-keys","auto-expand-parent","selected-keys","checked-keys"])):(c.openBlock(),c.createElementBlock("div",Fy,"暂无数据"))],512)],2)]),_:1},8,["visible","title","initial-position","full-height"]))}}),[["__scopeId","data-v-8a468895"]]),Ry="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEhSURBVDhP1ZRhkcIwEIWJAsDBOTgkgAJAAYcCQAFFAUgoDjgFh4Q7B+cAUFC+19kyS0hL+Ulm3nS6+/ZLNkkbOk9GURRDWUIIxyZraEoCWZLfmmcOLK/z14KAqGiGvq14zDMHNk/BHkAAehh/0ABtKMxUSFzPNfpFI+JnD7wDYVaxIIov41bIfxHfoROakhe0HDeQmbQfFzTxJj+zTXYg1kWrarISRFKzLNAfGsbL9iDzq/0j+kQZ/k1wm7onoKW3Hq42F0jLVK//Tcebott2fJAbVK1lvKwBNd6rRIsFsfJka0G2qdpQPy7+EPC0AumexKAzoH5FbgvSbHuUW6EOYubbfwX0cLPfFJS4K6mPNrbdHb+uvP498dhVn4v9FWo9V3RZzFxAv8L9AAAAAElFTkSuQmCC",rl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAERSURBVDhPvZTrEYIwEISTCrQD6EA7gA60AylBK1Aq0A7ECr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pzAzMoh6EV2fIsJ5IwNOj2IpVZ6i6difSecRVnlELZHIgHROisgXRCa78Z+IrMBf2pjLYJNENGSd1kO2pPghjKQniyqY8lFr2NfaqC18wn7nZCMlWg7xLq70TxfRLyHqtABN2lbp40mSSCzBcSebif1TPyKjDBcQ0eJJRkIUpHkMPUlnkBU+pnlWItL6ERgw8o1iqRHtgzAUGNRD2qmkvgMvNnneUQcZ4ggR6VGXG+OOA1koNvrFcY7+af++VJe0hucfyKQu+RWJc+SDZ3aNvlPpRl7T0qXdafNZYPDehLEZt/rOBR9U8QSaEKX0jHAaE4tshVrgLeJ+Xdl6rS8D3BWJXKnCEwWXEuco9grQ3bb0sP0Cn8/nPm/SMRQAAAAASUVORK5CYII=",Gy="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACDSURBVHgB1ZFhDYAgEIWfzgBGIIINpIEViGAkG2gEbWADjWADfMw/iDgUfji/7e3gxt3uHsDXZFrrlrFBHJNpsPAgEEmORArn3lFroEZQCjcTbAhzepPsgbuCgn8FBWvsUAMfFR5OIPGS5G80JkrG2sopHKbO1BCoHy8ZNhRUT5X4BTu6qyNSwwCiMAAAAABJRU5ErkJggg==",Hy={class:"menu-container"},Yy=["onClick","title"],Vy={class:"menu-icon"},zy=["src","alt"],Wy={key:3,style:{"font-size":"12px"}},jy={key:0,class:"sub-menu"},Ky=["onClick"],Ai=c.defineComponent({__name:"LeitingMenu",props:{visible:{type:Boolean,default:!0},activeIds:{type:Array,default:()=>[]},is2d:{type:Boolean,default:!1},customItems:{type:Array,default:()=>[]}},emits:["action"],setup(i,{emit:e}){const t=i,n=c.inject("leiting-theme",c.ref("dark")),s=c.inject("leiting-menu-size",c.ref("medium")),o=c.inject("leitingMethods",c.ref({})),r=c.computed(()=>n.value||n),l=c.computed(()=>s.value||s),a=c.ref([{ID:"home",title:"主视角",src:Ry,key:"homeView"},{ID:"tree",title:"目录树",src:rl,key:"componentTree"},{ID:"cadLayer",title:"图层",src:rl,key:"cadLayer"},{ID:"measure",title:"量算",src:Oy,key:"measurement"},{ID:"section",title:"剖切",src:Ly,key:"section"},{ID:"roam",title:"人物漫游",src:Ny,key:"roam"},{ID:"info",title:"构件信息",src:Uy,key:"componentInfo"},{ID:"cadPosition",title:"调整位置",src:_y,key:"cadPosition"},{ID:"annotation",title:"标注",src:Gy,key:"annotation"},{ID:"setting",title:"设置",src:Qy,key:"setting"}]),d=c.ref([]),h=c.ref([...t.activeIds]);c.watch(()=>t.activeIds,D=>{h.value=[...D]},{deep:!0});const p=c.computed(()=>t.visible);o.value&&o.value.menuEvents&&(o.value.menuEvents.on("setMenuListFilter",D=>{d.value=D}),o.value.menuEvents.on("setMenuActive",(D,O)=>{O?h.value.includes(D)||h.value.push(D):h.value=h.value.filter(I=>I!==D)}));const f=c.computed(()=>{let D=a.value;if(t.is2d){const O=["homeView","measurement","cadLayer","annotation"];D=D.filter(I=>I.key&&O.includes(I.key))}else{const O=["cadLayer","cadPosition","annotation"];D=D.filter(I=>!I.key||!O.includes(I.key))}if(d.value.length>0&&(D=D.filter(O=>!O.key||!d.value.includes(O.key))),t.customItems&&t.customItems.length>0){const O=t.customItems.map(I=>({...I,key:I.ID,src:I.src||I.icon}));return[...D,...O]}return D}),u=e,m=D=>{const O=["homeView"];if(D.key&&O.includes(D.key))h.value.includes(D.ID)||(h.value.push(D.ID),setTimeout(()=>{const B=h.value.indexOf(D.ID);B>-1&&h.value.splice(B,1)},1e3));else{const B=h.value.indexOf(D.ID);B>-1?h.value.splice(B,1):h.value.push(D.ID)}const I=h.value.includes(D.ID);D.func&&D.func(D),D.key&&u("action",D.key,I)},E=D=>{d.value=D},A=D=>{console.log("LeitingMenu received showMenu event:",D)},C=(D,O)=>{const I=f.value.find(B=>B.ID===D||B.key===D);if(I){const B=h.value.indexOf(I.ID);O&&B===-1?h.value.push(I.ID):!O&&B>-1&&h.value.splice(B,1)}};let v=null;const S=()=>{o.value?.menuEvents&&(v&&(v.off("setMenuListFilter",E),v.off("showMenu",A),v.off("setMenuActive",C)),v=o.value.menuEvents,v.on("setMenuListFilter",E),v.on("showMenu",A),v.on("setMenuActive",C))};return c.onMounted(()=>{S()}),c.onUnmounted(()=>{v&&(v.off("setMenuListFilter",E),v.off("showMenu",A),v.off("setMenuActive",C))}),c.watch(o,()=>{S()},{deep:!0}),(D,O)=>c.withDirectives((c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["leiting-menu-wrapper",["leiting-theme-"+r.value,"size-"+l.value]])},[c.createElementVNode("div",Hy,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(f.value,I=>(c.openBlock(),c.createElementBlock("div",{key:I.ID,class:c.normalizeClass(["menu-item",{active:h.value.includes(I.ID)}]),onClick:B=>m(I),title:I.title},[c.createElementVNode("div",Vy,[I.src?(c.openBlock(),c.createElementBlock("img",{key:0,src:I.src,alt:I.title},null,8,zy)):typeof I.icon=="object"?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(I.icon),{key:1})):typeof I.icon=="string"?(c.openBlock(),c.createElementBlock("i",{key:2,class:c.normalizeClass(["iconfont",`icon-${I.icon}`])},null,2)):(c.openBlock(),c.createElementBlock("span",Wy,c.toDisplayString(I.title.substring(0,2)),1))]),I.children&&I.children.length>0?(c.openBlock(),c.createElementBlock("div",jy,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(I.children,B=>(c.openBlock(),c.createElementBlock("div",{key:B.ID,class:c.normalizeClass(["sub-menu-item",{active:h.value.includes(B.ID)}]),onClick:c.withModifiers(g=>m(B),["stop"])},c.toDisplayString(B.title),11,Ky))),128))])):c.createCommentVNode("",!0)],10,Yy))),128))])],2)),[[c.vShow,p.value]])}}),$y={class:"leiting-section-content"},Xy={class:"section-form-item"},qy={class:"radio-group"},Jy={class:"section-form-item"},Zy={class:"switch-container"},e0={class:"switch"},t0={class:"status-text"},i0={class:"section-form-item slider-item"},n0={class:"slider-wrapper"},s0={class:"section-form-item slider-item"},o0={class:"slider-wrapper"},r0={class:"section-form-item slider-item"},a0={class:"slider-wrapper"},l0={class:"section-form-item table-item"},c0={class:"model-table-container"},d0={class:"model-table"},h0={width:"40"},u0=["checked"],f0=["onClick"],p0=["value"],g0={class:"model-name"},yi=Re(c.defineComponent({__name:"LeitingSection",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"剖切控制"},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close"],setup(i,{emit:e}){const t=i,n=e,s=c.inject("leitingMethods"),o=c.computed({get:()=>t.open!==void 0?t.open:t.visible,set:L=>{n("update:visible",L),n("update:open",L)}}),r=c.ref("Box"),l=c.ref(!1),a=c.ref([]),d=c.ref([]),h=c.computed(()=>d.value.length===0?!1:d.value.every(L=>a.value.includes(L.modelId))),p=L=>{L.target.checked?a.value=d.value.map(y=>y.modelId):a.value=[],P()},f=c.ref([-10,10]),u=c.ref([-10,10]),m=c.ref([-10,10]),E=c.ref([-100,100]),A=c.ref([-100,100]),C=c.ref([-100,100]);let v=!1;const S=L=>{v=!0;const{targetZPlus:w,targetZMinus:y,targetXPlus:b,targetXMinus:M,targetYPlus:k,targetYMinus:Q}=L;m.value=[-y,w],f.value=[-M,b],u.value=[-Q,k],setTimeout(()=>{v=!1},100)},D=()=>{v||a.value.length===0||!s?.value?.updateSectionRange||s.value.updateSectionRange({targetZPlus:m.value[1],targetZMinus:-m.value[0],targetXPlus:f.value[1],targetXMinus:-f.value[0],targetYPlus:u.value[1],targetYMinus:-u.value[0]})},O=()=>{s?.value?.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)},I=L=>{if(!s?.value?.getMapTileset||!s?.value?.openSection)return;const y=s.value.getMapTileset()[L];if(y&&y.leiting?.box){const{min:b,max:M}=y.leiting.box,k=(M.x-b.x)/2,Q=(M.y-b.y)/2,R=(M.z-b.z)/2;a.value.length<=1&&(E.value=[-k*2,k*2],A.value=[-Q*2,Q*2],C.value=[-R*2,R*2],f.value=[-k,k],u.value=[-Q,Q],m.value=[-R,R],s.value.updateSectionRange&&s.value.updateSectionRange({targetZPlus:R,targetZMinus:R,targetXPlus:k,targetXMinus:k,targetYPlus:Q,targetYMinus:Q})),s.value.openSection(L,{moveCallBack:S}),s.value.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)}},B=L=>{const w=a.value.indexOf(L);w>-1?a.value.splice(w,1):a.value.push(L),P()};let g=[];const P=()=>{const L=a.value.filter(y=>!g.includes(y)),w=g.filter(y=>!a.value.includes(y));L.forEach(y=>I(y)),w.forEach(y=>{s?.value?.closeSection&&s.value.closeSection(y)}),g=[...a.value]},x=()=>{},F=()=>{o.value=!1,n("close")},_=()=>{l.value=!1,a.value=[],g=[],f.value=[-10,10],u.value=[-10,10],m.value=[-10,10],E.value=[-100,100],A.value=[-100,100],C.value=[-100,100]};c.watch(()=>t.visible,L=>{L?H():(s?.value?.closeSection&&s.value.closeSection(),_())});const H=()=>{s?.value&&typeof s.value.getModelList=="function"&&(d.value=s.value.getModelList()||[],d.value.length>0&&a.value.length===0&&(a.value=[d.value[0].modelId],g=[...a.value]),t.visible&&a.value.length>0&&(l.value=!0,a.value.forEach(L=>I(L))))};return c.watch(()=>s?.value,()=>{H()},{immediate:!0,deep:!0}),c.onMounted(()=>{H()}),(L,w)=>(c.openBlock(),c.createBlock(ke,{visible:o.value,title:"剖切分析","full-height":i.fullHeight,"onUpdate:visible":F},{default:c.withCtx(()=>[c.createElementVNode("div",$y,[c.createElementVNode("div",Xy,[w[8]||(w[8]=c.createElementVNode("span",{class:"label"},"模式",-1)),c.createElementVNode("div",qy,[c.createElementVNode("label",{class:c.normalizeClass(["radio-item",{active:r.value==="Box"}])},[c.withDirectives(c.createElementVNode("input",{type:"radio",value:"Box","onUpdate:modelValue":w[0]||(w[0]=y=>r.value=y),onChange:x},null,544),[[c.vModelRadio,r.value]]),w[7]||(w[7]=c.createTextVNode(" 剖切盒 ",-1))],2)])]),c.createElementVNode("div",Jy,[w[10]||(w[10]=c.createElementVNode("span",{class:"label"},"显示",-1)),c.createElementVNode("div",Zy,[c.createElementVNode("label",e0,[c.withDirectives(c.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":w[1]||(w[1]=y=>l.value=y),onChange:O},null,544),[[c.vModelCheckbox,l.value]]),w[9]||(w[9]=c.createElementVNode("span",{class:"slider round"},null,-1))]),c.createElementVNode("span",t0,c.toDisplayString(l.value?"显示":"隐藏"),1)])]),c.createElementVNode("div",i0,[w[11]||(w[11]=c.createElementVNode("span",{class:"label"},"X 轴",-1)),c.createElementVNode("div",n0,[c.createVNode(c.unref(me.Slider),{value:f.value,"onUpdate:value":w[2]||(w[2]=y=>f.value=y),range:"",min:E.value[0],max:E.value[1],step:.1,onChange:D},null,8,["value","min","max"])])]),c.createElementVNode("div",s0,[w[12]||(w[12]=c.createElementVNode("span",{class:"label"},"Y 轴",-1)),c.createElementVNode("div",o0,[c.createVNode(c.unref(me.Slider),{value:u.value,"onUpdate:value":w[3]||(w[3]=y=>u.value=y),range:"",min:A.value[0],max:A.value[1],step:.1,onChange:D},null,8,["value","min","max"])])]),c.createElementVNode("div",r0,[w[13]||(w[13]=c.createElementVNode("span",{class:"label"},"Z 轴",-1)),c.createElementVNode("div",a0,[c.createVNode(c.unref(me.Slider),{value:m.value,"onUpdate:value":w[4]||(w[4]=y=>m.value=y),range:"",min:C.value[0],max:C.value[1],step:.1,onChange:D},null,8,["value","min","max"])])]),c.createElementVNode("div",l0,[w[15]||(w[15]=c.createElementVNode("span",{class:"label"},"模型",-1)),c.createElementVNode("div",c0,[c.createElementVNode("table",d0,[c.createElementVNode("thead",null,[c.createElementVNode("tr",null,[c.createElementVNode("th",h0,[c.createElementVNode("input",{type:"checkbox",checked:h.value,onChange:p},null,40,u0)]),w[14]||(w[14]=c.createElementVNode("th",null,"名称",-1))])]),c.createElementVNode("tbody",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(d.value,y=>(c.openBlock(),c.createElementBlock("tr",{key:y.modelId,class:c.normalizeClass({selected:a.value.includes(y.modelId)}),onClick:b=>B(y.modelId)},[c.createElementVNode("td",null,[c.withDirectives(c.createElementVNode("input",{type:"checkbox",value:y.modelId,"onUpdate:modelValue":w[5]||(w[5]=b=>a.value=b),onClick:w[6]||(w[6]=c.withModifiers(()=>{},["stop"])),onChange:P},null,40,p0),[[c.vModelCheckbox,a.value]])]),c.createElementVNode("td",g0,c.toDisplayString(y.modelName),1)],10,f0))),128))])])])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-ee4d9a12"]]),m0={class:"leiting-player-content"},A0={class:"player-form-item"},y0={class:"switch-container"},C0={class:"switch"},E0={class:"status-text"},w0={class:"player-form-item"},b0={class:"switch-container"},v0={class:"switch"},I0={class:"status-text"},B0={class:"player-form-item"},x0={class:"switch-container"},S0={class:"switch"},T0={class:"status-text"},M0={class:"player-form-item slider-item"},D0={class:"slider-wrapper"},k0={class:"value-text"},P0={class:"instructions"},F0={class:"key-map"},R0={class:"key-row"},O0={class:"key-row"},L0={class:"key-row"},N0={class:"key-row"},U0={class:"key-row"},_0={class:"key-row"},Ci=Re(c.defineComponent({__name:"LeitingPlayer",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"漫游控制"},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close"],setup(i,{emit:e}){const t=i,n=e,s=c.inject("leitingMethods"),o=c.ref(!1),r=c.ref(!1),l=c.ref(!0),a=c.ref(5),d=c.computed({get:()=>t.open!==void 0?t.open:t.visible,set:I=>{n("update:visible",I),n("update:open",I)}}),h=c.ref(null),p=c.ref(null),f=c.ref(null),u=c.ref(null),m=c.ref(null),E=c.ref(null),A=()=>{o.value?v():S()},C=()=>{s?.value?.setPlayerParams&&s.value.setPlayerParams({gravityTest:r.value,collisionTest:l.value})},v=async()=>{s?.value?.openPlayer&&(await s.value.openPlayer(),s.value.setPlayerSpeed&&s.value.setPlayerSpeed(a.value),C(),s.value.bindPlayerUiKeys&&(await c.nextTick(),s.value.bindPlayerUiKeys({moveFront:h.value,moveBack:p.value,moveLeft:f.value,moveRight:u.value,moveUp:m.value,moveDown:E.value})))},S=()=>{s?.value?.closePlayer&&s.value.closePlayer()},D=()=>{s?.value?.setPlayerSpeed&&s.value.setPlayerSpeed(a.value)},O=()=>{d.value=!1,n("close")};return c.watch(()=>t.visible,I=>{I?(o.value=!0,s?.value?v():setTimeout(()=>{s?.value&&v()},100)):o.value&&(o.value=!1,S())},{immediate:!0}),(I,B)=>(c.openBlock(),c.createBlock(ke,{title:i.title,visible:d.value,"full-height":i.fullHeight,"onUpdate:visible":O},{default:c.withCtx(()=>[c.createElementVNode("div",m0,[c.createElementVNode("div",A0,[B[5]||(B[5]=c.createElementVNode("span",{class:"label"},"启用",-1)),c.createElementVNode("div",y0,[c.createElementVNode("label",C0,[c.withDirectives(c.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":B[0]||(B[0]=g=>o.value=g),onChange:A},null,544),[[c.vModelCheckbox,o.value]]),B[4]||(B[4]=c.createElementVNode("span",{class:"slider round"},null,-1))]),c.createElementVNode("span",E0,c.toDisplayString(o.value?"开启":"关闭"),1)])]),c.createElementVNode("div",w0,[B[7]||(B[7]=c.createElementVNode("span",{class:"label"},"重力",-1)),c.createElementVNode("div",b0,[c.createElementVNode("label",v0,[c.withDirectives(c.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":B[1]||(B[1]=g=>r.value=g),onChange:C},null,544),[[c.vModelCheckbox,r.value]]),B[6]||(B[6]=c.createElementVNode("span",{class:"slider round"},null,-1))]),c.createElementVNode("span",I0,c.toDisplayString(r.value?"开启":"关闭"),1)])]),c.createElementVNode("div",B0,[B[9]||(B[9]=c.createElementVNode("span",{class:"label"},"碰撞",-1)),c.createElementVNode("div",x0,[c.createElementVNode("label",S0,[c.withDirectives(c.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":B[2]||(B[2]=g=>l.value=g),onChange:C},null,544),[[c.vModelCheckbox,l.value]]),B[8]||(B[8]=c.createElementVNode("span",{class:"slider round"},null,-1))]),c.createElementVNode("span",T0,c.toDisplayString(l.value?"开启":"关闭"),1)])]),c.createElementVNode("div",M0,[B[10]||(B[10]=c.createElementVNode("span",{class:"label"},"速度",-1)),c.createElementVNode("div",D0,[c.createVNode(c.unref(me.Slider),{value:a.value,"onUpdate:value":B[3]||(B[3]=g=>a.value=g),min:1,max:10,step:1,onChange:D},null,8,["value"])]),c.createElementVNode("span",k0,c.toDisplayString(a.value),1)]),B[19]||(B[19]=c.createElementVNode("div",{class:"divider"},null,-1)),c.createElementVNode("div",P0,[B[18]||(B[18]=c.createElementVNode("div",{class:"instruction-title"},"操作说明",-1)),c.createElementVNode("div",F0,[c.createElementVNode("div",R0,[c.createElementVNode("span",{class:"key",ref_key:"btnFront",ref:h},"W",512),B[11]||(B[11]=c.createTextVNode(" 前进 ",-1))]),c.createElementVNode("div",O0,[c.createElementVNode("span",{class:"key",ref_key:"btnBack",ref:p},"S",512),B[12]||(B[12]=c.createTextVNode(" 后退 ",-1))]),c.createElementVNode("div",L0,[c.createElementVNode("span",{class:"key",ref_key:"btnLeft",ref:f},"A",512),B[13]||(B[13]=c.createTextVNode(" 左移 ",-1))]),c.createElementVNode("div",N0,[c.createElementVNode("span",{class:"key",ref_key:"btnRight",ref:u},"D",512),B[14]||(B[14]=c.createTextVNode(" 右移 ",-1))]),c.createElementVNode("div",U0,[c.createElementVNode("span",{class:"key",ref_key:"btnUp",ref:m},"Q",512),B[15]||(B[15]=c.createTextVNode(" 上升 ",-1))]),c.createElementVNode("div",_0,[c.createElementVNode("span",{class:"key",ref_key:"btnDown",ref:E},"E",512),B[16]||(B[16]=c.createTextVNode(" 下降 ",-1))]),B[17]||(B[17]=c.createElementVNode("div",{class:"key-row"},[c.createElementVNode("span",{class:"mouse-icon"},"🖱️"),c.createTextVNode(" 按住左键拖拽旋转视角 ")],-1))])])])]),_:1},8,["title","visible","full-height"]))}}),[["__scopeId","data-v-ff3f266e"]]),Q0={class:"info-content"},G0={key:0,class:"component-title"},Ei=Re(c.defineComponent({__name:"LeitingInfo",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close"],setup(i,{emit:e}){const t=i,n=e,s=c.inject("leitingMethods"),o=c.ref([]),r=c.ref(!1),l=c.ref([]),a=c.ref([]),d=c.ref(0),h=c.computed({get:()=>t.open!==void 0?t.open:t.visible,set:C=>{n("update:visible",C),n("update:open",C)}}),p=()=>{h.value=!1},f=C=>({elementID:"构件ID",elementName:"构件名",categoryName:"类别",familySymbolName:"族类型",levelName:"标高",modelName:"文件名",length:"长",width:"宽",height:"高"})[C]||C,u=["elementName","elementID","modelName","length","width","height","levelName","categoryName","familySymbolName"],m=async C=>{const v=++d.value;if(a.value=C,!C||C.length===0){o.value=[];return}if(!h.value)return;let S=C;C.length>10&&(pe.warning(`选中构件数量过多(${C.length}个),仅显示前10个`),S=C.slice(0,10));const D=s?.value;let O=D?.getMapTileset?D.getMapTileset():{};r.value=!0;const I=[],B={};if(S.forEach(x=>{const _=O[x.modelId]?.leiting?.model?.dbName;_&&x.elementId&&I.push({dbName:_,elementId:x.elementId,modelId:x.modelId})}),I.length>0){try{const x=I.map(_=>({dbName:_.dbName,elementId:_.elementId})),F=await sp(x);F&&Array.isArray(F)&&F.forEach(_=>{const H=I.find(L=>L.dbName===_.dbName&&L.elementId===_.elementId);if(H){const L=`${H.modelId}_${_.elementId}`;B[L]=_}})}catch(x){console.warn("API fetch component details failed, falling back to local data",x)}console.log("123")}const g=new Set;if(S.forEach(x=>{const F=O[x.modelId],_=`${x.modelId}_${x.elementId}`;B[_]||F&&F.leiting&&!F.leiting?.node?.nodeExtras&&F.leiting.model?.nodeUrl&&g.add(x.modelId)}),g.size>0&&D?.loadNodeDetailsForModel)try{const x=Array.from(g).map(F=>D.loadNodeDetailsForModel(F));await Promise.all(x)}catch(x){console.error("Failed to load node details",x)}if(v!==d.value)return;O=D?.getMapTileset?D.getMapTileset():{};const P=[];S.forEach((x,F)=>{const H=O[x.modelId]?.leiting||{},L=B[`${x.modelId}_${x.elementId}`];let w={modelName:H.model?.modelId||x.modelId};w.elementID||(w.elementID=x.elementId);let y=null;if(L)y=L;else{const k=H.node?.nodeExtras?.element||H.node?.nodeExtras;if(k){const Q=w.elementID;k[Q]&&(y=k[Q])}}y&&y.box3&&(w.length=`${y.box3.length?.toFixed(2)||0}米`,w.width=`${y.box3.width?.toFixed(2)||0}米`,w.height=`${y.box3.height?.toFixed(2)||0}米`);const b=[];y&&(y.name&&(w.elementName=y.name),y.categoryName&&(w.categoryName=y.categoryName),y.familySymbolName&&(w.familySymbolName=y.familySymbolName),y.levelName&&(w.levelName=y.levelName));const M={};if(u.forEach(k=>{w[k]!==void 0&&(M[k]=w[k])}),b.push({name:"基础信息",params:M}),y){const k=Array.isArray(y)?y:Array.isArray(y?.parameters)?y.parameters:null;if(k){if(k.flat().forEach(R=>{if(R&&R.GroupName&&Array.isArray(R.Parameters)){const T={};R.Parameters.forEach(U=>{U.name&&(T[U.name]=U.value??"")}),Object.keys(T).length>0&&b.push({name:R.GroupName,params:T})}}),!Array.isArray(y)){const{parameters:R,...T}=y,U={};Object.keys(T).forEach(V=>{!u.includes(V)&&V!=="uniqueId"&&typeof T[V]!="object"&&(U[V]=T[V])}),Object.keys(U).length>0&&b.push({name:"其他属性",params:U})}}else{let Q=!1;if(Object.keys(y).forEach(R=>{y[R]&&typeof y[R]=="object"&&!Array.isArray(y[R])&&(Q=!0,b.push({name:R,params:y[R]}))}),!Q){const R={};Object.keys(y).forEach(T=>{if(!u.includes(T)&&T!=="batchId"){const U=y[T];typeof U=="string"&&U.length>500?R[T]=U.substring(0,500)+"...":R[T]=U}}),Object.keys(R).length>0&&b.push({name:"属性",params:R})}}}P.push({id:F,title:`${w.modelName}${w.elementName?` - ${w.elementName}`:""}`,groups:b})}),o.value=P,v===d.value&&(r.value=!1),P.length>0?l.value=[`${P[0].id}-基础信息`]:l.value=[]};let E=!1;const A=()=>{if(E)return;const C=s?.value;C&&C.selectionChange&&(C.selectionChange(m),E=!0)};return c.watch(()=>s?.value,()=>{A()},{deep:!0,immediate:!0}),c.watch(h,C=>{C&&a.value.length>0&&m(a.value)}),c.onMounted(()=>{A()}),(C,v)=>(c.openBlock(),c.createBlock(ke,{visible:h.value,title:"构件详情",width:350,align:"right","initial-position":{x:0,y:0},"full-height":i.fullHeight,onClose:p,"onUpdate:visible":v[1]||(v[1]=S=>h.value=S),class:"base-info-card"},{default:c.withCtx(()=>[c.createElementVNode("div",Q0,[c.createVNode(c.unref(me.Spin),{spinning:r.value},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,S=>(c.openBlock(),c.createElementBlock("div",{key:S.id,class:"component-block"},[o.value.length>1?(c.openBlock(),c.createElementBlock("div",G0,c.toDisplayString(S.title),1)):c.createCommentVNode("",!0),c.createVNode(c.unref(me.Collapse),{activeKey:l.value,"onUpdate:activeKey":v[0]||(v[0]=D=>l.value=D),ghost:"","expand-icon-position":"end"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(S.groups,D=>(c.openBlock(),c.createBlock(c.unref(me.CollapsePanel),{key:`${S.id}-${D.name}`,header:D.name},{default:c.withCtx(()=>[c.createVNode(c.unref(me.Descriptions),{size:"small",bordered:"",column:1,labelStyle:{width:"100px",background:"rgba(255,255,255,0.05)",color:"#aaa"},contentStyle:{color:"#fff"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(D.params,(O,I)=>(c.openBlock(),c.createBlock(c.unref(me.DescriptionsItem),{key:I,label:f(String(I))},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(O),1)]),_:2},1032,["label"]))),128))]),_:2},1024)]),_:2},1032,["header"]))),128))]),_:2},1032,["activeKey"])]))),128))]),_:1},8,["spinning"])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-cd881bde"]]);class al{viewer;Cesium;pickHandler=null;bimEntityId="";mapEntityId="";constructor(e,t){this.viewer=e,this.Cesium=t}removeMarker(e){if(!this.viewer)return;const t=e==="BIM"?this.bimEntityId:this.mapEntityId;t&&(this.viewer.entities.removeById(t),e==="BIM"?this.bimEntityId="":this.mapEntityId="")}clearMarkers(){this.removeMarker("BIM"),this.removeMarker("MAP")}addMarker(e,t){if(!this.viewer||!this.Cesium)return;this.removeMarker(e);const n=`adjust-marker-${e}-${Date.now()}`;e==="BIM"?this.bimEntityId=n:this.mapEntityId=n,this.viewer.entities.add({id:n,position:this.Cesium.Cartesian3.fromDegrees(t.longitude,t.latitude,t.height),point:{pixelSize:10,color:e==="BIM"?this.Cesium.Color.RED:this.Cesium.Color.ORANGE,outlineColor:this.Cesium.Color.WHITE,outlineWidth:2,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:`${e==="BIM"?"BIM":"地图"}标记点`,font:"14pt sans-serif",style:this.Cesium.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:this.Cesium.VerticalOrigin.BOTTOM,pixelOffset:new this.Cesium.Cartesian2(0,-10),fillColor:this.Cesium.Color.WHITE,outlineColor:this.Cesium.Color.BLACK,backgroundColor:new this.Cesium.Color(.1,.1,.1,.8),showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}})}registerPickHandler(e){this.destroyPickHandler(),!(!this.Cesium||!this.viewer)&&(this.pickHandler=new this.Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.pickHandler.setInputAction(t=>{let n;try{n=this.viewer.scene.pickPosition(t.position)}catch(s){console.warn("pickPosition failed:",s)}if(!n){const s=this.viewer.camera.getPickRay(t.position);n=this.viewer.scene.globe.pick(s,this.viewer.scene)}if(n||(n=this.viewer.camera.pickEllipsoid(t.position,this.viewer.scene.globe.ellipsoid)),n){const s=this.Cesium.Cartographic.fromCartesian(n),o=this.Cesium.Math.toDegrees(s.longitude),r=this.Cesium.Math.toDegrees(s.latitude),l=s.height;e({longitude:o,latitude:r,height:l})}},this.Cesium.ScreenSpaceEventType.LEFT_CLICK,this.Cesium.KeyboardEventModifier.SHIFT))}destroyPickHandler(){this.pickHandler&&(this.pickHandler.destroy(),this.pickHandler=null)}calculateOffset(e,t){return{dLon:t.longitude-e.longitude,dLat:t.latitude-e.latitude,dHeight:t.height-e.height}}}const H0={class:"adjust-panel"},Y0={class:"control-panel"},V0={class:"form-item"},z0={class:"radio-group"},W0={class:"form-item"},j0={class:"radio-group"},K0={class:"form-item"},$0={class:"value"},X0={class:"param-row"},q0={class:"param-row"},J0={class:"param-row"},Z0={class:"param-row"},eC={class:"param-row"},tC={class:"param-row"},iC={class:"param-row"},nC={class:"button-grid"},sC={key:1,class:"pick-mode-ui"},oC={class:"form-item",style:{display:"block","margin-bottom":"15px"}},rC={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},aC=["checked"],lC={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},cC={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},dC={class:"form-item",style:{display:"block","margin-bottom":"15px"}},hC={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},uC=["checked"],fC={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},pC={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},gC={class:"list-panel"},mC={class:"list-header"},AC={class:"col-check"},yC=["checked"],CC={class:"list-body"},EC={class:"col-check"},wC=["onUpdate:modelValue"],bC={class:"col-index"},vC=["title"],IC={class:"col-main"},BC=["checked","onChange"],wi=Re(c.defineComponent({__name:"LeitingPosition",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close","save"],setup(i,{expose:e,emit:t}){const n=i,s=t,o=c.computed({get:()=>n.open!==void 0?n.open:n.visible,set:R=>{s("update:visible",R),s("update:open",R)}}),r=c.inject("leitingMethods"),l=c.ref("BIM"),a=c.ref("param"),d=c.ref(""),h=c.ref([]),p=c.ref("BIM"),f=c.ref(null),u=c.ref(null),m=c.ref(null),E=()=>(!m.value&&r?.value?.getViewer&&r?.value?.getCesium&&(m.value=new al(r.value.getViewer(),r.value.getCesium())),m.value),A=()=>{E()?.clearMarkers(),f.value=null,u.value=null},C=(R,T)=>{R==="BIM"?f.value=T:u.value=T,E()?.addMarker(R,T),pe.success(`${R==="BIM"?"BIM":"地图"}标记点已添加`)},v=()=>{E()?.registerPickHandler(R=>{C(p.value,R)})},S=()=>{E()?.destroyPickHandler()},D=()=>{if(!f.value||!u.value){pe.warning("请先选择BIM标记点和地图标记点");return}if(!d.value){pe.warning("请先选择主模型");return}const R=E();let T=0,U=0,V=0;if(R){const{dLon:W,dLat:X,dHeight:ee}=R.calculateOffset(f.value,u.value);T=W,U=X,V=ee}else T=u.value.longitude-f.value.longitude,U=u.value.latitude-f.value.latitude,V=u.value.height-f.value.height;I.value.longitude+=T,I.value.latitude+=U,I.value.height+=V,y(d.value,{longitude:I.value.longitude,latitude:I.value.latitude,height:I.value.height}),pe.success("位置已调整")};c.watch(()=>a.value,R=>{R==="pick"?v():S()}),e({addMarker:C,setModelType:R=>{(R==="BIM"||R==="OSGB")&&(l.value=R)}});const I=c.ref({longitude:0,latitude:0,lonlat:1e-6,heightDistance:1,rotation:30,totalRotation:0,height:0,X:0,Y:0,Z:0}),B=c.computed(()=>{const R=h.value.find(T=>T.modelId===d.value);return R?R.modelName:""}),g=c.computed(()=>x.value.length>0&&x.value.every(R=>R.selected)),P=()=>{o.value=!1,s("close")},x=c.computed(()=>h.value.filter(R=>R.type===l.value)),F=R=>{const T=R.target.checked;x.value.forEach(U=>U.selected=T)},_=()=>{if(!r?.value)return;const R=r.value,T=R.getMapTileset?R.getMapTileset():{},U=[];if(Object.keys(T).forEach(V=>{const X=T[V].leiting||{};X.model&&U.push({modelId:X.model.modelId,modelName:X.model.modelName,selected:!1,formData:X.model.formData||{},dbName:X.model.dbName,url:X.model.url,type:X.model.type||"BIM"})}),h.value=U,U.length>0){const V=R.getBIMmodelId?R.getBIMmodelId():"";V&&U.find(W=>W.modelId===V)?L(V):L(U[0].modelId),U.forEach(W=>W.selected=!0)}},H=()=>{pe.info("拖动右下角标,可显示模型列表",void 0,2)},L=R=>{d.value=R;const T=h.value.find(U=>U.modelId===R);T&&T.formData&&Object.keys(I.value).forEach(U=>{T.formData[U]!==void 0&&(I.value[U]=T.formData[U])})},w=R=>r?.value?.getMapTileset?r.value.getMapTileset()[R]:null,y=(R,T)=>{const U=w(R),V=r.value.getCesium();if(U&&V){if(U.leiting?.model){U.leiting.model.formData={...U.leiting.model.formData,...T};const W=h.value.find(X=>X.modelId===R);W&&(W.formData=U.leiting.model.formData)}Rn({Cesium:V,tileset:U})}},b=R=>{if(!d.value)return;const U=h.value.find(X=>X.modelId===d.value)?.formData?.[R]??0,V=I.value[R],W=V-U;y(d.value,{[R]:V}),W!==0&&x.value.filter(ee=>ee.selected&&ee.modelId!==d.value).forEach(ee=>{const ne=(ee.formData?.[R]??0)+W;y(ee.modelId,{[R]:ne})})},M=R=>{const T=x.value.filter(X=>X.selected);if(T.length===0){pe.warning("请先选择要调整的模型");return}const{lonlat:U,heightDistance:V,rotation:W}=I.value;T.forEach(X=>{const ee={...X.formData};switch(R){case"north":ee.latitude+=U;break;case"south":ee.latitude-=U;break;case"east":ee.longitude+=U;break;case"west":ee.longitude-=U;break;case"up":ee.height+=V;break;case"down":ee.height-=V;break;case"rotateLeft":ee.totalRotation=(ee.totalRotation||0)+W;break;case"rotateRight":ee.totalRotation=(ee.totalRotation||0)-W;break}X.modelId===d.value&&(ee.lonlat=U,ee.heightDistance=V,ee.rotation=W,Object.assign(I.value,ee)),y(X.modelId,ee)})},k=()=>{if(!d.value){pe.warning("请先选择主模型");return}const R=w(d.value);if(!R||!r?.value?.getViewer)return;const T=r.value.getViewer(),U=r.value.getCesium(),V=R.boundingSphere;T.camera.flyToBoundingSphere(V,{offset:new U.HeadingPitchRange(0,U.Math.toRadians(-90),V.radius*2),duration:1.5})},Q=()=>{r?.value?.saveRegion?(r.value.saveRegion(h.value),s("save",c.unref(h))):(console.log("Save models:",h.value),pe.warning("未找到保存接口,数据已打印控制台"))};return c.watch(()=>n.visible,R=>{R?(_(),H(),a.value==="pick"&&v()):(S(),A())}),c.onMounted(()=>{n.visible&&(_(),H(),a.value==="pick"&&v())}),(R,T)=>(c.openBlock(),c.createBlock(ke,{visible:o.value,title:"调整位置(调整前可选择正北俯视)","full-height":i.fullHeight,width:274,"onUpdate:visible":T[25]||(T[25]=U=>o.value=U),onClose:P,onSave:Q},{default:c.withCtx(()=>[c.createElementVNode("div",H0,[c.createElementVNode("div",Y0,[c.createElementVNode("div",V0,[T[26]||(T[26]=c.createElementVNode("label",null,"模型类型:",-1)),c.createElementVNode("div",z0,[c.createElementVNode("span",{class:c.normalizeClass({active:l.value==="BIM"}),onClick:T[0]||(T[0]=U=>l.value="BIM")},"BIM模型",2),c.createElementVNode("span",{class:c.normalizeClass({active:l.value==="OSGB"}),onClick:T[1]||(T[1]=U=>l.value="OSGB")},"倾斜摄影",2)])]),c.createElementVNode("div",W0,[T[27]||(T[27]=c.createElementVNode("label",null,"调整操作:",-1)),c.createElementVNode("div",j0,[c.createElementVNode("span",{class:c.normalizeClass({active:a.value==="param"}),onClick:T[2]||(T[2]=U=>a.value="param")},"参数模式",2),c.createElementVNode("span",{class:c.normalizeClass({active:a.value==="pick"}),onClick:T[3]||(T[3]=U=>a.value="pick")},"地图点选",2)])]),c.createElementVNode("div",K0,[T[28]||(T[28]=c.createElementVNode("label",null,"当前主模型:",-1)),c.createElementVNode("span",$0,c.toDisplayString(B.value||"未选择"),1)]),T[42]||(T[42]=c.createElementVNode("div",{class:"separator"},null,-1)),a.value==="param"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[T[36]||(T[36]=c.createElementVNode("div",{class:"group-header"},"当前状态",-1)),c.createElementVNode("div",X0,[T[29]||(T[29]=c.createElementVNode("label",null,"经度(东西):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[4]||(T[4]=U=>I.value.longitude=U),onChange:T[5]||(T[5]=U=>b("longitude")),step:"0.000001"},null,544),[[c.vModelText,I.value.longitude,void 0,{number:!0}]])]),c.createElementVNode("div",q0,[T[30]||(T[30]=c.createElementVNode("label",null,"纬度(南北):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[6]||(T[6]=U=>I.value.latitude=U),onChange:T[7]||(T[7]=U=>b("latitude")),step:"0.000001"},null,544),[[c.vModelText,I.value.latitude,void 0,{number:!0}]])]),c.createElementVNode("div",J0,[T[31]||(T[31]=c.createElementVNode("label",null,"高度(m):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[8]||(T[8]=U=>I.value.height=U),onChange:T[9]||(T[9]=U=>b("height")),step:"0.1"},null,544),[[c.vModelText,I.value.height,void 0,{number:!0}]])]),c.createElementVNode("div",Z0,[T[32]||(T[32]=c.createElementVNode("label",null,"累计旋转(°):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[10]||(T[10]=U=>I.value.totalRotation=U),onChange:T[11]||(T[11]=U=>b("totalRotation")),step:"1"},null,544),[[c.vModelText,I.value.totalRotation,void 0,{number:!0}]])]),T[37]||(T[37]=c.createElementVNode("div",{class:"separator"},null,-1)),T[38]||(T[38]=c.createElementVNode("div",{class:"group-header"},"调整步长",-1)),c.createElementVNode("div",eC,[T[33]||(T[33]=c.createElementVNode("label",null,"经纬步长(°):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[12]||(T[12]=U=>I.value.lonlat=U),step:"0.000001"},null,512),[[c.vModelText,I.value.lonlat,void 0,{number:!0}]])]),c.createElementVNode("div",tC,[T[34]||(T[34]=c.createElementVNode("label",null,"高度步长(m):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[13]||(T[13]=U=>I.value.heightDistance=U),step:"0.1"},null,512),[[c.vModelText,I.value.heightDistance,void 0,{number:!0}]])]),c.createElementVNode("div",iC,[T[35]||(T[35]=c.createElementVNode("label",null,"旋转步长(°):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":T[14]||(T[14]=U=>I.value.rotation=U),step:"1"},null,512),[[c.vModelText,I.value.rotation,void 0,{number:!0}]])]),c.createElementVNode("div",nC,[c.createElementVNode("button",{onClick:T[15]||(T[15]=U=>M("rotateLeft"))},"左转"),c.createElementVNode("button",{onClick:T[16]||(T[16]=U=>M("north"))},"北移"),c.createElementVNode("button",{onClick:T[17]||(T[17]=U=>M("rotateRight"))},"右转"),c.createElementVNode("button",{onClick:T[18]||(T[18]=U=>M("west"))},"西移"),c.createElementVNode("button",{onClick:T[19]||(T[19]=U=>M("south"))},"南移"),c.createElementVNode("button",{onClick:T[20]||(T[20]=U=>M("east"))},"东移"),c.createElementVNode("button",{onClick:T[21]||(T[21]=U=>M("up"))},"上移"),c.createElementVNode("button",{onClick:T[22]||(T[22]=U=>M("down"))},"下移"),c.createElementVNode("button",{onClick:k,class:"primary-btn"},"正北俯视"),c.createElementVNode("button",{onClick:Q,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):a.value==="pick"?(c.openBlock(),c.createElementBlock("div",sC,[c.createElementVNode("div",oC,[c.createElementVNode("div",rC,[c.createElementVNode("div",{onClick:T[23]||(T[23]=U=>p.value="BIM"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[c.createElementVNode("input",{type:"radio",checked:p.value==="BIM",style:{"margin-right":"5px"}},null,8,aC),T[39]||(T[39]=c.createElementVNode("span",{style:{"font-weight":"bold"}},"BIM标记点:",-1))]),f.value?(c.openBlock(),c.createElementBlock("div",lC,[c.createElementVNode("div",null,"经度:"+c.toDisplayString(f.value.longitude.toFixed(10)),1),c.createElementVNode("div",null,"纬度:"+c.toDisplayString(f.value.latitude.toFixed(10)),1)])):(c.openBlock(),c.createElementBlock("div",cC,"未选择"))])]),c.createElementVNode("div",dC,[c.createElementVNode("div",hC,[c.createElementVNode("div",{onClick:T[24]||(T[24]=U=>p.value="MAP"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[c.createElementVNode("input",{type:"radio",checked:p.value==="MAP",style:{"margin-right":"5px"}},null,8,uC),T[40]||(T[40]=c.createElementVNode("span",{style:{"font-weight":"bold"}},"地图标记点:",-1))]),u.value?(c.openBlock(),c.createElementBlock("div",fC,[c.createElementVNode("div",null,"经度:"+c.toDisplayString(u.value.longitude.toFixed(10)),1),c.createElementVNode("div",null,"纬度:"+c.toDisplayString(u.value.latitude.toFixed(10)),1)])):(c.openBlock(),c.createElementBlock("div",pC,"未选择"))])]),c.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[c.createElementVNode("button",{onClick:D},"调整位置"),c.createElementVNode("button",{onClick:Q},"保存")]),T[41]||(T[41]=c.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[c.createElementVNode("div",null,"操作指南:"),c.createElementVNode("div",null,"1. 勾选上方 BIM 或 地图 标记点选项。"),c.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),c.createElementVNode("div",null,"3. 采集两点后,点击“调整位置”进行校准。")],-1))])):c.createCommentVNode("",!0)]),c.createElementVNode("div",gC,[c.createElementVNode("div",mC,[c.createElementVNode("div",AC,[c.createElementVNode("input",{type:"checkbox",checked:g.value,onChange:F},null,40,yC)]),T[43]||(T[43]=c.createElementVNode("div",{class:"col-index"},"序号",-1)),T[44]||(T[44]=c.createElementVNode("div",{class:"col-name"},"名称",-1)),T[45]||(T[45]=c.createElementVNode("div",{class:"col-main"},"主模型",-1))]),c.createElementVNode("div",CC,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(x.value,(U,V)=>(c.openBlock(),c.createElementBlock("div",{key:U.modelId,class:c.normalizeClass(["list-item",{active:U.modelId===d.value}])},[c.createElementVNode("div",EC,[c.withDirectives(c.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":W=>U.selected=W},null,8,wC),[[c.vModelCheckbox,U.selected]])]),c.createElementVNode("div",bC,c.toDisplayString(V+1),1),c.createElementVNode("div",{class:"col-name",title:U.modelName},c.toDisplayString(U.modelName),9,vC),c.createElementVNode("div",IC,[c.createElementVNode("input",{type:"radio",name:"mainModel",checked:U.modelId===d.value,onChange:W=>L(U.modelId)},null,40,BC)])],2))),128))])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-3489beaa"]]);function an(){return an=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},an.apply(null,arguments)}const xC={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},SC={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},ll={lang:an({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},xC),timePickerLocale:an({},SC)};ll.lang.ok="确定";var ln={exports:{}},TC=ln.exports,cl;function dl(){return cl||(cl=1,(function(i,e){(function(t,n){i.exports=n()})(TC,(function(){var t=1e3,n=6e4,s=36e5,o="millisecond",r="second",l="minute",a="hour",d="day",h="week",p="month",f="quarter",u="year",m="date",E="Invalid Date",A=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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,v={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(L){var w=["th","st","nd","rd"],y=L%100;return"["+L+(w[(y-20)%10]||w[y]||w[0])+"]"}},S=function(L,w,y){var b=String(L);return!b||b.length>=w?L:""+Array(w+1-b.length).join(y)+L},D={s:S,z:function(L){var w=-L.utcOffset(),y=Math.abs(w),b=Math.floor(y/60),M=y%60;return(w<=0?"+":"-")+S(b,2,"0")+":"+S(M,2,"0")},m:function L(w,y){if(w.date()<y.date())return-L(y,w);var b=12*(y.year()-w.year())+(y.month()-w.month()),M=w.clone().add(b,p),k=y-M<0,Q=w.clone().add(b+(k?-1:1),p);return+(-(b+(y-M)/(k?M-Q:Q-M))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:p,y:u,w:h,d,D:m,h:a,m:l,s:r,ms:o,Q:f}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},O="en",I={};I[O]=v;var B="$isDayjsObject",g=function(L){return L instanceof _||!(!L||!L[B])},P=function L(w,y,b){var M;if(!w)return O;if(typeof w=="string"){var k=w.toLowerCase();I[k]&&(M=k),y&&(I[k]=y,M=k);var Q=w.split("-");if(!M&&Q.length>1)return L(Q[0])}else{var R=w.name;I[R]=w,M=R}return!b&&M&&(O=M),M||!b&&O},x=function(L,w){if(g(L))return L.clone();var y=typeof w=="object"?w:{};return y.date=L,y.args=arguments,new _(y)},F=D;F.l=P,F.i=g,F.w=function(L,w){return x(L,{locale:w.$L,utc:w.$u,x:w.$x,$offset:w.$offset})};var _=(function(){function L(y){this.$L=P(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[B]=!0}var w=L.prototype;return w.parse=function(y){this.$d=(function(b){var M=b.date,k=b.utc;if(M===null)return new Date(NaN);if(F.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var Q=M.match(A);if(Q){var R=Q[2]-1||0,T=(Q[7]||"0").substring(0,3);return k?new Date(Date.UTC(Q[1],R,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,T)):new Date(Q[1],R,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,T)}}return new Date(M)})(y),this.init()},w.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},w.$utils=function(){return F},w.isValid=function(){return this.$d.toString()!==E},w.isSame=function(y,b){var M=x(y);return this.startOf(b)<=M&&M<=this.endOf(b)},w.isAfter=function(y,b){return x(y)<this.startOf(b)},w.isBefore=function(y,b){return this.endOf(b)<x(y)},w.$g=function(y,b,M){return F.u(y)?this[b]:this.set(M,y)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(y,b){var M=this,k=!!F.u(b)||b,Q=F.p(y),R=function(ne,Y){var j=F.w(M.$u?Date.UTC(M.$y,Y,ne):new Date(M.$y,Y,ne),M);return k?j:j.endOf(d)},T=function(ne,Y){return F.w(M.toDate()[ne].apply(M.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(Y)),M)},U=this.$W,V=this.$M,W=this.$D,X="set"+(this.$u?"UTC":"");switch(Q){case u:return k?R(1,0):R(31,11);case p:return k?R(1,V):R(0,V+1);case h:var ee=this.$locale().weekStart||0,oe=(U<ee?U+7:U)-ee;return R(k?W-oe:W+(6-oe),V);case d:case m:return T(X+"Hours",0);case a:return T(X+"Minutes",1);case l:return T(X+"Seconds",2);case r:return T(X+"Milliseconds",3);default:return this.clone()}},w.endOf=function(y){return this.startOf(y,!1)},w.$set=function(y,b){var M,k=F.p(y),Q="set"+(this.$u?"UTC":""),R=(M={},M[d]=Q+"Date",M[m]=Q+"Date",M[p]=Q+"Month",M[u]=Q+"FullYear",M[a]=Q+"Hours",M[l]=Q+"Minutes",M[r]=Q+"Seconds",M[o]=Q+"Milliseconds",M)[k],T=k===d?this.$D+(b-this.$W):b;if(k===p||k===u){var U=this.clone().set(m,1);U.$d[R](T),U.init(),this.$d=U.set(m,Math.min(this.$D,U.daysInMonth())).$d}else R&&this.$d[R](T);return this.init(),this},w.set=function(y,b){return this.clone().$set(y,b)},w.get=function(y){return this[F.p(y)]()},w.add=function(y,b){var M,k=this;y=Number(y);var Q=F.p(b),R=function(V){var W=x(k);return F.w(W.date(W.date()+Math.round(V*y)),k)};if(Q===p)return this.set(p,this.$M+y);if(Q===u)return this.set(u,this.$y+y);if(Q===d)return R(1);if(Q===h)return R(7);var T=(M={},M[l]=n,M[a]=s,M[r]=t,M)[Q]||1,U=this.$d.getTime()+y*T;return F.w(U,this)},w.subtract=function(y,b){return this.add(-1*y,b)},w.format=function(y){var b=this,M=this.$locale();if(!this.isValid())return M.invalidDate||E;var k=y||"YYYY-MM-DDTHH:mm:ssZ",Q=F.z(this),R=this.$H,T=this.$m,U=this.$M,V=M.weekdays,W=M.months,X=M.meridiem,ee=function(Y,j,te,le){return Y&&(Y[j]||Y(b,k))||te[j].slice(0,le)},oe=function(Y){return F.s(R%12||12,Y,"0")},ne=X||function(Y,j,te){var le=Y<12?"AM":"PM";return te?le.toLowerCase():le};return k.replace(C,(function(Y,j){return j||(function(te){switch(te){case"YY":return String(b.$y).slice(-2);case"YYYY":return F.s(b.$y,4,"0");case"M":return U+1;case"MM":return F.s(U+1,2,"0");case"MMM":return ee(M.monthsShort,U,W,3);case"MMMM":return ee(W,U);case"D":return b.$D;case"DD":return F.s(b.$D,2,"0");case"d":return String(b.$W);case"dd":return ee(M.weekdaysMin,b.$W,V,2);case"ddd":return ee(M.weekdaysShort,b.$W,V,3);case"dddd":return V[b.$W];case"H":return String(R);case"HH":return F.s(R,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return ne(R,T,!0);case"A":return ne(R,T,!1);case"m":return String(T);case"mm":return F.s(T,2,"0");case"s":return String(b.$s);case"ss":return F.s(b.$s,2,"0");case"SSS":return F.s(b.$ms,3,"0");case"Z":return Q}return null})(Y)||Q.replace(":","")}))},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(y,b,M){var k,Q=this,R=F.p(b),T=x(y),U=(T.utcOffset()-this.utcOffset())*n,V=this-T,W=function(){return F.m(Q,T)};switch(R){case u:k=W()/12;break;case p:k=W();break;case f:k=W()/3;break;case h:k=(V-U)/6048e5;break;case d:k=(V-U)/864e5;break;case a:k=V/s;break;case l:k=V/n;break;case r:k=V/t;break;default:k=V}return M?k:F.a(k)},w.daysInMonth=function(){return this.endOf(p).$D},w.$locale=function(){return I[this.$L]},w.locale=function(y,b){if(!y)return this.$L;var M=this.clone(),k=P(y,b,!0);return k&&(M.$L=k),M},w.clone=function(){return F.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},L})(),H=_.prototype;return x.prototype=H,[["$ms",o],["$s",r],["$m",l],["$H",a],["$W",d],["$M",p],["$y",u],["$D",m]].forEach((function(L){H[L[1]]=function(w){return this.$g(w,L[0],L[1])}})),x.extend=function(L,w){return L.$i||(L(w,_,x),L.$i=!0),x},x.locale=P,x.isDayjs=g,x.unix=function(L){return x(1e3*L)},x.en=I[O],x.Ls=I,x.p={},x}))})(ln)),ln.exports}var MC=dl();const He=Qt(MC);var cn={exports:{}},DC=cn.exports,hl;function kC(){return hl||(hl=1,(function(i,e){(function(t,n){i.exports=n(dl())})(DC,(function(t){function n(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var s=n(t),o={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(r,l){return l==="W"?r+"周":r+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(r,l){var a=100*r+l;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};return s.default.locale(o,null,!0),o}))})(cn)),cn.exports}kC();var dn={exports:{}},PC=dn.exports,ul;function FC(){return ul||(ul=1,(function(i,e){(function(t,n){i.exports=n()})(PC,(function(){return function(t,n,s){var o=n.prototype,r=function(p){return p&&(p.indexOf?p:p.s)},l=function(p,f,u,m,E){var A=p.name?p:p.$locale(),C=r(A[f]),v=r(A[u]),S=C||v.map((function(O){return O.slice(0,m)}));if(!E)return S;var D=A.weekStart;return S.map((function(O,I){return S[(I+(D||0))%7]}))},a=function(){return s.Ls[s.locale()]},d=function(p,f){return p.formats[f]||(function(u){return u.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(m,E,A){return E||A.slice(1)}))})(p.formats[f.toUpperCase()])},h=function(){var p=this;return{months:function(f){return f?f.format("MMMM"):l(p,"months")},monthsShort:function(f){return f?f.format("MMM"):l(p,"monthsShort","months",3)},firstDayOfWeek:function(){return p.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):l(p,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):l(p,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):l(p,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return d(p.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return h.bind(this)()},s.localeData=function(){var p=a();return{firstDayOfWeek:function(){return p.weekStart||0},weekdays:function(){return s.weekdays()},weekdaysShort:function(){return s.weekdaysShort()},weekdaysMin:function(){return s.weekdaysMin()},months:function(){return s.months()},monthsShort:function(){return s.monthsShort()},longDateFormat:function(f){return d(p,f)},meridiem:p.meridiem,ordinal:p.ordinal}},s.months=function(){return l(a(),"months")},s.monthsShort=function(){return l(a(),"monthsShort","months",3)},s.weekdays=function(p){return l(a(),"weekdays",null,null,p)},s.weekdaysShort=function(p){return l(a(),"weekdaysShort","weekdays",3,p)},s.weekdaysMin=function(p){return l(a(),"weekdaysMin","weekdays",2,p)}}}))})(dn)),dn.exports}var RC=FC();const OC=Qt(RC);var hn={exports:{}},LC=hn.exports,fl;function NC(){return fl||(fl=1,(function(i,e){(function(t,n){i.exports=n()})(LC,(function(){return function(t,n){n.prototype.weekday=function(s){var o=this.$locale().weekStart||0,r=this.$W,l=(r<o?r+7:r)-o;return this.$utils().u(s)?l:this.subtract(l,"day").add(s,"day")}}}))})(hn)),hn.exports}var UC=NC();const _C=Qt(UC);var un={exports:{}},QC=un.exports,pl;function GC(){return pl||(pl=1,(function(i,e){(function(t,n){i.exports=n()})(QC,(function(){var t="week",n="year";return function(s,o,r){var l=o.prototype;l.week=function(a){if(a===void 0&&(a=null),a!==null)return this.add(7*(a-this.week()),"day");var d=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var h=r(this).startOf(n).add(1,n).date(d),p=r(this).endOf(t);if(h.isBefore(p))return 1}var f=r(this).startOf(n).date(d).startOf(t).subtract(1,"millisecond"),u=this.diff(f,t,!0);return u<0?r(this).startOf("week").week():Math.ceil(u)},l.weeks=function(a){return a===void 0&&(a=null),this.week(a)}}}))})(un)),un.exports}var HC=GC();const YC=Qt(HC);var fn={exports:{}},VC=fn.exports,gl;function zC(){return gl||(gl=1,(function(i,e){(function(t,n){i.exports=n()})(VC,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,o=/\d\d/,r=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,a={},d=function(A){return(A=+A)+(A>68?1900:2e3)},h=function(A){return function(C){this[A]=+C}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(A){(this.zone||(this.zone={})).offset=(function(C){if(!C||C==="Z")return 0;var v=C.match(/([+-]|\d\d)/g),S=60*v[1]+(+v[2]||0);return S===0?0:v[0]==="+"?-S:S})(A)}],f=function(A){var C=a[A];return C&&(C.indexOf?C:C.s.concat(C.f))},u=function(A,C){var v,S=a.meridiem;if(S){for(var D=1;D<=24;D+=1)if(A.indexOf(S(D,0,C))>-1){v=D>12;break}}else v=A===(C?"pm":"PM");return v},m={A:[l,function(A){this.afternoon=u(A,!1)}],a:[l,function(A){this.afternoon=u(A,!0)}],Q:[s,function(A){this.month=3*(A-1)+1}],S:[s,function(A){this.milliseconds=100*+A}],SS:[o,function(A){this.milliseconds=10*+A}],SSS:[/\d{3}/,function(A){this.milliseconds=+A}],s:[r,h("seconds")],ss:[r,h("seconds")],m:[r,h("minutes")],mm:[r,h("minutes")],H:[r,h("hours")],h:[r,h("hours")],HH:[r,h("hours")],hh:[r,h("hours")],D:[r,h("day")],DD:[o,h("day")],Do:[l,function(A){var C=a.ordinal,v=A.match(/\d+/);if(this.day=v[0],C)for(var S=1;S<=31;S+=1)C(S).replace(/\[|\]/g,"")===A&&(this.day=S)}],w:[r,h("week")],ww:[o,h("week")],M:[r,h("month")],MM:[o,h("month")],MMM:[l,function(A){var C=f("months"),v=(f("monthsShort")||C.map((function(S){return S.slice(0,3)}))).indexOf(A)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[l,function(A){var C=f("months").indexOf(A)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,h("year")],YY:[o,function(A){this.year=d(A)}],YYYY:[/\d{4}/,h("year")],Z:p,ZZ:p};function E(A){var C,v;C=A,v=a&&a.formats;for(var S=(A=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,F,_){var H=_&&_.toUpperCase();return F||v[_]||t[_]||v[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(L,w,y){return w||y.slice(1)}))}))).match(n),D=S.length,O=0;O<D;O+=1){var I=S[O],B=m[I],g=B&&B[0],P=B&&B[1];S[O]=P?{regex:g,parser:P}:I.replace(/^\[|\]$/g,"")}return function(x){for(var F={},_=0,H=0;_<D;_+=1){var L=S[_];if(typeof L=="string")H+=L.length;else{var w=L.regex,y=L.parser,b=x.slice(H),M=w.exec(b)[0];y.call(F,M),x=x.replace(M,"")}}return(function(k){var Q=k.afternoon;if(Q!==void 0){var R=k.hours;Q?R<12&&(k.hours+=12):R===12&&(k.hours=0),delete k.afternoon}})(F),F}}return function(A,C,v){v.p.customParseFormat=!0,A&&A.parseTwoDigitYear&&(d=A.parseTwoDigitYear);var S=C.prototype,D=S.parse;S.parse=function(O){var I=O.date,B=O.utc,g=O.args;this.$u=B;var P=g[1];if(typeof P=="string"){var x=g[2]===!0,F=g[3]===!0,_=x||F,H=g[2];F&&(H=g[2]),a=this.$locale(),!x&&H&&(a=v.Ls[H]),this.$d=(function(b,M,k,Q){try{if(["x","X"].indexOf(M)>-1)return new Date((M==="X"?1e3:1)*b);var R=E(M)(b),T=R.year,U=R.month,V=R.day,W=R.hours,X=R.minutes,ee=R.seconds,oe=R.milliseconds,ne=R.zone,Y=R.week,j=new Date,te=V||(T||U?1:j.getDate()),le=T||j.getFullYear(),re=0;T&&!U||(re=U>0?U-1:j.getMonth());var ce,ve=W||0,Te=X||0,et=ee||0,xt=oe||0;return ne?new Date(Date.UTC(le,re,te,ve,Te,et,xt+60*ne.offset*1e3)):k?new Date(Date.UTC(le,re,te,ve,Te,et,xt)):(ce=new Date(le,re,te,ve,Te,et,xt),Y&&(ce=Q(ce).week(Y).toDate()),ce)}catch{return new Date("")}})(I,P,B,v),this.init(),H&&H!==!0&&(this.$L=this.locale(H).$L),_&&I!=this.format(P)&&(this.$d=new Date("")),a={}}else if(P instanceof Array)for(var L=P.length,w=1;w<=L;w+=1){g[1]=P[w-1];var y=v.apply(this,g);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}w===L&&(this.$d=new Date(""))}else D.call(this,O)}}}))})(fn)),fn.exports}var WC=zC();const jC=Qt(WC),KC={class:"setting-panel"},$C={class:"tabs-header"},XC={class:"tab-content"},qC={key:0,class:"section"},JC={class:"setting-item"},ZC={class:"setting-item"},eE={class:"setting-item"},tE={key:1,class:"section"},iE={class:"tabs-header",style:{"margin-bottom":"8px"}},nE={key:0},sE={class:"setting-item column"},oE={class:"setting-item column"},rE={class:"setting-item"},aE={key:1},lE={class:"setting-item column"},cE={class:"setting-item column",style:{"margin-top":"12px","border-top":"1px solid rgba(255,255,255,0.1)","padding-top":"8px"}},dE={class:"search-box"},hE={key:2,class:"section"},uE={class:"setting-item"},fE={key:0,class:"setting-item column"},pE={class:"sub-label"},gE={class:"setting-item"},mE={class:"setting-item"},AE={class:"setting-item column"},yE={class:"setting-item column"},CE={class:"sub-label"},EE={class:"setting-item column"},wE={class:"sub-label"},bE={class:"setting-item column"},vE={class:"sub-label"},IE={class:"setting-item column"},BE={style:{display:"flex",gap:"8px","margin-bottom":"8px"}},xE=["onClick","title"],SE={style:{display:"flex",gap:"8px","align-items":"center"}},TE={key:3,class:"section"},ME={class:"setting-item"},DE={class:"setting-item column"},bi=Re(c.defineComponent({__name:"LeitingSetting",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean,default:!1},tiandituToken:{type:String,default:""},initialConfig:{type:Object,default:()=>({})}},emits:["update:visible","update:open","close"],setup(i,{emit:e}){He.locale("zh-cn"),He.extend(OC),He.extend(_C),He.extend(YC),He.extend(jC);const t=me.Switch,n=me.Radio.Group,s=me.Radio,o=me.Input,r=me.Slider,l=me.Select,a=me.Select.Option,d=me.DatePicker,h=i,p=e,f=c.inject("leitingMethods"),u=c.computed({get:()=>h.open!==void 0?h.open:h.visible,set:w=>{p("update:visible",w),p("update:open",w)}}),m=c.ref("GIS"),E=c.reactive({globe:!1,terrain:!1,depthTest:!1}),A=c.reactive({provider:"tianditu",tianditu:{token:"c25f14fb6bd4397cf8fe45144ff768d6",layerType:"img_w",showLabel:!1},arcgis:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},baseMap:"tianditu"}),C=c.reactive({shadows:!1,shadowDarkness:.7,environmentMap:!1,ambientOcclusion:!1,time:He("2025-06-22 10:00"),brightness:1.5,contrast:1,saturation:1,backgroundColor:"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)"}),v=c.reactive({collision:!1,habit:0}),S=w=>{w&&(w.globe!==void 0&&(E.globe=w.globe),w.terrain!==void 0&&(E.terrain=w.terrain),w.depthTest!==void 0&&(E.depthTest=w.depthTest),w.mapProvider!==void 0&&(A.provider=w.mapProvider),w.tiandituLayerType!==void 0&&(A.tianditu.layerType=w.tiandituLayerType),w.tiandituShowLabel!==void 0&&(A.tianditu.showLabel=w.tiandituShowLabel),w.arcgisUrl!==void 0&&(A.arcgis.url=w.arcgisUrl),w.shadows!==void 0&&(C.shadows=w.shadows),w.shadowDarkness!==void 0&&(C.shadowDarkness=w.shadowDarkness),w.environmentMap!==void 0&&(C.environmentMap=w.environmentMap),w.ambientOcclusion!==void 0&&(C.ambientOcclusion=w.ambientOcclusion),w.time!==void 0&&(typeof w.time=="number"?C.time=He().startOf("day").add(w.time,"hour"):C.time=He(w.time)),w.brightness!==void 0&&(C.brightness=w.brightness),w.contrast!==void 0&&(C.contrast=w.contrast),w.saturation!==void 0&&(C.saturation=w.saturation),w.backgroundColor!==void 0&&(C.backgroundColor=w.backgroundColor),w.collision!==void 0&&(v.collision=w.collision),w.mouseHabit!==void 0&&(v.habit=w.mouseHabit))};c.watch(()=>h.initialConfig,w=>{S(w)},{deep:!0,immediate:!0});const D=["linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)","linear-gradient(0deg, #0f2027 0%, #203a43 50%, #2c5364 100%)","linear-gradient(0deg, #cfd9df 0%, #e2ebf0 100%)"],O=[{label:"全球影像地图服务(墨卡托)",value:"img_w"},{label:"全球影像地图服务(经纬度)",value:"img_c"},{label:"全球矢量地图服务(墨卡托)",value:"vec_w"},{label:"全球矢量地图服务(经纬度)",value:"vec_c"},{label:"全球地形晕渲服务(墨卡托)",value:"ter_w"},{label:"全球地形晕渲服务(经纬度)",value:"ter_c"}],I=()=>{const w=A.provider,y={};w==="tianditu"?(y.token=A.tianditu.token,y.layerType=A.tianditu.layerType,y.showAnnotation=A.tianditu.showLabel):w==="arcgis"&&(y.url=A.arcgis.url),f.value?.changeBaseMap?.(w,y)};c.watch(()=>A.provider,I),c.watch(()=>A.tianditu.layerType,I),c.watch(()=>A.tianditu.showLabel,I),c.watch(()=>A.tianditu.token,kn(I,1e3)),c.watch(()=>A.arcgis.url,kn(I,1e3)),c.onMounted(()=>{h.tiandituToken&&(A.tianditu.token=h.tiandituToken)}),c.watch(()=>E.globe,w=>f.value?.setGlobeEnvironmentVisible?.(w)),c.watch(()=>E.terrain,w=>f.value?.setTerrainEnable?.(w)),c.watch(()=>E.depthTest,w=>f.value?.setDepthTestEnable?.(w)),c.watch(()=>f?.value,w=>{if(w){if(w.getConfigure=()=>({globe:E.globe,terrain:E.terrain,depthTest:E.depthTest,mapProvider:A.provider,tiandituLayerType:A.tianditu.layerType,tiandituShowLabel:A.tianditu.showLabel,arcgisUrl:A.arcgis.url,shadows:C.shadows,shadowDarkness:C.shadowDarkness,environmentMap:C.environmentMap,ambientOcclusion:C.ambientOcclusion,time:He.isDayjs(C.time)?C.time.format("YYYY-MM-DD HH:mm"):C.time,brightness:C.brightness,contrast:C.contrast,saturation:C.saturation,backgroundColor:C.backgroundColor,collision:v.collision,mouseHabit:v.habit}),w.setConfigure=y=>{S(y)},w.setBackgroundColor&&C.backgroundColor&&w.setBackgroundColor(C.backgroundColor),w.setGlobeEnvironmentVisible&&w.setGlobeEnvironmentVisible(E.globe),w.setShadowsEnable&&w.setShadowsEnable(C.shadows),w.setShadowDarkness&&w.setShadowDarkness(C.shadowDarkness),w.setEnvironmentMapEnable&&w.setEnvironmentMapEnable(C.environmentMap),w.setAmbientOcclusion&&w.setAmbientOcclusion(C.ambientOcclusion),w.setTime){const y=He.isDayjs(C.time)?C.time.toDate():new Date;w.setTime(y)}w.setModelBrightness&&w.setModelBrightness(C.brightness),w.setCollisionDetection&&w.setCollisionDetection(v.collision),w.setMouseHabit&&w.setMouseHabit(v.habit),w.changeBaseMap&&A.baseMap&&w.changeBaseMap(A.baseMap,{token:A.tianditu.token,layerType:A.tianditu.layerType,showAnnotation:A.tianditu.showLabel,url:A.arcgis.url})}},{immediate:!0});const B=c.computed({get:()=>{const w=C.backgroundColor;return/^#[0-9A-Fa-f]{6}$/.test(w)?w:"#ffffff"},set:w=>{C.backgroundColor=w}}),g=c.ref(""),P=c.ref(!1),x=c.ref([]);c.watch(()=>E.globe,w=>f.value?.setGlobeEnvironmentVisible?.(w)),c.watch(()=>E.terrain,w=>f.value?.setTerrainEnable?.(w)),c.watch(()=>A.baseMap,w=>{f.value?.changeBaseMap?.(w,{token:h.tiandituToken})}),c.watch(()=>C.shadows,w=>f.value?.setShadowsEnable?.(w)),c.watch(()=>C.shadowDarkness,w=>f.value?.setShadowDarkness?.(w)),c.watch(()=>C.environmentMap,w=>f.value?.setEnvironmentMapEnable?.(w)),c.watch(()=>C.ambientOcclusion,w=>f.value?.setAmbientOcclusion?.(w)),c.watch(()=>C.time,w=>{const y=He.isDayjs(w)?w.toDate():new Date;f.value?.setTime?.(y)}),c.watch(()=>[C.brightness,C.contrast,C.saturation],([w,y,b])=>{const M=f.value;M?.setModelColorAdjustment?M.setModelColorAdjustment({brightness:w,contrast:y,saturation:b}):M?.setModelBrightness?.(w)}),c.watch(()=>C.backgroundColor,w=>{if(f.value?.setBackgroundColor)f.value.setBackgroundColor(w);else{const y=document.querySelector(".cesium-viewer");y&&(y.style.background=w)}}),c.watch(()=>v.collision,w=>f.value?.setCollisionDetection?.(w)),c.watch(()=>v.habit,w=>f.value?.setMouseHabit?.(w));const F=w=>{if(w?.pois&&Array.isArray(w.pois)&&w.pois.length>0){const y=w.pois[0],b=y.lonlat.split(/[, ]/).map(Number);if(b.length>=2&&!isNaN(b[0])&&!isNaN(b[1]))return{name:y.name,lon:b[0],lat:b[1],raw:y}}if(w?.area&&w.area.lonlat){const y=w.area,b=y.lonlat.split(/[, ]/).map(Number);if(b.length>=2&&!isNaN(b[0])&&!isNaN(b[1]))return{name:y.name,lon:b[0],lat:b[1],raw:y}}return null},H=kn(async()=>{const w=(g.value||"").trim();if(!w)return;const y=h.tiandituToken||"c25f14fb6bd4397cf8fe45144ff768d6";P.value=!0,x.value=[];try{if(f.value?.searchLocation){const b=await f.value.searchLocation(w,y),M=F(b);M&&(x.value=[M],pe.success(`找到:${M.name||""}`),f.value.flyToLonLatHeight(M.lon,M.lat,5e3))}else{const M=`https://api.tianditu.gov.cn/v2/search?postStr=${encodeURIComponent(JSON.stringify({keyWord:w,level:12,mapBound:"-180,-90,180,90",queryType:1,start:0,count:10}))}&type=query&tk=${encodeURIComponent(y)}`,k=await fetch(M);if(!k.ok)throw new Error(`HTTP ${k.status}`);const Q=await k.json(),R=F(Q);R&&(x.value=[R],pe.success(`找到:${R.name||""}`),f.value?.flyToLonLatHeight?.(R.lon,R.lat,5e3))}}catch(b){console.error("tianditu search error",b)}finally{P.value=!1}},800);c.watch(g,()=>{H()});const L=()=>{u.value=!1,p("close")};return c.onMounted(()=>{}),(w,y)=>(c.openBlock(),c.createBlock(ke,{visible:u.value,title:"设置","full-height":i.fullHeight,onClose:L,"onUpdate:visible":y[26]||(y[26]=b=>u.value=b)},{default:c.withCtx(()=>[c.createElementVNode("div",KC,[c.createElementVNode("div",$C,[c.createElementVNode("div",{class:c.normalizeClass(["tab-item",{active:m.value==="GIS"}]),onClick:y[0]||(y[0]=b=>m.value="GIS")},"GIS",2),c.createElementVNode("div",{class:c.normalizeClass(["tab-item",{active:m.value==="MAP"}]),onClick:y[1]||(y[1]=b=>m.value="MAP")},"地图",2),c.createElementVNode("div",{class:c.normalizeClass(["tab-item",{active:m.value==="RENDER"}]),onClick:y[2]||(y[2]=b=>m.value="RENDER")},"渲染",2),c.createElementVNode("div",{class:c.normalizeClass(["tab-item",{active:m.value==="MOUSE"}]),onClick:y[3]||(y[3]=b=>m.value="MOUSE")},"鼠标",2)]),c.createElementVNode("div",XC,[m.value==="GIS"?(c.openBlock(),c.createElementBlock("div",qC,[c.createElementVNode("div",JC,[y[27]||(y[27]=c.createElementVNode("span",null,"地球 (含大气/日月/星空)",-1)),c.createVNode(c.unref(t),{checked:E.globe,"onUpdate:checked":y[4]||(y[4]=b=>E.globe=b),size:"small"},null,8,["checked"])]),c.createElementVNode("div",ZC,[y[28]||(y[28]=c.createElementVNode("span",null,"地形 (高程)",-1)),c.createVNode(c.unref(t),{checked:E.terrain,"onUpdate:checked":y[5]||(y[5]=b=>E.terrain=b),size:"small"},null,8,["checked"])]),c.createElementVNode("div",eE,[y[29]||(y[29]=c.createElementVNode("span",null,"地形遮挡",-1)),c.createVNode(c.unref(t),{checked:E.depthTest,"onUpdate:checked":y[6]||(y[6]=b=>E.depthTest=b),size:"small"},null,8,["checked"])])])):c.createCommentVNode("",!0),m.value==="MAP"?(c.openBlock(),c.createElementBlock("div",tE,[c.createElementVNode("div",iE,[c.createElementVNode("div",{class:c.normalizeClass(["tab-item",{active:A.provider==="tianditu"}]),onClick:y[7]||(y[7]=b=>A.provider="tianditu")},"天地图",2),c.createElementVNode("div",{class:c.normalizeClass(["tab-item",{active:A.provider==="arcgis"}]),onClick:y[8]||(y[8]=b=>A.provider="arcgis")},"ArcGIS",2)]),A.provider==="tianditu"?(c.openBlock(),c.createElementBlock("div",nE,[c.createElementVNode("div",sE,[y[30]||(y[30]=c.createElementVNode("div",{class:"sub-label"},"Token",-1)),c.createVNode(c.unref(o),{value:A.tianditu.token,"onUpdate:value":y[9]||(y[9]=b=>A.tianditu.token=b),size:"small",placeholder:"输入天地图Token"},null,8,["value"])]),c.createElementVNode("div",oE,[y[31]||(y[31]=c.createElementVNode("div",{class:"sub-label"},"地图风格",-1)),c.createVNode(c.unref(l),{value:A.tianditu.layerType,"onUpdate:value":y[10]||(y[10]=b=>A.tianditu.layerType=b),size:"small",style:{width:"100%"}},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(O,b=>c.createVNode(c.unref(a),{key:b.value,value:b.value},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(b.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),c.createElementVNode("div",rE,[y[32]||(y[32]=c.createElementVNode("span",null,"叠加注记",-1)),c.createVNode(c.unref(t),{checked:A.tianditu.showLabel,"onUpdate:checked":y[11]||(y[11]=b=>A.tianditu.showLabel=b),size:"small"},null,8,["checked"])])])):c.createCommentVNode("",!0),A.provider==="arcgis"?(c.openBlock(),c.createElementBlock("div",aE,[c.createElementVNode("div",lE,[y[33]||(y[33]=c.createElementVNode("div",{class:"sub-label"},"服务地址",-1)),c.createVNode(c.unref(o),{value:A.arcgis.url,"onUpdate:value":y[12]||(y[12]=b=>A.arcgis.url=b),size:"small",placeholder:"输入ArcGIS MapServer地址"},null,8,["value"])])])):c.createCommentVNode("",!0),c.createElementVNode("div",cE,[y[34]||(y[34]=c.createElementVNode("div",{class:"sub-label"},"位置搜索 (天地图)",-1)),c.createElementVNode("div",dE,[c.createVNode(c.unref(o),{value:g.value,"onUpdate:value":y[13]||(y[13]=b=>g.value=b),placeholder:"输入地名搜索",size:"small","allow-clear":""},null,8,["value"])])])])):c.createCommentVNode("",!0),m.value==="RENDER"?(c.openBlock(),c.createElementBlock("div",hE,[c.createElementVNode("div",uE,[y[35]||(y[35]=c.createElementVNode("span",null,"阴影",-1)),c.createVNode(c.unref(t),{checked:C.shadows,"onUpdate:checked":y[14]||(y[14]=b=>C.shadows=b),size:"small"},null,8,["checked"])]),C.shadows?(c.openBlock(),c.createElementBlock("div",fE,[c.createElementVNode("div",pE,"阴影暗度 ("+c.toDisplayString(C.shadowDarkness.toFixed(2))+")",1),c.createVNode(c.unref(r),{value:C.shadowDarkness,"onUpdate:value":y[15]||(y[15]=b=>C.shadowDarkness=b),min:0,max:1,step:.05,size:"small"},null,8,["value"])])):c.createCommentVNode("",!0),c.createElementVNode("div",gE,[y[36]||(y[36]=c.createElementVNode("span",null,"环境贴图 (HDR)",-1)),c.createVNode(c.unref(t),{checked:C.environmentMap,"onUpdate:checked":y[16]||(y[16]=b=>C.environmentMap=b),size:"small"},null,8,["checked"])]),c.createElementVNode("div",mE,[y[37]||(y[37]=c.createElementVNode("span",null,"环境光遮蔽 (AO)",-1)),c.createVNode(c.unref(t),{checked:C.ambientOcclusion,"onUpdate:checked":y[17]||(y[17]=b=>C.ambientOcclusion=b),size:"small"},null,8,["checked"])]),c.createElementVNode("div",AE,[y[38]||(y[38]=c.createElementVNode("div",{class:"sub-label"},"日期时间",-1)),c.createVNode(c.unref(d),{value:C.time,"onUpdate:value":y[18]||(y[18]=b=>C.time=b),"show-time":"",locale:c.unref(ll),format:"YYYY-MM-DD HH:mm",size:"small",style:{width:"100%"}},null,8,["value","locale"])]),c.createElementVNode("div",yE,[c.createElementVNode("div",CE,"模型亮度 ("+c.toDisplayString(C.brightness.toFixed(1))+")",1),c.createVNode(c.unref(r),{value:C.brightness,"onUpdate:value":y[19]||(y[19]=b=>C.brightness=b),min:0,max:5,step:.1,size:"small"},null,8,["value"])]),c.createElementVNode("div",EE,[c.createElementVNode("div",wE,"模型对比度 ("+c.toDisplayString(C.contrast.toFixed(1))+")",1),c.createVNode(c.unref(r),{value:C.contrast,"onUpdate:value":y[20]||(y[20]=b=>C.contrast=b),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),c.createElementVNode("div",bE,[c.createElementVNode("div",vE,"模型饱和度 ("+c.toDisplayString(C.saturation.toFixed(1))+")",1),c.createVNode(c.unref(r),{value:C.saturation,"onUpdate:value":y[21]||(y[21]=b=>C.saturation=b),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),c.createElementVNode("div",IE,[y[39]||(y[39]=c.createElementVNode("div",{class:"sub-label"},"背景颜色",-1)),c.createElementVNode("div",BE,[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(D,(b,M)=>c.createElementVNode("div",{key:M,style:c.normalizeStyle({background:b,width:"32px",height:"24px",borderRadius:"2px",cursor:"pointer",border:"1px solid #d9d9d9",flexShrink:0}),onClick:k=>C.backgroundColor=b,title:"预设 "+(M+1)},null,12,xE)),64))]),c.createElementVNode("div",SE,[c.withDirectives(c.createElementVNode("input",{type:"color","onUpdate:modelValue":y[22]||(y[22]=b=>B.value=b),style:{width:"40px",height:"24px",padding:"0",border:"1px solid #d9d9d9"}},null,512),[[c.vModelText,B.value]]),c.createVNode(c.unref(o),{value:C.backgroundColor,"onUpdate:value":y[23]||(y[23]=b=>C.backgroundColor=b),size:"small",style:{flex:"1"},placeholder:"CSS 颜色值"},null,8,["value"])])])])):c.createCommentVNode("",!0),m.value==="MOUSE"?(c.openBlock(),c.createElementBlock("div",TE,[c.createElementVNode("div",ME,[y[40]||(y[40]=c.createElementVNode("span",null,"碰撞检测",-1)),c.createVNode(c.unref(t),{checked:v.collision,"onUpdate:checked":y[24]||(y[24]=b=>v.collision=b),size:"small"},null,8,["checked"])]),c.createElementVNode("div",DE,[y[43]||(y[43]=c.createElementVNode("div",{class:"sub-label"},"操作习惯",-1)),c.createVNode(c.unref(n),{value:v.habit,"onUpdate:value":y[25]||(y[25]=b=>v.habit=b),size:"small"},{default:c.withCtx(()=>[c.createVNode(c.unref(s),{value:0},{default:c.withCtx(()=>[...y[41]||(y[41]=[c.createTextVNode("默认 (中键旋转)",-1)])]),_:1}),c.createVNode(c.unref(s),{value:1},{default:c.withCtx(()=>[...y[42]||(y[42]=[c.createTextVNode("习惯1 (左键旋转)",-1)])]),_:1})]),_:1},8,["value"])])])):c.createCommentVNode("",!0)])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-79494025"]]),kE={class:"cad-layer-panel"},PE={class:"layer-list-container"},FE={class:"list-header"},RE={class:"col-check"},OE=["checked"],LE={class:"list-body"},NE={class:"col-check"},UE=["checked","onChange"],_E={class:"col-index"},QE=["title"],GE={class:"col-color"},HE=["value"],YE={key:0,class:"empty-text"},VE=Re(c.defineComponent({__name:"LeitingCadLayer",props:{visible:{type:Boolean,default:!1},currentModelId:{type:String,default:""}},emits:["update:visible","handleCloseCardByCadCard"],setup(i,{emit:e}){const t=i,n=e,s=c.inject("leitingMethods",c.ref({})),o=c.ref(""),r=c.ref([]),l=()=>{s.value&&s.value.getDxfModels&&(r.value=s.value.getDxfModels().map(v=>({modelId:v.modelId,modelName:v.modelName}))||[])},a=c.computed(()=>r.value.map(v=>({value:v.modelId,label:v.modelName}))),d=c.ref([]),h=c.ref([]),p=c.computed(()=>d.value.length>0&&h.value.length===d.value.length),f=({modelId:v})=>{if(d.value=[],h.value=[],s.value&&s.value.getDxfLayers){const S=s.value.getDxfLayers({modelId:v});S&&Object.keys(S).forEach((D,O)=>{S[D].length&&(d.value.push({index:O+1,layerName:D,layerColor:S[D][0].color||"#ffffff",key:D}),h.value.push(D))})}},u=v=>{o.value=v,f({modelId:v})},m=v=>{v.target.checked?h.value=d.value.map(D=>D.key):h.value=[],A()},E=(v,S)=>{S.target.checked?h.value.includes(v)||h.value.push(v):h.value=h.value.filter(O=>O!==v),A()},A=()=>{if(s.value&&s.value.showDxfLayer&&(s.value.showDxfLayer({modelId:o.value,show:!0,layers:h.value}),s.value.getDxfLayers)){const v=s.value.getDxfLayers({modelId:o.value});if(v){const S=Object.keys(v).filter(D=>!h.value.includes(D));s.value.showDxfLayer({modelId:o.value,show:!1,layers:S})}}},C=()=>{n("update:visible",!1),n("handleCloseCardByCadCard")};return c.watch(()=>t.visible,v=>{v&&(l(),t.currentModelId?(o.value=t.currentModelId,f({modelId:t.currentModelId})):a.value.length>0&&(o.value=a.value[0]?.value,f({modelId:o.value})))}),c.watch(()=>t.currentModelId,v=>{v&&t.visible&&(o.value=v,f({modelId:v}))}),(v,S)=>(c.openBlock(),c.createBlock(ke,{visible:i.visible,title:"CAD图层","onUpdate:visible":S[3]||(S[3]=D=>v.$emit("update:visible",D)),onClose:C,width:360,align:"right","initial-position":{x:0,y:60}},{"header-extra":c.withCtx(()=>[c.createElementVNode("div",{class:"header-select-container",onMousedown:S[2]||(S[2]=c.withModifiers(()=>{},["stop"]))},[S[4]||(S[4]=c.createElementVNode("span",{class:"header-label"},"图纸:",-1)),c.createVNode(c.unref(me.Select),{value:o.value,"onUpdate:value":S[0]||(S[0]=D=>o.value=D),options:a.value,onChange:S[1]||(S[1]=D=>u(D)),placeholder:"选择模型",style:{width:"140px"},bordered:!1,class:"custom-header-select",popupClassName:"leiting-select-dropdown",size:"small"},null,8,["value","options"])],32)]),default:c.withCtx(()=>[c.createElementVNode("div",kE,[c.createElementVNode("div",PE,[c.createElementVNode("div",FE,[c.createElementVNode("div",RE,[c.createElementVNode("input",{type:"checkbox",checked:p.value,onChange:m},null,40,OE)]),S[5]||(S[5]=c.createElementVNode("div",{class:"col-index"},"序号",-1)),S[6]||(S[6]=c.createElementVNode("div",{class:"col-name"},"图层名称",-1)),S[7]||(S[7]=c.createElementVNode("div",{class:"col-color"},"颜色",-1))]),c.createElementVNode("div",LE,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(d.value,D=>(c.openBlock(),c.createElementBlock("div",{key:D.key,class:"list-item"},[c.createElementVNode("div",NE,[c.createElementVNode("input",{type:"checkbox",checked:h.value.includes(D.key),onChange:O=>E(D.key,O)},null,40,UE)]),c.createElementVNode("div",_E,c.toDisplayString(D.index),1),c.createElementVNode("div",{class:"col-name",title:D.layerName},c.toDisplayString(D.layerName),9,QE),c.createElementVNode("div",GE,[c.createElementVNode("input",{type:"color",value:D.layerColor,disabled:""},null,8,HE)])]))),128)),d.value.length===0?(c.openBlock(),c.createElementBlock("div",YE,"暂无数据")):c.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-a4db4977"]]),zE={class:"adjust-panel"},WE={class:"control-panel"},jE={class:"form-item"},KE={class:"radio-group"},$E={class:"form-item"},XE=["title"],qE={class:"param-row"},JE=["step"],ZE={class:"param-row"},ew=["step"],tw={class:"param-row"},iw=["step"],nw={class:"param-row"},sw=["step"],ow={class:"param-row"},rw=["step"],aw={class:"param-row"},lw=["step"],cw={class:"param-row"},dw=["step"],hw={class:"button-grid"},uw={key:1,class:"pick-mode-ui"},fw=["onClick"],pw=["checked"],gw={style:{"font-size":"12px",color:"#aaa","padding-left":"10px"}},mw={class:"param-row"},Aw={style:{width:"40px"}},yw=["onUpdate:modelValue"],Cw={class:"param-row"},Ew={style:{width:"40px"}},ww=["onUpdate:modelValue"],bw={class:"param-row"},vw={style:{width:"40px"}},Iw=["onUpdate:modelValue"],Bw={class:"list-panel"},xw={class:"list-header"},Sw={class:"col-check"},Tw=["checked"],Mw={class:"list-body"},Dw={class:"col-check"},kw=["onUpdate:modelValue"],Pw={class:"col-index"},Fw=["title"],Rw={class:"col-main"},Ow=["checked","onChange"],Lw={key:0,style:{padding:"10px","text-align":"center",color:"#999"}},Nw=Re(c.defineComponent({__name:"LeitingCadPosition",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","handleSavingByCadCard","clearBimPointList","save"],setup(i,{expose:e,emit:t}){const n=i,s=t,o=c.inject("leitingMethods"),r=c.ref([]),l=c.ref(""),a=c.computed(()=>r.value.length>0&&r.value.every(y=>y.selected)),d=c.ref("param"),h=c.ref("bimPoint1"),p=c.ref(null),f=c.ref("bimPoint1"),u=c.reactive({bimPoint1:{longitude:void 0,latitude:void 0,type:"CAD标记点",longitudeText:"经度",latitudeText:"纬度",heightText:"高程",height:void 0},bimPoint2:{longitude:void 0,latitude:void 0,type:"地图标记点",longitudeText:"经度",latitudeText:"纬度",heightText:"高程",height:void 0}}),m=c.ref(1e-6),E=c.reactive({modelId:"",longitude:0,latitude:0,distance:1e-6,rotation:1,totalRotation:0,heightDistance:1,height:0,lonlat:1e-6,modelOptions:[],selectPoint:{longitude:0,latitude:0,height:0},selectedMode:!1,X:0,Y:0,Z:0}),A=c.computed(()=>{const y=r.value.find(b=>b.modelId===l.value);return y?y.modelName:""}),C=()=>{s("update:visible",!1)},v=()=>(!p.value&&o?.value?.getViewer&&o?.value?.getCesium&&(p.value=new al(o.value.getViewer(),o.value.getCesium())),p.value),S=()=>{v()?.clearMarkers(),u.bimPoint1.longitude=void 0,u.bimPoint1.latitude=void 0,u.bimPoint1.height=void 0,u.bimPoint2.longitude=void 0,u.bimPoint2.latitude=void 0,u.bimPoint2.height=void 0},D=y=>{const b=h.value,M=u[b];if(M){M.longitude=y.longitude,M.latitude=y.latitude,M.height=y.height;const k=b==="bimPoint1"?"BIM":"MAP";v()?.addMarker(k,y),pe.success(`${M.type}已添加`)}},O=()=>{v()?.registerPickHandler(y=>{D(y)})},I=()=>{v()?.destroyPickHandler()},B=y=>{d.value=y,y!=="pick"&&s("clearBimPointList")};c.watch(()=>d.value,y=>{y==="pick"?O():I()}),c.onUnmounted(()=>{I()});const g=()=>{if(!o?.value?.getDxfModels)return;const y=o.value.getDxfModels();if(Array.isArray(y)?r.value=y.map(b=>({modelId:b.modelId,modelName:b.modelName,formData:b.formData||{},selected:!1,tileset:b})):r.value=[],r.value.length>0){const b=o.value.getCadModelId?o.value.getCadModelId():"";b&&r.value.find(M=>M.modelId===b)?P(b):P(r.value[0].modelId),r.value.forEach(M=>M.selected=!0)}},P=y=>{l.value=y;const b=r.value.find(M=>M.modelId===y);b&&b.formData&&Object.keys(E).forEach(M=>{b.formData[M]!==void 0&&(E[M]=b.formData[M])})},x=(y,b)=>{if(!o?.value?.adjustingModelByCad)return;const M=r.value.find(k=>k.modelId===y);M&&M.tileset&&(M.formData={...M.formData,...b},M.tileset.formData=M.formData,o.value.adjustingModelByCad({...M.formData,tileset:M.tileset}))},F=y=>{if(!l.value)return;const b=E[y];x(l.value,{[y]:b})},_=y=>{const b=r.value.filter(R=>R.selected);if(b.length===0){pe.warning("请先选择要调整的模型");return}const{distance:M,heightDistance:k,rotation:Q}=E;b.forEach(R=>{const T={...R.formData};switch(y){case"north":T.latitude+=M;break;case"south":T.latitude-=M;break;case"east":T.longitude+=M;break;case"west":T.longitude-=M;break;case"up":T.height+=k;break;case"down":T.height-=k;break;case"rotateLeft":T.totalRotation=(T.totalRotation||0)-Q;break;case"rotateRight":T.totalRotation=(T.totalRotation||0)+Q;break}R.modelId===l.value&&Object.assign(E,T),x(R.modelId,T)})},H=y=>{const b=y.target.checked;r.value.forEach(M=>M.selected=b)},L=()=>{s("handleSavingByCadCard",r.value),s("save",r.value)},w=()=>{const y=u.bimPoint1,b=u.bimPoint2;if(y.longitude===void 0||b.longitude===void 0){pe.warning("请先完成点选操作");return}const M=r.value.filter(U=>U.selected);if(M.length===0){pe.warning("请先选择要调整的模型");return}let k=0,Q=0,R=0;const T=v();if(T){const{dLon:U,dLat:V,dHeight:W}=T.calculateOffset(y,b);k=U,Q=V,R=W}else k=b.longitude-y.longitude,Q=b.latitude-y.latitude,R=b.height-y.height;M.forEach(U=>{const V={...U.formData};V.longitude+=k,V.latitude+=Q,V.height+=R,U.modelId===l.value&&Object.assign(E,V),x(U.modelId,V)}),pe.success("位置已调整")};return c.watch(()=>n.visible,y=>{y?g():(I(),S())}),c.onMounted(()=>{n.visible&&g()}),e({setBIMPointsList:({longitude:y,latitude:b,height:M})=>{u[f.value].longitude=y,u[f.value].latitude=b,u[f.value].height=M},addGltfOr3dTilesModelList:y=>{console.warn("addGltfOr3dTilesModelList is deprecated, use internal loading")}}),(y,b)=>(c.openBlock(),c.createBlock(ke,{visible:n.visible,title:"Cad校准",width:282,height:600,"onUpdate:visible":b[21]||(b[21]=M=>s("update:visible",M)),onClose:C},{default:c.withCtx(()=>[c.createElementVNode("div",zE,[c.createElementVNode("div",WE,[c.createElementVNode("div",jE,[b[22]||(b[22]=c.createElementVNode("label",null,"调整操作:",-1)),c.createElementVNode("div",KE,[c.createElementVNode("span",{class:c.normalizeClass({active:d.value==="param"}),onClick:b[0]||(b[0]=M=>B("param"))},"参数模式",2),c.createElementVNode("span",{class:c.normalizeClass({active:d.value==="pick"}),onClick:b[1]||(b[1]=M=>B("pick"))},"地图点选",2)])]),c.createElementVNode("div",$E,[b[23]||(b[23]=c.createElementVNode("label",null,"当前主模型:",-1)),c.createElementVNode("span",{class:"value",title:A.value},c.toDisplayString(A.value||"未选择"),9,XE)]),b[35]||(b[35]=c.createElementVNode("div",{class:"separator"},null,-1)),d.value==="param"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[b[31]||(b[31]=c.createElementVNode("div",{class:"group-header"},"当前状态",-1)),c.createElementVNode("div",qE,[b[24]||(b[24]=c.createElementVNode("label",null,"经度(东西):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[2]||(b[2]=M=>E.longitude=M),onChange:b[3]||(b[3]=M=>F("longitude")),step:m.value},null,40,JE),[[c.vModelText,E.longitude,void 0,{number:!0}]])]),c.createElementVNode("div",ZE,[b[25]||(b[25]=c.createElementVNode("label",null,"纬度(南北):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[4]||(b[4]=M=>E.latitude=M),onChange:b[5]||(b[5]=M=>F("latitude")),step:m.value},null,40,ew),[[c.vModelText,E.latitude,void 0,{number:!0}]])]),c.createElementVNode("div",tw,[b[26]||(b[26]=c.createElementVNode("label",null,"高度(m):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[6]||(b[6]=M=>E.height=M),onChange:b[7]||(b[7]=M=>F("height")),step:m.value},null,40,iw),[[c.vModelText,E.height,void 0,{number:!0}]])]),c.createElementVNode("div",nw,[b[27]||(b[27]=c.createElementVNode("label",null,"累计旋转(°):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[8]||(b[8]=M=>E.totalRotation=M),onChange:b[9]||(b[9]=M=>F("totalRotation")),step:m.value},null,40,sw),[[c.vModelText,E.totalRotation,void 0,{number:!0}]])]),b[32]||(b[32]=c.createElementVNode("div",{class:"separator"},null,-1)),b[33]||(b[33]=c.createElementVNode("div",{class:"group-header"},"调整步长",-1)),c.createElementVNode("div",ow,[b[28]||(b[28]=c.createElementVNode("label",null,"经纬步长(°):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[10]||(b[10]=M=>E.distance=M),step:m.value},null,8,rw),[[c.vModelText,E.distance,void 0,{number:!0}]])]),c.createElementVNode("div",aw,[b[29]||(b[29]=c.createElementVNode("label",null,"高度步长(m):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[11]||(b[11]=M=>E.heightDistance=M),step:m.value},null,8,lw),[[c.vModelText,E.heightDistance,void 0,{number:!0}]])]),c.createElementVNode("div",cw,[b[30]||(b[30]=c.createElementVNode("label",null,"旋转步长(°):",-1)),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":b[12]||(b[12]=M=>E.rotation=M),step:m.value},null,8,dw),[[c.vModelText,E.rotation,void 0,{number:!0}]])]),c.createElementVNode("div",hw,[c.createElementVNode("button",{onClick:b[13]||(b[13]=M=>_("rotateLeft"))},"左转"),c.createElementVNode("button",{onClick:b[14]||(b[14]=M=>_("north"))},"北移"),c.createElementVNode("button",{onClick:b[15]||(b[15]=M=>_("rotateRight"))},"右转"),c.createElementVNode("button",{onClick:b[16]||(b[16]=M=>_("west"))},"西移"),c.createElementVNode("button",{onClick:b[17]||(b[17]=M=>_("south"))},"南移"),c.createElementVNode("button",{onClick:b[18]||(b[18]=M=>_("east"))},"东移"),c.createElementVNode("button",{onClick:b[19]||(b[19]=M=>_("up"))},"上移"),c.createElementVNode("button",{onClick:b[20]||(b[20]=M=>_("down"))},"下移"),c.createElementVNode("button",{onClick:L,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):(c.openBlock(),c.createElementBlock("div",uw,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(u,(M,k)=>(c.openBlock(),c.createElementBlock("div",{key:k,class:"form-item",style:{display:"block","margin-bottom":"15px"}},[c.createElementVNode("div",{style:{"font-weight":"bold","margin-bottom":"5px",cursor:"pointer",display:"flex","align-items":"center"},onClick:Q=>h.value=k},[c.createElementVNode("input",{type:"radio",checked:h.value===k,style:{"margin-right":"5px"}},null,8,pw),c.createTextVNode(" "+c.toDisplayString(M.type)+": ",1)],8,fw),c.createElementVNode("div",gw,[c.createElementVNode("div",mw,[c.createElementVNode("label",Aw,c.toDisplayString(M.longitudeText),1),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":Q=>M.longitude=Q,readonly:"",style:{width:"100px"}},null,8,yw),[[c.vModelText,M.longitude,void 0,{number:!0}]])]),c.createElementVNode("div",Cw,[c.createElementVNode("label",Ew,c.toDisplayString(M.latitudeText),1),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":Q=>M.latitude=Q,readonly:"",style:{width:"100px"}},null,8,ww),[[c.vModelText,M.latitude,void 0,{number:!0}]])]),c.createElementVNode("div",bw,[c.createElementVNode("label",vw,c.toDisplayString(M.heightText),1),c.withDirectives(c.createElementVNode("input",{type:"number","onUpdate:modelValue":Q=>M.height=Q,readonly:"",style:{width:"100px"}},null,8,Iw),[[c.vModelText,M.height,void 0,{number:!0}]])])])]))),128)),c.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[c.createElementVNode("button",{onClick:w,class:"primary-btn"},"应用校准"),c.createElementVNode("button",{onClick:L},"保存")]),b[34]||(b[34]=c.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[c.createElementVNode("div",null,"操作指南:"),c.createElementVNode("div",null,"1. 勾选上方 CAD 或 地图 标记点选项。"),c.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),c.createElementVNode("div",null,"3. 采集两点后,点击“应用校准”进行校准。")],-1))]))]),c.createElementVNode("div",Bw,[c.createElementVNode("div",xw,[c.createElementVNode("div",Sw,[c.createElementVNode("input",{type:"checkbox",checked:a.value,onChange:H},null,40,Tw)]),b[36]||(b[36]=c.createElementVNode("div",{class:"col-index"},"序号",-1)),b[37]||(b[37]=c.createElementVNode("div",{class:"col-name"},"名称",-1)),b[38]||(b[38]=c.createElementVNode("div",{class:"col-main"},"主模型",-1))]),c.createElementVNode("div",Mw,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.value,(M,k)=>(c.openBlock(),c.createElementBlock("div",{key:M.modelId,class:c.normalizeClass(["list-item",{active:M.modelId===l.value}])},[c.createElementVNode("div",Dw,[c.withDirectives(c.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":Q=>M.selected=Q},null,8,kw),[[c.vModelCheckbox,M.selected]])]),c.createElementVNode("div",Pw,c.toDisplayString(k+1),1),c.createElementVNode("div",{class:"col-name",title:M.modelName},c.toDisplayString(M.modelName),9,Fw),c.createElementVNode("div",Rw,[c.createElementVNode("input",{type:"radio",name:"mainModel",checked:M.modelId===l.value,onChange:Q=>P(M.modelId)},null,40,Ow)])],2))),128)),r.value.length===0?(c.openBlock(),c.createElementBlock("div",Lw,"暂无数据")):c.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-e8abd49d"]]),Uw={class:"annotation-content"},_w={class:"annotation-tools"},Qw={class:"annotation-controls"},Gw={class:"control-group",title:"颜色"},Hw={class:"tool-item color-tool"},Yw={class:"control-group line-width-container",title:"线宽"},Vw=["onClick"],zw={class:"option-label"},Ww=Re(c.defineComponent({__name:"LeitingAnnotationCard",props:{visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(i,{emit:e}){const t=i,n=e,s=c.inject("leitingMethods"),o=c.ref(""),r=c.ref("#ff0000"),l=c.ref(1),a=c.ref(!1),d=c.ref(null),h=c.ref(null),p=c.ref({top:"0px",left:"0px"}),f=[{value:6,label:"粗"},{value:3,label:"中"},{value:1,label:"细"}],u=()=>s?.value?.getAnnotationInstance?s.value.getAnnotationInstance():null,m=()=>{n("update:visible",!1)},E=B=>{o.value=B;const g=u();if(g)switch(B){case"freehandLine":g.startFreehandLine();break;case"arrow":g.startArrow();break;case"straightLine":g.startStraightLine();break;case"rectangle":g.startRectangle();break;case"ellipse":g.startEllipse();break}},A=()=>{const B=u();B&&(B.setCurrentColor(r.value),B.changeColor(r.value))},C=()=>{if(!a.value&&d.value){const B=d.value.getBoundingClientRect();p.value={top:`${B.top}px`,left:`${B.right+8}px`}}a.value=!a.value},v=B=>{l.value=B,a.value=!1;const g=u();g&&(g.setCurrentWidth(B),g.changeWidth(B))},S=()=>{const B=u();B&&B.deleteSelectedEntity()},D=()=>{const B=u();B&&B.clearAll()},O=()=>{if(s?.value?.saveAnnotations){s.value.saveAnnotations();return}const B=u();B&&B.saveAnnotations()},I=B=>{const g=B.target,P=d.value&&d.value.contains(g),x=h.value&&h.value.contains(g);!P&&!x&&(a.value=!1)};return c.onMounted(()=>{document.addEventListener("click",I)}),c.onUnmounted(()=>{document.removeEventListener("click",I)}),(B,g)=>(c.openBlock(),c.createBlock(ke,{visible:t.visible,title:"标注",width:70,"min-width":70,height:480,"onUpdate:visible":g[6]||(g[6]=P=>n("update:visible",P)),onClose:m},{default:c.withCtx(()=>[c.createElementVNode("div",Uw,[c.createElementVNode("div",_w,[c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:o.value==="freehandLine"}]),onClick:g[0]||(g[0]=P=>E("freehandLine")),title:"手绘线"},[...g[7]||(g[7]=[c.createElementVNode("div",{class:"tool-icon"},"✏️",-1)])],2),c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:o.value==="arrow"}]),onClick:g[1]||(g[1]=P=>E("arrow")),title:"箭头"},[...g[8]||(g[8]=[c.createElementVNode("div",{class:"tool-icon"},"↗️",-1)])],2),c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:o.value==="straightLine"}]),onClick:g[2]||(g[2]=P=>E("straightLine")),title:"直线"},[...g[9]||(g[9]=[c.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:o.value==="rectangle"}]),onClick:g[3]||(g[3]=P=>E("rectangle")),title:"矩形"},[...g[10]||(g[10]=[c.createElementVNode("div",{class:"tool-icon"},"▭",-1)])],2),c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:o.value==="ellipse"}]),onClick:g[4]||(g[4]=P=>E("ellipse")),title:"椭圆"},[...g[11]||(g[11]=[c.createElementVNode("div",{class:"tool-icon"},"⭕",-1)])],2)]),g[13]||(g[13]=c.createElementVNode("div",{class:"separator"},null,-1)),c.createElementVNode("div",Qw,[c.createElementVNode("div",Gw,[c.createElementVNode("div",Hw,[c.createElementVNode("div",{class:"color-swatch",style:c.normalizeStyle({backgroundColor:r.value})},null,4),c.withDirectives(c.createElementVNode("input",{type:"color","onUpdate:modelValue":g[5]||(g[5]=P=>r.value=P),onChange:A,class:"color-input-overlay"},null,544),[[c.vModelText,r.value]])])]),c.createElementVNode("div",Yw,[c.createElementVNode("div",{ref_key:"lineWidthBtnRef",ref:d,class:"tool-item",onClick:c.withModifiers(C,["stop"])},[c.createElementVNode("div",{class:"current-width-preview",style:c.normalizeStyle({height:l.value+"px",backgroundColor:"#fff"})},null,4)],512),(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[a.value?(c.openBlock(),c.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:h,class:"line-width-dropdown",style:c.normalizeStyle(p.value)},[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(f,P=>c.createElementVNode("div",{key:P.value,class:c.normalizeClass(["line-width-option",{selected:l.value===P.value}]),onClick:c.withModifiers(x=>v(P.value),["stop"])},[c.createElementVNode("span",zw,c.toDisplayString(P.label),1),c.createElementVNode("div",{class:"line-preview",style:c.normalizeStyle({height:P.value+"px",backgroundColor:l.value===P.value?"#1890ff":"#ddd"})},null,4)],10,Vw)),64))],4)):c.createCommentVNode("",!0)]))]),g[12]||(g[12]=c.createElementVNode("div",{class:"separator"},null,-1)),c.createElementVNode("div",{class:"action-buttons"},[c.createElementVNode("button",{class:"control-btn",onClick:S,title:"删除选中"}," 🗑️ "),c.createElementVNode("button",{class:"control-btn",onClick:D,title:"清空"}," ❌ "),c.createElementVNode("button",{class:"control-btn",onClick:O,title:"保存"}," 💾 ")])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-3cfc8415"]]),jw={class:"measure-content"},Kw={class:"measure-tools"},$w={key:0,class:"measure-results"},Xw={class:"result-row"},qw={class:"result-value"},Jw={class:"result-row"},Zw={class:"result-value"},eb={class:"result-row"},tb={class:"result-value"},ib={class:"result-row"},nb={class:"result-value"},sb={key:1,class:"result-row"},ob={class:"result-value"},rb={key:2,class:"result-row"},ab={class:"result-value"},lb={class:"measure-controls"},cb={class:"control-group",title:"单位"},db={class:"unit-display"},hb=["onClick"],ub=Re(c.defineComponent({__name:"LeitingMeasurement",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","close"],setup(i,{emit:e}){const t=i,n=e,s=c.inject("leitingMethods",c.ref({})),o=c.ref(null),r=c.ref(null),l=c.ref("m"),a=c.ref(!1),d=c.ref(null),h=c.ref(!1),p=c.ref({}),f=c.ref(null),u=[{label:"米 (m)",value:"m"},{label:"厘米 (cm)",value:"cm"},{label:"毫米 (mm)",value:"mm"}],m=B=>{const g=l.value;return g==="mm"?`${(B*1e3).toFixed(0)}mm`:g==="cm"?`${(B*100).toFixed(1)}cm`:`${B.toFixed(2)}m`},E=B=>B>1e6?`${(B/1e6).toFixed(2)} km²`:`${B.toFixed(2)} m²`,A=()=>{if(!o.value&&s.value?.getViewer){const B=s.value.getViewer(),g=s.value.getCesium();B&&g&&(o.value=new tl({viewer:B,cesium:g}),o.value.setUnit(l.value),o.value.setSnapping(a.value),o.value.onMeasure=P=>{d.value=P})}},C=B=>{o.value||A(),r.value===B?(r.value=null,o.value?.stop()):(r.value=B,o.value?.start(B))},v=B=>{l.value=B,h.value=!1},S=()=>{o.value&&(o.value.clearAll(),r.value=null,o.value.stop())},D=()=>{n("update:visible",!1)},O=B=>{if(h.value){h.value=!1;return}const P=B.currentTarget.getBoundingClientRect();p.value={position:"fixed",top:`${P.top}px`,left:`${P.right+5}px`,zIndex:3e3},h.value=!0},I=B=>{h.value&&f.value&&!f.value.contains(B.target)&&(h.value=!1)};return c.onMounted(()=>{document.addEventListener("click",I),t.visible&&c.nextTick(()=>A())}),c.onUnmounted(()=>{document.removeEventListener("click",I),o.value&&o.value.destroy()}),c.watch(()=>t.visible,B=>{B?c.nextTick(()=>A()):o.value&&(o.value.stop(),r.value=null)}),c.watch(s,B=>{B&&B.getViewer&&!o.value&&t.visible&&A()}),c.watch(l,B=>{o.value&&o.value.setUnit(B)}),(B,g)=>(c.openBlock(),c.createBlock(ke,{visible:t.visible,title:"量算",width:70,"min-width":70,height:480,"onUpdate:visible":g[3]||(g[3]=P=>n("update:visible",P)),onClose:D},{default:c.withCtx(()=>[c.createElementVNode("div",jw,[c.createElementVNode("div",Kw,[c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:r.value==="distance"}]),onClick:g[0]||(g[0]=P=>C("distance")),title:"距离测量"},[...g[4]||(g[4]=[c.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:r.value==="angle"}]),onClick:g[1]||(g[1]=P=>C("angle")),title:"角度测量"},[...g[5]||(g[5]=[c.createElementVNode("div",{class:"tool-icon"},"📐",-1)])],2),c.createElementVNode("div",{class:c.normalizeClass(["tool-item",{active:r.value==="area"}]),onClick:g[2]||(g[2]=P=>C("area")),title:"面积测量"},[...g[6]||(g[6]=[c.createElementVNode("div",{class:"tool-icon"},"🔳",-1)])],2)]),g[15]||(g[15]=c.createElementVNode("div",{class:"separator"},null,-1)),d.value?(c.openBlock(),c.createElementBlock("div",$w,[d.value.type==="distance"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createElementVNode("div",Xw,[g[7]||(g[7]=c.createElementVNode("span",{class:"result-label"},"总长:",-1)),c.createElementVNode("span",qw,c.toDisplayString(m(d.value.dist)),1)]),c.createElementVNode("div",Jw,[g[8]||(g[8]=c.createElementVNode("span",{class:"result-label",style:{color:"#ff4d4f"}},"ΔX:",-1)),c.createElementVNode("span",Zw,c.toDisplayString(m(d.value.dx)),1)]),c.createElementVNode("div",eb,[g[9]||(g[9]=c.createElementVNode("span",{class:"result-label",style:{color:"#52c41a"}},"ΔY:",-1)),c.createElementVNode("span",tb,c.toDisplayString(m(d.value.dy)),1)]),c.createElementVNode("div",ib,[g[10]||(g[10]=c.createElementVNode("span",{class:"result-label",style:{color:"#1890ff"}},"ΔZ:",-1)),c.createElementVNode("span",nb,c.toDisplayString(m(d.value.dz)),1)])],64)):c.createCommentVNode("",!0),d.value.type==="angle"?(c.openBlock(),c.createElementBlock("div",sb,[g[11]||(g[11]=c.createElementVNode("span",{class:"result-label"},"角度:",-1)),c.createElementVNode("span",ob,c.toDisplayString(d.value.angle.toFixed(1))+"°",1)])):c.createCommentVNode("",!0),d.value.type==="area"?(c.openBlock(),c.createElementBlock("div",rb,[g[12]||(g[12]=c.createElementVNode("span",{class:"result-label"},"面积:",-1)),c.createElementVNode("span",ab,c.toDisplayString(E(d.value.area)),1)])):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),c.createElementVNode("div",lb,[c.createElementVNode("div",cb,[c.createElementVNode("div",{class:"tool-item",onClick:c.withModifiers(O,["stop"])},[c.createElementVNode("div",db,c.toDisplayString(l.value),1)]),(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[h.value?(c.openBlock(),c.createElementBlock("div",{key:0,ref_key:"unitDropdownRef",ref:f,class:"unit-dropdown",style:c.normalizeStyle(p.value)},[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(u,P=>c.createElementVNode("div",{key:P.value,class:c.normalizeClass(["unit-option",{selected:l.value===P.value}]),onClick:c.withModifiers(x=>v(P.value),["stop"])},c.toDisplayString(P.label),11,hb)),64))],4)):c.createCommentVNode("",!0)]))]),g[14]||(g[14]=c.createElementVNode("div",{class:"separator"},null,-1)),c.createElementVNode("div",{class:"action-buttons"},[c.createElementVNode("div",{class:"tool-item control-btn",onClick:S,title:"清空"},[...g[13]||(g[13]=[c.createElementVNode("div",{class:"tool-icon"},"🗑️",-1)])])])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-b766acb4"]]);function fb(){const i=c.ref(!1),e=c.reactive({x:0,y:0}),t=c.ref([]),n=c.ref(null);return{visible:i,position:e,items:t,contextData:n,show:(a,d,h)=>{a instanceof MouseEvent?(a.preventDefault(),e.x=a.clientX,e.y=a.clientY):(e.x=a.x,e.y=a.y),t.value=d,n.value=h,i.value=!0},hide:()=>{i.value=!1},addItem:a=>{t.value.push(a)},removeItem:a=>{t.value=t.value.filter(d=>d.id!==a)}}}const pb=["onClick"],gb={class:"menu-label"},mb={key:0,class:"menu-arrow"},Ab=Re(c.defineComponent({__name:"LeitingContextMenu",props:{visible:{type:Boolean},position:{},items:{}},emits:["update:visible","action"],setup(i,{emit:e}){const t=i,n=e,s=r=>{r.disabled||(r.action&&r.action(),n("action",r),n("update:visible",!1))},o=()=>{t.visible&&n("update:visible",!1)};return c.onMounted(()=>{document.addEventListener("click",o),document.addEventListener("contextmenu",r=>{r.target.closest(".leiting-context-menu")||o()})}),c.onUnmounted(()=>{document.removeEventListener("click",o)}),(r,l)=>c.withDirectives((c.openBlock(),c.createElementBlock("div",{class:"leiting-context-menu",style:c.normalizeStyle({left:i.position.x+"px",top:i.position.y+"px"}),onContextmenu:l[0]||(l[0]=c.withModifiers(()=>{},["prevent"]))},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.items,a=>(c.openBlock(),c.createElementBlock("div",{key:a.id,class:c.normalizeClass(["menu-item",{"menu-divided":a.divided,"menu-disabled":a.disabled}]),onClick:d=>s(a)},[c.createElementVNode("span",gb,c.toDisplayString(a.label),1),a.children?(c.openBlock(),c.createElementBlock("span",mb,"▶")):c.createCommentVNode("",!0)],10,pb))),128))],36)),[[c.vShow,i.visible]])}}),[["__scopeId","data-v-f288753b"]]),pn=Re(c.defineComponent({__name:"LeitingBIM",props:{accessToken:{},cesiumUrl:{},cesiumCssUrl:{},methods:{},viewerOptions:{},treeProps:{},showTree:{type:Boolean,default:!0},showMenu:{type:Boolean,default:!1},playerUrl:{default:"https://leiting.chenxisoft.com/resource/person/person.glb"},playerModelName:{default:"Person"},playerModelId:{default:"player_111"},playerScale:{default:.0032},tiandituToken:{default:"c25f14fb6bd4397cf8fe45144ff768d6"},globe:{type:Boolean,default:void 0},terrain:{type:Boolean,default:void 0},depthTest:{type:Boolean,default:void 0},mapProvider:{},tiandituLayerType:{},tiandituShowLabel:{type:Boolean,default:void 0},arcgisUrl:{},shadows:{type:Boolean,default:void 0},environmentMap:{type:Boolean,default:void 0},ambientOcclusion:{type:Boolean,default:void 0},time:{},brightness:{},backgroundColor:{},collision:{type:Boolean,default:void 0},mouseHabit:{},mode:{default:"3d"},mountAll3Dtiles:{},mountAllCad:{},saveRegion:{},saveCadRegion:{},saveCadCalibration:{},selectionChange:{},searchComponent:{}},emits:["register","init","ready"],setup(i,{emit:e}){const t=c.ref(),n=c.ref(),s=c.getCurrentInstance(),o=c.ref(!1),r=c.ref(""),l=c.ref({}),a=c.ref("3d"),d=i,h={title:"构件树",treeData:[]},p=c.ref(!1),f=c.ref(!1),u=c.ref(!1),m=c.ref(!1),E=c.ref(!1),A=c.ref(!1),C=c.ref(!1),v=c.ref(!1),S=c.ref(!1),D=c.ref(!1),{visible:O,position:I,items:B,show:g,hide:P}=fb(),x=c.ref([]),F=Y=>{x.value.push(Y)},_=Y=>{x.value=x.value.filter(j=>j.id!==Y)},H=c.ref([]),L=c.ref(""),w=c.ref(null),y=c.ref([]),b=c.reactive({tree:!1,section:!1,roam:!1,info:!1,adjustModel:!1,setting:!1,cadLayer:!1,cadPosition:!1,annotation:!1}),M=(Y,j)=>{Y==="componentTree"&&(Y="tree"),Y==="componentInfo"&&(Y="info"),Y in b&&(b[Y]=j)},k=c.shallowRef({});c.provide("leitingMethods",k);const Q=c.ref(d.showMenu),R=c.ref([]);c.watch(()=>d.showMenu,Y=>{Q.value=Y},{immediate:!0}),c.watch(()=>d.mode,Y=>{Y&&k.value?.set2d&&k.value.set2d(Y==="2d")});const T=c.ref("dark");c.provide("leiting-theme",T);const U=c.ref([]),V=c.computed(()=>{const Y=[];return p.value&&(Y.push("tree"),Y.push("componentTree")),f.value&&Y.push("section"),u.value&&Y.push("roam"),m.value&&(Y.push("info"),Y.push("componentInfo")),E.value&&Y.push("adjust"),A.value&&Y.push("setting"),C.value&&Y.push("cadLayer"),v.value&&Y.push("cadPosition"),S.value&&Y.push("annotation"),D.value&&(Y.push("measure"),Y.push("measurement")),Y.push(...U.value),Y}),W=c.ref(null),X=(Y,j)=>{Y==="componentTree"||Y==="tree"?p.value=j:Y==="section"?f.value=j:Y==="roam"?u.value=j:Y==="componentInfo"||Y==="info"?m.value=j:Y==="homeView"?k.value?.is2dMode?.()?k.value?.flyToTopView?.({}):k.value?.getBIMmodelId()?k.value?.flyToTileset?.({}):k.value?.getCadModelId()&&k.value?.flyToTopView?.({}):Y==="adjustModel"?(E.value=j,j&&W.value&&W.value.setModelType("BIM")):Y==="osgbAdjust"?(E.value=j,j&&W.value&&W.value.setModelType("OSGB")):Y==="setting"?A.value=j:Y==="cadLayer"?C.value=j:Y==="cadPosition"?v.value=j:Y==="annotation"?S.value=j:Y==="measurement"?D.value=j:j?U.value.includes(Y)||U.value.push(Y):U.value=U.value.filter(te=>te!==Y)};c.watch(p,async Y=>{if(Y&&k.value?.loadTreeForModel&&k.value?.getMapTileset){const j=k.value.getMapTileset(),te=Object.values(j).map(async le=>{if(le.leiting&&le.leiting.model?.treeUrl){const re=le.leiting.model.modelId;try{le.leiting?.node?.batchIdEIDInfos||await k.value.loadNodeDetailsForModel(re);const ce=await k.value.loadTreeForModel(re);ce&&(Array.isArray(ce)?ce:[ce]).forEach(Te=>{Te&&!y.value.find(et=>et.id===Te.id)&&(Te.modelId=re,y.value=[...y.value,Te])})}catch(ce){console.warn(`Failed to lazy load tree for ${re}`,ce)}}});await Promise.all(te)}});const ee=()=>{k.value&&(k.value.getDxfModels&&(H.value=k.value.getDxfModels()||[]),k.value.getCadModelId&&(L.value=k.value.getCadModelId()||""))};c.watch(C,Y=>{Y&&ee()}),c.watch(v,Y=>{Y&&(ee(),w.value&&H.value.length&&w.value.addGltfOr3dTilesModelList(H.value))});const oe=e,ne=Y=>{k.value&&k.value.saveCadCalibration&&k.value.saveCadCalibration(Y),k.value&&k.value.saveCadRegion&&k.value.saveCadRegion(Y)};return c.onMounted(async()=>{if(n.value&&pe.setContainer(n.value),!!t.value)try{const Y={...ft,cesiumUrl:d.cesiumUrl||ft.cesiumUrl,cesiumCssUrl:d.cesiumCssUrl||ft.cesiumCssUrl,accessToken:d.accessToken||wn()||ft.accessToken};await En(Y);const j=d.accessToken||wn()||ft.accessToken;j&&(Cesium.Ion.defaultAccessToken=j),o.value=!0;const te=async(re={},ce)=>{if(t.value){const{showMenu:ve,showTree:Te,globe:et,terrain:xt,depthTest:gn,mapProvider:St,tiandituLayerType:mn,tiandituShowLabel:vi,arcgisUrl:Wt,shadows:ks,environmentMap:Eb,ambientOcclusion:wb,time:bb,brightness:vb,backgroundColor:Ib,collision:Bb,mouseHabit:xb,heightBasedZoom:Sb,mode:Al,...Xe}=re||{},Tb=d.showMenu!==void 0?d.showMenu:ve!==void 0?ve:!0;Q.value=Tb;const Me=(q,Ce,Ye)=>q!==void 0?q:Ce!==void 0?Ce:Ye,yl=Me(d.globe,et,!1),Cl=Me(d.terrain,xt,!1),El=Me(d.depthTest,gn,!1),wl=Me(d.mapProvider,St,"tianditu"),bl=Me(d.tiandituLayerType,mn,"img_w"),vl=Me(d.tiandituShowLabel,vi,!1),Il=Me(d.arcgisUrl,Wt,"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"),Bl=Me(d.shadows,ks,!1),xl=Me(d.environmentMap,Eb,!1),Sl=Me(d.ambientOcclusion,wb,!1),Tl=Me(d.time,bb,void 0),Ml=Me(d.brightness,vb,1),An=d.mode||Al||"3d";console.log("LeitingBIM Mode:",An,"Props:",d.mode,"Options:",Al),a.value=An;const Mb=An==="2d"?"#000000":"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)",Dl=Me(d.backgroundColor,Ib,Mb),kl=Me(d.collision,Bb,!1),Pl=Me(d.mouseHabit,xb,0),Fl=Me(d.heightBasedZoom,Sb,!1);l.value={globe:yl,terrain:Cl,depthTest:El,mapProvider:wl,tiandituLayerType:bl,tiandituShowLabel:vl,arcgisUrl:Il,shadows:Bl,environmentMap:xl,ambientOcclusion:Sl,time:Tl,brightness:Ml,backgroundColor:Dl,collision:kl,mouseHabit:Pl,heightBasedZoom:Fl};const Ii=uy({container:t.value,appContext:s?.appContext,methods:{...k.value,handleMenuAction:X,setCardFullHeight:M,onLoadingStatus:q=>{q?pe.loading(q,"",n.value):pe.close()},...Xe,tilesLoad3dTiles:async q=>{let Ce=q.leiting?.tree;const Ye=q.leiting?.model?.modelId;if(!Ce&&p.value&&k.value?.loadTreeForModel)try{Ce=await k.value.loadTreeForModel(Ye)}catch(xi){console.warn("Failed to lazy load tree",xi)}Ce&&(Array.isArray(Ce)?Ce:[Ce]).forEach(Mt=>{Mt&&!y.value.find(Ol=>Ol.id===Mt.id)&&(Mt.modelId=Ye,y.value=[...y.value,Mt])});const{brightness:Ps,contrast:Fs,saturation:tt}=Ii.methods.getConfigure();Ii.methods.setModelColorAdjustment({brightness:Ps,contrast:Fs,saturation:tt}),Xe.tilesLoad3dTiles?.(q)},mountAll3Dtiles:q=>{d.mountAll3Dtiles&&d.mountAll3Dtiles(q),Xe.mountAll3Dtiles?.(q)},updateModels:q=>{if(Array.isArray(q))if(q.length===0)y.value=[];else{const Ce=q.map(Ye=>Ye.modelId);y.value=y.value.filter(Ye=>Ce.includes(Ye.modelId))}},mountAllCad:q=>{if(Ii.methods.setModelBrightness){const Ce=d.brightness!==void 0?d.brightness:l.value.brightness;Ce!==void 0&&Ii.methods.setModelBrightness(Ce)}d.mountAllCad&&d.mountAllCad(q),Xe.mountAllCad?.(q)},saveRegion:q=>{d.saveRegion&&d.saveRegion(q),Xe.saveRegion?.(q)},saveCadRegion:q=>{d.saveCadRegion&&d.saveCadRegion(q),Xe.saveCadRegion?.(q)},saveCadCalibration:q=>{d.saveCadCalibration&&d.saveCadCalibration(q),Xe.saveCadCalibration?.(q)},selectionChange:q=>{d.selectionChange&&d.selectionChange(q),Xe.selectionChange?.(q)},onSearchComponent:q=>{d.searchComponent&&d.searchComponent(q),Xe.searchComponent?.(q)}},viewerOptions:d.viewerOptions,options:{...Xe,mode:An,playerUrl:d.playerUrl,playerModelName:d.playerModelName,playerModelId:d.playerModelId,playerScale:d.playerScale,globe:yl,terrain:Cl,depthTest:El,mapProvider:wl,tiandituLayerType:bl,tiandituShowLabel:vl,tiandituToken:d.tiandituToken,arcgisUrl:Il,shadows:Bl,environmentMap:xl,ambientOcclusion:Sl,time:Tl,brightness:Ml,backgroundColor:Dl,collision:kl,mouseHabit:Pl,heightBasedZoom:Fl},callbacks:{onLoading:q=>q?pe.loading(q,"",n.value):pe.close(),onSuccess:q=>pe.success(q,"",void 0,n.value),onError:q=>pe.error(q,"",void 0,n.value)}}),{Cesium:Tt,viewer:jt,methods:yn,menuEvents:Bi}=Ii,ge=yn;Bi.on("showMenu",q=>{Q.value=q}),Bi.on("insertMenu",q=>{R.value=[...R.value,...q]}),Bi.on("setMenuActive",(q,Ce)=>{X(q,Ce)}),k.value=ge,ce&&(ce.value=ge),Bi.on("setMode",q=>{a.value=q}),Bi.on("deleteAllModels",()=>{y.value=[]}),new Tt.ScreenSpaceEventHandler(jt.scene.canvas).setInputAction(async q=>{if(P(),a.value==="2d")return;const Ce=jt.scene.pick(q.position),Ye=jt.container.getBoundingClientRect(),Ps=Ye.left+q.position.x,Fs=Ye.top+q.position.y,tt=[];if(Tt.defined(Ce)&&Ce instanceof Tt.Cesium3DTileFeature){const xi=ge.baseCompt.getFeatureId(Ce),Mt=ri(Ce.tileset);ge.baseCompt.hasSelectedFeaturesMap[Mt]?.some(Si=>Si.batchId===xi&&Si.rank===0)||(await ge.baseCompt.clearSelection(),await ge.baseCompt.toggleMultiSelect(Mt,xi,ge.baseCompt.selectedColor)),tt.push({id:"details",label:"构件详情",action:()=>{m.value=!0}}),tt.push({id:"hide",label:"隐藏选中构件",action:async()=>{const Ti=(await ge.baseCompt.getSelected()).map(it=>({elementId:it.elementId,modelId:it.modelId,show:!1}));ge.baseCompt.setComponentVisibility(Ti)}}),tt.push({id:"translucent",label:"半透明选中构件",action:async()=>{const Ti=(await ge.baseCompt.getSelected()).map(it=>({elementId:it.elementId,modelId:it.modelId,rgba:{...it.rgba,a:.3}}));await ge.baseCompt.setSelectColorUserModelCpt(Ti,{rank:0})}}),tt.push({id:"isolate",label:"隔离选中构件",divided:!0,action:async()=>{await ge.baseCompt.loadAllNodeDetailsForModel();const Ti=(await ge.baseCompt.getSelected()).map(it=>({elementId:it.elementId,modelId:it.modelId,show:!0}));ge.isolateComponents(Ti)}})}tt.push({id:"showAll",label:"显示所有",action:async()=>{ge.baseCompt.setAllComponentsVisibility(!0),await ge.baseCompt.clearSelection()}}),tt.push(...x.value),g({x:Ps,y:Fs},tt)},Tt.ScreenSpaceEventType.RIGHT_CLICK),ge.addContextMenuItems=F,ge.insertContextMenu=ge.addContextMenuItems,ge.removeContextMenuItems=_,ge.deleteContextMenu=ge.removeContextMenuItems,ge.closeContextMenu=P,ge.hideContextMenu=ge.closeContextMenu,await c.nextTick();const Rl=re?.onLoaded||re?.onloaded;Rl&&Rl({Cesium:Tt,viewer:jt,methods:yn}),oe("init",{Cesium:Tt,viewer:jt,methods:yn}),oe("ready",{Cesium:Tt,viewer:jt,methods:yn})}};let le=!1;oe("register",(re,ce)=>{le=!0,te(re,ce)}),le||setTimeout(()=>{k.value.getViewer||te()},0)}catch(Y){r.value="Failed to load Cesium: "+(Y.message||Y),console.error(Y)}}),c.onUnmounted(()=>{pe.setContainer(null)}),(Y,j)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["leiting-bim-container",[`theme-${T.value}`]]),onContextmenu:j[11]||(j[11]=c.withModifiers(()=>{},["prevent","stop"]))},[!o.value&&!r.value?(c.openBlock(),c.createBlock(c.unref(me.Spin),{key:0,class:"loading",size:"large",tip:"加载基础组件中..."})):c.createCommentVNode("",!0),r.value?(c.openBlock(),c.createBlock(c.unref(me.Alert),{key:1,class:"error",type:"error",message:r.value,"show-icon":""},null,8,["message"])):c.createCommentVNode("",!0),c.createElementVNode("div",{ref_key:"containerRef",ref:t,class:"cesium-viewer"},[c.createElementVNode("div",{ref_key:"uiOverlayRef",ref:n,class:"leiting-ui-overlay"},[c.createVNode(Ei,{visible:m.value,"full-height":b.info,"onUpdate:visible":j[0]||(j[0]=te=>m.value=te)},null,8,["visible","full-height"]),c.createVNode(wi,{ref_key:"LeitingPositionRef",ref:W,visible:E.value,"full-height":b.adjustModel,"onUpdate:visible":j[1]||(j[1]=te=>E.value=te)},null,8,["visible","full-height"]),c.createVNode(bi,{visible:A.value,"full-height":b.setting,"tianditu-token":d.tiandituToken,"initial-config":l.value,"onUpdate:visible":j[2]||(j[2]=te=>A.value=te)},null,8,["visible","full-height","tianditu-token","initial-config"]),i.showTree!==!1?(c.openBlock(),c.createBlock(rn,c.mergeProps({key:0},{...h,...i.treeProps},{visible:p.value,"full-height":b.tree,"tree-data":y.value.length>0?y.value:i.treeProps?.treeData||[],"onUpdate:visible":j[3]||(j[3]=te=>{p.value=te})}),null,16,["visible","full-height","tree-data"])):c.createCommentVNode("",!0),c.createVNode(Ww,{visible:S.value,"onUpdate:visible":j[4]||(j[4]=te=>S.value=te)},null,8,["visible"]),c.createVNode(ub,{visible:D.value,"onUpdate:visible":j[5]||(j[5]=te=>D.value=te)},null,8,["visible"]),c.createVNode(yi,{visible:f.value,"full-height":b.section,"onUpdate:visible":j[6]||(j[6]=te=>f.value=te)},null,8,["visible","full-height"]),c.createVNode(Ci,{visible:u.value,"full-height":b.roam,"onUpdate:visible":j[7]||(j[7]=te=>u.value=te)},null,8,["visible","full-height"]),c.createVNode(Ai,{visible:Q.value,"active-ids":V.value,"custom-items":R.value,onAction:X,"is-2d":a.value==="2d"},null,8,["visible","active-ids","custom-items","is-2d"]),c.createVNode(VE,{visible:C.value,"current-model-id":L.value,"onUpdate:visible":j[8]||(j[8]=te=>C.value=te)},null,8,["visible","current-model-id"]),c.createVNode(Nw,{ref_key:"cadPositionRef",ref:w,visible:v.value,"onUpdate:visible":j[9]||(j[9]=te=>v.value=te),onSave:ne},null,8,["visible"]),c.createVNode(Ab,{visible:c.unref(O),position:c.unref(I),items:c.unref(B),"onUpdate:visible":j[10]||(j[10]=te=>O.value=te)},null,8,["visible","position","items"]),c.renderSlot(Y.$slots,"default",c.normalizeProps(c.guardReactiveProps({methods:k.value,isReady:o.value})),void 0,!0)],512)],512)],34))}}),[["__scopeId","data-v-9ef32df9"]]);function ml(i){const e=c.ref(),t=c.ref(i.theme||"dark"),n=c.ref(i.menuSize||"medium");c.provide("leiting-theme",t),c.provide("leiting-menu-size",n);function s(l){c.onUnmounted(()=>{e.value=null}),l(i,e)}function o(){const l=c.unref(e);return l||console.error("未获取到leiting实例!"),l}const r=new Proxy({},{get(l,a){const d=o();if(!d)return;const h=d[a];return typeof h=="function"?h.bind(d):h},set(l,a,d){const h=o();return h?(h[a]=d,!0):!1}});return[s,r]}const yb=ft,Cb={install:(i,e)=>{if(i.component("LeitingBIM",pn),i.component("LeitingTree",rn),i.component("LeitingDraggableCard",ke),i.component("leiting-draggable-card",ke),i.component("LeitingMenu",Ai),i.component("leiting-menu",Ai),i.component("LeitingSection",yi),i.component("leiting-section",yi),i.component("LeitingPlayer",Ci),i.component("leiting-player",Ci),i.component("LeitingInfo",Ei),i.component("leiting-info",Ei),i.component("LeitingPosition",wi),i.component("leiting-position",wi),i.component("LeitingSetting",bi),i.component("leiting-setting",bi),!e)return;const t={...yb,...e};t.cesiumUrl&&En(t).catch(n=>{console.error("[LeitingBim] Failed to load Cesium resources:",n)}),i.config.globalProperties.$leitingBimOptions=t}};N.DEFAULT_CESIUM_CONFIG=ft,N.LeiTingBIM=pn,N.LeiTingDraggableCard=ke,N.LeiTingInfo=Ei,N.LeiTingMenu=Ai,N.LeiTingPlayer=Ci,N.LeiTingPosition=wi,N.LeiTingSection=yi,N.LeiTingSetting=bi,N.LeiTingTree=rn,N.LeitingBIM=pn,N.LeitingDraggableCard=ke,N.LeitingInfo=Ei,N.LeitingMenu=Ai,N.LeitingPlayer=Ci,N.LeitingPosition=wi,N.LeitingSection=yi,N.LeitingSetting=bi,N.LeitingTree=rn,N.default=Cb,N.getAccessToken=wn,N.leitingBim=pn,N.loadCesium=En,N.useLeiTing=ml,N.useLeiting=ml,N.waitForCesium=_l,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));