@bimdata/viewer 2.17.0-beta.5 → 2.17.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.
|
@@ -2548,7 +2548,7 @@ void main() {
|
|
|
2548
2548
|
`},zoomImageTransform(){return`
|
|
2549
2549
|
scale(${this.zoomFactor})
|
|
2550
2550
|
translate(-${this.zoomX}px, -${this.zoomY}px)
|
|
2551
|
-
`}},methods:{onMouseMove({offsetX:e,offsetY:t}){this.zoomX=e,this.zoomY=t}}},zPt=["src"],qPt=["src"];function GPt(e,t,i,o,r,n){return k(),N("div",{class:"preview-2d",onMouseenter:t[0]||=a=>r.hover=!0,onMouseleave:t[1]||=a=>r.hover=!1,onMousemove:t[2]||=(...a)=>n.onMouseMove&&n.onMouseMove(...a)},[w("img",{loading:"lazy",src:n.imgUrl},null,8,zPt),Tt(w("div",{class:"zoom",style:ve({transform:n.zoomTransform})},[w("div",{class:"zoomImage",style:ve({width:`${i.width}px`,height:`${i.height}px`,transform:n.zoomImageTransform})},[w("img",{loading:"lazy",src:n.imgUrl},null,8,qPt)],4)],4),[[ui,r.hover]])],32)}var KPt=Q(QPt,[["render",GPt],["__scopeId","data-v-b92f4cf9"]]),H$=15,JPt={props:{width:{type:Number},height:{type:Number},previewUrl:{type:String},defaultUrl:{type:String}},data(){return{translation:0}},computed:{viewportWidth(){return Math.min(this.width,this.height)}},methods:{onMouseMove({offsetX:e}){let t=Math.ceil(H$*(1-e/this.width));t=Math.abs(t),t=Math.min(t,H$),this.translation=(t-1)*this.viewportWidth}}},ZPt=["src"];function WPt(e,t,i,o,r,n){return k(),N("div",{class:"preview-3d",onMousemove:t[0]||=(...a)=>n.onMouseMove&&n.onMouseMove(...a)},[w("div",{class:"viewport",style:ve({width:`${n.viewportWidth}px`,height:`${i.height}px`})},[w("img",{loading:"lazy",src:i.previewUrl||i.defaultUrl,style:ve({transform:`translateX(-${r.translation}px)`})},null,12,ZPt)],4)],32)}var YPt={components:{Preview2D:KPt,Preview3D:Q(JPt,[["render",WPt],["__scopeId","data-v-81707204"]])},props:{type:{type:String,default:"3d",validator:e=>["2d","3d"].includes(e)},width:{type:Number,default:240},height:{type:Number,default:240},previewUrl:{type:String},defaultUrl:{type:String},backgroundColor:{type:String,default:"var(--color-silver-light)"},zoomFactor:{type:Number,default:3}},computed:{previewComponent(){return this.type==="3d"?"Preview3D":"Preview2D"}}};function XPt(e,t,i,o,r,n){return k(),W(qr(n.previewComponent),la({class:"bimdata-model-preview",style:{width:`${i.width}px`,height:`${i.height}px`,backgroundColor:i.backgroundColor}},e.$props),null,16,["style"])}var $Pt=Q(YPt,[["render",XPt]]),eIt={class:"placeholder"},tIt={class:"list-item"},iIt={class:"count"},rIt=Q({__name:"StoreySelector",props:{storeys:{type:Object,required:!0},storey:{type:Object,default:null}},emits:["storey-selected"],setup(e,{emit:t}){let i=e,o=pe(null);return xt([()=>i.storeys,()=>i.storey],([r,n])=>{(!n||r.some(a=>a.uuid===n.uuid)&&n.uuid!==o.value?.uuid)&&(o.value=n)},{immediate:!0}),(r,n)=>{let a=I("BIMDataIconStorey"),s=I("BIMDataTextbox"),l=I("BIMDataIconPlan"),c=I("BIMDataDropdownList");return k(),W(c,{class:"storey-selector",width:"100%",list:e.storeys,elementKey:"uuid",closeOnElementClick:!0,onElementClick:n[0]||=d=>r.$emit("storey-selected",d)},{header:j(()=>[T(a,{size:"xs"}),w("span",eIt,G(o.value?.name??r.$t("MetaBuildingStructure.StoreySelector.placeholder")),1)]),element:j(({element:d})=>[w("div",tIt,[T(s,{class:"text",text:d.name},null,8,["text"]),T(l,{size:"xs"}),w("span",iIt,G(d.plans.length),1)])]),_:1},8,["list"])}}},[["__scopeId","data-v-49c78195"]]),oIt={class:"photosphere-building"},nIt={class:"title"},aIt={class:"head"},sIt={class:"body"},lIt={class:"loading"},V$=Q({__name:"BIMDataPhotosphereBuilding",props:{apiClient:{type:Object,required:!0},space:{type:Object,required:!0},project:{type:Object,required:!0},model:{type:Object,default:null},storey:{type:Object,default:null},plan:{type:Object,default:null},selectable:{type:Boolean,default:!1}},emits:["storey-selected","plan-selected"],setup(e,{emit:t}){let i=e,o=t,r=pe(!1),n=pe([]),a=pe(null),s=je(()=>a.value?.plans??[]),l=pe(null);xt(()=>i.model,async u=>{if(u)try{r.value=!0,n.value=await i.apiClient.modelApi.getStoreys(i.space.id,u.id,i.project.id),n.value.some(({uuid:A})=>a.value?.uuid===A)||(a.value=n.value[0]??null)}finally{r.value=!1}else n.value=[],a.value=null},{immediate:!0}),xt(()=>i.storey,u=>{a.value=u},{immediate:!0}),xt(()=>i.plan,u=>{l.value=u?.plan?.id},{immediate:!0});let c=u=>(a.value=u,o("storey-selected",u)),d=u=>o("plan-selected",u);return(u,A)=>{let h=I("BIMDataIconBuilding"),p=I("BIMDataRadio"),f=I("BIMDataFileIcon"),m=I("BIMDataTextbox"),g=I("BIMDataSpinner");return k(),N("div",oIt,[w("div",nIt,[T(h,{size:"s"}),w("span",null,G(u.$t("PhotosphereBuilding.title")),1)]),w("div",aIt,[T(rIt,{storeys:n.value,storey:a.value,onStoreySelected:c},null,8,["storeys","storey"])]),w("div",sIt,[(k(!0),N(ut,null,Vt(s.value,y=>(k(),N("div",{class:"list-item",key:y.plan.id},[e.selectable?(k(),W(p,{key:0,value:y.plan.id,modelValue:l.value,"onUpdate:modelValue":[A[0]||=v=>l.value=v,v=>d(y)]},null,8,["value","modelValue","onUpdate:modelValue"])):le("",!0),T(f,{fileName:y.plan.document?.file_name??y.plan.name,size:14},null,8,["fileName"]),T(m,{class:"text",text:y.plan.name},null,8,["text"])]))),128))]),T(Qi,{name:"fade"},{default:j(()=>[Tt(w("div",lIt,[T(g)],512),[[ui,r.value]])]),_:1})])}}},[["__scopeId","data-v-94317752"]]);function iI(e,t){return Array.isArray(e)?e=e.map(i=>iI(i,t)):(e.expandedRef=pe(!0),e.parent=t,e.children=e.children?.map(i=>iI(i,e))??[]),e}function cIt(e,t,i){return[{id:1,text:e.name,component:"StructureRootNode",children:t.map(o=>dIt(o,i))}]}var dIt=(e,t)=>({id:e.uuid,text:e.name,component:"StoreyNode",children:e.plans?.map(i=>uIt(e,i))??[],storey:e}),uIt=(e,t)=>({id:t.plan.id,text:t.plan.name,component:"PlanNode",storey:e,plan:t}),AIt={class:"generic-tree-node"},hIt={class:"end"},V8=Q({__name:"GenericTreeNode",props:{node:{type:Object,required:!0},depth:{type:Number,required:!0}},setup(e){return(t,i)=>{let o=I("BIMDataTextbox");return k(),N("div",AIt,[Pt(t.$slots,"icon",{},void 0,!0),T(o,{class:"text",text:e.node.text},null,8,["text"]),w("div",hIt,[Pt(t.$slots,"end",{},void 0,!0)])])}}},[["__scopeId","data-v-fab13549"]]),pIt={__name:"PlanNode",props:{node:{type:Object,required:!0},depth:{type:Number,required:!0}},emits:["delete-plan"],setup(e){let t=e,i=je(()=>t.node.storey),o=je(()=>t.node.plan);return(r,n)=>{let a=I("BIMDataFileIcon"),s=I("BIMDataIconDelete"),l=I("BIMDataButton");return k(),W(V8,Cs(jl(r.$props)),{icon:j(()=>[T(a,{"file-name":o.value.plan.document?.file_name??o.value.plan.name,size:12},null,8,["file-name"])]),end:j(()=>[T(l,{width:"24px",height:"24px",color:"high",ghost:"",rounded:"",icon:"",onClick:n[0]||=c=>r.$emit("delete-plan",{storey:i.value,plan:o.value})},{default:j(()=>[T(s,{size:"xxs"})]),_:1})]),_:1},16)}}},fIt=Q({__name:"StoreyNode",props:{node:{type:Object,required:!0},depth:{type:Number,required:!0}},emits:["add-plans","delete-storey","update-storey"],setup(e,{emit:t}){let i=e,o=t,r=[{key:1,text:"BuildingMaker.view.addFile",icon:"plus",action:()=>(n.value=!1,o("add-plans",i.node.storey))},{key:2,text:"BIMDataComponents.t.rename",icon:"edit",action:()=>(n.value=!1,o("update-storey",i.node.storey)),divider:!0},{key:3,text:"BIMDataComponents.t.delete",icon:"delete",color:"var(--color-high)",action:()=>(n.value=!1,o("delete-storey",i.node.storey))}],n=pe(!1);return(a,s)=>{let l=I("BIMDataIconStorey"),c=I("BIMDataIconEllipsis"),d=I("BIMDataButton"),u=I("BIMDataIcon"),A=I("BIMDataMenu");return k(),W(V8,la({class:"storey-node"},a.$props),{icon:j(()=>[T(l,{size:"xxs"})]),end:j(()=>[T(d,{width:"24px",height:"24px",color:"granite",ghost:"",rounded:"",icon:"",onClick:s[0]||=h=>n.value=!n.value},{default:j(()=>[T(c,{customSize:"24"})]),_:1}),T(Qi,{name:"fade"},{default:j(()=>[Tt(T(A,{class:"storey-node__menu",menuItems:r,width:"180px"},{item:j(({item:h})=>[T(u,{name:h.icon,size:"xs",margin:"0 12px 0 0"},null,8,["name"]),w("span",null,G(a.$t(h.text)),1)]),_:1},512),[[ui,n.value]])]),_:1})]),_:1},16)}}},[["__scopeId","data-v-a66bc7dd"]]),gIt={__name:"StructureRootNode",props:{node:{type:Object,required:!0},depth:{type:Number,required:!0}},emits:["create-storey"],setup(e){return(t,i)=>{let o=I("BIMDataIconBuilding"),r=I("BIMDataIconPlus"),n=I("BIMDataButton");return k(),W(V8,Cs(jl(t.$props)),{icon:j(()=>[T(o,{size:"xs"})]),end:j(()=>[T(n,{width:"23px",height:"23px",color:"primary",fill:"",radius:"",icon:"",onClick:i[0]||=a=>t.$emit("create-storey")},{default:j(()=>[T(r,{size:"xxs"})]),_:1})]),_:1},16)}}},mIt={__name:"ZoneNode",props:{node:{type:Object,required:!0},depth:{type:Number,required:!0}},setup(e){return(t,i)=>{let o=I("BIMDataIconZone2");return k(),W(V8,Cs(jl(t.$props)),{icon:j(()=>[T(o,{size:"xxs"})]),_:1},16)}}},vIt={class:"building-view"},yIt={key:0,class:"content"},wIt={key:1,class:"content"},bIt={class:"building-view__tree"},CIt=Q(Object.assign({components:{PlanNode:pIt,StoreyNode:fIt,StructureRootNode:gIt,ZoneNode:mIt}},{__name:"PhotosphereBuildingView",props:{apiClient:{type:Object,required:!0},space:{type:Object,required:!0},project:{type:Object,required:!0},model:{type:Object,required:!0}},emits:["close"],setup(e,{emit:t}){let i=e,o=bt("service"),r=bt("loading"),n=pe(""),a=pe(""),s=pe(!1),l=pe(!1),c=pe([]),d=pe(null),u=pe([]),A=pe([]),h=je(()=>iI(cIt(i.model,c.value,A.value))),p=async()=>{try{r.value=!0,c.value=await o.fetchStoreys(i.model)}finally{r.value=!1}},f=async()=>{try{r.value=!0,A.value=await o.fetchZones(i.model)}finally{r.value=!1}},m=async D=>{await o.createStorey(i.model,D),p()},g=async D=>{await o.updateStorey(i.model,D),p()},y=async D=>{await o.deleteStorey(i.model,D),p()},v=D=>{d.value=D,l.value=!0},C=()=>{d.value=null,l.value=!1},x=D=>{n.value=i.apiClient.config.configuration.basePath,a.value=i.apiClient.accessToken,d.value=D,s.value=!0},B=async()=>{let D=[],P=[];for(let{document:R,pdfPage:O}of u.value)O?P.push(O):D.push(R);let M=(await o.createPlanModels(D)).concat(P);await o.createStoreyPlans(i.model,d.value,M),p(),u.value=[],d.value=null,s.value=!1},E=async({storey:D,plan:P})=>{await o.deleteStoreyPlan(i.model,D,P),p()};return Di(()=>{p(),f()}),(D,P)=>{let M=I("BIMDataFileManager"),R=I("BIMDataButton"),O=I("BIMDataTree");return k(),N("div",vIt,[T(Qi,{name:"fade",mode:"out-in"},{default:j(()=>[s.value&&n.value&&a.value&&d.value?(k(),N("div",yIt,[T(M,{class:"building-view__dms",spaceId:e.space.id,projectId:e.project.id,apiUrl:n.value,archiveUrl:"",accessToken:a.value,locale:D.$i18n.locale,select:!0,pdfPageSelect:!0,multi:!0,headerButtons:!1,selectableFileTypes:mt(eX),onSelectionChange:P[0]||=V=>u.value=V},null,8,["spaceId","projectId","apiUrl","accessToken","locale","selectableFileTypes"]),T(R,{width:"100%",color:"primary",fill:"",radius:"",onClick:B},{default:j(()=>[nt(G(D.$t("BIMDataComponents.t.validate")),1)]),_:1})])):(k(),N("div",wIt,[w("div",bIt,[T(O,{data:h.value},{node:j(({node:V,depth:z})=>[(k(),W(qr(V.component),{node:V,depth:z,onCreateStorey:v,onUpdateStorey:v,onDeleteStorey:y,onAddPlans:x,onDeletePlan:E},null,40,["node","depth"]))]),_:1},8,["data"])]),T(R,{width:"100%",color:"primary",fill:"",radius:"",onClick:P[1]||=V=>D.$emit("close")},{default:j(()=>[nt(G(D.$t("BIMDataComponents.t.finish")),1)]),_:1}),T(Qi,{name:"fade"},{default:j(()=>[l.value?(k(),W(rX,{key:0,class:"building-view__form",storey:d.value,onCreateStorey:m,onUpdateStorey:g,onClose:C},null,8,["storey"])):le("",!0)]),_:1})]))]),_:1})])}}}),[["__scopeId","data-v-5bedb26f"]]),xIt={class:"bimdata-building-maker"},BIt=["src"],kIt={class:"bimdata-building-maker__body"},EIt={class:"bimdata-building-maker__loader"},MIt=Q({__name:"BIMDataPhotosphereBuildingMaker",props:{apiClient:{type:Object,required:!0},space:{type:Object,required:!0},project:{type:Object,required:!0},model:{type:Object,default:null}},emits:["metaBuilding-created","metaBuilding-updated","metaBuilding-deleted"],setup(e,{emit:t}){let i=e,o=t,r=Object.freeze({FORM:"form",LIST:"list",VIEW:"view"}),n=$Y(i.apiClient,i.space,i.project),a=pe(!1);pr("service",n),pr("loading",a);let s=pe(r.LIST),l=pe([]),c=pe(null),d=async()=>{a.value=!0,l.value=await n.fetchPhotosphereBuildings(),a.value=!1},u=async g=>{await n.deleteMetaBuilding(g),d(),o("metaBuilding-deleted")},A=g=>{c.value=g??null,s.value=r.FORM},h=g=>{c.value=g,s.value=r.VIEW},p=async g=>{await d(),h(g),o("metaBuilding-created")},f=()=>{d(),s.value=r.LIST,o("metaBuilding-updated")},m=()=>{s.value=r.LIST};return xt(()=>i.model,g=>{g&&h(g)},{immediate:!0}),Di(()=>d()),(g,y)=>{let v=I("BIMDataIconArrow"),C=I("BIMDataButton"),x=I("BIMDataSpinner");return k(),N("div",xIt,[w("div",{class:"bimdata-building-maker__header",style:ve({visibility:s.value===mt(r).LIST?"hidden":"visible"})},[T(C,{class:"bimdata-building-maker__header__btn-back",ghost:"",radius:"",disabled:a.value.value,onClick:m},{default:j(()=>[T(v,{size:"xxs",margin:"0 6px 0 0"}),w("span",null,G(g.$t("BIMDataComponents.t.back")),1)]),_:1},8,["disabled"]),w("img",{src:mt(tm)},null,8,BIt),w("span",null,G(g.$t("PhotosphereBuilding.title")),1)],4),w("div",kIt,[T(Qi,{name:"fade",mode:"out-in"},{default:j(()=>[s.value===mt(r).FORM?(k(),W(tX,{key:0,type:mt(xP).PHOTOSPHERE_BUILDING,metaBuilding:c.value,onMetaBuildingCreated:p,onMetaBuildingUpdated:f},null,8,["type","metaBuilding"])):s.value===mt(r).VIEW&&c.value?(k(),W(CIt,{key:1,apiClient:e.apiClient,space:e.space,project:e.project,model:c.value,onClose:m},null,8,["apiClient","space","project","model"])):(k(),W(iX,{key:2,metaBuildings:l.value,onOpenMetaBuilding:h,onCreateMetaBuilding:A,onUpdateMetaBuilding:A,onDeleteMetaBuilding:u},null,8,["metaBuildings"]))]),_:1})]),T(Qi,{name:"fade"},{default:j(()=>[Tt(w("div",EIt,[T(x)],512),[[ui,a.value]])]),_:1})])}}},[["__scopeId","data-v-235bd404"]]),PIt={class:"overlay"},IIt={class:"safe-zone__icon"},SIt={class:"safe-zone__title"},DIt={class:"safe-zone__text"},TIt={class:"safe-zone__actions"},LIt=Q({__name:"BIMDataSafeZoneModal",props:{width:{type:String,default:"350px"},iconName:{type:String,default:"warning"}},setup(e){return(t,i)=>{let o=I("BIMDataIcon");return k(),N("div",PIt,[w("div",{class:"safe-zone",style:ve({width:e.width})},[w("div",IIt,[T(o,{name:e.iconName,size:"s",fill:"",color:"high"},null,8,["name"])]),w("h2",SIt,[Pt(t.$slots,"title",{},void 0,!0)]),w("div",DIt,[Pt(t.$slots,"text",{},void 0,!0)]),w("div",TIt,[Pt(t.$slots,"actions",{},void 0,!0)])],4)])}}},[["__scopeId","data-v-01a25253"]]),RIt=co({BIMDataBuildingMaker:()=>oX,BIMDataFileManager:()=>XMt,BIMDataGuidedTour:()=>vPt,BIMDataMetaBuildingStructure:()=>N$,BIMDataModelPreview:()=>$Pt,BIMDataPDFViewer:()=>P$,BIMDataPhotosphereBuilding:()=>V$,BIMDataPhotosphereBuildingMaker:()=>MIt,BIMDataSafeZoneModal:()=>LIt}),_It={name:"buildingMaker",component:{setup(){let{apiClient:e,cloudId:t,projectId:i}=bt("$viewer").api;return()=>Gr(oX,{apiClient:e,space:{id:t},project:{id:i}})}},window:{name:"buildingMaker",label:"Building Maker",noModel:!0,icon:{imgUri:tm}}},FIt={components:{BIMDataNumericalInput:Ij},setup(){let e=bt("$viewer"),t=bt("viewerPlan"),i=bt("root"),o=bt("close"),r=je(()=>i.editedBitmap?.plan),n=je(()=>i.editedBitmap?i.editedBitmap:{x:0,y:0,scale:0,angle:0,opacity:0}),a=UIt(n),{x:s,y:l,angle:c,scale:d}=a,u,A,h=new Map;return xt(r,(f,m)=>{m&&h.set(m.key,u),f||h.clear(),u=h.get(f?.key)??null,A=null}),xt([s,l,c,d],()=>{r.value&&(u||=r.value.plan.transform,A={translate:[s.value,l.value],rotate:c.value,scale:d.value},t.planObjectRegistry.updatePlanObjectsTransform(r.value,{oldTransform:u,newTransform:A}),u=A)}),{root:i,bitmap:n,...a,submit:async()=>{try{i.loading=!0,await Promise.all(i.bitmaps.filter(f=>f.edited).map(async f=>{let{x:m,y:g,scale:y,angle:v,opacity:C,plan:x}=f,B={...x.plan.transform},E={translate:[m,g],rotate:v,scale:y,opacity:C};t.planObjectRegistry.updatePlanObjectsTransform(x,{oldTransform:E,newTransform:B}),x.plan.transform||(x.plan.transform={}),Object.assign(x.plan.transform,E),await e.state.updatePlan(x,B),f.edited=!1}))}catch(f){console.error(f)}finally{i.loading=!1,o()}}}}};function UIt(e){let t={};return Object.entries({x:i=>i,y:i=>i,scale:i=>i,angle:i=>i<0||i>360?(i%360+360)%360:i,opacity:i=>i<0?0:i>1?1:i}).forEach(([i,o])=>{t[i]=je({get:()=>e.value[i],set:r=>e.value[i]=o(r)})}),t}var OIt={class:"synchronization__page__edit"},NIt={class:"synchronization__page__edit__content"},HIt={class:"synchronization__page__edit__content__unit-group"},VIt={class:"synchronization__page__edit__content__unit-group__element"},jIt={class:"synchronization__page__edit__content__unit-group__element"},QIt={class:"synchronization__page__edit__content__unit-group__element"},zIt={class:"synchronization__page__edit__content__unit"},qIt={class:"synchronization__page__edit__content__unit"},GIt={class:"synchronization__page__edit__content__img"},KIt=["src"],JIt={class:"synchronization__page__edit__validate"};function ZIt(e,t,i,o,r,n){let a=I("BIMDataNumericalInput"),s=I("BIMDataSlider"),l=I("BIMDataTextbox"),c=I("BIMDataButton");return k(),N("div",OIt,[w("div",NIt,[w("section",null,[w("span",null,G(e.$t("synchronization.location")),1),w("div",HIt,[w("div",VIt,[T(a,{modelValue:e.x,"onUpdate:modelValue":t[0]||=d=>e.x=d,label:"X",container:e.$viewer.localContext.el},null,8,["modelValue","container"])]),w("div",jIt,[T(a,{modelValue:e.y,"onUpdate:modelValue":t[1]||=d=>e.y=d,label:"Y",container:e.$viewer.localContext.el},null,8,["modelValue","container"])]),w("div",QIt,[T(a,{modelValue:e.scale,"onUpdate:modelValue":t[2]||=d=>e.scale=d,label:e.$t("synchronization.scale"),step:.01,min:.01,container:e.$viewer.localContext.el},null,8,["modelValue","label","container"])])])]),w("section",null,[w("span",null,G(e.$t("synchronization.rotation")),1),w("div",zIt,[T(a,{modelValue:e.angle,"onUpdate:modelValue":t[3]||=d=>e.angle=d,unit:"\xB0",centered:""},null,8,["modelValue"]),T(s,{modelValue:e.angle,"onUpdate:modelValue":t[4]||=d=>e.angle=d,min:0,max:360},null,8,["modelValue"])])]),w("section",null,[w("span",null,G(e.$t("synchronization.alpha")),1),w("div",qIt,[T(a,{modelValue:e.opacity,"onUpdate:modelValue":t[5]||=d=>e.opacity=d,centered:""},null,8,["modelValue"]),T(s,{modelValue:e.opacity,"onUpdate:modelValue":t[6]||=d=>e.opacity=d,min:0,max:1,step:.01},null,8,["modelValue"])])]),w("section",null,[w("span",null,G(e.$t("synchronization.preview")),1),w("div",GIt,[w("img",{src:o.bitmap.dataUrl,alt:"Background"},null,8,KIt),T(l,{text:o.bitmap.name,class:"synchronization__page__edit__content__img__name"},null,8,["text"])])])]),w("div",JIt,[T(c,{width:"100%",color:"primary",fill:"",radius:"",onClick:o.submit},{default:j(()=>[nt(G(o.bitmap&&o.bitmap.plan?e.$t("global.save"):e.$t("global.validate")),1)]),_:1},8,["onClick"])])])}var WIt={name:"BimdataSynchronization",components:{edit:Q(FIt,[["render",ZIt],["__scopeId","data-v-63e956d5"]])},setup(){let{localContext:e}=bt("$viewer"),t=bt("$plugin"),i=e.pluginComponentInstances.get("plan");if(!i)throw Error("[Synchronization] plugin cannot work without viewerPlan plugin with 2d engine on.");i=un(i),pr("viewerPlan",i);let o=je(()=>e.loadedModels[0]);xt(o,h=>{!h||h.type!=="METABUILDING"?t.hide():t.show()},{immediate:!0}),xt(()=>t.shown,h=>{o.value?.type!=="METABUILDING"&&h&&t.hide()});let r=qo({page:"edit",loading:!1,modalDisplayed:!1,model:null,storeys:[],selectedStorey:null,plans:[],bitmaps:[],editedBitmap:null});pr("root",r);let n=()=>{r.editedBitmap&&(r.bitmaps.map(h=>(h.edit(!1),h)).filter(h=>h.edited).forEach(h=>{let{x:p,y:f,scale:m,angle:g,plan:y}=h,v=y.plan.transform,C={translate:[p,f],rotate:g,scale:m};i.planObjectRegistry.updatePlanObjectsTransform(y,{oldTransform:C,newTransform:v}),h.reset()}),r.modalDisplayed=!1,i.storeyRightOffset=0,e.showUI(),document.removeEventListener("keydown",d),r.editedBitmap=null,r.bitmaps=[])},a=()=>{n(),t.close()};pr("close",a);let s=()=>{r.bitmaps.some(h=>h.edited)?r.modalDisplayed=!0:a()},l=()=>{a()},c=h=>{r.editedBitmap=h},d=h=>{r.loading||h.key==="Escape"&&(h.preventDefault(),r.modalDisplayed?r.modalDisplayed=!1:a())},u=e.hub.on("model-loaded",({model:h})=>{r.model=h,r.storeys=h.storeys,r.plans=h.storeys.flatMap(p=>p.plans)},{getLastEvent:!0}),A=e.hub.on("storey-selected",({storey:h})=>{r.selectedStorey=h,(!h||h.plans.length<2)&&a()},{getLastEvent:!0});return $i(()=>{e.hub.off(u),e.hub.off(A)}),xt(()=>r.editedBitmap,(h,p)=>{p?.edit(!1),h?.edit(!0)},{immediate:!0}),{viewerPlan:i,root:r,onBitmapClick:c,onCloseClick:s,onLeaveClick:l,onKeyDown:d,clean:n}},async onOpen(){this.$viewer.localContext.pluginComponentInstances.forEach(t=>{t!==this&&t.$close?.()}),this.viewerPlan.storeyRightOffset=380,await this.$viewer.localContext.hideUI({exceptions:[this.$plugin.name]}),document.addEventListener("keydown",this.onKeyDown);let e=this.$viewer.localContext.selectedStorey?.plans.map(t=>t.key)??[];this.root.bitmaps=Array.from(this.viewerPlan.bitmaps.filter(t=>e.includes(t.plan.key))),this.root.editedBitmap=this.root.bitmaps[0],this.root.bitmaps.filter(t=>!t.visible).forEach(t=>{this.$viewer.localContext.showPlan(t.plan),t.show()}),this.viewerPlan.$refs.storeySelector?.focus()},onClose(){this.clean()}},YIt={class:"bimdata-synchronization"},XIt={class:"bimdata-synchronization__header"},$It={class:"bimdata-synchronization__header__top"},eSt={class:"bimdata-synchronization__header__top__title"},tSt={class:"bimdata-synchronization__header__top__title__text"},iSt={class:"bimdata-synchronization__header__select__header"},rSt={class:"bimdata-info-length bimdata-synchronization__header__select__header__length"},oSt={class:"bimdata-synchronization__page"},nSt={key:1,class:"bimdata-synchronization__modal"},aSt={class:"bimdata-synchronization__modal__content"},sSt={class:"bimdata-synchronization__modal__content__symbols"},lSt={class:"bimdata-synchronization__modal__content__buttons"};function cSt(e,t,i,o,r,n){let a=I("BIMDataLoading"),s=I("BIMDataIconSynchro2D"),l=I("BIMDataIconClose"),c=I("BIMDataButton"),d=I("BIMDataTextbox"),u=I("BIMDataDropdownList"),A=I("BIMDataIconWarning");return k(),N("div",YIt,[o.root.loading?(k(),W(a,{key:0})):le("",!0),w("div",XIt,[w("div",$It,[w("div",eSt,[T(s,{size:"xs",fill:"",color:"primary"}),w("span",tSt,G(e.$t("synchronization.title")),1)]),T(c,{class:"bimdata-synchronization__header__top__close",width:"25px",height:"25px",ghost:"",radius:"",icon:"",onClick:o.onCloseClick},{default:j(()=>[T(l,{size:"xs",fill:"",color:"granite-light"})]),_:1},8,["onClick"])]),w("div",null,[T(u,{width:"100%",list:o.root.bitmaps,"element-key":"id","per-page":30,"close-on-element-click":!0,class:"bimdata-synchronization__header__select",onElementClick:o.onBitmapClick},{header:j(()=>[w("div",iSt,[w("div",rSt,[w("span",null,G(o.root.bitmaps.length),1)]),w("div",null,[T(d,{width:"265px",text:o.root.editedBitmap?.name},null,8,["text"])])])]),element:j(({element:h})=>[w("div",{class:ye(["bimdata-synchronization__header__select__element",{"bimdata-synchronization__header__select__element--selected":h===o.root.editedBitmap}])},G(h.name),3)]),_:1},8,["list","onElementClick"])])]),w("div",oSt,[(k(),W(L3,null,[(k(),W(qr(o.root.page)))],1024))]),o.root.modalDisplayed?(k(),N("div",nSt,[w("div",aSt,[w("div",sSt,[T(A,{fill:"",color:"high",size:"l"}),w("div",null,G(e.$t("synchronization.warning")),1)]),w("div",lSt,[T(c,{width:"45%",color:"high",fill:"",radius:"",onClick:o.onLeaveClick},{default:j(()=>[nt(G(e.$t("synchronization.leave")),1)]),_:1},8,["onClick"]),T(c,{width:"45%",color:"default",outline:"",radius:"",onClick:t[0]||=h=>o.root.modalDisplayed=!1},{default:j(()=>[nt(G(e.$t("synchronization.stay")),1)]),_:1})])])])):le("",!0)])}var dSt={name:"synchronization",i18n:{de:{tooltip:"2D-Synchronisierung",title:"2D-Synchronisierung",start:"Beginnen",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",select_storey:"Eine Etage ausw\xE4hlen",import_file:"Eine Datei importieren",location:"Position",scale:"Skala",rotation:"Rotation",alpha:"Undurchsichtigkeit",preview:"\xDCbersicht",import:"Ein Element importieren",from_ged:"Von der DMS des Projekts aus",from_computer:"Von Ihrem Computer aus",no_storey:"Um einen Hintergrund hinzuzuf\xFCgen, w\xE4hlen Sie bitte eine IFC und eine Etage aus.",no_ifc:"Um einen Hintergrund hinzuzuf\xFCgen, w\xE4hlen Sie bitte eine IFC aus.",warning:"M\xF6chten Sie diese Seite wirklich verlassen? Sie enth\xE4lt m\xF6glicherweise Informationen, die nicht best\xE4tigt sind.",leave:"Ja, diese Seite verlassen",stay:"Abbrechen, hierbleiben"},en:{tooltip:"2D Synchronization",title:"2D Synchronization",start:"Start",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",select_storey:"Select a floor",import_file:"Import a file",location:"Position",scale:"Scale",rotation:"Rotation",alpha:"Opacity",preview:"Preview",import:"Import an element",from_ged:"From the project's DMS",from_computer:"From your computer",no_storey:"To add a background, please select an IFC and a floor.",no_ifc:"To add a background, please select an IFC.",warning:"Are you sure you want to leave this page? There may be some informations that are not validated.",leave:"Yes, leave this page",stay:"Cancel, stay here"},es:{tooltip:"Sincronizaci\xF3n 2D",title:"Sincronizaci\xF3n 2D",start:"Comenzar",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",select_storey:"Seleccionar una planta",import_file:"Importar un fichero",location:"Posici\xF3n",scale:"Escala",rotation:"Rotaci\xF3n",alpha:"Opacidad",preview:"Vista r\xE1pida",import:"Importar un elemento",from_ged:"Desde el GED del proyecto",from_computer:"Desde su ordenador",no_storey:"Para agregar un fondo seleccione un IFC y una planta.",no_ifc:"Para agregar un fondo seleccione un IFC.",warning:"\xBFEsta usted seguro de que quiere abandonar esta p\xE1gina? Puede haber informaciones no validadas.",leave:"S\xED, abandonar la p\xE1gina",stay:"Cancelar, permanecer aqu\xED"},fr:{tooltip:"Synchronisation 2D",title:"Synchronisation 2D",start:"Commencer",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",select_storey:"S\xE9lectionner un \xE9tage",import_file:"Importer un fichier",location:"Position",scale:"Echelle",rotation:"Rotation",alpha:"Opacit\xE9",preview:"Aper\xE7u",import:"Importer un \xE9l\xE9ment",from_ged:"Depuis la GED du projet",from_computer:"Depuis votre ordinateur",no_storey:"Pour ajouter un fond, veuillez selectionner un IFC et un \xE9tage.",no_ifc:"Pour ajouter un fond, veuillez selectionner un IFC.",warning:"\xCAtes-vous s\xFBr de vouloir quitter cette page ? Il y'a peut-\xEAtre des informations non valid\xE9es.",leave:"Oui, quitter cette page",stay:"Annuler, rester ici"},it:{tooltip:"Sincronizzazione 2D",title:"Sincronizzazione 2D",start:"Iniziare",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",select_storey:"Selezionare un piano",import_file:"Importare un file",location:"Posizione",scale:"Scala",rotation:"Rotazione",alpha:"Opacit\xE0",preview:"Anteprima",import:"Importare un elemento",from_ged:"Dal cassetto informatico del progetto",from_computer:"Dal computer",no_storey:"Per aggiungere uno sfondo, selezionare un file IFC e un piano.",no_ifc:"Per aggiungere uno sfondo, selezionare un file IFC.",warning:"Si \xE8 sicuri di voler lasciare questa pagina? \xC8 possibile che alcune informazioni non siano state ancora convalidate.",leave:"S\xEC, uscire da questa pagina",stay:"Annulla, rimanere a questa pagina"}},component:Q(WIt,[["render",cSt],["__scopeId","data-v-98c2db44"]]),button:{tooltip:"synchronization.tooltip",position:"right",stance:1,content:"free",keepOpen:!0,icon:{imgUri:"data:image/svg+xml,%3csvg%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='6.52344'%20y='4.25488'%20width='16.1039'%20height='21.7744'%20stroke='%232F374A'/%3e%3crect%20x='3.12646'%20y='13.0261'%20width='14'%20height='20.043'%20transform='rotate(-45%203.12646%2013.0261)'%20fill='%232F374A'/%3e%3cmask%20id='path-3-outside-1_1838_531'%20maskUnits='userSpaceOnUse'%20x='-0.414214'%20y='-0.414216'%20width='31.1127'%20height='31.1127'%20fill='black'%3e%3crect%20fill='white'%20x='-0.414214'%20y='-0.414216'%20width='31.1127'%20height='31.1127'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.41421%2013.0208L4.35876%2014.9654L5.06586%2014.2582L3.82843%2013.0208L5.15425%2011.695L4.44715%2010.9879L2.41421%2013.0208ZM5.68458%209.75044L6.39169%2010.4576L10.4576%206.39169L9.75045%205.68458L5.68458%209.75044ZM10.9879%204.44714L11.695%205.15425L13.0208%203.82842L14.2583%205.06586L14.9654%204.35875L13.0208%202.41421L10.9879%204.44714ZM16.026%205.41942L15.3189%206.12652L19.208%2010.0156L19.9151%209.3085L16.026%205.41942ZM20.9758%2010.3692L20.2687%2011.0763L24.1577%2014.9654L24.8649%2014.2582L20.9758%2010.3692ZM25.9255%2015.3189L25.2184%2016.026L26.4558%2017.2635L25.13%2018.5893L25.8371%2019.2964L27.8701%2017.2635L25.9255%2015.3189ZM24.5997%2020.5338L23.8926%2019.8267L19.8267%2023.8926L20.5338%2024.5997L24.5997%2020.5338ZM19.2964%2025.8371L18.5893%2025.13L17.2635%2026.4558L16.026%2025.2184L15.3189%2025.9255L17.2635%2027.8701L19.2964%2025.8371ZM14.2583%2024.8649L14.9654%2024.1577L11.0763%2020.2687L10.3692%2020.9758L14.2583%2024.8649ZM9.3085%2019.9151L10.0156%2019.208L6.12652%2015.3189L5.41942%2016.026L9.3085%2019.9151Z'/%3e%3cpath%20d='M1%2013.0208L3.12132%2010.8995L5.24264%2013.0208L3.12132%2015.1421L1%2013.0208Z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.12132%2012.3137L2.41421%2013.0208L3.12132%2013.7279L3.82843%2013.0208L3.12132%2012.3137ZM1%2013.0208L3.12132%2015.1421L5.24264%2013.0208L3.12132%2010.8995L1%2013.0208Z'/%3e%3cpath%20d='M10.8995%203.12132L13.0208%200.999998L15.1421%203.12132L13.0208%205.24264L10.8995%203.12132Z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.0208%202.41421L12.3137%203.12132L13.0208%203.82842L13.7279%203.12132L13.0208%202.41421ZM10.8995%203.12132L13.0208%205.24264L15.1421%203.12132L13.0208%200.999998L10.8995%203.12132Z'/%3e%3cpath%20d='M25.0416%2017.2635L27.163%2015.1421L29.2843%2017.2635L27.163%2019.3848L25.0416%2017.2635Z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M27.163%2016.5563L26.4558%2017.2635L27.163%2017.9706L27.8701%2017.2635L27.163%2016.5563ZM25.0416%2017.2635L27.163%2019.3848L29.2843%2017.2635L27.163%2015.1421L25.0416%2017.2635Z'/%3e%3cpath%20d='M15.1421%2027.1629L17.2635%2025.0416L19.3848%2027.1629L17.2635%2029.2843L15.1421%2027.1629Z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.2635%2026.4558L16.5563%2027.1629L17.2635%2027.8701L17.9706%2027.1629L17.2635%2026.4558ZM15.1421%2027.1629L17.2635%2029.2843L19.3848%2027.1629L17.2635%2025.0416L15.1421%2027.1629Z'/%3e%3c/mask%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.41421%2013.0208L4.35876%2014.9654L5.06586%2014.2582L3.82843%2013.0208L5.15425%2011.695L4.44715%2010.9879L2.41421%2013.0208ZM5.68458%209.75044L6.39169%2010.4576L10.4576%206.39169L9.75045%205.68458L5.68458%209.75044ZM10.9879%204.44714L11.695%205.15425L13.0208%203.82842L14.2583%205.06586L14.9654%204.35875L13.0208%202.41421L10.9879%204.44714ZM16.026%205.41942L15.3189%206.12652L19.208%2010.0156L19.9151%209.3085L16.026%205.41942ZM20.9758%2010.3692L20.2687%2011.0763L24.1577%2014.9654L24.8649%2014.2582L20.9758%2010.3692ZM25.9255%2015.3189L25.2184%2016.026L26.4558%2017.2635L25.13%2018.5893L25.8371%2019.2964L27.8701%2017.2635L25.9255%2015.3189ZM24.5997%2020.5338L23.8926%2019.8267L19.8267%2023.8926L20.5338%2024.5997L24.5997%2020.5338ZM19.2964%2025.8371L18.5893%2025.13L17.2635%2026.4558L16.026%2025.2184L15.3189%2025.9255L17.2635%2027.8701L19.2964%2025.8371ZM14.2583%2024.8649L14.9654%2024.1577L11.0763%2020.2687L10.3692%2020.9758L14.2583%2024.8649ZM9.3085%2019.9151L10.0156%2019.208L6.12652%2015.3189L5.41942%2016.026L9.3085%2019.9151Z'%20fill='%232F374A'/%3e%3cpath%20d='M1%2013.0208L3.12132%2010.8995L5.24264%2013.0208L3.12132%2015.1421L1%2013.0208Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.12132%2012.3137L2.41421%2013.0208L3.12132%2013.7279L3.82843%2013.0208L3.12132%2012.3137ZM1%2013.0208L3.12132%2015.1421L5.24264%2013.0208L3.12132%2010.8995L1%2013.0208Z'%20fill='%232F374A'/%3e%3cpath%20d='M10.8995%203.12132L13.0208%200.999998L15.1421%203.12132L13.0208%205.24264L10.8995%203.12132Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.0208%202.41421L12.3137%203.12132L13.0208%203.82842L13.7279%203.12132L13.0208%202.41421ZM10.8995%203.12132L13.0208%205.24264L15.1421%203.12132L13.0208%200.999998L10.8995%203.12132Z'%20fill='%232F374A'/%3e%3cpath%20d='M25.0416%2017.2635L27.163%2015.1421L29.2843%2017.2635L27.163%2019.3848L25.0416%2017.2635Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M27.163%2016.5563L26.4558%2017.2635L27.163%2017.9706L27.8701%2017.2635L27.163%2016.5563ZM25.0416%2017.2635L27.163%2019.3848L29.2843%2017.2635L27.163%2015.1421L25.0416%2017.2635Z'%20fill='%232F374A'/%3e%3cpath%20d='M15.1421%2027.1629L17.2635%2025.0416L19.3848%2027.1629L17.2635%2029.2843L15.1421%2027.1629Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.2635%2026.4558L16.5563%2027.1629L17.2635%2027.8701L17.9706%2027.1629L17.2635%2026.4558ZM15.1421%2027.1629L17.2635%2029.2843L19.3848%2027.1629L17.2635%2025.0416L15.1421%2027.1629Z'%20fill='%232F374A'/%3e%3cpath%20d='M1%2013.0208L0.646447%2012.6673L0.292893%2013.0208L0.646447%2013.3744L1%2013.0208ZM3.12132%2010.8995L3.47487%2010.5459L3.12132%2010.1924L2.76777%2010.5459L3.12132%2010.8995ZM5.24264%2013.0208L5.59619%2013.3744L5.94975%2013.0208L5.59619%2012.6673L5.24264%2013.0208ZM3.12132%2015.1421L2.76777%2015.4957L3.12132%2015.8492L3.47487%2015.4957L3.12132%2015.1421ZM10.8995%203.12132L10.5459%202.76776L10.1924%203.12132L10.5459%203.47487L10.8995%203.12132ZM13.0208%200.999998L13.3744%200.646445L13.0208%200.292891L12.6673%200.646445L13.0208%200.999998ZM15.1421%203.12132L15.4957%203.47487L15.8492%203.12132L15.4957%202.76776L15.1421%203.12132ZM13.0208%205.24264L12.6673%205.59619L13.0208%205.94975L13.3744%205.59619L13.0208%205.24264ZM25.0416%2017.2635L24.6881%2016.9099L24.3345%2017.2635L24.6881%2017.617L25.0416%2017.2635ZM27.163%2015.1421L27.5165%2014.7886L27.163%2014.435L26.8094%2014.7886L27.163%2015.1421ZM29.2843%2017.2635L29.6378%2017.617L29.9914%2017.2635L29.6378%2016.9099L29.2843%2017.2635ZM27.163%2019.3848L26.8094%2019.7383L27.163%2020.0919L27.5165%2019.7383L27.163%2019.3848ZM15.1421%2027.1629L14.7886%2026.8094L14.435%2027.1629L14.7886%2027.5165L15.1421%2027.1629ZM17.2635%2025.0416L17.617%2024.6881L17.2635%2024.3345L16.9099%2024.6881L17.2635%2025.0416ZM19.3848%2027.1629L19.7383%2027.5165L20.0919%2027.1629L19.7383%2026.8094L19.3848%2027.1629ZM17.2635%2029.2843L16.9099%2029.6378L17.2635%2029.9914L17.617%2029.6378L17.2635%2029.2843ZM1.35355%2013.3744L3.47487%2011.253L2.76777%2010.5459L0.646447%2012.6673L1.35355%2013.3744ZM2.76777%2011.253L4.88909%2013.3744L5.59619%2012.6673L3.47487%2010.5459L2.76777%2011.253ZM4.88909%2012.6673L2.76777%2014.7886L3.47487%2015.4957L5.59619%2013.3744L4.88909%2012.6673ZM3.47487%2014.7886L1.35355%2012.6673L0.646447%2013.3744L2.76777%2015.4957L3.47487%2014.7886ZM11.253%203.47487L13.3744%201.35355L12.6673%200.646445L10.5459%202.76776L11.253%203.47487ZM12.6673%201.35355L14.7886%203.47487L15.4957%202.76776L13.3744%200.646445L12.6673%201.35355ZM14.7886%202.76776L12.6673%204.88909L13.3744%205.59619L15.4957%203.47487L14.7886%202.76776ZM13.3744%204.88909L11.253%202.76776L10.5459%203.47487L12.6673%205.59619L13.3744%204.88909ZM25.3952%2017.617L27.5165%2015.4957L26.8094%2014.7886L24.6881%2016.9099L25.3952%2017.617ZM26.8094%2015.4957L28.9307%2017.617L29.6378%2016.9099L27.5165%2014.7886L26.8094%2015.4957ZM28.9307%2016.9099L26.8094%2019.0312L27.5165%2019.7383L29.6378%2017.617L28.9307%2016.9099ZM27.5165%2019.0312L25.3952%2016.9099L24.6881%2017.617L26.8094%2019.7383L27.5165%2019.0312ZM15.4957%2027.5165L17.617%2025.3952L16.9099%2024.6881L14.7886%2026.8094L15.4957%2027.5165ZM16.9099%2025.3952L19.0312%2027.5165L19.7383%2026.8094L17.617%2024.6881L16.9099%2025.3952ZM19.0312%2026.8094L16.9099%2028.9307L17.617%2029.6378L19.7383%2027.5165L19.0312%2026.8094ZM17.617%2028.9307L15.4957%2026.8094L14.7886%2027.5165L16.9099%2029.6378L17.617%2028.9307ZM2.41421%2013.0208L1.70711%2012.3137L1%2013.0208L1.70711%2013.7279L2.41421%2013.0208ZM4.35876%2014.9654L3.65165%2015.6725L4.35876%2016.3796L5.06586%2015.6725L4.35876%2014.9654ZM5.06586%2014.2582L5.77297%2014.9654L6.48008%2014.2582L5.77297%2013.5511L5.06586%2014.2582ZM5.15425%2011.695L5.86136%2012.4021L6.56847%2011.695L5.86136%2010.9879L5.15425%2011.695ZM4.44715%2010.9879L5.15425%2010.2808L4.44715%209.57367L3.74004%2010.2808L4.44715%2010.9879ZM5.68458%209.75044L4.97748%209.04334L4.27037%209.75044L4.97748%2010.4576L5.68458%209.75044ZM6.39169%2010.4576L5.68458%2011.1647L6.39169%2011.8718L7.0988%2011.1647L6.39169%2010.4576ZM10.4576%206.39169L11.1647%207.09879L11.8718%206.39169L11.1647%205.68458L10.4576%206.39169ZM9.75045%205.68458L10.4576%204.97747L9.75045%204.27037L9.04334%204.97747L9.75045%205.68458ZM10.9879%204.44714L10.2808%203.74004L9.57367%204.44714L10.2808%205.15425L10.9879%204.44714ZM11.695%205.15425L10.9879%205.86136L11.695%206.56846L12.4021%205.86136L11.695%205.15425ZM14.2583%205.06586L13.5511%205.77297L14.2583%206.48008L14.9654%205.77297L14.2583%205.06586ZM14.9654%204.35875L15.6725%205.06586L16.3796%204.35875L15.6725%203.65165L14.9654%204.35875ZM13.0208%202.41421L13.7279%201.7071L13.0208%200.999998L12.3137%201.7071L13.0208%202.41421ZM16.026%205.41942L16.7331%204.71231L16.026%204.0052L15.3189%204.71231L16.026%205.41942ZM15.3189%206.12652L14.6118%205.41942L13.9047%206.12652L14.6118%206.83363L15.3189%206.12652ZM19.208%2010.0156L18.5009%2010.7227L19.208%2011.4298L19.9151%2010.7227L19.208%2010.0156ZM19.9151%209.3085L20.6222%2010.0156L21.3293%209.3085L20.6222%208.6014L19.9151%209.3085ZM20.9758%2010.3692L21.6829%209.66206L20.9758%208.95495L20.2687%209.66206L20.9758%2010.3692ZM20.2687%2011.0763L19.5616%2010.3692L18.8544%2011.0763L19.5616%2011.7834L20.2687%2011.0763ZM24.1577%2014.9654L23.4506%2015.6725L24.1577%2016.3796L24.8649%2015.6725L24.1577%2014.9654ZM24.8649%2014.2582L25.572%2014.9654L26.2791%2014.2582L25.572%2013.5511L24.8649%2014.2582ZM25.9255%2015.3189L26.6326%2014.6118L25.9255%2013.9047L25.2184%2014.6118L25.9255%2015.3189ZM25.2184%2016.026L24.5113%2015.3189L23.8042%2016.026L24.5113%2016.7331L25.2184%2016.026ZM25.13%2018.5893L24.4229%2017.8822L23.7158%2018.5893L24.4229%2019.2964L25.13%2018.5893ZM25.8371%2019.2964L25.13%2020.0035L25.8371%2020.7106L26.5442%2020.0035L25.8371%2019.2964ZM27.8701%2017.2635L28.5772%2017.9706L29.2843%2017.2635L28.5772%2016.5563L27.8701%2017.2635ZM24.5997%2020.5338L25.3068%2021.2409L26.0139%2020.5338L25.3068%2019.8267L24.5997%2020.5338ZM23.8926%2019.8267L24.5997%2019.1196L23.8926%2018.4125L23.1855%2019.1196L23.8926%2019.8267ZM19.8267%2023.8926L19.1196%2023.1855L18.4125%2023.8926L19.1196%2024.5997L19.8267%2023.8926ZM20.5338%2024.5997L19.8267%2025.3068L20.5338%2026.0139L21.2409%2025.3068L20.5338%2024.5997ZM19.2964%2025.8371L20.0035%2026.5442L20.7106%2025.8371L20.0035%2025.13L19.2964%2025.8371ZM18.5893%2025.13L19.2964%2024.4229L18.5893%2023.7158L17.8822%2024.4229L18.5893%2025.13ZM16.026%2025.2184L16.7331%2024.5113L16.026%2023.8042L15.3189%2024.5113L16.026%2025.2184ZM15.3189%2025.9255L14.6118%2025.2184L13.9047%2025.9255L14.6118%2026.6326L15.3189%2025.9255ZM17.2635%2027.8701L16.5563%2028.5772L17.2635%2029.2843L17.9706%2028.5772L17.2635%2027.8701ZM14.2583%2024.8649L13.5511%2025.572L14.2583%2026.2791L14.9654%2025.572L14.2583%2024.8649ZM14.9654%2024.1577L15.6725%2024.8649L16.3796%2024.1577L15.6725%2023.4506L14.9654%2024.1577ZM11.0763%2020.2687L11.7834%2019.5616L11.0763%2018.8544L10.3692%2019.5616L11.0763%2020.2687ZM10.3692%2020.9758L9.66206%2020.2687L8.95495%2020.9758L9.66206%2021.6829L10.3692%2020.9758ZM9.3085%2019.9151L8.6014%2020.6222L9.3085%2021.3293L10.0156%2020.6222L9.3085%2019.9151ZM10.0156%2019.208L10.7227%2019.9151L11.4298%2019.208L10.7227%2018.5009L10.0156%2019.208ZM6.12652%2015.3189L6.83363%2014.6118L6.12652%2013.9047L5.41942%2014.6118L6.12652%2015.3189ZM5.41942%2016.026L4.71231%2015.3189L4.0052%2016.026L4.71231%2016.7331L5.41942%2016.026ZM3.12132%2012.3137L3.82843%2011.6066L3.12132%2010.8995L2.41421%2011.6066L3.12132%2012.3137ZM3.12132%2013.7279L2.41421%2014.435L3.12132%2015.1421L3.82843%2014.435L3.12132%2013.7279ZM12.3137%203.12132L11.6066%202.41421L10.8995%203.12132L11.6066%203.82842L12.3137%203.12132ZM13.7279%203.12132L14.435%203.82842L15.1421%203.12132L14.435%202.41421L13.7279%203.12132ZM27.163%2016.5563L27.8701%2015.8492L27.163%2015.1421L26.4558%2015.8492L27.163%2016.5563ZM27.163%2017.9706L26.4558%2018.6777L27.163%2019.3848L27.8701%2018.6777L27.163%2017.9706ZM16.5563%2027.1629L15.8492%2026.4558L15.1421%2027.1629L15.8492%2027.8701L16.5563%2027.1629ZM17.9706%2027.1629L18.6777%2027.8701L19.3848%2027.1629L18.6777%2026.4558L17.9706%2027.1629ZM5.06586%2015.6725L5.77297%2014.9654L4.35876%2013.5511L3.65165%2014.2582L5.06586%2015.6725ZM5.86136%2010.9879L5.15425%2010.2808L3.74004%2011.695L4.44715%2012.4021L5.86136%2010.9879ZM4.97748%2010.4576L5.68458%2011.1647L7.0988%209.75044L6.39169%209.04334L4.97748%2010.4576ZM11.1647%205.68458L10.4576%204.97747L9.04334%206.39169L9.75045%207.09879L11.1647%205.68458ZM10.2808%205.15425L10.9879%205.86136L12.4021%204.44714L11.695%203.74004L10.2808%205.15425ZM14.9654%205.77297L15.6725%205.06586L14.2583%203.65165L13.5511%204.35875L14.9654%205.77297ZM15.3189%204.71231L14.6118%205.41942L16.026%206.83363L16.7331%206.12652L15.3189%204.71231ZM19.9151%2010.7227L20.6222%2010.0156L19.208%208.6014L18.5009%209.3085L19.9151%2010.7227ZM20.2687%209.66206L19.5616%2010.3692L20.9758%2011.7834L21.6829%2011.0763L20.2687%209.66206ZM24.8649%2015.6725L25.572%2014.9654L24.1577%2013.5511L23.4506%2014.2582L24.8649%2015.6725ZM25.2184%2014.6118L24.5113%2015.3189L25.9255%2016.7331L26.6326%2016.026L25.2184%2014.6118ZM24.4229%2019.2964L25.13%2020.0035L26.5442%2018.5893L25.8371%2017.8822L24.4229%2019.2964ZM25.3068%2019.8267L24.5997%2019.1196L23.1855%2020.5338L23.8926%2021.2409L25.3068%2019.8267ZM19.1196%2024.5997L19.8267%2025.3068L21.2409%2023.8926L20.5338%2023.1855L19.1196%2024.5997ZM20.0035%2025.13L19.2964%2024.4229L17.8822%2025.8371L18.5893%2026.5442L20.0035%2025.13ZM15.3189%2024.5113L14.6118%2025.2184L16.026%2026.6326L16.7331%2025.9255L15.3189%2024.5113ZM14.9654%2025.572L15.6725%2024.8649L14.2583%2023.4506L13.5511%2024.1577L14.9654%2025.572ZM10.3692%2019.5616L9.66206%2020.2687L11.0763%2021.6829L11.7834%2020.9758L10.3692%2019.5616ZM10.0156%2020.6222L10.7227%2019.9151L9.3085%2018.5009L8.6014%2019.208L10.0156%2020.6222ZM5.41942%2014.6118L4.71231%2015.3189L6.12652%2016.7331L6.83363%2016.026L5.41942%2014.6118ZM3.12132%2013.7279L5.15425%2011.695L3.74004%2010.2808L1.70711%2012.3137L3.12132%2013.7279ZM5.06586%2014.2582L3.12132%2012.3137L1.70711%2013.7279L3.65165%2015.6725L5.06586%2014.2582ZM5.77297%2013.5511L4.53553%2012.3137L3.12132%2013.7279L4.35876%2014.9654L5.77297%2013.5511ZM4.53553%2013.7279L5.86136%2012.4021L4.44715%2010.9879L3.12132%2012.3137L4.53553%2013.7279ZM7.0988%2011.1647L11.1647%207.09879L9.75045%205.68458L5.68458%209.75044L7.0988%2011.1647ZM6.39169%2010.4576L10.4576%206.39169L9.04334%204.97747L4.97748%209.04334L6.39169%2010.4576ZM12.4021%205.86136L13.7279%204.53553L12.3137%203.12132L10.9879%204.44714L12.4021%205.86136ZM12.3137%204.53553L13.5511%205.77297L14.9654%204.35875L13.7279%203.12132L12.3137%204.53553ZM12.3137%203.12132L14.2583%205.06586L15.6725%203.65165L13.7279%201.7071L12.3137%203.12132ZM11.695%205.15425L13.7279%203.12132L12.3137%201.7071L10.2808%203.74004L11.695%205.15425ZM14.6118%206.83363L18.5009%2010.7227L19.9151%209.3085L16.026%205.41942L14.6118%206.83363ZM15.3189%206.12652L19.208%2010.0156L20.6222%208.6014L16.7331%204.71231L15.3189%206.12652ZM19.5616%2011.7834L23.4506%2015.6725L24.8649%2014.2582L20.9758%2010.3692L19.5616%2011.7834ZM20.2687%2011.0763L24.1577%2014.9654L25.572%2013.5511L21.6829%209.66206L20.2687%2011.0763ZM24.5113%2016.7331L25.7487%2017.9706L27.163%2016.5563L25.9255%2015.3189L24.5113%2016.7331ZM25.7487%2016.5563L24.4229%2017.8822L25.8371%2019.2964L27.163%2017.9706L25.7487%2016.5563ZM27.163%2016.5563L25.13%2018.5893L26.5442%2020.0035L28.5772%2017.9706L27.163%2016.5563ZM25.2184%2016.026L27.163%2017.9706L28.5772%2016.5563L26.6326%2014.6118L25.2184%2016.026ZM23.1855%2019.1196L19.1196%2023.1855L20.5338%2024.5997L24.5997%2020.5338L23.1855%2019.1196ZM23.8926%2019.8267L19.8267%2023.8926L21.2409%2025.3068L25.3068%2021.2409L23.8926%2019.8267ZM17.8822%2024.4229L16.5563%2025.7487L17.9706%2027.1629L19.2964%2025.8371L17.8822%2024.4229ZM17.9706%2025.7487L16.7331%2024.5113L15.3189%2025.9255L16.5563%2027.1629L17.9706%2025.7487ZM17.9706%2027.1629L16.026%2025.2184L14.6118%2026.6326L16.5563%2028.5772L17.9706%2027.1629ZM18.5893%2025.13L16.5563%2027.1629L17.9706%2028.5772L20.0035%2026.5442L18.5893%2025.13ZM15.6725%2023.4506L11.7834%2019.5616L10.3692%2020.9758L14.2583%2024.8649L15.6725%2023.4506ZM14.9654%2024.1577L11.0763%2020.2687L9.66206%2021.6829L13.5511%2025.572L14.9654%2024.1577ZM10.7227%2018.5009L6.83363%2014.6118L5.41942%2016.026L9.3085%2019.9151L10.7227%2018.5009ZM10.0156%2019.208L6.12652%2015.3189L4.71231%2016.7331L8.6014%2020.6222L10.0156%2019.208ZM3.12132%2013.7279L3.82843%2013.0208L2.41421%2011.6066L1.70711%2012.3137L3.12132%2013.7279ZM3.82843%2013.0208L3.12132%2012.3137L1.70711%2013.7279L2.41421%2014.435L3.82843%2013.0208ZM3.12132%2012.3137L2.41421%2013.0208L3.82843%2014.435L4.53553%2013.7279L3.12132%2012.3137ZM2.41421%2013.0208L3.12132%2013.7279L4.53553%2012.3137L3.82843%2011.6066L2.41421%2013.0208ZM13.0208%203.82842L13.7279%203.12132L12.3137%201.7071L11.6066%202.41421L13.0208%203.82842ZM13.7279%203.12132L13.0208%202.41421L11.6066%203.82842L12.3137%204.53553L13.7279%203.12132ZM13.0208%202.41421L12.3137%203.12132L13.7279%204.53553L14.435%203.82842L13.0208%202.41421ZM12.3137%203.12132L13.0208%203.82842L14.435%202.41421L13.7279%201.7071L12.3137%203.12132ZM27.163%2017.9706L27.8701%2017.2635L26.4558%2015.8492L25.7487%2016.5563L27.163%2017.9706ZM27.8701%2017.2635L27.163%2016.5563L25.7487%2017.9706L26.4558%2018.6777L27.8701%2017.2635ZM27.163%2016.5563L26.4558%2017.2635L27.8701%2018.6777L28.5772%2017.9706L27.163%2016.5563ZM26.4558%2017.2635L27.163%2017.9706L28.5772%2016.5563L27.8701%2015.8492L26.4558%2017.2635ZM17.2635%2027.8701L17.9706%2027.1629L16.5563%2025.7487L15.8492%2026.4558L17.2635%2027.8701ZM17.9706%2027.1629L17.2635%2026.4558L15.8492%2027.8701L16.5563%2028.5772L17.9706%2027.1629ZM17.2635%2026.4558L16.5563%2027.1629L17.9706%2028.5772L18.6777%2027.8701L17.2635%2026.4558ZM16.5563%2027.1629L17.2635%2027.8701L18.6777%2026.4558L17.9706%2025.7487L16.5563%2027.1629Z'%20fill='white'%20mask='url(%23path-3-outside-1_1838_531)'/%3e%3c/svg%3e"}}},uSt={name:"anchor-synchronization",i18n:{de:Tj,en:Lj,es:Rj,fr:_j,it:Fj},addToWindows:["2d"],component:Dj,anchorSynchronization:!0,button:{tooltip:"anchor-synchronization.tooltip-anchor-synchronization",position:"right",content:"free",keepOpen:!0,icon:{imgUri:"data:image/svg+xml,%3csvg%20width='23'%20height='23'%20viewBox='0%200%2023%2023'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.41394%209.62621L11.4418%2013.8807L18.5438%209.5459L21.4788%2011.2012L11.4522%2017.3112L1.47266%2011.2795L4.41394%209.62621Z'%20fill='%232F374A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11.4418%2017.9342L4.41439%2013.6799L1.47266%2015.3335L11.4522%2021.3651L21.4788%2015.2552L18.5433%2013.5996L11.4418%2017.9342ZM18.5621%2014.6894L11.4438%2019.0342L4.39683%2014.7681L3.33862%2015.3629L11.4502%2020.2656L19.621%2015.2865L18.5621%2014.6894Z'%20fill='%232F374A'/%3e%3crect%20x='17.7969'%20width='5.07596'%20height='1.00266'%20fill='%232F374A'/%3e%3crect%20x='22.873'%20width='5.07596'%20height='1.00266'%20transform='rotate(90%2022.873%200)'%20fill='%232F374A'/%3e%3crect%20x='22.873'%20y='17.9229'%20width='5.07596'%20height='1.00266'%20transform='rotate(90%2022.873%2017.9229)'%20fill='%232F374A'/%3e%3crect%20x='22.873'%20y='23'%20width='5.07596'%20height='1.00266'%20transform='rotate(-180%2022.873%2023)'%20fill='%232F374A'/%3e%3crect%20width='5.07596'%20height='1.00266'%20transform='matrix(-1%200%200%201%205.07617%200)'%20fill='%232F374A'/%3e%3crect%20width='5.07596'%20height='1.00266'%20transform='matrix(4.37114e-08%201%201%20-4.37114e-08%200%200)'%20fill='%232F374A'/%3e%3crect%20width='5.07596'%20height='1.00266'%20transform='matrix(4.37114e-08%201%201%20-4.37114e-08%200%2017.9229)'%20fill='%232F374A'/%3e%3crect%20width='5.07596'%20height='1.00266'%20transform='matrix(1%20-8.74228e-08%20-8.74228e-08%20-1%200%2023)'%20fill='%232F374A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.39866%202.7199L11.5619%201.50391L13.5913%202.64842L11.4369%203.89253L9.39866%202.7199ZM8.62875%203.15267L6.70871%204.23195L8.78367%205.42476L10.6773%204.33121L8.62875%203.15267ZM5.9388%204.66472L4.10291%205.6967L6.21181%206.90997L8.02403%205.86344L5.9388%204.66472ZM3.33301%206.12947L1.47266%207.1752L3.56388%208.43912L5.45218%207.34865L3.33301%206.12947ZM4.27628%208.8697L6.10371%209.97419L8.05507%208.84612L6.18256%207.76885L4.27628%208.8697ZM6.8161%2010.4048L8.69738%2011.5418L10.7132%2010.3754L8.78542%209.2663L6.8161%2010.4048ZM9.40976%2011.9723L11.4522%2013.2068L13.4834%2011.9691L11.4435%2010.7955L9.40976%2011.9723ZM14.2226%2011.5186L15.989%2010.4422L14.0152%209.3075L12.2024%2010.3564L14.2226%2011.5186ZM16.7282%209.99177L18.5679%208.87073L16.6635%207.77511L14.7741%208.86839L16.7282%209.99177ZM19.3071%208.42029L21.4788%207.09686L19.6339%206.05634L17.4224%207.336L19.3071%208.42029ZM18.8963%205.64036L16.9533%204.54452L14.767%205.80837L16.692%206.91583L18.8963%205.64036ZM16.2157%204.12853L14.3289%203.06443L12.1673%204.31273L14.0367%205.38819L16.2157%204.12853ZM14.0078%206.24727L15.9331%207.35494L14.0434%208.44839L12.1165%207.34065L14.0078%206.24727ZM11.3572%207.77956L13.2846%208.8875L11.4721%209.93625L9.54466%208.82739L11.3572%207.77956ZM8.8143%208.40721L10.6266%207.35954L8.75469%206.28347L6.94219%207.33017L8.8143%208.40721ZM11.3858%206.92063L13.2774%205.8271L11.4077%204.7514L9.51433%205.84479L11.3858%206.92063Z'%20fill='%232F374A'/%3e%3c/svg%3e"}}},ASt={},hSt={width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function pSt(e,t){return k(),N("svg",hSt,[...t[0]||=[Sn('<path fill-rule="evenodd" clip-rule="evenodd" d="M3.28121 7.15444L8.50434 10.3164L13.7826 7.09473L15.964 8.325L8.51215 12.866L1.09521 8.38321L3.28121 7.15444Z" fill="#2F374A"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.50364 13.3289L3.28081 10.1671L1.09448 11.3961L8.51142 15.8788L15.9633 11.3379L13.7816 10.1074L8.50364 13.3289ZM13.7956 10.9174L8.50513 14.1465L3.26776 10.9759L2.48129 11.418L8.50993 15.0616L14.5825 11.3612L13.7956 10.9174Z" fill="#2F374A"></path><rect x="13.2275" width="3.77251" height="0.745187" fill="#2F374A"></rect><rect x="16.9998" width="3.77251" height="0.745187" transform="rotate(90 16.9998 0)" fill="#2F374A"></rect><rect x="17" y="13.3203" width="3.77251" height="0.745187" transform="rotate(90 17 13.3203)" fill="#2F374A"></rect><rect x="16.9998" y="17.0938" width="3.77251" height="0.745187" transform="rotate(-180 16.9998 17.0938)" fill="#2F374A"></rect><rect width="3.77251" height="0.745187" transform="matrix(-1 0 0 1 3.77246 0)" fill="#2F374A"></rect><rect width="3.77251" height="0.745187" transform="matrix(4.37114e-08 1 1 -4.37114e-08 0 0)" fill="#2F374A"></rect><rect width="3.77251" height="0.745187" transform="matrix(4.37114e-08 1 1 -4.37114e-08 0.000244141 13.3203)" fill="#2F374A"></rect><rect width="3.77251" height="0.745187" transform="matrix(1 -8.74228e-08 -8.74228e-08 -1 0.000244141 17.0938)" fill="#2F374A"></rect><path fill-rule="evenodd" clip-rule="evenodd" d="M6.9851 2.02194L8.59292 1.11816L10.1013 1.96887L8.50013 2.89355L6.9851 2.02194ZM6.4129 2.34358L4.986 3.14566L6.52829 4.03226L7.93556 3.21958L6.4129 2.34358ZM4.4138 3.4673L3.04956 4.23416L4.61708 5.13596L5.96372 4.35829L4.4138 3.4673ZM2.47736 4.5558L1.09448 5.33313L2.64886 6.27259L4.05251 5.46199L2.47736 4.5558ZM3.17832 6.59259L4.53651 7.41348L5.98703 6.57494L4.59533 5.77429L3.17832 6.59259ZM5.06597 7.73348L6.46392 8.57839L7.96234 7.71136L6.52984 6.88722L5.06597 7.73348ZM6.99336 8.89839L8.51142 9.81589L10.0212 8.89585L8.50513 8.02363L6.99336 8.89839ZM10.5706 8.56108L11.8832 7.76118L10.4162 6.91783L9.06914 7.69728L10.5706 8.56108ZM12.4326 7.42641L13.7998 6.59331L12.3843 5.779L10.9802 6.59148L12.4326 7.42641ZM14.3491 6.25853L15.9633 5.27491L14.592 4.50155L12.9483 5.45264L14.3491 6.25853ZM14.0439 4.19239L12.6 3.37809L10.9751 4.31743L12.4056 5.14037L14.0439 4.19239ZM12.0518 3.06892L10.6495 2.27805L9.04295 3.20584L10.4323 4.00515L12.0518 3.06892ZM10.4108 4.64363L11.8415 5.46672L10.4372 6.27933L9.00528 5.45618L10.4108 4.64363ZM8.44101 5.78238L9.87318 6.60568L8.52635 7.385L7.09411 6.56102L8.44101 5.78238ZM6.5513 6.24874L7.89799 5.47022L6.50676 4.67046L5.1599 5.44826L6.5513 6.24874ZM8.46227 5.14402L9.86804 4.33135L8.47838 3.53187L7.07133 4.34443L8.46227 5.14402Z" fill="#2F374A"></path>',11)]])}var fSt=Q(ASt,[["render",pSt]]),gSt={class:"bimdata-anchor-synchronization__header"},mSt={class:"bimdata-anchor-synchronization__header__texts"},vSt={class:"bimdata-anchor-synchronization__header__texts__title"},ySt={class:"bimdata-anchor-synchronization__header__buttons"},wSt=Q({__name:"AnchorSynchronizationHeader",setup(e){let t=bt("$viewer"),i=bt("state"),o=bt("service"),r=je(()=>i.allAnchorsValidated),n=pe(!1),a=null;t.globalContext.hub.once("anchor-synchronization:open",(c=null)=>{a=c},{getLastEvent:!0});let s=()=>{t.globalContext.layout=a},l=async()=>{n.value=!0,await o.saveAnchors(),t.globalContext.layout=a};return(c,d)=>{let u=I("BIMDataButton"),A=I("BIMDataSpinner");return k(),N("div",gSt,[w("div",mSt,[T(fSt,{class:"m-x-6"}),w("span",vSt,G(c.$t("anchor-synchronization-window.title")),1)]),w("div",ySt,[T(u,{color:"high",fill:"",radius:"",class:"m-x-6",width:"120px",onClick:s},{default:j(()=>[nt(G(c.$t("global.cancel")),1)]),_:1}),T(u,{color:"primary",fill:"",radius:"",class:"m-x-6",width:"120px",disabled:!r.value,onClick:l},{default:j(()=>[n.value?(k(),W(A,{key:0})):(k(),N(ut,{key:1},[nt(G(c.$t("global.done")),1)],64))]),_:1},8,["disabled"])])])}}},[["__scopeId","data-v-a7ce6c34"]]),bSt={class:"anchor-content"},CSt={class:"anchor-label"},j8={__name:"Anchor",props:{position:{type:Object,default:null},isSecondAnchor:{type:Boolean,default:!1},color:{type:String,default:"#FF9100"}},emits:["change","validate"],setup(e,{emit:t}){let i=e,o={x:i.isSecondAnchor?"70px":"20px",y:"90%"},r=je(()=>i.position?{x:i.position.x+"px",y:i.position.y+"px"}:o),n=t,a=pe(!1),s=pe(null);function l(u){a.value=!0,s.value?.setPointerCapture(u.pointerId),u.preventDefault()}function c(u){if(!a.value)return;let A=i.position;if(!A){let{x:h,y:p}=s.value.getBoundingClientRect(),{x:f,y:m}=s.value.parentElement.getBoundingClientRect();A={x:h-f+15,y:p-m+51}}n("change",{x:A.x+u.movementX,y:A.y+u.movementY})}function d(u){a.value&&s.value&&s.value?.releasePointerCapture(u.pointerId),a.value=!1,n("validate")}return $i(()=>{a.value=!1}),(u,A)=>(k(),N("div",{class:"bimdata-anchor-synchronization__anchor",style:ve({left:r.value.x,top:r.value.y,color:e.color,cursor:a.value?"none":"grab"}),onPointerdown:l,onPointermove:c,onPointerup:d,ref_key:"anchorElement",ref:s},[w("div",bSt,[A[0]||=w("svg",{width:"30",height:"60",viewBox:"0 0 30 60",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[w("rect",{x:"14",y:"42",width:"2",height:"18",fill:"currentColor"}),w("rect",{x:"24",y:"50",width:"2",height:"18",transform:"rotate(90 24 50)",fill:"currentColor"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 14.3929C0 6.43566 6.70714 0 15 0C23.2929 0 30 6.43566 30 14.3929C30 25.1875 15 41.1224 15 41.1224C15 41.1224 0 25.1875 0 14.3929ZM9.64274 14.3932C9.64274 17.2307 12.0427 19.5335 14.9999 19.5335C17.957 19.5335 20.357 17.2307 20.357 14.3932C20.357 11.5558 17.957 9.25293 14.9999 9.25293C12.0427 9.25293 9.64274 11.5558 9.64274 14.3932Z",fill:"currentColor"})],-1),w("div",CSt,G(e.isSecondAnchor?2:1),1)])],36))}},j$=(e,t)=>({x:(e.x+t.x)/2,y:(e.y+t.y)/2}),Q$=(e,t)=>Math.hypot(t.x-e.x,t.y-e.y),z$=(e,t)=>Math.atan2(t.y-e.y,t.x-e.x),xSt=(e,t)=>({x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t)});function q$(e){let{anchorA1Position:t,anchorA2Position:i,anchorB1Position:o,anchorB2Position:r,model:n,modelToSynchronize:a}=e;if(!n||!a)throw Error("[BIMDataViewer - AnchorSynchronization] Models are mandatory to calculate transform.");let{translate:s,rotate:l,scale:c}=a.transform??QV.IDENTITY,d=Q$(t,i)/Q$(o,r)*c,u=z$(t,i),A=(z$(o,r)-u)*(180/Math.PI)*-1,h=l+A,p=j$(t,i),f=j$(o,r),m=xSt({x:f.x-s[0],y:f.y-s[1]},A*Math.PI/180),g={x:m.x/c*d,y:m.y/c*d};return{scale:d,rotate:h,translate:[p.x-g.x,p.y-g.y,0]}}var BSt={class:"bimdata-viewer-ifc-2d",ref:"canvasContainer"},kSt=Q({__name:"ViewerIfc2D",props:{model:{type:Object,default:null},storeyIndex:{type:Number,default:0}},emits:["camera-update"],setup(e,{expose:t,emit:i}){let o=e,r=i,n=bt("$viewer"),a=bt("state"),s=pe(null),l=null,c=null,d=null,{promise:u,resolve:A,reject:h}=Promise.withResolvers(),p=()=>{c=d1({canvas:s.value}),c.styles.default.lineWidth=.01,c.settings.rotateSpeed=.05,c.settings.snapMargin=.04,c.settings.minScale=10,c.textureManager.textureMatrix.scale(.01,.01);let{camera:y}=c;y.on("update",()=>{r("camera-update",y)});let v={engine:c,viewer:c,$viewer:n};l=R5(v),d=new EB(v)};Di(()=>{try{p()}catch(y){h(y)}A()});let f=(y,v)=>{let C=y.storeys[v];if(!C)return;let x=C.objects.map(B=>String(B.id));c.scene.showObjects(x)},m=async y=>{await u,await l(y.map_file,y.id);let v=c.scene.objects.map(C=>C.id);if(c.scene.hideObjects(v),f(y,o.storeyIndex),y.recommanded_2d_angle!==void 0){let C=c.camera.rotation;c.camera.rotate(-C-y.recommanded_2d_angle)}c.camera.fitView()};xt(()=>o.model,async y=>{y&&await m(y)},{immediate:!0});let g=!1;return t({getWorldPosition(y){return c.camera.getPosition(y)},get canvas(){return s.value},async showPlan(y){if(g)return;let v=await d.showPlan(y),C=v.mask?.crop_path,x={opacity:.5,crop_path:C};v.tempMask=x,g=!0;let B={translate:[v.x,v.y],scale:v.scale,rotate:v.angle},{anchorA1Position:E,anchorA2Position:D,anchorB1Position:P,anchorB2Position:M}=Ef(a);xt([E,D,P,M],()=>{let R=q$(a);C?.length>0&&(x.crop_path=Rg(Rg(C,B,{inverse:!0}),R)),v.x=R.translate[0],v.y=R.translate[1],v.scale=R.scale,v.angle=R.rotate},{immediate:!0})}}),(y,v)=>(k(),N("div",BSt,[w("canvas",{ref_key:"canvasElement",ref:s,style:{width:"100%",height:"100%",position:"absolute"}},null,512)],512))}},[["__scopeId","data-v-c0725497"]]),ESt={__name:"ViewerImage",props:{model:{type:Object,default:null}},emits:["camera-update"],setup(e,{expose:t,emit:i}){let o=e,r=i,n=()=>{let{camera:d}=a.value.viewer;d.on("update",()=>{r("camera-update",d)})},a=pe(null),{promise:s,resolve:l}=Promise.withResolvers();xt(()=>o.model,async d=>{await s,d&&(a.value.loadModels([d]),a.value.viewer.renderer.offset.dx===0&&a.value.viewer.renderer.offset.dy===0&&(a.value.viewer.renderer.offset={dx:-d.transform.translate[0],dy:-d.transform.translate[1]}))},{immediate:!0}),Di(()=>{l()});let c=ko({get loadedModels(){return o.model?[o.model]:[]},get selectedStorey(){return null}});return t({getWorldPosition(d){return a.value.engine.camera.getPosition(d)},get canvas(){return a.value.engine.canvas}}),(d,u)=>(k(),W(Th,{ref_key:"viewerPlan",ref:a,stateContext:c,onMounted:n},null,8,["stateContext"]))}},MSt={class:"bimdata-anchor-synchronization__viewer"},PSt={class:"viewer-container-A"},ISt={class:"viewer-container-B"},SSt=Q({__name:"AnchorSynchronizationViewer",setup(e,{expose:t}){let i=pe(null),o=pe(null),r=bt("state"),n=(C,x)=>{x.preventDefault();let B=C==="A"?i.value:o.value;B&&_B(B.canvas)(x)},a=pe(null),s=pe(null),l=pe(null),c=pe(null),d={anchorA1Position:a,anchorA2Position:s,anchorB1Position:l,anchorB2Position:c},u=(C,x)=>{(C==="A"?["anchorA1Position","anchorA2Position"].filter(B=>d[B].value!==null):["anchorB1Position","anchorB2Position"].filter(B=>d[B].value!==null)).forEach(B=>{let E=r[B];d[B].value=x.getCanvasPosition(E)})},A=(C,x)=>{let B=C.startsWith("A")?i.value:o.value,E=`anchor${C}Position`;r[E]=B.getWorldPosition(x),d[E].value=x},h=Ui(null),p=pe(0),f=Ui(null),m=xt(()=>r.allAnchorsValidated,C=>{if(!C)return;let x={plan:f.value,storey:{}};i.value.showPlan(x),m()}),g=C=>{if(!C)return null;let x=C.type;switch(x){case"IFC":return kSt;case"PNG":case"JPEG":case"PDF":case"PHOTOSPHERE":return ESt;default:throw Error(`[BIMData AnchorSynchronizationViewer] Unsupported model type: ${x}`)}},y=async(C,x,B)=>{h.value=C;let E=C.storeys.findIndex(D=>D.uuid===x.uuid);if(E===-1)throw Error("[BIMData AnchorSynchronizationViewer] Storey not found in main model.");p.value=E,f.value=B},v=()=>{r.allAnchorsValidated||a.value&&s.value&&l.value&&c.value&&(r.allAnchorsValidated=!0)};return t({synchronize:y}),(C,x)=>(k(),N("div",MSt,[w("div",PSt,[(k(),W(qr(g(h.value)??"div"),{model:h.value,ref_key:"viewerA",ref:i,onCameraUpdate:x[0]||=B=>u("A",B),storeyIndex:p.value},null,40,["model","storeyIndex"])),h.value?(k(),N(ut,{key:0},[T(j8,{onChange:x[1]||=B=>A("A1",B),onValidate:v,position:a.value,onWheel:x[2]||=B=>n("A",B)},null,8,["position"]),T(j8,{onChange:x[3]||=B=>A("A2",B),onValidate:v,position:s.value,onWheel:x[4]||=B=>n("A",B),isSecondAnchor:!0},null,8,["position"])],64)):le("",!0)]),w("div",ISt,[(k(),W(qr(g(f.value)??"div"),{model:f.value,ref_key:"viewerB",ref:o,onCameraUpdate:x[5]||=B=>u("B",B)},null,40,["model"])),f.value?(k(),N(ut,{key:0},[T(j8,{onChange:x[6]||=B=>A("B1",B),onValidate:v,position:l.value,onWheel:x[7]||=B=>n("B",B)},null,8,["position"]),T(j8,{onChange:x[8]||=B=>A("B2",B),onValidate:v,position:c.value,onWheel:x[9]||=B=>n("B",B),isSecondAnchor:!0},null,8,["position"])],64)):le("",!0)])]))}},[["__scopeId","data-v-3947e679"]]),DSt=class{state;$viewer;constructor(e,t){this.$viewer=e,this.state=t}async saveAnchors(){let{state:e}=this.$viewer,{model:t,storey:i,modelToSynchronize:o}=this.state;if(!t||!o||!i)throw Error("[BIMDataViewer - AnchorSynchronization] Models and storey are mandatory to save anchors.");let r=q$(this.state),n=i.plans.find(a=>a.plan.id===o.id);try{if(n){let a={...o.transform};n.plan.transform=r,await e.updatePlan(n,a)}else await e.createPlan(t,i,o.document,r)}catch(a){throw console.error("[BIMDataViewer - Anchor Synchronization Service] Failed to save anchors:",a),a}}},TSt=class{model=null;storey=null;modelToSynchronize=null;anchorA1Position=null;anchorA2Position=null;anchorB1Position=null;anchorB2Position=null;allAnchorsValidated=!1;constructor(){return ko(this)}},LSt={components:{AnchorSynchronizationHeader:wSt,AnchorSynchronizationViewer:SSt},setup(){let e=pe(null),t=new TSt;return pr("state",t),pr("service",new DSt(bt("$viewer"),t)),{viewer:e,synchronize:(i,o,r)=>(t.model=i,t.storey=o,t.modelToSynchronize=r,e.value.synchronize(i,o,r)),positioned:pe(!1)}}},RSt={class:"bimdata-anchor-synchronization"};function _St(e,t,i,o,r,n){let a=I("AnchorSynchronizationHeader"),s=I("AnchorSynchronizationViewer");return k(),N("div",RSt,[T(a,{valid:o.positioned},null,8,["valid"]),T(s,{class:"bimdata-anchor-synchronization__content__viewer",ref:"viewer",onPositioned:t[0]||=l=>o.positioned=!0})])}var FSt={name:"anchor-synchronization-window",i18n:{en:{title:"Synchronization"},fr:{title:"Synchronisation"}},component:Q(LSt,[["render",_St],["__scopeId","data-v-7f15ad3b"]]),window:{name:"anchor-synchronization",header:!1,displayedInWindowSelector:!1,multiModel:!1}},USt={name:"PointCloudViewer",components:{Annotations:OW},data(){let{settings:e}=this.$plugin;return{settings:e,canvasId:null,spinnerCanvasId:null,xeokitCreated:!1,loadedModels:[],tilesets:new Map,sensitivity:200,fov:90,annotationMode:!1,modelHeaderShown:e.modelLoader!=="hidden",navCubeVisible:e.navCube!==!1,loading:!1}},watch:{sensitivity(e){this.tilesetLoaderPlugin&&(this.tilesetLoaderPlugin.sensitivity=e)},fov(e){this.xeokit.camera.perspective.fov=e}},created(){this.spinnerCanvasId=`spinner-canvas-id-${this.$viewer.localContext.id}-${this.$viewer.instanceId}`,this.xeokitSdk=Md},mounted(){let e=new wJ({canvasElement:this.$refs["bimdata-xeokit-canvas"],transparent:!0,spinnerElementId:this.spinnerCanvasId,backgroundColorFromAmbientLight:!1});e.cameraControl.doublePickFlyTo=!1,e.cameraControl.panRightClick=!1,e.cameraControl.followPointer=!0,e.cameraControl.smartPivot=!0,this.settings.pivotMarker!==!1&&e.cameraControl.enablePivotSphere({size:1,color:[.25,.25,.25]}),e.cameraControl.touchDollyRate=1,e.cameraControl.mouseWheelDollyRate=60,e.cameraControl.keyboardDollyRate=20,e.cameraControl.dragRotationRate=450,e.cameraControl.rotationInertia=0,e.cameraControl.dollyInertia=0,e.camera.perspective.near=.1,e.camera.perspective.far=1e3,e.camera.ortho.near=.1,e.camera.ortho.far=1e3,this.bcfViewpointsPlugin=new q6(e,{originatingSystem:"BIMDataViewer/v1.0",authoringTool:"BIMData.io"}),this.distanceMeasurementsPlugin=new MJ(e,{defaultAxisVisible:!1,container:this.$el,zIndex:0}),this.angleMeasurementsPlugin=new N6(e,{container:this.$el,zIndex:0}),this.tilesetLoaderPlugin=new FW(e,{sensitivity:this.sensitivity,debugMode:!1}),this.navCubeVisible&&(this.navCube=new ZM(e,{canvasElement:this.$refs["bimdata-xeokit-navcube-canvas"],visible:!1,cameraFly:!0,cameraFitFOV:45,cameraFlyDuration:.5,color:"#FFFFFF"})),this.xeokit=e,this.xeokitCreated=!0,window.xeokitPointCloud=this.xeokit},beforeUnmount(){this.xeokit?.destroy()},methods:{async loadModels(e){this.loading=!0,this.loadedModels.push(...e.filter(n=>!this.loadedModels.some(a=>a.id===n.id)));let{apiUrl:t,cloudId:i,projectId:o,accessToken:r}=this.$viewer.api;e.forEach(async(n,a)=>{try{this.$viewer.localContext.loadingProcessStart();let s=await(await fetch(`${t}/cloud/${i}/project/${o}/model/${n.id}/tileset?tile_format=xkt`,{headers:new Headers({Authorization:`Bearer ${r}`})})).json();s.name=String(n.id);let l=this.tilesetLoaderPlugin.load(s);this.tilesets.set(n,l);let c={model:n,plugin:this};this.$viewer.localContext.hub.emit("pointcloud-model-loaded",c),this.$viewer.globalContext.hub.emit("pointcloud-model-loaded",c),a===0&&!this.viewpointPending&&this.xeokit.cameraFlight.flyTo()}catch(s){console.error("Error while loading Tileset ",n.id,"with error: ",s),this.loadedModels=this.loadedModels.filter(l=>l.id!==n.id)}finally{this.$viewer.localContext.loadingProcessEnd(),this.loading=!1}}),this.loadedModels.length>0&&this.navCube?.setVisible(!0)},unloadModels(e){let t=e.map(i=>this.tilesets.get(i)).filter(Boolean);e.forEach(i=>this.tilesets.delete(i)),t.forEach(i=>i.destroy()),this.loadedModels=this.loadedModels.filter(i=>!e.find(o=>o.id===i.id)),e.forEach(i=>{let o={model:i,plugin:this};this.$viewer.localContext.hub.emit("pointcloud-model-unloaded",o),this.$viewer.globalContext.hub.emit("pointcloud-model-unloaded",o)}),this.loadedModels.length===0&&this.navCube?.setVisible(!1)},fitView(){this.xeokit.cameraFlight.flyTo()},async getSnapshot(){return{snapshot_type:"png",snapshot_data:await this.xeokit.getSnapshotWithPlugins({format:"png"})}},getViewpoint(){let e=this.bcfViewpointsPlugin.getViewpoint({snapshot:!1});return e.order=2,e.originating_system="pointCloud",e.models=this.$viewer.localContext.loadedModels.map(t=>t.id),e},async setViewpoint(e,{immediate:t=!1,duration:i=.3}={}){if(this.loading){this.viewpointPending=!0;let o=null;await new Promise(r=>{o=this.$watch("loading",n=>{n||r()},{immediate:!0})}),o(),this.viewpointPending=!1}await new Promise(o=>setTimeout(o,200)),this.bcfViewpointsPlugin.setViewpoint(e,{rayCast:!1,immediate:t,duration:i})},startAnnotationMode(e){if(this.annotationMode)return;this.annotationMode=!0;let t=this.xeokit.scene.canvas.canvas;this.canvasCursor=t.style.cursor,t.style.cursor="copy",this.annotationListener=this.xeokit.scene.input.on("mouseclicked",i=>{let o=this.xeokit.scene.pick({pickSurface:!0,canvasPos:i});if(o){let[r,n,a]=o.worldPos;e({x:r,y:a,z:n,models:this.$viewer.localContext.loadedModels})}})},stopAnnotationMode(){this.annotationMode&&(this.annotationMode=!1,this.xeokit.scene.canvas.canvas.style.cursor=this.canvasCursor,this.xeokit.scene.input.off(this.annotationListener))},showUI(){this.modelHeaderShown=this.settings.modelLoader!=="hidden",this.navCubeVisible=this.settings.navCube!==!1},hideUI(){this.modelHeaderShown=!1,this.navCubeVisible=!1}}},OSt={class:"bimdata-viewer-point-cloud"},NSt={ref:"header",class:"bimdata-viewer-point-cloud__header"},HSt={ref:"bimdata-xeokit-navcube-canvas",class:"bimdata-viewer-point-cloud__nav-cube"},VSt=["id"];function jSt(e,t,i,o,r,n){let a=I("NoModelWindowPlaceHolder"),s=I("ModelsLoader"),l=I("Annotations");return k(),N("div",OSt,[r.loadedModels.length===0?(k(),W(a,{key:0})):le("",!0),w("div",NSt,[r.settings.modelLoader==="disabled"?le("",!0):Tt((k(),W(s,{key:0,"window-positioning":!1,preview:""},null,512)),[[ui,r.modelHeaderShown]])],512),w("canvas",{ref:"bimdata-xeokit-canvas",class:"bimdata-viewer-point-cloud__viewer",onWheel:t[0]||=Dt(()=>{},["prevent"])},null,544),r.xeokitCreated?(k(),W(l,{key:1})):le("",!0),Tt(w("canvas",HSt,null,512),[[ui,r.navCubeVisible]]),w("div",{id:r.spinnerCanvasId},null,8,VSt)])}var QSt={name:"pointCloud",isViewer:!0,component:Q(USt,[["render",jSt],["__scopeId","data-v-b7df122c"]]),window:{name:"pointCloud",label:"pointCloud.window_label",header:!1,logoAndVersion:!0,plugins:["fullscreen","measure3d"],icon:{imgUri:"data:image/svg+xml,%3csvg%20width='29'%20height='28'%20viewBox='0%200%2029%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5.61725%209.64469L13.0214%202.20528L13.03%207.28128L13.034%209.63208L5.61725%209.64469ZM25.4847%202.79589C25.4821%201.25822%2024.2376%200.00224431%2022.702%200.00485529L11.5341%200.0238442L3.17246%208.42535L3.20099%2025.1999C3.2036%2026.7375%204.46169%2027.9935%205.99771%2027.9909L22.7635%2027.9624C24.2991%2027.9598%2025.5393%2026.6996%2025.5367%2025.1619L25.4847%202.79589Z'%20fill='%232F374A'/%3e%3crect%20y='12.1958'%20width='28.001'%20height='14.6092'%20rx='1'%20transform='rotate(-0.097421%200%2012.1958)'%20fill='%23E544FF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.1933%2014.0615C13.3783%2014.0615%2013.5282%2013.9114%2013.5282%2013.7262C13.5282%2013.541%2013.3783%2013.3909%2013.1933%2013.3909C13.0083%2013.3909%2012.8584%2013.541%2012.8584%2013.7262C12.8584%2013.9114%2013.0084%2014.0615%2013.1933%2014.0615ZM11.8911%2014.7695C11.8911%2014.9547%2011.7411%2015.1048%2011.5562%2015.1048C11.3712%2015.1048%2011.2213%2014.9547%2011.2213%2014.7695C11.2213%2014.5843%2011.3712%2014.4341%2011.5562%2014.4341C11.7411%2014.4341%2011.8911%2014.5843%2011.8911%2014.7695ZM15.9351%2014.4664C15.78%2014.412%2015.6101%2014.4938%2015.5558%2014.6492C15.5014%2014.8045%2015.5831%2014.9746%2015.7382%2015.0291L18.6786%2016.1209L14.4692%2018.42L11.3925%2017.3811C11.2367%2017.3285%2011.0678%2017.4123%2011.0153%2017.5683C10.9627%2017.7243%2011.0464%2017.8934%2011.2022%2017.946L14.1997%2018.9582L14.1997%2024.8387L11.4366%2023.8296C11.2821%2023.7732%2011.1112%2023.8529%2011.0549%2024.0075C10.9986%2024.1622%2011.0781%2024.3333%2011.2326%2024.3897L14.3954%2025.5448C14.4786%2025.5752%2014.571%2025.5669%2014.6474%2025.5222L19.5592%2022.6532C19.6506%2022.5997%2019.7068%2022.5017%2019.7068%2022.3957L19.7068%2016.0614C19.7068%2015.9347%2019.6269%2015.8219%2019.5076%2015.7801L15.9351%2014.4664ZM14.7951%2018.9211L19.1115%2016.5635L19.1115%2022.2245L14.7951%2024.7458L14.7951%2018.9211ZM10.4397%2017.564C10.6246%2017.564%2010.7746%2017.4139%2010.7746%2017.2287C10.7746%2017.0435%2010.6246%2016.8934%2010.4397%2016.8934C10.2547%2016.8934%2010.1048%2017.0435%2010.1048%2017.2287C10.1048%2017.4139%2010.2547%2017.564%2010.4397%2017.564ZM9.88169%2016.9306C9.8817%2017.1158%209.73176%2017.2659%209.5468%2017.2659C9.36185%2017.2659%209.21191%2017.1158%209.21191%2016.9306C9.21191%2016.7454%209.36185%2016.5952%209.5468%2016.5952C9.73176%2016.5952%209.88169%2016.7454%209.88169%2016.9306ZM8.65364%2016.8932C8.8386%2016.8932%208.98853%2016.7431%208.98853%2016.5579C8.98853%2016.3727%208.8386%2016.2225%208.65364%2016.2225C8.46869%2016.2225%208.31875%2016.3727%208.31875%2016.5579C8.31875%2016.7431%208.46868%2016.8932%208.65364%2016.8932ZM9.95585%2015.9619C9.95585%2016.1471%209.80592%2016.2973%209.62096%2016.2973C9.43601%2016.2973%209.28607%2016.1471%209.28607%2015.9619C9.28607%2015.7767%209.436%2015.6266%209.62096%2015.6266C9.80592%2015.6266%209.95585%2015.7767%209.95585%2015.9619ZM10.5884%2015.7007C10.7734%2015.7007%2010.9233%2015.5506%2010.9233%2015.3654C10.9233%2015.1802%2010.7734%2015.03%2010.5884%2015.03C10.4035%2015.03%2010.2535%2015.1802%2010.2535%2015.3654C10.2535%2015.5506%2010.4035%2015.7007%2010.5884%2015.7007ZM14.456%2014.0531C14.456%2014.2384%2014.306%2014.3885%2014.1211%2014.3885C13.9361%2014.3885%2013.7862%2014.2384%2013.7862%2014.0531C13.7862%2013.8679%2013.9361%2013.7178%2014.1211%2013.7178C14.306%2013.7178%2014.456%2013.8679%2014.456%2014.0531ZM12.3748%2014.5832C12.5597%2014.5832%2012.7096%2014.433%2012.7096%2014.2478C12.7096%2014.0626%2012.5597%2013.9125%2012.3747%2013.9125C12.1898%2013.9125%2012.0399%2014.0626%2012.0399%2014.2478C12.0399%2014.433%2012.1898%2014.5832%2012.3748%2014.5832ZM8.98853%2017.6011C8.98853%2017.7863%208.83859%2017.9365%208.65364%2017.9365C8.46868%2017.9365%208.31875%2017.7863%208.31875%2017.6011C8.31875%2017.4159%208.46869%2017.2658%208.65364%2017.2658C8.8386%2017.2658%208.98853%2017.4159%208.98853%2017.6011ZM8.65364%2018.9797C8.83859%2018.9797%208.98853%2018.8296%208.98853%2018.6444C8.98853%2018.4592%208.8386%2018.309%208.65364%2018.309C8.46869%2018.309%208.31875%2018.4592%208.31875%2018.6444C8.31875%2018.8296%208.46868%2018.9797%208.65364%2018.9797ZM8.98853%2019.6876C8.98853%2019.8728%208.83859%2020.023%208.65364%2020.023C8.46868%2020.023%208.31875%2019.8728%208.31875%2019.6876C8.31875%2019.5024%208.46869%2019.3523%208.65364%2019.3523C8.8386%2019.3523%208.98853%2019.5024%208.98853%2019.6876ZM8.65364%2021.0665C8.8386%2021.0665%208.98853%2020.9164%208.98853%2020.7312C8.98853%2020.546%208.8386%2020.3958%208.65364%2020.3958C8.46869%2020.3958%208.31875%2020.546%208.31875%2020.7312C8.31875%2020.9164%208.46868%2021.0665%208.65364%2021.0665ZM8.98853%2021.7744C8.98853%2021.9597%208.83859%2022.1098%208.65364%2022.1098C8.46868%2022.1098%208.31875%2021.9597%208.31875%2021.7745C8.31875%2021.5892%208.46869%2021.4391%208.65364%2021.4391C8.8386%2021.4391%208.98853%2021.5892%208.98853%2021.7744ZM8.65364%2023.1531C8.83859%2023.1531%208.98853%2023.0029%208.98853%2022.8177C8.98853%2022.6325%208.8386%2022.4824%208.65364%2022.4824C8.46869%2022.4824%208.31875%2022.6325%208.31875%2022.8177C8.31875%2023.0029%208.46868%2023.1531%208.65364%2023.1531ZM9.88169%2023.3393C9.8817%2023.5245%209.73176%2023.6747%209.5468%2023.6747C9.36185%2023.6747%209.21191%2023.5245%209.21191%2023.3393C9.21191%2023.1541%209.36185%2023.004%209.5468%2023.004C9.73176%2023.004%209.88169%2023.1541%209.88169%2023.3393ZM10.4397%2023.9728C10.6246%2023.9728%2010.7746%2023.8227%2010.7746%2023.6375C10.7746%2023.4523%2010.6246%2023.3021%2010.4397%2023.3021C10.2547%2023.3021%2010.1048%2023.4523%2010.1048%2023.6375C10.1048%2023.8227%2010.2547%2023.9728%2010.4397%2023.9728ZM10.8575%2016.3028C10.8575%2016.4881%2010.7076%2016.6382%2010.5226%2016.6382C10.3376%2016.6382%2010.1877%2016.488%2010.1877%2016.3028C10.1877%2016.1176%2010.3376%2015.9675%2010.5226%2015.9675C10.7075%2015.9675%2010.8575%2016.1176%2010.8575%2016.3028ZM11.4899%2016.0417C11.6749%2016.0417%2011.8248%2015.8915%2011.8248%2015.7063C11.8248%2015.5211%2011.6749%2015.371%2011.4899%2015.371C11.305%2015.371%2011.155%2015.5211%2011.155%2015.7063C11.155%2015.8915%2011.305%2016.0417%2011.4899%2016.0417ZM12.7926%2015.1104C12.7926%2015.2956%2012.6426%2015.4457%2012.4577%2015.4457C12.2727%2015.4457%2012.1228%2015.2956%2012.1228%2015.1104C12.1228%2014.9252%2012.2727%2014.775%2012.4577%2014.775C12.6426%2014.775%2012.7926%2014.9252%2012.7926%2015.1104ZM13.2762%2014.9241C13.4612%2014.9241%2013.6111%2014.774%2013.6111%2014.5887C13.6111%2014.4035%2013.4612%2014.2534%2013.2762%2014.2534C13.0913%2014.2534%2012.9413%2014.4035%2012.9413%2014.5887C12.9413%2014.774%2013.0913%2014.9241%2013.2762%2014.9241ZM11.6695%2016.732C11.6695%2016.9172%2011.5196%2017.0674%2011.3346%2017.0674C11.1497%2017.0674%2010.9997%2016.9172%2010.9997%2016.732C10.9997%2016.5468%2011.1497%2016.3967%2011.3346%2016.3967C11.5196%2016.3967%2011.6695%2016.5468%2011.6695%2016.732ZM12.3021%2016.4711C12.487%2016.4711%2012.637%2016.321%2012.637%2016.1358C12.637%2015.9506%2012.487%2015.8005%2012.3021%2015.8005C12.1171%2015.8005%2011.9672%2015.9506%2011.9672%2016.1358C11.9672%2016.321%2012.1171%2016.4711%2012.3021%2016.4711ZM13.6047%2015.5399C13.6047%2015.7251%2013.4548%2015.8752%2013.2698%2015.8752C13.0849%2015.8752%2012.935%2015.7251%2012.935%2015.5399C12.935%2015.3547%2013.0849%2015.2045%2013.2698%2015.2045C13.4548%2015.2045%2013.6047%2015.3547%2013.6047%2015.5399ZM14.0883%2015.3533C14.2732%2015.3533%2014.4231%2015.2031%2014.4231%2015.0179C14.4231%2014.8327%2014.2732%2014.6826%2014.0883%2014.6826C13.9033%2014.6826%2013.7534%2014.8327%2013.7534%2015.0179C13.7534%2015.2031%2013.9033%2015.3533%2014.0883%2015.3533ZM15.2991%2014.4927C15.2991%2014.678%2015.1491%2014.8281%2014.9642%2014.8281C14.7792%2014.8281%2014.6293%2014.678%2014.6293%2014.4927C14.6293%2014.3075%2014.7792%2014.1574%2014.9642%2014.1574C15.1491%2014.1574%2015.2991%2014.3075%2015.2991%2014.4927ZM9.56761%2018.3508C9.75257%2018.3508%209.9025%2018.2007%209.9025%2018.0155C9.9025%2017.8302%209.75257%2017.6801%209.56761%2017.6801C9.38265%2017.6801%209.23272%2017.8302%209.23272%2018.0155C9.23272%2018.2007%209.38266%2018.3508%209.56761%2018.3508ZM9.9025%2019.0587C9.9025%2019.2439%209.75257%2019.3941%209.56761%2019.3941C9.38266%2019.3941%209.23272%2019.2439%209.23272%2019.0587C9.23272%2018.8735%209.38265%2018.7234%209.56761%2018.7234C9.75257%2018.7234%209.9025%2018.8735%209.9025%2019.0587ZM9.56761%2020.4373C9.75257%2020.4373%209.9025%2020.2872%209.9025%2020.102C9.9025%2019.9168%209.75257%2019.7666%209.56761%2019.7666C9.38265%2019.7666%209.23272%2019.9168%209.23272%2020.102C9.23272%2020.2872%209.38266%2020.4373%209.56761%2020.4373ZM9.9025%2021.1452C9.9025%2021.3304%209.75257%2021.4806%209.56761%2021.4806C9.38266%2021.4806%209.23272%2021.3304%209.23272%2021.1452C9.23272%2020.96%209.38265%2020.8099%209.56761%2020.8099C9.75257%2020.8099%209.9025%2020.96%209.9025%2021.1452ZM9.56761%2022.5241C9.75257%2022.5241%209.9025%2022.374%209.9025%2022.1888C9.9025%2022.0036%209.75257%2021.8534%209.56761%2021.8534C9.38265%2021.8534%209.23272%2022.0036%209.23272%2022.1888C9.23272%2022.374%209.38266%2022.5241%209.56761%2022.5241ZM10.8163%2018.4729C10.8163%2018.6581%2010.6664%2018.8082%2010.4814%2018.8082C10.2965%2018.8082%2010.1465%2018.6581%2010.1465%2018.4729C10.1465%2018.2877%2010.2965%2018.1375%2010.4814%2018.1375C10.6664%2018.1375%2010.8163%2018.2877%2010.8163%2018.4729ZM10.4814%2019.8515C10.6664%2019.8515%2010.8163%2019.7013%2010.8163%2019.5161C10.8163%2019.3309%2010.6664%2019.1808%2010.4814%2019.1808C10.2965%2019.1808%2010.1465%2019.3309%2010.1465%2019.5161C10.1465%2019.7013%2010.2965%2019.8515%2010.4814%2019.8515ZM10.8163%2020.5594C10.8163%2020.7446%2010.6664%2020.8947%2010.4814%2020.8947C10.2965%2020.8947%2010.1465%2020.7446%2010.1465%2020.5594C10.1465%2020.3742%2010.2965%2020.2241%2010.4814%2020.2241C10.6664%2020.2241%2010.8163%2020.3742%2010.8163%2020.5594ZM10.4814%2021.9383C10.6664%2021.9383%2010.8163%2021.7882%2010.8163%2021.603C10.8163%2021.4178%2010.6664%2021.2676%2010.4814%2021.2676C10.2965%2021.2676%2010.1465%2021.4177%2010.1465%2021.603C10.1465%2021.7882%2010.2965%2021.9383%2010.4814%2021.9383ZM10.8163%2022.6462C10.8163%2022.8314%2010.6664%2022.9816%2010.4814%2022.9816C10.2965%2022.9816%2010.1465%2022.8314%2010.1465%2022.6462C10.1465%2022.461%2010.2965%2022.3109%2010.4814%2022.3109C10.6664%2022.3109%2010.8163%2022.461%2010.8163%2022.6462ZM12.5057%2017.4918C12.6906%2017.4918%2012.8406%2017.3417%2012.8406%2017.1565C12.8406%2016.9713%2012.6906%2016.8211%2012.5057%2016.8211C12.3207%2016.8211%2012.1708%2016.9713%2012.1708%2017.1565C12.1708%2017.3417%2012.3207%2017.4918%2012.5057%2017.4918ZM13.8082%2016.5602C13.8082%2016.7454%2013.6582%2016.8956%2013.4733%2016.8956C13.2883%2016.8956%2013.1384%2016.7454%2013.1384%2016.5602C13.1384%2016.375%2013.2883%2016.2249%2013.4733%2016.2249C13.6582%2016.2249%2013.8082%2016.375%2013.8082%2016.5602ZM14.4411%2016.2994C14.626%2016.2994%2014.7759%2016.1492%2014.7759%2015.964C14.7759%2015.7788%2014.626%2015.6287%2014.4411%2015.6287C14.2561%2015.6287%2014.1062%2015.7788%2014.1062%2015.964C14.1062%2016.1492%2014.2561%2016.2994%2014.4411%2016.2994ZM15.5945%2015.4424C15.5945%2015.6276%2015.4446%2015.7777%2015.2596%2015.7777C15.0747%2015.7777%2014.9247%2015.6276%2014.9247%2015.4424C14.9247%2015.2572%2015.0747%2015.107%2015.2596%2015.107C15.4446%2015.107%2015.5945%2015.2572%2015.5945%2015.4424ZM11.4966%2019.0986C11.6816%2019.0986%2011.8315%2018.9485%2011.8315%2018.7633C11.8315%2018.5781%2011.6816%2018.4279%2011.4966%2018.4279C11.3116%2018.4279%2011.1617%2018.5781%2011.1617%2018.7633C11.1617%2018.9485%2011.3116%2019.0986%2011.4966%2019.0986ZM11.8315%2019.8065C11.8315%2019.9917%2011.6816%2020.1419%2011.4966%2020.1419C11.3116%2020.1419%2011.1617%2019.9917%2011.1617%2019.8065C11.1617%2019.6213%2011.3116%2019.4712%2011.4966%2019.4712C11.6816%2019.4712%2011.8315%2019.6213%2011.8315%2019.8065ZM11.4966%2021.1851C11.6816%2021.1851%2011.8315%2021.035%2011.8315%2020.8498C11.8315%2020.6646%2011.6816%2020.5144%2011.4966%2020.5144C11.3116%2020.5144%2011.1617%2020.6646%2011.1617%2020.8498C11.1617%2021.035%2011.3116%2021.1851%2011.4966%2021.1851ZM11.8315%2021.8933C11.8315%2022.0786%2011.6816%2022.2287%2011.4966%2022.2287C11.3116%2022.2287%2011.1617%2022.0786%2011.1617%2021.8933C11.1617%2021.7081%2011.3116%2021.558%2011.4966%2021.558C11.6816%2021.558%2011.8315%2021.7081%2011.8315%2021.8933ZM11.4966%2023.272C11.6816%2023.272%2011.8315%2023.1218%2011.8315%2022.9366C11.8315%2022.7514%2011.6816%2022.6013%2011.4966%2022.6013C11.3116%2022.6013%2011.1617%2022.7514%2011.1617%2022.9366C11.1617%2023.1218%2011.3116%2023.272%2011.4966%2023.272Z'%20fill='white'/%3e%3c/svg%3e"},modelTypes:["POINT_CLOUD"]},i18n:{en:{window_label:"Point Cloud"},fr:{window_label:"Point Cloud"}}},rI="viewer-point-cloud-parameters_parameters",zSt={computed:{viewer(){let e=this.$viewer.localContext.pluginComponentInstances.get("pointCloud");if(e)return e;{let t="'Viewer Point Cloud Parameters' plugin cannot work without Viewer Point Cloud plugin.";throw console.error(t),Error(t)}},sensitivity:{get(){return this.viewer.sensitivity},set(e){this.viewer.sensitivity=e,this.saveParameters({sensitivity:e})}},fov:{get(){return this.viewer.fov},set(e){this.viewer.fov=e,this.saveParameters({fov:e})}}},mounted(){this.subscription=this.$viewer.localContext.hub.on("pointcloud-model-loaded",()=>{this.applySavedParameters()})},unmounted(){this.$viewer.localContext.hub.off(this.subscription)},methods:{getSavedParameters(){let e={};try{let t=localStorage.getItem(rI)||"{}";e=JSON.parse(t)}catch{localStorage.removeItem(rI)}return Object.assign({},this.getDefaultParameters(),e)},applySavedParameters(){let e=this.getSavedParameters();this.viewer.sensitivity=e.sensitivity,this.viewer.fov=e.fov},getDefaultParameters(){return{sensitivity:200,fov:90}},saveParameters(e){let t={sensitivity:e.sensitivity||this.sensitivity,fov:e.fov||this.fov};localStorage.setItem(rI,JSON.stringify(t))}}},qSt={class:"viewer-point-cloud-parameters"},GSt={class:"viewer-point-cloud-parameters_header"},KSt={class:"viewer-point-cloud-parameters_content"},JSt={class:"m-b-18"},ZSt={class:"flex justify-between"},WSt={class:"viewer-point-cloud-parameters_content__value"},YSt={class:"flex justify-between"},XSt={class:"viewer-point-cloud-parameters_content__value"};function $St(e,t,i,o,r,n){let a=I("BIMDataIconParameters"),s=I("BIMDataSlider");return k(),N("div",qSt,[w("div",GSt,[T(a,{size:"xs",margin:"0 12px 0 0"}),w("span",null,G(e.$t("pointCloudParameters.title")),1)]),w("div",KSt,[w("div",JSt,[w("div",ZSt,[w("span",null,G(e.$t("pointCloudParameters.sensitivity")),1),w("span",WSt,G(n.sensitivity),1)]),T(s,{modelValue:n.sensitivity,"onUpdate:modelValue":t[0]||=l=>n.sensitivity=l,min:20,max:1e3},null,8,["modelValue"])]),w("div",null,[w("div",YSt,[w("span",null,G(e.$t("pointCloudParameters.fov")),1),w("span",XSt,G(n.fov),1)]),T(s,{modelValue:n.fov,"onUpdate:modelValue":t[1]||=l=>n.fov=l,min:20,max:120},null,8,["modelValue"])])])])}var eDt={name:"pointCloudParameters",i18n:{en:{tooltip:"Parameters",title:"Point Cloud Viewer settings",sensitivity:"Sensitivity",fov:"Field of view"},fr:{tooltip:"Param\xE8tres",title:"Param\xE8tres du nuage de points",sensitivity:"Sensibilit\xE9",fov:"Angle de vision"}},addToWindows:["pointCloud"],component:Q(zSt,[["render",$St],["__scopeId","data-v-e97be8b2"]]),button:{tooltip:"pointCloudParameters.tooltip",position:"right",content:"simple",icon:{component:"BIMDataIconParameters",options:{size:"m"}}}},sm=class{constructor(e,t,i=null,o=!0){this.name=e,this.icon=t,this.group=i,this.label=`drawing-tools.action.${e}`,this.lineStyleComponentDisplayed=o}onActivate(){throw Error("Not implemented")}onDeactivate(){throw Error("Not implemented")}},tDt={},iDt={width:"18",height:"18",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg"};function rDt(e,t){return k(),N("svg",iDt,[...t[0]||=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.176395 0.13889C0.342301 -0.00852533 0.584825 -0.0419546 0.786658 0.0547728L21.6969 10.0759C21.9052 10.1757 22.0251 10.3924 21.9956 10.6155C21.966 10.8386 21.7935 11.019 21.566 11.0647L12.0932 12.9697L9.57365 21.6158C9.51015 21.8337 9.31 21.9881 9.07635 21.9993C8.8427 22.0106 8.6277 21.8763 8.54214 21.6655L0.03777 0.720195C-0.0446022 0.517321 0.0104881 0.286306 0.176395 0.13889Z"},null,-1)]])}var oDt=Q(tDt,[["render",rDt]]),nDt=class{constructor(){this._listenersTarget=new Map}on(e,t,i=window,o={}){this._listenersTarget.has(i)||this._listenersTarget.set(i,new Map);let r=this._listenersTarget.get(i);r.has(e)||r.set(e,new Map);let n=t.bind(this);return o?.once&&(n=(...a)=>{t.call(this,...a),this.off(e,t,i)}),i.addEventListener(e,n,o),r.get(e).set(t,n),()=>{this.off(e,t,i)}}off(e,t,i=window){if(!this._listenersTarget.has(i))return;let o=this._listenersTarget.get(i);if(!o.has(e))return;let r=o.get(e).get(t);i.removeEventListener(e,r),o.get(e).delete(t),o.get(e).size===0&&o.delete(e),o.size===0&&this._listenersTarget.delete(i)}},aDt="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M19.6749%202.92459C20.1081%203.35787%2020.1081%204.05777%2019.6749%204.49104L17.6418%206.5241L13.4757%202.358L15.5088%200.324952C15.9421%20-0.108322%2016.642%20-0.108322%2017.0752%200.324952L19.6749%202.92459ZM0%2020.0001V15.834L12.2872%203.54683L16.4533%207.71292L4.16609%2020.0001H0Z'%20fill='%232F374A'/%3e%3c/svg%3e",sDt="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M18.6749%202.9246C19.1081%203.35787%2019.1081%204.05777%2018.6749%204.49105L16.6418%206.5241L12.4757%202.35801L14.5088%200.324955C14.9421%20-0.108318%2015.642%20-0.108318%2016.0752%200.324955L18.6749%202.9246ZM0%2018V14.834L11.2872%203.54684L15.4533%207.71293L4.16609%2019.0001H1L0%2018Z'%20fill='%232F374A'/%3e%3c/svg%3e",lDt=`url("${aDt}") 0 20, auto`,cDt=`url("${sDt}") 1 23, auto`,Q8=class extends nDt{constructor(e,{pointerUpCursor:t=lDt,pointerDownCursor:i=cDt,element:o=e.canvas}={}){super(),this._engine2d=e,this.element=o,this.pointerUpCursor=t,this.pointerDownCursor=i,this._eventCache=[]}_getClientPosition(e){return{clientX:e.clientX,clientY:e.clientY}}_getPositions(e){let{clientX:t,clientY:i}=this._getClientPosition(e),{x:o,y:r}=this._engine2d.canvas.getBoundingClientRect();return this._engine2d.camera.getPosition({x:Math.max(t-o,0),y:Math.max(i-r,0)})}_getCanvasPosition(e){let{clientX:t,clientY:i}=this._getClientPosition(e),{x:o,y:r}=this.element.getBoundingClientRect();return{x:Math.max(t-o,0),y:Math.max(i-r,0)}}_getPositionedCallbackPayload(e){let t=this;return{get position(){return t._getPositions(e)},get canvasPosition(){return t._getCanvasPosition(e)},mouseEvent:e}}onEnabled(){}onMouseDown(){}onDrag(){}onMouseUp(){}onDisabled(){}_onMouseDown(e){this._eventCache.push(e),this.on("pointerup",()=>{this._eventCache=this._eventCache.filter(t=>t!==e)},window,{once:!0}),!(this._eventCache.length>1)&&(this.element.style.cursor=this.pointerDownCursor,this.onMouseDown(this._getPositionedCallbackPayload(e)),this.off("pointermove",this._onMouseMove,window),this.off("pointerup",this._onMouseUp,window),this.off("pointercancel",this._onMouseUp,window),this.on("pointermove",this._onMouseMove,window),this.on("pointerup",this._onMouseUp,window,{once:!0}),this.on("pointercancel",this._onMouseUp,window,{once:!0}))}_onMouseMove(e){e.preventDefault();let t=e.buttons===4,i=!e.isPrimary,o=this._eventCache.length>1;e.shiftKey||t||i||o||this.onDrag(this._getPositionedCallbackPayload(e))}_onMouseUp(e){this.off("pointermove",this._onMouseMove,window),this.off("pointerup",this._onMouseUp,window),this.off("pointercancel",this._onMouseUp,window),this.element.style.cursor=this.pointerUpCursor,this.onMouseUp(this._getPositionedCallbackPayload(e))}disable(){this._engine2d.ui.translatableWithOneTouch=!0,this._eventCache=[],this.off("pointerdown",this._onMouseDown,this.element),this.off("pointermove",this._onMouseMove,window),this.off("pointerup",this._onMouseUp,window),this.off("pointercancel",this._onMouseUp,window),this.element.style.cursor="",this.onDisabled()}enable(){this._engine2d.ui.translatableWithOneTouch=!1,this._eventCache=[],this.on("pointerdown",this._onMouseDown,this.element),this.element.style.cursor=this.pointerUpCursor,this.onEnabled()}},G$=`url("data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2022%2022'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.176395%200.13889C0.342301%20-0.00852533%200.584825%20-0.0419546%200.786658%200.0547728L21.6969%2010.0759C21.9052%2010.1757%2022.0251%2010.3924%2021.9956%2010.6155C21.966%2010.8386%2021.7935%2011.019%2021.566%2011.0647L12.0932%2012.9697L9.57365%2021.6158C9.51015%2021.8337%209.31%2021.9881%209.07635%2021.9993C8.8427%2022.0106%208.6277%2021.8763%208.54214%2021.6655L0.03777%200.720195C-0.0446022%200.517321%200.0104881%200.286306%200.176395%200.13889Z'%20/%3e%3c/svg%3e"), auto`,dDt=class extends sm{constructor({viewer:e},t){super("pointer",oDt,"pointers",!1),this._pointerManager=new uDt(e,t)}onActivate(){this._pointerManager.enable()}onDeactivate(){this._pointerManager.disable()}},uDt=class extends Q8{constructor(e,t){super(e,{pointerUpCursor:G$,pointerDownCursor:G$,element:e.canvas.parentElement}),this._drawer=t,this._currentDrawing=null,this.previousTouch=null}onMouseDown(e){this._currentDrawing=this._drawer.pick(e)}onMouseUp(){this._currentDrawing&&this._drawer.save(this._currentDrawing),this._currentDrawing=null,this.previousTouch=null}onDrag({position:e,mouseEvent:t,canvasPosition:i}){if(!this._currentDrawing)return;let o=0,r=0;if(window.TouchEvent&&t instanceof TouchEvent){let c=t.touches[0];this.previousTouch&&(o=c.pageX-this.previousTouch.pageX,r=c.pageY-this.previousTouch.pageY),this.previousTouch=c}else{let{movementX:c,movementY:d}=t;o=c,r=d}let n={x:i.x-o,y:i.y-r},a=this._engine2d.camera.getPosition(n),s=e.x-a.x,l=e.y-a.y;this._currentDrawing.x+=s,this._currentDrawing.y+=l}},ADt={},hDt={width:"14",height:"16",viewBox:"0 0 14 16",xmlns:"http://www.w3.org/2000/svg"};function pDt(e,t){return k(),N("svg",hDt,[...t[0]||=[w("path",{d:"M6.43587 16C6.09019 16 5.76756 15.9196 5.46797 15.7588C5.16839 15.5979 4.91888 15.3672 4.71944 15.0666L0 7.91354L0.307859 7.60694C0.508253 7.39952 0.745433 7.28253 1.0194 7.25596C1.29337 7.22942 1.54313 7.29881 1.7687 7.46414L4.1836 9.20471V2.14936C4.1836 1.98328 4.2379 1.84407 4.34649 1.73171C4.45509 1.61936 4.58965 1.56318 4.75018 1.56318C4.91071 1.56318 5.04519 1.61936 5.15361 1.73171C5.26203 1.84407 5.31624 1.98328 5.31624 2.14936V7.79331H7.08062V0.586175C7.08062 0.420099 7.13491 0.280884 7.2435 0.168531C7.35209 0.0561769 7.48665 0 7.64718 0C7.80771 0 7.94219 0.0561769 8.05061 0.168531C8.15904 0.280884 8.21325 0.420099 8.21325 0.586175V7.79331H9.97762V1.36777C9.97762 1.20169 10.0319 1.06248 10.1405 0.950122C10.2491 0.837768 10.3837 0.781592 10.5442 0.781592C10.7047 0.781592 10.8392 0.837768 10.9476 0.950122C11.056 1.06248 11.1102 1.20169 11.1102 1.36777V7.79331H12.8674V2.713C12.8674 2.54691 12.9217 2.40769 13.0302 2.29534C13.1388 2.18298 13.2734 2.12681 13.4339 2.12681C13.5945 2.12681 13.7289 2.18298 13.8373 2.29534C13.9458 2.40769 14 2.54691 14 2.713V13.0691C14 13.8787 13.7236 14.5696 13.1708 15.1418C12.6181 15.7139 11.9506 16 11.1683 16H6.43587Z"},null,-1)]])}var fDt=Q(ADt,[["render",pDt]]),gDt="data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.43587%2016C6.09019%2016%205.76756%2015.9196%205.46797%2015.7588C5.16839%2015.5979%204.91888%2015.3672%204.71944%2015.0666L0%207.91354L0.307859%207.60694C0.508252%207.39952%200.745433%207.28253%201.0194%207.25596C1.29337%207.22942%201.54313%207.29881%201.7687%207.46414L4.1836%209.20471V2.14936C4.1836%201.98328%204.2379%201.84407%204.34649%201.73171C4.45509%201.61936%204.58965%201.56318%204.75018%201.56318C4.91071%201.56318%205.04519%201.61936%205.15361%201.73171C5.26203%201.84407%205.31624%201.98328%205.31624%202.14936V7.79331H7.08062V0.586175C7.08062%200.420099%207.13491%200.280884%207.2435%200.168531C7.35209%200.0561769%207.48665%200%207.64718%200C7.80771%200%207.94219%200.0561769%208.05061%200.168531C8.15904%200.280884%208.21325%200.420099%208.21325%200.586175V7.79331H9.97762V1.36777C9.97762%201.20169%2010.0319%201.06248%2010.1405%200.950122C10.2491%200.837768%2010.3837%200.781592%2010.5442%200.781592C10.7047%200.781592%2010.8392%200.837768%2010.9476%200.950122C11.056%201.06248%2011.1102%201.20169%2011.1102%201.36777V7.79331H12.8674V2.713C12.8674%202.54691%2012.9217%202.40769%2013.0302%202.29534C13.1388%202.18298%2013.2734%202.12681%2013.4339%202.12681C13.5945%202.12681%2013.7289%202.18298%2013.8373%202.29534C13.9458%202.40769%2014%202.54691%2014%202.713V13.0691C14%2013.8787%2013.7236%2014.5696%2013.1708%2015.1418C12.6181%2015.7139%2011.9506%2016%2011.1683%2016H6.43587Z'%20fill='%232F374A'/%3e%3c/svg%3e",mDt="data:image/svg+xml,%3csvg%20width='11'%20height='11'%20viewBox='0%200%2011%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.43587%2011C3.09019%2011%202.76756%2010.9196%202.46797%2010.7588C2.16839%2010.5979%201.91888%2010.3672%201.71944%2010.0666L0%206.91354C0.5%205.5%200.780254%205.53908%201.1836%205.5V4.20471V2.14936C1.1836%201.98328%201.2379%201.84407%201.34649%201.73172C1.45509%201.61936%201.58965%201.56318%201.75018%201.56318C1.91071%201.56318%202.04519%201.61936%202.15361%201.73172C2.26203%201.84407%202.31624%201.98328%202.31624%202.14936V2.79331H4.08062V0.586175C4.08062%200.4201%204.13491%200.280884%204.2435%200.16853C4.35209%200.0561767%204.48665%200%204.64718%200C4.80771%200%204.94219%200.0561767%205.05061%200.16853C5.15904%200.280884%205.21325%200.4201%205.21325%200.586175V2.79331H6.97762V1.36777C6.97762%201.20169%207.03191%201.06248%207.1405%200.950122C7.24909%200.837768%207.38365%200.781591%207.54418%200.781591C7.70471%200.781591%207.83919%200.837768%207.94762%200.950122C8.05604%201.06248%208.11025%201.20169%208.11025%201.36777V2.79331H9.86735V2.713C9.86735%202.54691%209.92165%202.40769%2010.0302%202.29534C10.1388%202.18298%2010.2734%202.12681%2010.4339%202.12681C10.5945%202.12681%2010.7289%202.18298%2010.8373%202.29534C10.9458%202.40769%2011%202.54691%2011%202.713V8.06905C11%208.87869%2010.7236%209.56959%2010.1708%2010.1418C9.61805%2010.7139%208.95055%2011%208.16833%2011H3.43587Z'%20fill='%232F374A'/%3e%3c/svg%3e",vDt=`url("${gDt}") 7 23, auto`,yDt=`url("${mDt}") 7 18, auto`,wDt=class extends sm{constructor({viewer:e}){super("pan",fDt,"pointers",!1),this._pointerManager=new bDt(e)}onActivate(){this._pointerManager.enable()}onDeactivate(){this._pointerManager.disable()}},bDt=class extends Q8{constructor(e){super(e,{pointerUpCursor:vDt,pointerDownCursor:yDt}),this.previousTouch=null}onDrag({mouseEvent:e}){let t=0,i=0;if(window.TouchEvent&&e instanceof TouchEvent){let o=e.touches[0];this.previousTouch&&(t=o.pageX-this.previousTouch.pageX,i=o.pageY-this.previousTouch.pageY),this.previousTouch=o}else{let{movementX:o,movementY:r}=e;t=o,i=r}this._engine2d.camera.translate(-t*window.devicePixelRatio,-i*window.devicePixelRatio)}onMouseUp(){this.previousTouch=null}},lm=class extends sm{constructor(e,t,i,o,r,n=i){super(i,o,r),this._pointermanager=new CDt(e,t,n)}onActivate(){this._pointermanager.enable()}onDeactivate(){this._pointermanager.disable()}},CDt=class extends Q8{constructor(e,t,i){super(e),this._drawer=t,this._currentDrawing=null,this.shape=i}onMouseDown({position:e}){this._currentDrawing=this._drawer.makeDrawing(this.shape,{p1:e})}onMouseUp(){this._currentDrawing&&this._drawer.save(this._currentDrawing),this._currentDrawing=null}onDrag(e){this._currentDrawing.dragTo(e)}},xDt={},BDt={width:"18",height:"18",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg"};function kDt(e,t){return k(),N("svg",BDt,[...t[0]||=[w("path",{d:"M1.22223 22V17.6324L17.3486 0.577372C17.5382 0.376633 17.7466 0.230225 17.9738 0.138148C18.201 0.0460498 18.4282 0 18.6554 0C18.8951 0 19.1274 0.0460498 19.3523 0.138148C19.5771 0.230225 19.7742 0.376633 19.9434 0.577372L21.4547 2.17759C21.6443 2.35678 21.7826 2.56541 21.8695 2.80349C21.9565 3.04156 22 3.28752 22 3.54136C22 3.78194 21.9565 4.02251 21.8695 4.26306C21.7826 4.50364 21.6443 4.7243 21.4547 4.92504L5.34718 22H1.22223ZM18.4697 5.35812L20.1667 3.56126L18.6366 1.94115L16.9396 3.73801L18.4697 5.35812ZM12.9979 22C14.4269 22 15.7518 21.63 16.9724 20.89C18.1931 20.1501 18.8034 19.1181 18.8034 17.7941C18.8034 17.0342 18.5884 16.3698 18.1582 15.8007C17.7281 15.2316 17.1244 14.7504 16.3472 14.3572L14.9793 15.8056C15.6045 16.0545 16.0926 16.3477 16.4436 16.6854C16.7946 17.023 16.9701 17.3926 16.9701 17.7941C16.9701 18.4063 16.5729 18.9368 15.7785 19.3856C14.984 19.8344 14.0571 20.0588 12.9979 20.0588C12.7378 20.0588 12.52 20.1518 12.3445 20.3376C12.169 20.5234 12.0812 20.754 12.0812 21.0294C12.0812 21.3048 12.169 21.5354 12.3445 21.7212C12.52 21.9071 12.7378 22 12.9979 22ZM1.94853 12.8591L3.31174 11.4032C2.83381 11.1892 2.46793 10.9677 2.21409 10.7387C1.96024 10.5098 1.83331 10.2733 1.83331 10.0294C1.83331 9.70425 2.03819 9.3832 2.44796 9.06629C2.85772 8.7494 3.67292 8.31305 4.89358 7.75722C6.59216 6.98739 7.72899 6.29098 8.30404 5.66799C8.87912 5.04498 9.16666 4.34193 9.16666 3.55883C9.16666 2.49699 8.74397 1.63839 7.8986 0.983047C7.05323 0.327683 5.94814 0 4.58335 0C3.74502 0 2.97408 0.160117 2.27053 0.480347C1.56695 0.800556 1.04124 1.1921 0.693399 1.65499C0.524161 1.86901 0.454036 2.10502 0.483023 2.363C0.512011 2.62098 0.627572 2.83294 0.829708 2.99887C1.03184 3.16974 1.25278 3.23982 1.49252 3.20913C1.73226 3.17844 1.93674 3.07351 2.10596 2.89433C2.41465 2.56748 2.76957 2.32691 3.17073 2.1726C3.57186 2.0183 4.04273 1.94115 4.58335 1.94115C5.48121 1.94115 6.16402 2.10168 6.63176 2.42273C7.09949 2.74378 7.33335 3.12248 7.33335 3.55883C7.33335 3.93547 7.13161 4.27684 6.72814 4.58294C6.32464 4.88906 5.46947 5.35487 4.16262 5.98036C2.58783 6.71038 1.50036 7.36407 0.90023 7.94144C0.300076 8.51881 0 9.21481 0 10.0294C0 10.6367 0.171193 11.1705 0.513579 11.6309C0.855965 12.0913 1.33428 12.5007 1.94853 12.8591Z"},null,-1)]])}var EDt=Q(xDt,[["render",kDt]]),MDt=class extends lm{constructor({viewer:e},t){super(e,t,"pen",EDt,null,"freehand")}},PDt={},IDt={width:"22",height:"22",viewBox:"0 0 22 23",xmlns:"http://www.w3.org/2000/svg"};function SDt(e,t){return k(),N("svg",IDt,[...t[0]||=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 0.769226C0.447715 0.769226 0 1.21694 0 1.76923V4.32096C0 4.87324 0.447716 5.32096 1 5.32096H1.51723V18.2175H1C0.447715 18.2175 0 18.6652 0 19.2175V21.7692C0 22.3215 0.447716 22.7692 1 22.7692H3.55173C4.10401 22.7692 4.55173 22.3215 4.55173 21.7692V21.252H17.4482V21.7692C17.4482 22.3215 17.896 22.7692 18.4482 22.7692H21C21.5523 22.7692 22 22.3215 22 21.7692V19.2175C22 18.6652 21.5523 18.2175 21 18.2175H20.4828V5.32096H21C21.5523 5.32096 22 4.87324 22 4.32095V1.76923C22 1.21694 21.5523 0.769226 21 0.769226H18.4482C17.896 0.769226 17.4482 1.21694 17.4482 1.76923V2.28643H4.55173V1.76923C4.55173 1.21694 4.10401 0.769226 3.55173 0.769226H1ZM3.03448 5.32096H3.55173C4.10401 5.32096 4.55173 4.87324 4.55173 4.32095V3.80367H17.4482V4.32096C17.4482 4.87324 17.896 5.32096 18.4482 5.32096H18.9655V18.2175H18.4482C17.896 18.2175 17.4482 18.6652 17.4482 19.2175V19.7347H4.55173V19.2175C4.55173 18.6652 4.10401 18.2175 3.55173 18.2175H3.03448V5.32096ZM11.4216 6.83819H11.9202L15.931 17.4589H13.79L12.9878 15.0955H9.00098L8.20266 17.4589H6.06894L10.0578 6.83819H10.549H11.4216ZM9.53565 13.5126H12.4505L10.9896 9.2082L9.53565 13.5126Z"},null,-1)]])}var DDt=Q(PDt,[["render",SDt]]),TDt=`url("data:image/svg+xml,%3csvg%20width='14'%20height='15'%20viewBox='0%200%2014%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5%201.96296V7.5M5%201.96296L3%201H1M5%201.96296L7%201H9M5%2013.037V7.5M5%2013.037L7%2014H9M5%2013.037L3%2014H1M5%207.5H7M5%207.5H3'%20stroke='%232F374A'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11%209V11M11%2013V11M11%2011H13M11%2011H9'%20stroke='%232F374A'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e") 5 7, auto`,LDt=class extends sm{constructor(e,t){super("text",DDt,null,!1),this._viewerPlanPlugin=e,this._drawer=t,this.canvas=e.engine.canvas;let i=pe(!1);this.autoDeactivateCallback=null,this.connector={enabledRef:i,deactivateAction(){this.autoDeactivateCallback?.()}},this.onClick=o=>{this.autoDeactivateCallback();let{x:r,y:n}=e.viewer.camera.getPosition({x:o.offsetX,y:o.offsetY});t.makeDrawing("text",{x:r,y:n})}}onActivate(e){this.canvas.addEventListener("click",this.onClick),this._viewerPlanPlugin.$viewer.localContext.el.style.cursor=TDt,this.autoDeactivateCallback=e,this.connector.enabledRef.value=!0}onDeactivate(){this.canvas.removeEventListener("click",this.onClick),this._viewerPlanPlugin.$viewer.localContext.el.style.cursor="",this.autoDeactivateCallback=null,this.connector.enabledRef.value=!1}},RDt={},_Dt={width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"};function FDt(e,t){return k(),N("svg",_Dt,[...t[0]||=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 0H16V16H0V0ZM2 2V14H14V2H2Z"},null,-1)]])}var UDt=Q(RDt,[["render",FDt]]),ODt=class extends lm{constructor({viewer:e},t){super(e,t,"rectangle",UDt,"shapes")}},NDt={},HDt={width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"};function VDt(e,t){return k(),N("svg",HDt,[...t[0]||=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16 1.37853L1.37853 16L0 14.6215L14.6215 0L16 1.37853Z"},null,-1)]])}var jDt=Q(NDt,[["render",VDt]]),QDt=class extends lm{constructor({viewer:e},t){super(e,t,"line",jDt,"shapes")}},zDt={},qDt={width:"17",height:"17",viewBox:"0 0 17 17",xmlns:"http://www.w3.org/2000/svg"};function GDt(e,t){return k(),N("svg",qDt,[...t[0]||=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9914 1.88377H10.0848V0H16.207V6.12225H14.3233V3.21594L1.33203 16.2072L0 14.8751L12.9914 1.88377Z"},null,-1)]])}var KDt=Q(zDt,[["render",GDt]]),JDt=class extends lm{constructor({viewer:e},t){super(e,t,"arrow",KDt,"shapes")}},ZDt={},WDt={width:"17",height:"17",viewBox:"0 0 17 17",xmlns:"http://www.w3.org/2000/svg"};function YDt(e,t){return k(),N("svg",WDt,[...t[0]||=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.5 14.875C12.0208 14.875 14.875 12.0208 14.875 8.5C14.875 4.97919 12.0208 2.125 8.5 2.125C4.97919 2.125 2.125 4.97919 2.125 8.5C2.125 12.0208 4.97919 14.875 8.5 14.875ZM8.5 17C13.1944 17 17 13.1944 17 8.5C17 3.80558 13.1944 0 8.5 0C3.80558 0 0 3.80558 0 8.5C0 13.1944 3.80558 17 8.5 17Z"},null,-1)]])}var XDt=Q(ZDt,[["render",YDt]]),$Dt=class extends lm{constructor({viewer:e},t){super(e,t,"ellipse",XDt,"shapes")}},eTt={name:"EraserIcon",props:{color:{type:String,default:"currentColor"}}},tTt=["fill"];function iTt(e,t,i,o,r,n){return k(),N("svg",{width:"20",height:"20",viewBox:"0 0 22 22",fill:i.color,xmlns:"http://www.w3.org/2000/svg"},[...t[0]||=[w("path",{d:"M16.6425 18.2998H22V20H14.9369L16.6425 18.2998ZM2.62548 20L0.613685 17.9946C0.214257 17.5964 0.00980528 17.1125 0.00032939 16.5428C-0.0091465 15.9731 0.18583 15.4798 0.585258 15.0627L12.6123 2.62019C13.0118 2.20312 13.4943 1.9964 14.0599 2.00005C14.6256 2.00367 15.1081 2.20458 15.5075 2.60277L20.6617 7.74061C21.0611 8.13879 21.2627 8.62453 21.2663 9.19783C21.27 9.77112 21.072 10.2569 20.6726 10.655L11.5255 20H2.62548Z"},null,-1)]],8,tTt)}var rTt=Q(eTt,[["render",iTt]]),oTt="data:image/svg+xml,%3csvg%20width='23'%20height='23'%20viewBox='0%200%2023%2023'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.1614%200.604227C13.9322%20-0.186875%2015.1984%20-0.203279%2015.9895%200.567585L21.551%205.98681C22.3421%206.75768%2022.3586%208.0239%2021.5877%208.815L8.99392%2021.7394C8.22305%2022.5305%206.95683%2022.5469%206.16573%2021.776L0.604228%2016.3568C-0.186874%2015.5859%20-0.20328%2014.3197%200.567585%2013.5286L13.1614%200.604227Z'%20fill='%232F374A'/%3e%3c/svg%3e",nTt="data:image/svg+xml,%3csvg%20width='22'%20height='18'%20viewBox='0%200%2022%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.62548%2018L0.613685%2015.9946C0.214257%2015.5964%200.00980528%2015.1125%200.00032939%2014.5428C-0.0091465%2013.9731%200.18583%2013.4798%200.585258%2013.0627L12.6123%200.620194C13.0118%200.203116%2013.4943%20-0.00359875%2014.0599%204.73985e-05C14.6256%200.00367466%2015.1081%200.204581%2015.5075%200.602767L20.6617%205.74061C21.0611%206.13879%2021.2627%206.62453%2021.2663%207.19783C21.27%207.77112%2021.072%208.25686%2020.6726%208.65502L11.5255%2018H2.62548Z'%20fill='%232F374A'/%3e%3c/svg%3e",aTt=`url("${oTt}") 7 23, auto`,sTt=`url("${nTt}") 7 18, auto`,lTt=class extends sm{constructor({viewer:e},t){super("eraser",rTt,null,!1),this._pointerManager=new cTt(e,t)}onActivate(){this._pointerManager.enable()}onDeactivate(){this._pointerManager.disable()}},cTt=class extends Q8{constructor(e,t){super(e,{element:e.canvas.parentElement,pointerUpCursor:aTt,pointerDownCursor:sTt}),this._drawer=t}erase(e){let t=this._drawer.pick(e);t&&this._drawer.deleteDrawing(t.id)}onMouseDown(e){this.erase(e)}onDrag(e){this.erase(e)}},m0=class{constructor(e){this.drawingType=e}parse(e){throw Error("Not implemented")}toString(e){throw Error("Not implemented")}},dTt=class extends m0{constructor(){super("rectangle")}toString(e){let{p1:t,p2:i,p3:o,p4:r,lineColor:n,lineWidth:a}=e;return`<path d="M ${t.x} ${t.y} L ${i.x} ${i.y} L ${o.x} ${o.y} L ${r.x} ${r.y} Z" stroke-width="${a}" stroke="#${n.toString(16).padStart(6,0)}"/>`}parse(e){let t=e.querySelector("path"),[,i,o,,r,n,,a,s,,l,c]=t.getAttribute("d").split(" "),d=t.getAttribute("stroke")?.substring(1),u=t.getAttribute("stroke-width");return{p1:{x:parseFloat(i),y:parseFloat(o)},p2:{x:parseFloat(r),y:parseFloat(n)},p3:{x:parseFloat(a),y:parseFloat(s)},p4:{x:parseFloat(l),y:parseFloat(c)},lineColor:parseInt(d,16),lineWidth:parseFloat(u)}}},uTt=class extends m0{constructor(){super("line")}toString(e){let{p1:t,p2:i,lineWidth:o,lineColor:r}=e;return`<line x1="${t.x}" y1="${t.y}" x2="${i.x}" y2="${i.y}" stroke-width="${o}" stroke="#${r.toString(16).padStart(6,0)}"/>`}parse(e){let t=e.querySelector("line"),i=t.getAttribute("x1"),o=t.getAttribute("y1"),r=t.getAttribute("x2"),n=t.getAttribute("y2"),a=t.getAttribute("stroke")?.substring(1),s=t.getAttribute("stroke-width");return{p1:{x:parseFloat(i),y:parseFloat(o)},p2:{x:parseFloat(r),y:parseFloat(n)},lineWidth:parseFloat(s),lineColor:parseInt(a,16)}}},ATt=class extends m0{constructor(){super("arrow")}toString(e){let{p1:t,p2:i,lineWidth:o,lineColor:r}=e;return`<line x1="${t.x}" y1="${t.y}" x2="${i.x}" y2="${i.y}" stroke-width="${o}" stroke="#${r.toString(16).padStart(6,0)}"/>`}parse(e){let t=e.querySelector("line"),i=t.getAttribute("x1"),o=t.getAttribute("y1"),r=t.getAttribute("x2"),n=t.getAttribute("y2"),a=t.getAttribute("stroke")?.substring(1),s=t.getAttribute("stroke-width");return{p1:{x:parseFloat(i),y:parseFloat(o)},p2:{x:parseFloat(r),y:parseFloat(n)},lineWidth:parseFloat(s),lineColor:parseInt(a,16)}}};function K$(e){if(e.length===0)return"";let t=e[0],i=`M ${t.x} ${t.y}`;for(let o=0;o<e.length;o++){let r=e[o];i+=` C ${r.cpX1} ${r.cpY1} ${r.cpX2} ${r.cpY2} ${r.toX} ${r.toY}`}return i}function J$(e){let t=e.split(" "),i=t.shift();if(i!=="M")throw Error(`svgPathStringToCurves: invalid svg path string. Must start with M, got "${i}"`);let o=parseFloat(t.shift()),r=parseFloat(t.shift()),n=[];for(;t.shift()==="C";){let a=parseFloat(t.shift()),s=parseFloat(t.shift()),l=parseFloat(t.shift()),c=parseFloat(t.shift()),d=parseFloat(t.shift()),u=parseFloat(t.shift());n.push({type:"curve",x:o,y:r,cpX1:a,cpY1:s,cpX2:l,cpY2:c,toX:d,toY:u}),o=d,r=u}return n}var hTt=class extends m0{constructor(){super("ellipse")}toString(e){let{curve1:t,curve2:i,curve3:o,curve4:r,lineColor:n,lineWidth:a}=e;return`<path d="${K$([t,i,o,r])} Z" stroke-width="${a}" stroke="#${n.toString(16).padStart(6,0)}" />`}parse(e){let t=e.querySelector("path"),i=J$(t.getAttribute("d")),o=t.getAttribute("stroke")?.substring(1),r=t.getAttribute("stroke-width");return{curves:i,lineColor:parseInt(o,16),lineWidth:parseFloat(r)}}},pTt=class extends m0{constructor(){super("text")}toString(e){let{x:t,y:i,rotation:o,scale:r,text:n,size:a,color:s}=e;return`<text x="${t}" y="${i}" tranform="rotate(${o}) scale(${r})" font-size="${a}px" ${s?`color="#${s}"`:""}>${n}</text>`}parse(e){let t=e.querySelector("text"),i=t.getAttribute("x"),o=t.getAttribute("y"),r=t.getAttribute("tranform").match(/rotate\((.*)\)/)?.[1]??0,n=t.getAttribute("tranform").match(/scale\((.*)\)/)?.[1]??1,a=t.textContent==="null"?null:t.textContent,s=t.getAttribute("font-size").slice(0,-2),l=t.getAttribute("color");return{x:parseFloat(i),y:parseFloat(o),rotation:parseFloat(r),scale:parseFloat(n),text:a,size:parseFloat(s),color:l?l.slice(1):null}}},fTt=class extends m0{constructor(){super("freehand")}toString(e){let{curves:t,lineWidth:i,lineColor:o}=e,r=`stroke-width="${i}" stroke="#${o.toString(16).padStart(6,0)}"`;return`<path d="${K$(t)}" ${r}/>`}parse(e){let t=e.querySelector("path"),i=J$(t.getAttribute("d")),o=t.getAttribute("stroke")?.substring(1),r=t.getAttribute("stroke-width");return{curves:i,lineWidth:parseFloat(r),lineColor:parseInt(o,16)}}},gTt=class{constructor(){this.drawingSvgParsers=new Map,[new dTt,new uTt,new ATt,new hTt,new fTt,new pTt].map(e=>this.drawingSvgParsers.set(e.drawingType,e))}parse(e){try{let t=new DOMParser().parseFromString(e.content,"image/svg+xml"),i=t.querySelector("svg").getAttribute("type"),o=+t.querySelector("svg").getAttribute("data-bimdata-elevation"),r=this.drawingSvgParsers.get(i);if(!r)throw TypeError(`No drawing parser for type ${i}`);let n=r.parse(t);return n.apiId=e.id,n.type=i,n.z=o,n}catch(t){console.warn(`[Drawing Tools - Parser] Error parsing drawing ${e.id}, ignored.`,t)}}toString(e){let{type:t,z:i}=e,o=this.drawingSvgParsers.get(t);if(!o)throw TypeError(`No drawing parser for type ${t}`);return`<svg type="${t}" data-bimdata-elevation="${i}" xmlns="http://www.w3.org/2000/svg">${o.toString(e)}</svg>`}},mTt=class{constructor(e){this._api=e,this._parser=new gTt,this.queue=h1()}async getDrawingsData(e){let{cloudId:t,projectId:i}=this._api;return(await this._api.apiClient.modelApi.getDrawings(t,e,i)).map(o=>this._parser.parse(o)).filter(Boolean)}save(e,t){let i=this._parser.toString(e);if(!i)return;let{cloudId:o,projectId:r}=this._api,n={content:i},a;a=e.apiId?async()=>{try{await this._api.apiClient.modelApi.updateDrawing(o,e.apiId,t,r,n)}catch(s){console.error(`Cannot update drawing of type: "${e.type}"`,s)}}:async()=>{try{e.apiId=(await this._api.apiClient.modelApi.createDrawing(o,t,r,n)).id}catch(s){console.error(`Cannot create drawing of type: "${e.type}"`,s)}},this.queue.push(a)}async delete(e,t){if(!e.apiId)return;let{cloudId:i,projectId:o}=this._api;try{await this._api.apiClient.modelApi.deleteDrawing(i,e.apiId,t,o)}catch(r){console.error(`Cannot delete drawing of type: "${e.type}"`,r)}}},Z$=class{constructor(e){this.drawingTypes=e}pick(e,t){throw Error("Not implemented")}},vTt=class extends Z${constructor(e){super(["rectangle","ellipse","arrow","line","freehand"]),this._engine2d=e}pick(e,t){let{canvasPosition:i}=t,o=this._engine2d.picker.pick(i);if(o)return e.get(o.id)}},yTt=class extends Z${constructor(){super(["text"])}pick(e,t){let{mouseEvent:i}=t,o=i.target;return e.get(o.id)}},W$=class{constructor(e,t){if(!e)throw TypeError("Drawing type is required");this.type=e,this.z=t}destroy(){throw Error("Method 'destroy' not implemented.")}},Y$=class{constructor(e){this.drawingTypes=e}create(e,t){throw Error("Not implemented")}},wTt="data:image/svg+xml,%3csvg%20width='17'%20height='17'%20viewBox='0%200%2017%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.5%200C3.80611%200%200%203.80611%200%208.5C0%2013.1939%203.80611%2017%208.5%2017C9.28389%2017%209.91667%2016.3672%209.91667%2015.5833C9.91667%2015.215%209.775%2014.8844%209.54833%2014.6294C9.33111%2014.3839%209.18944%2014.0533%209.18944%2013.6944C9.18944%2012.9106%209.82222%2012.2778%2010.6061%2012.2778H12.2778C14.8844%2012.2778%2017%2010.1622%2017%207.55556C17%203.38111%2013.1939%200%208.5%200ZM3.30556%208.5C2.52167%208.5%201.88889%207.86722%201.88889%207.08333C1.88889%206.29944%202.52167%205.66667%203.30556%205.66667C4.08944%205.66667%204.72222%206.29944%204.72222%207.08333C4.72222%207.86722%204.08944%208.5%203.30556%208.5ZM6.13889%204.72222C5.355%204.72222%204.72222%204.08944%204.72222%203.30556C4.72222%202.52167%205.355%201.88889%206.13889%201.88889C6.92278%201.88889%207.55556%202.52167%207.55556%203.30556C7.55556%204.08944%206.92278%204.72222%206.13889%204.72222ZM10.8611%204.72222C10.0772%204.72222%209.44444%204.08944%209.44444%203.30556C9.44444%202.52167%2010.0772%201.88889%2010.8611%201.88889C11.645%201.88889%2012.2778%202.52167%2012.2778%203.30556C12.2778%204.08944%2011.645%204.72222%2010.8611%204.72222ZM13.6944%208.5C12.9106%208.5%2012.2778%207.86722%2012.2778%207.08333C12.2778%206.29944%2012.9106%205.66667%2013.6944%205.66667C14.4783%205.66667%2015.1111%206.29944%2015.1111%207.08333C15.1111%207.86722%2014.4783%208.5%2013.6944%208.5Z'%20fill='white'/%3e%3c/svg%3e",bTt="url(data:image/svg+xml,%3csvg%20width='10'%20height='15'%20viewBox='0%200%2010%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5%201.96296V7.5M5%201.96296L3%201H1M5%201.96296L7%201H9M5%2013.037V7.5M5%2013.037L7%2014H9M5%2013.037L3%2014H1M5%207.5H7M5%207.5H3'%20stroke='%232F374A'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e) 5 7, auto",CTt=4,xTt=40,X$=4,BTt=2,kTt={props:{id:{type:String,required:!0},newMarker:{type:Boolean,default:!1},textToolEnabled:{type:Boolean,required:!0},rotation:{type:Number,required:!0},scale:{type:Number,required:!0},initText:{type:String,default:""},initSize:{type:Number,default:12},initColor:{type:String,default:"000000"}},emits:["edit-update","text-update","size-update","color-update","delete-marker","delete-drawing"],setup(e,{emit:t}){let i=bt("$viewer").localContext.viewer.viewer.canvas,o=pe(e.newMarker),r=pe(e.initText),n=pe(e.initSize),a=pe(e.initColor);xt(r,x=>t("text-update",x)),xt(n,x=>t("size-update",x)),xt(a,x=>t("color-update",x));let s=pe(null),l=()=>s.value?.focus(),c=pe(null),d=pe(null),u=pe(null);async function A(){if(!o.value)return;await Ir();let{width:x}=c.value.getBoundingClientRect();d.value=x+12,u.value=1,await Ir();let{scrollHeight:B}=s.value;u.value=B+2}xt([()=>e.scale,o,r,n],A);let h=()=>{e.textToolEnabled&&(o.value=!0)},p=x=>{x.key==="Escape"&&(o.value=!1)};xt(o,async x=>{t("edit-update",x),x?(document.addEventListener("keydown",p),await Ir(),l()):(document.removeEventListener("keydown",p),v.value=!1)});let f=je(()=>n.value/(BTt*window.devicePixelRatio)),m=()=>{n.value>CTt&&(n.value-=X$),l()},g=()=>{n.value<xTt&&(n.value+=X$),l()},y=pe(null),v=pe(!1),C=pe(!1);return Di(()=>{A(),l()}),{paletteSvg:wTt,textCursor:bTt,textarea:s,textEl:c,colorElement:y,edit:o,text:r,textAreaWidth:d,textAreaHeight:u,size:f,sizeRef:n,color:a,colorSelectorDisplayed:v,colorSelectorTop:C,onTextClick:h,decrementSize:m,incrementSize:g,onTextColorClick:()=>{if(v.value=!v.value,v.value){let{y:x,height:B}=i.getBoundingClientRect(),{y:E}=y.value.getBoundingClientRect();C.value=E>x+B/2}},onTextColorUpdate:x=>{a.value=x,v.value=!1,l()},onDeleteClick:()=>{t("delete-marker"),t("delete-drawing")}}}},ETt=["id"],MTt={key:0},PTt={class:"bimdata-drawing-tools__text-marker__edit-content",style:"transform: translate(-1px, -1px)"},ITt={class:"bimdata-drawing-tools__text-marker__edit-content__header"},STt=["src"];function DTt(e,t,i,o,r,n){let a=I("BIMDataColorSelector"),s=I("BIMDataIconDelete"),l=Li("click-away");return k(),N("div",{class:"bimdata-drawing-tools__text-marker",style:ve(`font-size:${o.size}px; z-index: ${o.edit?1:0};`)},[w("div",{style:ve(`cursor: ${i.textToolEnabled?o.textCursor:""}`)},[w("div",{ref:"textEl",class:"bimdata-drawing-tools__text-marker__text",style:ve(`
|
|
2551
|
+
`}},methods:{onMouseMove({offsetX:e,offsetY:t}){this.zoomX=e,this.zoomY=t}}},zPt=["src"],qPt=["src"];function GPt(e,t,i,o,r,n){return k(),N("div",{class:"preview-2d",onMouseenter:t[0]||=a=>r.hover=!0,onMouseleave:t[1]||=a=>r.hover=!1,onMousemove:t[2]||=(...a)=>n.onMouseMove&&n.onMouseMove(...a)},[w("img",{loading:"lazy",src:n.imgUrl},null,8,zPt),Tt(w("div",{class:"zoom",style:ve({transform:n.zoomTransform})},[w("div",{class:"zoomImage",style:ve({width:`${i.width}px`,height:`${i.height}px`,transform:n.zoomImageTransform})},[w("img",{loading:"lazy",src:n.imgUrl},null,8,qPt)],4)],4),[[ui,r.hover]])],32)}var KPt=Q(QPt,[["render",GPt],["__scopeId","data-v-b92f4cf9"]]),H$=15,JPt={props:{width:{type:Number},height:{type:Number},previewUrl:{type:String},defaultUrl:{type:String}},data(){return{translation:0}},computed:{viewportWidth(){return Math.min(this.width,this.height)}},methods:{onMouseMove({offsetX:e}){let t=Math.ceil(H$*(1-e/this.width));t=Math.abs(t),t=Math.min(t,H$),this.translation=(t-1)*this.viewportWidth}}},ZPt=["src"];function WPt(e,t,i,o,r,n){return k(),N("div",{class:"preview-3d",onMousemove:t[0]||=(...a)=>n.onMouseMove&&n.onMouseMove(...a)},[w("div",{class:"viewport",style:ve({width:`${n.viewportWidth}px`,height:`${i.height}px`})},[w("img",{loading:"lazy",src:i.previewUrl||i.defaultUrl,style:ve({transform:`translateX(-${r.translation}px)`})},null,12,ZPt)],4)],32)}var YPt={components:{Preview2D:KPt,Preview3D:Q(JPt,[["render",WPt],["__scopeId","data-v-81707204"]])},props:{type:{type:String,default:"3d",validator:e=>["2d","3d"].includes(e)},width:{type:Number,default:240},height:{type:Number,default:240},previewUrl:{type:String},defaultUrl:{type:String},backgroundColor:{type:String,default:"var(--color-silver-light)"},zoomFactor:{type:Number,default:3}},computed:{previewComponent(){return this.type==="3d"?"Preview3D":"Preview2D"}}};function XPt(e,t,i,o,r,n){return k(),W(qr(n.previewComponent),la({class:"bimdata-model-preview",style:{width:`${i.width}px`,height:`${i.height}px`,backgroundColor:i.backgroundColor}},e.$props),null,16,["style"])}var $Pt=Q(YPt,[["render",XPt]]),eIt={class:"placeholder"},tIt={class:"list-item"},iIt={class:"count"},rIt=Q({__name:"StoreySelector",props:{storeys:{type:Object,required:!0},storey:{type:Object,default:null}},emits:["storey-selected"],setup(e,{emit:t}){let i=e,o=pe(null);return xt([()=>i.storeys,()=>i.storey],([r,n])=>{(!n||r.some(a=>a.uuid===n.uuid)&&n.uuid!==o.value?.uuid)&&(o.value=n)},{immediate:!0}),(r,n)=>{let a=I("BIMDataIconStorey"),s=I("BIMDataTextbox"),l=I("BIMDataIconPlan"),c=I("BIMDataDropdownList");return k(),W(c,{class:"storey-selector",width:"100%",list:e.storeys,elementKey:"uuid",closeOnElementClick:!0,onElementClick:n[0]||=d=>r.$emit("storey-selected",d)},{header:j(()=>[T(a,{size:"xs"}),w("span",eIt,G(o.value?.name??r.$t("MetaBuildingStructure.StoreySelector.placeholder")),1)]),element:j(({element:d})=>[w("div",tIt,[T(s,{class:"text",text:d.name},null,8,["text"]),T(l,{size:"xs"}),w("span",iIt,G(d.plans.length),1)])]),_:1},8,["list"])}}},[["__scopeId","data-v-49c78195"]]),oIt={class:"photosphere-building"},nIt={class:"title"},aIt={class:"head"},sIt={class:"body"},lIt={class:"loading"},V$=Q({__name:"BIMDataPhotosphereBuilding",props:{apiClient:{type:Object,required:!0},space:{type:Object,required:!0},project:{type:Object,required:!0},model:{type:Object,default:null},storey:{type:Object,default:null},plan:{type:Object,default:null},selectable:{type:Boolean,default:!1}},emits:["storey-selected","plan-selected"],setup(e,{emit:t}){let i=e,o=t,r=pe(!1),n=pe([]),a=pe(null),s=je(()=>a.value?.plans??[]),l=pe(null);xt(()=>i.model,async u=>{if(u)try{r.value=!0,n.value=await i.apiClient.modelApi.getStoreys(i.space.id,u.id,i.project.id),n.value.some(({uuid:A})=>a.value?.uuid===A)||(a.value=n.value[0]??null)}finally{r.value=!1}else n.value=[],a.value=null},{immediate:!0}),xt(()=>i.storey,u=>{a.value=u},{immediate:!0}),xt(()=>i.plan,u=>{l.value=u?.plan?.id},{immediate:!0});let c=u=>(a.value=u,o("storey-selected",u)),d=u=>o("plan-selected",u);return(u,A)=>{let h=I("BIMDataIconBuilding"),p=I("BIMDataRadio"),f=I("BIMDataFileIcon"),m=I("BIMDataTextbox"),g=I("BIMDataSpinner");return k(),N("div",oIt,[w("div",nIt,[T(h,{size:"s"}),w("span",null,G(u.$t("PhotosphereBuilding.title")),1)]),w("div",aIt,[T(rIt,{storeys:n.value,storey:a.value,onStoreySelected:c},null,8,["storeys","storey"])]),w("div",sIt,[(k(!0),N(ut,null,Vt(s.value,y=>(k(),N("div",{class:"list-item",key:y.plan.id},[e.selectable?(k(),W(p,{key:0,value:y.plan.id,modelValue:l.value,"onUpdate:modelValue":[A[0]||=v=>l.value=v,v=>d(y)]},null,8,["value","modelValue","onUpdate:modelValue"])):le("",!0),T(f,{fileName:y.plan.document?.file_name??y.plan.name,size:14},null,8,["fileName"]),T(m,{class:"text",text:y.plan.name},null,8,["text"])]))),128))]),T(Qi,{name:"fade"},{default:j(()=>[Tt(w("div",lIt,[T(g)],512),[[ui,r.value]])]),_:1})])}}},[["__scopeId","data-v-94317752"]]);function iI(e,t){return Array.isArray(e)?e=e.map(i=>iI(i,t)):(e.expandedRef=pe(!0),e.parent=t,e.children=e.children?.map(i=>iI(i,e))??[]),e}function cIt(e,t,i){return[{id:1,text:e.name,component:"StructureRootNode",children:t.map(o=>dIt(o,i))}]}var dIt=(e,t)=>({id:e.uuid,text:e.name,component:"StoreyNode",children:e.plans?.map(i=>uIt(e,i))??[],storey:e}),uIt=(e,t)=>({id:t.plan.id,text:t.plan.name,component:"PlanNode",storey:e,plan:t}),AIt={class:"generic-tree-node"},hIt={class:"end"},V8=Q({__name:"GenericTreeNode",props:{node:{type:Object,required:!0},depth:{type:Number,required:!0}},setup(e){return(t,i)=>{let o=I("BIMDataTextbox");return k(),N("div",AIt,[Pt(t.$slots,"icon",{},void 0,!0),T(o,{class:"text",text:e.node.text},null,8,["text"]),w("div",hIt,[Pt(t.$slots,"end",{},void 0,!0)])])}}},[["__scopeId","data-v-fab13549"]]),pIt={__name:"PlanNode",props:{node:{type:Object,required:!0},depth:{type:Number,required:!0}},emits:["delete-plan"],setup(e){let t=e,i=je(()=>t.node.storey),o=je(()=>t.node.plan);return(r,n)=>{let a=I("BIMDataFileIcon"),s=I("BIMDataIconDelete"),l=I("BIMDataButton");return k(),W(V8,Cs(jl(r.$props)),{icon:j(()=>[T(a,{"file-name":o.value.plan.document?.file_name??o.value.plan.name,size:12},null,8,["file-name"])]),end:j(()=>[T(l,{width:"24px",height:"24px",color:"high",ghost:"",rounded:"",icon:"",onClick:n[0]||=c=>r.$emit("delete-plan",{storey:i.value,plan:o.value})},{default:j(()=>[T(s,{size:"xxs"})]),_:1})]),_:1},16)}}},fIt=Q({__name:"StoreyNode",props:{node:{type:Object,required:!0},depth:{type:Number,required:!0}},emits:["add-plans","delete-storey","update-storey"],setup(e,{emit:t}){let i=e,o=t,r=[{key:1,text:"BuildingMaker.view.addFile",icon:"plus",action:()=>(n.value=!1,o("add-plans",i.node.storey))},{key:2,text:"BIMDataComponents.t.rename",icon:"edit",action:()=>(n.value=!1,o("update-storey",i.node.storey)),divider:!0},{key:3,text:"BIMDataComponents.t.delete",icon:"delete",color:"var(--color-high)",action:()=>(n.value=!1,o("delete-storey",i.node.storey))}],n=pe(!1);return(a,s)=>{let l=I("BIMDataIconStorey"),c=I("BIMDataIconEllipsis"),d=I("BIMDataButton"),u=I("BIMDataIcon"),A=I("BIMDataMenu");return k(),W(V8,la({class:"storey-node"},a.$props),{icon:j(()=>[T(l,{size:"xxs"})]),end:j(()=>[T(d,{width:"24px",height:"24px",color:"granite",ghost:"",rounded:"",icon:"",onClick:s[0]||=h=>n.value=!n.value},{default:j(()=>[T(c,{customSize:"24"})]),_:1}),T(Qi,{name:"fade"},{default:j(()=>[Tt(T(A,{class:"storey-node__menu",menuItems:r,width:"180px"},{item:j(({item:h})=>[T(u,{name:h.icon,size:"xs",margin:"0 12px 0 0"},null,8,["name"]),w("span",null,G(a.$t(h.text)),1)]),_:1},512),[[ui,n.value]])]),_:1})]),_:1},16)}}},[["__scopeId","data-v-a66bc7dd"]]),gIt={__name:"StructureRootNode",props:{node:{type:Object,required:!0},depth:{type:Number,required:!0}},emits:["create-storey"],setup(e){return(t,i)=>{let o=I("BIMDataIconBuilding"),r=I("BIMDataIconPlus"),n=I("BIMDataButton");return k(),W(V8,Cs(jl(t.$props)),{icon:j(()=>[T(o,{size:"xs"})]),end:j(()=>[T(n,{width:"23px",height:"23px",color:"primary",fill:"",radius:"",icon:"",onClick:i[0]||=a=>t.$emit("create-storey")},{default:j(()=>[T(r,{size:"xxs"})]),_:1})]),_:1},16)}}},mIt={__name:"ZoneNode",props:{node:{type:Object,required:!0},depth:{type:Number,required:!0}},setup(e){return(t,i)=>{let o=I("BIMDataIconZone2");return k(),W(V8,Cs(jl(t.$props)),{icon:j(()=>[T(o,{size:"xxs"})]),_:1},16)}}},vIt={class:"building-view"},yIt={key:0,class:"content"},wIt={key:1,class:"content"},bIt={class:"building-view__tree"},CIt=Q(Object.assign({components:{PlanNode:pIt,StoreyNode:fIt,StructureRootNode:gIt,ZoneNode:mIt}},{__name:"PhotosphereBuildingView",props:{apiClient:{type:Object,required:!0},space:{type:Object,required:!0},project:{type:Object,required:!0},model:{type:Object,required:!0}},emits:["close"],setup(e,{emit:t}){let i=e,o=bt("service"),r=bt("loading"),n=pe(""),a=pe(""),s=pe(!1),l=pe(!1),c=pe([]),d=pe(null),u=pe([]),A=pe([]),h=je(()=>iI(cIt(i.model,c.value,A.value))),p=async()=>{try{r.value=!0,c.value=await o.fetchStoreys(i.model)}finally{r.value=!1}},f=async()=>{try{r.value=!0,A.value=await o.fetchZones(i.model)}finally{r.value=!1}},m=async D=>{await o.createStorey(i.model,D),p()},g=async D=>{await o.updateStorey(i.model,D),p()},y=async D=>{await o.deleteStorey(i.model,D),p()},v=D=>{d.value=D,l.value=!0},C=()=>{d.value=null,l.value=!1},x=D=>{n.value=i.apiClient.config.configuration.basePath,a.value=i.apiClient.accessToken,d.value=D,s.value=!0},B=async()=>{let D=[],P=[];for(let{document:R,pdfPage:O}of u.value)O?P.push(O):D.push(R);let M=(await o.createPlanModels(D)).concat(P);await o.createStoreyPlans(i.model,d.value,M),p(),u.value=[],d.value=null,s.value=!1},E=async({storey:D,plan:P})=>{await o.deleteStoreyPlan(i.model,D,P),p()};return Di(()=>{p(),f()}),(D,P)=>{let M=I("BIMDataFileManager"),R=I("BIMDataButton"),O=I("BIMDataTree");return k(),N("div",vIt,[T(Qi,{name:"fade",mode:"out-in"},{default:j(()=>[s.value&&n.value&&a.value&&d.value?(k(),N("div",yIt,[T(M,{class:"building-view__dms",spaceId:e.space.id,projectId:e.project.id,apiUrl:n.value,archiveUrl:"",accessToken:a.value,locale:D.$i18n.locale,select:!0,pdfPageSelect:!0,multi:!0,headerButtons:!1,selectableFileTypes:mt(eX),onSelectionChange:P[0]||=V=>u.value=V},null,8,["spaceId","projectId","apiUrl","accessToken","locale","selectableFileTypes"]),T(R,{width:"100%",color:"primary",fill:"",radius:"",onClick:B},{default:j(()=>[nt(G(D.$t("BIMDataComponents.t.validate")),1)]),_:1})])):(k(),N("div",wIt,[w("div",bIt,[T(O,{data:h.value},{node:j(({node:V,depth:z})=>[(k(),W(qr(V.component),{node:V,depth:z,onCreateStorey:v,onUpdateStorey:v,onDeleteStorey:y,onAddPlans:x,onDeletePlan:E},null,40,["node","depth"]))]),_:1},8,["data"])]),T(R,{width:"100%",color:"primary",fill:"",radius:"",onClick:P[1]||=V=>D.$emit("close")},{default:j(()=>[nt(G(D.$t("BIMDataComponents.t.finish")),1)]),_:1}),T(Qi,{name:"fade"},{default:j(()=>[l.value?(k(),W(rX,{key:0,class:"building-view__form",storey:d.value,onCreateStorey:m,onUpdateStorey:g,onClose:C},null,8,["storey"])):le("",!0)]),_:1})]))]),_:1})])}}}),[["__scopeId","data-v-5bedb26f"]]),xIt={class:"bimdata-building-maker"},BIt=["src"],kIt={class:"bimdata-building-maker__body"},EIt={class:"bimdata-building-maker__loader"},MIt=Q({__name:"BIMDataPhotosphereBuildingMaker",props:{apiClient:{type:Object,required:!0},space:{type:Object,required:!0},project:{type:Object,required:!0},model:{type:Object,default:null}},emits:["metaBuilding-created","metaBuilding-updated","metaBuilding-deleted"],setup(e,{emit:t}){let i=e,o=t,r=Object.freeze({FORM:"form",LIST:"list",VIEW:"view"}),n=$Y(i.apiClient,i.space,i.project),a=pe(!1);pr("service",n),pr("loading",a);let s=pe(r.LIST),l=pe([]),c=pe(null),d=async()=>{a.value=!0,l.value=await n.fetchPhotosphereBuildings(),a.value=!1},u=async g=>{await n.deleteMetaBuilding(g),d(),o("metaBuilding-deleted")},A=g=>{c.value=g??null,s.value=r.FORM},h=g=>{c.value=g,s.value=r.VIEW},p=async g=>{await d(),h(g),o("metaBuilding-created")},f=()=>{d(),s.value=r.LIST,o("metaBuilding-updated")},m=()=>{s.value=r.LIST};return xt(()=>i.model,g=>{g&&h(g)},{immediate:!0}),Di(()=>d()),(g,y)=>{let v=I("BIMDataIconArrow"),C=I("BIMDataButton"),x=I("BIMDataSpinner");return k(),N("div",xIt,[w("div",{class:"bimdata-building-maker__header",style:ve({visibility:s.value===mt(r).LIST?"hidden":"visible"})},[T(C,{class:"bimdata-building-maker__header__btn-back",ghost:"",radius:"",disabled:a.value.value,onClick:m},{default:j(()=>[T(v,{size:"xxs",margin:"0 6px 0 0"}),w("span",null,G(g.$t("BIMDataComponents.t.back")),1)]),_:1},8,["disabled"]),w("img",{src:mt(tm)},null,8,BIt),w("span",null,G(g.$t("PhotosphereBuilding.title")),1)],4),w("div",kIt,[T(Qi,{name:"fade",mode:"out-in"},{default:j(()=>[s.value===mt(r).FORM?(k(),W(tX,{key:0,type:mt(xP).PHOTOSPHERE_BUILDING,metaBuilding:c.value,onMetaBuildingCreated:p,onMetaBuildingUpdated:f},null,8,["type","metaBuilding"])):s.value===mt(r).VIEW&&c.value?(k(),W(CIt,{key:1,apiClient:e.apiClient,space:e.space,project:e.project,model:c.value,onClose:m},null,8,["apiClient","space","project","model"])):(k(),W(iX,{key:2,metaBuildings:l.value,onOpenMetaBuilding:h,onCreateMetaBuilding:A,onUpdateMetaBuilding:A,onDeleteMetaBuilding:u},null,8,["metaBuildings"]))]),_:1})]),T(Qi,{name:"fade"},{default:j(()=>[Tt(w("div",EIt,[T(x)],512),[[ui,a.value]])]),_:1})])}}},[["__scopeId","data-v-235bd404"]]),PIt={class:"overlay"},IIt={class:"safe-zone__icon"},SIt={class:"safe-zone__title"},DIt={class:"safe-zone__text"},TIt={class:"safe-zone__actions"},LIt=Q({__name:"BIMDataSafeZoneModal",props:{width:{type:String,default:"350px"},iconName:{type:String,default:"warning"}},setup(e){return(t,i)=>{let o=I("BIMDataIcon");return k(),N("div",PIt,[w("div",{class:"safe-zone",style:ve({width:e.width})},[w("div",IIt,[T(o,{name:e.iconName,size:"s",fill:"",color:"high"},null,8,["name"])]),w("h2",SIt,[Pt(t.$slots,"title",{},void 0,!0)]),w("div",DIt,[Pt(t.$slots,"text",{},void 0,!0)]),w("div",TIt,[Pt(t.$slots,"actions",{},void 0,!0)])],4)])}}},[["__scopeId","data-v-01a25253"]]),RIt=co({BIMDataBuildingMaker:()=>oX,BIMDataFileManager:()=>XMt,BIMDataGuidedTour:()=>vPt,BIMDataMetaBuildingStructure:()=>N$,BIMDataModelPreview:()=>$Pt,BIMDataPDFViewer:()=>P$,BIMDataPhotosphereBuilding:()=>V$,BIMDataPhotosphereBuildingMaker:()=>MIt,BIMDataSafeZoneModal:()=>LIt}),_It={name:"buildingMaker",component:{setup(){let{apiClient:e,cloudId:t,projectId:i}=bt("$viewer").api;return()=>Gr(oX,{apiClient:e,space:{id:t},project:{id:i}})}},window:{name:"buildingMaker",label:"Building Maker",noModel:!0,icon:{imgUri:tm}}},FIt={components:{BIMDataNumericalInput:Ij},setup(){let e=bt("$viewer"),t=bt("viewerPlan"),i=bt("root"),o=bt("close"),r=je(()=>i.editedBitmap?.plan),n=je(()=>i.editedBitmap?i.editedBitmap:{x:0,y:0,scale:0,angle:0,opacity:0}),a=UIt(n),{x:s,y:l,angle:c,scale:d}=a,u,A,h=new Map;return xt(r,(f,m)=>{m&&h.set(m.key,u),f||h.clear(),u=h.get(f?.key)??null,A=null}),xt([s,l,c,d],()=>{r.value&&(u||=r.value.plan.transform,A={translate:[s.value,l.value],rotate:c.value,scale:d.value},t.planObjectRegistry.updatePlanObjectsTransform(r.value,{oldTransform:u,newTransform:A}),u=A)}),{root:i,bitmap:n,...a,submit:async()=>{try{i.loading=!0,await Promise.all(i.bitmaps.filter(f=>f.edited).map(async f=>{let{x:m,y:g,scale:y,angle:v,opacity:C,plan:x}=f,B={...x.plan.transform},E={translate:[m,g],rotate:v,scale:y,opacity:C};t.planObjectRegistry.updatePlanObjectsTransform(x,{oldTransform:E,newTransform:B}),x.plan.transform||(x.plan.transform={}),Object.assign(x.plan.transform,E),await e.state.updatePlan(x,B),f.edited=!1}))}catch(f){console.error(f)}finally{i.loading=!1,o()}}}}};function UIt(e){let t={};return Object.entries({x:i=>i,y:i=>i,scale:i=>i,angle:i=>i<0||i>360?(i%360+360)%360:i,opacity:i=>i<0?0:i>1?1:i}).forEach(([i,o])=>{t[i]=je({get:()=>e.value[i],set:r=>e.value[i]=o(r)})}),t}var OIt={class:"synchronization__page__edit"},NIt={class:"synchronization__page__edit__content"},HIt={class:"synchronization__page__edit__content__unit-group"},VIt={class:"synchronization__page__edit__content__unit-group__element"},jIt={class:"synchronization__page__edit__content__unit-group__element"},QIt={class:"synchronization__page__edit__content__unit-group__element"},zIt={class:"synchronization__page__edit__content__unit"},qIt={class:"synchronization__page__edit__content__unit"},GIt={class:"synchronization__page__edit__content__img"},KIt=["src"],JIt={class:"synchronization__page__edit__validate"};function ZIt(e,t,i,o,r,n){let a=I("BIMDataNumericalInput"),s=I("BIMDataSlider"),l=I("BIMDataTextbox"),c=I("BIMDataButton");return k(),N("div",OIt,[w("div",NIt,[w("section",null,[w("span",null,G(e.$t("synchronization.location")),1),w("div",HIt,[w("div",VIt,[T(a,{modelValue:e.x,"onUpdate:modelValue":t[0]||=d=>e.x=d,label:"X",container:e.$viewer.localContext.el},null,8,["modelValue","container"])]),w("div",jIt,[T(a,{modelValue:e.y,"onUpdate:modelValue":t[1]||=d=>e.y=d,label:"Y",container:e.$viewer.localContext.el},null,8,["modelValue","container"])]),w("div",QIt,[T(a,{modelValue:e.scale,"onUpdate:modelValue":t[2]||=d=>e.scale=d,label:e.$t("synchronization.scale"),step:.01,min:.01,container:e.$viewer.localContext.el},null,8,["modelValue","label","container"])])])]),w("section",null,[w("span",null,G(e.$t("synchronization.rotation")),1),w("div",zIt,[T(a,{modelValue:e.angle,"onUpdate:modelValue":t[3]||=d=>e.angle=d,unit:"\xB0",centered:""},null,8,["modelValue"]),T(s,{modelValue:e.angle,"onUpdate:modelValue":t[4]||=d=>e.angle=d,min:0,max:360},null,8,["modelValue"])])]),w("section",null,[w("span",null,G(e.$t("synchronization.alpha")),1),w("div",qIt,[T(a,{modelValue:e.opacity,"onUpdate:modelValue":t[5]||=d=>e.opacity=d,centered:""},null,8,["modelValue"]),T(s,{modelValue:e.opacity,"onUpdate:modelValue":t[6]||=d=>e.opacity=d,min:0,max:1,step:.01},null,8,["modelValue"])])]),w("section",null,[w("span",null,G(e.$t("synchronization.preview")),1),w("div",GIt,[w("img",{src:o.bitmap.dataUrl,alt:"Background"},null,8,KIt),T(l,{text:o.bitmap.name,class:"synchronization__page__edit__content__img__name"},null,8,["text"])])])]),w("div",JIt,[T(c,{width:"100%",color:"primary",fill:"",radius:"",onClick:o.submit},{default:j(()=>[nt(G(o.bitmap&&o.bitmap.plan?e.$t("global.save"):e.$t("global.validate")),1)]),_:1},8,["onClick"])])])}var WIt={name:"BimdataSynchronization",components:{edit:Q(FIt,[["render",ZIt],["__scopeId","data-v-63e956d5"]])},setup(){let{localContext:e}=bt("$viewer"),t=bt("$plugin"),i=e.pluginComponentInstances.get("plan");if(!i)throw Error("[Synchronization] plugin cannot work without viewerPlan plugin with 2d engine on.");i=un(i),pr("viewerPlan",i);let o=je(()=>e.loadedModels[0]);xt(o,h=>{!h||h.type!=="METABUILDING"?t.hide():t.show()},{immediate:!0}),xt(()=>t.shown,h=>{o.value?.type!=="METABUILDING"&&h&&t.hide()});let r=qo({page:"edit",loading:!1,modalDisplayed:!1,model:null,storeys:[],selectedStorey:null,plans:[],bitmaps:[],editedBitmap:null});pr("root",r);let n=()=>{r.editedBitmap&&(r.bitmaps.map(h=>(h.edit(!1),h)).filter(h=>h.edited).forEach(h=>{let{x:p,y:f,scale:m,angle:g,plan:y}=h,v=y.plan.transform,C={translate:[p,f],rotate:g,scale:m};i.planObjectRegistry.updatePlanObjectsTransform(y,{oldTransform:C,newTransform:v}),h.reset()}),r.modalDisplayed=!1,i.storeyRightOffset=0,e.showUI(),document.removeEventListener("keydown",d),r.editedBitmap=null,r.bitmaps=[])},a=()=>{n(),t.close()};pr("close",a);let s=()=>{r.bitmaps.some(h=>h.edited)?r.modalDisplayed=!0:a()},l=()=>{a()},c=h=>{r.editedBitmap=h},d=h=>{r.loading||h.key==="Escape"&&(h.preventDefault(),r.modalDisplayed?r.modalDisplayed=!1:a())},u=e.hub.on("model-loaded",({model:h})=>{r.model=h,r.storeys=h.storeys,r.plans=h.storeys.flatMap(p=>p.plans)},{getLastEvent:!0}),A=e.hub.on("storey-selected",({storey:h})=>{r.selectedStorey=h,(!h||h.plans.length<2)&&a()},{getLastEvent:!0});return $i(()=>{e.hub.off(u),e.hub.off(A)}),xt(()=>r.editedBitmap,(h,p)=>{p?.edit(!1),h?.edit(!0)},{immediate:!0}),{viewerPlan:i,root:r,onBitmapClick:c,onCloseClick:s,onLeaveClick:l,onKeyDown:d,clean:n}},async onOpen(){this.$viewer.localContext.pluginComponentInstances.forEach(t=>{t!==this&&t.$close?.()}),this.viewerPlan.storeyRightOffset=380,await this.$viewer.localContext.hideUI({exceptions:[this.$plugin.name]}),document.addEventListener("keydown",this.onKeyDown);let e=this.$viewer.localContext.selectedStorey?.plans.map(t=>t.key)??[];this.root.bitmaps=Array.from(this.viewerPlan.bitmaps.filter(t=>e.includes(t.plan.key))),this.root.editedBitmap=this.root.bitmaps[0],this.root.bitmaps.filter(t=>!t.visible).forEach(t=>{this.$viewer.localContext.showPlan(t.plan),t.show()}),this.viewerPlan.$refs.storeySelector?.focus()},onClose(){this.clean()}},YIt={class:"bimdata-synchronization"},XIt={class:"bimdata-synchronization__header"},$It={class:"bimdata-synchronization__header__top"},eSt={class:"bimdata-synchronization__header__top__title"},tSt={class:"bimdata-synchronization__header__top__title__text"},iSt={class:"bimdata-synchronization__header__select__header"},rSt={class:"bimdata-info-length bimdata-synchronization__header__select__header__length"},oSt={class:"bimdata-synchronization__page"},nSt={key:1,class:"bimdata-synchronization__modal"},aSt={class:"bimdata-synchronization__modal__content"},sSt={class:"bimdata-synchronization__modal__content__symbols"},lSt={class:"bimdata-synchronization__modal__content__buttons"};function cSt(e,t,i,o,r,n){let a=I("BIMDataLoading"),s=I("BIMDataIconSynchro2D"),l=I("BIMDataIconClose"),c=I("BIMDataButton"),d=I("BIMDataTextbox"),u=I("BIMDataDropdownList"),A=I("BIMDataIconWarning");return k(),N("div",YIt,[o.root.loading?(k(),W(a,{key:0})):le("",!0),w("div",XIt,[w("div",$It,[w("div",eSt,[T(s,{size:"xs",fill:"",color:"primary"}),w("span",tSt,G(e.$t("synchronization.title")),1)]),T(c,{class:"bimdata-synchronization__header__top__close",width:"25px",height:"25px",ghost:"",radius:"",icon:"",onClick:o.onCloseClick},{default:j(()=>[T(l,{size:"xs",fill:"",color:"granite-light"})]),_:1},8,["onClick"])]),w("div",null,[T(u,{width:"100%",list:o.root.bitmaps,"element-key":"id","per-page":30,"close-on-element-click":!0,class:"bimdata-synchronization__header__select",onElementClick:o.onBitmapClick},{header:j(()=>[w("div",iSt,[w("div",rSt,[w("span",null,G(o.root.bitmaps.length),1)]),w("div",null,[T(d,{width:"265px",text:o.root.editedBitmap?.name},null,8,["text"])])])]),element:j(({element:h})=>[w("div",{class:ye(["bimdata-synchronization__header__select__element",{"bimdata-synchronization__header__select__element--selected":h===o.root.editedBitmap}])},G(h.name),3)]),_:1},8,["list","onElementClick"])])]),w("div",oSt,[(k(),W(L3,null,[(k(),W(qr(o.root.page)))],1024))]),o.root.modalDisplayed?(k(),N("div",nSt,[w("div",aSt,[w("div",sSt,[T(A,{fill:"",color:"high",size:"l"}),w("div",null,G(e.$t("synchronization.warning")),1)]),w("div",lSt,[T(c,{width:"45%",color:"high",fill:"",radius:"",onClick:o.onLeaveClick},{default:j(()=>[nt(G(e.$t("synchronization.leave")),1)]),_:1},8,["onClick"]),T(c,{width:"45%",color:"default",outline:"",radius:"",onClick:t[0]||=h=>o.root.modalDisplayed=!1},{default:j(()=>[nt(G(e.$t("synchronization.stay")),1)]),_:1})])])])):le("",!0)])}var dSt={name:"synchronization",i18n:{de:{tooltip:"2D-Synchronisierung",title:"2D-Synchronisierung",start:"Beginnen",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",select_storey:"Eine Etage ausw\xE4hlen",import_file:"Eine Datei importieren",location:"Position",scale:"Skala",rotation:"Rotation",alpha:"Undurchsichtigkeit",preview:"\xDCbersicht",import:"Ein Element importieren",from_ged:"Von der DMS des Projekts aus",from_computer:"Von Ihrem Computer aus",no_storey:"Um einen Hintergrund hinzuzuf\xFCgen, w\xE4hlen Sie bitte eine IFC und eine Etage aus.",no_ifc:"Um einen Hintergrund hinzuzuf\xFCgen, w\xE4hlen Sie bitte eine IFC aus.",warning:"M\xF6chten Sie diese Seite wirklich verlassen? Sie enth\xE4lt m\xF6glicherweise Informationen, die nicht best\xE4tigt sind.",leave:"Ja, diese Seite verlassen",stay:"Abbrechen, hierbleiben"},en:{tooltip:"2D Synchronization",title:"2D Synchronization",start:"Start",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",select_storey:"Select a floor",import_file:"Import a file",location:"Position",scale:"Scale",rotation:"Rotation",alpha:"Opacity",preview:"Preview",import:"Import an element",from_ged:"From the project's DMS",from_computer:"From your computer",no_storey:"To add a background, please select an IFC and a floor.",no_ifc:"To add a background, please select an IFC.",warning:"Are you sure you want to leave this page? There may be some informations that are not validated.",leave:"Yes, leave this page",stay:"Cancel, stay here"},es:{tooltip:"Sincronizaci\xF3n 2D",title:"Sincronizaci\xF3n 2D",start:"Comenzar",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",select_storey:"Seleccionar una planta",import_file:"Importar un fichero",location:"Posici\xF3n",scale:"Escala",rotation:"Rotaci\xF3n",alpha:"Opacidad",preview:"Vista r\xE1pida",import:"Importar un elemento",from_ged:"Desde el GED del proyecto",from_computer:"Desde su ordenador",no_storey:"Para agregar un fondo seleccione un IFC y una planta.",no_ifc:"Para agregar un fondo seleccione un IFC.",warning:"\xBFEsta usted seguro de que quiere abandonar esta p\xE1gina? Puede haber informaciones no validadas.",leave:"S\xED, abandonar la p\xE1gina",stay:"Cancelar, permanecer aqu\xED"},fr:{tooltip:"Synchronisation 2D",title:"Synchronisation 2D",start:"Commencer",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",select_storey:"S\xE9lectionner un \xE9tage",import_file:"Importer un fichier",location:"Position",scale:"Echelle",rotation:"Rotation",alpha:"Opacit\xE9",preview:"Aper\xE7u",import:"Importer un \xE9l\xE9ment",from_ged:"Depuis la GED du projet",from_computer:"Depuis votre ordinateur",no_storey:"Pour ajouter un fond, veuillez selectionner un IFC et un \xE9tage.",no_ifc:"Pour ajouter un fond, veuillez selectionner un IFC.",warning:"\xCAtes-vous s\xFBr de vouloir quitter cette page ? Il y'a peut-\xEAtre des informations non valid\xE9es.",leave:"Oui, quitter cette page",stay:"Annuler, rester ici"},it:{tooltip:"Sincronizzazione 2D",title:"Sincronizzazione 2D",start:"Iniziare",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",select_storey:"Selezionare un piano",import_file:"Importare un file",location:"Posizione",scale:"Scala",rotation:"Rotazione",alpha:"Opacit\xE0",preview:"Anteprima",import:"Importare un elemento",from_ged:"Dal cassetto informatico del progetto",from_computer:"Dal computer",no_storey:"Per aggiungere uno sfondo, selezionare un file IFC e un piano.",no_ifc:"Per aggiungere uno sfondo, selezionare un file IFC.",warning:"Si \xE8 sicuri di voler lasciare questa pagina? \xC8 possibile che alcune informazioni non siano state ancora convalidate.",leave:"S\xEC, uscire da questa pagina",stay:"Annulla, rimanere a questa pagina"}},component:Q(WIt,[["render",cSt],["__scopeId","data-v-98c2db44"]]),button:{tooltip:"synchronization.tooltip",position:"right",stance:1,content:"free",keepOpen:!0,icon:{imgUri:"data:image/svg+xml,%3csvg%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='6.52344'%20y='4.25488'%20width='16.1039'%20height='21.7744'%20stroke='%232F374A'/%3e%3crect%20x='3.12646'%20y='13.0261'%20width='14'%20height='20.043'%20transform='rotate(-45%203.12646%2013.0261)'%20fill='%232F374A'/%3e%3cmask%20id='path-3-outside-1_1838_531'%20maskUnits='userSpaceOnUse'%20x='-0.414214'%20y='-0.414216'%20width='31.1127'%20height='31.1127'%20fill='black'%3e%3crect%20fill='white'%20x='-0.414214'%20y='-0.414216'%20width='31.1127'%20height='31.1127'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.41421%2013.0208L4.35876%2014.9654L5.06586%2014.2582L3.82843%2013.0208L5.15425%2011.695L4.44715%2010.9879L2.41421%2013.0208ZM5.68458%209.75044L6.39169%2010.4576L10.4576%206.39169L9.75045%205.68458L5.68458%209.75044ZM10.9879%204.44714L11.695%205.15425L13.0208%203.82842L14.2583%205.06586L14.9654%204.35875L13.0208%202.41421L10.9879%204.44714ZM16.026%205.41942L15.3189%206.12652L19.208%2010.0156L19.9151%209.3085L16.026%205.41942ZM20.9758%2010.3692L20.2687%2011.0763L24.1577%2014.9654L24.8649%2014.2582L20.9758%2010.3692ZM25.9255%2015.3189L25.2184%2016.026L26.4558%2017.2635L25.13%2018.5893L25.8371%2019.2964L27.8701%2017.2635L25.9255%2015.3189ZM24.5997%2020.5338L23.8926%2019.8267L19.8267%2023.8926L20.5338%2024.5997L24.5997%2020.5338ZM19.2964%2025.8371L18.5893%2025.13L17.2635%2026.4558L16.026%2025.2184L15.3189%2025.9255L17.2635%2027.8701L19.2964%2025.8371ZM14.2583%2024.8649L14.9654%2024.1577L11.0763%2020.2687L10.3692%2020.9758L14.2583%2024.8649ZM9.3085%2019.9151L10.0156%2019.208L6.12652%2015.3189L5.41942%2016.026L9.3085%2019.9151Z'/%3e%3cpath%20d='M1%2013.0208L3.12132%2010.8995L5.24264%2013.0208L3.12132%2015.1421L1%2013.0208Z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.12132%2012.3137L2.41421%2013.0208L3.12132%2013.7279L3.82843%2013.0208L3.12132%2012.3137ZM1%2013.0208L3.12132%2015.1421L5.24264%2013.0208L3.12132%2010.8995L1%2013.0208Z'/%3e%3cpath%20d='M10.8995%203.12132L13.0208%200.999998L15.1421%203.12132L13.0208%205.24264L10.8995%203.12132Z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.0208%202.41421L12.3137%203.12132L13.0208%203.82842L13.7279%203.12132L13.0208%202.41421ZM10.8995%203.12132L13.0208%205.24264L15.1421%203.12132L13.0208%200.999998L10.8995%203.12132Z'/%3e%3cpath%20d='M25.0416%2017.2635L27.163%2015.1421L29.2843%2017.2635L27.163%2019.3848L25.0416%2017.2635Z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M27.163%2016.5563L26.4558%2017.2635L27.163%2017.9706L27.8701%2017.2635L27.163%2016.5563ZM25.0416%2017.2635L27.163%2019.3848L29.2843%2017.2635L27.163%2015.1421L25.0416%2017.2635Z'/%3e%3cpath%20d='M15.1421%2027.1629L17.2635%2025.0416L19.3848%2027.1629L17.2635%2029.2843L15.1421%2027.1629Z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.2635%2026.4558L16.5563%2027.1629L17.2635%2027.8701L17.9706%2027.1629L17.2635%2026.4558ZM15.1421%2027.1629L17.2635%2029.2843L19.3848%2027.1629L17.2635%2025.0416L15.1421%2027.1629Z'/%3e%3c/mask%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.41421%2013.0208L4.35876%2014.9654L5.06586%2014.2582L3.82843%2013.0208L5.15425%2011.695L4.44715%2010.9879L2.41421%2013.0208ZM5.68458%209.75044L6.39169%2010.4576L10.4576%206.39169L9.75045%205.68458L5.68458%209.75044ZM10.9879%204.44714L11.695%205.15425L13.0208%203.82842L14.2583%205.06586L14.9654%204.35875L13.0208%202.41421L10.9879%204.44714ZM16.026%205.41942L15.3189%206.12652L19.208%2010.0156L19.9151%209.3085L16.026%205.41942ZM20.9758%2010.3692L20.2687%2011.0763L24.1577%2014.9654L24.8649%2014.2582L20.9758%2010.3692ZM25.9255%2015.3189L25.2184%2016.026L26.4558%2017.2635L25.13%2018.5893L25.8371%2019.2964L27.8701%2017.2635L25.9255%2015.3189ZM24.5997%2020.5338L23.8926%2019.8267L19.8267%2023.8926L20.5338%2024.5997L24.5997%2020.5338ZM19.2964%2025.8371L18.5893%2025.13L17.2635%2026.4558L16.026%2025.2184L15.3189%2025.9255L17.2635%2027.8701L19.2964%2025.8371ZM14.2583%2024.8649L14.9654%2024.1577L11.0763%2020.2687L10.3692%2020.9758L14.2583%2024.8649ZM9.3085%2019.9151L10.0156%2019.208L6.12652%2015.3189L5.41942%2016.026L9.3085%2019.9151Z'%20fill='%232F374A'/%3e%3cpath%20d='M1%2013.0208L3.12132%2010.8995L5.24264%2013.0208L3.12132%2015.1421L1%2013.0208Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.12132%2012.3137L2.41421%2013.0208L3.12132%2013.7279L3.82843%2013.0208L3.12132%2012.3137ZM1%2013.0208L3.12132%2015.1421L5.24264%2013.0208L3.12132%2010.8995L1%2013.0208Z'%20fill='%232F374A'/%3e%3cpath%20d='M10.8995%203.12132L13.0208%200.999998L15.1421%203.12132L13.0208%205.24264L10.8995%203.12132Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.0208%202.41421L12.3137%203.12132L13.0208%203.82842L13.7279%203.12132L13.0208%202.41421ZM10.8995%203.12132L13.0208%205.24264L15.1421%203.12132L13.0208%200.999998L10.8995%203.12132Z'%20fill='%232F374A'/%3e%3cpath%20d='M25.0416%2017.2635L27.163%2015.1421L29.2843%2017.2635L27.163%2019.3848L25.0416%2017.2635Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M27.163%2016.5563L26.4558%2017.2635L27.163%2017.9706L27.8701%2017.2635L27.163%2016.5563ZM25.0416%2017.2635L27.163%2019.3848L29.2843%2017.2635L27.163%2015.1421L25.0416%2017.2635Z'%20fill='%232F374A'/%3e%3cpath%20d='M15.1421%2027.1629L17.2635%2025.0416L19.3848%2027.1629L17.2635%2029.2843L15.1421%2027.1629Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.2635%2026.4558L16.5563%2027.1629L17.2635%2027.8701L17.9706%2027.1629L17.2635%2026.4558ZM15.1421%2027.1629L17.2635%2029.2843L19.3848%2027.1629L17.2635%2025.0416L15.1421%2027.1629Z'%20fill='%232F374A'/%3e%3cpath%20d='M1%2013.0208L0.646447%2012.6673L0.292893%2013.0208L0.646447%2013.3744L1%2013.0208ZM3.12132%2010.8995L3.47487%2010.5459L3.12132%2010.1924L2.76777%2010.5459L3.12132%2010.8995ZM5.24264%2013.0208L5.59619%2013.3744L5.94975%2013.0208L5.59619%2012.6673L5.24264%2013.0208ZM3.12132%2015.1421L2.76777%2015.4957L3.12132%2015.8492L3.47487%2015.4957L3.12132%2015.1421ZM10.8995%203.12132L10.5459%202.76776L10.1924%203.12132L10.5459%203.47487L10.8995%203.12132ZM13.0208%200.999998L13.3744%200.646445L13.0208%200.292891L12.6673%200.646445L13.0208%200.999998ZM15.1421%203.12132L15.4957%203.47487L15.8492%203.12132L15.4957%202.76776L15.1421%203.12132ZM13.0208%205.24264L12.6673%205.59619L13.0208%205.94975L13.3744%205.59619L13.0208%205.24264ZM25.0416%2017.2635L24.6881%2016.9099L24.3345%2017.2635L24.6881%2017.617L25.0416%2017.2635ZM27.163%2015.1421L27.5165%2014.7886L27.163%2014.435L26.8094%2014.7886L27.163%2015.1421ZM29.2843%2017.2635L29.6378%2017.617L29.9914%2017.2635L29.6378%2016.9099L29.2843%2017.2635ZM27.163%2019.3848L26.8094%2019.7383L27.163%2020.0919L27.5165%2019.7383L27.163%2019.3848ZM15.1421%2027.1629L14.7886%2026.8094L14.435%2027.1629L14.7886%2027.5165L15.1421%2027.1629ZM17.2635%2025.0416L17.617%2024.6881L17.2635%2024.3345L16.9099%2024.6881L17.2635%2025.0416ZM19.3848%2027.1629L19.7383%2027.5165L20.0919%2027.1629L19.7383%2026.8094L19.3848%2027.1629ZM17.2635%2029.2843L16.9099%2029.6378L17.2635%2029.9914L17.617%2029.6378L17.2635%2029.2843ZM1.35355%2013.3744L3.47487%2011.253L2.76777%2010.5459L0.646447%2012.6673L1.35355%2013.3744ZM2.76777%2011.253L4.88909%2013.3744L5.59619%2012.6673L3.47487%2010.5459L2.76777%2011.253ZM4.88909%2012.6673L2.76777%2014.7886L3.47487%2015.4957L5.59619%2013.3744L4.88909%2012.6673ZM3.47487%2014.7886L1.35355%2012.6673L0.646447%2013.3744L2.76777%2015.4957L3.47487%2014.7886ZM11.253%203.47487L13.3744%201.35355L12.6673%200.646445L10.5459%202.76776L11.253%203.47487ZM12.6673%201.35355L14.7886%203.47487L15.4957%202.76776L13.3744%200.646445L12.6673%201.35355ZM14.7886%202.76776L12.6673%204.88909L13.3744%205.59619L15.4957%203.47487L14.7886%202.76776ZM13.3744%204.88909L11.253%202.76776L10.5459%203.47487L12.6673%205.59619L13.3744%204.88909ZM25.3952%2017.617L27.5165%2015.4957L26.8094%2014.7886L24.6881%2016.9099L25.3952%2017.617ZM26.8094%2015.4957L28.9307%2017.617L29.6378%2016.9099L27.5165%2014.7886L26.8094%2015.4957ZM28.9307%2016.9099L26.8094%2019.0312L27.5165%2019.7383L29.6378%2017.617L28.9307%2016.9099ZM27.5165%2019.0312L25.3952%2016.9099L24.6881%2017.617L26.8094%2019.7383L27.5165%2019.0312ZM15.4957%2027.5165L17.617%2025.3952L16.9099%2024.6881L14.7886%2026.8094L15.4957%2027.5165ZM16.9099%2025.3952L19.0312%2027.5165L19.7383%2026.8094L17.617%2024.6881L16.9099%2025.3952ZM19.0312%2026.8094L16.9099%2028.9307L17.617%2029.6378L19.7383%2027.5165L19.0312%2026.8094ZM17.617%2028.9307L15.4957%2026.8094L14.7886%2027.5165L16.9099%2029.6378L17.617%2028.9307ZM2.41421%2013.0208L1.70711%2012.3137L1%2013.0208L1.70711%2013.7279L2.41421%2013.0208ZM4.35876%2014.9654L3.65165%2015.6725L4.35876%2016.3796L5.06586%2015.6725L4.35876%2014.9654ZM5.06586%2014.2582L5.77297%2014.9654L6.48008%2014.2582L5.77297%2013.5511L5.06586%2014.2582ZM5.15425%2011.695L5.86136%2012.4021L6.56847%2011.695L5.86136%2010.9879L5.15425%2011.695ZM4.44715%2010.9879L5.15425%2010.2808L4.44715%209.57367L3.74004%2010.2808L4.44715%2010.9879ZM5.68458%209.75044L4.97748%209.04334L4.27037%209.75044L4.97748%2010.4576L5.68458%209.75044ZM6.39169%2010.4576L5.68458%2011.1647L6.39169%2011.8718L7.0988%2011.1647L6.39169%2010.4576ZM10.4576%206.39169L11.1647%207.09879L11.8718%206.39169L11.1647%205.68458L10.4576%206.39169ZM9.75045%205.68458L10.4576%204.97747L9.75045%204.27037L9.04334%204.97747L9.75045%205.68458ZM10.9879%204.44714L10.2808%203.74004L9.57367%204.44714L10.2808%205.15425L10.9879%204.44714ZM11.695%205.15425L10.9879%205.86136L11.695%206.56846L12.4021%205.86136L11.695%205.15425ZM14.2583%205.06586L13.5511%205.77297L14.2583%206.48008L14.9654%205.77297L14.2583%205.06586ZM14.9654%204.35875L15.6725%205.06586L16.3796%204.35875L15.6725%203.65165L14.9654%204.35875ZM13.0208%202.41421L13.7279%201.7071L13.0208%200.999998L12.3137%201.7071L13.0208%202.41421ZM16.026%205.41942L16.7331%204.71231L16.026%204.0052L15.3189%204.71231L16.026%205.41942ZM15.3189%206.12652L14.6118%205.41942L13.9047%206.12652L14.6118%206.83363L15.3189%206.12652ZM19.208%2010.0156L18.5009%2010.7227L19.208%2011.4298L19.9151%2010.7227L19.208%2010.0156ZM19.9151%209.3085L20.6222%2010.0156L21.3293%209.3085L20.6222%208.6014L19.9151%209.3085ZM20.9758%2010.3692L21.6829%209.66206L20.9758%208.95495L20.2687%209.66206L20.9758%2010.3692ZM20.2687%2011.0763L19.5616%2010.3692L18.8544%2011.0763L19.5616%2011.7834L20.2687%2011.0763ZM24.1577%2014.9654L23.4506%2015.6725L24.1577%2016.3796L24.8649%2015.6725L24.1577%2014.9654ZM24.8649%2014.2582L25.572%2014.9654L26.2791%2014.2582L25.572%2013.5511L24.8649%2014.2582ZM25.9255%2015.3189L26.6326%2014.6118L25.9255%2013.9047L25.2184%2014.6118L25.9255%2015.3189ZM25.2184%2016.026L24.5113%2015.3189L23.8042%2016.026L24.5113%2016.7331L25.2184%2016.026ZM25.13%2018.5893L24.4229%2017.8822L23.7158%2018.5893L24.4229%2019.2964L25.13%2018.5893ZM25.8371%2019.2964L25.13%2020.0035L25.8371%2020.7106L26.5442%2020.0035L25.8371%2019.2964ZM27.8701%2017.2635L28.5772%2017.9706L29.2843%2017.2635L28.5772%2016.5563L27.8701%2017.2635ZM24.5997%2020.5338L25.3068%2021.2409L26.0139%2020.5338L25.3068%2019.8267L24.5997%2020.5338ZM23.8926%2019.8267L24.5997%2019.1196L23.8926%2018.4125L23.1855%2019.1196L23.8926%2019.8267ZM19.8267%2023.8926L19.1196%2023.1855L18.4125%2023.8926L19.1196%2024.5997L19.8267%2023.8926ZM20.5338%2024.5997L19.8267%2025.3068L20.5338%2026.0139L21.2409%2025.3068L20.5338%2024.5997ZM19.2964%2025.8371L20.0035%2026.5442L20.7106%2025.8371L20.0035%2025.13L19.2964%2025.8371ZM18.5893%2025.13L19.2964%2024.4229L18.5893%2023.7158L17.8822%2024.4229L18.5893%2025.13ZM16.026%2025.2184L16.7331%2024.5113L16.026%2023.8042L15.3189%2024.5113L16.026%2025.2184ZM15.3189%2025.9255L14.6118%2025.2184L13.9047%2025.9255L14.6118%2026.6326L15.3189%2025.9255ZM17.2635%2027.8701L16.5563%2028.5772L17.2635%2029.2843L17.9706%2028.5772L17.2635%2027.8701ZM14.2583%2024.8649L13.5511%2025.572L14.2583%2026.2791L14.9654%2025.572L14.2583%2024.8649ZM14.9654%2024.1577L15.6725%2024.8649L16.3796%2024.1577L15.6725%2023.4506L14.9654%2024.1577ZM11.0763%2020.2687L11.7834%2019.5616L11.0763%2018.8544L10.3692%2019.5616L11.0763%2020.2687ZM10.3692%2020.9758L9.66206%2020.2687L8.95495%2020.9758L9.66206%2021.6829L10.3692%2020.9758ZM9.3085%2019.9151L8.6014%2020.6222L9.3085%2021.3293L10.0156%2020.6222L9.3085%2019.9151ZM10.0156%2019.208L10.7227%2019.9151L11.4298%2019.208L10.7227%2018.5009L10.0156%2019.208ZM6.12652%2015.3189L6.83363%2014.6118L6.12652%2013.9047L5.41942%2014.6118L6.12652%2015.3189ZM5.41942%2016.026L4.71231%2015.3189L4.0052%2016.026L4.71231%2016.7331L5.41942%2016.026ZM3.12132%2012.3137L3.82843%2011.6066L3.12132%2010.8995L2.41421%2011.6066L3.12132%2012.3137ZM3.12132%2013.7279L2.41421%2014.435L3.12132%2015.1421L3.82843%2014.435L3.12132%2013.7279ZM12.3137%203.12132L11.6066%202.41421L10.8995%203.12132L11.6066%203.82842L12.3137%203.12132ZM13.7279%203.12132L14.435%203.82842L15.1421%203.12132L14.435%202.41421L13.7279%203.12132ZM27.163%2016.5563L27.8701%2015.8492L27.163%2015.1421L26.4558%2015.8492L27.163%2016.5563ZM27.163%2017.9706L26.4558%2018.6777L27.163%2019.3848L27.8701%2018.6777L27.163%2017.9706ZM16.5563%2027.1629L15.8492%2026.4558L15.1421%2027.1629L15.8492%2027.8701L16.5563%2027.1629ZM17.9706%2027.1629L18.6777%2027.8701L19.3848%2027.1629L18.6777%2026.4558L17.9706%2027.1629ZM5.06586%2015.6725L5.77297%2014.9654L4.35876%2013.5511L3.65165%2014.2582L5.06586%2015.6725ZM5.86136%2010.9879L5.15425%2010.2808L3.74004%2011.695L4.44715%2012.4021L5.86136%2010.9879ZM4.97748%2010.4576L5.68458%2011.1647L7.0988%209.75044L6.39169%209.04334L4.97748%2010.4576ZM11.1647%205.68458L10.4576%204.97747L9.04334%206.39169L9.75045%207.09879L11.1647%205.68458ZM10.2808%205.15425L10.9879%205.86136L12.4021%204.44714L11.695%203.74004L10.2808%205.15425ZM14.9654%205.77297L15.6725%205.06586L14.2583%203.65165L13.5511%204.35875L14.9654%205.77297ZM15.3189%204.71231L14.6118%205.41942L16.026%206.83363L16.7331%206.12652L15.3189%204.71231ZM19.9151%2010.7227L20.6222%2010.0156L19.208%208.6014L18.5009%209.3085L19.9151%2010.7227ZM20.2687%209.66206L19.5616%2010.3692L20.9758%2011.7834L21.6829%2011.0763L20.2687%209.66206ZM24.8649%2015.6725L25.572%2014.9654L24.1577%2013.5511L23.4506%2014.2582L24.8649%2015.6725ZM25.2184%2014.6118L24.5113%2015.3189L25.9255%2016.7331L26.6326%2016.026L25.2184%2014.6118ZM24.4229%2019.2964L25.13%2020.0035L26.5442%2018.5893L25.8371%2017.8822L24.4229%2019.2964ZM25.3068%2019.8267L24.5997%2019.1196L23.1855%2020.5338L23.8926%2021.2409L25.3068%2019.8267ZM19.1196%2024.5997L19.8267%2025.3068L21.2409%2023.8926L20.5338%2023.1855L19.1196%2024.5997ZM20.0035%2025.13L19.2964%2024.4229L17.8822%2025.8371L18.5893%2026.5442L20.0035%2025.13ZM15.3189%2024.5113L14.6118%2025.2184L16.026%2026.6326L16.7331%2025.9255L15.3189%2024.5113ZM14.9654%2025.572L15.6725%2024.8649L14.2583%2023.4506L13.5511%2024.1577L14.9654%2025.572ZM10.3692%2019.5616L9.66206%2020.2687L11.0763%2021.6829L11.7834%2020.9758L10.3692%2019.5616ZM10.0156%2020.6222L10.7227%2019.9151L9.3085%2018.5009L8.6014%2019.208L10.0156%2020.6222ZM5.41942%2014.6118L4.71231%2015.3189L6.12652%2016.7331L6.83363%2016.026L5.41942%2014.6118ZM3.12132%2013.7279L5.15425%2011.695L3.74004%2010.2808L1.70711%2012.3137L3.12132%2013.7279ZM5.06586%2014.2582L3.12132%2012.3137L1.70711%2013.7279L3.65165%2015.6725L5.06586%2014.2582ZM5.77297%2013.5511L4.53553%2012.3137L3.12132%2013.7279L4.35876%2014.9654L5.77297%2013.5511ZM4.53553%2013.7279L5.86136%2012.4021L4.44715%2010.9879L3.12132%2012.3137L4.53553%2013.7279ZM7.0988%2011.1647L11.1647%207.09879L9.75045%205.68458L5.68458%209.75044L7.0988%2011.1647ZM6.39169%2010.4576L10.4576%206.39169L9.04334%204.97747L4.97748%209.04334L6.39169%2010.4576ZM12.4021%205.86136L13.7279%204.53553L12.3137%203.12132L10.9879%204.44714L12.4021%205.86136ZM12.3137%204.53553L13.5511%205.77297L14.9654%204.35875L13.7279%203.12132L12.3137%204.53553ZM12.3137%203.12132L14.2583%205.06586L15.6725%203.65165L13.7279%201.7071L12.3137%203.12132ZM11.695%205.15425L13.7279%203.12132L12.3137%201.7071L10.2808%203.74004L11.695%205.15425ZM14.6118%206.83363L18.5009%2010.7227L19.9151%209.3085L16.026%205.41942L14.6118%206.83363ZM15.3189%206.12652L19.208%2010.0156L20.6222%208.6014L16.7331%204.71231L15.3189%206.12652ZM19.5616%2011.7834L23.4506%2015.6725L24.8649%2014.2582L20.9758%2010.3692L19.5616%2011.7834ZM20.2687%2011.0763L24.1577%2014.9654L25.572%2013.5511L21.6829%209.66206L20.2687%2011.0763ZM24.5113%2016.7331L25.7487%2017.9706L27.163%2016.5563L25.9255%2015.3189L24.5113%2016.7331ZM25.7487%2016.5563L24.4229%2017.8822L25.8371%2019.2964L27.163%2017.9706L25.7487%2016.5563ZM27.163%2016.5563L25.13%2018.5893L26.5442%2020.0035L28.5772%2017.9706L27.163%2016.5563ZM25.2184%2016.026L27.163%2017.9706L28.5772%2016.5563L26.6326%2014.6118L25.2184%2016.026ZM23.1855%2019.1196L19.1196%2023.1855L20.5338%2024.5997L24.5997%2020.5338L23.1855%2019.1196ZM23.8926%2019.8267L19.8267%2023.8926L21.2409%2025.3068L25.3068%2021.2409L23.8926%2019.8267ZM17.8822%2024.4229L16.5563%2025.7487L17.9706%2027.1629L19.2964%2025.8371L17.8822%2024.4229ZM17.9706%2025.7487L16.7331%2024.5113L15.3189%2025.9255L16.5563%2027.1629L17.9706%2025.7487ZM17.9706%2027.1629L16.026%2025.2184L14.6118%2026.6326L16.5563%2028.5772L17.9706%2027.1629ZM18.5893%2025.13L16.5563%2027.1629L17.9706%2028.5772L20.0035%2026.5442L18.5893%2025.13ZM15.6725%2023.4506L11.7834%2019.5616L10.3692%2020.9758L14.2583%2024.8649L15.6725%2023.4506ZM14.9654%2024.1577L11.0763%2020.2687L9.66206%2021.6829L13.5511%2025.572L14.9654%2024.1577ZM10.7227%2018.5009L6.83363%2014.6118L5.41942%2016.026L9.3085%2019.9151L10.7227%2018.5009ZM10.0156%2019.208L6.12652%2015.3189L4.71231%2016.7331L8.6014%2020.6222L10.0156%2019.208ZM3.12132%2013.7279L3.82843%2013.0208L2.41421%2011.6066L1.70711%2012.3137L3.12132%2013.7279ZM3.82843%2013.0208L3.12132%2012.3137L1.70711%2013.7279L2.41421%2014.435L3.82843%2013.0208ZM3.12132%2012.3137L2.41421%2013.0208L3.82843%2014.435L4.53553%2013.7279L3.12132%2012.3137ZM2.41421%2013.0208L3.12132%2013.7279L4.53553%2012.3137L3.82843%2011.6066L2.41421%2013.0208ZM13.0208%203.82842L13.7279%203.12132L12.3137%201.7071L11.6066%202.41421L13.0208%203.82842ZM13.7279%203.12132L13.0208%202.41421L11.6066%203.82842L12.3137%204.53553L13.7279%203.12132ZM13.0208%202.41421L12.3137%203.12132L13.7279%204.53553L14.435%203.82842L13.0208%202.41421ZM12.3137%203.12132L13.0208%203.82842L14.435%202.41421L13.7279%201.7071L12.3137%203.12132ZM27.163%2017.9706L27.8701%2017.2635L26.4558%2015.8492L25.7487%2016.5563L27.163%2017.9706ZM27.8701%2017.2635L27.163%2016.5563L25.7487%2017.9706L26.4558%2018.6777L27.8701%2017.2635ZM27.163%2016.5563L26.4558%2017.2635L27.8701%2018.6777L28.5772%2017.9706L27.163%2016.5563ZM26.4558%2017.2635L27.163%2017.9706L28.5772%2016.5563L27.8701%2015.8492L26.4558%2017.2635ZM17.2635%2027.8701L17.9706%2027.1629L16.5563%2025.7487L15.8492%2026.4558L17.2635%2027.8701ZM17.9706%2027.1629L17.2635%2026.4558L15.8492%2027.8701L16.5563%2028.5772L17.9706%2027.1629ZM17.2635%2026.4558L16.5563%2027.1629L17.9706%2028.5772L18.6777%2027.8701L17.2635%2026.4558ZM16.5563%2027.1629L17.2635%2027.8701L18.6777%2026.4558L17.9706%2025.7487L16.5563%2027.1629Z'%20fill='white'%20mask='url(%23path-3-outside-1_1838_531)'/%3e%3c/svg%3e"}}},uSt={name:"anchor-synchronization",i18n:{de:Tj,en:Lj,es:Rj,fr:_j,it:Fj},i18nTokenPrefix:"viewer2d-background",addToWindows:["2d"],component:Dj,anchorSynchronization:!0,button:{tooltip:"viewer2d-background.tooltip-anchor-synchronization",position:"right",content:"free",keepOpen:!0,icon:{imgUri:"data:image/svg+xml,%3csvg%20width='23'%20height='23'%20viewBox='0%200%2023%2023'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.41394%209.62621L11.4418%2013.8807L18.5438%209.5459L21.4788%2011.2012L11.4522%2017.3112L1.47266%2011.2795L4.41394%209.62621Z'%20fill='%232F374A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11.4418%2017.9342L4.41439%2013.6799L1.47266%2015.3335L11.4522%2021.3651L21.4788%2015.2552L18.5433%2013.5996L11.4418%2017.9342ZM18.5621%2014.6894L11.4438%2019.0342L4.39683%2014.7681L3.33862%2015.3629L11.4502%2020.2656L19.621%2015.2865L18.5621%2014.6894Z'%20fill='%232F374A'/%3e%3crect%20x='17.7969'%20width='5.07596'%20height='1.00266'%20fill='%232F374A'/%3e%3crect%20x='22.873'%20width='5.07596'%20height='1.00266'%20transform='rotate(90%2022.873%200)'%20fill='%232F374A'/%3e%3crect%20x='22.873'%20y='17.9229'%20width='5.07596'%20height='1.00266'%20transform='rotate(90%2022.873%2017.9229)'%20fill='%232F374A'/%3e%3crect%20x='22.873'%20y='23'%20width='5.07596'%20height='1.00266'%20transform='rotate(-180%2022.873%2023)'%20fill='%232F374A'/%3e%3crect%20width='5.07596'%20height='1.00266'%20transform='matrix(-1%200%200%201%205.07617%200)'%20fill='%232F374A'/%3e%3crect%20width='5.07596'%20height='1.00266'%20transform='matrix(4.37114e-08%201%201%20-4.37114e-08%200%200)'%20fill='%232F374A'/%3e%3crect%20width='5.07596'%20height='1.00266'%20transform='matrix(4.37114e-08%201%201%20-4.37114e-08%200%2017.9229)'%20fill='%232F374A'/%3e%3crect%20width='5.07596'%20height='1.00266'%20transform='matrix(1%20-8.74228e-08%20-8.74228e-08%20-1%200%2023)'%20fill='%232F374A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.39866%202.7199L11.5619%201.50391L13.5913%202.64842L11.4369%203.89253L9.39866%202.7199ZM8.62875%203.15267L6.70871%204.23195L8.78367%205.42476L10.6773%204.33121L8.62875%203.15267ZM5.9388%204.66472L4.10291%205.6967L6.21181%206.90997L8.02403%205.86344L5.9388%204.66472ZM3.33301%206.12947L1.47266%207.1752L3.56388%208.43912L5.45218%207.34865L3.33301%206.12947ZM4.27628%208.8697L6.10371%209.97419L8.05507%208.84612L6.18256%207.76885L4.27628%208.8697ZM6.8161%2010.4048L8.69738%2011.5418L10.7132%2010.3754L8.78542%209.2663L6.8161%2010.4048ZM9.40976%2011.9723L11.4522%2013.2068L13.4834%2011.9691L11.4435%2010.7955L9.40976%2011.9723ZM14.2226%2011.5186L15.989%2010.4422L14.0152%209.3075L12.2024%2010.3564L14.2226%2011.5186ZM16.7282%209.99177L18.5679%208.87073L16.6635%207.77511L14.7741%208.86839L16.7282%209.99177ZM19.3071%208.42029L21.4788%207.09686L19.6339%206.05634L17.4224%207.336L19.3071%208.42029ZM18.8963%205.64036L16.9533%204.54452L14.767%205.80837L16.692%206.91583L18.8963%205.64036ZM16.2157%204.12853L14.3289%203.06443L12.1673%204.31273L14.0367%205.38819L16.2157%204.12853ZM14.0078%206.24727L15.9331%207.35494L14.0434%208.44839L12.1165%207.34065L14.0078%206.24727ZM11.3572%207.77956L13.2846%208.8875L11.4721%209.93625L9.54466%208.82739L11.3572%207.77956ZM8.8143%208.40721L10.6266%207.35954L8.75469%206.28347L6.94219%207.33017L8.8143%208.40721ZM11.3858%206.92063L13.2774%205.8271L11.4077%204.7514L9.51433%205.84479L11.3858%206.92063Z'%20fill='%232F374A'/%3e%3c/svg%3e"}}},ASt={},hSt={width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function pSt(e,t){return k(),N("svg",hSt,[...t[0]||=[Sn('<path fill-rule="evenodd" clip-rule="evenodd" d="M3.28121 7.15444L8.50434 10.3164L13.7826 7.09473L15.964 8.325L8.51215 12.866L1.09521 8.38321L3.28121 7.15444Z" fill="#2F374A"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M8.50364 13.3289L3.28081 10.1671L1.09448 11.3961L8.51142 15.8788L15.9633 11.3379L13.7816 10.1074L8.50364 13.3289ZM13.7956 10.9174L8.50513 14.1465L3.26776 10.9759L2.48129 11.418L8.50993 15.0616L14.5825 11.3612L13.7956 10.9174Z" fill="#2F374A"></path><rect x="13.2275" width="3.77251" height="0.745187" fill="#2F374A"></rect><rect x="16.9998" width="3.77251" height="0.745187" transform="rotate(90 16.9998 0)" fill="#2F374A"></rect><rect x="17" y="13.3203" width="3.77251" height="0.745187" transform="rotate(90 17 13.3203)" fill="#2F374A"></rect><rect x="16.9998" y="17.0938" width="3.77251" height="0.745187" transform="rotate(-180 16.9998 17.0938)" fill="#2F374A"></rect><rect width="3.77251" height="0.745187" transform="matrix(-1 0 0 1 3.77246 0)" fill="#2F374A"></rect><rect width="3.77251" height="0.745187" transform="matrix(4.37114e-08 1 1 -4.37114e-08 0 0)" fill="#2F374A"></rect><rect width="3.77251" height="0.745187" transform="matrix(4.37114e-08 1 1 -4.37114e-08 0.000244141 13.3203)" fill="#2F374A"></rect><rect width="3.77251" height="0.745187" transform="matrix(1 -8.74228e-08 -8.74228e-08 -1 0.000244141 17.0938)" fill="#2F374A"></rect><path fill-rule="evenodd" clip-rule="evenodd" d="M6.9851 2.02194L8.59292 1.11816L10.1013 1.96887L8.50013 2.89355L6.9851 2.02194ZM6.4129 2.34358L4.986 3.14566L6.52829 4.03226L7.93556 3.21958L6.4129 2.34358ZM4.4138 3.4673L3.04956 4.23416L4.61708 5.13596L5.96372 4.35829L4.4138 3.4673ZM2.47736 4.5558L1.09448 5.33313L2.64886 6.27259L4.05251 5.46199L2.47736 4.5558ZM3.17832 6.59259L4.53651 7.41348L5.98703 6.57494L4.59533 5.77429L3.17832 6.59259ZM5.06597 7.73348L6.46392 8.57839L7.96234 7.71136L6.52984 6.88722L5.06597 7.73348ZM6.99336 8.89839L8.51142 9.81589L10.0212 8.89585L8.50513 8.02363L6.99336 8.89839ZM10.5706 8.56108L11.8832 7.76118L10.4162 6.91783L9.06914 7.69728L10.5706 8.56108ZM12.4326 7.42641L13.7998 6.59331L12.3843 5.779L10.9802 6.59148L12.4326 7.42641ZM14.3491 6.25853L15.9633 5.27491L14.592 4.50155L12.9483 5.45264L14.3491 6.25853ZM14.0439 4.19239L12.6 3.37809L10.9751 4.31743L12.4056 5.14037L14.0439 4.19239ZM12.0518 3.06892L10.6495 2.27805L9.04295 3.20584L10.4323 4.00515L12.0518 3.06892ZM10.4108 4.64363L11.8415 5.46672L10.4372 6.27933L9.00528 5.45618L10.4108 4.64363ZM8.44101 5.78238L9.87318 6.60568L8.52635 7.385L7.09411 6.56102L8.44101 5.78238ZM6.5513 6.24874L7.89799 5.47022L6.50676 4.67046L5.1599 5.44826L6.5513 6.24874ZM8.46227 5.14402L9.86804 4.33135L8.47838 3.53187L7.07133 4.34443L8.46227 5.14402Z" fill="#2F374A"></path>',11)]])}var fSt=Q(ASt,[["render",pSt]]),gSt={class:"bimdata-anchor-synchronization__header"},mSt={class:"bimdata-anchor-synchronization__header__texts"},vSt={class:"bimdata-anchor-synchronization__header__texts__title"},ySt={class:"bimdata-anchor-synchronization__header__buttons"},wSt=Q({__name:"AnchorSynchronizationHeader",setup(e){let t=bt("$viewer"),i=bt("state"),o=bt("service"),r=je(()=>i.allAnchorsValidated),n=pe(!1),a=null;t.globalContext.hub.once("anchor-synchronization:open",(c=null)=>{a=c},{getLastEvent:!0});let s=()=>{t.globalContext.layout=a},l=async()=>{n.value=!0,await o.saveAnchors(),t.globalContext.layout=a};return(c,d)=>{let u=I("BIMDataButton"),A=I("BIMDataSpinner");return k(),N("div",gSt,[w("div",mSt,[T(fSt,{class:"m-x-6"}),w("span",vSt,G(c.$t("anchor-synchronization-window.title")),1)]),w("div",ySt,[T(u,{color:"high",fill:"",radius:"",class:"m-x-6",width:"120px",onClick:s},{default:j(()=>[nt(G(c.$t("global.cancel")),1)]),_:1}),T(u,{color:"primary",fill:"",radius:"",class:"m-x-6",width:"120px",disabled:!r.value,onClick:l},{default:j(()=>[n.value?(k(),W(A,{key:0})):(k(),N(ut,{key:1},[nt(G(c.$t("global.done")),1)],64))]),_:1},8,["disabled"])])])}}},[["__scopeId","data-v-a7ce6c34"]]),bSt={class:"anchor-content"},CSt={class:"anchor-label"},j8={__name:"Anchor",props:{position:{type:Object,default:null},isSecondAnchor:{type:Boolean,default:!1},color:{type:String,default:"#FF9100"}},emits:["change","validate"],setup(e,{emit:t}){let i=e,o={x:i.isSecondAnchor?"70px":"20px",y:"90%"},r=je(()=>i.position?{x:i.position.x+"px",y:i.position.y+"px"}:o),n=t,a=pe(!1),s=pe(null);function l(u){a.value=!0,s.value?.setPointerCapture(u.pointerId),u.preventDefault()}function c(u){if(!a.value)return;let A=i.position;if(!A){let{x:h,y:p}=s.value.getBoundingClientRect(),{x:f,y:m}=s.value.parentElement.getBoundingClientRect();A={x:h-f+15,y:p-m+51}}n("change",{x:A.x+u.movementX,y:A.y+u.movementY})}function d(u){a.value&&s.value&&s.value?.releasePointerCapture(u.pointerId),a.value=!1,n("validate")}return $i(()=>{a.value=!1}),(u,A)=>(k(),N("div",{class:"bimdata-anchor-synchronization__anchor",style:ve({left:r.value.x,top:r.value.y,color:e.color,cursor:a.value?"none":"grab"}),onPointerdown:l,onPointermove:c,onPointerup:d,ref_key:"anchorElement",ref:s},[w("div",bSt,[A[0]||=w("svg",{width:"30",height:"60",viewBox:"0 0 30 60",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[w("rect",{x:"14",y:"42",width:"2",height:"18",fill:"currentColor"}),w("rect",{x:"24",y:"50",width:"2",height:"18",transform:"rotate(90 24 50)",fill:"currentColor"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 14.3929C0 6.43566 6.70714 0 15 0C23.2929 0 30 6.43566 30 14.3929C30 25.1875 15 41.1224 15 41.1224C15 41.1224 0 25.1875 0 14.3929ZM9.64274 14.3932C9.64274 17.2307 12.0427 19.5335 14.9999 19.5335C17.957 19.5335 20.357 17.2307 20.357 14.3932C20.357 11.5558 17.957 9.25293 14.9999 9.25293C12.0427 9.25293 9.64274 11.5558 9.64274 14.3932Z",fill:"currentColor"})],-1),w("div",CSt,G(e.isSecondAnchor?2:1),1)])],36))}},j$=(e,t)=>({x:(e.x+t.x)/2,y:(e.y+t.y)/2}),Q$=(e,t)=>Math.hypot(t.x-e.x,t.y-e.y),z$=(e,t)=>Math.atan2(t.y-e.y,t.x-e.x),xSt=(e,t)=>({x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t)});function q$(e){let{anchorA1Position:t,anchorA2Position:i,anchorB1Position:o,anchorB2Position:r,model:n,modelToSynchronize:a}=e;if(!n||!a)throw Error("[BIMDataViewer - AnchorSynchronization] Models are mandatory to calculate transform.");let{translate:s,rotate:l,scale:c}=a.transform??QV.IDENTITY,d=Q$(t,i)/Q$(o,r)*c,u=z$(t,i),A=(z$(o,r)-u)*(180/Math.PI)*-1,h=l+A,p=j$(t,i),f=j$(o,r),m=xSt({x:f.x-s[0],y:f.y-s[1]},A*Math.PI/180),g={x:m.x/c*d,y:m.y/c*d};return{scale:d,rotate:h,translate:[p.x-g.x,p.y-g.y,0]}}var BSt={class:"bimdata-viewer-ifc-2d",ref:"canvasContainer"},kSt=Q({__name:"ViewerIfc2D",props:{model:{type:Object,default:null},storeyIndex:{type:Number,default:0}},emits:["camera-update"],setup(e,{expose:t,emit:i}){let o=e,r=i,n=bt("$viewer"),a=bt("state"),s=pe(null),l=null,c=null,d=null,{promise:u,resolve:A,reject:h}=Promise.withResolvers(),p=()=>{c=d1({canvas:s.value}),c.styles.default.lineWidth=.01,c.settings.rotateSpeed=.05,c.settings.snapMargin=.04,c.settings.minScale=10,c.textureManager.textureMatrix.scale(.01,.01);let{camera:y}=c;y.on("update",()=>{r("camera-update",y)});let v={engine:c,viewer:c,$viewer:n};l=R5(v),d=new EB(v)};Di(()=>{try{p()}catch(y){h(y)}A()});let f=(y,v)=>{let C=y.storeys[v];if(!C)return;let x=C.objects.map(B=>String(B.id));c.scene.showObjects(x)},m=async y=>{await u,await l(y.map_file,y.id);let v=c.scene.objects.map(C=>C.id);if(c.scene.hideObjects(v),f(y,o.storeyIndex),y.recommanded_2d_angle!==void 0){let C=c.camera.rotation;c.camera.rotate(-C-y.recommanded_2d_angle)}c.camera.fitView()};xt(()=>o.model,async y=>{y&&await m(y)},{immediate:!0});let g=!1;return t({getWorldPosition(y){return c.camera.getPosition(y)},get canvas(){return s.value},async showPlan(y){if(g)return;let v=await d.showPlan(y),C=v.mask?.crop_path,x={opacity:.5,crop_path:C};v.tempMask=x,g=!0;let B={translate:[v.x,v.y],scale:v.scale,rotate:v.angle},{anchorA1Position:E,anchorA2Position:D,anchorB1Position:P,anchorB2Position:M}=Ef(a);xt([E,D,P,M],()=>{let R=q$(a);C?.length>0&&(x.crop_path=Rg(Rg(C,B,{inverse:!0}),R)),v.x=R.translate[0],v.y=R.translate[1],v.scale=R.scale,v.angle=R.rotate},{immediate:!0})}}),(y,v)=>(k(),N("div",BSt,[w("canvas",{ref_key:"canvasElement",ref:s,style:{width:"100%",height:"100%",position:"absolute"}},null,512)],512))}},[["__scopeId","data-v-c0725497"]]),ESt={__name:"ViewerImage",props:{model:{type:Object,default:null}},emits:["camera-update"],setup(e,{expose:t,emit:i}){let o=e,r=i,n=()=>{let{camera:d}=a.value.viewer;d.on("update",()=>{r("camera-update",d)})},a=pe(null),{promise:s,resolve:l}=Promise.withResolvers();xt(()=>o.model,async d=>{await s,d&&(a.value.loadModels([d]),a.value.viewer.renderer.offset.dx===0&&a.value.viewer.renderer.offset.dy===0&&(a.value.viewer.renderer.offset={dx:-d.transform.translate[0],dy:-d.transform.translate[1]}))},{immediate:!0}),Di(()=>{l()});let c=ko({get loadedModels(){return o.model?[o.model]:[]},get selectedStorey(){return null}});return t({getWorldPosition(d){return a.value.engine.camera.getPosition(d)},get canvas(){return a.value.engine.canvas}}),(d,u)=>(k(),W(Th,{ref_key:"viewerPlan",ref:a,stateContext:c,onMounted:n},null,8,["stateContext"]))}},MSt={class:"bimdata-anchor-synchronization__viewer"},PSt={class:"viewer-container-A"},ISt={class:"viewer-container-B"},SSt=Q({__name:"AnchorSynchronizationViewer",setup(e,{expose:t}){let i=pe(null),o=pe(null),r=bt("state"),n=(C,x)=>{x.preventDefault();let B=C==="A"?i.value:o.value;B&&_B(B.canvas)(x)},a=pe(null),s=pe(null),l=pe(null),c=pe(null),d={anchorA1Position:a,anchorA2Position:s,anchorB1Position:l,anchorB2Position:c},u=(C,x)=>{(C==="A"?["anchorA1Position","anchorA2Position"].filter(B=>d[B].value!==null):["anchorB1Position","anchorB2Position"].filter(B=>d[B].value!==null)).forEach(B=>{let E=r[B];d[B].value=x.getCanvasPosition(E)})},A=(C,x)=>{let B=C.startsWith("A")?i.value:o.value,E=`anchor${C}Position`;r[E]=B.getWorldPosition(x),d[E].value=x},h=Ui(null),p=pe(0),f=Ui(null),m=xt(()=>r.allAnchorsValidated,C=>{if(!C)return;let x={plan:f.value,storey:{}};i.value.showPlan(x),m()}),g=C=>{if(!C)return null;let x=C.type;switch(x){case"IFC":return kSt;case"PNG":case"JPEG":case"PDF":case"PHOTOSPHERE":return ESt;default:throw Error(`[BIMData AnchorSynchronizationViewer] Unsupported model type: ${x}`)}},y=async(C,x,B)=>{h.value=C;let E=C.storeys.findIndex(D=>D.uuid===x.uuid);if(E===-1)throw Error("[BIMData AnchorSynchronizationViewer] Storey not found in main model.");p.value=E,f.value=B},v=()=>{r.allAnchorsValidated||a.value&&s.value&&l.value&&c.value&&(r.allAnchorsValidated=!0)};return t({synchronize:y}),(C,x)=>(k(),N("div",MSt,[w("div",PSt,[(k(),W(qr(g(h.value)??"div"),{model:h.value,ref_key:"viewerA",ref:i,onCameraUpdate:x[0]||=B=>u("A",B),storeyIndex:p.value},null,40,["model","storeyIndex"])),h.value?(k(),N(ut,{key:0},[T(j8,{onChange:x[1]||=B=>A("A1",B),onValidate:v,position:a.value,onWheel:x[2]||=B=>n("A",B)},null,8,["position"]),T(j8,{onChange:x[3]||=B=>A("A2",B),onValidate:v,position:s.value,onWheel:x[4]||=B=>n("A",B),isSecondAnchor:!0},null,8,["position"])],64)):le("",!0)]),w("div",ISt,[(k(),W(qr(g(f.value)??"div"),{model:f.value,ref_key:"viewerB",ref:o,onCameraUpdate:x[5]||=B=>u("B",B)},null,40,["model"])),f.value?(k(),N(ut,{key:0},[T(j8,{onChange:x[6]||=B=>A("B1",B),onValidate:v,position:l.value,onWheel:x[7]||=B=>n("B",B)},null,8,["position"]),T(j8,{onChange:x[8]||=B=>A("B2",B),onValidate:v,position:c.value,onWheel:x[9]||=B=>n("B",B),isSecondAnchor:!0},null,8,["position"])],64)):le("",!0)])]))}},[["__scopeId","data-v-3947e679"]]),DSt=class{state;$viewer;constructor(e,t){this.$viewer=e,this.state=t}async saveAnchors(){let{state:e}=this.$viewer,{model:t,storey:i,modelToSynchronize:o}=this.state;if(!t||!o||!i)throw Error("[BIMDataViewer - AnchorSynchronization] Models and storey are mandatory to save anchors.");let r=q$(this.state),n=i.plans.find(a=>a.plan.id===o.id);try{if(n){let a={...o.transform};n.plan.transform=r,await e.updatePlan(n,a)}else await e.createPlan(t,i,o.document,r)}catch(a){throw console.error("[BIMDataViewer - Anchor Synchronization Service] Failed to save anchors:",a),a}}},TSt=class{model=null;storey=null;modelToSynchronize=null;anchorA1Position=null;anchorA2Position=null;anchorB1Position=null;anchorB2Position=null;allAnchorsValidated=!1;constructor(){return ko(this)}},LSt={components:{AnchorSynchronizationHeader:wSt,AnchorSynchronizationViewer:SSt},setup(){let e=pe(null),t=new TSt;return pr("state",t),pr("service",new DSt(bt("$viewer"),t)),{viewer:e,synchronize:(i,o,r)=>(t.model=i,t.storey=o,t.modelToSynchronize=r,e.value.synchronize(i,o,r)),positioned:pe(!1)}}},RSt={class:"bimdata-anchor-synchronization"};function _St(e,t,i,o,r,n){let a=I("AnchorSynchronizationHeader"),s=I("AnchorSynchronizationViewer");return k(),N("div",RSt,[T(a,{valid:o.positioned},null,8,["valid"]),T(s,{class:"bimdata-anchor-synchronization__content__viewer",ref:"viewer",onPositioned:t[0]||=l=>o.positioned=!0})])}var FSt={name:"anchor-synchronization-window",i18n:{en:{title:"Synchronization"},fr:{title:"Synchronisation"}},component:Q(LSt,[["render",_St],["__scopeId","data-v-7f15ad3b"]]),window:{name:"anchor-synchronization",header:!1,displayedInWindowSelector:!1,multiModel:!1}},USt={name:"PointCloudViewer",components:{Annotations:OW},data(){let{settings:e}=this.$plugin;return{settings:e,canvasId:null,spinnerCanvasId:null,xeokitCreated:!1,loadedModels:[],tilesets:new Map,sensitivity:200,fov:90,annotationMode:!1,modelHeaderShown:e.modelLoader!=="hidden",navCubeVisible:e.navCube!==!1,loading:!1}},watch:{sensitivity(e){this.tilesetLoaderPlugin&&(this.tilesetLoaderPlugin.sensitivity=e)},fov(e){this.xeokit.camera.perspective.fov=e}},created(){this.spinnerCanvasId=`spinner-canvas-id-${this.$viewer.localContext.id}-${this.$viewer.instanceId}`,this.xeokitSdk=Md},mounted(){let e=new wJ({canvasElement:this.$refs["bimdata-xeokit-canvas"],transparent:!0,spinnerElementId:this.spinnerCanvasId,backgroundColorFromAmbientLight:!1});e.cameraControl.doublePickFlyTo=!1,e.cameraControl.panRightClick=!1,e.cameraControl.followPointer=!0,e.cameraControl.smartPivot=!0,this.settings.pivotMarker!==!1&&e.cameraControl.enablePivotSphere({size:1,color:[.25,.25,.25]}),e.cameraControl.touchDollyRate=1,e.cameraControl.mouseWheelDollyRate=60,e.cameraControl.keyboardDollyRate=20,e.cameraControl.dragRotationRate=450,e.cameraControl.rotationInertia=0,e.cameraControl.dollyInertia=0,e.camera.perspective.near=.1,e.camera.perspective.far=1e3,e.camera.ortho.near=.1,e.camera.ortho.far=1e3,this.bcfViewpointsPlugin=new q6(e,{originatingSystem:"BIMDataViewer/v1.0",authoringTool:"BIMData.io"}),this.distanceMeasurementsPlugin=new MJ(e,{defaultAxisVisible:!1,container:this.$el,zIndex:0}),this.angleMeasurementsPlugin=new N6(e,{container:this.$el,zIndex:0}),this.tilesetLoaderPlugin=new FW(e,{sensitivity:this.sensitivity,debugMode:!1}),this.navCubeVisible&&(this.navCube=new ZM(e,{canvasElement:this.$refs["bimdata-xeokit-navcube-canvas"],visible:!1,cameraFly:!0,cameraFitFOV:45,cameraFlyDuration:.5,color:"#FFFFFF"})),this.xeokit=e,this.xeokitCreated=!0,window.xeokitPointCloud=this.xeokit},beforeUnmount(){this.xeokit?.destroy()},methods:{async loadModels(e){this.loading=!0,this.loadedModels.push(...e.filter(n=>!this.loadedModels.some(a=>a.id===n.id)));let{apiUrl:t,cloudId:i,projectId:o,accessToken:r}=this.$viewer.api;e.forEach(async(n,a)=>{try{this.$viewer.localContext.loadingProcessStart();let s=await(await fetch(`${t}/cloud/${i}/project/${o}/model/${n.id}/tileset?tile_format=xkt`,{headers:new Headers({Authorization:`Bearer ${r}`})})).json();s.name=String(n.id);let l=this.tilesetLoaderPlugin.load(s);this.tilesets.set(n,l);let c={model:n,plugin:this};this.$viewer.localContext.hub.emit("pointcloud-model-loaded",c),this.$viewer.globalContext.hub.emit("pointcloud-model-loaded",c),a===0&&!this.viewpointPending&&this.xeokit.cameraFlight.flyTo()}catch(s){console.error("Error while loading Tileset ",n.id,"with error: ",s),this.loadedModels=this.loadedModels.filter(l=>l.id!==n.id)}finally{this.$viewer.localContext.loadingProcessEnd(),this.loading=!1}}),this.loadedModels.length>0&&this.navCube?.setVisible(!0)},unloadModels(e){let t=e.map(i=>this.tilesets.get(i)).filter(Boolean);e.forEach(i=>this.tilesets.delete(i)),t.forEach(i=>i.destroy()),this.loadedModels=this.loadedModels.filter(i=>!e.find(o=>o.id===i.id)),e.forEach(i=>{let o={model:i,plugin:this};this.$viewer.localContext.hub.emit("pointcloud-model-unloaded",o),this.$viewer.globalContext.hub.emit("pointcloud-model-unloaded",o)}),this.loadedModels.length===0&&this.navCube?.setVisible(!1)},fitView(){this.xeokit.cameraFlight.flyTo()},async getSnapshot(){return{snapshot_type:"png",snapshot_data:await this.xeokit.getSnapshotWithPlugins({format:"png"})}},getViewpoint(){let e=this.bcfViewpointsPlugin.getViewpoint({snapshot:!1});return e.order=2,e.originating_system="pointCloud",e.models=this.$viewer.localContext.loadedModels.map(t=>t.id),e},async setViewpoint(e,{immediate:t=!1,duration:i=.3}={}){if(this.loading){this.viewpointPending=!0;let o=null;await new Promise(r=>{o=this.$watch("loading",n=>{n||r()},{immediate:!0})}),o(),this.viewpointPending=!1}await new Promise(o=>setTimeout(o,200)),this.bcfViewpointsPlugin.setViewpoint(e,{rayCast:!1,immediate:t,duration:i})},startAnnotationMode(e){if(this.annotationMode)return;this.annotationMode=!0;let t=this.xeokit.scene.canvas.canvas;this.canvasCursor=t.style.cursor,t.style.cursor="copy",this.annotationListener=this.xeokit.scene.input.on("mouseclicked",i=>{let o=this.xeokit.scene.pick({pickSurface:!0,canvasPos:i});if(o){let[r,n,a]=o.worldPos;e({x:r,y:a,z:n,models:this.$viewer.localContext.loadedModels})}})},stopAnnotationMode(){this.annotationMode&&(this.annotationMode=!1,this.xeokit.scene.canvas.canvas.style.cursor=this.canvasCursor,this.xeokit.scene.input.off(this.annotationListener))},showUI(){this.modelHeaderShown=this.settings.modelLoader!=="hidden",this.navCubeVisible=this.settings.navCube!==!1},hideUI(){this.modelHeaderShown=!1,this.navCubeVisible=!1}}},OSt={class:"bimdata-viewer-point-cloud"},NSt={ref:"header",class:"bimdata-viewer-point-cloud__header"},HSt={ref:"bimdata-xeokit-navcube-canvas",class:"bimdata-viewer-point-cloud__nav-cube"},VSt=["id"];function jSt(e,t,i,o,r,n){let a=I("NoModelWindowPlaceHolder"),s=I("ModelsLoader"),l=I("Annotations");return k(),N("div",OSt,[r.loadedModels.length===0?(k(),W(a,{key:0})):le("",!0),w("div",NSt,[r.settings.modelLoader==="disabled"?le("",!0):Tt((k(),W(s,{key:0,"window-positioning":!1,preview:""},null,512)),[[ui,r.modelHeaderShown]])],512),w("canvas",{ref:"bimdata-xeokit-canvas",class:"bimdata-viewer-point-cloud__viewer",onWheel:t[0]||=Dt(()=>{},["prevent"])},null,544),r.xeokitCreated?(k(),W(l,{key:1})):le("",!0),Tt(w("canvas",HSt,null,512),[[ui,r.navCubeVisible]]),w("div",{id:r.spinnerCanvasId},null,8,VSt)])}var QSt={name:"pointCloud",isViewer:!0,component:Q(USt,[["render",jSt],["__scopeId","data-v-b7df122c"]]),window:{name:"pointCloud",label:"pointCloud.window_label",header:!1,logoAndVersion:!0,plugins:["fullscreen","measure3d"],icon:{imgUri:"data:image/svg+xml,%3csvg%20width='29'%20height='28'%20viewBox='0%200%2029%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5.61725%209.64469L13.0214%202.20528L13.03%207.28128L13.034%209.63208L5.61725%209.64469ZM25.4847%202.79589C25.4821%201.25822%2024.2376%200.00224431%2022.702%200.00485529L11.5341%200.0238442L3.17246%208.42535L3.20099%2025.1999C3.2036%2026.7375%204.46169%2027.9935%205.99771%2027.9909L22.7635%2027.9624C24.2991%2027.9598%2025.5393%2026.6996%2025.5367%2025.1619L25.4847%202.79589Z'%20fill='%232F374A'/%3e%3crect%20y='12.1958'%20width='28.001'%20height='14.6092'%20rx='1'%20transform='rotate(-0.097421%200%2012.1958)'%20fill='%23E544FF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.1933%2014.0615C13.3783%2014.0615%2013.5282%2013.9114%2013.5282%2013.7262C13.5282%2013.541%2013.3783%2013.3909%2013.1933%2013.3909C13.0083%2013.3909%2012.8584%2013.541%2012.8584%2013.7262C12.8584%2013.9114%2013.0084%2014.0615%2013.1933%2014.0615ZM11.8911%2014.7695C11.8911%2014.9547%2011.7411%2015.1048%2011.5562%2015.1048C11.3712%2015.1048%2011.2213%2014.9547%2011.2213%2014.7695C11.2213%2014.5843%2011.3712%2014.4341%2011.5562%2014.4341C11.7411%2014.4341%2011.8911%2014.5843%2011.8911%2014.7695ZM15.9351%2014.4664C15.78%2014.412%2015.6101%2014.4938%2015.5558%2014.6492C15.5014%2014.8045%2015.5831%2014.9746%2015.7382%2015.0291L18.6786%2016.1209L14.4692%2018.42L11.3925%2017.3811C11.2367%2017.3285%2011.0678%2017.4123%2011.0153%2017.5683C10.9627%2017.7243%2011.0464%2017.8934%2011.2022%2017.946L14.1997%2018.9582L14.1997%2024.8387L11.4366%2023.8296C11.2821%2023.7732%2011.1112%2023.8529%2011.0549%2024.0075C10.9986%2024.1622%2011.0781%2024.3333%2011.2326%2024.3897L14.3954%2025.5448C14.4786%2025.5752%2014.571%2025.5669%2014.6474%2025.5222L19.5592%2022.6532C19.6506%2022.5997%2019.7068%2022.5017%2019.7068%2022.3957L19.7068%2016.0614C19.7068%2015.9347%2019.6269%2015.8219%2019.5076%2015.7801L15.9351%2014.4664ZM14.7951%2018.9211L19.1115%2016.5635L19.1115%2022.2245L14.7951%2024.7458L14.7951%2018.9211ZM10.4397%2017.564C10.6246%2017.564%2010.7746%2017.4139%2010.7746%2017.2287C10.7746%2017.0435%2010.6246%2016.8934%2010.4397%2016.8934C10.2547%2016.8934%2010.1048%2017.0435%2010.1048%2017.2287C10.1048%2017.4139%2010.2547%2017.564%2010.4397%2017.564ZM9.88169%2016.9306C9.8817%2017.1158%209.73176%2017.2659%209.5468%2017.2659C9.36185%2017.2659%209.21191%2017.1158%209.21191%2016.9306C9.21191%2016.7454%209.36185%2016.5952%209.5468%2016.5952C9.73176%2016.5952%209.88169%2016.7454%209.88169%2016.9306ZM8.65364%2016.8932C8.8386%2016.8932%208.98853%2016.7431%208.98853%2016.5579C8.98853%2016.3727%208.8386%2016.2225%208.65364%2016.2225C8.46869%2016.2225%208.31875%2016.3727%208.31875%2016.5579C8.31875%2016.7431%208.46868%2016.8932%208.65364%2016.8932ZM9.95585%2015.9619C9.95585%2016.1471%209.80592%2016.2973%209.62096%2016.2973C9.43601%2016.2973%209.28607%2016.1471%209.28607%2015.9619C9.28607%2015.7767%209.436%2015.6266%209.62096%2015.6266C9.80592%2015.6266%209.95585%2015.7767%209.95585%2015.9619ZM10.5884%2015.7007C10.7734%2015.7007%2010.9233%2015.5506%2010.9233%2015.3654C10.9233%2015.1802%2010.7734%2015.03%2010.5884%2015.03C10.4035%2015.03%2010.2535%2015.1802%2010.2535%2015.3654C10.2535%2015.5506%2010.4035%2015.7007%2010.5884%2015.7007ZM14.456%2014.0531C14.456%2014.2384%2014.306%2014.3885%2014.1211%2014.3885C13.9361%2014.3885%2013.7862%2014.2384%2013.7862%2014.0531C13.7862%2013.8679%2013.9361%2013.7178%2014.1211%2013.7178C14.306%2013.7178%2014.456%2013.8679%2014.456%2014.0531ZM12.3748%2014.5832C12.5597%2014.5832%2012.7096%2014.433%2012.7096%2014.2478C12.7096%2014.0626%2012.5597%2013.9125%2012.3747%2013.9125C12.1898%2013.9125%2012.0399%2014.0626%2012.0399%2014.2478C12.0399%2014.433%2012.1898%2014.5832%2012.3748%2014.5832ZM8.98853%2017.6011C8.98853%2017.7863%208.83859%2017.9365%208.65364%2017.9365C8.46868%2017.9365%208.31875%2017.7863%208.31875%2017.6011C8.31875%2017.4159%208.46869%2017.2658%208.65364%2017.2658C8.8386%2017.2658%208.98853%2017.4159%208.98853%2017.6011ZM8.65364%2018.9797C8.83859%2018.9797%208.98853%2018.8296%208.98853%2018.6444C8.98853%2018.4592%208.8386%2018.309%208.65364%2018.309C8.46869%2018.309%208.31875%2018.4592%208.31875%2018.6444C8.31875%2018.8296%208.46868%2018.9797%208.65364%2018.9797ZM8.98853%2019.6876C8.98853%2019.8728%208.83859%2020.023%208.65364%2020.023C8.46868%2020.023%208.31875%2019.8728%208.31875%2019.6876C8.31875%2019.5024%208.46869%2019.3523%208.65364%2019.3523C8.8386%2019.3523%208.98853%2019.5024%208.98853%2019.6876ZM8.65364%2021.0665C8.8386%2021.0665%208.98853%2020.9164%208.98853%2020.7312C8.98853%2020.546%208.8386%2020.3958%208.65364%2020.3958C8.46869%2020.3958%208.31875%2020.546%208.31875%2020.7312C8.31875%2020.9164%208.46868%2021.0665%208.65364%2021.0665ZM8.98853%2021.7744C8.98853%2021.9597%208.83859%2022.1098%208.65364%2022.1098C8.46868%2022.1098%208.31875%2021.9597%208.31875%2021.7745C8.31875%2021.5892%208.46869%2021.4391%208.65364%2021.4391C8.8386%2021.4391%208.98853%2021.5892%208.98853%2021.7744ZM8.65364%2023.1531C8.83859%2023.1531%208.98853%2023.0029%208.98853%2022.8177C8.98853%2022.6325%208.8386%2022.4824%208.65364%2022.4824C8.46869%2022.4824%208.31875%2022.6325%208.31875%2022.8177C8.31875%2023.0029%208.46868%2023.1531%208.65364%2023.1531ZM9.88169%2023.3393C9.8817%2023.5245%209.73176%2023.6747%209.5468%2023.6747C9.36185%2023.6747%209.21191%2023.5245%209.21191%2023.3393C9.21191%2023.1541%209.36185%2023.004%209.5468%2023.004C9.73176%2023.004%209.88169%2023.1541%209.88169%2023.3393ZM10.4397%2023.9728C10.6246%2023.9728%2010.7746%2023.8227%2010.7746%2023.6375C10.7746%2023.4523%2010.6246%2023.3021%2010.4397%2023.3021C10.2547%2023.3021%2010.1048%2023.4523%2010.1048%2023.6375C10.1048%2023.8227%2010.2547%2023.9728%2010.4397%2023.9728ZM10.8575%2016.3028C10.8575%2016.4881%2010.7076%2016.6382%2010.5226%2016.6382C10.3376%2016.6382%2010.1877%2016.488%2010.1877%2016.3028C10.1877%2016.1176%2010.3376%2015.9675%2010.5226%2015.9675C10.7075%2015.9675%2010.8575%2016.1176%2010.8575%2016.3028ZM11.4899%2016.0417C11.6749%2016.0417%2011.8248%2015.8915%2011.8248%2015.7063C11.8248%2015.5211%2011.6749%2015.371%2011.4899%2015.371C11.305%2015.371%2011.155%2015.5211%2011.155%2015.7063C11.155%2015.8915%2011.305%2016.0417%2011.4899%2016.0417ZM12.7926%2015.1104C12.7926%2015.2956%2012.6426%2015.4457%2012.4577%2015.4457C12.2727%2015.4457%2012.1228%2015.2956%2012.1228%2015.1104C12.1228%2014.9252%2012.2727%2014.775%2012.4577%2014.775C12.6426%2014.775%2012.7926%2014.9252%2012.7926%2015.1104ZM13.2762%2014.9241C13.4612%2014.9241%2013.6111%2014.774%2013.6111%2014.5887C13.6111%2014.4035%2013.4612%2014.2534%2013.2762%2014.2534C13.0913%2014.2534%2012.9413%2014.4035%2012.9413%2014.5887C12.9413%2014.774%2013.0913%2014.9241%2013.2762%2014.9241ZM11.6695%2016.732C11.6695%2016.9172%2011.5196%2017.0674%2011.3346%2017.0674C11.1497%2017.0674%2010.9997%2016.9172%2010.9997%2016.732C10.9997%2016.5468%2011.1497%2016.3967%2011.3346%2016.3967C11.5196%2016.3967%2011.6695%2016.5468%2011.6695%2016.732ZM12.3021%2016.4711C12.487%2016.4711%2012.637%2016.321%2012.637%2016.1358C12.637%2015.9506%2012.487%2015.8005%2012.3021%2015.8005C12.1171%2015.8005%2011.9672%2015.9506%2011.9672%2016.1358C11.9672%2016.321%2012.1171%2016.4711%2012.3021%2016.4711ZM13.6047%2015.5399C13.6047%2015.7251%2013.4548%2015.8752%2013.2698%2015.8752C13.0849%2015.8752%2012.935%2015.7251%2012.935%2015.5399C12.935%2015.3547%2013.0849%2015.2045%2013.2698%2015.2045C13.4548%2015.2045%2013.6047%2015.3547%2013.6047%2015.5399ZM14.0883%2015.3533C14.2732%2015.3533%2014.4231%2015.2031%2014.4231%2015.0179C14.4231%2014.8327%2014.2732%2014.6826%2014.0883%2014.6826C13.9033%2014.6826%2013.7534%2014.8327%2013.7534%2015.0179C13.7534%2015.2031%2013.9033%2015.3533%2014.0883%2015.3533ZM15.2991%2014.4927C15.2991%2014.678%2015.1491%2014.8281%2014.9642%2014.8281C14.7792%2014.8281%2014.6293%2014.678%2014.6293%2014.4927C14.6293%2014.3075%2014.7792%2014.1574%2014.9642%2014.1574C15.1491%2014.1574%2015.2991%2014.3075%2015.2991%2014.4927ZM9.56761%2018.3508C9.75257%2018.3508%209.9025%2018.2007%209.9025%2018.0155C9.9025%2017.8302%209.75257%2017.6801%209.56761%2017.6801C9.38265%2017.6801%209.23272%2017.8302%209.23272%2018.0155C9.23272%2018.2007%209.38266%2018.3508%209.56761%2018.3508ZM9.9025%2019.0587C9.9025%2019.2439%209.75257%2019.3941%209.56761%2019.3941C9.38266%2019.3941%209.23272%2019.2439%209.23272%2019.0587C9.23272%2018.8735%209.38265%2018.7234%209.56761%2018.7234C9.75257%2018.7234%209.9025%2018.8735%209.9025%2019.0587ZM9.56761%2020.4373C9.75257%2020.4373%209.9025%2020.2872%209.9025%2020.102C9.9025%2019.9168%209.75257%2019.7666%209.56761%2019.7666C9.38265%2019.7666%209.23272%2019.9168%209.23272%2020.102C9.23272%2020.2872%209.38266%2020.4373%209.56761%2020.4373ZM9.9025%2021.1452C9.9025%2021.3304%209.75257%2021.4806%209.56761%2021.4806C9.38266%2021.4806%209.23272%2021.3304%209.23272%2021.1452C9.23272%2020.96%209.38265%2020.8099%209.56761%2020.8099C9.75257%2020.8099%209.9025%2020.96%209.9025%2021.1452ZM9.56761%2022.5241C9.75257%2022.5241%209.9025%2022.374%209.9025%2022.1888C9.9025%2022.0036%209.75257%2021.8534%209.56761%2021.8534C9.38265%2021.8534%209.23272%2022.0036%209.23272%2022.1888C9.23272%2022.374%209.38266%2022.5241%209.56761%2022.5241ZM10.8163%2018.4729C10.8163%2018.6581%2010.6664%2018.8082%2010.4814%2018.8082C10.2965%2018.8082%2010.1465%2018.6581%2010.1465%2018.4729C10.1465%2018.2877%2010.2965%2018.1375%2010.4814%2018.1375C10.6664%2018.1375%2010.8163%2018.2877%2010.8163%2018.4729ZM10.4814%2019.8515C10.6664%2019.8515%2010.8163%2019.7013%2010.8163%2019.5161C10.8163%2019.3309%2010.6664%2019.1808%2010.4814%2019.1808C10.2965%2019.1808%2010.1465%2019.3309%2010.1465%2019.5161C10.1465%2019.7013%2010.2965%2019.8515%2010.4814%2019.8515ZM10.8163%2020.5594C10.8163%2020.7446%2010.6664%2020.8947%2010.4814%2020.8947C10.2965%2020.8947%2010.1465%2020.7446%2010.1465%2020.5594C10.1465%2020.3742%2010.2965%2020.2241%2010.4814%2020.2241C10.6664%2020.2241%2010.8163%2020.3742%2010.8163%2020.5594ZM10.4814%2021.9383C10.6664%2021.9383%2010.8163%2021.7882%2010.8163%2021.603C10.8163%2021.4178%2010.6664%2021.2676%2010.4814%2021.2676C10.2965%2021.2676%2010.1465%2021.4177%2010.1465%2021.603C10.1465%2021.7882%2010.2965%2021.9383%2010.4814%2021.9383ZM10.8163%2022.6462C10.8163%2022.8314%2010.6664%2022.9816%2010.4814%2022.9816C10.2965%2022.9816%2010.1465%2022.8314%2010.1465%2022.6462C10.1465%2022.461%2010.2965%2022.3109%2010.4814%2022.3109C10.6664%2022.3109%2010.8163%2022.461%2010.8163%2022.6462ZM12.5057%2017.4918C12.6906%2017.4918%2012.8406%2017.3417%2012.8406%2017.1565C12.8406%2016.9713%2012.6906%2016.8211%2012.5057%2016.8211C12.3207%2016.8211%2012.1708%2016.9713%2012.1708%2017.1565C12.1708%2017.3417%2012.3207%2017.4918%2012.5057%2017.4918ZM13.8082%2016.5602C13.8082%2016.7454%2013.6582%2016.8956%2013.4733%2016.8956C13.2883%2016.8956%2013.1384%2016.7454%2013.1384%2016.5602C13.1384%2016.375%2013.2883%2016.2249%2013.4733%2016.2249C13.6582%2016.2249%2013.8082%2016.375%2013.8082%2016.5602ZM14.4411%2016.2994C14.626%2016.2994%2014.7759%2016.1492%2014.7759%2015.964C14.7759%2015.7788%2014.626%2015.6287%2014.4411%2015.6287C14.2561%2015.6287%2014.1062%2015.7788%2014.1062%2015.964C14.1062%2016.1492%2014.2561%2016.2994%2014.4411%2016.2994ZM15.5945%2015.4424C15.5945%2015.6276%2015.4446%2015.7777%2015.2596%2015.7777C15.0747%2015.7777%2014.9247%2015.6276%2014.9247%2015.4424C14.9247%2015.2572%2015.0747%2015.107%2015.2596%2015.107C15.4446%2015.107%2015.5945%2015.2572%2015.5945%2015.4424ZM11.4966%2019.0986C11.6816%2019.0986%2011.8315%2018.9485%2011.8315%2018.7633C11.8315%2018.5781%2011.6816%2018.4279%2011.4966%2018.4279C11.3116%2018.4279%2011.1617%2018.5781%2011.1617%2018.7633C11.1617%2018.9485%2011.3116%2019.0986%2011.4966%2019.0986ZM11.8315%2019.8065C11.8315%2019.9917%2011.6816%2020.1419%2011.4966%2020.1419C11.3116%2020.1419%2011.1617%2019.9917%2011.1617%2019.8065C11.1617%2019.6213%2011.3116%2019.4712%2011.4966%2019.4712C11.6816%2019.4712%2011.8315%2019.6213%2011.8315%2019.8065ZM11.4966%2021.1851C11.6816%2021.1851%2011.8315%2021.035%2011.8315%2020.8498C11.8315%2020.6646%2011.6816%2020.5144%2011.4966%2020.5144C11.3116%2020.5144%2011.1617%2020.6646%2011.1617%2020.8498C11.1617%2021.035%2011.3116%2021.1851%2011.4966%2021.1851ZM11.8315%2021.8933C11.8315%2022.0786%2011.6816%2022.2287%2011.4966%2022.2287C11.3116%2022.2287%2011.1617%2022.0786%2011.1617%2021.8933C11.1617%2021.7081%2011.3116%2021.558%2011.4966%2021.558C11.6816%2021.558%2011.8315%2021.7081%2011.8315%2021.8933ZM11.4966%2023.272C11.6816%2023.272%2011.8315%2023.1218%2011.8315%2022.9366C11.8315%2022.7514%2011.6816%2022.6013%2011.4966%2022.6013C11.3116%2022.6013%2011.1617%2022.7514%2011.1617%2022.9366C11.1617%2023.1218%2011.3116%2023.272%2011.4966%2023.272Z'%20fill='white'/%3e%3c/svg%3e"},modelTypes:["POINT_CLOUD"]},i18n:{en:{window_label:"Point Cloud"},fr:{window_label:"Point Cloud"}}},rI="viewer-point-cloud-parameters_parameters",zSt={computed:{viewer(){let e=this.$viewer.localContext.pluginComponentInstances.get("pointCloud");if(e)return e;{let t="'Viewer Point Cloud Parameters' plugin cannot work without Viewer Point Cloud plugin.";throw console.error(t),Error(t)}},sensitivity:{get(){return this.viewer.sensitivity},set(e){this.viewer.sensitivity=e,this.saveParameters({sensitivity:e})}},fov:{get(){return this.viewer.fov},set(e){this.viewer.fov=e,this.saveParameters({fov:e})}}},mounted(){this.subscription=this.$viewer.localContext.hub.on("pointcloud-model-loaded",()=>{this.applySavedParameters()})},unmounted(){this.$viewer.localContext.hub.off(this.subscription)},methods:{getSavedParameters(){let e={};try{let t=localStorage.getItem(rI)||"{}";e=JSON.parse(t)}catch{localStorage.removeItem(rI)}return Object.assign({},this.getDefaultParameters(),e)},applySavedParameters(){let e=this.getSavedParameters();this.viewer.sensitivity=e.sensitivity,this.viewer.fov=e.fov},getDefaultParameters(){return{sensitivity:200,fov:90}},saveParameters(e){let t={sensitivity:e.sensitivity||this.sensitivity,fov:e.fov||this.fov};localStorage.setItem(rI,JSON.stringify(t))}}},qSt={class:"viewer-point-cloud-parameters"},GSt={class:"viewer-point-cloud-parameters_header"},KSt={class:"viewer-point-cloud-parameters_content"},JSt={class:"m-b-18"},ZSt={class:"flex justify-between"},WSt={class:"viewer-point-cloud-parameters_content__value"},YSt={class:"flex justify-between"},XSt={class:"viewer-point-cloud-parameters_content__value"};function $St(e,t,i,o,r,n){let a=I("BIMDataIconParameters"),s=I("BIMDataSlider");return k(),N("div",qSt,[w("div",GSt,[T(a,{size:"xs",margin:"0 12px 0 0"}),w("span",null,G(e.$t("pointCloudParameters.title")),1)]),w("div",KSt,[w("div",JSt,[w("div",ZSt,[w("span",null,G(e.$t("pointCloudParameters.sensitivity")),1),w("span",WSt,G(n.sensitivity),1)]),T(s,{modelValue:n.sensitivity,"onUpdate:modelValue":t[0]||=l=>n.sensitivity=l,min:20,max:1e3},null,8,["modelValue"])]),w("div",null,[w("div",YSt,[w("span",null,G(e.$t("pointCloudParameters.fov")),1),w("span",XSt,G(n.fov),1)]),T(s,{modelValue:n.fov,"onUpdate:modelValue":t[1]||=l=>n.fov=l,min:20,max:120},null,8,["modelValue"])])])])}var eDt={name:"pointCloudParameters",i18n:{en:{tooltip:"Parameters",title:"Point Cloud Viewer settings",sensitivity:"Sensitivity",fov:"Field of view"},fr:{tooltip:"Param\xE8tres",title:"Param\xE8tres du nuage de points",sensitivity:"Sensibilit\xE9",fov:"Angle de vision"}},addToWindows:["pointCloud"],component:Q(zSt,[["render",$St],["__scopeId","data-v-e97be8b2"]]),button:{tooltip:"pointCloudParameters.tooltip",position:"right",content:"simple",icon:{component:"BIMDataIconParameters",options:{size:"m"}}}},sm=class{constructor(e,t,i=null,o=!0){this.name=e,this.icon=t,this.group=i,this.label=`drawing-tools.action.${e}`,this.lineStyleComponentDisplayed=o}onActivate(){throw Error("Not implemented")}onDeactivate(){throw Error("Not implemented")}},tDt={},iDt={width:"18",height:"18",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg"};function rDt(e,t){return k(),N("svg",iDt,[...t[0]||=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.176395 0.13889C0.342301 -0.00852533 0.584825 -0.0419546 0.786658 0.0547728L21.6969 10.0759C21.9052 10.1757 22.0251 10.3924 21.9956 10.6155C21.966 10.8386 21.7935 11.019 21.566 11.0647L12.0932 12.9697L9.57365 21.6158C9.51015 21.8337 9.31 21.9881 9.07635 21.9993C8.8427 22.0106 8.6277 21.8763 8.54214 21.6655L0.03777 0.720195C-0.0446022 0.517321 0.0104881 0.286306 0.176395 0.13889Z"},null,-1)]])}var oDt=Q(tDt,[["render",rDt]]),nDt=class{constructor(){this._listenersTarget=new Map}on(e,t,i=window,o={}){this._listenersTarget.has(i)||this._listenersTarget.set(i,new Map);let r=this._listenersTarget.get(i);r.has(e)||r.set(e,new Map);let n=t.bind(this);return o?.once&&(n=(...a)=>{t.call(this,...a),this.off(e,t,i)}),i.addEventListener(e,n,o),r.get(e).set(t,n),()=>{this.off(e,t,i)}}off(e,t,i=window){if(!this._listenersTarget.has(i))return;let o=this._listenersTarget.get(i);if(!o.has(e))return;let r=o.get(e).get(t);i.removeEventListener(e,r),o.get(e).delete(t),o.get(e).size===0&&o.delete(e),o.size===0&&this._listenersTarget.delete(i)}},aDt="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M19.6749%202.92459C20.1081%203.35787%2020.1081%204.05777%2019.6749%204.49104L17.6418%206.5241L13.4757%202.358L15.5088%200.324952C15.9421%20-0.108322%2016.642%20-0.108322%2017.0752%200.324952L19.6749%202.92459ZM0%2020.0001V15.834L12.2872%203.54683L16.4533%207.71292L4.16609%2020.0001H0Z'%20fill='%232F374A'/%3e%3c/svg%3e",sDt="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M18.6749%202.9246C19.1081%203.35787%2019.1081%204.05777%2018.6749%204.49105L16.6418%206.5241L12.4757%202.35801L14.5088%200.324955C14.9421%20-0.108318%2015.642%20-0.108318%2016.0752%200.324955L18.6749%202.9246ZM0%2018V14.834L11.2872%203.54684L15.4533%207.71293L4.16609%2019.0001H1L0%2018Z'%20fill='%232F374A'/%3e%3c/svg%3e",lDt=`url("${aDt}") 0 20, auto`,cDt=`url("${sDt}") 1 23, auto`,Q8=class extends nDt{constructor(e,{pointerUpCursor:t=lDt,pointerDownCursor:i=cDt,element:o=e.canvas}={}){super(),this._engine2d=e,this.element=o,this.pointerUpCursor=t,this.pointerDownCursor=i,this._eventCache=[]}_getClientPosition(e){return{clientX:e.clientX,clientY:e.clientY}}_getPositions(e){let{clientX:t,clientY:i}=this._getClientPosition(e),{x:o,y:r}=this._engine2d.canvas.getBoundingClientRect();return this._engine2d.camera.getPosition({x:Math.max(t-o,0),y:Math.max(i-r,0)})}_getCanvasPosition(e){let{clientX:t,clientY:i}=this._getClientPosition(e),{x:o,y:r}=this.element.getBoundingClientRect();return{x:Math.max(t-o,0),y:Math.max(i-r,0)}}_getPositionedCallbackPayload(e){let t=this;return{get position(){return t._getPositions(e)},get canvasPosition(){return t._getCanvasPosition(e)},mouseEvent:e}}onEnabled(){}onMouseDown(){}onDrag(){}onMouseUp(){}onDisabled(){}_onMouseDown(e){this._eventCache.push(e),this.on("pointerup",()=>{this._eventCache=this._eventCache.filter(t=>t!==e)},window,{once:!0}),!(this._eventCache.length>1)&&(this.element.style.cursor=this.pointerDownCursor,this.onMouseDown(this._getPositionedCallbackPayload(e)),this.off("pointermove",this._onMouseMove,window),this.off("pointerup",this._onMouseUp,window),this.off("pointercancel",this._onMouseUp,window),this.on("pointermove",this._onMouseMove,window),this.on("pointerup",this._onMouseUp,window,{once:!0}),this.on("pointercancel",this._onMouseUp,window,{once:!0}))}_onMouseMove(e){e.preventDefault();let t=e.buttons===4,i=!e.isPrimary,o=this._eventCache.length>1;e.shiftKey||t||i||o||this.onDrag(this._getPositionedCallbackPayload(e))}_onMouseUp(e){this.off("pointermove",this._onMouseMove,window),this.off("pointerup",this._onMouseUp,window),this.off("pointercancel",this._onMouseUp,window),this.element.style.cursor=this.pointerUpCursor,this.onMouseUp(this._getPositionedCallbackPayload(e))}disable(){this._engine2d.ui.translatableWithOneTouch=!0,this._eventCache=[],this.off("pointerdown",this._onMouseDown,this.element),this.off("pointermove",this._onMouseMove,window),this.off("pointerup",this._onMouseUp,window),this.off("pointercancel",this._onMouseUp,window),this.element.style.cursor="",this.onDisabled()}enable(){this._engine2d.ui.translatableWithOneTouch=!1,this._eventCache=[],this.on("pointerdown",this._onMouseDown,this.element),this.element.style.cursor=this.pointerUpCursor,this.onEnabled()}},G$=`url("data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2022%2022'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.176395%200.13889C0.342301%20-0.00852533%200.584825%20-0.0419546%200.786658%200.0547728L21.6969%2010.0759C21.9052%2010.1757%2022.0251%2010.3924%2021.9956%2010.6155C21.966%2010.8386%2021.7935%2011.019%2021.566%2011.0647L12.0932%2012.9697L9.57365%2021.6158C9.51015%2021.8337%209.31%2021.9881%209.07635%2021.9993C8.8427%2022.0106%208.6277%2021.8763%208.54214%2021.6655L0.03777%200.720195C-0.0446022%200.517321%200.0104881%200.286306%200.176395%200.13889Z'%20/%3e%3c/svg%3e"), auto`,dDt=class extends sm{constructor({viewer:e},t){super("pointer",oDt,"pointers",!1),this._pointerManager=new uDt(e,t)}onActivate(){this._pointerManager.enable()}onDeactivate(){this._pointerManager.disable()}},uDt=class extends Q8{constructor(e,t){super(e,{pointerUpCursor:G$,pointerDownCursor:G$,element:e.canvas.parentElement}),this._drawer=t,this._currentDrawing=null,this.previousTouch=null}onMouseDown(e){this._currentDrawing=this._drawer.pick(e)}onMouseUp(){this._currentDrawing&&this._drawer.save(this._currentDrawing),this._currentDrawing=null,this.previousTouch=null}onDrag({position:e,mouseEvent:t,canvasPosition:i}){if(!this._currentDrawing)return;let o=0,r=0;if(window.TouchEvent&&t instanceof TouchEvent){let c=t.touches[0];this.previousTouch&&(o=c.pageX-this.previousTouch.pageX,r=c.pageY-this.previousTouch.pageY),this.previousTouch=c}else{let{movementX:c,movementY:d}=t;o=c,r=d}let n={x:i.x-o,y:i.y-r},a=this._engine2d.camera.getPosition(n),s=e.x-a.x,l=e.y-a.y;this._currentDrawing.x+=s,this._currentDrawing.y+=l}},ADt={},hDt={width:"14",height:"16",viewBox:"0 0 14 16",xmlns:"http://www.w3.org/2000/svg"};function pDt(e,t){return k(),N("svg",hDt,[...t[0]||=[w("path",{d:"M6.43587 16C6.09019 16 5.76756 15.9196 5.46797 15.7588C5.16839 15.5979 4.91888 15.3672 4.71944 15.0666L0 7.91354L0.307859 7.60694C0.508253 7.39952 0.745433 7.28253 1.0194 7.25596C1.29337 7.22942 1.54313 7.29881 1.7687 7.46414L4.1836 9.20471V2.14936C4.1836 1.98328 4.2379 1.84407 4.34649 1.73171C4.45509 1.61936 4.58965 1.56318 4.75018 1.56318C4.91071 1.56318 5.04519 1.61936 5.15361 1.73171C5.26203 1.84407 5.31624 1.98328 5.31624 2.14936V7.79331H7.08062V0.586175C7.08062 0.420099 7.13491 0.280884 7.2435 0.168531C7.35209 0.0561769 7.48665 0 7.64718 0C7.80771 0 7.94219 0.0561769 8.05061 0.168531C8.15904 0.280884 8.21325 0.420099 8.21325 0.586175V7.79331H9.97762V1.36777C9.97762 1.20169 10.0319 1.06248 10.1405 0.950122C10.2491 0.837768 10.3837 0.781592 10.5442 0.781592C10.7047 0.781592 10.8392 0.837768 10.9476 0.950122C11.056 1.06248 11.1102 1.20169 11.1102 1.36777V7.79331H12.8674V2.713C12.8674 2.54691 12.9217 2.40769 13.0302 2.29534C13.1388 2.18298 13.2734 2.12681 13.4339 2.12681C13.5945 2.12681 13.7289 2.18298 13.8373 2.29534C13.9458 2.40769 14 2.54691 14 2.713V13.0691C14 13.8787 13.7236 14.5696 13.1708 15.1418C12.6181 15.7139 11.9506 16 11.1683 16H6.43587Z"},null,-1)]])}var fDt=Q(ADt,[["render",pDt]]),gDt="data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.43587%2016C6.09019%2016%205.76756%2015.9196%205.46797%2015.7588C5.16839%2015.5979%204.91888%2015.3672%204.71944%2015.0666L0%207.91354L0.307859%207.60694C0.508252%207.39952%200.745433%207.28253%201.0194%207.25596C1.29337%207.22942%201.54313%207.29881%201.7687%207.46414L4.1836%209.20471V2.14936C4.1836%201.98328%204.2379%201.84407%204.34649%201.73171C4.45509%201.61936%204.58965%201.56318%204.75018%201.56318C4.91071%201.56318%205.04519%201.61936%205.15361%201.73171C5.26203%201.84407%205.31624%201.98328%205.31624%202.14936V7.79331H7.08062V0.586175C7.08062%200.420099%207.13491%200.280884%207.2435%200.168531C7.35209%200.0561769%207.48665%200%207.64718%200C7.80771%200%207.94219%200.0561769%208.05061%200.168531C8.15904%200.280884%208.21325%200.420099%208.21325%200.586175V7.79331H9.97762V1.36777C9.97762%201.20169%2010.0319%201.06248%2010.1405%200.950122C10.2491%200.837768%2010.3837%200.781592%2010.5442%200.781592C10.7047%200.781592%2010.8392%200.837768%2010.9476%200.950122C11.056%201.06248%2011.1102%201.20169%2011.1102%201.36777V7.79331H12.8674V2.713C12.8674%202.54691%2012.9217%202.40769%2013.0302%202.29534C13.1388%202.18298%2013.2734%202.12681%2013.4339%202.12681C13.5945%202.12681%2013.7289%202.18298%2013.8373%202.29534C13.9458%202.40769%2014%202.54691%2014%202.713V13.0691C14%2013.8787%2013.7236%2014.5696%2013.1708%2015.1418C12.6181%2015.7139%2011.9506%2016%2011.1683%2016H6.43587Z'%20fill='%232F374A'/%3e%3c/svg%3e",mDt="data:image/svg+xml,%3csvg%20width='11'%20height='11'%20viewBox='0%200%2011%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.43587%2011C3.09019%2011%202.76756%2010.9196%202.46797%2010.7588C2.16839%2010.5979%201.91888%2010.3672%201.71944%2010.0666L0%206.91354C0.5%205.5%200.780254%205.53908%201.1836%205.5V4.20471V2.14936C1.1836%201.98328%201.2379%201.84407%201.34649%201.73172C1.45509%201.61936%201.58965%201.56318%201.75018%201.56318C1.91071%201.56318%202.04519%201.61936%202.15361%201.73172C2.26203%201.84407%202.31624%201.98328%202.31624%202.14936V2.79331H4.08062V0.586175C4.08062%200.4201%204.13491%200.280884%204.2435%200.16853C4.35209%200.0561767%204.48665%200%204.64718%200C4.80771%200%204.94219%200.0561767%205.05061%200.16853C5.15904%200.280884%205.21325%200.4201%205.21325%200.586175V2.79331H6.97762V1.36777C6.97762%201.20169%207.03191%201.06248%207.1405%200.950122C7.24909%200.837768%207.38365%200.781591%207.54418%200.781591C7.70471%200.781591%207.83919%200.837768%207.94762%200.950122C8.05604%201.06248%208.11025%201.20169%208.11025%201.36777V2.79331H9.86735V2.713C9.86735%202.54691%209.92165%202.40769%2010.0302%202.29534C10.1388%202.18298%2010.2734%202.12681%2010.4339%202.12681C10.5945%202.12681%2010.7289%202.18298%2010.8373%202.29534C10.9458%202.40769%2011%202.54691%2011%202.713V8.06905C11%208.87869%2010.7236%209.56959%2010.1708%2010.1418C9.61805%2010.7139%208.95055%2011%208.16833%2011H3.43587Z'%20fill='%232F374A'/%3e%3c/svg%3e",vDt=`url("${gDt}") 7 23, auto`,yDt=`url("${mDt}") 7 18, auto`,wDt=class extends sm{constructor({viewer:e}){super("pan",fDt,"pointers",!1),this._pointerManager=new bDt(e)}onActivate(){this._pointerManager.enable()}onDeactivate(){this._pointerManager.disable()}},bDt=class extends Q8{constructor(e){super(e,{pointerUpCursor:vDt,pointerDownCursor:yDt}),this.previousTouch=null}onDrag({mouseEvent:e}){let t=0,i=0;if(window.TouchEvent&&e instanceof TouchEvent){let o=e.touches[0];this.previousTouch&&(t=o.pageX-this.previousTouch.pageX,i=o.pageY-this.previousTouch.pageY),this.previousTouch=o}else{let{movementX:o,movementY:r}=e;t=o,i=r}this._engine2d.camera.translate(-t*window.devicePixelRatio,-i*window.devicePixelRatio)}onMouseUp(){this.previousTouch=null}},lm=class extends sm{constructor(e,t,i,o,r,n=i){super(i,o,r),this._pointermanager=new CDt(e,t,n)}onActivate(){this._pointermanager.enable()}onDeactivate(){this._pointermanager.disable()}},CDt=class extends Q8{constructor(e,t,i){super(e),this._drawer=t,this._currentDrawing=null,this.shape=i}onMouseDown({position:e}){this._currentDrawing=this._drawer.makeDrawing(this.shape,{p1:e})}onMouseUp(){this._currentDrawing&&this._drawer.save(this._currentDrawing),this._currentDrawing=null}onDrag(e){this._currentDrawing.dragTo(e)}},xDt={},BDt={width:"18",height:"18",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg"};function kDt(e,t){return k(),N("svg",BDt,[...t[0]||=[w("path",{d:"M1.22223 22V17.6324L17.3486 0.577372C17.5382 0.376633 17.7466 0.230225 17.9738 0.138148C18.201 0.0460498 18.4282 0 18.6554 0C18.8951 0 19.1274 0.0460498 19.3523 0.138148C19.5771 0.230225 19.7742 0.376633 19.9434 0.577372L21.4547 2.17759C21.6443 2.35678 21.7826 2.56541 21.8695 2.80349C21.9565 3.04156 22 3.28752 22 3.54136C22 3.78194 21.9565 4.02251 21.8695 4.26306C21.7826 4.50364 21.6443 4.7243 21.4547 4.92504L5.34718 22H1.22223ZM18.4697 5.35812L20.1667 3.56126L18.6366 1.94115L16.9396 3.73801L18.4697 5.35812ZM12.9979 22C14.4269 22 15.7518 21.63 16.9724 20.89C18.1931 20.1501 18.8034 19.1181 18.8034 17.7941C18.8034 17.0342 18.5884 16.3698 18.1582 15.8007C17.7281 15.2316 17.1244 14.7504 16.3472 14.3572L14.9793 15.8056C15.6045 16.0545 16.0926 16.3477 16.4436 16.6854C16.7946 17.023 16.9701 17.3926 16.9701 17.7941C16.9701 18.4063 16.5729 18.9368 15.7785 19.3856C14.984 19.8344 14.0571 20.0588 12.9979 20.0588C12.7378 20.0588 12.52 20.1518 12.3445 20.3376C12.169 20.5234 12.0812 20.754 12.0812 21.0294C12.0812 21.3048 12.169 21.5354 12.3445 21.7212C12.52 21.9071 12.7378 22 12.9979 22ZM1.94853 12.8591L3.31174 11.4032C2.83381 11.1892 2.46793 10.9677 2.21409 10.7387C1.96024 10.5098 1.83331 10.2733 1.83331 10.0294C1.83331 9.70425 2.03819 9.3832 2.44796 9.06629C2.85772 8.7494 3.67292 8.31305 4.89358 7.75722C6.59216 6.98739 7.72899 6.29098 8.30404 5.66799C8.87912 5.04498 9.16666 4.34193 9.16666 3.55883C9.16666 2.49699 8.74397 1.63839 7.8986 0.983047C7.05323 0.327683 5.94814 0 4.58335 0C3.74502 0 2.97408 0.160117 2.27053 0.480347C1.56695 0.800556 1.04124 1.1921 0.693399 1.65499C0.524161 1.86901 0.454036 2.10502 0.483023 2.363C0.512011 2.62098 0.627572 2.83294 0.829708 2.99887C1.03184 3.16974 1.25278 3.23982 1.49252 3.20913C1.73226 3.17844 1.93674 3.07351 2.10596 2.89433C2.41465 2.56748 2.76957 2.32691 3.17073 2.1726C3.57186 2.0183 4.04273 1.94115 4.58335 1.94115C5.48121 1.94115 6.16402 2.10168 6.63176 2.42273C7.09949 2.74378 7.33335 3.12248 7.33335 3.55883C7.33335 3.93547 7.13161 4.27684 6.72814 4.58294C6.32464 4.88906 5.46947 5.35487 4.16262 5.98036C2.58783 6.71038 1.50036 7.36407 0.90023 7.94144C0.300076 8.51881 0 9.21481 0 10.0294C0 10.6367 0.171193 11.1705 0.513579 11.6309C0.855965 12.0913 1.33428 12.5007 1.94853 12.8591Z"},null,-1)]])}var EDt=Q(xDt,[["render",kDt]]),MDt=class extends lm{constructor({viewer:e},t){super(e,t,"pen",EDt,null,"freehand")}},PDt={},IDt={width:"22",height:"22",viewBox:"0 0 22 23",xmlns:"http://www.w3.org/2000/svg"};function SDt(e,t){return k(),N("svg",IDt,[...t[0]||=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 0.769226C0.447715 0.769226 0 1.21694 0 1.76923V4.32096C0 4.87324 0.447716 5.32096 1 5.32096H1.51723V18.2175H1C0.447715 18.2175 0 18.6652 0 19.2175V21.7692C0 22.3215 0.447716 22.7692 1 22.7692H3.55173C4.10401 22.7692 4.55173 22.3215 4.55173 21.7692V21.252H17.4482V21.7692C17.4482 22.3215 17.896 22.7692 18.4482 22.7692H21C21.5523 22.7692 22 22.3215 22 21.7692V19.2175C22 18.6652 21.5523 18.2175 21 18.2175H20.4828V5.32096H21C21.5523 5.32096 22 4.87324 22 4.32095V1.76923C22 1.21694 21.5523 0.769226 21 0.769226H18.4482C17.896 0.769226 17.4482 1.21694 17.4482 1.76923V2.28643H4.55173V1.76923C4.55173 1.21694 4.10401 0.769226 3.55173 0.769226H1ZM3.03448 5.32096H3.55173C4.10401 5.32096 4.55173 4.87324 4.55173 4.32095V3.80367H17.4482V4.32096C17.4482 4.87324 17.896 5.32096 18.4482 5.32096H18.9655V18.2175H18.4482C17.896 18.2175 17.4482 18.6652 17.4482 19.2175V19.7347H4.55173V19.2175C4.55173 18.6652 4.10401 18.2175 3.55173 18.2175H3.03448V5.32096ZM11.4216 6.83819H11.9202L15.931 17.4589H13.79L12.9878 15.0955H9.00098L8.20266 17.4589H6.06894L10.0578 6.83819H10.549H11.4216ZM9.53565 13.5126H12.4505L10.9896 9.2082L9.53565 13.5126Z"},null,-1)]])}var DDt=Q(PDt,[["render",SDt]]),TDt=`url("data:image/svg+xml,%3csvg%20width='14'%20height='15'%20viewBox='0%200%2014%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5%201.96296V7.5M5%201.96296L3%201H1M5%201.96296L7%201H9M5%2013.037V7.5M5%2013.037L7%2014H9M5%2013.037L3%2014H1M5%207.5H7M5%207.5H3'%20stroke='%232F374A'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11%209V11M11%2013V11M11%2011H13M11%2011H9'%20stroke='%232F374A'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e") 5 7, auto`,LDt=class extends sm{constructor(e,t){super("text",DDt,null,!1),this._viewerPlanPlugin=e,this._drawer=t,this.canvas=e.engine.canvas;let i=pe(!1);this.autoDeactivateCallback=null,this.connector={enabledRef:i,deactivateAction(){this.autoDeactivateCallback?.()}},this.onClick=o=>{this.autoDeactivateCallback();let{x:r,y:n}=e.viewer.camera.getPosition({x:o.offsetX,y:o.offsetY});t.makeDrawing("text",{x:r,y:n})}}onActivate(e){this.canvas.addEventListener("click",this.onClick),this._viewerPlanPlugin.$viewer.localContext.el.style.cursor=TDt,this.autoDeactivateCallback=e,this.connector.enabledRef.value=!0}onDeactivate(){this.canvas.removeEventListener("click",this.onClick),this._viewerPlanPlugin.$viewer.localContext.el.style.cursor="",this.autoDeactivateCallback=null,this.connector.enabledRef.value=!1}},RDt={},_Dt={width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"};function FDt(e,t){return k(),N("svg",_Dt,[...t[0]||=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 0H16V16H0V0ZM2 2V14H14V2H2Z"},null,-1)]])}var UDt=Q(RDt,[["render",FDt]]),ODt=class extends lm{constructor({viewer:e},t){super(e,t,"rectangle",UDt,"shapes")}},NDt={},HDt={width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"};function VDt(e,t){return k(),N("svg",HDt,[...t[0]||=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16 1.37853L1.37853 16L0 14.6215L14.6215 0L16 1.37853Z"},null,-1)]])}var jDt=Q(NDt,[["render",VDt]]),QDt=class extends lm{constructor({viewer:e},t){super(e,t,"line",jDt,"shapes")}},zDt={},qDt={width:"17",height:"17",viewBox:"0 0 17 17",xmlns:"http://www.w3.org/2000/svg"};function GDt(e,t){return k(),N("svg",qDt,[...t[0]||=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9914 1.88377H10.0848V0H16.207V6.12225H14.3233V3.21594L1.33203 16.2072L0 14.8751L12.9914 1.88377Z"},null,-1)]])}var KDt=Q(zDt,[["render",GDt]]),JDt=class extends lm{constructor({viewer:e},t){super(e,t,"arrow",KDt,"shapes")}},ZDt={},WDt={width:"17",height:"17",viewBox:"0 0 17 17",xmlns:"http://www.w3.org/2000/svg"};function YDt(e,t){return k(),N("svg",WDt,[...t[0]||=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.5 14.875C12.0208 14.875 14.875 12.0208 14.875 8.5C14.875 4.97919 12.0208 2.125 8.5 2.125C4.97919 2.125 2.125 4.97919 2.125 8.5C2.125 12.0208 4.97919 14.875 8.5 14.875ZM8.5 17C13.1944 17 17 13.1944 17 8.5C17 3.80558 13.1944 0 8.5 0C3.80558 0 0 3.80558 0 8.5C0 13.1944 3.80558 17 8.5 17Z"},null,-1)]])}var XDt=Q(ZDt,[["render",YDt]]),$Dt=class extends lm{constructor({viewer:e},t){super(e,t,"ellipse",XDt,"shapes")}},eTt={name:"EraserIcon",props:{color:{type:String,default:"currentColor"}}},tTt=["fill"];function iTt(e,t,i,o,r,n){return k(),N("svg",{width:"20",height:"20",viewBox:"0 0 22 22",fill:i.color,xmlns:"http://www.w3.org/2000/svg"},[...t[0]||=[w("path",{d:"M16.6425 18.2998H22V20H14.9369L16.6425 18.2998ZM2.62548 20L0.613685 17.9946C0.214257 17.5964 0.00980528 17.1125 0.00032939 16.5428C-0.0091465 15.9731 0.18583 15.4798 0.585258 15.0627L12.6123 2.62019C13.0118 2.20312 13.4943 1.9964 14.0599 2.00005C14.6256 2.00367 15.1081 2.20458 15.5075 2.60277L20.6617 7.74061C21.0611 8.13879 21.2627 8.62453 21.2663 9.19783C21.27 9.77112 21.072 10.2569 20.6726 10.655L11.5255 20H2.62548Z"},null,-1)]],8,tTt)}var rTt=Q(eTt,[["render",iTt]]),oTt="data:image/svg+xml,%3csvg%20width='23'%20height='23'%20viewBox='0%200%2023%2023'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.1614%200.604227C13.9322%20-0.186875%2015.1984%20-0.203279%2015.9895%200.567585L21.551%205.98681C22.3421%206.75768%2022.3586%208.0239%2021.5877%208.815L8.99392%2021.7394C8.22305%2022.5305%206.95683%2022.5469%206.16573%2021.776L0.604228%2016.3568C-0.186874%2015.5859%20-0.20328%2014.3197%200.567585%2013.5286L13.1614%200.604227Z'%20fill='%232F374A'/%3e%3c/svg%3e",nTt="data:image/svg+xml,%3csvg%20width='22'%20height='18'%20viewBox='0%200%2022%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.62548%2018L0.613685%2015.9946C0.214257%2015.5964%200.00980528%2015.1125%200.00032939%2014.5428C-0.0091465%2013.9731%200.18583%2013.4798%200.585258%2013.0627L12.6123%200.620194C13.0118%200.203116%2013.4943%20-0.00359875%2014.0599%204.73985e-05C14.6256%200.00367466%2015.1081%200.204581%2015.5075%200.602767L20.6617%205.74061C21.0611%206.13879%2021.2627%206.62453%2021.2663%207.19783C21.27%207.77112%2021.072%208.25686%2020.6726%208.65502L11.5255%2018H2.62548Z'%20fill='%232F374A'/%3e%3c/svg%3e",aTt=`url("${oTt}") 7 23, auto`,sTt=`url("${nTt}") 7 18, auto`,lTt=class extends sm{constructor({viewer:e},t){super("eraser",rTt,null,!1),this._pointerManager=new cTt(e,t)}onActivate(){this._pointerManager.enable()}onDeactivate(){this._pointerManager.disable()}},cTt=class extends Q8{constructor(e,t){super(e,{element:e.canvas.parentElement,pointerUpCursor:aTt,pointerDownCursor:sTt}),this._drawer=t}erase(e){let t=this._drawer.pick(e);t&&this._drawer.deleteDrawing(t.id)}onMouseDown(e){this.erase(e)}onDrag(e){this.erase(e)}},m0=class{constructor(e){this.drawingType=e}parse(e){throw Error("Not implemented")}toString(e){throw Error("Not implemented")}},dTt=class extends m0{constructor(){super("rectangle")}toString(e){let{p1:t,p2:i,p3:o,p4:r,lineColor:n,lineWidth:a}=e;return`<path d="M ${t.x} ${t.y} L ${i.x} ${i.y} L ${o.x} ${o.y} L ${r.x} ${r.y} Z" stroke-width="${a}" stroke="#${n.toString(16).padStart(6,0)}"/>`}parse(e){let t=e.querySelector("path"),[,i,o,,r,n,,a,s,,l,c]=t.getAttribute("d").split(" "),d=t.getAttribute("stroke")?.substring(1),u=t.getAttribute("stroke-width");return{p1:{x:parseFloat(i),y:parseFloat(o)},p2:{x:parseFloat(r),y:parseFloat(n)},p3:{x:parseFloat(a),y:parseFloat(s)},p4:{x:parseFloat(l),y:parseFloat(c)},lineColor:parseInt(d,16),lineWidth:parseFloat(u)}}},uTt=class extends m0{constructor(){super("line")}toString(e){let{p1:t,p2:i,lineWidth:o,lineColor:r}=e;return`<line x1="${t.x}" y1="${t.y}" x2="${i.x}" y2="${i.y}" stroke-width="${o}" stroke="#${r.toString(16).padStart(6,0)}"/>`}parse(e){let t=e.querySelector("line"),i=t.getAttribute("x1"),o=t.getAttribute("y1"),r=t.getAttribute("x2"),n=t.getAttribute("y2"),a=t.getAttribute("stroke")?.substring(1),s=t.getAttribute("stroke-width");return{p1:{x:parseFloat(i),y:parseFloat(o)},p2:{x:parseFloat(r),y:parseFloat(n)},lineWidth:parseFloat(s),lineColor:parseInt(a,16)}}},ATt=class extends m0{constructor(){super("arrow")}toString(e){let{p1:t,p2:i,lineWidth:o,lineColor:r}=e;return`<line x1="${t.x}" y1="${t.y}" x2="${i.x}" y2="${i.y}" stroke-width="${o}" stroke="#${r.toString(16).padStart(6,0)}"/>`}parse(e){let t=e.querySelector("line"),i=t.getAttribute("x1"),o=t.getAttribute("y1"),r=t.getAttribute("x2"),n=t.getAttribute("y2"),a=t.getAttribute("stroke")?.substring(1),s=t.getAttribute("stroke-width");return{p1:{x:parseFloat(i),y:parseFloat(o)},p2:{x:parseFloat(r),y:parseFloat(n)},lineWidth:parseFloat(s),lineColor:parseInt(a,16)}}};function K$(e){if(e.length===0)return"";let t=e[0],i=`M ${t.x} ${t.y}`;for(let o=0;o<e.length;o++){let r=e[o];i+=` C ${r.cpX1} ${r.cpY1} ${r.cpX2} ${r.cpY2} ${r.toX} ${r.toY}`}return i}function J$(e){let t=e.split(" "),i=t.shift();if(i!=="M")throw Error(`svgPathStringToCurves: invalid svg path string. Must start with M, got "${i}"`);let o=parseFloat(t.shift()),r=parseFloat(t.shift()),n=[];for(;t.shift()==="C";){let a=parseFloat(t.shift()),s=parseFloat(t.shift()),l=parseFloat(t.shift()),c=parseFloat(t.shift()),d=parseFloat(t.shift()),u=parseFloat(t.shift());n.push({type:"curve",x:o,y:r,cpX1:a,cpY1:s,cpX2:l,cpY2:c,toX:d,toY:u}),o=d,r=u}return n}var hTt=class extends m0{constructor(){super("ellipse")}toString(e){let{curve1:t,curve2:i,curve3:o,curve4:r,lineColor:n,lineWidth:a}=e;return`<path d="${K$([t,i,o,r])} Z" stroke-width="${a}" stroke="#${n.toString(16).padStart(6,0)}" />`}parse(e){let t=e.querySelector("path"),i=J$(t.getAttribute("d")),o=t.getAttribute("stroke")?.substring(1),r=t.getAttribute("stroke-width");return{curves:i,lineColor:parseInt(o,16),lineWidth:parseFloat(r)}}},pTt=class extends m0{constructor(){super("text")}toString(e){let{x:t,y:i,rotation:o,scale:r,text:n,size:a,color:s}=e;return`<text x="${t}" y="${i}" tranform="rotate(${o}) scale(${r})" font-size="${a}px" ${s?`color="#${s}"`:""}>${n}</text>`}parse(e){let t=e.querySelector("text"),i=t.getAttribute("x"),o=t.getAttribute("y"),r=t.getAttribute("tranform").match(/rotate\((.*)\)/)?.[1]??0,n=t.getAttribute("tranform").match(/scale\((.*)\)/)?.[1]??1,a=t.textContent==="null"?null:t.textContent,s=t.getAttribute("font-size").slice(0,-2),l=t.getAttribute("color");return{x:parseFloat(i),y:parseFloat(o),rotation:parseFloat(r),scale:parseFloat(n),text:a,size:parseFloat(s),color:l?l.slice(1):null}}},fTt=class extends m0{constructor(){super("freehand")}toString(e){let{curves:t,lineWidth:i,lineColor:o}=e,r=`stroke-width="${i}" stroke="#${o.toString(16).padStart(6,0)}"`;return`<path d="${K$(t)}" ${r}/>`}parse(e){let t=e.querySelector("path"),i=J$(t.getAttribute("d")),o=t.getAttribute("stroke")?.substring(1),r=t.getAttribute("stroke-width");return{curves:i,lineWidth:parseFloat(r),lineColor:parseInt(o,16)}}},gTt=class{constructor(){this.drawingSvgParsers=new Map,[new dTt,new uTt,new ATt,new hTt,new fTt,new pTt].map(e=>this.drawingSvgParsers.set(e.drawingType,e))}parse(e){try{let t=new DOMParser().parseFromString(e.content,"image/svg+xml"),i=t.querySelector("svg").getAttribute("type"),o=+t.querySelector("svg").getAttribute("data-bimdata-elevation"),r=this.drawingSvgParsers.get(i);if(!r)throw TypeError(`No drawing parser for type ${i}`);let n=r.parse(t);return n.apiId=e.id,n.type=i,n.z=o,n}catch(t){console.warn(`[Drawing Tools - Parser] Error parsing drawing ${e.id}, ignored.`,t)}}toString(e){let{type:t,z:i}=e,o=this.drawingSvgParsers.get(t);if(!o)throw TypeError(`No drawing parser for type ${t}`);return`<svg type="${t}" data-bimdata-elevation="${i}" xmlns="http://www.w3.org/2000/svg">${o.toString(e)}</svg>`}},mTt=class{constructor(e){this._api=e,this._parser=new gTt,this.queue=h1()}async getDrawingsData(e){let{cloudId:t,projectId:i}=this._api;return(await this._api.apiClient.modelApi.getDrawings(t,e,i)).map(o=>this._parser.parse(o)).filter(Boolean)}save(e,t){let i=this._parser.toString(e);if(!i)return;let{cloudId:o,projectId:r}=this._api,n={content:i},a;a=e.apiId?async()=>{try{await this._api.apiClient.modelApi.updateDrawing(o,e.apiId,t,r,n)}catch(s){console.error(`Cannot update drawing of type: "${e.type}"`,s)}}:async()=>{try{e.apiId=(await this._api.apiClient.modelApi.createDrawing(o,t,r,n)).id}catch(s){console.error(`Cannot create drawing of type: "${e.type}"`,s)}},this.queue.push(a)}async delete(e,t){if(!e.apiId)return;let{cloudId:i,projectId:o}=this._api;try{await this._api.apiClient.modelApi.deleteDrawing(i,e.apiId,t,o)}catch(r){console.error(`Cannot delete drawing of type: "${e.type}"`,r)}}},Z$=class{constructor(e){this.drawingTypes=e}pick(e,t){throw Error("Not implemented")}},vTt=class extends Z${constructor(e){super(["rectangle","ellipse","arrow","line","freehand"]),this._engine2d=e}pick(e,t){let{canvasPosition:i}=t,o=this._engine2d.picker.pick(i);if(o)return e.get(o.id)}},yTt=class extends Z${constructor(){super(["text"])}pick(e,t){let{mouseEvent:i}=t,o=i.target;return e.get(o.id)}},W$=class{constructor(e,t){if(!e)throw TypeError("Drawing type is required");this.type=e,this.z=t}destroy(){throw Error("Method 'destroy' not implemented.")}},Y$=class{constructor(e){this.drawingTypes=e}create(e,t){throw Error("Not implemented")}},wTt="data:image/svg+xml,%3csvg%20width='17'%20height='17'%20viewBox='0%200%2017%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.5%200C3.80611%200%200%203.80611%200%208.5C0%2013.1939%203.80611%2017%208.5%2017C9.28389%2017%209.91667%2016.3672%209.91667%2015.5833C9.91667%2015.215%209.775%2014.8844%209.54833%2014.6294C9.33111%2014.3839%209.18944%2014.0533%209.18944%2013.6944C9.18944%2012.9106%209.82222%2012.2778%2010.6061%2012.2778H12.2778C14.8844%2012.2778%2017%2010.1622%2017%207.55556C17%203.38111%2013.1939%200%208.5%200ZM3.30556%208.5C2.52167%208.5%201.88889%207.86722%201.88889%207.08333C1.88889%206.29944%202.52167%205.66667%203.30556%205.66667C4.08944%205.66667%204.72222%206.29944%204.72222%207.08333C4.72222%207.86722%204.08944%208.5%203.30556%208.5ZM6.13889%204.72222C5.355%204.72222%204.72222%204.08944%204.72222%203.30556C4.72222%202.52167%205.355%201.88889%206.13889%201.88889C6.92278%201.88889%207.55556%202.52167%207.55556%203.30556C7.55556%204.08944%206.92278%204.72222%206.13889%204.72222ZM10.8611%204.72222C10.0772%204.72222%209.44444%204.08944%209.44444%203.30556C9.44444%202.52167%2010.0772%201.88889%2010.8611%201.88889C11.645%201.88889%2012.2778%202.52167%2012.2778%203.30556C12.2778%204.08944%2011.645%204.72222%2010.8611%204.72222ZM13.6944%208.5C12.9106%208.5%2012.2778%207.86722%2012.2778%207.08333C12.2778%206.29944%2012.9106%205.66667%2013.6944%205.66667C14.4783%205.66667%2015.1111%206.29944%2015.1111%207.08333C15.1111%207.86722%2014.4783%208.5%2013.6944%208.5Z'%20fill='white'/%3e%3c/svg%3e",bTt="url(data:image/svg+xml,%3csvg%20width='10'%20height='15'%20viewBox='0%200%2010%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5%201.96296V7.5M5%201.96296L3%201H1M5%201.96296L7%201H9M5%2013.037V7.5M5%2013.037L7%2014H9M5%2013.037L3%2014H1M5%207.5H7M5%207.5H3'%20stroke='%232F374A'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e) 5 7, auto",CTt=4,xTt=40,X$=4,BTt=2,kTt={props:{id:{type:String,required:!0},newMarker:{type:Boolean,default:!1},textToolEnabled:{type:Boolean,required:!0},rotation:{type:Number,required:!0},scale:{type:Number,required:!0},initText:{type:String,default:""},initSize:{type:Number,default:12},initColor:{type:String,default:"000000"}},emits:["edit-update","text-update","size-update","color-update","delete-marker","delete-drawing"],setup(e,{emit:t}){let i=bt("$viewer").localContext.viewer.viewer.canvas,o=pe(e.newMarker),r=pe(e.initText),n=pe(e.initSize),a=pe(e.initColor);xt(r,x=>t("text-update",x)),xt(n,x=>t("size-update",x)),xt(a,x=>t("color-update",x));let s=pe(null),l=()=>s.value?.focus(),c=pe(null),d=pe(null),u=pe(null);async function A(){if(!o.value)return;await Ir();let{width:x}=c.value.getBoundingClientRect();d.value=x+12,u.value=1,await Ir();let{scrollHeight:B}=s.value;u.value=B+2}xt([()=>e.scale,o,r,n],A);let h=()=>{e.textToolEnabled&&(o.value=!0)},p=x=>{x.key==="Escape"&&(o.value=!1)};xt(o,async x=>{t("edit-update",x),x?(document.addEventListener("keydown",p),await Ir(),l()):(document.removeEventListener("keydown",p),v.value=!1)});let f=je(()=>n.value/(BTt*window.devicePixelRatio)),m=()=>{n.value>CTt&&(n.value-=X$),l()},g=()=>{n.value<xTt&&(n.value+=X$),l()},y=pe(null),v=pe(!1),C=pe(!1);return Di(()=>{A(),l()}),{paletteSvg:wTt,textCursor:bTt,textarea:s,textEl:c,colorElement:y,edit:o,text:r,textAreaWidth:d,textAreaHeight:u,size:f,sizeRef:n,color:a,colorSelectorDisplayed:v,colorSelectorTop:C,onTextClick:h,decrementSize:m,incrementSize:g,onTextColorClick:()=>{if(v.value=!v.value,v.value){let{y:x,height:B}=i.getBoundingClientRect(),{y:E}=y.value.getBoundingClientRect();C.value=E>x+B/2}},onTextColorUpdate:x=>{a.value=x,v.value=!1,l()},onDeleteClick:()=>{t("delete-marker"),t("delete-drawing")}}}},ETt=["id"],MTt={key:0},PTt={class:"bimdata-drawing-tools__text-marker__edit-content",style:"transform: translate(-1px, -1px)"},ITt={class:"bimdata-drawing-tools__text-marker__edit-content__header"},STt=["src"];function DTt(e,t,i,o,r,n){let a=I("BIMDataColorSelector"),s=I("BIMDataIconDelete"),l=Li("click-away");return k(),N("div",{class:"bimdata-drawing-tools__text-marker",style:ve(`font-size:${o.size}px; z-index: ${o.edit?1:0};`)},[w("div",{style:ve(`cursor: ${i.textToolEnabled?o.textCursor:""}`)},[w("div",{ref:"textEl",class:"bimdata-drawing-tools__text-marker__text",style:ve(`
|
|
2552
2552
|
font-size:${o.size}px;
|
|
2553
2553
|
transform-origin: top left;
|
|
2554
2554
|
transform: scale(${i.scale});
|
|
@@ -6438,5 +6438,5 @@ void main() {
|
|
|
6438
6438
|
--bimdata-local-context-width: ${o.width}px;
|
|
6439
6439
|
--bimdata-local-context-center-width: ${o.centerWidth}px;
|
|
6440
6440
|
--bimdata-local-context-resolution: ${o.resolution};
|
|
6441
|
-
`),onMouseenter:t[0]||=(...A)=>o.onMouseEnter&&o.onMouseEnter(...A),onMouseleave:t[1]||=(...A)=>o.onMouseLeave&&o.onMouseLeave(...A)},[T(a,{ref:"modalManagerTemplateRef"},null,512),w("div",VJt,[o.windowPlugins.leftSidePanel?(k(),W(s,{key:0,plugin:o.windowPlugins.leftSidePanel},null,8,["plugin"])):le("",!0),w("div",jJt,[(k(!0),N(ut,null,Vt(o.windowPlugins.free,A=>(k(),W(l,{key:A.name,class:ye({"window-container__content__center__viewer":A.isViewer}),plugin:A},null,8,["class","plugin"]))),128)),T(c,{position:"left",plugins:o.windowPlugins.leftButtonColumn},null,8,["plugins"]),T(c,{position:"right",plugins:o.windowPlugins.rightButtonColumn},null,8,["plugins"])]),o.windowPlugins.rightSidePanel?(k(),W(s,{key:1,plugin:o.windowPlugins.rightSidePanel},null,8,["plugin"])):le("",!0)]),o.loading?(k(),N("div",QJt,[o.spinner&&o.spinner.component?(k(),W(qr(o.spinner.component),Cs(la({key:0},o.spinner.props)),null,16)):(k(),W(d,{key:1,size:"20px",border:"3px"}))])):le("",!0),o.layoutSettingsDisplayed?(k(),N("div",zJt,[T(u)])):le("",!0)],36)}var GJt=Q(HJt,[["render",qJt],["__scopeId","data-v-485f288e"]]),KJt=class{constructor(e=!0){let t=UKt(b4,null,{resizable:e});t.registerContent("default",GJt),this.settings=qo({edit:!1,swap:!1,full:!1}),this.areas=t}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?OKt(e):null}copy(e,t=!0){return NKt(this.areas.layout,e,t)}open({ratio:e,direction:t,insertAfter:i,windowName:o=null,windowState:r=null,localContextId:n=null}={}){let a=o?{options:{windowName:o,windowState:r}}:null;return n===null?this.areas.splitLayout(e,t,i,a):this.areas.split(n,e,t,i,a)}swap(e,t){return this.areas.swap(e,t)}close(e){return this.areas.delete(e)}compare(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;if(typeof e=="string"&&typeof t=="string")return e===t;if(typeof e=="string"||typeof t=="string")return!1;if(e.windowName&&t.windowName){if(e.windowName!==t.windowName)return!1;let i=new Set(e.windowState?.modelIds),o=new Set(t.windowState?.modelIds);return i.size===o.size&&[...i].every(r=>o.has(r))}return e.windowName||t.windowName||e.direction!==t.direction||e.children.length!==t.children.length?!1:e.children.every((i,o)=>this.compare(i,t.children[o]))}},JJt={name:"@bimdata/viewer",type:"module",version:"2.17.0-beta.5",description:"A customizable BIM viewer.",keywords:["bim","viewer","bimdata","ifc","bcf"],types:"./index.d.ts",author:"BIMData.io",homepage:"https://developers.bimdata.io/viewer/index.html",repository:{url:"https://github.com/bimdata/viewer"},bugs:{email:"support@bimdata.io"},browserslist:["last 2 chrome version","last 2 firefox version"],main:"dist/bimdata-viewer.esm.min.js",module:"dist/bimdata-viewer.esm.min.js",scripts:{dev:"vite -c build/vite.config.dev.js",build:"node scripts/build.mjs","build:prod":"vite build -c build/vite.config.prod.js && esbuild dist/bimdata-viewer.esm.min.js --minify --outfile=dist/bimdata-viewer.esm.min.js --allow-overwrite","build:offline":"vite build -c build/vite.config.offline.js && esbuild dist/bimdata-viewer.offline.esm.min.js --minify --outfile=dist/bimdata-viewer.offline.esm.min.js --allow-overwrite","build:runtime":"vite build -c build/vite.config.runtime.js && esbuild dist/bimdata-viewer.runtime.esm.min.js --minify --outfile=dist/bimdata-viewer.runtime.esm.min.js --allow-overwrite","build:split":"vite build -c build/vite.config.split.js && esbuild dist/bimdata-viewer.split.esm.min.js --minify --outfile=dist/bimdata-viewer.split.esm.min.js --allow-overwrite","build:umd":"vite build -c build/vite.config.umd.js && esbuild dist/bimdata-viewer.umd.cjs --minify --outfile=dist/bimdata-viewer.umd.min.cjs","cy:run":"cypress run","cy:open":"cypress open",prebuild:"rm -rf dist",prepublishOnly:"npm run build","semantic-release":"semantic-release",serve:"http-server -c-1 --silent",test:"npm run test:unit & npm run build & npm run test:e2e","test:unit":"jest","test:e2e":"start-server-and-test 'npm run serve -- -p 8080' http://localhost:8080 cy:run","test:e2e-dev":"start-server-and-test 'npm run serve -- -p 8080' http://localhost:8080 cy:open",version:"echo $npm_package_version",ts:"tsc"},files:["dist/*","types/*","CHANGELOG.md","README.md","package.json","package-lock.json","index.d.ts"],devDependencies:{"@babel/preset-env":"^7.29.0","@bimdata/2d-engine":"2.6.7","@bimdata/areas-next":"0.1.17","@bimdata/bcf-components":"6.7.7","@bimdata/components":"1.10.1","@bimdata/design-system":"2.3.0","@bimdata/engine-2d":"0.0.23","@bimdata/html-to-image":"1.11.16","@bimdata/typescript-fetch-api-client":"10.33.0","@eslint/eslintrc":"^3.3.4","@eslint/js":"^10.0.1","@photo-sphere-viewer/core":"^5.14.1","@rollup/plugin-alias":"^6.0.0","@rollup/plugin-babel":"^7.0.0","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-image":"^3.0.3","@rollup/plugin-replace":"^6.0.3","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/git":"^10.0.1","@semantic-release/github":"^12.0.6","@semantic-release/npm":"^13.1.5","@semantic-release/release-notes-generator":"^14.1.0","@vitejs/plugin-vue":"^6.0.4","@xeokit/xeokit-sdk":"git+https://git@github.com/Amoki/xeokit-sdk.git#b3227526bbbe8ac49c8c0c1d121363ca79781824","@zip.js/zip.js":"^2.8.21",async:"^3.2.6",autoprefixer:"^10.4.27","babel-core":"^7.0.0-bridge.0","babel-jest":"^30.2.0","conventional-changelog-eslint":"^6.0.0",cypress:"^15.11.0",esbuild:"^0.27.3",eslint:"^10.0.2","eslint-config-prettier":"^10.1.8","eslint-plugin-cypress":"^6.1.0","eslint-plugin-jest":"^29.15.0","eslint-plugin-prettier":"^5.5.5","eslint-plugin-vue":"^10.8.0",globals:"^17.4.0",html2canvas:"^1.4.1","http-server":"^14.1.1",jest:"^30.2.0","jest-environment-jsdom":"^30.2.0",lodash:"^4.17.23","pdfjs-dist":"^5.5.207",postcss:"^8.5.6",prettier:"^3.8.1","sass-embedded":"^1.97.3","semantic-release":"^25.0.3","start-server-and-test":"^2.1.5",vite:"^8.0.0","vite-plugin-css-injected-by-js":"^4.0.1",vue:"^3.5.29","vue-eslint-parser":"^10.4.0","vue-i18n":"^11.2.8"}},ZJt=1,WJt=class{math=BKe;constructor({plugins:e,api:t,ui:i,locale:o="fr"}){this.instanceId=ZJt++,this.pluginManager=new Pzt(e),this.windowManager=new Szt,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new QGt(t),this.globalContext=new dfe(this),this.state=iKt(this),this.shortcutManager=pde(this.state),this.uiSettings=i||{},this.i18n=new lfe(o),this._contextMenu=null,this.layout=new KJt(this.uiSettings.resizable!==!1),this._darkTheme=pe(i?.darkTheme??!1),this.localContext=null,window.$viewer=this}get darkTheme(){return this._darkTheme.value}set darkTheme(e){this._darkTheme.value=e}get version(){return JJt.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||Ade}set contextMenu(e){this._contextMenu=e}get registeredWindows(){return[...this.windowManager.registeredWindows.keys()]}get registeredPlugins(){return[...this.pluginManager.registeredPlugins.keys()]}get pluginsCfg(){return this.pluginManager.cfg}registerPlugin(e){this.pluginManager.registerPlugin(e),this.windowManager.registerAndAddPluginsToWindows([e])}};function YJt(e,t={}){t.backgroundColor&&(e.style.setProperty("--bimdata-viewer-background-color",t.backgroundColor),t.backgroundColor==="transparent"&&e.style.setProperty("--areas-separator-color","transparent")),t.colorPrimary&&e.style.setProperty("--color-primary",t.colorPrimary),t.colorPrimaryLighter&&e.style.setProperty("--color-primary-lighter",t.colorPrimaryLighter),t.colorPrimaryLight&&e.style.setProperty("--color-primary-light",t.colorPrimaryLight),t.colorPrimaryDark&&e.style.setProperty("--color-primary-dark",t.colorPrimaryDark),t.colorSecondary&&e.style.setProperty("--color-secondary",t.colorSecondary),t.colorSecondaryLighter&&e.style.setProperty("--color-secondary-lighter",t.colorSecondaryLighter),t.colorSecondaryLight&&e.style.setProperty("--color-secondary-light",t.colorSecondaryLight),t.colorSecondaryDark&&e.style.setProperty("--color-secondary-dark",t.colorSecondaryDark),t.colorSilverLight&&e.style.setProperty("--color-silver-light",t.colorSilverLight),t.colorSilver&&e.style.setProperty("--color-silver",t.colorSilver),t.colorSilverDark&&e.style.setProperty("--color-silver-dark",t.colorSilverDark),t.colorGraniteLight&&e.style.setProperty("--color-granite-light",t.colorGraniteLight),t.colorGranite&&e.style.setProperty("--color-granite",t.colorGranite),t.colorSuccess&&e.style.setProperty("--color-success",t.colorSuccess),t.colorSuccessLighter&&e.style.setProperty("--color-success-Lighter",t.colorSuccessLighter),t.colorSuccessLight&&e.style.setProperty("--color-success-Light",t.colorSuccessLight),t.colorSuccessDark&&e.style.setProperty("--color-success-Dark",t.colorSuccessDark),t.colorWarning&&e.style.setProperty("--color-warning",t.colorWarning),t.colorWarningLighter&&e.style.setProperty("--color-warning-Lighter",t.colorWarningLighter),t.colorWarningLight&&e.style.setProperty("--color-warning-Light",t.colorWarningLight),t.colorWarningDark&&e.style.setProperty("--color-warning-Dark",t.colorWarningDark),t.colorHigh&&e.style.setProperty("--color-high",t.colorHigh),t.colorHighLighter&&e.style.setProperty("--color-high-lighter",t.colorHighLighter),t.colorHighLight&&e.style.setProperty("--color-high-light",t.colorHighLight),t.colorHighDark&&e.style.setProperty("--color-high-dark",t.colorHighDark),t.colorText&&e.style.setProperty("--color-text",t.colorText),(!t.backgroundColor||t.backgroundColor!=="transparent")&&e.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),t.headerHeight!=null&&e.style.setProperty("--bimdata-viewer-header-height",t.headerHeight),e.style.setProperty("--areas-background-color","transparent")}var XJt=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),X0=Object.freeze({READ:"read",WRITE:"write"});function rne(e){let t={};return e.forEach(i=>{let[o,r]=i.split(":");t[o]?t[o].push(r):t[o]=[r]}),t}var $Jt={token_scopes:[],usable_scopes:[],user_role:25};function one(e=$Jt){let t=rne(e.token_scopes),i=rne(e.usable_scopes);return{...hj(e),tokenScopes:t,usableScopes:i,userRole:XJt[e.user_role],user:e.user?hj(e.user):null,hasBcfReadPermission:i.bcf?.includes(X0.READ)??!1,hasBcfWritePermission:i.bcf?.includes(X0.WRITE)??!1,hasModelReadPermission:i.model?.includes(X0.READ)??!1,hasModelWritePermission:i.model?.includes(X0.WRITE)??!1,hasDocReadPermission:i.document?.includes(X0.READ)??!1,hasDocWritePermission:i.document?.includes(X0.WRITE)??!1}}var eZt={de:{BcfComponents:{back:"Zur\xFCck",BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zur\xFCcksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{title:"BCF-Parameter",text:"Erstellen, f\xFCllen und listen Sie die BCF-Einstellungen auf, die Sie f\xFCr dieses Projekt haben m\xF6chten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"F\xFCgen Sie Fragen hinzu, um zugeh\xF6rige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorit\xE4t",PriorityNotDefined:"Keine Priorit\xE4t",PriorityTitle:"Priorit\xE4ten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorit\xE4t",noPriority:"Keine",assignedTo:"Zugewiesen an",elements:"Elemente",notSpecified:"Nicht definiert",see:"Anzeigen"},BcfTopicCreationCard:{text:"Ein neues BCF-Thema erstellen",createBcfSideTitle:"Ein Problem melden"},BcfTopicForm:{dragDropImageText:"Bitte w\xE4hlen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"F\xFCgen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"F\xE4lligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Best\xE4tigen",updateButton:"\xC4nderungen \xFCbernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte \xC4nderungen.",cancelButton:"\xC4nderungen verwerfen",continueButton:"\xC4nderungen fortsetzen",createTitle:"Ein Problem melden",dragDropImageTextTablet:"Foto machen",takeSnapshot:"Mach einen Schnappschuss",importFile:"Eine Datei importieren",searchPlaceholder:"Suchen",emptySearch:"kein Ergebnis",documentsLabel:"Dokumente",documentsCount:"Dokumente \u2013 {count} ausgew\xE4hlte Dokumente",groupsLabel:"Berechtigungen",groupsCount:"Berechtigungen \u2013 {count} ausgew\xE4hlte Gruppen",groupsText:"W\xE4hlen Sie die Benutzergruppen aus, die dieses Thema sehen und damit interagieren d\xFCrfen.",validate:"Best\xE4tigen"},BcfTopicOverview:{openViewer:"Im Viewer \xF6ffnen",openViewerNoModels:"Es sind keine Vorlagen zur Ansicht bereit",elements:"{count} Elemente",noElements:"kein Element",type:"Typ",noTypeSpecified:"Kein Typ angegeben",description:"Beschreibung",noDescriptionProvided:"Keine Beschreibung angegeben",assignedTo:"Zugeteilt an",notAssigned:"Nicht zugewiesen",dueDate:"F\xE4lligkeitsdatum",noDueDate:"Kein F\xE4lligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorit\xE4t",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar ver\xF6ffentlichen",deleteText:"Sie l\xF6schen jetzt {Name}",deleteBcfButton:"Dieses BCF l\xF6schen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE4t",status:"Status",title:"Titel",creator:"Autor",date:"Datum"}},BcfTopicActionsCell:{seeButton:"Anzeigen"},BcfTopicComments:{commentButton:"Ein Kommentar verfassen",commentLabel:"Ein Kommentar verfassen",commentText:"Kommentar",cancelButton:"Abbrechen",publishButton:"Ver\xF6ffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar l\xF6schen?",deleteButton:"L\xF6schen",takeSnapshot:"Mach einen Schnappschuss",edited:"bearbeitet"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzuf\xFCgen",cancelButton:"Abbrechen",validateButton:"Best\xE4tigen",deleteExtensionText:"Diesen Parameter l\xF6schen",deleteButton:"L\xF6schen",title:{Priority:"Priorit\xE4ten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorit\xE4t hinzuf\xFCgen",Label:"Ein neues Etikett hinzuf\xFCgen",Status:"Einen neuen Status hinzuf\xFCgen",Type:"Einen neuen Typ hinzuf\xFCgen",Stage:"Eine neue Phase hinzuf\xFCgen"},text:{Priority:"Liste der Priorit\xE4ten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}}},en:{BcfComponents:{back:"Back",BcfFilters:{filtersButton:"Filters",filtersTitle:"Filters",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",creatorsLabel:"Created by",tagsLabel:"Tags",resetButton:"Reset",searchButton:"Search",undefined:"Not defined",datePlaceholder:"Creation date"},BcfSettings:{title:"BCF Settings",text:"Create, enter in, and list the BCF settings you would like to have for this project",validateButton:"Validate BCF settings"},BcfStatistics:{emptyText:"Add BCF Topics to start to have some stats here.",issues:"issues",extension:{Priority:"Priority",PriorityNotDefined:"No priority",PriorityTitle:"Priorities",Status:"Status",StatusNotDefined:"No status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priority",noPriority:"None",assignedTo:"Assigned to",elements:"Elements",notSpecified:"Not specified",see:"See"},BcfTopicCreationCard:{text:"Create a new BCF topic",createBcfSideTitle:"Report a problem"},BcfTopicForm:{dragDropImageText:"Please select a file",addObjectButton:"Object",addAnnotationButton:"Annotation",annotationButtonTooltip:"This topic has no viewpoint",addPictureButton:"Add a picture",titlePlaceholder:"Title *",titleErrorMessage:"Missing title",typeLabel:"Type",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",dueDateLabel:"Due date",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Validate",updateButton:"Modify this BCF",modalText:"You are about to quit editing issue {name} but there are unsaved changes.",cancelButton:"Discard changes",continueButton:"Continue editing",createTitle:"Report a problem",dragDropImageTextTablet:"Take a picture",takeSnapshot:"Take a snapshot",importFile:"Import a file",searchPlaceholder:"Search",emptySearch:"No result",documentsLabel:"Add a file",documentsCount:"Files - {count} selected files",groupsLabel:"Permissions",groupsCount:"Permissions - {count} selected groups",groupsText:"You are now setting the access rights: choose the user group(s) that will be exclusively authorized to see and interact with this topic.",validate:"Validate"},BcfTopicOverview:{openViewer:"Open in viewer",openViewerNoModels:"No model to open",elements:"{count} Elements",noElements:"No element",type:"Type",noTypeSpecified:"No type specified",description:"Description",noDescriptionProvided:"No description provided",assignedTo:"Assigned to",notAssigned:"Not assigned",dueDate:"Due date",noDueDate:"No due date",informations:"Informations",status:"Status",noStatusSpecified:"No status specified",stage:"Stage",noStageProvided:"No stage provided",priority:"Priority",priorityNotDefined:"Not defined",tags:"Tags",noTags:"No tags",commentButton:"Post a comment",deleteText:"You are about to delete {name}",deleteBcfButton:"Delete this BCF",keepBcfButton:"Keep this BCF",author:"Author"},BcfTopicsTable:{headers:{index:"#",priority:"Priority",status:"Status",title:"Title",creator:"Author",date:"Date"}},BcfTopicActionsCell:{seeButton:"See"},BcfTopicComments:{commentButton:"Post a comment",commentLabel:"Post a comment",commentText:"Comment",cancelButton:"Cancel",publishButton:"Publish",commentsText:"Comments",deleteCommentText:"Delete this comment ?",deleteButton:"Delete",takeSnapshot:"Take a snapshot",edited:"edited"},BcfTopicPriorityCell:{noPriority:"None"},SettingCard:{addButton:"add an element",cancelButton:"Cancel",validateButton:"Validate",deleteExtensionText:"Remove this setting",deleteButton:"Delete",title:{Priority:"Priorities",Label:"Labels",Status:"Status",Type:"Types",Stage:"Stages"},input:{Priority:"Add a new priority",Label:"Add a new label",Status:"Add new status",Type:"Add a new type",Stage:"Add a new stage"},text:{Priority:"Priority list",Label:"Labels list",Status:"Status list",Type:"Type list",Stage:"Stage list"}}}},es:{BcfComponents:{back:"Volver",BcfFilters:{filtersButton:"Filtros",filtersTitle:"Filtros",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",creatorsLabel:"Creado por",tagsLabel:"Etiquetas:",resetButton:"Restablecer",searchButton:"Buscar en",undefined:"No definido",datePlaceholder:"Fecha de creaci\xF3n"},BcfSettings:{title:"Par\xE1metros del BCF",text:"Cree, rellene y enumere los par\xE1metros del BCF que desea tener en este proyecto",validateButton:"Validar los par\xE1metros del BCF"},BcfStatistics:{emptyText:"A\xF1ada preguntas para ver las estad\xEDsticas asociadas aqu\xED.",issues:"problemas",extension:{Priority:"Prioridad",PriorityNotDefined:"Sin prioridad",PriorityTitle:"Prioridades",Status:"Estado",StatusNotDefined:"Sin estado",StatusTitle:"Estatutos"}},BcfTopicCard:{priority:"Prioridad",noPriority:"Sin",assignedTo:"Asignado a",elements:"Elementos",notSpecified:"No definido",see:"Ver"},BcfTopicCreationCard:{text:"Crear un nuevo tema BCF",createBcfSideTitle:"Informar de un problema"},BcfTopicForm:{dragDropImageText:"Seleccione un archivo",addObjectButton:"Objeto",addAnnotationButton:"Anotaci\xF3n",annotationButtonTooltip:"Actualmente este tema no posee ning\xFAn punto de vista",addPictureButton:"A\xF1adir una imagen",titlePlaceholder:"T\xEDtulo *",titleErrorMessage:"Falta el t\xEDtulo",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripci\xF3n",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Est\xE1 a punto de salir de la edici\xF3n del problema de {name} pero hay cambios sin guardar.",cancelButton:"Cancelar los cambios",continueButton:"Continuar con los cambios",createTitle:"Informar de un problema",dragDropImageTextTablet:"Tomar una fotograf\xEDa",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ning\xFAn modelo listo para la visualizaci\xF3n",elements:"{count} Elementos",noElements:"Ning\xFAn elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripci\xF3n",noDescriptionProvided:"No hay descripci\xF3n",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Informaci\xF3n",status:"Estado",noStatusSpecified:"No se especifica el estado",stage:"Fase",noStageProvided:"No se indica ninguna fase",priority:"Prioridad",priorityNotDefined:"No definido",tags:"Etiquetas",noTags:"Sin etiquetas",commentButton:"Publicar un comentario",deleteText:"Est\xE1s a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"T\xEDtulo",creator:"Autor",date:"Fecha"}},BcfTopicActionsCell:{seeButton:"Ver"},BcfTopicComments:{commentButton:"Publicar un comentario",commentLabel:"Publicar un comentario",commentText:"Comentario",cancelButton:"Cancelar",publishButton:"Publicar",commentsText:"comentarios",deleteCommentText:"\xBFBorrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"a\xF1adir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuraci\xF3n",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"A\xF1adir una nueva prioridad",Label:"A\xF1adir una nueva etiqueta",Status:"A\xF1adir un nuevo estado",Type:"A\xF1adir un nuevo tipo",Stage:"A\xF1adir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}}},fr:{BcfComponents:{back:"Retour",BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",creatorsLabel:"Cr\xE9\xE9 par",tagsLabel:"Tags",resetButton:"R\xE9initialiser",searchButton:"Rechercher",undefined:"Non d\xE9fini",datePlaceholder:"Date de cr\xE9ation"},BcfSettings:{title:"Param\xE8tres BCF",text:"Cr\xE9ez, renseignez et listez les param\xE8tres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les param\xE8tres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associ\xE9es ici.",issues:"probl\xE8mes",extension:{Priority:"Priorit\xE9",PriorityNotDefined:"Aucune priorit\xE9",PriorityTitle:"Priorit\xE9s",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorit\xE9",noPriority:"Aucune",assignedTo:"Assign\xE9 \xE0",elements:"{n} \xC9lements",notSpecified:"Non d\xE9fini",see:"Voir"},BcfTopicCreationCard:{text:"Cr\xE9er un nouveau topic BCF",createBcfSideTitle:"Signaler un probl\xE8me"},BcfTopicForm:{dragDropImageText:"Veuillez s\xE9lectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne poss\xE8de actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",dueDateLabel:"Date d'\xE9ch\xE9ance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous \xEAtes sur le point de quitter l'\xE9dition de l'issue {name} mais il y'a des modifications non enregistr\xE9es.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un probl\xE8me",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de r\xE9sultat",documentsLabel:"Documents",documentsCount:"Documents - {count} documents s\xE9lectionn\xE9s",groupsLabel:"Permissions",groupsCount:"Permissions - {count} groupes s\xE9lectionn\xE9s",groupsText:"S\xE9lectionner les groupes utilisateur qui peuvent voir ce topic et int\xE9ragir avec.",validate:"Valider"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun mod\xE8le pr\xEAt pour une visualisation",elements:"{count} \xC9lements",noElements:"Aucun \xE9l\xE9ment concern\xE9",type:"Type",noTypeSpecified:"Pas de type sp\xE9cifi\xE9",description:"Description",noDescriptionProvided:"Pas de description renseign\xE9e",assignedTo:"Assign\xE9 \xE0",notAssigned:"Non assign\xE9",dueDate:"\xC9ch\xE9ance",noDueDate:"Pas de date d'\xE9ch\xE9ance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut sp\xE9cifi\xE9",stage:"Phase",noStageProvided:"Pas de phase renseign\xE9e",priority:"Priorit\xE9",priorityNotDefined:"Non d\xE9fini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous \xEAtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE9",status:"Statut",title:"Titre",creator:"Auteur",date:"Date"}},BcfTopicActionsCell:{seeButton:"Voir"},BcfTopicComments:{commentButton:"Poster un commentaire",commentLabel:"Poster un commentaire",commentText:"Commentaire",cancelButton:"Annuler",publishButton:"Publier",commentsText:"commentaires",deleteCommentText:"Supprimer ce commentaire ?",deleteButton:"Supprimer",takeSnapshot:"Prendre un snapshot",edited:"edit\xE9"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un \xE9l\xE9ment",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce param\xE8tre",deleteButton:"Supprimer",title:{Priority:"Priorit\xE9s",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorit\xE9",Label:"Ajouter un nouveau label",Status:"Ajouter un nouveau statut",Type:"Ajouter un nouveau type",Stage:"Ajouter une nouvelle phase"},text:{Priority:"Liste des priorit\xE9s",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}}},it:{BcfComponents:{back:"Indietro",BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",datePlaceholder:"Data di creazione",assignedToLabel:"Assegnato a",creatorsLabel:"Creato da",tagsLabel:"Etichette",resetButton:"Ripristina",searchButton:"Cerca",undefined:"Non definito"},BcfSettings:{title:"Parametri BCF",text:"Creare, notificare e elencare i parametri BCF che si desidera avere su questo progetto",validateButton:"Conferma i parametri BCF"},BcfStatistics:{emptyText:"Aggiungi delle domande per vedere le statistiche associate qui.",issues:"problemi",extension:{Priority:"Priorit\xE0",PriorityNotDefined:"Nessuna priorit\xE0",PriorityTitle:"Priorit\xE0",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorit\xE0",noPriority:"Nessuno",assignedTo:"Assegnato a",elements:"Elementi",noElements:"0 elementi",notSpecified:"Non definito",see:"Visualizza"},BcfTopicCreationCard:{text:"Crea un nuovo topic BCF",createBcfSideTitle:"Segnala un problema"},BcfTopicForm:{dragDropImageText:"Selezionare un file",addObjectButton:"Oggetto",addAnnotationButton:"Annotazione",annotationButtonTooltip:"Attualmente questo argomento non presenta alcun punto di vista",addPictureButton:"Aggiungere un'immagine",titlePlaceholder:"Titolo *",titleErrorMessage:"Titolo mancante",typeLabel:"Tipo",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",assignedToLabel:"Assegnato a",dueDateLabel:"Data di scadenza",descriptionLabel:"Descrizione",labelsLabel:"Tag",createButton:"Conferma",updateButton:"Modificare questo BCF",modalText:"State per abbandonare la modifica di {name} ma ci sono modifiche non salvate.",cancelButton:"Annullare le modifiche",continueButton:"Continuare le modifiche",createTitle:"Segnala un problema"},BcfTopicOverview:{openViewer:"Apri nel visualizzatore",openViewerNoModels:"Non esistono modelli pronti per la visualizzazione",elements:"{count} Elementi",noElements:"Nessun elemento",type:"Tipo",noTypeSpecified:"Nessun tipo specificato",description:"Descrizione",noDescriptionProvided:"Nessuna descrizione inserita",assignedTo:"Assegnato a",notAssigned:"Non assegnato",dueDate:"Scadenza",noDueDate:"Nessuna data di scadenza",informations:"Informazioni",status:"Stato",noStatusSpecified:"Nessuno stato specificato",stage:"Fase",noStageProvided:"Nessuna fase inserita",priority:"Priorit\xE0",priorityNotDefined:"Non definita",tags:"Etichette",noTags:"Nessuna etichetta",commentButton:"Pubblica un commento",deleteText:"Stai per eliminare {name}",deleteBcfButton:"Elimina questo BCF",keepBcfButton:"Conserva questo BCF",author:"Autore"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE0",status:"Stato",title:"Titolo",creator:"Autore",date:"Data"}},BcfTopicActionsCell:{seeButton:"Visualizza"},BcfTopicComments:{commentButton:"Pubblica un commento",commentLabel:"Pubblica un commento",commentText:"Commento",cancelButton:"Annulla",publishButton:"Pubblica",commentsText:"commenti",deleteCommentText:"Eliminare questo commento?",deleteButton:"Elimina"},BcfTopicPriorityCell:{noPriority:"Nessuno"},SettingCard:{addButton:"aggiungi un elemento",cancelButton:"Annulla",validateButton:"Conferma",deleteExtensionText:"Elimina questo parametro",deleteButton:"Elimina",title:{Priority:"Priorit\xE0",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorit\xE0",Label:"Aggiungi una nuova etichetta",Status:"Aggiungi un nuovo stato",Type:"Aggiungi un nuovo tipo",Stage:"Aggiungi una nuova fase"},text:{Priority:"Elenco delle priorit\xE0",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}}}},tZt=({apiClient:e,fetchUsers:t,i18nPlugin:i}={})=>({install(o){e?fr.setup({apiClient:e,fetchUsers:t}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),i?Object.entries(eZt).forEach(([r,n])=>{i.global.mergeLocaleMessage(r,n)}):console.warn("[BCF Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(o3e).forEach(([r,n])=>{o.component(r,n)})}}),iZt={de:{BuildingMaker:{title:"Building Maker",back:"Zur\xFCck",list:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",createButton:"Neues Projekt",updateButton:"Umbenennen",deleteButton:"L\xF6schen"},form:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",input:"Name des Geb\xE4udes",error:"Ung\xFCltiger Name",createButton:"Erstellen",updateButton:"Best\xE4tigen"},view:{addStoreyButton:"Etage",addPlanButton:"Grundriss",closeButton:"Fertigstellen",submitFilesButton:"Best\xE4tigen"},storeyForm:{title:"Neue Etage",input:"Name",error:"Ung\xFCltiger Name",cancelButton:"Abbrechen",submitButton:"Best\xE4tigen"}},FileManager:{creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gel\xF6scht",newFileSuccess:"Datei hinzugef\xFCgt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gel\xF6scht",nameInputErrorMessage:"Ung\xFCltiger name",cancel:"Abbrechen",submit:"Best\xE4tigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"L\xF6schen",deleteTitle:"Dateien l\xF6schen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endg\xFCltig zu l\xF6schen"}},en:{BIMDataComponents:{t:{back:"Back",cancel:"Cancel",create:"Create",delete:"Delete",download:"Download",finish:"Finish",rename:"Rename",search:"Search",see:"View",storey:"Storey",validate:"Validate"}},BuildingMaker:{title:"Building Maker",list:{text:"Create and edit storeys, then download your PDFs.",new:"New project"},form:{input:"Building name",error:"Invalid"},view:{addStorey:"Add Storey",addFile:"Add File",addPlan:"Add Plan"},storeyForm:{title:"New storey",input:"Name",error:"Invalid name"}},FileManager:{creationFormTitle:"Create folder",renameFormPlaceholder:"Folder/File name",nameInputPlaceholder:"Folder name",emptyFolder:"This folder is empty",newFolderSuccess:"New folder created",renameFolderSuccess:"Folder renamed",deleteFolderSuccess:"Folder deleted",newFileSuccess:"File added",renameFileSuccess:"File renamed",deleteFileSuccess:"File deleted",nameInputErrorMessage:"Invalid name",buttonText:"New folder",addFileButtonText:"Upload a file",deleteTitle:"Deleting Files",deleteDetail:"You are about to permanently delete the following files / folders",dmsRoot:"Root of the project's DMS",pdfPageSelectorTitle:"Select a page"},MetaBuildingStructure:{title:"Meta-Building Structure",tab:{structure:"Structure",zones:"Zones",equipments:"Equipments"},StoreySelector:{placeholder:"Select a storey"}},PhotosphereBuilding:{title:"Photosphere Building"}},es:{BuildingMaker:{title:"Building Maker",back:"Vuelta",list:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",createButton:"Nuevo proyecto",updateButton:"Renombrar",deleteButton:"Suprimir"},form:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",input:"Nombre del edificio",error:"Nombre no v\xE1lido",createButton:"Crear",updateButton:"Validar"},view:{addStoreyButton:"Piso",addPlanButton:"Plano",closeButton:"Terminar",submitFilesButton:"Validar"},storeyForm:{title:"Nuevo piso",input:"Nombre",error:"Nombre no v\xE1lido",cancelButton:"Anular",submitButton:"Validar"}},FileManager:{creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta est\xE1 vac\xEDa",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inv\xE1lida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Est\xE1 a punto de eliminar permanentemente los siguientes archivos / carpetas"}},fr:{BIMDataComponents:{t:{back:"Retour",cancel:"Annuler",create:"Cr\xE9er",delete:"Supprimer",download:"T\xE9l\xE9charger",finish:"Terminer",rename:"Renommer",search:"Rechercher",see:"Voir",storey:"\xC9tage",validate:"Valider"}},BuildingMaker:{title:"Building Maker",list:{text:"Cr\xE9ez et \xE9ditez les \xE9tages puis t\xE9l\xE9chagez vos PDF.",new:"Nouveau projet"},form:{input:"Nom du b\xE2timent",error:"Nom invalide"},view:{addStorey:"Ajouter un \xC9tage",addFile:"Ajouter un fichier",addPlan:"Ajouter un plan"},storeyForm:{title:"Nouvel \xE9tage",input:"Nom",error:"Nom invalide"}},FileManager:{creationFormTitle:"Cr\xE9er un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier cr\xE9\xE9",renameFolderSuccess:"Dossier renomm\xE9",deleteFolderSuccess:"Dossier supprim\xE9",newFileSuccess:"Fichier ajout\xE9",renameFileSuccess:"Fichier renomm\xE9",deleteFileSuccess:"Fichier supprim\xE9",nameInputErrorMessage:"Nom invalide",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",deleteTitle:"Supression de fichiers",deleteDetail:"Vous \xEAtes sur le point de supprimer d\xE9finitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",pdfPageSelectorTitle:"S\xE9lectionner une page"},MetaBuildingStructure:{title:"Structure M\xE9ta-Building",tab:{structure:"Structure",zones:"Zones",equipments:"\xC9quipements"},StoreySelector:{placeholder:"S\xE9lectionner un \xE9tage"}},PhotosphereBuilding:{title:"Photosph\xE8re Building"}},it:{BuildingMaker:{title:"Building Maker",back:"Reso",list:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",createButton:"Nuovo progetto",updateButton:"Rinominare",deleteButton:"Eliminare"},form:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",input:"Nome della costruzione",error:"Nome non corretto",createButton:"Creare",updateButton:"Convalidare"},view:{addStoreyButton:"Piano",addPlanButton:"Mappa",closeButton:"Finire",submitFilesButton:"Convalidare"},storeyForm:{title:"Nuovo piano",input:"Nome",error:"Nome non corretto",cancelButton:"Annullare",submitButton:"Convalidare"}},FileManager:{creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella \xE8 vuota",newFolderSuccess:"Nuova cartella creata",renameFolderSuccess:"Cartella rinominata",deleteFolderSuccess:"Cartella eliminata",newFileSuccess:"File aggiunto",renameFileSuccess:"File rinominato",deleteFileSuccess:"File cancellato",nameInputErrorMessage:"Nome non valido",cancel:"Annulla",submit:"Invia",buttonText:"Nuova cartella",addFileButtonText:"Carica un file",rename:"Rinominare",view:"Vedere",download:"Scaricare",delete:"Cancellare",deleteTitle:"Eliminazione di file",deleteDetail:"Stai per eliminare definitivamente i seguenti file/cartelle"}}},rZt=({i18nPlugin:e}={})=>({install(t){e?Object.entries(iZt).forEach(([i,o])=>{e.global.mergeLocaleMessage(i,o)}):console.warn("[BIMData Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(RIt).forEach(([i,o])=>{t.component(i,o)})}}),oZt={beforeMount(e,t){if(typeof t.value!="function")throw Error(`click away directive needs function, got ${typeof t.value}`);e.clickAwayHandler=i=>{(i.path||i.composedPath&&i.composedPath()).find(o=>o===e)||t.value()},window.addEventListener("mousedown",e.clickAwayHandler,!0)},unmounted(e){window.removeEventListener("mousedown",e.clickAwayHandler,!0),delete e.clickAwayHandler}},nZt=co({BIMDataClickAway:()=>zl,BIMDataClickInputAway:()=>oZt}),aZt=e=>({install(t){Object.entries(lNe).forEach(([i,o])=>{e&&e.excludedComponents&&e.excludedComponents.length>0&&e.excludedComponents.includes(i)||(!e||!e.includedComponents||e.includedComponents.includes(i))&&t.component(i,o)}),(!e||e.directives!==!1)&&Object.entries(nZt).forEach(([i,o])=>t.directive(i.split("BIMData")[1],o))}}),sZt={name:"LiWrapper",render(){return Gr("li",this.$slots.default())}};function lZt(e,t){var i=new Set([]);return e.forEach(o=>{t.has(o)||i.add(o)}),i}var Bc=Qn("id"),cZt=({contextMenu:e,objects:t=[],state:i=e.$viewer.state,pictos:o})=>[{name:"selectAll",get group(){return e.groupPositions.select},position:1,get label(){return e.$t("context_menu.select_all")},get picto(){return o.get(this.name)},execute:()=>i.selectObjects(t.filter(Sl(ar("visible"),yA("selected"))).map(Bc)),predicate:()=>t.some(Sl(ar("visible"),yA("selected")))},{name:"deselectAll",get group(){return e.groupPositions.select},position:2,get label(){return e.$t("context_menu.deselect_all")},get picto(){return o.get(this.name)},execute:()=>i.deselectObjects(t.filter(ar("selected")).map(Bc)),predicate:()=>t.some(ar("selected"))},{name:"selectSimilar",get group(){return e.groupPositions.select},position:3,get label(){return e.$t("context_menu.select_similar")},get picto(){return o.get(this.name)},execute(){let r=t.filter(n=>n.visible&&n.type===this.selectedObject.type&&n.id!==this.selectedObject.id).map(Bc);i.selectObjects(r)},selectedObject:null,predicate(){let r=t.filter(Sl(ar("visible"),ar("selected")));return r.length===1&&r[0].type!==void 0?(this.selectedObject=r[0],!0):(this.selectedObject=null,!1)}},{name:"reverseSelection",get label(){return e.$t("context_menu.reverse_selection")},get group(){return e.groupPositions.select},position:4,execute:()=>{let r=new Set(t.filter(ar("selected")).map(Bc)),n=new Set(t.filter(ar("visible")).map(Bc));i.selectObjects(Array.from(lZt(n,r)),{exclusive:!0})},predicate:()=>t.some(Sl(yA("selected"),ar("visible")))&&t.some(Sl(ar("selected"),ar("visible")))},{name:"showAll",get group(){return e.groupPositions.visibility},position:1,get label(){return e.$t("context_menu.show_all")},get picto(){return o.get(this.name)},execute:()=>i.showObjects(t.filter(yA("visible")).map(Bc)),predicate:()=>t.some(yA("visible"))},{name:"hide",get group(){return e.groupPositions.visibility},position:2,get label(){return e.$t("context_menu.hide")},get picto(){return o.get(this.name)},objectsToHide:null,execute(){let r=this.objectsToHide.filter(ar("selected"));r.length>0&&i.deselectObjects(r.map(Bc)),i.hideObjects(this.objectsToHide.map(Bc))},predicate(){return this.objectsToHide=t.filter(Sl(ar("selected"),ar("visible"))),this.objectsToHide.length>0}},{name:"hideAll",get group(){return e.groupPositions.visibility},position:3,get label(){return e.$t("context_menu.hide_all")},execute:()=>{let r=t.filter(ar("visible"));r.some(ar("selected"))&&i.deselectObjects(r.filter(ar("selected")).map(Bc)),i.hideObjects(r.map(Bc))},predicate:()=>t.some(ar("visible"))}].filter(r=>r.predicate()),dZt={components:{LiWrapper:sZt},inject:["$viewer"],data(){return{defaultPrevented:!1,displayed:!1,top:null,bottom:null,left:null,width:200,nextCommandId:1,currentCommands:[],contextCommands:[],registeredCommands:[],groupPositions:{select:10,visibility:20},asyncPredicateRunning:!1}},computed:{position(){return{top:this.top?this.top+"px":"unset",bottom:this.bottom?this.bottom+"px":"unset",left:this.left+"px",width:this.width+"px"}}},watch:{displayed(e){e?document.addEventListener("keydown",this.onKeyDown):document.removeEventListener("keydown",this.onKeyDown)}},created(){this.$viewer.contextMenu=this,this.asyncPredicates=new Set},methods:{onKeyDown(e){e.key==="Escape"&&this.away()},setPosition(e){let t=(document.fullscreenElement?document.fullscreenElement:this.$parent.$el).getBoundingClientRect();this.left=e.clientX-t.left,this.top=e.clientY-t.top,this.left+this.width>t.width&&(this.left-=this.width),e.clientY>t.top+t.height/2?(this.bottom=t.height-this.top,this.top=null):this.bottom=null},typeCheckCommand(e={}){let t=null;if((!e.execute||typeof e.execute!="function")&!e.component&&(t="Cannot register context menu command. A command must have an execute function or a component property."),e.label||(t="Cannot register context menu command. A command must have a label."),t)throw console.error(t),Error(t);return e.id=this.nextCommandId++,e},open(e){this.currentCommands=[],this.setPosition(e),this.originEvent=e,e.preventDefault(),this.setCurrentCommands(),this.groupCurrentCommands(),this.defaultPrevented=!1,this.displayed=!0,document.fullscreenElement?(this.$el.parentElement.removeChild(this.$el),this.adoptiveParent=document.fullscreenElement,this.adoptiveParent.appendChild(this.$el)):this.adoptiveParent&&this.adoptiveParent!==this.$viewer.globalContext.el&&(this.adoptiveParent.removeChild(this.$el),this.$viewer.globalContext.el.appendChild(this.$el),this.adoptiveParent=null)},setCurrentCommands(){this.asyncPredicates.clear(),this.asyncPredicateRunning=!1,this.defaultPrevented||this.registeredCommands.forEach(async e=>{if(typeof e.predicate=="function"){let t=e.predicate(this.$viewer.globalContext.activeLocalContext);if(t===!0)this.currentCommands.push(e);else if(typeof t?.then=="function"){this.asyncPredicates.add(t),this.asyncPredicateRunning=!0;let i=await t;this.asyncPredicates.has(t)&&(this.asyncPredicates.delete(t),this.asyncPredicateRunning=this.asyncPredicates.size>0,i===!0&&this.currentCommands.push(e))}}else this.currentCommands.push(e)}),this.currentCommands.push(...this.contextCommands),this.contextCommands=[]},getDefaultCommands({objects:e=[],state:t=this.$viewer.state,context:i=null}){let o=new Map;return i&&this.$viewer.shortcutManager.getShortcuts(i).forEach(r=>o.set(r.name,r.key)),cZt({contextMenu:this,objects:e,state:t,pictos:o})},executeCommand(e){if(e.execute&&(e.execute(this.originEvent),this.displayed=!1),e.component&&!e.menu)throw Error("Command with component property must have a `menu` property")},away(){this.displayed=!1},groupCurrentCommands(){let e=new Map;this.currentCommands.forEach(t=>{(t.group===null||t.group===void 0)&&(t.group=0),e.has(t.group)?e.get(t.group).push(t):e.set(t.group,[t])}),e.forEach(t=>t.sort((i,o)=>(i.position=i.position||0,o.position=o.position||0,i.position-o.position))),this.currentCommands=[...e.keys()].sort((t,i)=>t-i).map(t=>e.get(t)).flat()},isGroupIntersection(e){if(e===0)return!1;let t=this.currentCommands[e-1],i=this.currentCommands[e];return t.group<i.group},registerContextCommand(e){let t=this.typeCheckCommand(e);return this.contextCommands.push(t),e.id},registerCommand(e){let t=this.typeCheckCommand(e);return this.registeredCommands.push(t),e.id},unregisterCommand(e){return this.registeredCommands.find(t=>t.id===e)?(this.registeredCommands=this.registeredCommands.filter(t=>t.id!==e),!0):!1},preventDefault(){this.defaultPrevented=!0}}},uZt={key:0,class:"separator"},AZt={class:"menu-text"},hZt={key:1,class:"menu-picto"},pZt={key:0,class:"context-menu__spinner"};function fZt(e,t,i,o,r,n){let a=I("BIMDataIconChevron"),s=I("LiWrapper"),l=I("BIMDataSpinner"),c=Li("click-away");return r.displayed&&(r.currentCommands.length||r.asyncPredicateRunning)?Tt((k(),N("ul",{key:0,class:"bimdata-list context-menu",style:ve(n.position)},[(k(!0),N(ut,null,Vt(r.currentCommands,(d,u)=>(k(),W(s,{key:d.label,class:"context-menu__element",onClick:A=>n.executeCommand(d)},{default:j(()=>[n.isGroupIntersection(u)?(k(),N("div",uZt)):le("",!0),w("div",AZt,G(d.label),1),!d.component&&d.picto?(k(),N("span",hZt,G(d.picto),1)):d.component?(k(),W(a,{key:2,size:"xxs",class:"fill-primary"})):le("",!0)]),_:2},1032,["onClick"]))),128)),r.asyncPredicateRunning?(k(),N("li",pZt,[T(l)])):le("",!0)],4)),[[c,n.away]]):le("",!0)}var gZt=Q(dZt,[["render",fZt],["__scopeId","data-v-5b87d4a3"]]),mZt={name:"ViewerHeader",inject:["$viewer"],props:{visible:{type:Boolean,default:!0}},setup(){let e=bt("$viewer"),t=qo(new Map);return{logo:e.uiSettings.bimdataLogo!==!1,version:e.uiSettings.version===!1?null:e.version,headerContent:t,headerRightContentComponents:je(()=>Array.from(t.values()).filter(i=>i.position==="right").sort((i,o)=>i.order-o.order).map(i=>i.component)),headerLeftContentComponents:je(()=>Array.from(t.values()).filter(i=>i.position==="left").sort((i,o)=>i.order-o.order).map(i=>i.component)),addContent:i=>{if(!i.name)throw TypeError("[Viewer Header] Content must have a name");if(t.has(i.name))throw Error(`[Viewer Header] Content with name ${i.name} already exists`);t.set(i.name,i)},removeContent:i=>t.has(i)?(t.delete(i),!0):!1}}},vZt={class:"viewer-header"},yZt={class:"viewer-header__content"},wZt={class:"viewer-header__content__left"},bZt={class:"viewer-header__content__right"},CZt={key:0,class:"m-l-6 flex items-center"},xZt={key:1,class:"viewer-header__version"};function BZt(e,t,i,o,r,n){let a=I("BIMDataIllustration");return Tt((k(),N("div",vZt,[w("div",yZt,[w("div",wZt,[(k(!0),N(ut,null,Vt(o.headerLeftContentComponents,s=>(k(),W(qr(s),{key:s.name}))),128))]),w("div",bZt,[(k(!0),N(ut,null,Vt(o.headerRightContentComponents,s=>(k(),W(qr(s),{key:s.name}))),128))])]),o.logo||o.version?(k(),N("div",CZt,[o.logo?(k(),W(a,{key:0,name:"logo",width:"30px",height:"30px"})):le("",!0),o.version?(k(),N("div",xZt,G(o.version),1)):le("",!0)])):le("",!0)],512)),[[ui,i.visible]])}var kZt=Q(mZt,[["render",BZt],["__scopeId","data-v-5c9ea6b6"]]),EZt={emits:["resize"],setup(e,{emit:t}){return{onResizerMousedown:i=>{i.preventDefault();let o=i.clientX,r=a=>{a.preventDefault();let s=a.clientX-o;o=a.clientX,t("resize",s)},n=a=>{a.preventDefault(),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",n)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",n)}}}},MZt={class:"bimdata-separator"};function PZt(e,t,i,o,r,n){return k(),N("div",MZt,[t[1]||=w("div",{class:"bimdata-separator__line"},null,-1),w("div",{class:"bimdata-separator__resizer",onMousedown:t[0]||=(...a)=>o.onResizerMousedown&&o.onResizerMousedown(...a)},null,32)])}var IZt={components:{Separator:Q(EZt,[["render",PZt],["__scopeId","data-v-79a3b3af"]])},props:{position:{type:String,required:!0,validator(e){return["left","right"].includes(e)}},sidePanel:{type:Object,required:!0,validator(e){if(e.width&&(typeof e.width!="number"||e.width<0))return console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof e.width}`),!1;let t=typeof e?.component=="object";return t||console.error("[GlobalSidePanel] sidePanel must have a component property"),t}}},setup(e){let t=pe(null),i=pe(e.sidePanel.width??400);return xt(()=>e.sidePanel,()=>{Object.defineProperty(e.sidePanel,"width",{get(){return i.value},set(o){if(typeof o!="number"||o<=0){console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof o}`);return}i.value=o}}),Object.defineProperty(e.sidePanel,"componentInstance",{get(){return t.value},enumerable:!0})},{immediate:!0}),{componentInstance:t,width:i,onResize:(o,r=1)=>{let n=i.value+o*r;i.value=Math.max(0,n)}}}},SZt={class:"bimdata-global-side-panel__component"};function DZt(e,t,i,o,r,n){let a=I("Separator");return k(),N("div",{class:"bimdata-global-side-panel",style:ve(`width: ${o.width}px`)},[i.sidePanel.resizable&&i.position==="right"?(k(),W(a,{key:0,onResize:t[0]||=s=>o.onResize(s,-1)})):le("",!0),w("div",SZt,[(k(),W(qr(i.sidePanel.component),{ref:"componentInstance"},null,512))]),i.sidePanel.resizable&&i.position==="left"?(k(),W(a,{key:1,onResize:t[1]||=s=>o.onResize(s)})):le("",!0)],4)}var TZt={name:"BimdataViewer",components:{ContextMenu:gZt,ViewerHeader:kZt,ModalManager:ene,GlobalSidePanel:Q(IZt,[["render",DZt],["__scopeId","data-v-82d0d4cb"]])},setup(){let e=bt("$viewer"),{globalContext:t,shortcutManager:i}=e;$i(()=>{i&&i.destroy(),t.hub.clear()}),Di(()=>{e.pluginManager.runPluginsScripts(e)});let o=je(()=>e.uiSettings.bimdataLogo!==!1&&(t.localContexts.length!==1||t.localContexts[0].window?.logoAndVersion)),r=je(()=>e.uiSettings.version!==!1&&(t.localContexts.length!==1||t.localContexts[0].window?.logoAndVersion)?e.version:null),n=je(()=>t.leftSidePanel),a=je(()=>t.rightSidePanel),s=je(()=>{let h=e.uiSettings.header!==!1,p=t.localContexts.length===1&&t.localContexts[0].window?.header===!1,f=!!(n.value||a.value);return h&&(!p||f)}),l=e.uiSettings.contextMenu!==!1,c=pe(null);function d(h){l&&c.value.open(h)}function u(){e.shortcutManager.active=!0}function A(){e.shortcutManager.active=!1}return{Layout:e.layout.areas.component,onContextMenu:d,onMouseenter:u,onMouseleave:A,isHeaderVisible:s,viewerTemplateRef:t.templateRef,modalManagerTemplateRef:t.modalManagerTemplateRef,headerTemplateRef:t.headerTemplateRef,contextMenuTemplateRef:c,contextMenuEnabled:l,bimdataLogoOnSingleWindow:o,viewerVersionOnSingleWindow:r,version:e.version,loading:je(()=>t.loading),spinner:je(()=>t.spinner),leftSidePanel:n,rightSidePanel:a}}},LZt={key:1,class:"bimdata-context-loading-overlay",style:{"z-index":"3"}},RZt={key:2,class:"viewer__logo"},_Zt={key:1,class:"version m-t-6"};function FZt(e,t,i,o,r,n){let a=I("ModalManager"),s=I("ContextMenu"),l=I("ViewerHeader"),c=I("GlobalSidePanel"),d=I("BIMDataSpinner"),u=I("BIMDataIllustration");return k(),N("div",{id:"bimdata-viewer",ref:"viewerTemplateRef",class:"bimdata-viewer bimdata-design-system bimdata-scrollbar",onContextmenu:t[0]||=(...A)=>o.onContextMenu&&o.onContextMenu(...A),onMouseenter:t[1]||=(...A)=>o.onMouseenter&&o.onMouseenter(...A),onMouseleave:t[2]||=(...A)=>o.onMouseleave&&o.onMouseleave(...A)},[T(a,{ref:"modalManagerTemplateRef"},null,512),o.contextMenuEnabled?(k(),W(s,{key:0,ref:"contextMenuTemplateRef"},null,512)):le("",!0),T(l,{ref:"headerTemplateRef",visible:o.isHeaderVisible},null,8,["visible"]),w("div",{class:"bimdata-viewer__content",style:ve(o.isHeaderVisible?"height: calc(100% - var(--bimdata-viewer-header-height, 40px))":"height: 100%")},[o.leftSidePanel?(k(),W(c,{key:0,"side-panel":o.leftSidePanel,position:"left"},null,8,["side-panel"])):le("",!0),(k(),W(qr(o.Layout),{style:"height: 100%; flex-grow: 1;"})),o.rightSidePanel?(k(),W(c,{key:1,"side-panel":o.rightSidePanel,position:"right"},null,8,["side-panel"])):le("",!0)],4),o.loading?(k(),N("div",LZt,[o.spinner&&o.spinner.component?(k(),W(qr(o.spinner.component),Cs(la({key:0},o.spinner.props)),null,16)):(k(),W(d,{key:1,size:"40px",border:"5px"}))])):le("",!0),!o.isHeaderVisible&&(o.bimdataLogoOnSingleWindow||o.viewerVersionOnSingleWindow)?(k(),N("div",RZt,[o.bimdataLogoOnSingleWindow?(k(),W(u,{key:0,name:"logo"})):le("",!0),o.viewerVersionOnSingleWindow?(k(),N("div",_Zt,G(o.version),1)):le("",!0)])):le("",!0)],544)}var UZt=Q(TZt,[["render",FZt],["__scopeId","data-v-0c1c941a"]]),OZt=["src"],NZt={class:"bimdata-models__header"},HZt={key:0,class:"bimdata-models__header__loader"},VZt={class:"bimdata-models__header__picto"},jZt={class:"bimdata-models__header__name"},QZt={key:0,class:"bimdata-models__header__name--empty"},zZt={key:1,class:"bimdata-models__header__name--empty"},qZt={key:3},GZt=["onMousemove","onClick"],nne=Q({__name:"Models",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(e){let t=e,i=bt("$viewer"),o=pe(),r=pe(0),n=pe(0),a=pe(),s=Ui([]),l=pe(!1),c=je(()=>i.localContext.loadedModels),d=je(()=>i.localContext.loadedModelIds),u=je(()=>i.localContext.loadingModelIds),A=je(()=>i.localContext.multiModel),h=je(()=>(t.customFilter?s.value.filter(t.customFilter):s.value).map(B=>c.value.find(E=>E.document?.head_id!=null&&E.document.head_id===B.document.id)??B)),p=B=>d.value.includes(B),f=B=>u.value.includes(B),m=je(()=>{let{x:B,y:E}=a.value?.getBoundingClientRect()??{x:0,y:0};return`top:${n.value-E}px; left:${r.value-B}px;`}),g=B=>{!A.value&&p(B.id)||u.value.length>0||(i.localContext.loadedModelIds.includes(B.id)?i.localContext.unloadModels([B.id]):i.localContext.loadModels([B.id]))},y=B=>{switch(B){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},v=(B,E)=>{B?.viewer_360_file&&(r.value=E.clientX,n.value=E.clientY),o.value=B?.viewer_360_file},C=async B=>{l.value=!0;try{return(await i.api.apiClient.modelApi.getModels(i.api.cloudId,i.api.projectId,void 0,void 0,B)).filter(E=>i.state.models.some(D=>D.archived)||!E.archived).sort(Zl("updated_at",!1))}catch(E){console.error("[Models] Cannot get project models. Error: ",E)}finally{l.value=!1}return[]},x=B=>B.children?.some(E=>p(E.id))??!1;return C(i.localContext.modelTypes).then(B=>{s.value=B}),(B,E)=>{let D=I("BIMDataSpinner"),P=I("BIMDataIconModel3D"),M=I("BIMDataTextbox"),R=I("BIMDataCheckbox"),O=I("BIMDataRadio"),V=I("BIMDataIcon"),z=I("BIMDataDropdownList");return k(),N("div",{ref_key:"templateRef",ref:a,class:ye(["bimdata-models",{"bimdata-models--window-positioning":e.windowPositioning}])},[o.value?(k(),N("div",{key:0,class:"bimdata-models__preview",style:ve(m.value)},[w("img",{src:o.value},null,8,OZt)],4)):le("",!0),T(z,{style:ve(`--bimdata-models-width: ${e.width};`),width:e.width,list:h.value,"element-key":"id","per-page":40,loading:l.value,class:"bimdata-models__list",disabled:h.value.length===0,onElementClick:g},{header:j(({isOpen:K})=>[w("div",NZt,[l.value||u.value.length>0?(k(),N("div",HZt,[T(D)])):(k(),N(ut,{key:1},[w("div",VZt,[T(P)]),w("div",{class:ye(["bimdata-models__header__number bimdata-info-length",{"bimdata-models__header__number--empty":d.value.length===0}])},[w("span",null,G(d.value.length),1)],2),w("div",jZt,[h.value.length===0?(k(),N("span",QZt,G(B.$t("model.no_model")),1)):d.value.length===0?(k(),N("span",zZt,G(B.$t("model.no_loaded_model")),1)):d.value.length===1?(k(),W(M,{key:2,text:c.value[0].name,tooltip:!K},null,8,["text","tooltip"])):d.value.length>1?(k(),N("span",qZt,G(B.$t("model.selected_models")),1)):le("",!0)])],64))])]),element:j(({element:K,close:Z})=>[w("div",{class:"bimdata-models__model",onMousemove:te=>e.preview&&v(K,te),onMouseout:E[0]||=te=>e.preview&&v(),onClick:()=>{!A.value&&!p(K.id)&&Z()}},[A.value?(k(),W(R,{key:0,"model-value":p(K.id)||x(K),disabled:K.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])):(k(),W(O,{key:1,"model-value":p(K.id)||x(K),disabled:K.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])),T(V,{margin:"0 calc(var(--spacing-unit) / 2)",name:y(K.status),size:"xs",class:ye({"fill-success":K.status==="C","fill-high":K.status==="E"})},null,8,["name","class"]),T(M,{class:ye({"bimdata-models__model__name":!0,"bimdata-models__model__name--disabled":K.status!=="C"||u.value.length>0}),text:K.name,width:`calc(100% -
|
|
6441
|
+
`),onMouseenter:t[0]||=(...A)=>o.onMouseEnter&&o.onMouseEnter(...A),onMouseleave:t[1]||=(...A)=>o.onMouseLeave&&o.onMouseLeave(...A)},[T(a,{ref:"modalManagerTemplateRef"},null,512),w("div",VJt,[o.windowPlugins.leftSidePanel?(k(),W(s,{key:0,plugin:o.windowPlugins.leftSidePanel},null,8,["plugin"])):le("",!0),w("div",jJt,[(k(!0),N(ut,null,Vt(o.windowPlugins.free,A=>(k(),W(l,{key:A.name,class:ye({"window-container__content__center__viewer":A.isViewer}),plugin:A},null,8,["class","plugin"]))),128)),T(c,{position:"left",plugins:o.windowPlugins.leftButtonColumn},null,8,["plugins"]),T(c,{position:"right",plugins:o.windowPlugins.rightButtonColumn},null,8,["plugins"])]),o.windowPlugins.rightSidePanel?(k(),W(s,{key:1,plugin:o.windowPlugins.rightSidePanel},null,8,["plugin"])):le("",!0)]),o.loading?(k(),N("div",QJt,[o.spinner&&o.spinner.component?(k(),W(qr(o.spinner.component),Cs(la({key:0},o.spinner.props)),null,16)):(k(),W(d,{key:1,size:"20px",border:"3px"}))])):le("",!0),o.layoutSettingsDisplayed?(k(),N("div",zJt,[T(u)])):le("",!0)],36)}var GJt=Q(HJt,[["render",qJt],["__scopeId","data-v-485f288e"]]),KJt=class{constructor(e=!0){let t=UKt(b4,null,{resizable:e});t.registerContent("default",GJt),this.settings=qo({edit:!1,swap:!1,full:!1}),this.areas=t}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?OKt(e):null}copy(e,t=!0){return NKt(this.areas.layout,e,t)}open({ratio:e,direction:t,insertAfter:i,windowName:o=null,windowState:r=null,localContextId:n=null}={}){let a=o?{options:{windowName:o,windowState:r}}:null;return n===null?this.areas.splitLayout(e,t,i,a):this.areas.split(n,e,t,i,a)}swap(e,t){return this.areas.swap(e,t)}close(e){return this.areas.delete(e)}compare(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;if(typeof e=="string"&&typeof t=="string")return e===t;if(typeof e=="string"||typeof t=="string")return!1;if(e.windowName&&t.windowName){if(e.windowName!==t.windowName)return!1;let i=new Set(e.windowState?.modelIds),o=new Set(t.windowState?.modelIds);return i.size===o.size&&[...i].every(r=>o.has(r))}return e.windowName||t.windowName||e.direction!==t.direction||e.children.length!==t.children.length?!1:e.children.every((i,o)=>this.compare(i,t.children[o]))}},JJt={name:"@bimdata/viewer",type:"module",version:"2.17.0-beta.6",description:"A customizable BIM viewer.",keywords:["bim","viewer","bimdata","ifc","bcf"],types:"./index.d.ts",author:"BIMData.io",homepage:"https://developers.bimdata.io/viewer/index.html",repository:{url:"https://github.com/bimdata/viewer"},bugs:{email:"support@bimdata.io"},browserslist:["last 2 chrome version","last 2 firefox version"],main:"dist/bimdata-viewer.esm.min.js",module:"dist/bimdata-viewer.esm.min.js",scripts:{dev:"vite -c build/vite.config.dev.js",build:"node scripts/build.mjs","build:prod":"vite build -c build/vite.config.prod.js && esbuild dist/bimdata-viewer.esm.min.js --minify --outfile=dist/bimdata-viewer.esm.min.js --allow-overwrite","build:offline":"vite build -c build/vite.config.offline.js && esbuild dist/bimdata-viewer.offline.esm.min.js --minify --outfile=dist/bimdata-viewer.offline.esm.min.js --allow-overwrite","build:runtime":"vite build -c build/vite.config.runtime.js && esbuild dist/bimdata-viewer.runtime.esm.min.js --minify --outfile=dist/bimdata-viewer.runtime.esm.min.js --allow-overwrite","build:split":"vite build -c build/vite.config.split.js && esbuild dist/bimdata-viewer.split.esm.min.js --minify --outfile=dist/bimdata-viewer.split.esm.min.js --allow-overwrite","build:umd":"vite build -c build/vite.config.umd.js && esbuild dist/bimdata-viewer.umd.cjs --minify --outfile=dist/bimdata-viewer.umd.min.cjs","cy:run":"cypress run","cy:open":"cypress open",prebuild:"rm -rf dist",prepublishOnly:"npm run build","semantic-release":"semantic-release",serve:"http-server -c-1 --silent",test:"npm run test:unit & npm run build & npm run test:e2e","test:unit":"jest","test:e2e":"start-server-and-test 'npm run serve -- -p 8080' http://localhost:8080 cy:run","test:e2e-dev":"start-server-and-test 'npm run serve -- -p 8080' http://localhost:8080 cy:open",version:"echo $npm_package_version",ts:"tsc"},files:["dist/*","types/*","CHANGELOG.md","README.md","package.json","package-lock.json","index.d.ts"],devDependencies:{"@babel/preset-env":"^7.29.0","@bimdata/2d-engine":"2.6.7","@bimdata/areas-next":"0.1.17","@bimdata/bcf-components":"6.7.7","@bimdata/components":"1.10.1","@bimdata/design-system":"2.3.0","@bimdata/engine-2d":"0.0.23","@bimdata/html-to-image":"1.11.16","@bimdata/typescript-fetch-api-client":"10.33.0","@eslint/eslintrc":"^3.3.4","@eslint/js":"^10.0.1","@photo-sphere-viewer/core":"^5.14.1","@rollup/plugin-alias":"^6.0.0","@rollup/plugin-babel":"^7.0.0","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-image":"^3.0.3","@rollup/plugin-replace":"^6.0.3","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/git":"^10.0.1","@semantic-release/github":"^12.0.6","@semantic-release/npm":"^13.1.5","@semantic-release/release-notes-generator":"^14.1.0","@vitejs/plugin-vue":"^6.0.4","@xeokit/xeokit-sdk":"git+https://git@github.com/Amoki/xeokit-sdk.git#b3227526bbbe8ac49c8c0c1d121363ca79781824","@zip.js/zip.js":"^2.8.21",async:"^3.2.6",autoprefixer:"^10.4.27","babel-core":"^7.0.0-bridge.0","babel-jest":"^30.2.0","conventional-changelog-eslint":"^6.0.0",cypress:"^15.11.0",esbuild:"^0.27.3",eslint:"^10.0.2","eslint-config-prettier":"^10.1.8","eslint-plugin-cypress":"^6.1.0","eslint-plugin-jest":"^29.15.0","eslint-plugin-prettier":"^5.5.5","eslint-plugin-vue":"^10.8.0",globals:"^17.4.0",html2canvas:"^1.4.1","http-server":"^14.1.1",jest:"^30.2.0","jest-environment-jsdom":"^30.2.0",lodash:"^4.17.23","pdfjs-dist":"^5.5.207",postcss:"^8.5.6",prettier:"^3.8.1","sass-embedded":"^1.97.3","semantic-release":"^25.0.3","start-server-and-test":"^2.1.5",vite:"^8.0.0","vite-plugin-css-injected-by-js":"^4.0.1",vue:"^3.5.29","vue-eslint-parser":"^10.4.0","vue-i18n":"^11.2.8"}},ZJt=1,WJt=class{math=BKe;constructor({plugins:e,api:t,ui:i,locale:o="fr"}){this.instanceId=ZJt++,this.pluginManager=new Pzt(e),this.windowManager=new Szt,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new QGt(t),this.globalContext=new dfe(this),this.state=iKt(this),this.shortcutManager=pde(this.state),this.uiSettings=i||{},this.i18n=new lfe(o),this._contextMenu=null,this.layout=new KJt(this.uiSettings.resizable!==!1),this._darkTheme=pe(i?.darkTheme??!1),this.localContext=null,window.$viewer=this}get darkTheme(){return this._darkTheme.value}set darkTheme(e){this._darkTheme.value=e}get version(){return JJt.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||Ade}set contextMenu(e){this._contextMenu=e}get registeredWindows(){return[...this.windowManager.registeredWindows.keys()]}get registeredPlugins(){return[...this.pluginManager.registeredPlugins.keys()]}get pluginsCfg(){return this.pluginManager.cfg}registerPlugin(e){this.pluginManager.registerPlugin(e),this.windowManager.registerAndAddPluginsToWindows([e])}};function YJt(e,t={}){t.backgroundColor&&(e.style.setProperty("--bimdata-viewer-background-color",t.backgroundColor),t.backgroundColor==="transparent"&&e.style.setProperty("--areas-separator-color","transparent")),t.colorPrimary&&e.style.setProperty("--color-primary",t.colorPrimary),t.colorPrimaryLighter&&e.style.setProperty("--color-primary-lighter",t.colorPrimaryLighter),t.colorPrimaryLight&&e.style.setProperty("--color-primary-light",t.colorPrimaryLight),t.colorPrimaryDark&&e.style.setProperty("--color-primary-dark",t.colorPrimaryDark),t.colorSecondary&&e.style.setProperty("--color-secondary",t.colorSecondary),t.colorSecondaryLighter&&e.style.setProperty("--color-secondary-lighter",t.colorSecondaryLighter),t.colorSecondaryLight&&e.style.setProperty("--color-secondary-light",t.colorSecondaryLight),t.colorSecondaryDark&&e.style.setProperty("--color-secondary-dark",t.colorSecondaryDark),t.colorSilverLight&&e.style.setProperty("--color-silver-light",t.colorSilverLight),t.colorSilver&&e.style.setProperty("--color-silver",t.colorSilver),t.colorSilverDark&&e.style.setProperty("--color-silver-dark",t.colorSilverDark),t.colorGraniteLight&&e.style.setProperty("--color-granite-light",t.colorGraniteLight),t.colorGranite&&e.style.setProperty("--color-granite",t.colorGranite),t.colorSuccess&&e.style.setProperty("--color-success",t.colorSuccess),t.colorSuccessLighter&&e.style.setProperty("--color-success-Lighter",t.colorSuccessLighter),t.colorSuccessLight&&e.style.setProperty("--color-success-Light",t.colorSuccessLight),t.colorSuccessDark&&e.style.setProperty("--color-success-Dark",t.colorSuccessDark),t.colorWarning&&e.style.setProperty("--color-warning",t.colorWarning),t.colorWarningLighter&&e.style.setProperty("--color-warning-Lighter",t.colorWarningLighter),t.colorWarningLight&&e.style.setProperty("--color-warning-Light",t.colorWarningLight),t.colorWarningDark&&e.style.setProperty("--color-warning-Dark",t.colorWarningDark),t.colorHigh&&e.style.setProperty("--color-high",t.colorHigh),t.colorHighLighter&&e.style.setProperty("--color-high-lighter",t.colorHighLighter),t.colorHighLight&&e.style.setProperty("--color-high-light",t.colorHighLight),t.colorHighDark&&e.style.setProperty("--color-high-dark",t.colorHighDark),t.colorText&&e.style.setProperty("--color-text",t.colorText),(!t.backgroundColor||t.backgroundColor!=="transparent")&&e.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),t.headerHeight!=null&&e.style.setProperty("--bimdata-viewer-header-height",t.headerHeight),e.style.setProperty("--areas-background-color","transparent")}var XJt=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),X0=Object.freeze({READ:"read",WRITE:"write"});function rne(e){let t={};return e.forEach(i=>{let[o,r]=i.split(":");t[o]?t[o].push(r):t[o]=[r]}),t}var $Jt={token_scopes:[],usable_scopes:[],user_role:25};function one(e=$Jt){let t=rne(e.token_scopes),i=rne(e.usable_scopes);return{...hj(e),tokenScopes:t,usableScopes:i,userRole:XJt[e.user_role],user:e.user?hj(e.user):null,hasBcfReadPermission:i.bcf?.includes(X0.READ)??!1,hasBcfWritePermission:i.bcf?.includes(X0.WRITE)??!1,hasModelReadPermission:i.model?.includes(X0.READ)??!1,hasModelWritePermission:i.model?.includes(X0.WRITE)??!1,hasDocReadPermission:i.document?.includes(X0.READ)??!1,hasDocWritePermission:i.document?.includes(X0.WRITE)??!1}}var eZt={de:{BcfComponents:{back:"Zur\xFCck",BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zur\xFCcksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{title:"BCF-Parameter",text:"Erstellen, f\xFCllen und listen Sie die BCF-Einstellungen auf, die Sie f\xFCr dieses Projekt haben m\xF6chten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"F\xFCgen Sie Fragen hinzu, um zugeh\xF6rige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorit\xE4t",PriorityNotDefined:"Keine Priorit\xE4t",PriorityTitle:"Priorit\xE4ten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorit\xE4t",noPriority:"Keine",assignedTo:"Zugewiesen an",elements:"Elemente",notSpecified:"Nicht definiert",see:"Anzeigen"},BcfTopicCreationCard:{text:"Ein neues BCF-Thema erstellen",createBcfSideTitle:"Ein Problem melden"},BcfTopicForm:{dragDropImageText:"Bitte w\xE4hlen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"F\xFCgen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"F\xE4lligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Best\xE4tigen",updateButton:"\xC4nderungen \xFCbernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte \xC4nderungen.",cancelButton:"\xC4nderungen verwerfen",continueButton:"\xC4nderungen fortsetzen",createTitle:"Ein Problem melden",dragDropImageTextTablet:"Foto machen",takeSnapshot:"Mach einen Schnappschuss",importFile:"Eine Datei importieren",searchPlaceholder:"Suchen",emptySearch:"kein Ergebnis",documentsLabel:"Dokumente",documentsCount:"Dokumente \u2013 {count} ausgew\xE4hlte Dokumente",groupsLabel:"Berechtigungen",groupsCount:"Berechtigungen \u2013 {count} ausgew\xE4hlte Gruppen",groupsText:"W\xE4hlen Sie die Benutzergruppen aus, die dieses Thema sehen und damit interagieren d\xFCrfen.",validate:"Best\xE4tigen"},BcfTopicOverview:{openViewer:"Im Viewer \xF6ffnen",openViewerNoModels:"Es sind keine Vorlagen zur Ansicht bereit",elements:"{count} Elemente",noElements:"kein Element",type:"Typ",noTypeSpecified:"Kein Typ angegeben",description:"Beschreibung",noDescriptionProvided:"Keine Beschreibung angegeben",assignedTo:"Zugeteilt an",notAssigned:"Nicht zugewiesen",dueDate:"F\xE4lligkeitsdatum",noDueDate:"Kein F\xE4lligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorit\xE4t",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar ver\xF6ffentlichen",deleteText:"Sie l\xF6schen jetzt {Name}",deleteBcfButton:"Dieses BCF l\xF6schen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE4t",status:"Status",title:"Titel",creator:"Autor",date:"Datum"}},BcfTopicActionsCell:{seeButton:"Anzeigen"},BcfTopicComments:{commentButton:"Ein Kommentar verfassen",commentLabel:"Ein Kommentar verfassen",commentText:"Kommentar",cancelButton:"Abbrechen",publishButton:"Ver\xF6ffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar l\xF6schen?",deleteButton:"L\xF6schen",takeSnapshot:"Mach einen Schnappschuss",edited:"bearbeitet"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzuf\xFCgen",cancelButton:"Abbrechen",validateButton:"Best\xE4tigen",deleteExtensionText:"Diesen Parameter l\xF6schen",deleteButton:"L\xF6schen",title:{Priority:"Priorit\xE4ten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorit\xE4t hinzuf\xFCgen",Label:"Ein neues Etikett hinzuf\xFCgen",Status:"Einen neuen Status hinzuf\xFCgen",Type:"Einen neuen Typ hinzuf\xFCgen",Stage:"Eine neue Phase hinzuf\xFCgen"},text:{Priority:"Liste der Priorit\xE4ten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}}},en:{BcfComponents:{back:"Back",BcfFilters:{filtersButton:"Filters",filtersTitle:"Filters",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",creatorsLabel:"Created by",tagsLabel:"Tags",resetButton:"Reset",searchButton:"Search",undefined:"Not defined",datePlaceholder:"Creation date"},BcfSettings:{title:"BCF Settings",text:"Create, enter in, and list the BCF settings you would like to have for this project",validateButton:"Validate BCF settings"},BcfStatistics:{emptyText:"Add BCF Topics to start to have some stats here.",issues:"issues",extension:{Priority:"Priority",PriorityNotDefined:"No priority",PriorityTitle:"Priorities",Status:"Status",StatusNotDefined:"No status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priority",noPriority:"None",assignedTo:"Assigned to",elements:"Elements",notSpecified:"Not specified",see:"See"},BcfTopicCreationCard:{text:"Create a new BCF topic",createBcfSideTitle:"Report a problem"},BcfTopicForm:{dragDropImageText:"Please select a file",addObjectButton:"Object",addAnnotationButton:"Annotation",annotationButtonTooltip:"This topic has no viewpoint",addPictureButton:"Add a picture",titlePlaceholder:"Title *",titleErrorMessage:"Missing title",typeLabel:"Type",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",dueDateLabel:"Due date",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Validate",updateButton:"Modify this BCF",modalText:"You are about to quit editing issue {name} but there are unsaved changes.",cancelButton:"Discard changes",continueButton:"Continue editing",createTitle:"Report a problem",dragDropImageTextTablet:"Take a picture",takeSnapshot:"Take a snapshot",importFile:"Import a file",searchPlaceholder:"Search",emptySearch:"No result",documentsLabel:"Add a file",documentsCount:"Files - {count} selected files",groupsLabel:"Permissions",groupsCount:"Permissions - {count} selected groups",groupsText:"You are now setting the access rights: choose the user group(s) that will be exclusively authorized to see and interact with this topic.",validate:"Validate"},BcfTopicOverview:{openViewer:"Open in viewer",openViewerNoModels:"No model to open",elements:"{count} Elements",noElements:"No element",type:"Type",noTypeSpecified:"No type specified",description:"Description",noDescriptionProvided:"No description provided",assignedTo:"Assigned to",notAssigned:"Not assigned",dueDate:"Due date",noDueDate:"No due date",informations:"Informations",status:"Status",noStatusSpecified:"No status specified",stage:"Stage",noStageProvided:"No stage provided",priority:"Priority",priorityNotDefined:"Not defined",tags:"Tags",noTags:"No tags",commentButton:"Post a comment",deleteText:"You are about to delete {name}",deleteBcfButton:"Delete this BCF",keepBcfButton:"Keep this BCF",author:"Author"},BcfTopicsTable:{headers:{index:"#",priority:"Priority",status:"Status",title:"Title",creator:"Author",date:"Date"}},BcfTopicActionsCell:{seeButton:"See"},BcfTopicComments:{commentButton:"Post a comment",commentLabel:"Post a comment",commentText:"Comment",cancelButton:"Cancel",publishButton:"Publish",commentsText:"Comments",deleteCommentText:"Delete this comment ?",deleteButton:"Delete",takeSnapshot:"Take a snapshot",edited:"edited"},BcfTopicPriorityCell:{noPriority:"None"},SettingCard:{addButton:"add an element",cancelButton:"Cancel",validateButton:"Validate",deleteExtensionText:"Remove this setting",deleteButton:"Delete",title:{Priority:"Priorities",Label:"Labels",Status:"Status",Type:"Types",Stage:"Stages"},input:{Priority:"Add a new priority",Label:"Add a new label",Status:"Add new status",Type:"Add a new type",Stage:"Add a new stage"},text:{Priority:"Priority list",Label:"Labels list",Status:"Status list",Type:"Type list",Stage:"Stage list"}}}},es:{BcfComponents:{back:"Volver",BcfFilters:{filtersButton:"Filtros",filtersTitle:"Filtros",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",creatorsLabel:"Creado por",tagsLabel:"Etiquetas:",resetButton:"Restablecer",searchButton:"Buscar en",undefined:"No definido",datePlaceholder:"Fecha de creaci\xF3n"},BcfSettings:{title:"Par\xE1metros del BCF",text:"Cree, rellene y enumere los par\xE1metros del BCF que desea tener en este proyecto",validateButton:"Validar los par\xE1metros del BCF"},BcfStatistics:{emptyText:"A\xF1ada preguntas para ver las estad\xEDsticas asociadas aqu\xED.",issues:"problemas",extension:{Priority:"Prioridad",PriorityNotDefined:"Sin prioridad",PriorityTitle:"Prioridades",Status:"Estado",StatusNotDefined:"Sin estado",StatusTitle:"Estatutos"}},BcfTopicCard:{priority:"Prioridad",noPriority:"Sin",assignedTo:"Asignado a",elements:"Elementos",notSpecified:"No definido",see:"Ver"},BcfTopicCreationCard:{text:"Crear un nuevo tema BCF",createBcfSideTitle:"Informar de un problema"},BcfTopicForm:{dragDropImageText:"Seleccione un archivo",addObjectButton:"Objeto",addAnnotationButton:"Anotaci\xF3n",annotationButtonTooltip:"Actualmente este tema no posee ning\xFAn punto de vista",addPictureButton:"A\xF1adir una imagen",titlePlaceholder:"T\xEDtulo *",titleErrorMessage:"Falta el t\xEDtulo",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripci\xF3n",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Est\xE1 a punto de salir de la edici\xF3n del problema de {name} pero hay cambios sin guardar.",cancelButton:"Cancelar los cambios",continueButton:"Continuar con los cambios",createTitle:"Informar de un problema",dragDropImageTextTablet:"Tomar una fotograf\xEDa",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ning\xFAn modelo listo para la visualizaci\xF3n",elements:"{count} Elementos",noElements:"Ning\xFAn elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripci\xF3n",noDescriptionProvided:"No hay descripci\xF3n",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Informaci\xF3n",status:"Estado",noStatusSpecified:"No se especifica el estado",stage:"Fase",noStageProvided:"No se indica ninguna fase",priority:"Prioridad",priorityNotDefined:"No definido",tags:"Etiquetas",noTags:"Sin etiquetas",commentButton:"Publicar un comentario",deleteText:"Est\xE1s a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"T\xEDtulo",creator:"Autor",date:"Fecha"}},BcfTopicActionsCell:{seeButton:"Ver"},BcfTopicComments:{commentButton:"Publicar un comentario",commentLabel:"Publicar un comentario",commentText:"Comentario",cancelButton:"Cancelar",publishButton:"Publicar",commentsText:"comentarios",deleteCommentText:"\xBFBorrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"a\xF1adir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuraci\xF3n",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"A\xF1adir una nueva prioridad",Label:"A\xF1adir una nueva etiqueta",Status:"A\xF1adir un nuevo estado",Type:"A\xF1adir un nuevo tipo",Stage:"A\xF1adir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}}},fr:{BcfComponents:{back:"Retour",BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",creatorsLabel:"Cr\xE9\xE9 par",tagsLabel:"Tags",resetButton:"R\xE9initialiser",searchButton:"Rechercher",undefined:"Non d\xE9fini",datePlaceholder:"Date de cr\xE9ation"},BcfSettings:{title:"Param\xE8tres BCF",text:"Cr\xE9ez, renseignez et listez les param\xE8tres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les param\xE8tres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associ\xE9es ici.",issues:"probl\xE8mes",extension:{Priority:"Priorit\xE9",PriorityNotDefined:"Aucune priorit\xE9",PriorityTitle:"Priorit\xE9s",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorit\xE9",noPriority:"Aucune",assignedTo:"Assign\xE9 \xE0",elements:"{n} \xC9lements",notSpecified:"Non d\xE9fini",see:"Voir"},BcfTopicCreationCard:{text:"Cr\xE9er un nouveau topic BCF",createBcfSideTitle:"Signaler un probl\xE8me"},BcfTopicForm:{dragDropImageText:"Veuillez s\xE9lectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne poss\xE8de actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",dueDateLabel:"Date d'\xE9ch\xE9ance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous \xEAtes sur le point de quitter l'\xE9dition de l'issue {name} mais il y'a des modifications non enregistr\xE9es.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un probl\xE8me",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de r\xE9sultat",documentsLabel:"Documents",documentsCount:"Documents - {count} documents s\xE9lectionn\xE9s",groupsLabel:"Permissions",groupsCount:"Permissions - {count} groupes s\xE9lectionn\xE9s",groupsText:"S\xE9lectionner les groupes utilisateur qui peuvent voir ce topic et int\xE9ragir avec.",validate:"Valider"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun mod\xE8le pr\xEAt pour une visualisation",elements:"{count} \xC9lements",noElements:"Aucun \xE9l\xE9ment concern\xE9",type:"Type",noTypeSpecified:"Pas de type sp\xE9cifi\xE9",description:"Description",noDescriptionProvided:"Pas de description renseign\xE9e",assignedTo:"Assign\xE9 \xE0",notAssigned:"Non assign\xE9",dueDate:"\xC9ch\xE9ance",noDueDate:"Pas de date d'\xE9ch\xE9ance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut sp\xE9cifi\xE9",stage:"Phase",noStageProvided:"Pas de phase renseign\xE9e",priority:"Priorit\xE9",priorityNotDefined:"Non d\xE9fini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous \xEAtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE9",status:"Statut",title:"Titre",creator:"Auteur",date:"Date"}},BcfTopicActionsCell:{seeButton:"Voir"},BcfTopicComments:{commentButton:"Poster un commentaire",commentLabel:"Poster un commentaire",commentText:"Commentaire",cancelButton:"Annuler",publishButton:"Publier",commentsText:"commentaires",deleteCommentText:"Supprimer ce commentaire ?",deleteButton:"Supprimer",takeSnapshot:"Prendre un snapshot",edited:"edit\xE9"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un \xE9l\xE9ment",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce param\xE8tre",deleteButton:"Supprimer",title:{Priority:"Priorit\xE9s",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorit\xE9",Label:"Ajouter un nouveau label",Status:"Ajouter un nouveau statut",Type:"Ajouter un nouveau type",Stage:"Ajouter une nouvelle phase"},text:{Priority:"Liste des priorit\xE9s",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}}},it:{BcfComponents:{back:"Indietro",BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",datePlaceholder:"Data di creazione",assignedToLabel:"Assegnato a",creatorsLabel:"Creato da",tagsLabel:"Etichette",resetButton:"Ripristina",searchButton:"Cerca",undefined:"Non definito"},BcfSettings:{title:"Parametri BCF",text:"Creare, notificare e elencare i parametri BCF che si desidera avere su questo progetto",validateButton:"Conferma i parametri BCF"},BcfStatistics:{emptyText:"Aggiungi delle domande per vedere le statistiche associate qui.",issues:"problemi",extension:{Priority:"Priorit\xE0",PriorityNotDefined:"Nessuna priorit\xE0",PriorityTitle:"Priorit\xE0",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorit\xE0",noPriority:"Nessuno",assignedTo:"Assegnato a",elements:"Elementi",noElements:"0 elementi",notSpecified:"Non definito",see:"Visualizza"},BcfTopicCreationCard:{text:"Crea un nuovo topic BCF",createBcfSideTitle:"Segnala un problema"},BcfTopicForm:{dragDropImageText:"Selezionare un file",addObjectButton:"Oggetto",addAnnotationButton:"Annotazione",annotationButtonTooltip:"Attualmente questo argomento non presenta alcun punto di vista",addPictureButton:"Aggiungere un'immagine",titlePlaceholder:"Titolo *",titleErrorMessage:"Titolo mancante",typeLabel:"Tipo",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",assignedToLabel:"Assegnato a",dueDateLabel:"Data di scadenza",descriptionLabel:"Descrizione",labelsLabel:"Tag",createButton:"Conferma",updateButton:"Modificare questo BCF",modalText:"State per abbandonare la modifica di {name} ma ci sono modifiche non salvate.",cancelButton:"Annullare le modifiche",continueButton:"Continuare le modifiche",createTitle:"Segnala un problema"},BcfTopicOverview:{openViewer:"Apri nel visualizzatore",openViewerNoModels:"Non esistono modelli pronti per la visualizzazione",elements:"{count} Elementi",noElements:"Nessun elemento",type:"Tipo",noTypeSpecified:"Nessun tipo specificato",description:"Descrizione",noDescriptionProvided:"Nessuna descrizione inserita",assignedTo:"Assegnato a",notAssigned:"Non assegnato",dueDate:"Scadenza",noDueDate:"Nessuna data di scadenza",informations:"Informazioni",status:"Stato",noStatusSpecified:"Nessuno stato specificato",stage:"Fase",noStageProvided:"Nessuna fase inserita",priority:"Priorit\xE0",priorityNotDefined:"Non definita",tags:"Etichette",noTags:"Nessuna etichetta",commentButton:"Pubblica un commento",deleteText:"Stai per eliminare {name}",deleteBcfButton:"Elimina questo BCF",keepBcfButton:"Conserva questo BCF",author:"Autore"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE0",status:"Stato",title:"Titolo",creator:"Autore",date:"Data"}},BcfTopicActionsCell:{seeButton:"Visualizza"},BcfTopicComments:{commentButton:"Pubblica un commento",commentLabel:"Pubblica un commento",commentText:"Commento",cancelButton:"Annulla",publishButton:"Pubblica",commentsText:"commenti",deleteCommentText:"Eliminare questo commento?",deleteButton:"Elimina"},BcfTopicPriorityCell:{noPriority:"Nessuno"},SettingCard:{addButton:"aggiungi un elemento",cancelButton:"Annulla",validateButton:"Conferma",deleteExtensionText:"Elimina questo parametro",deleteButton:"Elimina",title:{Priority:"Priorit\xE0",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorit\xE0",Label:"Aggiungi una nuova etichetta",Status:"Aggiungi un nuovo stato",Type:"Aggiungi un nuovo tipo",Stage:"Aggiungi una nuova fase"},text:{Priority:"Elenco delle priorit\xE0",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}}}},tZt=({apiClient:e,fetchUsers:t,i18nPlugin:i}={})=>({install(o){e?fr.setup({apiClient:e,fetchUsers:t}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),i?Object.entries(eZt).forEach(([r,n])=>{i.global.mergeLocaleMessage(r,n)}):console.warn("[BCF Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(o3e).forEach(([r,n])=>{o.component(r,n)})}}),iZt={de:{BuildingMaker:{title:"Building Maker",back:"Zur\xFCck",list:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",createButton:"Neues Projekt",updateButton:"Umbenennen",deleteButton:"L\xF6schen"},form:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",input:"Name des Geb\xE4udes",error:"Ung\xFCltiger Name",createButton:"Erstellen",updateButton:"Best\xE4tigen"},view:{addStoreyButton:"Etage",addPlanButton:"Grundriss",closeButton:"Fertigstellen",submitFilesButton:"Best\xE4tigen"},storeyForm:{title:"Neue Etage",input:"Name",error:"Ung\xFCltiger Name",cancelButton:"Abbrechen",submitButton:"Best\xE4tigen"}},FileManager:{creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gel\xF6scht",newFileSuccess:"Datei hinzugef\xFCgt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gel\xF6scht",nameInputErrorMessage:"Ung\xFCltiger name",cancel:"Abbrechen",submit:"Best\xE4tigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"L\xF6schen",deleteTitle:"Dateien l\xF6schen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endg\xFCltig zu l\xF6schen"}},en:{BIMDataComponents:{t:{back:"Back",cancel:"Cancel",create:"Create",delete:"Delete",download:"Download",finish:"Finish",rename:"Rename",search:"Search",see:"View",storey:"Storey",validate:"Validate"}},BuildingMaker:{title:"Building Maker",list:{text:"Create and edit storeys, then download your PDFs.",new:"New project"},form:{input:"Building name",error:"Invalid"},view:{addStorey:"Add Storey",addFile:"Add File",addPlan:"Add Plan"},storeyForm:{title:"New storey",input:"Name",error:"Invalid name"}},FileManager:{creationFormTitle:"Create folder",renameFormPlaceholder:"Folder/File name",nameInputPlaceholder:"Folder name",emptyFolder:"This folder is empty",newFolderSuccess:"New folder created",renameFolderSuccess:"Folder renamed",deleteFolderSuccess:"Folder deleted",newFileSuccess:"File added",renameFileSuccess:"File renamed",deleteFileSuccess:"File deleted",nameInputErrorMessage:"Invalid name",buttonText:"New folder",addFileButtonText:"Upload a file",deleteTitle:"Deleting Files",deleteDetail:"You are about to permanently delete the following files / folders",dmsRoot:"Root of the project's DMS",pdfPageSelectorTitle:"Select a page"},MetaBuildingStructure:{title:"Meta-Building Structure",tab:{structure:"Structure",zones:"Zones",equipments:"Equipments"},StoreySelector:{placeholder:"Select a storey"}},PhotosphereBuilding:{title:"Photosphere Building"}},es:{BuildingMaker:{title:"Building Maker",back:"Vuelta",list:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",createButton:"Nuevo proyecto",updateButton:"Renombrar",deleteButton:"Suprimir"},form:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",input:"Nombre del edificio",error:"Nombre no v\xE1lido",createButton:"Crear",updateButton:"Validar"},view:{addStoreyButton:"Piso",addPlanButton:"Plano",closeButton:"Terminar",submitFilesButton:"Validar"},storeyForm:{title:"Nuevo piso",input:"Nombre",error:"Nombre no v\xE1lido",cancelButton:"Anular",submitButton:"Validar"}},FileManager:{creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta est\xE1 vac\xEDa",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inv\xE1lida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Est\xE1 a punto de eliminar permanentemente los siguientes archivos / carpetas"}},fr:{BIMDataComponents:{t:{back:"Retour",cancel:"Annuler",create:"Cr\xE9er",delete:"Supprimer",download:"T\xE9l\xE9charger",finish:"Terminer",rename:"Renommer",search:"Rechercher",see:"Voir",storey:"\xC9tage",validate:"Valider"}},BuildingMaker:{title:"Building Maker",list:{text:"Cr\xE9ez et \xE9ditez les \xE9tages puis t\xE9l\xE9chagez vos PDF.",new:"Nouveau projet"},form:{input:"Nom du b\xE2timent",error:"Nom invalide"},view:{addStorey:"Ajouter un \xC9tage",addFile:"Ajouter un fichier",addPlan:"Ajouter un plan"},storeyForm:{title:"Nouvel \xE9tage",input:"Nom",error:"Nom invalide"}},FileManager:{creationFormTitle:"Cr\xE9er un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier cr\xE9\xE9",renameFolderSuccess:"Dossier renomm\xE9",deleteFolderSuccess:"Dossier supprim\xE9",newFileSuccess:"Fichier ajout\xE9",renameFileSuccess:"Fichier renomm\xE9",deleteFileSuccess:"Fichier supprim\xE9",nameInputErrorMessage:"Nom invalide",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",deleteTitle:"Supression de fichiers",deleteDetail:"Vous \xEAtes sur le point de supprimer d\xE9finitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",pdfPageSelectorTitle:"S\xE9lectionner une page"},MetaBuildingStructure:{title:"Structure M\xE9ta-Building",tab:{structure:"Structure",zones:"Zones",equipments:"\xC9quipements"},StoreySelector:{placeholder:"S\xE9lectionner un \xE9tage"}},PhotosphereBuilding:{title:"Photosph\xE8re Building"}},it:{BuildingMaker:{title:"Building Maker",back:"Reso",list:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",createButton:"Nuovo progetto",updateButton:"Rinominare",deleteButton:"Eliminare"},form:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",input:"Nome della costruzione",error:"Nome non corretto",createButton:"Creare",updateButton:"Convalidare"},view:{addStoreyButton:"Piano",addPlanButton:"Mappa",closeButton:"Finire",submitFilesButton:"Convalidare"},storeyForm:{title:"Nuovo piano",input:"Nome",error:"Nome non corretto",cancelButton:"Annullare",submitButton:"Convalidare"}},FileManager:{creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella \xE8 vuota",newFolderSuccess:"Nuova cartella creata",renameFolderSuccess:"Cartella rinominata",deleteFolderSuccess:"Cartella eliminata",newFileSuccess:"File aggiunto",renameFileSuccess:"File rinominato",deleteFileSuccess:"File cancellato",nameInputErrorMessage:"Nome non valido",cancel:"Annulla",submit:"Invia",buttonText:"Nuova cartella",addFileButtonText:"Carica un file",rename:"Rinominare",view:"Vedere",download:"Scaricare",delete:"Cancellare",deleteTitle:"Eliminazione di file",deleteDetail:"Stai per eliminare definitivamente i seguenti file/cartelle"}}},rZt=({i18nPlugin:e}={})=>({install(t){e?Object.entries(iZt).forEach(([i,o])=>{e.global.mergeLocaleMessage(i,o)}):console.warn("[BIMData Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(RIt).forEach(([i,o])=>{t.component(i,o)})}}),oZt={beforeMount(e,t){if(typeof t.value!="function")throw Error(`click away directive needs function, got ${typeof t.value}`);e.clickAwayHandler=i=>{(i.path||i.composedPath&&i.composedPath()).find(o=>o===e)||t.value()},window.addEventListener("mousedown",e.clickAwayHandler,!0)},unmounted(e){window.removeEventListener("mousedown",e.clickAwayHandler,!0),delete e.clickAwayHandler}},nZt=co({BIMDataClickAway:()=>zl,BIMDataClickInputAway:()=>oZt}),aZt=e=>({install(t){Object.entries(lNe).forEach(([i,o])=>{e&&e.excludedComponents&&e.excludedComponents.length>0&&e.excludedComponents.includes(i)||(!e||!e.includedComponents||e.includedComponents.includes(i))&&t.component(i,o)}),(!e||e.directives!==!1)&&Object.entries(nZt).forEach(([i,o])=>t.directive(i.split("BIMData")[1],o))}}),sZt={name:"LiWrapper",render(){return Gr("li",this.$slots.default())}};function lZt(e,t){var i=new Set([]);return e.forEach(o=>{t.has(o)||i.add(o)}),i}var Bc=Qn("id"),cZt=({contextMenu:e,objects:t=[],state:i=e.$viewer.state,pictos:o})=>[{name:"selectAll",get group(){return e.groupPositions.select},position:1,get label(){return e.$t("context_menu.select_all")},get picto(){return o.get(this.name)},execute:()=>i.selectObjects(t.filter(Sl(ar("visible"),yA("selected"))).map(Bc)),predicate:()=>t.some(Sl(ar("visible"),yA("selected")))},{name:"deselectAll",get group(){return e.groupPositions.select},position:2,get label(){return e.$t("context_menu.deselect_all")},get picto(){return o.get(this.name)},execute:()=>i.deselectObjects(t.filter(ar("selected")).map(Bc)),predicate:()=>t.some(ar("selected"))},{name:"selectSimilar",get group(){return e.groupPositions.select},position:3,get label(){return e.$t("context_menu.select_similar")},get picto(){return o.get(this.name)},execute(){let r=t.filter(n=>n.visible&&n.type===this.selectedObject.type&&n.id!==this.selectedObject.id).map(Bc);i.selectObjects(r)},selectedObject:null,predicate(){let r=t.filter(Sl(ar("visible"),ar("selected")));return r.length===1&&r[0].type!==void 0?(this.selectedObject=r[0],!0):(this.selectedObject=null,!1)}},{name:"reverseSelection",get label(){return e.$t("context_menu.reverse_selection")},get group(){return e.groupPositions.select},position:4,execute:()=>{let r=new Set(t.filter(ar("selected")).map(Bc)),n=new Set(t.filter(ar("visible")).map(Bc));i.selectObjects(Array.from(lZt(n,r)),{exclusive:!0})},predicate:()=>t.some(Sl(yA("selected"),ar("visible")))&&t.some(Sl(ar("selected"),ar("visible")))},{name:"showAll",get group(){return e.groupPositions.visibility},position:1,get label(){return e.$t("context_menu.show_all")},get picto(){return o.get(this.name)},execute:()=>i.showObjects(t.filter(yA("visible")).map(Bc)),predicate:()=>t.some(yA("visible"))},{name:"hide",get group(){return e.groupPositions.visibility},position:2,get label(){return e.$t("context_menu.hide")},get picto(){return o.get(this.name)},objectsToHide:null,execute(){let r=this.objectsToHide.filter(ar("selected"));r.length>0&&i.deselectObjects(r.map(Bc)),i.hideObjects(this.objectsToHide.map(Bc))},predicate(){return this.objectsToHide=t.filter(Sl(ar("selected"),ar("visible"))),this.objectsToHide.length>0}},{name:"hideAll",get group(){return e.groupPositions.visibility},position:3,get label(){return e.$t("context_menu.hide_all")},execute:()=>{let r=t.filter(ar("visible"));r.some(ar("selected"))&&i.deselectObjects(r.filter(ar("selected")).map(Bc)),i.hideObjects(r.map(Bc))},predicate:()=>t.some(ar("visible"))}].filter(r=>r.predicate()),dZt={components:{LiWrapper:sZt},inject:["$viewer"],data(){return{defaultPrevented:!1,displayed:!1,top:null,bottom:null,left:null,width:200,nextCommandId:1,currentCommands:[],contextCommands:[],registeredCommands:[],groupPositions:{select:10,visibility:20},asyncPredicateRunning:!1}},computed:{position(){return{top:this.top?this.top+"px":"unset",bottom:this.bottom?this.bottom+"px":"unset",left:this.left+"px",width:this.width+"px"}}},watch:{displayed(e){e?document.addEventListener("keydown",this.onKeyDown):document.removeEventListener("keydown",this.onKeyDown)}},created(){this.$viewer.contextMenu=this,this.asyncPredicates=new Set},methods:{onKeyDown(e){e.key==="Escape"&&this.away()},setPosition(e){let t=(document.fullscreenElement?document.fullscreenElement:this.$parent.$el).getBoundingClientRect();this.left=e.clientX-t.left,this.top=e.clientY-t.top,this.left+this.width>t.width&&(this.left-=this.width),e.clientY>t.top+t.height/2?(this.bottom=t.height-this.top,this.top=null):this.bottom=null},typeCheckCommand(e={}){let t=null;if((!e.execute||typeof e.execute!="function")&!e.component&&(t="Cannot register context menu command. A command must have an execute function or a component property."),e.label||(t="Cannot register context menu command. A command must have a label."),t)throw console.error(t),Error(t);return e.id=this.nextCommandId++,e},open(e){this.currentCommands=[],this.setPosition(e),this.originEvent=e,e.preventDefault(),this.setCurrentCommands(),this.groupCurrentCommands(),this.defaultPrevented=!1,this.displayed=!0,document.fullscreenElement?(this.$el.parentElement.removeChild(this.$el),this.adoptiveParent=document.fullscreenElement,this.adoptiveParent.appendChild(this.$el)):this.adoptiveParent&&this.adoptiveParent!==this.$viewer.globalContext.el&&(this.adoptiveParent.removeChild(this.$el),this.$viewer.globalContext.el.appendChild(this.$el),this.adoptiveParent=null)},setCurrentCommands(){this.asyncPredicates.clear(),this.asyncPredicateRunning=!1,this.defaultPrevented||this.registeredCommands.forEach(async e=>{if(typeof e.predicate=="function"){let t=e.predicate(this.$viewer.globalContext.activeLocalContext);if(t===!0)this.currentCommands.push(e);else if(typeof t?.then=="function"){this.asyncPredicates.add(t),this.asyncPredicateRunning=!0;let i=await t;this.asyncPredicates.has(t)&&(this.asyncPredicates.delete(t),this.asyncPredicateRunning=this.asyncPredicates.size>0,i===!0&&this.currentCommands.push(e))}}else this.currentCommands.push(e)}),this.currentCommands.push(...this.contextCommands),this.contextCommands=[]},getDefaultCommands({objects:e=[],state:t=this.$viewer.state,context:i=null}){let o=new Map;return i&&this.$viewer.shortcutManager.getShortcuts(i).forEach(r=>o.set(r.name,r.key)),cZt({contextMenu:this,objects:e,state:t,pictos:o})},executeCommand(e){if(e.execute&&(e.execute(this.originEvent),this.displayed=!1),e.component&&!e.menu)throw Error("Command with component property must have a `menu` property")},away(){this.displayed=!1},groupCurrentCommands(){let e=new Map;this.currentCommands.forEach(t=>{(t.group===null||t.group===void 0)&&(t.group=0),e.has(t.group)?e.get(t.group).push(t):e.set(t.group,[t])}),e.forEach(t=>t.sort((i,o)=>(i.position=i.position||0,o.position=o.position||0,i.position-o.position))),this.currentCommands=[...e.keys()].sort((t,i)=>t-i).map(t=>e.get(t)).flat()},isGroupIntersection(e){if(e===0)return!1;let t=this.currentCommands[e-1],i=this.currentCommands[e];return t.group<i.group},registerContextCommand(e){let t=this.typeCheckCommand(e);return this.contextCommands.push(t),e.id},registerCommand(e){let t=this.typeCheckCommand(e);return this.registeredCommands.push(t),e.id},unregisterCommand(e){return this.registeredCommands.find(t=>t.id===e)?(this.registeredCommands=this.registeredCommands.filter(t=>t.id!==e),!0):!1},preventDefault(){this.defaultPrevented=!0}}},uZt={key:0,class:"separator"},AZt={class:"menu-text"},hZt={key:1,class:"menu-picto"},pZt={key:0,class:"context-menu__spinner"};function fZt(e,t,i,o,r,n){let a=I("BIMDataIconChevron"),s=I("LiWrapper"),l=I("BIMDataSpinner"),c=Li("click-away");return r.displayed&&(r.currentCommands.length||r.asyncPredicateRunning)?Tt((k(),N("ul",{key:0,class:"bimdata-list context-menu",style:ve(n.position)},[(k(!0),N(ut,null,Vt(r.currentCommands,(d,u)=>(k(),W(s,{key:d.label,class:"context-menu__element",onClick:A=>n.executeCommand(d)},{default:j(()=>[n.isGroupIntersection(u)?(k(),N("div",uZt)):le("",!0),w("div",AZt,G(d.label),1),!d.component&&d.picto?(k(),N("span",hZt,G(d.picto),1)):d.component?(k(),W(a,{key:2,size:"xxs",class:"fill-primary"})):le("",!0)]),_:2},1032,["onClick"]))),128)),r.asyncPredicateRunning?(k(),N("li",pZt,[T(l)])):le("",!0)],4)),[[c,n.away]]):le("",!0)}var gZt=Q(dZt,[["render",fZt],["__scopeId","data-v-5b87d4a3"]]),mZt={name:"ViewerHeader",inject:["$viewer"],props:{visible:{type:Boolean,default:!0}},setup(){let e=bt("$viewer"),t=qo(new Map);return{logo:e.uiSettings.bimdataLogo!==!1,version:e.uiSettings.version===!1?null:e.version,headerContent:t,headerRightContentComponents:je(()=>Array.from(t.values()).filter(i=>i.position==="right").sort((i,o)=>i.order-o.order).map(i=>i.component)),headerLeftContentComponents:je(()=>Array.from(t.values()).filter(i=>i.position==="left").sort((i,o)=>i.order-o.order).map(i=>i.component)),addContent:i=>{if(!i.name)throw TypeError("[Viewer Header] Content must have a name");if(t.has(i.name))throw Error(`[Viewer Header] Content with name ${i.name} already exists`);t.set(i.name,i)},removeContent:i=>t.has(i)?(t.delete(i),!0):!1}}},vZt={class:"viewer-header"},yZt={class:"viewer-header__content"},wZt={class:"viewer-header__content__left"},bZt={class:"viewer-header__content__right"},CZt={key:0,class:"m-l-6 flex items-center"},xZt={key:1,class:"viewer-header__version"};function BZt(e,t,i,o,r,n){let a=I("BIMDataIllustration");return Tt((k(),N("div",vZt,[w("div",yZt,[w("div",wZt,[(k(!0),N(ut,null,Vt(o.headerLeftContentComponents,s=>(k(),W(qr(s),{key:s.name}))),128))]),w("div",bZt,[(k(!0),N(ut,null,Vt(o.headerRightContentComponents,s=>(k(),W(qr(s),{key:s.name}))),128))])]),o.logo||o.version?(k(),N("div",CZt,[o.logo?(k(),W(a,{key:0,name:"logo",width:"30px",height:"30px"})):le("",!0),o.version?(k(),N("div",xZt,G(o.version),1)):le("",!0)])):le("",!0)],512)),[[ui,i.visible]])}var kZt=Q(mZt,[["render",BZt],["__scopeId","data-v-5c9ea6b6"]]),EZt={emits:["resize"],setup(e,{emit:t}){return{onResizerMousedown:i=>{i.preventDefault();let o=i.clientX,r=a=>{a.preventDefault();let s=a.clientX-o;o=a.clientX,t("resize",s)},n=a=>{a.preventDefault(),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",n)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",n)}}}},MZt={class:"bimdata-separator"};function PZt(e,t,i,o,r,n){return k(),N("div",MZt,[t[1]||=w("div",{class:"bimdata-separator__line"},null,-1),w("div",{class:"bimdata-separator__resizer",onMousedown:t[0]||=(...a)=>o.onResizerMousedown&&o.onResizerMousedown(...a)},null,32)])}var IZt={components:{Separator:Q(EZt,[["render",PZt],["__scopeId","data-v-79a3b3af"]])},props:{position:{type:String,required:!0,validator(e){return["left","right"].includes(e)}},sidePanel:{type:Object,required:!0,validator(e){if(e.width&&(typeof e.width!="number"||e.width<0))return console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof e.width}`),!1;let t=typeof e?.component=="object";return t||console.error("[GlobalSidePanel] sidePanel must have a component property"),t}}},setup(e){let t=pe(null),i=pe(e.sidePanel.width??400);return xt(()=>e.sidePanel,()=>{Object.defineProperty(e.sidePanel,"width",{get(){return i.value},set(o){if(typeof o!="number"||o<=0){console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof o}`);return}i.value=o}}),Object.defineProperty(e.sidePanel,"componentInstance",{get(){return t.value},enumerable:!0})},{immediate:!0}),{componentInstance:t,width:i,onResize:(o,r=1)=>{let n=i.value+o*r;i.value=Math.max(0,n)}}}},SZt={class:"bimdata-global-side-panel__component"};function DZt(e,t,i,o,r,n){let a=I("Separator");return k(),N("div",{class:"bimdata-global-side-panel",style:ve(`width: ${o.width}px`)},[i.sidePanel.resizable&&i.position==="right"?(k(),W(a,{key:0,onResize:t[0]||=s=>o.onResize(s,-1)})):le("",!0),w("div",SZt,[(k(),W(qr(i.sidePanel.component),{ref:"componentInstance"},null,512))]),i.sidePanel.resizable&&i.position==="left"?(k(),W(a,{key:1,onResize:t[1]||=s=>o.onResize(s)})):le("",!0)],4)}var TZt={name:"BimdataViewer",components:{ContextMenu:gZt,ViewerHeader:kZt,ModalManager:ene,GlobalSidePanel:Q(IZt,[["render",DZt],["__scopeId","data-v-82d0d4cb"]])},setup(){let e=bt("$viewer"),{globalContext:t,shortcutManager:i}=e;$i(()=>{i&&i.destroy(),t.hub.clear()}),Di(()=>{e.pluginManager.runPluginsScripts(e)});let o=je(()=>e.uiSettings.bimdataLogo!==!1&&(t.localContexts.length!==1||t.localContexts[0].window?.logoAndVersion)),r=je(()=>e.uiSettings.version!==!1&&(t.localContexts.length!==1||t.localContexts[0].window?.logoAndVersion)?e.version:null),n=je(()=>t.leftSidePanel),a=je(()=>t.rightSidePanel),s=je(()=>{let h=e.uiSettings.header!==!1,p=t.localContexts.length===1&&t.localContexts[0].window?.header===!1,f=!!(n.value||a.value);return h&&(!p||f)}),l=e.uiSettings.contextMenu!==!1,c=pe(null);function d(h){l&&c.value.open(h)}function u(){e.shortcutManager.active=!0}function A(){e.shortcutManager.active=!1}return{Layout:e.layout.areas.component,onContextMenu:d,onMouseenter:u,onMouseleave:A,isHeaderVisible:s,viewerTemplateRef:t.templateRef,modalManagerTemplateRef:t.modalManagerTemplateRef,headerTemplateRef:t.headerTemplateRef,contextMenuTemplateRef:c,contextMenuEnabled:l,bimdataLogoOnSingleWindow:o,viewerVersionOnSingleWindow:r,version:e.version,loading:je(()=>t.loading),spinner:je(()=>t.spinner),leftSidePanel:n,rightSidePanel:a}}},LZt={key:1,class:"bimdata-context-loading-overlay",style:{"z-index":"3"}},RZt={key:2,class:"viewer__logo"},_Zt={key:1,class:"version m-t-6"};function FZt(e,t,i,o,r,n){let a=I("ModalManager"),s=I("ContextMenu"),l=I("ViewerHeader"),c=I("GlobalSidePanel"),d=I("BIMDataSpinner"),u=I("BIMDataIllustration");return k(),N("div",{id:"bimdata-viewer",ref:"viewerTemplateRef",class:"bimdata-viewer bimdata-design-system bimdata-scrollbar",onContextmenu:t[0]||=(...A)=>o.onContextMenu&&o.onContextMenu(...A),onMouseenter:t[1]||=(...A)=>o.onMouseenter&&o.onMouseenter(...A),onMouseleave:t[2]||=(...A)=>o.onMouseleave&&o.onMouseleave(...A)},[T(a,{ref:"modalManagerTemplateRef"},null,512),o.contextMenuEnabled?(k(),W(s,{key:0,ref:"contextMenuTemplateRef"},null,512)):le("",!0),T(l,{ref:"headerTemplateRef",visible:o.isHeaderVisible},null,8,["visible"]),w("div",{class:"bimdata-viewer__content",style:ve(o.isHeaderVisible?"height: calc(100% - var(--bimdata-viewer-header-height, 40px))":"height: 100%")},[o.leftSidePanel?(k(),W(c,{key:0,"side-panel":o.leftSidePanel,position:"left"},null,8,["side-panel"])):le("",!0),(k(),W(qr(o.Layout),{style:"height: 100%; flex-grow: 1;"})),o.rightSidePanel?(k(),W(c,{key:1,"side-panel":o.rightSidePanel,position:"right"},null,8,["side-panel"])):le("",!0)],4),o.loading?(k(),N("div",LZt,[o.spinner&&o.spinner.component?(k(),W(qr(o.spinner.component),Cs(la({key:0},o.spinner.props)),null,16)):(k(),W(d,{key:1,size:"40px",border:"5px"}))])):le("",!0),!o.isHeaderVisible&&(o.bimdataLogoOnSingleWindow||o.viewerVersionOnSingleWindow)?(k(),N("div",RZt,[o.bimdataLogoOnSingleWindow?(k(),W(u,{key:0,name:"logo"})):le("",!0),o.viewerVersionOnSingleWindow?(k(),N("div",_Zt,G(o.version),1)):le("",!0)])):le("",!0)],544)}var UZt=Q(TZt,[["render",FZt],["__scopeId","data-v-0c1c941a"]]),OZt=["src"],NZt={class:"bimdata-models__header"},HZt={key:0,class:"bimdata-models__header__loader"},VZt={class:"bimdata-models__header__picto"},jZt={class:"bimdata-models__header__name"},QZt={key:0,class:"bimdata-models__header__name--empty"},zZt={key:1,class:"bimdata-models__header__name--empty"},qZt={key:3},GZt=["onMousemove","onClick"],nne=Q({__name:"Models",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(e){let t=e,i=bt("$viewer"),o=pe(),r=pe(0),n=pe(0),a=pe(),s=Ui([]),l=pe(!1),c=je(()=>i.localContext.loadedModels),d=je(()=>i.localContext.loadedModelIds),u=je(()=>i.localContext.loadingModelIds),A=je(()=>i.localContext.multiModel),h=je(()=>(t.customFilter?s.value.filter(t.customFilter):s.value).map(B=>c.value.find(E=>E.document?.head_id!=null&&E.document.head_id===B.document.id)??B)),p=B=>d.value.includes(B),f=B=>u.value.includes(B),m=je(()=>{let{x:B,y:E}=a.value?.getBoundingClientRect()??{x:0,y:0};return`top:${n.value-E}px; left:${r.value-B}px;`}),g=B=>{!A.value&&p(B.id)||u.value.length>0||(i.localContext.loadedModelIds.includes(B.id)?i.localContext.unloadModels([B.id]):i.localContext.loadModels([B.id]))},y=B=>{switch(B){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},v=(B,E)=>{B?.viewer_360_file&&(r.value=E.clientX,n.value=E.clientY),o.value=B?.viewer_360_file},C=async B=>{l.value=!0;try{return(await i.api.apiClient.modelApi.getModels(i.api.cloudId,i.api.projectId,void 0,void 0,B)).filter(E=>i.state.models.some(D=>D.archived)||!E.archived).sort(Zl("updated_at",!1))}catch(E){console.error("[Models] Cannot get project models. Error: ",E)}finally{l.value=!1}return[]},x=B=>B.children?.some(E=>p(E.id))??!1;return C(i.localContext.modelTypes).then(B=>{s.value=B}),(B,E)=>{let D=I("BIMDataSpinner"),P=I("BIMDataIconModel3D"),M=I("BIMDataTextbox"),R=I("BIMDataCheckbox"),O=I("BIMDataRadio"),V=I("BIMDataIcon"),z=I("BIMDataDropdownList");return k(),N("div",{ref_key:"templateRef",ref:a,class:ye(["bimdata-models",{"bimdata-models--window-positioning":e.windowPositioning}])},[o.value?(k(),N("div",{key:0,class:"bimdata-models__preview",style:ve(m.value)},[w("img",{src:o.value},null,8,OZt)],4)):le("",!0),T(z,{style:ve(`--bimdata-models-width: ${e.width};`),width:e.width,list:h.value,"element-key":"id","per-page":40,loading:l.value,class:"bimdata-models__list",disabled:h.value.length===0,onElementClick:g},{header:j(({isOpen:K})=>[w("div",NZt,[l.value||u.value.length>0?(k(),N("div",HZt,[T(D)])):(k(),N(ut,{key:1},[w("div",VZt,[T(P)]),w("div",{class:ye(["bimdata-models__header__number bimdata-info-length",{"bimdata-models__header__number--empty":d.value.length===0}])},[w("span",null,G(d.value.length),1)],2),w("div",jZt,[h.value.length===0?(k(),N("span",QZt,G(B.$t("model.no_model")),1)):d.value.length===0?(k(),N("span",zZt,G(B.$t("model.no_loaded_model")),1)):d.value.length===1?(k(),W(M,{key:2,text:c.value[0].name,tooltip:!K},null,8,["text","tooltip"])):d.value.length>1?(k(),N("span",qZt,G(B.$t("model.selected_models")),1)):le("",!0)])],64))])]),element:j(({element:K,close:Z})=>[w("div",{class:"bimdata-models__model",onMousemove:te=>e.preview&&v(K,te),onMouseout:E[0]||=te=>e.preview&&v(),onClick:()=>{!A.value&&!p(K.id)&&Z()}},[A.value?(k(),W(R,{key:0,"model-value":p(K.id)||x(K),disabled:K.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])):(k(),W(O,{key:1,"model-value":p(K.id)||x(K),disabled:K.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])),T(V,{margin:"0 calc(var(--spacing-unit) / 2)",name:y(K.status),size:"xs",class:ye({"fill-success":K.status==="C","fill-high":K.status==="E"})},null,8,["name","class"]),T(M,{class:ye({"bimdata-models__model__name":!0,"bimdata-models__model__name--disabled":K.status!=="C"||u.value.length>0}),text:K.name,width:`calc(100% -
|
|
6442
6442
|
${A.value?13:23}px - 2 * 6px - 16px)`},null,8,["class","text","width"]),K.document&&!K.document.is_head_version?(k(),W(V,{key:2,name:"versioning",fill:"",color:"default",size:"xs",margin:"0 0 0 6px"})):le("",!0)],40,GZt),f(K.id)?(k(),W(D,{key:0,class:"bimdata-models__model__spinner"})):le("",!0)]),_:1},8,["style","width","list","loading","disabled"])],2)}}},[["__scopeId","data-v-34c2cf79"]]),KZt="data:image/svg+xml,%3csvg%20width='16'%20height='21'%20viewBox='0%200%2016%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.47193%202.76644C7.65699%202.84439%207.77716%203.02565%207.777%203.22661L7.77339%207.94624C7.77318%208.22238%207.54916%208.44655%207.27301%208.44693L2.4192%208.45366C2.21569%208.45394%202.03258%208.33085%201.95617%208.1424C1.87975%207.95394%201.92528%207.73773%202.07129%207.59566L6.92872%202.86931C7.0729%202.72902%207.28688%202.6885%207.47193%202.76644ZM3.65141%207.45195L6.77378%207.44762L6.7761%204.41157L3.65141%207.45195ZM5.81657%200.893911L6.02338%200.893274L13.3879%200.870595C14.679%200.866619%2015.7208%201.91642%2015.722%203.20083L15.2221%203.20237L15.722%203.20052L15.722%203.20083L15.745%2017.8999L15.745%2017.9002C15.7462%2019.1846%2014.7063%2020.2408%2013.4153%2020.2448L2.35929%2020.2788C1.07114%2020.2828%200.0171799%2019.2362%200.0159721%2017.9486L0.00563138%206.92409L0.00543684%206.71668L0.152103%206.56972L5.67032%201.04045L5.81657%200.893911ZM6.23113%201.89264L1.00582%207.12841L1.01597%2017.9455C1.01666%2018.6791%201.62068%2019.2811%202.35835%2019.2788L13.4143%2019.2448C14.1484%2019.2425%2014.7456%2018.6402%2014.745%2017.9035C14.745%2017.9034%2014.745%2017.9033%2014.745%2017.9033L14.722%203.20423L14.722%203.20391C14.7213%202.46716%2014.123%201.86833%2013.3888%201.87059L6.23113%201.89264Z'%20fill='%232F374A'/%3e%3c/svg%3e",JZt=["src"],ZZt={key:0,class:"bimdata-multi-model-loader__header-container"},WZt={key:0,class:"bimdata-multi-model-loader__header__loader"},YZt={class:"bimdata-multi-model-loader__header__picto"},XZt=["src"],$Zt={class:"bimdata-multi-model-loader__header__name"},eWt={key:0,class:"bimdata-multi-model-loader__header__name--empty"},tWt={key:1,class:"bimdata-multi-model-loader__header__name--empty"},iWt={key:3},rWt={key:1,class:"bimdata-multi-model-loader__main"},oWt=["onMousemove","onClick"],nWt=Q({__name:"BIMDataMultiModelLoader",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(e){let t=e,i=bt("$viewer"),o=pe(),r=pe(0),n=pe(0),a=pe(),s=Ui([]),l=pe(!1),c=pe(!0),d=O=>{O.key==="Escape"?c.value=!0:O.key==="Enter"&&D()};xt(c,O=>{O?(window.removeEventListener("keydown",d),v.clear(),y.clear(),o.value=null):window.addEventListener("keydown",d)});let u=je(()=>i.localContext.loadedModels),A=je(()=>i.localContext.loadedModelIds),h=je(()=>i.localContext.loadingModelIds),p=je(()=>i.localContext.multiModel),f=je(()=>(t.customFilter?s.value.filter(t.customFilter):s.value).map(O=>u.value.find(V=>V.document?.head_id!=null&&V.document.head_id===O.document.id)??O)),m=O=>A.value.includes(O),g=O=>h.value.includes(O),y=qo(new Set),v=qo(new Set),C=O=>O.children?.some(V=>m(V.id))??!1,x=O=>(m(O.id)||C(O)||y.has(O))&&!v.has(O),B=je(()=>{let{x:O,y:V}=a.value.getBoundingClientRect();return`top:${n.value-V}px; left:${r.value-O}px;`}),E=O=>{O.status==="C"&&(!p.value&&m(O.id)||(m(O.id)?v.has(O)?v.delete(O):v.add(O):y.has(O)?y.delete(O):y.add(O)))},D=()=>{y.size>0&&i.localContext.loadModels(Array.from(y).map(O=>O.id)),v.size>0&&i.localContext.unloadModels(Array.from(v).map(O=>O.id)),c.value=!0},P=O=>{switch(O){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},M=O=>O.document&&!O.document.is_head_version,R=(O,V)=>{!t.preview||c.value||(O?.viewer_360_file&&(r.value=V.clientX,n.value=V.clientY),o.value=O?.viewer_360_file)};return(async O=>{l.value=!0;try{return(await i.api.apiClient.modelApi.getModels(i.api.cloudId,i.api.projectId,void 0,void 0,O)).filter(V=>i.state.models.some(z=>z.archived)||!V.archived).sort(Zl("updated_at",!1))}catch(V){console.error("[Models] Cannot get project models. Error: ",V)}finally{l.value=!1}return[]})(i.localContext.modelTypes).then(O=>{s.value=O}),(O,V)=>{let z=I("BIMDataSpinner"),K=I("BIMDataTextbox"),Z=I("BIMDataIconChevron"),te=I("BIMDataButton"),ie=I("BIMDataIconFileIfcPolychrome"),se=I("BIMDataCheckbox"),Be=I("BIMDataRadio"),qe=I("BIMDataIcon"),ze=I("BIMDataPaginatedList"),st=Li("click-away");return k(),N("div",{ref_key:"templateRef",ref:a,class:ye(["bimdata-multi-model-loader",{"bimdata-multi-model-loader--window-positioning":e.windowPositioning}])},[o.value?(k(),N("div",{key:0,class:"bimdata-multi-model-loader__preview",style:ve(B.value)},[w("img",{src:o.value},null,8,JZt)],4)):le("",!0),T(Qi,{name:"fade",mode:"out-in"},{default:j(()=>[c.value?(k(),N("div",ZZt,[Pt(O.$slots,"left",{},void 0,!0),w("div",{class:"bimdata-multi-model-loader__header",onClick:V[0]||=Pe=>c.value=!1},[l.value||h.value.length>0?(k(),N("div",WZt,[T(z)])):(k(),N(ut,{key:1},[w("div",YZt,[w("img",{src:mt(KZt),alt:"file icon"},null,8,XZt)]),w("div",{class:ye(["bimdata-multi-model-loader__header__number bimdata-info-length",{"bimdata-multi-model-loader__header__number--empty":A.value.length===0}])},[w("span",null,G(A.value.length),1)],2),w("div",$Zt,[f.value.length===0?(k(),N("span",eWt,G(O.$t("model.no_model")),1)):A.value.length===0?(k(),N("span",tWt,G(O.$t("model.no_loaded_model")),1)):A.value.length===1?(k(),W(K,{key:2,text:u.value[0].name,tooltip:c.value,width:"233px"},null,8,["text","tooltip"])):A.value.length>1?(k(),N("span",iWt,G(O.$t("model.selected_models")),1)):le("",!0)]),T(te,{color:"default",icon:"",radius:"",fill:"",width:"21px",height:"21px"},{default:j(()=>[T(Z,{size:"xxxs"})]),_:1})],64))]),Pt(O.$slots,"right",{},void 0,!0)])):Tt((k(),N("div",rWt,[T(ze,{list:f.value,"per-page":10},{element:j(({element:Pe})=>[w("div",{class:ye(["bimdata-multi-model-loader__main__model",{"bimdata-multi-model-loader__main__model--disabled":Pe.status!=="C"}]),onMousemove:Ge=>R(Pe,Ge),onMouseout:V[1]||=Ge=>R(),onClick:Ge=>E(Pe)},[T(ie,{fill:"",color:"default",size:"xs"}),p.value?(k(),W(se,{key:0,"model-value":x(Pe),disabled:Pe.status!=="C"},null,8,["model-value","disabled"])):(k(),W(Be,{key:1,"model-value":x(Pe),disabled:Pe.status!=="C"},null,8,["model-value","disabled"])),T(K,{class:ye({"bimdata-multi-model-loader__main__model__name":!0,"bimdata-multi-model-loader__main__model__name--disabled":Pe.status!=="C"}),text:Pe.name,width:M(Pe)?"333px":"363px"},null,8,["class","text","width"]),M(Pe)?(k(),W(qe,{key:2,name:"versioning",fill:"",color:"default",size:"xs",margin:"0 0 0 6px"})):le("",!0),g(Pe.id)?(k(),W(z,{key:3,class:"bimdata-multi-model-loader__main__model__spinner"})):(k(),W(qe,{key:4,name:P(Pe.status),size:"xs",class:ye({"fill-success":Pe.status==="C","fill-high":Pe.status==="E"})},null,8,["name","class"]))],42,oWt)]),_:1},8,["list"]),T(te,{class:"bimdata-multi-model-loader__main__validate",width:"93px",color:"primary",fill:"",radius:"",disabled:mt(y).size===0&&mt(v).size===0,onClick:D},{default:j(()=>[nt(G(O.$t("global.validate")),1)]),_:1},8,["disabled"])])),[[st,()=>c.value=!0]])]),_:3})],2)}}},[["__scopeId","data-v-44e6af66"]]),aWt={data(){return{shown:!1}},mounted(){setTimeout(()=>{this.shown=!0},500)}};function sWt(e,t,i,o,r,n){let a=I("BIMDataIllustration");return k(),N("div",{class:"bimdata__no-model",style:ve({"--no-model--opacity":r.shown?1:0})},[T(a,{name:"emptyViewer",x:"90",y:"90"}),w("span",null,G(e.$t("model.select_model")),1)],4)}var ane=Q(aWt,[["render",sWt],["__scopeId","data-v-5ffd9bc0"]]);window.BIMDataViewerVue=b4;var lWt=class{constructor(e={}){let{api:t={},ui:i}=e;this.uiCfg=i,t.apiUrl||=(console.info("[BIMData Viewer] INFO - Viewer config - `apiUrl` not set, use 'https://api.bimdata.io' by default."),"https://api.bimdata.io"),t.archiveUrl||=(console.info("[BIMData Viewer] INFO - Viewer config - `archiveUrl` not set, use 'https://archive.bimdata.io' by default."),"https://archive.bimdata.io"),t.pdfBackendUrl||=(console.info("[BIMData Viewer] INFO - Viewer config - `pdfBackendUrl` not set, use 'https://pdf-backend.bimdata.io' by default."),"https://pdf-backend.bimdata.io"),t.ifcIds&&(console.warn("[BIMData Viewer] DEPRECATED - Viewer config - please use the `modelIds` property instead of `ifcIds`."),t.modelIds===void 0&&(t.modelIds=t.ifcIds)),t.modelIds||=[],t.offline?.dataFile&&(t.offline.data=t.offline.dataFile),this.$viewer=new WJt(e),t.offline?.enabled?this.$viewer.api.enableOfflineMode(t.offline.data,t.offline.options).then(()=>this.state.loadModels(t.modelIds)):(this.$viewer.globalContext.loadingProcessStart(),this.state.loadModels(t.modelIds).finally(()=>this.$viewer.globalContext.loadingProcessEnd())),this.vueApp=null}get state(){return this.$viewer.state}get api(){return this.$viewer.api}async mount(e,t="3d"){let{$viewer:i}=this;await i.api.ready;try{let l=await i.api.apiClient.collaborationApi.checkProjectAccess(i.api.cloudId,i.api.projectId);i.api.permissions=one(l)}catch{i.api.permissions=one()}let o=this.api.accessToken,{i18n:r}=i;r.registerTranslations(i.pluginManager.pluginTranslations),i.layout.apply(t);let n=qf({i18n:r.i18nVuePlugin,data(){return{accessToken:o}},render(){return Gr(UZt,{style:"height: 100%"})}}).use(r.i18nVuePlugin).use(aZt()).use(rZt({i18nPlugin:r.i18nVuePlugin})).use(tZt({apiClient:i.api.apiClient,i18nPlugin:r.i18nVuePlugin}));n.provide("$viewer",i),n.provide("BIMDATA_DESIGN_SYSTEM_DARK_THEME",je(()=>i.darkTheme)),n.component("BIMDataModelLoader",nne),n.component("BIMDataMultiModelLoader",nWt),n.component("BIMDataNoModelWindowPlaceHolder",ane),n.component("BIMDataStoreySelector",UB),n.component("ModelsLoader",nne),n.component("NoModelWindowPlaceHolder",ane);let a=e instanceof HTMLElement?e:document.querySelector(e);a&&(a.style.height="100%");let s=n.mount(e);return s.$viewer=i,YJt(s.$el,this.uiCfg?.style),typeof window<"u"&&(window.bimdataViewer=s),this.vueApp=n,s}destroy(){this.vueApp?.unmount()}setLocale(e){if(!iO.includes(e))throw Error(`Viewer available locales are ${iO.join(", ")}.`);this.$viewer.i18n.locale=e}registerPlugin(e){this.$viewer.registerPlugin(e)}registerWindow(e){return this.$viewer.windowManager.registerWindow(e)}unregisterWindow(e){return this.$viewer.windowManager.unregisterWindow(e)}setAccessToken(e){this.api.accessToken=e}async loadModels(e){this.$viewer.globalContext.loadingProcessStart();let t=await this.state.loadModels(e);return this.$viewer.globalContext.loadingProcessEnd(),t}loadIfcs(e){return console.warn("[BIMData Viewer] DEPRECATED - Viewer - please use the loadModels method instead of loadIfcs."),this.loadModels(e)}},sne=(e={})=>new lWt(e);window.makeBIMDataViewer=sne;export{sne as default};
|