leiting-bim 2.1.34 → 2.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/leiting-bim.es.js +15 -5
- package/leiting-bim.umd.js +3 -3
- package/package.json +1 -1
package/leiting-bim.umd.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
|
|
10
10
|
material.diffuse *= u_tilesBrightness;
|
|
11
11
|
}
|
|
12
|
-
`});c.isModelAdjustment=!0,a.customShader=c}else{let c="color('white')";e!==1&&(c=`${c} * ${e}`),a.style=new i.Cesium3DTileStyle({color:c})}}}}var Fo=typeof global=="object"&&global&&global.Object===Object&&global,dd=typeof self=="object"&&self&&self.Object===Object&&self,Bt=Fo||dd||Function("return this")(),ti=Bt.Symbol,Ro=Object.prototype,ud=Ro.hasOwnProperty,hd=Ro.toString,pn=ti?ti.toStringTag:void 0;function fd(n){var e=ud.call(n,pn),t=n[pn];try{n[pn]=void 0;var i=!0}catch{}var s=hd.call(n);return i&&(e?n[pn]=t:delete n[pn]),s}var pd=Object.prototype,gd=pd.toString;function md(n){return gd.call(n)}var Ad="[object Null]",yd="[object Undefined]",Oo=ti?ti.toStringTag:void 0;function gn(n){return n==null?n===void 0?yd:Ad:Oo&&Oo in Object(n)?fd(n):md(n)}function Vt(n){return n!=null&&typeof n=="object"}var Cd="[object Symbol]";function Ed(n){return typeof n=="symbol"||Vt(n)&&gn(n)==Cd}var ns=Array.isArray,wd=/\s/;function bd(n){for(var e=n.length;e--&&wd.test(n.charAt(e)););return e}var vd=/^\s+/;function xd(n){return n&&n.slice(0,bd(n)+1).replace(vd,"")}function Xe(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}var Lo=NaN,Id=/^[-+]0x[0-9a-f]+$/i,Bd=/^0b[01]+$/i,Sd=/^0o[0-7]+$/i,Md=parseInt;function No(n){if(typeof n=="number")return n;if(Ed(n))return Lo;if(Xe(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=Xe(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=xd(n);var t=Bd.test(n);return t||Sd.test(n)?Md(n.slice(2),t?2:8):Id.test(n)?Lo:+n}function Uo(n){return n}var Td="[object AsyncFunction]",Dd="[object Function]",kd="[object GeneratorFunction]",Pd="[object Proxy]";function is(n){if(!Xe(n))return!1;var e=gn(n);return e==Dd||e==kd||e==Td||e==Pd}var ss=Bt["__core-js_shared__"],_o=(function(){var n=/[^.]+$/.exec(ss&&ss.keys&&ss.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function Fd(n){return!!_o&&_o in n}var Rd=Function.prototype,Od=Rd.toString;function Ld(n){if(n!=null){try{return Od.call(n)}catch{}try{return n+""}catch{}}return""}var Nd=/[\\^$.*+?()[\]{}|]/g,Ud=/^\[object .+?Constructor\]$/,_d=Function.prototype,Qd=Object.prototype,Hd=_d.toString,Gd=Qd.hasOwnProperty,Yd=RegExp("^"+Hd.call(Gd).replace(Nd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vd(n){if(!Xe(n)||Fd(n))return!1;var e=is(n)?Yd:Ud;return e.test(Ld(n))}function Wd(n,e){return n?.[e]}function os(n,e){var t=Wd(n,e);return Vd(t)?t:void 0}var Qo=Object.create,zd=(function(){function n(){}return function(e){if(!Xe(e))return{};if(Qo)return Qo(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}})();function jd(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}function $d(n,e){var t=-1,i=n.length;for(e||(e=Array(i));++t<i;)e[t]=n[t];return e}var Kd=800,Xd=16,qd=Date.now;function Jd(n){var e=0,t=0;return function(){var i=qd(),s=Xd-(i-t);if(t=i,s>0){if(++e>=Kd)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function Zd(n){return function(){return n}}var ni=(function(){try{var n=os(Object,"defineProperty");return n({},"",{}),n}catch{}})(),eu=ni?function(n,e){return ni(n,"toString",{configurable:!0,enumerable:!1,value:Zd(e),writable:!0})}:Uo,tu=Jd(eu),nu=9007199254740991,iu=/^(?:0|[1-9]\d*)$/;function Ho(n,e){var t=typeof n;return e=e??nu,!!e&&(t=="number"||t!="symbol"&&iu.test(n))&&n>-1&&n%1==0&&n<e}function rs(n,e,t){e=="__proto__"&&ni?ni(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function ii(n,e){return n===e||n!==n&&e!==e}var su=Object.prototype,ou=su.hasOwnProperty;function ru(n,e,t){var i=n[e];(!(ou.call(n,e)&&ii(i,t))||t===void 0&&!(e in n))&&rs(n,e,t)}function au(n,e,t,i){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=n[l]),s?rs(t,l,a):ru(t,l,a)}return t}var Go=Math.max;function lu(n,e,t){return e=Go(e===void 0?n.length-1:e,0),function(){for(var i=arguments,s=-1,o=Go(i.length-e,0),r=Array(o);++s<o;)r[s]=i[e+s];s=-1;for(var l=Array(e+1);++s<e;)l[s]=i[s];return l[e]=t(r),jd(n,this,l)}}function cu(n,e){return tu(lu(n,e,Uo),n+"")}var du=9007199254740991;function Yo(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=du}function as(n){return n!=null&&Yo(n.length)&&!is(n)}function uu(n,e,t){if(!Xe(t))return!1;var i=typeof e;return(i=="number"?as(t)&&Ho(e,t.length):i=="string"&&e in t)?ii(t[e],n):!1}function hu(n){return cu(function(e,t){var i=-1,s=t.length,o=s>1?t[s-1]:void 0,r=s>2?t[2]:void 0;for(o=n.length>3&&typeof o=="function"?(s--,o):void 0,r&&uu(t[0],t[1],r)&&(o=s<3?void 0:o,s=1),e=Object(e);++i<s;){var l=t[i];l&&n(e,l,i,o)}return e})}var fu=Object.prototype;function Vo(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||fu;return n===t}function pu(n,e){for(var t=-1,i=Array(n);++t<n;)i[t]=e(t);return i}var gu="[object Arguments]";function Wo(n){return Vt(n)&&gn(n)==gu}var zo=Object.prototype,mu=zo.hasOwnProperty,Au=zo.propertyIsEnumerable,ls=Wo((function(){return arguments})())?Wo:function(n){return Vt(n)&&mu.call(n,"callee")&&!Au.call(n,"callee")};function yu(){return!1}var jo=typeof U=="object"&&U&&!U.nodeType&&U,$o=jo&&typeof module=="object"&&module&&!module.nodeType&&module,Cu=$o&&$o.exports===jo,Ko=Cu?Bt.Buffer:void 0,Eu=Ko?Ko.isBuffer:void 0,Xo=Eu||yu,wu="[object Arguments]",bu="[object Array]",vu="[object Boolean]",xu="[object Date]",Iu="[object Error]",Bu="[object Function]",Su="[object Map]",Mu="[object Number]",Tu="[object Object]",Du="[object RegExp]",ku="[object Set]",Pu="[object String]",Fu="[object WeakMap]",Ru="[object ArrayBuffer]",Ou="[object DataView]",Lu="[object Float32Array]",Nu="[object Float64Array]",Uu="[object Int8Array]",_u="[object Int16Array]",Qu="[object Int32Array]",Hu="[object Uint8Array]",Gu="[object Uint8ClampedArray]",Yu="[object Uint16Array]",Vu="[object Uint32Array]",ce={};ce[Lu]=ce[Nu]=ce[Uu]=ce[_u]=ce[Qu]=ce[Hu]=ce[Gu]=ce[Yu]=ce[Vu]=!0,ce[wu]=ce[bu]=ce[Ru]=ce[vu]=ce[Ou]=ce[xu]=ce[Iu]=ce[Bu]=ce[Su]=ce[Mu]=ce[Tu]=ce[Du]=ce[ku]=ce[Pu]=ce[Fu]=!1;function Wu(n){return Vt(n)&&Yo(n.length)&&!!ce[gn(n)]}function zu(n){return function(e){return n(e)}}var qo=typeof U=="object"&&U&&!U.nodeType&&U,mn=qo&&typeof module=="object"&&module&&!module.nodeType&&module,ju=mn&&mn.exports===qo,cs=ju&&Fo.process,Jo=(function(){try{var n=mn&&mn.require&&mn.require("util").types;return n||cs&&cs.binding&&cs.binding("util")}catch{}})(),Zo=Jo&&Jo.isTypedArray,er=Zo?zu(Zo):Wu;function $u(n,e){var t=ns(n),i=!t&&ls(n),s=!t&&!i&&Xo(n),o=!t&&!i&&!s&&er(n),r=t||i||s||o,l=r?pu(n.length,String):[],a=l.length;for(var c in n)r&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ho(c,a))||l.push(c);return l}function Ku(n,e){return function(t){return n(e(t))}}function Xu(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var qu=Object.prototype,Ju=qu.hasOwnProperty;function Zu(n){if(!Xe(n))return Xu(n);var e=Vo(n),t=[];for(var i in n)i=="constructor"&&(e||!Ju.call(n,i))||t.push(i);return t}function tr(n){return as(n)?$u(n):Zu(n)}var An=os(Object,"create");function eh(){this.__data__=An?An(null):{},this.size=0}function th(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var nh="__lodash_hash_undefined__",ih=Object.prototype,sh=ih.hasOwnProperty;function oh(n){var e=this.__data__;if(An){var t=e[n];return t===nh?void 0:t}return sh.call(e,n)?e[n]:void 0}var rh=Object.prototype,ah=rh.hasOwnProperty;function lh(n){var e=this.__data__;return An?e[n]!==void 0:ah.call(e,n)}var ch="__lodash_hash_undefined__";function dh(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=An&&e===void 0?ch:e,this}function St(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var i=n[e];this.set(i[0],i[1])}}St.prototype.clear=eh,St.prototype.delete=th,St.prototype.get=oh,St.prototype.has=lh,St.prototype.set=dh;function uh(){this.__data__=[],this.size=0}function si(n,e){for(var t=n.length;t--;)if(ii(n[t][0],e))return t;return-1}var hh=Array.prototype,fh=hh.splice;function ph(n){var e=this.__data__,t=si(e,n);if(t<0)return!1;var i=e.length-1;return t==i?e.pop():fh.call(e,t,1),--this.size,!0}function gh(n){var e=this.__data__,t=si(e,n);return t<0?void 0:e[t][1]}function mh(n){return si(this.__data__,n)>-1}function Ah(n,e){var t=this.__data__,i=si(t,n);return i<0?(++this.size,t.push([n,e])):t[i][1]=e,this}function ot(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var i=n[e];this.set(i[0],i[1])}}ot.prototype.clear=uh,ot.prototype.delete=ph,ot.prototype.get=gh,ot.prototype.has=mh,ot.prototype.set=Ah;var nr=os(Bt,"Map");function yh(){this.size=0,this.__data__={hash:new St,map:new(nr||ot),string:new St}}function Ch(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function oi(n,e){var t=n.__data__;return Ch(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Eh(n){var e=oi(this,n).delete(n);return this.size-=e?1:0,e}function wh(n){return oi(this,n).get(n)}function bh(n){return oi(this,n).has(n)}function vh(n,e){var t=oi(this,n),i=t.size;return t.set(n,e),this.size+=t.size==i?0:1,this}function Wt(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var i=n[e];this.set(i[0],i[1])}}Wt.prototype.clear=yh,Wt.prototype.delete=Eh,Wt.prototype.get=wh,Wt.prototype.has=bh,Wt.prototype.set=vh;var ir=Ku(Object.getPrototypeOf,Object),xh="[object Object]",Ih=Function.prototype,Bh=Object.prototype,sr=Ih.toString,Sh=Bh.hasOwnProperty,Mh=sr.call(Object);function Th(n){if(!Vt(n)||gn(n)!=xh)return!1;var e=ir(n);if(e===null)return!0;var t=Sh.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&sr.call(t)==Mh}function Dh(){this.__data__=new ot,this.size=0}function kh(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function Ph(n){return this.__data__.get(n)}function Fh(n){return this.__data__.has(n)}var Rh=200;function Oh(n,e){var t=this.__data__;if(t instanceof ot){var i=t.__data__;if(!nr||i.length<Rh-1)return i.push([n,e]),this.size=++t.size,this;t=this.__data__=new Wt(i)}return t.set(n,e),this.size=t.size,this}function zt(n){var e=this.__data__=new ot(n);this.size=e.size}zt.prototype.clear=Dh,zt.prototype.delete=kh,zt.prototype.get=Ph,zt.prototype.has=Fh,zt.prototype.set=Oh;var or=typeof U=="object"&&U&&!U.nodeType&&U,rr=or&&typeof module=="object"&&module&&!module.nodeType&&module,Lh=rr&&rr.exports===or,ar=Lh?Bt.Buffer:void 0;ar&&ar.allocUnsafe;function Nh(n,e){return n.slice()}var lr=Bt.Uint8Array;function Uh(n){var e=new n.constructor(n.byteLength);return new lr(e).set(new lr(n)),e}function _h(n,e){var t=Uh(n.buffer);return new n.constructor(t,n.byteOffset,n.length)}function Qh(n){return typeof n.constructor=="function"&&!Vo(n)?zd(ir(n)):{}}function Hh(n){return function(e,t,i){for(var s=-1,o=Object(e),r=i(e),l=r.length;l--;){var a=r[++s];if(t(o[a],a,o)===!1)break}return e}}var Gh=Hh(),ds=function(){return Bt.Date.now()},Yh="Expected a function",Vh=Math.max,Wh=Math.min;function us(n,e,t){var i,s,o,r,l,a,c=0,u=!1,h=!1,f=!0;if(typeof n!="function")throw new TypeError(Yh);e=No(e)||0,Xe(t)&&(u=!!t.leading,h="maxWait"in t,o=h?Vh(No(t.maxWait)||0,e):o,f="trailing"in t?!!t.trailing:f);function p(B){var I=i,g=s;return i=s=void 0,c=B,r=n.apply(g,I),r}function m(B){return c=B,l=setTimeout(C,e),u?p(B):r}function y(B){var I=B-a,g=B-c,k=e-I;return h?Wh(k,o-g):k}function A(B){var I=B-a,g=B-c;return a===void 0||I>=e||I<0||h&&g>=o}function C(){var B=ds();if(A(B))return E(B);l=setTimeout(C,y(B))}function E(B){return l=void 0,f&&i?p(B):(i=s=void 0,r)}function x(){l!==void 0&&clearTimeout(l),c=0,i=a=s=l=void 0}function M(){return l===void 0?r:E(ds())}function T(){var B=ds(),I=A(B);if(i=arguments,s=this,a=B,I){if(l===void 0)return m(a);if(h)return clearTimeout(l),l=setTimeout(C,e),p(a)}return l===void 0&&(l=setTimeout(C,e)),r}return T.cancel=x,T.flush=M,T}function hs(n,e,t){(t!==void 0&&!ii(n[e],t)||t===void 0&&!(e in n))&&rs(n,e,t)}function zh(n){return Vt(n)&&as(n)}function fs(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function jh(n){return au(n,tr(n))}function $h(n,e,t,i,s,o,r){var l=fs(n,t),a=fs(e,t),c=r.get(a);if(c){hs(n,t,c);return}var u=o?o(l,a,t+"",n,e,r):void 0,h=u===void 0;if(h){var f=ns(a),p=!f&&Xo(a),m=!f&&!p&&er(a);u=a,f||p||m?ns(l)?u=l:zh(l)?u=$d(l):p?(h=!1,u=Nh(a)):m?(h=!1,u=_h(a)):u=[]:Th(a)||ls(a)?(u=l,ls(l)?u=jh(l):(!Xe(l)||is(l))&&(u=Qh(a))):h=!1}h&&(r.set(a,u),s(u,a,i,o,r),r.delete(a)),hs(n,t,u)}function cr(n,e,t,i,s){n!==e&&Gh(e,function(o,r){if(s||(s=new zt),Xe(o))$h(n,e,r,t,cr,i,s);else{var l=i?i(fs(n,r),o,r+"",n,e,s):void 0;l===void 0&&(l=o),hs(n,r,l)}},tr)}var Kh=hu(function(n,e,t){cr(n,e,t)});function dr({Cesium:n,tileset:e}){const t=e.leiting;if(!t||!t.model||!t.model.formData)return;const i=t.model.formData,s=t.box,o=n.Quaternion.fromAxisAngle(n.Cartesian3.UNIT_Z,n.Math.toRadians(i.totalRotation||0)),r=n.Matrix4.fromRotationTranslation(n.Matrix3.fromQuaternion(o),n.Cartesian3.ZERO),l=n.Cartesian3.fromDegrees(i.longitude,i.latitude,i.height),a=n.Transforms.eastNorthUpToFixedFrame(l),c=n.Matrix4.multiply(a,r,new n.Matrix4);if(e._root){if(!s){e._root.transform=c;return}try{const{center:u}=s,h=e.root.boundingVolume.boundingSphere,f=new n.Cartesian3(u.x,u.y,0),p=n.Matrix4.multiplyByPoint(c,f,new n.Cartesian3),m=n.Cartographic.fromCartesian(p),y=h.center,A=n.Transforms.eastNorthUpToFixedFrame(new n.Cartesian3(y.x,y.y,y.z)),C=new n.Cartesian3(-u.x+(i.X||0),-u.y+(i.Y||0),i.Z||0),E=n.Matrix4.fromTranslation(C),x=n.Matrix4.multiply(r,E,new n.Matrix4),M=n.Cartesian3.fromDegrees(m.longitude/Math.PI*180,m.latitude/Math.PI*180,i.height),T=n.Transforms.eastNorthUpToFixedFrame(M),B=n.Matrix4.multiply(T,x,new n.Matrix4);n.Matrix4.multiply(A,x,A),e._root.transform=B}catch(u){console.error("Update model position failed:",u)}}}const jt={NotLoaded:"not_loaded",Loading:"loading",Loaded:"loaded",Error:"error"},Mt=4294967295,qe=65535,ps=255,Xh=8,ur=9,qh=0,Jh=99,Zh=67324752,hr=134695760,ef=hr,fr=33639248,tf=101010256,pr=101075792,nf=117853008,$t=22,gs=20,ms=56,sf=12,of=20,gr=4,rf=1,af=39169,lf=10,cf=1,df=21589,uf=28789,hf=25461,ff=6534,pf=30837,gf=30805,mr=1,mf=6,Ar=8,yr=2048,Af=16,yf=1,Cf=2,Ef=4,wf=32,Cr=61440,As=16384,ys=73,bf=420,vf=2048,xf=1024,If=512,Bf="/",Cs=30,Sf=10,Mf=14,Tf=18,de=void 0,ft="undefined",Tt="function",Df=64;let Er=2;try{typeof navigator!=ft&&navigator.hardwareConcurrency&&(Er=navigator.hardwareConcurrency)}catch{}const kf={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:64*1024,maxWorkers:Er,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,CompressionStream:typeof CompressionStream!=ft&&CompressionStream,DecompressionStream:typeof DecompressionStream!=ft&&DecompressionStream},wr=Object.assign({},kf);function Pf(){return wr}function Ff(n){return Math.max(n.chunkSize,Df)}function ri(n){const{baseURI:e,chunkSize:t,maxWorkers:i,terminateWorkerTimeout:s,useCompressionStream:o,useWebWorkers:r,CompressionStream:l,DecompressionStream:a,CompressionStreamZlib:c,DecompressionStreamZlib:u,workerURI:h,wasmURI:f}=n;_e("baseURI",e),_e("wasmURI",f),_e("workerURI",h),_e("chunkSize",t),_e("maxWorkers",i),_e("terminateWorkerTimeout",s),_e("useCompressionStream",o),_e("useWebWorkers",r),_e("CompressionStream",l),_e("DecompressionStream",a),_e("CompressionStreamZlib",c),_e("DecompressionStreamZlib",u)}function _e(n,e){e!==de&&(wr[n]=e)}function Rf(n){let e;n({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{}}});
|
|
12
|
+
`});c.isModelAdjustment=!0,a.customShader=c}else{let c="color('white')";e!==1&&(c=`${c} * ${e}`),a.style=new i.Cesium3DTileStyle({color:c})}}}}var Fo=typeof global=="object"&&global&&global.Object===Object&&global,dd=typeof self=="object"&&self&&self.Object===Object&&self,Bt=Fo||dd||Function("return this")(),ti=Bt.Symbol,Ro=Object.prototype,ud=Ro.hasOwnProperty,hd=Ro.toString,pn=ti?ti.toStringTag:void 0;function fd(n){var e=ud.call(n,pn),t=n[pn];try{n[pn]=void 0;var i=!0}catch{}var s=hd.call(n);return i&&(e?n[pn]=t:delete n[pn]),s}var pd=Object.prototype,gd=pd.toString;function md(n){return gd.call(n)}var Ad="[object Null]",yd="[object Undefined]",Oo=ti?ti.toStringTag:void 0;function gn(n){return n==null?n===void 0?yd:Ad:Oo&&Oo in Object(n)?fd(n):md(n)}function Vt(n){return n!=null&&typeof n=="object"}var Cd="[object Symbol]";function Ed(n){return typeof n=="symbol"||Vt(n)&&gn(n)==Cd}var ns=Array.isArray,wd=/\s/;function bd(n){for(var e=n.length;e--&&wd.test(n.charAt(e)););return e}var vd=/^\s+/;function xd(n){return n&&n.slice(0,bd(n)+1).replace(vd,"")}function Xe(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}var Lo=NaN,Id=/^[-+]0x[0-9a-f]+$/i,Bd=/^0b[01]+$/i,Sd=/^0o[0-7]+$/i,Md=parseInt;function No(n){if(typeof n=="number")return n;if(Ed(n))return Lo;if(Xe(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=Xe(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=xd(n);var t=Bd.test(n);return t||Sd.test(n)?Md(n.slice(2),t?2:8):Id.test(n)?Lo:+n}function Uo(n){return n}var Td="[object AsyncFunction]",Dd="[object Function]",kd="[object GeneratorFunction]",Pd="[object Proxy]";function is(n){if(!Xe(n))return!1;var e=gn(n);return e==Dd||e==kd||e==Td||e==Pd}var ss=Bt["__core-js_shared__"],_o=(function(){var n=/[^.]+$/.exec(ss&&ss.keys&&ss.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function Fd(n){return!!_o&&_o in n}var Rd=Function.prototype,Od=Rd.toString;function Ld(n){if(n!=null){try{return Od.call(n)}catch{}try{return n+""}catch{}}return""}var Nd=/[\\^$.*+?()[\]{}|]/g,Ud=/^\[object .+?Constructor\]$/,_d=Function.prototype,Qd=Object.prototype,Hd=_d.toString,Gd=Qd.hasOwnProperty,Yd=RegExp("^"+Hd.call(Gd).replace(Nd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vd(n){if(!Xe(n)||Fd(n))return!1;var e=is(n)?Yd:Ud;return e.test(Ld(n))}function Wd(n,e){return n?.[e]}function os(n,e){var t=Wd(n,e);return Vd(t)?t:void 0}var Qo=Object.create,zd=(function(){function n(){}return function(e){if(!Xe(e))return{};if(Qo)return Qo(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}})();function jd(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}function $d(n,e){var t=-1,i=n.length;for(e||(e=Array(i));++t<i;)e[t]=n[t];return e}var Kd=800,Xd=16,qd=Date.now;function Jd(n){var e=0,t=0;return function(){var i=qd(),s=Xd-(i-t);if(t=i,s>0){if(++e>=Kd)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function Zd(n){return function(){return n}}var ni=(function(){try{var n=os(Object,"defineProperty");return n({},"",{}),n}catch{}})(),eu=ni?function(n,e){return ni(n,"toString",{configurable:!0,enumerable:!1,value:Zd(e),writable:!0})}:Uo,tu=Jd(eu),nu=9007199254740991,iu=/^(?:0|[1-9]\d*)$/;function Ho(n,e){var t=typeof n;return e=e??nu,!!e&&(t=="number"||t!="symbol"&&iu.test(n))&&n>-1&&n%1==0&&n<e}function rs(n,e,t){e=="__proto__"&&ni?ni(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function ii(n,e){return n===e||n!==n&&e!==e}var su=Object.prototype,ou=su.hasOwnProperty;function ru(n,e,t){var i=n[e];(!(ou.call(n,e)&&ii(i,t))||t===void 0&&!(e in n))&&rs(n,e,t)}function au(n,e,t,i){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=n[l]),s?rs(t,l,a):ru(t,l,a)}return t}var Go=Math.max;function lu(n,e,t){return e=Go(e===void 0?n.length-1:e,0),function(){for(var i=arguments,s=-1,o=Go(i.length-e,0),r=Array(o);++s<o;)r[s]=i[e+s];s=-1;for(var l=Array(e+1);++s<e;)l[s]=i[s];return l[e]=t(r),jd(n,this,l)}}function cu(n,e){return tu(lu(n,e,Uo),n+"")}var du=9007199254740991;function Yo(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=du}function as(n){return n!=null&&Yo(n.length)&&!is(n)}function uu(n,e,t){if(!Xe(t))return!1;var i=typeof e;return(i=="number"?as(t)&&Ho(e,t.length):i=="string"&&e in t)?ii(t[e],n):!1}function hu(n){return cu(function(e,t){var i=-1,s=t.length,o=s>1?t[s-1]:void 0,r=s>2?t[2]:void 0;for(o=n.length>3&&typeof o=="function"?(s--,o):void 0,r&&uu(t[0],t[1],r)&&(o=s<3?void 0:o,s=1),e=Object(e);++i<s;){var l=t[i];l&&n(e,l,i,o)}return e})}var fu=Object.prototype;function Vo(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||fu;return n===t}function pu(n,e){for(var t=-1,i=Array(n);++t<n;)i[t]=e(t);return i}var gu="[object Arguments]";function Wo(n){return Vt(n)&&gn(n)==gu}var zo=Object.prototype,mu=zo.hasOwnProperty,Au=zo.propertyIsEnumerable,ls=Wo((function(){return arguments})())?Wo:function(n){return Vt(n)&&mu.call(n,"callee")&&!Au.call(n,"callee")};function yu(){return!1}var jo=typeof U=="object"&&U&&!U.nodeType&&U,$o=jo&&typeof module=="object"&&module&&!module.nodeType&&module,Cu=$o&&$o.exports===jo,Ko=Cu?Bt.Buffer:void 0,Eu=Ko?Ko.isBuffer:void 0,Xo=Eu||yu,wu="[object Arguments]",bu="[object Array]",vu="[object Boolean]",xu="[object Date]",Iu="[object Error]",Bu="[object Function]",Su="[object Map]",Mu="[object Number]",Tu="[object Object]",Du="[object RegExp]",ku="[object Set]",Pu="[object String]",Fu="[object WeakMap]",Ru="[object ArrayBuffer]",Ou="[object DataView]",Lu="[object Float32Array]",Nu="[object Float64Array]",Uu="[object Int8Array]",_u="[object Int16Array]",Qu="[object Int32Array]",Hu="[object Uint8Array]",Gu="[object Uint8ClampedArray]",Yu="[object Uint16Array]",Vu="[object Uint32Array]",ce={};ce[Lu]=ce[Nu]=ce[Uu]=ce[_u]=ce[Qu]=ce[Hu]=ce[Gu]=ce[Yu]=ce[Vu]=!0,ce[wu]=ce[bu]=ce[Ru]=ce[vu]=ce[Ou]=ce[xu]=ce[Iu]=ce[Bu]=ce[Su]=ce[Mu]=ce[Tu]=ce[Du]=ce[ku]=ce[Pu]=ce[Fu]=!1;function Wu(n){return Vt(n)&&Yo(n.length)&&!!ce[gn(n)]}function zu(n){return function(e){return n(e)}}var qo=typeof U=="object"&&U&&!U.nodeType&&U,mn=qo&&typeof module=="object"&&module&&!module.nodeType&&module,ju=mn&&mn.exports===qo,cs=ju&&Fo.process,Jo=(function(){try{var n=mn&&mn.require&&mn.require("util").types;return n||cs&&cs.binding&&cs.binding("util")}catch{}})(),Zo=Jo&&Jo.isTypedArray,er=Zo?zu(Zo):Wu;function $u(n,e){var t=ns(n),i=!t&&ls(n),s=!t&&!i&&Xo(n),o=!t&&!i&&!s&&er(n),r=t||i||s||o,l=r?pu(n.length,String):[],a=l.length;for(var c in n)r&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ho(c,a))||l.push(c);return l}function Ku(n,e){return function(t){return n(e(t))}}function Xu(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var qu=Object.prototype,Ju=qu.hasOwnProperty;function Zu(n){if(!Xe(n))return Xu(n);var e=Vo(n),t=[];for(var i in n)i=="constructor"&&(e||!Ju.call(n,i))||t.push(i);return t}function tr(n){return as(n)?$u(n):Zu(n)}var An=os(Object,"create");function eh(){this.__data__=An?An(null):{},this.size=0}function th(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var nh="__lodash_hash_undefined__",ih=Object.prototype,sh=ih.hasOwnProperty;function oh(n){var e=this.__data__;if(An){var t=e[n];return t===nh?void 0:t}return sh.call(e,n)?e[n]:void 0}var rh=Object.prototype,ah=rh.hasOwnProperty;function lh(n){var e=this.__data__;return An?e[n]!==void 0:ah.call(e,n)}var ch="__lodash_hash_undefined__";function dh(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=An&&e===void 0?ch:e,this}function St(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var i=n[e];this.set(i[0],i[1])}}St.prototype.clear=eh,St.prototype.delete=th,St.prototype.get=oh,St.prototype.has=lh,St.prototype.set=dh;function uh(){this.__data__=[],this.size=0}function si(n,e){for(var t=n.length;t--;)if(ii(n[t][0],e))return t;return-1}var hh=Array.prototype,fh=hh.splice;function ph(n){var e=this.__data__,t=si(e,n);if(t<0)return!1;var i=e.length-1;return t==i?e.pop():fh.call(e,t,1),--this.size,!0}function gh(n){var e=this.__data__,t=si(e,n);return t<0?void 0:e[t][1]}function mh(n){return si(this.__data__,n)>-1}function Ah(n,e){var t=this.__data__,i=si(t,n);return i<0?(++this.size,t.push([n,e])):t[i][1]=e,this}function ot(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var i=n[e];this.set(i[0],i[1])}}ot.prototype.clear=uh,ot.prototype.delete=ph,ot.prototype.get=gh,ot.prototype.has=mh,ot.prototype.set=Ah;var nr=os(Bt,"Map");function yh(){this.size=0,this.__data__={hash:new St,map:new(nr||ot),string:new St}}function Ch(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function oi(n,e){var t=n.__data__;return Ch(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Eh(n){var e=oi(this,n).delete(n);return this.size-=e?1:0,e}function wh(n){return oi(this,n).get(n)}function bh(n){return oi(this,n).has(n)}function vh(n,e){var t=oi(this,n),i=t.size;return t.set(n,e),this.size+=t.size==i?0:1,this}function Wt(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var i=n[e];this.set(i[0],i[1])}}Wt.prototype.clear=yh,Wt.prototype.delete=Eh,Wt.prototype.get=wh,Wt.prototype.has=bh,Wt.prototype.set=vh;var ir=Ku(Object.getPrototypeOf,Object),xh="[object Object]",Ih=Function.prototype,Bh=Object.prototype,sr=Ih.toString,Sh=Bh.hasOwnProperty,Mh=sr.call(Object);function Th(n){if(!Vt(n)||gn(n)!=xh)return!1;var e=ir(n);if(e===null)return!0;var t=Sh.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&sr.call(t)==Mh}function Dh(){this.__data__=new ot,this.size=0}function kh(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function Ph(n){return this.__data__.get(n)}function Fh(n){return this.__data__.has(n)}var Rh=200;function Oh(n,e){var t=this.__data__;if(t instanceof ot){var i=t.__data__;if(!nr||i.length<Rh-1)return i.push([n,e]),this.size=++t.size,this;t=this.__data__=new Wt(i)}return t.set(n,e),this.size=t.size,this}function zt(n){var e=this.__data__=new ot(n);this.size=e.size}zt.prototype.clear=Dh,zt.prototype.delete=kh,zt.prototype.get=Ph,zt.prototype.has=Fh,zt.prototype.set=Oh;var or=typeof U=="object"&&U&&!U.nodeType&&U,rr=or&&typeof module=="object"&&module&&!module.nodeType&&module,Lh=rr&&rr.exports===or,ar=Lh?Bt.Buffer:void 0;ar&&ar.allocUnsafe;function Nh(n,e){return n.slice()}var lr=Bt.Uint8Array;function Uh(n){var e=new n.constructor(n.byteLength);return new lr(e).set(new lr(n)),e}function _h(n,e){var t=Uh(n.buffer);return new n.constructor(t,n.byteOffset,n.length)}function Qh(n){return typeof n.constructor=="function"&&!Vo(n)?zd(ir(n)):{}}function Hh(n){return function(e,t,i){for(var s=-1,o=Object(e),r=i(e),l=r.length;l--;){var a=r[++s];if(t(o[a],a,o)===!1)break}return e}}var Gh=Hh(),ds=function(){return Bt.Date.now()},Yh="Expected a function",Vh=Math.max,Wh=Math.min;function us(n,e,t){var i,s,o,r,l,a,c=0,u=!1,h=!1,f=!0;if(typeof n!="function")throw new TypeError(Yh);e=No(e)||0,Xe(t)&&(u=!!t.leading,h="maxWait"in t,o=h?Vh(No(t.maxWait)||0,e):o,f="trailing"in t?!!t.trailing:f);function p(B){var I=i,g=s;return i=s=void 0,c=B,r=n.apply(g,I),r}function m(B){return c=B,l=setTimeout(C,e),u?p(B):r}function y(B){var I=B-a,g=B-c,k=e-I;return h?Wh(k,o-g):k}function A(B){var I=B-a,g=B-c;return a===void 0||I>=e||I<0||h&&g>=o}function C(){var B=ds();if(A(B))return E(B);l=setTimeout(C,y(B))}function E(B){return l=void 0,f&&i?p(B):(i=s=void 0,r)}function x(){l!==void 0&&clearTimeout(l),c=0,i=a=s=l=void 0}function M(){return l===void 0?r:E(ds())}function T(){var B=ds(),I=A(B);if(i=arguments,s=this,a=B,I){if(l===void 0)return m(a);if(h)return clearTimeout(l),l=setTimeout(C,e),p(a)}return l===void 0&&(l=setTimeout(C,e)),r}return T.cancel=x,T.flush=M,T}function hs(n,e,t){(t!==void 0&&!ii(n[e],t)||t===void 0&&!(e in n))&&rs(n,e,t)}function zh(n){return Vt(n)&&as(n)}function fs(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function jh(n){return au(n,tr(n))}function $h(n,e,t,i,s,o,r){var l=fs(n,t),a=fs(e,t),c=r.get(a);if(c){hs(n,t,c);return}var u=o?o(l,a,t+"",n,e,r):void 0,h=u===void 0;if(h){var f=ns(a),p=!f&&Xo(a),m=!f&&!p&&er(a);u=a,f||p||m?ns(l)?u=l:zh(l)?u=$d(l):p?(h=!1,u=Nh(a)):m?(h=!1,u=_h(a)):u=[]:Th(a)||ls(a)?(u=l,ls(l)?u=jh(l):(!Xe(l)||is(l))&&(u=Qh(a))):h=!1}h&&(r.set(a,u),s(u,a,i,o,r),r.delete(a)),hs(n,t,u)}function cr(n,e,t,i,s){n!==e&&Gh(e,function(o,r){if(s||(s=new zt),Xe(o))$h(n,e,r,t,cr,i,s);else{var l=i?i(fs(n,r),o,r+"",n,e,s):void 0;l===void 0&&(l=o),hs(n,r,l)}},tr)}var Kh=hu(function(n,e,t){cr(n,e,t)});function dr({Cesium:n,tileset:e}){const t=e.leiting;if(!t||!t.model||!t.model.formData)return;const i=t.model.formData,s=t.box,o=n.Quaternion.fromAxisAngle(n.Cartesian3.UNIT_Z,n.Math.toRadians(i.totalRotation||0)),r=n.Matrix4.fromRotationTranslation(n.Matrix3.fromQuaternion(o),n.Cartesian3.ZERO),l=n.Cartesian3.fromDegrees(i.longitude,i.latitude,i.height),a=n.Transforms.eastNorthUpToFixedFrame(l),c=n.Matrix4.multiply(a,r,new n.Matrix4);if(e._root){if(!s){e._root.transform=c;return}try{const{center:u}=s,h=e.root.boundingVolume.boundingSphere,f=new n.Cartesian3(u.x,u.y,0),p=n.Matrix4.multiplyByPoint(c,f,new n.Cartesian3),m=n.Cartographic.fromCartesian(p),y=h.center,A=n.Transforms.eastNorthUpToFixedFrame(new n.Cartesian3(y.x,y.y,y.z)),C=new n.Cartesian3(-u.x+(i.X||0),-u.y+(i.Y||0),i.Z||0),E=n.Matrix4.fromTranslation(C),x=n.Matrix4.multiply(r,E,new n.Matrix4),M=n.Cartesian3.fromDegrees(m.longitude/Math.PI*180,m.latitude/Math.PI*180,i.height),T=n.Transforms.eastNorthUpToFixedFrame(M),B=n.Matrix4.multiply(T,x,new n.Matrix4);n.Matrix4.multiply(A,x,A),e._root.transform=B}catch(u){console.error("Update model position failed:",u)}}}const jt={NotLoaded:0,Loading:1,Loaded:2,Error:3},Mt=4294967295,qe=65535,ps=255,Xh=8,ur=9,qh=0,Jh=99,Zh=67324752,hr=134695760,ef=hr,fr=33639248,tf=101010256,pr=101075792,nf=117853008,$t=22,gs=20,ms=56,sf=12,of=20,gr=4,rf=1,af=39169,lf=10,cf=1,df=21589,uf=28789,hf=25461,ff=6534,pf=30837,gf=30805,mr=1,mf=6,Ar=8,yr=2048,Af=16,yf=1,Cf=2,Ef=4,wf=32,Cr=61440,As=16384,ys=73,bf=420,vf=2048,xf=1024,If=512,Bf="/",Cs=30,Sf=10,Mf=14,Tf=18,de=void 0,ft="undefined",Tt="function",Df=64;let Er=2;try{typeof navigator!=ft&&navigator.hardwareConcurrency&&(Er=navigator.hardwareConcurrency)}catch{}const kf={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:64*1024,maxWorkers:Er,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,CompressionStream:typeof CompressionStream!=ft&&CompressionStream,DecompressionStream:typeof DecompressionStream!=ft&&DecompressionStream},wr=Object.assign({},kf);function Pf(){return wr}function Ff(n){return Math.max(n.chunkSize,Df)}function ri(n){const{baseURI:e,chunkSize:t,maxWorkers:i,terminateWorkerTimeout:s,useCompressionStream:o,useWebWorkers:r,CompressionStream:l,DecompressionStream:a,CompressionStreamZlib:c,DecompressionStreamZlib:u,workerURI:h,wasmURI:f}=n;_e("baseURI",e),_e("wasmURI",f),_e("workerURI",h),_e("chunkSize",t),_e("maxWorkers",i),_e("terminateWorkerTimeout",s),_e("useCompressionStream",o),_e("useWebWorkers",r),_e("CompressionStream",l),_e("DecompressionStream",a),_e("CompressionStreamZlib",c),_e("DecompressionStreamZlib",u)}function _e(n,e){e!==de&&(wr[n]=e)}function Rf(n){let e;n({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
13
|
`)),e)})}const br=[];for(let n=0;n<256;n++){let e=n;for(let t=0;t<8;t++)e&1?e=e>>>1^3988292384:e=e>>>1;br[n]=e}class ai{constructor(e){this.crc=e||-1}append(e){let t=this.crc|0;for(let i=0,s=e.length|0;i<s;i++)t=t>>>8^br[(t^e[i])&255];this.crc=t}get(){return~this.crc}}class vr extends TransformStream{constructor(){let e;const t=new ai;super({transform(i,s){t.append(i),s.enqueue(i)},flush(){const i=new Uint8Array(4);new DataView(i.buffer).setUint32(0,t.get()),e.value=i}}),e=this}}function Of(n){if(typeof TextEncoder==ft){n=unescape(encodeURIComponent(n));const e=new Uint8Array(n.length);for(let t=0;t<e.length;t++)e[t]=n.charCodeAt(t);return e}else return new TextEncoder().encode(n)}const Pe={concat(n,e){if(n.length===0||e.length===0)return n.concat(e);const t=n[n.length-1],i=Pe.getPartial(t);return i===32?n.concat(e):Pe._shiftRight(e,i,t|0,n.slice(0,n.length-1))},bitLength(n){const e=n.length;if(e===0)return 0;const t=n[e-1];return(e-1)*32+Pe.getPartial(t)},clamp(n,e){if(n.length*32<e)return n;n=n.slice(0,Math.ceil(e/32));const t=n.length;return e=e&31,t>0&&e&&(n[t-1]=Pe.partial(e,n[t-1]&2147483648>>e-1,1)),n},partial(n,e,t){return n===32?e:(t?e|0:e<<32-n)+n*1099511627776},getPartial(n){return Math.round(n/1099511627776)||32},_shiftRight(n,e,t,i){for(i===void 0&&(i=[]);e>=32;e-=32)i.push(t),t=0;if(e===0)return i.concat(n);for(let r=0;r<n.length;r++)i.push(t|n[r]>>>e),t=n[r]<<32-e;const s=n.length?n[n.length-1]:0,o=Pe.getPartial(s);return i.push(Pe.partial(e+o&31,e+o>32?t:i.pop(),1)),i}},li={bytes:{fromBits(n){const t=Pe.bitLength(n)/8,i=new Uint8Array(t);let s;for(let o=0;o<t;o++)(o&3)===0&&(s=n[o/4]),i[o]=s>>>24,s<<=8;return i},toBits(n){const e=[];let t,i=0;for(t=0;t<n.length;t++)i=i<<8|n[t],(t&3)===3&&(e.push(i),i=0);return t&3&&e.push(Pe.partial(8*(t&3),i)),e}}},xr={};xr.sha1=class{constructor(n){const e=this;e.blockSize=512,e._init=[1732584193,4023233417,2562383102,271733878,3285377520],e._key=[1518500249,1859775393,2400959708,3395469782],n?(e._h=n._h.slice(0),e._buffer=n._buffer.slice(0),e._length=n._length):e.reset()}reset(){const n=this;return n._h=n._init.slice(0),n._buffer=[],n._length=0,n}update(n){const e=this;typeof n=="string"&&(n=li.utf8String.toBits(n));const t=e._buffer=Pe.concat(e._buffer,n),i=e._length,s=e._length=i+Pe.bitLength(n);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+i-(e.blockSize+i&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 n=this;let e=n._buffer;const t=n._h;e=Pe.concat(e,[Pe.partial(1,1)]);for(let i=e.length+2;i&15;i++)e.push(0);for(e.push(Math.floor(n._length/4294967296)),e.push(n._length|0);e.length;)n._block(e.splice(0,16));return n.reset(),t}_f(n,e,t,i){if(n<=19)return e&t|~e&i;if(n<=39)return e^t^i;if(n<=59)return e&t|e&i|t&i;if(n<=79)return e^t^i}_S(n,e){return e<<n|e>>>32-n}_block(n){const e=this,t=e._h,i=Array(80);for(let c=0;c<16;c++)i[c]=n[c];let s=t[0],o=t[1],r=t[2],l=t[3],a=t[4];for(let c=0;c<=79;c++){c>=16&&(i[c]=e._S(1,i[c-3]^i[c-8]^i[c-14]^i[c-16]));const u=e._S(5,s)+e._f(c,o,r,l)+a+i[c]+e._key[Math.floor(c/20)]|0;a=l,l=r,r=e._S(30,o),o=s,s=u}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 Ir={};Ir.aes=class{constructor(n){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const t=e._tables[0][4],i=e._tables[1],s=n.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=n.slice(0),l=[]],o=s;o<4*s+28;o++){let c=r[o-1];(o%s===0||s===8&&o%s===4)&&(c=t[c>>>24]<<24^t[c>>16&255]<<16^t[c>>8&255]<<8^t[c&255],o%s===0&&(c=c<<8^c>>>24^a<<24,a=a<<1^(a>>7)*283)),r[o]=r[o-s]^c}for(let c=0;o;c++,o--){const u=r[c&3?o:o-4];o<=4||c<4?l[c]=u:l[c]=i[0][t[u>>>24]]^i[1][t[u>>16&255]]^i[2][t[u>>8&255]]^i[3][t[u&255]]}}encrypt(n){return this._crypt(n,0)}decrypt(n){return this._crypt(n,1)}_precompute(){const n=this._tables[0],e=this._tables[1],t=n[4],i=e[4],s=[],o=[];let r,l,a,c;for(let u=0;u<256;u++)o[(s[u]=u<<1^(u>>7)*283)^u]=u;for(let u=r=0;!t[u];u^=l||1,r=o[r]||1){let h=r^r<<1^r<<2^r<<3^r<<4;h=h>>8^h&255^99,t[u]=h,i[h]=u,c=s[a=s[l=s[u]]];let f=c*16843009^a*65537^l*257^u*16843008,p=s[h]*257^h*16843008;for(let m=0;m<4;m++)n[m][u]=p=p<<24^p>>>8,e[m][h]=f=f<<24^f>>>8}for(let u=0;u<5;u++)n[u]=n[u].slice(0),e[u]=e[u].slice(0)}_crypt(n,e){if(n.length!==4)throw new Error("invalid aes block size");const t=this._key[e],i=t.length/4-2,s=[0,0,0,0],o=this._tables[e],r=o[0],l=o[1],a=o[2],c=o[3],u=o[4];let h=n[0]^t[0],f=n[e?3:1]^t[1],p=n[2]^t[2],m=n[e?1:3]^t[3],y=4,A,C,E;for(let x=0;x<i;x++)A=r[h>>>24]^l[f>>16&255]^a[p>>8&255]^c[m&255]^t[y],C=r[f>>>24]^l[p>>16&255]^a[m>>8&255]^c[h&255]^t[y+1],E=r[p>>>24]^l[m>>16&255]^a[h>>8&255]^c[f&255]^t[y+2],m=r[m>>>24]^l[h>>16&255]^a[f>>8&255]^c[p&255]^t[y+3],y+=4,h=A,f=C,p=E;for(let x=0;x<4;x++)s[e?3&-x:x]=u[h>>>24]<<24^u[f>>16&255]<<16^u[p>>8&255]<<8^u[m&255]^t[y++],A=h,h=f,f=p,p=m,m=A;return s}};const Lf={getRandomValues(n){const e=new Uint32Array(n.buffer),t=i=>{let s=987654321;const o=4294967295;return function(){return s=36969*(s&65535)+(s>>16)&o,i=18e3*(i&65535)+(i>>16)&o,(((s<<16)+i&o)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let i=0,s;i<n.length;i+=4){const o=t((s||Math.random())*4294967296);s=o()*987654071,e[i/4]=o()*4294967296|0}return n}},Br={};Br.ctrGladman=class{constructor(n,e){this._prf=n,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(n){return this.calculate(this._prf,n,this._iv)}incWord(n){if((n>>24&255)===255){let e=n>>16&255,t=n>>8&255,i=n&255;e===255?(e=0,t===255?(t=0,i===255?i=0:++i):++t):++e,n=0,n+=e<<16,n+=t<<8,n+=i}else n+=1<<24;return n}incCounter(n){(n[0]=this.incWord(n[0]))===0&&(n[1]=this.incWord(n[1]))}calculate(n,e,t){let i;if(!(i=e.length))return[];const s=Pe.bitLength(e);for(let o=0;o<i;o+=4){this.incCounter(t);const r=n.encrypt(t);e[o]^=r[0],e[o+1]^=r[1],e[o+2]^=r[2],e[o+3]^=r[3]}return Pe.clamp(e,s)}};const Dt={importKey(n){return new Dt.hmacSha1(li.bytes.toBits(n))},pbkdf2(n,e,t,i){if(t=t||1e4,i<0||t<0)throw new Error("invalid params to pbkdf2");const s=(i>>5)+1<<2;let o,r,l,a,c;const u=new ArrayBuffer(s),h=new DataView(u);let f=0;const p=Pe;for(e=li.bytes.toBits(e),c=1;f<(s||1);c++){for(o=r=n.encrypt(p.concat(e,[c])),l=1;l<t;l++)for(r=n.encrypt(r),a=0;a<r.length;a++)o[a]^=r[a];for(l=0;f<(s||1)&&l<o.length;l++)h.setInt32(f,o[l]),f+=4}return u.slice(0,i/8)}};Dt.hmacSha1=class{constructor(n){const e=this,t=e._hash=xr.sha1,i=[[],[]];e._baseHash=[new t,new t];const s=e._baseHash[0].blockSize/32;n.length>s&&(n=new t().update(n).finalize());for(let o=0;o<s;o++)i[0][o]=n[o]^909522486,i[1][o]=n[o]^1549556828;e._baseHash[0].update(i[0]),e._baseHash[1].update(i[1]),e._resultHash=new t(e._baseHash[0])}reset(){const n=this;n._resultHash=new n._hash(n._baseHash[0]),n._updated=!1}update(n){const e=this;e._updated=!0,e._resultHash.update(n)}digest(){const n=this,e=n._resultHash.finalize(),t=new n._hash(n._baseHash[1]).update(e).finalize();return n.reset(),t}encrypt(n){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(n),this.digest(n)}};const Nf=typeof crypto!=ft&&typeof crypto.getRandomValues==Tt,Sr="Invalid password",Mr="Invalid signature",Es="zipjs-abort-check-password";function Tr(n){return Nf?crypto.getRandomValues(n):Lf.getRandomValues(n)}const Kt=16,Uf="raw",Dr={name:"PBKDF2"},_f={name:"HMAC"},Qf="SHA-1",Hf=Object.assign({hash:_f},Dr),ws=Object.assign({iterations:1e3,hash:{name:Qf}},Dr),Gf=["deriveBits"],yn=[8,12,16],Cn=[16,24,32],pt=10,Yf=[0,0,0,0],ci=typeof crypto!=ft,En=ci&&crypto.subtle,kr=ci&&typeof En!=ft,Je=li.bytes,Vf=Ir.aes,Wf=Br.ctrGladman,zf=Dt.hmacSha1;let Pr=ci&&kr&&typeof En.importKey==Tt,Fr=ci&&kr&&typeof En.deriveBits==Tt;class jf extends TransformStream{constructor({password:e,rawPassword:t,signed:i,encryptionStrength:s,checkPasswordOnly:o}){super({start(){Object.assign(this,{ready:new Promise(r=>this.resolveReady=r),password:Lr(e,t),signed:i,strength:s-1,pending:new Uint8Array})},async transform(r,l){const a=this,{password:c,strength:u,resolveReady:h,ready:f}=a;c?(await Kf(a,u,c,Qe(r,0,yn[u]+2)),r=Qe(r,yn[u]+2),o?l.error(new Error(Es)):h()):await f;const p=new Uint8Array(r.length-pt-(r.length-pt)%Kt);l.enqueue(Rr(a,r,p,0,pt,!0))},async flush(r){const{signed:l,ctr:a,hmac:c,pending:u,ready:h}=this;if(c&&a){await h;const f=Qe(u,0,u.length-pt),p=Qe(u,u.length-pt);let m=new Uint8Array;if(f.length){const y=bn(Je,f);c.update(y);const A=a.update(y);m=wn(Je,A)}if(l){const y=Qe(wn(Je,c.digest()),0,pt);for(let A=0;A<pt;A++)if(y[A]!=p[A])throw new Error(Mr)}r.enqueue(m)}}})}}class $f extends TransformStream{constructor({password:e,rawPassword:t,encryptionStrength:i}){let s;super({start(){Object.assign(this,{ready:new Promise(o=>this.resolveReady=o),password:Lr(e,t),strength:i-1,pending:new Uint8Array})},async transform(o,r){const l=this,{password:a,strength:c,resolveReady:u,ready:h}=l;let f=new Uint8Array;a?(f=await Xf(l,c,a),u()):await h;const p=new Uint8Array(f.length+o.length-o.length%Kt);p.set(f,0),r.enqueue(Rr(l,o,p,f.length,0))},async flush(o){const{ctr:r,hmac:l,pending:a,ready:c}=this;if(l&&r){await c;let u=new Uint8Array;if(a.length){const h=r.update(bn(Je,a));l.update(h),u=wn(Je,h)}s.signature=wn(Je,l.digest()).slice(0,pt),o.enqueue(bs(u,s.signature))}}}),s=this}}function Rr(n,e,t,i,s,o){const{ctr:r,hmac:l,pending:a}=n,c=e.length-s;a.length&&(e=bs(a,e),t=Zf(t,c-c%Kt));let u;for(u=0;u<=c-Kt;u+=Kt){const h=bn(Je,Qe(e,u,u+Kt));o&&l.update(h);const f=r.update(h);o||l.update(f),t.set(wn(Je,f),u+i)}return n.pending=Qe(e,u),t}async function Kf(n,e,t,i){const s=await Or(n,e,t,Qe(i,0,yn[e])),o=Qe(i,yn[e]);if(s[0]!=o[0]||s[1]!=o[1])throw new Error(Sr)}async function Xf(n,e,t){const i=Tr(new Uint8Array(yn[e])),s=await Or(n,e,t,i);return bs(i,s)}async function Or(n,e,t,i){n.password=null;const s=await qf(Uf,t,Hf,!1,Gf),o=await Jf(Object.assign({salt:i},ws),s,8*(Cn[e]*2+2)),r=new Uint8Array(o),l=bn(Je,Qe(r,0,Cn[e])),a=bn(Je,Qe(r,Cn[e],Cn[e]*2)),c=Qe(r,Cn[e]*2);return Object.assign(n,{keys:{key:l,authentication:a,passwordVerification:c},ctr:new Wf(new Vf(l),Array.from(Yf)),hmac:new zf(a)}),c}async function qf(n,e,t,i,s){if(Pr)try{return await En.importKey(n,e,t,i,s)}catch{return Pr=!1,Dt.importKey(e)}else return Dt.importKey(e)}async function Jf(n,e,t){if(Fr)try{return await En.deriveBits(n,e,t)}catch{return Fr=!1,Dt.pbkdf2(e,n.salt,ws.iterations,t)}else return Dt.pbkdf2(e,n.salt,ws.iterations,t)}function Lr(n,e){return e===de?Of(n):e}function bs(n,e){let t=n;return n.length+e.length&&(t=new Uint8Array(n.length+e.length),t.set(n,0),t.set(e,n.length)),t}function Zf(n,e){if(e&&e>n.length){const t=n;n=new Uint8Array(e),n.set(t,0)}return n}function Qe(n,e,t){return n.subarray(e,t)}function wn(n,e){return n.fromBits(e)}function bn(n,e){return n.toBits(e)}const vn=12;class ep extends TransformStream{constructor({password:e,passwordVerification:t,checkPasswordOnly:i}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),_r(this,e)},transform(s,o){const r=this;if(r.password){const l=Nr(r,s.subarray(0,vn));if(r.password=null,l.at(-1)!=r.passwordVerification)throw new Error(Sr);s=s.subarray(vn)}i?o.error(new Error(Es)):o.enqueue(Nr(r,s))}})}}class tp extends TransformStream{constructor({password:e,passwordVerification:t}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),_r(this,e)},transform(i,s){const o=this;let r,l;if(o.password){o.password=null;const a=Tr(new Uint8Array(vn));a[vn-1]=o.passwordVerification,r=new Uint8Array(i.length+a.length),r.set(Ur(o,a),0),l=vn}else r=new Uint8Array(i.length),l=0;r.set(Ur(o,i),l),s.enqueue(r)}})}}function Nr(n,e){const t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=Qr(n)^e[i],vs(n,t[i]);return t}function Ur(n,e){const t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=Qr(n)^e[i],vs(n,e[i]);return t}function _r(n,e){const t=[305419896,591751049,878082192];Object.assign(n,{keys:t,crcKey0:new ai(t[0]),crcKey2:new ai(t[2])});for(let i=0;i<e.length;i++)vs(n,e.charCodeAt(i))}function vs(n,e){let[t,i,s]=n.keys;n.crcKey0.append([e]),t=~n.crcKey0.get(),i=Gr(Math.imul(Gr(i+Hr(t)),134775813)+1),n.crcKey2.append([i>>>24]),s=~n.crcKey2.get(),n.keys=[t,i,s]}function Qr(n){const e=n.keys[2]|2;return Hr(Math.imul(e,e^1)>>>8)}function Hr(n){return n&255}function Gr(n){return n&4294967295}const Yr="Invalid uncompressed size",np="deflate-raw",ip="deflate64-raw";class sp extends TransformStream{constructor(e,{chunkSize:t,CompressionStreamZlib:i,CompressionStream:s}){super({});const{compressed:o,encrypted:r,useCompressionStream:l,zipCrypto:a,signed:c,level:u}=e,h=this;let f,p,m=super.readable;(!r||a)&&c&&(f=new vr,m=Ze(m,f)),o&&(m=Wr(m,l,{level:u,chunkSize:t},s,i,s)),r&&(a?m=Ze(m,new tp(e)):(p=new $f(e),m=Ze(m,p))),Vr(h,m,()=>{let y;r&&!a&&(y=p.signature),(!r||a)&&c&&(y=new DataView(f.value.buffer).getUint32(0)),h.signature=y})}}class op extends TransformStream{constructor(e,{chunkSize:t,DecompressionStreamZlib:i,DecompressionStream:s}){super({});const{zipCrypto:o,encrypted:r,signed:l,signature:a,compressed:c,useCompressionStream:u,deflate64:h}=e;let f,p,m=super.readable;r&&(o?m=Ze(m,new ep(e)):(p=new jf(e),m=Ze(m,p))),c&&(m=Wr(m,u,{chunkSize:t,deflate64:h},s,i,s)),(!r||o)&&l&&(f=new vr,m=Ze(m,f)),Vr(this,m,()=>{if((!r||o)&&l){const y=new DataView(f.value.buffer);if(a!=y.getUint32(0,!1))throw new Error(Mr)}})}}function Vr(n,e,t){e=Ze(e,new TransformStream({flush:t})),Object.defineProperty(n,"readable",{get(){return e}})}function Wr(n,e,t,i,s,o){const r=e&&i?i:s||o,l=t.deflate64?ip:np;try{n=Ze(n,new r(l,t))}catch(a){if(e)if(s)n=Ze(n,new s(l,t));else if(o)n=Ze(n,new o(l,t));else throw a;else throw a}return n}function Ze(n,e){return n.pipeThrough(e)}const rp="message",ap="start",lp="pull",zr="data",cp="ack",jr="close",dp="deflate",$r="inflate";class up extends TransformStream{constructor(e,t){super({});const i=this,{codecType:s}=e;let o;s.startsWith(dp)?o=sp:s.startsWith($r)&&(o=op),i.outputSize=0;let r=0;const l=new o(e,t),a=super.readable,c=new TransformStream({transform(h,f){h&&h.length&&(r+=h.length,f.enqueue(h))},flush(){Object.assign(i,{inputSize:r})}}),u=new TransformStream({transform(h,f){if(h&&h.length&&(f.enqueue(h),i.outputSize+=h.length,e.outputSize!==de&&i.outputSize>e.outputSize))throw new Error(Yr)},flush(){const{signature:h}=l;Object.assign(i,{signature:h,inputSize:r})}});Object.defineProperty(i,"readable",{get(){return a.pipeThrough(c).pipeThrough(l).pipeThrough(u)}})}}class hp extends TransformStream{constructor(e){let t;super({transform:i,flush(s){t&&t.length&&s.enqueue(t)}});function i(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)),i(s.slice(e),o)):t=s}}}let Kr=typeof Worker!=ft,Xr=()=>{};function fp({initModule:n}){Xr=n}class xs{constructor(e,{readable:t,writable:i},{options:s,config:o,streamOptions:r,useWebWorkers:l,transferStreams:a,workerURI:c},u){const{signal:h}=r;return Object.assign(e,{busy:!0,readable:t.pipeThrough(new hp(o.chunkSize)).pipeThrough(new pp(r),{signal:h}),writable:i,options:Object.assign({},s),workerURI:c,transferStreams:a,terminate(){return new Promise(f=>{const{worker:p,busy:m}=e;p?(m?e.resolveTerminated=f:(p.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,u(e)}}),(l&&Kr?gp:qr)(e,o)}}class pp extends TransformStream{constructor({onstart:e,onprogress:t,size:i,onend:s}){let o=0;super({async start(){e&&await Is(e,i)},async transform(r,l){o+=r.length,t&&await Is(t,o,i),l.enqueue(r)},async flush(){s&&await Is(s,o)}})}}async function Is(n,...e){try{await n(...e)}catch{}}function qr(n,e){return{run:()=>mp(n,e)}}function gp(n,e){const{baseURI:t,chunkSize:i}=e;let{wasmURI:s}=e;if(!n.interface){typeof s==Tt&&(s=s());let o;try{o=Cp(n.workerURI,t,n)}catch{return Kr=!1,qr(n,e)}Object.assign(n,{worker:o,interface:{run:()=>Ap(n,{chunkSize:i,wasmURI:s,baseURI:t})}})}return n.interface}async function mp({options:n,readable:e,writable:t,onTaskFinished:i},s){let o;try{if(!n.useCompressionStream)try{await Xr(s)}catch{n.useCompressionStream=!0}o=new up(n,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{i()}}async function Ap(n,e){let t,i;const s=new Promise((h,f)=>{t=h,i=f});Object.assign(n,{reader:null,writer:null,resolveResult:t,rejectResult:i,result:s});const{readable:o,options:r}=n,{writable:l,closed:a}=yp(n.writable),c=di({type:ap,options:r,config:e,readable:o,writable:l},n);c||Object.assign(n,{reader:o.getReader(),writer:l.getWriter()});const u=await s;return c||await l.getWriter().close(),await a,u}function yp(n){let e;const t=new Promise(s=>e=s);return{writable:new WritableStream({async write(s){const o=n.getWriter();await o.ready,await o.write(s),o.releaseLock()},close(){e()},abort(s){return n.getWriter().abort(s)}}),closed:t}}let Jr=!0;function Cp(n,e,t){const i={type:"module"};let s,o;if(typeof n==Tt&&(n=n()),n.startsWith("data:")||n.startsWith("blob:"))try{o=new Worker(n)}catch{o=new Worker(n,i)}else{try{s=new URL(n,e)}catch{s=n}o=new Worker(s,i)}return o.addEventListener(rp,r=>Ep(r,t)),o}function di(n,{worker:e,writer:t,onTaskFinished:i,transferStreams:s}){try{const{value:o,readable:r,writable:l}=n,a=[];if(o&&(n.value=o,a.push(n.value.buffer)),s&&Jr?(r&&a.push(r),l&&a.push(l)):n.readable=n.writable=null,a.length)try{return e.postMessage(n,a),!0}catch{Jr=!1,n.readable=n.writable=null,e.postMessage(n)}else e.postMessage(n)}catch(o){throw t&&t.releaseLock(),i(),o}}async function Ep({data:n},e){const{type:t,value:i,messageId:s,result:o,error:r}=n,{reader:l,writer:a,resolveResult:c,rejectResult:u,onTaskFinished:h}=e;try{if(r){const{message:p,stack:m,code:y,name:A,outputSize:C}=r,E=new Error(p);Object.assign(E,{stack:m,code:y,name:A,outputSize:C}),f(E)}else{if(t==lp){const{value:p,done:m}=await l.read();di({type:zr,value:p,done:m,messageId:s},e)}t==zr&&(await a.ready,await a.write(new Uint8Array(i)),di({type:cp,messageId:s},e)),t==jr&&f(null,o)}}catch(p){di({type:jr,messageId:s},e),f(p)}function f(p,m){p?u(p):c(m),a&&a.releaseLock(),h()}}let kt=[];const Bs=[];let Zr=0;async function wp(n,e){const{options:t,config:i}=e,{transferStreams:s,useWebWorkers:o,useCompressionStream:r,compressed:l,signed:a,encrypted:c}=t,{workerURI:u,maxWorkers:h}=i;e.transferStreams=s||s===de;const f=!l&&!a&&!c&&!e.transferStreams;return e.useWebWorkers=!f&&(o||o===de&&i.useWebWorkers),e.workerURI=e.useWebWorkers&&u?u:de,t.useCompressionStream=r||r===de&&i.useCompressionStream,(await p()).run();async function p(){const y=kt.find(A=>!A.busy);if(y)return ea(y),new xs(y,n,e,m);if(kt.length<h){const A={indexWorker:Zr};return Zr++,kt.push(A),new xs(A,n,e,m)}else return new Promise(A=>Bs.push({resolve:A,stream:n,workerOptions:e}))}function m(y){if(Bs.length){const[{resolve:A,stream:C,workerOptions:E}]=Bs.splice(0,1);A(new xs(y,C,E,m))}else y.worker?(ea(y),bp(y,e)):kt=kt.filter(A=>A!=y)}}function bp(n,e){const{config:t}=e,{terminateWorkerTimeout:i}=t;Number.isFinite(i)&&i>=0&&(n.terminated?n.terminated=!1:n.terminateTimeout=setTimeout(async()=>{kt=kt.filter(s=>s!=n);try{await n.terminate()}catch{}},i))}function ea(n){const{terminateTimeout:e}=n;e&&(clearTimeout(e),n.terminateTimeout=null)}const vp="Writer iterator completed too soon",xp="Content-Type",Ip=64*1024,ta="writable";class Ss{constructor(){this.size=0}init(){this.initialized=!0}}class na extends Ss{get readable(){const e=this,{chunkSize:t=Ip}=e,i=new ReadableStream({start(){this.chunkOffset=0},async pull(s){const{offset:o=0,size:r,diskNumberStart:l}=i,{chunkOffset:a}=this,c=r===de?t:Math.min(t,r-a),u=await Be(e,o+a,c,l);s.enqueue(u),a+t>r||r===de&&!u.length&&c?s.close():this.chunkOffset+=t}});return i}}class Ms extends na{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const i=this,s=e+t;let r=await(e||s<i.size?i.blob.slice(e,s):i.blob).arrayBuffer();return r.byteLength>t&&(r=r.slice(e,s)),new Uint8Array(r)}}class Bp extends Ss{constructor(e){super();const t=this,i=new TransformStream,s=[];e&&s.push([xp,e]),Object.defineProperty(t,ta,{get(){return i.writable}}),t.blob=new Response(i.readable,{headers:s}).blob()}getData(){return this.blob}}class Sp extends Bp{constructor(e){super(e),Object.assign(this,{encoding:e,utf8:!e||e.toLowerCase()=="utf-8"})}async getData(){const{encoding:e,utf8:t}=this,i=await super.getData();if(i.text&&t)return i.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(i,e)})}}}class Mp extends na{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(i,s)=>{await i.init(),s!=t.length-1&&(e.lastDiskOffset+=i.size),e.size+=i.size})),super.init()}async readUint8Array(e,t,i=0){const s=this,{readers:o}=this;let r,l=i;l==-1&&(l=o.length-1);let a=e;for(;o[l]&&a>=o[l].size;)a-=o[l].size,l++;const c=o[l];if(c){const u=c.size;if(a+t<=u)r=await Be(c,a,t);else{const h=u-a;r=new Uint8Array(t);const f=await Be(c,a,h);r.set(f,0);const p=await s.readUint8Array(e+h,t-h,i);r.set(p,h),f.length+p.length<t&&(r=r.subarray(0,f.length+p.length))}}else r=new Uint8Array;return s.lastDiskNumber=Math.max(l,s.lastDiskNumber),r}}class ia extends Ss{constructor(e,t=4294967295){super();const i=this;Object.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});let s,o,r;const l=new WritableStream({async write(u){const{availableSize:h}=i;if(r)u.length>=h?(await a(u.subarray(0,h)),await c(),i.diskOffset+=s.size,i.diskNumber++,r=null,await this.write(u.subarray(h))):await a(u);else{const{value:f,done:p}=await e.next();if(p&&!f)throw new Error(vp);s=f,s.size=0,s.maxSize&&(i.maxSize=s.maxSize),i.availableSize=i.maxSize,await ui(s),o=f.writable,r=o.getWriter(),await this.write(u)}},async close(){await r.ready,await c()}});Object.defineProperty(i,ta,{get(){return l}});async function a(u){const h=u.length;h&&(await r.ready,await r.write(u),s.size+=h,i.size+=h,i.availableSize-=h)}async function c(){await r.close()}}}class Tp{constructor(e){return Array.isArray(e)&&(e=new Mp(e)),e instanceof ReadableStream&&(e={readable:e}),e}}class Dp{constructor(e){return e.writable===de&&typeof e.next==Tt&&(e=new ia(e)),e instanceof WritableStream&&(e={writable:e}),e.size===de&&(e.size=0),e instanceof ia||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}}async function ui(n,e){if(n.init&&!n.initialized)await n.init(e);else return Promise.resolve()}function Be(n,e,t,i){return n.readUint8Array(e,t,i)}const sa="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),kp=sa.length==256;function Pp(n){if(kp){let e="";for(let t=0;t<n.length;t++)e+=sa[n[t]];return e}else return new TextDecoder().decode(n)}function hi(n,e){return e&&e.trim().toLowerCase()=="cp437"?Pp(n):new TextDecoder(e).decode(n)}const oa="filename",ra="rawFilename",aa="comment",la="rawComment",ca="uncompressedSize",da="compressedSize",ua="offset",ha="diskNumberStart",Ts="lastModDate",Ds="rawLastModDate",fa="lastAccessDate",Fp="rawLastAccessDate",pa="creationDate",ga="rawCreationDate",Rp=[oa,ra,ca,da,Ts,Ds,aa,la,fa,pa,ga,ua,ha,"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 ma{constructor(e){Rp.forEach(t=>this[t]=e[t])}}const Op="filenameEncoding",Lp="commentEncoding",Np="decodeText",Up="extractPrependedData",_p="extractAppendedData",Qp="password",Hp="rawPassword",Gp="passThrough",Yp="signal",Vp="checkPasswordOnly",Wp="checkOverlappingEntryOnly",zp="checkOverlappingEntry",jp="checkSignature",$p="useWebWorkers",Kp="useCompressionStream",Xp="transferStreams",qp="preventClose",ks="File format is not recognized",Jp="End of central directory not found",Zp="End of Zip64 central directory locator not found",eg="Central directory header not found",tg="Local file header not found",ng="Zip64 extra field not found",ig="File contains encrypted entry",sg="Encryption method not supported",Aa="Compression method not supported",ya="Split zip file",og="Overlapping entry found",Ca="utf-8",rg="UTF8",Ea="cp437",ag=[[ca,Mt],[da,Mt],[ua,Mt],[ha,qe]],lg={[qe]:{getValue:ue,bytes:4},[Mt]:{getValue:Xt,bytes:8}};class wa{constructor(e,t={}){Object.assign(this,{reader:new Tp(e),options:t,config:Pf(),readRanges:[]})}async*getEntriesGenerator(e={}){const t=this;let{reader:i}=t;const{config:s}=t;if(await ui(i),(i.size===de||!i.readUint8Array)&&(i=new Ms(await new Response(i.readable).blob()),await ui(i)),i.size<$t)throw new Error(ks);i.chunkSize=Ff(s);const o=await gg(i,tf,i.size,$t,qe*16);if(!o){const P=await Be(i,0,4),F=he(P);throw ue(F)==hr?new Error(ya):new Error(Jp)}const r=he(o);let l=ue(r,12),a=ue(r,16);const c=o.offset,u=xe(r,20),h=c+$t+u;let f=xe(r,4);const p=i.lastDiskNumber||0;let m=xe(r,6),y=xe(r,8),A=0,C=0;if(a==Mt||l==Mt||y==qe||m==qe){const P=await Be(i,o.offset-gs,gs),F=he(P);if(ue(F,0)==nf){a=Xt(F,8);let L=await Be(i,a,ms,-1),H=he(L);const O=o.offset-gs-ms;if(ue(H,0)!=pr&&a!=O){const b=a;a=O,a>b&&(A=a-b),L=await Be(i,a,ms,-1),H=he(L)}if(ue(H,0)!=pr)throw new Error(Zp);f==qe&&(f=ue(H,16)),m==qe&&(m=ue(H,20)),y==qe&&(y=Xt(H,32)),l==Mt&&(l=Xt(H,40)),a-=l}}if(a>=i.size&&(A=i.size-a-l-$t,a=i.size-l-$t),p!=f)throw new Error(ya);if(a<0)throw new Error(ks);let E=0,x=await Be(i,a,l,m),M=he(x);if(l){const P=o.offset-l;if(ue(M,E)!=fr&&a!=P){const F=a;a=P,a>F&&(A+=a-F),x=await Be(i,a,l,m),M=he(x)}}const T=o.offset-a-(i.lastDiskOffset||0);if(l!=T&&T>=0&&(l=T,x=await Be(i,a,l,m),M=he(x)),a<0||a>=i.size)throw new Error(ks);const B=Se(t,e,Op),I=Se(t,e,Lp);for(let P=0;P<y;P++){const F=new cg(i,s,t.options);if(ue(M,E)!=fr)throw new Error(eg);ba(F,M,E+6);const L=!!F.bitFlag.languageEncodingFlag,H=E+46,O=H+F.filenameLength,b=O+F.extraFieldLength,w=xe(M,E+4),v=w>>8==0,S=w>>8==3,R=x.subarray(H,O),_=xe(M,E+32),N=b+_,D=x.subarray(b,N),Q=L,V=L,$=ue(M,E+38),q=$&ps,ne={readOnly:!!(q&yf),hidden:!!(q&Cf),system:!!(q&Ef),directory:!!(q&Af),archive:!!(q&wf)},se=ue(M,E+42)+A,Y=Se(t,e,Np)||hi,j=Q?Ca:B||Ea,J=V?Ca:I||Ea;let oe=Y(R,j);oe===de&&(oe=hi(R,j));let le=Y(D,J);le===de&&(le=hi(D,J)),Object.assign(F,{versionMadeBy:w,msDosCompatible:v,compressedSize:0,uncompressedSize:0,commentLength:_,offset:se,diskNumberStart:xe(M,E+34),internalFileAttributes:xe(M,E+36),externalFileAttributes:$,msdosAttributesRaw:q,msdosAttributes:ne,rawFilename:R,filenameUTF8:Q,commentUTF8:V,rawExtraField:x.subarray(O,b),rawComment:D,filename:oe,comment:le}),C=Math.max(se,C),va(F,F,M,E+6);const ge=F.externalFileAttributes>>16&qe;F.unixMode===de&&(ge&(bf|ys|As))!=0&&(F.unixMode=ge);const we=!!(F.unixMode&vf),me=!!(F.unixMode&xf),Re=!!(F.unixMode&If),ct=F.unixMode!==de?(F.unixMode&ys)!=0:S&&(ge&ys)!=0,$e=F.unixMode!==de&&(F.unixMode&Cr)==As,bt=(ge&Cr)==As;Object.assign(F,{setuid:we,setgid:me,sticky:Re,unixExternalUpper:ge,internalFileAttribute:F.internalFileAttributes,externalFileAttribute:F.externalFileAttributes,executable:ct,directory:$e||bt||v&&ne.directory||oe.endsWith(Bf)&&!F.uncompressedSize,zipCrypto:F.encrypted&&!F.extraFieldAES});const it=new ma(F);it.getData=(Nt,Ut)=>F.getData(Nt,it,t.readRanges,Ut),it.arrayBuffer=async Nt=>{const Ut=new TransformStream,[Ki]=await Promise.all([new Response(Ut.readable).arrayBuffer(),F.getData(Ut,it,t.readRanges,Nt)]);return Ki},E=N;const{onprogress:ln}=e;if(ln)try{await ln(P+1,y,new ma(F))}catch{}yield it}const g=Se(t,e,Up),k=Se(t,e,_p);return g&&(t.prependedData=C>0?await Be(i,0,C):new Uint8Array),t.comment=u?await Be(i,c+$t,u):new Uint8Array,k&&(t.appendedData=h<i.size?await Be(i,h,i.size-h):new Uint8Array),!0}async getEntries(e={}){const t=[];for await(const i of this.getEntriesGenerator(e))t.push(i);return t}async close(){}}class cg{constructor(e,t,i){Object.assign(this,{reader:e,config:t,options:i})}async getData(e,t,i,s={}){const o=this,{reader:r,offset:l,diskNumberStart:a,extraFieldAES:c,extraFieldZip64:u,compressionMethod:h,config:f,bitFlag:p,signature:m,rawLastModDate:y,uncompressedSize:A,compressedSize:C}=o,{dataDescriptor:E}=p,x=t.localDirectory={},M=await Be(r,l,Cs,a),T=he(M);let B=Se(o,s,Qp),I=Se(o,s,Hp);const g=Se(o,s,Gp);if(B=B&&B.length&&B,I=I&&I.length&&I,c&&c.originalCompressionMethod!=Jh)throw new Error(Aa);if(h!=qh&&h!=Xh&&h!=ur&&!g)throw new Error(Aa);if(ue(T,0)!=Zh)throw new Error(tg);ba(x,T,4);const{extraFieldLength:k,filenameLength:P,lastAccessDate:F,creationDate:L}=x;x.rawExtraField=k?await Be(r,l+Cs+P,k,a):new Uint8Array,va(o,x,T,4,!0),Object.assign(t,{lastAccessDate:F,creationDate:L});const H=o.encrypted&&x.encrypted&&!g,O=H&&!c;if(g||(t.zipCrypto=O),H){if(!O&&c.strength===de)throw new Error(sg);if(!B&&!I)throw new Error(ig)}const b=l+Cs+P+k,w=C,v=r.readable;Object.assign(v,{diskNumberStart:a,offset:b,size:w});const S=Se(o,s,Yp),R=Se(o,s,Vp);let _=Se(o,s,zp);const N=Se(o,s,Wp);N&&(_=!0);const{onstart:D,onprogress:Q,onend:V}=s,$=h==ur;let q=Se(o,s,Kp);$&&(q=!1);const ne={options:{codecType:$r,password:B,rawPassword:I,zipCrypto:O,encryptionStrength:c&&c.strength,signed:Se(o,s,jp)&&!g,passwordVerification:O&&(E?y>>>8&ps:m>>>24&ps),outputSize:g?C:A,signature:m,compressed:h!=0&&!g,encrypted:o.encrypted&&!g,useWebWorkers:Se(o,s,$p),useCompressionStream:q,transferStreams:Se(o,s,Xp),deflate64:$,checkPasswordOnly:R},config:f,streamOptions:{signal:S,size:w,onstart:D,onprogress:Q,onend:V}};_&&await pg({reader:r,fileEntry:t,offset:l,diskNumberStart:a,signature:m,compressedSize:C,uncompressedSize:A,dataOffset:b,dataDescriptor:E||x.bitFlag.dataDescriptor,extraFieldZip64:u||x.extraFieldZip64,readRanges:i});let se;try{if(!N){R&&(e=new WritableStream),e=new Dp(e),await ui(e,g?C:A),{writable:se}=e;const{outputSize:Y}=await wp({readable:v,writable:se},ne);if(e.size+=Y,Y!=(g?C:A))throw new Error(Yr)}}catch(Y){if(Y.outputSize!==de&&(e.size+=Y.outputSize),!R||Y.message!=Es)throw Y}finally{!Se(o,s,qp)&&se&&!se.locked&&await se.getWriter().close()}return R||N?de:e.getData?e.getData():se}}function ba(n,e,t){const i=n.rawBitFlag=xe(e,t+2),s=(i&mr)==mr,o=ue(e,t+6);Object.assign(n,{encrypted:s,version:xe(e,t),bitFlag:{level:(i&mf)>>1,dataDescriptor:(i&Ar)==Ar,languageEncodingFlag:(i&yr)==yr},rawLastModDate:o,lastModDate:mg(o),filenameLength:xe(e,t+22),extraFieldLength:xe(e,t+24)})}function va(n,e,t,i,s){const{rawExtraField:o}=e,r=e.extraField=new Map,l=he(new Uint8Array(o));let a=0;try{for(;a<o.length;){const E=xe(l,a),x=xe(l,a+2);r.set(E,{type:E,data:o.slice(a+4,a+4+x)}),a+=4+x}}catch{}const c=xe(t,i+4);Object.assign(e,{signature:ue(t,i+Sf),compressedSize:ue(t,i+Mf),uncompressedSize:ue(t,i+Tf)});const u=r.get(rf);u&&(dg(u,e),e.extraFieldZip64=u);const h=r.get(uf);h&&(xa(h,oa,ra,e,n),e.extraFieldUnicodePath=h);const f=r.get(hf);f&&(xa(f,aa,la,e,n),e.extraFieldUnicodeComment=f);const p=r.get(af);p?(ug(p,e,c),e.extraFieldAES=p):e.compressionMethod=c;const m=r.get(lf);m&&(hg(m,e),e.extraFieldNTFS=m);const y=r.get(gf);if(y)Ia(y,e,!1),e.extraFieldUnix=y;else{const E=r.get(pf);E&&(Ia(E,e,!0),e.extraFieldInfoZip=E)}const A=r.get(df);A&&(fg(A,e,s),e.extraFieldExtendedTimestamp=A);const C=r.get(ff);C&&(e.extraFieldUSDZ=C)}function dg(n,e){e.zip64=!0;const t=he(n.data),i=ag.filter(([s,o])=>e[s]==o);for(let s=0,o=0;s<i.length;s++){const[r,l]=i[s];if(e[r]==l){const a=lg[l];e[r]=n[r]=a.getValue(t,o),o+=a.bytes}else if(n[r])throw new Error(ng)}}function xa(n,e,t,i,s){const o=he(n.data),r=new ai;r.append(s[t]);const l=he(new Uint8Array(4));l.setUint32(0,r.get(),!0);const a=ue(o,1);Object.assign(n,{version:gt(o,0),[e]:hi(n.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&a==ue(l,0)}),n.valid&&(i[e]=n[e],i[e+rg]=!0)}function ug(n,e,t){const i=he(n.data),s=gt(i,4);Object.assign(n,{vendorVersion:gt(i,0),vendorId:gt(i,2),strength:s,originalCompressionMethod:t,compressionMethod:xe(i,5)}),e.compressionMethod=n.compressionMethod}function hg(n,e){const t=he(n.data);let i=4,s;try{for(;i<n.data.length&&!s;){const o=xe(t,i),r=xe(t,i+2);o==cf&&(s=n.data.slice(i+4,i+4+r)),i+=4+r}}catch{}try{if(s&&s.length==24){const o=he(s),r=o.getBigUint64(0,!0),l=o.getBigUint64(8,!0),a=o.getBigUint64(16,!0);Object.assign(n,{rawLastModDate:r,rawLastAccessDate:l,rawCreationDate:a});const c=Ps(r),u=Ps(l),h=Ps(a),f={lastModDate:c,lastAccessDate:u,creationDate:h};Object.assign(n,f),Object.assign(e,f)}}catch{}}function Ia(n,e,t){try{const i=he(new Uint8Array(n.data));let s=0;const o=gt(i,s++),r=gt(i,s++),l=n.data.subarray(s,s+r);s+=r;const a=Ba(l),c=gt(i,s++),u=n.data.subarray(s,s+c);s+=c;const h=Ba(u);let f=de;if(!t&&s+2<=n.data.length){const p=n.data;f=new DataView(p.buffer,p.byteOffset+s,2).getUint16(0,!0)}Object.assign(n,{version:o,uid:a,gid:h,unixMode:f}),a!==de&&(e.uid=a),h!==de&&(e.gid=h),f!==de&&(e.unixMode=f)}catch{}}function Ba(n){const e=new Uint8Array(4);return e.set(n,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function fg(n,e,t){const i=he(n.data),s=gt(i,0),o=[],r=[];t?((s&1)==1&&(o.push(Ts),r.push(Ds)),(s&2)==2&&(o.push(fa),r.push(Fp)),(s&4)==4&&(o.push(pa),r.push(ga))):n.data.length>=5&&(o.push(Ts),r.push(Ds));let l=1;o.forEach((a,c)=>{if(n.data.length>=l+4){const u=ue(i,l);e[a]=n[a]=new Date(u*1e3);const h=r[c];n[h]=u}l+=4})}async function pg({reader:n,fileEntry:e,offset:t,diskNumberStart:i,signature:s,compressedSize:o,uncompressedSize:r,dataOffset:l,dataDescriptor:a,extraFieldZip64:c,readRanges:u}){let h=0;if(i)for(let m=0;m<i;m++){const y=n.readers[m];h+=y.size}let f=0;if(a&&(c?f=of:f=sf),f){const m=await Be(n,l+o,f+gr,i);if(ue(he(m),0)==ef){const A=ue(he(m),4);let C,E;c?(C=Xt(he(m),8),E=Xt(he(m),16)):(C=ue(he(m),8),E=ue(he(m),12)),(e.encrypted&&!e.zipCrypto||A==s)&&C==o&&E==r&&(f+=gr)}}const p={start:h+t,end:h+l+o+f,fileEntry:e};for(const m of u)if(m.fileEntry!=e&&p.start>=m.start&&p.start<m.end){const y=new Error(og);throw y.overlappingEntry=m.fileEntry,y}u.push(p)}async function gg(n,e,t,i,s){const o=new Uint8Array(4),r=he(o);Ag(r,0,e);const l=i+s;return await a(i)||await a(Math.min(l,t));async function a(c){const u=t-c,h=await Be(n,u,c);for(let f=h.length-i;f>=0;f--)if(h[f]==o[0]&&h[f+1]==o[1]&&h[f+2]==o[2]&&h[f+3]==o[3])return{offset:u+f,buffer:h.slice(f,f+i).buffer}}}function Se(n,e,t){return e[t]===de?n.options[t]:e[t]}function mg(n){const e=(n&4294901760)>>16,t=n&qe;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 Ps(n){return new Date(Number(n/BigInt(1e4)-BigInt(116444736e5)))}function gt(n,e){return n.getUint8(e)}function xe(n,e){return n.getUint16(e,!0)}function ue(n,e){return n.getUint32(e,!0)}function Xt(n,e){return Number(n.getBigUint64(e,!0))}function Ag(n,e,t){n.setUint32(e,t,!0)}function he(n){return new DataView(n.buffer)}try{ri({baseURI:typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Zi&&Zi.tagName.toUpperCase()==="SCRIPT"&&Zi.src||new URL("leiting-bim.umd.js",document.baseURI).href})}catch{}const Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function yg(n){let e;n({wasmURI:()=>(e||(e="data:application/wasm;base64,"+(t=>{t=(r=>{const l=(r=(r+"").replace(/[^A-Za-z0-9+/=]/g,"")).length,a=[];for(let c=0;l>c;c+=4){const u=Le.indexOf(r[c])<<18|Le.indexOf(r[c+1])<<12|(63&Le.indexOf(r[c+2]))<<6|63&Le.indexOf(r[c+3]);a.push(u>>16&255),r[c+2]!=="="&&a.push(u>>8&255),r[c+3]!=="="&&a.push(255&u)}return new Uint8Array(a)})(t);let i=new Uint8Array(1024),s=0;for(let r=0;r<t.length;){const l=t[r++];if(128&l){const a=3+(127&l),c=t[r++]<<8|t[r++],u=s-c;o(s+a);for(let h=0;a>h;h++)i[s++]=i[u+h]}else{const a=l;o(s+a);for(let c=0;a>c&&r<t.length;c++)i[s++]=t[r++]}}return(r=>{let l="";const a=r.length;let c=0;for(;a>c+2;c+=3){const h=r[c]<<16|r[c+1]<<8|r[c+2];l+=Le[h>>18&63]+Le[h>>12&63]+Le[h>>6&63]+Le[63&h]}const u=a-c;if(u===1){const h=r[c]<<16;l+=Le[h>>18&63]+Le[h>>12&63]+"=="}else if(u===2){const h=r[c]<<16|r[c+1]<<8;l+=Le[h>>18&63]+Le[h>>12&63]+Le[h>>6&63]+"="}return l})(new Uint8Array(i.buffer.slice(0,s)));function o(r){if(i.length<r){let l=2*i.length;for(;r>l;)l*=2;const a=new Uint8Array(l);a.set(i.subarray(0,s)),i=a}}})("FQBhc20BAAAAAUULYAF/AX9gAn9/AIEABYAACwIDf4IABwEBgAARAQaAAAuDAA6BABUDAGAAgAADgAANAQSBABUDAGAHgwAegAAfEgNCQQcABAEABAgIAAIABQIKAIAAB4EAAwEFgQAHAgICgQAHEAEDAAUGAAMDBQQJBAQJAQaAAAEeAAIEAwIEAgIBBAcDAwQFAXABDQ0FBgEBggKCAgYIgACYIkHQ1QQLB4oEHAZtZW1vcnkCAAxpbmZsYXRlOV9uZXcABw2GAA8HaW5pdAAIEYoAEAdfcmF3AAoQhgAUCXByb2Nlc3MAC4cARgZlbmQADhaGAA8QbGFzdF9jb25zdW1lZAARC4QAGYMAbYUANoMAbAEShQBYhwBrARSFAH+DABMHZ3ppcAAVD4UAFIUAfgEWhgBWgQB9AhgVhQAOjQB8AmRliQB8hQAOggB8AhoQiQAPggB8AhsRigATggB8AhwPhQAUhQB8AR2GAFaBAHwJHwRmcmVlAAIVhQAV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AAQBDIQABIAF24FHeQTgHQsjhQBfhQXLAhARgAVtBgcJBgoFC4A6uAQNAg4BgAclBJQeC2mFAJCFAIiFAICFAHiBAGiBAFyBBh8BEIAABAEUgAAEARiAAAQBHIAABAEggAAEASiAAAQBMIAABAE4gAAEAUCAAAQBUIAABIEGvQFwgAAEAYCAAAQBoIAABAHAgAAEAeCAAG8DHwtyjQBvgQBrgQBngQBjgQBfgQBbgQBXgQBTgQBPgQBLgQBHgQBDgQE8AYCvAEGAUc0CC22BAMcBBIAAAgEIgAAEgQEzgQJLARCAAA6DAAyBnqyAqmuEACSBB3OBAE8BCIAACIEAGIUADIEIt4MADAEggQCUgDKEgQBrAYCBCC8BBIMADIA/SAoBABAMAEGRIQv/gCUfgMDAgIKxBQgJCQoKgEk3gAABAQ2AAAEBDoAAAQEPgAABARCEAAEBEYQAAQEShAABAROEAAEBFIwAAQEVjAABARaMAAEBF4wAAQEYnAABARmcAAEBGpwAAQEbmwABARyBffsEBAQFBYHB1QEHgAABAQiEAAGAXSqCAAEBCowAAYAnsooAAYEBMJkAAYEBTJkAAYEBaLkAAYEBpLkAAYIDdYABzoUBvI0BqJ0BkLwBgAIbHLwAAQEdvAABgA9PgH05A9AqAQ==")),e)})}let ye,qt,Ne,xn;function Cg(n){if(ye=n,{malloc:qt,free:Ne,memory:xn}=ye,typeof qt!="function"||typeof Ne!="function"||!xn)throw ye=qt=Ne=xn=null,new Error("Invalid WASM module")}function Sa(n,e,t={}){const i=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=qt(s),this.in=qt(o),this.inBufferSize=o,this._scratch=new Uint8Array(s),n?(this._process=ye.deflate_process,this._last_consumed=ye.deflate_last_consumed,this._end=ye.deflate_end,this.streamHandle=ye.deflate_new(),e==="gzip"?r=ye.deflate_init_gzip(this.streamHandle,i):e==="deflate-raw"?r=ye.deflate_init_raw(this.streamHandle,i):r=ye.deflate_init(this.streamHandle,i)):e==="deflate64-raw"?(this._process=ye.inflate9_process,this._last_consumed=ye.inflate9_last_consumed,this._end=ye.inflate9_end,this.streamHandle=ye.inflate9_new(),r=ye.inflate9_init_raw(this.streamHandle)):(this._process=ye.inflate_process,this._last_consumed=ye.inflate_last_consumed,this._end=ye.inflate_end,this.streamHandle=ye.inflate_new(),e==="deflate-raw"?r=ye.inflate_init_raw(this.streamHandle):e==="gzip"?r=ye.inflate_init_gzip(this.streamHandle):r=ye.inflate_init(this.streamHandle)),r!==0)throw new Error("init failed:"+r)},transform(r,l){try{const a=r,c=new Uint8Array(xn.buffer),u=this._process,h=this._last_consumed,f=this.out,p=this._scratch;let m=0;for(;m<a.length;){const y=Math.min(a.length-m,32768);(!this.in||this.inBufferSize<y)&&(this.in&&Ne&&Ne(this.in),this.in=qt(y),this.inBufferSize=y),c.set(a.subarray(m,m+y),this.in);const A=u(this.streamHandle,this.in,y,f,s,0),C=A&16777215;if(C&&(p.set(c.subarray(f,f+C),0),l.enqueue(p.slice(0,C))),!n){const x=A>>24&255,M=x&128?x-256:x;if(M<0)throw new Error("process error:"+M)}const E=h(this.streamHandle);if(E===0)break;m+=E}}catch(a){this._end&&this.streamHandle&&this._end(this.streamHandle),this.in&&Ne&&Ne(this.in),this.out&&Ne&&Ne(this.out),l.error(a)}},flush(r){try{const l=new Uint8Array(xn.buffer),a=this._process,c=this.out,u=this._scratch;for(;;){const h=a(this.streamHandle,0,0,c,s,4),f=h&16777215,p=h>>24&255;if(!n){const m=p&128?p-256:p;if(m<0)throw new Error("process error:"+m)}if(f&&(u.set(l.subarray(c,c+f),0),r.enqueue(u.slice(0,f))),p===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&&Ne&&Ne(this.in),this.out&&Ne&&Ne(this.out)}}})}class Eg{constructor(e="deflate",t){return Sa(!0,e,t)}}class wg{constructor(e="deflate",t){return Sa(!1,e,t)}}let Ma=!1;async function bg(n,{baseURI:e}){if(!Ma){let t,i;try{try{i=new URL(n,e)}catch{}t=await(await fetch(i)).arrayBuffer()}catch(o){if(n.startsWith("data:application/wasm;base64,"))t=vg(n);else throw o}const s=await WebAssembly.instantiate(t);Cg(s.instance.exports),Ma=!0}}function vg(n){const e=n.split(",")[1],t=atob(e),i=t.length,s=new Uint8Array(i);for(let o=0;o<i;++o)s[o]=t.charCodeAt(o);return s.buffer}let Fs;yg(ri),fp({initModule:n=>{if(!Fs){let{wasmURI:e}=n;typeof e==Tt&&(e=e()),Fs=bg(e,n)}return Fs}}),ri({CompressionStreamZlib:Eg,DecompressionStreamZlib:wg});const Rs={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 n={};for(const e of Object.keys(Rs))for(const t of Object.keys(Rs[e])){const i=Rs[e][t];if(typeof i=="string")n[i]=e+"/"+t;else for(let s=0;s<i.length;s++)n[i[s]]=e+"/"+t}return n})(),Rf(ri);const Ce=d.reactive({visible:!1,type:"info",title:"",description:"",closable:!1,showIcon:!0,duration:3});let Me=null,Ta=null,Da=!1,Os=null,fi=null;function xg(){if(fi||typeof document>"u")return;const n=`
|
|
14
14
|
.tech-alert-wrapper {
|
|
15
15
|
position: fixed;
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
from { transform: rotate(0deg); }
|
|
79
79
|
to { transform: rotate(360deg); }
|
|
80
80
|
}
|
|
81
|
-
`;fi=document.createElement("style"),fi.textContent=n,document.head.appendChild(fi)}function Ig(){if(Da)return;xg(),Me=document.createElement("div"),Me.className="tech-alert-wrapper",document.body.appendChild(Me);const n={setup(){return()=>Ce.visible?d.h(Ae.Alert,{class:`tech-alert tech-alert-${Ce.type}`,message:Ce.title,description:Ce.description,showIcon:Ce.showIcon,closable:Ce.closable,onClose:()=>{Ce.visible=!1}},{icon:()=>Ce.type==="loading"?d.h(fn.LoadingOutlined):Ce.type==="success"?d.h(fn.CheckCircleOutlined):Ce.type==="error"?d.h(fn.CloseCircleOutlined):Ce.type==="warning"?d.h(fn.ExclamationCircleOutlined):d.h(fn.InfoCircleOutlined)}):null}};Ta=d.createVNode(n),d.render(Ta,Me),Da=!0}function In(n){Ig(),Os&&clearTimeout(Os),Ce.type=n.type||"info",Ce.title=n.title||"",Ce.description=n.description||"",Ce.closable=n.closable??!1,Ce.showIcon=n.showIcon??!0,Ce.visible=!0,Me&&(n.container?(Me.parentNode!==n.container&&n.container.appendChild(Me),Me.style.position="absolute",Me.style.top="20px",Me.style.left="50%",Me.style.transform="translateX(-50%)"):(Me.parentNode!==document.body&&document.body.appendChild(Me),Me.style.position="fixed",Me.style.top="20px",Me.style.left="50%",Me.style.transform="translateX(-50%)"));const e=n.duration??(Ce.type==="loading"?0:3);e>0&&(Os=setTimeout(()=>{Ce.visible=!1},e*1e3))}const fe={info:(n,e,t,i)=>In({type:"info",title:n,description:e,duration:t,container:i}),success:(n,e,t,i)=>In({type:"success",title:n,description:e,duration:t,container:i}),error:(n,e,t,i)=>In({type:"error",title:n,description:e,duration:t,container:i}),warning:(n,e,t,i)=>In({type:"warning",title:n,description:e,duration:t,container:i}),loading:(n,e,t)=>In({type:"loading",title:n,description:e,duration:0,container:t}),close:()=>{Ce.visible=!1}},Bg="E84#E3C4!8C4&A1";async function Bn(n){try{const e=await fetch(n);if(!e.ok)return fe.error("[loadModelFile] 加载失败",`${n} ${e.status}`),!1;const t=await e.blob();try{const i=new wa(new Ms(t),{password:Bg}),o=(await i.getEntries()).find(l=>!l.directory&&l.filename.endsWith(".json"));if(!o)return await i.close(),!1;const r=await o.getData(new Sp);return await i.close(),JSON.parse(r.trim())}catch{const i=await t.text();try{return JSON.parse(i.trim())}catch(s){throw console.error(`[loadModelFile] JSON parse error: ${n}`,s),s}}}catch(e){return fe.error("[loadModelFile] 加载失败",`${n} ${e}`),!1}}function Sg(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const e=Math.random()*16|0;return(n==="x"?e:e&3|8).toString(16)})}class pi{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(i=>i(...t))}off(e,t){this.events[e]&&(this.events[e]=this.events[e].filter(i=>i!==t))}}class ka{cesium;viewer;modelList=[];hasLoaded3dTiles={};mapRecordModelId={};mapTileset={};BIMmodelId="";events=new pi;options={flyTo:!0,flyToDuration:0,loadTreeNodeDetails:!0,loadTreeNodeDetailsUrl:"/elementInfo.zip",loadTree:!0,loadTreeUrl:"/allElementsInfo.zip",boxRegionUrl:"/BoundingBoxInfo.zip",regionUrl:"/region.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 i=this.mapTileset[t];i&&(this.viewer.scene.primitives.remove(i),e.push(t)),delete this.mapTileset[t],delete this.hasLoaded3dTiles[t],delete this.mapRecordModelId[t]}),this.modelList=[],this.viewer.scene.requestRender(),this.events.emit("mountAll3Dtiles",{modelList:[],mapTileset:{}}),e}deleteModels(e){const t=[];return e.forEach(({modelId:i})=>{const s=this.mapTileset[i];s&&(this.viewer.scene.primitives.remove(s),t.push(i)),delete this.mapTileset[i],delete this.hasLoaded3dTiles[i],delete this.mapRecordModelId[i]}),this.modelList=this.modelList.filter(i=>!t.includes(i.modelId)),this.viewer.scene.requestRender(),this.events.emit("mountAll3Dtiles",{modelList:this.modelList,mapTileset:this.mapTileset}),t}showModels(e){const t=[];return e.forEach(i=>{const s=`${i.modelId}`,o=this.mapTileset[s];o&&(o.show=!!i.show,t.push(s))}),t.length&&this.viewer.scene.requestRender(),t}async addModels({files:e,fileNames:t,options:i}){const s=e||t||[];s.length>0&&await this.add3DTilesModel(s,i)}async add3DTilesModel(e,t){const i=t?Kh({},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:jt.NotLoaded}),this.mapRecordModelId[o]=!1}await this.load3DTilesModel(i)}}async load3DTilesModel(e){const t=this.modelList.filter(r=>r.state===jt.NotLoaded);if(!t.length)return;const i=t.length;this.events.emit("loadingStatus",`正在加载 ${i} 个模型`);let s=0,o=!1;for(const r of t){s++;try{r.state=jt.Loading;const l=r.url,a=this.getBaseUrlPath(l);e.loadTreeNodeDetails&&this.events.emit("loadingStatus",`正在加载第 ${s}/${i} 个模型: 加载${r.modelName}构件信息`);const c=e.loadTreeNodeDetails?await Bn(`${a}${e.loadTreeNodeDetailsUrl}`):!1;e.loadTree&&this.events.emit("loadingStatus",`正在加载第 ${s}/${i} 个模型: 加载${r.modelName}目录树`);const u=e.loadTree?await Bn(`${a}${e.loadTreeUrl}`):!1;this.events.emit("loadingStatus",`正在加载第 ${s}/${i} 个模型: 加载${r.modelName}模型数据`);const h=e.boxRegionUrl?await Bn(`${a}${e.boxRegionUrl}`):!1,f=await this.loadTilesetWithZipSupport(l,r.modelId,e.tilesetOptions||{},this.cesium);this.viewer.scene.primitives.add(f),await f.readyPromise;const p=`${f?.asset?.tilesetVersion??r.modelId}`;this.mapTileset[`${r.modelId}`]=f;const m={versionId:p,selectedFn:e.selectedFn,model:{modelId:r.modelId,modelName:r.modelName,dbName:r.dbName,fileType:r.fileType,outPutPath:r.outPutPath,url:r.url,formData:r.formData,type:"BIM"},node:c||null,tree:u||null,box:null};if(h?.min&&h?.max){const y={x:h.min.X,y:h.min.Y,z:h.min.Z},A={x:h.max.X,y:h.max.Y,z:h.max.Z},C={x:(y.x+A.x)/2,y:(y.y+A.y)/2,z:(y.z+A.z)/2};m.box={min:y,max:A,center:C}}if(!r.formData){const y=await Bn(`${r.outPutPath}${r.dbName}${e.regionUrl}`);if(y)r.formData={modelId:r.modelId.toString(),longitude:y.Longitude,latitude:y.Latitude,distance:1e-6,rotation:30,totalRotation:y.DAngle||0,height:y.MinHeight,lonlat:1e-5,heightDistance:1,modelOptions:[{value:r.modelId.toString(),label:r.modelName}],X:y?.X||0,Y:y?.Y||0,Z:y?.Z||0};else{const A=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:A+1,label:r.modelName}],X:0,Y:0,Z:0}}}r.formData&&(r.formData.heightDistance=r.formData.heightDistance??1,m.model.formData=r.formData),f.leiting=m,dr({Cesium:this.cesium,tileset:f}),r.state=jt.Loaded,this.mapRecordModelId[r.modelId]=!0,this.events.emit("tilesetLoaded",f),e.tilesLoad3dTiles&&e.tilesLoad3dTiles(f),!o&&e.flyTo&&(this.BIMmodelId=r.modelId,this.flyToTileset({modelId:this.BIMmodelId,options:{duration:e.flyToDuration??0}}),o=!0),e.delay&&await new Promise(y=>setTimeout(y,e.delay))}catch(l){console.error(`模型 ${r.modelName} 加载失败:`,l),this.events.emit("loadingStatus",`模型 ${r.modelName} 加载失败`),r.state=jt.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 i=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:c}=r,u=`${l}${a}/tileset.json`,h=await i.Cesium3DTileset.fromUrl(u,{maximumScreenSpaceError:16,preferLeaves:!0,cullWithChildrenBounds:!0,...t?.tilesetOptions});if(this.viewer.scene.primitives.add(h),await h.readyPromise,this.mapTileset[`${c}`]=h,this.hasLoaded3dTiles[`${c}`]=(this.hasLoaded3dTiles[`${c}`]||0)+1,this.mapRecordModelId[`${c}`]=!0,!r?.formData){const f=h.root.computedTransform;if(f){const p=i.Matrix4.fromColumnMajorArray(f),m=i.Matrix4.getTranslation(p,new i.Cartesian3),y=i.Ellipsoid.WGS84.cartesianToCartographic(m),A=i.Math.toDegrees(y.longitude),C=i.Math.toDegrees(y.latitude),E=y.height;r.formData={modelId:r.modelId.toString(),longitude:A,latitude:C,distance:1e-5,rotation:0,totalRotation:0,heightDistance:1,height:E,lonlat:1e-5,modelOptions:[{value:r.modelId.toString(),label:r.modelName}],X:0,Y:0,Z:0}}else console.warn(`OSGB模型 ${c} 无法获取初始位置信息`)}r.formData&&(r.formData.heightDistance=r.formData.heightDistance??1),h.leiting={versionId:`${h?.asset?.tilesetVersion??c}`,selectedFn:t?.selectedFn,model:{modelId:r.modelId,modelName:r.modelName,dbName:r.dbName,fileType:r.fileType,outPutPath:r.outPutPath,url:u,formData:r.formData,type:"OSGB"},box:null},this.modelList.push({...r,url:u,state:jt.Loaded}),!s&&t?.flyTo&&(this.viewer.zoomTo(h),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:i,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,c=i||0,u=s||0;const h=l.boundingSphere.center,f=r.Transforms.eastNorthUpToFixedFrame(h),p=new r.Cartesian3(a,c,u),m=r.Matrix4.multiplyByPoint(f,p,new r.Cartesian3(0,0,0)),y=r.Cartesian3.subtract(m,h,new r.Cartesian3);l.modelMatrix=r.Matrix4.fromTranslation(y)}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(c=>{c?o&&o():r&&r()}).catch(c=>{r&&r(),console.error("FlyTo error",c)})}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,i,s){const o=`${this.getBaseUrlPath(e)}/tileset.zip`;if((await fetch(o)).status===200){const a=await Bn(o);if(a){const c=new Blob([JSON.stringify(a)],{type:"application/json"}),u=URL.createObjectURL(c),h=s.Proxy,f=this.getBaseUrlPath(e);h.getURL=m=>m.includes("blob://")?m.replace(/blob:\/\//g,f):m;const p=new s.Resource({url:u,proxy:h});try{return await s.Cesium3DTileset.fromUrl(p,{id:t,...i})}catch{return await s.Cesium3DTileset.fromUrl(e,{url:e,id:t,...i})}}}return await s.Cesium3DTileset.fromUrl(e,{url:e,id:t,...i})}}const Pa={normal:0,process:2},Mg={color:1};function Fa(n){return n===1||n==="exist"?1:n===2||n==="process"?2:0}function Jt(n){return Number.isNaN(n)?0:n<=1?Math.min(Math.max(n,0),1):Math.min(Math.max(n/255,0),1)}function Ra(n){return Number.isNaN(n)?1:n<=1?Math.min(Math.max(n,0),1):1}function Ls(n){if(!n)return null;const e=Number(n.r),t=Number(n.g),i=Number(n.b),s=n.a===void 0?1:Number(n.a);if([e,t,i,s].some(a=>Number.isNaN(a)))return null;const o=Math.round(e*255),r=Math.round(t*255),l=Math.round(i*255);return`rgba(${o},${r},${l},${s})`}function Tg(n){if(!n||typeof n!="string")return null;const t=n.replace(/\s+/g,"").match(/^rgba?\((\d+),(\d+),(\d+)(?:,([0-9.]+))?\)$/i);if(!t)return null;const i=Number(t[1]),s=Number(t[2]),o=Number(t[3]),r=t[4]===void 0?1:Number(t[4]);return[i,s,o,r].some(l=>Number.isNaN(l))?null:{r:Math.min(Math.max(i/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 Dg(n){if(n==null)return null;const e=Number(n);return Number.isNaN(e)?null:e}function kg(n){const e=n.lastIndexOf("-"),t=n.substring(0,e),i=n.substring(e+1);return[t,i]}function Ns(n){if(!n)return null;const e=n.Min??n.min,t=n.Max??n.max;if(!e||!t)return null;const i=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[i,s,o,r,l,a].some(c=>Number.isNaN(c))?null:{min:{x:i,y:s,z:o},max:{x:r,y:l,z:a}}}function Sn(n,e){if(e)return`${e}`;const t=n?.leiting?.model?.modelId??n?.modelId??n?.id;return t==null?null:`${t}`}function Pg(n,e){if(e==null)return null;const t=n?.leiting?.node;if(!t)return null;const i=`${e}`,s=t?.[i],o=Ns(s?.box3??s?.box);if(o)return o;const r=t?.element?.[i]??t?.elements?.[i]??t?.nodeExtras?.element?.[i]??t?.nodeExtras?.elements?.[i];return Ns(r?.box3??r?.box)}function Fg(n){const e=n?.leiting?.box;return e?Ns({min:e.min,max:e.max}):null}class Rg{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,i,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:c,rgba:u}=l;if(Array.isArray(a)&&a[0]){a[0][1]=u;const h=i[c];h?h.push(a[0]):i[c]=[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:c,modelId:u}=l;if(Array.isArray(a)&&a[0]){a[0][1]=c;const h=i[u];h?h.push(a[0]):i[u]=[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,i={};Array.isArray(this.base.data)&&this.base.data.forEach(o=>{this.processAnimation(o,t,i,.1)});const s=Object.entries(i);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:i,modelId:s,rgba:o}=t;if(Array.isArray(i)&&i[0]){i[0][1]=o;const r=this.base.groupBatchIds[s];r?r.push(i[0]):this.base.groupBatchIds[s]=[i[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:i}=t,s=[];this.base.setTileSyltByConstructionProcessTracking({modelId:i,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 i=Object.entries(t);i.forEach(([s,o])=>{this.base.setTileSyltByConstructionProcessTracking({modelId:s,batchIds:o})}),i.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(i=>{const{batchIds:s,modelId:o,rgba:r}=i;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,i])=>{this.base.setTileSyltByConstructionProcessTracking({modelId:t,batchIds:i})}),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(i=>{const s=[];i.cpts.forEach(a=>{s.push({dbName:i.linkModelId,modelId:i.modelId,elementId:`${a}`,show:!0,rgba:t.rgba??{r:.4,g:.4,b:.4,a:.1}})});const o=Pa.process,r=Mg.color,{allElements:l}=this.base.groupByModelId(s);this.base.mapAnimations[i.modelId]=this.base.mapAnimations[i.modelId]||[],this.base.mapAnimations[i.modelId].push(t),Object.entries(l).forEach(([a,c])=>{const[u,h]=kg(a),f=this.base.getTileSyltByConstructionProcessTracking({elementIds:c,modelId:u,color:h,colorRank:o,show:!0,selectionRank:r}),p=t?.playTimeColor?.r??1,m=t?.playTimeColor?.g??1,y=t?.playTimeColor?.b??0,A=t?.playTimeColor?.a??.1,C=this.base.setColor({r:p,g:m,b:y,a:A}),E=this.base.setColor(t.rgba??{r:.4,g:.4,b:.4,a:.1});t.groupData.push({modelId:u,batchIds:f,playTimeColor:C,rgba:E})})})})}}class Og{base;constructor(e){this.base=e}attachTileset(e,t,i){const s=this.base.cesium;this.base.handler||(this.base.handler=new s.ScreenSpaceEventHandler(this.base.viewer.scene.canvas));const o=Sn(e,i);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(t=>{let i;try{i=this.base.viewer.scene.pick(t.position)}catch{}if(e.defined(i)&&i instanceof e.Cesium3DTileFeature){this.base.clearSelection();const s=Sn(i.tileset);if(!s||!this.base.tilesetMap[s])return;const o=this.base.getFeatureId(i);if(o==="-1")return;let r;const l=this.base.viewer.scene.pickPosition(t.position);if(e.defined(l)){const u=e.Cartographic.fromCartesian(l),h=e.Math.toDegrees(u.longitude),f=e.Math.toDegrees(u.latitude),p=u.height;r=[h,f,p]}const c=(this.base.hasSelectedFeaturesMap[s]||[]).filter(u=>u.rank!==0);this.base.hasSelectedFeaturesMap[s]=[...c,{batchId:o,selectedColor:this.base.selectedColor,rank:0,point:r}],this.base.setBaseStyle(s),this.base.triggerSelectionChange(),i.tileset.leiting?.selectedFn&&i.tileset.leiting.selectedFn(i.tileset)}else this.base.clearSelection()},e.ScreenSpaceEventType.LEFT_CLICK),this.base.handler.setInputAction(t=>{let i;try{i=this.base.viewer.scene.pick(t.position)}catch{}if(e.defined(i)&&i instanceof e.Cesium3DTileFeature){const s=Sn(i.tileset);if(!s||!this.base.tilesetMap[s])return;const o=this.base.getFeatureId(i);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),c=e.Math.toDegrees(a.longitude),u=e.Math.toDegrees(a.latitude),h=a.height;r=[c,u,h]}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 i=this.base.viewer?.scene?.screenSpaceCameraController;i&&this.base.cameraControllerState===null&&(this.base.cameraControllerState={enableRotate:i.enableRotate,enableTilt:i.enableTilt,enableLook:i.enableLook},i.enableRotate=!1,i.enableTilt=!1,i.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 i=performance.now();if(i-this.base.lastDrawTime<20)return;this.base.lastDrawTime=i,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(()=>{if(!this.base.selectStart||!this.base.selectionDiv)return;if(!this.base.selectStart||!this.base.selectEnd){this.base.selectionDiv.style.display="none";const i=this.base.viewer?.scene?.screenSpaceCameraController;i&&this.base.cameraControllerState!==null&&(i.enableRotate=this.base.cameraControllerState.enableRotate,i.enableTilt=this.base.cameraControllerState.enableTilt,i.enableLook=this.base.cameraControllerState.enableLook,this.base.cameraControllerState=null);return}this.base.selectionDiv.style.display="none",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 Lg{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=[];constructor(e){this.cesium=e.cesium,this.viewer=e.viewer,this.animationModule=new Rg(this),this.selectionModule=new Og(this)}attachTileset(e,t,i){this.selectionModule.attachTileset(e,t,i)}selectionChange(e){e&&typeof e=="function"&&this.onSelectionChangeCallbacks.push(e)}removeSelectionChange(e){this.onSelectionChangeCallbacks=this.onSelectionChangeCallbacks.filter(t=>t!==e)}triggerSelectionChange(){if(this.onSelectionChangeCallbacks.length>0){const e=this.getSelected({rank:0});this.onSelectionChangeCallbacks.forEach(t=>{try{t(e)}catch(i){console.error("Selection callback error:",i)}})}}enableSelection(){this.selectionModule.bindInputs()}disableSelection(){this.selectionModule.unbindInputs()}clearSelection(e){this.getTargetModelIds(e).forEach(i=>{const s=this.hasSelectedFeaturesMap[i];if(!s?.length)return;const o=s.filter(r=>r.rank!==0);o.length?(this.hasSelectedFeaturesMap[i]=o,this.setBaseStyle(i)):(delete this.hasSelectedFeaturesMap[i],this.applyShowStyleOnly(i))}),this.viewer.scene.requestRender(),this.triggerSelectionChange()}clearExist(e){this.getTargetModelIds(e).forEach(i=>{const s=this.hasSelectedFeaturesMap[i];if(!s?.length)return;const o=s.filter(r=>r.rank!==1);o.length?(this.hasSelectedFeaturesMap[i]=o,this.setBaseStyle(i)):(delete this.hasSelectedFeaturesMap[i],this.applyShowStyleOnly(i))}),this.viewer.scene.requestRender()}clearProcess(e){this.getTargetModelIds(e).forEach(i=>{const s=this.hasSelectedFeaturesMap[i];if(!s?.length)return;const o=s.filter(r=>r.rank!==2);o.length?(this.hasSelectedFeaturesMap[i]=o,this.setBaseStyle(i)):(delete this.hasSelectedFeaturesMap[i],this.applyShowStyleOnly(i))}),this.viewer.scene.requestRender()}clearAllHaveSelected(){this.getTargetModelIds().forEach(t=>{this.hasSelectedFeaturesMap[t]&&(delete this.hasSelectedFeaturesMap[t],this.applyShowStyleOnly(t))}),this.viewer.scene.requestRender(),this.triggerSelectionChange()}getSelected(e){const t=e&&typeof e=="object"&&"rank"in e?e.rank:e,i=Fa(t),s=[];return Object.keys(this.hasSelectedFeaturesMap).forEach(o=>{(this.hasSelectedFeaturesMap[o]||[]).forEach(l=>{if(l.rank!==i)return;const a=Tg(l.selectedColor);let c=this.getElementId(l.batchId,o);c===null&&(c=l.batchId),s.push({elementId:c,modelId:o,rgba:a||void 0,point:l?.point||void 0})})}),s}setAllConstructionProgressTracking(e){this.animationModule.setAllConstructionProgressTracking(e)}initTime(){this.animationModule.initTime()}processAnimation(e,t,i,s=null){this.animationModule.processAnimation(e,t,i,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 i=this.tilesetMap[e];if(!i)return;const s=i?.style?.show?.conditionsExpression?.conditions;Array.isArray(t)&&t.length?s?i.style=new this.cesium.Cesium3DTileStyle({show:{conditions:s},color:{conditions:t}}):i.style=new this.cesium.Cesium3DTileStyle({color:{conditions:t}}):this.applyShowStyleOnly(e),this.viewer.scene.requestRender()}resumeFlyTo(){this.viewer.clock.shouldAnimate=!0}flyToObjects({selectCpts:e,options:t}){if(!Array.isArray(e)||e.length===0)return;this.clearSelection(),this.setSelectColorUserModelCpt(e,{rank:0});const i=this.cesium,s=t?.scale??1,o=[];if(e.forEach(r=>{const l=r?.modelId,a=r?.elementId;if(l==null)return;const c=this.tilesetMap[`${l}`];if(!c)return;const h=Pg(c,a)||Fg(c);if(!h)return;const f=new i.Cartesian3(h.min.x,h.min.y,h.min.z),p=new i.Cartesian3(h.max.x,h.max.y,h.max.z),m=c?.root?.computedTransform??c?.modelMatrix;if(m){const y=i.Matrix4.multiplyByPoint(m,f,new i.Cartesian3),A=i.Matrix4.multiplyByPoint(m,p,new i.Cartesian3);o.push(y,A)}else o.push(f,p)}),o.length){const r=i.BoundingSphere.fromPoints(o);r.radius=r.radius*s;const l=this.viewer.scene.camera,a=new i.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(i=>{this.setColorStyle(i)})}setColorStyle(e){this.updateTilesetStyle(e)}buildColorConditions(e){const t=this.tilesetMap[e],i=this.hasSelectedFeaturesMap[e];if(!t||!i?.length)return;const s=new Map;i.forEach(a=>{const c=s.get(a.batchId);(!c||a.rank>=c.rank)&&s.set(a.batchId,a)});const o=new Map;if(s.forEach(({batchId:a,selectedColor:c})=>{o.has(c)||o.set(c,new Set),o.get(c)?.add(a)}),this.colorRankColor.length){const a=new Set;this.colorRankColor.forEach(c=>{const u=o.get(c);u&&u.forEach(h=>a.add(h))}),o.forEach((c,u)=>{if(this.colorRankColor.includes(u))return;const h=new Set;c.forEach(f=>{a.has(f)||h.add(f)}),o.set(u,h)})}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 c=o.get(a);if(!c||!c.size)return;const u=Array.from(c).join("|");u&&l.push([`(regExp('^(${u})$').test(\${id}))`,a])}),l.length?l:void 0}updateTilesetStyle(e){const t=this.tilesetMap[e];if(!t)return;const i=this.showStateMap[e],s=i?this.buildShowConditions(i.batchIds,i.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(i=>{const s=this.showStateMap[i]||{batchIds:[],mode:"include"};this.showStateMap[i]={batchIds:e?.batchIds??s.batchIds,mode:e?.mode??s.mode},this.updateTilesetStyle(i)})}setColor(e){if(!e)return this.selectedColor;if(typeof e=="string")return e;const t=Jt(Number(e.r)),i=Jt(Number(e.g)),s=Jt(Number(e.b)),o=Ra(e.a===void 0?1:Number(e.a));return Ls({r:t,g:i,b:s,a:o})||this.selectedColor}groupByModelId(e){const t={};return e.forEach(i=>{const s=i?.modelId,o=i?.elementId;if(s==null||o===void 0||o===null)return;const r=i?.color??i?.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 i=`${t}`,s=`${e}`;if(this.eidToBatchIdMap[i]){const a=this.eidToBatchIdMap[i].get(s);if(a!==void 0)return a}const r=this.tilesetMap[i]?.leiting?.node?.batchIdEIDInfos;if(r&&Array.isArray(r)){const a=new Map;r.forEach(u=>{a.set(`${u.elementID}`,`${u.batchId}`)}),this.eidToBatchIdMap[i]=a;const c=a.get(s);if(c!==void 0)return c}const l=Dg(e);return l!=null?String(l):null}getElementId(e,t){if(this.batchIdToElementIdMap[t]){const o=this.batchIdToElementIdMap[t].get(e);if(o!==void 0)return o}const s=this.tilesetMap[t]?.leiting?.node?.batchIdEIDInfos;if(s&&Array.isArray(s)){const o=new Map;s.forEach(l=>{l&&l.elementID&&o.set(`${l.batchId}`,`${l.elementID}`)}),this.batchIdToElementIdMap[t]=o;const r=o.get(e);if(r!==void 0)return r}return null}setComponentVisibility(e){if(!Array.isArray(e))return;const t=new Set;e.forEach(i=>{const s=`${i.modelId}`,o=this.getBatchId(i.elementId,s);if(o===null)return;t.add(s);const r=this.showStateMap[s]||{batchIds:[],mode:"exclude"},l=new Set(r.batchIds);r.mode==="exclude"?i.show?l.delete(o):l.add(o):i.show?l.add(o):l.delete(o),r.batchIds=Array.from(l),this.showStateMap[s]=r}),t.forEach(i=>this.updateTilesetStyle(i))}setAllComponentsVisibility(e){this.getTargetModelIds().forEach(i=>{e?this.setShowStyle({modelId:i,batchIds:[],mode:"exclude"}):this.setShowStyle({modelId:i,batchIds:[],mode:"include"})})}getComponentsByVisibility(e){const t=[];return Object.keys(this.showStateMap).forEach(i=>{const s=this.showStateMap[i],o=this.tilesetMap[i];if(!o?.leiting?.node?.batchIdEIDInfos)return;const r=o.leiting.node.batchIdEIDInfos,l=new Set(s?.batchIds??[]);r.forEach(a=>{const c=l.has(`${a.batchId}`);(s?.mode==="include"?c:!c)===e&&t.push({elementId:`${a.elementID}`,modelId:i})})}),t}getTileSyltByConstructionProcessTracking({elementIds:e,modelId:t,color:i,colorRank:s,show:o,selectionRank:r}){const l=this.tilesetMap[t];if(!Array.isArray(e))return[];const a=l.leiting.node,c=new Set(e),u=a.batchIdEIDInfos.filter(f=>c.has(`${f.elementID}`)).map(f=>String(f.batchId));return u.length?(s===Pa.normal&&!this.colorRankColor.includes(i)&&(this.colorRankColor=[i]),[[`(regExp('^(${u.join("|")})$').test(\${id}))`,i]]):[]}setSelectColorUserModelCpt(e,t){if(!Array.isArray(e))return;const i=new Map,s=t?.rank===void 0?"exist":t?.rank,o=Fa(s);e.forEach(r=>{const l=r?.modelId;if(l==null)return;const a=`${l}`,c=Array.isArray(r?.elementIds)?r.elementIds:r?.elementId?[r.elementId]:[];if(!c.length)return;const u=Ls(r?.rgba)||this.selectedColor;c.forEach(h=>{const f=this.getBatchId(h,a);f!==null&&(i.has(a)||i.set(a,[]),i.get(a)?.push({batchId:f,selectedColor:u,rank:o}))})}),i.forEach((r,l)=>{const a=this.mergeSelections(l,r);this.hasSelectedFeaturesMap[l]=a,this.setBaseStyle(l)}),this.triggerSelectionChange()}setAllSelectColorUserModelCpt({modelId:e,rgba:t}){if(!e)return;const i=String(e),s=this.tilesetMap[i];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&&this.setSelectColorUserModelCpt([{modelId:i,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 i=e.join("|");return i?t==="include"?[[`(regExp('^(${i})$').test(\${id}))`,"true"],["true","false"]]:[[`(regExp('^(${i})$').test(\${id}))`,"false"],["true","true"]]:t==="include"?[["true","false"]]:void 0}applyShowStyleOnly(e){const t=this.tilesetMap[e];if(!t)return;const i=this.showStateMap[e],s=i?this.buildShowConditions(i.batchIds,i.mode):void 0;s?t.style=new this.cesium.Cesium3DTileStyle({show:{conditions:s}}):t.style=void 0}setSelectedColorRgba(e,t,i,s=1){const o=Jt(e),r=Jt(t),l=Jt(i),a=Ra(s),c=Ls({r:o,g:r,b:l,a});c&&(this.selectedColor=c)}mergeSelections(e,t){const i=new Map;return(this.hasSelectedFeaturesMap[e]||[]).forEach(o=>i.set(o.batchId,o)),t.forEach(o=>{const r=i.get(o.batchId);(!r||o.rank>r.rank||o.rank===r.rank)&&i.set(o.batchId,o)}),Array.from(i.values())}toggleMultiSelect(e,t,i,s){const o=this.hasSelectedFeaturesMap[e]||[],r=o.filter(h=>h.rank!==0),l=o.filter(h=>h.rank===0),c=l.some(h=>h.batchId===t)?l.filter(h=>h.batchId!==t):[...l,{batchId:t,selectedColor:i,rank:0,point:s}],u=[...r,...c];u.length?(this.hasSelectedFeaturesMap[e]=u,this.setBaseStyle(e)):(delete this.hasSelectedFeaturesMap[e],this.applyShowStyleOnly(e)),this.triggerSelectionChange()}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)}selectTilesInRectangle(e,t,i){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,c=l-r;if(Math.abs(a)<15||Math.abs(c)<15)return;const u=s+a/2,h=r+c/2,f=new this.cesium.Cartesian2(u,h),p=this.viewer.scene.drillPick(f,void 0,a,c);if(!Array.isArray(p))return;const m=new Map;p.forEach(y=>{if(!(y instanceof this.cesium.Cesium3DTileFeature))return;const A=Sn(y.tileset);if(!A||!this.tilesetMap[A])return;const C=this.getFeatureId(y);C!=="-1"&&(m.has(A)||m.set(A,new Set),m.get(A)?.add(C))}),m.forEach((y,A)=>{const C=this.hasSelectedFeaturesMap[A]||[],E=C.filter(B=>B.rank!==0),x=new Set(C.filter(B=>B.rank===0).map(B=>B.batchId)),M=[];y.forEach(B=>{x.has(B)||M.push({batchId:B,selectedColor:i,rank:0})});const T=C.filter(B=>B.rank===0);this.hasSelectedFeaturesMap[A]=[...E,...T,...M],this.setBaseStyle(A)}),this.triggerSelectionChange()}}class Ng{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,i=this.tilesetMap[e];if(!i||!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(i.root.transform,new t.Matrix4);s.modelMatrix=t.Matrix4.multiply(o,this.boxMatrix,new t.Matrix4),i.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 i=["left","right","behind","front","top","down"];for(const s of i){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),c=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,c):new e.Cartesian2(l,c)},!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,i=(this.targetYPlus-this.targetYMinus)/2,s=(this.targetZPlus-this.targetZMinus)/2;switch(e){case"left":return new this.cesium.Cartesian3(-this.targetXMinus,i,s);case"right":return new this.cesium.Cartesian3(this.targetXPlus,i,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,i,this.targetZPlus);case"down":return new this.cesium.Cartesian3(t,i,-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,i=this.getNormalByType(e),s=t.Cartesian3.negate(i,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,i=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=i.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=i.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),i.screenSpaceCameraController.enableInputs=!1;const r=i.camera.getPickRay(s.position),l=this.boxInverseMatrix,a=e.Matrix4.multiplyByPoint(l,r.origin,new e.Cartesian3),c=e.Matrix4.multiplyByPointAsVector(l,r.direction,new e.Cartesian3);e.Cartesian3.normalize(c,c);const u=new e.Ray(a,c),h=this.getPlaneByType(this.currentPlaneType);this.dragStartPoint=e.IntersectionTests.rayPlane(u,h,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=i.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 c=new e.Ray(l,a);let u=new e.Cartesian3;this.currentPlaneType==="top"||this.currentPlaneType==="down"?u=Math.abs(a.x)>Math.abs(a.y)?e.Cartesian3.UNIT_X:e.Cartesian3.UNIT_Y:this.currentPlaneType==="left"||this.currentPlaneType==="right"?u=Math.abs(a.y)>Math.abs(a.z)?e.Cartesian3.UNIT_Y:e.Cartesian3.UNIT_Z:u=Math.abs(a.x)>Math.abs(a.z)?e.Cartesian3.UNIT_X:e.Cartesian3.UNIT_Z;const h=-e.Cartesian3.dot(this.dragStartPoint,u),f=new e.Plane(u,h);let p=e.IntersectionTests.rayPlane(c,f,new e.Cartesian3);if(!p){const y=u===e.Cartesian3.UNIT_X?e.Cartesian3.UNIT_Y:u===e.Cartesian3.UNIT_Y&&(this.currentPlaneType==="top"||this.currentPlaneType==="down")?e.Cartesian3.UNIT_X:e.Cartesian3.UNIT_Z,A=-e.Cartesian3.dot(this.dragStartPoint,y);p=e.IntersectionTests.rayPlane(c,new e.Plane(y,A),new e.Cartesian3)}if(!p)return;const m=.01;switch(this.currentPlaneType){case"left":this.targetXMinus=Math.max(-this.targetXPlus+m,-p.x);break;case"right":this.targetXPlus=Math.max(-this.targetXMinus+m,p.x);break;case"behind":this.targetYMinus=Math.max(-this.targetYPlus+m,-p.y);break;case"front":this.targetYPlus=Math.max(-this.targetYMinus+m,p.y);break;case"top":this.targetZPlus=Math.max(-this.targetZMinus+m,p.z);break;case"down":this.targetZMinus=Math.max(-this.targetZPlus+m,-p.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),i.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],i=this.tilesetMap[e];if(t&&i&&!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(i.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(h=>{const f=this.tilesetMap[h];f&&f.boundingSphere&&t.push(f.boundingSphere.center)}),t.length===0)return;const i=new e.Cartesian3;t.forEach(h=>e.Cartesian3.add(i,h,i)),this.boxCenter=e.Cartesian3.divideByScalar(i,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,c=-1/0;this.activeModelIds.forEach(h=>{const f=this.tilesetMap[h];if(!f)return;const p=[],m=f.leiting?.box,y=f.root?.boundingVolume?.boundingVolume;if(m&&m.min&&m.max){const{min:A,max:C}=m,E=[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)],x=f.root.transform;E.forEach(M=>{p.push(e.Matrix4.multiplyByPoint(x,M,new e.Cartesian3))})}else if(y&&y.halfAxes){const A=y.center,C=y.halfAxes,E=e.Matrix3.getColumn(C,0,new e.Cartesian3),x=e.Matrix3.getColumn(C,1,new e.Cartesian3),M=e.Matrix3.getColumn(C,2,new e.Cartesian3);for(let T=0;T<8;T++){const B=e.Cartesian3.clone(A,new e.Cartesian3);e.Cartesian3.add(B,e.Cartesian3.multiplyByScalar(E,T&1?1:-1,new e.Cartesian3),B),e.Cartesian3.add(B,e.Cartesian3.multiplyByScalar(x,T&2?1:-1,new e.Cartesian3),B),e.Cartesian3.add(B,e.Cartesian3.multiplyByScalar(M,T&4?1:-1,new e.Cartesian3),B),p.push(B)}}else if(f.boundingSphere){const A=f.boundingSphere,C=A.center,E=A.radius,x=e.Matrix4.multiplyByPoint(this.boxInverseMatrix,C,new e.Cartesian3);s=Math.min(s,x.x-E),o=Math.max(o,x.x+E),r=Math.min(r,x.y-E),l=Math.max(l,x.y+E),a=Math.min(a,x.z-E),c=Math.max(c,x.z+E)}p.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),c=Math.max(c,C.z)})});const u=1.01;this.targetXMinus=Math.abs(s)*u,this.targetXPlus=Math.abs(o)*u,this.targetYMinus=Math.abs(r)*u,this.targetYPlus=Math.abs(l)*u,this.targetZMinus=Math.abs(a)*u,this.targetZPlus=Math.abs(c)*u,this.activeModelIds.forEach(h=>{this.setupClippingPlanes(h)}),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 i=this.tilesetMap[t];i&&(i.clippingPlanes&&(i.clippingPlanes.enabled=!1),i.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 Us=performance.now();const Ug=10;class _g{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:i,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"),i&&(this.modelInfo=Object.assign(this.modelInfo,i)),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 i=this.viewer.scene;let s;try{s=i.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,i=new this.cesium.Cartesian2(e.canvas.clientWidth/2,e.canvas.clientHeight/2);let s;try{s=e.pickPosition(i)}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}),i=()=>{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?i():t.readyEvent.addEventListener(i),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;Us=performance.now();const i=(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"||(i(o,!0),this.resumeAnimationFn&&this.resumeAnimationFn())},this._keyupHandler=o=>{o.target.tagName==="INPUT"||o.target.tagName==="TEXTAREA"||(i(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,c=r-this.lastScreenX;Math.abs(a)<Math.abs(c)&&(c>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 u=this.viewer.camera;this.cameralHpRoll.pitch=u.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-Us<Ug)return;Us=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=(u,h)=>new this.cesium.Ray(u,h),c=new this.cesium.Cartesian3;if(this.cesium.Matrix4.getColumn(this.model.modelMatrix,0,c),this.cesium.Cartesian3.normalize(c,c),Math.abs(o)!=2&&this.collisionTest){const u=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),h=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,l),u),f=a(h,c),p=this.viewer.scene.pickFromRay(f,[this.model],1);if(p&&p.position&&this.cesium.Cartesian3.distance(h,p.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 u=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),h=.5,f=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,h),u),p=new this.cesium.Cartesian3;this.cesium.Cartesian3.subtract(this.position,f,p),this.cesium.Cartesian3.normalize(p,p);const m=a(f,p),y=this.viewer.scene.pickFromRay(m,[this.model],1),A=l,C=this.cesium.Cartesian3.add(f,this.cesium.Cartesian3.multiplyByScalar(c,A,new this.cesium.Cartesian3),new this.cesium.Cartesian3);if(t.defined(y)){const E=t.Cartesian3.distance(f,y.position);E-h>.2&&(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,-.2),this.position)),E-h<-.1&&E<2&&(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,.2),this.position))}if(!y&&this.gravityTestByMove){const E=a(this.position,p),x=this.viewer.scene.pickFromRay(E,[this.model],1);if(x){const M=this.cesium.Cartesian3.distance(this.position,x.position);Math.abs(M-1)>.05&&M<2&&(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,-.2),this.position))}}if(y&&this.gravityTestByMove&&this.gravityTest){const E=this.cesium.Cartesian3.distance(C,y.position);Math.abs(E-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-E)/Math.abs(l-E)*.05),this.position))}}if(this.transparentTest){const u=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),h=1.75,f=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,h),u),p=this.viewer.camera.positionWC,m=f,y=t.Cartesian3.subtract(m,p,new t.Cartesian3),A=t.Cartesian3.distance(f,p),C=t.Cartesian3.normalize(y,new t.Cartesian3),E=new t.Ray(p,C);let x;try{x=this.viewer.scene.pickFromRay(E,void 0,1)}catch{}t.defined(x)&&x.primitive!==this.model&&x.position&&t.Cartesian3.distance(p,x.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,i=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,t),e);this.viewer.camera.viewBoundingSphere(new this.cesium.BoundingSphere(i,this.wheelCount),this.cameralHpRoll)}_keydownHandler;_keyupHandler;_tickHandler;_uiEventListeners=[];bindUiKeys(e){this.unbindUiKeys(),Object.entries(e).forEach(([t,i])=>{if(!i)return;const s=()=>this.setMoveState(t,!0),o=()=>this.setMoveState(t,!1);i.addEventListener("mousedown",s),i.addEventListener("mouseup",o),i.addEventListener("mouseleave",o),i.addEventListener("touchstart",r=>{r.preventDefault(),s()}),i.addEventListener("touchend",r=>{r.preventDefault(),o()}),this._uiEventListeners.push(()=>{i.removeEventListener("mousedown",s),i.removeEventListener("mouseup",o),i.removeEventListener("mouseleave",o),i.removeEventListener("touchstart",s),i.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}setParams({gravityTest:e,collisionTest:t,transparentTest:i}){e!==void 0&&(this.gravityTest=e),t!==void 0&&(this.collisionTest=t),i!==void 0&&(this.transparentTest=i)}setMoveState(e,t){this.moveState.hasOwnProperty(e)&&(this.moveState[e]=t,t?this.resumeAnimationFn&&this.resumeAnimationFn():Object.keys(this.moveState).every(i=>this.moveState[i]==!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 Qg{cesium;viewer;baseCesium;baseTiles;baseCompt;baseSection;basePlayer;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer,this.baseCesium=new cd(e),this.baseTiles=new ka(e),this.baseCompt=new Lg(e),this.baseSection=new Ng(e),this.basePlayer=new _g({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 Hg{cesium;viewer;mapLayers={};renderGen={};renderGenAll=0;renderGenByModel={};modelId="default";options={flyTo:!0};dxfModelsList=[];open=!1;events=new pi;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,i=this.dxfModelsList.find(s=>s.modelId===t);i&&this.flyToBounds(i)}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(i=>i.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 i=this.dxfModelsList.find(s=>s.modelId===e);i&&(i.show=t)}showJsonByLayer({modelId:e,show:t,layers:i}){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(i)&&i.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 c=0;c<a;c++)s.hiddenBatchIds.has(c)?l.getFeature(c).show=!1:l.getFeature(c).show=!0}))}flyToBounds(e,t){const i=this.cesium,s=e.boundingSphere?.radius||1e3,o={offset:new i.HeadingPitchRange(0,i.Math.toRadians(-90),s*.5),...t},r=o.duration??0;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 i=await t.blob(),s=new wa(new Ms(i),{password:"abc!?123",useWebWorkers:!1}),r=(await s.getEntries()).find(c=>!c.directory&&c.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 i=this.renderGenAll;if(e?.length){for(const s of e){if(this.renderGenAll!==i)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`,c=await this.loadModelFile(a);if(this.renderGenAll!==i||(this.renderGenByModel[s.modelId]||0)!==o)return;const u=await this.cesium.Cesium3DTileset.fromUrl(r);if(u.maximumScreenSpaceError=0,this.renderGenAll!==i||(this.renderGenByModel[s.modelId]||0)!==o)return;if(Object.assign(u,{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:c}),s.formData?u.formData=s.formData:u.formData={modelId:u.modelId,longitude:u.deltaLongitude,latitude:u.deltaLatitude,distance:1e-6,rotation:0,totalRotation:u.totalRotation,heightDistance:1,height:0,lonlat:1e-6,modelOptions:[{value:u.modelId,label:u.modelName}],selectPoint:{longitude:0,latitude:0,height:0},selectedMode:!1,X:0,Y:0,Z:0},this.adjustingModelByCad({...u.formData,tileset:u}),Array.isArray(c)){const h=c;u.layerMap={};let f=this.mapLayers[s.modelId];f||(f={},this.mapLayers[s.modelId]=f),h.forEach(p=>{u.layerMap[p.layerName]=p.batchId,f[p.layerName]||(f[p.layerName]=[]),f[p.layerName].push({batchId:p.batchId,color:p.layerColor})})}if(this.dxfModelsList.push(u),this.setModelId(s.modelId),this.viewer.scene.primitives.add(u),this.renderGenAll!==i||(this.renderGenByModel[s.modelId]||0)!==o)return;l.flyTo&&this.flyToBounds(u),l.onSuccess&&l.onSuccess(u)}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,i=t.Quaternion.fromAxisAngle(t.Cartesian3.UNIT_Z,t.Math.toRadians(e.totalRotation)),s=t.Matrix4.fromRotationTranslation(t.Matrix3.fromQuaternion(i),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(i=>{i.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(i=>i.modelId===e);if(t>-1){const i=this.dxfModelsList[t];this.viewer.scene.primitives.remove(i),i.destroy&&!i.isDestroyed()&&i.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 mt{constructor(e,t){if(this.viewer=e,!this.viewer)return;this.type="prompt",t=t||{};const i=t.type==null?1:t.type;let s={id:new Date().getTime()+""+Math.floor(Math.random()*1e4),type:i,anchor:i==2,closeBtn:i==2,offset:i==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,c=this.opt.style.color;this.opt.anchor&&(r+=`
|
|
81
|
+
`;fi=document.createElement("style"),fi.textContent=n,document.head.appendChild(fi)}function Ig(){if(Da)return;xg(),Me=document.createElement("div"),Me.className="tech-alert-wrapper",document.body.appendChild(Me);const n={setup(){return()=>Ce.visible?d.h(Ae.Alert,{class:`tech-alert tech-alert-${Ce.type}`,message:Ce.title,description:Ce.description,showIcon:Ce.showIcon,closable:Ce.closable,onClose:()=>{Ce.visible=!1}},{icon:()=>Ce.type==="loading"?d.h(fn.LoadingOutlined):Ce.type==="success"?d.h(fn.CheckCircleOutlined):Ce.type==="error"?d.h(fn.CloseCircleOutlined):Ce.type==="warning"?d.h(fn.ExclamationCircleOutlined):d.h(fn.InfoCircleOutlined)}):null}};Ta=d.createVNode(n),d.render(Ta,Me),Da=!0}function In(n){Ig(),Os&&clearTimeout(Os),Ce.type=n.type||"info",Ce.title=n.title||"",Ce.description=n.description||"",Ce.closable=n.closable??!1,Ce.showIcon=n.showIcon??!0,Ce.visible=!0,Me&&(n.container?(Me.parentNode!==n.container&&n.container.appendChild(Me),Me.style.position="absolute",Me.style.top="20px",Me.style.left="50%",Me.style.transform="translateX(-50%)"):(Me.parentNode!==document.body&&document.body.appendChild(Me),Me.style.position="fixed",Me.style.top="20px",Me.style.left="50%",Me.style.transform="translateX(-50%)"));const e=n.duration??(Ce.type==="loading"?0:3);e>0&&(Os=setTimeout(()=>{Ce.visible=!1},e*1e3))}const fe={info:(n,e,t,i)=>In({type:"info",title:n,description:e,duration:t,container:i}),success:(n,e,t,i)=>In({type:"success",title:n,description:e,duration:t,container:i}),error:(n,e,t,i)=>In({type:"error",title:n,description:e,duration:t,container:i}),warning:(n,e,t,i)=>In({type:"warning",title:n,description:e,duration:t,container:i}),loading:(n,e,t)=>In({type:"loading",title:n,description:e,duration:0,container:t}),close:()=>{Ce.visible=!1}},Bg="E84#E3C4!8C4&A1";async function Bn(n){try{const e=await fetch(n);if(!e.ok)return fe.error("[loadModelFile] 加载失败",`${n} ${e.status}`),!1;const t=await e.blob();try{const i=new wa(new Ms(t),{password:Bg}),o=(await i.getEntries()).find(l=>!l.directory&&l.filename.endsWith(".json"));if(!o)return await i.close(),!1;const r=await o.getData(new Sp);return await i.close(),JSON.parse(r.trim())}catch{const i=await t.text();try{return JSON.parse(i.trim())}catch(s){throw console.error(`[loadModelFile] JSON parse error: ${n}`,s),s}}}catch(e){return fe.error("[loadModelFile] 加载失败",`${n} ${e}`),!1}}function Sg(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const e=Math.random()*16|0;return(n==="x"?e:e&3|8).toString(16)})}class pi{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(i=>i(...t))}off(e,t){this.events[e]&&(this.events[e]=this.events[e].filter(i=>i!==t))}}class ka{cesium;viewer;modelList=[];hasLoaded3dTiles={};mapRecordModelId={};mapTileset={};BIMmodelId="";events=new pi;options={flyTo:!0,flyToDuration:0,loadTreeNodeDetails:!0,loadTreeNodeDetailsUrl:"/elementInfo.zip",loadTree:!0,loadTreeUrl:"/allElementsInfo.zip",boxRegionUrl:"/BoundingBoxInfo.zip",regionUrl:"/region.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 i=this.mapTileset[t];i&&(this.viewer.scene.primitives.remove(i),e.push(t)),delete this.mapTileset[t],delete this.hasLoaded3dTiles[t],delete this.mapRecordModelId[t]}),this.modelList=[],this.viewer.scene.requestRender(),this.events.emit("mountAll3Dtiles",{modelList:[],mapTileset:{}}),e}deleteModels(e){const t=[];return e.forEach(({modelId:i})=>{const s=this.mapTileset[i];s&&(this.viewer.scene.primitives.remove(s),t.push(i)),delete this.mapTileset[i],delete this.hasLoaded3dTiles[i],delete this.mapRecordModelId[i]}),this.modelList=this.modelList.filter(i=>!t.includes(i.modelId)),this.viewer.scene.requestRender(),this.events.emit("mountAll3Dtiles",{modelList:this.modelList,mapTileset:this.mapTileset}),t}showModels(e){const t=[];return e.forEach(i=>{const s=`${i.modelId}`,o=this.mapTileset[s];o&&(o.show=!!i.show,t.push(s))}),t.length&&this.viewer.scene.requestRender(),t}async addModels({files:e,fileNames:t,options:i}){const s=e||t||[];s.length>0&&await this.add3DTilesModel(s,i)}async add3DTilesModel(e,t){const i=t?Kh({},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:jt.NotLoaded}),this.mapRecordModelId[o]=!1}await this.load3DTilesModel(i)}}async load3DTilesModel(e){const t=this.modelList.filter(r=>r.state===jt.NotLoaded);if(!t.length)return;const i=t.length;this.events.emit("loadingStatus",`正在加载 ${i} 个模型`);let s=0,o=!1;for(const r of t){s++;try{r.state=jt.Loading;const l=r.url,a=this.getBaseUrlPath(l);e.loadTreeNodeDetails&&this.events.emit("loadingStatus",`正在加载第 ${s}/${i} 个模型: 加载${r.modelName}构件信息`);const c=e.loadTreeNodeDetails?await Bn(`${a}${e.loadTreeNodeDetailsUrl}`):!1;e.loadTree&&this.events.emit("loadingStatus",`正在加载第 ${s}/${i} 个模型: 加载${r.modelName}目录树`);const u=e.loadTree?await Bn(`${a}${e.loadTreeUrl}`):!1;this.events.emit("loadingStatus",`正在加载第 ${s}/${i} 个模型: 加载${r.modelName}模型数据`);const h=e.boxRegionUrl?await Bn(`${a}${e.boxRegionUrl}`):!1,f=await this.loadTilesetWithZipSupport(l,r.modelId,e.tilesetOptions||{},this.cesium);this.viewer.scene.primitives.add(f),await f.readyPromise;const p=`${f?.asset?.tilesetVersion??r.modelId}`;this.mapTileset[`${r.modelId}`]=f;const m={versionId:p,selectedFn:e.selectedFn,model:{modelId:r.modelId,modelName:r.modelName,dbName:r.dbName,fileType:r.fileType,outPutPath:r.outPutPath,url:r.url,formData:r.formData,type:"BIM"},node:c||null,tree:u||null,box:null};if(h?.min&&h?.max){const y={x:h.min.X,y:h.min.Y,z:h.min.Z},A={x:h.max.X,y:h.max.Y,z:h.max.Z},C={x:(y.x+A.x)/2,y:(y.y+A.y)/2,z:(y.z+A.z)/2};m.box={min:y,max:A,center:C}}if(!r.formData){const y=await Bn(`${r.outPutPath}${r.dbName}${e.regionUrl}`);if(y)r.formData={modelId:r.modelId.toString(),longitude:y.Longitude,latitude:y.Latitude,distance:1e-6,rotation:30,totalRotation:y.DAngle||0,height:y.MinHeight,lonlat:1e-5,heightDistance:1,modelOptions:[{value:r.modelId.toString(),label:r.modelName}],X:y?.X||0,Y:y?.Y||0,Z:y?.Z||0};else{const A=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:A+1,label:r.modelName}],X:0,Y:0,Z:0}}}r.formData&&(r.formData.heightDistance=r.formData.heightDistance??1,m.model.formData=r.formData),f.leiting=m,dr({Cesium:this.cesium,tileset:f}),r.state=jt.Loaded,this.mapRecordModelId[r.modelId]=!0,this.events.emit("tilesetLoaded",f),e.tilesLoad3dTiles&&e.tilesLoad3dTiles(f),!o&&e.flyTo&&(this.BIMmodelId=r.modelId,this.flyToTileset({modelId:this.BIMmodelId,options:{duration:e.flyToDuration??0}}),o=!0),e.delay&&await new Promise(y=>setTimeout(y,e.delay))}catch(l){console.error(`模型 ${r.modelName} 加载失败:`,l),this.events.emit("loadingStatus",`模型 ${r.modelName} 加载失败`),r.state=jt.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 i=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:c}=r,u=`${l}${a}/tileset.json`,h=await i.Cesium3DTileset.fromUrl(u,{maximumScreenSpaceError:16,preferLeaves:!0,cullWithChildrenBounds:!0,...t?.tilesetOptions});if(this.viewer.scene.primitives.add(h),await h.readyPromise,this.mapTileset[`${c}`]=h,this.hasLoaded3dTiles[`${c}`]=(this.hasLoaded3dTiles[`${c}`]||0)+1,this.mapRecordModelId[`${c}`]=!0,!r?.formData){const f=h.root.computedTransform;if(f){const p=i.Matrix4.fromColumnMajorArray(f),m=i.Matrix4.getTranslation(p,new i.Cartesian3),y=i.Ellipsoid.WGS84.cartesianToCartographic(m),A=i.Math.toDegrees(y.longitude),C=i.Math.toDegrees(y.latitude),E=y.height;r.formData={modelId:r.modelId.toString(),longitude:A,latitude:C,distance:1e-5,rotation:0,totalRotation:0,heightDistance:1,height:E,lonlat:1e-5,modelOptions:[{value:r.modelId.toString(),label:r.modelName}],X:0,Y:0,Z:0}}else console.warn(`OSGB模型 ${c} 无法获取初始位置信息`)}r.formData&&(r.formData.heightDistance=r.formData.heightDistance??1),h.leiting={versionId:`${h?.asset?.tilesetVersion??c}`,selectedFn:t?.selectedFn,model:{modelId:r.modelId,modelName:r.modelName,dbName:r.dbName,fileType:r.fileType,outPutPath:r.outPutPath,url:u,formData:r.formData,type:"OSGB"},box:null},this.modelList.push({...r,url:u,state:jt.Loaded}),!s&&t?.flyTo&&(this.viewer.zoomTo(h),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:i,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,c=i||0,u=s||0;const h=l.boundingSphere.center,f=r.Transforms.eastNorthUpToFixedFrame(h),p=new r.Cartesian3(a,c,u),m=r.Matrix4.multiplyByPoint(f,p,new r.Cartesian3(0,0,0)),y=r.Cartesian3.subtract(m,h,new r.Cartesian3);l.modelMatrix=r.Matrix4.fromTranslation(y)}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(c=>{c?o&&o():r&&r()}).catch(c=>{r&&r(),console.error("FlyTo error",c)})}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,i,s){const o=`${this.getBaseUrlPath(e)}/tileset.zip`;if((await fetch(o)).status===200){const a=await Bn(o);if(a){const c=new Blob([JSON.stringify(a)],{type:"application/json"}),u=URL.createObjectURL(c),h=s.Proxy,f=this.getBaseUrlPath(e);h.getURL=m=>m.includes("blob://")?m.replace(/blob:\/\//g,f):m;const p=new s.Resource({url:u,proxy:h});try{return await s.Cesium3DTileset.fromUrl(p,{id:t,...i})}catch{return await s.Cesium3DTileset.fromUrl(e,{url:e,id:t,...i})}}}return await s.Cesium3DTileset.fromUrl(e,{url:e,id:t,...i})}}const Pa={normal:0,process:2},Mg={color:1};function Fa(n){return n===1||n==="exist"?1:n===2||n==="process"?2:0}function Jt(n){return Number.isNaN(n)?0:n<=1?Math.min(Math.max(n,0),1):Math.min(Math.max(n/255,0),1)}function Ra(n){return Number.isNaN(n)?1:n<=1?Math.min(Math.max(n,0),1):1}function Ls(n){if(!n)return null;const e=Number(n.r),t=Number(n.g),i=Number(n.b),s=n.a===void 0?1:Number(n.a);if([e,t,i,s].some(a=>Number.isNaN(a)))return null;const o=Math.round(e*255),r=Math.round(t*255),l=Math.round(i*255);return`rgba(${o},${r},${l},${s})`}function Tg(n){if(!n||typeof n!="string")return null;const t=n.replace(/\s+/g,"").match(/^rgba?\((\d+),(\d+),(\d+)(?:,([0-9.]+))?\)$/i);if(!t)return null;const i=Number(t[1]),s=Number(t[2]),o=Number(t[3]),r=t[4]===void 0?1:Number(t[4]);return[i,s,o,r].some(l=>Number.isNaN(l))?null:{r:Math.min(Math.max(i/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 Dg(n){if(n==null)return null;const e=Number(n);return Number.isNaN(e)?null:e}function kg(n){const e=n.lastIndexOf("-"),t=n.substring(0,e),i=n.substring(e+1);return[t,i]}function Ns(n){if(!n)return null;const e=n.Min??n.min,t=n.Max??n.max;if(!e||!t)return null;const i=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[i,s,o,r,l,a].some(c=>Number.isNaN(c))?null:{min:{x:i,y:s,z:o},max:{x:r,y:l,z:a}}}function Sn(n,e){if(e)return`${e}`;const t=n?.leiting?.model?.modelId??n?.modelId??n?.id;return t==null?null:`${t}`}function Pg(n,e){if(e==null)return null;const t=n?.leiting?.node;if(!t)return null;const i=`${e}`,s=t?.[i],o=Ns(s?.box3??s?.box);if(o)return o;const r=t?.element?.[i]??t?.elements?.[i]??t?.nodeExtras?.element?.[i]??t?.nodeExtras?.elements?.[i];return Ns(r?.box3??r?.box)}function Fg(n){const e=n?.leiting?.box;return e?Ns({min:e.min,max:e.max}):null}class Rg{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,i,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:c,rgba:u}=l;if(Array.isArray(a)&&a[0]){a[0][1]=u;const h=i[c];h?h.push(a[0]):i[c]=[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:c,modelId:u}=l;if(Array.isArray(a)&&a[0]){a[0][1]=c;const h=i[u];h?h.push(a[0]):i[u]=[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,i={};Array.isArray(this.base.data)&&this.base.data.forEach(o=>{this.processAnimation(o,t,i,.1)});const s=Object.entries(i);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:i,modelId:s,rgba:o}=t;if(Array.isArray(i)&&i[0]){i[0][1]=o;const r=this.base.groupBatchIds[s];r?r.push(i[0]):this.base.groupBatchIds[s]=[i[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:i}=t,s=[];this.base.setTileSyltByConstructionProcessTracking({modelId:i,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 i=Object.entries(t);i.forEach(([s,o])=>{this.base.setTileSyltByConstructionProcessTracking({modelId:s,batchIds:o})}),i.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(i=>{const{batchIds:s,modelId:o,rgba:r}=i;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,i])=>{this.base.setTileSyltByConstructionProcessTracking({modelId:t,batchIds:i})}),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(i=>{const s=[];i.cpts.forEach(a=>{s.push({dbName:i.linkModelId,modelId:i.modelId,elementId:`${a}`,show:!0,rgba:t.rgba??{r:.4,g:.4,b:.4,a:.1}})});const o=Pa.process,r=Mg.color,{allElements:l}=this.base.groupByModelId(s);this.base.mapAnimations[i.modelId]=this.base.mapAnimations[i.modelId]||[],this.base.mapAnimations[i.modelId].push(t),Object.entries(l).forEach(([a,c])=>{const[u,h]=kg(a),f=this.base.getTileSyltByConstructionProcessTracking({elementIds:c,modelId:u,color:h,colorRank:o,show:!0,selectionRank:r}),p=t?.playTimeColor?.r??1,m=t?.playTimeColor?.g??1,y=t?.playTimeColor?.b??0,A=t?.playTimeColor?.a??.1,C=this.base.setColor({r:p,g:m,b:y,a:A}),E=this.base.setColor(t.rgba??{r:.4,g:.4,b:.4,a:.1});t.groupData.push({modelId:u,batchIds:f,playTimeColor:C,rgba:E})})})})}}class Og{base;constructor(e){this.base=e}attachTileset(e,t,i){const s=this.base.cesium;this.base.handler||(this.base.handler=new s.ScreenSpaceEventHandler(this.base.viewer.scene.canvas));const o=Sn(e,i);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(t=>{let i;try{i=this.base.viewer.scene.pick(t.position)}catch{}if(e.defined(i)&&i instanceof e.Cesium3DTileFeature){this.base.clearSelection();const s=Sn(i.tileset);if(!s||!this.base.tilesetMap[s])return;const o=this.base.getFeatureId(i);if(o==="-1")return;let r;const l=this.base.viewer.scene.pickPosition(t.position);if(e.defined(l)){const u=e.Cartographic.fromCartesian(l),h=e.Math.toDegrees(u.longitude),f=e.Math.toDegrees(u.latitude),p=u.height;r=[h,f,p]}const c=(this.base.hasSelectedFeaturesMap[s]||[]).filter(u=>u.rank!==0);this.base.hasSelectedFeaturesMap[s]=[...c,{batchId:o,selectedColor:this.base.selectedColor,rank:0,point:r}],this.base.setBaseStyle(s),this.base.triggerSelectionChange(),i.tileset.leiting?.selectedFn&&i.tileset.leiting.selectedFn(i.tileset)}else this.base.clearSelection()},e.ScreenSpaceEventType.LEFT_CLICK),this.base.handler.setInputAction(t=>{let i;try{i=this.base.viewer.scene.pick(t.position)}catch{}if(e.defined(i)&&i instanceof e.Cesium3DTileFeature){const s=Sn(i.tileset);if(!s||!this.base.tilesetMap[s])return;const o=this.base.getFeatureId(i);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),c=e.Math.toDegrees(a.longitude),u=e.Math.toDegrees(a.latitude),h=a.height;r=[c,u,h]}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 i=this.base.viewer?.scene?.screenSpaceCameraController;i&&this.base.cameraControllerState===null&&(this.base.cameraControllerState={enableRotate:i.enableRotate,enableTilt:i.enableTilt,enableLook:i.enableLook},i.enableRotate=!1,i.enableTilt=!1,i.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 i=performance.now();if(i-this.base.lastDrawTime<20)return;this.base.lastDrawTime=i,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(()=>{if(!this.base.selectStart||!this.base.selectionDiv)return;if(!this.base.selectStart||!this.base.selectEnd){this.base.selectionDiv.style.display="none";const i=this.base.viewer?.scene?.screenSpaceCameraController;i&&this.base.cameraControllerState!==null&&(i.enableRotate=this.base.cameraControllerState.enableRotate,i.enableTilt=this.base.cameraControllerState.enableTilt,i.enableLook=this.base.cameraControllerState.enableLook,this.base.cameraControllerState=null);return}this.base.selectionDiv.style.display="none",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 Lg{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=[];constructor(e){this.cesium=e.cesium,this.viewer=e.viewer,this.animationModule=new Rg(this),this.selectionModule=new Og(this)}attachTileset(e,t,i){this.selectionModule.attachTileset(e,t,i)}selectionChange(e){e&&typeof e=="function"&&this.onSelectionChangeCallbacks.push(e)}removeSelectionChange(e){this.onSelectionChangeCallbacks=this.onSelectionChangeCallbacks.filter(t=>t!==e)}triggerSelectionChange(){if(this.onSelectionChangeCallbacks.length>0){const e=this.getSelected({rank:0});this.onSelectionChangeCallbacks.forEach(t=>{try{t(e)}catch(i){console.error("Selection callback error:",i)}})}}enableSelection(){this.selectionModule.bindInputs()}disableSelection(){this.selectionModule.unbindInputs()}clearSelection(e){this.getTargetModelIds(e).forEach(i=>{const s=this.hasSelectedFeaturesMap[i];if(!s?.length)return;const o=s.filter(r=>r.rank!==0);o.length?(this.hasSelectedFeaturesMap[i]=o,this.setBaseStyle(i)):(delete this.hasSelectedFeaturesMap[i],this.applyShowStyleOnly(i))}),this.viewer.scene.requestRender(),this.triggerSelectionChange()}clearExist(e){this.getTargetModelIds(e).forEach(i=>{const s=this.hasSelectedFeaturesMap[i];if(!s?.length)return;const o=s.filter(r=>r.rank!==1);o.length?(this.hasSelectedFeaturesMap[i]=o,this.setBaseStyle(i)):(delete this.hasSelectedFeaturesMap[i],this.applyShowStyleOnly(i))}),this.viewer.scene.requestRender()}clearProcess(e){this.getTargetModelIds(e).forEach(i=>{const s=this.hasSelectedFeaturesMap[i];if(!s?.length)return;const o=s.filter(r=>r.rank!==2);o.length?(this.hasSelectedFeaturesMap[i]=o,this.setBaseStyle(i)):(delete this.hasSelectedFeaturesMap[i],this.applyShowStyleOnly(i))}),this.viewer.scene.requestRender()}clearAllHaveSelected(){this.getTargetModelIds().forEach(t=>{this.hasSelectedFeaturesMap[t]&&(delete this.hasSelectedFeaturesMap[t],this.applyShowStyleOnly(t))}),this.viewer.scene.requestRender(),this.triggerSelectionChange()}getSelected(e){const t=e&&typeof e=="object"&&"rank"in e?e.rank:e,i=Fa(t),s=[];return Object.keys(this.hasSelectedFeaturesMap).forEach(o=>{(this.hasSelectedFeaturesMap[o]||[]).forEach(l=>{if(l.rank!==i)return;const a=Tg(l.selectedColor);let c=this.getElementId(l.batchId,o);c===null&&(c=l.batchId),s.push({elementId:c,modelId:o,rgba:a||void 0,point:l?.point||void 0})})}),s}setAllConstructionProgressTracking(e){this.animationModule.setAllConstructionProgressTracking(e)}initTime(){this.animationModule.initTime()}processAnimation(e,t,i,s=null){this.animationModule.processAnimation(e,t,i,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 i=this.tilesetMap[e];if(!i)return;const s=i?.style?.show?.conditionsExpression?.conditions;Array.isArray(t)&&t.length?s?i.style=new this.cesium.Cesium3DTileStyle({show:{conditions:s},color:{conditions:t}}):i.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}flyToObjects({selectCpts:e,options:t}){if(!Array.isArray(e)||e.length===0)return;this.clearSelection(),this.setSelectColorUserModelCpt(e,{rank:0});const i=this.cesium,s=t?.scale??1,o=[];if(e.forEach(r=>{const l=r?.modelId,a=r?.elementId;if(l==null)return;const c=this.tilesetMap[`${l}`];if(!c)return;const h=Pg(c,a)||Fg(c);if(!h)return;const f=new i.Cartesian3(h.min.x,h.min.y,h.min.z),p=new i.Cartesian3(h.max.x,h.max.y,h.max.z),m=c?.root?.computedTransform??c?.modelMatrix;if(m){const y=i.Matrix4.multiplyByPoint(m,f,new i.Cartesian3),A=i.Matrix4.multiplyByPoint(m,p,new i.Cartesian3);o.push(y,A)}else o.push(f,p)}),o.length){const r=i.BoundingSphere.fromPoints(o);r.radius=r.radius*s;const l=this.viewer.scene.camera,a=new i.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(i=>{this.setColorStyle(i)})}setColorStyle(e){this.updateTilesetStyle(e)}buildColorConditions(e){const t=this.tilesetMap[e],i=this.hasSelectedFeaturesMap[e];if(!t||!i?.length)return;const s=new Map;i.forEach(a=>{const c=s.get(a.batchId);(!c||a.rank>=c.rank)&&s.set(a.batchId,a)});const o=new Map;if(s.forEach(({batchId:a,selectedColor:c})=>{o.has(c)||o.set(c,new Set),o.get(c)?.add(a)}),this.colorRankColor.length){const a=new Set;this.colorRankColor.forEach(c=>{const u=o.get(c);u&&u.forEach(h=>a.add(h))}),o.forEach((c,u)=>{if(this.colorRankColor.includes(u))return;const h=new Set;c.forEach(f=>{a.has(f)||h.add(f)}),o.set(u,h)})}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 c=o.get(a);if(!c||!c.size)return;const u=Array.from(c).join("|");u&&l.push([`(regExp('^(${u})$').test(\${id}))`,a])}),l.length?l:void 0}updateTilesetStyle(e){const t=this.tilesetMap[e];if(!t)return;const i=this.showStateMap[e],s=i?this.buildShowConditions(i.batchIds,i.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(i=>{const s=this.showStateMap[i]||{batchIds:[],mode:"include"};this.showStateMap[i]={batchIds:e?.batchIds??s.batchIds,mode:e?.mode??s.mode},this.updateTilesetStyle(i)})}setColor(e){if(!e)return this.selectedColor;if(typeof e=="string")return e;const t=Jt(Number(e.r)),i=Jt(Number(e.g)),s=Jt(Number(e.b)),o=Ra(e.a===void 0?1:Number(e.a));return Ls({r:t,g:i,b:s,a:o})||this.selectedColor}groupByModelId(e){const t={};return e.forEach(i=>{const s=i?.modelId,o=i?.elementId;if(s==null||o===void 0||o===null)return;const r=i?.color??i?.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 i=`${t}`,s=`${e}`;if(this.eidToBatchIdMap[i]){const a=this.eidToBatchIdMap[i].get(s);if(a!==void 0)return a}const r=this.tilesetMap[i]?.leiting?.node?.batchIdEIDInfos;if(r&&Array.isArray(r)){const a=new Map;r.forEach(u=>{a.set(`${u.elementID}`,`${u.batchId}`)}),this.eidToBatchIdMap[i]=a;const c=a.get(s);if(c!==void 0)return c}const l=Dg(e);return l!=null?String(l):null}getElementId(e,t){if(this.batchIdToElementIdMap[t]){const o=this.batchIdToElementIdMap[t].get(e);if(o!==void 0)return o}const s=this.tilesetMap[t]?.leiting?.node?.batchIdEIDInfos;if(s&&Array.isArray(s)){const o=new Map;s.forEach(l=>{l&&l.elementID&&o.set(`${l.batchId}`,`${l.elementID}`)}),this.batchIdToElementIdMap[t]=o;const r=o.get(e);if(r!==void 0)return r}return null}setComponentVisibility(e){if(!Array.isArray(e))return;const t=new Set;e.forEach(i=>{const s=`${i.modelId}`,o=this.getBatchId(i.elementId,s);if(o===null)return;t.add(s);const r=this.showStateMap[s]||{batchIds:[],mode:"exclude"},l=new Set(r.batchIds);r.mode==="exclude"?i.show?l.delete(o):l.add(o):i.show?l.add(o):l.delete(o),r.batchIds=Array.from(l),this.showStateMap[s]=r}),t.forEach(i=>this.updateTilesetStyle(i))}setAllComponentsVisibility(e){this.getTargetModelIds().forEach(i=>{e?this.setShowStyle({modelId:i,batchIds:[],mode:"exclude"}):this.setShowStyle({modelId:i,batchIds:[],mode:"include"})})}getComponentsByVisibility(e){const t=[];return Object.keys(this.showStateMap).forEach(i=>{const s=this.showStateMap[i],o=this.tilesetMap[i];if(!o?.leiting?.node?.batchIdEIDInfos)return;const r=o.leiting.node.batchIdEIDInfos,l=new Set(s?.batchIds??[]);r.forEach(a=>{const c=l.has(`${a.batchId}`);(s?.mode==="include"?c:!c)===e&&t.push({elementId:`${a.elementID}`,modelId:i})})}),t}getTileSyltByConstructionProcessTracking({elementIds:e,modelId:t,color:i,colorRank:s,show:o,selectionRank:r}){const l=this.tilesetMap[t];if(!Array.isArray(e))return[];const a=l.leiting.node,c=new Set(e),u=a.batchIdEIDInfos.filter(f=>c.has(`${f.elementID}`)).map(f=>String(f.batchId));return u.length?(s===Pa.normal&&!this.colorRankColor.includes(i)&&(this.colorRankColor=[i]),[[`(regExp('^(${u.join("|")})$').test(\${id}))`,i]]):[]}setSelectColorUserModelCpt(e,t){if(!Array.isArray(e))return;const i=new Map,s=t?.rank===void 0?"exist":t?.rank,o=Fa(s);e.forEach(r=>{const l=r?.modelId;if(l==null)return;const a=`${l}`,c=Array.isArray(r?.elementIds)?r.elementIds:r?.elementId?[r.elementId]:[];if(!c.length)return;const u=Ls(r?.rgba)||this.selectedColor;c.forEach(h=>{const f=this.getBatchId(h,a);f!==null&&(i.has(a)||i.set(a,[]),i.get(a)?.push({batchId:f,selectedColor:u,rank:o}))})}),i.forEach((r,l)=>{const a=this.mergeSelections(l,r);this.hasSelectedFeaturesMap[l]=a,this.setBaseStyle(l)}),this.triggerSelectionChange()}setAllSelectColorUserModelCpt({modelId:e,rgba:t}){if(!e)return;const i=String(e),s=this.tilesetMap[i];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&&this.setSelectColorUserModelCpt([{modelId:i,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 i=e.join("|");return i?t==="include"?[[`(regExp('^(${i})$').test(\${id}))`,"true"],["true","false"]]:[[`(regExp('^(${i})$').test(\${id}))`,"false"],["true","true"]]:t==="include"?[["true","false"]]:void 0}applyShowStyleOnly(e){const t=this.tilesetMap[e];if(!t)return;const i=this.showStateMap[e],s=i?this.buildShowConditions(i.batchIds,i.mode):void 0;s?t.style=new this.cesium.Cesium3DTileStyle({show:{conditions:s}}):t.style=void 0}setSelectedColorRgba(e,t,i,s=1){const o=Jt(e),r=Jt(t),l=Jt(i),a=Ra(s),c=Ls({r:o,g:r,b:l,a});c&&(this.selectedColor=c)}mergeSelections(e,t){const i=new Map;return(this.hasSelectedFeaturesMap[e]||[]).forEach(o=>i.set(o.batchId,o)),t.forEach(o=>{const r=i.get(o.batchId);(!r||o.rank>r.rank||o.rank===r.rank)&&i.set(o.batchId,o)}),Array.from(i.values())}toggleMultiSelect(e,t,i,s){const o=this.hasSelectedFeaturesMap[e]||[],r=o.filter(h=>h.rank!==0),l=o.filter(h=>h.rank===0),c=l.some(h=>h.batchId===t)?l.filter(h=>h.batchId!==t):[...l,{batchId:t,selectedColor:i,rank:0,point:s}],u=[...r,...c];u.length?(this.hasSelectedFeaturesMap[e]=u,this.setBaseStyle(e)):(delete this.hasSelectedFeaturesMap[e],this.applyShowStyleOnly(e)),this.triggerSelectionChange()}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)}selectTilesInRectangle(e,t,i){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,c=l-r;if(Math.abs(a)<15||Math.abs(c)<15)return;const u=s+a/2,h=r+c/2,f=new this.cesium.Cartesian2(u,h),p=this.viewer.scene.drillPick(f,void 0,a,c);if(!Array.isArray(p))return;const m=new Map;p.forEach(y=>{if(!(y instanceof this.cesium.Cesium3DTileFeature))return;const A=Sn(y.tileset);if(!A||!this.tilesetMap[A])return;const C=this.getFeatureId(y);C!=="-1"&&(m.has(A)||m.set(A,new Set),m.get(A)?.add(C))}),m.forEach((y,A)=>{const C=this.hasSelectedFeaturesMap[A]||[],E=C.filter(B=>B.rank!==0),x=new Set(C.filter(B=>B.rank===0).map(B=>B.batchId)),M=[];y.forEach(B=>{x.has(B)||M.push({batchId:B,selectedColor:i,rank:0})});const T=C.filter(B=>B.rank===0);this.hasSelectedFeaturesMap[A]=[...E,...T,...M],this.setBaseStyle(A)}),this.triggerSelectionChange()}}class Ng{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,i=this.tilesetMap[e];if(!i||!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(i.root.transform,new t.Matrix4);s.modelMatrix=t.Matrix4.multiply(o,this.boxMatrix,new t.Matrix4),i.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 i=["left","right","behind","front","top","down"];for(const s of i){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),c=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,c):new e.Cartesian2(l,c)},!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,i=(this.targetYPlus-this.targetYMinus)/2,s=(this.targetZPlus-this.targetZMinus)/2;switch(e){case"left":return new this.cesium.Cartesian3(-this.targetXMinus,i,s);case"right":return new this.cesium.Cartesian3(this.targetXPlus,i,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,i,this.targetZPlus);case"down":return new this.cesium.Cartesian3(t,i,-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,i=this.getNormalByType(e),s=t.Cartesian3.negate(i,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,i=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=i.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=i.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),i.screenSpaceCameraController.enableInputs=!1;const r=i.camera.getPickRay(s.position),l=this.boxInverseMatrix,a=e.Matrix4.multiplyByPoint(l,r.origin,new e.Cartesian3),c=e.Matrix4.multiplyByPointAsVector(l,r.direction,new e.Cartesian3);e.Cartesian3.normalize(c,c);const u=new e.Ray(a,c),h=this.getPlaneByType(this.currentPlaneType);this.dragStartPoint=e.IntersectionTests.rayPlane(u,h,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=i.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 c=new e.Ray(l,a);let u=new e.Cartesian3;this.currentPlaneType==="top"||this.currentPlaneType==="down"?u=Math.abs(a.x)>Math.abs(a.y)?e.Cartesian3.UNIT_X:e.Cartesian3.UNIT_Y:this.currentPlaneType==="left"||this.currentPlaneType==="right"?u=Math.abs(a.y)>Math.abs(a.z)?e.Cartesian3.UNIT_Y:e.Cartesian3.UNIT_Z:u=Math.abs(a.x)>Math.abs(a.z)?e.Cartesian3.UNIT_X:e.Cartesian3.UNIT_Z;const h=-e.Cartesian3.dot(this.dragStartPoint,u),f=new e.Plane(u,h);let p=e.IntersectionTests.rayPlane(c,f,new e.Cartesian3);if(!p){const y=u===e.Cartesian3.UNIT_X?e.Cartesian3.UNIT_Y:u===e.Cartesian3.UNIT_Y&&(this.currentPlaneType==="top"||this.currentPlaneType==="down")?e.Cartesian3.UNIT_X:e.Cartesian3.UNIT_Z,A=-e.Cartesian3.dot(this.dragStartPoint,y);p=e.IntersectionTests.rayPlane(c,new e.Plane(y,A),new e.Cartesian3)}if(!p)return;const m=.01;switch(this.currentPlaneType){case"left":this.targetXMinus=Math.max(-this.targetXPlus+m,-p.x);break;case"right":this.targetXPlus=Math.max(-this.targetXMinus+m,p.x);break;case"behind":this.targetYMinus=Math.max(-this.targetYPlus+m,-p.y);break;case"front":this.targetYPlus=Math.max(-this.targetYMinus+m,p.y);break;case"top":this.targetZPlus=Math.max(-this.targetZMinus+m,p.z);break;case"down":this.targetZMinus=Math.max(-this.targetZPlus+m,-p.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),i.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],i=this.tilesetMap[e];if(t&&i&&!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(i.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(h=>{const f=this.tilesetMap[h];f&&f.boundingSphere&&t.push(f.boundingSphere.center)}),t.length===0)return;const i=new e.Cartesian3;t.forEach(h=>e.Cartesian3.add(i,h,i)),this.boxCenter=e.Cartesian3.divideByScalar(i,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,c=-1/0;this.activeModelIds.forEach(h=>{const f=this.tilesetMap[h];if(!f)return;const p=[],m=f.leiting?.box,y=f.root?.boundingVolume?.boundingVolume;if(m&&m.min&&m.max){const{min:A,max:C}=m,E=[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)],x=f.root.transform;E.forEach(M=>{p.push(e.Matrix4.multiplyByPoint(x,M,new e.Cartesian3))})}else if(y&&y.halfAxes){const A=y.center,C=y.halfAxes,E=e.Matrix3.getColumn(C,0,new e.Cartesian3),x=e.Matrix3.getColumn(C,1,new e.Cartesian3),M=e.Matrix3.getColumn(C,2,new e.Cartesian3);for(let T=0;T<8;T++){const B=e.Cartesian3.clone(A,new e.Cartesian3);e.Cartesian3.add(B,e.Cartesian3.multiplyByScalar(E,T&1?1:-1,new e.Cartesian3),B),e.Cartesian3.add(B,e.Cartesian3.multiplyByScalar(x,T&2?1:-1,new e.Cartesian3),B),e.Cartesian3.add(B,e.Cartesian3.multiplyByScalar(M,T&4?1:-1,new e.Cartesian3),B),p.push(B)}}else if(f.boundingSphere){const A=f.boundingSphere,C=A.center,E=A.radius,x=e.Matrix4.multiplyByPoint(this.boxInverseMatrix,C,new e.Cartesian3);s=Math.min(s,x.x-E),o=Math.max(o,x.x+E),r=Math.min(r,x.y-E),l=Math.max(l,x.y+E),a=Math.min(a,x.z-E),c=Math.max(c,x.z+E)}p.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),c=Math.max(c,C.z)})});const u=1.01;this.targetXMinus=Math.abs(s)*u,this.targetXPlus=Math.abs(o)*u,this.targetYMinus=Math.abs(r)*u,this.targetYPlus=Math.abs(l)*u,this.targetZMinus=Math.abs(a)*u,this.targetZPlus=Math.abs(c)*u,this.activeModelIds.forEach(h=>{this.setupClippingPlanes(h)}),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 i=this.tilesetMap[t];i&&(i.clippingPlanes&&(i.clippingPlanes.enabled=!1),i.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 Us=performance.now();const Ug=10;class _g{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:i,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"),i&&(this.modelInfo=Object.assign(this.modelInfo,i)),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 i=this.viewer.scene;let s;try{s=i.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,i=new this.cesium.Cartesian2(e.canvas.clientWidth/2,e.canvas.clientHeight/2);let s;try{s=e.pickPosition(i)}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}),i=()=>{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?i():t.readyEvent.addEventListener(i),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;Us=performance.now();const i=(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"||(i(o,!0),this.resumeAnimationFn&&this.resumeAnimationFn())},this._keyupHandler=o=>{o.target.tagName==="INPUT"||o.target.tagName==="TEXTAREA"||(i(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,c=r-this.lastScreenX;Math.abs(a)<Math.abs(c)&&(c>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 u=this.viewer.camera;this.cameralHpRoll.pitch=u.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-Us<Ug)return;Us=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=(u,h)=>new this.cesium.Ray(u,h),c=new this.cesium.Cartesian3;if(this.cesium.Matrix4.getColumn(this.model.modelMatrix,0,c),this.cesium.Cartesian3.normalize(c,c),Math.abs(o)!=2&&this.collisionTest){const u=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),h=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,l),u),f=a(h,c),p=this.viewer.scene.pickFromRay(f,[this.model],1);if(p&&p.position&&this.cesium.Cartesian3.distance(h,p.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 u=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),h=.5,f=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,h),u),p=new this.cesium.Cartesian3;this.cesium.Cartesian3.subtract(this.position,f,p),this.cesium.Cartesian3.normalize(p,p);const m=a(f,p),y=this.viewer.scene.pickFromRay(m,[this.model],1),A=l,C=this.cesium.Cartesian3.add(f,this.cesium.Cartesian3.multiplyByScalar(c,A,new this.cesium.Cartesian3),new this.cesium.Cartesian3);if(t.defined(y)){const E=t.Cartesian3.distance(f,y.position);E-h>.2&&(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,-.2),this.position)),E-h<-.1&&E<2&&(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,.2),this.position))}if(!y&&this.gravityTestByMove){const E=a(this.position,p),x=this.viewer.scene.pickFromRay(E,[this.model],1);if(x){const M=this.cesium.Cartesian3.distance(this.position,x.position);Math.abs(M-1)>.05&&M<2&&(this.position=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,-.2),this.position))}}if(y&&this.gravityTestByMove&&this.gravityTest){const E=this.cesium.Cartesian3.distance(C,y.position);Math.abs(E-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-E)/Math.abs(l-E)*.05),this.position))}}if(this.transparentTest){const u=new this.cesium.Cartesian3(this.position.x,this.position.y,this.position.z),h=1.75,f=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,h),u),p=this.viewer.camera.positionWC,m=f,y=t.Cartesian3.subtract(m,p,new t.Cartesian3),A=t.Cartesian3.distance(f,p),C=t.Cartesian3.normalize(y,new t.Cartesian3),E=new t.Ray(p,C);let x;try{x=this.viewer.scene.pickFromRay(E,void 0,1)}catch{}t.defined(x)&&x.primitive!==this.model&&x.position&&t.Cartesian3.distance(p,x.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,i=this.cesium.Matrix4.multiplyByPoint(this.model.modelMatrix,new this.cesium.Cartesian3(0,0,t),e);this.viewer.camera.viewBoundingSphere(new this.cesium.BoundingSphere(i,this.wheelCount),this.cameralHpRoll)}_keydownHandler;_keyupHandler;_tickHandler;_uiEventListeners=[];bindUiKeys(e){this.unbindUiKeys(),Object.entries(e).forEach(([t,i])=>{if(!i)return;const s=()=>this.setMoveState(t,!0),o=()=>this.setMoveState(t,!1);i.addEventListener("mousedown",s),i.addEventListener("mouseup",o),i.addEventListener("mouseleave",o),i.addEventListener("touchstart",r=>{r.preventDefault(),s()}),i.addEventListener("touchend",r=>{r.preventDefault(),o()}),this._uiEventListeners.push(()=>{i.removeEventListener("mousedown",s),i.removeEventListener("mouseup",o),i.removeEventListener("mouseleave",o),i.removeEventListener("touchstart",s),i.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}setParams({gravityTest:e,collisionTest:t,transparentTest:i}){e!==void 0&&(this.gravityTest=e),t!==void 0&&(this.collisionTest=t),i!==void 0&&(this.transparentTest=i)}setMoveState(e,t){this.moveState.hasOwnProperty(e)&&(this.moveState[e]=t,t?this.resumeAnimationFn&&this.resumeAnimationFn():Object.keys(this.moveState).every(i=>this.moveState[i]==!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 Qg{cesium;viewer;baseCesium;baseTiles;baseCompt;baseSection;basePlayer;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer,this.baseCesium=new cd(e),this.baseTiles=new ka(e),this.baseCompt=new Lg(e),this.baseSection=new Ng(e),this.basePlayer=new _g({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 Hg{cesium;viewer;mapLayers={};renderGen={};renderGenAll=0;renderGenByModel={};modelId="default";options={flyTo:!0};dxfModelsList=[];open=!1;events=new pi;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,i=this.dxfModelsList.find(s=>s.modelId===t);i&&this.flyToBounds(i)}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(i=>i.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 i=this.dxfModelsList.find(s=>s.modelId===e);i&&(i.show=t)}showJsonByLayer({modelId:e,show:t,layers:i}){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(i)&&i.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 c=0;c<a;c++)s.hiddenBatchIds.has(c)?l.getFeature(c).show=!1:l.getFeature(c).show=!0}))}flyToBounds(e,t){const i=this.cesium,s=e.boundingSphere?.radius||1e3,o={offset:new i.HeadingPitchRange(0,i.Math.toRadians(-90),s*.5),...t},r=o.duration??0;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 i=await t.blob(),s=new wa(new Ms(i),{password:"abc!?123",useWebWorkers:!1}),r=(await s.getEntries()).find(c=>!c.directory&&c.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 i=this.renderGenAll;if(e?.length){for(const s of e){if(this.renderGenAll!==i)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`,c=await this.loadModelFile(a);if(this.renderGenAll!==i||(this.renderGenByModel[s.modelId]||0)!==o)return;const u=await this.cesium.Cesium3DTileset.fromUrl(r);if(u.maximumScreenSpaceError=0,this.renderGenAll!==i||(this.renderGenByModel[s.modelId]||0)!==o)return;if(Object.assign(u,{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:c}),s.formData?u.formData=s.formData:u.formData={modelId:u.modelId,longitude:u.deltaLongitude,latitude:u.deltaLatitude,distance:1e-6,rotation:0,totalRotation:u.totalRotation,heightDistance:1,height:0,lonlat:1e-6,modelOptions:[{value:u.modelId,label:u.modelName}],selectPoint:{longitude:0,latitude:0,height:0},selectedMode:!1,X:0,Y:0,Z:0},this.adjustingModelByCad({...u.formData,tileset:u}),Array.isArray(c)){const h=c;u.layerMap={};let f=this.mapLayers[s.modelId];f||(f={},this.mapLayers[s.modelId]=f),h.forEach(p=>{u.layerMap[p.layerName]=p.batchId,f[p.layerName]||(f[p.layerName]=[]),f[p.layerName].push({batchId:p.batchId,color:p.layerColor})})}if(this.dxfModelsList.push(u),this.setModelId(s.modelId),this.viewer.scene.primitives.add(u),this.renderGenAll!==i||(this.renderGenByModel[s.modelId]||0)!==o)return;l.flyTo&&this.flyToBounds(u),l.onSuccess&&l.onSuccess(u)}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,i=t.Quaternion.fromAxisAngle(t.Cartesian3.UNIT_Z,t.Math.toRadians(e.totalRotation)),s=t.Matrix4.fromRotationTranslation(t.Matrix3.fromQuaternion(i),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(i=>{i.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(i=>i.modelId===e);if(t>-1){const i=this.dxfModelsList[t];this.viewer.scene.primitives.remove(i),i.destroy&&!i.isDestroyed()&&i.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 mt{constructor(e,t){if(this.viewer=e,!this.viewer)return;this.type="prompt",t=t||{};const i=t.type==null?1:t.type;let s={id:new Date().getTime()+""+Math.floor(Math.random()*1e4),type:i,anchor:i==2,closeBtn:i==2,offset:i==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,c=this.opt.style.color;this.opt.anchor&&(r+=`
|
|
82
82
|
<div class="prompt-anchor-container">
|
|
83
83
|
<div class="prompt-anchor" style="background:${a} !important;">
|
|
84
84
|
</div>
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
// 通常不需要 clamp,除非开启 HDR 后期望超亮,但负值需要避免
|
|
115
115
|
material.diffuse = max(material.diffuse, vec3(0.0));
|
|
116
116
|
}
|
|
117
|
-
`});f.isModelAdjustment=!0,h.customShader=f}else e.brightness!==void 0&&e.brightness!==1&&!h.style&&(h.style=new i.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 i=t.postProcessStages.ambientOcclusion;i.enabled=e,e&&(i.uniforms.ambientOcclusionOnly=!1,i.uniforms.intensity=3,i.uniforms.bias=.1,i.uniforms.lengthCap=.03,i.uniforms.stepSize=1,i.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)}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 k0{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},orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},duration:1}}flyToCameraView(e){const{position:t,orientation:i,duration:s}=e,o=new this.cesium.Cartesian3(t.x,t.y,t.z),r=new this.cesium.HeadingPitchRoll(i.heading,i.pitch,i.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||{};this.flyToCameraView({position:{x:Number(e.position.x),y:Number(e.position.y),z:Number(e.position.z)},orientation:{heading:Number(t.heading||0),pitch:Number(t.pitch||0),roll:Number(t.roll||0)},duration:e.duration})}}function P0(n){const{container:e,appContext:t,methods:i,viewerOptions:s,options:o,callbacks:r}=n,l=new pi,a=window.Cesium;if(!a)throw new Error("Cesium is not loaded");e.id=`cesium-container-${Sg()}`;const c={animation:!1,timeline:!1,infoBox:!1,homeButton:!1,fullscreenButton:!1,sceneModePicker:!1,navigationHelpButton:!1,geocoder:!1,baseLayerPicker:!1,selectionIndicator:!1,creditContainer:document.createElement("div"),contextOptions:{webgl:{alpha:!0}}},u=t?.config?.globalProperties?.$leitingBimOptions,h={...c,...u?.viewerOptions??{},...s??{}},f=new a.Viewer(e,h);f.camera.setView({destination:a.Cartesian3.fromDegrees(108,32,1e7),orientation:{heading:a.Math.toRadians(0),pitch:a.Math.toRadians(-90),roll:0}});let p=i;if(!p&&u&&(u.methods||(u.methods={}),p=u.methods),p){const m=new Qg({cesium:a,viewer:f,options:o,callbacks:r}),y=new ka({cesium:a,viewer:f}),A=new D0({cesium:a,viewer:f}),C=new Hg({cesium:a,viewer:f}),E=new k0({cesium:a,viewer:f});let x;const M=new tc({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&&o.mode==="2d"&&(console.log("InitMap: Setting CAD Mode 2D"),A.setCadMode("2d"),x=new ao({cesium:a,viewer:f})),y.events.on("tilesetLoaded",g=>{m.baseCompt.attachTileset(g,m.baseCompt.selectedColor),m.baseSection.attachTileset(g,g.leiting?.model?.modelId),p&&p.tilesLoad3dTiles&&p.tilesLoad3dTiles(g),o?.tilesLoad3dTiles&&o.tilesLoad3dTiles(g.leiting)}),y.events.on("loadingStatus",g=>{p&&p.onLoadingStatus&&p.onLoadingStatus(g)}),y.events.on("mountAll3Dtiles",({modelList:g,mapTileset:k})=>{o?.mountAll3Dtiles&&o.mountAll3Dtiles(g),p?.mountAll3Dtiles&&p.mountAll3Dtiles(k)}),C.events.on("mountAllCad",g=>{o?.mountAllCad&&o.mountAllCad(g),p?.mountAllCad&&p.mountAllCad(g)}),m.baseCompt.selectionChange(g=>{g.length!==0&&(o?.selectionChange&&o.selectionChange(g),p?.selectionChange&&p.selectionChange(g))}),p.onSearchComponent=g=>{o?.searchComponent&&o.searchComponent(g),p?.searchComponent&&p.searchComponent(g)};const T=p.saveRegion;p.saveRegion=g=>{o?.saveRegion&&o.saveRegion(g),T&&T!==o?.saveRegion&&T(g)};const B=p.saveCadCalibration;p.saveCadCalibration=g=>{o?.saveCadCalibration&&o.saveCadCalibration(g),B&&B!==o?.saveCadCalibration&&B(g)};const I=p.saveCadRegion;p.saveCadRegion=g=>{o?.saveCadRegion&&o.saveCadRegion(g),I&&I!==o?.saveCadRegion&&I(g)},p.getCesium=()=>a,p.getViewer=()=>f,p.getAnnotationInstance=()=>x,p.getMeasureInstance=()=>M,p.flyTo=g=>{E.setCameraView(g)},p.addPoint=(g,k,P=0)=>{f.entities.add({position:a.Cartesian3.fromDegrees(g,k,P),point:{pixelSize:10,color:a.Color.RED}})},p.enableTestLabel=()=>m.enableTestLabel(),p.setBackgroundColor=g=>A.setBackgroundColor(g),p.enableCesiumFXAA=g=>m.enableCesiumFXAA(g),p.setSceneOptions=g=>m.setSceneOptions(g),p.getCameraInfo=()=>E.getCameraView(),p.flyToCameraView=g=>E.flyToCameraView(g),p.getCurrentCameraPositionAndTarget=()=>E.getCurrentCameraPositionAndTarget(),p.setCameraView=g=>E.setCameraView(g),p.getImageBase64=()=>{const g=f.scene.canvas;return f.render(),g.toDataURL("image/png")},p.getSnapDomSImageBase64=(g,k)=>m.getSnapDomSImageBase64(g,k),p.addModels=g=>y.addModels(g),p.add3DtilesModel=g=>y.addModels(g),p.addOSGB=g=>y.addOSGB(g),p.updateOSGBMatrix=g=>y.updateOSGBMatrix(g),p.showModels=g=>y.showModels(g),p.showTileset=g=>y.showModels(g),p.deleteModels=g=>y.deleteModels(g),p.deleteAllModelList=()=>{y.deleteAllModels(),l.emit("deleteAllModels")},p.deleteAllModels=()=>{y.deleteAllModels(),l.emit("deleteAllModels")},p.flyToTileset=g=>y.flyToTileset(g),p.flyToByModelId=g=>y.flyToTileset(g),p.updateModelEffect=g=>m.updateModelEffect(g),p.getMapTileset=()=>y.getMapTileset(),p.getBIMmodelId=()=>y.getBIMmodelId(),p.getModelList=()=>y.getModelList(),p.setMapTileset=g=>y.setMapTileset(g),p.setBIMmodelId=g=>y.setBIMmodelId(g),p.setModelList=g=>y.setModelList(g),p.setSelectColorUserModelCpt=(g,k)=>m.baseCompt.setSelectColorUserModelCpt(g,k),p.setAllSelectColorUserModelCpt=g=>m.baseCompt.setAllSelectColorUserModelCpt(g),p.setSelectColorUserModelCptByClear=()=>m.baseCompt.clearAllHaveSelected(),p.clearSelectColorUserModelCpt=()=>m.baseCompt.clearAllHaveSelected(),p.setSelecteds=(g,k)=>m.baseCompt.setSelectColorUserModelCpt(g,k??{rank:0}),p.setSelectedColor=(g,k,P,F)=>m.baseCompt.setSelectedColorRgba(g,k,P,F),p.clearAllHaveSelected=()=>m.baseCompt.clearAllHaveSelected(),p.getSelected=g=>m.baseCompt.getSelected(g),p.selectionChange=g=>{m.baseCompt.selectionChange(g)},p.flyToObjects=g=>m.baseCompt.flyToObjects(g),p.setAllConstructionProgressTracking=g=>m.baseCompt.setAllConstructionProgressTracking(g),p.enableAllConstructionProgressTracking=()=>m.baseCompt.enableConstructionProgressTracking(),p.disableConstructionProgressTracking=()=>m.baseCompt.disableConstructionProgressTracking(),p.freshConstructionProgressTracking=()=>m.baseCompt.freshConstructionProgressTracking(),p.reStartAnimation=()=>m.baseCompt.reStartAnimation(),p.resumeFlyTo=()=>m.baseCompt.resumeFlyTo(),p.resumeAnimation=()=>m.baseCompt.resumeFlyTo(),p.setElementsListVisible=g=>m.baseCompt.setComponentVisibility(g),p.setAllElementsVisible=g=>m.baseCompt.setAllComponentsVisibility(g),p.getElementsVisible=g=>m.baseCompt.getComponentsByVisibility(g),p.setComponentVisibility=g=>m.baseCompt.setComponentVisibility(g),p.setAllComponentsVisibility=g=>m.baseCompt.setAllComponentsVisibility(g),p.getComponentsByVisibility=g=>m.baseCompt.getComponentsByVisibility(g),p.openSection=(g,k)=>m.baseSection.open(g,k),p.closeSection=g=>m.baseSection.close(g),p.updateSectionRange=g=>m.baseSection.updateRange(g),p.getSectionRange=()=>m.baseSection.getRange(),p.fitToModels=()=>m.baseSection.fitToModels(),p.setSectionBoxVisibility=g=>m.baseSection.setBoxVisibility(g),p.openPlayer=()=>{m.baseCompt.disableSelection(),m.basePlayer.openPlayer()},p.closePlayer=()=>{m.basePlayer.closePlayer(),m.baseCompt.enableSelection()},p.setPersonPosition=g=>m.basePlayer.setPersonPosition(g),p.setPlayerSpeed=g=>m.basePlayer.setSpeed({speed:g}),p.setPlayerParams=g=>m.basePlayer.setParams(g),p.setPlayerMoveState=(g,k)=>m.basePlayer.setMoveState(g,k),p.bindPlayerUiKeys=g=>m.basePlayer.bindUiKeys(g),p.setGlobeEnvironmentVisible=g=>A.setGlobeEnvironmentVisible(g),p.setGlobeColor=g=>A.setGlobeColor(g),p.setCadMode=g=>A.setCadMode(g),p.setTerrainEnable=g=>A.setTerrainEnable(g),p.setDepthTestEnable=g=>A.setDepthTestEnable(g),p.changeBaseMap=(g,k)=>A.changeBaseMap(g,k),p.searchLocation=(g,k)=>A.searchLocation(g,k),p.setShadowsEnable=g=>A.setShadowsEnable(g),p.setShadowDarkness=g=>{A.setShadowDarkness?A.setShadowDarkness(g):console.warn("baseSetting.setShadowDarkness is not available. Please reload the page.")},p.setTime=g=>A.setTime(g),p.setModelBrightness=g=>A.setModelBrightness(g),p.setModelColorAdjustment=g=>A.setModelColorAdjustment(g),p.setEnvironmentMapEnable=g=>A.setEnvironmentMapEnable(g),p.setAmbientOcclusion=g=>A.setAmbientOcclusion(g),p.setCollisionDetection=g=>A.setCollisionDetection(g),p.setMouseHabit=g=>A.setMouseHabit(g),p.is2dMode=()=>A.is2d,p.setSceneMode=g=>{const k=g?"2d":"3d";A.setCadMode(k),g&&!x&&(x=new ao({cesium:a,viewer:f})),l.emit("setMode",k)},p.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)},p.getConfigure=()=>(console.warn("getConfigure is not initialized. Please ensure LeitingSetting component is mounted."),{}),p.setConfigure=g=>{console.warn("setConfigure is not initialized. Please ensure LeitingSetting component is mounted.",g)},p.addDxfModel=g=>{const k={...g};return k.files&&!k.fileNames&&(k.fileNames=k.files),k.fileNames||(k.fileNames=[]),C.addDxfModel(k)},p.deleteCad=g=>C.deleteCad(g),p.deleteAllCad=()=>C.deleteAllCad(),p.showDxfModel=g=>C.showJson(g),p.showDxfLayer=g=>C.showJsonByLayer(g),p.flyToCadModel=(g={})=>C.flyToCadModel(g),p.getDxfModels=g=>C.getDxfModels(g),p.getDxfLayers=g=>C.getMapLayers(g),p.getCadModelId=()=>C.getModelId(),p.setDxfOpen=g=>C.setDxfOpen(g),p.getDxfOpen=()=>C.getDxfOpen(),p.adjustingModelByCad=g=>C.adjustingModelByCad(g),p.saveAnnotations=()=>{let g=null;return x&&(g=x.saveAnnotations()),o?.saveAnnotations&&o.saveAnnotations(g),g},p.loadAnnotations=g=>x?x.loadAnnotations(g):!1,p.set2d=g=>{const k=g?"2d":"3d";A.setCadMode(k),g&&!x&&(x=new ao({cesium:a,viewer:f})),l.emit("setMode",k)},p.flyToTopView=()=>{C.flyToCadModel()},p.menuEvents=l,p.insertMenu=g=>{l.emit("insertMenu",g)},p.setMenuListFilter=g=>{l.emit("setMenuListFilter",g)},p.showMenu=g=>{l.emit("showMenu",g)},p.setMenuActive=(g,k)=>{l.emit("setMenuActive",g,k)},p.baseCompt=m.baseCompt,p.getTree=()=>{const g=[],k=y.getMapTileset();return Object.keys(k).forEach(P=>{const F=k[P];if(F&&F.leiting&&F.leiting.tree){const L=F.leiting.tree;Array.isArray(L)?g.push(...L):g.push(L)}}),g},p.getAllComponents=()=>{const g=y.getMapTileset(),k={},P=[];try{Object.keys(g).forEach(F=>{const L=g[F];if(!L||!L.leiting)return;const H=L.leiting,O=H.node,b=H.model.formData,w=H.box;if(!O||!O.nodeExtras)return;const v=H.model.modelId;k[v]=O.nodeExtras;const S=O.nodeExtras.element;if(!S)return;const R=w?w.center:{x:0,y:0,z:0};Object.values(S).forEach(_=>{if(_.box3)try{const N=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(b.totalRotation||0)),D=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(N),new a.Cartesian3(0,0,0)),Q=a.Cartesian3.fromDegrees(b.longitude,b.latitude,b.height),V=a.Transforms.eastNorthUpToFixedFrame(Q);a.Matrix4.multiply(V,D,V);const $=new a.Cartesian3(R.x,R.y,0),q=new a.Cartesian3;a.Matrix4.multiplyByPoint(V,$,q);const ne=a.Cartographic.fromCartesian(q),se=_.box3?.Center?.x||0,Y=_.box3?.Center?.y||0,j=_.box3?.Center?.z||0,J=new a.Cartesian3(-R.x+se,-R.y+Y,0+j),oe=a.Matrix4.fromTranslation(J),le=a.Matrix4.clone(oe);a.Matrix4.multiply(D,le,le);const ge=a.Cartesian3.fromDegrees(ne.longitude/Math.PI*180,ne.latitude/Math.PI*180,b.height),we=a.Transforms.eastNorthUpToFixedFrame(ge);a.Matrix4.multiply(we,le,we);const me=a.Cartographic.fromCartesian(new a.Cartesian3(we[12],we[13],we[14]));_.box3.cartographic={longitude:me.longitude/Math.PI*180,latitude:me.latitude/Math.PI*180,height:me.height};const Re={id:_.uniqueId,billboard:[{theme:"Tag9999",position:[_.box3.cartographic.longitude,_.box3.cartographic.latitude,_.box3.cartographic.height],options:{text:_.name}}]};P.push(Re)}catch(N){console.warn("Error calculating component position:",N)}})})}catch(F){console.error("getAllComponents error:",F)}return k},p.getCptInfos=g=>{if(!Array.isArray(g))return[];const k=y.getMapTileset(),P=[],F={};g.forEach(L=>{!L.modelId||!L.elementId||(F[L.modelId]||(F[L.modelId]=[]),F[L.modelId]?.push(L.elementId))});try{Object.keys(F).forEach(L=>{const H=k[L];if(!H||!H.leiting)return;const O=H.leiting,b=O.node,w=O.model.formData,v=O.box;if(!b||!b.nodeExtras)return;const S=b.nodeExtras.element;if(!S)return;const R=v?v.center:{x:0,y:0,z:0};F[L]?.forEach(_=>{const N=S[_];if(N&&N.box3)try{const D=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(w.totalRotation||0)),Q=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(D),new a.Cartesian3(0,0,0)),V=a.Cartesian3.fromDegrees(w.longitude,w.latitude,w.height),$=a.Transforms.eastNorthUpToFixedFrame(V);a.Matrix4.multiply($,Q,$);const q=new a.Cartesian3(R.x,R.y,0),ne=new a.Cartesian3;a.Matrix4.multiplyByPoint($,q,ne);const se=a.Cartographic.fromCartesian(ne),Y=N.box3?.Center?.x||0,j=N.box3?.Center?.y||0,J=N.box3?.Center?.z||0,oe=new a.Cartesian3(-R.x+Y,-R.y+j,0+J),le=a.Matrix4.fromTranslation(oe),ge=a.Matrix4.clone(le);a.Matrix4.multiply(Q,ge,ge);const we=a.Cartesian3.fromDegrees(se.longitude/Math.PI*180,se.latitude/Math.PI*180,w.height),me=a.Transforms.eastNorthUpToFixedFrame(we);a.Matrix4.multiply(me,ge,me);const Re=a.Cartographic.fromCartesian(new a.Cartesian3(me[12],me[13],me[14]));N.box3.cartographic={longitude:Re.longitude/Math.PI*180,latitude:Re.latitude/Math.PI*180,height:Re.height},P.push(N)}catch(D){console.warn("Error calculating component position:",D)}})})}catch(L){console.error("getCptInfos error:",L)}return P},window.Methods=p}return console.log("methods",p),{Cesium:a,viewer:f,methods:p,menuEvents:l}}function lo(n){return d.getCurrentScope()?(d.onScopeDispose(n),!0):!1}function co(n){return typeof n=="function"?n():d.unref(n)}const F0=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const R0=Object.prototype.toString,O0=n=>R0.call(n)==="[object Object]",L0=()=>{};function N0(n){return d.getCurrentInstance()}function nc(n,e=!0,t){N0()?d.onMounted(n,t):e?n():d.nextTick(n)}function Lt(n){var e;const t=co(n);return(e=t?.$el)!=null?e:t}const Ln=F0?window:void 0;function U0(...n){let e,t,i,s;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,i,s]=n,e=Ln):[e,t,i,s]=n,!e)return L0;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},l=(u,h,f,p)=>(u.addEventListener(h,f,p),()=>u.removeEventListener(h,f,p)),a=d.watch(()=>[Lt(e),co(s)],([u,h])=>{if(r(),!u)return;const f=O0(h)?{...h}:h;o.push(...t.flatMap(p=>i.map(m=>l(u,p,m,f))))},{immediate:!0,flush:"post"}),c=()=>{a(),r()};return lo(c),c}function _0(){const n=d.ref(!1),e=d.getCurrentInstance();return e&&d.onMounted(()=>{n.value=!0},e),n}function ic(n){const e=_0();return d.computed(()=>(e.value,!!n()))}function Q0(n,e={}){const{window:t=Ln}=e,i=ic(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let s;const o=d.ref(!1),r=c=>{o.value=c.matches},l=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",r):s.removeListener(r))},a=d.watchEffect(()=>{i.value&&(l(),s=t.matchMedia(co(n)),"addEventListener"in s?s.addEventListener("change",r):s.addListener(r),o.value=s.matches)});return lo(()=>{a(),l(),s=void 0}),o}function H0(n,e,t={}){const{window:i=Ln,...s}=t;let o;const r=ic(()=>i&&"ResizeObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},a=d.computed(()=>Array.isArray(n)?n.map(h=>Lt(h)):[Lt(n)]),c=d.watch(a,h=>{if(l(),r.value&&i){o=new ResizeObserver(e);for(const f of h)f&&o.observe(f,s)}},{immediate:!0,flush:"post"}),u=()=>{l(),c()};return lo(u),{isSupported:r,stop:u}}function G0(n,e={width:0,height:0},t={}){const{window:i=Ln,box:s="content-box"}=t,o=d.computed(()=>{var h,f;return(f=(h=Lt(n))==null?void 0:h.namespaceURI)==null?void 0:f.includes("svg")}),r=d.ref(e.width),l=d.ref(e.height),{stop:a}=H0(n,([h])=>{const f=s==="border-box"?h.borderBoxSize:s==="content-box"?h.contentBoxSize:h.devicePixelContentBoxSize;if(i&&o.value){const p=Lt(n);if(p){const m=p.getBoundingClientRect();r.value=m.width,l.value=m.height}}else if(f){const p=Array.isArray(f)?f:[f];r.value=p.reduce((m,{inlineSize:y})=>m+y,0),l.value=p.reduce((m,{blockSize:y})=>m+y,0)}else r.value=h.contentRect.width,l.value=h.contentRect.height},t);nc(()=>{const h=Lt(n);h&&(r.value="offsetWidth"in h?h.offsetWidth:e.width,l.value="offsetHeight"in h?h.offsetHeight:e.height)});const c=d.watch(()=>Lt(n),h=>{r.value=h?e.width:0,l.value=h?e.height:0});function u(){a(),c()}return{width:r,height:l,stop:u}}function Y0(n={}){const{window:e=Ln,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:o=!0}=n,r=d.ref(t),l=d.ref(i),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(),nc(a),U0("resize",a,{passive:!0}),s){const c=Q0("(orientation: portrait)");d.watch(c,()=>a())}return{width:r,height:l}}const V0={class:"title"},W0={class:"actions"},z0={class:"card-body"},j0=d.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:200},minWidth:{type:Number,default:200},fullHeight:{type:Boolean,default:!1},align:{type:String,default:""}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=d.inject("leiting-theme",d.ref("dark")),s=e,o=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:M=>{s("update:visible",M),s("update:open",M)}}),r=d.ref(null),l=d.ref(t.initialPosition?.x||0),a=d.ref(t.initialPosition?.y||0),c=d.ref(t.width),u=d.ref(t.fullHeight?"100%":"600px");d.watch(()=>t.fullHeight,M=>{M?u.value="100%":u.value==="100%"&&(u.value="600px")});const{height:h}=Y0();d.watch(h,()=>{t.fullHeight&&(u.value="100%")});const f=d.ref(!1),p=M=>{f.value=!0,M.preventDefault(),M.stopPropagation();const T=M.clientX,B=M.clientY,I=typeof c.value=="number"?c.value:r.value?.offsetWidth||0,g=typeof u.value=="number"?u.value:r.value?.offsetHeight||0,k=F=>{if(!f.value)return;F.preventDefault();const L=F.clientX-T,H=F.clientY-B,O=I+L,b=g+H;O>100&&(c.value=O),b>100&&(u.value=b)},P=()=>{f.value=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",P)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",P)},m=d.computed(()=>({left:`${l.value}px`,top:`${a.value}px`,width:typeof c.value=="number"?`${c.value}px`:c.value,height:typeof u.value=="number"?`${u.value}px`:u.value,position:"absolute",zIndex:2e3})),y=()=>{d.nextTick(()=>{if(r.value){const M=r.value.offsetParent||document.body,T=M.clientWidth,B=M.clientHeight,I=typeof c.value=="number"?c.value:r.value.offsetWidth||350,g=typeof u.value=="number"?u.value:r.value.offsetHeight||600;l.value+I>T&&(l.value=Math.max(0,T-I-20)),a.value+g>B&&(a.value=Math.max(0,B-g-20)),l.value<0&&(l.value=0),a.value<0&&(a.value=0)}})},A=d.ref(!1),C=M=>{if(M.target.closest(".close-btn")||M.target.closest(".actions"))return;A.value=!0,M.preventDefault(),M.stopPropagation();const T=M.clientX,B=M.clientY,I=l.value,g=a.value,k=F=>{if(!A.value)return;F.preventDefault();const L=F.clientX-T,H=F.clientY-B;l.value=I+L,a.value=g+H},P=()=>{A.value=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",P),y()};document.addEventListener("mousemove",k),document.addEventListener("mouseup",P)},E=()=>{d.nextTick(()=>{if(t.align&&r.value){const M=r.value.offsetParent||document.body,T=typeof c.value=="number"?c.value:r.value.offsetWidth||350;t.align==="right"?l.value=Math.max(0,M.clientWidth-T-20):t.align==="center"&&(l.value=Math.max(0,(M.clientWidth-T)/2))}y()})};d.onMounted(()=>{t.align?E():y()}),d.watch(o,M=>{M&&(t.align?E():y())});const x=()=>{o.value=!1,s("close")};return(M,T)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{ref_key:"cardRef",ref:r,class:d.normalizeClass(["draggable-card leiting-scroll",["leiting-theme-"+d.unref(i)]]),style:d.normalizeStyle(m.value)},[d.createElementVNode("div",{ref:"headerRef",class:"card-header",onMousedown:C},[d.createElementVNode("span",V0,d.toDisplayString(n.title),1),d.createElementVNode("div",W0,[d.renderSlot(M.$slots,"header-extra",{},void 0,!0),d.createElementVNode("span",{class:"close-btn",onClick:x},"×")])],544),d.createElementVNode("div",z0,[d.renderSlot(M.$slots,"default",{},void 0,!0)]),d.createElementVNode("div",{class:"resize-handle",onMousedown:p},[...T[0]||(T[0]=[d.createElementVNode("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"currentColor"},[d.createElementVNode("path",{d:"M10 10 L10 2 L2 10 Z"})],-1)])],32)],6)),[[d.vShow,o.value]])}}),Ue=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},Fe=Ue(j0,[["__scopeId","data-v-4db89eda"]]);function $0(n){const e=d.ref([]),t=d.ref([]),i=d.ref([]),s=d.ref(""),o=d.ref(!0);d.watch(()=>d.unref(n),h=>{if(!h||h.length===0)return;const f=[],p=(A,C)=>{A.forEach(E=>{const x=E.id||E.key||E.$id,M=E.modelId||C;M&&(E.modelId=M),x&&f.push(x),E.children&&E.children.length>0&&p(E.children,M)})};p(h);const m=new Set(i.value);let y=!1;f.forEach(A=>{m.has(A)||(m.add(A),y=!0)}),y&&(i.value=Array.from(m))},{immediate:!0,deep:!0});const r=d.computed(()=>{const h=d.unref(n);if(!h)return[];const f=[],p=(m,y)=>{m.forEach(A=>{const C=A.id||A.key||A.$id,E=A.name||A.title;f.push({key:C,title:E,parentKey:y}),A.children&&A.children.length>0&&p(A.children,C)})};return p(h),f}),l=h=>{e.value=h,o.value=!1},a=h=>{i.value=h},c=h=>{t.value=h},u=h=>r.value.find(p=>p.key===h)?.parentKey;return d.watch(s,h=>{if(!h)return;const p=r.value.filter(y=>y.title&&y.title.toLowerCase().includes(h.toLowerCase())).map(y=>y.parentKey),m=new Set;p.forEach(y=>{let A=y;for(;A;)m.add(A),A=u(A)}),e.value=[...m],o.value=!0}),{expandedKeys:e,selectedKeys:t,checkedKeys:i,searchValue:s,autoExpandParent:o,onExpand:l,onCheck:a,onSelect:c}}const K0={class:"search-box"},X0={key:0},q0={style:{color:"#f50"}},J0={key:1},Z0={key:1,class:"empty-tip"},ki=Ue(d.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(n,{emit:e}){const t=Ae.Input.Search,i=Ae.Tree,s=n,o=e,r=d.inject("leiting-theme",d.ref("dark")),l=d.inject("leitingMethods"),a=g=>{l?.value?.onSearchComponent&&l.value.onSearchComponent(g)},c=d.computed({get:()=>s.open!==void 0?s.open:s.visible,set:g=>{o("update:visible",g),o("update:open",g)}}),u=d.ref(null),{height:h}=G0(u),f=d.computed(()=>h.value||300),p={children:"children",title:"name",key:"id"},{expandedKeys:m,selectedKeys:y,checkedKeys:A,searchValue:C,autoExpandParent:E}=$0(d.toRef(s,"treeData")),x=g=>{m.value=g,E.value=!1},M=g=>{const k=[],P=F=>{if(!F.children||F.children.length===0){const H=F.element_Id;F.modelId&&H&&k.push({modelId:F.modelId,elementId:H})}else F.children.forEach(P)};return P(g),k},T=(g,k)=>{A.value=g,o("check",g,k);const P=M(k.node).map(F=>({...F,show:k.checked}));l?.value?.setComponentVisibility&&l.value.setComponentVisibility(P),l?.value?.onTreeCheck&&l.value.onTreeCheck(g,k)},B=(g,k)=>{if(y.value=g,o("select",g,k),k.selected){const P=M(k.node);P.length>0&&l?.value?.flyToObjects&&l.value.flyToObjects({selectCpts:P})}l?.value?.onTreeSelect&&l.value.onTreeSelect(g,k)},I=()=>{o("update:visible",!1),o("close")};return(g,k)=>(d.openBlock(),d.createBlock(Fe,{visible:c.value,"onUpdate:visible":k[1]||(k[1]=P=>c.value=P),title:n.title,"initial-position":n.initialPosition,"full-height":n.fullHeight,onClose:I},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["leiting-tree-container",[`theme-${d.unref(r)}`]])},[d.createElementVNode("div",K0,[d.createVNode(d.unref(t),{value:d.unref(C),"onUpdate:value":k[0]||(k[0]=P=>d.isRef(C)?C.value=P:null),placeholder:"搜索构件","allow-clear":"","enter-button":"",onSearch:a},null,8,["value"])]),d.createElementVNode("div",{class:"tree-wrapper",ref_key:"treeWrapperRef",ref:u},[n.treeData&&n.treeData.length?(d.openBlock(),d.createBlock(d.unref(i),{key:0,"tree-data":n.treeData,"field-names":p,height:f.value,"expanded-keys":d.unref(m),"auto-expand-parent":d.unref(E),"selected-keys":d.unref(y),"checked-keys":d.unref(A),checkable:"",virtual:"","block-node":"",onExpand:x,onSelect:B,onCheck:T},{title:d.withCtx(({title:P})=>[P&&d.unref(C)&&P.toLowerCase().indexOf(d.unref(C).toLowerCase())>-1?(d.openBlock(),d.createElementBlock("span",X0,[d.createTextVNode(d.toDisplayString(P.substr(0,P.toLowerCase().indexOf(d.unref(C).toLowerCase())))+" ",1),d.createElementVNode("span",q0,d.toDisplayString(d.unref(C)),1),d.createTextVNode(" "+d.toDisplayString(P.substr(P.toLowerCase().indexOf(d.unref(C).toLowerCase())+d.unref(C).length)),1)])):(d.openBlock(),d.createElementBlock("span",J0,d.toDisplayString(P),1))]),_:1},8,["tree-data","height","expanded-keys","auto-expand-parent","selected-keys","checked-keys"])):(d.openBlock(),d.createElementBlock("div",Z0,"暂无数据"))],512)],2)]),_:1},8,["visible","title","initial-position","full-height"]))}}),[["__scopeId","data-v-4cd53c55"]]),eC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEhSURBVDhP1ZRhkcIwEIWJAsDBOTgkgAJAAYcCQAFFAUgoDjgFh4Q7B+cAUFC+19kyS0hL+Ulm3nS6+/ZLNkkbOk9GURRDWUIIxyZraEoCWZLfmmcOLK/z14KAqGiGvq14zDMHNk/BHkAAehh/0ABtKMxUSFzPNfpFI+JnD7wDYVaxIIov41bIfxHfoROakhe0HDeQmbQfFzTxJj+zTXYg1kWrarISRFKzLNAfGsbL9iDzq/0j+kQZ/k1wm7onoKW3Hq42F0jLVK//Tcebott2fJAbVK1lvKwBNd6rRIsFsfJka0G2qdpQPy7+EPC0AumexKAzoH5FbgvSbHuUW6EOYubbfwX0cLPfFJS4K6mPNrbdHb+uvP498dhVn4v9FWo9V3RZzFxAv8L9AAAAAElFTkSuQmCC",sc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWz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ORK5CYII=",sC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAADFSURBVDhPxVPBDYMwDIwnKJu0G9ANYJMyQrsBbNIRGAE2gEnSO6mpIMJxkBC1lEds52zfOeK9b51zV5wte4lIr8RWbgGQh2fGmaIHJe4EetKPtDpRcA5AvwcB7FtgCcTOH0p3YzaQNd75QBiVXJG3LRtCRyQ6Jvsekd3gTsJVoDcihZLQQjXGTRMzIzPhOCCQyNYvSuEue7Qdm02yK0u1nM2m/FQyKb8JZHH+l81Ofdpdm82tvikjThyNlbSEBvIPFj+MfwA76qSYUG3g9QAAAABJRU5ErkJggg==",oC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEcSURBVDhPrZSNDYIwEIXpBOIGjMAIOIE4AbgBGwAbOIJu4Aa4gW4gI+gE9b3mjjSmibSR5ALX3H33W4y1Ns+yrIe0EH7HPC8YnyGjAegkEB5cYyiwrdWXIEc1xnSREGcuiTQEWeg7gG4+CMcl9ALnLkvogwScv+wq6FMQJJCJDgBtBcSAI3QClwe2YZAHcY2Ho4kGAVLA6U5/CEvdp4KYhesFhBPpCZIAz6jStHhproJcHyAHbb5nF+6RZ8CsGslIQaHp/gSxRzlApU4GugPxNuDN/eNarAJxapUPgm8rQ9C1SAI9AOGiHhGApSdnRN8FshbEiLwiLI1rMUM6zSQ0tX9c2lp/Iw0iMIPU38iFIN1mTmOjKa98vyWB4QM5XQnvsbFsyAAAAABJRU5ErkJggg==",rC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAGPSURBVDhPrZT9UQIxEMUvFSgViBUoFQgVABV4VqBW4FmBUIFQgZRwVqBU4HUAVHC+X2aXycQw/sPOvLncZvdlv5JQFaTv+1upp8IyhLDHRLpLfe6FrXRt7hZShYyH+n8RauGAv/AkQNYIHICshFcRdu6fE/kGRN/mQGTIpzAzMoh6EV2fIsJ5IwNOj2IpVZ6i6difSecRVnlELZHIgHROisgXRCa78Z+IrMBf2pjLYJNENGSd1kO2pPghjKQniyqY8lFr2NfaqC18wn7nZCMlWg7xLq70TxfRLyHqtABN2lbp40mSSCzBcSebif1TPyKjDBcQ0eJJRkIUpHkMPUlnkBU+pnlWItL6ERgw8o1iqRHtgzAUGNRD2qmkvgMvNnneUQcZ4ggR6VGXG+OOA1koNvrFcY7+af++VJe0hucfyKQu+RWJc+SDZ3aNvlPpRl7T0qXdafNZYPDehLEZt/rOBR9U8QSaEKX0jHAaE4tshVrgLeJ+Xdl6rS8D3BWJXKnCEwWXEuco9grQ3bb0sP0Cn8/nPm/SMRQAAAAASUVORK5CYII=",aC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACDSURBVHgB1ZFhDYAgEIWfzgBGIIINpIEViGAkG2gEbWADjWADfMw/iDgUfji/7e3gxt3uHsDXZFrrlrFBHJNpsPAgEEmORArn3lFroEZQCjcTbAhzepPsgbuCgn8FBWvsUAMfFR5OIPGS5G80JkrG2sopHKbO1BCoHy8ZNhRUT5X4BTu6qyNSwwCiMAAAAABJRU5ErkJggg==",lC={class:"menu-container"},cC=["onClick","title"],dC={class:"menu-icon"},uC=["src","alt"],hC={key:3,style:{"font-size":"12px"}},fC={key:0,class:"sub-menu"},pC=["onClick"],Nn=d.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(n,{emit:e}){const t=n,i=d.inject("leiting-theme",d.ref("dark")),s=d.inject("leiting-menu-size",d.ref("medium")),o=d.inject("leitingMethods",d.ref({})),r=d.computed(()=>i.value||i),l=d.computed(()=>s.value||s),a=d.ref([{ID:"home",title:"主视角",src:eC,key:"homeView"},{ID:"tree",title:"目录树",src:sc,key:"componentTree"},{ID:"cadLayer",title:"图层",src:sc,key:"cadLayer"},{ID:"measure",title:"量算",src:tC,key:"measurement"},{ID:"section",title:"剖切",src:nC,key:"section"},{ID:"roam",title:"人物漫游",src:iC,key:"roam"},{ID:"info",title:"构件信息",src:sC,key:"componentInfo"},{ID:"cadPosition",title:"调整位置",src:oC,key:"cadPosition"},{ID:"annotation",title:"标注",src:aC,key:"annotation"},{ID:"setting",title:"设置",src:rC,key:"setting"}]),c=d.ref([]),u=d.ref([...t.activeIds]);d.watch(()=>t.activeIds,T=>{u.value=[...T]},{deep:!0});const h=d.computed(()=>t.visible);o.value&&o.value.menuEvents&&(o.value.menuEvents.on("setMenuListFilter",T=>{c.value=T}),o.value.menuEvents.on("setMenuActive",(T,B)=>{B?u.value.includes(T)||u.value.push(T):u.value=u.value.filter(I=>I!==T)}));const f=d.computed(()=>{let T=a.value;if(t.is2d){const B=["homeView","measurement","cadLayer","annotation"];T=T.filter(I=>I.key&&B.includes(I.key))}else{const B=["cadLayer","cadPosition","annotation"];T=T.filter(I=>!I.key||!B.includes(I.key))}if(c.value.length>0&&(T=T.filter(B=>!B.key||!c.value.includes(B.key))),t.customItems&&t.customItems.length>0){const B=t.customItems.map(I=>({...I,key:I.ID,src:I.src||I.icon}));return[...T,...B]}return T}),p=e,m=T=>{const B=["homeView"];if(T.key&&B.includes(T.key))u.value.includes(T.ID)||(u.value.push(T.ID),setTimeout(()=>{const g=u.value.indexOf(T.ID);g>-1&&u.value.splice(g,1)},1e3));else{const g=u.value.indexOf(T.ID);g>-1?u.value.splice(g,1):u.value.push(T.ID)}const I=u.value.includes(T.ID);T.func&&T.func(T),T.key&&p("action",T.key,I)},y=T=>{a.value=[...a.value,...T]},A=T=>{c.value=T},C=T=>{console.log("LeitingMenu received showMenu event:",T)},E=(T,B)=>{const I=a.value.find(g=>g.ID===T||g.key===T);if(I){const g=u.value.indexOf(I.ID);B&&g===-1?u.value.push(I.ID):!B&&g>-1&&u.value.splice(g,1)}};let x=null;const M=()=>{o.value?.menuEvents&&(x&&(x.off("insertMenu",y),x.off("setMenuListFilter",A),x.off("showMenu",C),x.off("setMenuActive",E)),x=o.value.menuEvents,x.on("insertMenu",y),x.on("setMenuListFilter",A),x.on("showMenu",C),x.on("setMenuActive",E))};return d.onMounted(()=>{M()}),d.onUnmounted(()=>{x&&(x.off("insertMenu",y),x.off("setMenuListFilter",A),x.off("showMenu",C),x.off("setMenuActive",E))}),d.watch(o,()=>{M()},{deep:!0}),(T,B)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["leiting-menu-wrapper",["leiting-theme-"+r.value,"size-"+l.value]])},[d.createElementVNode("div",lC,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(f.value,I=>(d.openBlock(),d.createElementBlock("div",{key:I.ID,class:d.normalizeClass(["menu-item",{active:u.value.includes(I.ID)}]),onClick:g=>m(I),title:I.title},[d.createElementVNode("div",dC,[I.src?(d.openBlock(),d.createElementBlock("img",{key:0,src:I.src,alt:I.title},null,8,uC)):typeof I.icon=="object"?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(I.icon),{key:1})):typeof I.icon=="string"?(d.openBlock(),d.createElementBlock("i",{key:2,class:d.normalizeClass(["iconfont",`icon-${I.icon}`])},null,2)):(d.openBlock(),d.createElementBlock("span",hC,d.toDisplayString(I.title.substring(0,2)),1))]),I.children&&I.children.length>0?(d.openBlock(),d.createElementBlock("div",fC,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(I.children,g=>(d.openBlock(),d.createElementBlock("div",{key:g.ID,class:d.normalizeClass(["sub-menu-item",{active:u.value.includes(g.ID)}]),onClick:d.withModifiers(k=>m(g),["stop"])},d.toDisplayString(g.title),11,pC))),128))])):d.createCommentVNode("",!0)],10,cC))),128))])],2)),[[d.vShow,h.value]])}}),gC={class:"leiting-section-content"},mC={class:"section-form-item"},AC={class:"radio-group"},yC={class:"section-form-item"},CC={class:"switch-container"},EC={class:"switch"},wC={class:"status-text"},bC={class:"section-form-item slider-item"},vC={class:"slider-wrapper"},xC={class:"section-form-item slider-item"},IC={class:"slider-wrapper"},BC={class:"section-form-item slider-item"},SC={class:"slider-wrapper"},MC={class:"section-form-item table-item"},TC={class:"model-table-container"},DC={class:"model-table"},kC={width:"40"},PC=["checked"],FC=["onClick"],RC=["value"],OC={class:"model-name"},Un=Ue(d.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(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:O=>{i("update:visible",O),i("update:open",O)}}),r=d.ref("Box"),l=d.ref(!1),a=d.ref([]),c=d.ref([]),u=d.computed(()=>c.value.length===0?!1:c.value.every(O=>a.value.includes(O.modelId))),h=O=>{O.target.checked?a.value=c.value.map(w=>w.modelId):a.value=[],k()},f=d.ref([-10,10]),p=d.ref([-10,10]),m=d.ref([-10,10]),y=d.ref([-100,100]),A=d.ref([-100,100]),C=d.ref([-100,100]);let E=!1;const x=O=>{E=!0;const{targetZPlus:b,targetZMinus:w,targetXPlus:v,targetXMinus:S,targetYPlus:R,targetYMinus:_}=O;m.value=[-w,b],f.value=[-S,v],p.value=[-_,R],setTimeout(()=>{E=!1},100)},M=()=>{E||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:p.value[1],targetYMinus:-p.value[0]})},T=()=>{s?.value?.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)},B=O=>{if(!s?.value?.getMapTileset||!s?.value?.openSection)return;const w=s.value.getMapTileset()[O];if(w&&w.leiting?.box){const{min:v,max:S}=w.leiting.box,R=(S.x-v.x)/2,_=(S.y-v.y)/2,N=(S.z-v.z)/2;a.value.length<=1&&(y.value=[-R*2,R*2],A.value=[-_*2,_*2],C.value=[-N*2,N*2],f.value=[-R,R],p.value=[-_,_],m.value=[-N,N],s.value.updateSectionRange&&s.value.updateSectionRange({targetZPlus:N,targetZMinus:N,targetXPlus:R,targetXMinus:R,targetYPlus:_,targetYMinus:_})),s.value.openSection(O,{moveCallBack:x}),s.value.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)}},I=O=>{const b=a.value.indexOf(O);b>-1?a.value.splice(b,1):a.value.push(O),k()};let g=[];const k=()=>{const O=a.value.filter(w=>!g.includes(w)),b=g.filter(w=>!a.value.includes(w));O.forEach(w=>B(w)),b.forEach(w=>{s?.value?.closeSection&&s.value.closeSection(w)}),g=[...a.value]},P=()=>{},F=()=>{o.value=!1,i("close")},L=()=>{l.value=!1,a.value=[],g=[],f.value=[-10,10],p.value=[-10,10],m.value=[-10,10],y.value=[-100,100],A.value=[-100,100],C.value=[-100,100]};d.watch(()=>t.visible,O=>{O?H():(s?.value?.closeSection&&s.value.closeSection(),L())});const H=()=>{s?.value&&typeof s.value.getModelList=="function"&&(c.value=s.value.getModelList()||[],c.value.length>0&&a.value.length===0&&(a.value=[c.value[0].modelId],g=[...a.value]),t.visible&&a.value.length>0&&(l.value=!0,a.value.forEach(O=>B(O))))};return d.watch(()=>s?.value,()=>{H()},{immediate:!0,deep:!0}),d.onMounted(()=>{H()}),(O,b)=>(d.openBlock(),d.createBlock(Fe,{visible:o.value,title:"剖切分析",width:300,"full-height":n.fullHeight,"onUpdate:visible":F},{default:d.withCtx(()=>[d.createElementVNode("div",gC,[d.createElementVNode("div",mC,[b[8]||(b[8]=d.createElementVNode("span",{class:"label"},"模式",-1)),d.createElementVNode("div",AC,[d.createElementVNode("label",{class:d.normalizeClass(["radio-item",{active:r.value==="Box"}])},[d.withDirectives(d.createElementVNode("input",{type:"radio",value:"Box","onUpdate:modelValue":b[0]||(b[0]=w=>r.value=w),onChange:P},null,544),[[d.vModelRadio,r.value]]),b[7]||(b[7]=d.createTextVNode(" 剖切盒 ",-1))],2)])]),d.createElementVNode("div",yC,[b[10]||(b[10]=d.createElementVNode("span",{class:"label"},"显示",-1)),d.createElementVNode("div",CC,[d.createElementVNode("label",EC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":b[1]||(b[1]=w=>l.value=w),onChange:T},null,544),[[d.vModelCheckbox,l.value]]),b[9]||(b[9]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",wC,d.toDisplayString(l.value?"显示":"隐藏"),1)])]),d.createElementVNode("div",bC,[b[11]||(b[11]=d.createElementVNode("span",{class:"label"},"X 轴",-1)),d.createElementVNode("div",vC,[d.createVNode(d.unref(Ae.Slider),{value:f.value,"onUpdate:value":b[2]||(b[2]=w=>f.value=w),range:"",min:y.value[0],max:y.value[1],step:.1,onChange:M},null,8,["value","min","max"])])]),d.createElementVNode("div",xC,[b[12]||(b[12]=d.createElementVNode("span",{class:"label"},"Y 轴",-1)),d.createElementVNode("div",IC,[d.createVNode(d.unref(Ae.Slider),{value:p.value,"onUpdate:value":b[3]||(b[3]=w=>p.value=w),range:"",min:A.value[0],max:A.value[1],step:.1,onChange:M},null,8,["value","min","max"])])]),d.createElementVNode("div",BC,[b[13]||(b[13]=d.createElementVNode("span",{class:"label"},"Z 轴",-1)),d.createElementVNode("div",SC,[d.createVNode(d.unref(Ae.Slider),{value:m.value,"onUpdate:value":b[4]||(b[4]=w=>m.value=w),range:"",min:C.value[0],max:C.value[1],step:.1,onChange:M},null,8,["value","min","max"])])]),d.createElementVNode("div",MC,[b[15]||(b[15]=d.createElementVNode("span",{class:"label"},"模型",-1)),d.createElementVNode("div",TC,[d.createElementVNode("table",DC,[d.createElementVNode("thead",null,[d.createElementVNode("tr",null,[d.createElementVNode("th",kC,[d.createElementVNode("input",{type:"checkbox",checked:u.value,onChange:h},null,40,PC)]),b[14]||(b[14]=d.createElementVNode("th",null,"名称",-1))])]),d.createElementVNode("tbody",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(c.value,w=>(d.openBlock(),d.createElementBlock("tr",{key:w.modelId,class:d.normalizeClass({selected:a.value.includes(w.modelId)}),onClick:v=>I(w.modelId)},[d.createElementVNode("td",null,[d.withDirectives(d.createElementVNode("input",{type:"checkbox",value:w.modelId,"onUpdate:modelValue":b[5]||(b[5]=v=>a.value=v),onClick:b[6]||(b[6]=d.withModifiers(()=>{},["stop"])),onChange:k},null,40,RC),[[d.vModelCheckbox,a.value]])]),d.createElementVNode("td",OC,d.toDisplayString(w.modelName),1)],10,FC))),128))])])])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-519b564b"]]),LC={class:"leiting-player-content"},NC={class:"player-form-item"},UC={class:"switch-container"},_C={class:"switch"},QC={class:"status-text"},HC={class:"player-form-item"},GC={class:"switch-container"},YC={class:"switch"},VC={class:"status-text"},WC={class:"player-form-item"},zC={class:"switch-container"},jC={class:"switch"},$C={class:"status-text"},KC={class:"player-form-item slider-item"},XC={class:"slider-wrapper"},qC={class:"value-text"},JC={class:"instructions"},ZC={class:"key-map"},eE={class:"key-row"},tE={class:"key-row"},nE={class:"key-row"},iE={class:"key-row"},sE={class:"key-row"},oE={class:"key-row"},_n=Ue(d.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(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref(!1),r=d.ref(!1),l=d.ref(!0),a=d.ref(.5),c=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:B=>{i("update:visible",B),i("update:open",B)}}),u=d.ref(null),h=d.ref(null),f=d.ref(null),p=d.ref(null),m=d.ref(null),y=d.ref(null),A=()=>{o.value?E():x()},C=()=>{s?.value?.setPlayerParams&&s.value.setPlayerParams({gravityTest:r.value,collisionTest:l.value})},E=async()=>{s?.value?.openPlayer&&(await s.value.openPlayer(),s.value.setPlayerSpeed&&s.value.setPlayerSpeed(a.value),C(),s.value.bindPlayerUiKeys&&(await d.nextTick(),s.value.bindPlayerUiKeys({moveFront:u.value,moveBack:h.value,moveLeft:f.value,moveRight:p.value,moveUp:m.value,moveDown:y.value})))},x=()=>{s?.value?.closePlayer&&s.value.closePlayer()},M=()=>{s?.value?.setPlayerSpeed&&s.value.setPlayerSpeed(a.value)},T=()=>{c.value=!1,i("close")};return d.watch(()=>t.visible,B=>{B?(o.value=!0,s?.value?E():setTimeout(()=>{s?.value&&E()},100)):o.value&&(o.value=!1,x())},{immediate:!0}),(B,I)=>(d.openBlock(),d.createBlock(Fe,{title:n.title,visible:c.value,width:200,"full-height":n.fullHeight,"onUpdate:visible":T},{default:d.withCtx(()=>[d.createElementVNode("div",LC,[d.createElementVNode("div",NC,[I[5]||(I[5]=d.createElementVNode("span",{class:"label"},"启用",-1)),d.createElementVNode("div",UC,[d.createElementVNode("label",_C,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":I[0]||(I[0]=g=>o.value=g),onChange:A},null,544),[[d.vModelCheckbox,o.value]]),I[4]||(I[4]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",QC,d.toDisplayString(o.value?"开启":"关闭"),1)])]),d.createElementVNode("div",HC,[I[7]||(I[7]=d.createElementVNode("span",{class:"label"},"重力",-1)),d.createElementVNode("div",GC,[d.createElementVNode("label",YC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":I[1]||(I[1]=g=>r.value=g),onChange:C},null,544),[[d.vModelCheckbox,r.value]]),I[6]||(I[6]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",VC,d.toDisplayString(r.value?"开启":"关闭"),1)])]),d.createElementVNode("div",WC,[I[9]||(I[9]=d.createElementVNode("span",{class:"label"},"碰撞",-1)),d.createElementVNode("div",zC,[d.createElementVNode("label",jC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":I[2]||(I[2]=g=>l.value=g),onChange:C},null,544),[[d.vModelCheckbox,l.value]]),I[8]||(I[8]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",$C,d.toDisplayString(l.value?"开启":"关闭"),1)])]),d.createElementVNode("div",KC,[I[10]||(I[10]=d.createElementVNode("span",{class:"label"},"速度",-1)),d.createElementVNode("div",XC,[d.createVNode(d.unref(Ae.Slider),{value:a.value,"onUpdate:value":I[3]||(I[3]=g=>a.value=g),min:.1,max:4,step:.1,onChange:M},null,8,["value"])]),d.createElementVNode("span",qC,d.toDisplayString(a.value),1)]),I[19]||(I[19]=d.createElementVNode("div",{class:"divider"},null,-1)),d.createElementVNode("div",JC,[I[18]||(I[18]=d.createElementVNode("div",{class:"instruction-title"},"操作说明",-1)),d.createElementVNode("div",ZC,[d.createElementVNode("div",eE,[d.createElementVNode("span",{class:"key",ref_key:"btnFront",ref:u},"W",512),I[11]||(I[11]=d.createTextVNode(" 前进 ",-1))]),d.createElementVNode("div",tE,[d.createElementVNode("span",{class:"key",ref_key:"btnBack",ref:h},"S",512),I[12]||(I[12]=d.createTextVNode(" 后退 ",-1))]),d.createElementVNode("div",nE,[d.createElementVNode("span",{class:"key",ref_key:"btnLeft",ref:f},"A",512),I[13]||(I[13]=d.createTextVNode(" 左移 ",-1))]),d.createElementVNode("div",iE,[d.createElementVNode("span",{class:"key",ref_key:"btnRight",ref:p},"D",512),I[14]||(I[14]=d.createTextVNode(" 右移 ",-1))]),d.createElementVNode("div",sE,[d.createElementVNode("span",{class:"key",ref_key:"btnUp",ref:m},"Q",512),I[15]||(I[15]=d.createTextVNode(" 上升 ",-1))]),d.createElementVNode("div",oE,[d.createElementVNode("span",{class:"key",ref_key:"btnDown",ref:y},"E",512),I[16]||(I[16]=d.createTextVNode(" 下降 ",-1))]),I[17]||(I[17]=d.createElementVNode("div",{class:"key-row"},[d.createElementVNode("span",{class:"mouse-icon"},"🖱️"),d.createTextVNode(" 按住左键拖拽旋转视角 ")],-1))])])])]),_:1},8,["title","visible","full-height"]))}}),[["__scopeId","data-v-cb96e806"]]),rE={class:"info-content"},aE={key:0,class:"component-title"},Qn=Ue(d.defineComponent({__name:"LeitingInfo",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref([]),r=d.ref([]),l=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:m=>{i("update:visible",m),i("update:open",m)}}),a=()=>{l.value=!1},c=m=>({elementID:"构件ID",elementName:"构件名",categoryName:"类别",familySymbolName:"族类型",levelName:"标高",modelName:"文件名",length:"长",width:"宽",height:"高"})[m]||m,u=["elementName","elementID","modelName","length","width","height","levelName","categoryName","familySymbolName"],h=m=>{if(!m||m.length===0){o.value=[];return}const y=s?.value,A=y?.getMapTileset?y.getMapTileset():{},C=[];m.forEach((E,x)=>{const T=A[E.modelId]?.leiting||{};let B={modelName:T.model?.modelId||E.modelId};B.elementID||(B.elementID=E.elementId);const I=T.node?.nodeExtras?.element||T.node?.nodeExtras;let g=null;if(I){const F=B.elementID;I[F]&&(g=I[F])}g&&g.box3&&(B.length=`${g.box3.length?.toFixed(2)||0}米`,B.width=`${g.box3.width?.toFixed(2)||0}米`,B.height=`${g.box3.height?.toFixed(2)||0}米`);const k=[];g&&(g.name&&(B.elementName=g.name),g.categoryName&&(B.categoryName=g.categoryName),g.familySymbolName&&(B.familySymbolName=g.familySymbolName),g.levelName&&(B.levelName=g.levelName));const P={};if(u.forEach(F=>{B[F]!==void 0&&(P[F]=B[F])}),k.push({name:"基础信息",params:P}),g){const F=Array.isArray(g)?g:Array.isArray(g?.parameters)?g.parameters:null;if(F){if(F.flat().forEach(H=>{if(H&&H.GroupName&&Array.isArray(H.Parameters)){const O={};H.Parameters.forEach(b=>{b.name&&(O[b.name]=b.value??"")}),Object.keys(O).length>0&&k.push({name:H.GroupName,params:O})}}),!Array.isArray(g)){const{parameters:H,...O}=g,b={};Object.keys(O).forEach(w=>{!u.includes(w)&&w!=="uniqueId"&&typeof O[w]!="object"&&(b[w]=O[w])}),Object.keys(b).length>0&&k.push({name:"其他属性",params:b})}}else{let L=!1;if(Object.keys(g).forEach(H=>{g[H]&&typeof g[H]=="object"&&!Array.isArray(g[H])&&(L=!0,k.push({name:H,params:g[H]}))}),!L){const H={};Object.keys(g).forEach(O=>{if(!u.includes(O)&&O!=="batchId"){const b=g[O];typeof b=="string"&&b.length>500?H[O]=b.substring(0,500)+"...":H[O]=b}}),Object.keys(H).length>0&&k.push({name:"属性",params:H})}}}C.push({id:x,title:`${B.modelName}${B.elementName?` - ${B.elementName}`:""}`,groups:k})}),o.value=C,C.length>0?r.value=[`${C[0].id}-基础信息`]:r.value=[]};let f=!1;const p=()=>{if(f)return;const m=s?.value;m&&m.selectionChange&&(m.selectionChange(h),f=!0)};return d.watch(()=>s?.value,()=>{p()},{deep:!0,immediate:!0}),d.onMounted(()=>{p()}),(m,y)=>(d.openBlock(),d.createBlock(Fe,{visible:l.value,title:"构件详情",width:350,align:"right","initial-position":{x:0,y:0},"full-height":n.fullHeight,onClose:a,"onUpdate:visible":y[1]||(y[1]=A=>l.value=A),class:"base-info-card"},{default:d.withCtx(()=>[d.createElementVNode("div",rE,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(o.value,A=>(d.openBlock(),d.createElementBlock("div",{key:A.id,class:"component-block"},[o.value.length>1?(d.openBlock(),d.createElementBlock("div",aE,d.toDisplayString(A.title),1)):d.createCommentVNode("",!0),d.createVNode(d.unref(Ae.Collapse),{activeKey:r.value,"onUpdate:activeKey":y[0]||(y[0]=C=>r.value=C),ghost:"","expand-icon-position":"end"},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(A.groups,C=>(d.openBlock(),d.createBlock(d.unref(Ae.CollapsePanel),{key:`${A.id}-${C.name}`,header:C.name},{default:d.withCtx(()=>[d.createVNode(d.unref(Ae.Descriptions),{size:"small",bordered:"",column:1,labelStyle:{width:"100px",background:"rgba(255,255,255,0.05)",color:"#aaa"},contentStyle:{color:"#fff"}},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(C.params,(E,x)=>(d.openBlock(),d.createBlock(d.unref(Ae.DescriptionsItem),{key:x,label:c(String(x))},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(E),1)]),_:2},1032,["label"]))),128))]),_:2},1024)]),_:2},1032,["header"]))),128))]),_:2},1032,["activeKey"])]))),128))])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-ee93ac19"]]);class oc{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 i=`adjust-marker-${e}-${Date.now()}`;e==="BIM"?this.bimEntityId=i:this.mapEntityId=i,this.viewer.entities.add({id:i,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 i;try{i=this.viewer.scene.pickPosition(t.position)}catch(s){console.warn("pickPosition failed:",s)}if(!i){const s=this.viewer.camera.getPickRay(t.position);i=this.viewer.scene.globe.pick(s,this.viewer.scene)}if(i||(i=this.viewer.camera.pickEllipsoid(t.position,this.viewer.scene.globe.ellipsoid)),i){const s=this.Cesium.Cartographic.fromCartesian(i),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 lE={class:"adjust-panel"},cE={class:"control-panel"},dE={class:"form-item"},uE={class:"radio-group"},hE={class:"form-item"},fE={class:"radio-group"},pE={class:"form-item"},gE={class:"value"},mE={class:"param-row"},AE={class:"param-row"},yE={class:"param-row"},CE={class:"param-row"},EE={class:"param-row"},wE={class:"param-row"},bE={class:"param-row"},vE={class:"button-grid"},xE={key:1,class:"pick-mode-ui"},IE={class:"form-item",style:{display:"block","margin-bottom":"15px"}},BE={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},SE=["checked"],ME={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},TE={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},DE={class:"form-item",style:{display:"block","margin-bottom":"15px"}},kE={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},PE=["checked"],FE={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},RE={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},OE={class:"list-panel"},LE={class:"list-header"},NE={class:"col-check"},UE=["checked"],_E={class:"list-body"},QE={class:"col-check"},HE=["onUpdate:modelValue"],GE={class:"col-index"},YE=["title"],VE={class:"col-main"},WE=["checked","onChange"],Hn=Ue(d.defineComponent({__name:"LeitingPosition",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close","save"],setup(n,{expose:e,emit:t}){const i=n,s=t,o=d.computed({get:()=>i.open!==void 0?i.open:i.visible,set:N=>{s("update:visible",N),s("update:open",N)}}),r=d.inject("leitingMethods"),l=d.ref("BIM"),a=d.ref("param"),c=d.ref(""),u=d.ref([]),h=d.ref("BIM"),f=d.ref(null),p=d.ref(null),m=d.ref(null),y=()=>(!m.value&&r?.value?.getViewer&&r?.value?.getCesium&&(m.value=new oc(r.value.getViewer(),r.value.getCesium())),m.value),A=()=>{y()?.clearMarkers(),f.value=null,p.value=null},C=(N,D)=>{N==="BIM"?f.value=D:p.value=D,y()?.addMarker(N,D),fe.success(`${N==="BIM"?"BIM":"地图"}标记点已添加`)},E=()=>{y()?.registerPickHandler(N=>{C(h.value,N)})},x=()=>{y()?.destroyPickHandler()},M=()=>{if(!f.value||!p.value){fe.warning("请先选择BIM标记点和地图标记点");return}if(!c.value){fe.warning("请先选择主模型");return}const N=y();let D=0,Q=0,V=0;if(N){const{dLon:$,dLat:q,dHeight:ne}=N.calculateOffset(f.value,p.value);D=$,Q=q,V=ne}else D=p.value.longitude-f.value.longitude,Q=p.value.latitude-f.value.latitude,V=p.value.height-f.value.height;B.value.longitude+=D,B.value.latitude+=Q,B.value.height+=V,w(c.value,{longitude:B.value.longitude,latitude:B.value.latitude,height:B.value.height}),fe.success("位置已调整")};d.watch(()=>a.value,N=>{N==="pick"?E():x()}),e({addMarker:C,setModelType:N=>{(N==="BIM"||N==="OSGB")&&(l.value=N)}});const B=d.ref({longitude:0,latitude:0,lonlat:1e-6,heightDistance:1,rotation:30,totalRotation:0,height:0,X:0,Y:0,Z:0}),I=d.computed(()=>{const N=u.value.find(D=>D.modelId===c.value);return N?N.modelName:""}),g=d.computed(()=>P.value.length>0&&P.value.every(N=>N.selected)),k=()=>{o.value=!1,s("close")},P=d.computed(()=>u.value.filter(N=>N.type===l.value)),F=N=>{const D=N.target.checked;P.value.forEach(Q=>Q.selected=D)},L=()=>{if(!r?.value)return;const N=r.value,D=N.getMapTileset?N.getMapTileset():{},Q=[];if(Object.keys(D).forEach(V=>{const q=D[V].leiting||{};q.model&&Q.push({modelId:q.model.modelId,modelName:q.model.modelName,selected:!1,formData:q.model.formData||{},dbName:q.model.dbName,url:q.model.url,type:q.model.type||"BIM"})}),u.value=Q,Q.length>0){const V=N.getBIMmodelId?N.getBIMmodelId():"";V&&Q.find($=>$.modelId===V)?O(V):O(Q[0].modelId),Q.forEach($=>$.selected=!0)}},H=()=>{fe.info("拖动右下角标,可显示模型列表",void 0,2)},O=N=>{c.value=N;const D=u.value.find(Q=>Q.modelId===N);D&&D.formData&&Object.keys(B.value).forEach(Q=>{D.formData[Q]!==void 0&&(B.value[Q]=D.formData[Q])})},b=N=>r?.value?.getMapTileset?r.value.getMapTileset()[N]:null,w=(N,D)=>{const Q=b(N),V=r.value.getCesium();if(Q&&V){if(Q.leiting?.model){Q.leiting.model.formData={...Q.leiting.model.formData,...D};const $=u.value.find(q=>q.modelId===N);$&&($.formData=Q.leiting.model.formData)}dr({Cesium:V,tileset:Q})}},v=N=>{if(!c.value)return;const D=B.value[N];w(c.value,{[N]:D})},S=N=>{const D=P.value.filter(q=>q.selected);if(D.length===0){fe.warning("请先选择要调整的模型");return}const{lonlat:Q,heightDistance:V,rotation:$}=B.value;D.forEach(q=>{const ne={...q.formData};switch(N){case"north":ne.latitude+=Q;break;case"south":ne.latitude-=Q;break;case"east":ne.longitude+=Q;break;case"west":ne.longitude-=Q;break;case"up":ne.height+=V;break;case"down":ne.height-=V;break;case"rotateLeft":ne.totalRotation=(ne.totalRotation||0)-$;break;case"rotateRight":ne.totalRotation=(ne.totalRotation||0)+$;break}q.modelId===c.value&&Object.assign(B.value,ne),w(q.modelId,ne)})},R=()=>{if(!c.value){fe.warning("请先选择主模型");return}const N=b(c.value);if(!N||!r?.value?.getViewer)return;const D=r.value.getViewer(),Q=r.value.getCesium(),V=N.boundingSphere;D.camera.flyToBoundingSphere(V,{offset:new Q.HeadingPitchRange(0,Q.Math.toRadians(-90),V.radius*2),duration:1.5})},_=()=>{r?.value?.saveRegion?(r.value.saveRegion(u.value),s("save",d.unref(u))):(console.log("Save models:",u.value),fe.warning("未找到保存接口,数据已打印控制台"))};return d.watch(()=>i.visible,N=>{N?(L(),H(),a.value==="pick"&&E()):(x(),A())}),d.onMounted(()=>{i.visible&&(L(),H(),a.value==="pick"&&E())}),(N,D)=>(d.openBlock(),d.createBlock(Fe,{visible:o.value,title:"调整位置(调整前可选择正北俯视)",width:282,"full-height":n.fullHeight,"onUpdate:visible":D[25]||(D[25]=Q=>o.value=Q),onClose:k,onSave:_},{default:d.withCtx(()=>[d.createElementVNode("div",lE,[d.createElementVNode("div",cE,[d.createElementVNode("div",dE,[D[26]||(D[26]=d.createElementVNode("label",null,"模型类型:",-1)),d.createElementVNode("div",uE,[d.createElementVNode("span",{class:d.normalizeClass({active:l.value==="BIM"}),onClick:D[0]||(D[0]=Q=>l.value="BIM")},"BIM模型",2),d.createElementVNode("span",{class:d.normalizeClass({active:l.value==="OSGB"}),onClick:D[1]||(D[1]=Q=>l.value="OSGB")},"倾斜摄影",2)])]),d.createElementVNode("div",hE,[D[27]||(D[27]=d.createElementVNode("label",null,"调整操作:",-1)),d.createElementVNode("div",fE,[d.createElementVNode("span",{class:d.normalizeClass({active:a.value==="param"}),onClick:D[2]||(D[2]=Q=>a.value="param")},"参数模式",2),d.createElementVNode("span",{class:d.normalizeClass({active:a.value==="pick"}),onClick:D[3]||(D[3]=Q=>a.value="pick")},"地图点选",2)])]),d.createElementVNode("div",pE,[D[28]||(D[28]=d.createElementVNode("label",null,"当前主模型:",-1)),d.createElementVNode("span",gE,d.toDisplayString(I.value||"未选择"),1)]),D[42]||(D[42]=d.createElementVNode("div",{class:"separator"},null,-1)),a.value==="param"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[D[36]||(D[36]=d.createElementVNode("div",{class:"group-header"},"当前状态",-1)),d.createElementVNode("div",mE,[D[29]||(D[29]=d.createElementVNode("label",null,"经度(东西):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[4]||(D[4]=Q=>B.value.longitude=Q),onChange:D[5]||(D[5]=Q=>v("longitude")),step:"0.000001"},null,544),[[d.vModelText,B.value.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",AE,[D[30]||(D[30]=d.createElementVNode("label",null,"纬度(南北):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[6]||(D[6]=Q=>B.value.latitude=Q),onChange:D[7]||(D[7]=Q=>v("latitude")),step:"0.000001"},null,544),[[d.vModelText,B.value.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",yE,[D[31]||(D[31]=d.createElementVNode("label",null,"高度(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[8]||(D[8]=Q=>B.value.height=Q),onChange:D[9]||(D[9]=Q=>v("height")),step:"0.1"},null,544),[[d.vModelText,B.value.height,void 0,{number:!0}]])]),d.createElementVNode("div",CE,[D[32]||(D[32]=d.createElementVNode("label",null,"累计旋转(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[10]||(D[10]=Q=>B.value.totalRotation=Q),onChange:D[11]||(D[11]=Q=>v("totalRotation")),step:"1"},null,544),[[d.vModelText,B.value.totalRotation,void 0,{number:!0}]])]),D[37]||(D[37]=d.createElementVNode("div",{class:"separator"},null,-1)),D[38]||(D[38]=d.createElementVNode("div",{class:"group-header"},"调整步长",-1)),d.createElementVNode("div",EE,[D[33]||(D[33]=d.createElementVNode("label",null,"经纬步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[12]||(D[12]=Q=>B.value.lonlat=Q),step:"0.000001"},null,512),[[d.vModelText,B.value.lonlat,void 0,{number:!0}]])]),d.createElementVNode("div",wE,[D[34]||(D[34]=d.createElementVNode("label",null,"高度步长(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[13]||(D[13]=Q=>B.value.heightDistance=Q),step:"0.1"},null,512),[[d.vModelText,B.value.heightDistance,void 0,{number:!0}]])]),d.createElementVNode("div",bE,[D[35]||(D[35]=d.createElementVNode("label",null,"旋转步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[14]||(D[14]=Q=>B.value.rotation=Q),step:"1"},null,512),[[d.vModelText,B.value.rotation,void 0,{number:!0}]])]),d.createElementVNode("div",vE,[d.createElementVNode("button",{onClick:D[15]||(D[15]=Q=>S("rotateLeft"))},"左转"),d.createElementVNode("button",{onClick:D[16]||(D[16]=Q=>S("north"))},"北移"),d.createElementVNode("button",{onClick:D[17]||(D[17]=Q=>S("rotateRight"))},"右转"),d.createElementVNode("button",{onClick:D[18]||(D[18]=Q=>S("west"))},"西移"),d.createElementVNode("button",{onClick:D[19]||(D[19]=Q=>S("south"))},"南移"),d.createElementVNode("button",{onClick:D[20]||(D[20]=Q=>S("east"))},"东移"),d.createElementVNode("button",{onClick:D[21]||(D[21]=Q=>S("up"))},"上移"),d.createElementVNode("button",{onClick:D[22]||(D[22]=Q=>S("down"))},"下移"),d.createElementVNode("button",{onClick:R,class:"primary-btn"},"正北俯视"),d.createElementVNode("button",{onClick:_,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):a.value==="pick"?(d.openBlock(),d.createElementBlock("div",xE,[d.createElementVNode("div",IE,[d.createElementVNode("div",BE,[d.createElementVNode("div",{onClick:D[23]||(D[23]=Q=>h.value="BIM"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[d.createElementVNode("input",{type:"radio",checked:h.value==="BIM",style:{"margin-right":"5px"}},null,8,SE),D[39]||(D[39]=d.createElementVNode("span",{style:{"font-weight":"bold"}},"BIM标记点:",-1))]),f.value?(d.openBlock(),d.createElementBlock("div",ME,[d.createElementVNode("div",null,"经度:"+d.toDisplayString(f.value.longitude.toFixed(10)),1),d.createElementVNode("div",null,"纬度:"+d.toDisplayString(f.value.latitude.toFixed(10)),1)])):(d.openBlock(),d.createElementBlock("div",TE,"未选择"))])]),d.createElementVNode("div",DE,[d.createElementVNode("div",kE,[d.createElementVNode("div",{onClick:D[24]||(D[24]=Q=>h.value="MAP"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[d.createElementVNode("input",{type:"radio",checked:h.value==="MAP",style:{"margin-right":"5px"}},null,8,PE),D[40]||(D[40]=d.createElementVNode("span",{style:{"font-weight":"bold"}},"地图标记点:",-1))]),p.value?(d.openBlock(),d.createElementBlock("div",FE,[d.createElementVNode("div",null,"经度:"+d.toDisplayString(p.value.longitude.toFixed(10)),1),d.createElementVNode("div",null,"纬度:"+d.toDisplayString(p.value.latitude.toFixed(10)),1)])):(d.openBlock(),d.createElementBlock("div",RE,"未选择"))])]),d.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[d.createElementVNode("button",{onClick:M},"调整位置"),d.createElementVNode("button",{onClick:_},"保存")]),D[41]||(D[41]=d.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[d.createElementVNode("div",null,"操作指南:"),d.createElementVNode("div",null,"1. 勾选上方 BIM 或 地图 标记点选项。"),d.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),d.createElementVNode("div",null,"3. 采集两点后,点击“调整位置”进行校准。")],-1))])):d.createCommentVNode("",!0)]),d.createElementVNode("div",OE,[d.createElementVNode("div",LE,[d.createElementVNode("div",NE,[d.createElementVNode("input",{type:"checkbox",checked:g.value,onChange:F},null,40,UE)]),D[43]||(D[43]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),D[44]||(D[44]=d.createElementVNode("div",{class:"col-name"},"名称",-1)),D[45]||(D[45]=d.createElementVNode("div",{class:"col-main"},"主模型",-1))]),d.createElementVNode("div",_E,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(P.value,(Q,V)=>(d.openBlock(),d.createElementBlock("div",{key:Q.modelId,class:d.normalizeClass(["list-item",{active:Q.modelId===c.value}])},[d.createElementVNode("div",QE,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":$=>Q.selected=$},null,8,HE),[[d.vModelCheckbox,Q.selected]])]),d.createElementVNode("div",GE,d.toDisplayString(V+1),1),d.createElementVNode("div",{class:"col-name",title:Q.modelName},d.toDisplayString(Q.modelName),9,YE),d.createElementVNode("div",VE,[d.createElementVNode("input",{type:"radio",name:"mainModel",checked:Q.modelId===c.value,onChange:$=>O(Q.modelId)},null,40,WE)])],2))),128))])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-6cbc261f"]]);function Pi(){return Pi=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Pi.apply(null,arguments)}const zE={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:"下一世纪"},jE={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},rc={lang:Pi({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},zE),timePickerLocale:Pi({},jE)};rc.lang.ok="确定";var Fi={exports:{}},$E=Fi.exports,ac;function lc(){return ac||(ac=1,(function(n,e){(function(t,i){n.exports=i()})($E,(function(){var t=1e3,i=6e4,s=36e5,o="millisecond",r="second",l="minute",a="hour",c="day",u="week",h="month",f="quarter",p="year",m="date",y="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,E={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(O){var b=["th","st","nd","rd"],w=O%100;return"["+O+(b[(w-20)%10]||b[w]||b[0])+"]"}},x=function(O,b,w){var v=String(O);return!v||v.length>=b?O:""+Array(b+1-v.length).join(w)+O},M={s:x,z:function(O){var b=-O.utcOffset(),w=Math.abs(b),v=Math.floor(w/60),S=w%60;return(b<=0?"+":"-")+x(v,2,"0")+":"+x(S,2,"0")},m:function O(b,w){if(b.date()<w.date())return-O(w,b);var v=12*(w.year()-b.year())+(w.month()-b.month()),S=b.clone().add(v,h),R=w-S<0,_=b.clone().add(v+(R?-1:1),h);return+(-(v+(w-S)/(R?S-_:_-S))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:h,y:p,w:u,d:c,D:m,h:a,m:l,s:r,ms:o,Q:f}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},T="en",B={};B[T]=E;var I="$isDayjsObject",g=function(O){return O instanceof L||!(!O||!O[I])},k=function O(b,w,v){var S;if(!b)return T;if(typeof b=="string"){var R=b.toLowerCase();B[R]&&(S=R),w&&(B[R]=w,S=R);var _=b.split("-");if(!S&&_.length>1)return O(_[0])}else{var N=b.name;B[N]=b,S=N}return!v&&S&&(T=S),S||!v&&T},P=function(O,b){if(g(O))return O.clone();var w=typeof b=="object"?b:{};return w.date=O,w.args=arguments,new L(w)},F=M;F.l=k,F.i=g,F.w=function(O,b){return P(O,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var L=(function(){function O(w){this.$L=k(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[I]=!0}var b=O.prototype;return b.parse=function(w){this.$d=(function(v){var S=v.date,R=v.utc;if(S===null)return new Date(NaN);if(F.u(S))return new Date;if(S instanceof Date)return new Date(S);if(typeof S=="string"&&!/Z$/i.test(S)){var _=S.match(A);if(_){var N=_[2]-1||0,D=(_[7]||"0").substring(0,3);return R?new Date(Date.UTC(_[1],N,_[3]||1,_[4]||0,_[5]||0,_[6]||0,D)):new Date(_[1],N,_[3]||1,_[4]||0,_[5]||0,_[6]||0,D)}}return new Date(S)})(w),this.init()},b.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},b.$utils=function(){return F},b.isValid=function(){return this.$d.toString()!==y},b.isSame=function(w,v){var S=P(w);return this.startOf(v)<=S&&S<=this.endOf(v)},b.isAfter=function(w,v){return P(w)<this.startOf(v)},b.isBefore=function(w,v){return this.endOf(v)<P(w)},b.$g=function(w,v,S){return F.u(w)?this[v]:this.set(S,w)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(w,v){var S=this,R=!!F.u(v)||v,_=F.p(w),N=function(Y,j){var J=F.w(S.$u?Date.UTC(S.$y,j,Y):new Date(S.$y,j,Y),S);return R?J:J.endOf(c)},D=function(Y,j){return F.w(S.toDate()[Y].apply(S.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(j)),S)},Q=this.$W,V=this.$M,$=this.$D,q="set"+(this.$u?"UTC":"");switch(_){case p:return R?N(1,0):N(31,11);case h:return R?N(1,V):N(0,V+1);case u:var ne=this.$locale().weekStart||0,se=(Q<ne?Q+7:Q)-ne;return N(R?$-se:$+(6-se),V);case c:case m:return D(q+"Hours",0);case a:return D(q+"Minutes",1);case l:return D(q+"Seconds",2);case r:return D(q+"Milliseconds",3);default:return this.clone()}},b.endOf=function(w){return this.startOf(w,!1)},b.$set=function(w,v){var S,R=F.p(w),_="set"+(this.$u?"UTC":""),N=(S={},S[c]=_+"Date",S[m]=_+"Date",S[h]=_+"Month",S[p]=_+"FullYear",S[a]=_+"Hours",S[l]=_+"Minutes",S[r]=_+"Seconds",S[o]=_+"Milliseconds",S)[R],D=R===c?this.$D+(v-this.$W):v;if(R===h||R===p){var Q=this.clone().set(m,1);Q.$d[N](D),Q.init(),this.$d=Q.set(m,Math.min(this.$D,Q.daysInMonth())).$d}else N&&this.$d[N](D);return this.init(),this},b.set=function(w,v){return this.clone().$set(w,v)},b.get=function(w){return this[F.p(w)]()},b.add=function(w,v){var S,R=this;w=Number(w);var _=F.p(v),N=function(V){var $=P(R);return F.w($.date($.date()+Math.round(V*w)),R)};if(_===h)return this.set(h,this.$M+w);if(_===p)return this.set(p,this.$y+w);if(_===c)return N(1);if(_===u)return N(7);var D=(S={},S[l]=i,S[a]=s,S[r]=t,S)[_]||1,Q=this.$d.getTime()+w*D;return F.w(Q,this)},b.subtract=function(w,v){return this.add(-1*w,v)},b.format=function(w){var v=this,S=this.$locale();if(!this.isValid())return S.invalidDate||y;var R=w||"YYYY-MM-DDTHH:mm:ssZ",_=F.z(this),N=this.$H,D=this.$m,Q=this.$M,V=S.weekdays,$=S.months,q=S.meridiem,ne=function(j,J,oe,le){return j&&(j[J]||j(v,R))||oe[J].slice(0,le)},se=function(j){return F.s(N%12||12,j,"0")},Y=q||function(j,J,oe){var le=j<12?"AM":"PM";return oe?le.toLowerCase():le};return R.replace(C,(function(j,J){return J||(function(oe){switch(oe){case"YY":return String(v.$y).slice(-2);case"YYYY":return F.s(v.$y,4,"0");case"M":return Q+1;case"MM":return F.s(Q+1,2,"0");case"MMM":return ne(S.monthsShort,Q,$,3);case"MMMM":return ne($,Q);case"D":return v.$D;case"DD":return F.s(v.$D,2,"0");case"d":return String(v.$W);case"dd":return ne(S.weekdaysMin,v.$W,V,2);case"ddd":return ne(S.weekdaysShort,v.$W,V,3);case"dddd":return V[v.$W];case"H":return String(N);case"HH":return F.s(N,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return Y(N,D,!0);case"A":return Y(N,D,!1);case"m":return String(D);case"mm":return F.s(D,2,"0");case"s":return String(v.$s);case"ss":return F.s(v.$s,2,"0");case"SSS":return F.s(v.$ms,3,"0");case"Z":return _}return null})(j)||_.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(w,v,S){var R,_=this,N=F.p(v),D=P(w),Q=(D.utcOffset()-this.utcOffset())*i,V=this-D,$=function(){return F.m(_,D)};switch(N){case p:R=$()/12;break;case h:R=$();break;case f:R=$()/3;break;case u:R=(V-Q)/6048e5;break;case c:R=(V-Q)/864e5;break;case a:R=V/s;break;case l:R=V/i;break;case r:R=V/t;break;default:R=V}return S?R:F.a(R)},b.daysInMonth=function(){return this.endOf(h).$D},b.$locale=function(){return B[this.$L]},b.locale=function(w,v){if(!w)return this.$L;var S=this.clone(),R=k(w,v,!0);return R&&(S.$L=R),S},b.clone=function(){return F.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},O})(),H=L.prototype;return P.prototype=H,[["$ms",o],["$s",r],["$m",l],["$H",a],["$W",c],["$M",h],["$y",p],["$D",m]].forEach((function(O){H[O[1]]=function(b){return this.$g(b,O[0],O[1])}})),P.extend=function(O,b){return O.$i||(O(b,L,P),O.$i=!0),P},P.locale=k,P.isDayjs=g,P.unix=function(O){return P(1e3*O)},P.en=B[T],P.Ls=B,P.p={},P}))})(Fi)),Fi.exports}var KE=lc();const ze=Zt(KE);var Ri={exports:{}},XE=Ri.exports,cc;function qE(){return cc||(cc=1,(function(n,e){(function(t,i){n.exports=i(lc())})(XE,(function(t){function i(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var s=i(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}))})(Ri)),Ri.exports}qE();var Oi={exports:{}},JE=Oi.exports,dc;function ZE(){return dc||(dc=1,(function(n,e){(function(t,i){n.exports=i()})(JE,(function(){return function(t,i,s){var o=i.prototype,r=function(h){return h&&(h.indexOf?h:h.s)},l=function(h,f,p,m,y){var A=h.name?h:h.$locale(),C=r(A[f]),E=r(A[p]),x=C||E.map((function(T){return T.slice(0,m)}));if(!y)return x;var M=A.weekStart;return x.map((function(T,B){return x[(B+(M||0))%7]}))},a=function(){return s.Ls[s.locale()]},c=function(h,f){return h.formats[f]||(function(p){return p.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(m,y,A){return y||A.slice(1)}))})(h.formats[f.toUpperCase()])},u=function(){var h=this;return{months:function(f){return f?f.format("MMMM"):l(h,"months")},monthsShort:function(f){return f?f.format("MMM"):l(h,"monthsShort","months",3)},firstDayOfWeek:function(){return h.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):l(h,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):l(h,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):l(h,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return c(h.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return u.bind(this)()},s.localeData=function(){var h=a();return{firstDayOfWeek:function(){return h.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 c(h,f)},meridiem:h.meridiem,ordinal:h.ordinal}},s.months=function(){return l(a(),"months")},s.monthsShort=function(){return l(a(),"monthsShort","months",3)},s.weekdays=function(h){return l(a(),"weekdays",null,null,h)},s.weekdaysShort=function(h){return l(a(),"weekdaysShort","weekdays",3,h)},s.weekdaysMin=function(h){return l(a(),"weekdaysMin","weekdays",2,h)}}}))})(Oi)),Oi.exports}var ew=ZE();const tw=Zt(ew);var Li={exports:{}},nw=Li.exports,uc;function iw(){return uc||(uc=1,(function(n,e){(function(t,i){n.exports=i()})(nw,(function(){return function(t,i){i.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")}}}))})(Li)),Li.exports}var sw=iw();const ow=Zt(sw);var Ni={exports:{}},rw=Ni.exports,hc;function aw(){return hc||(hc=1,(function(n,e){(function(t,i){n.exports=i()})(rw,(function(){var t="week",i="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 c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=r(this).startOf(i).add(1,i).date(c),h=r(this).endOf(t);if(u.isBefore(h))return 1}var f=r(this).startOf(i).date(c).startOf(t).subtract(1,"millisecond"),p=this.diff(f,t,!0);return p<0?r(this).startOf("week").week():Math.ceil(p)},l.weeks=function(a){return a===void 0&&(a=null),this.week(a)}}}))})(Ni)),Ni.exports}var lw=aw();const cw=Zt(lw);var Ui={exports:{}},dw=Ui.exports,fc;function uw(){return fc||(fc=1,(function(n,e){(function(t,i){n.exports=i()})(dw,(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"},i=/(\[[^[]*\])|([-_:/.,()\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={},c=function(A){return(A=+A)+(A>68?1900:2e3)},u=function(A){return function(C){this[A]=+C}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(A){(this.zone||(this.zone={})).offset=(function(C){if(!C||C==="Z")return 0;var E=C.match(/([+-]|\d\d)/g),x=60*E[1]+(+E[2]||0);return x===0?0:E[0]==="+"?-x:x})(A)}],f=function(A){var C=a[A];return C&&(C.indexOf?C:C.s.concat(C.f))},p=function(A,C){var E,x=a.meridiem;if(x){for(var M=1;M<=24;M+=1)if(A.indexOf(x(M,0,C))>-1){E=M>12;break}}else E=A===(C?"pm":"PM");return E},m={A:[l,function(A){this.afternoon=p(A,!1)}],a:[l,function(A){this.afternoon=p(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,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[o,u("day")],Do:[l,function(A){var C=a.ordinal,E=A.match(/\d+/);if(this.day=E[0],C)for(var x=1;x<=31;x+=1)C(x).replace(/\[|\]/g,"")===A&&(this.day=x)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[l,function(A){var C=f("months"),E=(f("monthsShort")||C.map((function(x){return x.slice(0,3)}))).indexOf(A)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[l,function(A){var C=f("months").indexOf(A)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(A){this.year=c(A)}],YYYY:[/\d{4}/,u("year")],Z:h,ZZ:h};function y(A){var C,E;C=A,E=a&&a.formats;for(var x=(A=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(P,F,L){var H=L&&L.toUpperCase();return F||E[L]||t[L]||E[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(O,b,w){return b||w.slice(1)}))}))).match(i),M=x.length,T=0;T<M;T+=1){var B=x[T],I=m[B],g=I&&I[0],k=I&&I[1];x[T]=k?{regex:g,parser:k}:B.replace(/^\[|\]$/g,"")}return function(P){for(var F={},L=0,H=0;L<M;L+=1){var O=x[L];if(typeof O=="string")H+=O.length;else{var b=O.regex,w=O.parser,v=P.slice(H),S=b.exec(v)[0];w.call(F,S),P=P.replace(S,"")}}return(function(R){var _=R.afternoon;if(_!==void 0){var N=R.hours;_?N<12&&(R.hours+=12):N===12&&(R.hours=0),delete R.afternoon}})(F),F}}return function(A,C,E){E.p.customParseFormat=!0,A&&A.parseTwoDigitYear&&(c=A.parseTwoDigitYear);var x=C.prototype,M=x.parse;x.parse=function(T){var B=T.date,I=T.utc,g=T.args;this.$u=I;var k=g[1];if(typeof k=="string"){var P=g[2]===!0,F=g[3]===!0,L=P||F,H=g[2];F&&(H=g[2]),a=this.$locale(),!P&&H&&(a=E.Ls[H]),this.$d=(function(v,S,R,_){try{if(["x","X"].indexOf(S)>-1)return new Date((S==="X"?1e3:1)*v);var N=y(S)(v),D=N.year,Q=N.month,V=N.day,$=N.hours,q=N.minutes,ne=N.seconds,se=N.milliseconds,Y=N.zone,j=N.week,J=new Date,oe=V||(D||Q?1:J.getDate()),le=D||J.getFullYear(),ge=0;D&&!Q||(ge=Q>0?Q-1:J.getMonth());var we,me=$||0,Re=q||0,ct=ne||0,$e=se||0;return Y?new Date(Date.UTC(le,ge,oe,me,Re,ct,$e+60*Y.offset*1e3)):R?new Date(Date.UTC(le,ge,oe,me,Re,ct,$e)):(we=new Date(le,ge,oe,me,Re,ct,$e),j&&(we=_(we).week(j).toDate()),we)}catch{return new Date("")}})(B,k,I,E),this.init(),H&&H!==!0&&(this.$L=this.locale(H).$L),L&&B!=this.format(k)&&(this.$d=new Date("")),a={}}else if(k instanceof Array)for(var O=k.length,b=1;b<=O;b+=1){g[1]=k[b-1];var w=E.apply(this,g);if(w.isValid()){this.$d=w.$d,this.$L=w.$L,this.init();break}b===O&&(this.$d=new Date(""))}else M.call(this,T)}}}))})(Ui)),Ui.exports}var hw=uw();const fw=Zt(hw),pw={class:"setting-panel"},gw={class:"tabs-header"},mw={class:"tab-content"},Aw={key:0,class:"section"},yw={class:"setting-item"},Cw={class:"setting-item"},Ew={class:"setting-item"},ww={key:1,class:"section"},bw={class:"tabs-header",style:{"margin-bottom":"8px"}},vw={key:0},xw={class:"setting-item column"},Iw={class:"setting-item column"},Bw={class:"setting-item"},Sw={key:1},Mw={class:"setting-item column"},Tw={class:"setting-item column",style:{"margin-top":"12px","border-top":"1px solid rgba(255,255,255,0.1)","padding-top":"8px"}},Dw={class:"search-box"},kw={key:2,class:"section"},Pw={class:"setting-item"},Fw={key:0,class:"setting-item column"},Rw={class:"sub-label"},Ow={class:"setting-item"},Lw={class:"setting-item"},Nw={class:"setting-item column"},Uw={class:"setting-item column"},_w={class:"sub-label"},Qw={class:"setting-item column"},Hw={class:"sub-label"},Gw={class:"setting-item column"},Yw={class:"sub-label"},Vw={class:"setting-item column"},Ww={style:{display:"flex",gap:"8px","margin-bottom":"8px"}},zw=["onClick","title"],jw={style:{display:"flex",gap:"8px","align-items":"center"}},$w={key:3,class:"section"},Kw={class:"setting-item"},Xw={class:"setting-item column"},Gn=Ue(d.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(n,{emit:e}){ze.locale("zh-cn"),ze.extend(tw),ze.extend(ow),ze.extend(cw),ze.extend(fw);const t=Ae.Switch,i=Ae.Radio.Group,s=Ae.Radio,o=Ae.Input,r=Ae.Slider,l=Ae.Select,a=Ae.Select.Option,c=Ae.DatePicker,u=n,h=e,f=d.inject("leitingMethods"),p=d.computed({get:()=>u.open!==void 0?u.open:u.visible,set:b=>{h("update:visible",b),h("update:open",b)}}),m=d.ref("GIS"),y=d.reactive({globe:!1,terrain:!1,depthTest:!1}),A=d.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=d.reactive({shadows:!1,shadowDarkness:.7,environmentMap:!1,ambientOcclusion:!1,time:ze("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%)"}),E=d.reactive({collision:!1,habit:0}),x=b=>{b&&(b.globe!==void 0&&(y.globe=b.globe),b.terrain!==void 0&&(y.terrain=b.terrain),b.depthTest!==void 0&&(y.depthTest=b.depthTest),b.mapProvider!==void 0&&(A.provider=b.mapProvider),b.tiandituLayerType!==void 0&&(A.tianditu.layerType=b.tiandituLayerType),b.tiandituShowLabel!==void 0&&(A.tianditu.showLabel=b.tiandituShowLabel),b.arcgisUrl!==void 0&&(A.arcgis.url=b.arcgisUrl),b.shadows!==void 0&&(C.shadows=b.shadows),b.shadowDarkness!==void 0&&(C.shadowDarkness=b.shadowDarkness),b.environmentMap!==void 0&&(C.environmentMap=b.environmentMap),b.ambientOcclusion!==void 0&&(C.ambientOcclusion=b.ambientOcclusion),b.time!==void 0&&(typeof b.time=="number"?C.time=ze().startOf("day").add(b.time,"hour"):C.time=ze(b.time)),b.brightness!==void 0&&(C.brightness=b.brightness),b.contrast!==void 0&&(C.contrast=b.contrast),b.saturation!==void 0&&(C.saturation=b.saturation),b.backgroundColor!==void 0&&(C.backgroundColor=b.backgroundColor),b.collision!==void 0&&(E.collision=b.collision),b.mouseHabit!==void 0&&(E.habit=b.mouseHabit))};d.watch(()=>u.initialConfig,b=>{x(b)},{deep:!0,immediate:!0});const M=["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%)"],T=[{label:"全球影像地图服务(墨卡托)",value:"img_w"},{label:"全球影像地图服务(经纬度)",value:"img_c"},{label:"全球矢量地图服务(墨卡托)",value:"vec_w"},{label:"全球矢量地图服务(经纬度)",value:"vec_c"},{label:"全球地形晕渲服务(墨卡托)",value:"ter_w"},{label:"全球地形晕渲服务(经纬度)",value:"ter_c"}],B=()=>{const b=A.provider,w={};b==="tianditu"?(w.token=A.tianditu.token,w.layerType=A.tianditu.layerType,w.showAnnotation=A.tianditu.showLabel):b==="arcgis"&&(w.url=A.arcgis.url),f.value?.changeBaseMap?.(b,w)};d.watch(()=>A.provider,B),d.watch(()=>A.tianditu.layerType,B),d.watch(()=>A.tianditu.showLabel,B),d.watch(()=>A.tianditu.token,us(B,1e3)),d.watch(()=>A.arcgis.url,us(B,1e3)),d.onMounted(()=>{u.tiandituToken&&(A.tianditu.token=u.tiandituToken)}),d.watch(()=>y.globe,b=>f.value?.setGlobeEnvironmentVisible?.(b)),d.watch(()=>y.terrain,b=>f.value?.setTerrainEnable?.(b)),d.watch(()=>y.depthTest,b=>f.value?.setDepthTestEnable?.(b)),d.watch(()=>f?.value,b=>{if(b){if(b.getConfigure=()=>({globe:y.globe,terrain:y.terrain,depthTest:y.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:ze.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:E.collision,mouseHabit:E.habit}),b.setConfigure=w=>{x(w)},b.setBackgroundColor&&C.backgroundColor&&b.setBackgroundColor(C.backgroundColor),b.setGlobeEnvironmentVisible&&b.setGlobeEnvironmentVisible(y.globe),b.setShadowsEnable&&b.setShadowsEnable(C.shadows),b.setShadowDarkness&&b.setShadowDarkness(C.shadowDarkness),b.setEnvironmentMapEnable&&b.setEnvironmentMapEnable(C.environmentMap),b.setAmbientOcclusion&&b.setAmbientOcclusion(C.ambientOcclusion),b.setTime){const w=ze.isDayjs(C.time)?C.time.toDate():new Date;b.setTime(w)}b.setModelBrightness&&b.setModelBrightness(C.brightness),b.setCollisionDetection&&b.setCollisionDetection(E.collision),b.setMouseHabit&&b.setMouseHabit(E.habit),b.changeBaseMap&&A.baseMap&&b.changeBaseMap(A.baseMap,{token:A.tianditu.token,layerType:A.tianditu.layerType,showAnnotation:A.tianditu.showLabel,url:A.arcgis.url})}},{immediate:!0});const I=d.computed({get:()=>{const b=C.backgroundColor;return/^#[0-9A-Fa-f]{6}$/.test(b)?b:"#ffffff"},set:b=>{C.backgroundColor=b}}),g=d.ref(""),k=d.ref(!1),P=d.ref([]);d.watch(()=>y.globe,b=>f.value?.setGlobeEnvironmentVisible?.(b)),d.watch(()=>y.terrain,b=>f.value?.setTerrainEnable?.(b)),d.watch(()=>A.baseMap,b=>{f.value?.changeBaseMap?.(b,{token:u.tiandituToken})}),d.watch(()=>C.shadows,b=>f.value?.setShadowsEnable?.(b)),d.watch(()=>C.shadowDarkness,b=>f.value?.setShadowDarkness?.(b)),d.watch(()=>C.environmentMap,b=>f.value?.setEnvironmentMapEnable?.(b)),d.watch(()=>C.ambientOcclusion,b=>f.value?.setAmbientOcclusion?.(b)),d.watch(()=>C.time,b=>{const w=ze.isDayjs(b)?b.toDate():new Date;f.value?.setTime?.(w)}),d.watch(()=>[C.brightness,C.contrast,C.saturation],([b,w,v])=>{const S=f.value;S?.setModelColorAdjustment?S.setModelColorAdjustment({brightness:b,contrast:w,saturation:v}):S?.setModelBrightness?.(b)}),d.watch(()=>C.backgroundColor,b=>{if(f.value?.setBackgroundColor)f.value.setBackgroundColor(b);else{const w=document.querySelector(".cesium-viewer");w&&(w.style.background=b)}}),d.watch(()=>E.collision,b=>f.value?.setCollisionDetection?.(b)),d.watch(()=>E.habit,b=>f.value?.setMouseHabit?.(b));const F=b=>{if(b?.pois&&Array.isArray(b.pois)&&b.pois.length>0){const w=b.pois[0],v=w.lonlat.split(/[, ]/).map(Number);if(v.length>=2&&!isNaN(v[0])&&!isNaN(v[1]))return{name:w.name,lon:v[0],lat:v[1],raw:w}}if(b?.area&&b.area.lonlat){const w=b.area,v=w.lonlat.split(/[, ]/).map(Number);if(v.length>=2&&!isNaN(v[0])&&!isNaN(v[1]))return{name:w.name,lon:v[0],lat:v[1],raw:w}}return null},H=us(async()=>{const b=(g.value||"").trim();if(!b)return;const w=u.tiandituToken||"c25f14fb6bd4397cf8fe45144ff768d6";k.value=!0,P.value=[];try{if(f.value?.searchLocation){const v=await f.value.searchLocation(b,w),S=F(v);S&&(P.value=[S],fe.success(`找到:${S.name||""}`),f.value.flyTo(S.lon,S.lat,5e3))}else{const S=`https://api.tianditu.gov.cn/v2/search?postStr=${encodeURIComponent(JSON.stringify({keyWord:b,level:12,mapBound:"-180,-90,180,90",queryType:1,start:0,count:10}))}&type=query&tk=${encodeURIComponent(w)}`,R=await fetch(S);if(!R.ok)throw new Error(`HTTP ${R.status}`);const _=await R.json(),N=F(_);N&&(P.value=[N],fe.success(`找到:${N.name||""}`),f.value?.flyTo?.(N.lon,N.lat,5e3))}}catch(v){console.error("tianditu search error",v)}finally{k.value=!1}},800);d.watch(g,()=>{H()});const O=()=>{p.value=!1,h("close")};return d.onMounted(()=>{}),(b,w)=>(d.openBlock(),d.createBlock(Fe,{visible:p.value,title:"设置",width:320,"full-height":n.fullHeight,onClose:O,"onUpdate:visible":w[26]||(w[26]=v=>p.value=v)},{default:d.withCtx(()=>[d.createElementVNode("div",pw,[d.createElementVNode("div",gw,[d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:m.value==="GIS"}]),onClick:w[0]||(w[0]=v=>m.value="GIS")},"GIS",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:m.value==="MAP"}]),onClick:w[1]||(w[1]=v=>m.value="MAP")},"地图",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:m.value==="RENDER"}]),onClick:w[2]||(w[2]=v=>m.value="RENDER")},"渲染",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:m.value==="MOUSE"}]),onClick:w[3]||(w[3]=v=>m.value="MOUSE")},"鼠标",2)]),d.createElementVNode("div",mw,[m.value==="GIS"?(d.openBlock(),d.createElementBlock("div",Aw,[d.createElementVNode("div",yw,[w[27]||(w[27]=d.createElementVNode("span",null,"地球 (含大气/日月/星空)",-1)),d.createVNode(d.unref(t),{checked:y.globe,"onUpdate:checked":w[4]||(w[4]=v=>y.globe=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Cw,[w[28]||(w[28]=d.createElementVNode("span",null,"地形 (高程)",-1)),d.createVNode(d.unref(t),{checked:y.terrain,"onUpdate:checked":w[5]||(w[5]=v=>y.terrain=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Ew,[w[29]||(w[29]=d.createElementVNode("span",null,"地形遮挡",-1)),d.createVNode(d.unref(t),{checked:y.depthTest,"onUpdate:checked":w[6]||(w[6]=v=>y.depthTest=v),size:"small"},null,8,["checked"])])])):d.createCommentVNode("",!0),m.value==="MAP"?(d.openBlock(),d.createElementBlock("div",ww,[d.createElementVNode("div",bw,[d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.provider==="tianditu"}]),onClick:w[7]||(w[7]=v=>A.provider="tianditu")},"天地图",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.provider==="arcgis"}]),onClick:w[8]||(w[8]=v=>A.provider="arcgis")},"ArcGIS",2)]),A.provider==="tianditu"?(d.openBlock(),d.createElementBlock("div",vw,[d.createElementVNode("div",xw,[w[30]||(w[30]=d.createElementVNode("div",{class:"sub-label"},"Token",-1)),d.createVNode(d.unref(o),{value:A.tianditu.token,"onUpdate:value":w[9]||(w[9]=v=>A.tianditu.token=v),size:"small",placeholder:"输入天地图Token"},null,8,["value"])]),d.createElementVNode("div",Iw,[w[31]||(w[31]=d.createElementVNode("div",{class:"sub-label"},"地图风格",-1)),d.createVNode(d.unref(l),{value:A.tianditu.layerType,"onUpdate:value":w[10]||(w[10]=v=>A.tianditu.layerType=v),size:"small",style:{width:"100%"}},{default:d.withCtx(()=>[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(T,v=>d.createVNode(d.unref(a),{key:v.value,value:v.value},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(v.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),d.createElementVNode("div",Bw,[w[32]||(w[32]=d.createElementVNode("span",null,"叠加注记",-1)),d.createVNode(d.unref(t),{checked:A.tianditu.showLabel,"onUpdate:checked":w[11]||(w[11]=v=>A.tianditu.showLabel=v),size:"small"},null,8,["checked"])])])):d.createCommentVNode("",!0),A.provider==="arcgis"?(d.openBlock(),d.createElementBlock("div",Sw,[d.createElementVNode("div",Mw,[w[33]||(w[33]=d.createElementVNode("div",{class:"sub-label"},"服务地址",-1)),d.createVNode(d.unref(o),{value:A.arcgis.url,"onUpdate:value":w[12]||(w[12]=v=>A.arcgis.url=v),size:"small",placeholder:"输入ArcGIS MapServer地址"},null,8,["value"])])])):d.createCommentVNode("",!0),d.createElementVNode("div",Tw,[w[34]||(w[34]=d.createElementVNode("div",{class:"sub-label"},"位置搜索 (天地图)",-1)),d.createElementVNode("div",Dw,[d.createVNode(d.unref(o),{value:g.value,"onUpdate:value":w[13]||(w[13]=v=>g.value=v),placeholder:"输入地名搜索",size:"small","allow-clear":""},null,8,["value"])])])])):d.createCommentVNode("",!0),m.value==="RENDER"?(d.openBlock(),d.createElementBlock("div",kw,[d.createElementVNode("div",Pw,[w[35]||(w[35]=d.createElementVNode("span",null,"阴影",-1)),d.createVNode(d.unref(t),{checked:C.shadows,"onUpdate:checked":w[14]||(w[14]=v=>C.shadows=v),size:"small"},null,8,["checked"])]),C.shadows?(d.openBlock(),d.createElementBlock("div",Fw,[d.createElementVNode("div",Rw,"阴影暗度 ("+d.toDisplayString(C.shadowDarkness.toFixed(2))+")",1),d.createVNode(d.unref(r),{value:C.shadowDarkness,"onUpdate:value":w[15]||(w[15]=v=>C.shadowDarkness=v),min:0,max:1,step:.05,size:"small"},null,8,["value"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Ow,[w[36]||(w[36]=d.createElementVNode("span",null,"环境贴图 (HDR)",-1)),d.createVNode(d.unref(t),{checked:C.environmentMap,"onUpdate:checked":w[16]||(w[16]=v=>C.environmentMap=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Lw,[w[37]||(w[37]=d.createElementVNode("span",null,"环境光遮蔽 (AO)",-1)),d.createVNode(d.unref(t),{checked:C.ambientOcclusion,"onUpdate:checked":w[17]||(w[17]=v=>C.ambientOcclusion=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Nw,[w[38]||(w[38]=d.createElementVNode("div",{class:"sub-label"},"日期时间",-1)),d.createVNode(d.unref(c),{value:C.time,"onUpdate:value":w[18]||(w[18]=v=>C.time=v),"show-time":"",locale:d.unref(rc),format:"YYYY-MM-DD HH:mm",size:"small",style:{width:"100%"}},null,8,["value","locale"])]),d.createElementVNode("div",Uw,[d.createElementVNode("div",_w,"模型亮度 ("+d.toDisplayString(C.brightness.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:C.brightness,"onUpdate:value":w[19]||(w[19]=v=>C.brightness=v),min:0,max:5,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Qw,[d.createElementVNode("div",Hw,"模型对比度 ("+d.toDisplayString(C.contrast.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:C.contrast,"onUpdate:value":w[20]||(w[20]=v=>C.contrast=v),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Gw,[d.createElementVNode("div",Yw,"模型饱和度 ("+d.toDisplayString(C.saturation.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:C.saturation,"onUpdate:value":w[21]||(w[21]=v=>C.saturation=v),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Vw,[w[39]||(w[39]=d.createElementVNode("div",{class:"sub-label"},"背景颜色",-1)),d.createElementVNode("div",Ww,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(M,(v,S)=>d.createElementVNode("div",{key:S,style:d.normalizeStyle({background:v,width:"32px",height:"24px",borderRadius:"2px",cursor:"pointer",border:"1px solid #d9d9d9",flexShrink:0}),onClick:R=>C.backgroundColor=v,title:"预设 "+(S+1)},null,12,zw)),64))]),d.createElementVNode("div",jw,[d.withDirectives(d.createElementVNode("input",{type:"color","onUpdate:modelValue":w[22]||(w[22]=v=>I.value=v),style:{width:"40px",height:"24px",padding:"0",border:"1px solid #d9d9d9"}},null,512),[[d.vModelText,I.value]]),d.createVNode(d.unref(o),{value:C.backgroundColor,"onUpdate:value":w[23]||(w[23]=v=>C.backgroundColor=v),size:"small",style:{flex:"1"},placeholder:"CSS 颜色值"},null,8,["value"])])])])):d.createCommentVNode("",!0),m.value==="MOUSE"?(d.openBlock(),d.createElementBlock("div",$w,[d.createElementVNode("div",Kw,[w[40]||(w[40]=d.createElementVNode("span",null,"碰撞检测",-1)),d.createVNode(d.unref(t),{checked:E.collision,"onUpdate:checked":w[24]||(w[24]=v=>E.collision=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Xw,[w[43]||(w[43]=d.createElementVNode("div",{class:"sub-label"},"操作习惯",-1)),d.createVNode(d.unref(i),{value:E.habit,"onUpdate:value":w[25]||(w[25]=v=>E.habit=v),size:"small"},{default:d.withCtx(()=>[d.createVNode(d.unref(s),{value:0},{default:d.withCtx(()=>[...w[41]||(w[41]=[d.createTextVNode("默认 (中键旋转)",-1)])]),_:1}),d.createVNode(d.unref(s),{value:1},{default:d.withCtx(()=>[...w[42]||(w[42]=[d.createTextVNode("习惯1 (左键旋转)",-1)])]),_:1})]),_:1},8,["value"])])])):d.createCommentVNode("",!0)])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-a768b286"]]),qw={class:"cad-layer-panel"},Jw={class:"layer-list-container"},Zw={class:"list-header"},eb={class:"col-check"},tb=["checked"],nb={class:"list-body"},ib={class:"col-check"},sb=["checked","onChange"],ob={class:"col-index"},rb=["title"],ab={class:"col-color"},lb=["value"],cb={key:0,class:"empty-text"},db=Ue(d.defineComponent({__name:"LeitingCadLayer",props:{visible:{type:Boolean,default:!1},currentModelId:{type:String,default:""}},emits:["update:visible","handleCloseCardByCadCard"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods",d.ref({})),o=d.ref(""),r=d.ref([]),l=()=>{s.value&&s.value.getDxfModels&&(r.value=s.value.getDxfModels().map(E=>({modelId:E.modelId,modelName:E.modelName}))||[])},a=d.computed(()=>r.value.map(E=>({value:E.modelId,label:E.modelName}))),c=d.ref([]),u=d.ref([]),h=d.computed(()=>c.value.length>0&&u.value.length===c.value.length),f=({modelId:E})=>{if(c.value=[],u.value=[],s.value&&s.value.getDxfLayers){const x=s.value.getDxfLayers({modelId:E});x&&Object.keys(x).forEach((M,T)=>{x[M].length&&(c.value.push({index:T+1,layerName:M,layerColor:x[M][0].color||"#ffffff",key:M}),u.value.push(M))})}},p=E=>{o.value=E,f({modelId:E})},m=E=>{E.target.checked?u.value=c.value.map(M=>M.key):u.value=[],A()},y=(E,x)=>{x.target.checked?u.value.includes(E)||u.value.push(E):u.value=u.value.filter(T=>T!==E),A()},A=()=>{if(s.value&&s.value.showDxfLayer&&(s.value.showDxfLayer({modelId:o.value,show:!0,layers:u.value}),s.value.getDxfLayers)){const E=s.value.getDxfLayers({modelId:o.value});if(E){const x=Object.keys(E).filter(M=>!u.value.includes(M));s.value.showDxfLayer({modelId:o.value,show:!1,layers:x})}}},C=()=>{i("update:visible",!1),i("handleCloseCardByCadCard")};return d.watch(()=>t.visible,E=>{E&&(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})))}),d.watch(()=>t.currentModelId,E=>{E&&t.visible&&(o.value=E,f({modelId:E}))}),(E,x)=>(d.openBlock(),d.createBlock(Fe,{visible:n.visible,title:"CAD图层","onUpdate:visible":x[3]||(x[3]=M=>E.$emit("update:visible",M)),onClose:C,width:360,align:"right","initial-position":{x:0,y:60}},{"header-extra":d.withCtx(()=>[d.createElementVNode("div",{class:"header-select-container",onMousedown:x[2]||(x[2]=d.withModifiers(()=>{},["stop"]))},[x[4]||(x[4]=d.createElementVNode("span",{class:"header-label"},"图纸:",-1)),d.createVNode(d.unref(Ae.Select),{value:o.value,"onUpdate:value":x[0]||(x[0]=M=>o.value=M),options:a.value,onChange:x[1]||(x[1]=M=>p(M)),placeholder:"选择模型",style:{width:"140px"},bordered:!1,class:"custom-header-select",popupClassName:"leiting-select-dropdown",size:"small"},null,8,["value","options"])],32)]),default:d.withCtx(()=>[d.createElementVNode("div",qw,[d.createElementVNode("div",Jw,[d.createElementVNode("div",Zw,[d.createElementVNode("div",eb,[d.createElementVNode("input",{type:"checkbox",checked:h.value,onChange:m},null,40,tb)]),x[5]||(x[5]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),x[6]||(x[6]=d.createElementVNode("div",{class:"col-name"},"图层名称",-1)),x[7]||(x[7]=d.createElementVNode("div",{class:"col-color"},"颜色",-1))]),d.createElementVNode("div",nb,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(c.value,M=>(d.openBlock(),d.createElementBlock("div",{key:M.key,class:"list-item"},[d.createElementVNode("div",ib,[d.createElementVNode("input",{type:"checkbox",checked:u.value.includes(M.key),onChange:T=>y(M.key,T)},null,40,sb)]),d.createElementVNode("div",ob,d.toDisplayString(M.index),1),d.createElementVNode("div",{class:"col-name",title:M.layerName},d.toDisplayString(M.layerName),9,rb),d.createElementVNode("div",ab,[d.createElementVNode("input",{type:"color",value:M.layerColor,disabled:""},null,8,lb)])]))),128)),c.value.length===0?(d.openBlock(),d.createElementBlock("div",cb,"暂无数据")):d.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-a4db4977"]]),ub={class:"adjust-panel"},hb={class:"control-panel"},fb={class:"form-item"},pb={class:"radio-group"},gb={class:"form-item"},mb=["title"],Ab={class:"param-row"},yb=["step"],Cb={class:"param-row"},Eb=["step"],wb={class:"param-row"},bb=["step"],vb={class:"param-row"},xb=["step"],Ib={class:"param-row"},Bb=["step"],Sb={class:"param-row"},Mb=["step"],Tb={class:"param-row"},Db=["step"],kb={class:"button-grid"},Pb={key:1,class:"pick-mode-ui"},Fb=["onClick"],Rb=["checked"],Ob={style:{"font-size":"12px",color:"#aaa","padding-left":"10px"}},Lb={class:"param-row"},Nb={style:{width:"40px"}},Ub=["onUpdate:modelValue"],_b={class:"param-row"},Qb={style:{width:"40px"}},Hb=["onUpdate:modelValue"],Gb={class:"param-row"},Yb={style:{width:"40px"}},Vb=["onUpdate:modelValue"],Wb={class:"list-panel"},zb={class:"list-header"},jb={class:"col-check"},$b=["checked"],Kb={class:"list-body"},Xb={class:"col-check"},qb=["onUpdate:modelValue"],Jb={class:"col-index"},Zb=["title"],ev={class:"col-main"},tv=["checked","onChange"],nv={key:0,style:{padding:"10px","text-align":"center",color:"#999"}},iv=Ue(d.defineComponent({__name:"LeitingCadPosition",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","handleSavingByCadCard","clearBimPointList","save"],setup(n,{expose:e,emit:t}){const i=n,s=t,o=d.inject("leitingMethods"),r=d.ref([]),l=d.ref(""),a=d.computed(()=>r.value.length>0&&r.value.every(w=>w.selected)),c=d.ref("param"),u=d.ref("bimPoint1"),h=d.ref(null),f=d.ref("bimPoint1"),p=d.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=d.ref(1e-6),y=d.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=d.computed(()=>{const w=r.value.find(v=>v.modelId===l.value);return w?w.modelName:""}),C=()=>{s("update:visible",!1)},E=()=>(!h.value&&o?.value?.getViewer&&o?.value?.getCesium&&(h.value=new oc(o.value.getViewer(),o.value.getCesium())),h.value),x=()=>{E()?.clearMarkers(),p.bimPoint1.longitude=void 0,p.bimPoint1.latitude=void 0,p.bimPoint1.height=void 0,p.bimPoint2.longitude=void 0,p.bimPoint2.latitude=void 0,p.bimPoint2.height=void 0},M=w=>{const v=u.value,S=p[v];if(S){S.longitude=w.longitude,S.latitude=w.latitude,S.height=w.height;const R=v==="bimPoint1"?"BIM":"MAP";E()?.addMarker(R,w),fe.success(`${S.type}已添加`)}},T=()=>{E()?.registerPickHandler(w=>{M(w)})},B=()=>{E()?.destroyPickHandler()},I=w=>{c.value=w,w!=="pick"&&s("clearBimPointList")};d.watch(()=>c.value,w=>{w==="pick"?T():B()}),d.onUnmounted(()=>{B()});const g=()=>{if(!o?.value?.getDxfModels)return;const w=o.value.getDxfModels();if(Array.isArray(w)?r.value=w.map(v=>({modelId:v.modelId,modelName:v.modelName,formData:v.formData||{},selected:!1,tileset:v})):r.value=[],r.value.length>0){const v=o.value.getCadModelId?o.value.getCadModelId():"";v&&r.value.find(S=>S.modelId===v)?k(v):k(r.value[0].modelId),r.value.forEach(S=>S.selected=!0)}},k=w=>{l.value=w;const v=r.value.find(S=>S.modelId===w);v&&v.formData&&Object.keys(y).forEach(S=>{v.formData[S]!==void 0&&(y[S]=v.formData[S])})},P=(w,v)=>{if(!o?.value?.adjustingModelByCad)return;const S=r.value.find(R=>R.modelId===w);S&&S.tileset&&(S.formData={...S.formData,...v},S.tileset.formData=S.formData,o.value.adjustingModelByCad({...S.formData,tileset:S.tileset}))},F=w=>{if(!l.value)return;const v=y[w];P(l.value,{[w]:v})},L=w=>{const v=r.value.filter(N=>N.selected);if(v.length===0){fe.warning("请先选择要调整的模型");return}const{distance:S,heightDistance:R,rotation:_}=y;v.forEach(N=>{const D={...N.formData};switch(w){case"north":D.latitude+=S;break;case"south":D.latitude-=S;break;case"east":D.longitude+=S;break;case"west":D.longitude-=S;break;case"up":D.height+=R;break;case"down":D.height-=R;break;case"rotateLeft":D.totalRotation=(D.totalRotation||0)-_;break;case"rotateRight":D.totalRotation=(D.totalRotation||0)+_;break}N.modelId===l.value&&Object.assign(y,D),P(N.modelId,D)})},H=w=>{const v=w.target.checked;r.value.forEach(S=>S.selected=v)},O=()=>{s("handleSavingByCadCard",r.value),s("save",r.value)},b=()=>{const w=p.bimPoint1,v=p.bimPoint2;if(w.longitude===void 0||v.longitude===void 0){fe.warning("请先完成点选操作");return}const S=r.value.filter(Q=>Q.selected);if(S.length===0){fe.warning("请先选择要调整的模型");return}let R=0,_=0,N=0;const D=E();if(D){const{dLon:Q,dLat:V,dHeight:$}=D.calculateOffset(w,v);R=Q,_=V,N=$}else R=v.longitude-w.longitude,_=v.latitude-w.latitude,N=v.height-w.height;S.forEach(Q=>{const V={...Q.formData};V.longitude+=R,V.latitude+=_,V.height+=N,Q.modelId===l.value&&Object.assign(y,V),P(Q.modelId,V)}),fe.success("位置已调整")};return d.watch(()=>i.visible,w=>{w?g():(B(),x())}),d.onMounted(()=>{i.visible&&g()}),e({setBIMPointsList:({longitude:w,latitude:v,height:S})=>{p[f.value].longitude=w,p[f.value].latitude=v,p[f.value].height=S},addGltfOr3dTilesModelList:w=>{console.warn("addGltfOr3dTilesModelList is deprecated, use internal loading")}}),(w,v)=>(d.openBlock(),d.createBlock(Fe,{visible:i.visible,title:"Cad校准",width:282,height:600,"onUpdate:visible":v[21]||(v[21]=S=>s("update:visible",S)),onClose:C},{default:d.withCtx(()=>[d.createElementVNode("div",ub,[d.createElementVNode("div",hb,[d.createElementVNode("div",fb,[v[22]||(v[22]=d.createElementVNode("label",null,"调整操作:",-1)),d.createElementVNode("div",pb,[d.createElementVNode("span",{class:d.normalizeClass({active:c.value==="param"}),onClick:v[0]||(v[0]=S=>I("param"))},"参数模式",2),d.createElementVNode("span",{class:d.normalizeClass({active:c.value==="pick"}),onClick:v[1]||(v[1]=S=>I("pick"))},"地图点选",2)])]),d.createElementVNode("div",gb,[v[23]||(v[23]=d.createElementVNode("label",null,"当前主模型:",-1)),d.createElementVNode("span",{class:"value",title:A.value},d.toDisplayString(A.value||"未选择"),9,mb)]),v[35]||(v[35]=d.createElementVNode("div",{class:"separator"},null,-1)),c.value==="param"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[v[31]||(v[31]=d.createElementVNode("div",{class:"group-header"},"当前状态",-1)),d.createElementVNode("div",Ab,[v[24]||(v[24]=d.createElementVNode("label",null,"经度(东西):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[2]||(v[2]=S=>y.longitude=S),onChange:v[3]||(v[3]=S=>F("longitude")),step:m.value},null,40,yb),[[d.vModelText,y.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",Cb,[v[25]||(v[25]=d.createElementVNode("label",null,"纬度(南北):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[4]||(v[4]=S=>y.latitude=S),onChange:v[5]||(v[5]=S=>F("latitude")),step:m.value},null,40,Eb),[[d.vModelText,y.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",wb,[v[26]||(v[26]=d.createElementVNode("label",null,"高度(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[6]||(v[6]=S=>y.height=S),onChange:v[7]||(v[7]=S=>F("height")),step:m.value},null,40,bb),[[d.vModelText,y.height,void 0,{number:!0}]])]),d.createElementVNode("div",vb,[v[27]||(v[27]=d.createElementVNode("label",null,"累计旋转(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[8]||(v[8]=S=>y.totalRotation=S),onChange:v[9]||(v[9]=S=>F("totalRotation")),step:m.value},null,40,xb),[[d.vModelText,y.totalRotation,void 0,{number:!0}]])]),v[32]||(v[32]=d.createElementVNode("div",{class:"separator"},null,-1)),v[33]||(v[33]=d.createElementVNode("div",{class:"group-header"},"调整步长",-1)),d.createElementVNode("div",Ib,[v[28]||(v[28]=d.createElementVNode("label",null,"经纬步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[10]||(v[10]=S=>y.distance=S),step:m.value},null,8,Bb),[[d.vModelText,y.distance,void 0,{number:!0}]])]),d.createElementVNode("div",Sb,[v[29]||(v[29]=d.createElementVNode("label",null,"高度步长(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[11]||(v[11]=S=>y.heightDistance=S),step:m.value},null,8,Mb),[[d.vModelText,y.heightDistance,void 0,{number:!0}]])]),d.createElementVNode("div",Tb,[v[30]||(v[30]=d.createElementVNode("label",null,"旋转步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[12]||(v[12]=S=>y.rotation=S),step:m.value},null,8,Db),[[d.vModelText,y.rotation,void 0,{number:!0}]])]),d.createElementVNode("div",kb,[d.createElementVNode("button",{onClick:v[13]||(v[13]=S=>L("rotateLeft"))},"左转"),d.createElementVNode("button",{onClick:v[14]||(v[14]=S=>L("north"))},"北移"),d.createElementVNode("button",{onClick:v[15]||(v[15]=S=>L("rotateRight"))},"右转"),d.createElementVNode("button",{onClick:v[16]||(v[16]=S=>L("west"))},"西移"),d.createElementVNode("button",{onClick:v[17]||(v[17]=S=>L("south"))},"南移"),d.createElementVNode("button",{onClick:v[18]||(v[18]=S=>L("east"))},"东移"),d.createElementVNode("button",{onClick:v[19]||(v[19]=S=>L("up"))},"上移"),d.createElementVNode("button",{onClick:v[20]||(v[20]=S=>L("down"))},"下移"),d.createElementVNode("button",{onClick:O,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):(d.openBlock(),d.createElementBlock("div",Pb,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(p,(S,R)=>(d.openBlock(),d.createElementBlock("div",{key:R,class:"form-item",style:{display:"block","margin-bottom":"15px"}},[d.createElementVNode("div",{style:{"font-weight":"bold","margin-bottom":"5px",cursor:"pointer",display:"flex","align-items":"center"},onClick:_=>u.value=R},[d.createElementVNode("input",{type:"radio",checked:u.value===R,style:{"margin-right":"5px"}},null,8,Rb),d.createTextVNode(" "+d.toDisplayString(S.type)+": ",1)],8,Fb),d.createElementVNode("div",Ob,[d.createElementVNode("div",Lb,[d.createElementVNode("label",Nb,d.toDisplayString(S.longitudeText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":_=>S.longitude=_,readonly:"",style:{width:"100px"}},null,8,Ub),[[d.vModelText,S.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",_b,[d.createElementVNode("label",Qb,d.toDisplayString(S.latitudeText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":_=>S.latitude=_,readonly:"",style:{width:"100px"}},null,8,Hb),[[d.vModelText,S.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",Gb,[d.createElementVNode("label",Yb,d.toDisplayString(S.heightText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":_=>S.height=_,readonly:"",style:{width:"100px"}},null,8,Vb),[[d.vModelText,S.height,void 0,{number:!0}]])])])]))),128)),d.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[d.createElementVNode("button",{onClick:b,class:"primary-btn"},"应用校准"),d.createElementVNode("button",{onClick:O},"保存")]),v[34]||(v[34]=d.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[d.createElementVNode("div",null,"操作指南:"),d.createElementVNode("div",null,"1. 勾选上方 CAD 或 地图 标记点选项。"),d.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),d.createElementVNode("div",null,"3. 采集两点后,点击“应用校准”进行校准。")],-1))]))]),d.createElementVNode("div",Wb,[d.createElementVNode("div",zb,[d.createElementVNode("div",jb,[d.createElementVNode("input",{type:"checkbox",checked:a.value,onChange:H},null,40,$b)]),v[36]||(v[36]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),v[37]||(v[37]=d.createElementVNode("div",{class:"col-name"},"名称",-1)),v[38]||(v[38]=d.createElementVNode("div",{class:"col-main"},"主模型",-1))]),d.createElementVNode("div",Kb,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,(S,R)=>(d.openBlock(),d.createElementBlock("div",{key:S.modelId,class:d.normalizeClass(["list-item",{active:S.modelId===l.value}])},[d.createElementVNode("div",Xb,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":_=>S.selected=_},null,8,qb),[[d.vModelCheckbox,S.selected]])]),d.createElementVNode("div",Jb,d.toDisplayString(R+1),1),d.createElementVNode("div",{class:"col-name",title:S.modelName},d.toDisplayString(S.modelName),9,Zb),d.createElementVNode("div",ev,[d.createElementVNode("input",{type:"radio",name:"mainModel",checked:S.modelId===l.value,onChange:_=>k(S.modelId)},null,40,tv)])],2))),128)),r.value.length===0?(d.openBlock(),d.createElementBlock("div",nv,"暂无数据")):d.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-e8abd49d"]]),sv={class:"annotation-content"},ov={class:"annotation-tools"},rv={class:"annotation-controls"},av={class:"control-group",title:"颜色"},lv={class:"tool-item color-tool"},cv={class:"control-group line-width-container",title:"线宽"},dv=["onClick"],uv={class:"option-label"},hv=Ue(d.defineComponent({__name:"LeitingAnnotationCard",props:{visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref(""),r=d.ref("#ff0000"),l=d.ref(1),a=d.ref(!1),c=d.ref(null),u=d.ref(null),h=d.ref({top:"0px",left:"0px"}),f=[{value:6,label:"粗"},{value:3,label:"中"},{value:1,label:"细"}],p=()=>s?.value?.getAnnotationInstance?s.value.getAnnotationInstance():null,m=()=>{i("update:visible",!1)},y=I=>{o.value=I;const g=p();if(g)switch(I){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 I=p();I&&(I.setCurrentColor(r.value),I.changeColor(r.value))},C=()=>{if(!a.value&&c.value){const I=c.value.getBoundingClientRect();h.value={top:`${I.top}px`,left:`${I.right+8}px`}}a.value=!a.value},E=I=>{l.value=I,a.value=!1;const g=p();g&&(g.setCurrentWidth(I),g.changeWidth(I))},x=()=>{const I=p();I&&I.deleteSelectedEntity()},M=()=>{const I=p();I&&I.clearAll()},T=()=>{if(s?.value?.saveAnnotations){s.value.saveAnnotations();return}const I=p();I&&I.saveAnnotations()},B=I=>{const g=I.target,k=c.value&&c.value.contains(g),P=u.value&&u.value.contains(g);!k&&!P&&(a.value=!1)};return d.onMounted(()=>{document.addEventListener("click",B)}),d.onUnmounted(()=>{document.removeEventListener("click",B)}),(I,g)=>(d.openBlock(),d.createBlock(Fe,{visible:t.visible,title:"标注",width:70,"min-width":70,height:480,"onUpdate:visible":g[6]||(g[6]=k=>i("update:visible",k)),onClose:m},{default:d.withCtx(()=>[d.createElementVNode("div",sv,[d.createElementVNode("div",ov,[d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="freehandLine"}]),onClick:g[0]||(g[0]=k=>y("freehandLine")),title:"手绘线"},[...g[7]||(g[7]=[d.createElementVNode("div",{class:"tool-icon"},"✏️",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="arrow"}]),onClick:g[1]||(g[1]=k=>y("arrow")),title:"箭头"},[...g[8]||(g[8]=[d.createElementVNode("div",{class:"tool-icon"},"↗️",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="straightLine"}]),onClick:g[2]||(g[2]=k=>y("straightLine")),title:"直线"},[...g[9]||(g[9]=[d.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="rectangle"}]),onClick:g[3]||(g[3]=k=>y("rectangle")),title:"矩形"},[...g[10]||(g[10]=[d.createElementVNode("div",{class:"tool-icon"},"▭",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="ellipse"}]),onClick:g[4]||(g[4]=k=>y("ellipse")),title:"椭圆"},[...g[11]||(g[11]=[d.createElementVNode("div",{class:"tool-icon"},"⭕",-1)])],2)]),g[13]||(g[13]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",rv,[d.createElementVNode("div",av,[d.createElementVNode("div",lv,[d.createElementVNode("div",{class:"color-swatch",style:d.normalizeStyle({backgroundColor:r.value})},null,4),d.withDirectives(d.createElementVNode("input",{type:"color","onUpdate:modelValue":g[5]||(g[5]=k=>r.value=k),onChange:A,class:"color-input-overlay"},null,544),[[d.vModelText,r.value]])])]),d.createElementVNode("div",cv,[d.createElementVNode("div",{ref_key:"lineWidthBtnRef",ref:c,class:"tool-item",onClick:d.withModifiers(C,["stop"])},[d.createElementVNode("div",{class:"current-width-preview",style:d.normalizeStyle({height:l.value+"px",backgroundColor:"#fff"})},null,4)],512),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[a.value?(d.openBlock(),d.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:u,class:"line-width-dropdown",style:d.normalizeStyle(h.value)},[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(f,k=>d.createElementVNode("div",{key:k.value,class:d.normalizeClass(["line-width-option",{selected:l.value===k.value}]),onClick:d.withModifiers(P=>E(k.value),["stop"])},[d.createElementVNode("span",uv,d.toDisplayString(k.label),1),d.createElementVNode("div",{class:"line-preview",style:d.normalizeStyle({height:k.value+"px",backgroundColor:l.value===k.value?"#1890ff":"#ddd"})},null,4)],10,dv)),64))],4)):d.createCommentVNode("",!0)]))]),g[12]||(g[12]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",{class:"action-buttons"},[d.createElementVNode("button",{class:"control-btn",onClick:x,title:"删除选中"}," 🗑️ "),d.createElementVNode("button",{class:"control-btn",onClick:M,title:"清空"}," ❌ "),d.createElementVNode("button",{class:"control-btn",onClick:T,title:"保存"}," 💾 ")])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-3cfc8415"]]),fv={class:"measure-content"},pv={class:"measure-tools"},gv={key:0,class:"measure-results"},mv={class:"result-row"},Av={class:"result-value"},yv={class:"result-row"},Cv={class:"result-value"},Ev={class:"result-row"},wv={class:"result-value"},bv={class:"result-row"},vv={class:"result-value"},xv={key:1,class:"result-row"},Iv={class:"result-value"},Bv={key:2,class:"result-row"},Sv={class:"result-value"},Mv={class:"measure-controls"},Tv={class:"control-group",title:"单位"},Dv={class:"unit-display"},kv=["onClick"],Pv=Ue(d.defineComponent({__name:"LeitingMeasurement",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods",d.ref({})),o=d.ref(null),r=d.ref(null),l=d.ref("m"),a=d.ref(!1),c=d.ref(null),u=d.ref(!1),h=d.ref({}),f=d.ref(null),p=[{label:"米 (m)",value:"m"},{label:"厘米 (cm)",value:"cm"},{label:"毫米 (mm)",value:"mm"}],m=I=>{const g=l.value;return g==="mm"?`${(I*1e3).toFixed(0)}mm`:g==="cm"?`${(I*100).toFixed(1)}cm`:`${I.toFixed(2)}m`},y=I=>I>1e6?`${(I/1e6).toFixed(2)} km²`:`${I.toFixed(2)} m²`,A=()=>{if(!o.value&&s.value?.getViewer){const I=s.value.getViewer(),g=s.value.getCesium();I&&g&&(o.value=new tc({viewer:I,cesium:g}),o.value.setUnit(l.value),o.value.setSnapping(a.value),o.value.onMeasure=k=>{c.value=k})}},C=I=>{o.value||A(),r.value===I?(r.value=null,o.value?.stop()):(r.value=I,o.value?.start(I))},E=I=>{l.value=I,u.value=!1},x=()=>{o.value&&(o.value.clearAll(),r.value=null,o.value.stop())},M=()=>{i("update:visible",!1)},T=I=>{if(u.value){u.value=!1;return}const k=I.currentTarget.getBoundingClientRect();h.value={position:"fixed",top:`${k.top}px`,left:`${k.right+5}px`,zIndex:3e3},u.value=!0},B=I=>{u.value&&f.value&&!f.value.contains(I.target)&&(u.value=!1)};return d.onMounted(()=>{document.addEventListener("click",B),t.visible&&d.nextTick(()=>A())}),d.onUnmounted(()=>{document.removeEventListener("click",B),o.value&&o.value.destroy()}),d.watch(()=>t.visible,I=>{I?d.nextTick(()=>A()):o.value&&(o.value.stop(),r.value=null)}),d.watch(s,I=>{I&&I.getViewer&&!o.value&&t.visible&&A()}),d.watch(l,I=>{o.value&&o.value.setUnit(I)}),(I,g)=>(d.openBlock(),d.createBlock(Fe,{visible:t.visible,title:"量算",width:70,"min-width":70,height:480,"onUpdate:visible":g[3]||(g[3]=k=>i("update:visible",k)),onClose:M},{default:d.withCtx(()=>[d.createElementVNode("div",fv,[d.createElementVNode("div",pv,[d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="distance"}]),onClick:g[0]||(g[0]=k=>C("distance")),title:"距离测量"},[...g[4]||(g[4]=[d.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="angle"}]),onClick:g[1]||(g[1]=k=>C("angle")),title:"角度测量"},[...g[5]||(g[5]=[d.createElementVNode("div",{class:"tool-icon"},"📐",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="area"}]),onClick:g[2]||(g[2]=k=>C("area")),title:"面积测量"},[...g[6]||(g[6]=[d.createElementVNode("div",{class:"tool-icon"},"🔳",-1)])],2)]),g[15]||(g[15]=d.createElementVNode("div",{class:"separator"},null,-1)),c.value?(d.openBlock(),d.createElementBlock("div",gv,[c.value.type==="distance"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createElementVNode("div",mv,[g[7]||(g[7]=d.createElementVNode("span",{class:"result-label"},"总长:",-1)),d.createElementVNode("span",Av,d.toDisplayString(m(c.value.dist)),1)]),d.createElementVNode("div",yv,[g[8]||(g[8]=d.createElementVNode("span",{class:"result-label",style:{color:"#ff4d4f"}},"ΔX:",-1)),d.createElementVNode("span",Cv,d.toDisplayString(m(c.value.dx)),1)]),d.createElementVNode("div",Ev,[g[9]||(g[9]=d.createElementVNode("span",{class:"result-label",style:{color:"#52c41a"}},"ΔY:",-1)),d.createElementVNode("span",wv,d.toDisplayString(m(c.value.dy)),1)]),d.createElementVNode("div",bv,[g[10]||(g[10]=d.createElementVNode("span",{class:"result-label",style:{color:"#1890ff"}},"ΔZ:",-1)),d.createElementVNode("span",vv,d.toDisplayString(m(c.value.dz)),1)])],64)):d.createCommentVNode("",!0),c.value.type==="angle"?(d.openBlock(),d.createElementBlock("div",xv,[g[11]||(g[11]=d.createElementVNode("span",{class:"result-label"},"角度:",-1)),d.createElementVNode("span",Iv,d.toDisplayString(c.value.angle.toFixed(1))+"°",1)])):d.createCommentVNode("",!0),c.value.type==="area"?(d.openBlock(),d.createElementBlock("div",Bv,[g[12]||(g[12]=d.createElementVNode("span",{class:"result-label"},"面积:",-1)),d.createElementVNode("span",Sv,d.toDisplayString(y(c.value.area)),1)])):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),d.createElementVNode("div",Mv,[d.createElementVNode("div",Tv,[d.createElementVNode("div",{class:"tool-item",onClick:d.withModifiers(T,["stop"])},[d.createElementVNode("div",Dv,d.toDisplayString(l.value),1)]),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[u.value?(d.openBlock(),d.createElementBlock("div",{key:0,ref_key:"unitDropdownRef",ref:f,class:"unit-dropdown",style:d.normalizeStyle(h.value)},[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(p,k=>d.createElementVNode("div",{key:k.value,class:d.normalizeClass(["unit-option",{selected:l.value===k.value}]),onClick:d.withModifiers(P=>E(k.value),["stop"])},d.toDisplayString(k.label),11,kv)),64))],4)):d.createCommentVNode("",!0)]))]),g[14]||(g[14]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",{class:"action-buttons"},[d.createElementVNode("div",{class:"tool-item control-btn",onClick:x,title:"清空"},[...g[13]||(g[13]=[d.createElementVNode("div",{class:"tool-icon"},"🗑️",-1)])])])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-b766acb4"]]);function Fv(){const n=d.ref(!1),e=d.reactive({x:0,y:0}),t=d.ref([]),i=d.ref(null);return{visible:n,position:e,items:t,contextData:i,show:(a,c,u)=>{a instanceof MouseEvent?(a.preventDefault(),e.x=a.clientX,e.y=a.clientY):(e.x=a.x,e.y=a.y),t.value=c,i.value=u,n.value=!0},hide:()=>{n.value=!1},addItem:a=>{t.value.push(a)},removeItem:a=>{t.value=t.value.filter(c=>c.id!==a)}}}const Rv=["onClick"],Ov={class:"menu-label"},Lv={key:0,class:"menu-arrow"},Nv=Ue(d.defineComponent({__name:"LeitingContextMenu",props:{visible:{type:Boolean},position:{},items:{}},emits:["update:visible","action"],setup(n,{emit:e}){const t=n,i=e,s=r=>{r.disabled||(r.action&&r.action(),i("action",r),i("update:visible",!1))},o=()=>{t.visible&&i("update:visible",!1)};return d.onMounted(()=>{document.addEventListener("click",o),document.addEventListener("contextmenu",r=>{r.target.closest(".leiting-context-menu")||o()})}),d.onUnmounted(()=>{document.removeEventListener("click",o)}),(r,l)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{class:"leiting-context-menu",style:d.normalizeStyle({left:n.position.x+"px",top:n.position.y+"px"}),onContextmenu:l[0]||(l[0]=d.withModifiers(()=>{},["prevent"]))},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.items,a=>(d.openBlock(),d.createElementBlock("div",{key:a.id,class:d.normalizeClass(["menu-item",{"menu-divided":a.divided,"menu-disabled":a.disabled}]),onClick:c=>s(a)},[d.createElementVNode("span",Ov,d.toDisplayString(a.label),1),a.children?(d.openBlock(),d.createElementBlock("span",Lv,"▶")):d.createCommentVNode("",!0)],10,Rv))),128))],36)),[[d.vShow,n.visible]])}}),[["__scopeId","data-v-f288753b"]]),Uv={class:"leiting-ui-overlay"},_i=Ue(d.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(n,{emit:e}){const t=d.ref(),i=d.getCurrentInstance(),s=d.ref(!1),o=d.ref(""),r=d.ref({}),l=d.ref("3d"),a=n,c={title:"构件树",treeData:[]},u=d.ref(!1),h=d.ref(!1),f=d.ref(!1),p=d.ref(!1),m=d.ref(!1),y=d.ref(!1),A=d.ref(!1),C=d.ref(!1),E=d.ref(!1),x=d.ref(!1),{visible:M,position:T,items:B,show:I,hide:g}=Fv(),k=d.ref([]),P=Y=>{k.value.push(Y)},F=Y=>{k.value=k.value.filter(j=>j.id!==Y)},L=d.ref([]),H=d.ref(""),O=d.ref(null),b=d.ref([]),w=d.reactive({tree:!1,section:!1,roam:!1,info:!1,adjustModel:!1,setting:!1,cadLayer:!1,cadPosition:!1,annotation:!1}),v=(Y,j)=>{Y==="componentTree"&&(Y="tree"),Y==="componentInfo"&&(Y="info"),Y in w&&(w[Y]=j)},S=d.shallowRef({});d.provide("leitingMethods",S);const R=d.ref(a.showMenu),_=d.ref([]);d.watch(()=>a.showMenu,Y=>{R.value=Y},{immediate:!0}),d.watch(()=>a.mode,Y=>{Y&&S.value?.set2d&&S.value.set2d(Y==="2d")});const N=d.ref("dark");d.provide("leiting-theme",N);const D=d.ref([]),Q=d.computed(()=>{const Y=[];return u.value&&(Y.push("tree"),Y.push("componentTree")),h.value&&Y.push("section"),f.value&&Y.push("roam"),p.value&&(Y.push("info"),Y.push("componentInfo")),m.value&&Y.push("adjust"),y.value&&Y.push("setting"),A.value&&Y.push("cadLayer"),C.value&&Y.push("cadPosition"),E.value&&Y.push("annotation"),x.value&&(Y.push("measure"),Y.push("measurement")),Y.push(...D.value),Y}),V=d.ref(null),$=(Y,j)=>{Y==="componentTree"||Y==="tree"?u.value=j:Y==="section"?h.value=j:Y==="roam"?f.value=j:Y==="componentInfo"||Y==="info"?p.value=j:Y==="homeView"?S.value?.is2dMode?.()?S.value?.flyToTopView?.({}):S.value?.flyToTileset?.({}):Y==="adjustModel"?(m.value=j,j&&V.value&&V.value.setModelType("BIM")):Y==="osgbAdjust"?(m.value=j,j&&V.value&&V.value.setModelType("OSGB")):Y==="setting"?y.value=j:Y==="cadLayer"?A.value=j:Y==="cadPosition"?C.value=j:Y==="annotation"?E.value=j:Y==="measurement"?x.value=j:j?D.value.includes(Y)||D.value.push(Y):D.value=D.value.filter(J=>J!==Y)},q=()=>{S.value&&(S.value.getDxfModels&&(L.value=S.value.getDxfModels()||[]),S.value.getCadModelId&&(H.value=S.value.getCadModelId()||""))};d.watch(A,Y=>{Y&&q()}),d.watch(C,Y=>{Y&&(q(),O.value&&L.value.length&&O.value.addGltfOr3dTilesModelList(L.value))});const ne=e,se=Y=>{S.value&&S.value.saveCadCalibration&&S.value.saveCadCalibration(Y),S.value&&S.value.saveCadRegion&&S.value.saveCadRegion(Y)};return d.onMounted(async()=>{if(t.value)try{const Y={...xt,cesiumUrl:a.cesiumUrl||xt.cesiumUrl,cesiumCssUrl:a.cesiumCssUrl||xt.cesiumCssUrl,accessToken:a.accessToken||ts()||xt.accessToken};await es(Y);const j=a.accessToken||ts()||xt.accessToken;j&&(Cesium.Ion.defaultAccessToken=j),s.value=!0;const J=(le={},ge)=>{if(t.value){const{showMenu:we,showTree:me,globe:Re,terrain:ct,depthTest:$e,mapProvider:bt,tiandituLayerType:it,tiandituShowLabel:ln,arcgisUrl:Nt,shadows:Ut,environmentMap:Ki,ambientOcclusion:Ke,time:Oe,brightness:st,backgroundColor:dt,collision:_t,mouseHabit:Qt,mode:vt,...Ie}=le||{},To=a.showMenu!==void 0?a.showMenu:we!==void 0?we:!0;R.value=To;const De=(ee,ke,hn)=>ee!==void 0?ee:ke!==void 0?ke:hn,cn=De(a.globe,Re,!1),dn=De(a.terrain,ct,!1),$n=De(a.depthTest,$e,!1),Kn=De(a.mapProvider,bt,"tianditu"),Xn=De(a.tiandituLayerType,it,"img_w"),Xi=De(a.tiandituShowLabel,ln,!1),qc=De(a.arcgisUrl,Nt,"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"),Jc=De(a.shadows,Ut,!1),Zc=De(a.environmentMap,Ki,!1),ed=De(a.ambientOcclusion,Ke,!1),td=De(a.time,Oe,void 0),nd=De(a.brightness,st,1),qi=a.mode||vt||"3d";console.log("LeitingBIM Mode:",qi,"Props:",a.mode,"Options:",vt),l.value=qi;const _I=qi==="2d"?"#000000":"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)",id=De(a.backgroundColor,dt,_I),sd=De(a.collision,_t,!1),od=De(a.mouseHabit,Qt,0);r.value={globe:cn,terrain:dn,depthTest:$n,mapProvider:Kn,tiandituLayerType:Xn,tiandituShowLabel:Xi,arcgisUrl:qc,shadows:Jc,environmentMap:Zc,ambientOcclusion:ed,time:td,brightness:nd,backgroundColor:id,collision:sd,mouseHabit:od};const qn=P0({container:t.value,appContext:i?.appContext,methods:{...S.value,handleMenuAction:$,setCardFullHeight:v,onLoadingStatus:ee=>{ee?fe.loading(ee,"",t.value):fe.close()},...Ie,tilesLoad3dTiles:ee=>{const ke=ee.leiting?.tree,hn=ee.leiting?.model?.modelId;ke&&(Array.isArray(ke)?ke:[ke]).forEach(Gt=>{Gt&&!b.value.find(ad=>ad.id===Gt.id)&&(Gt.modelId=hn,b.value=[...b.value,Gt])});const{brightness:Do,contrast:ko,saturation:ut}=qn.methods.getConfigure();qn.methods.setModelColorAdjustment({brightness:Do,contrast:ko,saturation:ut}),Ie.tilesLoad3dTiles?.(ee)},mountAll3Dtiles:ee=>{a.mountAll3Dtiles&&a.mountAll3Dtiles(ee),Ie.mountAll3Dtiles?.(ee)},mountAllCad:ee=>{if(qn.methods.setModelBrightness){const ke=a.brightness!==void 0?a.brightness:r.value.brightness;ke!==void 0&&qn.methods.setModelBrightness(ke)}a.mountAllCad&&a.mountAllCad(ee),Ie.mountAllCad?.(ee)},saveRegion:ee=>{a.saveRegion&&a.saveRegion(ee),Ie.saveRegion?.(ee)},saveCadRegion:ee=>{a.saveCadRegion&&a.saveCadRegion(ee),Ie.saveCadRegion?.(ee)},saveCadCalibration:ee=>{a.saveCadCalibration&&a.saveCadCalibration(ee),Ie.saveCadCalibration?.(ee)},selectionChange:ee=>{a.selectionChange&&a.selectionChange(ee),Ie.selectionChange?.(ee)},onSearchComponent:ee=>{a.searchComponent&&a.searchComponent(ee),Ie.searchComponent?.(ee)}},viewerOptions:a.viewerOptions,options:{...Ie,mode:qi,playerUrl:a.playerUrl,playerModelName:a.playerModelName,playerModelId:a.playerModelId,playerScale:a.playerScale,globe:cn,terrain:dn,depthTest:$n,mapProvider:Kn,tiandituLayerType:Xn,tiandituShowLabel:Xi,tiandituToken:a.tiandituToken,arcgisUrl:qc,shadows:Jc,environmentMap:Zc,ambientOcclusion:ed,time:td,brightness:nd,backgroundColor:id,collision:sd,mouseHabit:od},callbacks:{onLoading:ee=>ee?fe.loading(ee,"",t.value):fe.close(),onSuccess:ee=>fe.success(ee,"",void 0,t.value),onError:ee=>fe.error(ee,"",void 0,t.value)}}),{Cesium:Ht,viewer:un,methods:Ji,menuEvents:Jn}=qn,ve=Ji;Jn.on("showMenu",ee=>{R.value=ee}),Jn.on("insertMenu",ee=>{_.value=ee}),Jn.on("setMenuActive",(ee,ke)=>{$(ee,ke)}),S.value=ve,ge&&(ge.value=ve),Jn.on("setMode",ee=>{l.value=ee}),Jn.on("deleteAllModels",()=>{b.value=[]}),new Ht.ScreenSpaceEventHandler(un.scene.canvas).setInputAction(ee=>{if(g(),l.value==="2d")return;const ke=un.scene.pick(ee.position),hn=un.container.getBoundingClientRect(),Do=hn.left+ee.position.x,ko=hn.top+ee.position.y,ut=[];if(Ht.defined(ke)&&ke instanceof Ht.Cesium3DTileFeature){const Po=ve.baseCompt.getFeatureId(ke),Gt=Sn(ke.tileset);ve.baseCompt.hasSelectedFeaturesMap[Gt]?.some(Zn=>Zn.batchId===Po&&Zn.rank===0)||(ve.baseCompt.clearSelection(),ve.baseCompt.toggleMultiSelect(Gt,Po,ve.baseCompt.selectedColor)),ut.push({id:"details",label:"构件详情",action:()=>{p.value=!0}}),ut.push({id:"hide",label:"隐藏选中构件",action:()=>{const ei=ve.baseCompt.getSelected().map(ht=>({elementId:ht.elementId,modelId:ht.modelId,show:!1}));ve.baseCompt.setComponentVisibility(ei)}}),ut.push({id:"translucent",label:"半透明选中构件",action:()=>{const ei=ve.baseCompt.getSelected().map(ht=>({elementId:ht.elementId,modelId:ht.modelId,rgba:{...ht.rgba,a:.3}}));ve.baseCompt.setSelectColorUserModelCpt(ei,{rank:0})}}),ut.push({id:"isolate",label:"隔离选中构件",divided:!0,action:()=>{ve.baseCompt.setAllComponentsVisibility(!1);const ei=ve.baseCompt.getSelected().map(ht=>({elementId:ht.elementId,modelId:ht.modelId,show:!0}));ve.baseCompt.setComponentVisibility(ei)}})}ut.push({id:"showAll",label:"显示所有",action:()=>{ve.baseCompt.setAllComponentsVisibility(!0),ve.baseCompt.clearSelection()}}),ut.push(...k.value),I({x:Do,y:ko},ut)},Ht.ScreenSpaceEventType.RIGHT_CLICK),ve.insertContextMenu=P,ve.deleteContextMenu=F,ve.hideContextMenu=g;const rd=le?.onLoaded||le?.onloaded;rd&&rd({Cesium:Ht,viewer:un,methods:Ji}),ne("init",{Cesium:Ht,viewer:un,methods:Ji}),ne("ready",{Cesium:Ht,viewer:un,methods:Ji})}};let oe=!1;ne("register",(le,ge)=>{oe=!0,J(le,ge)}),oe||setTimeout(()=>{S.value.getViewer||J()},0)}catch(Y){o.value="Failed to load Cesium: "+(Y.message||Y),console.error(Y)}}),(Y,j)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["leiting-bim-container",[`theme-${N.value}`]]),onContextmenu:j[11]||(j[11]=d.withModifiers(()=>{},["prevent","stop"]))},[!s.value&&!o.value?(d.openBlock(),d.createBlock(d.unref(Ae.Spin),{key:0,class:"loading",size:"large",tip:"加载基础组件中..."})):d.createCommentVNode("",!0),o.value?(d.openBlock(),d.createBlock(d.unref(Ae.Alert),{key:1,class:"error",type:"error",message:o.value,"show-icon":""},null,8,["message"])):d.createCommentVNode("",!0),d.createElementVNode("div",{ref_key:"containerRef",ref:t,class:"cesium-viewer"},[d.createElementVNode("div",Uv,[d.createVNode(Qn,{visible:p.value,"full-height":w.info,"onUpdate:visible":j[0]||(j[0]=J=>p.value=J)},null,8,["visible","full-height"]),d.createVNode(Hn,{ref_key:"LeitingPositionRef",ref:V,visible:m.value,"full-height":w.adjustModel,"onUpdate:visible":j[1]||(j[1]=J=>m.value=J)},null,8,["visible","full-height"]),d.createVNode(Gn,{visible:y.value,"full-height":w.setting,"tianditu-token":a.tiandituToken,"initial-config":r.value,"onUpdate:visible":j[2]||(j[2]=J=>y.value=J)},null,8,["visible","full-height","tianditu-token","initial-config"]),n.showTree!==!1?(d.openBlock(),d.createBlock(ki,d.mergeProps({key:0},{...c,...n.treeProps},{visible:u.value,"full-height":w.tree,"tree-data":b.value.length>0?b.value:n.treeProps?.treeData||[],"onUpdate:visible":j[3]||(j[3]=J=>{u.value=J})}),null,16,["visible","full-height","tree-data"])):d.createCommentVNode("",!0),d.createVNode(hv,{visible:E.value,"onUpdate:visible":j[4]||(j[4]=J=>E.value=J)},null,8,["visible"]),d.createVNode(Pv,{visible:x.value,"onUpdate:visible":j[5]||(j[5]=J=>x.value=J)},null,8,["visible"]),d.createVNode(Un,{visible:h.value,"full-height":w.section,"onUpdate:visible":j[6]||(j[6]=J=>h.value=J)},null,8,["visible","full-height"]),d.createVNode(_n,{visible:f.value,"full-height":w.roam,"onUpdate:visible":j[7]||(j[7]=J=>f.value=J)},null,8,["visible","full-height"]),d.createVNode(Nn,{visible:R.value,"active-ids":Q.value,"custom-items":_.value,onAction:$,"is-2d":l.value==="2d"},null,8,["visible","active-ids","custom-items","is-2d"]),d.createVNode(db,{visible:A.value,"current-model-id":H.value,"onUpdate:visible":j[8]||(j[8]=J=>A.value=J)},null,8,["visible","current-model-id"]),d.createVNode(iv,{ref_key:"cadPositionRef",ref:O,visible:C.value,"onUpdate:visible":j[9]||(j[9]=J=>C.value=J),onSave:se},null,8,["visible"]),d.createVNode(Nv,{visible:d.unref(M),position:d.unref(T),items:d.unref(B),"onUpdate:visible":j[10]||(j[10]=J=>M.value=J)},null,8,["visible","position","items"]),d.renderSlot(Y.$slots,"default",d.normalizeProps(d.guardReactiveProps({methods:S.value,isReady:s.value})),void 0,!0)])],512)],34))}}),[["__scopeId","data-v-1308f92b"]]);function pc(n){const e=d.ref(),t=d.ref(n.theme||"dark"),i=d.ref(n.menuSize||"medium");d.provide("leiting-theme",t),d.provide("leiting-menu-size",i);function s(l){d.onUnmounted(()=>{e.value=null}),l(n,e)}function o(){const l=d.unref(e);return l||console.error("未获取到leiting实例!"),l}const r=new Proxy({},{get(l,a){const c=o();if(!c)return;const u=c[a];return typeof u=="function"?u.bind(c):u},set(l,a,c){const u=o();return u?(u[a]=c,!0):!1}});return[s,r]}const _v=xt,Qv={install:(n,e)=>{if(n.component("LeitingBIM",_i),n.component("LeitingTree",ki),n.component("LeitingDraggableCard",Fe),n.component("leiting-draggable-card",Fe),n.component("LeitingMenu",Nn),n.component("leiting-menu",Nn),n.component("LeitingSection",Un),n.component("leiting-section",Un),n.component("LeitingPlayer",_n),n.component("leiting-player",_n),n.component("LeitingInfo",Qn),n.component("leiting-info",Qn),n.component("LeitingPosition",Hn),n.component("leiting-position",Hn),n.component("LeitingSetting",Gn),n.component("leiting-setting",Gn),!e)return;const t={..._v,...e};t.cesiumUrl&&es(t).catch(i=>{console.error("[LeitingBim] Failed to load Cesium resources:",i)}),n.config.globalProperties.$leitingBimOptions=t}};var W={image:new Map,background:new Map,resource:new Map,defaultStyle:new Map,baseStyle:new Map,computedStyle:new WeakMap,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}};function gc(n="soft"){switch(n){case"auto":{W.session.styleMap=new Map,W.session.nodeMap=new Map;return}case"soft":{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap,W.computedStyle=new WeakMap,W.baseStyle=new Map,W.defaultStyle=new Map,W.image=new Map,W.background=new Map,W.resource=new Map,W.font=new Set;return}default:{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap;return}}}function uo(n){const e=n.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;const t=e[2].trim();return t.startsWith("#")?null:t}function Hv(n){if(!n||n==="none")return"";let e=n.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(t,i)=>{const s=i.split(",").map(o=>o.trim());return s.length!==6?`matrix(${i})`:(s[4]="0",s[5]="0",`matrix(${s.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(t,i)=>{const s=i.split(",").map(o=>o.trim());return s.length!==16?`matrix3d(${i})`:(s[12]="0",s[13]="0",`matrix3d(${s.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function Qi(n){if(/%[0-9A-Fa-f]{2}/.test(n))return n;try{return encodeURI(n)}catch{return n}}function Gv(n="[snapDOM]",{ttlMs:e=5*6e4,maxEntries:t=12}={}){const i=new Map;let s=0;function o(r,l,a){if(s>=t)return;const c=Date.now();(i.get(l)||0)>c||(i.set(l,c+e),s++,r==="warn"&&console&&console.warn?console.warn(`${n} ${a}`):console&&console.error&&console.error(`${n} ${a}`))}return{warnOnce(r,l){o("warn",r,l)},errorOnce(r,l){o("error",r,l)},reset(){i.clear(),s=0}}}var mc=Gv("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),ho=new Map,Hi=new Map;function Yv(n){return/^data:|^blob:|^about:blank$/i.test(n)}function Vv(n,e){try{const t=typeof location<"u"&&location.href?location.href:"http://localhost/",i=e.includes("{url}")?e.split("{url}")[0]:e,s=new URL(i||".",t),o=new URL(n,t);if(o.origin===s.origin)return!0;const r=o.searchParams;if(r&&(r.has("url")||r.has("target")))return!0}catch{}return!1}function Wv(n,e){if(!e||Yv(n)||Vv(n,e))return!1;try{const t=typeof location<"u"&&location.href?location.href:"http://localhost/",i=new URL(n,t);return typeof location<"u"?i.origin!==location.origin:!0}catch{return!!e}}function zv(n,e){if(!e)return n;if(e.includes("{url}"))return e.replace("{urlRaw}",Qi(n)).replace("{url}",encodeURIComponent(n));if(/[?&]url=?$/.test(e))return`${e}${encodeURIComponent(n)}`;if(e.endsWith("?"))return`${e}url=${encodeURIComponent(n)}`;if(e.endsWith("/"))return`${e}${Qi(n)}`;const t=e.includes("?")?"&":"?";return`${e}${t}url=${encodeURIComponent(n)}`}function Ac(n){return new Promise((e,t)=>{const i=new FileReader;i.onload=()=>e(String(i.result||"")),i.onerror=()=>t(new Error("read_failed")),i.readAsDataURL(n)})}function jv(n,e){return[e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,n].join("|")}async function je(n,e={}){const t=e.as??"blob",i=e.timeout??3e3,s=e.useProxy||"",o=e.errorTTL??8e3,r=e.headers||{},l=!!e.silent;if(/^data:/i.test(n))try{if(t==="text")return{ok:!0,data:String(n),status:200,url:n,fromCache:!1};if(t==="dataURL")return{ok:!0,data:String(n),status:200,url:n,fromCache:!1,mime:String(n).slice(5).split(";")[0]||""};const[,A="",C=""]=String(n).match(/^data:([^,]*),(.*)$/)||[],x=/;base64/i.test(A)?atob(C):decodeURIComponent(C),M=new Uint8Array([...x].map(B=>B.charCodeAt(0))),T=new Blob([M],{type:(A||"").split(";")[0]||""});return{ok:!0,data:T,status:200,url:n,fromCache:!1,mime:T.type||""}}catch{return{ok:!1,data:null,status:0,url:n,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(n))try{const A=await fetch(n);if(!A.ok)return{ok:!1,data:null,status:A.status,url:n,fromCache:!1,reason:"http_error"};const C=await A.blob(),E=C.type||A.headers.get("content-type")||"";return t==="dataURL"?{ok:!0,data:await Ac(C),status:A.status,url:n,fromCache:!1,mime:E}:t==="text"?{ok:!0,data:await C.text(),status:A.status,url:n,fromCache:!1,mime:E}:{ok:!0,data:C,status:A.status,url:n,fromCache:!1,mime:E}}catch{return{ok:!1,data:null,status:0,url:n,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(n))return t==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:n,fromCache:!1,mime:"image/png"}:{ok:!0,data:t==="text"?"":new Blob([]),status:200,url:n,fromCache:!1};const a=jv(n,{as:t,timeout:i,useProxy:s,errorTTL:o}),c=Hi.get(a);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&Hi.delete(a);const u=ho.get(a);if(u)return u;const h=Wv(n,s)?zv(n,s):n;let f=e.credentials;if(!f)try{const A=typeof location<"u"&&location.href?location.href:"http://localhost/",C=new URL(n,A);f=typeof location<"u"&&C.origin===location.origin?"include":"omit"}catch{f="omit"}const p=new AbortController,m=setTimeout(()=>p.abort("timeout"),i),y=(async()=>{try{const A=await fetch(h,{signal:p.signal,credentials:f,headers:r});if(!A.ok){const x={ok:!1,data:null,status:A.status,url:h,fromCache:!1,reason:"http_error"};if(o>0&&Hi.set(a,{until:Date.now()+o,result:x}),!l){const M=`${A.status} ${A.statusText||""}`.trim();mc.warnOnce(`http:${A.status}:${t}:${new URL(n,location?.href??"http://localhost/").origin}`,`HTTP error ${M} while fetching ${t} ${n}`)}return e.onError&&e.onError(x),x}if(t==="text")return{ok:!0,data:await A.text(),status:A.status,url:h,fromCache:!1};const C=await A.blob(),E=C.type||A.headers.get("content-type")||"";return t==="dataURL"?{ok:!0,data:await Ac(C),status:A.status,url:h,fromCache:!1,mime:E}:{ok:!0,data:C,status:A.status,url:h,fromCache:!1,mime:E}}catch(A){const C=A&&typeof A=="object"&&"name"in A&&A.name==="AbortError"?String(A.message||"").includes("timeout")?"timeout":"abort":"network",E={ok:!1,data:null,status:0,url:h,fromCache:!1,reason:C};if(!/^blob:/i.test(n)&&o>0&&Hi.set(a,{until:Date.now()+o,result:E}),!l){const x=`${C}:${t}:${new URL(n,location?.href??"http://localhost/").origin}`,M=C==="timeout"?`Timeout after ${i}ms. Consider increasing timeout or using a proxy for ${n}`:C==="abort"?`Request aborted while fetching ${t} ${n}`:`Network/CORS issue while fetching ${t} ${n}. A proxy may be required`;mc.errorOnce(x,M)}return e.onError&&e.onError(E),E}finally{clearTimeout(m),ho.delete(a)}})();return ho.set(a,y),y}function fo(n,e){if(!e||!n.width||!n.height)return n;const t=document.createElement("canvas");t.width=n.width,t.height=n.height;const i=t.getContext("2d");return i.fillStyle=e,i.fillRect(0,0,t.width,t.height),i.drawImage(n,0,0),t}async function po(n,e={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(n)||n.trim()==="none")return n;const i=uo(n);if(!i)return n;const s=Qi(i);if(W.background.has(s)){const o=W.background.get(s);return o?`url("${o}")`:"none"}try{const o=await je(s,{as:"dataURL",useProxy:e.useProxy});return o.ok?(W.background.set(s,o.data),`url("${o.data}")`):(W.background.set(s,null),"none")}catch{return W.background.set(s,null),"none"}}var yc=new Set(["meta","script","noscript","title","link","template"]),Gi=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),$v=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"];function Kv(){for(let n of $v){const e=String(n).toLowerCase();yc.has(e)||Gi.has(e)||Cc(e)}}function Cc(n){if(n=String(n).toLowerCase(),Gi.has(n)){const o={};return W.defaultStyle.set(n,o),o}if(W.defaultStyle.has(n))return W.defaultStyle.get(n);let e=document.getElementById("snapdom-sandbox");e||(e=document.createElement("div"),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));const t=document.createElement(n);t.style.all="initial",e.appendChild(t);const i=getComputedStyle(t),s={};for(let o of i){if(Ec(o))continue;const r=i.getPropertyValue(o);s[o]=r}return e.removeChild(t),W.defaultStyle.set(n,s),s}var Xv=/(?:^|-)(animation|transition)(?:-|$)/i,qv=/^(--|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,Jv=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope"]);function Ec(n){const e=String(n).toLowerCase();return!!(Jv.has(e)||qv.test(e)||Xv.test(e))}function go(n,e){if(e=String(e||"").toLowerCase(),Gi.has(e))return"";const t=[],i=Cc(e);for(let[s,o]of Object.entries(n)){if(Ec(s))continue;const r=i[s];o&&o!==r&&t.push(`${s}:${o}`)}return t.sort(),t.join(";")}function Zv(n){const e=new Set;return n.nodeType!==Node.ELEMENT_NODE&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(n.tagName&&e.add(n.tagName.toLowerCase()),typeof n.querySelectorAll=="function"&&n.querySelectorAll("*").forEach(t=>e.add(t.tagName.toLowerCase())),Array.from(e))}function ex(n){const e=new Map;for(let i of n){const s=W.defaultStyle.get(i);if(!s)continue;const o=Object.entries(s).map(([r,l])=>`${r}:${l};`).sort().join("");o&&(e.has(o)||e.set(o,[]),e.get(o).push(i))}let t="";for(let[i,s]of e.entries())t+=`${s.join(",")} { ${i} }
|
|
117
|
+
`});f.isModelAdjustment=!0,h.customShader=f}else e.brightness!==void 0&&e.brightness!==1&&!h.style&&(h.style=new i.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 i=t.postProcessStages.ambientOcclusion;i.enabled=e,e&&(i.uniforms.ambientOcclusionOnly=!1,i.uniforms.intensity=3,i.uniforms.bias=.1,i.uniforms.lengthCap=.03,i.uniforms.stepSize=1,i.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)}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 k0{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},orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},duration:1}}flyToCameraView(e){const{position:t,orientation:i,duration:s}=e,o=new this.cesium.Cartesian3(t.x,t.y,t.z),r=new this.cesium.HeadingPitchRoll(i.heading,i.pitch,i.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||{};this.flyToCameraView({position:{x:Number(e.position.x),y:Number(e.position.y),z:Number(e.position.z)},orientation:{heading:Number(t.heading||0),pitch:Number(t.pitch||0),roll:Number(t.roll||0)},duration:e.duration})}}function P0(n){const{container:e,appContext:t,methods:i,viewerOptions:s,options:o,callbacks:r}=n,l=new pi,a=window.Cesium;if(!a)throw new Error("Cesium is not loaded");e.id=`cesium-container-${Sg()}`;const c={animation:!1,timeline:!1,infoBox:!1,homeButton:!1,fullscreenButton:!1,sceneModePicker:!1,navigationHelpButton:!1,geocoder:!1,baseLayerPicker:!1,selectionIndicator:!1,creditContainer:document.createElement("div"),contextOptions:{webgl:{alpha:!0}}},u=t?.config?.globalProperties?.$leitingBimOptions,h={...c,...u?.viewerOptions??{},...s??{}},f=new a.Viewer(e,h);f.camera.setView({destination:a.Cartesian3.fromDegrees(108,32,1e7),orientation:{heading:a.Math.toRadians(0),pitch:a.Math.toRadians(-90),roll:0}});let p=i;if(!p&&u&&(u.methods||(u.methods={}),p=u.methods),p){const m=new Qg({cesium:a,viewer:f,options:o,callbacks:r}),y=new ka({cesium:a,viewer:f}),A=new D0({cesium:a,viewer:f}),C=new Hg({cesium:a,viewer:f}),E=new k0({cesium:a,viewer:f});let x;const M=new tc({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&&o.mode==="2d"&&(console.log("InitMap: Setting CAD Mode 2D"),A.setCadMode("2d"),x=new ao({cesium:a,viewer:f})),y.events.on("tilesetLoaded",g=>{m.baseCompt.attachTileset(g,m.baseCompt.selectedColor),m.baseSection.attachTileset(g,g.leiting?.model?.modelId),p&&p.tilesLoad3dTiles&&p.tilesLoad3dTiles(g),o?.tilesLoad3dTiles&&o.tilesLoad3dTiles(g.leiting)}),y.events.on("loadingStatus",g=>{p&&p.onLoadingStatus&&p.onLoadingStatus(g)}),y.events.on("mountAll3Dtiles",({modelList:g,mapTileset:k})=>{o?.mountAll3Dtiles&&o.mountAll3Dtiles(g),p?.mountAll3Dtiles&&p.mountAll3Dtiles(k)}),C.events.on("mountAllCad",g=>{o?.mountAllCad&&o.mountAllCad(g),p?.mountAllCad&&p.mountAllCad(g)}),m.baseCompt.selectionChange(g=>{g.length!==0&&(o?.selectionChange&&o.selectionChange(g),p?.selectionChange&&p.selectionChange(g))}),p.onSearchComponent=g=>{o?.searchComponent&&o.searchComponent(g),p?.searchComponent&&p.searchComponent(g)};const T=p.saveRegion;p.saveRegion=g=>{o?.saveRegion&&o.saveRegion(g),T&&T!==o?.saveRegion&&T(g)};const B=p.saveCadCalibration;p.saveCadCalibration=g=>{o?.saveCadCalibration&&o.saveCadCalibration(g),B&&B!==o?.saveCadCalibration&&B(g)};const I=p.saveCadRegion;p.saveCadRegion=g=>{o?.saveCadRegion&&o.saveCadRegion(g),I&&I!==o?.saveCadRegion&&I(g)},p.getCesium=()=>a,p.getViewer=()=>f,p.getAnnotationInstance=()=>x,p.getMeasureInstance=()=>M,p.flyTo=g=>{E.setCameraView(g)},p.addPoint=(g,k,P=0)=>{f.entities.add({position:a.Cartesian3.fromDegrees(g,k,P),point:{pixelSize:10,color:a.Color.RED}})},p.enableTestLabel=()=>m.enableTestLabel(),p.setBackgroundColor=g=>A.setBackgroundColor(g),p.enableCesiumFXAA=g=>m.enableCesiumFXAA(g),p.setSceneOptions=g=>m.setSceneOptions(g),p.getCameraInfo=()=>E.getCameraView(),p.flyToCameraView=g=>E.flyToCameraView(g),p.getCurrentCameraPositionAndTarget=()=>E.getCurrentCameraPositionAndTarget(),p.setCameraView=g=>E.setCameraView(g),p.getImageBase64=()=>{const g=f.scene.canvas;return f.render(),g.toDataURL("image/png")},p.getSnapDomSImageBase64=(g,k)=>m.getSnapDomSImageBase64(g,k),p.addModels=g=>y.addModels(g),p.add3DtilesModel=g=>y.addModels(g),p.addOSGB=g=>y.addOSGB(g),p.updateOSGBMatrix=g=>y.updateOSGBMatrix(g),p.showModels=g=>y.showModels(g),p.showTileset=g=>y.showModels(g),p.deleteModels=g=>y.deleteModels(g),p.deleteAllModelList=()=>{y.deleteAllModels(),l.emit("deleteAllModels")},p.deleteAllModels=()=>{y.deleteAllModels(),l.emit("deleteAllModels")},p.flyToTileset=g=>y.flyToTileset(g),p.flyToByModelId=g=>y.flyToTileset(g),p.updateModelEffect=g=>m.updateModelEffect(g),p.getMapTileset=()=>y.getMapTileset(),p.getBIMmodelId=()=>y.getBIMmodelId(),p.getModelList=()=>y.getModelList(),p.setMapTileset=g=>y.setMapTileset(g),p.setBIMmodelId=g=>y.setBIMmodelId(g),p.setModelList=g=>y.setModelList(g),p.setSelectColorUserModelCpt=(g,k)=>m.baseCompt.setSelectColorUserModelCpt(g,k),p.setAllSelectColorUserModelCpt=g=>m.baseCompt.setAllSelectColorUserModelCpt(g),p.setSelectColorUserModelCptByClear=()=>m.baseCompt.clearAllHaveSelected(),p.clearSelectColorUserModelCpt=()=>m.baseCompt.clearAllHaveSelected(),p.setSelecteds=(g,k)=>m.baseCompt.setSelectColorUserModelCpt(g,k??{rank:0}),p.setSelectedColor=(g,k,P,F)=>m.baseCompt.setSelectedColorRgba(g,k,P,F),p.clearAllHaveSelected=()=>m.baseCompt.clearAllHaveSelected(),p.getSelected=g=>m.baseCompt.getSelected(g),p.selectionChange=g=>{m.baseCompt.selectionChange(g)},p.flyToObjects=g=>m.baseCompt.flyToObjects(g),p.setAllConstructionProgressTracking=g=>m.baseCompt.setAllConstructionProgressTracking(g),p.enableAllConstructionProgressTracking=()=>m.baseCompt.enableConstructionProgressTracking(),p.disableConstructionProgressTracking=()=>m.baseCompt.disableConstructionProgressTracking(),p.freshConstructionProgressTracking=()=>m.baseCompt.freshConstructionProgressTracking(),p.reStartAnimation=()=>m.baseCompt.reStartAnimation(),p.resumeFlyTo=()=>m.baseCompt.resumeFlyTo(),p.pauseFlyTo=()=>m.baseCompt.pauseFlyTo(),p.pauseAnimation=()=>m.baseCompt.pauseFlyTo(),p.resumeAnimation=()=>m.baseCompt.resumeFlyTo(),p.setElementsListVisible=g=>m.baseCompt.setComponentVisibility(g),p.setAllElementsVisible=g=>m.baseCompt.setAllComponentsVisibility(g),p.getElementsVisible=g=>m.baseCompt.getComponentsByVisibility(g),p.setComponentVisibility=g=>m.baseCompt.setComponentVisibility(g),p.setAllComponentsVisibility=g=>m.baseCompt.setAllComponentsVisibility(g),p.getComponentsByVisibility=g=>m.baseCompt.getComponentsByVisibility(g),p.openSection=(g,k)=>m.baseSection.open(g,k),p.closeSection=g=>m.baseSection.close(g),p.updateSectionRange=g=>m.baseSection.updateRange(g),p.getSectionRange=()=>m.baseSection.getRange(),p.fitToModels=()=>m.baseSection.fitToModels(),p.setSectionBoxVisibility=g=>m.baseSection.setBoxVisibility(g),p.openPlayer=()=>{m.baseCompt.disableSelection(),m.basePlayer.openPlayer()},p.closePlayer=()=>{m.basePlayer.closePlayer(),m.baseCompt.enableSelection()},p.setPersonPosition=g=>m.basePlayer.setPersonPosition(g),p.setPlayerSpeed=g=>m.basePlayer.setSpeed({speed:g}),p.setPlayerParams=g=>m.basePlayer.setParams(g),p.setPlayerMoveState=(g,k)=>m.basePlayer.setMoveState(g,k),p.bindPlayerUiKeys=g=>m.basePlayer.bindUiKeys(g),p.setGlobeEnvironmentVisible=g=>A.setGlobeEnvironmentVisible(g),p.setGlobeColor=g=>A.setGlobeColor(g),p.setCadMode=g=>A.setCadMode(g),p.setTerrainEnable=g=>A.setTerrainEnable(g),p.setDepthTestEnable=g=>A.setDepthTestEnable(g),p.changeBaseMap=(g,k)=>A.changeBaseMap(g,k),p.searchLocation=(g,k)=>A.searchLocation(g,k),p.setShadowsEnable=g=>A.setShadowsEnable(g),p.setShadowDarkness=g=>{A.setShadowDarkness?A.setShadowDarkness(g):console.warn("baseSetting.setShadowDarkness is not available. Please reload the page.")},p.setTime=g=>A.setTime(g),p.setModelBrightness=g=>A.setModelBrightness(g),p.setModelColorAdjustment=g=>A.setModelColorAdjustment(g),p.setEnvironmentMapEnable=g=>A.setEnvironmentMapEnable(g),p.setAmbientOcclusion=g=>A.setAmbientOcclusion(g),p.setCollisionDetection=g=>A.setCollisionDetection(g),p.setMouseHabit=g=>A.setMouseHabit(g),p.is2dMode=()=>A.is2d,p.setSceneMode=g=>{const k=g?"2d":"3d";A.setCadMode(k),g&&!x&&(x=new ao({cesium:a,viewer:f})),l.emit("setMode",k)},p.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)},p.getConfigure=()=>(console.warn("getConfigure is not initialized. Please ensure LeitingSetting component is mounted."),{}),p.setConfigure=g=>{console.warn("setConfigure is not initialized. Please ensure LeitingSetting component is mounted.",g)},p.addDxfModel=g=>{const k={...g};return k.files&&!k.fileNames&&(k.fileNames=k.files),k.fileNames||(k.fileNames=[]),C.addDxfModel(k)},p.deleteCad=g=>C.deleteCad(g),p.deleteAllCad=()=>C.deleteAllCad(),p.showDxfModel=g=>C.showJson(g),p.showDxfLayer=g=>C.showJsonByLayer(g),p.flyToCadModel=(g={})=>C.flyToCadModel(g),p.getDxfModels=g=>C.getDxfModels(g),p.getDxfLayers=g=>C.getMapLayers(g),p.getCadModelId=()=>C.getModelId(),p.setDxfOpen=g=>C.setDxfOpen(g),p.getDxfOpen=()=>C.getDxfOpen(),p.adjustingModelByCad=g=>C.adjustingModelByCad(g),p.saveAnnotations=()=>{let g=null;return x&&(g=x.saveAnnotations()),o?.saveAnnotations&&o.saveAnnotations(g),g},p.loadAnnotations=g=>x?x.loadAnnotations(g):!1,p.set2d=g=>{const k=g?"2d":"3d";A.setCadMode(k),g&&!x&&(x=new ao({cesium:a,viewer:f})),l.emit("setMode",k)},p.flyToTopView=()=>{C.flyToCadModel()},p.menuEvents=l,p.insertMenu=g=>{l.emit("insertMenu",g)},p.setMenuListFilter=g=>{l.emit("setMenuListFilter",g)},p.showMenu=g=>{l.emit("showMenu",g)},p.setMenuActive=(g,k)=>{l.emit("setMenuActive",g,k)},p.insertContextMenu=g=>{console.warn("insertContextMenu is not initialized yet. Please wait for LeitingBIM component to mount.",g)},p.deleteContextMenu=g=>{console.warn("deleteContextMenu is not initialized yet.",g)},p.hideContextMenu=()=>{console.warn("hideContextMenu is not initialized yet.")},p.baseCompt=m.baseCompt,p.getTree=()=>{const g=[],k=y.getMapTileset();return Object.keys(k).forEach(P=>{const F=k[P];if(F&&F.leiting&&F.leiting.tree){const L=F.leiting.tree;Array.isArray(L)?g.push(...L):g.push(L)}}),g},p.getAllComponents=()=>{const g=y.getMapTileset(),k={},P=[];try{Object.keys(g).forEach(F=>{const L=g[F];if(!L||!L.leiting)return;const H=L.leiting,O=H.node,b=H.model.formData,w=H.box;if(!O||!O.nodeExtras)return;const v=H.model.modelId;k[v]=O.nodeExtras;const S=O.nodeExtras.element;if(!S)return;const R=w?w.center:{x:0,y:0,z:0};Object.values(S).forEach(_=>{if(_.box3)try{const N=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(b.totalRotation||0)),D=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(N),new a.Cartesian3(0,0,0)),Q=a.Cartesian3.fromDegrees(b.longitude,b.latitude,b.height),V=a.Transforms.eastNorthUpToFixedFrame(Q);a.Matrix4.multiply(V,D,V);const $=new a.Cartesian3(R.x,R.y,0),q=new a.Cartesian3;a.Matrix4.multiplyByPoint(V,$,q);const ne=a.Cartographic.fromCartesian(q),se=_.box3?.Center?.x||0,Y=_.box3?.Center?.y||0,j=_.box3?.Center?.z||0,J=new a.Cartesian3(-R.x+se,-R.y+Y,0+j),oe=a.Matrix4.fromTranslation(J),le=a.Matrix4.clone(oe);a.Matrix4.multiply(D,le,le);const ge=a.Cartesian3.fromDegrees(ne.longitude/Math.PI*180,ne.latitude/Math.PI*180,b.height),we=a.Transforms.eastNorthUpToFixedFrame(ge);a.Matrix4.multiply(we,le,we);const me=a.Cartographic.fromCartesian(new a.Cartesian3(we[12],we[13],we[14]));_.box3.cartographic={longitude:me.longitude/Math.PI*180,latitude:me.latitude/Math.PI*180,height:me.height};const Re={id:_.uniqueId,billboard:[{theme:"Tag9999",position:[_.box3.cartographic.longitude,_.box3.cartographic.latitude,_.box3.cartographic.height],options:{text:_.name}}]};P.push(Re)}catch(N){console.warn("Error calculating component position:",N)}})})}catch(F){console.error("getAllComponents error:",F)}return k},p.getCptInfos=g=>{if(!Array.isArray(g))return[];const k=y.getMapTileset(),P=[],F={};g.forEach(L=>{!L.modelId||!L.elementId||(F[L.modelId]||(F[L.modelId]=[]),F[L.modelId]?.push(L.elementId))});try{Object.keys(F).forEach(L=>{const H=k[L];if(!H||!H.leiting)return;const O=H.leiting,b=O.node,w=O.model.formData,v=O.box;if(!b||!b.nodeExtras)return;const S=b.nodeExtras.element;if(!S)return;const R=v?v.center:{x:0,y:0,z:0};F[L]?.forEach(_=>{const N=S[_];if(N&&N.box3)try{const D=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(w.totalRotation||0)),Q=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(D),new a.Cartesian3(0,0,0)),V=a.Cartesian3.fromDegrees(w.longitude,w.latitude,w.height),$=a.Transforms.eastNorthUpToFixedFrame(V);a.Matrix4.multiply($,Q,$);const q=new a.Cartesian3(R.x,R.y,0),ne=new a.Cartesian3;a.Matrix4.multiplyByPoint($,q,ne);const se=a.Cartographic.fromCartesian(ne),Y=N.box3?.Center?.x||0,j=N.box3?.Center?.y||0,J=N.box3?.Center?.z||0,oe=new a.Cartesian3(-R.x+Y,-R.y+j,0+J),le=a.Matrix4.fromTranslation(oe),ge=a.Matrix4.clone(le);a.Matrix4.multiply(Q,ge,ge);const we=a.Cartesian3.fromDegrees(se.longitude/Math.PI*180,se.latitude/Math.PI*180,w.height),me=a.Transforms.eastNorthUpToFixedFrame(we);a.Matrix4.multiply(me,ge,me);const Re=a.Cartographic.fromCartesian(new a.Cartesian3(me[12],me[13],me[14]));N.box3.cartographic={longitude:Re.longitude/Math.PI*180,latitude:Re.latitude/Math.PI*180,height:Re.height},P.push(N)}catch(D){console.warn("Error calculating component position:",D)}})})}catch(L){console.error("getCptInfos error:",L)}return P},window.Methods=p}return console.log("methods",p),{Cesium:a,viewer:f,methods:p,menuEvents:l}}function lo(n){return d.getCurrentScope()?(d.onScopeDispose(n),!0):!1}function co(n){return typeof n=="function"?n():d.unref(n)}const F0=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const R0=Object.prototype.toString,O0=n=>R0.call(n)==="[object Object]",L0=()=>{};function N0(n){return d.getCurrentInstance()}function nc(n,e=!0,t){N0()?d.onMounted(n,t):e?n():d.nextTick(n)}function Lt(n){var e;const t=co(n);return(e=t?.$el)!=null?e:t}const Ln=F0?window:void 0;function U0(...n){let e,t,i,s;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,i,s]=n,e=Ln):[e,t,i,s]=n,!e)return L0;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},l=(u,h,f,p)=>(u.addEventListener(h,f,p),()=>u.removeEventListener(h,f,p)),a=d.watch(()=>[Lt(e),co(s)],([u,h])=>{if(r(),!u)return;const f=O0(h)?{...h}:h;o.push(...t.flatMap(p=>i.map(m=>l(u,p,m,f))))},{immediate:!0,flush:"post"}),c=()=>{a(),r()};return lo(c),c}function _0(){const n=d.ref(!1),e=d.getCurrentInstance();return e&&d.onMounted(()=>{n.value=!0},e),n}function ic(n){const e=_0();return d.computed(()=>(e.value,!!n()))}function Q0(n,e={}){const{window:t=Ln}=e,i=ic(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let s;const o=d.ref(!1),r=c=>{o.value=c.matches},l=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",r):s.removeListener(r))},a=d.watchEffect(()=>{i.value&&(l(),s=t.matchMedia(co(n)),"addEventListener"in s?s.addEventListener("change",r):s.addListener(r),o.value=s.matches)});return lo(()=>{a(),l(),s=void 0}),o}function H0(n,e,t={}){const{window:i=Ln,...s}=t;let o;const r=ic(()=>i&&"ResizeObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},a=d.computed(()=>Array.isArray(n)?n.map(h=>Lt(h)):[Lt(n)]),c=d.watch(a,h=>{if(l(),r.value&&i){o=new ResizeObserver(e);for(const f of h)f&&o.observe(f,s)}},{immediate:!0,flush:"post"}),u=()=>{l(),c()};return lo(u),{isSupported:r,stop:u}}function G0(n,e={width:0,height:0},t={}){const{window:i=Ln,box:s="content-box"}=t,o=d.computed(()=>{var h,f;return(f=(h=Lt(n))==null?void 0:h.namespaceURI)==null?void 0:f.includes("svg")}),r=d.ref(e.width),l=d.ref(e.height),{stop:a}=H0(n,([h])=>{const f=s==="border-box"?h.borderBoxSize:s==="content-box"?h.contentBoxSize:h.devicePixelContentBoxSize;if(i&&o.value){const p=Lt(n);if(p){const m=p.getBoundingClientRect();r.value=m.width,l.value=m.height}}else if(f){const p=Array.isArray(f)?f:[f];r.value=p.reduce((m,{inlineSize:y})=>m+y,0),l.value=p.reduce((m,{blockSize:y})=>m+y,0)}else r.value=h.contentRect.width,l.value=h.contentRect.height},t);nc(()=>{const h=Lt(n);h&&(r.value="offsetWidth"in h?h.offsetWidth:e.width,l.value="offsetHeight"in h?h.offsetHeight:e.height)});const c=d.watch(()=>Lt(n),h=>{r.value=h?e.width:0,l.value=h?e.height:0});function u(){a(),c()}return{width:r,height:l,stop:u}}function Y0(n={}){const{window:e=Ln,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:o=!0}=n,r=d.ref(t),l=d.ref(i),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(),nc(a),U0("resize",a,{passive:!0}),s){const c=Q0("(orientation: portrait)");d.watch(c,()=>a())}return{width:r,height:l}}const V0={class:"title"},W0={class:"actions"},z0={class:"card-body"},j0=d.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:200},minWidth:{type:Number,default:200},fullHeight:{type:Boolean,default:!1},align:{type:String,default:""}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=d.inject("leiting-theme",d.ref("dark")),s=e,o=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:M=>{s("update:visible",M),s("update:open",M)}}),r=d.ref(null),l=d.ref(t.initialPosition?.x||0),a=d.ref(t.initialPosition?.y||0),c=d.ref(t.width),u=d.ref(t.fullHeight?"100%":"600px");d.watch(()=>t.fullHeight,M=>{M?u.value="100%":u.value==="100%"&&(u.value="600px")});const{height:h}=Y0();d.watch(h,()=>{t.fullHeight&&(u.value="100%")});const f=d.ref(!1),p=M=>{f.value=!0,M.preventDefault(),M.stopPropagation();const T=M.clientX,B=M.clientY,I=typeof c.value=="number"?c.value:r.value?.offsetWidth||0,g=typeof u.value=="number"?u.value:r.value?.offsetHeight||0,k=F=>{if(!f.value)return;F.preventDefault();const L=F.clientX-T,H=F.clientY-B,O=I+L,b=g+H;O>100&&(c.value=O),b>100&&(u.value=b)},P=()=>{f.value=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",P)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",P)},m=d.computed(()=>({left:`${l.value}px`,top:`${a.value}px`,width:typeof c.value=="number"?`${c.value}px`:c.value,height:typeof u.value=="number"?`${u.value}px`:u.value,position:"absolute",zIndex:2e3})),y=()=>{d.nextTick(()=>{if(r.value){const M=r.value.offsetParent||document.body,T=M.clientWidth,B=M.clientHeight,I=typeof c.value=="number"?c.value:r.value.offsetWidth||350,g=typeof u.value=="number"?u.value:r.value.offsetHeight||600;l.value+I>T&&(l.value=Math.max(0,T-I-20)),a.value+g>B&&(a.value=Math.max(0,B-g-20)),l.value<0&&(l.value=0),a.value<0&&(a.value=0)}})},A=d.ref(!1),C=M=>{if(M.target.closest(".close-btn")||M.target.closest(".actions"))return;A.value=!0,M.preventDefault(),M.stopPropagation();const T=M.clientX,B=M.clientY,I=l.value,g=a.value,k=F=>{if(!A.value)return;F.preventDefault();const L=F.clientX-T,H=F.clientY-B;l.value=I+L,a.value=g+H},P=()=>{A.value=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",P),y()};document.addEventListener("mousemove",k),document.addEventListener("mouseup",P)},E=()=>{d.nextTick(()=>{if(t.align&&r.value){const M=r.value.offsetParent||document.body,T=typeof c.value=="number"?c.value:r.value.offsetWidth||350;t.align==="right"?l.value=Math.max(0,M.clientWidth-T-20):t.align==="center"&&(l.value=Math.max(0,(M.clientWidth-T)/2))}y()})};d.onMounted(()=>{t.align?E():y()}),d.watch(o,M=>{M&&(t.align?E():y())});const x=()=>{o.value=!1,s("close")};return(M,T)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{ref_key:"cardRef",ref:r,class:d.normalizeClass(["draggable-card leiting-scroll",["leiting-theme-"+d.unref(i)]]),style:d.normalizeStyle(m.value)},[d.createElementVNode("div",{ref:"headerRef",class:"card-header",onMousedown:C},[d.createElementVNode("span",V0,d.toDisplayString(n.title),1),d.createElementVNode("div",W0,[d.renderSlot(M.$slots,"header-extra",{},void 0,!0),d.createElementVNode("span",{class:"close-btn",onClick:x},"×")])],544),d.createElementVNode("div",z0,[d.renderSlot(M.$slots,"default",{},void 0,!0)]),d.createElementVNode("div",{class:"resize-handle",onMousedown:p},[...T[0]||(T[0]=[d.createElementVNode("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"currentColor"},[d.createElementVNode("path",{d:"M10 10 L10 2 L2 10 Z"})],-1)])],32)],6)),[[d.vShow,o.value]])}}),Ue=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},Fe=Ue(j0,[["__scopeId","data-v-4db89eda"]]);function $0(n){const e=d.ref([]),t=d.ref([]),i=d.ref([]),s=d.ref(""),o=d.ref(!0);d.watch(()=>d.unref(n),h=>{if(!h||h.length===0)return;const f=[],p=(A,C)=>{A.forEach(E=>{const x=E.id||E.key||E.$id,M=E.modelId||C;M&&(E.modelId=M),x&&f.push(x),E.children&&E.children.length>0&&p(E.children,M)})};p(h);const m=new Set(i.value);let y=!1;f.forEach(A=>{m.has(A)||(m.add(A),y=!0)}),y&&(i.value=Array.from(m))},{immediate:!0,deep:!0});const r=d.computed(()=>{const h=d.unref(n);if(!h)return[];const f=[],p=(m,y)=>{m.forEach(A=>{const C=A.id||A.key||A.$id,E=A.name||A.title;f.push({key:C,title:E,parentKey:y}),A.children&&A.children.length>0&&p(A.children,C)})};return p(h),f}),l=h=>{e.value=h,o.value=!1},a=h=>{i.value=h},c=h=>{t.value=h},u=h=>r.value.find(p=>p.key===h)?.parentKey;return d.watch(s,h=>{if(!h)return;const p=r.value.filter(y=>y.title&&y.title.toLowerCase().includes(h.toLowerCase())).map(y=>y.parentKey),m=new Set;p.forEach(y=>{let A=y;for(;A;)m.add(A),A=u(A)}),e.value=[...m],o.value=!0}),{expandedKeys:e,selectedKeys:t,checkedKeys:i,searchValue:s,autoExpandParent:o,onExpand:l,onCheck:a,onSelect:c}}const K0={class:"search-box"},X0={key:0},q0={style:{color:"#f50"}},J0={key:1},Z0={key:1,class:"empty-tip"},ki=Ue(d.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(n,{emit:e}){const t=Ae.Input.Search,i=Ae.Tree,s=n,o=e,r=d.inject("leiting-theme",d.ref("dark")),l=d.inject("leitingMethods"),a=g=>{l?.value?.onSearchComponent&&l.value.onSearchComponent(g)},c=d.computed({get:()=>s.open!==void 0?s.open:s.visible,set:g=>{o("update:visible",g),o("update:open",g)}}),u=d.ref(null),{height:h}=G0(u),f=d.computed(()=>h.value||300),p={children:"children",title:"name",key:"id"},{expandedKeys:m,selectedKeys:y,checkedKeys:A,searchValue:C,autoExpandParent:E}=$0(d.toRef(s,"treeData")),x=g=>{m.value=g,E.value=!1},M=g=>{const k=[],P=F=>{if(!F.children||F.children.length===0){const H=F.element_Id;F.modelId&&H&&k.push({modelId:F.modelId,elementId:H})}else F.children.forEach(P)};return P(g),k},T=(g,k)=>{A.value=g,o("check",g,k);const P=M(k.node).map(F=>({...F,show:k.checked}));l?.value?.setComponentVisibility&&l.value.setComponentVisibility(P),l?.value?.onTreeCheck&&l.value.onTreeCheck(g,k)},B=(g,k)=>{if(y.value=g,o("select",g,k),k.selected){const P=M(k.node);P.length>0&&l?.value?.flyToObjects&&l.value.flyToObjects({selectCpts:P})}l?.value?.onTreeSelect&&l.value.onTreeSelect(g,k)},I=()=>{o("update:visible",!1),o("close")};return(g,k)=>(d.openBlock(),d.createBlock(Fe,{visible:c.value,"onUpdate:visible":k[1]||(k[1]=P=>c.value=P),title:n.title,"initial-position":n.initialPosition,"full-height":n.fullHeight,onClose:I},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["leiting-tree-container",[`theme-${d.unref(r)}`]])},[d.createElementVNode("div",K0,[d.createVNode(d.unref(t),{value:d.unref(C),"onUpdate:value":k[0]||(k[0]=P=>d.isRef(C)?C.value=P:null),placeholder:"搜索构件","allow-clear":"","enter-button":"",onSearch:a},null,8,["value"])]),d.createElementVNode("div",{class:"tree-wrapper",ref_key:"treeWrapperRef",ref:u},[n.treeData&&n.treeData.length?(d.openBlock(),d.createBlock(d.unref(i),{key:0,"tree-data":n.treeData,"field-names":p,height:f.value,"expanded-keys":d.unref(m),"auto-expand-parent":d.unref(E),"selected-keys":d.unref(y),"checked-keys":d.unref(A),checkable:"",virtual:"","block-node":"",onExpand:x,onSelect:B,onCheck:T},{title:d.withCtx(({title:P})=>[P&&d.unref(C)&&P.toLowerCase().indexOf(d.unref(C).toLowerCase())>-1?(d.openBlock(),d.createElementBlock("span",X0,[d.createTextVNode(d.toDisplayString(P.substr(0,P.toLowerCase().indexOf(d.unref(C).toLowerCase())))+" ",1),d.createElementVNode("span",q0,d.toDisplayString(d.unref(C)),1),d.createTextVNode(" "+d.toDisplayString(P.substr(P.toLowerCase().indexOf(d.unref(C).toLowerCase())+d.unref(C).length)),1)])):(d.openBlock(),d.createElementBlock("span",J0,d.toDisplayString(P),1))]),_:1},8,["tree-data","height","expanded-keys","auto-expand-parent","selected-keys","checked-keys"])):(d.openBlock(),d.createElementBlock("div",Z0,"暂无数据"))],512)],2)]),_:1},8,["visible","title","initial-position","full-height"]))}}),[["__scopeId","data-v-4cd53c55"]]),eC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEhSURBVDhP1ZRhkcIwEIWJAsDBOTgkgAJAAYcCQAFFAUgoDjgFh4Q7B+cAUFC+19kyS0hL+Ulm3nS6+/ZLNkkbOk9GURRDWUIIxyZraEoCWZLfmmcOLK/z14KAqGiGvq14zDMHNk/BHkAAehh/0ABtKMxUSFzPNfpFI+JnD7wDYVaxIIov41bIfxHfoROakhe0HDeQmbQfFzTxJj+zTXYg1kWrarISRFKzLNAfGsbL9iDzq/0j+kQZ/k1wm7onoKW3Hq42F0jLVK//Tcebott2fJAbVK1lvKwBNd6rRIsFsfJka0G2qdpQPy7+EPC0AumexKAzoH5FbgvSbHuUW6EOYubbfwX0cLPfFJS4K6mPNrbdHb+uvP498dhVn4v9FWo9V3RZzFxAv8L9AAAAAElFTkSuQmCC",sc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAERSURBVDhPvZTrEYIwEISTCrQD6EA7gA60AylBK1Aq0A7ECrQDoQPsADrACuLuTMJkIiHxjzezgyR7H3d5KJVSqRAigcaQUjYYX2JgZY/P/O4lEgYYFo7pgPcc2kSCBoIUzDeo0klPPEsNYlX7AKzA/M6ASrRzYoIGG5DAOCvzBvzMOxqQazSgLLI1QdAW5jWpUAPV0AVKIc7FRCuNy7RkWozJtj1BED7ANbpDXHhffFXUwUnZwRYp7qw7Rx8/lLkV9R4QD2w1A8pjW3sA4h5au+pXEBS76P8D6Ut9/nXXaiRQdnBXqBfEC+4GdzSxW5v6F7CTeHnbCVCBsWIE+RYVrdF4DSz6OwgiADDexbmT3X0A4fSDfDjUugcAAAAASUVORK5CYII=",tC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAFESURBVDhPlZMNEcIwDIVXBQwFgAJAAcMBDgAFIGE4wAHgABSwOdgcIAEUjPd6aS/rfhi7y12bJl9f0sxEf3xVVV0RPoetjTFvnWqGcgSylfgihA0CKcgJgBfsAqMiKiM0+gkKlCyZCN8uhPWCFOSBxARWORU4W2CdeV9XjxSEJcwkjokTqBpzjxjCn7CyVRECzjg8wHLYCmabK7CplBcLhMr2DZCqP0dCovYZ9hYGXx1izLUGUkkfxI/sTQiCf4N1zLWAWCKV2nP6PEhB2Ngd7B4GC4SJnCcP8SAFoc/Ph/TqjVvTPogFKUiJ/VGU+GdmUAA5ObA7cyC+iPt/MjUfKRL4emyuK+cGH8tufFRUHywZ+RYlnRDdIwfzLzVUibtQv1oNhoAExtfpVdIAiQIOWiY9o2sQxJemOydTS1jR1di2Zn8B8f27apou9kMAAAAASUVORK5CYII=",nC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAHDSURBVDhPlZOxL0NRFIe9ECubhehoIIjJ1HYwCkIiJpUQEkN1YZBobU0kFKNI3iTGYrDRv0BIhLXCYpCwiO35fs25zWva98JNvpz37j33d8+551yvLWIEQXDG0izMe55XjvJz816MUJG1LVuvYJcQrEb5xwkV2JSHGfAhgBJiu63E4oSUzpRtusa+wBooKkWnKOujQYh7SbCShQx0m9cpds4iOseOw7BFmUPwU341IQT2MaOQgi9QND+wiqNnBxT4X7SIbrAqhNI9wiUvJ+W8A99wDEWdwrw25iVkkenAEb5LkIQPuIMJWJGQoriFd+iBCkhc8zUhfJSm7mva5l3aadubDgtpMgGKpB/eoBfuQZFoPNhBj9gTaC3kKkEEGXPsw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OBR9U8QSaEKX0jHAaE4tshVrgLeJ+Xdl6rS8D3BWJXKnCEwWXEuco9grQ3bb0sP0Cn8/nPm/SMRQAAAAASUVORK5CYII=",aC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACDSURBVHgB1ZFhDYAgEIWfzgBGIIINpIEViGAkG2gEbWADjWADfMw/iDgUfji/7e3gxt3uHsDXZFrrlrFBHJNpsPAgEEmORArn3lFroEZQCjcTbAhzepPsgbuCgn8FBWvsUAMfFR5OIPGS5G80JkrG2sopHKbO1BCoHy8ZNhRUT5X4BTu6qyNSwwCiMAAAAABJRU5ErkJggg==",lC={class:"menu-container"},cC=["onClick","title"],dC={class:"menu-icon"},uC=["src","alt"],hC={key:3,style:{"font-size":"12px"}},fC={key:0,class:"sub-menu"},pC=["onClick"],Nn=d.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(n,{emit:e}){const t=n,i=d.inject("leiting-theme",d.ref("dark")),s=d.inject("leiting-menu-size",d.ref("medium")),o=d.inject("leitingMethods",d.ref({})),r=d.computed(()=>i.value||i),l=d.computed(()=>s.value||s),a=d.ref([{ID:"home",title:"主视角",src:eC,key:"homeView"},{ID:"tree",title:"目录树",src:sc,key:"componentTree"},{ID:"cadLayer",title:"图层",src:sc,key:"cadLayer"},{ID:"measure",title:"量算",src:tC,key:"measurement"},{ID:"section",title:"剖切",src:nC,key:"section"},{ID:"roam",title:"人物漫游",src:iC,key:"roam"},{ID:"info",title:"构件信息",src:sC,key:"componentInfo"},{ID:"cadPosition",title:"调整位置",src:oC,key:"cadPosition"},{ID:"annotation",title:"标注",src:aC,key:"annotation"},{ID:"setting",title:"设置",src:rC,key:"setting"}]),c=d.ref([]),u=d.ref([...t.activeIds]);d.watch(()=>t.activeIds,T=>{u.value=[...T]},{deep:!0});const h=d.computed(()=>t.visible);o.value&&o.value.menuEvents&&(o.value.menuEvents.on("setMenuListFilter",T=>{c.value=T}),o.value.menuEvents.on("setMenuActive",(T,B)=>{B?u.value.includes(T)||u.value.push(T):u.value=u.value.filter(I=>I!==T)}));const f=d.computed(()=>{let T=a.value;if(t.is2d){const B=["homeView","measurement","cadLayer","annotation"];T=T.filter(I=>I.key&&B.includes(I.key))}else{const B=["cadLayer","cadPosition","annotation"];T=T.filter(I=>!I.key||!B.includes(I.key))}if(c.value.length>0&&(T=T.filter(B=>!B.key||!c.value.includes(B.key))),t.customItems&&t.customItems.length>0){const B=t.customItems.map(I=>({...I,key:I.ID,src:I.src||I.icon}));return[...T,...B]}return T}),p=e,m=T=>{const B=["homeView"];if(T.key&&B.includes(T.key))u.value.includes(T.ID)||(u.value.push(T.ID),setTimeout(()=>{const g=u.value.indexOf(T.ID);g>-1&&u.value.splice(g,1)},1e3));else{const g=u.value.indexOf(T.ID);g>-1?u.value.splice(g,1):u.value.push(T.ID)}const I=u.value.includes(T.ID);T.func&&T.func(T),T.key&&p("action",T.key,I)},y=T=>{a.value=[...a.value,...T]},A=T=>{c.value=T},C=T=>{console.log("LeitingMenu received showMenu event:",T)},E=(T,B)=>{const I=a.value.find(g=>g.ID===T||g.key===T);if(I){const g=u.value.indexOf(I.ID);B&&g===-1?u.value.push(I.ID):!B&&g>-1&&u.value.splice(g,1)}};let x=null;const M=()=>{o.value?.menuEvents&&(x&&(x.off("insertMenu",y),x.off("setMenuListFilter",A),x.off("showMenu",C),x.off("setMenuActive",E)),x=o.value.menuEvents,x.on("insertMenu",y),x.on("setMenuListFilter",A),x.on("showMenu",C),x.on("setMenuActive",E))};return d.onMounted(()=>{M()}),d.onUnmounted(()=>{x&&(x.off("insertMenu",y),x.off("setMenuListFilter",A),x.off("showMenu",C),x.off("setMenuActive",E))}),d.watch(o,()=>{M()},{deep:!0}),(T,B)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["leiting-menu-wrapper",["leiting-theme-"+r.value,"size-"+l.value]])},[d.createElementVNode("div",lC,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(f.value,I=>(d.openBlock(),d.createElementBlock("div",{key:I.ID,class:d.normalizeClass(["menu-item",{active:u.value.includes(I.ID)}]),onClick:g=>m(I),title:I.title},[d.createElementVNode("div",dC,[I.src?(d.openBlock(),d.createElementBlock("img",{key:0,src:I.src,alt:I.title},null,8,uC)):typeof I.icon=="object"?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(I.icon),{key:1})):typeof I.icon=="string"?(d.openBlock(),d.createElementBlock("i",{key:2,class:d.normalizeClass(["iconfont",`icon-${I.icon}`])},null,2)):(d.openBlock(),d.createElementBlock("span",hC,d.toDisplayString(I.title.substring(0,2)),1))]),I.children&&I.children.length>0?(d.openBlock(),d.createElementBlock("div",fC,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(I.children,g=>(d.openBlock(),d.createElementBlock("div",{key:g.ID,class:d.normalizeClass(["sub-menu-item",{active:u.value.includes(g.ID)}]),onClick:d.withModifiers(k=>m(g),["stop"])},d.toDisplayString(g.title),11,pC))),128))])):d.createCommentVNode("",!0)],10,cC))),128))])],2)),[[d.vShow,h.value]])}}),gC={class:"leiting-section-content"},mC={class:"section-form-item"},AC={class:"radio-group"},yC={class:"section-form-item"},CC={class:"switch-container"},EC={class:"switch"},wC={class:"status-text"},bC={class:"section-form-item slider-item"},vC={class:"slider-wrapper"},xC={class:"section-form-item slider-item"},IC={class:"slider-wrapper"},BC={class:"section-form-item slider-item"},SC={class:"slider-wrapper"},MC={class:"section-form-item table-item"},TC={class:"model-table-container"},DC={class:"model-table"},kC={width:"40"},PC=["checked"],FC=["onClick"],RC=["value"],OC={class:"model-name"},Un=Ue(d.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(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:O=>{i("update:visible",O),i("update:open",O)}}),r=d.ref("Box"),l=d.ref(!1),a=d.ref([]),c=d.ref([]),u=d.computed(()=>c.value.length===0?!1:c.value.every(O=>a.value.includes(O.modelId))),h=O=>{O.target.checked?a.value=c.value.map(w=>w.modelId):a.value=[],k()},f=d.ref([-10,10]),p=d.ref([-10,10]),m=d.ref([-10,10]),y=d.ref([-100,100]),A=d.ref([-100,100]),C=d.ref([-100,100]);let E=!1;const x=O=>{E=!0;const{targetZPlus:b,targetZMinus:w,targetXPlus:v,targetXMinus:S,targetYPlus:R,targetYMinus:_}=O;m.value=[-w,b],f.value=[-S,v],p.value=[-_,R],setTimeout(()=>{E=!1},100)},M=()=>{E||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:p.value[1],targetYMinus:-p.value[0]})},T=()=>{s?.value?.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)},B=O=>{if(!s?.value?.getMapTileset||!s?.value?.openSection)return;const w=s.value.getMapTileset()[O];if(w&&w.leiting?.box){const{min:v,max:S}=w.leiting.box,R=(S.x-v.x)/2,_=(S.y-v.y)/2,N=(S.z-v.z)/2;a.value.length<=1&&(y.value=[-R*2,R*2],A.value=[-_*2,_*2],C.value=[-N*2,N*2],f.value=[-R,R],p.value=[-_,_],m.value=[-N,N],s.value.updateSectionRange&&s.value.updateSectionRange({targetZPlus:N,targetZMinus:N,targetXPlus:R,targetXMinus:R,targetYPlus:_,targetYMinus:_})),s.value.openSection(O,{moveCallBack:x}),s.value.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)}},I=O=>{const b=a.value.indexOf(O);b>-1?a.value.splice(b,1):a.value.push(O),k()};let g=[];const k=()=>{const O=a.value.filter(w=>!g.includes(w)),b=g.filter(w=>!a.value.includes(w));O.forEach(w=>B(w)),b.forEach(w=>{s?.value?.closeSection&&s.value.closeSection(w)}),g=[...a.value]},P=()=>{},F=()=>{o.value=!1,i("close")},L=()=>{l.value=!1,a.value=[],g=[],f.value=[-10,10],p.value=[-10,10],m.value=[-10,10],y.value=[-100,100],A.value=[-100,100],C.value=[-100,100]};d.watch(()=>t.visible,O=>{O?H():(s?.value?.closeSection&&s.value.closeSection(),L())});const H=()=>{s?.value&&typeof s.value.getModelList=="function"&&(c.value=s.value.getModelList()||[],c.value.length>0&&a.value.length===0&&(a.value=[c.value[0].modelId],g=[...a.value]),t.visible&&a.value.length>0&&(l.value=!0,a.value.forEach(O=>B(O))))};return d.watch(()=>s?.value,()=>{H()},{immediate:!0,deep:!0}),d.onMounted(()=>{H()}),(O,b)=>(d.openBlock(),d.createBlock(Fe,{visible:o.value,title:"剖切分析",width:300,"full-height":n.fullHeight,"onUpdate:visible":F},{default:d.withCtx(()=>[d.createElementVNode("div",gC,[d.createElementVNode("div",mC,[b[8]||(b[8]=d.createElementVNode("span",{class:"label"},"模式",-1)),d.createElementVNode("div",AC,[d.createElementVNode("label",{class:d.normalizeClass(["radio-item",{active:r.value==="Box"}])},[d.withDirectives(d.createElementVNode("input",{type:"radio",value:"Box","onUpdate:modelValue":b[0]||(b[0]=w=>r.value=w),onChange:P},null,544),[[d.vModelRadio,r.value]]),b[7]||(b[7]=d.createTextVNode(" 剖切盒 ",-1))],2)])]),d.createElementVNode("div",yC,[b[10]||(b[10]=d.createElementVNode("span",{class:"label"},"显示",-1)),d.createElementVNode("div",CC,[d.createElementVNode("label",EC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":b[1]||(b[1]=w=>l.value=w),onChange:T},null,544),[[d.vModelCheckbox,l.value]]),b[9]||(b[9]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",wC,d.toDisplayString(l.value?"显示":"隐藏"),1)])]),d.createElementVNode("div",bC,[b[11]||(b[11]=d.createElementVNode("span",{class:"label"},"X 轴",-1)),d.createElementVNode("div",vC,[d.createVNode(d.unref(Ae.Slider),{value:f.value,"onUpdate:value":b[2]||(b[2]=w=>f.value=w),range:"",min:y.value[0],max:y.value[1],step:.1,onChange:M},null,8,["value","min","max"])])]),d.createElementVNode("div",xC,[b[12]||(b[12]=d.createElementVNode("span",{class:"label"},"Y 轴",-1)),d.createElementVNode("div",IC,[d.createVNode(d.unref(Ae.Slider),{value:p.value,"onUpdate:value":b[3]||(b[3]=w=>p.value=w),range:"",min:A.value[0],max:A.value[1],step:.1,onChange:M},null,8,["value","min","max"])])]),d.createElementVNode("div",BC,[b[13]||(b[13]=d.createElementVNode("span",{class:"label"},"Z 轴",-1)),d.createElementVNode("div",SC,[d.createVNode(d.unref(Ae.Slider),{value:m.value,"onUpdate:value":b[4]||(b[4]=w=>m.value=w),range:"",min:C.value[0],max:C.value[1],step:.1,onChange:M},null,8,["value","min","max"])])]),d.createElementVNode("div",MC,[b[15]||(b[15]=d.createElementVNode("span",{class:"label"},"模型",-1)),d.createElementVNode("div",TC,[d.createElementVNode("table",DC,[d.createElementVNode("thead",null,[d.createElementVNode("tr",null,[d.createElementVNode("th",kC,[d.createElementVNode("input",{type:"checkbox",checked:u.value,onChange:h},null,40,PC)]),b[14]||(b[14]=d.createElementVNode("th",null,"名称",-1))])]),d.createElementVNode("tbody",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(c.value,w=>(d.openBlock(),d.createElementBlock("tr",{key:w.modelId,class:d.normalizeClass({selected:a.value.includes(w.modelId)}),onClick:v=>I(w.modelId)},[d.createElementVNode("td",null,[d.withDirectives(d.createElementVNode("input",{type:"checkbox",value:w.modelId,"onUpdate:modelValue":b[5]||(b[5]=v=>a.value=v),onClick:b[6]||(b[6]=d.withModifiers(()=>{},["stop"])),onChange:k},null,40,RC),[[d.vModelCheckbox,a.value]])]),d.createElementVNode("td",OC,d.toDisplayString(w.modelName),1)],10,FC))),128))])])])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-519b564b"]]),LC={class:"leiting-player-content"},NC={class:"player-form-item"},UC={class:"switch-container"},_C={class:"switch"},QC={class:"status-text"},HC={class:"player-form-item"},GC={class:"switch-container"},YC={class:"switch"},VC={class:"status-text"},WC={class:"player-form-item"},zC={class:"switch-container"},jC={class:"switch"},$C={class:"status-text"},KC={class:"player-form-item slider-item"},XC={class:"slider-wrapper"},qC={class:"value-text"},JC={class:"instructions"},ZC={class:"key-map"},eE={class:"key-row"},tE={class:"key-row"},nE={class:"key-row"},iE={class:"key-row"},sE={class:"key-row"},oE={class:"key-row"},_n=Ue(d.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(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref(!1),r=d.ref(!1),l=d.ref(!0),a=d.ref(.5),c=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:B=>{i("update:visible",B),i("update:open",B)}}),u=d.ref(null),h=d.ref(null),f=d.ref(null),p=d.ref(null),m=d.ref(null),y=d.ref(null),A=()=>{o.value?E():x()},C=()=>{s?.value?.setPlayerParams&&s.value.setPlayerParams({gravityTest:r.value,collisionTest:l.value})},E=async()=>{s?.value?.openPlayer&&(await s.value.openPlayer(),s.value.setPlayerSpeed&&s.value.setPlayerSpeed(a.value),C(),s.value.bindPlayerUiKeys&&(await d.nextTick(),s.value.bindPlayerUiKeys({moveFront:u.value,moveBack:h.value,moveLeft:f.value,moveRight:p.value,moveUp:m.value,moveDown:y.value})))},x=()=>{s?.value?.closePlayer&&s.value.closePlayer()},M=()=>{s?.value?.setPlayerSpeed&&s.value.setPlayerSpeed(a.value)},T=()=>{c.value=!1,i("close")};return d.watch(()=>t.visible,B=>{B?(o.value=!0,s?.value?E():setTimeout(()=>{s?.value&&E()},100)):o.value&&(o.value=!1,x())},{immediate:!0}),(B,I)=>(d.openBlock(),d.createBlock(Fe,{title:n.title,visible:c.value,width:200,"full-height":n.fullHeight,"onUpdate:visible":T},{default:d.withCtx(()=>[d.createElementVNode("div",LC,[d.createElementVNode("div",NC,[I[5]||(I[5]=d.createElementVNode("span",{class:"label"},"启用",-1)),d.createElementVNode("div",UC,[d.createElementVNode("label",_C,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":I[0]||(I[0]=g=>o.value=g),onChange:A},null,544),[[d.vModelCheckbox,o.value]]),I[4]||(I[4]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",QC,d.toDisplayString(o.value?"开启":"关闭"),1)])]),d.createElementVNode("div",HC,[I[7]||(I[7]=d.createElementVNode("span",{class:"label"},"重力",-1)),d.createElementVNode("div",GC,[d.createElementVNode("label",YC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":I[1]||(I[1]=g=>r.value=g),onChange:C},null,544),[[d.vModelCheckbox,r.value]]),I[6]||(I[6]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",VC,d.toDisplayString(r.value?"开启":"关闭"),1)])]),d.createElementVNode("div",WC,[I[9]||(I[9]=d.createElementVNode("span",{class:"label"},"碰撞",-1)),d.createElementVNode("div",zC,[d.createElementVNode("label",jC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":I[2]||(I[2]=g=>l.value=g),onChange:C},null,544),[[d.vModelCheckbox,l.value]]),I[8]||(I[8]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",$C,d.toDisplayString(l.value?"开启":"关闭"),1)])]),d.createElementVNode("div",KC,[I[10]||(I[10]=d.createElementVNode("span",{class:"label"},"速度",-1)),d.createElementVNode("div",XC,[d.createVNode(d.unref(Ae.Slider),{value:a.value,"onUpdate:value":I[3]||(I[3]=g=>a.value=g),min:.1,max:4,step:.1,onChange:M},null,8,["value"])]),d.createElementVNode("span",qC,d.toDisplayString(a.value),1)]),I[19]||(I[19]=d.createElementVNode("div",{class:"divider"},null,-1)),d.createElementVNode("div",JC,[I[18]||(I[18]=d.createElementVNode("div",{class:"instruction-title"},"操作说明",-1)),d.createElementVNode("div",ZC,[d.createElementVNode("div",eE,[d.createElementVNode("span",{class:"key",ref_key:"btnFront",ref:u},"W",512),I[11]||(I[11]=d.createTextVNode(" 前进 ",-1))]),d.createElementVNode("div",tE,[d.createElementVNode("span",{class:"key",ref_key:"btnBack",ref:h},"S",512),I[12]||(I[12]=d.createTextVNode(" 后退 ",-1))]),d.createElementVNode("div",nE,[d.createElementVNode("span",{class:"key",ref_key:"btnLeft",ref:f},"A",512),I[13]||(I[13]=d.createTextVNode(" 左移 ",-1))]),d.createElementVNode("div",iE,[d.createElementVNode("span",{class:"key",ref_key:"btnRight",ref:p},"D",512),I[14]||(I[14]=d.createTextVNode(" 右移 ",-1))]),d.createElementVNode("div",sE,[d.createElementVNode("span",{class:"key",ref_key:"btnUp",ref:m},"Q",512),I[15]||(I[15]=d.createTextVNode(" 上升 ",-1))]),d.createElementVNode("div",oE,[d.createElementVNode("span",{class:"key",ref_key:"btnDown",ref:y},"E",512),I[16]||(I[16]=d.createTextVNode(" 下降 ",-1))]),I[17]||(I[17]=d.createElementVNode("div",{class:"key-row"},[d.createElementVNode("span",{class:"mouse-icon"},"🖱️"),d.createTextVNode(" 按住左键拖拽旋转视角 ")],-1))])])])]),_:1},8,["title","visible","full-height"]))}}),[["__scopeId","data-v-cb96e806"]]),rE={class:"info-content"},aE={key:0,class:"component-title"},Qn=Ue(d.defineComponent({__name:"LeitingInfo",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref([]),r=d.ref([]),l=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:m=>{i("update:visible",m),i("update:open",m)}}),a=()=>{l.value=!1},c=m=>({elementID:"构件ID",elementName:"构件名",categoryName:"类别",familySymbolName:"族类型",levelName:"标高",modelName:"文件名",length:"长",width:"宽",height:"高"})[m]||m,u=["elementName","elementID","modelName","length","width","height","levelName","categoryName","familySymbolName"],h=m=>{if(!m||m.length===0){o.value=[];return}const y=s?.value,A=y?.getMapTileset?y.getMapTileset():{},C=[];m.forEach((E,x)=>{const T=A[E.modelId]?.leiting||{};let B={modelName:T.model?.modelId||E.modelId};B.elementID||(B.elementID=E.elementId);const I=T.node?.nodeExtras?.element||T.node?.nodeExtras;let g=null;if(I){const F=B.elementID;I[F]&&(g=I[F])}g&&g.box3&&(B.length=`${g.box3.length?.toFixed(2)||0}米`,B.width=`${g.box3.width?.toFixed(2)||0}米`,B.height=`${g.box3.height?.toFixed(2)||0}米`);const k=[];g&&(g.name&&(B.elementName=g.name),g.categoryName&&(B.categoryName=g.categoryName),g.familySymbolName&&(B.familySymbolName=g.familySymbolName),g.levelName&&(B.levelName=g.levelName));const P={};if(u.forEach(F=>{B[F]!==void 0&&(P[F]=B[F])}),k.push({name:"基础信息",params:P}),g){const F=Array.isArray(g)?g:Array.isArray(g?.parameters)?g.parameters:null;if(F){if(F.flat().forEach(H=>{if(H&&H.GroupName&&Array.isArray(H.Parameters)){const O={};H.Parameters.forEach(b=>{b.name&&(O[b.name]=b.value??"")}),Object.keys(O).length>0&&k.push({name:H.GroupName,params:O})}}),!Array.isArray(g)){const{parameters:H,...O}=g,b={};Object.keys(O).forEach(w=>{!u.includes(w)&&w!=="uniqueId"&&typeof O[w]!="object"&&(b[w]=O[w])}),Object.keys(b).length>0&&k.push({name:"其他属性",params:b})}}else{let L=!1;if(Object.keys(g).forEach(H=>{g[H]&&typeof g[H]=="object"&&!Array.isArray(g[H])&&(L=!0,k.push({name:H,params:g[H]}))}),!L){const H={};Object.keys(g).forEach(O=>{if(!u.includes(O)&&O!=="batchId"){const b=g[O];typeof b=="string"&&b.length>500?H[O]=b.substring(0,500)+"...":H[O]=b}}),Object.keys(H).length>0&&k.push({name:"属性",params:H})}}}C.push({id:x,title:`${B.modelName}${B.elementName?` - ${B.elementName}`:""}`,groups:k})}),o.value=C,C.length>0?r.value=[`${C[0].id}-基础信息`]:r.value=[]};let f=!1;const p=()=>{if(f)return;const m=s?.value;m&&m.selectionChange&&(m.selectionChange(h),f=!0)};return d.watch(()=>s?.value,()=>{p()},{deep:!0,immediate:!0}),d.onMounted(()=>{p()}),(m,y)=>(d.openBlock(),d.createBlock(Fe,{visible:l.value,title:"构件详情",width:350,align:"right","initial-position":{x:0,y:0},"full-height":n.fullHeight,onClose:a,"onUpdate:visible":y[1]||(y[1]=A=>l.value=A),class:"base-info-card"},{default:d.withCtx(()=>[d.createElementVNode("div",rE,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(o.value,A=>(d.openBlock(),d.createElementBlock("div",{key:A.id,class:"component-block"},[o.value.length>1?(d.openBlock(),d.createElementBlock("div",aE,d.toDisplayString(A.title),1)):d.createCommentVNode("",!0),d.createVNode(d.unref(Ae.Collapse),{activeKey:r.value,"onUpdate:activeKey":y[0]||(y[0]=C=>r.value=C),ghost:"","expand-icon-position":"end"},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(A.groups,C=>(d.openBlock(),d.createBlock(d.unref(Ae.CollapsePanel),{key:`${A.id}-${C.name}`,header:C.name},{default:d.withCtx(()=>[d.createVNode(d.unref(Ae.Descriptions),{size:"small",bordered:"",column:1,labelStyle:{width:"100px",background:"rgba(255,255,255,0.05)",color:"#aaa"},contentStyle:{color:"#fff"}},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(C.params,(E,x)=>(d.openBlock(),d.createBlock(d.unref(Ae.DescriptionsItem),{key:x,label:c(String(x))},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(E),1)]),_:2},1032,["label"]))),128))]),_:2},1024)]),_:2},1032,["header"]))),128))]),_:2},1032,["activeKey"])]))),128))])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-ee93ac19"]]);class oc{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 i=`adjust-marker-${e}-${Date.now()}`;e==="BIM"?this.bimEntityId=i:this.mapEntityId=i,this.viewer.entities.add({id:i,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 i;try{i=this.viewer.scene.pickPosition(t.position)}catch(s){console.warn("pickPosition failed:",s)}if(!i){const s=this.viewer.camera.getPickRay(t.position);i=this.viewer.scene.globe.pick(s,this.viewer.scene)}if(i||(i=this.viewer.camera.pickEllipsoid(t.position,this.viewer.scene.globe.ellipsoid)),i){const s=this.Cesium.Cartographic.fromCartesian(i),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 lE={class:"adjust-panel"},cE={class:"control-panel"},dE={class:"form-item"},uE={class:"radio-group"},hE={class:"form-item"},fE={class:"radio-group"},pE={class:"form-item"},gE={class:"value"},mE={class:"param-row"},AE={class:"param-row"},yE={class:"param-row"},CE={class:"param-row"},EE={class:"param-row"},wE={class:"param-row"},bE={class:"param-row"},vE={class:"button-grid"},xE={key:1,class:"pick-mode-ui"},IE={class:"form-item",style:{display:"block","margin-bottom":"15px"}},BE={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},SE=["checked"],ME={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},TE={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},DE={class:"form-item",style:{display:"block","margin-bottom":"15px"}},kE={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},PE=["checked"],FE={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},RE={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},OE={class:"list-panel"},LE={class:"list-header"},NE={class:"col-check"},UE=["checked"],_E={class:"list-body"},QE={class:"col-check"},HE=["onUpdate:modelValue"],GE={class:"col-index"},YE=["title"],VE={class:"col-main"},WE=["checked","onChange"],Hn=Ue(d.defineComponent({__name:"LeitingPosition",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close","save"],setup(n,{expose:e,emit:t}){const i=n,s=t,o=d.computed({get:()=>i.open!==void 0?i.open:i.visible,set:N=>{s("update:visible",N),s("update:open",N)}}),r=d.inject("leitingMethods"),l=d.ref("BIM"),a=d.ref("param"),c=d.ref(""),u=d.ref([]),h=d.ref("BIM"),f=d.ref(null),p=d.ref(null),m=d.ref(null),y=()=>(!m.value&&r?.value?.getViewer&&r?.value?.getCesium&&(m.value=new oc(r.value.getViewer(),r.value.getCesium())),m.value),A=()=>{y()?.clearMarkers(),f.value=null,p.value=null},C=(N,D)=>{N==="BIM"?f.value=D:p.value=D,y()?.addMarker(N,D),fe.success(`${N==="BIM"?"BIM":"地图"}标记点已添加`)},E=()=>{y()?.registerPickHandler(N=>{C(h.value,N)})},x=()=>{y()?.destroyPickHandler()},M=()=>{if(!f.value||!p.value){fe.warning("请先选择BIM标记点和地图标记点");return}if(!c.value){fe.warning("请先选择主模型");return}const N=y();let D=0,Q=0,V=0;if(N){const{dLon:$,dLat:q,dHeight:ne}=N.calculateOffset(f.value,p.value);D=$,Q=q,V=ne}else D=p.value.longitude-f.value.longitude,Q=p.value.latitude-f.value.latitude,V=p.value.height-f.value.height;B.value.longitude+=D,B.value.latitude+=Q,B.value.height+=V,w(c.value,{longitude:B.value.longitude,latitude:B.value.latitude,height:B.value.height}),fe.success("位置已调整")};d.watch(()=>a.value,N=>{N==="pick"?E():x()}),e({addMarker:C,setModelType:N=>{(N==="BIM"||N==="OSGB")&&(l.value=N)}});const B=d.ref({longitude:0,latitude:0,lonlat:1e-6,heightDistance:1,rotation:30,totalRotation:0,height:0,X:0,Y:0,Z:0}),I=d.computed(()=>{const N=u.value.find(D=>D.modelId===c.value);return N?N.modelName:""}),g=d.computed(()=>P.value.length>0&&P.value.every(N=>N.selected)),k=()=>{o.value=!1,s("close")},P=d.computed(()=>u.value.filter(N=>N.type===l.value)),F=N=>{const D=N.target.checked;P.value.forEach(Q=>Q.selected=D)},L=()=>{if(!r?.value)return;const N=r.value,D=N.getMapTileset?N.getMapTileset():{},Q=[];if(Object.keys(D).forEach(V=>{const q=D[V].leiting||{};q.model&&Q.push({modelId:q.model.modelId,modelName:q.model.modelName,selected:!1,formData:q.model.formData||{},dbName:q.model.dbName,url:q.model.url,type:q.model.type||"BIM"})}),u.value=Q,Q.length>0){const V=N.getBIMmodelId?N.getBIMmodelId():"";V&&Q.find($=>$.modelId===V)?O(V):O(Q[0].modelId),Q.forEach($=>$.selected=!0)}},H=()=>{fe.info("拖动右下角标,可显示模型列表",void 0,2)},O=N=>{c.value=N;const D=u.value.find(Q=>Q.modelId===N);D&&D.formData&&Object.keys(B.value).forEach(Q=>{D.formData[Q]!==void 0&&(B.value[Q]=D.formData[Q])})},b=N=>r?.value?.getMapTileset?r.value.getMapTileset()[N]:null,w=(N,D)=>{const Q=b(N),V=r.value.getCesium();if(Q&&V){if(Q.leiting?.model){Q.leiting.model.formData={...Q.leiting.model.formData,...D};const $=u.value.find(q=>q.modelId===N);$&&($.formData=Q.leiting.model.formData)}dr({Cesium:V,tileset:Q})}},v=N=>{if(!c.value)return;const D=B.value[N];w(c.value,{[N]:D})},S=N=>{const D=P.value.filter(q=>q.selected);if(D.length===0){fe.warning("请先选择要调整的模型");return}const{lonlat:Q,heightDistance:V,rotation:$}=B.value;D.forEach(q=>{const ne={...q.formData};switch(N){case"north":ne.latitude+=Q;break;case"south":ne.latitude-=Q;break;case"east":ne.longitude+=Q;break;case"west":ne.longitude-=Q;break;case"up":ne.height+=V;break;case"down":ne.height-=V;break;case"rotateLeft":ne.totalRotation=(ne.totalRotation||0)-$;break;case"rotateRight":ne.totalRotation=(ne.totalRotation||0)+$;break}q.modelId===c.value&&Object.assign(B.value,ne),w(q.modelId,ne)})},R=()=>{if(!c.value){fe.warning("请先选择主模型");return}const N=b(c.value);if(!N||!r?.value?.getViewer)return;const D=r.value.getViewer(),Q=r.value.getCesium(),V=N.boundingSphere;D.camera.flyToBoundingSphere(V,{offset:new Q.HeadingPitchRange(0,Q.Math.toRadians(-90),V.radius*2),duration:1.5})},_=()=>{r?.value?.saveRegion?(r.value.saveRegion(u.value),s("save",d.unref(u))):(console.log("Save models:",u.value),fe.warning("未找到保存接口,数据已打印控制台"))};return d.watch(()=>i.visible,N=>{N?(L(),H(),a.value==="pick"&&E()):(x(),A())}),d.onMounted(()=>{i.visible&&(L(),H(),a.value==="pick"&&E())}),(N,D)=>(d.openBlock(),d.createBlock(Fe,{visible:o.value,title:"调整位置(调整前可选择正北俯视)",width:282,"full-height":n.fullHeight,"onUpdate:visible":D[25]||(D[25]=Q=>o.value=Q),onClose:k,onSave:_},{default:d.withCtx(()=>[d.createElementVNode("div",lE,[d.createElementVNode("div",cE,[d.createElementVNode("div",dE,[D[26]||(D[26]=d.createElementVNode("label",null,"模型类型:",-1)),d.createElementVNode("div",uE,[d.createElementVNode("span",{class:d.normalizeClass({active:l.value==="BIM"}),onClick:D[0]||(D[0]=Q=>l.value="BIM")},"BIM模型",2),d.createElementVNode("span",{class:d.normalizeClass({active:l.value==="OSGB"}),onClick:D[1]||(D[1]=Q=>l.value="OSGB")},"倾斜摄影",2)])]),d.createElementVNode("div",hE,[D[27]||(D[27]=d.createElementVNode("label",null,"调整操作:",-1)),d.createElementVNode("div",fE,[d.createElementVNode("span",{class:d.normalizeClass({active:a.value==="param"}),onClick:D[2]||(D[2]=Q=>a.value="param")},"参数模式",2),d.createElementVNode("span",{class:d.normalizeClass({active:a.value==="pick"}),onClick:D[3]||(D[3]=Q=>a.value="pick")},"地图点选",2)])]),d.createElementVNode("div",pE,[D[28]||(D[28]=d.createElementVNode("label",null,"当前主模型:",-1)),d.createElementVNode("span",gE,d.toDisplayString(I.value||"未选择"),1)]),D[42]||(D[42]=d.createElementVNode("div",{class:"separator"},null,-1)),a.value==="param"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[D[36]||(D[36]=d.createElementVNode("div",{class:"group-header"},"当前状态",-1)),d.createElementVNode("div",mE,[D[29]||(D[29]=d.createElementVNode("label",null,"经度(东西):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[4]||(D[4]=Q=>B.value.longitude=Q),onChange:D[5]||(D[5]=Q=>v("longitude")),step:"0.000001"},null,544),[[d.vModelText,B.value.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",AE,[D[30]||(D[30]=d.createElementVNode("label",null,"纬度(南北):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[6]||(D[6]=Q=>B.value.latitude=Q),onChange:D[7]||(D[7]=Q=>v("latitude")),step:"0.000001"},null,544),[[d.vModelText,B.value.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",yE,[D[31]||(D[31]=d.createElementVNode("label",null,"高度(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[8]||(D[8]=Q=>B.value.height=Q),onChange:D[9]||(D[9]=Q=>v("height")),step:"0.1"},null,544),[[d.vModelText,B.value.height,void 0,{number:!0}]])]),d.createElementVNode("div",CE,[D[32]||(D[32]=d.createElementVNode("label",null,"累计旋转(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[10]||(D[10]=Q=>B.value.totalRotation=Q),onChange:D[11]||(D[11]=Q=>v("totalRotation")),step:"1"},null,544),[[d.vModelText,B.value.totalRotation,void 0,{number:!0}]])]),D[37]||(D[37]=d.createElementVNode("div",{class:"separator"},null,-1)),D[38]||(D[38]=d.createElementVNode("div",{class:"group-header"},"调整步长",-1)),d.createElementVNode("div",EE,[D[33]||(D[33]=d.createElementVNode("label",null,"经纬步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[12]||(D[12]=Q=>B.value.lonlat=Q),step:"0.000001"},null,512),[[d.vModelText,B.value.lonlat,void 0,{number:!0}]])]),d.createElementVNode("div",wE,[D[34]||(D[34]=d.createElementVNode("label",null,"高度步长(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[13]||(D[13]=Q=>B.value.heightDistance=Q),step:"0.1"},null,512),[[d.vModelText,B.value.heightDistance,void 0,{number:!0}]])]),d.createElementVNode("div",bE,[D[35]||(D[35]=d.createElementVNode("label",null,"旋转步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[14]||(D[14]=Q=>B.value.rotation=Q),step:"1"},null,512),[[d.vModelText,B.value.rotation,void 0,{number:!0}]])]),d.createElementVNode("div",vE,[d.createElementVNode("button",{onClick:D[15]||(D[15]=Q=>S("rotateLeft"))},"左转"),d.createElementVNode("button",{onClick:D[16]||(D[16]=Q=>S("north"))},"北移"),d.createElementVNode("button",{onClick:D[17]||(D[17]=Q=>S("rotateRight"))},"右转"),d.createElementVNode("button",{onClick:D[18]||(D[18]=Q=>S("west"))},"西移"),d.createElementVNode("button",{onClick:D[19]||(D[19]=Q=>S("south"))},"南移"),d.createElementVNode("button",{onClick:D[20]||(D[20]=Q=>S("east"))},"东移"),d.createElementVNode("button",{onClick:D[21]||(D[21]=Q=>S("up"))},"上移"),d.createElementVNode("button",{onClick:D[22]||(D[22]=Q=>S("down"))},"下移"),d.createElementVNode("button",{onClick:R,class:"primary-btn"},"正北俯视"),d.createElementVNode("button",{onClick:_,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):a.value==="pick"?(d.openBlock(),d.createElementBlock("div",xE,[d.createElementVNode("div",IE,[d.createElementVNode("div",BE,[d.createElementVNode("div",{onClick:D[23]||(D[23]=Q=>h.value="BIM"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[d.createElementVNode("input",{type:"radio",checked:h.value==="BIM",style:{"margin-right":"5px"}},null,8,SE),D[39]||(D[39]=d.createElementVNode("span",{style:{"font-weight":"bold"}},"BIM标记点:",-1))]),f.value?(d.openBlock(),d.createElementBlock("div",ME,[d.createElementVNode("div",null,"经度:"+d.toDisplayString(f.value.longitude.toFixed(10)),1),d.createElementVNode("div",null,"纬度:"+d.toDisplayString(f.value.latitude.toFixed(10)),1)])):(d.openBlock(),d.createElementBlock("div",TE,"未选择"))])]),d.createElementVNode("div",DE,[d.createElementVNode("div",kE,[d.createElementVNode("div",{onClick:D[24]||(D[24]=Q=>h.value="MAP"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[d.createElementVNode("input",{type:"radio",checked:h.value==="MAP",style:{"margin-right":"5px"}},null,8,PE),D[40]||(D[40]=d.createElementVNode("span",{style:{"font-weight":"bold"}},"地图标记点:",-1))]),p.value?(d.openBlock(),d.createElementBlock("div",FE,[d.createElementVNode("div",null,"经度:"+d.toDisplayString(p.value.longitude.toFixed(10)),1),d.createElementVNode("div",null,"纬度:"+d.toDisplayString(p.value.latitude.toFixed(10)),1)])):(d.openBlock(),d.createElementBlock("div",RE,"未选择"))])]),d.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[d.createElementVNode("button",{onClick:M},"调整位置"),d.createElementVNode("button",{onClick:_},"保存")]),D[41]||(D[41]=d.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[d.createElementVNode("div",null,"操作指南:"),d.createElementVNode("div",null,"1. 勾选上方 BIM 或 地图 标记点选项。"),d.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),d.createElementVNode("div",null,"3. 采集两点后,点击“调整位置”进行校准。")],-1))])):d.createCommentVNode("",!0)]),d.createElementVNode("div",OE,[d.createElementVNode("div",LE,[d.createElementVNode("div",NE,[d.createElementVNode("input",{type:"checkbox",checked:g.value,onChange:F},null,40,UE)]),D[43]||(D[43]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),D[44]||(D[44]=d.createElementVNode("div",{class:"col-name"},"名称",-1)),D[45]||(D[45]=d.createElementVNode("div",{class:"col-main"},"主模型",-1))]),d.createElementVNode("div",_E,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(P.value,(Q,V)=>(d.openBlock(),d.createElementBlock("div",{key:Q.modelId,class:d.normalizeClass(["list-item",{active:Q.modelId===c.value}])},[d.createElementVNode("div",QE,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":$=>Q.selected=$},null,8,HE),[[d.vModelCheckbox,Q.selected]])]),d.createElementVNode("div",GE,d.toDisplayString(V+1),1),d.createElementVNode("div",{class:"col-name",title:Q.modelName},d.toDisplayString(Q.modelName),9,YE),d.createElementVNode("div",VE,[d.createElementVNode("input",{type:"radio",name:"mainModel",checked:Q.modelId===c.value,onChange:$=>O(Q.modelId)},null,40,WE)])],2))),128))])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-6cbc261f"]]);function Pi(){return Pi=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Pi.apply(null,arguments)}const zE={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:"下一世纪"},jE={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},rc={lang:Pi({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},zE),timePickerLocale:Pi({},jE)};rc.lang.ok="确定";var Fi={exports:{}},$E=Fi.exports,ac;function lc(){return ac||(ac=1,(function(n,e){(function(t,i){n.exports=i()})($E,(function(){var t=1e3,i=6e4,s=36e5,o="millisecond",r="second",l="minute",a="hour",c="day",u="week",h="month",f="quarter",p="year",m="date",y="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,E={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(O){var b=["th","st","nd","rd"],w=O%100;return"["+O+(b[(w-20)%10]||b[w]||b[0])+"]"}},x=function(O,b,w){var v=String(O);return!v||v.length>=b?O:""+Array(b+1-v.length).join(w)+O},M={s:x,z:function(O){var b=-O.utcOffset(),w=Math.abs(b),v=Math.floor(w/60),S=w%60;return(b<=0?"+":"-")+x(v,2,"0")+":"+x(S,2,"0")},m:function O(b,w){if(b.date()<w.date())return-O(w,b);var v=12*(w.year()-b.year())+(w.month()-b.month()),S=b.clone().add(v,h),R=w-S<0,_=b.clone().add(v+(R?-1:1),h);return+(-(v+(w-S)/(R?S-_:_-S))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:h,y:p,w:u,d:c,D:m,h:a,m:l,s:r,ms:o,Q:f}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},T="en",B={};B[T]=E;var I="$isDayjsObject",g=function(O){return O instanceof L||!(!O||!O[I])},k=function O(b,w,v){var S;if(!b)return T;if(typeof b=="string"){var R=b.toLowerCase();B[R]&&(S=R),w&&(B[R]=w,S=R);var _=b.split("-");if(!S&&_.length>1)return O(_[0])}else{var N=b.name;B[N]=b,S=N}return!v&&S&&(T=S),S||!v&&T},P=function(O,b){if(g(O))return O.clone();var w=typeof b=="object"?b:{};return w.date=O,w.args=arguments,new L(w)},F=M;F.l=k,F.i=g,F.w=function(O,b){return P(O,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var L=(function(){function O(w){this.$L=k(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[I]=!0}var b=O.prototype;return b.parse=function(w){this.$d=(function(v){var S=v.date,R=v.utc;if(S===null)return new Date(NaN);if(F.u(S))return new Date;if(S instanceof Date)return new Date(S);if(typeof S=="string"&&!/Z$/i.test(S)){var _=S.match(A);if(_){var N=_[2]-1||0,D=(_[7]||"0").substring(0,3);return R?new Date(Date.UTC(_[1],N,_[3]||1,_[4]||0,_[5]||0,_[6]||0,D)):new Date(_[1],N,_[3]||1,_[4]||0,_[5]||0,_[6]||0,D)}}return new Date(S)})(w),this.init()},b.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},b.$utils=function(){return F},b.isValid=function(){return this.$d.toString()!==y},b.isSame=function(w,v){var S=P(w);return this.startOf(v)<=S&&S<=this.endOf(v)},b.isAfter=function(w,v){return P(w)<this.startOf(v)},b.isBefore=function(w,v){return this.endOf(v)<P(w)},b.$g=function(w,v,S){return F.u(w)?this[v]:this.set(S,w)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(w,v){var S=this,R=!!F.u(v)||v,_=F.p(w),N=function(Y,j){var J=F.w(S.$u?Date.UTC(S.$y,j,Y):new Date(S.$y,j,Y),S);return R?J:J.endOf(c)},D=function(Y,j){return F.w(S.toDate()[Y].apply(S.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(j)),S)},Q=this.$W,V=this.$M,$=this.$D,q="set"+(this.$u?"UTC":"");switch(_){case p:return R?N(1,0):N(31,11);case h:return R?N(1,V):N(0,V+1);case u:var ne=this.$locale().weekStart||0,se=(Q<ne?Q+7:Q)-ne;return N(R?$-se:$+(6-se),V);case c:case m:return D(q+"Hours",0);case a:return D(q+"Minutes",1);case l:return D(q+"Seconds",2);case r:return D(q+"Milliseconds",3);default:return this.clone()}},b.endOf=function(w){return this.startOf(w,!1)},b.$set=function(w,v){var S,R=F.p(w),_="set"+(this.$u?"UTC":""),N=(S={},S[c]=_+"Date",S[m]=_+"Date",S[h]=_+"Month",S[p]=_+"FullYear",S[a]=_+"Hours",S[l]=_+"Minutes",S[r]=_+"Seconds",S[o]=_+"Milliseconds",S)[R],D=R===c?this.$D+(v-this.$W):v;if(R===h||R===p){var Q=this.clone().set(m,1);Q.$d[N](D),Q.init(),this.$d=Q.set(m,Math.min(this.$D,Q.daysInMonth())).$d}else N&&this.$d[N](D);return this.init(),this},b.set=function(w,v){return this.clone().$set(w,v)},b.get=function(w){return this[F.p(w)]()},b.add=function(w,v){var S,R=this;w=Number(w);var _=F.p(v),N=function(V){var $=P(R);return F.w($.date($.date()+Math.round(V*w)),R)};if(_===h)return this.set(h,this.$M+w);if(_===p)return this.set(p,this.$y+w);if(_===c)return N(1);if(_===u)return N(7);var D=(S={},S[l]=i,S[a]=s,S[r]=t,S)[_]||1,Q=this.$d.getTime()+w*D;return F.w(Q,this)},b.subtract=function(w,v){return this.add(-1*w,v)},b.format=function(w){var v=this,S=this.$locale();if(!this.isValid())return S.invalidDate||y;var R=w||"YYYY-MM-DDTHH:mm:ssZ",_=F.z(this),N=this.$H,D=this.$m,Q=this.$M,V=S.weekdays,$=S.months,q=S.meridiem,ne=function(j,J,oe,le){return j&&(j[J]||j(v,R))||oe[J].slice(0,le)},se=function(j){return F.s(N%12||12,j,"0")},Y=q||function(j,J,oe){var le=j<12?"AM":"PM";return oe?le.toLowerCase():le};return R.replace(C,(function(j,J){return J||(function(oe){switch(oe){case"YY":return String(v.$y).slice(-2);case"YYYY":return F.s(v.$y,4,"0");case"M":return Q+1;case"MM":return F.s(Q+1,2,"0");case"MMM":return ne(S.monthsShort,Q,$,3);case"MMMM":return ne($,Q);case"D":return v.$D;case"DD":return F.s(v.$D,2,"0");case"d":return String(v.$W);case"dd":return ne(S.weekdaysMin,v.$W,V,2);case"ddd":return ne(S.weekdaysShort,v.$W,V,3);case"dddd":return V[v.$W];case"H":return String(N);case"HH":return F.s(N,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return Y(N,D,!0);case"A":return Y(N,D,!1);case"m":return String(D);case"mm":return F.s(D,2,"0");case"s":return String(v.$s);case"ss":return F.s(v.$s,2,"0");case"SSS":return F.s(v.$ms,3,"0");case"Z":return _}return null})(j)||_.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(w,v,S){var R,_=this,N=F.p(v),D=P(w),Q=(D.utcOffset()-this.utcOffset())*i,V=this-D,$=function(){return F.m(_,D)};switch(N){case p:R=$()/12;break;case h:R=$();break;case f:R=$()/3;break;case u:R=(V-Q)/6048e5;break;case c:R=(V-Q)/864e5;break;case a:R=V/s;break;case l:R=V/i;break;case r:R=V/t;break;default:R=V}return S?R:F.a(R)},b.daysInMonth=function(){return this.endOf(h).$D},b.$locale=function(){return B[this.$L]},b.locale=function(w,v){if(!w)return this.$L;var S=this.clone(),R=k(w,v,!0);return R&&(S.$L=R),S},b.clone=function(){return F.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},O})(),H=L.prototype;return P.prototype=H,[["$ms",o],["$s",r],["$m",l],["$H",a],["$W",c],["$M",h],["$y",p],["$D",m]].forEach((function(O){H[O[1]]=function(b){return this.$g(b,O[0],O[1])}})),P.extend=function(O,b){return O.$i||(O(b,L,P),O.$i=!0),P},P.locale=k,P.isDayjs=g,P.unix=function(O){return P(1e3*O)},P.en=B[T],P.Ls=B,P.p={},P}))})(Fi)),Fi.exports}var KE=lc();const ze=Zt(KE);var Ri={exports:{}},XE=Ri.exports,cc;function qE(){return cc||(cc=1,(function(n,e){(function(t,i){n.exports=i(lc())})(XE,(function(t){function i(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var s=i(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}))})(Ri)),Ri.exports}qE();var Oi={exports:{}},JE=Oi.exports,dc;function ZE(){return dc||(dc=1,(function(n,e){(function(t,i){n.exports=i()})(JE,(function(){return function(t,i,s){var o=i.prototype,r=function(h){return h&&(h.indexOf?h:h.s)},l=function(h,f,p,m,y){var A=h.name?h:h.$locale(),C=r(A[f]),E=r(A[p]),x=C||E.map((function(T){return T.slice(0,m)}));if(!y)return x;var M=A.weekStart;return x.map((function(T,B){return x[(B+(M||0))%7]}))},a=function(){return s.Ls[s.locale()]},c=function(h,f){return h.formats[f]||(function(p){return p.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(m,y,A){return y||A.slice(1)}))})(h.formats[f.toUpperCase()])},u=function(){var h=this;return{months:function(f){return f?f.format("MMMM"):l(h,"months")},monthsShort:function(f){return f?f.format("MMM"):l(h,"monthsShort","months",3)},firstDayOfWeek:function(){return h.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):l(h,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):l(h,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):l(h,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return c(h.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return u.bind(this)()},s.localeData=function(){var h=a();return{firstDayOfWeek:function(){return h.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 c(h,f)},meridiem:h.meridiem,ordinal:h.ordinal}},s.months=function(){return l(a(),"months")},s.monthsShort=function(){return l(a(),"monthsShort","months",3)},s.weekdays=function(h){return l(a(),"weekdays",null,null,h)},s.weekdaysShort=function(h){return l(a(),"weekdaysShort","weekdays",3,h)},s.weekdaysMin=function(h){return l(a(),"weekdaysMin","weekdays",2,h)}}}))})(Oi)),Oi.exports}var ew=ZE();const tw=Zt(ew);var Li={exports:{}},nw=Li.exports,uc;function iw(){return uc||(uc=1,(function(n,e){(function(t,i){n.exports=i()})(nw,(function(){return function(t,i){i.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")}}}))})(Li)),Li.exports}var sw=iw();const ow=Zt(sw);var Ni={exports:{}},rw=Ni.exports,hc;function aw(){return hc||(hc=1,(function(n,e){(function(t,i){n.exports=i()})(rw,(function(){var t="week",i="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 c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=r(this).startOf(i).add(1,i).date(c),h=r(this).endOf(t);if(u.isBefore(h))return 1}var f=r(this).startOf(i).date(c).startOf(t).subtract(1,"millisecond"),p=this.diff(f,t,!0);return p<0?r(this).startOf("week").week():Math.ceil(p)},l.weeks=function(a){return a===void 0&&(a=null),this.week(a)}}}))})(Ni)),Ni.exports}var lw=aw();const cw=Zt(lw);var Ui={exports:{}},dw=Ui.exports,fc;function uw(){return fc||(fc=1,(function(n,e){(function(t,i){n.exports=i()})(dw,(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"},i=/(\[[^[]*\])|([-_:/.,()\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={},c=function(A){return(A=+A)+(A>68?1900:2e3)},u=function(A){return function(C){this[A]=+C}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(A){(this.zone||(this.zone={})).offset=(function(C){if(!C||C==="Z")return 0;var E=C.match(/([+-]|\d\d)/g),x=60*E[1]+(+E[2]||0);return x===0?0:E[0]==="+"?-x:x})(A)}],f=function(A){var C=a[A];return C&&(C.indexOf?C:C.s.concat(C.f))},p=function(A,C){var E,x=a.meridiem;if(x){for(var M=1;M<=24;M+=1)if(A.indexOf(x(M,0,C))>-1){E=M>12;break}}else E=A===(C?"pm":"PM");return E},m={A:[l,function(A){this.afternoon=p(A,!1)}],a:[l,function(A){this.afternoon=p(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,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[o,u("day")],Do:[l,function(A){var C=a.ordinal,E=A.match(/\d+/);if(this.day=E[0],C)for(var x=1;x<=31;x+=1)C(x).replace(/\[|\]/g,"")===A&&(this.day=x)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[l,function(A){var C=f("months"),E=(f("monthsShort")||C.map((function(x){return x.slice(0,3)}))).indexOf(A)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[l,function(A){var C=f("months").indexOf(A)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(A){this.year=c(A)}],YYYY:[/\d{4}/,u("year")],Z:h,ZZ:h};function y(A){var C,E;C=A,E=a&&a.formats;for(var x=(A=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(P,F,L){var H=L&&L.toUpperCase();return F||E[L]||t[L]||E[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(O,b,w){return b||w.slice(1)}))}))).match(i),M=x.length,T=0;T<M;T+=1){var B=x[T],I=m[B],g=I&&I[0],k=I&&I[1];x[T]=k?{regex:g,parser:k}:B.replace(/^\[|\]$/g,"")}return function(P){for(var F={},L=0,H=0;L<M;L+=1){var O=x[L];if(typeof O=="string")H+=O.length;else{var b=O.regex,w=O.parser,v=P.slice(H),S=b.exec(v)[0];w.call(F,S),P=P.replace(S,"")}}return(function(R){var _=R.afternoon;if(_!==void 0){var N=R.hours;_?N<12&&(R.hours+=12):N===12&&(R.hours=0),delete R.afternoon}})(F),F}}return function(A,C,E){E.p.customParseFormat=!0,A&&A.parseTwoDigitYear&&(c=A.parseTwoDigitYear);var x=C.prototype,M=x.parse;x.parse=function(T){var B=T.date,I=T.utc,g=T.args;this.$u=I;var k=g[1];if(typeof k=="string"){var P=g[2]===!0,F=g[3]===!0,L=P||F,H=g[2];F&&(H=g[2]),a=this.$locale(),!P&&H&&(a=E.Ls[H]),this.$d=(function(v,S,R,_){try{if(["x","X"].indexOf(S)>-1)return new Date((S==="X"?1e3:1)*v);var N=y(S)(v),D=N.year,Q=N.month,V=N.day,$=N.hours,q=N.minutes,ne=N.seconds,se=N.milliseconds,Y=N.zone,j=N.week,J=new Date,oe=V||(D||Q?1:J.getDate()),le=D||J.getFullYear(),ge=0;D&&!Q||(ge=Q>0?Q-1:J.getMonth());var we,me=$||0,Re=q||0,ct=ne||0,$e=se||0;return Y?new Date(Date.UTC(le,ge,oe,me,Re,ct,$e+60*Y.offset*1e3)):R?new Date(Date.UTC(le,ge,oe,me,Re,ct,$e)):(we=new Date(le,ge,oe,me,Re,ct,$e),j&&(we=_(we).week(j).toDate()),we)}catch{return new Date("")}})(B,k,I,E),this.init(),H&&H!==!0&&(this.$L=this.locale(H).$L),L&&B!=this.format(k)&&(this.$d=new Date("")),a={}}else if(k instanceof Array)for(var O=k.length,b=1;b<=O;b+=1){g[1]=k[b-1];var w=E.apply(this,g);if(w.isValid()){this.$d=w.$d,this.$L=w.$L,this.init();break}b===O&&(this.$d=new Date(""))}else M.call(this,T)}}}))})(Ui)),Ui.exports}var hw=uw();const fw=Zt(hw),pw={class:"setting-panel"},gw={class:"tabs-header"},mw={class:"tab-content"},Aw={key:0,class:"section"},yw={class:"setting-item"},Cw={class:"setting-item"},Ew={class:"setting-item"},ww={key:1,class:"section"},bw={class:"tabs-header",style:{"margin-bottom":"8px"}},vw={key:0},xw={class:"setting-item column"},Iw={class:"setting-item column"},Bw={class:"setting-item"},Sw={key:1},Mw={class:"setting-item column"},Tw={class:"setting-item column",style:{"margin-top":"12px","border-top":"1px solid rgba(255,255,255,0.1)","padding-top":"8px"}},Dw={class:"search-box"},kw={key:2,class:"section"},Pw={class:"setting-item"},Fw={key:0,class:"setting-item column"},Rw={class:"sub-label"},Ow={class:"setting-item"},Lw={class:"setting-item"},Nw={class:"setting-item column"},Uw={class:"setting-item column"},_w={class:"sub-label"},Qw={class:"setting-item column"},Hw={class:"sub-label"},Gw={class:"setting-item column"},Yw={class:"sub-label"},Vw={class:"setting-item column"},Ww={style:{display:"flex",gap:"8px","margin-bottom":"8px"}},zw=["onClick","title"],jw={style:{display:"flex",gap:"8px","align-items":"center"}},$w={key:3,class:"section"},Kw={class:"setting-item"},Xw={class:"setting-item column"},Gn=Ue(d.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(n,{emit:e}){ze.locale("zh-cn"),ze.extend(tw),ze.extend(ow),ze.extend(cw),ze.extend(fw);const t=Ae.Switch,i=Ae.Radio.Group,s=Ae.Radio,o=Ae.Input,r=Ae.Slider,l=Ae.Select,a=Ae.Select.Option,c=Ae.DatePicker,u=n,h=e,f=d.inject("leitingMethods"),p=d.computed({get:()=>u.open!==void 0?u.open:u.visible,set:b=>{h("update:visible",b),h("update:open",b)}}),m=d.ref("GIS"),y=d.reactive({globe:!1,terrain:!1,depthTest:!1}),A=d.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=d.reactive({shadows:!1,shadowDarkness:.7,environmentMap:!1,ambientOcclusion:!1,time:ze("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%)"}),E=d.reactive({collision:!1,habit:0}),x=b=>{b&&(b.globe!==void 0&&(y.globe=b.globe),b.terrain!==void 0&&(y.terrain=b.terrain),b.depthTest!==void 0&&(y.depthTest=b.depthTest),b.mapProvider!==void 0&&(A.provider=b.mapProvider),b.tiandituLayerType!==void 0&&(A.tianditu.layerType=b.tiandituLayerType),b.tiandituShowLabel!==void 0&&(A.tianditu.showLabel=b.tiandituShowLabel),b.arcgisUrl!==void 0&&(A.arcgis.url=b.arcgisUrl),b.shadows!==void 0&&(C.shadows=b.shadows),b.shadowDarkness!==void 0&&(C.shadowDarkness=b.shadowDarkness),b.environmentMap!==void 0&&(C.environmentMap=b.environmentMap),b.ambientOcclusion!==void 0&&(C.ambientOcclusion=b.ambientOcclusion),b.time!==void 0&&(typeof b.time=="number"?C.time=ze().startOf("day").add(b.time,"hour"):C.time=ze(b.time)),b.brightness!==void 0&&(C.brightness=b.brightness),b.contrast!==void 0&&(C.contrast=b.contrast),b.saturation!==void 0&&(C.saturation=b.saturation),b.backgroundColor!==void 0&&(C.backgroundColor=b.backgroundColor),b.collision!==void 0&&(E.collision=b.collision),b.mouseHabit!==void 0&&(E.habit=b.mouseHabit))};d.watch(()=>u.initialConfig,b=>{x(b)},{deep:!0,immediate:!0});const M=["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%)"],T=[{label:"全球影像地图服务(墨卡托)",value:"img_w"},{label:"全球影像地图服务(经纬度)",value:"img_c"},{label:"全球矢量地图服务(墨卡托)",value:"vec_w"},{label:"全球矢量地图服务(经纬度)",value:"vec_c"},{label:"全球地形晕渲服务(墨卡托)",value:"ter_w"},{label:"全球地形晕渲服务(经纬度)",value:"ter_c"}],B=()=>{const b=A.provider,w={};b==="tianditu"?(w.token=A.tianditu.token,w.layerType=A.tianditu.layerType,w.showAnnotation=A.tianditu.showLabel):b==="arcgis"&&(w.url=A.arcgis.url),f.value?.changeBaseMap?.(b,w)};d.watch(()=>A.provider,B),d.watch(()=>A.tianditu.layerType,B),d.watch(()=>A.tianditu.showLabel,B),d.watch(()=>A.tianditu.token,us(B,1e3)),d.watch(()=>A.arcgis.url,us(B,1e3)),d.onMounted(()=>{u.tiandituToken&&(A.tianditu.token=u.tiandituToken)}),d.watch(()=>y.globe,b=>f.value?.setGlobeEnvironmentVisible?.(b)),d.watch(()=>y.terrain,b=>f.value?.setTerrainEnable?.(b)),d.watch(()=>y.depthTest,b=>f.value?.setDepthTestEnable?.(b)),d.watch(()=>f?.value,b=>{if(b){if(b.getConfigure=()=>({globe:y.globe,terrain:y.terrain,depthTest:y.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:ze.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:E.collision,mouseHabit:E.habit}),b.setConfigure=w=>{x(w)},b.setBackgroundColor&&C.backgroundColor&&b.setBackgroundColor(C.backgroundColor),b.setGlobeEnvironmentVisible&&b.setGlobeEnvironmentVisible(y.globe),b.setShadowsEnable&&b.setShadowsEnable(C.shadows),b.setShadowDarkness&&b.setShadowDarkness(C.shadowDarkness),b.setEnvironmentMapEnable&&b.setEnvironmentMapEnable(C.environmentMap),b.setAmbientOcclusion&&b.setAmbientOcclusion(C.ambientOcclusion),b.setTime){const w=ze.isDayjs(C.time)?C.time.toDate():new Date;b.setTime(w)}b.setModelBrightness&&b.setModelBrightness(C.brightness),b.setCollisionDetection&&b.setCollisionDetection(E.collision),b.setMouseHabit&&b.setMouseHabit(E.habit),b.changeBaseMap&&A.baseMap&&b.changeBaseMap(A.baseMap,{token:A.tianditu.token,layerType:A.tianditu.layerType,showAnnotation:A.tianditu.showLabel,url:A.arcgis.url})}},{immediate:!0});const I=d.computed({get:()=>{const b=C.backgroundColor;return/^#[0-9A-Fa-f]{6}$/.test(b)?b:"#ffffff"},set:b=>{C.backgroundColor=b}}),g=d.ref(""),k=d.ref(!1),P=d.ref([]);d.watch(()=>y.globe,b=>f.value?.setGlobeEnvironmentVisible?.(b)),d.watch(()=>y.terrain,b=>f.value?.setTerrainEnable?.(b)),d.watch(()=>A.baseMap,b=>{f.value?.changeBaseMap?.(b,{token:u.tiandituToken})}),d.watch(()=>C.shadows,b=>f.value?.setShadowsEnable?.(b)),d.watch(()=>C.shadowDarkness,b=>f.value?.setShadowDarkness?.(b)),d.watch(()=>C.environmentMap,b=>f.value?.setEnvironmentMapEnable?.(b)),d.watch(()=>C.ambientOcclusion,b=>f.value?.setAmbientOcclusion?.(b)),d.watch(()=>C.time,b=>{const w=ze.isDayjs(b)?b.toDate():new Date;f.value?.setTime?.(w)}),d.watch(()=>[C.brightness,C.contrast,C.saturation],([b,w,v])=>{const S=f.value;S?.setModelColorAdjustment?S.setModelColorAdjustment({brightness:b,contrast:w,saturation:v}):S?.setModelBrightness?.(b)}),d.watch(()=>C.backgroundColor,b=>{if(f.value?.setBackgroundColor)f.value.setBackgroundColor(b);else{const w=document.querySelector(".cesium-viewer");w&&(w.style.background=b)}}),d.watch(()=>E.collision,b=>f.value?.setCollisionDetection?.(b)),d.watch(()=>E.habit,b=>f.value?.setMouseHabit?.(b));const F=b=>{if(b?.pois&&Array.isArray(b.pois)&&b.pois.length>0){const w=b.pois[0],v=w.lonlat.split(/[, ]/).map(Number);if(v.length>=2&&!isNaN(v[0])&&!isNaN(v[1]))return{name:w.name,lon:v[0],lat:v[1],raw:w}}if(b?.area&&b.area.lonlat){const w=b.area,v=w.lonlat.split(/[, ]/).map(Number);if(v.length>=2&&!isNaN(v[0])&&!isNaN(v[1]))return{name:w.name,lon:v[0],lat:v[1],raw:w}}return null},H=us(async()=>{const b=(g.value||"").trim();if(!b)return;const w=u.tiandituToken||"c25f14fb6bd4397cf8fe45144ff768d6";k.value=!0,P.value=[];try{if(f.value?.searchLocation){const v=await f.value.searchLocation(b,w),S=F(v);S&&(P.value=[S],fe.success(`找到:${S.name||""}`),f.value.flyTo(S.lon,S.lat,5e3))}else{const S=`https://api.tianditu.gov.cn/v2/search?postStr=${encodeURIComponent(JSON.stringify({keyWord:b,level:12,mapBound:"-180,-90,180,90",queryType:1,start:0,count:10}))}&type=query&tk=${encodeURIComponent(w)}`,R=await fetch(S);if(!R.ok)throw new Error(`HTTP ${R.status}`);const _=await R.json(),N=F(_);N&&(P.value=[N],fe.success(`找到:${N.name||""}`),f.value?.flyTo?.(N.lon,N.lat,5e3))}}catch(v){console.error("tianditu search error",v)}finally{k.value=!1}},800);d.watch(g,()=>{H()});const O=()=>{p.value=!1,h("close")};return d.onMounted(()=>{}),(b,w)=>(d.openBlock(),d.createBlock(Fe,{visible:p.value,title:"设置",width:320,"full-height":n.fullHeight,onClose:O,"onUpdate:visible":w[26]||(w[26]=v=>p.value=v)},{default:d.withCtx(()=>[d.createElementVNode("div",pw,[d.createElementVNode("div",gw,[d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:m.value==="GIS"}]),onClick:w[0]||(w[0]=v=>m.value="GIS")},"GIS",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:m.value==="MAP"}]),onClick:w[1]||(w[1]=v=>m.value="MAP")},"地图",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:m.value==="RENDER"}]),onClick:w[2]||(w[2]=v=>m.value="RENDER")},"渲染",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:m.value==="MOUSE"}]),onClick:w[3]||(w[3]=v=>m.value="MOUSE")},"鼠标",2)]),d.createElementVNode("div",mw,[m.value==="GIS"?(d.openBlock(),d.createElementBlock("div",Aw,[d.createElementVNode("div",yw,[w[27]||(w[27]=d.createElementVNode("span",null,"地球 (含大气/日月/星空)",-1)),d.createVNode(d.unref(t),{checked:y.globe,"onUpdate:checked":w[4]||(w[4]=v=>y.globe=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Cw,[w[28]||(w[28]=d.createElementVNode("span",null,"地形 (高程)",-1)),d.createVNode(d.unref(t),{checked:y.terrain,"onUpdate:checked":w[5]||(w[5]=v=>y.terrain=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Ew,[w[29]||(w[29]=d.createElementVNode("span",null,"地形遮挡",-1)),d.createVNode(d.unref(t),{checked:y.depthTest,"onUpdate:checked":w[6]||(w[6]=v=>y.depthTest=v),size:"small"},null,8,["checked"])])])):d.createCommentVNode("",!0),m.value==="MAP"?(d.openBlock(),d.createElementBlock("div",ww,[d.createElementVNode("div",bw,[d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.provider==="tianditu"}]),onClick:w[7]||(w[7]=v=>A.provider="tianditu")},"天地图",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.provider==="arcgis"}]),onClick:w[8]||(w[8]=v=>A.provider="arcgis")},"ArcGIS",2)]),A.provider==="tianditu"?(d.openBlock(),d.createElementBlock("div",vw,[d.createElementVNode("div",xw,[w[30]||(w[30]=d.createElementVNode("div",{class:"sub-label"},"Token",-1)),d.createVNode(d.unref(o),{value:A.tianditu.token,"onUpdate:value":w[9]||(w[9]=v=>A.tianditu.token=v),size:"small",placeholder:"输入天地图Token"},null,8,["value"])]),d.createElementVNode("div",Iw,[w[31]||(w[31]=d.createElementVNode("div",{class:"sub-label"},"地图风格",-1)),d.createVNode(d.unref(l),{value:A.tianditu.layerType,"onUpdate:value":w[10]||(w[10]=v=>A.tianditu.layerType=v),size:"small",style:{width:"100%"}},{default:d.withCtx(()=>[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(T,v=>d.createVNode(d.unref(a),{key:v.value,value:v.value},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(v.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),d.createElementVNode("div",Bw,[w[32]||(w[32]=d.createElementVNode("span",null,"叠加注记",-1)),d.createVNode(d.unref(t),{checked:A.tianditu.showLabel,"onUpdate:checked":w[11]||(w[11]=v=>A.tianditu.showLabel=v),size:"small"},null,8,["checked"])])])):d.createCommentVNode("",!0),A.provider==="arcgis"?(d.openBlock(),d.createElementBlock("div",Sw,[d.createElementVNode("div",Mw,[w[33]||(w[33]=d.createElementVNode("div",{class:"sub-label"},"服务地址",-1)),d.createVNode(d.unref(o),{value:A.arcgis.url,"onUpdate:value":w[12]||(w[12]=v=>A.arcgis.url=v),size:"small",placeholder:"输入ArcGIS MapServer地址"},null,8,["value"])])])):d.createCommentVNode("",!0),d.createElementVNode("div",Tw,[w[34]||(w[34]=d.createElementVNode("div",{class:"sub-label"},"位置搜索 (天地图)",-1)),d.createElementVNode("div",Dw,[d.createVNode(d.unref(o),{value:g.value,"onUpdate:value":w[13]||(w[13]=v=>g.value=v),placeholder:"输入地名搜索",size:"small","allow-clear":""},null,8,["value"])])])])):d.createCommentVNode("",!0),m.value==="RENDER"?(d.openBlock(),d.createElementBlock("div",kw,[d.createElementVNode("div",Pw,[w[35]||(w[35]=d.createElementVNode("span",null,"阴影",-1)),d.createVNode(d.unref(t),{checked:C.shadows,"onUpdate:checked":w[14]||(w[14]=v=>C.shadows=v),size:"small"},null,8,["checked"])]),C.shadows?(d.openBlock(),d.createElementBlock("div",Fw,[d.createElementVNode("div",Rw,"阴影暗度 ("+d.toDisplayString(C.shadowDarkness.toFixed(2))+")",1),d.createVNode(d.unref(r),{value:C.shadowDarkness,"onUpdate:value":w[15]||(w[15]=v=>C.shadowDarkness=v),min:0,max:1,step:.05,size:"small"},null,8,["value"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Ow,[w[36]||(w[36]=d.createElementVNode("span",null,"环境贴图 (HDR)",-1)),d.createVNode(d.unref(t),{checked:C.environmentMap,"onUpdate:checked":w[16]||(w[16]=v=>C.environmentMap=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Lw,[w[37]||(w[37]=d.createElementVNode("span",null,"环境光遮蔽 (AO)",-1)),d.createVNode(d.unref(t),{checked:C.ambientOcclusion,"onUpdate:checked":w[17]||(w[17]=v=>C.ambientOcclusion=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Nw,[w[38]||(w[38]=d.createElementVNode("div",{class:"sub-label"},"日期时间",-1)),d.createVNode(d.unref(c),{value:C.time,"onUpdate:value":w[18]||(w[18]=v=>C.time=v),"show-time":"",locale:d.unref(rc),format:"YYYY-MM-DD HH:mm",size:"small",style:{width:"100%"}},null,8,["value","locale"])]),d.createElementVNode("div",Uw,[d.createElementVNode("div",_w,"模型亮度 ("+d.toDisplayString(C.brightness.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:C.brightness,"onUpdate:value":w[19]||(w[19]=v=>C.brightness=v),min:0,max:5,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Qw,[d.createElementVNode("div",Hw,"模型对比度 ("+d.toDisplayString(C.contrast.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:C.contrast,"onUpdate:value":w[20]||(w[20]=v=>C.contrast=v),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Gw,[d.createElementVNode("div",Yw,"模型饱和度 ("+d.toDisplayString(C.saturation.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:C.saturation,"onUpdate:value":w[21]||(w[21]=v=>C.saturation=v),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Vw,[w[39]||(w[39]=d.createElementVNode("div",{class:"sub-label"},"背景颜色",-1)),d.createElementVNode("div",Ww,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(M,(v,S)=>d.createElementVNode("div",{key:S,style:d.normalizeStyle({background:v,width:"32px",height:"24px",borderRadius:"2px",cursor:"pointer",border:"1px solid #d9d9d9",flexShrink:0}),onClick:R=>C.backgroundColor=v,title:"预设 "+(S+1)},null,12,zw)),64))]),d.createElementVNode("div",jw,[d.withDirectives(d.createElementVNode("input",{type:"color","onUpdate:modelValue":w[22]||(w[22]=v=>I.value=v),style:{width:"40px",height:"24px",padding:"0",border:"1px solid #d9d9d9"}},null,512),[[d.vModelText,I.value]]),d.createVNode(d.unref(o),{value:C.backgroundColor,"onUpdate:value":w[23]||(w[23]=v=>C.backgroundColor=v),size:"small",style:{flex:"1"},placeholder:"CSS 颜色值"},null,8,["value"])])])])):d.createCommentVNode("",!0),m.value==="MOUSE"?(d.openBlock(),d.createElementBlock("div",$w,[d.createElementVNode("div",Kw,[w[40]||(w[40]=d.createElementVNode("span",null,"碰撞检测",-1)),d.createVNode(d.unref(t),{checked:E.collision,"onUpdate:checked":w[24]||(w[24]=v=>E.collision=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Xw,[w[43]||(w[43]=d.createElementVNode("div",{class:"sub-label"},"操作习惯",-1)),d.createVNode(d.unref(i),{value:E.habit,"onUpdate:value":w[25]||(w[25]=v=>E.habit=v),size:"small"},{default:d.withCtx(()=>[d.createVNode(d.unref(s),{value:0},{default:d.withCtx(()=>[...w[41]||(w[41]=[d.createTextVNode("默认 (中键旋转)",-1)])]),_:1}),d.createVNode(d.unref(s),{value:1},{default:d.withCtx(()=>[...w[42]||(w[42]=[d.createTextVNode("习惯1 (左键旋转)",-1)])]),_:1})]),_:1},8,["value"])])])):d.createCommentVNode("",!0)])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-a768b286"]]),qw={class:"cad-layer-panel"},Jw={class:"layer-list-container"},Zw={class:"list-header"},eb={class:"col-check"},tb=["checked"],nb={class:"list-body"},ib={class:"col-check"},sb=["checked","onChange"],ob={class:"col-index"},rb=["title"],ab={class:"col-color"},lb=["value"],cb={key:0,class:"empty-text"},db=Ue(d.defineComponent({__name:"LeitingCadLayer",props:{visible:{type:Boolean,default:!1},currentModelId:{type:String,default:""}},emits:["update:visible","handleCloseCardByCadCard"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods",d.ref({})),o=d.ref(""),r=d.ref([]),l=()=>{s.value&&s.value.getDxfModels&&(r.value=s.value.getDxfModels().map(E=>({modelId:E.modelId,modelName:E.modelName}))||[])},a=d.computed(()=>r.value.map(E=>({value:E.modelId,label:E.modelName}))),c=d.ref([]),u=d.ref([]),h=d.computed(()=>c.value.length>0&&u.value.length===c.value.length),f=({modelId:E})=>{if(c.value=[],u.value=[],s.value&&s.value.getDxfLayers){const x=s.value.getDxfLayers({modelId:E});x&&Object.keys(x).forEach((M,T)=>{x[M].length&&(c.value.push({index:T+1,layerName:M,layerColor:x[M][0].color||"#ffffff",key:M}),u.value.push(M))})}},p=E=>{o.value=E,f({modelId:E})},m=E=>{E.target.checked?u.value=c.value.map(M=>M.key):u.value=[],A()},y=(E,x)=>{x.target.checked?u.value.includes(E)||u.value.push(E):u.value=u.value.filter(T=>T!==E),A()},A=()=>{if(s.value&&s.value.showDxfLayer&&(s.value.showDxfLayer({modelId:o.value,show:!0,layers:u.value}),s.value.getDxfLayers)){const E=s.value.getDxfLayers({modelId:o.value});if(E){const x=Object.keys(E).filter(M=>!u.value.includes(M));s.value.showDxfLayer({modelId:o.value,show:!1,layers:x})}}},C=()=>{i("update:visible",!1),i("handleCloseCardByCadCard")};return d.watch(()=>t.visible,E=>{E&&(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})))}),d.watch(()=>t.currentModelId,E=>{E&&t.visible&&(o.value=E,f({modelId:E}))}),(E,x)=>(d.openBlock(),d.createBlock(Fe,{visible:n.visible,title:"CAD图层","onUpdate:visible":x[3]||(x[3]=M=>E.$emit("update:visible",M)),onClose:C,width:360,align:"right","initial-position":{x:0,y:60}},{"header-extra":d.withCtx(()=>[d.createElementVNode("div",{class:"header-select-container",onMousedown:x[2]||(x[2]=d.withModifiers(()=>{},["stop"]))},[x[4]||(x[4]=d.createElementVNode("span",{class:"header-label"},"图纸:",-1)),d.createVNode(d.unref(Ae.Select),{value:o.value,"onUpdate:value":x[0]||(x[0]=M=>o.value=M),options:a.value,onChange:x[1]||(x[1]=M=>p(M)),placeholder:"选择模型",style:{width:"140px"},bordered:!1,class:"custom-header-select",popupClassName:"leiting-select-dropdown",size:"small"},null,8,["value","options"])],32)]),default:d.withCtx(()=>[d.createElementVNode("div",qw,[d.createElementVNode("div",Jw,[d.createElementVNode("div",Zw,[d.createElementVNode("div",eb,[d.createElementVNode("input",{type:"checkbox",checked:h.value,onChange:m},null,40,tb)]),x[5]||(x[5]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),x[6]||(x[6]=d.createElementVNode("div",{class:"col-name"},"图层名称",-1)),x[7]||(x[7]=d.createElementVNode("div",{class:"col-color"},"颜色",-1))]),d.createElementVNode("div",nb,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(c.value,M=>(d.openBlock(),d.createElementBlock("div",{key:M.key,class:"list-item"},[d.createElementVNode("div",ib,[d.createElementVNode("input",{type:"checkbox",checked:u.value.includes(M.key),onChange:T=>y(M.key,T)},null,40,sb)]),d.createElementVNode("div",ob,d.toDisplayString(M.index),1),d.createElementVNode("div",{class:"col-name",title:M.layerName},d.toDisplayString(M.layerName),9,rb),d.createElementVNode("div",ab,[d.createElementVNode("input",{type:"color",value:M.layerColor,disabled:""},null,8,lb)])]))),128)),c.value.length===0?(d.openBlock(),d.createElementBlock("div",cb,"暂无数据")):d.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-a4db4977"]]),ub={class:"adjust-panel"},hb={class:"control-panel"},fb={class:"form-item"},pb={class:"radio-group"},gb={class:"form-item"},mb=["title"],Ab={class:"param-row"},yb=["step"],Cb={class:"param-row"},Eb=["step"],wb={class:"param-row"},bb=["step"],vb={class:"param-row"},xb=["step"],Ib={class:"param-row"},Bb=["step"],Sb={class:"param-row"},Mb=["step"],Tb={class:"param-row"},Db=["step"],kb={class:"button-grid"},Pb={key:1,class:"pick-mode-ui"},Fb=["onClick"],Rb=["checked"],Ob={style:{"font-size":"12px",color:"#aaa","padding-left":"10px"}},Lb={class:"param-row"},Nb={style:{width:"40px"}},Ub=["onUpdate:modelValue"],_b={class:"param-row"},Qb={style:{width:"40px"}},Hb=["onUpdate:modelValue"],Gb={class:"param-row"},Yb={style:{width:"40px"}},Vb=["onUpdate:modelValue"],Wb={class:"list-panel"},zb={class:"list-header"},jb={class:"col-check"},$b=["checked"],Kb={class:"list-body"},Xb={class:"col-check"},qb=["onUpdate:modelValue"],Jb={class:"col-index"},Zb=["title"],ev={class:"col-main"},tv=["checked","onChange"],nv={key:0,style:{padding:"10px","text-align":"center",color:"#999"}},iv=Ue(d.defineComponent({__name:"LeitingCadPosition",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","handleSavingByCadCard","clearBimPointList","save"],setup(n,{expose:e,emit:t}){const i=n,s=t,o=d.inject("leitingMethods"),r=d.ref([]),l=d.ref(""),a=d.computed(()=>r.value.length>0&&r.value.every(w=>w.selected)),c=d.ref("param"),u=d.ref("bimPoint1"),h=d.ref(null),f=d.ref("bimPoint1"),p=d.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=d.ref(1e-6),y=d.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=d.computed(()=>{const w=r.value.find(v=>v.modelId===l.value);return w?w.modelName:""}),C=()=>{s("update:visible",!1)},E=()=>(!h.value&&o?.value?.getViewer&&o?.value?.getCesium&&(h.value=new oc(o.value.getViewer(),o.value.getCesium())),h.value),x=()=>{E()?.clearMarkers(),p.bimPoint1.longitude=void 0,p.bimPoint1.latitude=void 0,p.bimPoint1.height=void 0,p.bimPoint2.longitude=void 0,p.bimPoint2.latitude=void 0,p.bimPoint2.height=void 0},M=w=>{const v=u.value,S=p[v];if(S){S.longitude=w.longitude,S.latitude=w.latitude,S.height=w.height;const R=v==="bimPoint1"?"BIM":"MAP";E()?.addMarker(R,w),fe.success(`${S.type}已添加`)}},T=()=>{E()?.registerPickHandler(w=>{M(w)})},B=()=>{E()?.destroyPickHandler()},I=w=>{c.value=w,w!=="pick"&&s("clearBimPointList")};d.watch(()=>c.value,w=>{w==="pick"?T():B()}),d.onUnmounted(()=>{B()});const g=()=>{if(!o?.value?.getDxfModels)return;const w=o.value.getDxfModels();if(Array.isArray(w)?r.value=w.map(v=>({modelId:v.modelId,modelName:v.modelName,formData:v.formData||{},selected:!1,tileset:v})):r.value=[],r.value.length>0){const v=o.value.getCadModelId?o.value.getCadModelId():"";v&&r.value.find(S=>S.modelId===v)?k(v):k(r.value[0].modelId),r.value.forEach(S=>S.selected=!0)}},k=w=>{l.value=w;const v=r.value.find(S=>S.modelId===w);v&&v.formData&&Object.keys(y).forEach(S=>{v.formData[S]!==void 0&&(y[S]=v.formData[S])})},P=(w,v)=>{if(!o?.value?.adjustingModelByCad)return;const S=r.value.find(R=>R.modelId===w);S&&S.tileset&&(S.formData={...S.formData,...v},S.tileset.formData=S.formData,o.value.adjustingModelByCad({...S.formData,tileset:S.tileset}))},F=w=>{if(!l.value)return;const v=y[w];P(l.value,{[w]:v})},L=w=>{const v=r.value.filter(N=>N.selected);if(v.length===0){fe.warning("请先选择要调整的模型");return}const{distance:S,heightDistance:R,rotation:_}=y;v.forEach(N=>{const D={...N.formData};switch(w){case"north":D.latitude+=S;break;case"south":D.latitude-=S;break;case"east":D.longitude+=S;break;case"west":D.longitude-=S;break;case"up":D.height+=R;break;case"down":D.height-=R;break;case"rotateLeft":D.totalRotation=(D.totalRotation||0)-_;break;case"rotateRight":D.totalRotation=(D.totalRotation||0)+_;break}N.modelId===l.value&&Object.assign(y,D),P(N.modelId,D)})},H=w=>{const v=w.target.checked;r.value.forEach(S=>S.selected=v)},O=()=>{s("handleSavingByCadCard",r.value),s("save",r.value)},b=()=>{const w=p.bimPoint1,v=p.bimPoint2;if(w.longitude===void 0||v.longitude===void 0){fe.warning("请先完成点选操作");return}const S=r.value.filter(Q=>Q.selected);if(S.length===0){fe.warning("请先选择要调整的模型");return}let R=0,_=0,N=0;const D=E();if(D){const{dLon:Q,dLat:V,dHeight:$}=D.calculateOffset(w,v);R=Q,_=V,N=$}else R=v.longitude-w.longitude,_=v.latitude-w.latitude,N=v.height-w.height;S.forEach(Q=>{const V={...Q.formData};V.longitude+=R,V.latitude+=_,V.height+=N,Q.modelId===l.value&&Object.assign(y,V),P(Q.modelId,V)}),fe.success("位置已调整")};return d.watch(()=>i.visible,w=>{w?g():(B(),x())}),d.onMounted(()=>{i.visible&&g()}),e({setBIMPointsList:({longitude:w,latitude:v,height:S})=>{p[f.value].longitude=w,p[f.value].latitude=v,p[f.value].height=S},addGltfOr3dTilesModelList:w=>{console.warn("addGltfOr3dTilesModelList is deprecated, use internal loading")}}),(w,v)=>(d.openBlock(),d.createBlock(Fe,{visible:i.visible,title:"Cad校准",width:282,height:600,"onUpdate:visible":v[21]||(v[21]=S=>s("update:visible",S)),onClose:C},{default:d.withCtx(()=>[d.createElementVNode("div",ub,[d.createElementVNode("div",hb,[d.createElementVNode("div",fb,[v[22]||(v[22]=d.createElementVNode("label",null,"调整操作:",-1)),d.createElementVNode("div",pb,[d.createElementVNode("span",{class:d.normalizeClass({active:c.value==="param"}),onClick:v[0]||(v[0]=S=>I("param"))},"参数模式",2),d.createElementVNode("span",{class:d.normalizeClass({active:c.value==="pick"}),onClick:v[1]||(v[1]=S=>I("pick"))},"地图点选",2)])]),d.createElementVNode("div",gb,[v[23]||(v[23]=d.createElementVNode("label",null,"当前主模型:",-1)),d.createElementVNode("span",{class:"value",title:A.value},d.toDisplayString(A.value||"未选择"),9,mb)]),v[35]||(v[35]=d.createElementVNode("div",{class:"separator"},null,-1)),c.value==="param"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[v[31]||(v[31]=d.createElementVNode("div",{class:"group-header"},"当前状态",-1)),d.createElementVNode("div",Ab,[v[24]||(v[24]=d.createElementVNode("label",null,"经度(东西):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[2]||(v[2]=S=>y.longitude=S),onChange:v[3]||(v[3]=S=>F("longitude")),step:m.value},null,40,yb),[[d.vModelText,y.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",Cb,[v[25]||(v[25]=d.createElementVNode("label",null,"纬度(南北):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[4]||(v[4]=S=>y.latitude=S),onChange:v[5]||(v[5]=S=>F("latitude")),step:m.value},null,40,Eb),[[d.vModelText,y.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",wb,[v[26]||(v[26]=d.createElementVNode("label",null,"高度(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[6]||(v[6]=S=>y.height=S),onChange:v[7]||(v[7]=S=>F("height")),step:m.value},null,40,bb),[[d.vModelText,y.height,void 0,{number:!0}]])]),d.createElementVNode("div",vb,[v[27]||(v[27]=d.createElementVNode("label",null,"累计旋转(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[8]||(v[8]=S=>y.totalRotation=S),onChange:v[9]||(v[9]=S=>F("totalRotation")),step:m.value},null,40,xb),[[d.vModelText,y.totalRotation,void 0,{number:!0}]])]),v[32]||(v[32]=d.createElementVNode("div",{class:"separator"},null,-1)),v[33]||(v[33]=d.createElementVNode("div",{class:"group-header"},"调整步长",-1)),d.createElementVNode("div",Ib,[v[28]||(v[28]=d.createElementVNode("label",null,"经纬步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[10]||(v[10]=S=>y.distance=S),step:m.value},null,8,Bb),[[d.vModelText,y.distance,void 0,{number:!0}]])]),d.createElementVNode("div",Sb,[v[29]||(v[29]=d.createElementVNode("label",null,"高度步长(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[11]||(v[11]=S=>y.heightDistance=S),step:m.value},null,8,Mb),[[d.vModelText,y.heightDistance,void 0,{number:!0}]])]),d.createElementVNode("div",Tb,[v[30]||(v[30]=d.createElementVNode("label",null,"旋转步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[12]||(v[12]=S=>y.rotation=S),step:m.value},null,8,Db),[[d.vModelText,y.rotation,void 0,{number:!0}]])]),d.createElementVNode("div",kb,[d.createElementVNode("button",{onClick:v[13]||(v[13]=S=>L("rotateLeft"))},"左转"),d.createElementVNode("button",{onClick:v[14]||(v[14]=S=>L("north"))},"北移"),d.createElementVNode("button",{onClick:v[15]||(v[15]=S=>L("rotateRight"))},"右转"),d.createElementVNode("button",{onClick:v[16]||(v[16]=S=>L("west"))},"西移"),d.createElementVNode("button",{onClick:v[17]||(v[17]=S=>L("south"))},"南移"),d.createElementVNode("button",{onClick:v[18]||(v[18]=S=>L("east"))},"东移"),d.createElementVNode("button",{onClick:v[19]||(v[19]=S=>L("up"))},"上移"),d.createElementVNode("button",{onClick:v[20]||(v[20]=S=>L("down"))},"下移"),d.createElementVNode("button",{onClick:O,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):(d.openBlock(),d.createElementBlock("div",Pb,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(p,(S,R)=>(d.openBlock(),d.createElementBlock("div",{key:R,class:"form-item",style:{display:"block","margin-bottom":"15px"}},[d.createElementVNode("div",{style:{"font-weight":"bold","margin-bottom":"5px",cursor:"pointer",display:"flex","align-items":"center"},onClick:_=>u.value=R},[d.createElementVNode("input",{type:"radio",checked:u.value===R,style:{"margin-right":"5px"}},null,8,Rb),d.createTextVNode(" "+d.toDisplayString(S.type)+": ",1)],8,Fb),d.createElementVNode("div",Ob,[d.createElementVNode("div",Lb,[d.createElementVNode("label",Nb,d.toDisplayString(S.longitudeText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":_=>S.longitude=_,readonly:"",style:{width:"100px"}},null,8,Ub),[[d.vModelText,S.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",_b,[d.createElementVNode("label",Qb,d.toDisplayString(S.latitudeText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":_=>S.latitude=_,readonly:"",style:{width:"100px"}},null,8,Hb),[[d.vModelText,S.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",Gb,[d.createElementVNode("label",Yb,d.toDisplayString(S.heightText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":_=>S.height=_,readonly:"",style:{width:"100px"}},null,8,Vb),[[d.vModelText,S.height,void 0,{number:!0}]])])])]))),128)),d.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[d.createElementVNode("button",{onClick:b,class:"primary-btn"},"应用校准"),d.createElementVNode("button",{onClick:O},"保存")]),v[34]||(v[34]=d.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[d.createElementVNode("div",null,"操作指南:"),d.createElementVNode("div",null,"1. 勾选上方 CAD 或 地图 标记点选项。"),d.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),d.createElementVNode("div",null,"3. 采集两点后,点击“应用校准”进行校准。")],-1))]))]),d.createElementVNode("div",Wb,[d.createElementVNode("div",zb,[d.createElementVNode("div",jb,[d.createElementVNode("input",{type:"checkbox",checked:a.value,onChange:H},null,40,$b)]),v[36]||(v[36]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),v[37]||(v[37]=d.createElementVNode("div",{class:"col-name"},"名称",-1)),v[38]||(v[38]=d.createElementVNode("div",{class:"col-main"},"主模型",-1))]),d.createElementVNode("div",Kb,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,(S,R)=>(d.openBlock(),d.createElementBlock("div",{key:S.modelId,class:d.normalizeClass(["list-item",{active:S.modelId===l.value}])},[d.createElementVNode("div",Xb,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":_=>S.selected=_},null,8,qb),[[d.vModelCheckbox,S.selected]])]),d.createElementVNode("div",Jb,d.toDisplayString(R+1),1),d.createElementVNode("div",{class:"col-name",title:S.modelName},d.toDisplayString(S.modelName),9,Zb),d.createElementVNode("div",ev,[d.createElementVNode("input",{type:"radio",name:"mainModel",checked:S.modelId===l.value,onChange:_=>k(S.modelId)},null,40,tv)])],2))),128)),r.value.length===0?(d.openBlock(),d.createElementBlock("div",nv,"暂无数据")):d.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-e8abd49d"]]),sv={class:"annotation-content"},ov={class:"annotation-tools"},rv={class:"annotation-controls"},av={class:"control-group",title:"颜色"},lv={class:"tool-item color-tool"},cv={class:"control-group line-width-container",title:"线宽"},dv=["onClick"],uv={class:"option-label"},hv=Ue(d.defineComponent({__name:"LeitingAnnotationCard",props:{visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref(""),r=d.ref("#ff0000"),l=d.ref(1),a=d.ref(!1),c=d.ref(null),u=d.ref(null),h=d.ref({top:"0px",left:"0px"}),f=[{value:6,label:"粗"},{value:3,label:"中"},{value:1,label:"细"}],p=()=>s?.value?.getAnnotationInstance?s.value.getAnnotationInstance():null,m=()=>{i("update:visible",!1)},y=I=>{o.value=I;const g=p();if(g)switch(I){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 I=p();I&&(I.setCurrentColor(r.value),I.changeColor(r.value))},C=()=>{if(!a.value&&c.value){const I=c.value.getBoundingClientRect();h.value={top:`${I.top}px`,left:`${I.right+8}px`}}a.value=!a.value},E=I=>{l.value=I,a.value=!1;const g=p();g&&(g.setCurrentWidth(I),g.changeWidth(I))},x=()=>{const I=p();I&&I.deleteSelectedEntity()},M=()=>{const I=p();I&&I.clearAll()},T=()=>{if(s?.value?.saveAnnotations){s.value.saveAnnotations();return}const I=p();I&&I.saveAnnotations()},B=I=>{const g=I.target,k=c.value&&c.value.contains(g),P=u.value&&u.value.contains(g);!k&&!P&&(a.value=!1)};return d.onMounted(()=>{document.addEventListener("click",B)}),d.onUnmounted(()=>{document.removeEventListener("click",B)}),(I,g)=>(d.openBlock(),d.createBlock(Fe,{visible:t.visible,title:"标注",width:70,"min-width":70,height:480,"onUpdate:visible":g[6]||(g[6]=k=>i("update:visible",k)),onClose:m},{default:d.withCtx(()=>[d.createElementVNode("div",sv,[d.createElementVNode("div",ov,[d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="freehandLine"}]),onClick:g[0]||(g[0]=k=>y("freehandLine")),title:"手绘线"},[...g[7]||(g[7]=[d.createElementVNode("div",{class:"tool-icon"},"✏️",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="arrow"}]),onClick:g[1]||(g[1]=k=>y("arrow")),title:"箭头"},[...g[8]||(g[8]=[d.createElementVNode("div",{class:"tool-icon"},"↗️",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="straightLine"}]),onClick:g[2]||(g[2]=k=>y("straightLine")),title:"直线"},[...g[9]||(g[9]=[d.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="rectangle"}]),onClick:g[3]||(g[3]=k=>y("rectangle")),title:"矩形"},[...g[10]||(g[10]=[d.createElementVNode("div",{class:"tool-icon"},"▭",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="ellipse"}]),onClick:g[4]||(g[4]=k=>y("ellipse")),title:"椭圆"},[...g[11]||(g[11]=[d.createElementVNode("div",{class:"tool-icon"},"⭕",-1)])],2)]),g[13]||(g[13]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",rv,[d.createElementVNode("div",av,[d.createElementVNode("div",lv,[d.createElementVNode("div",{class:"color-swatch",style:d.normalizeStyle({backgroundColor:r.value})},null,4),d.withDirectives(d.createElementVNode("input",{type:"color","onUpdate:modelValue":g[5]||(g[5]=k=>r.value=k),onChange:A,class:"color-input-overlay"},null,544),[[d.vModelText,r.value]])])]),d.createElementVNode("div",cv,[d.createElementVNode("div",{ref_key:"lineWidthBtnRef",ref:c,class:"tool-item",onClick:d.withModifiers(C,["stop"])},[d.createElementVNode("div",{class:"current-width-preview",style:d.normalizeStyle({height:l.value+"px",backgroundColor:"#fff"})},null,4)],512),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[a.value?(d.openBlock(),d.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:u,class:"line-width-dropdown",style:d.normalizeStyle(h.value)},[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(f,k=>d.createElementVNode("div",{key:k.value,class:d.normalizeClass(["line-width-option",{selected:l.value===k.value}]),onClick:d.withModifiers(P=>E(k.value),["stop"])},[d.createElementVNode("span",uv,d.toDisplayString(k.label),1),d.createElementVNode("div",{class:"line-preview",style:d.normalizeStyle({height:k.value+"px",backgroundColor:l.value===k.value?"#1890ff":"#ddd"})},null,4)],10,dv)),64))],4)):d.createCommentVNode("",!0)]))]),g[12]||(g[12]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",{class:"action-buttons"},[d.createElementVNode("button",{class:"control-btn",onClick:x,title:"删除选中"}," 🗑️ "),d.createElementVNode("button",{class:"control-btn",onClick:M,title:"清空"}," ❌ "),d.createElementVNode("button",{class:"control-btn",onClick:T,title:"保存"}," 💾 ")])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-3cfc8415"]]),fv={class:"measure-content"},pv={class:"measure-tools"},gv={key:0,class:"measure-results"},mv={class:"result-row"},Av={class:"result-value"},yv={class:"result-row"},Cv={class:"result-value"},Ev={class:"result-row"},wv={class:"result-value"},bv={class:"result-row"},vv={class:"result-value"},xv={key:1,class:"result-row"},Iv={class:"result-value"},Bv={key:2,class:"result-row"},Sv={class:"result-value"},Mv={class:"measure-controls"},Tv={class:"control-group",title:"单位"},Dv={class:"unit-display"},kv=["onClick"],Pv=Ue(d.defineComponent({__name:"LeitingMeasurement",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods",d.ref({})),o=d.ref(null),r=d.ref(null),l=d.ref("m"),a=d.ref(!1),c=d.ref(null),u=d.ref(!1),h=d.ref({}),f=d.ref(null),p=[{label:"米 (m)",value:"m"},{label:"厘米 (cm)",value:"cm"},{label:"毫米 (mm)",value:"mm"}],m=I=>{const g=l.value;return g==="mm"?`${(I*1e3).toFixed(0)}mm`:g==="cm"?`${(I*100).toFixed(1)}cm`:`${I.toFixed(2)}m`},y=I=>I>1e6?`${(I/1e6).toFixed(2)} km²`:`${I.toFixed(2)} m²`,A=()=>{if(!o.value&&s.value?.getViewer){const I=s.value.getViewer(),g=s.value.getCesium();I&&g&&(o.value=new tc({viewer:I,cesium:g}),o.value.setUnit(l.value),o.value.setSnapping(a.value),o.value.onMeasure=k=>{c.value=k})}},C=I=>{o.value||A(),r.value===I?(r.value=null,o.value?.stop()):(r.value=I,o.value?.start(I))},E=I=>{l.value=I,u.value=!1},x=()=>{o.value&&(o.value.clearAll(),r.value=null,o.value.stop())},M=()=>{i("update:visible",!1)},T=I=>{if(u.value){u.value=!1;return}const k=I.currentTarget.getBoundingClientRect();h.value={position:"fixed",top:`${k.top}px`,left:`${k.right+5}px`,zIndex:3e3},u.value=!0},B=I=>{u.value&&f.value&&!f.value.contains(I.target)&&(u.value=!1)};return d.onMounted(()=>{document.addEventListener("click",B),t.visible&&d.nextTick(()=>A())}),d.onUnmounted(()=>{document.removeEventListener("click",B),o.value&&o.value.destroy()}),d.watch(()=>t.visible,I=>{I?d.nextTick(()=>A()):o.value&&(o.value.stop(),r.value=null)}),d.watch(s,I=>{I&&I.getViewer&&!o.value&&t.visible&&A()}),d.watch(l,I=>{o.value&&o.value.setUnit(I)}),(I,g)=>(d.openBlock(),d.createBlock(Fe,{visible:t.visible,title:"量算",width:70,"min-width":70,height:480,"onUpdate:visible":g[3]||(g[3]=k=>i("update:visible",k)),onClose:M},{default:d.withCtx(()=>[d.createElementVNode("div",fv,[d.createElementVNode("div",pv,[d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="distance"}]),onClick:g[0]||(g[0]=k=>C("distance")),title:"距离测量"},[...g[4]||(g[4]=[d.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="angle"}]),onClick:g[1]||(g[1]=k=>C("angle")),title:"角度测量"},[...g[5]||(g[5]=[d.createElementVNode("div",{class:"tool-icon"},"📐",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="area"}]),onClick:g[2]||(g[2]=k=>C("area")),title:"面积测量"},[...g[6]||(g[6]=[d.createElementVNode("div",{class:"tool-icon"},"🔳",-1)])],2)]),g[15]||(g[15]=d.createElementVNode("div",{class:"separator"},null,-1)),c.value?(d.openBlock(),d.createElementBlock("div",gv,[c.value.type==="distance"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createElementVNode("div",mv,[g[7]||(g[7]=d.createElementVNode("span",{class:"result-label"},"总长:",-1)),d.createElementVNode("span",Av,d.toDisplayString(m(c.value.dist)),1)]),d.createElementVNode("div",yv,[g[8]||(g[8]=d.createElementVNode("span",{class:"result-label",style:{color:"#ff4d4f"}},"ΔX:",-1)),d.createElementVNode("span",Cv,d.toDisplayString(m(c.value.dx)),1)]),d.createElementVNode("div",Ev,[g[9]||(g[9]=d.createElementVNode("span",{class:"result-label",style:{color:"#52c41a"}},"ΔY:",-1)),d.createElementVNode("span",wv,d.toDisplayString(m(c.value.dy)),1)]),d.createElementVNode("div",bv,[g[10]||(g[10]=d.createElementVNode("span",{class:"result-label",style:{color:"#1890ff"}},"ΔZ:",-1)),d.createElementVNode("span",vv,d.toDisplayString(m(c.value.dz)),1)])],64)):d.createCommentVNode("",!0),c.value.type==="angle"?(d.openBlock(),d.createElementBlock("div",xv,[g[11]||(g[11]=d.createElementVNode("span",{class:"result-label"},"角度:",-1)),d.createElementVNode("span",Iv,d.toDisplayString(c.value.angle.toFixed(1))+"°",1)])):d.createCommentVNode("",!0),c.value.type==="area"?(d.openBlock(),d.createElementBlock("div",Bv,[g[12]||(g[12]=d.createElementVNode("span",{class:"result-label"},"面积:",-1)),d.createElementVNode("span",Sv,d.toDisplayString(y(c.value.area)),1)])):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),d.createElementVNode("div",Mv,[d.createElementVNode("div",Tv,[d.createElementVNode("div",{class:"tool-item",onClick:d.withModifiers(T,["stop"])},[d.createElementVNode("div",Dv,d.toDisplayString(l.value),1)]),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[u.value?(d.openBlock(),d.createElementBlock("div",{key:0,ref_key:"unitDropdownRef",ref:f,class:"unit-dropdown",style:d.normalizeStyle(h.value)},[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(p,k=>d.createElementVNode("div",{key:k.value,class:d.normalizeClass(["unit-option",{selected:l.value===k.value}]),onClick:d.withModifiers(P=>E(k.value),["stop"])},d.toDisplayString(k.label),11,kv)),64))],4)):d.createCommentVNode("",!0)]))]),g[14]||(g[14]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",{class:"action-buttons"},[d.createElementVNode("div",{class:"tool-item control-btn",onClick:x,title:"清空"},[...g[13]||(g[13]=[d.createElementVNode("div",{class:"tool-icon"},"🗑️",-1)])])])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-b766acb4"]]);function Fv(){const n=d.ref(!1),e=d.reactive({x:0,y:0}),t=d.ref([]),i=d.ref(null);return{visible:n,position:e,items:t,contextData:i,show:(a,c,u)=>{a instanceof MouseEvent?(a.preventDefault(),e.x=a.clientX,e.y=a.clientY):(e.x=a.x,e.y=a.y),t.value=c,i.value=u,n.value=!0},hide:()=>{n.value=!1},addItem:a=>{t.value.push(a)},removeItem:a=>{t.value=t.value.filter(c=>c.id!==a)}}}const Rv=["onClick"],Ov={class:"menu-label"},Lv={key:0,class:"menu-arrow"},Nv=Ue(d.defineComponent({__name:"LeitingContextMenu",props:{visible:{type:Boolean},position:{},items:{}},emits:["update:visible","action"],setup(n,{emit:e}){const t=n,i=e,s=r=>{r.disabled||(r.action&&r.action(),i("action",r),i("update:visible",!1))},o=()=>{t.visible&&i("update:visible",!1)};return d.onMounted(()=>{document.addEventListener("click",o),document.addEventListener("contextmenu",r=>{r.target.closest(".leiting-context-menu")||o()})}),d.onUnmounted(()=>{document.removeEventListener("click",o)}),(r,l)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{class:"leiting-context-menu",style:d.normalizeStyle({left:n.position.x+"px",top:n.position.y+"px"}),onContextmenu:l[0]||(l[0]=d.withModifiers(()=>{},["prevent"]))},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.items,a=>(d.openBlock(),d.createElementBlock("div",{key:a.id,class:d.normalizeClass(["menu-item",{"menu-divided":a.divided,"menu-disabled":a.disabled}]),onClick:c=>s(a)},[d.createElementVNode("span",Ov,d.toDisplayString(a.label),1),a.children?(d.openBlock(),d.createElementBlock("span",Lv,"▶")):d.createCommentVNode("",!0)],10,Rv))),128))],36)),[[d.vShow,n.visible]])}}),[["__scopeId","data-v-f288753b"]]),Uv={class:"leiting-ui-overlay"},_i=Ue(d.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(n,{emit:e}){const t=d.ref(),i=d.getCurrentInstance(),s=d.ref(!1),o=d.ref(""),r=d.ref({}),l=d.ref("3d"),a=n,c={title:"构件树",treeData:[]},u=d.ref(!1),h=d.ref(!1),f=d.ref(!1),p=d.ref(!1),m=d.ref(!1),y=d.ref(!1),A=d.ref(!1),C=d.ref(!1),E=d.ref(!1),x=d.ref(!1),{visible:M,position:T,items:B,show:I,hide:g}=Fv(),k=d.ref([]),P=Y=>{k.value.push(Y)},F=Y=>{k.value=k.value.filter(j=>j.id!==Y)},L=d.ref([]),H=d.ref(""),O=d.ref(null),b=d.ref([]),w=d.reactive({tree:!1,section:!1,roam:!1,info:!1,adjustModel:!1,setting:!1,cadLayer:!1,cadPosition:!1,annotation:!1}),v=(Y,j)=>{Y==="componentTree"&&(Y="tree"),Y==="componentInfo"&&(Y="info"),Y in w&&(w[Y]=j)},S=d.shallowRef({});d.provide("leitingMethods",S);const R=d.ref(a.showMenu),_=d.ref([]);d.watch(()=>a.showMenu,Y=>{R.value=Y},{immediate:!0}),d.watch(()=>a.mode,Y=>{Y&&S.value?.set2d&&S.value.set2d(Y==="2d")});const N=d.ref("dark");d.provide("leiting-theme",N);const D=d.ref([]),Q=d.computed(()=>{const Y=[];return u.value&&(Y.push("tree"),Y.push("componentTree")),h.value&&Y.push("section"),f.value&&Y.push("roam"),p.value&&(Y.push("info"),Y.push("componentInfo")),m.value&&Y.push("adjust"),y.value&&Y.push("setting"),A.value&&Y.push("cadLayer"),C.value&&Y.push("cadPosition"),E.value&&Y.push("annotation"),x.value&&(Y.push("measure"),Y.push("measurement")),Y.push(...D.value),Y}),V=d.ref(null),$=(Y,j)=>{Y==="componentTree"||Y==="tree"?u.value=j:Y==="section"?h.value=j:Y==="roam"?f.value=j:Y==="componentInfo"||Y==="info"?p.value=j:Y==="homeView"?S.value?.is2dMode?.()?S.value?.flyToTopView?.({}):S.value?.flyToTileset?.({}):Y==="adjustModel"?(m.value=j,j&&V.value&&V.value.setModelType("BIM")):Y==="osgbAdjust"?(m.value=j,j&&V.value&&V.value.setModelType("OSGB")):Y==="setting"?y.value=j:Y==="cadLayer"?A.value=j:Y==="cadPosition"?C.value=j:Y==="annotation"?E.value=j:Y==="measurement"?x.value=j:j?D.value.includes(Y)||D.value.push(Y):D.value=D.value.filter(J=>J!==Y)},q=()=>{S.value&&(S.value.getDxfModels&&(L.value=S.value.getDxfModels()||[]),S.value.getCadModelId&&(H.value=S.value.getCadModelId()||""))};d.watch(A,Y=>{Y&&q()}),d.watch(C,Y=>{Y&&(q(),O.value&&L.value.length&&O.value.addGltfOr3dTilesModelList(L.value))});const ne=e,se=Y=>{S.value&&S.value.saveCadCalibration&&S.value.saveCadCalibration(Y),S.value&&S.value.saveCadRegion&&S.value.saveCadRegion(Y)};return d.onMounted(async()=>{if(t.value)try{const Y={...xt,cesiumUrl:a.cesiumUrl||xt.cesiumUrl,cesiumCssUrl:a.cesiumCssUrl||xt.cesiumCssUrl,accessToken:a.accessToken||ts()||xt.accessToken};await es(Y);const j=a.accessToken||ts()||xt.accessToken;j&&(Cesium.Ion.defaultAccessToken=j),s.value=!0;const J=(le={},ge)=>{if(t.value){const{showMenu:we,showTree:me,globe:Re,terrain:ct,depthTest:$e,mapProvider:bt,tiandituLayerType:it,tiandituShowLabel:ln,arcgisUrl:Nt,shadows:Ut,environmentMap:Ki,ambientOcclusion:Ke,time:Oe,brightness:st,backgroundColor:dt,collision:_t,mouseHabit:Qt,mode:vt,...Ie}=le||{},To=a.showMenu!==void 0?a.showMenu:we!==void 0?we:!0;R.value=To;const De=(ee,ke,hn)=>ee!==void 0?ee:ke!==void 0?ke:hn,cn=De(a.globe,Re,!1),dn=De(a.terrain,ct,!1),$n=De(a.depthTest,$e,!1),Kn=De(a.mapProvider,bt,"tianditu"),Xn=De(a.tiandituLayerType,it,"img_w"),Xi=De(a.tiandituShowLabel,ln,!1),qc=De(a.arcgisUrl,Nt,"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"),Jc=De(a.shadows,Ut,!1),Zc=De(a.environmentMap,Ki,!1),ed=De(a.ambientOcclusion,Ke,!1),td=De(a.time,Oe,void 0),nd=De(a.brightness,st,1),qi=a.mode||vt||"3d";console.log("LeitingBIM Mode:",qi,"Props:",a.mode,"Options:",vt),l.value=qi;const _I=qi==="2d"?"#000000":"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)",id=De(a.backgroundColor,dt,_I),sd=De(a.collision,_t,!1),od=De(a.mouseHabit,Qt,0);r.value={globe:cn,terrain:dn,depthTest:$n,mapProvider:Kn,tiandituLayerType:Xn,tiandituShowLabel:Xi,arcgisUrl:qc,shadows:Jc,environmentMap:Zc,ambientOcclusion:ed,time:td,brightness:nd,backgroundColor:id,collision:sd,mouseHabit:od};const qn=P0({container:t.value,appContext:i?.appContext,methods:{...S.value,handleMenuAction:$,setCardFullHeight:v,onLoadingStatus:ee=>{ee?fe.loading(ee,"",t.value):fe.close()},...Ie,tilesLoad3dTiles:ee=>{const ke=ee.leiting?.tree,hn=ee.leiting?.model?.modelId;ke&&(Array.isArray(ke)?ke:[ke]).forEach(Gt=>{Gt&&!b.value.find(ad=>ad.id===Gt.id)&&(Gt.modelId=hn,b.value=[...b.value,Gt])});const{brightness:Do,contrast:ko,saturation:ut}=qn.methods.getConfigure();qn.methods.setModelColorAdjustment({brightness:Do,contrast:ko,saturation:ut}),Ie.tilesLoad3dTiles?.(ee)},mountAll3Dtiles:ee=>{a.mountAll3Dtiles&&a.mountAll3Dtiles(ee),Ie.mountAll3Dtiles?.(ee)},mountAllCad:ee=>{if(qn.methods.setModelBrightness){const ke=a.brightness!==void 0?a.brightness:r.value.brightness;ke!==void 0&&qn.methods.setModelBrightness(ke)}a.mountAllCad&&a.mountAllCad(ee),Ie.mountAllCad?.(ee)},saveRegion:ee=>{a.saveRegion&&a.saveRegion(ee),Ie.saveRegion?.(ee)},saveCadRegion:ee=>{a.saveCadRegion&&a.saveCadRegion(ee),Ie.saveCadRegion?.(ee)},saveCadCalibration:ee=>{a.saveCadCalibration&&a.saveCadCalibration(ee),Ie.saveCadCalibration?.(ee)},selectionChange:ee=>{a.selectionChange&&a.selectionChange(ee),Ie.selectionChange?.(ee)},onSearchComponent:ee=>{a.searchComponent&&a.searchComponent(ee),Ie.searchComponent?.(ee)}},viewerOptions:a.viewerOptions,options:{...Ie,mode:qi,playerUrl:a.playerUrl,playerModelName:a.playerModelName,playerModelId:a.playerModelId,playerScale:a.playerScale,globe:cn,terrain:dn,depthTest:$n,mapProvider:Kn,tiandituLayerType:Xn,tiandituShowLabel:Xi,tiandituToken:a.tiandituToken,arcgisUrl:qc,shadows:Jc,environmentMap:Zc,ambientOcclusion:ed,time:td,brightness:nd,backgroundColor:id,collision:sd,mouseHabit:od},callbacks:{onLoading:ee=>ee?fe.loading(ee,"",t.value):fe.close(),onSuccess:ee=>fe.success(ee,"",void 0,t.value),onError:ee=>fe.error(ee,"",void 0,t.value)}}),{Cesium:Ht,viewer:un,methods:Ji,menuEvents:Jn}=qn,ve=Ji;Jn.on("showMenu",ee=>{R.value=ee}),Jn.on("insertMenu",ee=>{_.value=ee}),Jn.on("setMenuActive",(ee,ke)=>{$(ee,ke)}),S.value=ve,ge&&(ge.value=ve),Jn.on("setMode",ee=>{l.value=ee}),Jn.on("deleteAllModels",()=>{b.value=[]}),new Ht.ScreenSpaceEventHandler(un.scene.canvas).setInputAction(ee=>{if(g(),l.value==="2d")return;const ke=un.scene.pick(ee.position),hn=un.container.getBoundingClientRect(),Do=hn.left+ee.position.x,ko=hn.top+ee.position.y,ut=[];if(Ht.defined(ke)&&ke instanceof Ht.Cesium3DTileFeature){const Po=ve.baseCompt.getFeatureId(ke),Gt=Sn(ke.tileset);ve.baseCompt.hasSelectedFeaturesMap[Gt]?.some(Zn=>Zn.batchId===Po&&Zn.rank===0)||(ve.baseCompt.clearSelection(),ve.baseCompt.toggleMultiSelect(Gt,Po,ve.baseCompt.selectedColor)),ut.push({id:"details",label:"构件详情",action:()=>{p.value=!0}}),ut.push({id:"hide",label:"隐藏选中构件",action:()=>{const ei=ve.baseCompt.getSelected().map(ht=>({elementId:ht.elementId,modelId:ht.modelId,show:!1}));ve.baseCompt.setComponentVisibility(ei)}}),ut.push({id:"translucent",label:"半透明选中构件",action:()=>{const ei=ve.baseCompt.getSelected().map(ht=>({elementId:ht.elementId,modelId:ht.modelId,rgba:{...ht.rgba,a:.3}}));ve.baseCompt.setSelectColorUserModelCpt(ei,{rank:0})}}),ut.push({id:"isolate",label:"隔离选中构件",divided:!0,action:()=>{ve.baseCompt.setAllComponentsVisibility(!1);const ei=ve.baseCompt.getSelected().map(ht=>({elementId:ht.elementId,modelId:ht.modelId,show:!0}));ve.baseCompt.setComponentVisibility(ei)}})}ut.push({id:"showAll",label:"显示所有",action:()=>{ve.baseCompt.setAllComponentsVisibility(!0),ve.baseCompt.clearSelection()}}),ut.push(...k.value),I({x:Do,y:ko},ut)},Ht.ScreenSpaceEventType.RIGHT_CLICK),ve.insertContextMenu=P,ve.deleteContextMenu=F,ve.hideContextMenu=g;const rd=le?.onLoaded||le?.onloaded;rd&&rd({Cesium:Ht,viewer:un,methods:Ji}),ne("init",{Cesium:Ht,viewer:un,methods:Ji}),ne("ready",{Cesium:Ht,viewer:un,methods:Ji})}};let oe=!1;ne("register",(le,ge)=>{oe=!0,J(le,ge)}),oe||setTimeout(()=>{S.value.getViewer||J()},0)}catch(Y){o.value="Failed to load Cesium: "+(Y.message||Y),console.error(Y)}}),(Y,j)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["leiting-bim-container",[`theme-${N.value}`]]),onContextmenu:j[11]||(j[11]=d.withModifiers(()=>{},["prevent","stop"]))},[!s.value&&!o.value?(d.openBlock(),d.createBlock(d.unref(Ae.Spin),{key:0,class:"loading",size:"large",tip:"加载基础组件中..."})):d.createCommentVNode("",!0),o.value?(d.openBlock(),d.createBlock(d.unref(Ae.Alert),{key:1,class:"error",type:"error",message:o.value,"show-icon":""},null,8,["message"])):d.createCommentVNode("",!0),d.createElementVNode("div",{ref_key:"containerRef",ref:t,class:"cesium-viewer"},[d.createElementVNode("div",Uv,[d.createVNode(Qn,{visible:p.value,"full-height":w.info,"onUpdate:visible":j[0]||(j[0]=J=>p.value=J)},null,8,["visible","full-height"]),d.createVNode(Hn,{ref_key:"LeitingPositionRef",ref:V,visible:m.value,"full-height":w.adjustModel,"onUpdate:visible":j[1]||(j[1]=J=>m.value=J)},null,8,["visible","full-height"]),d.createVNode(Gn,{visible:y.value,"full-height":w.setting,"tianditu-token":a.tiandituToken,"initial-config":r.value,"onUpdate:visible":j[2]||(j[2]=J=>y.value=J)},null,8,["visible","full-height","tianditu-token","initial-config"]),n.showTree!==!1?(d.openBlock(),d.createBlock(ki,d.mergeProps({key:0},{...c,...n.treeProps},{visible:u.value,"full-height":w.tree,"tree-data":b.value.length>0?b.value:n.treeProps?.treeData||[],"onUpdate:visible":j[3]||(j[3]=J=>{u.value=J})}),null,16,["visible","full-height","tree-data"])):d.createCommentVNode("",!0),d.createVNode(hv,{visible:E.value,"onUpdate:visible":j[4]||(j[4]=J=>E.value=J)},null,8,["visible"]),d.createVNode(Pv,{visible:x.value,"onUpdate:visible":j[5]||(j[5]=J=>x.value=J)},null,8,["visible"]),d.createVNode(Un,{visible:h.value,"full-height":w.section,"onUpdate:visible":j[6]||(j[6]=J=>h.value=J)},null,8,["visible","full-height"]),d.createVNode(_n,{visible:f.value,"full-height":w.roam,"onUpdate:visible":j[7]||(j[7]=J=>f.value=J)},null,8,["visible","full-height"]),d.createVNode(Nn,{visible:R.value,"active-ids":Q.value,"custom-items":_.value,onAction:$,"is-2d":l.value==="2d"},null,8,["visible","active-ids","custom-items","is-2d"]),d.createVNode(db,{visible:A.value,"current-model-id":H.value,"onUpdate:visible":j[8]||(j[8]=J=>A.value=J)},null,8,["visible","current-model-id"]),d.createVNode(iv,{ref_key:"cadPositionRef",ref:O,visible:C.value,"onUpdate:visible":j[9]||(j[9]=J=>C.value=J),onSave:se},null,8,["visible"]),d.createVNode(Nv,{visible:d.unref(M),position:d.unref(T),items:d.unref(B),"onUpdate:visible":j[10]||(j[10]=J=>M.value=J)},null,8,["visible","position","items"]),d.renderSlot(Y.$slots,"default",d.normalizeProps(d.guardReactiveProps({methods:S.value,isReady:s.value})),void 0,!0)])],512)],34))}}),[["__scopeId","data-v-1308f92b"]]);function pc(n){const e=d.ref(),t=d.ref(n.theme||"dark"),i=d.ref(n.menuSize||"medium");d.provide("leiting-theme",t),d.provide("leiting-menu-size",i);function s(l){d.onUnmounted(()=>{e.value=null}),l(n,e)}function o(){const l=d.unref(e);return l||console.error("未获取到leiting实例!"),l}const r=new Proxy({},{get(l,a){const c=o();if(!c)return;const u=c[a];return typeof u=="function"?u.bind(c):u},set(l,a,c){const u=o();return u?(u[a]=c,!0):!1}});return[s,r]}const _v=xt,Qv={install:(n,e)=>{if(n.component("LeitingBIM",_i),n.component("LeitingTree",ki),n.component("LeitingDraggableCard",Fe),n.component("leiting-draggable-card",Fe),n.component("LeitingMenu",Nn),n.component("leiting-menu",Nn),n.component("LeitingSection",Un),n.component("leiting-section",Un),n.component("LeitingPlayer",_n),n.component("leiting-player",_n),n.component("LeitingInfo",Qn),n.component("leiting-info",Qn),n.component("LeitingPosition",Hn),n.component("leiting-position",Hn),n.component("LeitingSetting",Gn),n.component("leiting-setting",Gn),!e)return;const t={..._v,...e};t.cesiumUrl&&es(t).catch(i=>{console.error("[LeitingBim] Failed to load Cesium resources:",i)}),n.config.globalProperties.$leitingBimOptions=t}};var W={image:new Map,background:new Map,resource:new Map,defaultStyle:new Map,baseStyle:new Map,computedStyle:new WeakMap,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}};function gc(n="soft"){switch(n){case"auto":{W.session.styleMap=new Map,W.session.nodeMap=new Map;return}case"soft":{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap,W.computedStyle=new WeakMap,W.baseStyle=new Map,W.defaultStyle=new Map,W.image=new Map,W.background=new Map,W.resource=new Map,W.font=new Set;return}default:{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap;return}}}function uo(n){const e=n.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;const t=e[2].trim();return t.startsWith("#")?null:t}function Hv(n){if(!n||n==="none")return"";let e=n.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(t,i)=>{const s=i.split(",").map(o=>o.trim());return s.length!==6?`matrix(${i})`:(s[4]="0",s[5]="0",`matrix(${s.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(t,i)=>{const s=i.split(",").map(o=>o.trim());return s.length!==16?`matrix3d(${i})`:(s[12]="0",s[13]="0",`matrix3d(${s.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function Qi(n){if(/%[0-9A-Fa-f]{2}/.test(n))return n;try{return encodeURI(n)}catch{return n}}function Gv(n="[snapDOM]",{ttlMs:e=5*6e4,maxEntries:t=12}={}){const i=new Map;let s=0;function o(r,l,a){if(s>=t)return;const c=Date.now();(i.get(l)||0)>c||(i.set(l,c+e),s++,r==="warn"&&console&&console.warn?console.warn(`${n} ${a}`):console&&console.error&&console.error(`${n} ${a}`))}return{warnOnce(r,l){o("warn",r,l)},errorOnce(r,l){o("error",r,l)},reset(){i.clear(),s=0}}}var mc=Gv("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),ho=new Map,Hi=new Map;function Yv(n){return/^data:|^blob:|^about:blank$/i.test(n)}function Vv(n,e){try{const t=typeof location<"u"&&location.href?location.href:"http://localhost/",i=e.includes("{url}")?e.split("{url}")[0]:e,s=new URL(i||".",t),o=new URL(n,t);if(o.origin===s.origin)return!0;const r=o.searchParams;if(r&&(r.has("url")||r.has("target")))return!0}catch{}return!1}function Wv(n,e){if(!e||Yv(n)||Vv(n,e))return!1;try{const t=typeof location<"u"&&location.href?location.href:"http://localhost/",i=new URL(n,t);return typeof location<"u"?i.origin!==location.origin:!0}catch{return!!e}}function zv(n,e){if(!e)return n;if(e.includes("{url}"))return e.replace("{urlRaw}",Qi(n)).replace("{url}",encodeURIComponent(n));if(/[?&]url=?$/.test(e))return`${e}${encodeURIComponent(n)}`;if(e.endsWith("?"))return`${e}url=${encodeURIComponent(n)}`;if(e.endsWith("/"))return`${e}${Qi(n)}`;const t=e.includes("?")?"&":"?";return`${e}${t}url=${encodeURIComponent(n)}`}function Ac(n){return new Promise((e,t)=>{const i=new FileReader;i.onload=()=>e(String(i.result||"")),i.onerror=()=>t(new Error("read_failed")),i.readAsDataURL(n)})}function jv(n,e){return[e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,n].join("|")}async function je(n,e={}){const t=e.as??"blob",i=e.timeout??3e3,s=e.useProxy||"",o=e.errorTTL??8e3,r=e.headers||{},l=!!e.silent;if(/^data:/i.test(n))try{if(t==="text")return{ok:!0,data:String(n),status:200,url:n,fromCache:!1};if(t==="dataURL")return{ok:!0,data:String(n),status:200,url:n,fromCache:!1,mime:String(n).slice(5).split(";")[0]||""};const[,A="",C=""]=String(n).match(/^data:([^,]*),(.*)$/)||[],x=/;base64/i.test(A)?atob(C):decodeURIComponent(C),M=new Uint8Array([...x].map(B=>B.charCodeAt(0))),T=new Blob([M],{type:(A||"").split(";")[0]||""});return{ok:!0,data:T,status:200,url:n,fromCache:!1,mime:T.type||""}}catch{return{ok:!1,data:null,status:0,url:n,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(n))try{const A=await fetch(n);if(!A.ok)return{ok:!1,data:null,status:A.status,url:n,fromCache:!1,reason:"http_error"};const C=await A.blob(),E=C.type||A.headers.get("content-type")||"";return t==="dataURL"?{ok:!0,data:await Ac(C),status:A.status,url:n,fromCache:!1,mime:E}:t==="text"?{ok:!0,data:await C.text(),status:A.status,url:n,fromCache:!1,mime:E}:{ok:!0,data:C,status:A.status,url:n,fromCache:!1,mime:E}}catch{return{ok:!1,data:null,status:0,url:n,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(n))return t==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:n,fromCache:!1,mime:"image/png"}:{ok:!0,data:t==="text"?"":new Blob([]),status:200,url:n,fromCache:!1};const a=jv(n,{as:t,timeout:i,useProxy:s,errorTTL:o}),c=Hi.get(a);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&Hi.delete(a);const u=ho.get(a);if(u)return u;const h=Wv(n,s)?zv(n,s):n;let f=e.credentials;if(!f)try{const A=typeof location<"u"&&location.href?location.href:"http://localhost/",C=new URL(n,A);f=typeof location<"u"&&C.origin===location.origin?"include":"omit"}catch{f="omit"}const p=new AbortController,m=setTimeout(()=>p.abort("timeout"),i),y=(async()=>{try{const A=await fetch(h,{signal:p.signal,credentials:f,headers:r});if(!A.ok){const x={ok:!1,data:null,status:A.status,url:h,fromCache:!1,reason:"http_error"};if(o>0&&Hi.set(a,{until:Date.now()+o,result:x}),!l){const M=`${A.status} ${A.statusText||""}`.trim();mc.warnOnce(`http:${A.status}:${t}:${new URL(n,location?.href??"http://localhost/").origin}`,`HTTP error ${M} while fetching ${t} ${n}`)}return e.onError&&e.onError(x),x}if(t==="text")return{ok:!0,data:await A.text(),status:A.status,url:h,fromCache:!1};const C=await A.blob(),E=C.type||A.headers.get("content-type")||"";return t==="dataURL"?{ok:!0,data:await Ac(C),status:A.status,url:h,fromCache:!1,mime:E}:{ok:!0,data:C,status:A.status,url:h,fromCache:!1,mime:E}}catch(A){const C=A&&typeof A=="object"&&"name"in A&&A.name==="AbortError"?String(A.message||"").includes("timeout")?"timeout":"abort":"network",E={ok:!1,data:null,status:0,url:h,fromCache:!1,reason:C};if(!/^blob:/i.test(n)&&o>0&&Hi.set(a,{until:Date.now()+o,result:E}),!l){const x=`${C}:${t}:${new URL(n,location?.href??"http://localhost/").origin}`,M=C==="timeout"?`Timeout after ${i}ms. Consider increasing timeout or using a proxy for ${n}`:C==="abort"?`Request aborted while fetching ${t} ${n}`:`Network/CORS issue while fetching ${t} ${n}. A proxy may be required`;mc.errorOnce(x,M)}return e.onError&&e.onError(E),E}finally{clearTimeout(m),ho.delete(a)}})();return ho.set(a,y),y}function fo(n,e){if(!e||!n.width||!n.height)return n;const t=document.createElement("canvas");t.width=n.width,t.height=n.height;const i=t.getContext("2d");return i.fillStyle=e,i.fillRect(0,0,t.width,t.height),i.drawImage(n,0,0),t}async function po(n,e={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(n)||n.trim()==="none")return n;const i=uo(n);if(!i)return n;const s=Qi(i);if(W.background.has(s)){const o=W.background.get(s);return o?`url("${o}")`:"none"}try{const o=await je(s,{as:"dataURL",useProxy:e.useProxy});return o.ok?(W.background.set(s,o.data),`url("${o.data}")`):(W.background.set(s,null),"none")}catch{return W.background.set(s,null),"none"}}var yc=new Set(["meta","script","noscript","title","link","template"]),Gi=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),$v=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"];function Kv(){for(let n of $v){const e=String(n).toLowerCase();yc.has(e)||Gi.has(e)||Cc(e)}}function Cc(n){if(n=String(n).toLowerCase(),Gi.has(n)){const o={};return W.defaultStyle.set(n,o),o}if(W.defaultStyle.has(n))return W.defaultStyle.get(n);let e=document.getElementById("snapdom-sandbox");e||(e=document.createElement("div"),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));const t=document.createElement(n);t.style.all="initial",e.appendChild(t);const i=getComputedStyle(t),s={};for(let o of i){if(Ec(o))continue;const r=i.getPropertyValue(o);s[o]=r}return e.removeChild(t),W.defaultStyle.set(n,s),s}var Xv=/(?:^|-)(animation|transition)(?:-|$)/i,qv=/^(--|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,Jv=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope"]);function Ec(n){const e=String(n).toLowerCase();return!!(Jv.has(e)||qv.test(e)||Xv.test(e))}function go(n,e){if(e=String(e||"").toLowerCase(),Gi.has(e))return"";const t=[],i=Cc(e);for(let[s,o]of Object.entries(n)){if(Ec(s))continue;const r=i[s];o&&o!==r&&t.push(`${s}:${o}`)}return t.sort(),t.join(";")}function Zv(n){const e=new Set;return n.nodeType!==Node.ELEMENT_NODE&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(n.tagName&&e.add(n.tagName.toLowerCase()),typeof n.querySelectorAll=="function"&&n.querySelectorAll("*").forEach(t=>e.add(t.tagName.toLowerCase())),Array.from(e))}function ex(n){const e=new Map;for(let i of n){const s=W.defaultStyle.get(i);if(!s)continue;const o=Object.entries(s).map(([r,l])=>`${r}:${l};`).sort().join("");o&&(e.has(o)||e.set(o,[]),e.get(o).push(i))}let t="";for(let[i,s]of e.entries())t+=`${s.join(",")} { ${i} }
|
|
118
118
|
`;return t}function tx(n){const e=Array.from(new Set(n.values())).filter(Boolean).sort(),t=new Map;let i=1;for(const s of e)t.set(s,`c${i++}`);return t}function mo(n,e=null){if(!(n instanceof Element))return window.getComputedStyle(n,e);let t=W.computedStyle.get(n);if(t||(t=new Map,W.computedStyle.set(n,t)),!t.has(e)){const i=window.getComputedStyle(n,e);t.set(e,i)}return t.get(e)}function wc(n){const e={};for(let t of n)e[t]=n.getPropertyValue(t);return e}function Ao(n){const e=[];let t=0,i=0;for(let s=0;s<n.length;s++){const o=n[s];o==="("&&t++,o===")"&&t--,o===","&&t===0&&(e.push(n.slice(i,s).trim()),i=s+1)}return e.push(n.slice(i).trim()),e}function rn(n,{fast:e=!1}={}){if(e)return n();"requestIdleCallback"in window?requestIdleCallback(n,{timeout:50}):setTimeout(n,1)}function nt(){const n=typeof navigator<"u"&&navigator.userAgent?navigator.userAgent:"",e=/^((?!chrome|android).)*safari/i.test(n),t=/AppleWebKit/i.test(n)&&/Mobile/i.test(n)&&!/Safari/i.test(n),i=/(MicroMessenger|wxwork|WeCom|WindowsWechat|MacWechat)/i.test(n);return e||t||i}var bc=new WeakMap,yo=new Map,Co=0;function Yn(){Co++}var vc=!1;function nx(n=document.documentElement){if(!vc){vc=!0;try{new MutationObserver(()=>Yn()).observe(n,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{new MutationObserver(()=>Yn()).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{const e=document.fonts;e&&(e.addEventListener?.("loadingdone",Yn),e.ready?.then(()=>Yn()).catch(()=>{}))}catch{}}}function ix(n,e={}){const t={},i=n.getPropertyValue("visibility");for(let s=0;s<n.length;s++){const o=n[s];let r=n.getPropertyValue(o);(o==="background-image"||o==="content")&&r.includes("url(")&&!r.includes("data:")&&(r="none"),t[o]=r}if(e.embedFonts){const s=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(const o of s)if(!t[o])try{const r=n.getPropertyValue(o);r&&(t[o]=r)}catch{}}return i==="hidden"&&(t.opacity="0"),t}var xc=new WeakMap;function sx(n){let e=xc.get(n);return e||(e=Object.entries(n).sort((i,s)=>i[0]<s[0]?-1:i[0]>s[0]?1:0).map(([i,s])=>`${i}:${s}`).join(";"),xc.set(n,e),e)}function ox(n,e=null,t={}){const i=bc.get(n);if(i&&i.epoch===Co)return i.snapshot;const s=e||getComputedStyle(n),o=ix(s,t);return ux(n,s,o),bc.set(n,{epoch:Co,snapshot:o}),o}function rx(n,e){return n&&n.session&&n.persist?n:n&&(n.styleMap||n.styleCache||n.nodeMap)?{session:n,persist:{snapshotKeyCache:yo,defaultStyle:W.defaultStyle,baseStyle:W.baseStyle,image:W.image,resource:W.resource,background:W.background,font:W.font},options:e||{}}:{session:W.session,persist:{snapshotKeyCache:yo,defaultStyle:W.defaultStyle,baseStyle:W.baseStyle,image:W.image,resource:W.resource,background:W.background,font:W.font},options:n||e||{}}}async function an(n,e,t,i){if(n.tagName==="STYLE")return;const s=rx(t,i),o=s.options&&s.options.cache||"auto";if(o!=="disabled"&&nx(document.documentElement),o==="disabled"&&!s.session.__bumpedForDisabled&&(Yn(),yo.clear(),s.session.__bumpedForDisabled=!0),Gi.has(n.tagName?.toLowerCase())){const f=n.getAttribute?.("style");f&&e.setAttribute("style",f)}const{session:r,persist:l}=s;r.styleCache.has(n)||r.styleCache.set(n,getComputedStyle(n));const a=r.styleCache.get(n),c=ox(n,a,s.options),u=sx(c);let h=l.snapshotKeyCache.get(u);if(!h){const f=n.tagName?.toLowerCase()||"div";h=go(c,f),l.snapshotKeyCache.set(u,h)}r.styleMap.set(e,h)}function ax(n){return n instanceof HTMLImageElement||n instanceof HTMLCanvasElement||n instanceof HTMLVideoElement||n instanceof HTMLIFrameElement||n instanceof SVGElement||n instanceof HTMLObjectElement||n instanceof HTMLEmbedElement}function lx(n){return n.backgroundImage&&n.backgroundImage!=="none"||n.backgroundColor&&n.backgroundColor!=="rgba(0, 0, 0, 0)"&&n.backgroundColor!=="transparent"||(parseFloat(n.borderTopWidth)||0)>0||(parseFloat(n.borderBottomWidth)||0)>0||(parseFloat(n.paddingTop)||0)>0||(parseFloat(n.paddingBottom)||0)>0?!0:(n.overflowBlock||n.overflowY||"visible")!=="visible"}function cx(n){const e=n.parentElement;if(!e)return!1;const t=getComputedStyle(e).display||"";return t.includes("flex")||t.includes("grid")}function dx(n,e){if(n.textContent&&/\S/.test(n.textContent))return!0;const t=n.firstElementChild,i=n.lastElementChild;if(t&&t.tagName==="BR"||i&&i.tagName==="BR")return!0;const s=n.scrollHeight;if(s===0)return!1;const o=parseFloat(e.paddingTop)||0,r=parseFloat(e.paddingBottom)||0;return s>o+r}function ux(n,e,t){if(n instanceof HTMLElement&&n.style&&n.style.height)return;const i=e.display||"";if(i.includes("flex")||i.includes("grid")||ax(n))return;const s=e.position;s==="absolute"||s==="fixed"||s==="sticky"||e.transform==="none"&&(lx(e)||cx(n)||dx(n,e)&&(delete t.height,delete t["block-size"]))}function hx(n,e){if(!(n instanceof Element)||!(e instanceof Element))return;const t=n.getAttribute?.("style");let i=!!(t&&t.includes("var("));if(!i&&n.attributes?.length){const r=n.attributes;for(let l=0;l<r.length;l++){const a=r[l];if(a&&typeof a.value=="string"&&a.value.includes("var(")){i=!0;break}}}if(!i)return;let s;try{s=getComputedStyle(n)}catch{return}const o=n.style;if(o&&o.length)for(let r=0;r<o.length;r++){const l=o[r],a=o.getPropertyValue(l);if(!a||!a.includes("var("))continue;const c=s.getPropertyValue(l);if(c)try{e.style.setProperty(l,c.trim(),o.getPropertyPriority(l))}catch{}}if(n.attributes?.length){const r=n.attributes;for(let l=0;l<r.length;l++){const a=r[l];if(!a||typeof a.value!="string"||!a.value.includes("var("))continue;const c=a.name;let u="";try{u=s.getPropertyValue(c)}catch{}if(u)try{e.style.setProperty(c,u.trim())}catch{}}}}function Eo(n,e,t){return Promise.all(n.map(i=>new Promise(s=>{function o(){rn(r=>{(r&&typeof r.timeRemaining=="function"?r.timeRemaining()>0:!0)?e(i,s):o()},{fast:t})}o()})))}function fx(n){return n=n.trim(),!n||/:not\(\s*\[data-sd-slotted\]\s*\)\s*$/.test(n)?n:`${n}:not([data-sd-slotted])`}function px(n,e,t=!0){return n.split(",").map(i=>i.trim()).filter(Boolean).map(i=>{if(i.startsWith(":where(")||i.startsWith("@"))return i;const s=t?fx(i):i;return`:where(${e} ${s})`}).join(", ")}function gx(n,e){return n?(n=n.replace(/:host\(([^)]+)\)/g,(t,i)=>`:where(${e}:is(${i.trim()}))`),n=n.replace(/:host\b/g,`:where(${e})`),n=n.replace(/:host-context\(([^)]+)\)/g,(t,i)=>`:where(:where(${i.trim()}) ${e})`),n=n.replace(/::slotted\(([^)]+)\)/g,(t,i)=>`:where(${e} ${i.trim()})`),n=n.replace(/(^|})(\s*)([^@}{]+){/g,(t,i,s,o)=>{const r=px(o,e,!0);return`${i}${s}${r}{`}),n):""}function mx(n){return n.shadowScopeSeq=(n.shadowScopeSeq||0)+1,`s${n.shadowScopeSeq}`}function Ax(n){let e="";try{n.querySelectorAll("style").forEach(i=>{e+=(i.textContent||"")+`
|
|
119
119
|
`});const t=n.adoptedStyleSheets||[];for(const i of t)try{if(i&&i.cssRules)for(const s of i.cssRules)e+=s.cssText+`
|
|
120
120
|
`}catch{}}catch{}return e}function yx(n,e,t){if(!e)return;const i=document.createElement("style");i.setAttribute("data-sd",t),i.textContent=e,n.insertBefore(i,n.firstChild||null)}function Cx(n,e){try{const t=n.currentSrc||n.src||"";if(!t)return;e.setAttribute("src",t),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch{}}function Ex(n){const e=new Set;if(!n)return e;const t=/var\(\s*(--[A-Za-z0-9_-]+)\b/g;let i;for(;i=t.exec(n);)e.add(i[1]);return e}function wx(n,e){try{let i=getComputedStyle(n).getPropertyValue(e).trim();if(i)return i}catch{}try{let i=getComputedStyle(document.documentElement).getPropertyValue(e).trim();if(i)return i}catch{}return""}function bx(n,e,t){const i=[];for(const s of e){const o=wx(n,s);o&&i.push(`${s}: ${o};`)}return i.length?`${t}{${i.join("")}}
|