earthsdk3-ue 3.4.0-beta.4 → 3.4.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var EarthSDK3_UE=function(v,p,w){"use strict";var jw=Object.defineProperty;var Ap=(v,p,w)=>p in v?jw(v,p,{enumerable:!0,configurable:!0,writable:!0,value:w}):v[p]=w;var C=(v,p,w)=>Ap(v,typeof p!="symbol"?p+"":p,w);const od={...p.ESViewer.defaults,geoReferenceOrigin:void 0,keepWorldOriginNearCamera:!1,useCache:!0,widgetInteractionDistance:200,memReportInterval:10,sceneControlled:!0,brightness:0,emissiveIntensity:1,statusUpdateInterval:.5,baseUrl:window.location.href??""},Yi=()=>({...p.ESViewer.createCommonProps(),apiKey:"",apiUrl:"",secretKey:"",speechVoiceMode:"",geoReferenceOrigin:w.reactArrayWithUndefined(void 0),keepWorldOriginNearCamera:void 0,useCache:void 0,widgetInteractionDistance:void 0,memReportInterval:void 0,sceneControlled:void 0,brightness:void 0,emissiveIntensity:void 0,statusUpdateInterval:void 0,baseUrl:void 0});function mr(){const r=Yi(),A=[];return Object.keys(r).forEach(e=>{A.push(e)}),A}function Qn(r){const{defaults:A}=bA,e=mr(),t={};return e.forEach(n=>{t[n]=r[n]??A[n]}),t}const Be=async(r,A,e,t,n,s="default")=>{const i=await r.callUeFunc({f:"flyTo",p:{id:A,duration:e,flyToParam:t,position:n,flyMode:s}});if(i.error){console.error(i.error);return}return i.re},Un=async(r,A)=>{const e=await r.callUeFunc({f:"destroy",p:{id:A}});return e.error&&console.error(e.error),e},$A=(r,A)=>{r.callUeFunc({f:"calcFlyToParam",p:{id:A}}).then(e=>{e.error&&console.error("calcFlyToParam:",e.error)}).catch(e=>{console.error("calcFlyToParam:",e)})},$i=(r,A)=>{r.callUeFunc({f:"refreshTileset",p:{id:A}}).then(e=>{e.error&&console.error("refreshTileset:",e.error)}).catch(e=>{console.error("refreshTileset:",e)})},xe=async(r,A,e,t,n,s="default")=>{const i=await r.callUeFunc({f:"flyIn",p:{id:A,position:e,rotation:t,duration:n,flyMode:s}});if(i.error){console.error(i.error);return}return i.re},Zi=async(r,A)=>{if(!r){console.warn("DefaultCameraFlyIn: viewer is undefined");return}const e=await r.callUeFunc({f:"DefaultCameraFlyIn",p:{Duration:A??1}});if(e.error){console.error("DefaultCameraFlyIn:",e.error);return}return e},qi=async r=>{if(!r){console.warn("StartVoice:viewer is undefined");return}const A=await r.callUeFunc({f:"StartVoice",p:{}});if(A.error){console.error("StartVoice:",A.error);return}return A},ji=async r=>{if(!r){console.warn("StopVoice:viewer is undefined");return}const A=await r.callUeFunc({f:"StopVoice",p:{}});if(A.error){console.error("StopVoice:",A.error);return}return A},Ao=async(r,A)=>{if(!r){console.warn("mountPakFiles:viewer is undefined");return}const e=await r.callUeFunc({f:"MountPakFiles",p:{json:A}});if(e.error){console.error("mountPakFiles:",e.error);return}return e},eo=async r=>{if(!r){console.warn("generateMemReport:viewer is undefined");return}const A=await r.callUeFunc({f:"GenerateMemReport",p:{}});if(A.error){console.error("generateMemReport:",A.error);return}return A},En=async(r,A)=>{const e=await r.callUeFunc({f:"resetWithCurrentCamera",p:{id:A}});return e.error&&console.error("resetWithCurrentCamera:",e.error),e},ke=(r,A,e,t,n)=>{r.callUeFunc({f:"smoothMoveWithRotation",p:{id:A,Destination:e,NewRotation:t,Time:n}}).then(s=>{s.error&&console.error("smoothMoveWithRotation:",s.error)}).catch(s=>{console.error("smoothMoveWithRotation:",s)})},Ge=(r,A,e,t,n,s)=>{r.callUeFunc({f:"smoothMoveOnGround",p:{id:A,Lon:e,Lat:t,Ground:n,Time:s}}).then(i=>{i.error&&console.error("smoothMoveOnGround:",i.error)}).catch(i=>{console.error("smoothMoveOnGround:",i)})},Ne=(r,A,e,t,n,s,i)=>{r.callUeFunc({f:"smoothMoveWithRotationOnGround",p:{id:A,NewRotation:e,Lon:t,Lat:n,Time:s,Ground:i}}).then(o=>{o.error&&console.error("smoothMoveWithRotationOnGround:",o.error)}).catch(o=>{console.error("smoothMoveWithRotationOnGround:",o)})},to=(r,A,e)=>{r.callUeFunc({f:"HighlightFeature",p:{id:A,HlId:e}}).then(t=>{t.error&&console.error("HighlightFeature:",t.error)}).catch(t=>{console.error("HighlightFeature:",t)})},ro=(r,A,e,t)=>{r.callUeFunc({f:"HighlightFeatureAndFlyTo",p:{id:A,HlId:e,Duration:t}}).then(n=>{n.error&&console.error("HighlightFeatureAndFlyTo:",n.error)}).catch(n=>{console.error("HighlightFeatureAndFlyTo:",n)})},no=(r,A,e)=>{r.callUeFunc({f:"SetLayerVisible",p:{id:A,LayerJson:e}}).then(t=>{t.error&&console.error("SetLayerVisible:",t.error)}).catch(t=>{console.error("SetLayerVisible:",t)})},so=(r,A,e)=>{r.callUeFunc({f:"SetLayerColor",p:{id:A,LayerJson:e}}).then(t=>{t.error&&console.error("SetLayerColor:",t.error)}).catch(t=>{console.error("SetLayerColor:",t)})},_e=(r,A,e,t)=>{r.callUeFunc({f:"smoothMove",p:{id:A,Destination:e,Time:t}}).then(n=>{n.error&&console.error("smoothMove:",n.error)}).catch(n=>{console.error("smoothMove:",n)})},yn=async(r,A,e,t)=>{const n=await r.callUeFunc({f:"callFunction",p:{id:A,fn:e,p:t}});return n.error&&(console.error("callFunction:",n.error),console.error(`id: ${A} fn: ${e} param: ${t}`)),n.re??void 0},io=(r,A,e,t)=>{r.callUeFunc({f:"SetNodePosition",p:{id:A,NodeName:e,NodePosition:t}}).then(n=>{n.error&&console.error("SetNodePosition:",n.error)}).catch(n=>{console.error("SetNodePosition:",n)})},oo=(r,A,e,t)=>{r.callUeFunc({f:"SetNodeRotation",p:{id:A,NodeName:e,NodeRotation:t}}).then(n=>{n.error&&console.error("SetNodeRotation:",n.error)}).catch(n=>{console.error("SetNodeRotation:",n)})},ao=(r,A,e,t)=>{r.callUeFunc({f:"SetNodeScale",p:{id:A,NodeName:e,NodeScale:t}}).then(n=>{n.error&&console.error("SetNodeScale:",n.error)}).catch(n=>{console.error("SetNodeScale:",n)})},HA=async(r,A)=>{if(A.mode=="Follow"){const t=p.ESSceneObject.getSceneObject(A.objectId);A.objectId=t?t.mainClass.id:A.objectId}else if(A.mode=="Line"){const t=p.ESSceneObject.getSceneObject(A.geoLineStringId);A.geoLineStringId=t?t.mainClass.id:A.geoLineStringId}const e=await r.callUeFunc({f:"ChangeNavigationMode",p:A});if(e.error){console.error("ChangeNavigationMode:",e.error);return}return e},lo=async(r,A)=>{const e=await r.callUeFunc({f:"setGlobalProperty",p:A});if(e.error){console.error("setGlobalProperty:",e.error);return}return e},co=async r=>{const A=await r.callUeFunc({f:"Quit",p:void 0});if(A.error){console.error("Quit:",A.error);return}return A},uo=async(r,A,e,t)=>{console.log("pickCallFunc",A,e,t);const n=await r.callUeFunc({f:"pick",p:{screenPosition:A,parentInfo:t}});if(!n.re&&(n.error||n.error=="")){console.error("pick:",n.error==""?"未获取到结果":n.error);return}let s=n.re.id,i,o=s?p.ESSceneObject.getSceneObject(s):void 0;return o&&o.parentID&&(o=p.ESSceneObject.getSceneObject(o.parentID)),i=new p.ESJPickedResult(n.re,o,n.re.features,n.re.add,e,A),o&&Reflect.has(o,"allowPicking")&&Reflect.has(o,"pickedEvent")&&(o.allowPicking??!1)&&o.pickedEvent.emit(i),o&&Reflect.has(o,"allowPicking")&&!o.allowPicking?new p.ESJPickedResult:i},ho=async(r,A)=>{const e=await r.callUeFunc({f:"pickPosition",p:{screenPosition:A}});if(!e.re&&(e.error||e.error=="")){console.error("pickPosition",e.error==""?"未获取到结果":e.error);return}const{position:t}=e.re;return t},go=async(r,A,e,t="ECC_Visibility")=>{const n=await r.callUeFunc({f:"GetHeightByLonLat",p:{Lon:A,Lat:e,Channel:t}});if(n.error){console.warn(`GetHeightByLonLat:${n.error}`);return}return n.re},Bo=async(r,A,e="ECC_Visibility")=>{const t=await r.callUeFunc({f:"GetHeightsByLonLats",p:{LonLats:A,Channel:e}});if(t.error){console.warn(`GetHeightsByLonLats:${t.error}`);return}t.re.heights.includes(null)&&console.warn("注意! GetHeightsByLonLats: 存在高度为null的点. there are points with a height of null");try{return t.re.heights}catch{return}},fo=async(r,A=64,e=64)=>{const t=await r.callUeFunc({f:"capture",p:{resx:A,resy:e}});if(t.error){console.warn(t.error);return}return t.re.image},wo=async(r,A,e=[64,64])=>{const t=await r.callUeFunc({f:"partialCapture",p:{startPos:A,size:e}});if(t.error){console.warn(t.error);return}return t.re.image},po=async(r,A)=>{const e=await r.callUeFunc({f:"LonLatAltToScreenPosition",p:{LonLatAlt:A}});return e.error&&console.warn(e.error),e.re},Co=async(r,A)=>{const e=await r.callUeFunc({f:"UEPositionToLonLatAlt",p:{UEPosition:A}});if(e.error){console.warn(e.error);return}return[...e.re.LonLatAlt]},vo=async(r,A)=>{const e=await r.callUeFunc({f:"GetAllSocketNamesByActorTag",p:{ActorTag:A}});if(e.error){console.warn(e.error);return}return[...e.re.socketNames]},mo=async r=>{const A=await r.callUeFunc({f:"GetVersion",p:void 0});if(A.error){console.warn("GetVersion:",A.error);return}return A.re.version},Fo=async(r,A)=>{const e=await r.callUeFunc({f:"GetBoundSphere",p:{id:A}});if(e.error){console.warn(e.error);return}return e.re},Qo=async(r,A)=>{const e=await r.callUeFunc({f:"GetBoundSphereWithChildren",p:{id:A}});if(e.error){console.warn(`GetBoundSphereWithChildren:${e.error}`);return}return e.re},Uo=async(r,A)=>{const e=await r.callUeFunc({f:"GetStrokeMaterialParamInfo",p:{id:A}});if(e.error){console.warn(`GetStrokeMaterialParamInfo:${e.error}`);return}return e.re},Eo=async(r,A)=>{const e=await r.callUeFunc({f:"GetFillMaterialParamInfo",p:{id:A}});if(e.error){console.warn(`GetFillMaterialParamInfo:${e.error}`);return}return e.re},yo=async(r,A)=>{const e=await r.callUeFunc({f:"getGlobalProperty",p:{props:A}});if(e.error){console.warn(`getGlobalProperty:${e.error}`);return}return e.re},So=async(r,A)=>{const e=await r.callUeFunc({f:"GetObjectByInfo",p:{info:A}});if(e.error){console.warn(`GetObjectByInfo:${e.error}`);return}return e.re},Io=async(r,A,e)=>await r.callUeFunc({f:"BindActorByTag",p:{ID:A,ActorTag:e}}),To=async r=>await r.callUeFunc({f:"RestoreOriginalScene",p:void 0}),Ho=async(r,A)=>await r.callUeFunc({f:"UnBindActorByID",p:{ID:A}}),Lo=async(r,A)=>await r.callUeFunc({f:"UnBindActorByTag",p:{ActorTag:A}}),bo=async(r,A,e)=>await r.callUeFunc({f:"CreateActorByClass",p:{ID:A,ActorClass:e}}),Mo=async function(r,A,e){return await r.callUeFunc({f:"Bind3DTilesetByTag",p:{ID:A,ActorTag:e}})},Do=async function(r,A){return await r.callUeFunc({f:"UnBind3DTilesetByTag",p:{ActorTag:A}})},Ro=async function(r,A){return await r.callUeFunc({f:"UnBind3DTilesetById",p:{ID:A}})},Po=async function(r,A,e,t){return await r.callUeFunc({f:"BindImageryByTag",p:{ID:A,ActorTag:e,ComponentTag:t}})},Ko=async function(r,A,e){return await r.callUeFunc({f:"UnBindImageryByTag",p:{ActorTag:A,ComponentTag:e}})},xo=async function(r,A){return await r.callUeFunc({f:"UnBindImageryById",p:{ID:A}})},ko=async function(r,A,e,t){return await r.callUeFunc({f:"GetIdByComponentNameAndHitItem",p:{id:A,ComponentName:e,HitItem:t}})},Go=async function(r,A="ECC_Visibility"){return await r.callUeFunc({f:"GetCameraRelativeHeight",p:{Channel:A}})},No=async function(r,A,e,t){const n=await r.callUeFunc({f:"SaveStringToFile",p:{String:A,Path:e??"undefine",File:t??"data.txt"}});return n.error!==""&&console.warn("SaveStringToFile: ",n.error),n},_o=async function(r,A,e=!0){const t=await r.callUeFunc({f:"HighlightActorByTag",p:{ActorTag:A,Highlight:e}});return t.error!==""&&console.warn("HighlightActorByTag: ",t.error),t},Vo=async function(r,A){const e=await r.callUeFunc({f:"SendCustomMessage",p:{Message:A}});return e.error!==""&&console.warn("SendCustomMessage: ",e.error),e},Oo=async function(r){const A=await r.callUeFunc({f:"GetStatus",p:void 0});if(A.error){console.warn(`GetStatus:${A.error}`);return}return A.re},Wo=async(r,A,e,t,n=!0)=>{const s=await r.callUeFunc({f:"startEditing",p:{sceneObjectID:A,editingID:e,modes:t,useKeyToSwitch:n}});if(s.error){console.error("startEditing:",s.error);return}return s},Xo=async r=>{const A=await r.callUeFunc({f:"stopEditing",p:void 0});if(A.error){console.error("stopEditing:",A.error);return}return A},Jo=async(r,A,e)=>{const t=await r.callUeFunc({f:"moveObjects",p:{sceneObjectIDs:A,editingID:e}});if(t.error){console.error("moveObjects:",t.error);return}return t},zo=async r=>{const A=await r.callUeFunc({f:"GetTilesetMaterialIDList",p:void 0});if(A.error){console.error("GetTilesetMaterialIDList:",A.error);return}return A.re.materialIDList};class Ve extends w.Destroyable{}var Sn={exports:{}},Yo;function ad(){return Yo||(Yo=1,function(r){const A={};A.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},A.localCName=A.generateIdentifier(),A.splitLines=function(e){return e.trim().split(`
1
+ var EarthSDK3_UE=function(v,p,w){"use strict";var jw=Object.defineProperty;var Ap=(v,p,w)=>p in v?jw(v,p,{enumerable:!0,configurable:!0,writable:!0,value:w}):v[p]=w;var C=(v,p,w)=>Ap(v,typeof p!="symbol"?p+"":p,w);const od={...p.ESViewer.defaults,geoReferenceOrigin:void 0,keepWorldOriginNearCamera:!1,useCache:!0,widgetInteractionDistance:200,memReportInterval:10,sceneControlled:!0,brightness:0,emissiveIntensity:1,statusUpdateInterval:.5,baseUrl:window.location.href??"",screenPercentage:-1,antiAliasingMethod:"default"},Yi=()=>({...p.ESViewer.createCommonProps(),apiKey:"",apiUrl:"",secretKey:"",speechVoiceMode:"",geoReferenceOrigin:w.reactArrayWithUndefined(void 0),keepWorldOriginNearCamera:void 0,useCache:void 0,widgetInteractionDistance:void 0,memReportInterval:void 0,sceneControlled:void 0,brightness:void 0,emissiveIntensity:void 0,statusUpdateInterval:void 0,baseUrl:void 0,screenPercentage:void 0,antiAliasingMethod:void 0});function mr(){const r=Yi(),A=[];return Object.keys(r).forEach(e=>{A.push(e)}),A}function Qn(r){const{defaults:A}=bA,e=mr(),t={};return e.forEach(n=>{t[n]=r[n]??A[n]}),t}const Be=async(r,A,e,t,n,s="default")=>{const i=await r.callUeFunc({f:"flyTo",p:{id:A,duration:e,flyToParam:t,position:n,flyMode:s}});if(i.error){console.error(i.error);return}return i.re},Un=async(r,A)=>{const e=await r.callUeFunc({f:"destroy",p:{id:A}});return e.error&&console.error(e.error),e},$A=(r,A)=>{r.callUeFunc({f:"calcFlyToParam",p:{id:A}}).then(e=>{e.error&&console.error("calcFlyToParam:",e.error)}).catch(e=>{console.error("calcFlyToParam:",e)})},$i=(r,A)=>{r.callUeFunc({f:"refreshTileset",p:{id:A}}).then(e=>{e.error&&console.error("refreshTileset:",e.error)}).catch(e=>{console.error("refreshTileset:",e)})},xe=async(r,A,e,t,n,s="default")=>{const i=await r.callUeFunc({f:"flyIn",p:{id:A,position:e,rotation:t,duration:n,flyMode:s}});if(i.error){console.error(i.error);return}return i.re},Zi=async(r,A)=>{if(!r){console.warn("DefaultCameraFlyIn: viewer is undefined");return}const e=await r.callUeFunc({f:"DefaultCameraFlyIn",p:{Duration:A??1}});if(e.error){console.error("DefaultCameraFlyIn:",e.error);return}return e},qi=async r=>{if(!r){console.warn("StartVoice:viewer is undefined");return}const A=await r.callUeFunc({f:"StartVoice",p:{}});if(A.error){console.error("StartVoice:",A.error);return}return A},ji=async r=>{if(!r){console.warn("StopVoice:viewer is undefined");return}const A=await r.callUeFunc({f:"StopVoice",p:{}});if(A.error){console.error("StopVoice:",A.error);return}return A},Ao=async(r,A)=>{if(!r){console.warn("mountPakFiles:viewer is undefined");return}const e=await r.callUeFunc({f:"MountPakFiles",p:{json:A}});if(e.error){console.error("mountPakFiles:",e.error);return}return e},eo=async r=>{if(!r){console.warn("generateMemReport:viewer is undefined");return}const A=await r.callUeFunc({f:"GenerateMemReport",p:{}});if(A.error){console.error("generateMemReport:",A.error);return}return A},En=async(r,A)=>{const e=await r.callUeFunc({f:"resetWithCurrentCamera",p:{id:A}});return e.error&&console.error("resetWithCurrentCamera:",e.error),e},ke=(r,A,e,t,n)=>{r.callUeFunc({f:"smoothMoveWithRotation",p:{id:A,Destination:e,NewRotation:t,Time:n}}).then(s=>{s.error&&console.error("smoothMoveWithRotation:",s.error)}).catch(s=>{console.error("smoothMoveWithRotation:",s)})},Ge=(r,A,e,t,n,s)=>{r.callUeFunc({f:"smoothMoveOnGround",p:{id:A,Lon:e,Lat:t,Ground:n,Time:s}}).then(i=>{i.error&&console.error("smoothMoveOnGround:",i.error)}).catch(i=>{console.error("smoothMoveOnGround:",i)})},Ne=(r,A,e,t,n,s,i)=>{r.callUeFunc({f:"smoothMoveWithRotationOnGround",p:{id:A,NewRotation:e,Lon:t,Lat:n,Time:s,Ground:i}}).then(o=>{o.error&&console.error("smoothMoveWithRotationOnGround:",o.error)}).catch(o=>{console.error("smoothMoveWithRotationOnGround:",o)})},to=(r,A,e)=>{r.callUeFunc({f:"HighlightFeature",p:{id:A,HlId:e}}).then(t=>{t.error&&console.error("HighlightFeature:",t.error)}).catch(t=>{console.error("HighlightFeature:",t)})},ro=(r,A,e,t)=>{r.callUeFunc({f:"HighlightFeatureAndFlyTo",p:{id:A,HlId:e,Duration:t}}).then(n=>{n.error&&console.error("HighlightFeatureAndFlyTo:",n.error)}).catch(n=>{console.error("HighlightFeatureAndFlyTo:",n)})},no=(r,A,e)=>{r.callUeFunc({f:"SetLayerVisible",p:{id:A,LayerJson:e}}).then(t=>{t.error&&console.error("SetLayerVisible:",t.error)}).catch(t=>{console.error("SetLayerVisible:",t)})},so=(r,A,e)=>{r.callUeFunc({f:"SetLayerColor",p:{id:A,LayerJson:e}}).then(t=>{t.error&&console.error("SetLayerColor:",t.error)}).catch(t=>{console.error("SetLayerColor:",t)})},_e=(r,A,e,t)=>{r.callUeFunc({f:"smoothMove",p:{id:A,Destination:e,Time:t}}).then(n=>{n.error&&console.error("smoothMove:",n.error)}).catch(n=>{console.error("smoothMove:",n)})},yn=async(r,A,e,t)=>{const n=await r.callUeFunc({f:"callFunction",p:{id:A,fn:e,p:t}});return n.error&&(console.error("callFunction:",n.error),console.error(`id: ${A} fn: ${e} param: ${t}`)),n.re??void 0},io=(r,A,e,t)=>{r.callUeFunc({f:"SetNodePosition",p:{id:A,NodeName:e,NodePosition:t}}).then(n=>{n.error&&console.error("SetNodePosition:",n.error)}).catch(n=>{console.error("SetNodePosition:",n)})},oo=(r,A,e,t)=>{r.callUeFunc({f:"SetNodeRotation",p:{id:A,NodeName:e,NodeRotation:t}}).then(n=>{n.error&&console.error("SetNodeRotation:",n.error)}).catch(n=>{console.error("SetNodeRotation:",n)})},ao=(r,A,e,t)=>{r.callUeFunc({f:"SetNodeScale",p:{id:A,NodeName:e,NodeScale:t}}).then(n=>{n.error&&console.error("SetNodeScale:",n.error)}).catch(n=>{console.error("SetNodeScale:",n)})},HA=async(r,A)=>{if(A.mode=="Follow"){const t=p.ESSceneObject.getSceneObject(A.objectId);A.objectId=t?t.mainClass.id:A.objectId}else if(A.mode=="Line"){const t=p.ESSceneObject.getSceneObject(A.geoLineStringId);A.geoLineStringId=t?t.mainClass.id:A.geoLineStringId}const e=await r.callUeFunc({f:"ChangeNavigationMode",p:A});if(e.error){console.error("ChangeNavigationMode:",e.error);return}return e},lo=async(r,A)=>{const e=await r.callUeFunc({f:"setGlobalProperty",p:A});if(e.error){console.error("setGlobalProperty:",e.error);return}return e},co=async r=>{const A=await r.callUeFunc({f:"Quit",p:void 0});if(A.error){console.error("Quit:",A.error);return}return A},uo=async(r,A,e,t)=>{console.log("pickCallFunc",A,e,t);const n=await r.callUeFunc({f:"pick",p:{screenPosition:A,parentInfo:t}});if(!n.re&&(n.error||n.error=="")){console.error("pick:",n.error==""?"未获取到结果":n.error);return}let s=n.re.id,i,o=s?p.ESSceneObject.getSceneObject(s):void 0;return o&&o.parentID&&(o=p.ESSceneObject.getSceneObject(o.parentID)),i=new p.ESJPickedResult(n.re,o,n.re.features,n.re.add,e,A),o&&Reflect.has(o,"allowPicking")&&Reflect.has(o,"pickedEvent")&&(o.allowPicking??!1)&&o.pickedEvent.emit(i),o&&Reflect.has(o,"allowPicking")&&!o.allowPicking?new p.ESJPickedResult:i},ho=async(r,A)=>{const e=await r.callUeFunc({f:"pickPosition",p:{screenPosition:A}});if(!e.re&&(e.error||e.error=="")){console.error("pickPosition",e.error==""?"未获取到结果":e.error);return}const{position:t}=e.re;return t},go=async(r,A,e,t="ECC_Visibility")=>{const n=await r.callUeFunc({f:"GetHeightByLonLat",p:{Lon:A,Lat:e,Channel:t}});if(n.error){console.warn(`GetHeightByLonLat:${n.error}`);return}return n.re},Bo=async(r,A,e="ECC_Visibility")=>{const t=await r.callUeFunc({f:"GetHeightsByLonLats",p:{LonLats:A,Channel:e}});if(t.error){console.warn(`GetHeightsByLonLats:${t.error}`);return}t.re.heights.includes(null)&&console.warn("注意! GetHeightsByLonLats: 存在高度为null的点. there are points with a height of null");try{return t.re.heights}catch{return}},fo=async(r,A=64,e=64)=>{const t=await r.callUeFunc({f:"capture",p:{resx:A,resy:e}});if(t.error){console.warn(t.error);return}return t.re.image},wo=async(r,A,e=[64,64])=>{const t=await r.callUeFunc({f:"partialCapture",p:{startPos:A,size:e}});if(t.error){console.warn(t.error);return}return t.re.image},po=async(r,A)=>{const e=await r.callUeFunc({f:"LonLatAltToScreenPosition",p:{LonLatAlt:A}});return e.error&&console.warn(e.error),e.re},Co=async(r,A)=>{const e=await r.callUeFunc({f:"UEPositionToLonLatAlt",p:{UEPosition:A}});if(e.error){console.warn(e.error);return}return[...e.re.LonLatAlt]},vo=async(r,A)=>{const e=await r.callUeFunc({f:"GetAllSocketNamesByActorTag",p:{ActorTag:A}});if(e.error){console.warn(e.error);return}return[...e.re.socketNames]},mo=async r=>{const A=await r.callUeFunc({f:"GetVersion",p:void 0});if(A.error){console.warn("GetVersion:",A.error);return}return A.re.version},Fo=async(r,A)=>{const e=await r.callUeFunc({f:"GetBoundSphere",p:{id:A}});if(e.error){console.warn(e.error);return}return e.re},Qo=async(r,A)=>{const e=await r.callUeFunc({f:"GetBoundSphereWithChildren",p:{id:A}});if(e.error){console.warn(`GetBoundSphereWithChildren:${e.error}`);return}return e.re},Uo=async(r,A)=>{const e=await r.callUeFunc({f:"GetStrokeMaterialParamInfo",p:{id:A}});if(e.error){console.warn(`GetStrokeMaterialParamInfo:${e.error}`);return}return e.re},Eo=async(r,A)=>{const e=await r.callUeFunc({f:"GetFillMaterialParamInfo",p:{id:A}});if(e.error){console.warn(`GetFillMaterialParamInfo:${e.error}`);return}return e.re},yo=async(r,A)=>{const e=await r.callUeFunc({f:"getGlobalProperty",p:{props:A}});if(e.error){console.warn(`getGlobalProperty:${e.error}`);return}return e.re},So=async(r,A)=>{const e=await r.callUeFunc({f:"GetObjectByInfo",p:{info:A}});if(e.error){console.warn(`GetObjectByInfo:${e.error}`);return}return e.re},Io=async(r,A,e)=>await r.callUeFunc({f:"BindActorByTag",p:{ID:A,ActorTag:e}}),To=async r=>await r.callUeFunc({f:"RestoreOriginalScene",p:void 0}),Ho=async(r,A)=>await r.callUeFunc({f:"UnBindActorByID",p:{ID:A}}),Lo=async(r,A)=>await r.callUeFunc({f:"UnBindActorByTag",p:{ActorTag:A}}),bo=async(r,A,e)=>await r.callUeFunc({f:"CreateActorByClass",p:{ID:A,ActorClass:e}}),Mo=async function(r,A,e){return await r.callUeFunc({f:"Bind3DTilesetByTag",p:{ID:A,ActorTag:e}})},Do=async function(r,A){return await r.callUeFunc({f:"UnBind3DTilesetByTag",p:{ActorTag:A}})},Ro=async function(r,A){return await r.callUeFunc({f:"UnBind3DTilesetById",p:{ID:A}})},Po=async function(r,A,e,t){return await r.callUeFunc({f:"BindImageryByTag",p:{ID:A,ActorTag:e,ComponentTag:t}})},Ko=async function(r,A,e){return await r.callUeFunc({f:"UnBindImageryByTag",p:{ActorTag:A,ComponentTag:e}})},xo=async function(r,A){return await r.callUeFunc({f:"UnBindImageryById",p:{ID:A}})},ko=async function(r,A,e,t){return await r.callUeFunc({f:"GetIdByComponentNameAndHitItem",p:{id:A,ComponentName:e,HitItem:t}})},Go=async function(r,A="ECC_Visibility"){return await r.callUeFunc({f:"GetCameraRelativeHeight",p:{Channel:A}})},No=async function(r,A,e,t){const n=await r.callUeFunc({f:"SaveStringToFile",p:{String:A,Path:e??"undefine",File:t??"data.txt"}});return n.error!==""&&console.warn("SaveStringToFile: ",n.error),n},_o=async function(r,A,e=!0){const t=await r.callUeFunc({f:"HighlightActorByTag",p:{ActorTag:A,Highlight:e}});return t.error!==""&&console.warn("HighlightActorByTag: ",t.error),t},Vo=async function(r,A){const e=await r.callUeFunc({f:"SendCustomMessage",p:{Message:A}});return e.error!==""&&console.warn("SendCustomMessage: ",e.error),e},Oo=async function(r){const A=await r.callUeFunc({f:"GetStatus",p:void 0});if(A.error){console.warn(`GetStatus:${A.error}`);return}return A.re},Wo=async(r,A,e,t,n=!0)=>{const s=await r.callUeFunc({f:"startEditing",p:{sceneObjectID:A,editingID:e,modes:t,useKeyToSwitch:n}});if(s.error){console.error("startEditing:",s.error);return}return s},Xo=async r=>{const A=await r.callUeFunc({f:"stopEditing",p:void 0});if(A.error){console.error("stopEditing:",A.error);return}return A},Jo=async(r,A,e)=>{const t=await r.callUeFunc({f:"moveObjects",p:{sceneObjectIDs:A,editingID:e}});if(t.error){console.error("moveObjects:",t.error);return}return t},zo=async r=>{const A=await r.callUeFunc({f:"GetTilesetMaterialIDList",p:void 0});if(A.error){console.error("GetTilesetMaterialIDList:",A.error);return}return A.re.materialIDList};class Ve extends w.Destroyable{}var Sn={exports:{}},Yo;function ad(){return Yo||(Yo=1,function(r){const A={};A.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},A.localCName=A.generateIdentifier(),A.splitLines=function(e){return e.trim().split(`
2
2
  `).map(t=>t.trim())},A.splitSections=function(e){return e.split(`
3
3
  m=`).map((n,s)=>(s>0?"m="+n:n).trim()+`\r
4
4
  `)},A.getDescription=function(e){const t=A.splitSections(e);return t&&t[0]},A.getMediaSections=function(e){const t=A.splitSections(e);return t.shift(),t},A.matchPrefix=function(e,t){return A.splitLines(e).filter(n=>n.indexOf(t)===0)},A.parseCandidate=function(e){let t;e.indexOf("a=candidate:")===0?t=e.substring(12).split(" "):t=e.substring(10).split(" ");const n={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let s=8;s<t.length;s+=2)switch(t[s]){case"raddr":n.relatedAddress=t[s+1];break;case"rport":n.relatedPort=parseInt(t[s+1],10);break;case"tcptype":n.tcpType=t[s+1];break;case"ufrag":n.ufrag=t[s+1],n.usernameFragment=t[s+1];break;default:n[t[s]]===void 0&&(n[t[s]]=t[s+1]);break}return n},A.writeCandidate=function(e){const t=[];t.push(e.foundation);const n=e.component;n==="rtp"?t.push(1):n==="rtcp"?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const s=e.type;return t.push("typ"),t.push(s),s!=="host"&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&e.protocol.toLowerCase()==="tcp"&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},A.parseIceOptions=function(e){return e.substring(14).split(" ")},A.parseRtpMap=function(e){let t=e.substring(9).split(" ");const n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=t.length===3?parseInt(t[2],10):1,n.numChannels=n.channels,n},A.writeRtpMap=function(e){let t=e.payloadType;e.preferredPayloadType!==void 0&&(t=e.preferredPayloadType);const n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(n!==1?"/"+n:"")+`\r
@@ -109,10 +109,10 @@ Msg: ${e}`;console.warn(t)}};h.verboseLogLevel=5,function(r){r.LIST_STREAMERS="l
109
109
  content: "" !important;
110
110
  display: none !important;
111
111
  }`,dw=function(r){uw(r,"."+$s+lw+Jc+`
112
- .`+Zs+cw+Jc)},uw=function(r,A){var e=r.ownerDocument;if(e){var t=e.createElement("style");t.textContent=A,r.appendChild(t)}},zc=function(){function r(){}return r.getOrigin=function(A){var e=r._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},r.isSameOrigin=function(A){return r.getOrigin(A)===r._origin},r.setContext=function(A){r._link=A.document.createElement("a"),r._origin=r.getOrigin(A.location.href)},r._origin="about:blank",r}(),hw=function(){function r(A,e){this.context=A,this._options=e,this._cache={}}return r.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)||(js(A)||ww(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),e},r.prototype.match=function(A){return this._cache[A]},r.prototype.loadImage=function(A){return hA(this,void 0,void 0,function(){var e,t,n,s,i=this;return sA(this,function(o){switch(o.label){case 0:return e=zc.isSameOrigin(A),t=!qs(A)&&this._options.useCORS===!0&&rA.SUPPORT_CORS_IMAGES&&!e,n=!qs(A)&&!e&&!js(A)&&typeof this._options.proxy=="string"&&rA.SUPPORT_CORS_XHR&&!t,!e&&this._options.allowTaint===!1&&!qs(A)&&!js(A)&&!n&&!t?[2]:(s=A,n?[4,this.proxy(s)]:[3,2]);case 1:s=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(a,l){var c=new Image;c.onload=function(){return a(c)},c.onerror=l,(pw(s)||t)&&(c.crossOrigin="anonymous"),c.src=s,c.complete===!0&&setTimeout(function(){return a(c)},500),i._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},r.prototype.has=function(A){return typeof this._cache[A]<"u"},r.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},r.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var n=A.substring(0,256);return new Promise(function(s,i){var o=rA.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(a.status===200)if(o==="text")s(a.response);else{var u=new FileReader;u.addEventListener("load",function(){return s(u.result)},!1),u.addEventListener("error",function(d){return i(d)},!1),u.readAsDataURL(a.response)}else i("Failed to proxy resource "+n+" with status code "+a.status)},a.onerror=i;var l=t.indexOf("?")>-1?"&":"?";if(a.open("GET",""+t+l+"url="+encodeURIComponent(A)+"&responseType="+o),o!=="text"&&a instanceof XMLHttpRequest&&(a.responseType=o),e._options.imageTimeout){var c=e._options.imageTimeout;a.timeout=c,a.ontimeout=function(){return i("Timed out ("+c+"ms) proxying "+n)}}a.send()})},r}(),gw=/^data:image\/svg\+xml/i,Bw=/^data:image\/.*;base64,/i,fw=/^data:image\/.*/i,ww=function(r){return rA.SUPPORT_SVG_DRAWING||!Cw(r)},qs=function(r){return fw.test(r)},pw=function(r){return Bw.test(r)},js=function(r){return r.substr(0,4)==="blob"},Cw=function(r){return r.substr(-3).toLowerCase()==="svg"||gw.test(r)},S=function(){function r(A,e){this.type=0,this.x=A,this.y=e}return r.prototype.add=function(A,e){return new r(this.x+A,this.y+e)},r}(),Ie=function(r,A,e){return new S(r.x+(A.x-r.x)*e,r.y+(A.y-r.y)*e)},Bn=function(){function r(A,e,t,n){this.type=1,this.start=A,this.startControl=e,this.endControl=t,this.end=n}return r.prototype.subdivide=function(A,e){var t=Ie(this.start,this.startControl,A),n=Ie(this.startControl,this.endControl,A),s=Ie(this.endControl,this.end,A),i=Ie(t,n,A),o=Ie(n,s,A),a=Ie(i,o,A);return e?new r(this.start,t,i,a):new r(a,o,s,this.end)},r.prototype.add=function(A,e){return new r(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},r.prototype.reverse=function(){return new r(this.end,this.endControl,this.startControl,this.start)},r}(),CA=function(r){return r.type===1},vw=function(){function r(A){var e=A.styles,t=A.bounds,n=st(e.borderTopLeftRadius,t.width,t.height),s=n[0],i=n[1],o=st(e.borderTopRightRadius,t.width,t.height),a=o[0],l=o[1],c=st(e.borderBottomRightRadius,t.width,t.height),u=c[0],d=c[1],B=st(e.borderBottomLeftRadius,t.width,t.height),g=B[0],f=B[1],m=[];m.push((s+a)/t.width),m.push((g+u)/t.width),m.push((i+f)/t.height),m.push((l+d)/t.height);var F=Math.max.apply(Math,m);F>1&&(s/=F,i/=F,a/=F,l/=F,u/=F,d/=F,g/=F,f/=F);var Q=t.width-a,y=t.height-d,L=t.width-u,I=t.height-f,E=e.borderTopWidth,R=e.borderRightWidth,P=e.borderBottomWidth,D=e.borderLeftWidth,W=_(e.paddingTop,A.bounds.width),oA=_(e.paddingRight,A.bounds.width),$=_(e.paddingBottom,A.bounds.width),G=_(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=s>0||i>0?O(t.left+D/3,t.top+E/3,s-D/3,i-E/3,k.TOP_LEFT):new S(t.left+D/3,t.top+E/3),this.topRightBorderDoubleOuterBox=s>0||i>0?O(t.left+Q,t.top+E/3,a-R/3,l-E/3,k.TOP_RIGHT):new S(t.left+t.width-R/3,t.top+E/3),this.bottomRightBorderDoubleOuterBox=u>0||d>0?O(t.left+L,t.top+y,u-R/3,d-P/3,k.BOTTOM_RIGHT):new S(t.left+t.width-R/3,t.top+t.height-P/3),this.bottomLeftBorderDoubleOuterBox=g>0||f>0?O(t.left+D/3,t.top+I,g-D/3,f-P/3,k.BOTTOM_LEFT):new S(t.left+D/3,t.top+t.height-P/3),this.topLeftBorderDoubleInnerBox=s>0||i>0?O(t.left+D*2/3,t.top+E*2/3,s-D*2/3,i-E*2/3,k.TOP_LEFT):new S(t.left+D*2/3,t.top+E*2/3),this.topRightBorderDoubleInnerBox=s>0||i>0?O(t.left+Q,t.top+E*2/3,a-R*2/3,l-E*2/3,k.TOP_RIGHT):new S(t.left+t.width-R*2/3,t.top+E*2/3),this.bottomRightBorderDoubleInnerBox=u>0||d>0?O(t.left+L,t.top+y,u-R*2/3,d-P*2/3,k.BOTTOM_RIGHT):new S(t.left+t.width-R*2/3,t.top+t.height-P*2/3),this.bottomLeftBorderDoubleInnerBox=g>0||f>0?O(t.left+D*2/3,t.top+I,g-D*2/3,f-P*2/3,k.BOTTOM_LEFT):new S(t.left+D*2/3,t.top+t.height-P*2/3),this.topLeftBorderStroke=s>0||i>0?O(t.left+D/2,t.top+E/2,s-D/2,i-E/2,k.TOP_LEFT):new S(t.left+D/2,t.top+E/2),this.topRightBorderStroke=s>0||i>0?O(t.left+Q,t.top+E/2,a-R/2,l-E/2,k.TOP_RIGHT):new S(t.left+t.width-R/2,t.top+E/2),this.bottomRightBorderStroke=u>0||d>0?O(t.left+L,t.top+y,u-R/2,d-P/2,k.BOTTOM_RIGHT):new S(t.left+t.width-R/2,t.top+t.height-P/2),this.bottomLeftBorderStroke=g>0||f>0?O(t.left+D/2,t.top+I,g-D/2,f-P/2,k.BOTTOM_LEFT):new S(t.left+D/2,t.top+t.height-P/2),this.topLeftBorderBox=s>0||i>0?O(t.left,t.top,s,i,k.TOP_LEFT):new S(t.left,t.top),this.topRightBorderBox=a>0||l>0?O(t.left+Q,t.top,a,l,k.TOP_RIGHT):new S(t.left+t.width,t.top),this.bottomRightBorderBox=u>0||d>0?O(t.left+L,t.top+y,u,d,k.BOTTOM_RIGHT):new S(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=g>0||f>0?O(t.left,t.top+I,g,f,k.BOTTOM_LEFT):new S(t.left,t.top+t.height),this.topLeftPaddingBox=s>0||i>0?O(t.left+D,t.top+E,Math.max(0,s-D),Math.max(0,i-E),k.TOP_LEFT):new S(t.left+D,t.top+E),this.topRightPaddingBox=a>0||l>0?O(t.left+Math.min(Q,t.width-R),t.top+E,Q>t.width+R?0:Math.max(0,a-R),Math.max(0,l-E),k.TOP_RIGHT):new S(t.left+t.width-R,t.top+E),this.bottomRightPaddingBox=u>0||d>0?O(t.left+Math.min(L,t.width-D),t.top+Math.min(y,t.height-P),Math.max(0,u-R),Math.max(0,d-P),k.BOTTOM_RIGHT):new S(t.left+t.width-R,t.top+t.height-P),this.bottomLeftPaddingBox=g>0||f>0?O(t.left+D,t.top+Math.min(I,t.height-P),Math.max(0,g-D),Math.max(0,f-P),k.BOTTOM_LEFT):new S(t.left+D,t.top+t.height-P),this.topLeftContentBox=s>0||i>0?O(t.left+D+G,t.top+E+W,Math.max(0,s-(D+G)),Math.max(0,i-(E+W)),k.TOP_LEFT):new S(t.left+D+G,t.top+E+W),this.topRightContentBox=a>0||l>0?O(t.left+Math.min(Q,t.width+D+G),t.top+E+W,Q>t.width+D+G?0:a-D+G,l-(E+W),k.TOP_RIGHT):new S(t.left+t.width-(R+oA),t.top+E+W),this.bottomRightContentBox=u>0||d>0?O(t.left+Math.min(L,t.width-(D+G)),t.top+Math.min(y,t.height+E+W),Math.max(0,u-(R+oA)),d-(P+$),k.BOTTOM_RIGHT):new S(t.left+t.width-(R+oA),t.top+t.height-(P+$)),this.bottomLeftContentBox=g>0||f>0?O(t.left+D+G,t.top+I,Math.max(0,g-(D+G)),f-(P+$),k.BOTTOM_LEFT):new S(t.left+D+G,t.top+t.height-(P+$))}return r}(),k;(function(r){r[r.TOP_LEFT=0]="TOP_LEFT",r[r.TOP_RIGHT=1]="TOP_RIGHT",r[r.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",r[r.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(k||(k={}));var O=function(r,A,e,t,n){var s=4*((Math.sqrt(2)-1)/3),i=e*s,o=t*s,a=r+e,l=A+t;switch(n){case k.TOP_LEFT:return new Bn(new S(r,l),new S(r,l-o),new S(a-i,A),new S(a,A));case k.TOP_RIGHT:return new Bn(new S(r,A),new S(r+i,A),new S(a,l-o),new S(a,l));case k.BOTTOM_RIGHT:return new Bn(new S(a,A),new S(a,A+o),new S(r+i,l),new S(r,l));case k.BOTTOM_LEFT:default:return new Bn(new S(a,l),new S(a-i,l),new S(r,A+o),new S(r,A))}},fn=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},mw=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},wn=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},Fw=function(){function r(A,e,t){this.offsetX=A,this.offsetY=e,this.matrix=t,this.type=0,this.target=6}return r}(),pn=function(){function r(A,e){this.path=A,this.target=e,this.type=1}return r}(),Qw=function(){function r(A){this.opacity=A,this.type=2,this.target=6}return r}(),Uw=function(r){return r.type===0},Yc=function(r){return r.type===1},Ew=function(r){return r.type===2},$c=function(r,A){return r.length===A.length?r.some(function(e,t){return e===A[t]}):!1},yw=function(r,A,e,t,n){return r.map(function(s,i){switch(i){case 0:return s.add(A,e);case 1:return s.add(A+t,e);case 2:return s.add(A+t,e+n);case 3:return s.add(A,e+n)}return s})},Zc=function(){function r(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r}(),qc=function(){function r(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new vw(this.container),this.container.styles.opacity<1&&this.effects.push(new Qw(this.container.styles.opacity)),this.container.styles.transform!==null){var t=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,s=this.container.styles.transform;this.effects.push(new Fw(t,n,s))}if(this.container.styles.overflowX!==0){var i=fn(this.curves),o=wn(this.curves);$c(i,o)?this.effects.push(new pn(i,6)):(this.effects.push(new pn(i,2)),this.effects.push(new pn(o,4)))}}return r.prototype.getEffects=function(A){for(var e=[2,3].indexOf(this.container.styles.position)===-1,t=this.parent,n=this.effects.slice(0);t;){var s=t.effects.filter(function(a){return!Yc(a)});if(e||t.container.styles.position!==0||!t.parent){if(n.unshift.apply(n,s),e=[2,3].indexOf(t.container.styles.position)===-1,t.container.styles.overflowX!==0){var i=fn(t.curves),o=wn(t.curves);$c(i,o)||n.unshift(new pn(o,6))}}else n.unshift.apply(n,s);t=t.parent}return n.filter(function(a){return q(a.target,A)})},r}(),Ai=function(r,A,e,t){r.container.elements.forEach(function(n){var s=q(n.flags,4),i=q(n.flags,2),o=new qc(n,r);q(n.styles.display,2048)&&t.push(o);var a=q(n.flags,8)?[]:t;if(s||i){var l=s||n.styles.isPositioned()?e:A,c=new Zc(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var u=n.styles.zIndex.order;if(u<0){var d=0;l.negativeZIndex.some(function(g,f){return u>g.element.container.styles.zIndex.order?(d=f,!1):d>0}),l.negativeZIndex.splice(d,0,c)}else if(u>0){var B=0;l.positiveZIndex.some(function(g,f){return u>=g.element.container.styles.zIndex.order?(B=f+1,!1):B>0}),l.positiveZIndex.splice(B,0,c)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else n.styles.isFloating()?l.nonPositionedFloats.push(c):l.nonPositionedInlineLevel.push(c);Ai(o,c,s?c:e,a)}else n.styles.isInlineLevel()?A.inlineLevel.push(o):A.nonInlineLevel.push(o),Ai(o,A,e,a);q(n.flags,8)&&jc(n,a)})},jc=function(r,A){for(var e=r instanceof Vs?r.start:1,t=r instanceof Vs?r.reversed:!1,n=0;n<A.length;n++){var s=A[n];s.container instanceof Uc&&typeof s.container.value=="number"&&s.container.value!==0&&(e=s.container.value),s.listValue=dt(e,s.container.styles.listStyleType,!0),e+=t?-1:1}},Sw=function(r){var A=new qc(r,null),e=new Zc(A),t=[];return Ai(A,e,e,t),jc(A.container,t),e},Ad=function(r,A){switch(A){case 0:return vA(r.topLeftBorderBox,r.topLeftPaddingBox,r.topRightBorderBox,r.topRightPaddingBox);case 1:return vA(r.topRightBorderBox,r.topRightPaddingBox,r.bottomRightBorderBox,r.bottomRightPaddingBox);case 2:return vA(r.bottomRightBorderBox,r.bottomRightPaddingBox,r.bottomLeftBorderBox,r.bottomLeftPaddingBox);case 3:default:return vA(r.bottomLeftBorderBox,r.bottomLeftPaddingBox,r.topLeftBorderBox,r.topLeftPaddingBox)}},Iw=function(r,A){switch(A){case 0:return vA(r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox,r.topRightBorderBox,r.topRightBorderDoubleOuterBox);case 1:return vA(r.topRightBorderBox,r.topRightBorderDoubleOuterBox,r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox);case 2:return vA(r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox,r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox);case 3:default:return vA(r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox,r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox)}},Tw=function(r,A){switch(A){case 0:return vA(r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox,r.topRightBorderDoubleInnerBox,r.topRightPaddingBox);case 1:return vA(r.topRightBorderDoubleInnerBox,r.topRightPaddingBox,r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox);case 2:return vA(r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox,r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox);case 3:default:return vA(r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox,r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox)}},Hw=function(r,A){switch(A){case 0:return Cn(r.topLeftBorderStroke,r.topRightBorderStroke);case 1:return Cn(r.topRightBorderStroke,r.bottomRightBorderStroke);case 2:return Cn(r.bottomRightBorderStroke,r.bottomLeftBorderStroke);case 3:default:return Cn(r.bottomLeftBorderStroke,r.topLeftBorderStroke)}},Cn=function(r,A){var e=[];return CA(r)?e.push(r.subdivide(.5,!1)):e.push(r),CA(A)?e.push(A.subdivide(.5,!0)):e.push(A),e},vA=function(r,A,e,t){var n=[];return CA(r)?n.push(r.subdivide(.5,!1)):n.push(r),CA(e)?n.push(e.subdivide(.5,!0)):n.push(e),CA(t)?n.push(t.subdivide(.5,!0).reverse()):n.push(t),CA(A)?n.push(A.subdivide(.5,!1).reverse()):n.push(A),n},ed=function(r){var A=r.bounds,e=r.styles;return A.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},vn=function(r){var A=r.styles,e=r.bounds,t=_(A.paddingLeft,e.width),n=_(A.paddingRight,e.width),s=_(A.paddingTop,e.width),i=_(A.paddingBottom,e.width);return e.add(t+A.borderLeftWidth,s+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+t+n),-(A.borderTopWidth+A.borderBottomWidth+s+i))},Lw=function(r,A){return r===0?A.bounds:r===2?vn(A):ed(A)},bw=function(r,A){return r===0?A.bounds:r===2?vn(A):ed(A)},ei=function(r,A,e){var t=Lw(He(r.styles.backgroundOrigin,A),r),n=bw(He(r.styles.backgroundClip,A),r),s=Mw(He(r.styles.backgroundSize,A),e,t),i=s[0],o=s[1],a=st(He(r.styles.backgroundPosition,A),t.width-i,t.height-o),l=Dw(He(r.styles.backgroundRepeat,A),a,s,t,n),c=Math.round(t.left+a[0]),u=Math.round(t.top+a[1]);return[l,c,u,i,o]},Te=function(r){return N(r)&&r.value===Ue.AUTO},mn=function(r){return typeof r=="number"},Mw=function(r,A,e){var t=A[0],n=A[1],s=A[2],i=r[0],o=r[1];if(!i)return[0,0];if(Y(i)&&o&&Y(o))return[_(i,e.width),_(o,e.height)];var a=mn(s);if(N(i)&&(i.value===Ue.CONTAIN||i.value===Ue.COVER)){if(mn(s)){var l=e.width/e.height;return l<s!=(i.value===Ue.COVER)?[e.width,e.width/s]:[e.height*s,e.height]}return[e.width,e.height]}var c=mn(t),u=mn(n),d=c||u;if(Te(i)&&(!o||Te(o))){if(c&&u)return[t,n];if(!a&&!d)return[e.width,e.height];if(d&&a){var B=c?t:n*s,g=u?n:t/s;return[B,g]}var f=c?t:e.width,m=u?n:e.height;return[f,m]}if(a){var F=0,Q=0;return Y(i)?F=_(i,e.width):Y(o)&&(Q=_(o,e.height)),Te(i)?F=Q*s:(!o||Te(o))&&(Q=F/s),[F,Q]}var y=null,L=null;if(Y(i)?y=_(i,e.width):o&&Y(o)&&(L=_(o,e.height)),y!==null&&(!o||Te(o))&&(L=c&&u?y/t*n:e.height),L!==null&&Te(i)&&(y=c&&u?L/n*t:e.width),y!==null&&L!==null)return[y,L];throw new Error("Unable to calculate background-size for element")},He=function(r,A){var e=r[A];return typeof e>"u"?r[0]:e},Dw=function(r,A,e,t,n){var s=A[0],i=A[1],o=e[0],a=e[1];switch(r){case 2:return[new S(Math.round(t.left),Math.round(t.top+i)),new S(Math.round(t.left+t.width),Math.round(t.top+i)),new S(Math.round(t.left+t.width),Math.round(a+t.top+i)),new S(Math.round(t.left),Math.round(a+t.top+i))];case 3:return[new S(Math.round(t.left+s),Math.round(t.top)),new S(Math.round(t.left+s+o),Math.round(t.top)),new S(Math.round(t.left+s+o),Math.round(t.height+t.top)),new S(Math.round(t.left+s),Math.round(t.height+t.top))];case 1:return[new S(Math.round(t.left+s),Math.round(t.top+i)),new S(Math.round(t.left+s+o),Math.round(t.top+i)),new S(Math.round(t.left+s+o),Math.round(t.top+i+a)),new S(Math.round(t.left+s),Math.round(t.top+i+a))];default:return[new S(Math.round(n.left),Math.round(n.top)),new S(Math.round(n.left+n.width),Math.round(n.top)),new S(Math.round(n.left+n.width),Math.round(n.height+n.top)),new S(Math.round(n.left),Math.round(n.height+n.top))]}},Rw="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",td="Hidden Text",Pw=function(){function r(A){this._data={},this._document=A}return r.prototype.parseMetrics=function(A,e){var t=this._document.createElement("div"),n=this._document.createElement("img"),s=this._document.createElement("span"),i=this._document.body;t.style.visibility="hidden",t.style.fontFamily=A,t.style.fontSize=e,t.style.margin="0",t.style.padding="0",t.style.whiteSpace="nowrap",i.appendChild(t),n.src=Rw,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",s.style.fontFamily=A,s.style.fontSize=e,s.style.margin="0",s.style.padding="0",s.appendChild(this._document.createTextNode(td)),t.appendChild(s),t.appendChild(n);var o=n.offsetTop-s.offsetTop+2;t.removeChild(s),t.appendChild(this._document.createTextNode(td)),t.style.lineHeight="normal",n.style.verticalAlign="super";var a=n.offsetTop-t.offsetTop+2;return i.removeChild(t),{baseline:o,middle:a}},r.prototype.getMetrics=function(A,e){var t=A+" "+e;return typeof this._data[t]>"u"&&(this._data[t]=this.parseMetrics(A,e)),this._data[t]},r}(),rd=function(){function r(A,e){this.context=A,this.options=e}return r}(),Kw=1e4,xw=function(r){FA(A,r);function A(e,t){var n=r.call(this,e,t)||this;return n._activeEffects=[],n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),t.canvas||(n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px"),n.fontMetrics=new Pw(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+t.width+"x"+t.height+") with scale "+t.scale),n}return A.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(n){return t.applyEffect(n)})},A.prototype.applyEffect=function(e){this.ctx.save(),Ew(e)&&(this.ctx.globalAlpha=e.opacity),Uw(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),Yc(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(e){return hA(this,void 0,void 0,function(){var t;return sA(this,function(n){switch(n.label){case 0:return t=e.element.container.styles,t.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(e){return hA(this,void 0,void 0,function(){return sA(this,function(t){switch(t.label){case 0:if(q(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(e,t,n){var s=this;if(t===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n);else{var i=_s(e.text);i.reduce(function(o,a){return s.ctx.fillText(a,o,e.bounds.top+n),o+s.ctx.measureText(a).width},e.bounds.left)}},A.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),n=Vw(e.fontFamily).join(", "),s=nt(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,s,n].join(" "),n,s]},A.prototype.renderTextNode=function(e,t){return hA(this,void 0,void 0,function(){var n,s,i,o,a,l,c,u,d=this;return sA(this,function(B){return n=this.createFontStyle(t),s=n[0],i=n[1],o=n[2],this.ctx.font=s,this.ctx.direction=t.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",a=this.fontMetrics.getMetrics(i,o),l=a.baseline,c=a.middle,u=t.paintOrder,e.textBounds.forEach(function(g){u.forEach(function(f){switch(f){case 0:d.ctx.fillStyle=AA(t.color),d.renderTextWithLetterSpacing(g,t.letterSpacing,l);var m=t.textShadow;m.length&&g.text.trim().length&&(m.slice(0).reverse().forEach(function(F){d.ctx.shadowColor=AA(F.color),d.ctx.shadowOffsetX=F.offsetX.number*d.options.scale,d.ctx.shadowOffsetY=F.offsetY.number*d.options.scale,d.ctx.shadowBlur=F.blur.number,d.renderTextWithLetterSpacing(g,t.letterSpacing,l)}),d.ctx.shadowColor="",d.ctx.shadowOffsetX=0,d.ctx.shadowOffsetY=0,d.ctx.shadowBlur=0),t.textDecorationLine.length&&(d.ctx.fillStyle=AA(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(F){switch(F){case 1:d.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top+l),g.bounds.width,1);break;case 2:d.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top),g.bounds.width,1);break;case 3:d.ctx.fillRect(g.bounds.left,Math.ceil(g.bounds.top+c),g.bounds.width,1);break}}));break;case 1:t.webkitTextStrokeWidth&&g.text.trim().length&&(d.ctx.strokeStyle=AA(t.webkitTextStrokeColor),d.ctx.lineWidth=t.webkitTextStrokeWidth,d.ctx.lineJoin=window.chrome?"miter":"round",d.ctx.strokeText(g.text,g.bounds.left,g.bounds.top+l)),d.ctx.strokeStyle="",d.ctx.lineWidth=0,d.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var s=vn(e),i=wn(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,s.left,s.top,s.width,s.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return hA(this,void 0,void 0,function(){var t,n,s,i,o,a,Q,Q,l,c,u,d,L,B,g,I,f,m,F,Q,y,L,I;return sA(this,function(E){switch(E.label){case 0:this.applyEffects(e.getEffects(4)),t=e.container,n=e.curves,s=t.styles,i=0,o=t.textNodes,E.label=1;case 1:return i<o.length?(a=o[i],[4,this.renderTextNode(a,s)]):[3,4];case 2:E.sent(),E.label=3;case 3:return i++,[3,1];case 4:if(!(t instanceof mc))return[3,8];E.label=5;case 5:return E.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return Q=E.sent(),this.renderReplacedElement(t,n,Q),[3,8];case 7:return E.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof Fc&&this.renderReplacedElement(t,n,t.canvas),!(t instanceof Qc))return[3,12];E.label=9;case 9:return E.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return Q=E.sent(),this.renderReplacedElement(t,n,Q),[3,12];case 11:return E.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof Ic&&t.tree?(l=new A(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}),[4,l.render(t.tree)]):[3,14];case 13:c=E.sent(),t.width&&t.height&&this.ctx.drawImage(c,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),E.label=14;case 14:if(t instanceof Os&&(u=Math.min(t.bounds.width,t.bounds.height),t.type===ln?t.checked&&(this.ctx.save(),this.path([new S(t.bounds.left+u*.39363,t.bounds.top+u*.79),new S(t.bounds.left+u*.16,t.bounds.top+u*.5549),new S(t.bounds.left+u*.27347,t.bounds.top+u*.44071),new S(t.bounds.left+u*.39694,t.bounds.top+u*.5649),new S(t.bounds.left+u*.72983,t.bounds.top+u*.23),new S(t.bounds.left+u*.84,t.bounds.top+u*.34085),new S(t.bounds.left+u*.39363,t.bounds.top+u*.79)]),this.ctx.fillStyle=AA(Ec),this.ctx.fill(),this.ctx.restore()):t.type===cn&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+u/2,t.bounds.top+u/2,u/4,0,Math.PI*2,!0),this.ctx.fillStyle=AA(Ec),this.ctx.fill(),this.ctx.restore())),kw(t)&&t.value.length){switch(d=this.createFontStyle(s),L=d[0],B=d[1],g=this.fontMetrics.getMetrics(L,B).baseline,this.ctx.font=L,this.ctx.fillStyle=AA(s.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Nw(t.styles.textAlign),I=vn(t),f=0,t.styles.textAlign){case 1:f+=I.width/2;break;case 2:f+=I.width;break}m=I.add(f,0,0,-I.height/2+1),this.ctx.save(),this.path([new S(I.left,I.top),new S(I.left+I.width,I.top),new S(I.left+I.width,I.top+I.height),new S(I.left,I.top+I.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new lt(t.value,m),s.letterSpacing,g),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!q(t.styles.display,2048))return[3,20];if(t.styles.listStyleImage===null)return[3,19];if(F=t.styles.listStyleImage,F.type!==0)return[3,18];Q=void 0,y=F.url,E.label=15;case 15:return E.trys.push([15,17,,18]),[4,this.context.cache.match(y)];case 16:return Q=E.sent(),this.ctx.drawImage(Q,t.bounds.left-(Q.width+10),t.bounds.top),[3,18];case 17:return E.sent(),this.context.logger.error("Error loading list-style-image "+y),[3,18];case 18:return[3,20];case 19:e.listValue&&t.styles.listStyleType!==-1&&(L=this.createFontStyle(s)[0],this.ctx.font=L,this.ctx.fillStyle=AA(s.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",I=new MA(t.bounds.left,t.bounds.top+_(t.styles.paddingTop,t.bounds.width),t.bounds.width,tc(s.lineHeight,s.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new lt(e.listValue,I),s.letterSpacing,tc(s.lineHeight,s.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),E.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(e){return hA(this,void 0,void 0,function(){var t,n,F,s,i,F,o,a,F,l,c,F,u,d,F,B,g,F,f,m,F;return sA(this,function(Q){switch(Q.label){case 0:if(q(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:Q.sent(),t=0,n=e.negativeZIndex,Q.label=2;case 2:return t<n.length?(F=n[t],[4,this.renderStack(F)]):[3,5];case 3:Q.sent(),Q.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:Q.sent(),s=0,i=e.nonInlineLevel,Q.label=7;case 7:return s<i.length?(F=i[s],[4,this.renderNode(F)]):[3,10];case 8:Q.sent(),Q.label=9;case 9:return s++,[3,7];case 10:o=0,a=e.nonPositionedFloats,Q.label=11;case 11:return o<a.length?(F=a[o],[4,this.renderStack(F)]):[3,14];case 12:Q.sent(),Q.label=13;case 13:return o++,[3,11];case 14:l=0,c=e.nonPositionedInlineLevel,Q.label=15;case 15:return l<c.length?(F=c[l],[4,this.renderStack(F)]):[3,18];case 16:Q.sent(),Q.label=17;case 17:return l++,[3,15];case 18:u=0,d=e.inlineLevel,Q.label=19;case 19:return u<d.length?(F=d[u],[4,this.renderNode(F)]):[3,22];case 20:Q.sent(),Q.label=21;case 21:return u++,[3,19];case 22:B=0,g=e.zeroOrAutoZIndexOrTransformedOrOpacity,Q.label=23;case 23:return B<g.length?(F=g[B],[4,this.renderStack(F)]):[3,26];case 24:Q.sent(),Q.label=25;case 25:return B++,[3,23];case 26:f=0,m=e.positiveZIndex,Q.label=27;case 27:return f<m.length?(F=m[f],[4,this.renderStack(F)]):[3,30];case 28:Q.sent(),Q.label=29;case 29:return f++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},A.prototype.formatPath=function(e){var t=this;e.forEach(function(n,s){var i=CA(n)?n.start:n;s===0?t.ctx.moveTo(i.x,i.y):t.ctx.lineTo(i.x,i.y),CA(n)&&t.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},A.prototype.renderRepeat=function(e,t,n,s){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,s),this.ctx.fill(),this.ctx.translate(-n,-s)},A.prototype.resizeImage=function(e,t,n){var s;if(e.width===t&&e.height===n)return e;var i=(s=this.canvas.ownerDocument)!==null&&s!==void 0?s:document,o=i.createElement("canvas");o.width=Math.max(1,t),o.height=Math.max(1,n);var a=o.getContext("2d");return a.drawImage(e,0,0,e.width,e.height,0,0,t,n),o},A.prototype.renderBackgroundImage=function(e){return hA(this,void 0,void 0,function(){var t,n,s,i,o,a;return sA(this,function(l){switch(l.label){case 0:t=e.styles.backgroundImage.length-1,n=function(c){var u,d,B,W,aA,BA,G,j,P,g,W,aA,BA,G,j,f,m,F,Q,y,L,I,E,R,P,D,W,oA,$,G,j,IA,aA,BA,de,TA,YA,ue,he,KA,ge,xA;return sA(this,function(Ke){switch(Ke.label){case 0:if(c.type!==0)return[3,5];u=void 0,d=c.url,Ke.label=1;case 1:return Ke.trys.push([1,3,,4]),[4,s.context.cache.match(d)];case 2:return u=Ke.sent(),[3,4];case 3:return Ke.sent(),s.context.logger.error("Error loading background-image "+d),[3,4];case 4:return u&&(B=ei(e,t,[u.width,u.height,u.width/u.height]),W=B[0],aA=B[1],BA=B[2],G=B[3],j=B[4],P=s.ctx.createPattern(s.resizeImage(u,G,j),"repeat"),s.renderRepeat(W,P,aA,BA)),[3,6];case 5:Qg(c)?(g=ei(e,t,[null,null,null]),W=g[0],aA=g[1],BA=g[2],G=g[3],j=g[4],f=pg(c.angle,G,j),m=f[0],F=f[1],Q=f[2],y=f[3],L=f[4],I=document.createElement("canvas"),I.width=G,I.height=j,E=I.getContext("2d"),R=E.createLinearGradient(F,y,Q,L),Wl(c.stops,m).forEach(function(vr){return R.addColorStop(vr.stop,AA(vr.color))}),E.fillStyle=R,E.fillRect(0,0,G,j),G>0&&j>0&&(P=s.ctx.createPattern(I,"repeat"),s.renderRepeat(W,P,aA,BA))):Ug(c)&&(D=ei(e,t,[null,null,null]),W=D[0],oA=D[1],$=D[2],G=D[3],j=D[4],IA=c.position.length===0?[Ss]:c.position,aA=_(IA[0],G),BA=_(IA[IA.length-1],j),de=Cg(c,aA,BA,G,j),TA=de[0],YA=de[1],TA>0&&YA>0&&(ue=s.ctx.createRadialGradient(oA+aA,$+BA,0,oA+aA,$+BA,TA),Wl(c.stops,TA*2).forEach(function(vr){return ue.addColorStop(vr.stop,AA(vr.color))}),s.path(W),s.ctx.fillStyle=ue,TA!==YA?(he=e.bounds.left+.5*e.bounds.width,KA=e.bounds.top+.5*e.bounds.height,ge=YA/TA,xA=1/ge,s.ctx.save(),s.ctx.translate(he,KA),s.ctx.transform(1,0,0,ge,0,0),s.ctx.translate(-he,-KA),s.ctx.fillRect(oA,xA*($-KA)+KA,G,j*xA),s.ctx.restore()):s.ctx.fill())),Ke.label=6;case 6:return t--,[2]}})},s=this,i=0,o=e.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return i<o.length?(a=o[i],[5,n(a)]):[3,4];case 2:l.sent(),l.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(e,t,n){return hA(this,void 0,void 0,function(){return sA(this,function(s){return this.path(Ad(n,t)),this.ctx.fillStyle=AA(e),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(e,t,n,s){return hA(this,void 0,void 0,function(){var i,o;return sA(this,function(a){switch(a.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,s)]:[3,2];case 1:return a.sent(),[2];case 2:return i=Iw(s,n),this.path(i),this.ctx.fillStyle=AA(e),this.ctx.fill(),o=Tw(s,n),this.path(o),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(e){return hA(this,void 0,void 0,function(){var t,n,s,i,o,a,l,c,u=this;return sA(this,function(d){switch(d.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!WA(t.backgroundColor)||t.backgroundImage.length,s=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],i=Gw(He(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),WA(t.backgroundColor)||(this.ctx.fillStyle=AA(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:d.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(B){u.ctx.save();var g=fn(e.curves),f=B.inset?0:Kw,m=yw(g,-f+(B.inset?1:-1)*B.spread.number,(B.inset?1:-1)*B.spread.number,B.spread.number*(B.inset?-2:2),B.spread.number*(B.inset?-2:2));B.inset?(u.path(g),u.ctx.clip(),u.mask(m)):(u.mask(g),u.ctx.clip(),u.path(m)),u.ctx.shadowOffsetX=B.offsetX.number+f,u.ctx.shadowOffsetY=B.offsetY.number,u.ctx.shadowColor=AA(B.color),u.ctx.shadowBlur=B.blur.number,u.ctx.fillStyle=B.inset?AA(B.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()}),d.label=2;case 2:o=0,a=0,l=s,d.label=3;case 3:return a<l.length?(c=l[a],c.style!==0&&!WA(c.color)&&c.width>0?c.style!==2?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,o,e.curves,2)]:[3,11]):[3,13];case 4:return d.sent(),[3,11];case 5:return c.style!==3?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,o,e.curves,3)];case 6:return d.sent(),[3,11];case 7:return c.style!==4?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,o,e.curves)];case 8:return d.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,o,e.curves)];case 10:d.sent(),d.label=11;case 11:o++,d.label=12;case 12:return a++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(e,t,n,s,i){return hA(this,void 0,void 0,function(){var o,a,l,c,u,d,B,g,f,m,F,Q,y,L,I,E,I,E;return sA(this,function(R){return this.ctx.save(),o=Hw(s,n),a=Ad(s,n),i===2&&(this.path(a),this.ctx.clip()),CA(a[0])?(l=a[0].start.x,c=a[0].start.y):(l=a[0].x,c=a[0].y),CA(a[1])?(u=a[1].end.x,d=a[1].end.y):(u=a[1].x,d=a[1].y),n===0||n===2?B=Math.abs(l-u):B=Math.abs(c-d),this.ctx.beginPath(),i===3?this.formatPath(o):this.formatPath(a.slice(0,2)),g=t<3?t*3:t*2,f=t<3?t*2:t,i===3&&(g=t,f=t),m=!0,B<=g*2?m=!1:B<=g*2+f?(F=B/(2*g+f),g*=F,f*=F):(Q=Math.floor((B+f)/(g+f)),y=(B-Q*g)/(Q-1),L=(B-(Q+1)*g)/Q,f=L<=0||Math.abs(f-y)<Math.abs(f-L)?y:L),m&&(i===3?this.ctx.setLineDash([0,g+f]):this.ctx.setLineDash([g,f])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=AA(e),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&(CA(a[0])&&(I=a[3],E=a[0],this.ctx.beginPath(),this.formatPath([new S(I.end.x,I.end.y),new S(E.start.x,E.start.y)]),this.ctx.stroke()),CA(a[1])&&(I=a[1],E=a[2],this.ctx.beginPath(),this.formatPath([new S(I.end.x,I.end.y),new S(E.start.x,E.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(e){return hA(this,void 0,void 0,function(){var t;return sA(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=AA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=Sw(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(rd),kw=function(r){return r instanceof Sc||r instanceof yc?!0:r instanceof Os&&r.type!==cn&&r.type!==ln},Gw=function(r,A){switch(r){case 0:return fn(A);case 2:return mw(A);case 1:default:return wn(A)}},Nw=function(r){switch(r){case 1:return"center";case 2:return"right";case 0:default:return"left"}},_w=["-apple-system","system-ui"],Vw=function(r){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?r.filter(function(A){return _w.indexOf(A)===-1}):r},Ow=function(r){FA(A,r);function A(e,t){var n=r.call(this,e,t)||this;return n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=t,n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale),n}return A.prototype.render=function(e){return hA(this,void 0,void 0,function(){var t,n;return sA(this,function(s){switch(s.label){case 0:return t=Ns(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,Ww(t)];case 1:return n=s.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=AA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A}(rd),Ww=function(r){return new Promise(function(A,e){var t=new Image;t.onload=function(){A(t)},t.onerror=e,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(r))})},Xw=function(){function r(A){var e=A.id,t=A.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return r.prototype.debug=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Ir([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.prototype.getTime=function(){return Date.now()-this.start},r.prototype.info=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Ir([this.id,this.getTime()+"ms"],A))},r.prototype.warn=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Ir([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.prototype.error=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Ir([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.instances={},r}(),Jw=function(){function r(A,e){var t;this.windowBounds=e,this.instanceName="#"+r.instanceCount++,this.logger=new Xw({id:this.instanceName,enabled:A.logging}),this.cache=(t=A.cache)!==null&&t!==void 0?t:new hw(this,A)}return r.instanceCount=1,r}(),zw=function(r,A){return A===void 0&&(A={}),Yw(r,A)};typeof window<"u"&&zc.setContext(window);var Yw=function(r,A){return hA(void 0,void 0,void 0,function(){var e,t,n,s,i,o,a,l,c,u,d,B,g,f,m,F,Q,y,L,I,R,E,R,P,D,W,oA,$,G,j,IA,aA,BA,de,TA,YA,ue,he,KA,ge;return sA(this,function(xA){switch(xA.label){case 0:if(!r||typeof r!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=r.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(t=e.defaultView,!t)throw new Error("Document is not attached to a Window");return n={allowTaint:(P=A.allowTaint)!==null&&P!==void 0?P:!1,imageTimeout:(D=A.imageTimeout)!==null&&D!==void 0?D:15e3,proxy:A.proxy,useCORS:(W=A.useCORS)!==null&&W!==void 0?W:!1},s=is({logging:(oA=A.logging)!==null&&oA!==void 0?oA:!0,cache:A.cache},n),i={windowWidth:($=A.windowWidth)!==null&&$!==void 0?$:t.innerWidth,windowHeight:(G=A.windowHeight)!==null&&G!==void 0?G:t.innerHeight,scrollX:(j=A.scrollX)!==null&&j!==void 0?j:t.pageXOffset,scrollY:(IA=A.scrollY)!==null&&IA!==void 0?IA:t.pageYOffset},o=new MA(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),a=new Jw(s,o),l=(aA=A.foreignObjectRendering)!==null&&aA!==void 0?aA:!1,c={allowTaint:(BA=A.allowTaint)!==null&&BA!==void 0?BA:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:l,copyStyles:l},a.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),u=new Xc(a,r,c),d=u.clonedReferenceElement,d?[4,u.toIFrame(e,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return B=xA.sent(),g=Xs(d)||$f(d)?Eu(d.ownerDocument):Tr(a,d),f=g.width,m=g.height,F=g.left,Q=g.top,y=$w(a,d,A.backgroundColor),L={canvas:A.canvas,backgroundColor:y,scale:(TA=(de=A.scale)!==null&&de!==void 0?de:t.devicePixelRatio)!==null&&TA!==void 0?TA:1,x:((YA=A.x)!==null&&YA!==void 0?YA:0)+F,y:((ue=A.y)!==null&&ue!==void 0?ue:0)+Q,width:(he=A.width)!==null&&he!==void 0?he:Math.ceil(f),height:(KA=A.height)!==null&&KA!==void 0?KA:Math.ceil(m)},l?(a.logger.debug("Document cloned, using foreign object rendering"),R=new Ow(a,L),[4,R.render(d)]):[3,3];case 2:return I=xA.sent(),[3,5];case 3:return a.logger.debug("Document cloned, element located at "+F+","+Q+" with size "+f+"x"+m+" using computed rendering"),a.logger.debug("Starting DOM parsing"),E=Hc(a,d),y===E.styles.backgroundColor&&(E.styles.backgroundColor=RA.TRANSPARENT),a.logger.debug("Starting renderer for element at "+L.x+","+L.y+" with size "+L.width+"x"+L.height),R=new xw(a,L),[4,R.render(E)];case 4:I=xA.sent(),xA.label=5;case 5:return(!((ge=A.removeContainer)!==null&&ge!==void 0)||ge)&&(Xc.destroy(B)||a.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),a.logger.debug("Finished rendering"),[2,I]}})})},$w=function(r,A,e){var t=A.ownerDocument,n=t.documentElement?it(r,getComputedStyle(t.documentElement).backgroundColor):RA.TRANSPARENT,s=t.body?it(r,getComputedStyle(t.body).backgroundColor):RA.TRANSPARENT,i=typeof e=="string"?it(r,e):e===null?RA.TRANSPARENT:4294967295;return A===t.documentElement?WA(n)?WA(s)?i:s:n:i};const Mt=class Mt extends p.EngineObject{constructor(A,e){super(A,e),this.ad(new w.ObjResettingWithEvent(A.renderInUEChanged,()=>A.renderInUE?new sd(A,e):new nd(A,e)))}};C(Mt,"type",Mt.register("ESUeViewer",p.ESGeoDiv.type,Mt));let ti=Mt;class nd extends w.Destroyable{constructor(e,t){super();C(this,"_screenPosition",this.disposeVar(w.reactArrayWithUndefined(void 0)));const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}const s=this.disposeVar(new p.ESTextLabel);s.parentID=e.id,e.mainClass=s,t.add(s),this.dispose(()=>t.delete(s)),s.show=!1,this.dispose(w.bind([s,"position"],[e,"position"])),this.dispose(w.bind([s,"rotation"],[e,"rotation"])),this.dispose(w.bind([s,"flyToParam"],[e,"flyToParam"])),this.dispose(w.bind([s,"flyInParam"],[e,"flyInParam"])),this.dispose(e.calcFlyToParamEvent.disposableOn(()=>{$A(n,s.id)})),this.dispose(e.calcFlyInParamEvent.disposableOn(async()=>{if(!t.actived)return;const a=await t.getCurrentCameraInfo();if(!a)return;const{position:l,rotation:c}=a;e.flyInParam={position:l,rotation:c,flyDuration:1}})),this.dispose(e.smoothMoveEvent.disposableOn((a,l)=>{_e(n,s.id,a,l)})),this.dispose(e.smoothMoveWithRotationEvent.disposableOn((a,l,c)=>{ke(n,s.id,a,l,c)})),this.dispose(e.smoothMoveOnGroundEvent.disposableOn((a,l,c,u)=>{Ge(n,s.id,a,l,u,c)})),this.dispose(e.smoothMoveWithRotationOnGroundEvent.disposableOn((a,l,c,u,d)=>{Ne(n,s.id,a,l,c,u,d)})),this.dispose(e.flyToEvent.disposableOn((a,l)=>{s.flyTo(a)})),this.dispose(e.flyInEvent.don(a=>{s.flyIn(a)}));const i=this._screenPosition,o=this.disposeVar(new p.ESCustomDiv);o.parentID=e.id,t.add(o),this.dispose(()=>t.delete(o)),this.dispose(w.bind([o,"allowPicking"],[e,"allowPicking"]));{const a=this.disposeVar(w.createAnimateFrame()),l=()=>{e.show?a.restart(void 0,async()=>{if(!e.position)return;const c=await t.lonLatAltToScreenPosition(e.position);if(!this.isDestroyed())if(!c)this._screenPosition.value=void 0;else{const[u,d]=c;u===-1&&d===-1?this._screenPosition.value=void 0:this._screenPosition.value=[u,d]}}):a.cancel()};l(),this.dispose(e.showChanged.disposableOn(l))}{const a=()=>class extends w.Destroyable{constructor(d,B,g){if(super(),this._subContainer=d,!g)return;if(!e.instanceClass)throw new Error("!sceneObject.instanceClass");const f=new w.PosFloatDiv,m=f.element;this._subContainer.appendChild(m),this.dispose(()=>this._subContainer.removeChild(m)),m.onclick=F=>{(e.allowPicking??!1)&&e.pickedEvent.emit(new p.ESJPickedResult({div:m,pointerEvent:F},e,void 0,void 0,void 0,[F.x,F.y]))};{const F=()=>{e.editing?m.children[0].style.pointerEvents="none":m.children[0].style.pointerEvents="all"};F(),this.d(e.editingChanged.don(F))}{const F=()=>{const y=e.show;i.value&&y?(f.show=!0,f.winPos=[...i.value]):(f.show=!1,f.winPos=[0,0])};F();const Q=this.disposeVar(w.createNextAnimateFrameEvent(e.showChanged,i.changed));this.dispose(Q.disposableOn(F))}{const F=()=>{const[Q,y]=e.anchor??p.ESGeoDiv.defaults.anchor;f.originRatioX=Q,f.originRatioY=y};F(),this.dispose(e.anchorChanged.disposableOn(F))}{const F=()=>{f.opacity=e.opacity??p.ESGeoDiv.defaults.opacity};F(),this.dispose(e.opacityChanged.disposableOn(F))}this.disposeVar(new e.instanceClass(f.contentDiv,e,g))}},l=()=>{try{e.instanceClass?o.instanceClass=a():o.instanceClass=void 0}catch(u){console.error(u)}};l();const c=this.dv(w.createNextAnimateFrameEvent(e.instanceClassChanged,e.opacityChanged,e.anchorChanged,e.editingChanged,e.showChanged,e.allowPickingChanged));this.d(c.don(l))}}get screenPosition(){return this._screenPosition.value}get screenPositionChanged(){return this._screenPosition.changed}set screenPosition(e){this._screenPosition.value=e}}class sd extends w.Destroyable{constructor(e,t){super();C(this,"_imageLabel");C(this,"_hasClassDivAndPos",{});this._imageLabel=this.dv(new p.ESImageLabel),this._imageLabel.isHoverZoom=!1,this._imageLabel.parentID=e.id;const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}e.mainClass=this._imageLabel;const s=this._imageLabel;t.add(s),this.d(()=>t.delete(s));{const i=()=>{if(!n)return;if(!e.instanceClass)throw new Error("!sceneObject.instanceClass");const l=document.createElement("div"),c=this.dv(new e.instanceClass(l,e,t))._container;if(c.style.opacity=e.opacity.toString()??p.ESGeoDiv.defaults.opacity,c.style.position="fixed",c.style.zIndex="-1",c.style.top="0px",!document.body.contains(c)){document.body.appendChild(c);let d=c?c.querySelectorAll("*[class]"):[];for(let B=0;B<d.length;B++){const g=d[B];var u=g.getBoundingClientRect();this._hasClassDivAndPos[g.className]=[g.offsetLeft,g.offsetTop,g.offsetLeft+u.width,g.offsetTop+u.height]}}zw(c,{backgroundColor:null,allowTaint:!0,useCORS:!0,width:c.offsetWidth,height:c.offsetHeight,scale:1}).then(d=>{document.body.contains(c)&&document.body.removeChild(c),s.url=d.toDataURL(),s.show=e.show}).catch(()=>{document.body.contains(c)&&document.body.removeChild(c)})},o=()=>{try{e.instanceClass?i():(s.url="",s.show=!1)}catch(l){console.error(l)}};o();const a=this.dv(w.createNextAnimateFrameEvent(e.instanceClassChanged,e.opacityChanged));this.d(a.don(o))}{const i=()=>{s.show=e.show};s.show=!1,this.ad(e.showChanged.don(i))}this.d(w.track([s,"anchor"],[e,"anchor"])),this.d(w.bind([s,"position"],[e,"position"])),this.d(w.bind([s,"rotation"],[e,"rotation"])),this.d(w.bind([s,"flyToParam"],[e,"flyToParam"])),this.d(w.bind([s,"flyInParam"],[e,"flyInParam"])),this.d(w.bind([s,"allowPicking"],[e,"allowPicking"])),this.d(w.bind([s,"scale"],[e,"scale"])),this.d(w.track([s,"minVisibleDistance"],[e,"minVisibleDistance"])),this.d(w.track([s,"maxVisibleDistance"],[e,"maxVisibleDistance"])),this.ad(e.automaticLandingEvent.don(()=>{s.automaticLanding()})),this.d(t.widgetEvent.don(i=>{if(i.objId!==this._imageLabel.id)return;const{type:o,add:a}=i;if(o==="leftClick"&&a){const l=(a==null?void 0:a.classNames)??[],c=Object.keys(this._hasClassDivAndPos);for(let u=0;u<c.length;u++){const d=c[u];let B=this._hasClassDivAndPos[d];a&&a.mouseRelativePos&&a.mouseRelativePos[0]>=B[0]&&a.mouseRelativePos[0]<=B[2]&&a.mouseRelativePos[1]>=B[1]&&a.mouseRelativePos[1]<=B[3]&&l.push(d)}a.classNames=l}e.widgetEvent.emit({type:o,add:a})})),this.d(e.calcFlyToParamEvent.don(()=>{$A(n,s.id)})),this.d(e.calcFlyInParamEvent.don(()=>{const i=t.getCurrentCameraInfo();if(!i)return;const{position:o,rotation:a}=i;e.flyInParam={position:o,rotation:a,flyDuration:1}})),this.d(e.smoothMoveEvent.don((i,o)=>{_e(n,s.id,i,o)})),this.d(e.smoothMoveWithRotationEvent.don((i,o,a)=>{ke(n,s.id,i,o,a)})),this.d(e.smoothMoveOnGroundEvent.don((i,o,a,l)=>{Ge(n,s.id,i,o,l,a)})),this.d(e.smoothMoveWithRotationOnGroundEvent.don((i,o,a,l,c)=>{Ne(n,s.id,i,o,a,l,c)})),this.d(e.flyToEvent.don((i,o)=>{s.flyTo(i)})),this.d(e.flyInEvent.don(i=>{s.flyIn(i)}))}}const Dt=class Dt extends dA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.flyToFeatureIndexEvent.don((n,s)=>{t.callUeFunc({f:"flyToFeatureIndex",p:{id:A.id,index:n,duration:s}})})),this.d(A.flyToFeatureEvent.don((n,s,i)=>{t.callUeFunc({f:"flyToFeature",p:{id:A.id,key:n,value:s,duration:i}})}))}};C(Dt,"type",Dt.register("ESUeViewer",p.ESGeoJson.type,Dt));let ri=Dt;const Rt=class Rt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Rt,"type",Rt.register("ESUeViewer",p.ESGeoLineString.type,Rt));let Fn=Rt;const Pt=class Pt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Pt,"type",Pt.register("ESUeViewer",p.ESGeoRectangle.type,Pt));let ni=Pt;const Kt=class Kt extends uA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Kt,"type",Kt.register("ESUeViewer",p.ESGeoWater.type,Kt));let si=Kt;const oe=class oe extends x{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.setNodePositionEvent.don((n,s)=>{io(t,A.id,n,s)})),this.d(A.setNodeRotationEvent.don((n,s)=>{oo(t,A.id,n,s)})),this.d(A.setNodeScaleEvent.don((n,s)=>{ao(t,A.id,n,s)}))}};C(oe,"forceUeUpdateProps",[...x.forceUeUpdateProps,"url"]),C(oe,"propValFuncs",{...x.propValFuncs,url:A=>typeof A=="string"?p.ESSceneObject.context.getStrFromEnv(p.rpToap(A)):(A.url=p.ESSceneObject.context.getStrFromEnv(p.rpToap(A.url)),A),czmMaximumScale:null,czmMinimumPixelSize:null,czmNativeScale:null,czmColor:null}),C(oe,"type",oe.register("ESUeViewer",p.ESGltfModel.type,oe));let ii=oe;const xt=class xt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(xt,"type",xt.register("ESUeViewer",p.ESHeightMeasurement.type,xt));let oi=xt;const kt=class kt extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}const n=async(i,o,a,l)=>{const{viewer:c}=i;if(!c){console.error("AIMoveTo: ueViewer.viewer is undefined");return}const u=await c.callUeFunc({f:"AIMoveTo",p:{id:o,Destination:a,Time:l}});return u.error&&console.error("AIMoveTo:",u.error),u};this.d(A.aiMoveToEvent.don((i,o)=>{n(e,A.id,i,o)}));const s=async(i,o)=>{const{viewer:a}=i;if(!a){console.error("StopAIMove: ueViewer.viewer is undefined");return}const l=await a.callUeFunc({f:"StopAIMove",p:{id:o}});return l.error&&console.error("StopAIMove:",l.error),l};this.d(A.stopAIMoveEvent.don(()=>{s(e,A.id)}))}};C(kt,"type",kt.register("ESUeViewer",p.ESHuman.type,kt));let ai=kt;const ae=class ae extends UA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}A.anchor=[.5,1]}};C(ae,"type",ae.register("ESUeViewer",p.ESImageLabel.type,ae)),C(ae,"forceUeUpdateProps",[...UA.forceUeUpdateProps,"url"]),C(ae,"propValFuncs",{...UA.propValFuncs,url:A=>typeof A=="string"?p.ESSceneObject.context.getStrFromEnv(p.rpToap(A)):(A.url=p.ESSceneObject.context.getStrFromEnv(p.rpToap(A.url)),A)});let li=ae;const Gt=class Gt extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Gt,"type",Gt.register("ESUeViewer",p.ESLevelRuntimeModel.type,Gt));let ci=Gt;const Nt=class Nt extends Er{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Nt,"type",Nt.register("ESUeViewer",p.ESLocalCircle.type,Nt));let di=Nt;const _t=class _t extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(_t,"type",_t.register("ESUeViewer",p.ESLocalPolygonZ.type,_t));let ui=_t;const Vt=class Vt extends Er{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Vt,"type",Vt.register("ESUeViewer",p.ESLocalRectangle.type,Vt));let hi=Vt;const Ot=class Ot extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Ot,"type",Ot.register("ESUeViewer",p.ESLocalSkyBox.type,Ot));let gi=Ot;const Wt=class Wt extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Wt,"type",Wt.register("ESUeViewer",p.ESLocationMeasurement.type,Wt));let Bi=Wt;const Xt=class Xt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Xt,"type",Xt.register("ESUeViewer",p.ESPipeFence.type,Xt));let fi=Xt;const Jt=class Jt extends Fn{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Jt,"type",Jt.register("ESUeViewer",p.ESPipeline.type,Jt));let wi=Jt;const zt=class zt extends yr{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.highlightFeatureEvent.don(n=>{const s=typeof n=="number"?n.toString():n;to(t,A.id,s)})),this.d(A.highlightFeatureAndFlyToEvent.don((n,s,i,o)=>{const a=typeof n=="number"?n.toString():n;ro(t,A.id,a,o??1)})),this.d(A.setLayerVisibleEvent.don((n,s)=>{let i="";typeof s!="string"?i=JSON.stringify(s):i=s,no(t,A.id,i)})),this.d(A.setLayerColorEvent.don((n,s)=>{let i="";typeof s!="string"?i=JSON.stringify(s):i=s,so(t,A.id,i)}))}};C(zt,"type",zt.register("ESUeViewer",p.ESPipeserTileset.type,zt));let pi=zt;const Yt=class Yt extends uA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Yt,"type",Yt.register("ESUeViewer",p.ESPit.type,Yt));let Ci=Yt;const $t=class $t extends UA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.ad(A.getInitialStyleEvent.don(async()=>{try{const n=await t.callUeFunc({f:"GetInitialStyle",p:{id:A.id}});n.error!=""&&console.error("getInitialStyleEvent:",n.error),A.initialStyle.value=structuredClone(n.re)}catch(n){console.error("getInitialStyleEvent:",n),A.initialStyle.value=void 0}}))}};C($t,"type",$t.register("ESUeViewer",p.ESPoi2D.type,$t));let vi=$t;const Zt=class Zt extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Zt,"type",Zt.register("ESUeViewer",p.ESPoi3D.type,Zt));let mi=Zt;const le=class le extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(le,"type",le.register("ESUeViewer",p.ESPoiTileset.type,le)),C(le,"forceUeUpdateProps",[...dA.forceUeUpdateProps,"url"]),C(le,"propValFuncs",{...dA.propValFuncs,url:A=>typeof A=="string"?p.ESSceneObject.context.getStrFromEnv(A):(A.url=p.ESSceneObject.context.getStrFromEnv(A.url),A)});let Fi=le;const qt=class qt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(qt,"type",qt.register("ESUeViewer",p.ESPolygonFence.type,qt));let Qi=qt;const De=class De extends uA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(De,"type",De.register("ESUeViewer",p.ESPolygonFlattenedPlane.type,De)),C(De,"propValFuncs",{...uA.propValFuncs,targetID:A=>{if(!A)return"";const e=p.ESSceneObject.getSceneObject(A);return e?e.mainClass.id:A}});let Ui=De;const jt=class jt extends uA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(jt,"type",jt.register("ESUeViewer",p.ESPolygonWithHole.type,jt));let Ei=jt;const Ar=class Ar extends jA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}this.d(()=>{A.ids=[]}),this.d(A.highlightInner3DtilesetEvent.don(n=>{n.highlight=!0})),this.d(A.removeHighlightInner3DtilesetEvent.don(n=>{n.highlight=!1}));{const n=o=>{o=o.toLocaleLowerCase();let a=[255,255,255,1];if(o.startsWith("#")){if(o.length===4){let l=parseInt(o[1]+o[1],16),c=parseInt(o[2]+o[2],16),u=parseInt(o[3]+o[3],16);a=[l,c,u,1]}else if(o.length===7){let l=parseInt(o.substring(1,3),16),c=parseInt(o.substring(3,5),16),u=parseInt(o.substring(5,7),16);a=[l,c,u,1]}}else if(o.startsWith("rgba")){let l=o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(l){let c=parseInt(l[1]),u=parseInt(l[2]),d=parseInt(l[3]),B=parseFloat(l[4]);a=[c,u,d,B]}}else if(o.startsWith("rgb")){let l=o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);if(l){let c=parseInt(l[1]),u=parseInt(l[2]),d=parseInt(l[3]);a=[c,u,d,1]}}else console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");return[a[0]/255,a[1]/255,a[2]/255,a[3]]},s=()=>{const o=A.layerConfig;if(!o)return;const a=[];o.forEach(l=>{o.filter(u=>u.dataset==l.dataset).length==1?a.push({condition:[{field:"dataset",op:"==",value:l.dataset}],color:n(l.value.color??"rgb(255,255,255)"),show:l.value.visible}):a.push({condition:[{field:"layer",op:"==",value:l.layer},{field:"dataset",op:"==",value:l.dataset}],color:n(l.value.color??"rgb(255,255,255)"),show:l.value.visible})}),A.setFeatureStyle(a)};s();const i=this.dv(w.createNextAnimateFrameEvent(A.layerConfigChanged,A.colorBlendModeChanged));this.d(i.don(()=>{s()}))}}};C(Ar,"type",Ar.register("ESUeViewer",p.ESRtsTileset.type,Ar));let yi=Ar;const er=class er extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}this.d(A.addTreesEvent.don(n=>{p.addTreesCallFunc(e,A.id,n)})),this.d(A.removeAllTreesEvent.don(()=>{p.removeAllTreesCallFunc(e,A.id)})),this.d(A.updateTreeParamsEvent.don(n=>{p.updateTreeParamsCallFunc(e,A.id,n)})),this.d(A.cutDownTreesEvent.don((n,s)=>{p.cutDownTreesCallFunc(e,A.id,n,s)})),this.d(A.growthSimulationEvent.don((n,s,i)=>{p.growthSimulationCallFunc(e,A.id,n,s,i)}))}};C(er,"type",er.register("ESUeViewer",p.ESSeparateFoliage.type,er));let Si=er;const tr=class tr extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(tr,"type",tr.register("ESUeViewer",p.ESSubmergingAnalysis.type,tr));let Ii=tr;const rr=class rr extends uA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})})),this.d(A.stopEvent.don(()=>{t.callUeFunc({f:"Stop",p:{id:A.id}})}))}};C(rr,"type",rr.register("ESUeViewer",p.ESSunshineAnalysis.type,rr));let Ti=rr;const nr=class nr extends uA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})}))}};C(nr,"type",nr.register("ESUeViewer",p.ESSurfaceAreaMeasurement.type,nr));let Hi=nr;const sr=class sr extends UA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(sr,"type",sr.register("ESUeViewer",p.ESTextLabel.type,sr));let Li=sr;const Re=class Re extends UA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.callFunctionEvent.don(async(n,s)=>{const i=await yn(t,A.id,n,s);A.__callFunctionResultEvent.emit(i)}))}};C(Re,"type",Re.register("ESUeViewer",p.ESUEWidget.type,Re)),C(Re,"propValFuncs",{...UA.propValFuncs,info:A=>JSON.stringify(A??{})});let bi=Re;const id=r=>{switch(r){case 0:return"成功绑定";case 1:return"解绑之前的内容,成功绑定";case 2:return"未搜索到ActorTag,无法绑定";case 3:return"搜索到ActorTag但对应的Actor不是场景原有的,而是新建的,无法绑定";case 4:return"搜索到ActorTag对应的Actor是地形或3DTileset,无法绑定";default:return"未知错误"}},Zw=r=>{switch(r){case 0:return"创建成功";case 1:return"未找到对应的资源,无法创建";case 2:return"Id与场景中现有的ActorTag重复,创建后可能出现问题,创建失败";default:return"未知错误"}},ir=class ir extends p.EngineObject{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn(`${A.id} UeESUnrealActor viewer is undefined!`);return}this.d(()=>{Un(t,A.id)});const n=async()=>{l()||await t.callUeFunc({f:"update",p:{id:A.id,name:A.name,show:A.show,rotation:A.rotation,flyToParam:A.flyToParam??p.defaultFlyToParam,flyInParam:A.flyInParam??p.defaultFlyInParam,highlight:A.highlight,collision:A.collision,scale:A.scale,minVisibleDistance:A.minVisibleDistance,maxVisibleDistance:A.maxVisibleDistance}})},s=this.dv(w.createNextAnimateFrameEvent(A.showChanged,A.nameChanged,A.rotationChanged,A.flyToParamChanged,A.flyInParamChanged,A.highlightChanged,A.collisionChanged,A.scaleChanged,A.minVisibleDistanceChanged,A.maxVisibleDistanceChanged));this.d(s.don(n)),this.d(A.flushEvent.don(()=>s.flush()));let i,o;const a=async()=>{l()||(await t.callUeFunc({f:"update",p:{id:A.id,position:A.position}}),(e.debug??!1)&&console.log(`updatePostion:${A.position},actorTag:${A.actorTag},actorClass:${A.actorClass}`))},l=()=>!i&&!o?(console.warn(`${A.id} 未绑定ActorTag或未创建ActorClass!`),!0):!1,c=async()=>{const{id:d}=A,B=await e.unBindActorByID(d);B&&B.error!==""&&console.warn(`${A.id} UeESUnrealActor UnBindActorByID: ${B.error}`),i=void 0;const g=await t.callUeFunc({f:"destroy",p:{id:d}});if(g&&g.error!==""){console.warn(`${A.id} UeESUnrealActor DestroyActorByID: ${g.error}`);return}o=void 0},u=this.dv(w.react({type:"ActorClass",actorClass:"default"}));{const d=this.dv(w.createNextAnimateFrameEvent(A.actorClassChanged,A.actorTagChanged)),B=async()=>{A.actorTag!==""?u.value={type:"ActorTag",actorTag:A.actorTag}:u.value={type:"ActorClass",actorClass:A.actorClass===""?"default":A.actorClass}};B(),this.d(d.don(B)),this.d(A.flushEvent.don(()=>d.flush()))}{const d=this.dv(w.createProcessingFromAsyncFunc(async g=>{if(await g.promise(c()),u.value.type==="ActorTag"){const{actorTag:f}=u.value;await g.promise(c());try{A.lastActorStatus="null";const m=await g.promise(e.bindActorByTag(A.id,f));if(!m)return;if(m.error!==""){console.warn(`${A.id} UeESUnrealActor BindActorByTag:${f},${m.error}`);return}if(m.re.type===0)A.lastActorStatus="bound",i=f;else if(m.re.type===1)A.lastActorStatus="bound",i=f,console.warn(`${A.id} UeESUnrealActor BindActorByTag:${f},${id(m.re.type)}`);else{i=void 0,console.warn(`${A.id} UeESUnrealActor BindActorByTag error:${f}, ${id(m.re.type)}`);return}}catch(m){console.warn(`${A.id} UeESUnrealActor BindActorByTag catch error:${f}, ${m}`);return}}else if(u.value.type==="ActorClass"){const{actorClass:f}=u.value;try{const m=await g.promise(e.createActorByClass(A.id,f));if(!m)return;if(m.error!==""){console.warn(`${A.id} UeESUnrealActor CreateActorByClass error :${f}, ${m.error}`);return}if(m.re.type===0)A.lastActorStatus="created",o=f;else{console.warn(`${A.id} UeESUnrealActor CreateActorByClass error type :${f},${Zw(m.re.type)}`);return}}catch(m){console.warn(`${A.id} UeESUnrealActor CreateActorByClass error catch :${f}, ${JSON.stringify(m)}`);return}}await g.promise(n()),await g.promise(a())})),B=async()=>{d.restart()};B(),this.d(u.changed.don(B))}this.d(A.positionChanged.don(a)),this.d(A.callFunctionEvent.don(async(d,B)=>{if(l()){A.__callFunctionResultEvent.emit(void 0);return}const g=await yn(t,A.id,d,B);A.__callFunctionResultEvent.emit(g)})),this.d(A.smoothMoveEvent.don((d,B)=>{l()||_e(t,A.id,d,B)})),this.d(A.smoothMoveWithRotationEvent.don((d,B,g)=>{l()||ke(t,A.id,d,B,g)})),this.d(A.smoothMoveOnGroundEvent.don((d,B,g,f)=>{l()||Ge(t,A.id,d,B,f,g)})),this.d(A.smoothMoveWithRotationOnGroundEvent.don((d,B,g,f,m)=>{l()||Ne(t,A.id,d,B,g,f,m)})),this.d(A.automaticLandingEvent.don(d=>{if(l())return;const B=[A.position[0],A.position[1]];e.getHeightByLonLat(A.position[0],A.position[1],"Visibility").then(g=>{g!==null&&(A.position=[...B,g],A.collision=d)})})),this.d(A.flyToEvent.don(async(d,B)=>{if(l())return;const g=await Be(t,A.id,d);let f="over";g===void 0?f="error":g.endType===0?f="over":g.endType===1&&(f="cancelled"),A.flyOverEvent.emit(B,f,e)})),this.d(A.calcFlyToParamEvent.don(()=>{l()||$A(t,A.id)})),this.d(A.calcFlyInParamEvent.don(async()=>{if(!e.actived)return;const d=await e.getCurrentCameraInfo();if(!d)return;const{position:B,rotation:g}=d;A.flyInParam={position:B,rotation:g,flyDuration:1}})),this.d(e.propChanged.don(d=>{l()||d.objId===A.id&&Object.keys(d.props).forEach(B=>{const g=d.props[B]===null?void 0:d.props[B];A[B]=g})}))}};C(ir,"type",ir.register("ESUeViewer",p.ESUnrealActor.type,ir));let Mi=ir;const or=class or extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(or,"type",or.register("ESUeViewer",p.ESVideoFusion.type,or));let Di=or;const ar=class ar extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(ar,"type",ar.register("ESUeViewer",p.ESViewShed.type,ar));let Ri=ar;const lr=class lr extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is underfined!");return}}};C(lr,"type",lr.register("ESUeViewer",p.ESVisibilityAnalysis.type,lr));let Pi=lr;const cr=class cr extends uA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.ad(w.track([A,"volume"],[A,"cutAndFillVolume"])),this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})})),this.d(A.clearEvent.don(()=>{t.callUeFunc({f:"Clear",p:{id:A.id}})}))}};C(cr,"type",cr.register("ESUeViewer",p.ESVolumeMeasurement.type,cr));let Ki=cr;const Pe=class Pe extends UA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Pe,"type",Pe.register("ESUeViewer",p.ESWidget.type,Pe)),C(Pe,"propValFuncs",{...UA.propValFuncs,info:A=>JSON.stringify(A??{})});let xi=Pe;const dr=class dr extends p.EngineObject{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}A.poi.actorTag=A.human.id,A.poi.positionOffset=[0,0,A.poiOffsetHeight-.8],this.d(A.poiOffsetHeightChanged.don(()=>{A.poi.positionOffset=[0,0,A.poiOffsetHeight-.8]})),this.d(()=>{A.poi.actorTag=""})}};C(dr,"type",dr.register("ESUeViewer",p.ESHumanPoi.type,dr));let ki=dr;p.ESSceneObject.context.getStrFromEnv(p.ESNavigator.defaults.imgUrl);const ur=class ur extends p.EngineObject{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}const n=this.disposeVar(new p.ESCustomDiv);e.add(n),this.dispose(()=>e.delete(n)),this.dispose(w.track([n,"show"],[A,"show"])),n.instanceClass=class extends w.Destroyable{constructor(i,o,a){super(),this._subContainer=i;const l=document.createElement("div");this._subContainer.appendChild(l),this.dispose(()=>this._subContainer.removeChild(l));{const d=async()=>{const B=await e.getCurrentCameraInfo(),g=B==null?void 0:B.position,m=[...B==null?void 0:B.rotation];m[0]=360,e.flyIn(g,m)};l.addEventListener("click",d),l.style.cursor="pointer",this.dispose(()=>l.removeEventListener("click",d))}{const d=()=>{l.style.width=`${A.cssSize?A.cssSize:p.ESNavigator.defaults.cssSize}px`,l.style.height=`${A.cssSize?A.cssSize:p.ESNavigator.defaults.cssSize}px`};d(),A.dispose(A.cssSizeChanged.disposableOn(d))}l.style.position="fixed";{const d=()=>{l.style.top=`${A.cssPosition?A.cssPosition[0]:p.ESNavigator.defaults.cssPosition[0]}px`,l.style.right=`${A.cssPosition?A.cssPosition[1]:p.ESNavigator.defaults.cssPosition[1]}px`};d(),A.dispose(A.cssPositionChanged.disposableOn(d))}l.style.transition=" right 0.4s linear",l.style.cursor="pointer";const c=document.createElement("div");l.appendChild(c),this.dispose(()=>l.removeChild(c)),c.style.width="100%",c.style.height="100%",c.style.position="relative";const u=document.createElement("img");c.appendChild(u),this.dispose(()=>c.removeChild(u)),u.style.width="100%",u.style.height="100%",u.style.border="none";{const d=()=>u.src=A.imgUrl;d(),A.dispose(A.imgUrlChanged.disposableOn(d))}{const d=()=>{const m=-e.getCurrentCameraInfo().rotation[0];u.style.transform=`rotate(${m}deg)`};let B;const g=async()=>{d(),A.show?(l.style.display="block",B=setInterval(()=>{d()},1e3)):(l.style.display="none",clearInterval(B))};this.dispose(A.showChanged.disposableOn(g)),g(),this.dispose(()=>clearInterval(B))}u.style.transformOrigin="50% 50%"}}}};C(ur,"type",ur.register("ESUeViewer",p.ESNavigator.type,ur));let Gi=ur;const ce=class ce extends nA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}{const n=()=>{let s=A.materialMode==="blue"?"multipleArrows":A.materialMode==="purple"?"singleArrow":A.materialMode;t.callUeFunc({f:"update",p:{id:A.id,materialMode:s}})};this.dispose(A.materialModeChanged.disposableOn(n)),this.dispose(A.createdEvent.disposableOn(n))}}};C(ce,"type",ce.register("ESUeViewer",p.ESPath.type,ce)),C(ce,"forceUeUpdateProps",[...nA.forceUeUpdateProps]),C(ce,"propValFuncs",{...nA.propValFuncs,materialMode:null});let Ni=ce;async function qw(r){navigator.clipboard.writeText(r).then(function(){console.log("复制成功")},function(A){console.log("复制失败")})}const hr=class hr extends p.EngineObject{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}const n=this.disposeVar(new p.ESCustomDiv);e.add(n),this.dispose(()=>e.delete(n)),n.instanceClass=class extends w.Destroyable{constructor(i,o,a){if(super(),this._subContainer=i,!a||!(a instanceof bA))return;const l=document.createElement("div");this._subContainer.appendChild(l),this.dispose(()=>this._subContainer.removeChild(l)),l.style.width="100%",l.style.position="absolute",l.style.height=`${p.ESViewerStatusBar.defaults.height}px`,l.style.left="0",l.style.bottom="0",l.style.color="#fff",l.style.padding="0 20px 0 0",l.style.boxSizing="border-box",l.style.lineHeight=`${p.ESViewerStatusBar.defaults.height}px`,l.style.zIndex="100",l.style.alignContent="center",l.style.justifyContent="space-between";const c=document.createElement("span");l.appendChild(c),this.dispose(()=>l.removeChild(c));const u=document.createElement("span");c.appendChild(u),this.dispose(()=>c.removeChild(u));const d=document.createElement("span");c.appendChild(d),d.addEventListener("dblclick",function(){let g=d.innerHTML;g.startsWith("鼠标位置")&&(g=g.slice(5)),qw(g)}),d.style.cursor="pointer",this.dispose(()=>c.removeChild(d));const B=document.createElement("span");l.appendChild(B),this.dispose(()=>l.removeChild(B));{const g=()=>{l.style.height=(A.height??p.ESViewerStatusBar.defaults.height)+"px",l.style.lineHeight=(A.height??p.ESViewerStatusBar.defaults.height)+"px"};this.dispose(A.heightChanged.disposableOn(g)),g()}{const g=()=>{l.style.fontSize=(A.fontSize??p.ESViewerStatusBar.defaults.fontSize)+"px"};this.dispose(A.fontSizeChanged.disposableOn(g)),g()}{const g=()=>{A.bgColor?l.style.background=`rgba(${A.bgColor[0]*255},${A.bgColor[1]*255},${A.bgColor[2]*255},${A.bgColor[3]})`:l.style.background=`rgba(${p.ESViewerStatusBar.defaults.bgColor[0]},${p.ESViewerStatusBar.defaults.bgColor[1]},${p.ESViewerStatusBar.defaults.bgColor[2]},${p.ESViewerStatusBar.defaults.bgColor[3]})`};this.dispose(A.bgColorChanged.disposableOn(g)),g()}a.getVersion().then(g=>{g&&(B.innerText=`Ue 版本 : ${g[0]} `)}).catch(g=>{console.log(g)});{const g=()=>{let F="",Q="";F+=`帧率:${a.getFPS().toFixed(0)}FPS`,u.innerText=F;const y=e.getCurrentCameraInfo();F+=` 经度: ${y.position[0].toFixed(5)}° 纬度: ${y.position[1].toFixed(5)}° 高度: ${y.position[2].toFixed(2)}米 偏航角: ${y.rotation[0].toFixed(2)}° 俯仰角: ${y.rotation[1].toFixed(2)}° 翻滚角:${y.rotation[2].toFixed(2)}° `,u.innerText=F,e.pick().then(L=>{if(L){const{pickResult:I}=L;if(I&&I.position){const{position:E}=I;Q+=`鼠标位置:${E[0].toFixed(5)}° ${E[1].toFixed(5)}° ${E[2].toFixed(2)}m`}else Q+="暂时无法获取鼠标位置...";d.innerText=Q}}).catch(L=>{console.log(L)})};let f;const m=async()=>{g(),A.show?(l.style.display="flex",f=setInterval(()=>{g()},1e3)):(l.style.display="none",clearInterval(f))};this.dispose(A.showChanged.disposableOn(m)),m(),this.dispose(()=>clearInterval(f))}}}}};C(hr,"type",hr.register("ESUeViewer",p.ESViewerStatusBar.type,hr));let _i=hr;const gr=class gr extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(gr,"type",gr.register("ESUeViewer",p.ESGaussianSplatting.type,gr));let Vi=gr;const Br=class Br extends jA{constructor(e,t){super(e,t);C(this,"_es3DTileset",this.dv(new p.ES3DTileset));if(!t.viewer){console.warn("viewer is undefined!");return}this.es3DTileset.parentID=e.id,e.mainClass=this._es3DTileset;{const s=this._es3DTileset;t.add(s),this.dispose(()=>t.delete(s)),this.d(w.track([s,"allowPicking"],[e,"allowPicking"])),this.d(w.track([s,"collision"],[e,"collision"])),this.d(w.bind([s,"flyToParam"],[e,"flyToParam"])),this.d(w.bind([s,"flyToParam"],[e,"flyToParam"])),this.d(w.track([s,"url"],[e,"url"])),this.d(w.track([s,"actorTag"],[e,"actorTag"])),this.d(w.track([s,"materialMode"],[e,"materialMode"])),this.d(w.track([s,"highlight"],[e,"highlight"])),this.d(w.track([s,"maximumScreenSpaceError"],[e,"maximumScreenSpaceError"])),this.d(w.track([s,"highlightID"],[e,"highlightID"])),this.d(w.track([s,"highlightColor"],[e,"highlightColor"])),this.d(w.bind([s,"offset"],[e,"offset"])),this.d(w.bind([s,"rotation"],[e,"rotation"])),this.d(w.track([s,"czmImageBasedLightingFactor"],[e,"czmImageBasedLightingFactor"])),this.d(w.track([s,"czmLuminanceAtZenith"],[e,"czmLuminanceAtZenith"])),this.d(w.track([s,"czmMaximumMemoryUsage"],[e,"czmMaximumMemoryUsage"])),this.d(w.track([s,"czmClassificationType"],[e,"czmClassificationType"])),this.d(w.track([s,"czmStyleJson"],[e,"czmStyleJson"])),this.d(w.track([s,"czmBackFaceCulling"],[e,"czmBackFaceCulling"])),this.d(w.track([s,"czmDebugShowBoundingVolume"],[e,"czmDebugShowBoundingVolume"])),this.d(w.track([s,"czmDebugShowContentBoundingVolume"],[e,"czmDebugShowContentBoundingVolume"])),this.d(w.track([s,"colorBlendMode"],[e,"colorBlendMode"])),this.d(w.track([s,"cacheBytes"],[e,"cacheBytes"])),this.d(w.track([s,"clippingPlaneEnabled"],[e,"clippingPlaneEnabled"])),this.d(w.track([s,"unionClippingRegions"],[e,"unionClippingRegions"])),this.d(w.track([s,"clippingPlaneEdgeColor"],[e,"clippingPlaneEdgeColor"])),this.d(w.track([s,"clippingPlaneEdgeWidth"],[e,"clippingPlaneEdgeWidth"])),this.d(w.track([s,"materialParams"],[e,"materialParams"])),this.d(w.bind([s,"supportEdit"],[e,"supportEdit"])),this.d(w.bind([s,"clippingPlanesId"],[e,"clippingPlanesId"])),this.d(w.bind([s,"clippingPlaneIds"],[e,"clippingPlaneIds"])),this.d(w.bind([s,"flattenedPlaneId"],[e,"flattenedPlaneId"])),this.d(w.bind([s,"flattenedPlaneEnabled"],[e,"flattenedPlaneEnabled"])),this.d(w.bind([s,"clippingPlaneId"],[e,"clippingPlaneId"])),this.d(w.bind([s,"excavateId"],[e,"excavateId"]))}{const s=this._es3DTileset;this.d(e.refreshTilesetEvent.don(()=>{s.refreshTileset()})),this.d(e.highlightFeatureEvent.don((...i)=>{s.highlightFeature(...i)})),this.d(e.highlightFeatureAndFlyToEvent.don((...i)=>{s.highlightFeatureAndFlyTo(...i)})),this.d(e.setFeatureColorEvent.don((...i)=>{s.setFeatureColor(...i)})),this.d(e.setFeatureVisableEvent.don((...i)=>{s.setFeatureVisable(...i)})),this.d(e.resetFeatureStyleEvent.don((...i)=>{s.resetFeatureStyle(...i)})),this.d(e.flyInEvent.don((...i)=>{s.flyIn(i[0])})),this.d(e.flyToEvent.don((...i)=>{s.flyTo(i[0])})),this.d(e.calcFlyToParamEvent.don((...i)=>{s.calcFlyToParam(...i)})),this.d(e.calcFlyInParamEvent.don((...i)=>{s.calcFlyInParam(...i)}))}{const s=this._es3DTileset;this.d(s.tilesetReady.don(i=>{e.tilesetReady.emit(i)})),this.d(s.pickedEvent.don(i=>{i.assign({sceneObject:e}),e.pickedEvent.emit(i)}))}{const s=()=>{this.es3DTileset.show=e.show};s(),this.d(e.showChanged.don(()=>{s()}))}}get es3DTileset(){return this._es3DTileset}};C(Br,"type",Br.register("ESUeViewer",p.ESRtsFeatureEditing.type,Br));let Oi=Br;const fr=class fr extends jA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(fr,"type",fr.register("ESUeViewer",p.ESMsTileset.type,fr));let Wi=fr;const wr=class wr extends uA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}const n=()=>{t.callUeFunc({f:"update",p:{id:A.id,height:A.height??p.ESGeoExtrudedPolygon.defaults.height,extrudedHeight:A.extrudedHeight??p.ESGeoExtrudedPolygon.defaults.extrudedHeight,perPositionHeight:A.perPositionHeight??p.ESGeoExtrudedPolygon.defaults.perPositionHeight}})},s=this.disposeVar(w.createNextAnimateFrameEvent(A.heightChanged,A.extrudedHeightChanged,A.perPositionHeightChanged));this.dispose(s.disposableOn(n)),this.dispose(A.createdEvent.disposableOn(n))}};C(wr,"type",wr.register("ESUeViewer",p.ESGeoExtrudedPolygon.type,wr));let Xi=wr;const pr=class pr extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(pr,"type",pr.register("ESUeViewer",p.ESStaticMesh.type,pr));let Ji=pr;const Cr=class Cr extends nA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})})),this.d(A.clearEvent.don(()=>{t.callUeFunc({f:"Clear",p:{id:A.id}})}))}};C(Cr,"type",Cr.register("ESUeViewer",p.ESSkylineAnalysis.type,Cr));let zi=Cr;v.copyright=void 0;try{const r="earthsdk3-ue",A="3.4.0-beta.4",e="2025-09-02T06:26:49.000Z",t="北京西部世界科技有限公司",n="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="1c85a7938326029bfd0efde53b240e71da26ae46",o=((Date.now()-1756794409e3)/36e5).toFixed(1),a=`%c🌏 ${r}%c ${A}.${s.slice(0,8)}.${e} (距今${o}个小时)
112
+ .`+Zs+cw+Jc)},uw=function(r,A){var e=r.ownerDocument;if(e){var t=e.createElement("style");t.textContent=A,r.appendChild(t)}},zc=function(){function r(){}return r.getOrigin=function(A){var e=r._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},r.isSameOrigin=function(A){return r.getOrigin(A)===r._origin},r.setContext=function(A){r._link=A.document.createElement("a"),r._origin=r.getOrigin(A.location.href)},r._origin="about:blank",r}(),hw=function(){function r(A,e){this.context=A,this._options=e,this._cache={}}return r.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)||(js(A)||ww(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),e},r.prototype.match=function(A){return this._cache[A]},r.prototype.loadImage=function(A){return hA(this,void 0,void 0,function(){var e,t,n,s,i=this;return sA(this,function(o){switch(o.label){case 0:return e=zc.isSameOrigin(A),t=!qs(A)&&this._options.useCORS===!0&&rA.SUPPORT_CORS_IMAGES&&!e,n=!qs(A)&&!e&&!js(A)&&typeof this._options.proxy=="string"&&rA.SUPPORT_CORS_XHR&&!t,!e&&this._options.allowTaint===!1&&!qs(A)&&!js(A)&&!n&&!t?[2]:(s=A,n?[4,this.proxy(s)]:[3,2]);case 1:s=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(a,l){var c=new Image;c.onload=function(){return a(c)},c.onerror=l,(pw(s)||t)&&(c.crossOrigin="anonymous"),c.src=s,c.complete===!0&&setTimeout(function(){return a(c)},500),i._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},r.prototype.has=function(A){return typeof this._cache[A]<"u"},r.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},r.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var n=A.substring(0,256);return new Promise(function(s,i){var o=rA.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(a.status===200)if(o==="text")s(a.response);else{var u=new FileReader;u.addEventListener("load",function(){return s(u.result)},!1),u.addEventListener("error",function(d){return i(d)},!1),u.readAsDataURL(a.response)}else i("Failed to proxy resource "+n+" with status code "+a.status)},a.onerror=i;var l=t.indexOf("?")>-1?"&":"?";if(a.open("GET",""+t+l+"url="+encodeURIComponent(A)+"&responseType="+o),o!=="text"&&a instanceof XMLHttpRequest&&(a.responseType=o),e._options.imageTimeout){var c=e._options.imageTimeout;a.timeout=c,a.ontimeout=function(){return i("Timed out ("+c+"ms) proxying "+n)}}a.send()})},r}(),gw=/^data:image\/svg\+xml/i,Bw=/^data:image\/.*;base64,/i,fw=/^data:image\/.*/i,ww=function(r){return rA.SUPPORT_SVG_DRAWING||!Cw(r)},qs=function(r){return fw.test(r)},pw=function(r){return Bw.test(r)},js=function(r){return r.substr(0,4)==="blob"},Cw=function(r){return r.substr(-3).toLowerCase()==="svg"||gw.test(r)},S=function(){function r(A,e){this.type=0,this.x=A,this.y=e}return r.prototype.add=function(A,e){return new r(this.x+A,this.y+e)},r}(),Ie=function(r,A,e){return new S(r.x+(A.x-r.x)*e,r.y+(A.y-r.y)*e)},Bn=function(){function r(A,e,t,n){this.type=1,this.start=A,this.startControl=e,this.endControl=t,this.end=n}return r.prototype.subdivide=function(A,e){var t=Ie(this.start,this.startControl,A),n=Ie(this.startControl,this.endControl,A),s=Ie(this.endControl,this.end,A),i=Ie(t,n,A),o=Ie(n,s,A),a=Ie(i,o,A);return e?new r(this.start,t,i,a):new r(a,o,s,this.end)},r.prototype.add=function(A,e){return new r(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},r.prototype.reverse=function(){return new r(this.end,this.endControl,this.startControl,this.start)},r}(),CA=function(r){return r.type===1},vw=function(){function r(A){var e=A.styles,t=A.bounds,n=st(e.borderTopLeftRadius,t.width,t.height),s=n[0],i=n[1],o=st(e.borderTopRightRadius,t.width,t.height),a=o[0],l=o[1],c=st(e.borderBottomRightRadius,t.width,t.height),u=c[0],d=c[1],B=st(e.borderBottomLeftRadius,t.width,t.height),g=B[0],f=B[1],m=[];m.push((s+a)/t.width),m.push((g+u)/t.width),m.push((i+f)/t.height),m.push((l+d)/t.height);var F=Math.max.apply(Math,m);F>1&&(s/=F,i/=F,a/=F,l/=F,u/=F,d/=F,g/=F,f/=F);var Q=t.width-a,y=t.height-d,L=t.width-u,I=t.height-f,E=e.borderTopWidth,R=e.borderRightWidth,P=e.borderBottomWidth,D=e.borderLeftWidth,W=_(e.paddingTop,A.bounds.width),oA=_(e.paddingRight,A.bounds.width),$=_(e.paddingBottom,A.bounds.width),G=_(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=s>0||i>0?O(t.left+D/3,t.top+E/3,s-D/3,i-E/3,k.TOP_LEFT):new S(t.left+D/3,t.top+E/3),this.topRightBorderDoubleOuterBox=s>0||i>0?O(t.left+Q,t.top+E/3,a-R/3,l-E/3,k.TOP_RIGHT):new S(t.left+t.width-R/3,t.top+E/3),this.bottomRightBorderDoubleOuterBox=u>0||d>0?O(t.left+L,t.top+y,u-R/3,d-P/3,k.BOTTOM_RIGHT):new S(t.left+t.width-R/3,t.top+t.height-P/3),this.bottomLeftBorderDoubleOuterBox=g>0||f>0?O(t.left+D/3,t.top+I,g-D/3,f-P/3,k.BOTTOM_LEFT):new S(t.left+D/3,t.top+t.height-P/3),this.topLeftBorderDoubleInnerBox=s>0||i>0?O(t.left+D*2/3,t.top+E*2/3,s-D*2/3,i-E*2/3,k.TOP_LEFT):new S(t.left+D*2/3,t.top+E*2/3),this.topRightBorderDoubleInnerBox=s>0||i>0?O(t.left+Q,t.top+E*2/3,a-R*2/3,l-E*2/3,k.TOP_RIGHT):new S(t.left+t.width-R*2/3,t.top+E*2/3),this.bottomRightBorderDoubleInnerBox=u>0||d>0?O(t.left+L,t.top+y,u-R*2/3,d-P*2/3,k.BOTTOM_RIGHT):new S(t.left+t.width-R*2/3,t.top+t.height-P*2/3),this.bottomLeftBorderDoubleInnerBox=g>0||f>0?O(t.left+D*2/3,t.top+I,g-D*2/3,f-P*2/3,k.BOTTOM_LEFT):new S(t.left+D*2/3,t.top+t.height-P*2/3),this.topLeftBorderStroke=s>0||i>0?O(t.left+D/2,t.top+E/2,s-D/2,i-E/2,k.TOP_LEFT):new S(t.left+D/2,t.top+E/2),this.topRightBorderStroke=s>0||i>0?O(t.left+Q,t.top+E/2,a-R/2,l-E/2,k.TOP_RIGHT):new S(t.left+t.width-R/2,t.top+E/2),this.bottomRightBorderStroke=u>0||d>0?O(t.left+L,t.top+y,u-R/2,d-P/2,k.BOTTOM_RIGHT):new S(t.left+t.width-R/2,t.top+t.height-P/2),this.bottomLeftBorderStroke=g>0||f>0?O(t.left+D/2,t.top+I,g-D/2,f-P/2,k.BOTTOM_LEFT):new S(t.left+D/2,t.top+t.height-P/2),this.topLeftBorderBox=s>0||i>0?O(t.left,t.top,s,i,k.TOP_LEFT):new S(t.left,t.top),this.topRightBorderBox=a>0||l>0?O(t.left+Q,t.top,a,l,k.TOP_RIGHT):new S(t.left+t.width,t.top),this.bottomRightBorderBox=u>0||d>0?O(t.left+L,t.top+y,u,d,k.BOTTOM_RIGHT):new S(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=g>0||f>0?O(t.left,t.top+I,g,f,k.BOTTOM_LEFT):new S(t.left,t.top+t.height),this.topLeftPaddingBox=s>0||i>0?O(t.left+D,t.top+E,Math.max(0,s-D),Math.max(0,i-E),k.TOP_LEFT):new S(t.left+D,t.top+E),this.topRightPaddingBox=a>0||l>0?O(t.left+Math.min(Q,t.width-R),t.top+E,Q>t.width+R?0:Math.max(0,a-R),Math.max(0,l-E),k.TOP_RIGHT):new S(t.left+t.width-R,t.top+E),this.bottomRightPaddingBox=u>0||d>0?O(t.left+Math.min(L,t.width-D),t.top+Math.min(y,t.height-P),Math.max(0,u-R),Math.max(0,d-P),k.BOTTOM_RIGHT):new S(t.left+t.width-R,t.top+t.height-P),this.bottomLeftPaddingBox=g>0||f>0?O(t.left+D,t.top+Math.min(I,t.height-P),Math.max(0,g-D),Math.max(0,f-P),k.BOTTOM_LEFT):new S(t.left+D,t.top+t.height-P),this.topLeftContentBox=s>0||i>0?O(t.left+D+G,t.top+E+W,Math.max(0,s-(D+G)),Math.max(0,i-(E+W)),k.TOP_LEFT):new S(t.left+D+G,t.top+E+W),this.topRightContentBox=a>0||l>0?O(t.left+Math.min(Q,t.width+D+G),t.top+E+W,Q>t.width+D+G?0:a-D+G,l-(E+W),k.TOP_RIGHT):new S(t.left+t.width-(R+oA),t.top+E+W),this.bottomRightContentBox=u>0||d>0?O(t.left+Math.min(L,t.width-(D+G)),t.top+Math.min(y,t.height+E+W),Math.max(0,u-(R+oA)),d-(P+$),k.BOTTOM_RIGHT):new S(t.left+t.width-(R+oA),t.top+t.height-(P+$)),this.bottomLeftContentBox=g>0||f>0?O(t.left+D+G,t.top+I,Math.max(0,g-(D+G)),f-(P+$),k.BOTTOM_LEFT):new S(t.left+D+G,t.top+t.height-(P+$))}return r}(),k;(function(r){r[r.TOP_LEFT=0]="TOP_LEFT",r[r.TOP_RIGHT=1]="TOP_RIGHT",r[r.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",r[r.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(k||(k={}));var O=function(r,A,e,t,n){var s=4*((Math.sqrt(2)-1)/3),i=e*s,o=t*s,a=r+e,l=A+t;switch(n){case k.TOP_LEFT:return new Bn(new S(r,l),new S(r,l-o),new S(a-i,A),new S(a,A));case k.TOP_RIGHT:return new Bn(new S(r,A),new S(r+i,A),new S(a,l-o),new S(a,l));case k.BOTTOM_RIGHT:return new Bn(new S(a,A),new S(a,A+o),new S(r+i,l),new S(r,l));case k.BOTTOM_LEFT:default:return new Bn(new S(a,l),new S(a-i,l),new S(r,A+o),new S(r,A))}},fn=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},mw=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},wn=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},Fw=function(){function r(A,e,t){this.offsetX=A,this.offsetY=e,this.matrix=t,this.type=0,this.target=6}return r}(),pn=function(){function r(A,e){this.path=A,this.target=e,this.type=1}return r}(),Qw=function(){function r(A){this.opacity=A,this.type=2,this.target=6}return r}(),Uw=function(r){return r.type===0},Yc=function(r){return r.type===1},Ew=function(r){return r.type===2},$c=function(r,A){return r.length===A.length?r.some(function(e,t){return e===A[t]}):!1},yw=function(r,A,e,t,n){return r.map(function(s,i){switch(i){case 0:return s.add(A,e);case 1:return s.add(A+t,e);case 2:return s.add(A+t,e+n);case 3:return s.add(A,e+n)}return s})},Zc=function(){function r(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r}(),qc=function(){function r(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new vw(this.container),this.container.styles.opacity<1&&this.effects.push(new Qw(this.container.styles.opacity)),this.container.styles.transform!==null){var t=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,s=this.container.styles.transform;this.effects.push(new Fw(t,n,s))}if(this.container.styles.overflowX!==0){var i=fn(this.curves),o=wn(this.curves);$c(i,o)?this.effects.push(new pn(i,6)):(this.effects.push(new pn(i,2)),this.effects.push(new pn(o,4)))}}return r.prototype.getEffects=function(A){for(var e=[2,3].indexOf(this.container.styles.position)===-1,t=this.parent,n=this.effects.slice(0);t;){var s=t.effects.filter(function(a){return!Yc(a)});if(e||t.container.styles.position!==0||!t.parent){if(n.unshift.apply(n,s),e=[2,3].indexOf(t.container.styles.position)===-1,t.container.styles.overflowX!==0){var i=fn(t.curves),o=wn(t.curves);$c(i,o)||n.unshift(new pn(o,6))}}else n.unshift.apply(n,s);t=t.parent}return n.filter(function(a){return q(a.target,A)})},r}(),Ai=function(r,A,e,t){r.container.elements.forEach(function(n){var s=q(n.flags,4),i=q(n.flags,2),o=new qc(n,r);q(n.styles.display,2048)&&t.push(o);var a=q(n.flags,8)?[]:t;if(s||i){var l=s||n.styles.isPositioned()?e:A,c=new Zc(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var u=n.styles.zIndex.order;if(u<0){var d=0;l.negativeZIndex.some(function(g,f){return u>g.element.container.styles.zIndex.order?(d=f,!1):d>0}),l.negativeZIndex.splice(d,0,c)}else if(u>0){var B=0;l.positiveZIndex.some(function(g,f){return u>=g.element.container.styles.zIndex.order?(B=f+1,!1):B>0}),l.positiveZIndex.splice(B,0,c)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else n.styles.isFloating()?l.nonPositionedFloats.push(c):l.nonPositionedInlineLevel.push(c);Ai(o,c,s?c:e,a)}else n.styles.isInlineLevel()?A.inlineLevel.push(o):A.nonInlineLevel.push(o),Ai(o,A,e,a);q(n.flags,8)&&jc(n,a)})},jc=function(r,A){for(var e=r instanceof Vs?r.start:1,t=r instanceof Vs?r.reversed:!1,n=0;n<A.length;n++){var s=A[n];s.container instanceof Uc&&typeof s.container.value=="number"&&s.container.value!==0&&(e=s.container.value),s.listValue=dt(e,s.container.styles.listStyleType,!0),e+=t?-1:1}},Sw=function(r){var A=new qc(r,null),e=new Zc(A),t=[];return Ai(A,e,e,t),jc(A.container,t),e},Ad=function(r,A){switch(A){case 0:return vA(r.topLeftBorderBox,r.topLeftPaddingBox,r.topRightBorderBox,r.topRightPaddingBox);case 1:return vA(r.topRightBorderBox,r.topRightPaddingBox,r.bottomRightBorderBox,r.bottomRightPaddingBox);case 2:return vA(r.bottomRightBorderBox,r.bottomRightPaddingBox,r.bottomLeftBorderBox,r.bottomLeftPaddingBox);case 3:default:return vA(r.bottomLeftBorderBox,r.bottomLeftPaddingBox,r.topLeftBorderBox,r.topLeftPaddingBox)}},Iw=function(r,A){switch(A){case 0:return vA(r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox,r.topRightBorderBox,r.topRightBorderDoubleOuterBox);case 1:return vA(r.topRightBorderBox,r.topRightBorderDoubleOuterBox,r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox);case 2:return vA(r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox,r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox);case 3:default:return vA(r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox,r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox)}},Tw=function(r,A){switch(A){case 0:return vA(r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox,r.topRightBorderDoubleInnerBox,r.topRightPaddingBox);case 1:return vA(r.topRightBorderDoubleInnerBox,r.topRightPaddingBox,r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox);case 2:return vA(r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox,r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox);case 3:default:return vA(r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox,r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox)}},Hw=function(r,A){switch(A){case 0:return Cn(r.topLeftBorderStroke,r.topRightBorderStroke);case 1:return Cn(r.topRightBorderStroke,r.bottomRightBorderStroke);case 2:return Cn(r.bottomRightBorderStroke,r.bottomLeftBorderStroke);case 3:default:return Cn(r.bottomLeftBorderStroke,r.topLeftBorderStroke)}},Cn=function(r,A){var e=[];return CA(r)?e.push(r.subdivide(.5,!1)):e.push(r),CA(A)?e.push(A.subdivide(.5,!0)):e.push(A),e},vA=function(r,A,e,t){var n=[];return CA(r)?n.push(r.subdivide(.5,!1)):n.push(r),CA(e)?n.push(e.subdivide(.5,!0)):n.push(e),CA(t)?n.push(t.subdivide(.5,!0).reverse()):n.push(t),CA(A)?n.push(A.subdivide(.5,!1).reverse()):n.push(A),n},ed=function(r){var A=r.bounds,e=r.styles;return A.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},vn=function(r){var A=r.styles,e=r.bounds,t=_(A.paddingLeft,e.width),n=_(A.paddingRight,e.width),s=_(A.paddingTop,e.width),i=_(A.paddingBottom,e.width);return e.add(t+A.borderLeftWidth,s+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+t+n),-(A.borderTopWidth+A.borderBottomWidth+s+i))},Lw=function(r,A){return r===0?A.bounds:r===2?vn(A):ed(A)},bw=function(r,A){return r===0?A.bounds:r===2?vn(A):ed(A)},ei=function(r,A,e){var t=Lw(He(r.styles.backgroundOrigin,A),r),n=bw(He(r.styles.backgroundClip,A),r),s=Mw(He(r.styles.backgroundSize,A),e,t),i=s[0],o=s[1],a=st(He(r.styles.backgroundPosition,A),t.width-i,t.height-o),l=Dw(He(r.styles.backgroundRepeat,A),a,s,t,n),c=Math.round(t.left+a[0]),u=Math.round(t.top+a[1]);return[l,c,u,i,o]},Te=function(r){return N(r)&&r.value===Ue.AUTO},mn=function(r){return typeof r=="number"},Mw=function(r,A,e){var t=A[0],n=A[1],s=A[2],i=r[0],o=r[1];if(!i)return[0,0];if(Y(i)&&o&&Y(o))return[_(i,e.width),_(o,e.height)];var a=mn(s);if(N(i)&&(i.value===Ue.CONTAIN||i.value===Ue.COVER)){if(mn(s)){var l=e.width/e.height;return l<s!=(i.value===Ue.COVER)?[e.width,e.width/s]:[e.height*s,e.height]}return[e.width,e.height]}var c=mn(t),u=mn(n),d=c||u;if(Te(i)&&(!o||Te(o))){if(c&&u)return[t,n];if(!a&&!d)return[e.width,e.height];if(d&&a){var B=c?t:n*s,g=u?n:t/s;return[B,g]}var f=c?t:e.width,m=u?n:e.height;return[f,m]}if(a){var F=0,Q=0;return Y(i)?F=_(i,e.width):Y(o)&&(Q=_(o,e.height)),Te(i)?F=Q*s:(!o||Te(o))&&(Q=F/s),[F,Q]}var y=null,L=null;if(Y(i)?y=_(i,e.width):o&&Y(o)&&(L=_(o,e.height)),y!==null&&(!o||Te(o))&&(L=c&&u?y/t*n:e.height),L!==null&&Te(i)&&(y=c&&u?L/n*t:e.width),y!==null&&L!==null)return[y,L];throw new Error("Unable to calculate background-size for element")},He=function(r,A){var e=r[A];return typeof e>"u"?r[0]:e},Dw=function(r,A,e,t,n){var s=A[0],i=A[1],o=e[0],a=e[1];switch(r){case 2:return[new S(Math.round(t.left),Math.round(t.top+i)),new S(Math.round(t.left+t.width),Math.round(t.top+i)),new S(Math.round(t.left+t.width),Math.round(a+t.top+i)),new S(Math.round(t.left),Math.round(a+t.top+i))];case 3:return[new S(Math.round(t.left+s),Math.round(t.top)),new S(Math.round(t.left+s+o),Math.round(t.top)),new S(Math.round(t.left+s+o),Math.round(t.height+t.top)),new S(Math.round(t.left+s),Math.round(t.height+t.top))];case 1:return[new S(Math.round(t.left+s),Math.round(t.top+i)),new S(Math.round(t.left+s+o),Math.round(t.top+i)),new S(Math.round(t.left+s+o),Math.round(t.top+i+a)),new S(Math.round(t.left+s),Math.round(t.top+i+a))];default:return[new S(Math.round(n.left),Math.round(n.top)),new S(Math.round(n.left+n.width),Math.round(n.top)),new S(Math.round(n.left+n.width),Math.round(n.height+n.top)),new S(Math.round(n.left),Math.round(n.height+n.top))]}},Rw="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",td="Hidden Text",Pw=function(){function r(A){this._data={},this._document=A}return r.prototype.parseMetrics=function(A,e){var t=this._document.createElement("div"),n=this._document.createElement("img"),s=this._document.createElement("span"),i=this._document.body;t.style.visibility="hidden",t.style.fontFamily=A,t.style.fontSize=e,t.style.margin="0",t.style.padding="0",t.style.whiteSpace="nowrap",i.appendChild(t),n.src=Rw,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",s.style.fontFamily=A,s.style.fontSize=e,s.style.margin="0",s.style.padding="0",s.appendChild(this._document.createTextNode(td)),t.appendChild(s),t.appendChild(n);var o=n.offsetTop-s.offsetTop+2;t.removeChild(s),t.appendChild(this._document.createTextNode(td)),t.style.lineHeight="normal",n.style.verticalAlign="super";var a=n.offsetTop-t.offsetTop+2;return i.removeChild(t),{baseline:o,middle:a}},r.prototype.getMetrics=function(A,e){var t=A+" "+e;return typeof this._data[t]>"u"&&(this._data[t]=this.parseMetrics(A,e)),this._data[t]},r}(),rd=function(){function r(A,e){this.context=A,this.options=e}return r}(),Kw=1e4,xw=function(r){FA(A,r);function A(e,t){var n=r.call(this,e,t)||this;return n._activeEffects=[],n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),t.canvas||(n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px"),n.fontMetrics=new Pw(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+t.width+"x"+t.height+") with scale "+t.scale),n}return A.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(n){return t.applyEffect(n)})},A.prototype.applyEffect=function(e){this.ctx.save(),Ew(e)&&(this.ctx.globalAlpha=e.opacity),Uw(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),Yc(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(e){return hA(this,void 0,void 0,function(){var t;return sA(this,function(n){switch(n.label){case 0:return t=e.element.container.styles,t.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(e){return hA(this,void 0,void 0,function(){return sA(this,function(t){switch(t.label){case 0:if(q(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(e,t,n){var s=this;if(t===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n);else{var i=_s(e.text);i.reduce(function(o,a){return s.ctx.fillText(a,o,e.bounds.top+n),o+s.ctx.measureText(a).width},e.bounds.left)}},A.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),n=Vw(e.fontFamily).join(", "),s=nt(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,s,n].join(" "),n,s]},A.prototype.renderTextNode=function(e,t){return hA(this,void 0,void 0,function(){var n,s,i,o,a,l,c,u,d=this;return sA(this,function(B){return n=this.createFontStyle(t),s=n[0],i=n[1],o=n[2],this.ctx.font=s,this.ctx.direction=t.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",a=this.fontMetrics.getMetrics(i,o),l=a.baseline,c=a.middle,u=t.paintOrder,e.textBounds.forEach(function(g){u.forEach(function(f){switch(f){case 0:d.ctx.fillStyle=AA(t.color),d.renderTextWithLetterSpacing(g,t.letterSpacing,l);var m=t.textShadow;m.length&&g.text.trim().length&&(m.slice(0).reverse().forEach(function(F){d.ctx.shadowColor=AA(F.color),d.ctx.shadowOffsetX=F.offsetX.number*d.options.scale,d.ctx.shadowOffsetY=F.offsetY.number*d.options.scale,d.ctx.shadowBlur=F.blur.number,d.renderTextWithLetterSpacing(g,t.letterSpacing,l)}),d.ctx.shadowColor="",d.ctx.shadowOffsetX=0,d.ctx.shadowOffsetY=0,d.ctx.shadowBlur=0),t.textDecorationLine.length&&(d.ctx.fillStyle=AA(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(F){switch(F){case 1:d.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top+l),g.bounds.width,1);break;case 2:d.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top),g.bounds.width,1);break;case 3:d.ctx.fillRect(g.bounds.left,Math.ceil(g.bounds.top+c),g.bounds.width,1);break}}));break;case 1:t.webkitTextStrokeWidth&&g.text.trim().length&&(d.ctx.strokeStyle=AA(t.webkitTextStrokeColor),d.ctx.lineWidth=t.webkitTextStrokeWidth,d.ctx.lineJoin=window.chrome?"miter":"round",d.ctx.strokeText(g.text,g.bounds.left,g.bounds.top+l)),d.ctx.strokeStyle="",d.ctx.lineWidth=0,d.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var s=vn(e),i=wn(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,s.left,s.top,s.width,s.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return hA(this,void 0,void 0,function(){var t,n,s,i,o,a,Q,Q,l,c,u,d,L,B,g,I,f,m,F,Q,y,L,I;return sA(this,function(E){switch(E.label){case 0:this.applyEffects(e.getEffects(4)),t=e.container,n=e.curves,s=t.styles,i=0,o=t.textNodes,E.label=1;case 1:return i<o.length?(a=o[i],[4,this.renderTextNode(a,s)]):[3,4];case 2:E.sent(),E.label=3;case 3:return i++,[3,1];case 4:if(!(t instanceof mc))return[3,8];E.label=5;case 5:return E.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return Q=E.sent(),this.renderReplacedElement(t,n,Q),[3,8];case 7:return E.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof Fc&&this.renderReplacedElement(t,n,t.canvas),!(t instanceof Qc))return[3,12];E.label=9;case 9:return E.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return Q=E.sent(),this.renderReplacedElement(t,n,Q),[3,12];case 11:return E.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof Ic&&t.tree?(l=new A(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}),[4,l.render(t.tree)]):[3,14];case 13:c=E.sent(),t.width&&t.height&&this.ctx.drawImage(c,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),E.label=14;case 14:if(t instanceof Os&&(u=Math.min(t.bounds.width,t.bounds.height),t.type===ln?t.checked&&(this.ctx.save(),this.path([new S(t.bounds.left+u*.39363,t.bounds.top+u*.79),new S(t.bounds.left+u*.16,t.bounds.top+u*.5549),new S(t.bounds.left+u*.27347,t.bounds.top+u*.44071),new S(t.bounds.left+u*.39694,t.bounds.top+u*.5649),new S(t.bounds.left+u*.72983,t.bounds.top+u*.23),new S(t.bounds.left+u*.84,t.bounds.top+u*.34085),new S(t.bounds.left+u*.39363,t.bounds.top+u*.79)]),this.ctx.fillStyle=AA(Ec),this.ctx.fill(),this.ctx.restore()):t.type===cn&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+u/2,t.bounds.top+u/2,u/4,0,Math.PI*2,!0),this.ctx.fillStyle=AA(Ec),this.ctx.fill(),this.ctx.restore())),kw(t)&&t.value.length){switch(d=this.createFontStyle(s),L=d[0],B=d[1],g=this.fontMetrics.getMetrics(L,B).baseline,this.ctx.font=L,this.ctx.fillStyle=AA(s.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Nw(t.styles.textAlign),I=vn(t),f=0,t.styles.textAlign){case 1:f+=I.width/2;break;case 2:f+=I.width;break}m=I.add(f,0,0,-I.height/2+1),this.ctx.save(),this.path([new S(I.left,I.top),new S(I.left+I.width,I.top),new S(I.left+I.width,I.top+I.height),new S(I.left,I.top+I.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new lt(t.value,m),s.letterSpacing,g),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!q(t.styles.display,2048))return[3,20];if(t.styles.listStyleImage===null)return[3,19];if(F=t.styles.listStyleImage,F.type!==0)return[3,18];Q=void 0,y=F.url,E.label=15;case 15:return E.trys.push([15,17,,18]),[4,this.context.cache.match(y)];case 16:return Q=E.sent(),this.ctx.drawImage(Q,t.bounds.left-(Q.width+10),t.bounds.top),[3,18];case 17:return E.sent(),this.context.logger.error("Error loading list-style-image "+y),[3,18];case 18:return[3,20];case 19:e.listValue&&t.styles.listStyleType!==-1&&(L=this.createFontStyle(s)[0],this.ctx.font=L,this.ctx.fillStyle=AA(s.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",I=new MA(t.bounds.left,t.bounds.top+_(t.styles.paddingTop,t.bounds.width),t.bounds.width,tc(s.lineHeight,s.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new lt(e.listValue,I),s.letterSpacing,tc(s.lineHeight,s.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),E.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(e){return hA(this,void 0,void 0,function(){var t,n,F,s,i,F,o,a,F,l,c,F,u,d,F,B,g,F,f,m,F;return sA(this,function(Q){switch(Q.label){case 0:if(q(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:Q.sent(),t=0,n=e.negativeZIndex,Q.label=2;case 2:return t<n.length?(F=n[t],[4,this.renderStack(F)]):[3,5];case 3:Q.sent(),Q.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:Q.sent(),s=0,i=e.nonInlineLevel,Q.label=7;case 7:return s<i.length?(F=i[s],[4,this.renderNode(F)]):[3,10];case 8:Q.sent(),Q.label=9;case 9:return s++,[3,7];case 10:o=0,a=e.nonPositionedFloats,Q.label=11;case 11:return o<a.length?(F=a[o],[4,this.renderStack(F)]):[3,14];case 12:Q.sent(),Q.label=13;case 13:return o++,[3,11];case 14:l=0,c=e.nonPositionedInlineLevel,Q.label=15;case 15:return l<c.length?(F=c[l],[4,this.renderStack(F)]):[3,18];case 16:Q.sent(),Q.label=17;case 17:return l++,[3,15];case 18:u=0,d=e.inlineLevel,Q.label=19;case 19:return u<d.length?(F=d[u],[4,this.renderNode(F)]):[3,22];case 20:Q.sent(),Q.label=21;case 21:return u++,[3,19];case 22:B=0,g=e.zeroOrAutoZIndexOrTransformedOrOpacity,Q.label=23;case 23:return B<g.length?(F=g[B],[4,this.renderStack(F)]):[3,26];case 24:Q.sent(),Q.label=25;case 25:return B++,[3,23];case 26:f=0,m=e.positiveZIndex,Q.label=27;case 27:return f<m.length?(F=m[f],[4,this.renderStack(F)]):[3,30];case 28:Q.sent(),Q.label=29;case 29:return f++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},A.prototype.formatPath=function(e){var t=this;e.forEach(function(n,s){var i=CA(n)?n.start:n;s===0?t.ctx.moveTo(i.x,i.y):t.ctx.lineTo(i.x,i.y),CA(n)&&t.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},A.prototype.renderRepeat=function(e,t,n,s){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,s),this.ctx.fill(),this.ctx.translate(-n,-s)},A.prototype.resizeImage=function(e,t,n){var s;if(e.width===t&&e.height===n)return e;var i=(s=this.canvas.ownerDocument)!==null&&s!==void 0?s:document,o=i.createElement("canvas");o.width=Math.max(1,t),o.height=Math.max(1,n);var a=o.getContext("2d");return a.drawImage(e,0,0,e.width,e.height,0,0,t,n),o},A.prototype.renderBackgroundImage=function(e){return hA(this,void 0,void 0,function(){var t,n,s,i,o,a;return sA(this,function(l){switch(l.label){case 0:t=e.styles.backgroundImage.length-1,n=function(c){var u,d,B,W,aA,BA,G,j,P,g,W,aA,BA,G,j,f,m,F,Q,y,L,I,E,R,P,D,W,oA,$,G,j,IA,aA,BA,de,TA,YA,ue,he,KA,ge,xA;return sA(this,function(Ke){switch(Ke.label){case 0:if(c.type!==0)return[3,5];u=void 0,d=c.url,Ke.label=1;case 1:return Ke.trys.push([1,3,,4]),[4,s.context.cache.match(d)];case 2:return u=Ke.sent(),[3,4];case 3:return Ke.sent(),s.context.logger.error("Error loading background-image "+d),[3,4];case 4:return u&&(B=ei(e,t,[u.width,u.height,u.width/u.height]),W=B[0],aA=B[1],BA=B[2],G=B[3],j=B[4],P=s.ctx.createPattern(s.resizeImage(u,G,j),"repeat"),s.renderRepeat(W,P,aA,BA)),[3,6];case 5:Qg(c)?(g=ei(e,t,[null,null,null]),W=g[0],aA=g[1],BA=g[2],G=g[3],j=g[4],f=pg(c.angle,G,j),m=f[0],F=f[1],Q=f[2],y=f[3],L=f[4],I=document.createElement("canvas"),I.width=G,I.height=j,E=I.getContext("2d"),R=E.createLinearGradient(F,y,Q,L),Wl(c.stops,m).forEach(function(vr){return R.addColorStop(vr.stop,AA(vr.color))}),E.fillStyle=R,E.fillRect(0,0,G,j),G>0&&j>0&&(P=s.ctx.createPattern(I,"repeat"),s.renderRepeat(W,P,aA,BA))):Ug(c)&&(D=ei(e,t,[null,null,null]),W=D[0],oA=D[1],$=D[2],G=D[3],j=D[4],IA=c.position.length===0?[Ss]:c.position,aA=_(IA[0],G),BA=_(IA[IA.length-1],j),de=Cg(c,aA,BA,G,j),TA=de[0],YA=de[1],TA>0&&YA>0&&(ue=s.ctx.createRadialGradient(oA+aA,$+BA,0,oA+aA,$+BA,TA),Wl(c.stops,TA*2).forEach(function(vr){return ue.addColorStop(vr.stop,AA(vr.color))}),s.path(W),s.ctx.fillStyle=ue,TA!==YA?(he=e.bounds.left+.5*e.bounds.width,KA=e.bounds.top+.5*e.bounds.height,ge=YA/TA,xA=1/ge,s.ctx.save(),s.ctx.translate(he,KA),s.ctx.transform(1,0,0,ge,0,0),s.ctx.translate(-he,-KA),s.ctx.fillRect(oA,xA*($-KA)+KA,G,j*xA),s.ctx.restore()):s.ctx.fill())),Ke.label=6;case 6:return t--,[2]}})},s=this,i=0,o=e.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return i<o.length?(a=o[i],[5,n(a)]):[3,4];case 2:l.sent(),l.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(e,t,n){return hA(this,void 0,void 0,function(){return sA(this,function(s){return this.path(Ad(n,t)),this.ctx.fillStyle=AA(e),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(e,t,n,s){return hA(this,void 0,void 0,function(){var i,o;return sA(this,function(a){switch(a.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,s)]:[3,2];case 1:return a.sent(),[2];case 2:return i=Iw(s,n),this.path(i),this.ctx.fillStyle=AA(e),this.ctx.fill(),o=Tw(s,n),this.path(o),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(e){return hA(this,void 0,void 0,function(){var t,n,s,i,o,a,l,c,u=this;return sA(this,function(d){switch(d.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!WA(t.backgroundColor)||t.backgroundImage.length,s=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],i=Gw(He(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),WA(t.backgroundColor)||(this.ctx.fillStyle=AA(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:d.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(B){u.ctx.save();var g=fn(e.curves),f=B.inset?0:Kw,m=yw(g,-f+(B.inset?1:-1)*B.spread.number,(B.inset?1:-1)*B.spread.number,B.spread.number*(B.inset?-2:2),B.spread.number*(B.inset?-2:2));B.inset?(u.path(g),u.ctx.clip(),u.mask(m)):(u.mask(g),u.ctx.clip(),u.path(m)),u.ctx.shadowOffsetX=B.offsetX.number+f,u.ctx.shadowOffsetY=B.offsetY.number,u.ctx.shadowColor=AA(B.color),u.ctx.shadowBlur=B.blur.number,u.ctx.fillStyle=B.inset?AA(B.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()}),d.label=2;case 2:o=0,a=0,l=s,d.label=3;case 3:return a<l.length?(c=l[a],c.style!==0&&!WA(c.color)&&c.width>0?c.style!==2?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,o,e.curves,2)]:[3,11]):[3,13];case 4:return d.sent(),[3,11];case 5:return c.style!==3?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,o,e.curves,3)];case 6:return d.sent(),[3,11];case 7:return c.style!==4?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,o,e.curves)];case 8:return d.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,o,e.curves)];case 10:d.sent(),d.label=11;case 11:o++,d.label=12;case 12:return a++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(e,t,n,s,i){return hA(this,void 0,void 0,function(){var o,a,l,c,u,d,B,g,f,m,F,Q,y,L,I,E,I,E;return sA(this,function(R){return this.ctx.save(),o=Hw(s,n),a=Ad(s,n),i===2&&(this.path(a),this.ctx.clip()),CA(a[0])?(l=a[0].start.x,c=a[0].start.y):(l=a[0].x,c=a[0].y),CA(a[1])?(u=a[1].end.x,d=a[1].end.y):(u=a[1].x,d=a[1].y),n===0||n===2?B=Math.abs(l-u):B=Math.abs(c-d),this.ctx.beginPath(),i===3?this.formatPath(o):this.formatPath(a.slice(0,2)),g=t<3?t*3:t*2,f=t<3?t*2:t,i===3&&(g=t,f=t),m=!0,B<=g*2?m=!1:B<=g*2+f?(F=B/(2*g+f),g*=F,f*=F):(Q=Math.floor((B+f)/(g+f)),y=(B-Q*g)/(Q-1),L=(B-(Q+1)*g)/Q,f=L<=0||Math.abs(f-y)<Math.abs(f-L)?y:L),m&&(i===3?this.ctx.setLineDash([0,g+f]):this.ctx.setLineDash([g,f])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=AA(e),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&(CA(a[0])&&(I=a[3],E=a[0],this.ctx.beginPath(),this.formatPath([new S(I.end.x,I.end.y),new S(E.start.x,E.start.y)]),this.ctx.stroke()),CA(a[1])&&(I=a[1],E=a[2],this.ctx.beginPath(),this.formatPath([new S(I.end.x,I.end.y),new S(E.start.x,E.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(e){return hA(this,void 0,void 0,function(){var t;return sA(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=AA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=Sw(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(rd),kw=function(r){return r instanceof Sc||r instanceof yc?!0:r instanceof Os&&r.type!==cn&&r.type!==ln},Gw=function(r,A){switch(r){case 0:return fn(A);case 2:return mw(A);case 1:default:return wn(A)}},Nw=function(r){switch(r){case 1:return"center";case 2:return"right";case 0:default:return"left"}},_w=["-apple-system","system-ui"],Vw=function(r){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?r.filter(function(A){return _w.indexOf(A)===-1}):r},Ow=function(r){FA(A,r);function A(e,t){var n=r.call(this,e,t)||this;return n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=t,n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale),n}return A.prototype.render=function(e){return hA(this,void 0,void 0,function(){var t,n;return sA(this,function(s){switch(s.label){case 0:return t=Ns(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,Ww(t)];case 1:return n=s.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=AA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A}(rd),Ww=function(r){return new Promise(function(A,e){var t=new Image;t.onload=function(){A(t)},t.onerror=e,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(r))})},Xw=function(){function r(A){var e=A.id,t=A.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return r.prototype.debug=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Ir([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.prototype.getTime=function(){return Date.now()-this.start},r.prototype.info=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Ir([this.id,this.getTime()+"ms"],A))},r.prototype.warn=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Ir([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.prototype.error=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Ir([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.instances={},r}(),Jw=function(){function r(A,e){var t;this.windowBounds=e,this.instanceName="#"+r.instanceCount++,this.logger=new Xw({id:this.instanceName,enabled:A.logging}),this.cache=(t=A.cache)!==null&&t!==void 0?t:new hw(this,A)}return r.instanceCount=1,r}(),zw=function(r,A){return A===void 0&&(A={}),Yw(r,A)};typeof window<"u"&&zc.setContext(window);var Yw=function(r,A){return hA(void 0,void 0,void 0,function(){var e,t,n,s,i,o,a,l,c,u,d,B,g,f,m,F,Q,y,L,I,R,E,R,P,D,W,oA,$,G,j,IA,aA,BA,de,TA,YA,ue,he,KA,ge;return sA(this,function(xA){switch(xA.label){case 0:if(!r||typeof r!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=r.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(t=e.defaultView,!t)throw new Error("Document is not attached to a Window");return n={allowTaint:(P=A.allowTaint)!==null&&P!==void 0?P:!1,imageTimeout:(D=A.imageTimeout)!==null&&D!==void 0?D:15e3,proxy:A.proxy,useCORS:(W=A.useCORS)!==null&&W!==void 0?W:!1},s=is({logging:(oA=A.logging)!==null&&oA!==void 0?oA:!0,cache:A.cache},n),i={windowWidth:($=A.windowWidth)!==null&&$!==void 0?$:t.innerWidth,windowHeight:(G=A.windowHeight)!==null&&G!==void 0?G:t.innerHeight,scrollX:(j=A.scrollX)!==null&&j!==void 0?j:t.pageXOffset,scrollY:(IA=A.scrollY)!==null&&IA!==void 0?IA:t.pageYOffset},o=new MA(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),a=new Jw(s,o),l=(aA=A.foreignObjectRendering)!==null&&aA!==void 0?aA:!1,c={allowTaint:(BA=A.allowTaint)!==null&&BA!==void 0?BA:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:l,copyStyles:l},a.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),u=new Xc(a,r,c),d=u.clonedReferenceElement,d?[4,u.toIFrame(e,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return B=xA.sent(),g=Xs(d)||$f(d)?Eu(d.ownerDocument):Tr(a,d),f=g.width,m=g.height,F=g.left,Q=g.top,y=$w(a,d,A.backgroundColor),L={canvas:A.canvas,backgroundColor:y,scale:(TA=(de=A.scale)!==null&&de!==void 0?de:t.devicePixelRatio)!==null&&TA!==void 0?TA:1,x:((YA=A.x)!==null&&YA!==void 0?YA:0)+F,y:((ue=A.y)!==null&&ue!==void 0?ue:0)+Q,width:(he=A.width)!==null&&he!==void 0?he:Math.ceil(f),height:(KA=A.height)!==null&&KA!==void 0?KA:Math.ceil(m)},l?(a.logger.debug("Document cloned, using foreign object rendering"),R=new Ow(a,L),[4,R.render(d)]):[3,3];case 2:return I=xA.sent(),[3,5];case 3:return a.logger.debug("Document cloned, element located at "+F+","+Q+" with size "+f+"x"+m+" using computed rendering"),a.logger.debug("Starting DOM parsing"),E=Hc(a,d),y===E.styles.backgroundColor&&(E.styles.backgroundColor=RA.TRANSPARENT),a.logger.debug("Starting renderer for element at "+L.x+","+L.y+" with size "+L.width+"x"+L.height),R=new xw(a,L),[4,R.render(E)];case 4:I=xA.sent(),xA.label=5;case 5:return(!((ge=A.removeContainer)!==null&&ge!==void 0)||ge)&&(Xc.destroy(B)||a.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),a.logger.debug("Finished rendering"),[2,I]}})})},$w=function(r,A,e){var t=A.ownerDocument,n=t.documentElement?it(r,getComputedStyle(t.documentElement).backgroundColor):RA.TRANSPARENT,s=t.body?it(r,getComputedStyle(t.body).backgroundColor):RA.TRANSPARENT,i=typeof e=="string"?it(r,e):e===null?RA.TRANSPARENT:4294967295;return A===t.documentElement?WA(n)?WA(s)?i:s:n:i};const Mt=class Mt extends p.EngineObject{constructor(A,e){super(A,e),this.ad(new w.ObjResettingWithEvent(A.renderInUEChanged,()=>A.renderInUE?new sd(A,e):new nd(A,e)))}};C(Mt,"type",Mt.register("ESUeViewer",p.ESGeoDiv.type,Mt));let ti=Mt;class nd extends w.Destroyable{constructor(e,t){super();C(this,"_screenPosition",this.disposeVar(w.reactArrayWithUndefined(void 0)));const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}const s=this.disposeVar(new p.ESTextLabel);s.parentID=e.id,e.mainClass=s,t.add(s),this.dispose(()=>t.delete(s)),s.show=!1,this.dispose(w.bind([s,"position"],[e,"position"])),this.dispose(w.bind([s,"rotation"],[e,"rotation"])),this.dispose(w.bind([s,"flyToParam"],[e,"flyToParam"])),this.dispose(w.bind([s,"flyInParam"],[e,"flyInParam"])),this.dispose(e.calcFlyToParamEvent.disposableOn(()=>{$A(n,s.id)})),this.dispose(e.calcFlyInParamEvent.disposableOn(async()=>{if(!t.actived)return;const a=await t.getCurrentCameraInfo();if(!a)return;const{position:l,rotation:c}=a;e.flyInParam={position:l,rotation:c,flyDuration:1}})),this.dispose(e.smoothMoveEvent.disposableOn((a,l)=>{_e(n,s.id,a,l)})),this.dispose(e.smoothMoveWithRotationEvent.disposableOn((a,l,c)=>{ke(n,s.id,a,l,c)})),this.dispose(e.smoothMoveOnGroundEvent.disposableOn((a,l,c,u)=>{Ge(n,s.id,a,l,u,c)})),this.dispose(e.smoothMoveWithRotationOnGroundEvent.disposableOn((a,l,c,u,d)=>{Ne(n,s.id,a,l,c,u,d)})),this.dispose(e.flyToEvent.disposableOn((a,l)=>{s.flyTo(a)})),this.dispose(e.flyInEvent.don(a=>{s.flyIn(a)}));const i=this._screenPosition,o=this.disposeVar(new p.ESCustomDiv);o.parentID=e.id,t.add(o),this.dispose(()=>t.delete(o)),this.dispose(w.bind([o,"allowPicking"],[e,"allowPicking"]));{const a=this.disposeVar(w.createAnimateFrame()),l=()=>{e.show?a.restart(void 0,async()=>{if(!e.position)return;const c=await t.lonLatAltToScreenPosition(e.position);if(!this.isDestroyed())if(!c)this._screenPosition.value=void 0;else{const[u,d]=c;u===-1&&d===-1?this._screenPosition.value=void 0:this._screenPosition.value=[u,d]}}):a.cancel()};l(),this.dispose(e.showChanged.disposableOn(l))}{const a=()=>class extends w.Destroyable{constructor(d,B,g){if(super(),this._subContainer=d,!g)return;if(!e.instanceClass)throw new Error("!sceneObject.instanceClass");const f=new w.PosFloatDiv,m=f.element;this._subContainer.appendChild(m),this.dispose(()=>this._subContainer.removeChild(m)),m.onclick=F=>{(e.allowPicking??!1)&&e.pickedEvent.emit(new p.ESJPickedResult({div:m,pointerEvent:F},e,void 0,void 0,void 0,[F.x,F.y]))};{const F=()=>{e.editing?m.children[0].style.pointerEvents="none":m.children[0].style.pointerEvents="all"};F(),this.d(e.editingChanged.don(F))}{const F=()=>{const y=e.show;i.value&&y?(f.show=!0,f.winPos=[...i.value]):(f.show=!1,f.winPos=[0,0])};F();const Q=this.disposeVar(w.createNextAnimateFrameEvent(e.showChanged,i.changed));this.dispose(Q.disposableOn(F))}{const F=()=>{const[Q,y]=e.anchor??p.ESGeoDiv.defaults.anchor;f.originRatioX=Q,f.originRatioY=y};F(),this.dispose(e.anchorChanged.disposableOn(F))}{const F=()=>{f.opacity=e.opacity??p.ESGeoDiv.defaults.opacity};F(),this.dispose(e.opacityChanged.disposableOn(F))}this.disposeVar(new e.instanceClass(f.contentDiv,e,g))}},l=()=>{try{e.instanceClass?o.instanceClass=a():o.instanceClass=void 0}catch(u){console.error(u)}};l();const c=this.dv(w.createNextAnimateFrameEvent(e.instanceClassChanged,e.opacityChanged,e.anchorChanged,e.editingChanged,e.showChanged,e.allowPickingChanged));this.d(c.don(l))}}get screenPosition(){return this._screenPosition.value}get screenPositionChanged(){return this._screenPosition.changed}set screenPosition(e){this._screenPosition.value=e}}class sd extends w.Destroyable{constructor(e,t){super();C(this,"_imageLabel");C(this,"_hasClassDivAndPos",{});this._imageLabel=this.dv(new p.ESImageLabel),this._imageLabel.isHoverZoom=!1,this._imageLabel.parentID=e.id;const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}e.mainClass=this._imageLabel;const s=this._imageLabel;t.add(s),this.d(()=>t.delete(s));{const i=()=>{if(!n)return;if(!e.instanceClass)throw new Error("!sceneObject.instanceClass");const l=document.createElement("div"),c=this.dv(new e.instanceClass(l,e,t))._container;if(c.style.opacity=e.opacity.toString()??p.ESGeoDiv.defaults.opacity,c.style.position="fixed",c.style.zIndex="-1",c.style.top="0px",!document.body.contains(c)){document.body.appendChild(c);let d=c?c.querySelectorAll("*[class]"):[];for(let B=0;B<d.length;B++){const g=d[B];var u=g.getBoundingClientRect();this._hasClassDivAndPos[g.className]=[g.offsetLeft,g.offsetTop,g.offsetLeft+u.width,g.offsetTop+u.height]}}zw(c,{backgroundColor:null,allowTaint:!0,useCORS:!0,width:c.offsetWidth,height:c.offsetHeight,scale:1}).then(d=>{document.body.contains(c)&&document.body.removeChild(c),s.url=d.toDataURL(),s.show=e.show}).catch(()=>{document.body.contains(c)&&document.body.removeChild(c)})},o=()=>{try{e.instanceClass?i():(s.url="",s.show=!1)}catch(l){console.error(l)}};o();const a=this.dv(w.createNextAnimateFrameEvent(e.instanceClassChanged,e.opacityChanged));this.d(a.don(o))}{const i=()=>{s.show=e.show};s.show=!1,this.ad(e.showChanged.don(i))}this.d(w.track([s,"anchor"],[e,"anchor"])),this.d(w.bind([s,"position"],[e,"position"])),this.d(w.bind([s,"rotation"],[e,"rotation"])),this.d(w.bind([s,"flyToParam"],[e,"flyToParam"])),this.d(w.bind([s,"flyInParam"],[e,"flyInParam"])),this.d(w.bind([s,"allowPicking"],[e,"allowPicking"])),this.d(w.bind([s,"scale"],[e,"scale"])),this.d(w.track([s,"minVisibleDistance"],[e,"minVisibleDistance"])),this.d(w.track([s,"maxVisibleDistance"],[e,"maxVisibleDistance"])),this.ad(e.automaticLandingEvent.don(()=>{s.automaticLanding()})),this.d(t.widgetEvent.don(i=>{if(i.objId!==this._imageLabel.id)return;const{type:o,add:a}=i;if(o==="leftClick"&&a){const l=(a==null?void 0:a.classNames)??[],c=Object.keys(this._hasClassDivAndPos);for(let u=0;u<c.length;u++){const d=c[u];let B=this._hasClassDivAndPos[d];a&&a.mouseRelativePos&&a.mouseRelativePos[0]>=B[0]&&a.mouseRelativePos[0]<=B[2]&&a.mouseRelativePos[1]>=B[1]&&a.mouseRelativePos[1]<=B[3]&&l.push(d)}a.classNames=l}e.widgetEvent.emit({type:o,add:a})})),this.d(e.calcFlyToParamEvent.don(()=>{$A(n,s.id)})),this.d(e.calcFlyInParamEvent.don(()=>{const i=t.getCurrentCameraInfo();if(!i)return;const{position:o,rotation:a}=i;e.flyInParam={position:o,rotation:a,flyDuration:1}})),this.d(e.smoothMoveEvent.don((i,o)=>{_e(n,s.id,i,o)})),this.d(e.smoothMoveWithRotationEvent.don((i,o,a)=>{ke(n,s.id,i,o,a)})),this.d(e.smoothMoveOnGroundEvent.don((i,o,a,l)=>{Ge(n,s.id,i,o,l,a)})),this.d(e.smoothMoveWithRotationOnGroundEvent.don((i,o,a,l,c)=>{Ne(n,s.id,i,o,a,l,c)})),this.d(e.flyToEvent.don((i,o)=>{s.flyTo(i)})),this.d(e.flyInEvent.don(i=>{s.flyIn(i)}))}}const Dt=class Dt extends dA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.flyToFeatureIndexEvent.don((n,s)=>{t.callUeFunc({f:"flyToFeatureIndex",p:{id:A.id,index:n,duration:s}})})),this.d(A.flyToFeatureEvent.don((n,s,i)=>{t.callUeFunc({f:"flyToFeature",p:{id:A.id,key:n,value:s,duration:i}})}))}};C(Dt,"type",Dt.register("ESUeViewer",p.ESGeoJson.type,Dt));let ri=Dt;const Rt=class Rt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Rt,"type",Rt.register("ESUeViewer",p.ESGeoLineString.type,Rt));let Fn=Rt;const Pt=class Pt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Pt,"type",Pt.register("ESUeViewer",p.ESGeoRectangle.type,Pt));let ni=Pt;const Kt=class Kt extends uA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Kt,"type",Kt.register("ESUeViewer",p.ESGeoWater.type,Kt));let si=Kt;const oe=class oe extends x{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.setNodePositionEvent.don((n,s)=>{io(t,A.id,n,s)})),this.d(A.setNodeRotationEvent.don((n,s)=>{oo(t,A.id,n,s)})),this.d(A.setNodeScaleEvent.don((n,s)=>{ao(t,A.id,n,s)}))}};C(oe,"forceUeUpdateProps",[...x.forceUeUpdateProps,"url"]),C(oe,"propValFuncs",{...x.propValFuncs,url:A=>typeof A=="string"?p.ESSceneObject.context.getStrFromEnv(p.rpToap(A)):(A.url=p.ESSceneObject.context.getStrFromEnv(p.rpToap(A.url)),A),czmMaximumScale:null,czmMinimumPixelSize:null,czmNativeScale:null,czmColor:null}),C(oe,"type",oe.register("ESUeViewer",p.ESGltfModel.type,oe));let ii=oe;const xt=class xt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(xt,"type",xt.register("ESUeViewer",p.ESHeightMeasurement.type,xt));let oi=xt;const kt=class kt extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}const n=async(i,o,a,l)=>{const{viewer:c}=i;if(!c){console.error("AIMoveTo: ueViewer.viewer is undefined");return}const u=await c.callUeFunc({f:"AIMoveTo",p:{id:o,Destination:a,Time:l}});return u.error&&console.error("AIMoveTo:",u.error),u};this.d(A.aiMoveToEvent.don((i,o)=>{n(e,A.id,i,o)}));const s=async(i,o)=>{const{viewer:a}=i;if(!a){console.error("StopAIMove: ueViewer.viewer is undefined");return}const l=await a.callUeFunc({f:"StopAIMove",p:{id:o}});return l.error&&console.error("StopAIMove:",l.error),l};this.d(A.stopAIMoveEvent.don(()=>{s(e,A.id)}))}};C(kt,"type",kt.register("ESUeViewer",p.ESHuman.type,kt));let ai=kt;const ae=class ae extends UA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}A.anchor=[.5,1]}};C(ae,"type",ae.register("ESUeViewer",p.ESImageLabel.type,ae)),C(ae,"forceUeUpdateProps",[...UA.forceUeUpdateProps,"url"]),C(ae,"propValFuncs",{...UA.propValFuncs,url:A=>typeof A=="string"?p.ESSceneObject.context.getStrFromEnv(p.rpToap(A)):(A.url=p.ESSceneObject.context.getStrFromEnv(p.rpToap(A.url)),A)});let li=ae;const Gt=class Gt extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Gt,"type",Gt.register("ESUeViewer",p.ESLevelRuntimeModel.type,Gt));let ci=Gt;const Nt=class Nt extends Er{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Nt,"type",Nt.register("ESUeViewer",p.ESLocalCircle.type,Nt));let di=Nt;const _t=class _t extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(_t,"type",_t.register("ESUeViewer",p.ESLocalPolygonZ.type,_t));let ui=_t;const Vt=class Vt extends Er{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Vt,"type",Vt.register("ESUeViewer",p.ESLocalRectangle.type,Vt));let hi=Vt;const Ot=class Ot extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Ot,"type",Ot.register("ESUeViewer",p.ESLocalSkyBox.type,Ot));let gi=Ot;const Wt=class Wt extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Wt,"type",Wt.register("ESUeViewer",p.ESLocationMeasurement.type,Wt));let Bi=Wt;const Xt=class Xt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Xt,"type",Xt.register("ESUeViewer",p.ESPipeFence.type,Xt));let fi=Xt;const Jt=class Jt extends Fn{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Jt,"type",Jt.register("ESUeViewer",p.ESPipeline.type,Jt));let wi=Jt;const zt=class zt extends yr{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.highlightFeatureEvent.don(n=>{const s=typeof n=="number"?n.toString():n;to(t,A.id,s)})),this.d(A.highlightFeatureAndFlyToEvent.don((n,s,i,o)=>{const a=typeof n=="number"?n.toString():n;ro(t,A.id,a,o??1)})),this.d(A.setLayerVisibleEvent.don((n,s)=>{let i="";typeof s!="string"?i=JSON.stringify(s):i=s,no(t,A.id,i)})),this.d(A.setLayerColorEvent.don((n,s)=>{let i="";typeof s!="string"?i=JSON.stringify(s):i=s,so(t,A.id,i)}))}};C(zt,"type",zt.register("ESUeViewer",p.ESPipeserTileset.type,zt));let pi=zt;const Yt=class Yt extends uA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Yt,"type",Yt.register("ESUeViewer",p.ESPit.type,Yt));let Ci=Yt;const $t=class $t extends UA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.ad(A.getInitialStyleEvent.don(async()=>{try{const n=await t.callUeFunc({f:"GetInitialStyle",p:{id:A.id}});n.error!=""&&console.error("getInitialStyleEvent:",n.error),A.initialStyle.value=structuredClone(n.re)}catch(n){console.error("getInitialStyleEvent:",n),A.initialStyle.value=void 0}}))}};C($t,"type",$t.register("ESUeViewer",p.ESPoi2D.type,$t));let vi=$t;const Zt=class Zt extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Zt,"type",Zt.register("ESUeViewer",p.ESPoi3D.type,Zt));let mi=Zt;const le=class le extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(le,"type",le.register("ESUeViewer",p.ESPoiTileset.type,le)),C(le,"forceUeUpdateProps",[...dA.forceUeUpdateProps,"url"]),C(le,"propValFuncs",{...dA.propValFuncs,url:A=>typeof A=="string"?p.ESSceneObject.context.getStrFromEnv(A):(A.url=p.ESSceneObject.context.getStrFromEnv(A.url),A)});let Fi=le;const qt=class qt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(qt,"type",qt.register("ESUeViewer",p.ESPolygonFence.type,qt));let Qi=qt;const De=class De extends uA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(De,"type",De.register("ESUeViewer",p.ESPolygonFlattenedPlane.type,De)),C(De,"propValFuncs",{...uA.propValFuncs,targetID:A=>{if(!A)return"";const e=p.ESSceneObject.getSceneObject(A);return e?e.mainClass.id:A}});let Ui=De;const jt=class jt extends uA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(jt,"type",jt.register("ESUeViewer",p.ESPolygonWithHole.type,jt));let Ei=jt;const Ar=class Ar extends jA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}this.d(()=>{A.ids=[]}),this.d(A.highlightInner3DtilesetEvent.don(n=>{n.highlight=!0})),this.d(A.removeHighlightInner3DtilesetEvent.don(n=>{n.highlight=!1}));{const n=o=>{o=o.toLocaleLowerCase();let a=[255,255,255,1];if(o.startsWith("#")){if(o.length===4){let l=parseInt(o[1]+o[1],16),c=parseInt(o[2]+o[2],16),u=parseInt(o[3]+o[3],16);a=[l,c,u,1]}else if(o.length===7){let l=parseInt(o.substring(1,3),16),c=parseInt(o.substring(3,5),16),u=parseInt(o.substring(5,7),16);a=[l,c,u,1]}}else if(o.startsWith("rgba")){let l=o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(l){let c=parseInt(l[1]),u=parseInt(l[2]),d=parseInt(l[3]),B=parseFloat(l[4]);a=[c,u,d,B]}}else if(o.startsWith("rgb")){let l=o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);if(l){let c=parseInt(l[1]),u=parseInt(l[2]),d=parseInt(l[3]);a=[c,u,d,1]}}else console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");return[a[0]/255,a[1]/255,a[2]/255,a[3]]},s=()=>{const o=A.layerConfig;if(!o)return;const a=[];o.forEach(l=>{o.filter(u=>u.dataset==l.dataset).length==1?a.push({condition:[{field:"dataset",op:"==",value:l.dataset}],color:n(l.value.color??"rgb(255,255,255)"),show:l.value.visible}):a.push({condition:[{field:"layer",op:"==",value:l.layer},{field:"dataset",op:"==",value:l.dataset}],color:n(l.value.color??"rgb(255,255,255)"),show:l.value.visible})}),A.setFeatureStyle(a)};s();const i=this.dv(w.createNextAnimateFrameEvent(A.layerConfigChanged,A.colorBlendModeChanged));this.d(i.don(()=>{s()}))}}};C(Ar,"type",Ar.register("ESUeViewer",p.ESRtsTileset.type,Ar));let yi=Ar;const er=class er extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}this.d(A.addTreesEvent.don(n=>{p.addTreesCallFunc(e,A.id,n)})),this.d(A.removeAllTreesEvent.don(()=>{p.removeAllTreesCallFunc(e,A.id)})),this.d(A.updateTreeParamsEvent.don(n=>{p.updateTreeParamsCallFunc(e,A.id,n)})),this.d(A.cutDownTreesEvent.don((n,s)=>{p.cutDownTreesCallFunc(e,A.id,n,s)})),this.d(A.growthSimulationEvent.don((n,s,i)=>{p.growthSimulationCallFunc(e,A.id,n,s,i)}))}};C(er,"type",er.register("ESUeViewer",p.ESSeparateFoliage.type,er));let Si=er;const tr=class tr extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(tr,"type",tr.register("ESUeViewer",p.ESSubmergingAnalysis.type,tr));let Ii=tr;const rr=class rr extends uA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})})),this.d(A.stopEvent.don(()=>{t.callUeFunc({f:"Stop",p:{id:A.id}})}))}};C(rr,"type",rr.register("ESUeViewer",p.ESSunshineAnalysis.type,rr));let Ti=rr;const nr=class nr extends uA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})}))}};C(nr,"type",nr.register("ESUeViewer",p.ESSurfaceAreaMeasurement.type,nr));let Hi=nr;const sr=class sr extends UA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(sr,"type",sr.register("ESUeViewer",p.ESTextLabel.type,sr));let Li=sr;const Re=class Re extends UA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.callFunctionEvent.don(async(n,s)=>{const i=await yn(t,A.id,n,s);A.__callFunctionResultEvent.emit(i)}))}};C(Re,"type",Re.register("ESUeViewer",p.ESUEWidget.type,Re)),C(Re,"propValFuncs",{...UA.propValFuncs,info:A=>JSON.stringify(A??{})});let bi=Re;const id=r=>{switch(r){case 0:return"成功绑定";case 1:return"解绑之前的内容,成功绑定";case 2:return"未搜索到ActorTag,无法绑定";case 3:return"搜索到ActorTag但对应的Actor不是场景原有的,而是新建的,无法绑定";case 4:return"搜索到ActorTag对应的Actor是地形或3DTileset,无法绑定";default:return"未知错误"}},Zw=r=>{switch(r){case 0:return"创建成功";case 1:return"未找到对应的资源,无法创建";case 2:return"Id与场景中现有的ActorTag重复,创建后可能出现问题,创建失败";default:return"未知错误"}},ir=class ir extends p.EngineObject{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn(`${A.id} UeESUnrealActor viewer is undefined!`);return}this.d(()=>{Un(t,A.id)});const n=async()=>{l()||await t.callUeFunc({f:"update",p:{id:A.id,name:A.name,show:A.show,rotation:A.rotation,flyToParam:A.flyToParam??p.defaultFlyToParam,flyInParam:A.flyInParam??p.defaultFlyInParam,highlight:A.highlight,collision:A.collision,scale:A.scale,minVisibleDistance:A.minVisibleDistance,maxVisibleDistance:A.maxVisibleDistance}})},s=this.dv(w.createNextAnimateFrameEvent(A.showChanged,A.nameChanged,A.rotationChanged,A.flyToParamChanged,A.flyInParamChanged,A.highlightChanged,A.collisionChanged,A.scaleChanged,A.minVisibleDistanceChanged,A.maxVisibleDistanceChanged));this.d(s.don(n)),this.d(A.flushEvent.don(()=>s.flush()));let i,o;const a=async()=>{l()||(await t.callUeFunc({f:"update",p:{id:A.id,position:A.position}}),(e.debug??!1)&&console.log(`updatePostion:${A.position},actorTag:${A.actorTag},actorClass:${A.actorClass}`))},l=()=>!i&&!o?(console.warn(`${A.id} 未绑定ActorTag或未创建ActorClass!`),!0):!1,c=async()=>{const{id:d}=A,B=await e.unBindActorByID(d);B&&B.error!==""&&console.warn(`${A.id} UeESUnrealActor UnBindActorByID: ${B.error}`),i=void 0;const g=await t.callUeFunc({f:"destroy",p:{id:d}});if(g&&g.error!==""){console.warn(`${A.id} UeESUnrealActor DestroyActorByID: ${g.error}`);return}o=void 0},u=this.dv(w.react({type:"ActorClass",actorClass:"default"}));{const d=this.dv(w.createNextAnimateFrameEvent(A.actorClassChanged,A.actorTagChanged)),B=async()=>{A.actorTag!==""?u.value={type:"ActorTag",actorTag:A.actorTag}:u.value={type:"ActorClass",actorClass:A.actorClass===""?"default":A.actorClass}};B(),this.d(d.don(B)),this.d(A.flushEvent.don(()=>d.flush()))}{const d=this.dv(w.createProcessingFromAsyncFunc(async g=>{if(await g.promise(c()),u.value.type==="ActorTag"){const{actorTag:f}=u.value;await g.promise(c());try{A.lastActorStatus="null";const m=await g.promise(e.bindActorByTag(A.id,f));if(!m)return;if(m.error!==""){console.warn(`${A.id} UeESUnrealActor BindActorByTag:${f},${m.error}`);return}if(m.re.type===0)A.lastActorStatus="bound",i=f;else if(m.re.type===1)A.lastActorStatus="bound",i=f,console.warn(`${A.id} UeESUnrealActor BindActorByTag:${f},${id(m.re.type)}`);else{i=void 0,console.warn(`${A.id} UeESUnrealActor BindActorByTag error:${f}, ${id(m.re.type)}`);return}}catch(m){console.warn(`${A.id} UeESUnrealActor BindActorByTag catch error:${f}, ${m}`);return}}else if(u.value.type==="ActorClass"){const{actorClass:f}=u.value;try{const m=await g.promise(e.createActorByClass(A.id,f));if(!m)return;if(m.error!==""){console.warn(`${A.id} UeESUnrealActor CreateActorByClass error :${f}, ${m.error}`);return}if(m.re.type===0)A.lastActorStatus="created",o=f;else{console.warn(`${A.id} UeESUnrealActor CreateActorByClass error type :${f},${Zw(m.re.type)}`);return}}catch(m){console.warn(`${A.id} UeESUnrealActor CreateActorByClass error catch :${f}, ${JSON.stringify(m)}`);return}}await g.promise(n()),await g.promise(a())})),B=async()=>{d.restart()};B(),this.d(u.changed.don(B))}this.d(A.positionChanged.don(a)),this.d(A.callFunctionEvent.don(async(d,B)=>{if(l()){A.__callFunctionResultEvent.emit(void 0);return}const g=await yn(t,A.id,d,B);A.__callFunctionResultEvent.emit(g)})),this.d(A.smoothMoveEvent.don((d,B)=>{l()||_e(t,A.id,d,B)})),this.d(A.smoothMoveWithRotationEvent.don((d,B,g)=>{l()||ke(t,A.id,d,B,g)})),this.d(A.smoothMoveOnGroundEvent.don((d,B,g,f)=>{l()||Ge(t,A.id,d,B,f,g)})),this.d(A.smoothMoveWithRotationOnGroundEvent.don((d,B,g,f,m)=>{l()||Ne(t,A.id,d,B,g,f,m)})),this.d(A.automaticLandingEvent.don(d=>{if(l())return;const B=[A.position[0],A.position[1]];e.getHeightByLonLat(A.position[0],A.position[1],"Visibility").then(g=>{g!==null&&(A.position=[...B,g],A.collision=d)})})),this.d(A.flyToEvent.don(async(d,B)=>{if(l())return;const g=await Be(t,A.id,d);let f="over";g===void 0?f="error":g.endType===0?f="over":g.endType===1&&(f="cancelled"),A.flyOverEvent.emit(B,f,e)})),this.d(A.calcFlyToParamEvent.don(()=>{l()||$A(t,A.id)})),this.d(A.calcFlyInParamEvent.don(async()=>{if(!e.actived)return;const d=await e.getCurrentCameraInfo();if(!d)return;const{position:B,rotation:g}=d;A.flyInParam={position:B,rotation:g,flyDuration:1}})),this.d(e.propChanged.don(d=>{l()||d.objId===A.id&&Object.keys(d.props).forEach(B=>{const g=d.props[B]===null?void 0:d.props[B];A[B]=g})}))}};C(ir,"type",ir.register("ESUeViewer",p.ESUnrealActor.type,ir));let Mi=ir;const or=class or extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(or,"type",or.register("ESUeViewer",p.ESVideoFusion.type,or));let Di=or;const ar=class ar extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(ar,"type",ar.register("ESUeViewer",p.ESViewShed.type,ar));let Ri=ar;const lr=class lr extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is underfined!");return}}};C(lr,"type",lr.register("ESUeViewer",p.ESVisibilityAnalysis.type,lr));let Pi=lr;const cr=class cr extends uA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.ad(w.track([A,"volume"],[A,"cutAndFillVolume"])),this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})})),this.d(A.clearEvent.don(()=>{t.callUeFunc({f:"Clear",p:{id:A.id}})}))}};C(cr,"type",cr.register("ESUeViewer",p.ESVolumeMeasurement.type,cr));let Ki=cr;const Pe=class Pe extends UA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(Pe,"type",Pe.register("ESUeViewer",p.ESWidget.type,Pe)),C(Pe,"propValFuncs",{...UA.propValFuncs,info:A=>JSON.stringify(A??{})});let xi=Pe;const dr=class dr extends p.EngineObject{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}A.poi.actorTag=A.human.id,A.poi.positionOffset=[0,0,A.poiOffsetHeight-.8],this.d(A.poiOffsetHeightChanged.don(()=>{A.poi.positionOffset=[0,0,A.poiOffsetHeight-.8]})),this.d(()=>{A.poi.actorTag=""})}};C(dr,"type",dr.register("ESUeViewer",p.ESHumanPoi.type,dr));let ki=dr;p.ESSceneObject.context.getStrFromEnv(p.ESNavigator.defaults.imgUrl);const ur=class ur extends p.EngineObject{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}const n=this.disposeVar(new p.ESCustomDiv);e.add(n),this.dispose(()=>e.delete(n)),this.dispose(w.track([n,"show"],[A,"show"])),n.instanceClass=class extends w.Destroyable{constructor(i,o,a){super(),this._subContainer=i;const l=document.createElement("div");this._subContainer.appendChild(l),this.dispose(()=>this._subContainer.removeChild(l));{const d=async()=>{const B=await e.getCurrentCameraInfo(),g=B==null?void 0:B.position,m=[...B==null?void 0:B.rotation];m[0]=360,e.flyIn(g,m)};l.addEventListener("click",d),l.style.cursor="pointer",this.dispose(()=>l.removeEventListener("click",d))}{const d=()=>{l.style.width=`${A.cssSize?A.cssSize:p.ESNavigator.defaults.cssSize}px`,l.style.height=`${A.cssSize?A.cssSize:p.ESNavigator.defaults.cssSize}px`};d(),A.dispose(A.cssSizeChanged.disposableOn(d))}l.style.position="fixed";{const d=()=>{l.style.top=`${A.cssPosition?A.cssPosition[0]:p.ESNavigator.defaults.cssPosition[0]}px`,l.style.right=`${A.cssPosition?A.cssPosition[1]:p.ESNavigator.defaults.cssPosition[1]}px`};d(),A.dispose(A.cssPositionChanged.disposableOn(d))}l.style.transition=" right 0.4s linear",l.style.cursor="pointer";const c=document.createElement("div");l.appendChild(c),this.dispose(()=>l.removeChild(c)),c.style.width="100%",c.style.height="100%",c.style.position="relative";const u=document.createElement("img");c.appendChild(u),this.dispose(()=>c.removeChild(u)),u.style.width="100%",u.style.height="100%",u.style.border="none";{const d=()=>u.src=A.imgUrl;d(),A.dispose(A.imgUrlChanged.disposableOn(d))}{const d=()=>{const m=-e.getCurrentCameraInfo().rotation[0];u.style.transform=`rotate(${m}deg)`};let B;const g=async()=>{d(),A.show?(l.style.display="block",B=setInterval(()=>{d()},1e3)):(l.style.display="none",clearInterval(B))};this.dispose(A.showChanged.disposableOn(g)),g(),this.dispose(()=>clearInterval(B))}u.style.transformOrigin="50% 50%"}}}};C(ur,"type",ur.register("ESUeViewer",p.ESNavigator.type,ur));let Gi=ur;const ce=class ce extends nA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}{const n=()=>{let s=A.materialMode==="blue"?"multipleArrows":A.materialMode==="purple"?"singleArrow":A.materialMode;t.callUeFunc({f:"update",p:{id:A.id,materialMode:s}})};this.dispose(A.materialModeChanged.disposableOn(n)),this.dispose(A.createdEvent.disposableOn(n))}}};C(ce,"type",ce.register("ESUeViewer",p.ESPath.type,ce)),C(ce,"forceUeUpdateProps",[...nA.forceUeUpdateProps]),C(ce,"propValFuncs",{...nA.propValFuncs,materialMode:null});let Ni=ce;async function qw(r){navigator.clipboard.writeText(r).then(function(){console.log("复制成功")},function(A){console.log("复制失败")})}const hr=class hr extends p.EngineObject{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}const n=this.disposeVar(new p.ESCustomDiv);e.add(n),this.dispose(()=>e.delete(n)),n.instanceClass=class extends w.Destroyable{constructor(i,o,a){if(super(),this._subContainer=i,!a||!(a instanceof bA))return;const l=document.createElement("div");this._subContainer.appendChild(l),this.dispose(()=>this._subContainer.removeChild(l)),l.style.width="100%",l.style.position="absolute",l.style.height=`${p.ESViewerStatusBar.defaults.height}px`,l.style.left="0",l.style.bottom="0",l.style.color="#fff",l.style.padding="0 20px 0 0",l.style.boxSizing="border-box",l.style.lineHeight=`${p.ESViewerStatusBar.defaults.height}px`,l.style.zIndex="100",l.style.alignContent="center",l.style.justifyContent="space-between";const c=document.createElement("span");l.appendChild(c),this.dispose(()=>l.removeChild(c));const u=document.createElement("span");c.appendChild(u),this.dispose(()=>c.removeChild(u));const d=document.createElement("span");c.appendChild(d),d.addEventListener("dblclick",function(){let g=d.innerHTML;g.startsWith("鼠标位置")&&(g=g.slice(5)),qw(g)}),d.style.cursor="pointer",this.dispose(()=>c.removeChild(d));const B=document.createElement("span");l.appendChild(B),this.dispose(()=>l.removeChild(B));{const g=()=>{l.style.height=(A.height??p.ESViewerStatusBar.defaults.height)+"px",l.style.lineHeight=(A.height??p.ESViewerStatusBar.defaults.height)+"px"};this.dispose(A.heightChanged.disposableOn(g)),g()}{const g=()=>{l.style.fontSize=(A.fontSize??p.ESViewerStatusBar.defaults.fontSize)+"px"};this.dispose(A.fontSizeChanged.disposableOn(g)),g()}{const g=()=>{A.bgColor?l.style.background=`rgba(${A.bgColor[0]*255},${A.bgColor[1]*255},${A.bgColor[2]*255},${A.bgColor[3]})`:l.style.background=`rgba(${p.ESViewerStatusBar.defaults.bgColor[0]},${p.ESViewerStatusBar.defaults.bgColor[1]},${p.ESViewerStatusBar.defaults.bgColor[2]},${p.ESViewerStatusBar.defaults.bgColor[3]})`};this.dispose(A.bgColorChanged.disposableOn(g)),g()}a.getVersion().then(g=>{g&&(B.innerText=`Ue 版本 : ${g[0]} `)}).catch(g=>{console.log(g)});{const g=()=>{let F="",Q="";F+=`帧率:${a.getFPS().toFixed(0)}FPS`,u.innerText=F;const y=e.getCurrentCameraInfo();F+=` 经度: ${y.position[0].toFixed(5)}° 纬度: ${y.position[1].toFixed(5)}° 高度: ${y.position[2].toFixed(2)}米 偏航角: ${y.rotation[0].toFixed(2)}° 俯仰角: ${y.rotation[1].toFixed(2)}° 翻滚角:${y.rotation[2].toFixed(2)}° `,u.innerText=F,e.pick().then(L=>{if(L){const{pickResult:I}=L;if(I&&I.position){const{position:E}=I;Q+=`鼠标位置:${E[0].toFixed(5)}° ${E[1].toFixed(5)}° ${E[2].toFixed(2)}m`}else Q+="暂时无法获取鼠标位置...";d.innerText=Q}}).catch(L=>{console.log(L)})};let f;const m=async()=>{g(),A.show?(l.style.display="flex",f=setInterval(()=>{g()},1e3)):(l.style.display="none",clearInterval(f))};this.dispose(A.showChanged.disposableOn(m)),m(),this.dispose(()=>clearInterval(f))}}}}};C(hr,"type",hr.register("ESUeViewer",p.ESViewerStatusBar.type,hr));let _i=hr;const gr=class gr extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(gr,"type",gr.register("ESUeViewer",p.ESGaussianSplatting.type,gr));let Vi=gr;const Br=class Br extends jA{constructor(e,t){super(e,t);C(this,"_es3DTileset",this.dv(new p.ES3DTileset));if(!t.viewer){console.warn("viewer is undefined!");return}this.es3DTileset.parentID=e.id,e.mainClass=this._es3DTileset;{const s=this._es3DTileset;t.add(s),this.dispose(()=>t.delete(s)),this.d(w.track([s,"allowPicking"],[e,"allowPicking"])),this.d(w.track([s,"collision"],[e,"collision"])),this.d(w.bind([s,"flyToParam"],[e,"flyToParam"])),this.d(w.bind([s,"flyToParam"],[e,"flyToParam"])),this.d(w.track([s,"url"],[e,"url"])),this.d(w.track([s,"actorTag"],[e,"actorTag"])),this.d(w.track([s,"materialMode"],[e,"materialMode"])),this.d(w.track([s,"highlight"],[e,"highlight"])),this.d(w.track([s,"maximumScreenSpaceError"],[e,"maximumScreenSpaceError"])),this.d(w.track([s,"highlightID"],[e,"highlightID"])),this.d(w.track([s,"highlightColor"],[e,"highlightColor"])),this.d(w.bind([s,"offset"],[e,"offset"])),this.d(w.bind([s,"rotation"],[e,"rotation"])),this.d(w.track([s,"czmImageBasedLightingFactor"],[e,"czmImageBasedLightingFactor"])),this.d(w.track([s,"czmLuminanceAtZenith"],[e,"czmLuminanceAtZenith"])),this.d(w.track([s,"czmMaximumMemoryUsage"],[e,"czmMaximumMemoryUsage"])),this.d(w.track([s,"czmClassificationType"],[e,"czmClassificationType"])),this.d(w.track([s,"czmStyleJson"],[e,"czmStyleJson"])),this.d(w.track([s,"czmBackFaceCulling"],[e,"czmBackFaceCulling"])),this.d(w.track([s,"czmDebugShowBoundingVolume"],[e,"czmDebugShowBoundingVolume"])),this.d(w.track([s,"czmDebugShowContentBoundingVolume"],[e,"czmDebugShowContentBoundingVolume"])),this.d(w.track([s,"colorBlendMode"],[e,"colorBlendMode"])),this.d(w.track([s,"cacheBytes"],[e,"cacheBytes"])),this.d(w.track([s,"clippingPlaneEnabled"],[e,"clippingPlaneEnabled"])),this.d(w.track([s,"unionClippingRegions"],[e,"unionClippingRegions"])),this.d(w.track([s,"clippingPlaneEdgeColor"],[e,"clippingPlaneEdgeColor"])),this.d(w.track([s,"clippingPlaneEdgeWidth"],[e,"clippingPlaneEdgeWidth"])),this.d(w.track([s,"materialParams"],[e,"materialParams"])),this.d(w.bind([s,"supportEdit"],[e,"supportEdit"])),this.d(w.bind([s,"clippingPlanesId"],[e,"clippingPlanesId"])),this.d(w.bind([s,"clippingPlaneIds"],[e,"clippingPlaneIds"])),this.d(w.bind([s,"flattenedPlaneId"],[e,"flattenedPlaneId"])),this.d(w.bind([s,"flattenedPlaneEnabled"],[e,"flattenedPlaneEnabled"])),this.d(w.bind([s,"clippingPlaneId"],[e,"clippingPlaneId"])),this.d(w.bind([s,"excavateId"],[e,"excavateId"]))}{const s=this._es3DTileset;this.d(e.refreshTilesetEvent.don(()=>{s.refreshTileset()})),this.d(e.highlightFeatureEvent.don((...i)=>{s.highlightFeature(...i)})),this.d(e.highlightFeatureAndFlyToEvent.don((...i)=>{s.highlightFeatureAndFlyTo(...i)})),this.d(e.setFeatureColorEvent.don((...i)=>{s.setFeatureColor(...i)})),this.d(e.setFeatureVisableEvent.don((...i)=>{s.setFeatureVisable(...i)})),this.d(e.resetFeatureStyleEvent.don((...i)=>{s.resetFeatureStyle(...i)})),this.d(e.flyInEvent.don((...i)=>{s.flyIn(i[0])})),this.d(e.flyToEvent.don((...i)=>{s.flyTo(i[0])})),this.d(e.calcFlyToParamEvent.don((...i)=>{s.calcFlyToParam(...i)})),this.d(e.calcFlyInParamEvent.don((...i)=>{s.calcFlyInParam(...i)}))}{const s=this._es3DTileset;this.d(s.tilesetReady.don(i=>{e.tilesetReady.emit(i)})),this.d(s.pickedEvent.don(i=>{i.assign({sceneObject:e}),e.pickedEvent.emit(i)}))}{const s=()=>{this.es3DTileset.show=e.show};s(),this.d(e.showChanged.don(()=>{s()}))}}get es3DTileset(){return this._es3DTileset}};C(Br,"type",Br.register("ESUeViewer",p.ESRtsFeatureEditing.type,Br));let Oi=Br;const fr=class fr extends jA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(fr,"type",fr.register("ESUeViewer",p.ESMsTileset.type,fr));let Wi=fr;const wr=class wr extends uA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}const n=()=>{t.callUeFunc({f:"update",p:{id:A.id,height:A.height??p.ESGeoExtrudedPolygon.defaults.height,extrudedHeight:A.extrudedHeight??p.ESGeoExtrudedPolygon.defaults.extrudedHeight,perPositionHeight:A.perPositionHeight??p.ESGeoExtrudedPolygon.defaults.perPositionHeight}})},s=this.disposeVar(w.createNextAnimateFrameEvent(A.heightChanged,A.extrudedHeightChanged,A.perPositionHeightChanged));this.dispose(s.disposableOn(n)),this.dispose(A.createdEvent.disposableOn(n))}};C(wr,"type",wr.register("ESUeViewer",p.ESGeoExtrudedPolygon.type,wr));let Xi=wr;const pr=class pr extends x{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};C(pr,"type",pr.register("ESUeViewer",p.ESStaticMesh.type,pr));let Ji=pr;const Cr=class Cr extends nA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})})),this.d(A.clearEvent.don(()=>{t.callUeFunc({f:"Clear",p:{id:A.id}})}))}};C(Cr,"type",Cr.register("ESUeViewer",p.ESSkylineAnalysis.type,Cr));let zi=Cr;v.copyright=void 0;try{const r="earthsdk3-ue",A="3.4.0-beta.6",e="2025-09-03T08:05:29.000Z",t="北京西部世界科技有限公司",n="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="365f7587cfe6bd14a471b404f8874ab445518b66",o=((Date.now()-1756886729e3)/36e5).toFixed(1),a=`%c🌏 ${r}%c ${A}.${s.slice(0,8)}.${e} (距今${o}个小时)
113
113
  %c${n?n+`
114
114
  `:""}当前网站正在使用${r},此软件版权归${t}所有
115
- `;v.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","1c85a7938326029bfd0efde53b240e71da26ae46")},get info(){return a},get date(){return"2025-09-02T06:26:49.000Z"},get author(){return"suplyang"},get version(){return"3.4.0-beta.4"},get name(){return"earthsdk3-ue"},get commitId(){return"1c85a7938326029bfd0efde53b240e71da26ae46"},print(l=!1){!l&&window._xe2_no_copy_print||console.info(this.info,`
115
+ `;v.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","365f7587cfe6bd14a471b404f8874ab445518b66")},get info(){return a},get date(){return"2025-09-03T08:05:29.000Z"},get author(){return"suplyang"},get version(){return"3.4.0-beta.6"},get name(){return"earthsdk3-ue"},get commitId(){return"365f7587cfe6bd14a471b404f8874ab445518b66"},print(l=!1){!l&&window._xe2_no_copy_print||console.info(this.info,`
116
116
  font-size: 18px;
117
117
  font-weight: 1000;
118
118
  line-height: 1;