@xtctwins/tctwins-industry-engine 0.0.9 → 0.0.10

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.
Files changed (22) hide show
  1. package/dist/{AnnotationTool-Dzd5rcwa.mjs → AnnotationTool-B6o3pWgm.mjs} +2 -2
  2. package/dist/{BCFTool-kLs0Y5n5.mjs → BCFTool-D-PM2few.mjs} +2 -2
  3. package/dist/{CommentTool-BFDzk_5a.mjs → CommentTool-CycO4Znf.mjs} +1 -1
  4. package/dist/Industry_Viewer_Lib.es.js +1 -1
  5. package/dist/Industry_Viewer_Lib.umd.js +2 -2
  6. package/dist/{InspectorTool-BOeo7StN.mjs → InspectorTool-D9zBnlUA.mjs} +3 -3
  7. package/dist/{MeasureTool-qO_ci86K.mjs → MeasureTool-BfIIQ3PS.mjs} +1 -1
  8. package/dist/{MouseTool-CLryyMPf.mjs → MouseTool-nmX9TlQA.mjs} +1 -1
  9. package/dist/{NavigateTool-BkwZL4ng.mjs → NavigateTool-BM2rj2oZ.mjs} +1 -1
  10. package/dist/{RoamTool-DyL44JV3.mjs → RoamTool-C12h52G0.mjs} +1 -1
  11. package/dist/{ScreenShotTool-cho_m-3z.mjs → ScreenShotTool-KUZgYA8Z.mjs} +2 -2
  12. package/dist/{SectionTool-BG8pmY3A.mjs → SectionTool-DyyT_8pR.mjs} +3 -3
  13. package/dist/{SettingTool-BgBA9v6q.mjs → SettingTool-Djrs40Xu.mjs} +4 -4
  14. package/dist/{StructureTree-BRY3gEgI.mjs → StructureTree-b_gLP-TO.mjs} +4 -4
  15. package/dist/{XRayTool-DQeoOCKy.mjs → XRayTool-WdvB7EF1.mjs} +1 -1
  16. package/dist/{alert-D1vSywdn.mjs → alert-xMo21PgA.mjs} +1 -1
  17. package/dist/{el-checkbox-BCef2DnV.mjs → el-checkbox-DO8tNsp2.mjs} +1 -1
  18. package/dist/{el-input-number-33CYHG2x.mjs → el-input-number-B9oE-lvA.mjs} +1 -1
  19. package/dist/{index-DROkX_fP.mjs → index-uIV4CiDG.mjs} +15 -15
  20. package/dist/{panel.vue_vue_type_style_index_0_lang-Ce406nTf.mjs → panel.vue_vue_type_style_index_0_lang-rC-OVibm.mjs} +1 -1
  21. package/dist/{tallPanel-CMZIMI6R.mjs → tallPanel-Dre_48W4.mjs} +1 -1
  22. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- (function(Lr,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("axios"),require("ali-oss"),require("element-plus"),require("@element-plus/icons-vue"),require("pinia"),require("mitt")):typeof define=="function"&&define.amd?define(["exports","vue","axios","ali-oss","element-plus","@element-plus/icons-vue","pinia","mitt"],o):(Lr=typeof globalThis<"u"?globalThis:Lr||self,o(Lr.Industry_Viewer_Lib={},Lr.Vue,Lr.axios,Lr.AliOss,Lr.ElementPlus,Lr.ElementPlusIconsVue,Lr.Pinia,Lr.Mitt))})(this,function(Lr,o,Wl,US,Hp,un,HS,zS){"use strict";var Whe=Object.defineProperty;var $he=(Lr,o,Wl)=>o in Lr?Whe(Lr,o,{enumerable:!0,configurable:!0,writable:!0,value:Wl}):Lr[o]=Wl;var Fn=(Lr,o,Wl)=>$he(Lr,typeof o!="symbol"?o+"":o,Wl);const GS="https://bimkk-api.tctwins.com",Vt="https://bimkk-oss-production.oss-cn-beijing.aliyuncs.com",QS="https://convert.tctwins.com",wr=zS();let So={INDUSTRY_CONFIGS:{viewerManager:!1,Toolbar:!1,RoamTool:!1},BimViewer:{viewerManager:!1}};const WS="architecture",$S={isMember:!1,isInShare:!1,isShareHost:!1,isShareClient:!1},KS={file:!1,image:!1,record:!1,text:!1,video:!1},Fy={offsetX:0,offsetY:0},XS={pos:"right-bottom",posNum:[0,0]},YS=120,JS="blue",ZS=!1,qS="right",ek="left",tk=0,rk=0,nk=0,ik=0,sk={pos:"bottom",posNum:[18]},ak={pos:"bottom",posNum:[70]},ok={pos:"bottom",posNum:[70]},lk="linear-gradient(180deg, #fffefb 0%, #daebff 100%)";Lr.INDUSTRY_CONFIGS=void 0;function uk(){Lr.INDUSTRY_CONFIGS={isMobile:!1,fileName:"model",isPc:!1,loadMeta:!0,outliersDetect:!0,appType:WS,showRoam:!0,showTree:!1,userInfo:$S,annoLimit:KS,commentOffset:Fy,measureOffset:Fy,skyboxImg:void 0,topHeight:tk,leftWidth:ik,bottomHeight:nk,rightWidth:rk,inspectorPos:qS,treePos:ek,commentPos:sk,annotationPos:ak,roamPos:ok,navCubePos:XS,navCubeSize:YS,themeColor:JS,hideTool:ZS,backButton:!1,backgroundColor:lk}}function Ry(I=""){wr.emit("INDUSTRY_CONFIGS",I)}function Oy(I){for(const G in I)Qn(G,I[G],!1);Ry()}function Qn(I,G,a=!0){G!==void 0&&(Lr.INDUSTRY_CONFIGS[I]=G,a&&(I=="isMobile"||I=="measureOffset"||I=="commentOffset"||I=="navCubePos"||I=="navCubeSize")&&Ry(I))}function Qt(I){return Lr.INDUSTRY_CONFIGS[I]}const Yn=HS.defineStore("toolbar",{state:()=>({tools:[{id:0,key:"reset",name:"复位",hasActiveState:!1,component:"",isShowDelimiter:!0,img:"reset",imgActive:"reset",isActive:!1},{id:1,key:"navigate",name:"视图方向",hasActiveState:!0,component:"NavigateTool",isShowDelimiter:!1,img:"navigate",imgActive:"navigate-active",isActive:!1},{id:2,key:"measure",name:"测量",hasActiveState:!0,component:"MeasureTool",isShowDelimiter:!1,img:"measure",imgActive:"measure-active",isActive:!1},{id:3,key:"comment",name:"批注",hasActiveState:!0,component:"CommentTool",isShowDelimiter:!1,img:"comment",imgActive:"comment-active",isActive:!1},{id:4,key:"share",name:"分享",hasActiveState:!0,component:"",isShowDelimiter:!1,img:"share",imgActive:"share",isActive:!1},{id:5,key:"tree",name:"结构树",hasActiveState:!0,component:"StructureTree",isShowDelimiter:!1,img:"tree",imgActive:"tree-active",isActive:!1},{id:6,key:"inspector",name:"属性",hasActiveState:!0,component:"InspectorTool",isShowDelimiter:!1,img:"inspector",imgActive:"inspector-active",isActive:!1},{id:7,key:"anno",name:"标注",hasActiveState:!0,component:"AnnotationTool",isShowDelimiter:!0,img:"annotation",imgActive:"annotation-active",isActive:!1},{id:8,key:"section",name:"剖切",hasActiveState:!0,component:"SectionTool",isShowDelimiter:!0,img:"section",imgActive:"section-active",isActive:!1},{id:9,key:"roam",name:"漫游",hasActiveState:!0,component:"RoamTool",isShowDelimiter:!0,img:"roam",imgActive:"roam-active",isActive:!1},{id:10,key:"xray",name:"透视",hasActiveState:!0,component:"XRayTool",isShowDelimiter:!1,img:"xray",imgActive:"xray-active",isActive:!1},{id:11,key:"setting",name:"设置",hasActiveState:!0,component:"SettingTool",isShowDelimiter:!0,img:"setting",imgActive:"setting-active",isActive:!1},{id:12,key:"fullscreen",name:"全屏",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"fullscreen",imgActive:"fullscreen-active",isActive:!1},{id:13,key:"cooperate",name:"协同",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"cooperate",imgActive:"cooperate",isActive:!1},{id:14,key:"bcf",name:"BCF",hasActiveState:!0,component:"MobileBCFTool",isShowDelimiter:!1,img:"bcf",imgActive:"bcf-active",isActive:!1},{id:15,key:"mouse",name:"迷你鼠标",hasActiveState:!0,component:"MouseTool",isShowDelimiter:!1,img:"mouse",imgActive:"mouse-active",isActive:!1}],visibleToolIds:[],readyToolIds:[]}),actions:{toggleToolVisibility(I){const G=this.visibleToolIds.indexOf(I);G===-1?this.visibleToolIds.push(I):this.visibleToolIds.splice(G,1)},setEnableTools(I){this.visibleToolIds=I},setEnableToolsByKey(I){let G=[];Qt("isMobile")?G=Ly(I,dk):G=Ly(I,fk);const a=[];for(let C=0;C<G.length;C++){const S=this.tools.find(v=>v.key===G[C]);S&&a.push(S.id)}this.visibleToolIds=this.visibleToolIds.concat(a)},setToolActiveStatus(I,G){const a=this.tools.find(C=>C.id===I);a?a.isActive=G!==void 0?G:!a.isActive:console.log("no such tool",I)},setToolActiveStatusBykey(I,G){const a=this.tools.find(C=>C.key===I);a?a.isActive=G!==void 0?G:!a.isActive:console.log("no such tool",I)},setAllToolClose(I=[]){if(I.length>0)for(let G=0;G<this.visibleToolIds.length;G++)I.includes(this.visibleToolIds[G])||(this.tools[this.visibleToolIds[G]].isActive=!1);else for(let G=0;G<this.visibleToolIds.length;G++)this.tools[this.visibleToolIds[G]].isActive=!1},setReadyById(I){this.tools.find(a=>a.id===I)&&this.readyToolIds.push(I)},ifToolAllReady(){for(let I=0;I<this.visibleTools.length;I++){const G=this.visibleTools[I];if(G.key!="bcf"&&G.key!="mouse"&&G.component!=""&&!this.readyTools.includes(G.id))return!1}return!0},setReadyTools(I){this.readyToolIds=[]}},getters:{visibleTools:I=>I.visibleToolIds.map(G=>I.tools.find(a=>a.id===G)).filter(G=>!!G),readyTools:I=>I.readyToolIds,visibleComponents:I=>I.tools.filter(G=>I.visibleToolIds.includes(G.id)).map(G=>G.component),getKeyById:I=>G=>{var a;return(a=I.tools.find(C=>C.id===G))==null?void 0:a.key},getToolById:I=>G=>I.tools.find(a=>a.id===G),hasActiveState:I=>G=>{const a=I.tools.find(C=>C.id===G);return a?a.hasActiveState:!1},isToolEnable:I=>G=>{const a=I.tools.find(C=>C.id===G);return a?I.visibleToolIds.includes(a.id):!1},isToolActive:I=>G=>{const a=I.tools.find(C=>C.id===G);return a?a.isActive:!1},isToolActiveBykey:I=>G=>{const a=I.tools.find(C=>C.key===G);return a?a.isActive:!1},hasToolActive:I=>(G=[0,12,13,14,15])=>I.tools.find(C=>{if(!G.find(S=>C.id==S))return C.isActive})}});function Rd(){return Yn()}function ck(){Yn().setAllToolClose(),Yn().setReadyTools([]),Yn().setEnableTools([])}let dk=["reset","navigate","measure","comment","share","tree","inspector","anno","section","roam","xray","setting","fullscreen","cooperate","bcf","mouse"],fk=["reset","tree","roam","measure","section","comment","anno","screenshot","inspector","setting","fullscreena","bcf","mouse"];function Ly(I,G){const a={};G.forEach((S,v)=>{a[S]=v});const C=I.filter(S=>a.hasOwnProperty(S)).map(S=>({value:S,index:a[S]}));return C.sort((S,v)=>S.index-v.index),C.map(S=>S.value)}let Ny=!1;So.INDUSTRY_CONFIGS.viewerManager||(wr.on("INDUSTRY_CONFIGS",I=>{window.bimViewer?Ln.ConfigViewer(I):Ny=!0}),So.INDUSTRY_CONFIGS.viewerManager=!0);const hk=()=>{Ln.SetAllClose(),Ny&&Ln.ConfigViewer()};So.BimViewer.viewerManager||(wr.on("BimViewer",hk),So.BimViewer.viewerManager=!0);class Ln{static ConfigViewer(G=""){if(G==""){if(Lr.INDUSTRY_CONFIGS.isMobile&&(window.bimViewer.setIsTouch(!0),window.bimViewer.navCubeMode.visible=!1),Lr.INDUSTRY_CONFIGS.measureOffset&&window.bimViewer.setMeasureOffSet(Qt("measureOffset").offsetX,Qt("measureOffset").offsetY),Lr.INDUSTRY_CONFIGS.commentOffset&&window.bimViewer.setCommentsOffset(Qt("commentOffset").offsetX,Qt("commentOffset").offsetY),Lr.INDUSTRY_CONFIGS.navCubePos){let a=function(){let v=0,f=0;return Qt("navCubePos").pos.includes("left")?v+=parseInt(Qt("leftWidth")):Qt("navCubePos").pos.includes("right")&&(v+=parseInt(Qt("rightWidth"))),Qt("navCubePos").pos.includes("top")?f+=parseInt(Qt("topHeight")):Qt("navCubePos").pos.includes("bottom")&&(f+=parseInt(Qt("bottomHeight"))),[v,f]};const C=Qt("navCubePos").pos?Qt("navCubePos").pos:"right-bottom",S=a();C.includes("right")&&window.bimViewer.setNavCubePosition("right",S[0]),C.includes("top")&&window.bimViewer.setNavCubePosition("top",S[1]),C.includes("left")&&window.bimViewer.setNavCubePosition("left",S[0]),C.includes("bottom")&&window.bimViewer.setNavCubePosition("bottom",S[1])}Lr.INDUSTRY_CONFIGS.navCubeSize&&window.bimViewer.setNavCubeSize(Qt("navCubeSize"));return}switch(G){case"isMobile":window.bimViewer.setIsTouch(Lr.INDUSTRY_CONFIGS.isMobile),window.bimViewer.navCubeMode.visible=!Lr.INDUSTRY_CONFIGS.isMobile;break;case"measureOffset":window.bimViewer.setCommentsOffset(Qt("measureOffset").offsetX,Qt("measureOffset").offsetY);break;case"commentOffset":window.bimViewer.setCommentsOffset(Qt("commentOffset").offsetX,Qt("commentOffset").offsetY);break;case"navCubePos":const a=Qt("navCubePos").pos?Qt("navCubePos").pos:"right-bottom",C=Qt("navCubePos").posNum?Qt("navCubePos").posNum:[0,a.includes("top")?Qt("topHeight"):0];a.includes("right")&&window.bimViewer.setNavCubePosition("right",C[0]),a.includes("left")&&window.bimViewer.setNavCubePosition("left",C[0]),a.includes("top")&&window.bimViewer.setNavCubePosition("top",C[1]),a.includes("bottom")&&window.bimViewer.setNavCubePosition("bottom",C[1]);break;case"navCubeSize":window.bimViewer.setNavCubeSize(Qt("navCubeSize"));break}}static SaveViewerState(G){G.measure&&(this.viewerState.measureType=G.measure)}static SetToolActiveById(G,a=!Yn().isToolActive(G)){const C=Yn().getKeyById(G);C?this.SetToolActiveByKey(C,a):console.log("no such key:",G)}static SetToolActiveByKey(G,a=!Yn().isToolActiveBykey(G)){switch(G){case"tree":break;case"reset":window.bimViewer.resetView();break;case"roam":window.bimViewer.SetFirstPersonModeActive(a);break;case"measure":window.bimViewer.measureTool.setActive(a),a&&window.bimViewer.measureTool.setActiveByType(this.viewerState.measureType,a);break;case"section":window.bimViewer.SetSectionToolActive(a);break;case"comment":a?setTimeout(()=>{window.bimViewer.SetCommentsToolActive(a)},100):window.bimViewer.SetCommentsToolActive(a);break;case"anno":window.bimViewer.SetAnnotationToolActive(a);break;case"screenshot":break;case"inspector":break;case"fullscreen":Qt("isPc")&&(a?document.documentElement.requestFullscreen():document.exitFullscreen&&document.exitFullscreen());break;case"xray":window.bimViewer.disableClickEvent=a;break}}static SetAllClose(){window.bimViewer.closeAll()}static DestroyViewer(){window.bimViewer.destroy(),console.log("旧模型已销毁")}static showRequestBusy(G,a){window.bimViewer.showSpinner(G),a&&a()}}Fn(Ln,"viewerState",{measureType:"distance"}),Fn(Ln,"entityState",{xrayedObjectIds:[],highlightedObjectIds:[],selectedObjectIds:[],visibleObjectIds:[],edgesObjectIds:[]});const pk=["src"],Ak=["src"],mk=["src"],gk=["src"],vk=["src"],yk=["src"],bk=["src"],_k=o.defineComponent({__name:"ClickEvent",setup(I,{expose:G}){Yn();const a=o.ref(!0);o.onMounted(()=>{});let C="",S,v;const f=()=>{v=window.bimViewer,v.eventTrigger.on("pickedNothing",()=>{a.value&&(l.value=!1,w.value=[],Ln.entityState.selectedObjectIds=[],v.setAllObjectsSelected(!1))}),v.eventTrigger.on("touchEntity",Q=>{a.value&&(S=Q,C=S.id,A(C))}),v.viewer.cameraControl.on("touchmoveCanvas",()=>{})};wr.on("BimViewer",f);const h=o.ref(0),d=o.ref(0),l=o.ref(!1),u=o.ref(!0),c=o.ref(!0),p=o.ref(!1),A=Q=>{(!S||S&&Q!==S.id)&&(S=v.viewer.scene.objects[Q]),C=Q,w.value.length>0&&!w.value.find(D=>D==C)&&w.value.push(C),u.value=!S.xrayed,c.value=!S.highlighted;const{aabb:N}=S,j=[(N[0]+N[3])/2,(N[1]+N[4])/2,(N[2]+N[5])/2],$=v.viewer.scene.camera.projectWorldPos(j);let X=$[0]-172/2,W=$[1]-198/2;X<0?X=0:X>window.innerWidth-198&&(X=window.innerWidth-198),W<0?W=0:W>window.innerHeight-172-72&&(W=window.innerHeight-172-72),h.value=X,d.value=W,l.value=!0,v.setEntitySelected(S,!0)},g=()=>{w.value.find(Q=>Q==S.id)||(w.value=w.value.filter(Q=>Q!=S.id),Ln.entityState.selectedObjectIds=w.value),_()},_=()=>{S=null,C="",u.value=!0,c.value=!0,l.value=!1,b.value=-1,wr.emit("unFocus")},b=o.ref(-1),w=o.ref([]),B=Q=>{b.value=Q},k=Q=>{switch(w.value.length>0&&(w.value.push(C),Ln.entityState.selectedObjectIds.find(N=>N==S.id)||Ln.entityState.selectedObjectIds.push(S.id)),Q!==5&&Q!==0&&(window.bimViewer.disableClickEvent=!1,v.setAllObjectsSelected(!1)),Q==5&&w.value.length==0&&(window.bimViewer.disableClickEvent=!0),Q){case 0:w.value.length>0?v.viewFitObjects(w.value):v.viewFitEntity(S),setTimeout(()=>{v.setAllObjectsSelected(!1)},1e3);break;case 1:w.value.length>0?v.setObjectsVisible(Ln.entityState.selectedObjectIds,!1):v.setEntityVisible(S,!1);break;case 2:p.value?v.setAllObjectsVisible(!0):(v.setAllObjectsVisible(!1),w.value.length>0?v.setObjectsVisible(Ln.entityState.selectedObjectIds,!0):v.setEntityVisible(S,!0),v.setAllObjectsSelected(!1)),p.value=!p.value;break;case 3:w.value.length>0?(v.viewer.scene.setObjectsXRayed(w.value,u.value),w.value.forEach(N=>{const j=v.viewer.scene.objects[N];j.edges=j.xrayed?!0:v.edgesActive,v.setEntityHighlighted(j,!1)})):(v.setEntityXRayed(S),S.edges=S.xrayed?!0:v.edgesActive,v.setEntityHighlighted(S,!1));break;case 4:w.value.length>0?w.value.forEach(N=>{const j=v.viewer.scene.objects[N];v.setEntityHighlighted(j,c.value),j.xrayed&&(v.setEntityXRayed(j,!1),j.edges=v.edgesActive)}):(v.setEntityHighlighted(S),S.xrayed&&(v.setEntityXRayed(S,!1),S.edges=v.edgesActive));break;case 5:w.value.find(N=>N==C)||(w.value.push(C),v.setObjectsSelected(w.value,!0)),Ln.entityState.selectedObjectIds=w.value,wr.emit("multiSelect");break}Q!==5&&Q!==0&&(v.setEntitySelected(S,!1),w.value=[],Ln.entityState.selectedObjectIds=w.value),Ln.entityState.xrayedObjectIds=v.viewer.scene.xrayedObjectIds,Ln.entityState.highlightedObjectIds=v.viewer.scene.highlightedObjectIds,Ln.entityState.selectedObjectIds=v.viewer.scene.selectedObjectIds,Ln.entityState.visibleObjectIds=v.viewer.scene.visibleObjectIds,Ln.entityState.edgesObjectIds=v.viewer.scene.edgesObjectIds,setTimeout(()=>{_()},300)},T=()=>{_()},L=()=>{a.value=!1},V=()=>{a.value=!0};return wr.on("focusEntity",A),o.onBeforeUnmount(()=>{wr.off("BimViewer",f),wr.off("focusEntity",A)}),G({reset:T,enable:V,disable:L}),(Q,N)=>o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"entity_tools",style:o.normalizeStyle({left:`${h.value}px`,top:`${d.value}px`})},[o.createElementVNode("div",{class:"close_btns",onClick:g},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/close-dark-circle.svg`},null,8,pk)]),o.createElementVNode("div",{class:o.normalizeClass([{detail_btn_active:b.value==0},"detail_btn fit"]),onPointerdown:N[0]||(N[0]=j=>B(0)),onPointerup:N[1]||(N[1]=j=>k(0))},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/fit.svg`},null,8,Ak),N[12]||(N[12]=o.createElementVNode("span",null,"聚焦",-1))],34),o.createElementVNode("div",{class:o.normalizeClass([{detail_btn_active:b.value==1},"detail_btn hide_self"]),onPointerdown:N[2]||(N[2]=j=>B(1)),onPointerup:N[3]||(N[3]=j=>k(1))},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/hide-self.svg`},null,8,mk),N[13]||(N[13]=o.createElementVNode("span",null,"隐藏",-1))],34),o.createElementVNode("div",{class:o.normalizeClass([{detail_btn_active:b.value==2},"detail_btn hide_other"]),onPointerdown:N[4]||(N[4]=j=>B(2)),onPointerup:N[5]||(N[5]=j=>k(2))},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/hide-other.svg`},null,8,gk),o.createElementVNode("span",null,o.toDisplayString(p.value?"取消":"仅显示"),1)],34),o.createElementVNode("div",{class:o.normalizeClass([{detail_btn_active:b.value==3},"detail_btn edge_solid"]),onPointerdown:N[6]||(N[6]=j=>B(3)),onPointerup:N[7]||(N[7]=j=>k(3))},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/${u.value?"edge":"solid"}.svg`},null,8,vk),o.createElementVNode("span",null,o.toDisplayString(u.value?"线框":"填充"),1)],34),o.createElementVNode("div",{class:o.normalizeClass([{detail_btn_active:b.value==4},"detail_btn opacity_fill"]),onPointerdown:N[8]||(N[8]=j=>B(4)),onPointerup:N[9]||(N[9]=j=>k(4))},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/${c.value?"opacity":"fill"}.svg`},null,8,yk),o.createElementVNode("span",null,o.toDisplayString(c.value?"透明":"实体"),1)],34),o.createElementVNode("div",{class:o.normalizeClass([{detail_btn_active:b.value==5},"detail_btn multi_select"]),onPointerdown:N[10]||(N[10]=j=>B(5)),onPointerup:N[11]||(N[11]=j=>k(5))},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/multiSelect.svg`},null,8,bk),N[14]||(N[14]=o.createElementVNode("span",null,"多选",-1))],34)],4)),[[o.vShow,l.value]])}}),wk=Symbol(),zp="el",xk="is-",ol=(I,G,a,C,S)=>{let v=`${I}-${G}`;return a&&(v+=`-${a}`),C&&(v+=`__${C}`),S&&(v+=`--${S}`),v},Ck=Symbol("namespaceContextKey"),Gp=I=>{const G=o.getCurrentInstance()?o.inject(Ck,o.ref(zp)):o.ref(zp);return o.computed(()=>o.unref(G)||zp)},$r=(I,G)=>{const a=Gp();return{namespace:a,b:(_="")=>ol(a.value,I,_,"",""),e:_=>_?ol(a.value,I,"",_,""):"",m:_=>_?ol(a.value,I,"","",_):"",be:(_,b)=>_&&b?ol(a.value,I,_,b,""):"",em:(_,b)=>_&&b?ol(a.value,I,"",_,b):"",bm:(_,b)=>_&&b?ol(a.value,I,_,"",b):"",bem:(_,b,w)=>_&&b&&w?ol(a.value,I,_,b,w):"",is:(_,...b)=>{const w=b.length>=1?b[0]:!0;return _&&w?`${xk}${_}`:""},cssVar:_=>{const b={};for(const w in _)_[w]&&(b[`--${a.value}-${w}`]=_[w]);return b},cssVarName:_=>`--${a.value}-${_}`,cssVarBlock:_=>{const b={};for(const w in _)_[w]&&(b[`--${a.value}-${I}-${w}`]=_[w]);return b},cssVarBlockName:_=>`--${a.value}-${I}-${_}`}};/**
1
+ (function(Lr,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("axios"),require("ali-oss"),require("element-plus"),require("@element-plus/icons-vue"),require("pinia"),require("mitt")):typeof define=="function"&&define.amd?define(["exports","vue","axios","ali-oss","element-plus","@element-plus/icons-vue","pinia","mitt"],o):(Lr=typeof globalThis<"u"?globalThis:Lr||self,o(Lr.Industry_Viewer_Lib={},Lr.Vue,Lr.axios,Lr.AliOss,Lr.ElementPlus,Lr.ElementPlusIconsVue,Lr.Pinia,Lr.Mitt))})(this,function(Lr,o,Wl,US,Hp,un,HS,zS){"use strict";var Whe=Object.defineProperty;var $he=(Lr,o,Wl)=>o in Lr?Whe(Lr,o,{enumerable:!0,configurable:!0,writable:!0,value:Wl}):Lr[o]=Wl;var Fn=(Lr,o,Wl)=>$he(Lr,typeof o!="symbol"?o+"":o,Wl);const GS="https://bimkk-api-test.tctwins.com",Vt="https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com",QS="https://convert-test.tctwins.com",wr=zS();let So={INDUSTRY_CONFIGS:{viewerManager:!1,Toolbar:!1,RoamTool:!1},BimViewer:{viewerManager:!1}};const WS="architecture",$S={isMember:!1,isInShare:!1,isShareHost:!1,isShareClient:!1},KS={file:!1,image:!1,record:!1,text:!1,video:!1},Fy={offsetX:0,offsetY:0},XS={pos:"right-bottom",posNum:[0,0]},YS=120,JS="blue",ZS=!1,qS="right",ek="left",tk=0,rk=0,nk=0,ik=0,sk={pos:"bottom",posNum:[18]},ak={pos:"bottom",posNum:[70]},ok={pos:"bottom",posNum:[70]},lk="linear-gradient(180deg, #fffefb 0%, #daebff 100%)";Lr.INDUSTRY_CONFIGS=void 0;function uk(){Lr.INDUSTRY_CONFIGS={isMobile:!1,fileName:"model",isPc:!1,loadMeta:!0,outliersDetect:!0,appType:WS,showRoam:!0,showTree:!1,userInfo:$S,annoLimit:KS,commentOffset:Fy,measureOffset:Fy,skyboxImg:void 0,topHeight:tk,leftWidth:ik,bottomHeight:nk,rightWidth:rk,inspectorPos:qS,treePos:ek,commentPos:sk,annotationPos:ak,roamPos:ok,navCubePos:XS,navCubeSize:YS,themeColor:JS,hideTool:ZS,backButton:!1,backgroundColor:lk}}function Ry(I=""){wr.emit("INDUSTRY_CONFIGS",I)}function Oy(I){for(const G in I)Qn(G,I[G],!1);Ry()}function Qn(I,G,a=!0){G!==void 0&&(Lr.INDUSTRY_CONFIGS[I]=G,a&&(I=="isMobile"||I=="measureOffset"||I=="commentOffset"||I=="navCubePos"||I=="navCubeSize")&&Ry(I))}function Qt(I){return Lr.INDUSTRY_CONFIGS[I]}const Yn=HS.defineStore("toolbar",{state:()=>({tools:[{id:0,key:"reset",name:"复位",hasActiveState:!1,component:"",isShowDelimiter:!0,img:"reset",imgActive:"reset",isActive:!1},{id:1,key:"navigate",name:"视图方向",hasActiveState:!0,component:"NavigateTool",isShowDelimiter:!1,img:"navigate",imgActive:"navigate-active",isActive:!1},{id:2,key:"measure",name:"测量",hasActiveState:!0,component:"MeasureTool",isShowDelimiter:!1,img:"measure",imgActive:"measure-active",isActive:!1},{id:3,key:"comment",name:"批注",hasActiveState:!0,component:"CommentTool",isShowDelimiter:!1,img:"comment",imgActive:"comment-active",isActive:!1},{id:4,key:"share",name:"分享",hasActiveState:!0,component:"",isShowDelimiter:!1,img:"share",imgActive:"share",isActive:!1},{id:5,key:"tree",name:"结构树",hasActiveState:!0,component:"StructureTree",isShowDelimiter:!1,img:"tree",imgActive:"tree-active",isActive:!1},{id:6,key:"inspector",name:"属性",hasActiveState:!0,component:"InspectorTool",isShowDelimiter:!1,img:"inspector",imgActive:"inspector-active",isActive:!1},{id:7,key:"anno",name:"标注",hasActiveState:!0,component:"AnnotationTool",isShowDelimiter:!0,img:"annotation",imgActive:"annotation-active",isActive:!1},{id:8,key:"section",name:"剖切",hasActiveState:!0,component:"SectionTool",isShowDelimiter:!0,img:"section",imgActive:"section-active",isActive:!1},{id:9,key:"roam",name:"漫游",hasActiveState:!0,component:"RoamTool",isShowDelimiter:!0,img:"roam",imgActive:"roam-active",isActive:!1},{id:10,key:"xray",name:"透视",hasActiveState:!0,component:"XRayTool",isShowDelimiter:!1,img:"xray",imgActive:"xray-active",isActive:!1},{id:11,key:"setting",name:"设置",hasActiveState:!0,component:"SettingTool",isShowDelimiter:!0,img:"setting",imgActive:"setting-active",isActive:!1},{id:12,key:"fullscreen",name:"全屏",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"fullscreen",imgActive:"fullscreen-active",isActive:!1},{id:13,key:"cooperate",name:"协同",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"cooperate",imgActive:"cooperate",isActive:!1},{id:14,key:"bcf",name:"BCF",hasActiveState:!0,component:"MobileBCFTool",isShowDelimiter:!1,img:"bcf",imgActive:"bcf-active",isActive:!1},{id:15,key:"mouse",name:"迷你鼠标",hasActiveState:!0,component:"MouseTool",isShowDelimiter:!1,img:"mouse",imgActive:"mouse-active",isActive:!1}],visibleToolIds:[],readyToolIds:[]}),actions:{toggleToolVisibility(I){const G=this.visibleToolIds.indexOf(I);G===-1?this.visibleToolIds.push(I):this.visibleToolIds.splice(G,1)},setEnableTools(I){this.visibleToolIds=I},setEnableToolsByKey(I){let G=[];Qt("isMobile")?G=Ly(I,dk):G=Ly(I,fk);const a=[];for(let C=0;C<G.length;C++){const S=this.tools.find(v=>v.key===G[C]);S&&a.push(S.id)}this.visibleToolIds=this.visibleToolIds.concat(a)},setToolActiveStatus(I,G){const a=this.tools.find(C=>C.id===I);a?a.isActive=G!==void 0?G:!a.isActive:console.log("no such tool",I)},setToolActiveStatusBykey(I,G){const a=this.tools.find(C=>C.key===I);a?a.isActive=G!==void 0?G:!a.isActive:console.log("no such tool",I)},setAllToolClose(I=[]){if(I.length>0)for(let G=0;G<this.visibleToolIds.length;G++)I.includes(this.visibleToolIds[G])||(this.tools[this.visibleToolIds[G]].isActive=!1);else for(let G=0;G<this.visibleToolIds.length;G++)this.tools[this.visibleToolIds[G]].isActive=!1},setReadyById(I){this.tools.find(a=>a.id===I)&&this.readyToolIds.push(I)},ifToolAllReady(){for(let I=0;I<this.visibleTools.length;I++){const G=this.visibleTools[I];if(G.key!="bcf"&&G.key!="mouse"&&G.component!=""&&!this.readyTools.includes(G.id))return!1}return!0},setReadyTools(I){this.readyToolIds=[]}},getters:{visibleTools:I=>I.visibleToolIds.map(G=>I.tools.find(a=>a.id===G)).filter(G=>!!G),readyTools:I=>I.readyToolIds,visibleComponents:I=>I.tools.filter(G=>I.visibleToolIds.includes(G.id)).map(G=>G.component),getKeyById:I=>G=>{var a;return(a=I.tools.find(C=>C.id===G))==null?void 0:a.key},getToolById:I=>G=>I.tools.find(a=>a.id===G),hasActiveState:I=>G=>{const a=I.tools.find(C=>C.id===G);return a?a.hasActiveState:!1},isToolEnable:I=>G=>{const a=I.tools.find(C=>C.id===G);return a?I.visibleToolIds.includes(a.id):!1},isToolActive:I=>G=>{const a=I.tools.find(C=>C.id===G);return a?a.isActive:!1},isToolActiveBykey:I=>G=>{const a=I.tools.find(C=>C.key===G);return a?a.isActive:!1},hasToolActive:I=>(G=[0,12,13,14,15])=>I.tools.find(C=>{if(!G.find(S=>C.id==S))return C.isActive})}});function Rd(){return Yn()}function ck(){Yn().setAllToolClose(),Yn().setReadyTools([]),Yn().setEnableTools([])}let dk=["reset","navigate","measure","comment","share","tree","inspector","anno","section","roam","xray","setting","fullscreen","cooperate","bcf","mouse"],fk=["reset","tree","roam","measure","section","comment","anno","screenshot","inspector","setting","fullscreena","bcf","mouse"];function Ly(I,G){const a={};G.forEach((S,v)=>{a[S]=v});const C=I.filter(S=>a.hasOwnProperty(S)).map(S=>({value:S,index:a[S]}));return C.sort((S,v)=>S.index-v.index),C.map(S=>S.value)}let Ny=!1;So.INDUSTRY_CONFIGS.viewerManager||(wr.on("INDUSTRY_CONFIGS",I=>{window.bimViewer?Ln.ConfigViewer(I):Ny=!0}),So.INDUSTRY_CONFIGS.viewerManager=!0);const hk=()=>{Ln.SetAllClose(),Ny&&Ln.ConfigViewer()};So.BimViewer.viewerManager||(wr.on("BimViewer",hk),So.BimViewer.viewerManager=!0);class Ln{static ConfigViewer(G=""){if(G==""){if(Lr.INDUSTRY_CONFIGS.isMobile&&(window.bimViewer.setIsTouch(!0),window.bimViewer.navCubeMode.visible=!1),Lr.INDUSTRY_CONFIGS.measureOffset&&window.bimViewer.setMeasureOffSet(Qt("measureOffset").offsetX,Qt("measureOffset").offsetY),Lr.INDUSTRY_CONFIGS.commentOffset&&window.bimViewer.setCommentsOffset(Qt("commentOffset").offsetX,Qt("commentOffset").offsetY),Lr.INDUSTRY_CONFIGS.navCubePos){let a=function(){let v=0,f=0;return Qt("navCubePos").pos.includes("left")?v+=parseInt(Qt("leftWidth")):Qt("navCubePos").pos.includes("right")&&(v+=parseInt(Qt("rightWidth"))),Qt("navCubePos").pos.includes("top")?f+=parseInt(Qt("topHeight")):Qt("navCubePos").pos.includes("bottom")&&(f+=parseInt(Qt("bottomHeight"))),[v,f]};const C=Qt("navCubePos").pos?Qt("navCubePos").pos:"right-bottom",S=a();C.includes("right")&&window.bimViewer.setNavCubePosition("right",S[0]),C.includes("top")&&window.bimViewer.setNavCubePosition("top",S[1]),C.includes("left")&&window.bimViewer.setNavCubePosition("left",S[0]),C.includes("bottom")&&window.bimViewer.setNavCubePosition("bottom",S[1])}Lr.INDUSTRY_CONFIGS.navCubeSize&&window.bimViewer.setNavCubeSize(Qt("navCubeSize"));return}switch(G){case"isMobile":window.bimViewer.setIsTouch(Lr.INDUSTRY_CONFIGS.isMobile),window.bimViewer.navCubeMode.visible=!Lr.INDUSTRY_CONFIGS.isMobile;break;case"measureOffset":window.bimViewer.setCommentsOffset(Qt("measureOffset").offsetX,Qt("measureOffset").offsetY);break;case"commentOffset":window.bimViewer.setCommentsOffset(Qt("commentOffset").offsetX,Qt("commentOffset").offsetY);break;case"navCubePos":const a=Qt("navCubePos").pos?Qt("navCubePos").pos:"right-bottom",C=Qt("navCubePos").posNum?Qt("navCubePos").posNum:[0,a.includes("top")?Qt("topHeight"):0];a.includes("right")&&window.bimViewer.setNavCubePosition("right",C[0]),a.includes("left")&&window.bimViewer.setNavCubePosition("left",C[0]),a.includes("top")&&window.bimViewer.setNavCubePosition("top",C[1]),a.includes("bottom")&&window.bimViewer.setNavCubePosition("bottom",C[1]);break;case"navCubeSize":window.bimViewer.setNavCubeSize(Qt("navCubeSize"));break}}static SaveViewerState(G){G.measure&&(this.viewerState.measureType=G.measure)}static SetToolActiveById(G,a=!Yn().isToolActive(G)){const C=Yn().getKeyById(G);C?this.SetToolActiveByKey(C,a):console.log("no such key:",G)}static SetToolActiveByKey(G,a=!Yn().isToolActiveBykey(G)){switch(G){case"tree":break;case"reset":window.bimViewer.resetView();break;case"roam":window.bimViewer.SetFirstPersonModeActive(a);break;case"measure":window.bimViewer.measureTool.setActive(a),a&&window.bimViewer.measureTool.setActiveByType(this.viewerState.measureType,a);break;case"section":window.bimViewer.SetSectionToolActive(a);break;case"comment":a?setTimeout(()=>{window.bimViewer.SetCommentsToolActive(a)},100):window.bimViewer.SetCommentsToolActive(a);break;case"anno":window.bimViewer.SetAnnotationToolActive(a);break;case"screenshot":break;case"inspector":break;case"fullscreen":Qt("isPc")&&(a?document.documentElement.requestFullscreen():document.exitFullscreen&&document.exitFullscreen());break;case"xray":window.bimViewer.disableClickEvent=a;break}}static SetAllClose(){window.bimViewer.closeAll()}static DestroyViewer(){window.bimViewer.destroy(),console.log("旧模型已销毁")}static showRequestBusy(G,a){window.bimViewer.showSpinner(G),a&&a()}}Fn(Ln,"viewerState",{measureType:"distance"}),Fn(Ln,"entityState",{xrayedObjectIds:[],highlightedObjectIds:[],selectedObjectIds:[],visibleObjectIds:[],edgesObjectIds:[]});const pk=["src"],Ak=["src"],mk=["src"],gk=["src"],vk=["src"],yk=["src"],bk=["src"],_k=o.defineComponent({__name:"ClickEvent",setup(I,{expose:G}){Yn();const a=o.ref(!0);o.onMounted(()=>{});let C="",S,v;const f=()=>{v=window.bimViewer,v.eventTrigger.on("pickedNothing",()=>{a.value&&(l.value=!1,w.value=[],Ln.entityState.selectedObjectIds=[],v.setAllObjectsSelected(!1))}),v.eventTrigger.on("touchEntity",Q=>{a.value&&(S=Q,C=S.id,A(C))}),v.viewer.cameraControl.on("touchmoveCanvas",()=>{})};wr.on("BimViewer",f);const h=o.ref(0),d=o.ref(0),l=o.ref(!1),u=o.ref(!0),c=o.ref(!0),p=o.ref(!1),A=Q=>{(!S||S&&Q!==S.id)&&(S=v.viewer.scene.objects[Q]),C=Q,w.value.length>0&&!w.value.find(D=>D==C)&&w.value.push(C),u.value=!S.xrayed,c.value=!S.highlighted;const{aabb:N}=S,j=[(N[0]+N[3])/2,(N[1]+N[4])/2,(N[2]+N[5])/2],$=v.viewer.scene.camera.projectWorldPos(j);let X=$[0]-172/2,W=$[1]-198/2;X<0?X=0:X>window.innerWidth-198&&(X=window.innerWidth-198),W<0?W=0:W>window.innerHeight-172-72&&(W=window.innerHeight-172-72),h.value=X,d.value=W,l.value=!0,v.setEntitySelected(S,!0)},g=()=>{w.value.find(Q=>Q==S.id)||(w.value=w.value.filter(Q=>Q!=S.id),Ln.entityState.selectedObjectIds=w.value),_()},_=()=>{S=null,C="",u.value=!0,c.value=!0,l.value=!1,b.value=-1,wr.emit("unFocus")},b=o.ref(-1),w=o.ref([]),B=Q=>{b.value=Q},k=Q=>{switch(w.value.length>0&&(w.value.push(C),Ln.entityState.selectedObjectIds.find(N=>N==S.id)||Ln.entityState.selectedObjectIds.push(S.id)),Q!==5&&Q!==0&&(window.bimViewer.disableClickEvent=!1,v.setAllObjectsSelected(!1)),Q==5&&w.value.length==0&&(window.bimViewer.disableClickEvent=!0),Q){case 0:w.value.length>0?v.viewFitObjects(w.value):v.viewFitEntity(S),setTimeout(()=>{v.setAllObjectsSelected(!1)},1e3);break;case 1:w.value.length>0?v.setObjectsVisible(Ln.entityState.selectedObjectIds,!1):v.setEntityVisible(S,!1);break;case 2:p.value?v.setAllObjectsVisible(!0):(v.setAllObjectsVisible(!1),w.value.length>0?v.setObjectsVisible(Ln.entityState.selectedObjectIds,!0):v.setEntityVisible(S,!0),v.setAllObjectsSelected(!1)),p.value=!p.value;break;case 3:w.value.length>0?(v.viewer.scene.setObjectsXRayed(w.value,u.value),w.value.forEach(N=>{const j=v.viewer.scene.objects[N];j.edges=j.xrayed?!0:v.edgesActive,v.setEntityHighlighted(j,!1)})):(v.setEntityXRayed(S),S.edges=S.xrayed?!0:v.edgesActive,v.setEntityHighlighted(S,!1));break;case 4:w.value.length>0?w.value.forEach(N=>{const j=v.viewer.scene.objects[N];v.setEntityHighlighted(j,c.value),j.xrayed&&(v.setEntityXRayed(j,!1),j.edges=v.edgesActive)}):(v.setEntityHighlighted(S),S.xrayed&&(v.setEntityXRayed(S,!1),S.edges=v.edgesActive));break;case 5:w.value.find(N=>N==C)||(w.value.push(C),v.setObjectsSelected(w.value,!0)),Ln.entityState.selectedObjectIds=w.value,wr.emit("multiSelect");break}Q!==5&&Q!==0&&(v.setEntitySelected(S,!1),w.value=[],Ln.entityState.selectedObjectIds=w.value),Ln.entityState.xrayedObjectIds=v.viewer.scene.xrayedObjectIds,Ln.entityState.highlightedObjectIds=v.viewer.scene.highlightedObjectIds,Ln.entityState.selectedObjectIds=v.viewer.scene.selectedObjectIds,Ln.entityState.visibleObjectIds=v.viewer.scene.visibleObjectIds,Ln.entityState.edgesObjectIds=v.viewer.scene.edgesObjectIds,setTimeout(()=>{_()},300)},T=()=>{_()},L=()=>{a.value=!1},V=()=>{a.value=!0};return wr.on("focusEntity",A),o.onBeforeUnmount(()=>{wr.off("BimViewer",f),wr.off("focusEntity",A)}),G({reset:T,enable:V,disable:L}),(Q,N)=>o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"entity_tools",style:o.normalizeStyle({left:`${h.value}px`,top:`${d.value}px`})},[o.createElementVNode("div",{class:"close_btns",onClick:g},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/close-dark-circle.svg`},null,8,pk)]),o.createElementVNode("div",{class:o.normalizeClass([{detail_btn_active:b.value==0},"detail_btn fit"]),onPointerdown:N[0]||(N[0]=j=>B(0)),onPointerup:N[1]||(N[1]=j=>k(0))},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/fit.svg`},null,8,Ak),N[12]||(N[12]=o.createElementVNode("span",null,"聚焦",-1))],34),o.createElementVNode("div",{class:o.normalizeClass([{detail_btn_active:b.value==1},"detail_btn hide_self"]),onPointerdown:N[2]||(N[2]=j=>B(1)),onPointerup:N[3]||(N[3]=j=>k(1))},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/hide-self.svg`},null,8,mk),N[13]||(N[13]=o.createElementVNode("span",null,"隐藏",-1))],34),o.createElementVNode("div",{class:o.normalizeClass([{detail_btn_active:b.value==2},"detail_btn hide_other"]),onPointerdown:N[4]||(N[4]=j=>B(2)),onPointerup:N[5]||(N[5]=j=>k(2))},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/hide-other.svg`},null,8,gk),o.createElementVNode("span",null,o.toDisplayString(p.value?"取消":"仅显示"),1)],34),o.createElementVNode("div",{class:o.normalizeClass([{detail_btn_active:b.value==3},"detail_btn edge_solid"]),onPointerdown:N[6]||(N[6]=j=>B(3)),onPointerup:N[7]||(N[7]=j=>k(3))},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/${u.value?"edge":"solid"}.svg`},null,8,vk),o.createElementVNode("span",null,o.toDisplayString(u.value?"线框":"填充"),1)],34),o.createElementVNode("div",{class:o.normalizeClass([{detail_btn_active:b.value==4},"detail_btn opacity_fill"]),onPointerdown:N[8]||(N[8]=j=>B(4)),onPointerup:N[9]||(N[9]=j=>k(4))},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/${c.value?"opacity":"fill"}.svg`},null,8,yk),o.createElementVNode("span",null,o.toDisplayString(c.value?"透明":"实体"),1)],34),o.createElementVNode("div",{class:o.normalizeClass([{detail_btn_active:b.value==5},"detail_btn multi_select"]),onPointerdown:N[10]||(N[10]=j=>B(5)),onPointerup:N[11]||(N[11]=j=>k(5))},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/detail-bar/multiSelect.svg`},null,8,bk),N[14]||(N[14]=o.createElementVNode("span",null,"多选",-1))],34)],4)),[[o.vShow,l.value]])}}),wk=Symbol(),zp="el",xk="is-",ol=(I,G,a,C,S)=>{let v=`${I}-${G}`;return a&&(v+=`-${a}`),C&&(v+=`__${C}`),S&&(v+=`--${S}`),v},Ck=Symbol("namespaceContextKey"),Gp=I=>{const G=o.getCurrentInstance()?o.inject(Ck,o.ref(zp)):o.ref(zp);return o.computed(()=>o.unref(G)||zp)},$r=(I,G)=>{const a=Gp();return{namespace:a,b:(_="")=>ol(a.value,I,_,"",""),e:_=>_?ol(a.value,I,"",_,""):"",m:_=>_?ol(a.value,I,"","",_):"",be:(_,b)=>_&&b?ol(a.value,I,_,b,""):"",em:(_,b)=>_&&b?ol(a.value,I,"",_,b):"",bm:(_,b)=>_&&b?ol(a.value,I,_,"",b):"",bem:(_,b,w)=>_&&b&&w?ol(a.value,I,_,b,w):"",is:(_,...b)=>{const w=b.length>=1?b[0]:!0;return _&&w?`${xk}${_}`:""},cssVar:_=>{const b={};for(const w in _)_[w]&&(b[`--${a.value}-${w}`]=_[w]);return b},cssVarName:_=>`--${a.value}-${_}`,cssVarBlock:_=>{const b={};for(const w in _)_[w]&&(b[`--${a.value}-${I}-${w}`]=_[w]);return b},cssVarBlockName:_=>`--${a.value}-${I}-${_}`}};/**
2
2
  * @vue/shared v3.5.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
@@ -574,7 +574,7 @@ headers: `+JSON.stringify(He),st.data=bt,st.path=K.path,st.status=ue,st.headers=
574
574
  !*** ./index.ts ***!
575
575
  \******************/vs.r(om),vs.d(om,{BIMXViewer:()=>I.default});var I=vs("./src/BIMXViewer.ts")})();var qN=om.BIMXViewer;function q1(I){const G={canvasElement:document.getElementById("myCanvas"),viewerElement:document.getElementById("myViewer"),navCubeCanvasElement:document.getElementById("myNavCubeCanvas"),modelConfig:{edges:!0},skyBoxImage:Qt("skyboxImg"),viewer_cfg:{antialias:!0,pbrEnabled:!0,dtxEnabled:!0,saoEnabled:!1,transparent:!0,edgesEnabled:!0,alphaDepthMask:!1,premultipliedAlpha:!0,colorTextureEnabled:!0,backgroundColorFromAmbientLight:!0}};window.bimViewer=new qN(G),I()}const e5={class:"bimx-viewer-wrapper"},t5={id:"myCanvas",ref:"canvas"},r5={key:0,class:"bimviewer_box"},n5=["src"],i5={class:"bimviewer_text"},s5=_n(o.defineComponent({__name:"industryViewer",props:{instruction:{},fileId:{},fileName:{},filePath:{},modelType:{},modelBuffer:{},metaBuffer:{}},emits:["emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I;let{fileId:S,fileName:v,filePath:f}=C;const h=o.ref(C.modelType);let d="model1",l,u,c=!1,p=!1;o.onMounted(()=>{console.log("载入模型加载页面"),window.bimViewer&&(window.bimViewer.destroy(),window.bimViewer=null,d="model1",c=!1,p=!1,console.log("旧模型已销毁")),A()}),o.watch(()=>C.metaBuffer,V=>{V&&(u=V,console.log("watch: 已获取metaBuffer, metaReady"),c=!0)});const A=()=>{!S&&!v&&!f?console.log("未传入模型路径或名称,使用'model1'"):S?d=S:v?d=bc(v)?bc(v):v:f&&(d=bc(f)),C.modelBuffer&&C.metaBuffer?(console.log("已获取modelBuffer & metaBuffer"),l=C.modelBuffer,u=C.metaBuffer,c=!0,g()):C.modelBuffer?(l=C.modelBuffer,console.log("已获取modelBuffer。后续等待meta......."),g()):C.filePath&&(console.log("已获取modelPath: ",C.filePath),b(C.filePath))},g=()=>{a.ifToolAllReady()?q1(()=>{wr.emit("BimViewer",d),_()}):setTimeout(()=>{g()},300)},_=()=>{JN(d,"xtc",l,!1,V=>{console.log(V.result),B({isTool:!1,event_target:"BimXViewer",event_name:"modelLoaded",content:V}),V.code==200?(!h.value||h.value=="xtc")&&(Qt("loadMeta")&&(window.bimViewer.eventTrigger.on("metaLoaded",Q=>{B({isTool:!1,event_target:"BimXViewer",event_name:"metaLoaded",content:{msg:"meta加载完毕"}})}),window.bimViewer.eventTrigger.on("metaLoading",Q=>{B({isTool:!1,event_target:"BimXViewer",event_name:"metaLoading",content:{msg:"meta开始加载..."}})})),Qt("loadMeta")&&L(.3,()=>{console.log("meta已准备好,开始载入meta"),window.bimViewer.loadMetadata(d,u,!0,()=>{})})):console.log(V.msg)})},b=V=>{h.value||(h.value="xtc"),Y1.getBuffer(`${bc(V)}.${h.value}`,Q=>{l=Q,g()},Q=>{console.log(Q)}),Qt("loadMeta")&&Y1.getBuffer(`${bc(V)}.xts`,Q=>{u=Q,c=!0,console.log("meta已准备好,等待模型加载...")},Q=>{console.error(Q),p=!0})},w=G,B=V=>{w("emitHandler",V)},k=o.ref(Qt("backgroundColor")),T=V=>{k.value=V,B({isTool:!1,event_target:"BimXViewer",event_name:"changeBackgroundColor",content:{color:k.value}})};wr.on("changeBackgroundColor",T),o.onBeforeUnmount(()=>{wr.off("changeBackgroundColor",T)});const L=(V,Q)=>{p||(c?Q():setTimeout(()=>{L(V,Q)},V*1e3))};return(V,Q)=>(o.openBlock(),o.createElementBlock("div",e5,[o.createElementVNode("div",{id:"myViewer",class:"myViewer",style:o.normalizeStyle({background:k.value})},[o.createElementVNode("canvas",t5,null,512),Q[1]||(Q[1]=o.createElementVNode("canvas",{id:"myNavCubeCanvas"},null,-1)),Q[2]||(Q[2]=o.createElementVNode("div",{id:"myAnnotationDiv"},null,-1)),o.unref(Qt)("isMobile")?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",r5,[o.createElementVNode("img",{class:"bimviewer_logo",src:o.unref(Vt)+"/bim-viewer/bimviewer-logo.png",alt:""},null,8,n5),o.createElementVNode("div",i5,[Q[0]||(Q[0]=o.createElementVNode("div",null,"BIM快看",-1)),o.createElementVNode("div",null,o.toDisplayString(o.unref(WN))+"修补版本",1)])]))],4)]))}}),[["__scopeId","data-v-5ac528ea"]]),a5={class:"close_wrapper"},o5=["src"],l5=_n(o.defineComponent({__name:"closeButton_dark",props:{width:{type:Number,default:22},sizeType:{type:String,default:"px"},clickHandle:{type:Function,default:()=>{}}},setup(I){const G=I,a=o.ref("");return o.onMounted(()=>{a.value=G.width.toString()+G.sizeType}),(C,S)=>(o.openBlock(),o.createElementBlock("div",a5,[o.createElementVNode("img",{style:o.normalizeStyle({width:a.value,height:a.value}),class:"close_icon",src:`${o.unref(Vt)}/bim-viewer/close_dark.png`,onClick:S[0]||(S[0]=v=>I.clickHandle())},null,12,o5)]))}}),[["__scopeId","data-v-0fe2c3fd"]]),u5={class:"mobile_bcf_select_panel_wrapper"},c5={class:"mobile_bcf_select_panel"},d5={class:"title"},f5={class:"close"},h5=["onClick"],p5=_n(o.defineComponent({__name:"selectPanel",props:{title:{},items:{}},emits:["select","closePanel"],setup(I,{emit:G}){const a=G,C=v=>{a("select",v)},S=()=>{};return(v,f)=>{const h=l5;return o.openBlock(),o.createElementBlock("div",u5,[o.createElementVNode("div",c5,[o.createElementVNode("div",d5,[o.createElementVNode("span",null,o.toDisplayString(v.title)+"标题",1),o.createElementVNode("div",f5,[o.createVNode(h,{width:.42,"size-type":"rem","click-handle":S,dark:""})])]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.items,(d,l)=>(o.openBlock(),o.createElementBlock("div",{key:l,class:"select_item"},[o.createElementVNode("span",{onClick:u=>C(d)},"item",8,h5)]))),128))])])}}}),[["__scopeId","data-v-ded1d31d"]]),A5={class:"current_image_wrapper"},m5={class:"change_button"},g5=["src"],v5=["src"],y5=["src"],b5={class:"num_count"},_5=["src"],vl=_n(o.defineComponent({__name:"imageView",props:{snapshotList:{},editEnable:{}},emits:["deleteView","switchViewPoints","imageZoomIn"],setup(I,{expose:G,emit:a}){const C=I,S=a,v=o.ref(C.editEnable),f=o.ref("back_regular"),h=o.ref("next_regular"),d=o.ref([]),l=o.ref(0),u=o.ref();o.watch(()=>l.value,b=>{console.log("current_image_index",b)},{immediate:!0}),o.onMounted(()=>{var b,w;d.value=C.snapshotList?C.snapshotList:[],u.value=(w=(b=d.value[0])==null?void 0:b.bcfView.snapshot)==null?void 0:w.snapshot_data});const c=b=>{var w,B;b=="back"?l.value-=1:b=="next"&&(l.value+=1),u.value=(B=(w=d.value[l.value])==null?void 0:w.bcfView.snapshot)==null?void 0:B.snapshot_data,A(l.value)},p=b=>{S("deleteView",b)},A=b=>{S("switchViewPoints",b)},g=(b,w)=>{var B,k;d.value=b,l.value=typeof w=="number"?w:0,u.value=(k=(B=d.value[l.value])==null?void 0:B.bcfView.snapshot)==null?void 0:k.snapshot_data,w||A(l.value)},_=()=>{S("imageZoomIn",u)};return G({updateList:g}),(b,w)=>(o.openBlock(),o.createElementBlock("div",A5,[o.createElementVNode("div",m5,[o.withDirectives(o.createElementVNode("img",{class:"left",src:`${o.unref(Vt)}/bim-viewer/bcf-images/${f.value}.png`,onMouseover:w[0]||(w[0]=B=>f.value="back_hover"),onMouseleave:w[1]||(w[1]=B=>f.value="back_regular"),onClick:w[2]||(w[2]=B=>c("back"))},null,40,g5),[[o.vShow,d.value.length!=1&&l.value!=0]]),o.withDirectives(o.createElementVNode("img",{class:"right",src:`${o.unref(Vt)}/bim-viewer/bcf-images/${h.value}.png`,onMouseover:w[3]||(w[3]=B=>h.value="next_hover"),onMouseleave:w[4]||(w[4]=B=>h.value="next_regular"),onClick:w[5]||(w[5]=B=>c("next"))},null,40,v5),[[o.vShow,d.value.length!=1&&l.value!=d.value.length-1]])]),v.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"edit_button",onClick:w[6]||(w[6]=B=>p(l.value))},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/delete.png"},null,8,y5),w[7]||(w[7]=o.createTextVNode(" 删除 "))])):o.createCommentVNode("",!0),o.createElementVNode("div",b5,[o.createElementVNode("span",null,o.toDisplayString(l.value+1),1),w[8]||(w[8]=o.createElementVNode("span",null,"/",-1)),o.createElementVNode("span",null,o.toDisplayString(d.value.length),1)]),o.createElementVNode("img",{class:"current_image",src:u.value,alt:"",onClick:_},null,8,_5)]))}}),[["__scopeId","data-v-98339a2c"]]),w5={class:"close_wrapper"},x5=["src"],ys=_n(o.defineComponent({__name:"closeButton",props:{width:{type:Number,default:22},sizeType:{type:String,default:"px"},light:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},clickHandle:{type:Function,default:()=>{}}},setup(I){const G=I,a=o.ref(!0),C=o.ref("");return o.onMounted(()=>{!G.dark&&G.light&&(a.value=!1),C.value=G.width.toString()+G.sizeType}),(S,v)=>(o.openBlock(),o.createElementBlock("div",w5,[o.createElementVNode("img",{style:o.normalizeStyle({width:C.value,height:C.value}),class:"close_icon",src:`${o.unref(Vt)}/BIMX_Website/icon/${a.value?"icon_close_1":"icon_close"}.png`,onClick:v[0]||(v[0]=f=>I.clickHandle())},null,12,x5)]))}}),[["__scopeId","data-v-648147da"]]);function ew(I){return/[\u4e00-\u9fff]/.test(I)}const xf=I=>{if(!ew(I))return I;switch(I){case"高":return"high";case"中":return"middle";case"低":return"low";default:return I}},uu=I=>{if(ew(I))return I;switch(I){case"high":return"高";case"middle":return"中";case"low":return"低";case"High":return"高";case"Middle":return"中";case"Low":return"低";default:return I}},Cf=I=>{switch(I){case"high":return"#F54D4D";case"High":return"#F54D4D";case"高":return"#F54D4D";case"middle":return"#86B6FF";case"Middle":return"#86B6FF";case"中":return"#86B6FF";case"low":return"#D5D5D5";case"Low":return"#D5D5D5";case"低":return"#D5D5D5";default:return"#D5D5D5"}},tw=I=>{switch(I){case"high":return"#F54D4D";case"High":return"#F54D4D";case"高":return"#F54D4D";case"middle":return"#86B6FF";case"Middle":return"#86B6FF";case"中":return"#86B6FF";case"low":return"#333333";case"Low":return"#333333";case"低":return"#333333";default:return"#333333"}},rw=I=>{switch(I){case"high":return"#F54D4D";case"High":return"#F54D4D";case"高":return"#F54D4D";case"medium":return"#86B6FF";case"Medium":return"#86B6FF";case"中":return"#86B6FF";case"low":return"#262626";case"Low":return"#262626";case"低":return"#262626";default:return"#262626"}},nw=I=>{switch(I){case"进行中":return"#00AF50";case"High":return"#00AF50";case"已关闭":return"#F54D4D";case"Medium":return"#F54D4D";case"已解决":return"#959595";case"Low":return"#959595";default:return"#959595"}},iw=["模型基本结构","模型结构冲突","模型错误"],Bf=["高","中","低"],Ef=["已关闭","进行中","已解决"],sw=["初步规划结束","施工开始","施工结束"],Pf=["建筑","暖通","MEP","结构"];function aw(I){if(!I||I=="")return"";let G=new Date(I);if(isNaN(G.getTime())){const d=I.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(?:Z|([+-]\d{2}):(\d{2}))?$/);if(d){const[,l,u,c,p,A,g,_,b]=d,w=Date.UTC(parseInt(l,10),parseInt(u,10)-1,parseInt(c,10),parseInt(p,10)-(_?parseInt(_,10):0),parseInt(A,10)-(b?parseInt(b,10):0),parseInt(g,10));G=new Date(w)}else return I}const a=G.getFullYear(),C=String(G.getMonth()+1).padStart(2,"0"),S=String(G.getDate()).padStart(2,"0"),v=String(G.getHours()).padStart(2,"0"),f=String(G.getMinutes()).padStart(2,"0"),h=String(G.getSeconds()).padStart(2,"0");return`${a}-${C}-${S} ${v}:${f}:${h}`}function as(I){if(!I||I=="")return"";let G=new Date(I);if(isNaN(G.getTime())){const v=I.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(?:Z|([+-]\d{2}):(\d{2}))?$/);if(v){const[,f,h,d]=v,l=Date.UTC(parseInt(f,10),parseInt(h,10)-1,parseInt(d,10));G=new Date(l)}else return I}const a=G.getFullYear(),C=String(G.getMonth()+1).padStart(2,"0"),S=String(G.getDate()).padStart(2,"0");return`${a}-${C}-${S}`}class Tn{static set BcfStaffList(G){this.BCFSTAFFLIST=G}static get BcfStaffList(){return this.BCFSTAFFLIST}static getStaffName(G){if(typeof G=="number"){const a=this.BCFSTAFFLIST.find(C=>C.userId===G);return a?a.userName:G.toString()}return G}static getStaffId(G){const a=this.BCFSTAFFLIST.find(C=>C.userName===G);if(a)return a.userId}static set Loading(G){this.LOADING=G}static get Loading(){return this.LOADING}}Fn(Tn,"BCFSTAFFLIST",[]),Fn(Tn,"LOADING",!1);const C5={class:"mobile_bcf_add_wrapper"},B5={class:"add_page_title"},E5=["src"],P5={class:"close"},S5={class:"content_scrollbar"},k5={class:"bcf_add_content"},M5={class:"bcf_id_time"},T5={class:"snpshot_wrapper"},I5={class:"snapshot_container"},D5={key:0,class:"upload_button"},F5=["src"],R5={class:"upload"},O5=["src"],L5={key:0,class:"add_new_view"},N5={class:"new_button upload"},j5=["src"],V5=["src"],U5={class:"bcf_content"},H5={class:"content"},z5={class:"select_item"},G5={class:"select_wrapper"},Q5={class:"select_item"},W5={class:"select_wrapper"},$5={class:"select_item"},K5={class:"select_wrapper"},X5={class:"select_item"},Y5={class:"select_wrapper"},J5={class:"select_item"},Z5={class:"select_wrapper"},q5={class:"select_item"},e6={class:"select_wrapper"},t6={class:"select_item"},r6={class:"select_wrapper"},n6={class:"select_item"},i6={class:"select_wrapper"},s6={class:"select_item"},a6={class:"select_wrapper"},o6=_n(o.defineComponent({__name:"MobileBCFAdd",props:{bcfId:{},userId:{},mode:{},bcfContent:{},bcfList:{}},emits:["closePanel","closeAdd","submitBcf","updateBcf","imageZoomIn","bcfScreenshot"],setup(I,{emit:G}){const a=G,C=I,{bcfId:S,mode:v,userId:f,bcfContent:h,bcfList:d}=C;o.ref("select");const l=o.ref(""),u=o.ref(),c=o.ref([]),p=o.ref(),A=o.ref(),g=o.ref(""),_=o.ref(""),b=o.ref(""),w=o.ref(""),B=o.ref(""),k=o.ref(),T=o.ref(),L=o.ref(""),V=o.ref([]),Q=o.ref(iw),N=o.ref(Bf),j=o.ref(Ef),$=o.ref(sw),X=o.ref(Pf),W=o.ref(Tn.BcfStaffList),D=o.ref(),z=o.ref(0),M=o.ref(),R=o.ref(!1),O=ae=>{R.value||(window.bimViewer.setEntitySelected(ae),M.value=window.bimViewer.viewer.scene.selectedObjectIds,z.value=M.value.length)};o.onMounted(()=>{if(window.bimViewer.disableClickEvent=!0,window.bimViewer.eventTrigger.on("pickedEntity",O),v=="add"){const ae=new Date;let Be=ae.getDate(),ve=ae.getFullYear(),ue=ae.getMonth();if(l.value=`${ve}-${ue+1}-${Be}`,d.length>0){let Ae=d[d.length-1];Ae&&Ae.index&&(A.value=Ae.index+1)}else A.value=1;M.value=[]}else if(h)if(A.value=h.index,g.value=h.title,_.value=h.type?h.type:"",b.value=h.priority?uu(h.priority):"",w.value=h.status?h.status:"",B.value=h.stage?h.stage:"",k.value=typeof h.assignedTo=="number"?h.assignedTo:void 0,T.value=h.dueDate?as(h.dueDate):"",L.value=h.description?h.description:"",V.value=h.labels?h.labels:[],h.viewPoints){if(D.value=0,c.value=h.viewPoints,h.viewPoints.length==0)return;let ae=h.viewPoints[0].bcfView.components;ae?ae.selection?(M.value=ae.selection.map(Be=>Be.ifc_guid),z.value=M.value.length,window.bimViewer.setObjectsSelected(M.value,!0)):(M.value=[],window.bimViewer.setAllObjectsSelected(!1)):window.bimViewer.setAllObjectsSelected(!1)}else window.bimViewer.setAllObjectsSelected(!1)}),o.onBeforeUnmount(()=>{window.bimViewer.disableClickEvent=!1,window.bimViewer.setAllObjectsSelected(!1),window.bimViewer.eventTrigger.off("pickedEntity",O)});const U=ae=>{c.value=c.value.filter(Be=>Be.index!=ae),u.value&&u.value.updateList(c.value,"delete")},F=()=>{const ae=window.bimViewer.bcfTool.getBCFView();let Be=c.value.length;c.value.push({guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:ae,index:Be}),D.value=c.value.length-1,u.value&&u.value.updateList(c.value,"update")},K=()=>{a("bcfScreenshot",F)},te=ae=>{let Be=ae.target.files[0];if(Be){const ve=new FileReader;ve.readAsDataURL(Be),ve.onload=()=>{q(ve.result)}}},q=ae=>{let Be=[];M.value&&M.value.length!=0&&M.value.forEach(Ae=>{Be.push({ifc_guid:Ae})});let ve={components:{selection:Be,visibility:{default_visibility:!0}},snapshot:{snapshot_data:ae}},ue=c.value.length;c.value.push({guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:ve,index:ue}),D.value=c.value.length-1,u.value&&u.value.updateList(c.value,"update")},ie=ae=>{if(ae>=0){D.value=ae;let Be=c.value[D.value].bcfView;if(Be&&Be.components){let ve=Be.components.selection;M.value=ve==null?void 0:ve.map(ue=>ue.ifc_guid),z.value=M.value&&M.value.length}else D.value=void 0,M.value=[],z.value=0}else D.value=void 0,M.value=[],z.value=0},oe=()=>{if(g.value==""){Hp.ElMessage.error("请输入标题!");return}ee();const ae={title:g.value,author:f,stage:B.value,status:w.value,assignedTo:k.value,createDate:new Date().toISOString(),dueDate:T.value?T.value.toISOString():void 0,description:L.value,labels:V.value,priority:xf(b.value),type:_.value,viewPoints:c.value};a("submitBcf",ae)},ce=()=>{ee(),h&&(p.value={_id:h._id,fileId:h.fileId,userId:h.userId,guid:h.guid,title:g.value,author:h.author,priority:xf(b.value),index:A.value,type:_.value,stage:B.value,status:w.value,labels:V.value,dueDate:T.value?T.value:void 0,createDate:h.createDate,assignedTo:k.value,description:L.value,viewPoints:c.value,comments:h.comments,modified_date:new Date().toISOString(),modified_author:Tn.getStaffName(f)},a("updateBcf",p.value.guid,p.value,S))},ee=()=>{if(M.value&&M.value.length>0){let ae=[];M.value.length!=0&&M.value.forEach(ue=>{ae.push({ifc_guid:ue})});let Be={components:{selection:ae,visibility:{default_visibility:!0}}},ve={guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:Be,index:1};c.value.length==0?c.value.push(ve):(D.value||(D.value=0),c.value[D.value]=ve)}else{const ae=c.value[D.value];if(ae){const Be=ae.bcfView.components;Be&&(Be.selection=void 0)}}},he=()=>{a("closeAdd")},ne=()=>{a("closePanel")},re=ae=>{a("imageZoomIn",ae)};return(ae,Be)=>{const ve=ys,ue=vl,Ae=ji,P=em,ke=qA,Ee=bf,pe=Vi;return o.openBlock(),o.createElementBlock("div",C5,[o.createElementVNode("div",B5,[o.createElementVNode("div",{class:"back",onClick:he},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/back.png",alt:""},null,8,E5),o.createElementVNode("span",null,o.toDisplayString(o.unref(v)=="add"?"新建BCF":"返回"),1)]),o.createElementVNode("div",P5,[o.createVNode(ve,{width:18,"click-handle":ne})])]),o.createElementVNode("div",S5,[o.createVNode(pe,null,{default:o.withCtx(()=>{var fe;return[o.createElementVNode("div",k5,[o.createElementVNode("div",M5,[o.createElementVNode("div",null,"#"+o.toDisplayString(A.value),1),o.createElementVNode("div",null,o.toDisplayString(o.unref(v)=="add"?l.value:o.unref(as)((fe=o.unref(h))==null?void 0:fe.createDate)),1)]),o.createElementVNode("div",T5,[o.createElementVNode("div",I5,[c.value.length==0?(o.openBlock(),o.createElementBlock("div",D5,[o.createElementVNode("div",{class:"shot",onClick:o.withModifiers(K,["stop"])},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/camera.png",alt:""},null,8,F5),Be[11]||(Be[11]=o.createTextVNode(" 快照截屏 "))]),o.createElementVNode("div",R5,[o.createElementVNode("input",{type:"file",accept:"image/*",class:"upload_img_input",onChange:te},null,32),o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/upload.png",alt:""},null,8,O5),Be[12]||(Be[12]=o.createTextVNode(" 上传图片 "))])])):c.value.length>0?(o.openBlock(),o.createBlock(ue,{key:1,ref_key:"imageViewRef",ref:u,"snapshot-list":c.value,"edit-enable":!0,onSwitchViewPoints:ie,onImageZoomIn:re,onDeleteView:U},null,8,["snapshot-list"])):o.createCommentVNode("",!0)])]),c.value.length>0?(o.openBlock(),o.createElementBlock("div",L5,[o.createElementVNode("div",N5,[o.createElementVNode("input",{type:"file",accept:"image/*",class:"upload_img_input",onChange:te},null,32),o.createElementVNode("img",{class:"newImage",src:o.unref(Vt)+"/bim-viewer/bcf-images/upload_gray.png",alt:""},null,8,j5),Be[13]||(Be[13]=o.createElementVNode("span",null,"上传图片",-1))]),o.createElementVNode("div",{class:"new_button camera",onClick:o.withModifiers(K,["stop"])},[o.createElementVNode("img",{class:"newBcfView",src:o.unref(Vt)+"/bim-viewer/bcf-images/camera.png",alt:""},null,8,V5),Be[14]||(Be[14]=o.createElementVNode("span",null,"继续截屏",-1))])])):o.createCommentVNode("",!0),o.createElementVNode("div",U5,[o.createElementVNode("div",H5,[o.createElementVNode("div",z5,[Be[15]||(Be[15]=o.createElementVNode("div",null,[o.createTextVNode(" 标题 "),o.createElementVNode("span",{style:{color:"#f54d4d"}},"*")],-1)),o.createElementVNode("div",G5,[o.createVNode(Ae,{modelValue:g.value,"onUpdate:modelValue":Be[0]||(Be[0]=ye=>g.value=ye),placeholder:"请输入"},null,8,["modelValue"])])]),o.createElementVNode("div",Q5,[Be[16]||(Be[16]=o.createElementVNode("span",null,"类别",-1)),o.createElementVNode("div",W5,[o.createVNode(ke,{modelValue:_.value,"onUpdate:modelValue":Be[1]||(Be[1]=ye=>_.value=ye),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Q.value,(ye,de)=>(o.openBlock(),o.createBlock(P,{key:de,value:ye},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",$5,[Be[17]||(Be[17]=o.createElementVNode("span",null,"优先级",-1)),o.createElementVNode("div",K5,[o.createVNode(ke,{modelValue:b.value,"onUpdate:modelValue":Be[2]||(Be[2]=ye=>b.value=ye),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(ye,de)=>(o.openBlock(),o.createBlock(P,{key:de,value:ye},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",X5,[Be[18]||(Be[18]=o.createElementVNode("span",null,"状态",-1)),o.createElementVNode("div",Y5,[o.createVNode(ke,{modelValue:w.value,"onUpdate:modelValue":Be[3]||(Be[3]=ye=>w.value=ye),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(j.value,(ye,de)=>(o.openBlock(),o.createBlock(P,{key:de,value:ye},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",J5,[Be[19]||(Be[19]=o.createElementVNode("span",null,"阶段",-1)),o.createElementVNode("div",Z5,[o.createVNode(ke,{modelValue:B.value,"onUpdate:modelValue":Be[4]||(Be[4]=ye=>B.value=ye),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList($.value,(ye,de)=>(o.openBlock(),o.createBlock(P,{key:de,value:ye},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",q5,[Be[20]||(Be[20]=o.createElementVNode("span",null,"分配给",-1)),o.createElementVNode("div",e6,[o.createVNode(ke,{modelValue:k.value,"onUpdate:modelValue":Be[5]||(Be[5]=ye=>k.value=ye),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(W.value,ye=>(o.openBlock(),o.createBlock(P,{key:ye.userId,value:ye.userId,label:`${ye.userName}(${ye.mobile})`},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",t6,[Be[21]||(Be[21]=o.createElementVNode("span",null,"截止日期",-1)),o.createElementVNode("div",r6,[o.createVNode(Ee,{modelValue:T.value,"onUpdate:modelValue":Be[6]||(Be[6]=ye=>T.value=ye),type:"datetime",placeholder:"请选择日期",editable:!1},null,8,["modelValue"])])]),o.createElementVNode("div",n6,[Be[22]||(Be[22]=o.createElementVNode("span",null,"问题描述",-1)),o.createElementVNode("div",i6,[o.createVNode(Ae,{modelValue:L.value,"onUpdate:modelValue":Be[7]||(Be[7]=ye=>L.value=ye),type:"textarea",placeholder:"请输入"},null,8,["modelValue"])])]),o.createElementVNode("div",s6,[Be[23]||(Be[23]=o.createElementVNode("span",null,"标签",-1)),o.createElementVNode("div",a6,[o.createVNode(ke,{modelValue:V.value,"onUpdate:modelValue":Be[8]||(Be[8]=ye=>V.value=ye),multiple:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(X.value,(ye,de)=>(o.openBlock(),o.createBlock(P,{key:de,value:ye},null,8,["value"]))),128))]),_:1},8,["modelValue"])])])])]),o.unref(v)=="add"?(o.openBlock(),o.createElementBlock("div",{key:1,class:"submit_button",onClick:Be[9]||(Be[9]=ye=>oe())}," 立即创建 ")):(o.openBlock(),o.createElementBlock("div",{key:2,class:"submit_button",onClick:Be[10]||(Be[10]=ye=>ce())}," 确认修改 "))])]}),_:1})])])}}}),[["__scopeId","data-v-3efcb395"]]),l6={class:"dialog_background"},u6={class:"dialog_panel"},c6={class:"confirm_content"},d6=["src"],f6={class:"delete_content"},h6={class:"text"},p6={class:"name"},ow=_n(o.defineComponent({__name:"dialogPanel",props:{deleteContentName:{},deleteType:{},commentId:{}},emits:["confirmDeleteBcf","confirmDeleteComment","closePanel"],setup(I,{emit:G}){const a=I,C=G,S=o.ref(a.deleteContentName),v=()=>{C("closePanel")},f=()=>{a.deleteType=="bcf"?C("confirmDeleteBcf"):C("confirmDeleteComment",a.commentId)};return(h,d)=>(o.openBlock(),o.createElementBlock("div",l6,[o.createElementVNode("div",u6,[o.createElementVNode("div",c6,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/warning.png"},null,8,d6),o.createElementVNode("div",f6,[d[1]||(d[1]=o.createElementVNode("span",null,"您确认要删除",-1)),o.createElementVNode("div",h6,[o.createElementVNode("span",p6,o.toDisplayString(S.value),1),d[0]||(d[0]=o.createElementVNode("span",null,"吗?",-1))])])]),d[2]||(d[2]=o.createElementVNode("div",{class:"split_line"},null,-1)),o.createElementVNode("div",{class:"buttons"},[o.createElementVNode("div",{class:"cancel",onClick:v}," 取消 "),o.createElementVNode("div",{class:"confirm",onClick:f}," 确定 ")])])]))}}),[["__scopeId","data-v-a128b306"]]),A6={class:"mobile_bcf_comment_panel"},m6={class:"mobile-bcf-box"},g6={class:"mobile-bcf-head"},v6=["src"],y6={class:"mobile-bcf-title"},b6={class:"mobile-bcf-body"},_6={class:"mobile-bcf-viewpoint"},w6={class:"viewpoint-box"},x6={key:0,class:"upload_button"},C6=["src"],B6={class:"upload"},E6=["src"],P6={class:"mobile-bcf-input"},lw=_n(o.defineComponent({__name:"MobileCommentInput",props:{userId:{},commentGuid:{},oldComment:{},snapshotList:{},mode:{}},emits:["submitComment","updateComment","cancel","addViewPoint","bcfScreenshot","imageZoomIn"],setup(I,{emit:G}){const a=G,C=I,{userId:S,oldComment:v}=o.toRefs(C),f=o.ref(C.oldComment),h=o.ref(C.snapshotList??[]),d=o.ref(),l=o.ref(),u=o.ref(),c=o.ref();o.watch(()=>C,V=>{V.snapshotList&&(h.value=V.snapshotList),V.oldComment&&(f.value=V.oldComment)},{deep:!0});const p=()=>{if(!f.value){g();return}const V={guid:window.bimViewer.bcfTool.getNewGuid(),author:Tn.getStaffName(S.value),date:new Date().toISOString(),comment:f.value,snapshotList:h.value};a("submitComment",V)},A=()=>{if(!f.value){g();return}a("updateComment",C.commentGuid,f.value,h.value)},g=()=>{a("cancel")},_=()=>{const V=window.bimViewer.bcfTool.getBCFView();let Q=h.value.length;h.value.push({guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:V,index:Q}),l.value=h.value.length-1,d.value&&d.value.updateList(h.value,"update")},b=V=>{let Q=[];u.value&&u.value.length!=0&&u.value.forEach($=>{Q.push({ifc_guid:$})});let N={components:{selection:Q,visibility:{default_visibility:!0}},snapshot:{snapshot_data:V}},j=h.value.length;h.value.push({guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:N,index:j}),l.value=h.value.length-1,d.value&&d.value.updateList(h.value,"update")},w=V=>{if(V>=0){l.value=V;let Q=h.value[l.value].bcfView;if(Q&&Q.components){let N=Q.components.selection;u.value=N==null?void 0:N.map(j=>j.ifc_guid),c.value=u.value&&u.value.length}else l.value=void 0,u.value=[],c.value=0}else l.value=void 0,u.value=[],c.value=0},B=V=>{h.value=h.value.filter(Q=>Q.index!=V),d.value&&d.value.updateList(h.value,"delete")},k=V=>{a("imageZoomIn",V)},T=V=>{let Q=V.target.files[0];if(Q){const N=new FileReader;N.readAsDataURL(Q),N.onload=()=>{b(N.result)}}},L=()=>{a("bcfScreenshot",_)};return(V,Q)=>{const N=vl,j=ji;return o.openBlock(),o.createElementBlock("div",A6,[o.createElementVNode("div",m6,[o.createElementVNode("div",g6,[o.createElementVNode("img",{class:"mobile-bcf-back",src:o.unref(Vt)+"/bim-viewer/back_gray.svg",alt:"",onClick:g},null,8,v6),o.createElementVNode("div",y6,o.toDisplayString(V.mode=="add"?"添加评论":"修改评论"),1),o.createElementVNode("div",{class:"mobile-bcf-finish",onClick:Q[0]||(Q[0]=$=>V.mode=="add"?p():A())}," 完成 ")]),o.createElementVNode("div",b6,[o.createElementVNode("div",_6,[o.createElementVNode("div",w6,[h.value.length==0?(o.openBlock(),o.createElementBlock("div",x6,[o.createElementVNode("div",{class:"shot",onClick:o.withModifiers(L,["stop"])},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/camera.png",alt:""},null,8,C6),Q[2]||(Q[2]=o.createTextVNode(" 快照截屏 "))]),o.createElementVNode("div",B6,[o.createElementVNode("input",{type:"file",accept:"image/*",class:"upload_img_input",onChange:T},null,32),o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/upload.png",alt:""},null,8,E6),Q[3]||(Q[3]=o.createTextVNode(" 上传图片 "))])])):h.value.length>0?(o.openBlock(),o.createBlock(N,{key:1,ref_key:"imageViewRef",ref:d,"snapshot-list":h.value,"edit-enable":!0,onSwitchViewPoints:w,onImageZoomIn:k,onDeleteView:B},null,8,["snapshot-list"])):o.createCommentVNode("",!0)])]),o.createElementVNode("div",P6,[o.createVNode(j,{modelValue:f.value,"onUpdate:modelValue":Q[1]||(Q[1]=$=>f.value=$),type:"textarea",placeholder:"请输入评论内容",autosize:{minRows:2}},null,8,["modelValue"])])])])])}}}),[["__scopeId","data-v-fc06dfff"]]),S6={class:"comment_content"},k6={class:"title"},M6=["src"],T6={class:"comments_list"},I6={key:0,class:"empty"},D6={key:1,class:"comments"},F6={class:"comment_info"},R6={class:"author_info"},O6=["src"],L6={class:"author_time"},N6={class:"author"},j6={class:"time"},V6={key:0,class:"more"},U6=["src"],H6={class:"edit_panel"},z6=["onClick"],G6=["src"],Q6=["onClick"],W6=["src"],$6={key:0,class:"content"},K6={key:0,class:"snapshot_list"},X6={key:2,class:"split_line"},Y6=_n(o.defineComponent({__name:"MobileCommentsView",props:{userId:{},commentList:{}},emits:["updateComment","deleteComment","addViewPoint","bcfScreenshot"],setup(I,{emit:G}){const a=G,C=I,S=o.ref(Tn.BcfStaffList),v=o.ref(Tn.getStaffName(C.userId)),f=o.ref(-1),h=()=>{a("addViewPoint")},d=(A,g,_)=>{C.commentList&&(C.commentList[f.value].comment=g,C.commentList[f.value].snapshotList=_,a("updateComment",A,C.commentList[f.value])),f.value=-1},l=A=>{f.value=A},u=A=>{a("deleteComment",A)},c=A=>{let g;return typeof A=="string"&&A!=""?S.value.forEach(_=>{_.userName==A&&(g=_.avatar)}):typeof A=="number"&&S.value.forEach(_=>{_.userId==A&&(g=_.avatar)}),g||"bimkk-image/user/user-avatar.png"},p=A=>{a("bcfScreenshot",A)};return(A,g)=>{const _=lw;return o.openBlock(),o.createElementBlock("div",S6,[o.createElementVNode("div",k6,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/comment.png"},null,8,M6),o.createElementVNode("span",null,o.toDisplayString(C.commentList&&C.commentList.length)+" 评论",1)]),o.createElementVNode("div",T6,[!C.commentList||C.commentList.length==0?(o.openBlock(),o.createElementBlock("div",I6," 暂无评论 ")):(o.openBlock(),o.createElementBlock("div",D6,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(C.commentList,(b,w)=>(o.openBlock(),o.createElementBlock("div",{key:w,class:"comment"},[o.createElementVNode("div",F6,[o.createElementVNode("div",R6,[o.createElementVNode("img",{src:`${o.unref(Vt)}/${c(b.author)}`,alt:""},null,8,O6),o.createElementVNode("div",L6,[o.createElementVNode("span",N6,o.toDisplayString(typeof b.author=="string"&&b.author!=""?b.author:typeof b.userId=="number"?o.unref(Tn).getStaffName(b.userId):b.author),1),o.createElementVNode("span",j6,o.toDisplayString(o.unref(aw)(b.date)),1)])]),v.value==b.author&&w!=f.value&&w!=-1?(o.openBlock(),o.createElementBlock("div",V6,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/more.png",alt:""},null,8,U6),o.createElementVNode("div",H6,[o.createElementVNode("div",{class:"edit",onClick:B=>l(w)},[o.createElementVNode("img",{class:"img",src:o.unref(Vt)+"/bim-viewer/edit-gray.png",alt:""},null,8,G6),g[1]||(g[1]=o.createElementVNode("span",null,"编辑",-1))],8,z6),g[3]||(g[3]=o.createElementVNode("div",{class:"line"},null,-1)),o.createElementVNode("div",{class:"delete",onClick:B=>u(b.guid)},[o.createElementVNode("img",{class:"img",src:o.unref(Vt)+"/bim-viewer/delete-gray.png",alt:""},null,8,W6),g[2]||(g[2]=o.createElementVNode("span",null,"删除",-1))],8,Q6)])])):o.createCommentVNode("",!0)]),w!=f.value&&w!=-1?(o.openBlock(),o.createElementBlock("div",$6,[o.createElementVNode("div",null,o.toDisplayString(b.comment),1),b.snapshotList&&b.snapshotList.length>0?(o.openBlock(),o.createElementBlock("div",K6,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(b.snapshotList,(B,k)=>(o.openBlock(),o.createElementBlock("div",{key:k,style:o.normalizeStyle({backgroundImage:`url(${B==null?void 0:B.bcfView.snapshot.snapshot_data})`}),class:"snapshot"},null,4))),128))])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createBlock(_,{key:1,"user-id":A.userId,mode:"update","comment-guid":b.guid,"old-comment":b.comment,"snapshot-list":b.snapshotList??[],onAddViewPoint:h,onCancel:g[0]||(g[0]=()=>{f.value=-1}),onUpdateComment:d,onBcfScreenshot:p},null,8,["user-id","comment-guid","old-comment","snapshot-list"])),C.commentList&&w!=C.commentList.length-1?(o.openBlock(),o.createElementBlock("div",X6)):o.createCommentVNode("",!0)]))),128))]))])])}}}),[["__scopeId","data-v-bad8cfa3"]]),J6={key:0,class:"mobile_bcf_detail_wrapper"},Z6={class:"detail_page_title"},q6={class:"back"},e8=["src"],t8={class:"title"},r8=["src"],n8={class:"content_scrollbar"},i8={class:"bcf_detail_content"},s8={class:"bcf_id_time"},a8={class:"snpshot_wrapper"},o8={class:"snapshot_container"},l8={key:0,class:"empty_image"},u8=["src"],c8=["src"],d8={class:"bcf_content"},f8={class:"content"},h8={class:"select_item"},p8={class:"select_wrapper"},A8={class:"select_item"},m8={class:"select_wrapper"},g8={class:"select_item"},v8={class:"select_wrapper"},y8={class:"select_item"},b8={class:"select_wrapper"},_8={class:"content"},w8={class:"select_item"},x8={class:"select_wrapper"},C8={class:"select_item"},B8={class:"select_wrapper"},E8={class:"select_item"},P8={class:"select_item"},S8={class:"select_wrapper"},k8={class:"select_item"},M8={key:0,class:"tag_list"},T8={key:1,class:"select_wrapper"},I8={class:"switch"},D8=_n(o.defineComponent({__name:"MobileBCFDetail",props:{bcfId:{},userId:{},bcfList:{},bcfContent:{}},emits:["closeDetail","editBcf","updateBcf","emitHandler","imageZoomIn","bcfScreenshot"],setup(I,{emit:G}){const a=G,C=pe=>{a("emitHandler",pe)},S=I,{bcfList:v}=S,f=o.ref(S.bcfId),h=o.ref(),d=o.ref(0),l=o.ref(S.bcfContent),u=o.ref(""),c=o.ref(),p=o.ref(),A=o.ref(),g=o.ref(),_=o.ref(),b=o.ref(),w=o.ref(),B=o.ref(),k=o.ref(),T=o.ref(),L=o.ref(),V=o.ref(),Q=o.ref(),N=o.ref(!1),j=o.ref(!0),$=o.ref(-1),X=o.ref(new Map),W=o.ref(0),D=o.ref(!1),z=o.ref(),M=o.ref(!1);o.ref(!1);const R=o.ref("bcf"),O=o.ref(""),U=o.ref(),F=o.ref(!1);o.onMounted(()=>{const pe=new Date;let fe=pe.getDate(),ye=pe.getFullYear(),de=pe.getMonth();u.value=`${ye}-${de+1}-${fe}`,l.value||console.log("no bcfContent!"),v.forEach((be,xe)=>{if(be._id==f.value){d.value=xe,K(),N.value=!0;return}})}),o.watch(()=>S.bcfContent,pe=>{pe&&(l.value=pe,K())});const K=()=>{h.value=l.value.guid,p.value=l.value.index,A.value=l.value.title,g.value=l.value.type?l.value.type:"",_.value=l.value.priority?uu(l.value.priority):"",b.value=l.value.status?l.value.status:"",w.value=l.value.stage?l.value.stage:"",k.value=l.value.dueDate?as(l.value.dueDate):"",T.value=l.value.description?l.value.description:"",L.value=l.value.labels?l.value.labels:[],typeof l.value.assignedTo=="string"&&l.value.assignedTo!=""?B.value=l.value.assignedTo:l.value.assignedTo&&(B.value=Tn.getStaffName(l.value.assignedTo)),typeof l.value.author=="string"&&l.value.author!=""?V.value=l.value.author:V.value=Tn.getStaffName(l.value.userId),F.value=l.value.userId==S.userId,l.value.viewPoints&&(c.value=l.value.viewPoints,U.value&&U.value.updateList(c.value,"update"),$.value=0,te()),ie()},te=()=>{c.value?c.value.forEach((pe,fe)=>{const ye=pe.bcfView.components;if(ye){const{selection:de}=ye;if(de){let be=de.map(Me=>Me.ifc_guid);X.value.set(fe,be);let xe=X.value.get($.value);xe&&(W.value=xe.length),window.bimViewer.setAllObjectsSelected(!1),window.bimViewer.setObjectsSelected(be,!0)}else X.value.set(fe,[]),W.value=0,window.bimViewer.setAllObjectsSelected(!1)}}):(c.value=[],X.value=new Map,W.value=0)},q=pe=>{$.value=pe,te(),ie()},ie=()=>{if(l.value.comments)if(!c.value||c.value.length==0)Q.value=l.value.comments;else{let pe=[];l.value.comments.forEach(fe=>{fe.viewPoint?c.value&&c.value[$.value].guid&&fe.viewPoint==c.value[$.value].guid&&pe.push(fe):pe.push(fe)}),Q.value=pe}else Q.value=[]},oe=()=>{a("editBcf",f)},ce=()=>{R.value="bcf",z.value=l.value.title,M.value=!0},ee=()=>{D.value=!0},he=pe=>{a("bcfScreenshot",pe)},ne=pe=>{pe?(O.value=pe,R.value="comment",z.value="这条评论",M.value=!0):console.log("comment guid undefined")},re=pe=>{a("updateBcf",h.value,pe)},ae=pe=>{if(D.value=!1,c.value&&c.value.length>0){let ye=c.value[$.value];ye&&ye.guid&&(pe.viewPoint=ye.guid)}let fe=l.value.comments?l.value.comments:[];fe.push(pe),v[d.value].comments=fe,ie(),re(v[d.value])},Be=(pe,fe)=>{let ye=0;l.value.comments&&(l.value.comments.forEach((de,be)=>{de.guid==pe&&(ye=be)}),l.value.comments[ye]=fe,v[d.value].comments=l.value.comments,ie(),re(v[d.value]))},ve=pe=>{var ye,de;let fe=(ye=l.value.comments)==null?void 0:ye.filter(be=>be.guid!=pe);Q.value=(de=Q.value)==null?void 0:de.filter(be=>be.guid!=pe),v[d.value].comments=fe,re(v[d.value]),M.value=!1},ue=()=>{C({isTool:!0,event_target:"BCFTool",event_name:"deleteBcf",content:{bcf_guid:h.value}}),M.value=!1,Ae()},Ae=()=>{a("closeDetail")},P=pe=>{a("imageZoomIn",pe)},ke=()=>{const pe=window.bimViewer.bcfTool.getBCFView();c.value||(c.value=[]);let fe=c.value.length;c.value.push({guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:pe,index:fe}),U.value&&U.value.updateList(c.value,"update")},Ee=()=>{C({isTool:!0,event_target:"BCFTool",event_name:"checkBcfDetail",content:{bcf_guid:h.value}})};return(pe,fe)=>{const ye=vl,de=Y6,be=Vi,xe=lw,Me=ow;return N.value?(o.openBlock(),o.createElementBlock("div",J6,[o.createElementVNode("div",Z6,[o.createElementVNode("div",q6,[o.createElementVNode("div",{class:"head-left",onClick:Ae},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/back.png",alt:""},null,8,e8),o.createElementVNode("div",t8,o.toDisplayString(A.value),1)]),o.createElementVNode("div",{class:"head-right",onClick:Ee},[o.createElementVNode("img",{class:"refresh",src:o.unref(Vt)+"/bim-viewer/bcf-images/refresh.png",alt:""},null,8,r8)])])]),o.createElementVNode("div",n8,[o.createVNode(be,null,{default:o.withCtx(()=>[o.createElementVNode("div",i8,[o.createElementVNode("div",s8,[o.createElementVNode("div",{style:o.normalizeStyle({backgroundColor:o.unref(Cf)(l.value.priority?l.value.priority:"low"),color:"#fff"})}," #"+o.toDisplayString(p.value),5),o.createElementVNode("div",null,o.toDisplayString(l.value.createDate&&o.unref(as)(l.value.createDate)),1)]),o.createElementVNode("div",a8,[o.createElementVNode("div",o8,[c.value&&c.value.length>0?(o.openBlock(),o.createBlock(ye,{key:1,ref_key:"imageViewRef",ref:U,"snapshot-list":c.value,"edit-enable":!1,onImageZoomIn:P,onSwitchViewPoints:q},null,8,["snapshot-list"])):(o.openBlock(),o.createElementBlock("div",l8,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/empty.png",alt:""},null,8,u8)])),b.value?(o.openBlock(),o.createElementBlock("div",{key:2,class:"stage",style:o.normalizeStyle({backgroundColor:o.unref(nw)(b.value)})},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/bulb.png",alt:""},null,8,c8),o.createElementVNode("span",null,o.toDisplayString(b.value),1)],4)):o.createCommentVNode("",!0)])]),o.createElementVNode("div",d8,[o.createElementVNode("div",f8,[o.createElementVNode("div",h8,[fe[3]||(fe[3]=o.createElementVNode("span",{class:"item_title"},"类别",-1)),fe[4]||(fe[4]=o.createElementVNode("span",null,":",-1)),o.createElementVNode("div",p8,o.toDisplayString(g.value),1)]),o.createElementVNode("div",A8,[fe[5]||(fe[5]=o.createElementVNode("span",{class:"item_title"},"分配给",-1)),fe[6]||(fe[6]=o.createElementVNode("span",null,":",-1)),o.createElementVNode("div",m8,o.toDisplayString(B.value),1)]),o.createElementVNode("div",g8,[fe[7]||(fe[7]=o.createElementVNode("span",{class:"item_title"},"截止日期",-1)),fe[8]||(fe[8]=o.createElementVNode("span",null,":",-1)),o.createElementVNode("div",v8,o.toDisplayString(k.value),1)]),o.createElementVNode("div",y8,[fe[9]||(fe[9]=o.createElementVNode("span",{class:"item_title"},"问题描述",-1)),fe[10]||(fe[10]=o.createElementVNode("span",null,":",-1)),o.createElementVNode("div",b8,o.toDisplayString(T.value),1)])]),o.createElementVNode("div",_8,[o.createElementVNode("div",w8,[fe[11]||(fe[11]=o.createElementVNode("span",{class:"item_title"},"状态",-1)),fe[12]||(fe[12]=o.createElementVNode("span",null,":",-1)),o.createElementVNode("div",x8,o.toDisplayString(b.value),1)]),o.createElementVNode("div",C8,[fe[13]||(fe[13]=o.createElementVNode("span",{class:"item_title"},"阶段",-1)),fe[14]||(fe[14]=o.createElementVNode("span",null,":",-1)),o.createElementVNode("div",B8,o.toDisplayString(w.value),1)]),o.createElementVNode("div",E8,[fe[15]||(fe[15]=o.createElementVNode("span",{class:"item_title"},"优先级",-1)),fe[16]||(fe[16]=o.createElementVNode("span",null,":",-1)),o.createElementVNode("div",{class:"select_wrapper",style:o.normalizeStyle({color:o.unref(rw)(_.value)})},o.toDisplayString(_.value),5)]),o.createElementVNode("div",P8,[fe[17]||(fe[17]=o.createElementVNode("span",{class:"item_title"},"创建人",-1)),fe[18]||(fe[18]=o.createElementVNode("span",null,":",-1)),o.createElementVNode("div",S8,o.toDisplayString(V.value),1)]),o.createElementVNode("div",k8,[fe[19]||(fe[19]=o.createElementVNode("span",{class:"item_title"},"标签",-1)),fe[20]||(fe[20]=o.createElementVNode("span",null,":",-1)),L.value.length>0?(o.openBlock(),o.createElementBlock("div",M8,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(L.value,(Le,Ve)=>(o.openBlock(),o.createElementBlock("div",{key:Ve,class:"tag"},[o.createElementVNode("span",null,o.toDisplayString(Le),1)]))),128))])):(o.openBlock(),o.createElementBlock("div",T8))])]),o.createElementVNode("div",{class:"content edit_buttons"},[o.createElementVNode("div",{class:"edit_button",onClick:ce}," 删除BCF "),o.createElementVNode("div",{class:"edit_button",onClick:oe}," 编辑BCF ")])])]),j.value?(o.openBlock(),o.createBlock(de,{key:0,"user-id":pe.userId,"comment-list":Q.value?[...Q.value.slice().sort((Le,Ve)=>{const Ye=new Date(Le.modified_date?Le.modified_date:Le.date),lt=new Date(Ve.modified_date?Ve.modified_date:Ve.date);return Ye<lt?1:-1})]:void 0,onAddViewPoint:ke,onUpdateComment:Be,onDeleteComment:ne,onBcfScreenshot:he},null,8,["user-id","comment-list"])):o.createCommentVNode("",!0)]),_:1})]),o.createElementVNode("div",I8,[D.value?(o.openBlock(),o.createBlock(xe,{key:1,"bcf-id":f.value,"user-id":pe.userId,mode:"add",onAddViewPoint:ke,onCancel:fe[1]||(fe[1]=Le=>D.value=!1),onSubmitComment:ae,onBcfScreenshot:he},null,8,["bcf-id","user-id"])):(o.openBlock(),o.createElementBlock("div",{key:0,class:"comment_button",onClick:fe[0]||(fe[0]=Le=>ee())}," 立即评论 "))]),M.value?(o.openBlock(),o.createBlock(Me,{key:0,"delete-content-name":z.value,"delete-type":R.value,"comment-id":O.value,onConfirmDeleteBcf:ue,onConfirmDeleteComment:ve,onClosePanel:fe[2]||(fe[2]=()=>{M.value=!1})},null,8,["delete-content-name","delete-type","comment-id"])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)}}}),[["__scopeId","data-v-14bd122c"]]),F8={key:0,class:"mobile-bcf-filter-container"},R8={key:0,class:"search-container"},O8={class:"search-header"},L8=["src"],N8={class:"search-body"},j8={class:"search-list"},V8={class:"item-right"},U8={class:"item-value"},H8={class:"item-img"},z8=["src"],G8={class:"item-right"},Q8={class:"item-value"},W8={class:"item-img"},$8=["src"],K8={class:"item-right"},X8={class:"item-value"},Y8={class:"item-img"},J8=["src"],Z8={class:"item-right"},q8={class:"item-value"},ej={class:"item-img"},tj=["src"],rj={class:"item-right"},nj={class:"item-value"},ij={class:"item-img"},sj=["src"],aj={class:"item-right"},oj={class:"item-tags"},lj={class:"item-img"},uj=["src"],cj={class:"search-footer"},dj={class:"search-btn-group"},fj={key:1,class:"filter-container"},hj={class:"filter-header"},pj={class:"title"},Aj=["src"],mj={class:"filter-body"},gj={key:0,class:"filter-list"},vj=["onClick"],yj={class:"item-left"},bj={class:"title"},_j={class:"item-right"},wj={key:0,class:"check-selected"},xj=["src"],Cj={key:1,class:"check-select"},Bj={key:1,class:"filter-list"},Ej=["onClick"],Pj={class:"item-left"},Sj={class:"title"},kj={class:"item-right"},Mj={key:0,class:"check-selected"},Tj=["src"],Ij={key:1,class:"check-select"},Dj={key:2,class:"filter-list"},Fj=["onClick"],Rj={class:"item-left"},Oj={class:"title"},Lj={class:"item-right"},Nj={key:0,class:"check-selected"},jj=["src"],Vj={key:1,class:"check-select"},Uj={class:"filter-footer"},Hj=_n(o.defineComponent({__name:"MobileBCFFilter",setup(I,{expose:G}){const a=o.ref(!1),C=o.ref(!0),S=o.ref(!1),v=o.ref(Tn.BcfStaffList),f=o.ref({bcf_priority:"",bcf_status:"",bcf_createDate:"",bcf_asignToId:{key:"",value:""},bcf_authorId:{key:"",value:""},bcf_tag:[]}),h=o.ref({confirm:N=>{}}),d=o.ref(),l=o.ref(""),u=o.ref(""),c=o.ref(""),p=o.ref([]),A=N=>{switch(l.value=N,N){case"priority":u.value="筛选优先级",p.value=Bf,c.value=f.value.bcf_priority,C.value=!1,S.value=!0;break;case"status":u.value="筛选状态",p.value=Ef,c.value=f.value.bcf_status,C.value=!1,S.value=!0;break;case"createDate":d.value.handleOpen();break;case"asignToId":u.value="筛选分配人",p.value=v.value,c.value=f.value.bcf_asignToId,C.value=!1,S.value=!0;break;case"authorId":u.value="筛选创建人",p.value=v.value,c.value=f.value.bcf_authorId,C.value=!1,S.value=!0;break;case"tag":u.value="筛选标签(可多选)",p.value=Pf,c.value=f.value.bcf_tag,C.value=!1,S.value=!0;break}},g=N=>{l.value==="tag"?c.value.includes(N)?c.value=c.value.filter(j=>j!==N):c.value.push(N):l.value==="asignToId"||l.value==="authorId"?c.value.key===N.userId?c.value={key:"",value:""}:c.value={key:N.userId,value:N.userName}:c.value!==N?c.value=N:c.value=""},_=()=>{switch(l.value){case"priority":f.value.bcf_priority=c.value;break;case"status":f.value.bcf_status=c.value;break;case"createDate":f.value.bcf_createDate=c.value;break;case"asignToId":f.value.bcf_asignToId=c.value;break;case"authorId":f.value.bcf_authorId=c.value;break;case"tag":f.value.bcf_tag=c.value;break}b()},b=()=>{S.value=!1,C.value=!0},w=N=>{d.value.handleClose(),f.value.bcf_createDate=N,C.value=!0},B=()=>{d.value.handleClose(),C.value=!0},k=()=>{V(),h.value.confirm(f.value)},T=()=>{f.value={bcf_priority:"",bcf_status:"",bcf_createDate:"",bcf_asignToId:{key:"",value:""},bcf_authorId:{key:"",value:""},bcf_tag:[]}},L=N=>{h.value=N,v.value=Tn.BcfStaffList,a.value=!0},V=()=>{a.value=!1};return G({open:L,close:V,refresh:()=>{f.value={bcf_priority:"",bcf_status:"",bcf_createDate:"",bcf_asignToId:{key:"",value:""},bcf_authorId:{key:"",value:""},bcf_tag:[]}}}),(N,j)=>{const $=Vi,X=bf;return a.value?(o.openBlock(),o.createElementBlock("div",F8,[C.value?(o.openBlock(),o.createElementBlock("div",R8,[o.createElementVNode("div",O8,[j[7]||(j[7]=o.createElementVNode("div",{class:"title"},"筛选",-1)),o.createElementVNode("div",{class:"close-box",onClick:o.withModifiers(V,["stop"])},[o.createElementVNode("img",{class:"close-img",src:`${o.unref(Vt)}/bim-viewer/close_black.png`,alt:""},null,8,L8)])]),o.createElementVNode("div",N8,[o.createElementVNode("div",j8,[o.createElementVNode("div",{class:"search-item",onClick:j[0]||(j[0]=o.withModifiers(W=>A("priority"),["stop"]))},[j[8]||(j[8]=o.createElementVNode("div",{class:"item-left"},[o.createElementVNode("div",{class:"title"},"优先级")],-1)),o.createElementVNode("div",V8,[o.createElementVNode("div",U8,o.toDisplayString(f.value.bcf_priority),1),o.createElementVNode("div",H8,[o.createElementVNode("img",{class:"img",src:`${o.unref(Vt)}/bim-viewer/bcf-images/back-right-gray.png`,alt:""},null,8,z8)])])]),o.createElementVNode("div",{class:"search-item",onClick:j[1]||(j[1]=o.withModifiers(W=>A("status"),["stop"]))},[j[9]||(j[9]=o.createElementVNode("div",{class:"item-left"},[o.createElementVNode("div",{class:"title"},"状态")],-1)),o.createElementVNode("div",G8,[o.createElementVNode("div",Q8,o.toDisplayString(f.value.bcf_status),1),o.createElementVNode("div",W8,[o.createElementVNode("img",{class:"img",src:`${o.unref(Vt)}/bim-viewer/bcf-images/back-right-gray.png`,alt:""},null,8,$8)])])]),o.createElementVNode("div",{class:"search-item",onClick:j[2]||(j[2]=o.withModifiers(W=>A("createDate"),["stop"]))},[j[10]||(j[10]=o.createElementVNode("div",{class:"item-left"},[o.createElementVNode("div",{class:"title"},"创建日期")],-1)),o.createElementVNode("div",K8,[o.createElementVNode("div",X8,o.toDisplayString(f.value.bcf_createDate),1),o.createElementVNode("div",Y8,[o.createElementVNode("img",{class:"img",src:`${o.unref(Vt)}/bim-viewer/bcf-images/back-right-gray.png`,alt:""},null,8,J8)])])]),o.createElementVNode("div",{class:"search-item",onClick:j[3]||(j[3]=o.withModifiers(W=>A("asignToId"),["stop"]))},[j[11]||(j[11]=o.createElementVNode("div",{class:"item-left"},[o.createElementVNode("div",{class:"title"},"分配给")],-1)),o.createElementVNode("div",Z8,[o.createElementVNode("div",q8,o.toDisplayString(f.value.bcf_asignToId.value),1),o.createElementVNode("div",ej,[o.createElementVNode("img",{class:"img",src:`${o.unref(Vt)}/bim-viewer/bcf-images/back-right-gray.png`,alt:""},null,8,tj)])])]),o.createElementVNode("div",{class:"search-item",onClick:j[4]||(j[4]=o.withModifiers(W=>A("authorId"),["stop"]))},[j[12]||(j[12]=o.createElementVNode("div",{class:"item-left"},[o.createElementVNode("div",{class:"title"},"创建人")],-1)),o.createElementVNode("div",rj,[o.createElementVNode("div",nj,o.toDisplayString(f.value.bcf_authorId.value),1),o.createElementVNode("div",ij,[o.createElementVNode("img",{class:"img",src:`${o.unref(Vt)}/bim-viewer/bcf-images/back-right-gray.png`,alt:""},null,8,sj)])])]),o.createElementVNode("div",{class:"search-item",onClick:j[5]||(j[5]=o.withModifiers(W=>A("tag"),["stop"]))},[j[13]||(j[13]=o.createElementVNode("div",{class:"item-left"},[o.createElementVNode("div",{class:"title"},"标签")],-1)),o.createElementVNode("div",aj,[o.createElementVNode("div",oj,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value.bcf_tag,(W,D)=>(o.openBlock(),o.createElementBlock("div",{key:D,class:"tag"},o.toDisplayString(W),1))),128))]),o.createElementVNode("div",lj,[o.createElementVNode("img",{class:"img",src:`${o.unref(Vt)}/bim-viewer/bcf-images/back-right-gray.png`,alt:""},null,8,uj)])])])])]),o.createElementVNode("div",cj,[o.createElementVNode("div",dj,[o.createElementVNode("div",{class:"search-btn btn-cancel",onClick:o.withModifiers(T,["stop"])}," 重置 "),o.createElementVNode("div",{class:"search-btn btn-submit",onClick:o.withModifiers(k,["stop"])}," 搜索 ")])])])):o.createCommentVNode("",!0),S.value?(o.openBlock(),o.createElementBlock("div",fj,[o.createElementVNode("div",hj,[o.createElementVNode("div",pj,o.toDisplayString(u.value),1),o.createElementVNode("div",{class:"close-box",onClick:b},[o.createElementVNode("img",{class:"close-img",src:`${o.unref(Vt)}/bim-viewer/close_black.png`,alt:""},null,8,Aj)])]),o.createElementVNode("div",mj,[o.createVNode($,null,{default:o.withCtx(()=>[l.value==="asignToId"||l.value==="authorId"?(o.openBlock(),o.createElementBlock("div",gj,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value,(W,D)=>(o.openBlock(),o.createElementBlock("div",{key:D,class:"filter-item",onClick:o.withModifiers(z=>g(W),["stop"])},[o.createElementVNode("div",yj,[o.createElementVNode("div",bj,o.toDisplayString(W.userName)+"("+o.toDisplayString(W.mobile)+")",1)]),o.createElementVNode("div",_j,[W.userId===c.value.key?(o.openBlock(),o.createElementBlock("div",wj,[o.createElementVNode("img",{class:"select-img",src:`${o.unref(Vt)}/bim-viewer/check-selected.png`,alt:""},null,8,xj)])):(o.openBlock(),o.createElementBlock("div",Cj))])],8,vj))),128))])):l.value==="tag"?(o.openBlock(),o.createElementBlock("div",Bj,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value,(W,D)=>(o.openBlock(),o.createElementBlock("div",{key:D,class:"filter-item",onClick:o.withModifiers(z=>g(W),["stop"])},[o.createElementVNode("div",Pj,[o.createElementVNode("div",Sj,o.toDisplayString(W),1)]),o.createElementVNode("div",kj,[c.value.includes(W)?(o.openBlock(),o.createElementBlock("div",Mj,[o.createElementVNode("img",{class:"select-img",src:`${o.unref(Vt)}/bim-viewer/check-selected.png`,alt:""},null,8,Tj)])):(o.openBlock(),o.createElementBlock("div",Ij))])],8,Ej))),128))])):(o.openBlock(),o.createElementBlock("div",Dj,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value,(W,D)=>(o.openBlock(),o.createElementBlock("div",{key:D,class:"filter-item",onClick:o.withModifiers(z=>g(W),["stop"])},[o.createElementVNode("div",Rj,[o.createElementVNode("div",Oj,o.toDisplayString(W),1)]),o.createElementVNode("div",Lj,[W===c.value?(o.openBlock(),o.createElementBlock("div",Nj,[o.createElementVNode("img",{class:"select-img",src:`${o.unref(Vt)}/bim-viewer/check-selected.png`,alt:""},null,8,jj)])):(o.openBlock(),o.createElementBlock("div",Vj))])],8,Fj))),128))]))]),_:1})]),o.createElementVNode("div",Uj,[o.createElementVNode("div",{class:"filter-btn",onClick:o.withModifiers(_,["stop"])}," 确定 ")])])):o.createCommentVNode("",!0),o.createVNode(X,{ref_key:"bcfCreateDateRef",ref:d,modelValue:f.value.bcf_createDate,"onUpdate:modelValue":j[6]||(j[6]=W=>f.value.bcf_createDate=W),"popper-class":"mobile_bcf_create_date",type:"date",placeholder:"Pick a day",style:{width:"100%",display:"none"},format:"YYYY/MM/DD","value-format":"YYYY-MM-DD",onBlur:B,onChange:w},null,8,["modelValue"])])):o.createCommentVNode("",!0)}}}),[["__scopeId","data-v-e8463688"]]),zj={class:"empty"},Gj=["src"],Qj={class:"title"},uw=_n(o.defineComponent({__name:"emptyPage",props:{title:String},setup(I){const G=I,a=o.ref("这里空空的,快去上传文件吧~");return o.watch(G,C=>{a.value=C.title||"这里空空的,快去上传文件吧~"}),(C,S)=>(o.openBlock(),o.createElementBlock("div",zj,[o.createElementVNode("img",{class:"img1",src:o.unref(Vt)+"/bim-viewer/enjoy-work.png",alt:""},null,8,Gj),o.createElementVNode("div",Qj,o.toDisplayString(I.title),1)]))}}),[["__scopeId","data-v-194b16a3"]]),Wj={class:"mobile_bcf_content"},$j={class:"mobile_bcf_search"},Kj={class:"search_icon"},Xj=["src"],Yj={class:"mobile_bcf_table_list"},Jj={class:"table_list_title"},Zj={class:"sort_buttons"},qj=["src"],eV=["src"],tV=["src"],rV={class:"sort_total"},nV=["src"],iV=["src"],sV={key:0,class:"table_list_content"},aV={class:"table_list"},oV=["onClick"],lV={class:"bcf_img"},uV={class:"bcf_info"},cV={class:"bcf_info1"},dV={class:"title"},fV={class:"bcf_info2"},hV={class:"username"},pV={key:1,class:"empty_wrapper"},AV=_n(o.defineComponent({__name:"MobileBCFDisplayList",props:{instruction:{},bcfList:{}},emits:["checkBcfDetail"],setup(I,{emit:G}){const a=G,C=I,{instruction:S,bcfList:v}=o.toRefs(C),f=o.ref([]),h=o.ref(),d={indexSort:["default","down","up"],titleSort:["default","down","up"],timeSort:["default","down","up"]},l=o.ref(),u=o.ref();o.onMounted(()=>{v.value&&(f.value=v.value.slice().sort((j,$)=>$.index-j.index),h.value=v.value.slice().sort((j,$)=>$.index-j.index))}),o.watch(()=>C,j=>{j&&j.bcfList&&(f.value=j.bcfList.slice().sort(($,X)=>X.index-$.index),Q())},{deep:!0}),o.ref(!1);const c=o.ref(!0),p=o.ref(""),A=o.ref(0),g=o.ref(0),_=o.ref(0);o.ref();const b=o.ref(!0);o.watch(()=>u.value,j=>{var $,X;console.log(j),j&&(j!=null&&j.bcf_priority||j!=null&&j.bcf_status||j!=null&&j.bcf_createDate||($=j==null?void 0:j.bcf_asignToId)!=null&&$.key||(X=j==null?void 0:j.bcf_authorId)!=null&&X.key||j!=null&&j.bcf_tag&&(j==null?void 0:j.bcf_tag.length)>0)?c.value=!0:c.value=!1,console.log(c.value)},{deep:!0,immediate:!0});const w=()=>{h.value=v.value.slice().sort((j,$)=>$.index-j.index),f.value=v.value.slice().sort((j,$)=>$.index-j.index),b.value=!0},B=()=>{p.value==""?w():f.value=h.value.filter(j=>j.title.includes(p.value))},k=j=>{if(j>2&&(A.value=0),j==1){let $=h.value.slice().sort((X,W)=>W.index-X.index);f.value=$,b.value=!1}else if(j==2){let $=h.value.slice().sort((X,W)=>X.index-W.index);f.value=$}else w();g.value=0,_.value=0},T=j=>{if(j>2&&(g.value=0),j==1){let $=h.value.slice().sort((X,W)=>W.title.localeCompare(X.title));f.value=$}else if(j==2){let $=h.value.slice().sort((X,W)=>X.title.localeCompare(W.title));f.value=$}else w();A.value=0,_.value=0},L=j=>{if(j>2&&(_.value=0),j==1){let $=h.value.slice().sort((X,W)=>{const D=new Date(X.createDate),z=new Date(W.createDate);return D<z?1:-1});f.value=$}else if(j==2){let $=h.value.slice().sort((X,W)=>{const D=new Date(X.createDate),z=new Date(W.createDate);return D>z?1:-1});f.value=$}else w();A.value=0,g.value=0},V=()=>{l.value.open({confirm:j=>{u.value=j,Q()}})},Q=()=>{var $,X,W;let j=u.value;if(!j&&!(j!=null&&j.bcf_priority)&&!(j!=null&&j.bcf_status)&&!(j!=null&&j.bcf_createDate)&&!(($=j==null?void 0:j.bcf_asignToId)!=null&&$.key)&&!((X=j==null?void 0:j.bcf_authorId)!=null&&X.key)&&(!(j!=null&&j.bcf_tag)||(j==null?void 0:j.bcf_tag.length)==0))w(),h.value=JSON.parse(JSON.stringify(v.value)).slice(),A.value+g.value+_.value!=0&&(A.value!=0&&k(A.value),g.value!=0&&T(g.value),_.value!=0&&L(_.value));else{let D=JSON.parse(JSON.stringify(v.value)).slice();j.bcf_priority&&(D=D.filter(z=>z.priority&&uu(z.priority)==j.bcf_priority)),j.bcf_authorId.key&&(D=D.filter(z=>{var M,R,O;return typeof z.author=="string"?Tn.getStaffId(z.author)==((M=j.bcf_authorId)==null?void 0:M.key)||Tn.getStaffName((R=j.bcf_authorId)==null?void 0:R.key)==z.author:z.author==((O=j.bcf_authorId)==null?void 0:O.key)})),j.bcf_status&&(D=D.filter(z=>z.status==j.bcf_status)),j.bcf_createDate&&(D=D.filter(z=>as(z.createDate)==j.bcf_createDate)),(W=j.bcf_asignToId)!=null&&W.key&&(D=D.filter(z=>{var M,R,O;return typeof z.assignedTo=="string"?Tn.getStaffId(z.assignedTo)==((M=j.bcf_asignToId)==null?void 0:M.key)||Tn.getStaffName((R=j.bcf_asignToId)==null?void 0:R.key)==z.assignedTo:z.assignedTo==((O=j.bcf_asignToId)==null?void 0:O.key)})),j.bcf_tag&&j.bcf_tag.length>0&&(D=D.filter(z=>!!(z.labels&&z.labels.find(M=>{var R;return(R=j.bcf_tag)==null?void 0:R.includes(M)})))),h.value=D,A.value+g.value+_.value!=0?(A.value!=0&&k(A.value),g.value!=0&&T(g.value),_.value!=0&&L(_.value)):f.value=h.value.slice().sort((z,M)=>M.index-z.index)}},N=j=>{a("checkBcfDetail",j)};return(j,$)=>{const X=ji,W=Vi,D=uw,z=Hj;return o.openBlock(),o.createElementBlock("div",Wj,[o.createElementVNode("div",$j,[o.createElementVNode("div",Kj,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/search.png",alt:""},null,8,Xj)]),o.createVNode(X,{modelValue:p.value,"onUpdate:modelValue":$[0]||($[0]=M=>p.value=M),placeholder:"请输入需搜索的内容",onInput:B,onChange:B},null,8,["modelValue"])]),o.createElementVNode("div",Yj,[o.createElementVNode("div",Jj,[o.createElementVNode("div",Zj,[o.createElementVNode("div",{class:"sort_button",onClick:$[1]||($[1]=M=>k(A.value+=1))},[$[4]||($[4]=o.createElementVNode("span",null,"序号",-1)),o.createElementVNode("img",{class:"order_icon",src:`${o.unref(Vt)}/bim-viewer/bcf-images/order-${d.indexSort[A.value]}.png`,alt:""},null,8,qj)]),o.createElementVNode("div",{class:"sort_button",onClick:$[2]||($[2]=M=>T(g.value+=1))},[$[5]||($[5]=o.createElementVNode("span",null,"标题",-1)),o.createElementVNode("img",{class:"order_icon",src:`${o.unref(Vt)}/bim-viewer/bcf-images/order-${d.titleSort[g.value]}.png`,alt:""},null,8,eV)]),o.createElementVNode("div",{class:"sort_button",onClick:$[3]||($[3]=M=>L(_.value+=1))},[$[6]||($[6]=o.createElementVNode("span",null,"时间",-1)),o.createElementVNode("img",{class:"order_icon",src:`${o.unref(Vt)}/bim-viewer/bcf-images/order-${d.timeSort[_.value]}.png`,alt:""},null,8,tV)])]),o.createElementVNode("div",rV,[o.createElementVNode("div",{class:"sort_button",onClick:o.withModifiers(V,["stop"])},[c.value?(o.openBlock(),o.createElementBlock("img",{key:1,class:"order_filter_icon",src:`${o.unref(Vt)}/bim-viewer/bcf-images/order-active-mobile.png`,alt:""},null,8,iV)):(o.openBlock(),o.createElementBlock("img",{key:0,class:"order_filter_icon",src:`${o.unref(Vt)}/bim-viewer/bcf-images/order-default-mobile.png`,alt:""},null,8,nV)),$[7]||($[7]=o.createElementVNode("span",null,"筛选",-1))])])]),f.value.length>0?(o.openBlock(),o.createElementBlock("div",sV,[o.createVNode(W,null,{default:o.withCtx(()=>[o.createElementVNode("div",aV,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,(M,R)=>(o.openBlock(),o.createElementBlock("div",{key:R,class:"bcf_card",onClick:o.withModifiers(O=>N(M._id),["stop"])},[o.createElementVNode("div",lV,[o.createElementVNode("div",{style:o.normalizeStyle({width:"100%",height:"100%",backgroundImage:`url(
576
576
  ${M.viewPoints&&M.viewPoints[0]&&M.viewPoints[0].bcfView.snapshot?M.viewPoints[0].bcfView.snapshot.snapshot_data:""}
577
- )`,backgroundSize:"cover",backgroundPosition:"center",borderRadius:"0.12rem"})},null,4)]),o.createElementVNode("div",uV,[o.createElementVNode("div",cV,[o.createElementVNode("span",{style:o.normalizeStyle({color:M.priority?o.unref(tw)(M.priority):o.unref(tw)("low")}),class:"index"}," #"+o.toDisplayString(M.index),5),o.createElementVNode("span",dV,o.toDisplayString(M.title),1)]),o.createElementVNode("div",fV,[o.createElementVNode("span",hV,o.toDisplayString(typeof M.author=="string"&&M.author!=""?M.author:o.unref(Tn).getStaffName(M.userId)),1),o.createElementVNode("span",null,o.toDisplayString(M.createDate?o.unref(as)(M.createDate):M.modified_date?o.unref(as)(M.modified_date):""),1)])])],8,oV))),128))])]),_:1})])):(o.openBlock(),o.createElementBlock("div",pV,[o.createVNode(D,{title:"这里空空的,快去创建你的BCF吧~",type:"model"})]))]),o.createVNode(z,{ref_key:"bcfFilterRef",ref:l},null,512)])}}}),[["__scopeId","data-v-209cccca"]]),mV={class:"mobile_bcf"},gV={class:"mobile_bcf_tool"},vV={class:"mobile_bcf_main"},yV={class:"mobile_bcf_top"},bV=["src"],_V=["src"],wV={class:"mobile_bcf_bottom"},xV=["src"],CV={key:0,class:"bcf_screen_wrapper"},BV={class:"bcf_screen_content"},cw=_n(o.defineComponent({__name:"MobileBCFTool",props:{instruction:{},bcfList:{},userId:{}},emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=G,C=F=>{a("emitHandler",F)},S=I,{instruction:v,bcfList:f,userId:h}=o.toRefs(S),d=o.ref(!0),l=o.ref(!1),u=o.ref(!1),c=o.ref(),p=o.ref("add");o.ref(!1);const A=o.ref(),g=o.ref();o.watch(()=>S.instruction,F=>{var K;F&&F.instruct_name=="checkBcfDetail"&&F.content.bcfDetail&&(g.value=JSON.parse(JSON.stringify(F.content.bcfDetail)),w((K=g.value)==null?void 0:K._id))},{deep:!0});const _=()=>{d.value=!0,b.value=!1,l.value=!1},b=o.ref(!1),w=F=>{C({isTool:!0,event_target:"BCFTool",event_name:"refreshBcfList",content:{}}),setTimeout(()=>{A.value=F,g.value=f.value.find(K=>F==K._id),g.value?(l.value=!1,b.value=!0):_()},500)},B=()=>{l.value=!1,b.value=!0},k=o.ref(!1),T=o.ref(""),L=o.ref(["111","222","333"]),V=F=>{console.log(F)};o.onMounted(()=>{setTimeout(()=>{b.value=!0},1e3)});const Q=(F,K,te)=>{if(C({isTool:!0,event_target:"BCFTool",event_name:"submitUpdateBcf",content:{bcf_guid:F,bcf:K}}),wr.emit("bcfLoading",!0),te){let q=0;f.value.forEach((ie,oe)=>{ie._id==te&&(q=oe)}),f.value[q]=K,g.value=f.value[q],w(te)}},N=F=>{p.value="edit",d.value=!1,b.value=!1,A.value=F,l.value=!0},j=F=>{C({isTool:!0,event_target:"BCFTool",event_name:"submitNewBcf",content:{bcf:F}}),wr.emit("bcfLoading",!0),_()},$=()=>{b.value=!1,C({isTool:!0,event_target:"BCFTool",event_name:"refreshBcfList",content:{}})},X=()=>{C({isTool:!0,event_target:"BCFTool",event_name:"refreshBcfList",content:{}})},W=F=>{u.value=!0,c.value=F},D=()=>{a("closePanel")},z=o.ref(!1),M=o.ref(),R=F=>{M.value=F,z.value=!0},O=()=>{z.value=!1},U=()=>{z.value=!1,M.value()};return(F,K)=>{const te=AV,q=D8,ie=o6,oe=p5;return o.openBlock(),o.createElementBlock("div",mV,[o.withDirectives(o.createElementVNode("div",gV,[o.createElementVNode("div",vV,[o.createElementVNode("div",yV,[o.createElementVNode("div",{class:"back",onClick:D},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/back.png"},null,8,bV)]),K[3]||(K[3]=o.createElementVNode("div",{class:"title"},"BCF",-1)),o.createElementVNode("div",{class:"more",onClick:X},[o.createElementVNode("img",{class:"refresh",src:o.unref(Vt)+"/bim-viewer/bcf-images/refresh.png"},null,8,_V)])]),o.createVNode(te,{instruction:o.unref(v),"bcf-list":o.unref(f),onEmitHandler:C,onCheckBcfDetail:w},null,8,["instruction","bcf-list"]),o.createElementVNode("div",wV,[o.createElementVNode("div",{class:"add_bcf_button",onClick:K[0]||(K[0]=()=>{p.value="add",l.value=!0})},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/addbcf.png"},null,8,xV),K[4]||(K[4]=o.createElementVNode("span",null,"新建BCF",-1))])])]),b.value&&A.value&&g.value?(o.openBlock(),o.createBlock(q,{key:0,"user-id":o.unref(h),"bcf-id":A.value,"bcf-list":o.unref(f),"bcf-content":g.value,onEditBcf:N,onUpdateBcf:Q,onEmitHandler:C,onCloseDetail:$,onBcfScreenshot:R},null,8,["user-id","bcf-id","bcf-list","bcf-content"])):o.createCommentVNode("",!0),l.value?(o.openBlock(),o.createBlock(ie,{key:1,"user-id":o.unref(h),mode:p.value,"bcf-id":A.value,"bcf-list":o.unref(f),"bcf-content":g.value,onCloseAdd:K[1]||(K[1]=ce=>p.value=="edit"?B():_()),onClosePanel:D,onEmitHandler:C,onSubmitBcf:j,onUpdateBcf:Q,onImageZoomIn:W,onBcfScreenshot:R},null,8,["user-id","mode","bcf-id","bcf-list","bcf-content"])):o.createCommentVNode("",!0),k.value?(o.openBlock(),o.createBlock(oe,{key:2,title:T.value,items:L.value,onSelect:V,onClosePanel:K[2]||(K[2]=ce=>k.value=!1)},null,8,["title","items"])):o.createCommentVNode("",!0)],512),[[o.vShow,!z.value]]),z.value?(o.openBlock(),o.createElementBlock("div",CV,[o.createElementVNode("div",BV,[o.createElementVNode("div",{class:"cancel",onClick:o.withModifiers(O,["stop"])}," 取消 "),o.createElementVNode("div",{class:"submit",onClick:o.withModifiers(U,["stop"])}," 立即截屏 ")])])):o.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-dec6b198"]]),EV=Object.freeze(Object.defineProperty({__proto__:null,default:cw},Symbol.toStringTag,{value:"Module"})),PV={StructureTree:o.defineAsyncComponent(()=>Promise.resolve().then(()=>CU)),InspectorTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>L9)),RoamTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>f7)),XRayTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>g7)),MeasureTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>M7)),SectionTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>uH)),CommentTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>EH)),AnnotationTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>DH)),ScreenShotTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>jH)),SettingTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>yz)),NavigateTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>Ez)),BCFTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>w$)),MobileBCFTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>EV)),MouseTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>E$))},SV={key:0,class:"industry-wrapper"},kV={class:"industry-viewer-content"},MV={key:0,class:"industry-components-wrapper"},TV=o.defineComponent({__name:"viewerEntry",props:{appType:{},instruction:{},fileId:{},fileName:{},filePath:{},modelBuffer:{},metaBuffer:{},modelType:{},themeColor:{},topHeight:{},bottomHeight:{},leftWidth:{},rightWidth:{},treePos:{},inspectorPos:{},commentPos:{},annotationPos:{},roamPos:{},navCubePos:{},navCubeSize:{},skyboxImg:{},commentOffset:{},measureOffset:{},hideTool:{type:Boolean},isPc:{type:Boolean},phone:{type:Boolean},loadMeta:{type:Boolean},outliersDetect:{type:Boolean},backButton:{type:Boolean},backgroundColor:{},reset:{type:Boolean},measure:{type:Boolean},comment:{type:Boolean},tree:{type:Boolean},navigate:{type:Boolean},roam:{type:Boolean},section:{type:Boolean},anno:{type:Boolean},screenshot:{type:Boolean},inspector:{type:Boolean},setting:{type:Boolean},fullscreen:{type:Boolean},share:{type:Boolean},cooperate:{type:Boolean},xray:{type:Boolean},bcf:{type:Boolean},mouse:{type:Boolean},bcfContent:{}},emits:["emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I;let{fileId:S,fileName:v,filePath:f,modelBuffer:h}=C;const d=o.ref(!1),l=o.ref(!1);o.watch(()=>C.bcfContent,b=>{b&&(Tn.BcfStaffList=b.staffList)}),o.onMounted(()=>{u(()=>{uk(),ck(),c(()=>{console.log("自定义配置初始化完毕"),d.value=!0}),Qt("hideTool")&&p()})});const u=b=>{C.filePath||C.modelBuffer?b():(console.error("没有合法的模型数据来源"),setTimeout(()=>{u(b)},300))},c=(b=()=>{})=>{Qn("isMobile",C.phone),Qn("fileName",C.fileName),Qn("isPc",C.isPc),Qn("loadMeta",C.loadMeta),Qn("outliersDetect",C.outliersDetect),Qn("hideTool",C.hideTool),Qn("backButton",C.backButton),Qn("backgroundColor",C.backgroundColor),Qn("topHeight",C.topHeight),Qn("bottomHeight",C.bottomHeight),Qn("leftWidth",C.leftWidth),Qn("rightWidth",C.rightWidth),Qn("themeColor",C.themeColor),Qn("navCubeSize",C.navCubeSize),Qn("navCubePos",C.navCubePos),Qn("commentOffset",C.commentOffset),Qn("measureOffset",C.measureOffset),Qn("treePos",C.treePos),Qn("inspectorPos",C.inspectorPos),Qn("commentPos",C.commentPos),Qn("annotationPos",C.annotationPos),Qn("roamPos",C.roamPos),C.bcfContent&&(Tn.BcfStaffList=C.bcfContent.staffList),l.value=Qt("hideTool");let w=new Image;w.crossOrigin="anonymous",w.src="https://bimkk-oss-test.oss-cn-beijing.aliyuncs.com/bim-viewer/skybox/skybox.jpeg",Qn("skyboxImg",w),wr.emit("ThemeConfig"),B();function B(){const k=Object.entries(C);let T=[];if(k.forEach(([L,V])=>{V&&T.push(L)}),T.length==0){b();return}a.setEnableToolsByKey(T),b()}},p=()=>{console.log(a.visibleTools);for(let b=0;b<a.visibleTools.length;b++){const w=a.visibleTools[b];o.watch(()=>w.isActive,B=>{g({isTool:!1,event_target:"ToolBar",event_name:"clickTool",content:{toolId:w.id,toolKey:w.key,status:B}})})}console.log("工具栏监听初始化完毕")},A=G,g=b=>{A("emitHandler",b)},_=b=>{l.value=b};return wr.on("hideToolbar",_),o.onBeforeUnmount(()=>{wr.off("hideToolbar",_)}),o.watch(()=>C.instruction,b=>{b&&(b.instruct_name=="changeBackgroundColor"&&b.content.color&&wr.emit("changeBackgroundColor",b.content.color),b.instruct_name=="setNavCube"&&(Qn("navCubePos",{pos:Qt("navCubePos").pos,posNum:wf(!!b.content.move,286)}),gr.setProperty("--operate-item-right",b.content.move?"300px":"14px")),b.instruct_name=="setAnnoStatus"&&wr.emit("setAnnoStatus",b.content),b.instruct_name=="lastSetsContent"&&wr.emit("lastSetsContent",b.content))}),o.watch(()=>a.isToolActive(8),b=>{Qt("navCubePos").pos.includes(Qt("inspectorPos"))&&Qn("navCubePos",{pos:Qt("navCubePos").pos,posNum:wf(b,286)}),gr.setProperty("--operate-item-right",b?"300px":"14px")}),o.watch(()=>a.isToolActive(17),b=>{Qt("navCubePos").pos.includes(Qt("inspectorPos"))&&Qn("navCubePos",{pos:Qt("navCubePos").pos,posNum:wf(b,286)}),gr.setProperty("--operate-item-right",b?"300px":"14px")}),(b,w)=>{const B=cw,k=s5,T=QN,L=IN;return d.value?(o.openBlock(),o.createElementBlock("div",SV,[w[1]||(w[1]=o.createElementVNode("div",{class:"industry-left-wrapper"},null,-1)),b.bcf&&b.bcfContent&&b.bcfContent.bcfList&&b.bcfContent.staffList?o.withDirectives((o.openBlock(),o.createBlock(B,{key:0,instruction:b.instruction,"user-id":b.bcfContent.userId,"bcf-list":b.bcfContent.bcfList,onClosePanel:w[0]||(w[0]=V=>o.unref(a).setToolActiveStatusBykey("bcf",!1)),onEmitHandler:g},null,8,["instruction","user-id","bcf-list"])),[[o.vShow,o.unref(a).isToolActiveBykey("bcf")]]):o.createCommentVNode("",!0),o.createElementVNode("div",kV,[o.createVNode(k,{instruction:b.instruction,"model-buffer":o.unref(h),"meta-buffer":b.metaBuffer,"model-type":b.modelType,"file-id":o.unref(S),"file-name":o.unref(v),"file-path":o.unref(f),onEmitHandler:g},null,8,["instruction","model-buffer","meta-buffer","model-type","file-id","file-name","file-path"]),o.unref(a).visibleTools.length!=0?(o.openBlock(),o.createElementBlock("div",MV,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(a).visibleTools,(V,Q)=>o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:Q},[V.key!=="bcf"?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(PV)[V.component]),{key:0,"component-id":V.id,onClosePanel:N=>o.unref(a).setToolActiveStatus(V.id,!1),onEmitHandler:g},null,40,["component-id","onClosePanel"])):o.createCommentVNode("",!0)])),[[o.vShow,o.unref(a).isToolActive(V.id)]])),128))])):o.createCommentVNode("",!0),o.unref(a).visibleTools.length>0&&!o.unref(Qt)("isMobile")&&!l.value?(o.openBlock(),o.createBlock(T,{key:1,"visible-tools":o.unref(a).visibleTools,onEmitHandler:g},null,8,["visible-tools"])):o.createCommentVNode("",!0),o.unref(a).visibleTools.length>0&&o.unref(Qt)("isMobile")&&!o.unref(Qt)("hideTool")?(o.openBlock(),o.createBlock(L,{key:2,"visible-tools":o.unref(a).visibleTools,onEmitHandler:g},null,8,["visible-tools"])):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)}}});function IV(I){I&&(I.configs&&Oy(I.configs),I.toolList&&Rd().setEnableTools(I.toolList),I.callback&&I.callback())}function DV(I,G){Ln.SetToolActiveById(I,G),Rd().setToolActiveStatus(I,G)}function FV(I,G){Ln.SetToolActiveByKey(I,G),Rd().setToolActiveStatusBykey(I,G)}function RV(I){Ln.SetAllClose(),Rd().setAllToolClose(I)}const OV={class:"tall_panel_content"},LV={class:"panel_top"},NV={class:"panel_title"},jV={class:"panel_close"},VV={class:"panel_content"},UV={key:0,class:"width-set",id:"lineWidthSet"},dw=_n(o.defineComponent({__name:"tallPanel",props:{panelTitle:{type:String,default:""},width:{type:Number,default:286},clickHandle:{type:Function,default:()=>{}},pos:{type:String,default:"left"},setWidth:{type:Boolean,default:!1}},setup(I){const G=Yn(),a=I,C=o.ref(),S=o.ref(a.width);o.onMounted(()=>{a.pos=="left"&&(C.value.style.left=`${0+Qt("leftWidth")}px`),a.pos=="right"&&(C.value.style.right=`${0+Qt("rightWidth")}px`),C.value.style.top=`${0+Qt("topHeight")}px`,C.value.style.bottom=`${0+Qt("bottomHeight")}px`});let v,f=0,h=0;return document.addEventListener("mousedown",d=>{var l;((l=d.target)==null?void 0:l.id)=="lineWidthSet"&&(v=!0,f=d.x)}),document.addEventListener("mousemove",d=>{v&&(h=d.x-f,f=d.x,S.value+=h,S.value<286&&(S.value=286),gr.setProperty("--left-toggle-left",(14+S.value).toString()+"px"))}),document.addEventListener("mouseup",d=>{v=!1}),o.watch(()=>G.isToolActive(0),d=>{Qt("navCubePos").pos.includes(Qt("treePos"))&&Qn("navCubePos",{pos:Qt("navCubePos").pos,posNum:wf(d,286)}),gr.setProperty("--left-toggle-left",d?(14+S.value).toString()+"px":"14px")}),(d,l)=>{const u=ys;return o.openBlock(),o.createElementBlock("div",{ref_key:"tallPanelWrapper",ref:C,class:"tall_panel_wrapper",id:"tall_panel_wrapper",style:o.normalizeStyle({width:S.value.toString()+"px"})},[o.createElementVNode("div",OV,[o.createElementVNode("div",LV,[o.createElementVNode("div",NV,o.toDisplayString(I.panelTitle),1),o.createElementVNode("div",jV,[o.createVNode(u,{width:18,"click-handle":I.clickHandle,light:o.unref(gr).currentTheme=="blue",dark:o.unref(gr).currentTheme=="light-gray"},null,8,["click-handle","light","dark"])])]),o.createElementVNode("div",VV,[o.renderSlot(d.$slots,"default",{},void 0,!0)])]),I.setWidth?(o.openBlock(),o.createElementBlock("div",UV,l[0]||(l[0]=[o.createElementVNode("div",{class:"set-line"},null,-1)]))):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-cacd0bce"]]),HV={class:"panel_top"},zV={class:"panel_title"},GV={class:"panel_close"},QV={class:"panel_content"},Sf=o.defineComponent({__name:"panel",props:{panelTitle:{type:String,default:""},width:{type:Number,default:240},clickHandle:{type:Function,default:()=>{}}},setup(I){const G=o.ref(!0);return o.onMounted(()=>{}),(a,C)=>{const S=ys;return o.openBlock(),o.createBlock(o.unref(Hp.ElDialog),{class:"panel_dialog",modelValue:G.value,"onUpdate:modelValue":C[0]||(C[0]=v=>G.value=v),width:I.width,draggable:""},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"panel_wrapper",style:o.normalizeStyle({width:I.width.toString()+"px"})},[o.createElementVNode("div",HV,[o.createElementVNode("div",zV,o.toDisplayString(I.panelTitle),1),o.createElementVNode("div",GV,[o.createVNode(S,{width:18,"click-handle":I.clickHandle,light:o.unref(gr).currentTheme=="blue",dark:o.unref(gr).currentTheme=="light-gray"},null,8,["click-handle","light","dark"])])]),o.createElementVNode("div",QV,[o.renderSlot(a.$slots,"default")])],4)]),_:3},8,["modelValue","width"])}}}),kf=[{id:0,name:"对象"},{id:1,name:"类别"},{id:2,name:"楼层"}],fw=[{id:1,name:"铅笔",buttontype:"path",svg:"pencil",svgActive:"pencil-active",isShow:!0},{id:2,name:"箭头",buttontype:"arrow",svg:"arrow",svgActive:"arrow-active",isShow:!1},{id:3,name:"矩形",buttontype:"rect",svg:"rect",svgActive:"rect-active",isShow:!1},{id:4,name:"圆形",buttontype:"ellipse",svg:"ellipse",svgActive:"ellipse-active",isShow:!1},{id:5,name:"文字",buttontype:"text",svg:"text",svgActive:"text-active",isShow:!1}],cu=[{id:1,name:"渐变蓝",color:"linear-gradient(180deg, #fffefb 0%, #daebff 100%)",rgb:[.9254,.9607,1]},{id:2,name:"纯灰度",color:"#F0F0F0",rgb:[.9411,.9411,.9411]},{id:3,name:"昏暗天空",color:"#323237",rgb:[.196,.196,.2156]},{id:4,name:"纯白色",color:"#FFFFFF",rgb:[1,1,1]},{id:5,name:"宝石蓝",color:"#086FFD",rgb:[.0313,.4352,.9921]}],lm=[{id:1,code:"distance",name:"距离",svg:"distance",svgActive:"distance-active"},{id:2,code:"angle",name:"角度",svg:"angle",svgActive:"angle-active"}],um=[{id:0,name:"1280x720px",width:"1280",height:"720"},{id:1,name:"1920x1080px",width:"1920",height:"1080"},{id:2,name:"2560x1440px",width:"2560",height:"1440"},{id:3,name:"自定义"}],WV=[{id:1,code:"top",name:"俯视图",dir_num:4,img:"view-top",imgActive:"view-top-active"},{id:2,code:"bottom",name:"仰视图",dir_num:5,img:"view-bottom",imgActive:"view-bottom-active"},{id:3,code:"left",name:"左视图",dir_num:3,img:"view-left",imgActive:"view-left-active"},{id:4,code:"right",name:"右视图",dir_num:2,img:"view-right",imgActive:"view-right-active"},{id:5,code:"front",name:"前视图",dir_num:0,img:"view-front",imgActive:"view-front-active"},{id:6,code:"back",name:"后视图",dir_num:1,img:"view-back",imgActive:"view-back-active"},{id:7,code:"left-bottom",name:"西南",dir_num:14,img:"view-left-bottom",imgActive:"view-left-bottom-active"},{id:8,code:"right-bottom",name:"东南",dir_num:15,img:"view-right-bottom",imgActive:"view-right-bottom-active"},{id:9,code:"right-top",name:"东北",dir_num:16,img:"view-right-top",imgActive:"view-right-top-active"},{id:10,code:"left-top",name:"西北",dir_num:17,img:"view-left-top",imgActive:"view-left-top-active"}],du=[{id:1,code:"image",name:"图片",okType:"image/*",img:"image",img_active:"image_active",imgActive:"image-active"},{id:2,code:"record",name:"语音",okType:"record",img:"record",img_active:"record_active",imgActive:"record-active"},{id:3,code:"video",name:"视频",okType:"video/*",img:"video",img_active:"video_active",imgActive:"video-active"},{id:4,code:"file",name:"文档",okType:"*/*",img:"file",img_active:"file_active",imgActive:"file-active"},{id:5,code:"text",name:"文字",okType:"text",img:"text",img_active:"text_active",imgActive:"text-active"}],$V=[{id:1,name:"隐藏",img:"hidden",img_active:"hidden-active"},{id:2,name:"透视",img:"opacity",img_active:"opacity-active"},{id:3,name:"选中",img:"select",img_active:"select-active"},{id:0,name:"恢复",img:"reset",img_active:"reset-active"}],KV={key:0,class:"panel_content"},XV={class:"types"},YV=["onClick"],JV={class:"tree"},ZV={key:1,class:"panel_content_null"},qV={class:"pc_tree_type_button"},eU=["onClick"],tU={class:"pc_tree_content"},rU={class:"tree-search-box"},nU={class:"tree-wrapper"},iU=["id"],sU={class:"tree-wrapper"},aU=["id"],oU={class:"tree-wrapper"},lU=["id"],uU={key:2,class:"operate-tree-box"},cU={class:"operate-tree"},dU={class:"tree-title-box"},fU={class:"tree-title-icon"},hU={class:"tree-category-box"},pU={class:"tree-category-list"},AU=["onClick"],mU={class:"tree-search-box"},gU={class:"tree-content"},vU={class:"tree-wrapper"},yU=["id"],bU={class:"tree-wrapper"},_U=["id"],wU={class:"tree-wrapper"},xU=["id"],CU=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"StructureTree",props:["componentId"],emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I,S=o.ref(!1),v=o.ref(!1),f=o.ref(),h=o.ref(),d=o.ref(),l=o.ref(),u=o.ref(0),c=o.ref(),p=o.ref(),A=o.ref(),g=o.ref(),_=o.ref();let b;const w=o.ref(""),B=o.ref(""),k=o.ref("");o.watch(()=>a.isToolActive(C.componentId),R=>{if(S.value&&R){if(v.value||X(kf[0]),B.value==k.value||B.value=="")return;$(B.value)}}),o.watch(w,R=>{var O,U,F;u.value===0?(O=f.value)==null||O.filter(R):u.value===1?(U=h.value)==null||U.filter(R):u.value===2&&((F=d.value)==null||F.filter(R))});const T=(R,O)=>R?O.title.includes(w.value):!0,L={children:"children",label:"title",value:"nodeId"},V=G,Q=R=>{V("emitHandler",R)},N=o.ref(!1);o.onMounted(()=>{Qt("userInfo").isInShare&&Qt("userInfo").isShareClient&&(N.value=!0),a.setReadyById(C.componentId)});const j=()=>{v.value=!1,b=window.bimViewer;const{eventTrigger:R}=b;R.on("treeAllReady",O=>{S.value=!0,l.value=O,console.log("初始化结构树数据",l.value),b.SetShowSpaceModeActive(!1)}),Qt("isMobile")||R.on("pickedEntity",O=>{v.value&&(B.value=O.id,a.isToolActive(C.componentId)&&$(O.id))}),Qt("isMobile")&&(R.on("touchEntity",O=>{v.value!==!1&&(B.value=O.id,a.isToolActive(C.componentId)&&$(O.id))}),R.on("touchNothing",()=>{o.nextTick(()=>{_.value=""}),Q({isTool:!0,event_target:"StructureTree",event_name:"touchNothing",content:{msg:"pickedNothing"}})}))};wr.on("BimViewer",j),o.onBeforeUnmount(()=>{wr.off("BimViewer",j)});const $=R=>{let O,U;u.value===0?O=b.objectsExplorer.objectList[R]?b.objectsExplorer.objectList[R]:null:u.value===1?O=b.classesExplorer.objectList[R]?b.classesExplorer.objectList[R]:null:u.value===2&&(O=b.storeysExplorer.objectList[R]?b.storeysExplorer.objectList[R]:null),O&&(_.value=O.nodeId,u.value===0?(f.value.setCurrentKey(O.nodeId,!0),U=document.getElementById(O.nodeId+"0")):u.value===1?(h.value.setCurrentKey(O.nodeId,!0),U=document.getElementById(O.nodeId+"1")):u.value===2&&(d.value.setCurrentKey(O.nodeId,!0),U=document.getElementById(O.nodeId+"2")),setTimeout(()=>{U&&o.nextTick(()=>{U.scrollIntoView({block:"center"})})},200),k.value=R,Q({isTool:!0,event_target:"StructureTree",event_name:"pickedEntity",content:{entityId:R,viewer_nodeId:O.nodeId}}))},X=R=>{if(R.id==0){if(!p.value){if(p.value=l.value.objectsData?l.value.objectsData:[],p.value[0]){p.value[0].title="全部";const O=p.value.map(U=>U.nodeId);f.value.setCheckedKeys(O)}v.value=!0}}else if(R.id==1){if(!g.value&&(A.value=l.value.classesData?l.value.classesData:[],A.value[0])){A.value[0].title="全部";const O=A.value.map(U=>U.nodeId);h.value.setCheckedKeys(O)}}else if(R.id==2&&!g.value&&(g.value=l.value.storeysData?l.value.storeysData:[],g.value[0])){g.value[0].title="全部";const O=g.value.map(U=>U.nodeId);d.value.setCheckedKeys(O)}Q({isTool:!0,event_target:"StructureTree",event_name:"changeTreeStructure",content:{item:R}}),u.value!==R.id&&(u.value=R.id)};let W=[];const D=(R,O)=>{W.includes(R.nodeId)?R.checked=!0:R.checked=!R.checked;const U=b.viewer.scene.objects[R.objectId];U?b.setEntityVisible(U,R.checked):F(R,R.checked),K(R,R.checked),Q({isTool:!0,event_target:"StructureTree",event_name:"clickTreeBox",content:{active_tree:u.value,nodeId:R.nodeId,status:R.checked}});function F(te,q){if(te.checked=q,te.children.length==0){const ie=b.viewer.scene.objects[te.objectId];ie&&b.setEntityVisible(ie,te.checked)}else for(let ie=0;ie<te.children.length;ie++)F(te.children[ie],q)}function K(te,q){te.checked=q,te.parent&&K(te.parent,q)}W=O.halfCheckedKeys},z=(R,O)=>{const U=b.viewer.scene.objects[R.objectId];U&&(b.setAllObjectsSelected(!1),b.setEntitySelected(U),b.viewFitEntity(U)),wr.emit("tree_clickNode",U),Q({isTool:!0,event_target:"StructureTree",event_name:"clickTreeNode",content:{active_tree:u.value,objectId:R.objectId}})},M=()=>{V("closePanel")};return(R,O)=>{const U=AN,F=Sf,K=ji,te=Vi,q=dw,ie=ys;return!o.unref(Qt)("isMobile")&&o.unref(gr).currentTheme=="blue"?(o.openBlock(),o.createBlock(F,{key:0,class:"web_tree_container",width:268,panelTitle:"结构树","click-handle":M},{default:o.withCtx(()=>[v.value?(o.openBlock(),o.createElementBlock("div",KV,[o.createElementVNode("div",XV,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(kf),oe=>(o.openBlock(),o.createElementBlock("div",{key:oe.id,class:o.normalizeClass(["types-item",{"types-item-active":u.value===oe.id}]),onClick:ce=>X(oe)},o.toDisplayString(oe.name),11,YV))),128))]),o.createElementVNode("div",JV,[o.createVNode(U,{ref:"tree",height:700,"node-key":"nodeId",data:c.value,"current-node-key":_.value,"highlight-current":!0,props:L,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},null,8,["data","current-node-key"])])])):(o.openBlock(),o.createElementBlock("div",ZV,O[2]||(O[2]=[o.createElementVNode("span",null,"加载中...",-1)])))]),_:1})):!o.unref(Qt)("isMobile")&&o.unref(gr).currentTheme=="light-gray"?(o.openBlock(),o.createBlock(q,{key:1,class:"pc_structure_container",width:286,panelTitle:"结构树","click-handle":M,pos:o.unref(Qt)("treePos"),setWidth:""},{default:o.withCtx(()=>[o.createElementVNode("div",qV,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(kf),oe=>(o.openBlock(),o.createElementBlock("div",{key:oe.id,class:o.normalizeClass(["type_button",{type_button_active:u.value===oe.id}]),onClick:ce=>X(oe)},o.toDisplayString(oe.name),11,eU))),128))]),o.createElementVNode("div",tU,[o.createElementVNode("div",rU,[o.createVNode(K,{modelValue:w.value,"onUpdate:modelValue":O[0]||(O[0]=oe=>w.value=oe),placeholder:"请输入需搜索的内容","prefix-icon":"Search",clearable:""},null,8,["modelValue"])]),o.withDirectives(o.createElementVNode("div",nU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createVNode(U,{ref_key:"tree0",ref:f,"node-key":"nodeId",data:p.value,"current-node-key":_.value,"highlight-current":!0,props:L,"filter-node-method":T,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},{default:o.withCtx(({node:oe})=>[o.createElementVNode("span",{id:oe.key+"0",class:"tree_node_text"},o.toDisplayString(oe.data.title),9,iU)]),_:1},8,["data","current-node-key"])]),_:1})],512),[[o.vShow,u.value==0]]),o.withDirectives(o.createElementVNode("div",sU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createVNode(U,{ref_key:"tree1",ref:h,"node-key":"nodeId",data:A.value,"current-node-key":_.value,"highlight-current":!0,props:L,"filter-node-method":T,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},{default:o.withCtx(({node:oe})=>[o.createElementVNode("span",{id:oe.key+"1",class:"tree_node_text"},o.toDisplayString(oe.data.title),9,aU)]),_:1},8,["data","current-node-key"])]),_:1})],512),[[o.vShow,u.value==1]]),o.withDirectives(o.createElementVNode("div",oU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createVNode(U,{ref_key:"tree2",ref:d,"node-key":"nodeId",data:g.value,"current-node-key":_.value,"highlight-current":!0,props:L,"filter-node-method":T,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},{default:o.withCtx(({node:oe})=>[o.createElementVNode("span",{id:oe.key+"2",class:"tree_node_text"},o.toDisplayString(oe.data.title),9,lU)]),_:1},8,["data","current-node-key"])]),_:1})],512),[[o.vShow,u.value==2]])])]),_:1},8,["pos"])):(o.openBlock(),o.createElementBlock("div",uU,[o.createElementVNode("div",cU,[o.createElementVNode("div",dU,[O[3]||(O[3]=o.createElementVNode("div",{class:"tree-title"},"结构树",-1)),o.createElementVNode("div",fU,[o.createVNode(ie,{class:"close",width:.4,"size-type":"rem","click-handle":M})])]),o.createElementVNode("div",hU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createElementVNode("div",pU,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(kf),(oe,ce)=>(o.openBlock(),o.createElementBlock("div",{key:ce,class:o.normalizeClass(["tree-category-item",{"tree-category-item-active":oe.id===u.value}]),onClick:ee=>X(oe)},o.toDisplayString(oe.name),11,AU))),128))])]),_:1})]),o.createElementVNode("div",mU,[o.createVNode(K,{modelValue:w.value,"onUpdate:modelValue":O[1]||(O[1]=oe=>w.value=oe),placeholder:"请输入需搜索的内容","prefix-icon":"Search",clearable:""},null,8,["modelValue"])]),o.createElementVNode("div",gU,[o.withDirectives(o.createElementVNode("div",vU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createVNode(U,{ref_key:"tree0",ref:f,"node-key":"nodeId",data:p.value,"current-node-key":_.value,"highlight-current":!0,props:L,"filter-node-method":T,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},{default:o.withCtx(({node:oe})=>[o.createElementVNode("span",{id:oe.key+"0",class:"tree_node_text"},o.toDisplayString(oe.data.title),9,yU)]),_:1},8,["data","current-node-key"])]),_:1})],512),[[o.vShow,u.value==0]]),o.withDirectives(o.createElementVNode("div",bU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createVNode(U,{ref_key:"tree1",ref:h,"node-key":"nodeId",data:A.value,"current-node-key":_.value,"highlight-current":!0,props:L,"filter-node-method":T,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},{default:o.withCtx(({node:oe})=>[o.createElementVNode("span",{id:oe.key+"1",class:"tree_node_text"},o.toDisplayString(oe.data.title),9,_U)]),_:1},8,["data","current-node-key"])]),_:1})],512),[[o.vShow,u.value==1]]),o.withDirectives(o.createElementVNode("div",wU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createVNode(U,{ref_key:"tree2",ref:d,"node-key":"nodeId",data:g.value,"current-node-key":_.value,"highlight-current":!0,props:L,"filter-node-method":T,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},{default:o.withCtx(({node:oe})=>[o.createElementVNode("span",{id:oe.key+"2",class:"tree_node_text"},o.toDisplayString(oe.data.title),9,xU)]),_:1},8,["data","current-node-key"])]),_:1})],512),[[o.vShow,u.value==2]])])])]))}}}),[["__scopeId","data-v-3c1af895"]])},Symbol.toStringTag,{value:"Module"})),hw={ExtendToStructure:"扩建物",ThermalTransmittance:"热透射率",Roughness:"粗糙度",Category:"类型",IsExternal:"是否外部",LoadBearing:"承重",Reference:"参考",Span:"跨度",Slope:"斜坡",Thickness:"厚度",Structural:"结构",Construction:"结构",Graphics:"图形","Coarse Scale Fill Color":"粗补色",Other:"其他",Family:"族",Type:"类","Family and Type":"族和类","Type Id":"类Id","Phase Created":"阶段创建","Enable Analytical Model":"启用分析模型","Base Offset":"基准偏移量","Base Constraint":"基础约束","Location Line":"位置线","Room Bounding":"房间边界","Extrusion End":"挤出端","Extrusion Start":"挤出启动","Level Offset":"水平偏移量","Reference Level":"参考水平","Work Plane":"工作面","Fascia Depth":"筋膜深度","Rafter Cut":"椽断","Analytical Properties":"解析性质",TotalArea:"总面积",ProjectedArea:"总面积",Width:"宽度",Height:"高度",Depth:"深度",Volume:"体积",Mass:"质量",Density:"密度",Material:"材料",Color:"颜色",Finish:"表面处理",FireRating:"防火等级",Insulation:"绝缘",ThermalConductivity:"导热性",Durability:"耐久性",Age:"年代",Condition:"状况",Owner:"所有者",Maintenance:"维护",Cost:"成本",ConstructionDate:"建造日期",Location:"位置",Orientation:"方向",Elevation:"标高",Area:"面积",Length:"长度",FloorCount:"层数",Occupancy:"占用率",StructuralSystem:"结构系统",MechanicalSystem:"机械系统",ElectricalSystem:"电气系统",PlumbingSystem:"管道系统",SafetySystem:"安全系统",EnvironmentalImpact:"环境影响",EnergyEfficiency:"能源效率",WaterUsage:"用水量",NoiseLevel:"噪音水平",Accessibility:"可达性",Compliance:"合规性",BuildingCode:"建筑规范",DesignLife:"设计寿命",ServiceLife:"使用寿命",ManufactureDate:"制造日期",InstallationDate:"安装日期",Warranty:"保修",MaintenanceSchedule:"维护计划",RepairHistory:"维修历史",ReplacementCost:"更换成本",DisposalMethod:"处置方法",Recyclability:"可回收性",HazardousMaterials:"危险材料",Lighting:"照明",Ventilation:"通风",Heating:"供暖",Cooling:"制冷",FireProtection:"防火保护",Security:"安全",Signage:"标识",AccessibilityFeatures:"无障碍特征",AcousticProperties:"声学特性",VisualProperties:"视觉特性",CulturalValue:"文化价值",HistoricalSignificance:"历史意义",ArchitecturalStyle:"建筑风格",StructuralIntegrity:"结构完整性",SeismicPerformance:"抗震性能",WindResistance:"抗风性能",ThermalResistance:"热阻",UVResistance:"抗紫外线",ChemicalResistance:"抗化学性",WeatherResistance:"耐候性",ImpactResistance:"抗冲击性",AbrasionResistance:"耐磨性",FlexuralStrength:"抗弯强度",CompressiveStrength:"抗压强度",TensileStrength:"抗拉强度",Hardness:"硬度",Elasticity:"弹性",Plasticity:"塑性",Brittleness:"脆性",Ductility:"延展性",Conductivity:"导电性",Magnetism:"磁性",ThermalExpansion:"热膨胀",Shrinkage:"收缩",Creep:"蠕变",Fatigue:"疲劳",Corrosion:"腐蚀",Oxidation:"氧化",Pitting:"点蚀",Weathering:"风化",BioDeterioration:"生物劣化",RadiationResistance:"抗辐射",ElectromagneticCompatibility:"电磁兼容",InsulationResistance:"绝缘电阻",DielectricStrength:"介电强度",SurfaceTension:"表面张力",Wettability:"润湿性",Hydrophilicity:"亲水性",Hydrophobicity:"疏水性",Adsorption:"吸附",Absorption:"吸收",Sorption:"吸附吸收",Desorption:"脱附",Porosity:"孔隙率",Permeability:"渗透性",SorptionCapacity:"吸附容量",DesorptionCapacity:"脱附容量",Constraints:"约束",Phases:"阶段",Discipline:"学科",Host:"宿主",RelatedToMass:"相关质量",BaseLevel:"基准层",TopLevel:"顶部层",Offset:"偏移",HeightOffsetFromLevel:"高度偏移",RoomName:"房间名称",RoomNumber:"房间编号",RoomArea:"房间面积",WallType:"墙类型",FloorType:"地板类型",RoofType:"屋顶类型",WindowType:"窗户类型",DoorType:"门类型",ColumnType:"柱类型",BeamType:"梁类型",FamilyName:"族名称",TypeName:"类型名称",InstanceName:"实例名称",Workset:"工作集",Comments:"备注",Manufacturer:"制造商",Model:"模型",AssemblyCode:"装配代码",ConstructionType:"施工类型",FireProofing:"防火",StructuralUsage:"结构用途",FinishCode:"饰面代码",Sustainability:"可持续性",Grade:"等级",StructuralMaterial:"结构材料",ThermalProperties:"热性能",SoundTransmission:"声音传输",VaporBarrier:"防潮层",InsulationType:"绝缘类型",LifeCycle:"生命周期",EnvironmentalCertification:"环境认证",ConstructionPhase:"施工阶段",Pset_ElementShading:"元素遮阳",Pset_ProductRequirements:"产品要求",Pset_QuantityTakeOffCommon:"工程量计算",Pset_QuantityTakeOff:"工程量计算",Pset_ProvisionForVoid:"预留孔洞",Pset_ReinforcementBarPitchOfSlab:"板内钢筋间距",Pset_ReinforcementBarPitchOfBeam:"梁体钢筋间距",Pset_ReinforcementBarPitchOfWall:"墙体钢筋间距",Pset_ReinforcementBarPitchOfPile:"桩基钢筋间距",Pset_ReinforcementBarPitchOfColumn:"柱体钢筋间距",Pset_ReinforcementBarPitchOfFooting:"基础钢筋间距",Pset_ReinforcementBarPitchOfFoundation:"基础构件钢筋间距",Pset_BuildingElementProxyCommon:"建筑构件代理通用",Pset_SpaceFireSafetyRequirements:"空间防火要求",Pset_SpaceThermalRequirements:"空间热工要求",Pset_DoorWindowGlazingType:"门窗玻璃类型",Pset_EnvironmentalImpactIndicators:"环境影响指标",Pset_BeamCommon:"梁通用",Pset_ColumnCommon:"柱通用",Pset_WallCommon:"墙体通用",Pset_WindowCommon:"窗户通用",Pset_DoorCommon:"门通用",Pset_RoofCommon:"屋顶通用",Pset_SlabCommon:"板通用",Pset_CoveringCommon:"覆盖层通用",Pset_FurnitureCommon:"家具通用",Pset_LightFixtureTypeCommon:"灯具类型通用",Pset_ZoneCommon:"区域通用",Pset_SpaceCommon:"空间通用",Pset_BuildingCommon:"建筑通用",Pset_FloorCommon:"地板通用",Pset_StairCommon:"楼梯通用",Pset_RailingCommon:"栏杆通用",Pset_OpeningElementCommon:"开口构件通用",Pset_DistributionPortCommon:"分配端口通用",Pset_DistributionFlowElementCommon:"分配流体构件通用",Pset_ElectricDeviceTypeCommon:"电气设备类型通用",Pset_ValveTypeCommon:"阀门类型通用",Pset_PipeFittingTypeCommon:"管件类型通用",Pset_TankTypeCommon:"储罐类型通用",Pset_HeatExchangerTypeCommon:"换热器类型通用",Pset_TransformerTypeCommon:"变压器类型通用",Pset_PumpTypeCommon:"泵类型通用",Pset_VehicleCommon:"车辆通用",Pset_AirTerminalTypeCommon:"空气终端设备类型通用",Pset_EquipmentTypeCommon:"设备类型通用",Pset_FireSuppressionTerminalTypeCommon:"消防终端设备类型通用",Pset_HumiditySensorTypeCommon:"湿度传感器类型通用",Pset_ReflectorTypeCommon:"反射器类型通用",Pset_FlowInstrumentTypeCommon:"流量仪表类型通用",Pset_HeatTransferDeviceTypeCommon:"热传递设备类型通用"},BU=Object.keys(hw).reduce((I,G)=>{const a=G.trim().toLowerCase().replace(/\s+/g,"");return I[a]=hw[G],I},{});function fu(I){const G=I.trim().toLowerCase().replace(/\s+/g,"");return BU[G]||I}const EU={class:"myInspector_content"},PU={class:"title"},SU=["src"],kU={class:"properties_content"},MU={class:"basic_info_value"},TU={class:"propertysets"},IU=["onClick"],DU={class:"title"},FU=["src"],RU={class:"properties_content"},OU={class:"content_title_value"},LU={class:"content_title"},NU={class:"content_value"},jU={class:"myInspector_empty"},VU=["src"],UU={class:"pc_Inspector_content"},HU={class:"pc_myInspector_content"},zU={class:"title"},GU=["src"],QU={class:"properties_content"},WU={class:"basic_info_value"},$U={class:"propertysets"},KU=["onClick"],XU={class:"title"},YU=["src"],JU={class:"properties_content"},ZU={class:"content_title_value"},qU={class:"content_title"},e9={class:"content_value"},t9={class:"pc_model_info"},r9={class:"model_info_content"},n9={class:"model_info_value"},i9={class:"model_info_content"},s9={class:"model_info_value"},a9={class:"model_info_content"},o9={class:"model_info_value"},l9={class:"model_info_content"},u9={class:"model_info_value"},c9={key:2,class:"mobile_myInspector_wrapper"},d9={class:"detail-title-box"},f9={class:"detail-title-icon"},h9={class:"mobile_myInspector"},p9={class:"mobile_myInspector_content"},A9={class:"basic_info_title"},m9=["src"],g9={class:"basic_info_content"},v9={class:"basic_info_content_value"},y9={class:"content_value"},b9={class:"basic_info_content_value"},_9={class:"content_value"},w9={class:"basic_info_content_value"},x9={class:"content_value"},C9={class:"propertysets"},B9=["onClick"],E9={class:"propertysets_title"},P9=["src"],S9={class:"properties_content"},k9={class:"content_title_value"},M9={class:"content_title"},T9={class:"content_value"},I9={class:"mobile_Inspector_empty"},D9={class:"model_info_value"},F9={class:"model_info_value"},R9={class:"model_info_value"},O9={class:"model_info_value"},L9=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"InspectorTool",props:["componentId"],emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I;o.onMounted(()=>{a.setReadyById(C.componentId)});const S=G,v=T=>{S("emitHandler",T)};let f=window.bimViewer;const h=o.ref(!1),d=o.ref(""),l=o.ref(""),u=o.reactive({entity_name:"无",entity_type:"无",entity_id:"无",propertySets:[],expanded:!0}),c=o.reactive({objectCount:"未知",pSetsCount:"未知",createDate:"未知",author:"未知"});o.watch(()=>a.isToolActive(C.componentId),T=>{if(T&&h.value==!0){if(d.value==l.value)return;g(d.value)}});const p=T=>{f=window.bimViewer;const{eventTrigger:L}=f;L.on("metaLoaded",()=>{const V=window.bimViewer.getModelInfo(T);c.createDate=V.createDate!==""?V.createDate.replace("T"," "):"未知",c.objectCount=V.objectCount!==0?V.objectCount:"未知",c.pSetsCount=V.propertySetCount!==0?V.propertySetCount:"未知",c.author=V.author!==""?V.author:"未知"}),Qt("isMobile")||L.on("pickedEntity",V=>{g(V.id)}),Qt("isMobile")&&L.on("touchEntity",V=>{g(V.id)}),L.on("pickedNothing",()=>{h.value=!1,d.value="",k(),v({isTool:!0,event_target:"InspectorTool",event_name:"pickedNothing",content:{msg:"pickedNothing"}})})},A=T=>{if(!T)return;const L=f.getObjectProperties(T.id);L&&(d.value=T.id,h.value=!0,B(L))};wr.on("BimViewer",p),wr.on("tree_clickNode",A),o.onBeforeUnmount(()=>{wr.off("BimViewer",p),wr.off("tree_clickNode",A)});const g=T=>{if(d.value=T,h.value=!0,!a.isToolActive(C.componentId))return;const L=f.getObjectProperties(T);L&&B(L),l.value=T,Qt("isMobile")?v({isTool:!0,event_target:"InspectorTool",event_name:"touchEntity",content:{entityId:T}}):v({isTool:!0,event_target:"InspectorTool",event_name:"pickedEntity",content:{entityId:T}})},_=()=>{S("closePanel")},b=T=>{T.expanded=!T.expanded},w=T=>T?`${Vt}/bim-viewer/down_icon.png`:`${Vt}/bim-viewer/right_icon.png`,B=T=>{u.entity_name=T.name,u.entity_type=T.type,u.entity_id=T.id,T.propertySets&&(u.propertySets=T.propertySets,u.propertySets.forEach(L=>{gr.currentTheme=="light-gray"?L.expanded=!0:L.expanded=!1}))},k=()=>{u.entity_name="",u.entity_type="",u.entity_id="",u.propertySets=[]};return(T,L)=>{const V=Vi,Q=Sf,N=dw,j=ys;return o.openBlock(),o.createElementBlock(o.Fragment,null,[!o.unref(Qt)("isMobile")&&o.unref(gr).currentTheme=="blue"?(o.openBlock(),o.createBlock(Q,{key:0,class:"myInspector_wrapper",panelTitle:"属性","click-handle":_,style:{height:"var(--inspector-content-height)"}},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",EU,[o.createVNode(V,null,{default:o.withCtx(()=>[o.createElementVNode("div",{class:"basic_info",onClick:L[0]||(L[0]=$=>b(u))},[o.createElementVNode("div",PU,[o.createElementVNode("img",{src:w(u.expanded),class:"triangle"},null,8,SU),L[3]||(L[3]=o.createElementVNode("span",null,"基本属性",-1))]),o.withDirectives(o.createElementVNode("div",kU,[L[4]||(L[4]=o.createElementVNode("div",{class:"basic_info_title"},[o.createElementVNode("span",null,"名称"),o.createElementVNode("span",{style:{"margin-top":"2px"}},"UUID"),o.createElementVNode("span",null,"类型")],-1)),o.createElementVNode("div",MU,[o.createElementVNode("span",null,o.toDisplayString(u.entity_name),1),o.createElementVNode("span",null,o.toDisplayString(u.entity_id),1),o.createElementVNode("span",null,o.toDisplayString(u.entity_type),1)])],512),[[o.vShow,u.expanded]])]),o.createElementVNode("ul",TU,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(u.propertySets,($,X)=>(o.openBlock(),o.createElementBlock("li",{key:X,class:"propertyset",onClick:W=>b($)},[o.createElementVNode("div",DU,[o.createElementVNode("img",{src:w($.expanded),class:"triangle"},null,8,FU),o.createElementVNode("span",null,o.toDisplayString(o.unref(fu)($.name)),1)]),o.withDirectives(o.createElementVNode("div",RU,[o.createElementVNode("ul",OU,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList($.properties,(W,D)=>(o.openBlock(),o.createElementBlock("li",{key:D,class:"properties"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(W,(z,M)=>(o.openBlock(),o.createElementBlock("div",{class:"title_value",key:M},[o.createElementVNode("span",LU,o.toDisplayString(o.unref(fu)(M)),1),o.createElementVNode("span",NU,o.toDisplayString(z),1)]))),128))]))),128))])],512),[[o.vShow,$.expanded]])],8,IU))),128))])]),_:1})],512),[[o.vShow,h.value]]),o.withDirectives(o.createElementVNode("div",jU,[o.createElementVNode("img",{src:o.unref(Vt)+"/bimkk-app/pinapp-empty-box.png"},null,8,VU),L[5]||(L[5]=o.createElementVNode("span",null,"未选中任何对象,请单击模型对象以查看构件属性。",-1))],512),[[o.vShow,!h.value]])]),_:1})):o.createCommentVNode("",!0),!o.unref(Qt)("isMobile")&&o.unref(gr).currentTheme=="light-gray"?(o.openBlock(),o.createBlock(N,{key:1,panelTitle:"属性","click-handle":_,class:"pc_Inspector",pos:o.unref(Qt)("inspectorPos")},{default:o.withCtx(()=>[L[12]||(L[12]=o.createElementVNode("div",{class:"pc_Inspector_type_button",style:{display:"none"}},[o.createElementVNode("div",{class:"type_button"},"实例属性"),o.createElementVNode("div",{class:"type_button"},"类型属性")],-1)),o.createElementVNode("div",UU,[o.withDirectives(o.createElementVNode("div",HU,[o.createVNode(V,null,{default:o.withCtx(()=>[o.createElementVNode("div",{class:"basic_info",onClick:L[1]||(L[1]=$=>b(u))},[o.createElementVNode("div",zU,[o.createElementVNode("img",{src:w(u.expanded),class:"triangle"},null,8,GU),L[6]||(L[6]=o.createElementVNode("span",null,"基本属性",-1))]),o.withDirectives(o.createElementVNode("div",QU,[L[7]||(L[7]=o.createElementVNode("div",{class:"basic_info_title"},[o.createElementVNode("span",null,"名称"),o.createElementVNode("span",{style:{"margin-top":"2px"}},"UUID"),o.createElementVNode("span",null,"类型")],-1)),o.createElementVNode("div",WU,[o.createElementVNode("span",null,o.toDisplayString(u.entity_name),1),o.createElementVNode("span",null,o.toDisplayString(u.entity_id),1),o.createElementVNode("span",null,o.toDisplayString(u.entity_type),1)])],512),[[o.vShow,u.expanded]])]),o.createElementVNode("ul",$U,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(u.propertySets,($,X)=>(o.openBlock(),o.createElementBlock("li",{key:X,class:"propertyset",onClick:W=>b($)},[o.createElementVNode("div",XU,[o.createElementVNode("img",{src:w($.expanded),class:"triangle"},null,8,YU),o.createElementVNode("span",null,o.toDisplayString(o.unref(fu)($.name)),1)]),o.withDirectives(o.createElementVNode("div",JU,[o.createElementVNode("ul",ZU,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList($.properties,(W,D)=>(o.openBlock(),o.createElementBlock("li",{key:D,class:"properties"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(W,(z,M)=>(o.openBlock(),o.createElementBlock("div",{class:"title_value",key:M},[o.createElementVNode("span",qU,o.toDisplayString(o.unref(fu)(M)),1),o.createElementVNode("span",e9,o.toDisplayString(z),1)]))),128))]))),128))])],512),[[o.vShow,$.expanded]])],8,KU))),128))])]),_:1})],512),[[o.vShow,h.value]]),o.withDirectives(o.createElementVNode("div",t9,[o.createElementVNode("div",r9,[L[8]||(L[8]=o.createElementVNode("span",null,"对象数量",-1)),o.createElementVNode("span",n9,o.toDisplayString(c.objectCount),1)]),o.createElementVNode("div",i9,[L[9]||(L[9]=o.createElementVNode("span",null,"属性集数量",-1)),o.createElementVNode("span",s9,o.toDisplayString(c.pSetsCount),1)]),o.createElementVNode("div",a9,[L[10]||(L[10]=o.createElementVNode("span",null,"创建日期",-1)),o.createElementVNode("span",o9,o.toDisplayString(c.createDate),1)]),o.createElementVNode("div",l9,[L[11]||(L[11]=o.createElementVNode("span",null,"作者",-1)),o.createElementVNode("span",u9,o.toDisplayString(c.author),1)])],512),[[o.vShow,!h.value]])])]),_:1},8,["pos"])):o.createCommentVNode("",!0),o.unref(Qt)("isMobile")?(o.openBlock(),o.createElementBlock("div",c9,[o.createElementVNode("div",d9,[L[13]||(L[13]=o.createElementVNode("div",{class:"detail-title"},"属性",-1)),o.createElementVNode("div",f9,[o.createVNode(j,{class:"close",width:.4,"size-type":"rem","click-handle":_})])]),o.createVNode(V,null,{default:o.withCtx(()=>[o.createElementVNode("div",h9,[o.withDirectives(o.createElementVNode("div",p9,[o.createVNode(V,{height:"6.12rem"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"basic_info",onClick:L[2]||(L[2]=$=>b(u))},[o.createElementVNode("div",A9,[o.createElementVNode("img",{src:w(u.expanded),class:"triangle"},null,8,m9),L[14]||(L[14]=o.createElementVNode("span",null,"基本属性",-1))]),o.withDirectives(o.createElementVNode("div",g9,[o.createElementVNode("div",v9,[L[15]||(L[15]=o.createElementVNode("span",{class:"content_title"},"名称",-1)),o.createElementVNode("span",y9,o.toDisplayString(u.entity_name),1)]),o.createElementVNode("div",b9,[L[16]||(L[16]=o.createElementVNode("span",{class:"content_title",style:{"margin-top":"0.04rem"}}," UUID ",-1)),o.createElementVNode("span",_9,o.toDisplayString(u.entity_id),1)]),o.createElementVNode("div",w9,[L[17]||(L[17]=o.createElementVNode("span",{class:"content_title"},"类型",-1)),o.createElementVNode("span",x9,o.toDisplayString(u.entity_type),1)])],512),[[o.vShow,u.expanded]])]),o.createElementVNode("ul",C9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(u.propertySets,($,X)=>(o.openBlock(),o.createElementBlock("li",{key:X,class:"propertyset",onClick:W=>b($)},[o.createElementVNode("div",E9,[o.createElementVNode("img",{src:w($.expanded),class:"triangle"},null,8,P9),o.createElementVNode("span",null,o.toDisplayString(o.unref(fu)($.name)),1)]),o.withDirectives(o.createElementVNode("div",S9,[o.createElementVNode("ul",k9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList($.properties,(W,D)=>(o.openBlock(),o.createElementBlock("li",{key:D,class:"properties"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(W,(z,M)=>(o.openBlock(),o.createElementBlock("div",{class:"title_value",key:M},[o.createElementVNode("span",M9,o.toDisplayString(o.unref(fu)(M)),1),o.createElementVNode("span",T9,o.toDisplayString(z),1)]))),128))]))),128))])],512),[[o.vShow,$.expanded]])],8,B9))),128))])]),_:1})],512),[[o.vShow,h.value]]),o.withDirectives(o.createElementVNode("div",I9,[o.createElementVNode("div",null,[L[18]||(L[18]=o.createElementVNode("span",null,"对象数量",-1)),o.createElementVNode("span",D9,o.toDisplayString(c.objectCount),1)]),o.createElementVNode("div",null,[L[19]||(L[19]=o.createElementVNode("span",null,"属性集数量",-1)),o.createElementVNode("span",F9,o.toDisplayString(c.pSetsCount),1)]),o.createElementVNode("div",null,[L[20]||(L[20]=o.createElementVNode("span",null,"创建日期",-1)),o.createElementVNode("span",R9,o.toDisplayString(c.createDate),1)]),o.createElementVNode("div",null,[L[21]||(L[21]=o.createElementVNode("span",null,"作者",-1)),o.createElementVNode("span",O9,o.toDisplayString(c.author),1)])],512),[[o.vShow,!h.value]])])]),_:1})])):o.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-18add1d0"]])},Symbol.toStringTag,{value:"Module"})),N9={class:"roam_container_wrapper"},j9={class:"mobile_roam-box"},V9={class:"roam-left"},U9={class:"roam-left-box"},H9={id:"roamMoveForward",class:"roam-left-item"},z9=["src"],G9={class:"roam-left-box"},Q9={id:"roamMoveBackward",class:"roam-left-item roam-left-bottom"},W9=["src"],$9={class:"speed_panel roam-left"},K9={class:"roam-left-item"},X9={class:"up_down_img"},Y9=["src"],J9={class:"speed_text"},Z9={class:"up_down_img"},q9=["src"],e7={class:"roam-right"},t7={id:"roamMoveUp",class:"roam-right-up"},r7=["src"],n7={class:"roam-right-center"},i7={id:"roamMoveLeft",class:"center-left"},s7=["src"],a7={class:"center-center"},o7=["src"],l7={id:"roamMoveRight",class:"center-right"},u7=["src"],c7={id:"roamMoveDown",class:"roam-right-down"},d7=["src"],f7=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"RoamTool",props:["componentId"],emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=o.ref("1"),S=o.ref(!1),v=o.ref(!0),f=I,h=G,d=o.ref(!1),l=V=>{h("emitHandler",V)},u=o.ref(Qt("isMobile"));o.onMounted(()=>{(Qt("isMobile")||Lr.INDUSTRY_CONFIGS.showRoam===!1)&&(v.value=!1),setTimeout(()=>{g(),_(),b(),w(),B(),k()},1e3),a.setReadyById(f.componentId)});const c=()=>{let V=window.bimViewer.eventTrigger;V.on("personModeSpeedUp",Q=>{C.value=Q.toString()}),V.on("personModeSpeedDown",Q=>{C.value=Q.toString()})};wr.on("BimViewer",c),o.onBeforeUnmount(()=>{wr.off("BimViewer",c)});const p=V=>{V?window.bimViewer.firstPersonMode.speedUp():window.bimViewer.firstPersonMode.speedDown()};So.INDUSTRY_CONFIGS.RoamTool||(wr.on("INDUSTRY_CONFIGS",()=>{Lr.INDUSTRY_CONFIGS.showRoam==!1&&(v.value=!1)}),So.INDUSTRY_CONFIGS.RoamTool=!0),o.watch(()=>a.isToolActive(f.componentId),V=>{A(!!V)});const A=V=>{Qt("isMobile")?d.value=V:(Qt("hideTool")||wr.emit("hideToolbar",V),V?v.value&&(S.value=!0):S.value=!1)},g=()=>{var V,Q,N;(V=document.getElementById("roamMoveUp"))==null||V.addEventListener(u.value?"touchstart":"mousedown",j=>{d.value&&(u.value&&j.preventDefault(),window.bimViewer.firstPersonMode.goUp=!0,T("goUp"))}),(Q=document.getElementById("roamMoveUp"))==null||Q.addEventListener(u.value?"touchend":"mouseup",()=>{d.value&&L()}),(N=document.getElementById("roamMoveUp"))==null||N.addEventListener(u.value?"touchcancel":"mouseup",()=>{d.value&&L()})},_=()=>{var V,Q,N;(V=document.getElementById("roamMoveDown"))==null||V.addEventListener(u.value?"touchstart":"mousedown",j=>{d.value&&(u.value&&j.preventDefault(),window.bimViewer.firstPersonMode.goDown=!0,T("goDown"))}),(Q=document.getElementById("roamMoveDown"))==null||Q.addEventListener(u.value?"touchend":"mouseup",()=>{d.value&&L()}),(N=document.getElementById("roamMoveDown"))==null||N.addEventListener(u.value?"touchcancel":"mouseup",()=>{d.value&&L()})},b=()=>{var V,Q,N;(V=document.getElementById("roamMoveLeft"))==null||V.addEventListener(u.value?"touchstart":"mousedown",j=>{d.value&&(u.value&&j.preventDefault(),window.bimViewer.firstPersonMode.goLeft=!0,T("goLeft"))}),(Q=document.getElementById("roamMoveLeft"))==null||Q.addEventListener(u.value?"touchend":"mouseup",()=>{d.value&&L()}),(N=document.getElementById("roamMoveLeft"))==null||N.addEventListener(u.value?"touchcancel":"mouseup",()=>{d.value&&L()})},w=()=>{var V,Q,N;(V=document.getElementById("roamMoveRight"))==null||V.addEventListener(u.value?"touchstart":"mousedown",j=>{d.value&&(u.value&&j.preventDefault(),window.bimViewer.firstPersonMode.goRight=!0,T("goDown"))}),(Q=document.getElementById("roamMoveRight"))==null||Q.addEventListener(u.value?"touchend":"mouseup",()=>{d.value&&L()}),(N=document.getElementById("roamMoveRight"))==null||N.addEventListener(u.value?"touchcancel":"mouseup",()=>{d.value&&L()})},B=()=>{var V,Q,N;(V=document.getElementById("roamMoveForward"))==null||V.addEventListener(u.value?"touchstart":"mousedown",j=>{d.value&&(u.value&&j.preventDefault(),window.bimViewer.firstPersonMode.goForward=!0,T("goForward"))}),(Q=document.getElementById("roamMoveForward"))==null||Q.addEventListener(u.value?"touchend":"mouseup",()=>{d.value&&L()}),(N=document.getElementById("roamMoveForward"))==null||N.addEventListener(u.value?"touchcancel":"mouseup",()=>{d.value&&L()})},k=()=>{var V,Q,N;(V=document.getElementById("roamMoveBackward"))==null||V.addEventListener(u.value?"touchstart":"mousedown",j=>{d.value&&(u.value&&j.preventDefault(),window.bimViewer.firstPersonMode.goBackward=!0,T("goBackward"))}),(Q=document.getElementById("roamMoveBackward"))==null||Q.addEventListener(u.value?"touchend":"mouseup",()=>{d.value&&L()}),(N=document.getElementById("roamMoveBackward"))==null||N.addEventListener(u.value?"touchcancel":"mouseup",()=>{d.value&&L()})},T=V=>{l({isTool:!0,event_target:"RoamTool",event_name:"",content:{roam:V}})},L=()=>{window.bimViewer.firstPersonMode.setdirectionChangeCancel(),l({isTool:!0,event_target:"RoamTool",event_name:"",content:{roam:"stop"}})};return(V,Q)=>(o.openBlock(),o.createElementBlock("div",N9,[o.createElementVNode("div",j9,[o.createElementVNode("div",V9,[o.createElementVNode("div",U9,[o.createElementVNode("div",H9,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/up.svg",alt:""},null,8,z9)])]),o.createElementVNode("div",G9,[o.createElementVNode("div",Q9,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/down.svg",alt:""},null,8,W9)])])]),o.createElementVNode("div",$9,[o.createElementVNode("div",K9,[o.createElementVNode("div",X9,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/plus.svg",onClick:Q[0]||(Q[0]=N=>p(!0)),alt:""},null,8,Y9)]),o.createElementVNode("div",J9,[o.createElementVNode("span",null,o.toDisplayString(C.value)+"X",1)]),o.createElementVNode("div",Z9,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/minus.svg",onClick:Q[1]||(Q[1]=N=>p(!1)),alt:""},null,8,q9)])])]),o.createElementVNode("div",e7,[o.createElementVNode("div",t7,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/top.svg",alt:""},null,8,r7)]),o.createElementVNode("div",n7,[o.createElementVNode("div",i7,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/left.svg",alt:""},null,8,s7)]),o.createElementVNode("div",a7,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/center.svg",alt:""},null,8,o7)]),o.createElementVNode("div",l7,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/right.svg",alt:""},null,8,u7)])]),o.createElementVNode("div",c7,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/bottom.svg",alt:""},null,8,d7)])])])]))}}),[["__scopeId","data-v-91e53e96"]])},Symbol.toStringTag,{value:"Module"})),h7={class:"xray_wrapper"},p7={class:"xray_content"},A7=["onClick"],m7=["src"],g7=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"XRayTool",props:["componentId"],emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I;o.onMounted(()=>{a.setReadyById(C.componentId)});const S=o.ref(0),v=()=>{const{eventTrigger:p}=window.bimViewer;Qt("isMobile")?p.on("touchEntity",A=>{!window.bimViewer.disableClickEvent||!a.isToolActiveBykey("xray")||f(A)}):p.on("pickedEntity",A=>{!window.bimViewer.disableClickEvent||!a.isToolActiveBykey("xray")||f(A)})};wr.on("BimViewer",v),o.onBeforeUnmount(()=>{wr.off("BimViewer",v)});const f=p=>{S.value!=-1&&(S.value==1?h(p):S.value==2?d(p):S.value==3&&l(p))},h=p=>{window.bimViewer.setEntityVisible(p)},d=p=>{window.bimViewer.setEntityHighlighted(p)},l=p=>{window.bimViewer.setEntitySelected(p)},u=()=>{window.bimViewer.setAllObjectsVisible(!0),window.bimViewer.setAllObjectsHighlighted(!1),window.bimViewer.setAllObjectsSelected(!1)},c=p=>{p==0?(S.value=p,u()):S.value=p};return(p,A)=>(o.openBlock(),o.createElementBlock("div",h7,[o.createElementVNode("div",p7,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref($V),(g,_)=>(o.openBlock(),o.createElementBlock("div",{key:_,class:o.normalizeClass(["button_",{button_active:S.value==g.id}]),onClick:b=>c(g.id)},[o.createElementVNode("img",{src:o.unref(Vt)+`/industry-viewer/xray-bar/${S.value==g.id?g.img_active:g.img}.svg`},null,8,m7),o.createElementVNode("span",{class:o.normalizeClass({active_text:S.value==g.id})},o.toDisplayString(g.name),3)],10,A7))),128))])]))}}),[["__scopeId","data-v-07847526"]])},Symbol.toStringTag,{value:"Module"})),v7={class:"mobile_measure_panel"},y7={class:"measure-list"},b7=["onClick"],_7={class:"measure-icon"},w7=["src"],x7={class:"measure-name"},C7={class:"measure-icon"},B7=["src"],E7={class:"mouse_btn"},P7=["src"],S7=["src"],k7=["src"],M7=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"MeasureTool",props:["componentId"],emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I,S=o.ref(0);o.onMounted(()=>{a.setReadyById(C.componentId),gr.currentTheme=="blue"?S.value=224:gr.currentTheme=="light-gray"&&(S.value=202)});let v,f,h,d;const l=o.ref(1),u=o.ref(),c=o.ref(),p=o.ref(),A=o.ref(),g=o.ref(),_=o.ref(),b=o.ref(),w=o.ref(),B=o.ref(1),k=o.ref("m"),T=o.ref(3),L=o.ref(!1),V=G,Q=ve=>{V("emitHandler",ve)},N=()=>{h=window.bimViewer,Ln.SaveViewerState({measure:"distance"}),f=window.bimViewer.measureAngleTool,v=window.bimViewer.measureDistanceTool,d=window.bimViewer.eventTrigger,Qt("isMobile")&&(d.on("newAngleMeasure",ve=>{L.value=!1}),d.on("newDistanceMeasure",ve=>{L.value=!1})),d.on("createAngleMeasure",ve=>{g.value=ve.id,A.value=ve.result,Qt("isMobile")&&(L.value=!0),j("createAngleMeasure",{newMeasure:ve})}),d.on("createDistanceMeasure",ve=>{u.value=ve.id,p.value=ve.id,c.value=ve.result,_.value=ve.xResult?ve.xResult:0,b.value=ve.yResult?ve.yResult:0,w.value=ve.zResult?ve.zResult:0,Qt("isMobile")&&(L.value=!0),j("createAngleMeasure",{newMeasure:ve})}),d.on("clickDistanceMeasure",ve=>{l.value==2&&$(lm[0]),u.value=ve.id,M(ve.id),Qt("isMobile")&&(L.value=!0),j("clickDistanceMeasure",{id:ve.id})}),d.on("clickAngleMeasure",ve=>{l.value==1&&$(lm[1]),D(ve.id),Qt("isMobile")&&(L.value=!0),j("clickAngleMeasure",{id:ve.id})}),v.precision=T.value,v.unit=k.value,v.scale=B.value};wr.on("BimViewer",N),o.onBeforeUnmount(()=>{wr.off("BimViewer",N)}),o.watch(()=>a.isToolActive(3),ve=>{O(ve)});const j=(ve,ue)=>{Q({isTool:!0,event_name:ve,event_target:"MeasureTool",content:ue})},$=ve=>{l.value!==ve.id&&(l.value=ve.id,Ln.SaveViewerState({measure:ve.code}),X(ve),Qt("isMobile")&&(L.value=!1))},X=ve=>{let ue=ve.code;window.bimViewer.measureTool.setActiveByType(ue,!0),Q({isTool:!0,event_name:"",event_target:"MeasureTool",content:{measureTool:ue}})},W=()=>{c.value="",A.value="",l.value===1?(R(p.value),j("destroyMeasureDistance",{id:p.value})):l.value===2&&(z(g.value),j("destroyMeasurementAngle",{id:p.value})),L.value=!1},D=ve=>{g.value=ve,A.value=f.getMeasureResultByID(ve)},z=ve=>f.destroyMeasurementById(ve),M=ve=>{p.value=ve,c.value=v.getMeasureResultByID(ve)},R=ve=>v.destroyMeasurementById(ve),O=ve=>{v.setAllVisible(ve),f.setAllVisible(ve)};o.onMounted(()=>{document.getElementById("top_bar")});const U=o.ref(!1);let F=!1,K=0,te=0,q=0,ie=0;const oe=o.ref(260),ce=o.ref(500),ee=()=>{U.value=!U.value,U.value?ae():Be()},he=ve=>{F?h.measureTool.currentTool.onSimulateMousedown([oe.value,ce.value]):ve.touches.length==1&&(K=ve.touches[0].clientX,te=ve.touches[0].clientY,F=!0)},ne=ve=>{if(ve.touches.length==1){const ue=ve.touches[0].clientX,Ae=ve.touches[0].clientY;q=ue-K,ie=Ae-te,oe.value+=q,ce.value+=ie;let P=new Int16Array(2);P[0]=oe.value+5,P[1]=ce.value+6,K=ue,te=Ae,h.measureTool.currentTool.onSimulateMousemove([oe.value,ce.value])}},re=ve=>{F&&h.measureTool.currentTool.onSimulateMouseup([oe.value,ce.value])},ae=()=>{const ve=document.getElementById("measure_mouseGroup");ve==null||ve.addEventListener("touchstart",he),ve==null||ve.addEventListener("touchmove",ne),ve==null||ve.addEventListener("touchend",re),oe.value=260,ce.value=500,K=0,te=0,q=0,ie=0,F=!1},Be=()=>{const ve=document.getElementById("measure_mouseGroup");ve==null||ve.removeEventListener("touchstart",he),ve==null||ve.removeEventListener("touchmove",ne),ve==null||ve.removeEventListener("touchend",re)};return(ve,ue)=>{var Ae,P;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",v7,[o.createElementVNode("div",y7,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(lm),ke=>(o.openBlock(),o.createElementBlock("div",{key:ke.id,class:o.normalizeClass(["measure-item",{"measure-item-active":l.value===ke.id}]),onClick:Ee=>$(ke)},[o.createElementVNode("div",_7,[o.createElementVNode("img",{src:o.unref(Vt)+`/industry-viewer/measure-bar/${l.value===ke.id?ke.svgActive:ke.svg}.svg`,alt:""},null,8,w7),o.createElementVNode("div",x7,o.toDisplayString(ke.name),1)])],10,b7))),128)),L.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"measure-item",onClick:W},[o.createElementVNode("div",C7,[o.createElementVNode("img",{src:o.unref(Vt)+"/industry-viewer/delete.svg",alt:""},null,8,B7),ue[0]||(ue[0]=o.createElementVNode("div",{class:"measure-name",style:{color:"#df1c1c"}}," 删除 ",-1))])])):o.createCommentVNode("",!0)]),o.createElementVNode("div",E7,[o.createElementVNode("div",{class:"mouse",onClick:ee},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/action-bar/${U.value?(Ae=o.unref(a).getToolById(15))==null?void 0:Ae.imgActive:(P=o.unref(a).getToolById(15))==null?void 0:P.img}.svg`},null,8,P7),o.createElementVNode("span",{style:o.normalizeStyle({color:U.value?"#1457F7":"#262626"})},"虚拟鼠标",4)])])]),o.withDirectives(o.createElementVNode("div",{id:"measure_mouseGroup",class:"mouse_group",style:o.normalizeStyle({left:`${oe.value}px`,top:`${ce.value}px`})},[o.createElementVNode("img",{id:"mouse_icon",class:"mouse_icon",src:`${o.unref(Vt)}/industry-viewer/mouse-icon.svg`},null,8,S7),o.createElementVNode("img",{id:"mouse_img",class:"mouse_img",src:`${o.unref(Vt)}/industry-viewer/mouse-active-large.svg`},null,8,k7)],4),[[o.vShow,U.value]])],64)}}}),[["__scopeId","data-v-c58f900a"]])},Symbol.toStringTag,{value:"Module"})),T7={class:"alert_wrapper"},I7={class:"alert_box_wrapper"},D7={class:"alert_box"},F7={class:"alert_img"},R7=["src"],O7={class:"alert_close"},pw=_n(o.defineComponent({__name:"alert",props:{panelTitle:{type:String,default:""},width:{type:Number,default:240},clickHandle:{type:Function,default:()=>{}}},setup(I){return(G,a)=>{const C=ys;return o.openBlock(),o.createElementBlock("div",T7,[o.createElementVNode("div",I7,[o.createElementVNode("div",D7,[o.createElementVNode("div",F7,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/alert_warning.png"},null,8,R7)]),a[0]||(a[0]=o.createElementVNode("div",{class:"alert_title"},"请先在模型上选择一个点",-1)),o.createElementVNode("div",O7,[o.createVNode(C,{"click-handle":I.clickHandle,width:18},null,8,["click-handle"])])])])])}}}),[["__scopeId","data-v-918afff2"]]),L7={class:"mobile_section_panel"},N7={class:"slicing-title-box"},j7={class:"slicing-title-icon"},V7={class:"slicing-content-box"},U7={class:"slicing-select-box"},H7={class:"select-item"},z7={class:"select-item-left"},G7=["src"],Q7=["src"],W7={class:"select-item-center"},$7={class:"item-center-top"},K7={class:"item-center-bottom"},X7={class:"select-item"},Y7={class:"select-item-left"},J7=["src"],Z7=["src"],q7={class:"select-item-center"},eH={class:"item-center-top"},tH={class:"item-center-bottom"},rH={class:"select-item"},nH={class:"select-item-left"},iH=["src"],sH=["src"],aH={class:"select-item-center"},oH={class:"item-center-top"},lH={class:"item-center-bottom"},uH=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"SectionTool",props:["componentId"],emits:["closePanel"],setup(I,{emit:G}){const a=Yn(),C=I,S=o.ref(0);o.onMounted(()=>{a.setReadyById(C.componentId),gr.currentTheme=="blue"?S.value=240:gr.currentTheme=="light-gray"&&(S.value=202),document.addEventListener("click",v)});const v=X=>{l.value&&X.target.id!="controlOperatePanel"&&u(!1)},f=o.ref(!0);o.ref(!1);const h=o.ref(),d=o.ref(),l=o.ref(!1),u=X=>{l.value=X};let c,p;const A=G;o.watch(()=>a.isToolActive(C.componentId),X=>{Qt("isMobile")&&(X?(T(B.value.direction),document.addEventListener("touchmove",b)):document.removeEventListener("touchmove",b))});let g=!1;const _=()=>{c=window.bimViewer.sectionTool,p=window.bimViewer.eventTrigger,Qt("isMobile")||p.on("createSection",X=>{$(),h.value=Object.keys(j()).map(W=>({id:W,isLook:!0,directionLeft:!0})),N(X.id,!0),d.value=X.id,Q(X.id)}),Qt("isMobile")&&(p.on("touchPlaneStart",()=>{g=!0}),p.on("touchPlaneEnd",()=>{g=!1}))};wr.on("BimViewer",_),o.onBeforeUnmount(()=>{wr.off("BimViewer",_),document.removeEventListener("click",v)});const b=()=>{g&&L()},w=o.ref({x:0,y:0,z:0}),B=o.ref({direction:"x"}),k=X=>{T(X)},T=X=>{switch(B.value.direction=X,X){case"x":window.bimViewer.sectionTool.sectionDirection=0,window.bimViewer.sectionTool.setControlPos(100-w.value.x);break;case"y":window.bimViewer.sectionTool.sectionDirection=1,window.bimViewer.sectionTool.setControlPos(w.value.y);break;case"z":window.bimViewer.sectionTool.sectionDirection=2,window.bimViewer.sectionTool.setControlPos(100-w.value.z);break}},L=()=>{switch(B.value.direction){case"x":w.value.x=100-window.bimViewer.sectionTool.getControlPos();break;case"y":w.value.y=window.bimViewer.sectionTool.getControlPos();break;case"z":w.value.z=100-window.bimViewer.sectionTool.getControlPos();break}},V=()=>{c.setActive(!1),A("closePanel")},Q=X=>{c.showSectionPlane(X)},N=(X,W)=>{for(let D=0;D<h.value.length;D++)X==h.value[D].id&&(h.value[D].isLook=W)},j=()=>c.getSectionPlanes(),$=()=>{c.hideControl()};return(X,W)=>{const D=ys,z=Q1,M=Vi,R=pw;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",L7,[o.createElementVNode("div",N7,[W[12]||(W[12]=o.createElementVNode("div",{class:"slicing-title"},"剖切",-1)),o.createElementVNode("div",j7,[o.createVNode(D,{width:.4,"size-type":"rem","click-handle":V})])]),o.createElementVNode("div",V7,[o.createVNode(M,null,{default:o.withCtx(()=>[o.createElementVNode("div",U7,[o.createElementVNode("div",H7,[o.createElementVNode("div",z7,[B.value.direction==="x"?(o.openBlock(),o.createElementBlock("img",{key:0,src:o.unref(Vt)+"/bim-viewer/section_look_icon.png",alt:"",onClick:W[0]||(W[0]=O=>k("x"))},null,8,G7)):(o.openBlock(),o.createElementBlock("img",{key:1,src:o.unref(Vt)+"/bim-viewer/section_unlook_icon.png",alt:"",onClick:W[1]||(W[1]=O=>k("x"))},null,8,Q7))]),o.createElementVNode("div",W7,[o.createElementVNode("div",$7,[W[13]||(W[13]=o.createElementVNode("div",null,"X轴",-1)),o.createElementVNode("div",null,o.toDisplayString(w.value.x)+" %",1)]),o.createElementVNode("div",K7,[o.createVNode(z,{modelValue:w.value.x,"onUpdate:modelValue":W[2]||(W[2]=O=>w.value.x=O),size:"large","show-tooltip":!1,onInput:W[3]||(W[3]=O=>T("x"))},null,8,["modelValue"])])])]),o.createElementVNode("div",X7,[o.createElementVNode("div",Y7,[B.value.direction==="y"?(o.openBlock(),o.createElementBlock("img",{key:0,src:o.unref(Vt)+"/bim-viewer/section_look_icon.png",alt:"",onClick:W[4]||(W[4]=O=>k("y"))},null,8,J7)):(o.openBlock(),o.createElementBlock("img",{key:1,src:o.unref(Vt)+"/bim-viewer/section_unlook_icon.png",alt:"",onClick:W[5]||(W[5]=O=>k("y"))},null,8,Z7))]),o.createElementVNode("div",q7,[o.createElementVNode("div",eH,[W[14]||(W[14]=o.createElementVNode("div",null,"Y轴",-1)),o.createElementVNode("div",null,o.toDisplayString(w.value.y)+" %",1)]),o.createElementVNode("div",tH,[o.createVNode(z,{modelValue:w.value.y,"onUpdate:modelValue":W[6]||(W[6]=O=>w.value.y=O),size:"large","show-tooltip":!1,onInput:W[7]||(W[7]=O=>T("y"))},null,8,["modelValue"])])])]),o.createElementVNode("div",rH,[o.createElementVNode("div",nH,[B.value.direction==="z"?(o.openBlock(),o.createElementBlock("img",{key:0,src:o.unref(Vt)+"/bim-viewer/section_look_icon.png",alt:"",onClick:W[8]||(W[8]=O=>k("z"))},null,8,iH)):(o.openBlock(),o.createElementBlock("img",{key:1,src:o.unref(Vt)+"/bim-viewer/section_unlook_icon.png",alt:"",onClick:W[9]||(W[9]=O=>k("z"))},null,8,sH))]),o.createElementVNode("div",aH,[o.createElementVNode("div",oH,[W[15]||(W[15]=o.createElementVNode("div",null,"Z轴",-1)),o.createElementVNode("div",null,o.toDisplayString(w.value.z)+" %",1)]),o.createElementVNode("div",lH,[o.createVNode(z,{modelValue:w.value.z,"onUpdate:modelValue":W[10]||(W[10]=O=>w.value.z=O),size:"large","show-tooltip":!1,onInput:W[11]||(W[11]=O=>T("z"))},null,8,["modelValue"])])])])])]),_:1})])]),o.withDirectives(o.createVNode(R,{"click-handle":()=>{f.value=!1}},null,8,["click-handle"]),[[o.vShow,f.value&&!o.unref(Qt)("isMobile")]])],64)}}}),[["__scopeId","data-v-8a834966"]])},Symbol.toStringTag,{value:"Module"})),cH={class:"comment_component"},dH={class:"mobile_comments_toolbar"},fH={class:"comment_toolbar"},hH={class:"comment-list"},pH=["onClick"],AH={class:"comment-icon"},mH=["src"],gH={class:"comment-name"},vH={class:"comment-icon"},yH=["src"],bH={key:0,class:"comment_create_text_box"},_H={class:"label-text-edit"},wH={class:"text-edit-head"},xH=["src"],CH={class:"text-edit-body"},BH={class:"text-edit-input"},EH=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"CommentTool",props:["componentId"],emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I;o.onMounted(()=>{a.setReadyById(C.componentId)});let S,v;const f=o.ref(0),h=o.ref(1),d=o.ref(1);o.ref(1),o.ref(fw);const l=o.ref(),u=o.ref(!1),c=o.ref(!1),p=o.ref(!1),A=o.ref(!1),g=o.ref(""),_=o.ref(),b=o.ref({show:!1,title:"标题",content:"内容",submitName:"确认",confirm:()=>{console.log("点击了确认"),b.value.show=!1},close:()=>{console.log("点击了关闭"),b.value.show=!1}}),w=()=>{S=window.bimViewer.commentTool,v=window.bimViewer.eventTrigger,Q(""),v.on("createNew",()=>{f.value=0,Q("")}),v.on("newState",()=>{u.value=!0,c.value=!1}),v.on("noPreviousState",()=>{u.value=!1}),v.on("noNewState",()=>{c.value=!1}),v.on("choseTarget",N=>{p.value=!0,f.value=0,Q("")})};wr.on("BimViewer",w),o.onBeforeUnmount(()=>{wr.off("BimViewer",w)}),o.watch(()=>a.isToolActive(C.componentId),N=>{var j;N?(f.value=1,Q("path"),setTimeout(()=>{var $;Qt("isMobile")&&(($=document.getElementById("svgImage"))==null||$.addEventListener("touchstart",B))},100)):Qt("isMobile")&&((j=document.getElementById("svgImage"))==null||j.removeEventListener("touchstart",B))});const B=N=>{N.target.tagName=="image"&&(f.value===5?(g.value="",_.value=N,A.value=!0):p.value=!1)},k=()=>{g.value?(S.clickCreateText(_.value,g.value),A.value=!1):T("请输入内容")},T=(N,j)=>{b.value={show:!0,title:"提示",content:N,submitName:"确定",confirm:()=>{console.log("点击了确认"),b.value.show=!1},close:()=>{console.log("点击了关闭"),b.value.show=!1}}},L=N=>{f.value===N.id&&(f.value=0),h.value=1,d.value=1,l.value=N.buttontype,f.value=N.id,Q(N.buttontype)},V=()=>{window.bimViewer.commentTool.deleteCurrentComments(),p.value=!1},Q=N=>{S.setCurrentMode(N)};return(N,j)=>{const $=Vi,X=ji;return o.openBlock(),o.createElementBlock("div",cH,[o.createElementVNode("div",{id:"comments_panel",class:"comments_panel",style:o.normalizeStyle({background:o.unref(Qt)("backgroundColor")})},null,4),o.createElementVNode("div",dH,[o.createElementVNode("div",fH,[o.createVNode($,null,{default:o.withCtx(()=>[o.createElementVNode("div",hH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(fw),(W,D)=>(o.openBlock(),o.createElementBlock("div",{key:D,class:o.normalizeClass(["comment-item",{"comment-item-active":f.value===W.id}]),onClick:z=>L(W)},[o.createElementVNode("div",AH,[o.createElementVNode("img",{src:o.unref(Vt)+`/industry-viewer/comment-bar/${f.value===W.id?W.svgActive:W.svg}.svg`},null,8,mH),o.createElementVNode("div",gH,o.toDisplayString(W.name),1)])],10,pH))),128)),p.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"comment-item",onClick:V},[o.createElementVNode("div",vH,[o.createElementVNode("img",{src:o.unref(Vt)+"/industry-viewer/delete.svg"},null,8,yH),j[2]||(j[2]=o.createElementVNode("div",{class:"comment-name",style:{color:"#df1c1c"}}," 删除 ",-1))])])):o.createCommentVNode("",!0)])]),_:1})])]),A.value?(o.openBlock(),o.createElementBlock("div",bH,[o.createElementVNode("div",_H,[o.createElementVNode("div",wH,[o.createElementVNode("img",{class:"text-edit-back",src:o.unref(Vt)+"/industry-viewer/back_gray.svg",onClick:j[0]||(j[0]=W=>A.value=!1)},null,8,xH),j[3]||(j[3]=o.createElementVNode("div",{class:"text-edit-title"},"创建文字批注",-1)),o.createElementVNode("div",{class:"text-edit-finish",onClick:k}," 完成 ")]),o.createElementVNode("div",CH,[o.createElementVNode("div",BH,[o.createVNode(X,{modelValue:g.value,"onUpdate:modelValue":j[1]||(j[1]=W=>g.value=W),type:"textarea",placeholder:"请输入文本内容",autosize:{minRows:2}},null,8,["modelValue"])])])])])):o.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-0b587a92"]])},Symbol.toStringTag,{value:"Module"})),PH={class:"annotation_component"},SH={class:"anno_toolList"},kH=["onClick"],MH={class:"item-img"},TH=["src"],IH={class:"item-name"},DH=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"AnnotationTool",props:["componentId"],emits:["uploadImage","clickAnnotation","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=G,S=k=>{C("emitHandler",k)};let v;const f=o.ref(!0),h=o.ref("");let d;const l=o.ref(),u=I;o.watch(()=>a.isToolActive(u.componentId),k=>{k||(h.value="")}),o.onMounted(()=>{l.value=Qt("annoLimit"),a.setReadyById(u.componentId)});const c={image:`${Vt}/BIMX_Website/main/mainView/function_icon/annotation_icons/image_active.png`,file:`${Vt}/BIMX_Website/main/mainView/function_icon/annotation_icons/file_active.png`,record:`${Vt}/BIMX_Website/main/mainView/function_icon/annotation_icons/record_active.png`,text:`${Vt}/BIMX_Website/main/mainView/function_icon/annotation_icons/text_active.png`,video:`${Vt}/BIMX_Website/main/mainView/function_icon/annotation_icons/video_active.png`},p=()=>{v=window.bimViewer.annotationTool,v.setTypeImage(c),d=window.bimViewer.eventTrigger,d.on("createAnnotation",k=>{S({isTool:!0,event_target:"AnnotationTool",event_name:"createAnnotation",content:{currentAnnotation:k}})}),d.on("markerClicked",k=>{S({isTool:!0,event_target:"AnnotationTool",event_name:"clickAnnotation",content:{targetAnno:k}})}),Qt("isMobile")||d.on("requestDeleteMarker",k=>{S({isTool:!0,event_target:"AnnotationTool",event_name:"requestDelAnno",content:{msg:"请求删除指定标注",annoId:k}})})};wr.on("BimViewer",p);const A=k=>{_(g(k.type))};wr.on("setAnnoStatus",A),o.onBeforeUnmount(()=>{wr.off("BimViewer",p),wr.off("setAnnoStatus",A)});const g=k=>{if(k==="image")return du[0];if(k==="record")return du[1];if(k==="video")return du[2];if(k==="file")return du[3];if(k==="text")return du[4]},_=k=>{h.value===k.code?(h.value="",w(k,!1)):(h.value=k.code,w(k,!0))},b=k=>{window.bimViewer.annotationTool.setEnabled(k)},w=(k,T)=>{b(T),B(k.code,T)},B=(k,T)=>{window.bimViewer.annotationTool.setCurrentType(k),S({isTool:!0,event_target:"AnnotationTool",event_name:"clickAnnoTool",content:{active:T,tool_type:k}})};return(k,T)=>{const L=pw;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",PH,[o.createElementVNode("div",SH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(du),(V,Q)=>(o.openBlock(),o.createElementBlock("div",{key:Q,class:o.normalizeClass(["label-item",{"label-item-active":h.value===V.code}]),onClick:N=>_(V)},[o.createElementVNode("div",MH,[o.createElementVNode("img",{class:"label-item-img",src:o.unref(Vt)+`/industry-viewer/annotation-bar/${h.value===V.code?V.imgActive:V.img}.svg`,alt:""},null,8,TH),o.createElementVNode("div",IH,o.toDisplayString(V.name),1)])],10,kH))),128))])]),o.withDirectives(o.createVNode(L,{"click-handle":()=>{f.value=!1}},null,8,["click-handle"]),[[o.vShow,f.value]])],64)}}}),[["__scopeId","data-v-6962f253"]])},Symbol.toStringTag,{value:"Module"})),FH={class:"wrapper"},RH={class:"screen_thumbnail"},OH=["src"],LH={class:"validity-period"},NH={key:0,class:"custom"},jH=Object.freeze(Object.defineProperty({__proto__:null,default:o.defineComponent({__name:"ScreenShotTool",props:["componentId"],emits:["closePanel"],setup(I,{emit:G}){const a=Yn(),C=I,S=o.ref(0),v=o.ref(),f=o.ref(),h=o.ref(),d=G;o.onMounted(()=>{v.value=1280,f.value=720,a.setReadyById(C.componentId)}),o.watch(()=>a.isToolActive(C.componentId),A=>{A&&c(220,124,!1)});const l=A=>{S.value=A,A!==3&&(v.value=um[A].width,f.value=um[A].height)},u=()=>{d("closePanel")},c=(A,g,_)=>{const b=document.getElementById("myCanvas"),w=document.createElement("a");w.download="screenshot.png";const B=document.createElement("canvas"),k=B.getContext("2d");if(b&&k){B.width=A,B.height=g;const T=A/b.width,L=g/b.height,V=Math.max(T,L),Q=b.width*V,N=b.height*V,j=(A-Q)/2,$=(g-N)/2;k.clearRect(0,0,A,g),k.fillStyle="transparent",k.fillRect(0,0,A,g),k.drawImage(b,0,0,b.width,b.height,j,$,Q,N),_?B.toBlob(function(X){const W=URL.createObjectURL(X);w.href=W,w.click(),URL.revokeObjectURL(W)}):h.value=B.toDataURL("image/png")}},p=()=>{c(v.value,f.value,!0)};return(A,g)=>{const _=XR,b=YR,w=ji,B=Sf;return o.openBlock(),o.createBlock(B,{class:"screen_container",width:240,panelTitle:"截图","click-handle":u},{default:o.withCtx(()=>[o.createElementVNode("div",FH,[o.createElementVNode("div",RH,[o.createElementVNode("img",{class:"thumbnail_img",src:h.value,alt:""},null,8,OH)]),o.createVNode(b,{modelValue:S.value,"onUpdate:modelValue":g[0]||(g[0]=k=>S.value=k),onChange:l},{default:o.withCtx(()=>[o.createElementVNode("div",LH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(um),k=>(o.openBlock(),o.createElementBlock("div",{key:k.id,class:"period_box"},[o.createVNode(_,{label:k.id},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(k.name),1)]),_:2},1032,["label"])]))),128))])]),_:1},8,["modelValue"]),S.value===3?(o.openBlock(),o.createElementBlock("div",NH,[o.createVNode(w,{modelValue:v.value,"onUpdate:modelValue":g[1]||(g[1]=k=>v.value=k),placeholder:"请输入长度"},null,8,["modelValue"]),g[3]||(g[3]=o.createTextVNode(" x ")),o.createVNode(w,{modelValue:f.value,"onUpdate:modelValue":g[2]||(g[2]=k=>f.value=k),placeholder:"请输入宽度"},null,8,["modelValue"])])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"footer"},[o.createElementVNode("div",{class:"btn1",onClick:u}," 取消 "),o.createElementVNode("div",{class:"btn2",onClick:p}," 保存 ")])])]),_:1})}}})},Symbol.toStringTag,{value:"Module"}));class VH{constructor(G){Fn(this,"duration");Fn(this,"active");Fn(this,"remainingTime");Fn(this,"timerInterval");this.duration=G,this.remainingTime=G,this.active=!1}start(G){this.active&&(this.remainingTime=this.duration,clearInterval(this.timerInterval)),this.active=!0;const a=()=>{if(this.remainingTime<=0){clearInterval(this.timerInterval),this.active=!1,this.remainingTime=this.duration,G();return}this.remainingTime-=1};this.timerInterval=setInterval(a,1e3)}stop(){this.active&&(clearInterval(this.timerInterval),this.active=!1)}}const UH={style:{height:"var(--setting-content-height)"}},HH={key:0,class:"color-list"},zH=["onClick"],GH={class:"setting-effect"},QH={class:"setting-effect"},WH={class:"light-slider"},$H={key:1,class:"setting-title"},KH={key:2,class:"setting-effect"},XH={class:"setting-effect"},YH={class:"setting-effect"},JH={class:"setting-effect"},ZH={class:"setting-effect"},qH={class:"setting-effect"},ez={class:"setting-effect"},tz={class:"setting_panel"},rz={class:"setting-title-box"},nz={class:"setting-title-icon"},iz={class:"setting-color-box"},sz={class:"setting-color-list"},az=["onClick"],oz={class:"setting-config-box"},lz={class:"setting-switch-item"},uz={class:"setting-switch-item"},cz={class:"light-slider"},dz={class:"setting-switch-item"},fz={class:"setting-switch-item"},hz={class:"setting-switch-item"},pz={class:"setting-switch-item"},Az={class:"setting-switch-item"},mz={class:"setting-switch-item"},gz={class:"setting-switch-item"},vz={class:"speed-slider"},yz=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"SettingTool",props:{instruction:{},componentId:{}},emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I,S=o.ref(0);o.onMounted(()=>{a.setReadyById(C.componentId),gr.currentTheme=="blue"?S.value=240:gr.currentTheme=="light-gray"&&(S.value=202)});let v;const f=o.ref(!1),h=o.ref(!1),d=o.ref(!1),l=o.ref(!1),u=o.ref(!1),c=o.ref(!0),p=o.ref(!1),A=o.ref(!1),g=o.ref(1),_=o.ref(50),b=o.ref(!1),w=new VH(5);o.watch(()=>a.isToolActive(C.componentId),ce=>{ce===!1&&(w.stop(),b.value&&j())});const B=o.ref(50),k=o.ref(["亮"]),T=o.ref(["亮","暗"]),L=o.ref("linear-gradient(180deg, #fffefb 0%, #daebff 100%)"),V=G,Q=()=>{v=window.bimViewer,v.viewer.scene.on("aabb",()=>{te(p.value),q(k.value[0])})},N=()=>{b.value=!0,w.start(()=>{j()})},j=()=>{var ee,he;let ce;Qt("isMobile")?ce={backgroundColor:((ee=cu.find(ne=>ne.id==g.value))==null?void 0:ee.name)??"渐变蓝",showEdges:d.value,lightIntensity:_.value,skyBox:l.value,orthoMode:u.value,modelType2D:c.value,yAxisDown:f.value,zAxisUp:h.value,showSpace:p.value,spaceEffect:k.value[0],touchDollySpeed:B.value}:ce={backgroundColor:((he=cu.find(ne=>ne.id==g.value))==null?void 0:he.name)??"渐变蓝",showEdges:d.value,lightIntensity:_.value,skyBox:l.value,orthoMode:u.value,modelType2D:c.value,yAxisDown:f.value,zAxisUp:h.value,showSpace:p.value,spaceEffect:k.value[0]},X({isTool:!0,event_target:"SettingTool",event_name:"saveSetting",content:{newSets:ce}}),b.value=!1},$=ce=>{const ee=ce.lastSet,he=cu.find(ne=>ne.name==ee.backgroundColor);g.value=he?he.id:1,R(he??cu[0]),d.value=ee.showEdges,U(d.value),_.value=ee.lightIntensity,O(_.value),u.value=ee.orthoMode,K(u.value),c.value=ee.modelType2D,F(c.value),p.value=ee.showSpace,te(p.value),k.value=[ee.spaceEffect],q(k.value[0]),f.value=ee.yAxisDown,f.value&&M(),h.value=ee.zAxisUp,h.value&&z(),Qt("isMobile")?(B.value=ee.touchDollySpeed,oe(B.value)):(l.value=ee.skyBox,ie(l.value)),b.value=!1};wr.on("BimViewer",Q),wr.on("lastSetsContent",$),o.onBeforeUnmount(()=>{wr.off("BimViewer",Q),wr.off("lastSetsContent",$)});const X=ce=>{V("emitHandler",ce)},W=ce=>{ce&&ce.target.id!="setting_back"||(V("closePanel"),D(!1))},D=(ce=!A.value)=>{A.value=ce},z=ce=>{N(),window.bimViewer.setWorldAxisZUp(h.value),K(u.value)},M=ce=>{N(),window.bimViewer.setWorldAxisYDown(f.value),K(u.value)},R=ce=>{N(),g.value=ce.id,L.value=ce.color,wr.emit("changeBackgroundColor",ce.color)},O=ce=>{N(),v.setLightIntensity(ce)},U=ce=>{N(),v.setAllObjectsEdges(ce),ce||v.setObjectsEdges(Ln.entityState.edgesObjectIds,!0)},F=ce=>{N(),v.SetThreeDModeActive(ce),Qt("isMobile")&&(window.bimViewer.navCubeMode.visible=!1)},K=ce=>{N(),v.SetOrthoModeActive(ce)},te=ce=>{N(),v.SetShowSpaceModeActive(ce)},q=ce=>{N(),ce=="亮"?window.bimViewer.setSpaceMaterialColor(1):window.bimViewer.setSpaceMaterialColor(2),k.value=T.value.includes(ce)?[ce]:[]},ie=ce=>{N(),v.SetSkyBoxToolActive(ce)},oe=ce=>{N(),ce==0?v.viewer.cameraControl.customTouchDollyRate=.05/50:v.viewer.cameraControl.customTouchDollyRate=ce/50};return(ce,ee)=>{const he=rN,ne=Q1,re=NA,ae=m1,Be=Vi,ve=Sf,ue=ys,Ae=o.resolveComponent("SuccessFilled"),P=tn;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.unref(Qt)("isMobile")?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(ve,{key:0,class:"setting_contaier",width:S.value,panelTitle:"设置","click-handle":W,style:{height:"var(--setting-panel-height)"}},{default:o.withCtx(()=>[o.createElementVNode("div",UH,[o.createVNode(Be,null,{default:o.withCtx(()=>[ee[45]||(ee[45]=o.createElementVNode("div",{class:"setting-title"},"效果",-1)),o.createElementVNode("div",{class:"setting-effect",onClick:ee[0]||(ee[0]=ke=>D())},[ee[35]||(ee[35]=o.createTextVNode(" 背景颜色 ")),o.createElementVNode("div",{class:"choose-color",style:o.normalizeStyle({background:L.value})},null,4)]),A.value?(o.openBlock(),o.createElementBlock("div",HH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(cu),ke=>(o.openBlock(),o.createElementBlock("div",{key:ke.id,class:o.normalizeClass(["color-item",{"color-item-active":g.value===ke.id}]),onClick:Ee=>R(ke)},[o.createElementVNode("div",{class:"bg",style:o.normalizeStyle({background:ke.color,border:ke.id===4?"1px solid #F1F1F1":"none"})},null,4),o.createTextVNode(" "+o.toDisplayString(ke.name),1)],10,zH))),128))])):o.createCommentVNode("",!0),o.createElementVNode("div",GH,[ee[36]||(ee[36]=o.createTextVNode(" 显示边缘 ")),o.createVNode(he,{modelValue:d.value,"onUpdate:modelValue":ee[1]||(ee[1]=ke=>d.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[2]||(ee[2]=ke=>U())},null,8,["modelValue"])]),o.createElementVNode("div",QH,[ee[37]||(ee[37]=o.createTextVNode(" 光源强度 ")),o.createElementVNode("div",WH,[o.createVNode(ne,{modelValue:_.value,"onUpdate:modelValue":ee[3]||(ee[3]=ke=>_.value=ke),onInput:ee[4]||(ee[4]=ke=>O(_.value))},null,8,["modelValue"])])]),o.unref(Qt)("skyboxImg")?(o.openBlock(),o.createElementBlock("div",$H," 外观模式 ")):o.createCommentVNode("",!0),o.unref(Qt)("skyboxImg")?(o.openBlock(),o.createElementBlock("div",KH,[ee[38]||(ee[38]=o.createTextVNode(" 天空盒 ")),o.createVNode(he,{modelValue:l.value,"onUpdate:modelValue":ee[5]||(ee[5]=ke=>l.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[6]||(ee[6]=ke=>ie())},null,8,["modelValue"])])):o.createCommentVNode("",!0),ee[46]||(ee[46]=o.createElementVNode("div",{class:"setting-title"},"模型视角切换",-1)),o.createElementVNode("div",XH,[ee[39]||(ee[39]=o.createTextVNode(" 透视/正交 ")),o.createVNode(he,{modelValue:u.value,"onUpdate:modelValue":ee[7]||(ee[7]=ke=>u.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[8]||(ee[8]=ke=>K())},null,8,["modelValue"])]),o.createElementVNode("div",YH,[ee[40]||(ee[40]=o.createTextVNode(" 2D/3D ")),o.createVNode(he,{modelValue:c.value,"onUpdate:modelValue":ee[9]||(ee[9]=ke=>c.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[10]||(ee[10]=ke=>F())},null,8,["modelValue"])]),o.createElementVNode("div",JH,[ee[41]||(ee[41]=o.createElementVNode("div",null,"模型倒置",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:f.value,"onUpdate:modelValue":ee[11]||(ee[11]=ke=>f.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[12]||(ee[12]=ke=>M())},null,8,["modelValue"])])]),o.createElementVNode("div",ZH,[ee[42]||(ee[42]=o.createElementVNode("div",null,"Z轴向上",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:h.value,"onUpdate:modelValue":ee[13]||(ee[13]=ke=>h.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[14]||(ee[14]=ke=>z())},null,8,["modelValue"])])]),o.createElementVNode("div",qH,[ee[43]||(ee[43]=o.createTextVNode(" 显示模型空间 ")),o.createVNode(he,{modelValue:p.value,"onUpdate:modelValue":ee[15]||(ee[15]=ke=>p.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[16]||(ee[16]=ke=>te())},null,8,["modelValue"])]),o.createElementVNode("div",ez,[ee[44]||(ee[44]=o.createTextVNode(" 空间效果 ")),o.createVNode(ae,{modelValue:k.value,"onUpdate:modelValue":ee[17]||(ee[17]=ke=>k.value=ke),size:"small"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(T.value,ke=>(o.openBlock(),o.createBlock(re,{key:ke,label:ke,onChange:Ee=>q(ke)},null,8,["label","onChange"]))),128))]),_:1},8,["modelValue"])])]),_:1})])]),_:1},8,["width"])),o.unref(Qt)("isMobile")?(o.openBlock(),o.createElementBlock("div",{key:1,id:"setting_back",class:"setting_back",onClick:W},[o.createElementVNode("div",tz,[o.createElementVNode("div",rz,[ee[47]||(ee[47]=o.createElementVNode("div",{class:"setting-title"},"设置",-1)),o.createElementVNode("div",nz,[o.createVNode(ue,{width:.4,"size-type":"rem","click-handle":W})])]),o.createElementVNode("div",iz,[o.createElementVNode("div",sz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(cu),(ke,Ee)=>(o.openBlock(),o.createElementBlock("div",{key:Ee,class:o.normalizeClass(["setting-color-item",{"setting-color-item-active":g.value===ke.id}]),onClick:pe=>R(ke)},[o.createElementVNode("div",{class:"setting-color-icon",style:o.normalizeStyle({background:ke.color,border:ke.id===g.value?"0.02rem solid #0065FC":""})},null,4),o.createElementVNode("div",{class:"setting-color-name",style:o.normalizeStyle({color:ke.id===g.value?"#0065FC":""})},[o.createTextVNode(o.toDisplayString(ke.name)+" ",1),ke.id===g.value?(o.openBlock(),o.createBlock(P,{key:0,color:"#0065fc",size:"0.24rem"},{default:o.withCtx(()=>[o.createVNode(Ae)]),_:1})):o.createCommentVNode("",!0)],4)],10,az))),128))])]),o.createElementVNode("div",oz,[o.createVNode(Be,{height:"188"},{default:o.withCtx(()=>[o.createElementVNode("div",lz,[ee[48]||(ee[48]=o.createElementVNode("div",null,"显示边缘",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:d.value,"onUpdate:modelValue":ee[18]||(ee[18]=ke=>d.value=ke),size:"large",onChange:ee[19]||(ee[19]=ke=>U())},null,8,["modelValue"])])]),o.createElementVNode("div",uz,[ee[49]||(ee[49]=o.createElementVNode("div",null,"光源强度",-1)),o.createElementVNode("div",cz,[o.createVNode(ne,{modelValue:_.value,"onUpdate:modelValue":ee[20]||(ee[20]=ke=>_.value=ke),onInput:ee[21]||(ee[21]=ke=>O(_.value))},null,8,["modelValue"])])]),o.createElementVNode("div",dz,[ee[50]||(ee[50]=o.createElementVNode("div",null,"透视/正交",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:u.value,"onUpdate:modelValue":ee[22]||(ee[22]=ke=>u.value=ke),size:"large",onChange:ee[23]||(ee[23]=ke=>K())},null,8,["modelValue"])])]),o.createElementVNode("div",fz,[ee[51]||(ee[51]=o.createElementVNode("div",null,"2D/3D",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:c.value,"onUpdate:modelValue":ee[24]||(ee[24]=ke=>c.value=ke),size:"large",onChange:ee[25]||(ee[25]=ke=>F())},null,8,["modelValue"])])]),o.createElementVNode("div",hz,[ee[52]||(ee[52]=o.createElementVNode("div",null,"模型倒置",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:f.value,"onUpdate:modelValue":ee[26]||(ee[26]=ke=>f.value=ke),size:"large",onChange:ee[27]||(ee[27]=ke=>M())},null,8,["modelValue"])])]),o.createElementVNode("div",pz,[ee[53]||(ee[53]=o.createElementVNode("div",null,"Z轴向上",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:h.value,"onUpdate:modelValue":ee[28]||(ee[28]=ke=>h.value=ke),size:"large",onChange:ee[29]||(ee[29]=ke=>z())},null,8,["modelValue"])])]),o.createElementVNode("div",Az,[ee[54]||(ee[54]=o.createElementVNode("div",null,"显示模型空间",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:p.value,"onUpdate:modelValue":ee[30]||(ee[30]=ke=>p.value=ke),size:"large",onChange:ee[31]||(ee[31]=ke=>te())},null,8,["modelValue"])])]),o.createElementVNode("div",mz,[ee[55]||(ee[55]=o.createElementVNode("div",null,"空间效果",-1)),o.createVNode(ae,{modelValue:k.value,"onUpdate:modelValue":ee[32]||(ee[32]=ke=>k.value=ke)},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(T.value,ke=>(o.openBlock(),o.createBlock(re,{key:ke,label:ke,onChange:Ee=>q(ke)},null,8,["label","onChange"]))),128))]),_:1},8,["modelValue"])]),o.createElementVNode("div",gz,[ee[56]||(ee[56]=o.createElementVNode("div",null,"缩放速率",-1)),o.createElementVNode("div",vz,[o.createVNode(ne,{modelValue:B.value,"onUpdate:modelValue":ee[33]||(ee[33]=ke=>B.value=ke),onInput:ee[34]||(ee[34]=ke=>oe(B.value))},null,8,["modelValue"])])])]),_:1})])])])):o.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-281730f0"]])},Symbol.toStringTag,{value:"Module"})),bz={class:"best-view-box"},_z={class:"best-view-list"},wz=["onClick"],xz={class:"best-view-icon"},Cz=["src"],Bz={class:"best-view-name"},Ez=Object.freeze(Object.defineProperty({__proto__:null,default:o.defineComponent({__name:"NavigateTool",props:["componentId"],emits:["emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I;o.onMounted(()=>{a.setReadyById(C.componentId)});const S=G,v=d=>{S("emitHandler",d)},f=o.ref(),h=d=>{if(d.id===f.value){f.value="";return}f.value=d.id,window.bimViewer.setDirection(d.dir_num),v({isTool:!0,event_target:"NavigateTool",event_name:"changeNav",content:{direction:d.dir_num}})};return(d,l)=>(o.openBlock(),o.createElementBlock("div",bz,[o.createElementVNode("div",_z,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(WV),u=>(o.openBlock(),o.createElementBlock("div",{key:u.id,class:o.normalizeClass(["best-view-item",{"best-view-item-active":f.value===u.id}]),onClick:c=>h(u)},[o.createElementVNode("div",xz,[o.createElementVNode("img",{src:o.unref(Vt)+`/bim-viewer/best-view/${f.value===u.id?u.imgActive:u.img}.svg`,alt:""},null,8,Cz),o.createElementVNode("div",Bz,o.toDisplayString(u.name),1)])],10,wz))),128))])]))}})},Symbol.toStringTag,{value:"Module"})),Pz={class:"tall_panel_content"},Sz={class:"panel_top"},kz={class:"panel_header_left"},Mz=["src"],Tz={class:"panel_close"},Iz={class:"panel_content"},Dz={key:0,class:"width-set",id:"lineWidthSet2"},Fz=_n(o.defineComponent({__name:"tallPanel_noPos",props:{panelTitle:{type:String,default:""},width:{type:Number,default:398},clickHandle:{type:Function,default:()=>{}},pos:{type:String,default:"left"},setWidth:{type:Boolean,default:!1},head:{type:Boolean,default:!0}},emits:["refresh"],setup(I,{emit:G}){Yn();const a=G,C=I;o.watch(()=>C.head,u=>{u?gr.setProperty("--panel-top-height","40px"):gr.setProperty("--panel-top-height","0px")});const S=o.ref(),v=o.ref(C.width);o.onMounted(()=>{C.pos=="left"&&(S.value.style.left=`${0+Qt("leftWidth")}px`),C.pos=="right"&&(S.value.style.right=`${0+Qt("rightWidth")}px`),S.value.style.top=`${0+Qt("topHeight")}px`,S.value.style.bottom=`${0+Qt("bottomHeight")}px`});const f=()=>{a("refresh")};let h,d=0,l=0;return document.addEventListener("mousedown",u=>{var c;((c=u.target)==null?void 0:c.id)=="lineWidthSet2"&&(h=!0,d=u.x)}),document.addEventListener("mousemove",u=>{h&&(l=u.x-d,d=u.x,v.value+=l,v.value<398&&(v.value=398),gr.setProperty("--tall-panel-outside-width",`${v.value}px`))}),document.addEventListener("mouseup",u=>{h=!1}),(u,c)=>{const p=ys;return o.openBlock(),o.createElementBlock("div",{ref_key:"tallPanelWrapper",ref:S,class:"tall_panel_wrapper",id:"tall_panel_wrapper",style:o.normalizeStyle({width:v.value.toString()+"px"})},[o.createElementVNode("div",Pz,[o.withDirectives(o.createElementVNode("div",Sz,[o.createElementVNode("div",kz,[o.createElementVNode("span",null,o.toDisplayString(I.panelTitle),1),o.createElementVNode("div",{class:"refresh",onClick:f},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/refresh_dark_gray.png"},null,8,Mz)])]),o.createElementVNode("div",Tz,[o.createVNode(p,{width:18,"click-handle":I.clickHandle,light:o.unref(gr).currentTheme=="blue",dark:o.unref(gr).currentTheme=="light-gray"},null,8,["click-handle","light","dark"])])],512),[[o.vShow,C.head]]),o.createElementVNode("div",Iz,[o.renderSlot(u.$slots,"default",{},void 0,!0)])]),I.setWidth?(o.openBlock(),o.createElementBlock("div",Dz,c[0]||(c[0]=[o.createElementVNode("div",{class:"set-line"},null,-1)]))):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-e1bfe9ee"]]),Rz=["src"],Oz=_n(o.defineComponent({__name:"imageZoomIn",props:{imgContent:{}},emits:["closeImg"],setup(I,{emit:G}){const a=G,C=I,S=o.ref(C.imgContent),v=()=>{a("closeImg")};return(f,h)=>(o.openBlock(),o.createElementBlock("div",{class:"image_zoomin_wrapper",onClick:v},[o.createElementVNode("div",{class:"img_wrapper",onClick:v},[o.createElementVNode("img",{src:S.value},null,8,Rz)])]))}}),[["__scopeId","data-v-6ec4d410"]]),Lz={class:"check_object_panel"},Nz={class:"check_page_title"},jz=["src"],Vz={class:"close"},Uz={class:"check_object_wrapper"},Hz={class:"wrapper"},zz=["onClick"],Gz=_n(o.defineComponent({__name:"checkObjectPanel",props:{entityList:{}},emits:["closePanel","closeCheck"],setup(I,{emit:G}){const a=G,C=f=>{window.bimViewer.setAllObjectsSelected(!1),window.bimViewer.flyToObject(f,()=>{window.bimViewer.setObjectsSelected([f],!0)})},S=()=>{a("closeCheck")},v=()=>{S(),a("closePanel")};return(f,h)=>{const d=ys,l=Vi;return o.openBlock(),o.createElementBlock("div",Lz,[o.createElementVNode("div",Nz,[o.createElementVNode("div",{class:"back",onClick:S},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/back.png"},null,8,jz),h[0]||(h[0]=o.createElementVNode("span",null,"查看元素",-1))]),o.createElementVNode("div",Vz,[o.createVNode(d,{width:18,clickHandle:v})])]),o.createElementVNode("div",Uz,[o.createElementVNode("div",Hz,[o.createVNode(l,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.entityList,(u,c)=>(o.openBlock(),o.createElementBlock("div",{key:c,class:"objects"},[o.createElementVNode("div",{class:o.normalizeClass(c%2==1?"entity":"entity_1"),onClick:p=>C(u)},[o.createElementVNode("span",null,o.toDisplayString(u),1)],10,zz)]))),128))]),_:1})])])])}}}),[["__scopeId","data-v-2b161b61"]]),Qz={class:"new_comment"},Wz={class:"comment_input"},$z={key:0,class:"snapshot_list"},Kz={class:"comment_submit"},Xz={class:"opt-left"},Yz=["src"],Jz={class:"opt-right"},Aw=_n(o.defineComponent({__name:"commentInput",props:{userId:{},commentGuid:{},oldComment:{},mode:{},snapshotList:{}},emits:["submitComment","updateComment","cancel","addViewPoint"],setup(I,{emit:G}){const a=G,C=I,{userId:S,mode:v}=C,f=o.ref(C.oldComment?C.oldComment:""),h=o.ref([]);o.watch(()=>C.snapshotList,A=>{h.value=A||[]},{immediate:!0});const d=()=>{const A={guid:window.bimViewer.bcfTool.getNewGuid(),author:Tn.getStaffName(S),date:new Date().toISOString(),comment:f.value,snapshotList:h.value};a("submitComment",A)},l=()=>{a("updateComment",C.commentGuid,f.value,h.value)},u=()=>{a("cancel")},c=()=>{const A=window.bimViewer.bcfTool.getBCFView();let g=h.value.length;h.value.push({guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:A,index:g})},p=A=>{h.value.splice(A,1)};return(A,g)=>{const _=ji,b=vl;return o.openBlock(),o.createElementBlock("div",Qz,[o.createElementVNode("div",Wz,[o.createElementVNode("div",{class:"camera-comment",style:o.normalizeStyle({backgroundColor:o.unref(v)=="add"?"#F9F9F9":"#fff"})},[o.createVNode(_,{modelValue:f.value,"onUpdate:modelValue":g[0]||(g[0]=w=>f.value=w),class:"comment-el-input",type:"textarea",placeholder:"请输入评论内容 ~"},null,8,["modelValue"])],4),h.value.length>0?(o.openBlock(),o.createElementBlock("div",$z,[o.createVNode(b,{ref:"imageViewRef","snapshot-list":h.value,"edit-enable":!0,onDeleteView:p},null,8,["snapshot-list"])])):o.createCommentVNode("",!0)]),o.createElementVNode("div",Kz,[o.createElementVNode("div",Xz,[h.value.length==0?(o.openBlock(),o.createElementBlock("img",{key:0,class:"img",src:o.unref(Vt)+"/bim-viewer/bcf-images/camera_gray.png",onClick:c},null,8,Yz)):o.createCommentVNode("",!0)]),o.createElementVNode("div",Jz,[o.createElementVNode("span",{onClick:u},"取消"),o.createElementVNode("div",{class:"submit_button",onClick:g[1]||(g[1]=w=>o.unref(v)=="add"?d():l())}," 提交 ")])])])}}}),[["__scopeId","data-v-c9526bba"]]),Zz={class:"comment_content"},qz={class:"title"},eG=["src"],tG={class:"comments_list"},rG={key:0,class:"empty"},nG={key:1,class:"comments"},iG={class:"comment_info"},sG={class:"author_info"},aG=["src"],oG={class:"author_time"},lG={class:"author"},uG={class:"time"},cG={key:0,class:"more"},dG=["src"],fG={class:"edit_panel"},hG=["onClick"],pG=["onClick"],AG={key:0,class:"content"},mG={key:0,class:"snapshot_list"},gG={key:2,class:"split_line"},vG=_n(o.defineComponent({__name:"commentsView",props:{userId:{},commentList:{}},emits:["updateComment","deleteComment","addViewPoint","imageZoomIn"],setup(I,{emit:G}){const a=G,C=I,S=o.ref(Tn.BcfStaffList),v=o.ref(Tn.getStaffName(C.userId)),f=o.ref(-1),h=()=>{a("addViewPoint")},d=(A,g,_)=>{C.commentList&&(C.commentList[f.value].comment=g,C.commentList[f.value].snapshotList=_,a("updateComment",A,C.commentList[f.value])),f.value=-1},l=A=>{a("imageZoomIn",A)},u=A=>{f.value=A},c=A=>{a("deleteComment",A)},p=A=>{let g;return typeof A=="string"&&A!=""?S.value.forEach(_=>{_.userName==A&&(g=_.avatar)}):typeof A=="number"&&S.value.forEach(_=>{_.userId==A&&(g=_.avatar)}),g||"bimkk-image/user/user-avatar.png"};return(A,g)=>{const _=vl,b=Aw;return o.openBlock(),o.createElementBlock("div",Zz,[o.createElementVNode("div",qz,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/comment.png"},null,8,eG),o.createElementVNode("span",null,o.toDisplayString(C.commentList&&C.commentList.length)+" 评论",1)]),o.createElementVNode("div",tG,[!C.commentList||C.commentList.length==0?(o.openBlock(),o.createElementBlock("div",rG," 暂无评论 ")):(o.openBlock(),o.createElementBlock("div",nG,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(C.commentList,(w,B)=>(o.openBlock(),o.createElementBlock("div",{key:B,class:"comment"},[o.createElementVNode("div",iG,[o.createElementVNode("div",sG,[o.createElementVNode("img",{src:`${o.unref(Vt)}/${p(w.author)}`,alt:""},null,8,aG),o.createElementVNode("div",oG,[o.createElementVNode("span",lG,o.toDisplayString(typeof w.author=="string"&&w.author!=""?w.author:typeof w.userId=="number"?o.unref(Tn).getStaffName(w.userId):w.author),1),o.createElementVNode("span",uG,o.toDisplayString(o.unref(aw)(w.date)),1)])]),v.value==w.author&&B!=f.value&&B!=-1?(o.openBlock(),o.createElementBlock("div",cG,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/more.png",alt:""},null,8,dG),o.createElementVNode("div",fG,[o.createElementVNode("div",{class:"edit",onClick:k=>u(B)},g[1]||(g[1]=[o.createElementVNode("span",null,"编辑",-1)]),8,hG),o.createElementVNode("div",{class:"delete",onClick:k=>c(w.guid)},g[2]||(g[2]=[o.createElementVNode("span",null,"删除",-1)]),8,pG)])])):o.createCommentVNode("",!0)]),B!=f.value&&B!=-1?(o.openBlock(),o.createElementBlock("div",AG,[o.createElementVNode("div",null,o.toDisplayString(w.comment),1),w.snapshotList&&w.snapshotList.length>0?(o.openBlock(),o.createElementBlock("div",mG,[o.createVNode(_,{ref_for:!0,ref:"imageViewRef","snapshot-list":w.snapshotList,"edit-enable":!1,onImageZoomIn:l},null,8,["snapshot-list"])])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createBlock(b,{key:1,"user-id":A.userId,mode:"update","comment-guid":w.guid,"old-comment":w.comment,"snapshot-list":w.snapshotList,onAddViewPoint:h,onCancel:g[0]||(g[0]=()=>{f.value=-1}),onUpdateComment:d},null,8,["user-id","comment-guid","old-comment","snapshot-list"])),C.commentList&&B!=C.commentList.length-1?(o.openBlock(),o.createElementBlock("div",gG)):o.createCommentVNode("",!0)]))),128))]))])])}}}),[["__scopeId","data-v-a8c22e31"]]),yG={key:0,class:"bcf_detail_wrapper"},bG={class:"detail_page_title"},_G={class:"back"},wG=["src"],xG={key:0,class:"title_2"},CG=["src"],BG={class:"header_right"},EG={key:0,class:"edit_buttons"},PG=["src"],SG=["src"],kG={class:"close"},MG={class:"content_scrollbar"},TG={class:"bcf_detail_content"},IG={class:"bcf_id_time"},DG={class:"snpshot_wrapper"},FG={class:"snapshot_container"},RG={key:0,class:"empty_image"},OG=["src"],LG=["src"],NG=["src"],jG={class:"bcf_content"},VG={class:"content"},UG={class:"select_item"},HG={class:"select_wrapper"},zG={class:"select_item"},GG={class:"select_wrapper"},QG={class:"select_item"},WG={class:"select_wrapper"},$G={class:"select_item"},KG={class:"select_wrapper"},XG={class:"content"},YG={class:"select_item"},JG={class:"select_wrapper"},ZG={class:"select_item"},qG={class:"select_wrapper"},eQ={class:"select_item"},tQ={class:"select_item"},rQ={class:"select_wrapper"},nQ={class:"select_item"},iQ={key:0,class:"tag_list"},sQ={key:1,class:"select_wrapper"},aQ={class:"add_comment"},oQ={class:"switch"},lQ=["src"],uQ={class:"num"},cQ={class:"current_index"},dQ=["src"],fQ=_n(o.defineComponent({__name:"BCFDetailPanel",props:{bcfId:{},userId:{},bcfList:{},bcfContent:{}},emits:["closePanel","closeDetail","editBcf","updateBcf","refreshCurrentBcf","emitHandler","imageZoomIn","switchCurrentBcf"],setup(I,{emit:G}){const a=G,C=be=>{a("emitHandler",be)},S=I,{bcfList:v}=S,f=o.ref(S.bcfId),h=o.ref(),d=o.ref(0),l=o.ref(S.bcfContent),u=o.ref(""),c=o.ref(),p=o.ref(),A=o.ref(),g=o.ref(),_=o.ref(),b=o.ref(),w=o.ref(),B=o.ref(),k=o.ref(),T=o.ref(),L=o.ref(),V=o.ref(),Q=o.ref(),N=o.ref(!1),j=o.ref(!0),$=o.ref(-1),X=o.ref(new Map),W=o.ref(0),D=o.ref(!1),z=o.ref(),M=o.ref(!1),R=o.ref(!1),O=o.ref("bcf"),U=o.ref(""),F=o.ref(),K=o.ref(!0),te=o.ref(!1);o.onMounted(()=>{const be=new Date;let xe=be.getDate(),Me=be.getFullYear(),Le=be.getMonth();u.value=`${Me}-${Le+1}-${xe}`,l.value||console.log("no bcfContent!"),v.forEach((Ve,Ye)=>{Ve._id==f.value&&(d.value=Ye,$.value=0,q(),N.value=!0)}),N.value||ke()}),o.watch(()=>S.bcfContent,be=>{be&&(l.value=JSON.parse(JSON.stringify(be)),q())});const q=()=>{h.value=l.value.guid,p.value=l.value.index,A.value=l.value.title,g.value=l.value.type?l.value.type:"",_.value=l.value.priority?uu(l.value.priority):"",b.value=l.value.status?l.value.status:"",w.value=l.value.stage?l.value.stage:"",k.value=l.value.dueDate?as(l.value.dueDate):"",T.value=l.value.description?l.value.description:"",L.value=l.value.labels?l.value.labels:[],typeof l.value.assignedTo=="string"&&l.value.assignedTo!=""?B.value=l.value.assignedTo:l.value.assignedTo&&(B.value=Tn.getStaffName(l.value.assignedTo)),typeof l.value.author=="string"&&l.value.author!=""?V.value=l.value.author:V.value=Tn.getStaffName(l.value.userId),l.value.viewPoints?(c.value=l.value.viewPoints,F.value&&(l.value.viewPoints.length>0?((!$.value||$.value==-1)&&($.value=0),F.value.updateList(c.value,$.value)):(c.value=void 0,$.value=-1))):(c.value=void 0,$.value=-1),ie(),ee()},ie=()=>{c.value?c.value.forEach((be,xe)=>{const Me=be.bcfView.components;if(Me){const{selection:Le}=Me;if(Le){let Ve=Le.map(lt=>lt.ifc_guid);X.value.set(xe,Ve);let Ye=X.value.get($.value);Ye&&(W.value=Ye.length),window.bimViewer.setAllObjectsSelected(!1),window.bimViewer.setObjectsSelected(Ye,!0)}else X.value.set(xe,[]),W.value=0,window.bimViewer.setAllObjectsSelected(!1)}else window.bimViewer.setAllObjectsSelected(!1),X.value=new Map,W.value=0}):(window.bimViewer.setAllObjectsSelected(!1),c.value=[],X.value=new Map,W.value=0)},oe=be=>{if(d.value==0){if(be=="last")return}else if(d.value==v.length-1&&be=="next")return;be=="next"&&(d.value+=1),be=="last"&&(d.value-=1),l.value=v[d.value],$.value=0,a("switchCurrentBcf",be)},ce=be=>{$.value=be,ie(),ee()},ee=()=>{if(l.value.comments)if(!c.value||c.value.length==0)Q.value=l.value.comments;else{let be=[];l.value.comments.forEach(xe=>{xe.viewPoint?c.value&&c.value[$.value].guid&&xe.viewPoint==c.value[$.value].guid&&be.push(xe):be.push(xe)}),Q.value=be}else Q.value=[]},he=()=>{a("editBcf",f)},ne=()=>{O.value="bcf",z.value=l.value.title,M.value=!0},re=()=>{D.value=!0},ae=be=>{be?(U.value=be,O.value="comment",z.value="这条评论",M.value=!0):console.log("comment guid undefined")},Be=(be,xe,Me)=>{let Le;be=="new"&&(Le={bcf_guid:h.value,type:be,bcf_cmt:Me}),be=="modify"&&(Le={bcf_guid:h.value,type:be,bcf_cmt_guid:xe,bcf_cmt:Me}),be=="delete"&&(Le={bcf_guid:h.value,type:be,bcf_cmt_guid:xe}),C({isTool:!0,event_target:"BCFTool",event_name:"modifyBcfComments",content:Le})},ve=be=>{if(D.value=!1,c.value&&c.value.length>0){let xe=c.value[$.value];xe&&xe.guid&&(be.viewPoint=xe.guid)}Be("new",be.guid,be)},ue=(be,xe)=>{Be("modify",be,xe)},Ae=be=>{Be("delete",be),M.value=!1},P=()=>{C({isTool:!0,event_target:"BCFTool",event_name:"deleteBcf",content:{bcf_guid:h.value}}),wr.emit("bcfLoading",!0),M.value=!1,ke()},ke=()=>{a("closeDetail")},Ee=()=>{a("closePanel")},pe=be=>{a("imageZoomIn",be)},fe=()=>{W.value!=0&&(R.value=!0,!(X.value.size==0||!X.value.get($.value))&&window.bimViewer.setObjectsSelected(X.value.get($.value),!0))},ye=()=>{const be=window.bimViewer.bcfTool.getBCFView();c.value||(c.value=[]);let xe=c.value.length;c.value.push({guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:be,index:xe}),F.value&&F.value.updateList(c.value)},de=()=>{wr.emit("bcfLoading",!0),a("refreshCurrentBcf")};return(be,xe)=>{const Me=ys,Le=vl,Ve=Aw,Ye=vG,lt=Vi,ot=ow,At=Gz;return N.value?(o.openBlock(),o.createElementBlock("div",yG,[o.createElementVNode("div",bG,[o.createElementVNode("div",_G,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/back.png",onClick:ke},null,8,wG),o.createElementVNode("span",{class:"title_1",onMouseenter:xe[0]||(xe[0]=st=>te.value=!0),onMouseleave:xe[1]||(xe[1]=st=>te.value=!1)},o.toDisplayString(A.value),33),te.value?(o.openBlock(),o.createElementBlock("span",xG,o.toDisplayString(A.value),1)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"refresh",onClick:de},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/refresh_dark_gray.png"},null,8,CG)])]),o.createElementVNode("div",BG,[K.value?(o.openBlock(),o.createElementBlock("div",EG,[o.createElementVNode("div",{class:"edit_button",onClick:he},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/edit.png"},null,8,PG)]),o.createElementVNode("div",{class:"edit_button",onClick:ne},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/delete_dark.png"},null,8,SG)])])):o.createCommentVNode("",!0),o.createElementVNode("div",kG,[o.createVNode(Me,{width:18,"click-handle":Ee})])])]),o.createElementVNode("div",MG,[o.createVNode(lt,null,{default:o.withCtx(()=>[o.createElementVNode("div",TG,[o.createElementVNode("div",IG,[o.createElementVNode("div",{style:o.normalizeStyle({backgroundColor:o.unref(Cf)(l.value.priority?l.value.priority:"low"),color:"#fff"})},"#"+o.toDisplayString(p.value),5),o.createElementVNode("div",null,o.toDisplayString(l.value.createDate&&o.unref(as)(l.value.createDate)),1)]),o.createElementVNode("div",DG,[o.createElementVNode("div",FG,[c.value&&c.value.length>0?(o.openBlock(),o.createBlock(Le,{key:1,ref_key:"imageViewRef",ref:F,"snapshot-list":c.value,"edit-enable":!1,onImageZoomIn:pe,onSwitchViewPoints:ce},null,8,["snapshot-list"])):(o.openBlock(),o.createElementBlock("div",RG,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/empty.png"},null,8,OG)])),b.value?(o.openBlock(),o.createElementBlock("div",{key:2,class:"stage",style:o.normalizeStyle({backgroundColor:o.unref(nw)(b.value)})},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/bulb.png"},null,8,LG),o.createElementVNode("span",null,o.toDisplayString(b.value),1)],4)):o.createCommentVNode("",!0)])]),o.createElementVNode("div",{class:o.normalizeClass(W.value&&W.value>0?"object object_1":"object"),onClick:fe},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/select_num.png"},null,8,NG),o.createElementVNode("span",null,o.toDisplayString(W.value)+" 个元素",1)],2),o.createElementVNode("div",jG,[o.createElementVNode("div",VG,[o.createElementVNode("div",UG,[xe[8]||(xe[8]=o.createElementVNode("span",null,"类别:",-1)),o.createElementVNode("div",HG,o.toDisplayString(g.value),1)]),o.createElementVNode("div",zG,[xe[9]||(xe[9]=o.createElementVNode("span",null,"分配给:",-1)),o.createElementVNode("div",GG,o.toDisplayString(B.value),1)]),o.createElementVNode("div",QG,[xe[10]||(xe[10]=o.createElementVNode("span",null,"截止日期:",-1)),o.createElementVNode("div",WG,o.toDisplayString(k.value),1)]),o.createElementVNode("div",$G,[xe[11]||(xe[11]=o.createElementVNode("span",null,"问题描述:",-1)),o.createElementVNode("div",KG,o.toDisplayString(T.value),1)])]),o.createElementVNode("div",XG,[o.createElementVNode("div",YG,[xe[12]||(xe[12]=o.createElementVNode("span",null,"状态:",-1)),o.createElementVNode("div",JG,o.toDisplayString(b.value),1)]),o.createElementVNode("div",ZG,[xe[13]||(xe[13]=o.createElementVNode("span",null,"阶段:",-1)),o.createElementVNode("div",qG,o.toDisplayString(w.value),1)]),o.createElementVNode("div",eQ,[xe[14]||(xe[14]=o.createElementVNode("span",null,"优先级:",-1)),o.createElementVNode("div",{class:"select_wrapper",style:o.normalizeStyle({color:o.unref(rw)(_.value)})},o.toDisplayString(_.value),5)]),o.createElementVNode("div",tQ,[xe[15]||(xe[15]=o.createElementVNode("span",null,"创建人:",-1)),o.createElementVNode("div",rQ,o.toDisplayString(V.value),1)]),o.createElementVNode("div",nQ,[xe[16]||(xe[16]=o.createElementVNode("span",null,"标签:",-1)),L.value.length>0?(o.openBlock(),o.createElementBlock("div",iQ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(L.value,(st,bt)=>(o.openBlock(),o.createElementBlock("div",{key:bt,class:"tag"},[o.createElementVNode("span",null,o.toDisplayString(st),1)]))),128))])):(o.openBlock(),o.createElementBlock("div",sQ))])])])]),o.createElementVNode("div",aQ,[D.value?(o.openBlock(),o.createBlock(Ve,{key:1,"bcf-id":f.value,"user-id":be.userId,mode:"add",onAddViewPoint:ye,onCancel:xe[3]||(xe[3]=st=>D.value=!1),onSubmitComment:ve},null,8,["bcf-id","user-id"])):(o.openBlock(),o.createElementBlock("div",{key:0,class:"comment_button",onClick:xe[2]||(xe[2]=st=>re())}," 立即评论 "))]),j.value?(o.openBlock(),o.createBlock(Ye,{key:0,"user-id":be.userId,"comment-list":Q.value?[...Q.value.slice().sort((st,bt)=>{const rt=new Date(st.modified_date?st.modified_date:st.date),tt=new Date(bt.modified_date?bt.modified_date:bt.date);return rt<tt?1:-1})]:void 0,onAddViewPoint:ye,onUpdateComment:ue,onDeleteComment:ae,onImageZoomIn:pe},null,8,["user-id","comment-list"])):o.createCommentVNode("",!0)]),_:1})]),o.createElementVNode("div",oQ,[o.createElementVNode("div",{class:"last",onClick:xe[4]||(xe[4]=st=>oe("last"))},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/last.png"},null,8,lQ)]),o.createElementVNode("div",uQ,[o.createElementVNode("span",cQ,o.toDisplayString(d.value+1),1),xe[17]||(xe[17]=o.createElementVNode("span",null,"/",-1)),o.createElementVNode("span",null,o.toDisplayString(o.unref(v).length),1)]),o.createElementVNode("div",{class:"next",onClick:xe[5]||(xe[5]=st=>oe("next"))},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/next.png"},null,8,dQ)])]),M.value?(o.openBlock(),o.createBlock(ot,{key:0,"delete-content-name":z.value,"delete-type":O.value,"comment-id":U.value,onConfirmDeleteBcf:P,onConfirmDeleteComment:Ae,onClosePanel:xe[6]||(xe[6]=()=>{M.value=!1})},null,8,["delete-content-name","delete-type","comment-id"])):o.createCommentVNode("",!0),o.withDirectives(o.createVNode(At,{"entity-list":X.value.get($.value),onCloseCheck:xe[7]||(xe[7]=st=>R.value=!1),onClosePanel:Ee},null,8,["entity-list"]),[[o.vShow,R.value]])])):o.createCommentVNode("",!0)}}}),[["__scopeId","data-v-726dc6d8"]]),hQ={class:"bcf_add_object_wrapper"},pQ={class:"add_page_title"},AQ=["src"],mQ={class:"close"},gQ={key:0,class:"add_content"},vQ={key:0,class:"select_object"},yQ={class:"content"},bQ={class:"content_count"},_Q={class:"count"},wQ={class:"num"},xQ=["src"],CQ={class:"content_scrollbar"},BQ={class:"content_list"},EQ={key:1,class:"object_empty"},PQ=["src"],SQ=["src"],kQ={key:1,class:"add_content"},MQ={key:0,class:"content"},TQ=["src"],IQ={class:"content_count"},DQ={class:"count"},FQ={class:"num"},RQ=["src"],OQ={class:"content_scrollbar"},LQ={class:"content_list"},NQ={class:"eye"},jQ=["src"],VQ={key:1},UQ=_n(o.defineComponent({__name:"addObjectOrAnno",props:{mode:{},objectList:{}},emits:["closePanel","closeAdd","saveObject","saveAnno"],setup(I,{emit:G}){const a=I,C=o.ref(a.mode),{objectList:S}=a,v=o.ref([]),f=o.ref(S?[...S]:[]),h=o.ref([]),d=o.ref(!1),l=o.ref(!1),u=G,c=L=>{C.value!="anno"&&(window.bimViewer.setEntitySelected(L),f.value=window.bimViewer.viewer.scene.selectedObjectIds)},p=L=>{v.value.push({annoId:L.id,hide:!1,choose:!1}),window.bimViewer.bcfTool.enableAnno=!1};o.onMounted(()=>{C.value=="select"&&(f.value.length>0&&(window.bimViewer.setAllObjectsSelected(!1),window.bimViewer.setObjectsSelected(f.value,!0)),window.bimViewer.eventTrigger.on("pickedEntity",c),window.bimViewer.eventTrigger.on("bcfNewAnno",p))}),o.onBeforeUnmount(()=>{C.value=="select"&&(window.bimViewer.eventTrigger.off("pickedEntity",c),window.bimViewer.eventTrigger.off("bcfNewAnno",p))});const A=L=>{l.value=L.length>0&&L.length<f.value.length,d.value=L.length===f.value.length},g=L=>{h.value=L?f.value:[],l.value=!1},_=L=>{L.forEach(V=>{v.value.forEach(Q=>{Q.choose=V===Q.annoId})}),l.value=L.length>0&&L.length<f.value.length,d.value=L.length===f.value.length},b=()=>{window.bimViewer.bcfTool.enableAnno=!0},w=()=>{let L=!1;h.value.length==f.value.length&&(d.value=!1,L=!0),h.value.forEach(V=>{f.value=f.value.filter(Q=>Q!=V),window.bimViewer.setObjectsSelected([V],!1)}),L&&(h.value=[]),l.value=!1},B=()=>{u("saveObject",f.value),u("closeAdd")},k=()=>{C.value=="select"?(window.bimViewer.setAllObjectsSelected(!1),f.value.length==0?B():(f.value=S||[],window.bimViewer.setObjectsSelected(f.value,!0)),u("closeAdd")):u("saveAnno",f)},T=()=>{k(),u("closePanel")};return(L,V)=>{const Q=ys,N=NA,j=m1,$=Vi;return o.openBlock(),o.createElementBlock("div",hQ,[o.createElementVNode("div",pQ,[o.createElementVNode("div",{class:"back",onClick:k},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/back.png"},null,8,AQ),o.createElementVNode("span",null,o.toDisplayString(C.value=="select"?"添加对象":"添加标记"),1)]),o.createElementVNode("div",mQ,[o.createVNode(Q,{width:18,clickHandle:T})])]),C.value=="select"?(o.openBlock(),o.createElementBlock("div",gQ,[f.value&&f.value.length>0?(o.openBlock(),o.createElementBlock("div",vQ,[o.createElementVNode("div",yQ,[o.createElementVNode("div",bQ,[o.createElementVNode("div",_Q,[V[4]||(V[4]=o.createElementVNode("span",null,"已添加对象共:",-1)),o.createElementVNode("span",wQ,o.toDisplayString(f.value.length)+"个",1)]),o.createElementVNode("div",{class:o.normalizeClass(h.value.length>0?"del_btn_chose":"del_btn"),onClick:w},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/delete_blue.png"},null,8,xQ),V[5]||(V[5]=o.createElementVNode("span",null,"删除",-1))],2)]),o.createElementVNode("div",CQ,[o.createVNode($,null,{default:o.withCtx(()=>[o.createElementVNode("div",BQ,[o.createVNode(N,{modelValue:d.value,"onUpdate:modelValue":V[0]||(V[0]=X=>d.value=X),class:"header",indeterminate:l.value,onChange:g,label:"全部"},null,8,["modelValue","indeterminate"]),o.createVNode(j,{modelValue:h.value,"onUpdate:modelValue":V[1]||(V[1]=X=>h.value=X),onChange:A},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,(X,W)=>(o.openBlock(),o.createBlock(N,{class:o.normalizeClass(W%2==1?"line1":"line2"),label:X,key:X},{default:o.withCtx(()=>[o.createElementVNode("span",null,o.toDisplayString(X),1)]),_:2},1032,["class","label"]))),128))]),_:1},8,["modelValue"])])]),_:1})])]),o.createElementVNode("div",{class:"save_button",onClick:B}," 保存 ")])):(o.openBlock(),o.createElementBlock("div",EQ,[o.createElementVNode("img",{class:"empty_img",src:o.unref(Vt)+"/bim-viewer/bcf-images/object_empty.png"},null,8,PQ),V[6]||(V[6]=o.createElementVNode("span",null,"直接点击模型上的结构即可添加对象",-1)),o.createElementVNode("img",{class:"mouse",src:o.unref(Vt)+"/bim-viewer/bcf-images/mouse.png"},null,8,SQ),V[7]||(V[7]=o.createElementVNode("span",null,"按下鼠标左键可连续多选",-1))]))])):(o.openBlock(),o.createElementBlock("div",kQ,[v.value&&v.value.length>0?(o.openBlock(),o.createElementBlock("div",MQ,[o.createElementVNode("div",{class:"add_button",onClick:b},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/anno.png"},null,8,TQ),V[8]||(V[8]=o.createElementVNode("span",null,"添加标记",-1))]),o.createElementVNode("div",IQ,[o.createElementVNode("div",DQ,[V[9]||(V[9]=o.createElementVNode("span",null,"已添加标注共:",-1)),o.createElementVNode("span",FQ,o.toDisplayString(v.value.length)+"个",1)]),o.createElementVNode("div",{class:o.normalizeClass(h.value.length>0?"del_btn_chose":"del_btn")},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/delete_blue.png"},null,8,RQ),V[10]||(V[10]=o.createElementVNode("span",null,"删除",-1))],2)]),o.createElementVNode("div",OQ,[o.createVNode($,null,{default:o.withCtx(()=>[o.createElementVNode("div",LQ,[o.createVNode(N,{class:"header",modelValue:d.value,"onUpdate:modelValue":V[2]||(V[2]=X=>d.value=X),indeterminate:l.value,onChange:g,label:"全部"},null,8,["modelValue","indeterminate"]),o.createVNode(j,{modelValue:h.value,"onUpdate:modelValue":V[3]||(V[3]=X=>h.value=X),onChange:_},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,(X,W)=>(o.openBlock(),o.createBlock(N,{class:o.normalizeClass(W%2==1?"line1":"line2"),label:X,key:X},{default:o.withCtx(()=>[o.createElementVNode("div",NQ,[o.createElementVNode("img",{src:`${o.unref(Vt)}/bim-viewer/bcf-images/${v.value[W].hide?"eye_light":"eye_dark"}.png`},null,8,jQ)]),o.createElementVNode("span",null,o.toDisplayString(X),1)]),_:2},1032,["class","label"]))),128))]),_:1},8,["modelValue"])])]),_:1})])])):(o.openBlock(),o.createElementBlock("div",VQ,V[11]||(V[11]=[o.createElementVNode("div",{class:"empty_"},null,-1)])))]))])}}}),[["__scopeId","data-v-2aff9df2"]]),HQ={class:"bcf_add_wrapper"},zQ={class:"add_page_title"},GQ=["src"],QQ={class:"close"},WQ={class:"content_scrollbar"},$Q={class:"bcf_add_content"},KQ={class:"bcf_id_time"},XQ={class:"snpshot_wrapper"},YQ={class:"snapshot_container"},JQ={key:0,class:"upload_button"},ZQ=["src"],qQ=["src"],eW={class:"add_object_annotation"},tW={class:"new_icon"},rW=["src"],nW=["src"],iW={class:"new_button"},sW=["src"],aW={key:0,class:"object_num"},oW={class:"bcf_content"},lW={class:"content"},uW={class:"select_item"},cW={class:"select_wrapper"},dW={class:"select_item"},fW={class:"select_wrapper"},hW={class:"select_item"},pW={class:"select_wrapper"},AW={class:"select_item"},mW={class:"select_wrapper"},gW={class:"select_item"},vW={class:"select_wrapper"},yW={class:"select_item"},bW={class:"select_wrapper"},_W={class:"select_item"},wW={class:"select_wrapper"},xW={class:"select_item"},CW={class:"select_wrapper"},BW={class:"select_item"},EW={class:"select_wrapper"},PW=_n(o.defineComponent({__name:"BCFAddPanel",props:{bcfId:{},userId:{},mode:{},bcfContent:{},bcfList:{}},emits:["closePanel","closeAdd","submitBcf","updateBcf","imageZoomIn"],setup(I,{emit:G}){const a=G,C=I,{bcfId:S,mode:v,userId:f,bcfContent:h,bcfList:d}=C,l=o.ref("select"),u=o.ref(""),c=o.ref(),p=o.ref(),A=o.ref([]),g=o.ref(),_=o.ref(),b=o.ref(""),w=o.ref(""),B=o.ref(""),k=o.ref(""),T=o.ref(""),L=o.ref(),V=o.ref(),Q=o.ref(""),N=o.ref([]),j=o.ref(iw),$=o.ref(Bf),X=o.ref(Ef),W=o.ref(sw),D=o.ref(Pf),z=o.ref(Tn.BcfStaffList),M=o.ref(),R=o.ref(0),O=o.ref(),U=o.ref(!1),F=Ae=>{U.value||window.bimViewer.setEntitySelected(Ae)};o.onMounted(()=>{if(window.bimViewer.disableClickEvent=!0,window.bimViewer.eventTrigger.on("pickedEntity",F),v=="add"){const Ae=new Date;let P=Ae.getDate(),ke=Ae.getFullYear(),Ee=Ae.getMonth();if(u.value=`${ke}-${Ee+1}-${P}`,d.length>0){let pe=d[d.length-1];pe&&pe.index&&(_.value=pe.index+1)}else _.value=1;O.value=[]}else if(h)if(_.value=h.index,b.value=h.title,w.value=h.type?h.type:"",B.value=h.priority?uu(h.priority):"",k.value=h.status?h.status:"",T.value=h.stage?h.stage:"",L.value=typeof h.assignedTo=="number"?h.assignedTo:void 0,V.value=h.dueDate?as(h.dueDate):"",Q.value=h.description?h.description:"",N.value=h.labels?h.labels:[],h.viewPoints){if(M.value=0,A.value=h.viewPoints,h.viewPoints.length==0)return;let Ae=h.viewPoints[0].bcfView.components;Ae?Ae.selection?(O.value=Ae.selection.map(P=>P.ifc_guid),R.value=O.value.length,window.bimViewer.setObjectsSelected(O.value,!0)):(O.value=[],window.bimViewer.setAllObjectsSelected(!1)):window.bimViewer.setAllObjectsSelected(!1)}else window.bimViewer.setAllObjectsSelected(!1)}),o.onBeforeUnmount(()=>{window.bimViewer.disableClickEvent=!1,window.bimViewer.setAllObjectsSelected(!1),window.bimViewer.eventTrigger.off("pickedEntity",F)});const K=Ae=>{A.value=A.value.filter((P,ke)=>ke!=Ae),c.value&&c.value.updateList(A.value,"delete")},te=()=>{const Ae=window.bimViewer.bcfTool.getBCFView();let P=A.value.length;A.value.push({guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:Ae,index:P}),M.value=A.value.length-1,c.value&&c.value.updateList(A.value,"update"),Ae.components.selection&&Ae.components.selection.length>0?he():(O.value=[],R.value=0)},q=Ae=>{let P=Ae.target.files[0];if(P){const ke=new FileReader;ke.readAsDataURL(P),ke.onload=()=>{ie(ke.result)}}},ie=Ae=>{O.value&&O.value.length!=0&&O.value.forEach(Ee=>{});let P=window.bimViewer.bcfTool.getBCFView();P.snapshot.snapshot_data=Ae;let ke=A.value.length;A.value.push({guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:P,index:ke}),M.value=A.value.length-1,c.value&&c.value.updateList(A.value,"update"),O.value=window.bimViewer.viewer.scene.selectedObjectIds,R.value=O.value.length},oe=Ae=>{if(Ae>=0){M.value=Ae;let P=A.value[M.value].bcfView;if(P&&P.components){let ke=P.components.selection;O.value=ke==null?void 0:ke.map(Ee=>Ee.ifc_guid),R.value=O.value&&O.value.length}else M.value=void 0,O.value=[],R.value=0}else M.value=void 0,O.value=[],R.value=0},ce=()=>{if(b.value==""){Hp.ElMessage.error("请输入标题!");return}const Ae={title:b.value,author:f,stage:T.value,status:k.value,assignedTo:L.value,createDate:new Date().toISOString(),dueDate:V.value?V.value.toISOString():void 0,description:Q.value,labels:N.value,priority:xf(B.value),type:w.value,viewPoints:A.value};a("submitBcf",Ae)},ee=()=>{h&&(g.value={_id:h._id,fileId:h.fileId,userId:h.userId,guid:h.guid,title:b.value,author:h.author,priority:xf(B.value),index:_.value,type:w.value,stage:T.value,status:k.value,labels:N.value,dueDate:V.value?V.value:void 0,createDate:h.createDate,assignedTo:L.value,description:Q.value,viewPoints:A.value,comments:h.comments,modified_date:new Date().toISOString(),modified_author:Tn.getStaffName(f)},a("updateBcf",g.value.guid,g.value,"content"))},he=Ae=>{if(O.value=Ae||window.bimViewer.viewer.scene.selectedObjectIds,R.value=O.value.length,!O.value||O.value.length==0)return;let P=[];if(O.value!=0&&O.value.forEach(ke=>{P.push({ifc_guid:ke})}),A.value[M.value]){let ke=A.value[M.value].bcfView;if(ke){if(ke.components)ke.components.selection=P;else{let Ee={selection:P,visibility:{default_visibility:!0}};ke.components=Ee}console.log("有bcfView点击saveObject:",A.value[M.value].bcfView)}else A.value[M.value]={guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:{components:{selection:P,visibility:{default_visibility:!0}}}},console.log("没有bcfView点击saveObject:",A.value[M.value].bcfView)}else{let ke={components:{selection:P,visibility:{default_visibility:!0}}},Ee={guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:ke,index:1};A.value.push(Ee),M.value=0,c.value&&c.value.updateList(A.value,"update"),console.log("没有视角点击saveObject:",A.value[M.value].bcfView)}},ne=Ae=>{U.value=!0,l.value=Ae},re=Ae=>{he(Ae),ae()},ae=()=>{U.value=!1},Be=()=>{a("closeAdd")},ve=()=>{a("closePanel")},ue=Ae=>{a("imageZoomIn",Ae)};return(Ae,P)=>{const ke=ys,Ee=vl,pe=ji,fe=em,ye=qA,de=bf,be=Vi,xe=UQ;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",HQ,[o.createElementVNode("div",zQ,[o.createElementVNode("div",{class:"back",onClick:Be},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/back.png"},null,8,GQ),o.createElementVNode("span",null,o.toDisplayString(o.unref(v)=="add"?"新建BCF":"返回"),1)]),o.createElementVNode("div",QQ,[o.createVNode(ke,{width:18,"click-handle":ve})])]),o.createElementVNode("div",WQ,[o.createVNode(be,null,{default:o.withCtx(()=>{var Me;return[o.createElementVNode("div",$Q,[o.createElementVNode("div",KQ,[o.createElementVNode("div",null,"#"+o.toDisplayString(_.value),1),o.createElementVNode("div",null,o.toDisplayString(o.unref(v)=="add"?u.value:o.unref(as)((Me=o.unref(h))==null?void 0:Me.createDate)),1)]),o.createElementVNode("div",XQ,[o.createElementVNode("div",YQ,[A.value.length==0?(o.openBlock(),o.createElementBlock("div",JQ,[o.createElementVNode("div",{class:"shot",onClick:P[0]||(P[0]=Le=>te())},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/camera.png"},null,8,ZQ),P[16]||(P[16]=o.createTextVNode(" 添加视角 "))]),o.createElementVNode("div",{class:"upload",onClick:P[1]||(P[1]=Le=>p.value.click())},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/upload.png"},null,8,qQ),P[17]||(P[17]=o.createTextVNode(" 上传图片 "))])])):(o.openBlock(),o.createBlock(Ee,{key:1,ref_key:"imageViewRef",ref:c,"snapshot-list":A.value,"edit-enable":!0,onSwitchViewPoints:oe,onImageZoomIn:ue,onDeleteView:K},null,8,["snapshot-list"]))])]),o.createElementVNode("div",eW,[o.withDirectives(o.createElementVNode("div",tW,[o.createElementVNode("img",{class:"newBcfView",src:o.unref(Vt)+"/bim-viewer/bcf-images/camera_gray.png",onClick:P[2]||(P[2]=Le=>te())},null,8,rW),o.createElementVNode("img",{class:"newImage",src:o.unref(Vt)+"/bim-viewer/bcf-images/upload_gray.png",onClick:P[3]||(P[3]=Le=>p.value.click())},null,8,nW),o.createElementVNode("input",{ref_key:"imgInputRef",ref:p,type:"file",accept:"image/*",style:{display:"none"},onChange:q},null,544)],512),[[o.vShow,A.value.length>0]]),o.createElementVNode("div",iW,[o.createElementVNode("div",{class:o.normalizeClass((A.value.length>0,"object")),onClick:P[4]||(P[4]=Le=>ne("select"))},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/add_select.png"},null,8,sW),P[18]||(P[18]=o.createElementVNode("span",null,"添加模型对象",-1)),R.value!=0?(o.openBlock(),o.createElementBlock("div",aW,o.toDisplayString(R.value),1)):o.createCommentVNode("",!0)],2)])]),o.createElementVNode("div",oW,[o.createElementVNode("div",lW,[o.createElementVNode("div",uW,[P[19]||(P[19]=o.createElementVNode("div",null,[o.createTextVNode(" 标题 "),o.createElementVNode("span",{style:{color:"#f54d4d"}},"*")],-1)),o.createElementVNode("div",cW,[o.createVNode(pe,{modelValue:b.value,"onUpdate:modelValue":P[5]||(P[5]=Le=>b.value=Le),placeholder:"请输入"},null,8,["modelValue"])])]),o.createElementVNode("div",dW,[P[20]||(P[20]=o.createElementVNode("span",null,"类别",-1)),o.createElementVNode("div",fW,[o.createVNode(ye,{modelValue:w.value,"onUpdate:modelValue":P[6]||(P[6]=Le=>w.value=Le),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(j.value,(Le,Ve)=>(o.openBlock(),o.createBlock(fe,{key:Ve,value:Le},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",hW,[P[21]||(P[21]=o.createElementVNode("span",null,"优先级",-1)),o.createElementVNode("div",pW,[o.createVNode(ye,{modelValue:B.value,"onUpdate:modelValue":P[7]||(P[7]=Le=>B.value=Le),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList($.value,(Le,Ve)=>(o.openBlock(),o.createBlock(fe,{key:Ve,value:Le},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",AW,[P[22]||(P[22]=o.createElementVNode("span",null,"状态",-1)),o.createElementVNode("div",mW,[o.createVNode(ye,{modelValue:k.value,"onUpdate:modelValue":P[8]||(P[8]=Le=>k.value=Le),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(X.value,(Le,Ve)=>(o.openBlock(),o.createBlock(fe,{key:Ve,value:Le},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",gW,[P[23]||(P[23]=o.createElementVNode("span",null,"阶段",-1)),o.createElementVNode("div",vW,[o.createVNode(ye,{modelValue:T.value,"onUpdate:modelValue":P[9]||(P[9]=Le=>T.value=Le),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(W.value,(Le,Ve)=>(o.openBlock(),o.createBlock(fe,{key:Ve,value:Le},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",yW,[P[24]||(P[24]=o.createElementVNode("span",null,"分配给",-1)),o.createElementVNode("div",bW,[o.createVNode(ye,{modelValue:L.value,"onUpdate:modelValue":P[10]||(P[10]=Le=>L.value=Le),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z.value,Le=>(o.openBlock(),o.createBlock(fe,{key:Le.userId,value:Le.userId,label:`${Le.userName}(${Le.mobile})`},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",_W,[P[25]||(P[25]=o.createElementVNode("span",null,"截止日期",-1)),o.createElementVNode("div",wW,[o.createVNode(de,{modelValue:V.value,"onUpdate:modelValue":P[11]||(P[11]=Le=>V.value=Le),type:"datetime",placeholder:"请选择日期"},null,8,["modelValue"])])]),o.createElementVNode("div",xW,[P[26]||(P[26]=o.createElementVNode("span",null,"问题描述",-1)),o.createElementVNode("div",CW,[o.createVNode(pe,{modelValue:Q.value,"onUpdate:modelValue":P[12]||(P[12]=Le=>Q.value=Le),type:"textarea",placeholder:"请输入"},null,8,["modelValue"])])]),o.createElementVNode("div",BW,[P[27]||(P[27]=o.createElementVNode("span",null,"标签",-1)),o.createElementVNode("div",EW,[o.createVNode(ye,{modelValue:N.value,"onUpdate:modelValue":P[13]||(P[13]=Le=>N.value=Le),multiple:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(D.value,(Le,Ve)=>(o.openBlock(),o.createBlock(fe,{key:Ve,value:Le},null,8,["value"]))),128))]),_:1},8,["modelValue"])])])])]),o.unref(v)=="add"?(o.openBlock(),o.createElementBlock("div",{key:0,class:"submit_button",onClick:P[14]||(P[14]=Le=>ce())}," 立即创建 ")):(o.openBlock(),o.createElementBlock("div",{key:1,class:"submit_button",onClick:P[15]||(P[15]=Le=>ee())}," 确认修改 "))])]}),_:1})])]),U.value?(o.openBlock(),o.createBlock(xe,{key:0,mode:l.value,"object-list":O.value,onSaveObject:re,onCloseAdd:ae,onClosePanel:ve},null,8,["mode","object-list"])):o.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-f12db54a"]]),SW={class:"filter"},kW=["src"],MW={class:"filter_panel"},TW={class:"header"},IW={class:"content"},DW={class:"select_item"},FW={class:"select_wrapper"},RW={class:"select_item"},OW={class:"select_wrapper"},LW={class:"select_item"},NW={class:"select_wrapper"},jW={class:"select_item"},VW={class:"select_wrapper"},UW={class:"select_item"},HW={class:"select_wrapper"},zW={class:"select_item"},GW={class:"select_wrapper"},QW={class:"footer"},WW=_n(o.defineComponent({__name:"BCFFilter",props:{instruction:{},bcfList:{}},emits:["filterBcfList","resetFilter"],setup(I,{emit:G}){const a=G,C=I,S=o.ref(C.bcfList);o.watch(()=>C.instruction,T=>{T&&T.instruct_name=="updateBcfList"&&T.content.bcfList&&(S.value=JSON.parse(JSON.stringify(T.content.bcfList)))},{deep:!0});const v=o.ref(),f=o.ref(),h=o.ref(),d=o.ref(),l=o.ref(),u=o.ref(),c=o.ref(Tn.BcfStaffList),p=o.ref(!1),A=o.ref(Bf),g=o.ref(Ef),_=o.ref(Pf),b=o.ref(!1),w=()=>{b.value=!0},B=()=>{if(!v.value&&!f.value&&!h.value&&!d.value&&!d.value&&!l.value&&(!u.value||u.value.length==0))k();else{let T=JSON.parse(JSON.stringify(S.value)).slice();v.value&&(T=T.filter(L=>L.priority&&uu(L.priority)==v.value)),f.value&&(T=T.filter(L=>typeof L.author=="string"?Tn.getStaffId(L.author)==f.value||Tn.getStaffName(f.value)==L.author:L.author==f.value)),h.value&&(T=T.filter(L=>L.status==h.value)),d.value&&(T=T.filter(L=>as(L.createDate)==as(d.value.toISOString()))),l.value&&(T=T.filter(L=>typeof L.assignedTo=="string"?Tn.getStaffId(L.assignedTo)==l.value||Tn.getStaffName(l.value)==L.assignedTo:L.assignedTo==l.value)),u.value&&(T=T.filter(L=>!!(L.labels&&L.labels.find(V=>{var Q;return(Q=u.value)==null?void 0:Q.includes(V)})))),a("filterBcfList",T)}},k=()=>{a("resetFilter"),b.value=!1,v.value=void 0,f.value=void 0,h.value=void 0,d.value=void 0,l.value=void 0,u.value=void 0};return(T,L)=>{const V=ys,Q=em,N=qA,j=bf;return o.openBlock(),o.createElementBlock("div",SW,[o.createElementVNode("div",{class:"filter_button",onClick:L[0]||(L[0]=$=>p.value=!p.value)},[o.createElementVNode("img",{class:"filter_button_img",src:o.unref(Vt)+"/bim-viewer/bcf-images/filter.png"},null,8,kW),L[7]||(L[7]=o.createElementVNode("span",null,"筛选",-1))]),o.withDirectives(o.createElementVNode("div",MW,[o.createElementVNode("div",TW,[L[8]||(L[8]=o.createElementVNode("span",null,"筛选",-1)),o.createVNode(V,{width:18,class:"close","click-handle":()=>{p.value=!1}},null,8,["click-handle"])]),o.createElementVNode("div",IW,[o.createElementVNode("div",DW,[L[9]||(L[9]=o.createElementVNode("span",null,"优先级",-1)),o.createElementVNode("div",FW,[o.createVNode(N,{modelValue:v.value,"onUpdate:modelValue":L[1]||(L[1]=$=>v.value=$),placeholder:"请选择",clearable:"",onChange:w},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,($,X)=>(o.openBlock(),o.createBlock(Q,{key:X,value:$},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",RW,[L[10]||(L[10]=o.createElementVNode("span",null,"状态",-1)),o.createElementVNode("div",OW,[o.createVNode(N,{modelValue:h.value,"onUpdate:modelValue":L[2]||(L[2]=$=>h.value=$),placeholder:"请选择",clearable:"",onChange:w},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,($,X)=>(o.openBlock(),o.createBlock(Q,{key:X,value:$},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",LW,[L[11]||(L[11]=o.createElementVNode("span",null,"创建日期",-1)),o.createElementVNode("div",NW,[o.createVNode(j,{modelValue:d.value,"onUpdate:modelValue":L[3]||(L[3]=$=>d.value=$),type:"date",placeholder:"请选择日期",onChange:w},null,8,["modelValue"])])]),o.createElementVNode("div",jW,[L[12]||(L[12]=o.createElementVNode("span",null,"分配给",-1)),o.createElementVNode("div",VW,[o.createVNode(N,{modelValue:l.value,"onUpdate:modelValue":L[4]||(L[4]=$=>l.value=$),placeholder:"请选择",clearable:"",onChange:w},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.value,$=>(o.openBlock(),o.createBlock(Q,{key:$.userId,value:$.userId,label:`${$.userName}(${$.mobile})`},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",UW,[L[13]||(L[13]=o.createElementVNode("span",null,"创建人",-1)),o.createElementVNode("div",HW,[o.createVNode(N,{modelValue:f.value,"onUpdate:modelValue":L[5]||(L[5]=$=>f.value=$),placeholder:"请选择",clearable:"",onChange:w},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.value,$=>(o.openBlock(),o.createBlock(Q,{key:$.userId,value:$.userId,label:`${$.userName}(${$.mobile})`},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",zW,[L[14]||(L[14]=o.createElementVNode("span",null,"标签",-1)),o.createElementVNode("div",GW,[o.createVNode(N,{modelValue:u.value,"onUpdate:modelValue":L[6]||(L[6]=$=>u.value=$),multiple:"",placeholder:"请选择",onChange:w},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(_.value,($,X)=>(o.openBlock(),o.createBlock(Q,{key:X,value:$},null,8,["value"]))),128))]),_:1},8,["modelValue"])])])]),o.createElementVNode("div",QW,[o.createElementVNode("div",{class:"reset",onClick:k}," 重置 "),o.createElementVNode("div",{class:o.normalizeClass(b.value?"save_allow":"save"),onClick:B}," 搜索 ",2)])],512),[[o.vShow,p.value]])])}}}),[["__scopeId","data-v-b86d14fc"]]);function Mf(I){throw new Error('Could not dynamically require "'+I+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $W={exports:{}};/*! ExcelJS 19-10-2023 */(function(I,G){(function(a){I.exports=a()})(function(){return function a(C,S,v){function f(l,u){if(!S[l]){if(!C[l]){var c=typeof Mf=="function"&&Mf;if(!u&&c)return c(l,!0);if(h)return h(l,!0);var p=new Error("Cannot find module '"+l+"'");throw p.code="MODULE_NOT_FOUND",p}var A=S[l]={exports:{}};C[l][0].call(A.exports,function(g){return f(C[l][1][g]||g)},A,A.exports,a,C,S,v)}return S[l].exports}for(var h=typeof Mf=="function"&&Mf,d=0;d<v.length;d++)f(v[d]);return f}({1:[function(a,C,S){const v=a("fs"),f=a("fast-csv"),h=a("dayjs/plugin/customParseFormat"),d=a("dayjs/plugin/utc"),l=a("dayjs").extend(h).extend(d),u=a("../utils/stream-buf"),{fs:{exists:c}}=a("../utils/utils"),p={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};C.exports=class{constructor(A){this.workbook=A,this.worksheet=null}async readFile(A,g){if(g=g||{},!await c(A))throw new Error("File not found: "+A);const _=v.createReadStream(A),b=await this.read(_,g);return _.close(),b}read(A,g){return g=g||{},new Promise((_,b)=>{const w=this.workbook.addWorksheet(g.sheetName),B=g.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],k=g.map||function(L){if(L==="")return null;const V=Number(L);if(!Number.isNaN(V)&&V!==1/0)return V;const Q=B.reduce((j,$)=>{if(j)return j;const X=l(L,$,!0);return X.isValid()?X:null},null);if(Q)return new Date(Q.valueOf());const N=p[L];return N!==void 0?N:L},T=f.parse(g.parserOptions).on("data",L=>{w.addRow(L.map(k))}).on("end",()=>{T.emit("worksheet",w)});T.on("worksheet",_).on("error",b),A.pipe(T)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(A,g){return new Promise((_,b)=>{g=g||{};const w=this.workbook.getWorksheet(g.sheetName||g.sheetId),B=f.format(g.formatterOptions);A.on("finish",()=>{_()}),B.on("error",b),B.pipe(A);const{dateFormat:k,dateUTC:T}=g,L=g.map||(N=>{if(N){if(N.text||N.hyperlink)return N.hyperlink||N.text||"";if(N.formula||N.result)return N.result||"";if(N instanceof Date)return k?T?l.utc(N).format(k):l(N).format(k):T?l.utc(N).format():l(N).format();if(N.error)return N.error;if(typeof N=="object")return JSON.stringify(N)}return N}),V=g.includeEmptyRows===void 0||g.includeEmptyRows;let Q=1;w&&w.eachRow((N,j)=>{if(V)for(;Q++<j-1;)B.write([]);const{values:$}=N;$.shift(),B.write($.map(L)),Q=j}),B.end()})}writeFile(A,g){const _={encoding:(g=g||{}).encoding||"utf8"},b=v.createWriteStream(A,_);return this.write(b,g)}async writeBuffer(A){const g=new u;return await this.write(g,A),g.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(a,C,S){const v=a("../utils/col-cache");class f{constructor(d,l){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=d,l)if(typeof l=="string"){const c=v.decodeAddress(l);this.nativeCol=c.col+u,this.nativeColOff=0,this.nativeRow=c.row+u,this.nativeRowOff=0}else l.nativeCol!==void 0?(this.nativeCol=l.nativeCol||0,this.nativeColOff=l.nativeColOff||0,this.nativeRow=l.nativeRow||0,this.nativeRowOff=l.nativeRowOff||0):l.col!==void 0?(this.col=l.col+u,this.row=l.row+u):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(d){return d instanceof f||d==null?d:new f(d)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(d){this.nativeCol=Math.floor(d),this.nativeColOff=Math.floor((d-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(d){this.nativeRow=Math.floor(d),this.nativeRowOff=Math.floor((d-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(d){this.nativeCol=d.nativeCol,this.nativeColOff=d.nativeColOff,this.nativeRow=d.nativeRow,this.nativeRowOff=d.nativeRowOff}}C.exports=f},{"../utils/col-cache":19}],3:[function(a,C,S){const v=a("../utils/col-cache"),f=a("../utils/under-dash"),h=a("./enums"),{slideFormula:d}=a("../utils/shared-formula"),l=a("./note");class u{constructor(A,g,_){if(!A||!g)throw new Error("A Cell needs a Row");this._row=A,this._column=g,v.validateAddress(_),this._address=_,this._value=c.create(u.Types.Null,this),this.style=this._mergeStyle(A.style,g.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(A){this.style.numFmt=A}get font(){return this.style.font}set font(A){this.style.font=A}get alignment(){return this.style.alignment}set alignment(A){this.style.alignment=A}get border(){return this.style.border}set border(A){this.style.border=A}get fill(){return this.style.fill}set fill(A){this.style.fill=A}get protection(){return this.style.protection}set protection(A){this.style.protection=A}_mergeStyle(A,g,_){const b=A&&A.numFmt||g&&g.numFmt;b&&(_.numFmt=b);const w=A&&A.font||g&&g.font;w&&(_.font=w);const B=A&&A.alignment||g&&g.alignment;B&&(_.alignment=B);const k=A&&A.border||g&&g.border;k&&(_.border=k);const T=A&&A.fill||g&&g.fill;T&&(_.fill=T);const L=A&&A.protection||g&&g.protection;return L&&(_.protection=L),_}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===u.Types.Merge}merge(A,g){this._value.release(),this._value=c.create(u.Types.Merge,this,A),g||(this.style=A.style)}unmerge(){this.type===u.Types.Merge&&(this._value.release(),this._value=c.create(u.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(A){return this._value.type===u.Types.Merge&&this._value.isMergedTo(A)}get master(){return this.type===u.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===u.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(A){this.type!==u.Types.Merge?(this._value.release(),this._value=c.create(c.getType(A),this,A)):this._value.master.value=A}get note(){return this._comment&&this._comment.note}set note(A){this._comment=new l(A)}get text(){return this._value.toString()}get html(){return f.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(A){this.type===u.Types.String&&(this._value=c.create(u.Types.Hyperlink,this,{text:this._value.value,hyperlink:A}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:A}=this._row;return{sheetName:A.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(A){this.names=[A]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(A){const{definedNames:g}=this.workbook;g.removeAllNames(this.fullAddress),A.forEach(_=>{g.addEx(this.fullAddress,_)})}addName(A){this.workbook.definedNames.addEx(this.fullAddress,A)}removeName(A){this.workbook.definedNames.removeEx(this.fullAddress,A)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(A){this._dataValidations.add(this.address,A)}get model(){const{model:A}=this._value;return A.style=this.style,this._comment&&(A.comment=this._comment.model),A}set model(A){if(this._value.release(),this._value=c.create(A.type,this),this._value.model=A,A.comment)switch(A.comment.type){case"note":this._comment=l.fromModel(A.comment)}A.style?this.style=A.style:this.style={}}}u.Types=h.ValueType;const c={getType:p=>p==null?u.Types.Null:p instanceof String||typeof p=="string"?u.Types.String:typeof p=="number"?u.Types.Number:typeof p=="boolean"?u.Types.Boolean:p instanceof Date?u.Types.Date:p.text&&p.hyperlink?u.Types.Hyperlink:p.formula||p.sharedFormula?u.Types.Formula:p.richText?u.Types.RichText:p.sharedString?u.Types.SharedString:p.error?u.Types.Error:u.Types.JSON,types:[{t:u.Types.Null,f:class{constructor(p){this.model={address:p.address,type:u.Types.Null}}get value(){return null}set value(p){}get type(){return u.Types.Null}get effectiveType(){return u.Types.Null}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return""}release(){}toString(){return""}}},{t:u.Types.Number,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.Number,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}get type(){return u.Types.Number}get effectiveType(){return u.Types.Number}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.String,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.String,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}get type(){return u.Types.String}get effectiveType(){return u.Types.String}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:u.Types.Date,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.Date,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}get type(){return u.Types.Date}get effectiveType(){return u.Types.Date}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.Hyperlink,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.Hyperlink,text:A?A.text:void 0,hyperlink:A?A.hyperlink:void 0},A&&A.tooltip&&(this.model.tooltip=A.tooltip)}get value(){const p={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(p.tooltip=this.model.tooltip),p}set value(p){this.model={text:p.text,hyperlink:p.hyperlink},p.tooltip&&(this.model.tooltip=p.tooltip)}get text(){return this.model.text}set text(p){this.model.text=p}get hyperlink(){return this.model.hyperlink}set hyperlink(p){this.model.hyperlink=p}get type(){return u.Types.Hyperlink}get effectiveType(){return u.Types.Hyperlink}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:u.Types.Formula,f:class{constructor(p,A){this.cell=p,this.model={address:p.address,type:u.Types.Formula,shareType:A?A.shareType:void 0,ref:A?A.ref:void 0,formula:A?A.formula:void 0,sharedFormula:A?A.sharedFormula:void 0,result:A?A.result:void 0}}_copyModel(p){const A={},g=_=>{const b=p[_];b&&(A[_]=b)};return g("formula"),g("result"),g("ref"),g("shareType"),g("sharedFormula"),A}get value(){return this._copyModel(this.model)}set value(p){this.model=this._copyModel(p)}validate(p){switch(c.getType(p)){case u.Types.Null:case u.Types.String:case u.Types.Number:case u.Types.Date:break;case u.Types.Hyperlink:case u.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(p){this.model.formula=p}get formulaType(){return this.model.formula?h.FormulaType.Master:this.model.sharedFormula?h.FormulaType.Shared:h.FormulaType.None}get result(){return this.model.result}set result(p){this.model.result=p}get type(){return u.Types.Formula}get effectiveType(){const p=this.model.result;return p==null?h.ValueType.Null:p instanceof String||typeof p=="string"?h.ValueType.String:typeof p=="number"?h.ValueType.Number:p instanceof Date?h.ValueType.Date:p.text&&p.hyperlink?h.ValueType.Hyperlink:p.formula?h.ValueType.Formula:h.ValueType.Null}get address(){return this.model.address}set address(p){this.model.address=p}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:p}=this.cell,A=p.findCell(this.model.sharedFormula);this._translatedFormula=A&&d(A.formula,A.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:u.Types.Merge,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.Merge,master:A?A.address:void 0},this._master=A,A&&A.addMergeRef()}get value(){return this._master.value}set value(p){p instanceof u?(this._master&&this._master.releaseMergeRef(),p.addMergeRef(),this._master=p):this._master.value=p}isMergedTo(p){return p===this._master}get master(){return this._master}get type(){return u.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:u.Types.JSON,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.String,value:JSON.stringify(A),rawValue:A}}get value(){return this.model.rawValue}set value(p){this.model.rawValue=p,this.model.value=JSON.stringify(p)}get type(){return u.Types.String}get effectiveType(){return u.Types.String}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:u.Types.SharedString,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.SharedString,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}get type(){return u.Types.SharedString}get effectiveType(){return u.Types.SharedString}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.RichText,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.String,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}toString(){return this.model.value.richText.map(p=>p.text).join("")}get type(){return u.Types.RichText}get effectiveType(){return u.Types.RichText}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:u.Types.Boolean,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.Boolean,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}get type(){return u.Types.Boolean}get effectiveType(){return u.Types.Boolean}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.Error,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.Error,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}get type(){return u.Types.Error}get effectiveType(){return u.Types.Error}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((p,A)=>(p[A.t]=A.f,p),[]),create(p,A,g){const _=this.types[p];if(!_)throw new Error("Could not create Value of type "+p);return new _(A,g)}};C.exports=u},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(a,C,S){const v=a("../utils/under-dash"),f=a("./enums"),h=a("../utils/col-cache");class d{constructor(u,c,p){this._worksheet=u,this._number=c,p!==!1&&(this.defn=p)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return h.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(u){u?(this.key=u.key,this.width=u.width!==void 0?u.width:9,this.outlineLevel=u.outlineLevel,u.style?this.style=u.style:this.style={},this.header=u.header,this._hidden=!!u.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(u){u!==void 0?(this._header=u,this.headers.forEach((c,p)=>{this._worksheet.getCell(p+1,this.number).value=c})):this._header=void 0}get key(){return this._key}set key(u){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=u,u&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(u){this._hidden=u}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(u){this._outlineLevel=u}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(u){return this.width===u.width&&this.hidden===u.hidden&&this.outlineLevel===u.outlineLevel&&v.isEqual(this.style,u.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const u=this.style;return!u||!(u.font||u.numFmt||u.alignment||u.border||u.fill||u.protection)}get headerCount(){return this.headers.length}eachCell(u,c){const p=this.number;c||(c=u,u=null),this._worksheet.eachRow(u,(A,g)=>{c(A.getCell(p),g)})}get values(){const u=[];return this.eachCell((c,p)=>{c&&c.type!==f.ValueType.Null&&(u[p]=c.value)}),u}set values(u){if(!u)return;const c=this.number;let p=0;u.hasOwnProperty("0")&&(p=1),u.forEach((A,g)=>{this._worksheet.getCell(g+p,c).value=A})}_applyStyle(u,c){return this.style[u]=c,this.eachCell(p=>{p[u]=c}),c}get numFmt(){return this.style.numFmt}set numFmt(u){this._applyStyle("numFmt",u)}get font(){return this.style.font}set font(u){this._applyStyle("font",u)}get alignment(){return this.style.alignment}set alignment(u){this._applyStyle("alignment",u)}get protection(){return this.style.protection}set protection(u){this._applyStyle("protection",u)}get border(){return this.style.border}set border(u){this._applyStyle("border",u)}get fill(){return this.style.fill}set fill(u){this._applyStyle("fill",u)}static toModel(u){const c=[];let p=null;return u&&u.forEach((A,g)=>{A.isDefault?p&&(p=null):p&&A.equivalentTo(p)?p.max=g+1:(p={min:g+1,max:g+1,width:A.width!==void 0?A.width:9,style:A.style,isCustomWidth:A.isCustomWidth,hidden:A.hidden,outlineLevel:A.outlineLevel,collapsed:A.collapsed},c.push(p))}),c.length?c:void 0}static fromModel(u,c){const p=[];let A=1,g=0;for(c=(c=c||[]).sort(function(_,b){return _.min-b.min});g<c.length;){const _=c[g++];for(;A<_.min;)p.push(new d(u,A++));for(;A<=_.max;)p.push(new d(u,A++,_))}return p.length?p:null}}C.exports=d},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(a,C,S){C.exports=class{constructor(v){this.model=v||{}}add(v,f){return this.model[v]=f}find(v){return this.model[v]}remove(v){this.model[v]=void 0}}},{}],6:[function(a,C,S){const v=a("../utils/under-dash"),f=a("../utils/col-cache"),h=a("../utils/cell-matrix"),d=a("./range"),l=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;C.exports=class{constructor(){this.matrixMap={}}getMatrix(u){return this.matrixMap[u]||(this.matrixMap[u]=new h)}add(u,c){const p=f.decodeEx(u);this.addEx(p,c)}addEx(u,c){const p=this.getMatrix(c);if(u.top)for(let A=u.left;A<=u.right;A++)for(let g=u.top;g<=u.bottom;g++){const _={sheetName:u.sheetName,address:f.n2l(A)+g,row:g,col:A};p.addCellEx(_)}else p.addCellEx(u)}remove(u,c){const p=f.decodeEx(u);this.removeEx(p,c)}removeEx(u,c){this.getMatrix(c).removeCellEx(u)}removeAllNames(u){v.each(this.matrixMap,c=>{c.removeCellEx(u)})}forEach(u){v.each(this.matrixMap,(c,p)=>{c.forEach(A=>{u(p,A)})})}getNames(u){return this.getNamesEx(f.decodeEx(u))}getNamesEx(u){return v.map(this.matrixMap,(c,p)=>c.findCellEx(u)&&p).filter(Boolean)}_explore(u,c){c.mark=!1;const{sheetName:p}=c,A=new d(c.row,c.col,c.row,c.col,p);let g,_;function b(B,k){const T=u.findCellAt(p,B,c.col);return!(!T||!T.mark)&&(A[k]=B,T.mark=!1,!0)}for(_=c.row-1;b(_,"top");_--);for(_=c.row+1;b(_,"bottom");_++);function w(B,k){const T=[];for(_=A.top;_<=A.bottom;_++){const L=u.findCellAt(p,_,B);if(!L||!L.mark)return!1;T.push(L)}A[k]=B;for(let L=0;L<T.length;L++)T[L].mark=!1;return!0}for(g=c.col-1;w(g,"left");g--);for(g=c.col+1;w(g,"right");g++);return A}getRanges(u,c){return(c=c||this.matrixMap[u])?(c.forEach(p=>{p.mark=!0}),{name:u,ranges:c.map(p=>p.mark&&this._explore(c,p)).filter(Boolean).map(p=>p.$shortRange)}):{name:u,ranges:[]}}normaliseMatrix(u,c){u.forEachInSheet(c,(p,A,g)=>{p&&(p.row===A&&p.col===g||(p.row=A,p.col=g,p.address=f.n2l(g)+A))})}spliceRows(u,c,p,A){v.each(this.matrixMap,g=>{g.spliceRows(u,c,p,A),this.normaliseMatrix(g,u)})}spliceColumns(u,c,p,A){v.each(this.matrixMap,g=>{g.spliceColumns(u,c,p,A),this.normaliseMatrix(g,u)})}get model(){return v.map(this.matrixMap,(u,c)=>this.getRanges(c,u)).filter(u=>u.ranges.length)}set model(u){const c=this.matrixMap={};u.forEach(p=>{const A=c[p.name]=new h;p.ranges.forEach(g=>{l.test(g.split("!").pop()||"")&&A.addCell(g)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(a,C,S){C.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(a,C,S){const v=a("../utils/col-cache"),f=a("./anchor");C.exports=class{constructor(h,d){this.worksheet=h,this.model=d}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(h){let{type:d,imageId:l,range:u,hyperlinks:c}=h;if(this.type=d,this.imageId=l,d==="image")if(typeof u=="string"){const p=v.decode(u);this.range={tl:new f(this.worksheet,{col:p.left,row:p.top},-1),br:new f(this.worksheet,{col:p.right,row:p.bottom},0),editAs:"oneCell"}}else this.range={tl:new f(this.worksheet,u.tl,0),br:u.br&&new f(this.worksheet,u.br,0),ext:u.ext,editAs:u.editAs,hyperlinks:c||u.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(a,C,S){const v=a("../utils/under-dash");class f{constructor(d){this.note=d}get model(){let d=null;switch(typeof this.note){case"string":d={type:"note",note:{texts:[{text:this.note}]}};break;default:d={type:"note",note:this.note}}return v.deepMerge({},f.DEFAULT_CONFIGS,d)}set model(d){const{note:l}=d,{texts:u}=l;u.length===1&&Object.keys(u[0]).length===1?this.note=u[0].text:this.note=l}static fromModel(d){const l=new f;return l.model=d,l}}f.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},C.exports=f},{"../utils/under-dash":26}],10:[function(a,C,S){const v=a("../utils/col-cache");class f{constructor(){this.decode(arguments)}setTLBR(d,l,u,c,p){if(arguments.length<4){const A=v.decodeAddress(d),g=v.decodeAddress(l);this.model={top:Math.min(A.row,g.row),left:Math.min(A.col,g.col),bottom:Math.max(A.row,g.row),right:Math.max(A.col,g.col),sheetName:u},this.setTLBR(A.row,A.col,g.row,g.col,p)}else this.model={top:Math.min(d,u),left:Math.min(l,c),bottom:Math.max(d,u),right:Math.max(l,c),sheetName:p}}decode(d){switch(d.length){case 5:this.setTLBR(d[0],d[1],d[2],d[3],d[4]);break;case 4:this.setTLBR(d[0],d[1],d[2],d[3]);break;case 3:this.setTLBR(d[0],d[1],d[2]);break;case 2:this.setTLBR(d[0],d[1]);break;case 1:{const l=d[0];if(l instanceof f)this.model={top:l.model.top,left:l.model.left,bottom:l.model.bottom,right:l.model.right,sheetName:l.sheetName};else if(l instanceof Array)this.decode(l);else if(l.top&&l.left&&l.bottom&&l.right)this.model={top:l.top,left:l.left,bottom:l.bottom,right:l.right,sheetName:l.sheetName};else{const u=v.decodeEx(l);u.top?this.model={top:u.top,left:u.left,bottom:u.bottom,right:u.right,sheetName:u.sheetName}:this.model={top:u.row,left:u.col,bottom:u.row,right:u.col,sheetName:u.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+d.length)}}get top(){return this.model.top||1}set top(d){this.model.top=d}get left(){return this.model.left||1}set left(d){this.model.left=d}get bottom(){return this.model.bottom||1}set bottom(d){this.model.bottom=d}get right(){return this.model.right||1}set right(d){this.model.right=d}get sheetName(){return this.model.sheetName}set sheetName(d){this.model.sheetName=d}get _serialisedSheetName(){const{sheetName:d}=this.model;return d?/^[a-zA-Z0-9]*$/.test(d)?d+"!":`'${d}'!`:""}expand(d,l,u,c){(!this.model.top||d<this.top)&&(this.top=d),(!this.model.left||l<this.left)&&(this.left=l),(!this.model.bottom||u>this.bottom)&&(this.bottom=u),(!this.model.right||c>this.right)&&(this.right=c)}expandRow(d){if(d){const{dimensions:l,number:u}=d;l&&this.expand(u,l.min,u,l.max)}}expandToAddress(d){const l=v.decodeEx(d);this.expand(l.row,l.col,l.row,l.col)}get tl(){return v.n2l(this.left)+this.top}get $t$l(){return`$${v.n2l(this.left)}$${this.top}`}get br(){return v.n2l(this.right)+this.bottom}get $b$r(){return`$${v.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(d){return(!d.sheetName||!this.sheetName||d.sheetName===this.sheetName)&&!(d.bottom<this.top)&&!(d.top>this.bottom)&&!(d.right<this.left)&&!(d.left>this.right)}contains(d){const l=v.decodeEx(d);return this.containsEx(l)}containsEx(d){return(!d.sheetName||!this.sheetName||d.sheetName===this.sheetName)&&d.row>=this.top&&d.row<=this.bottom&&d.col>=this.left&&d.col<=this.right}forEachAddress(d){for(let l=this.left;l<=this.right;l++)for(let u=this.top;u<=this.bottom;u++)d(v.encodeAddress(u,l),u,l)}}C.exports=f},{"../utils/col-cache":19}],11:[function(a,C,S){const v=a("../utils/under-dash"),f=a("./enums"),h=a("../utils/col-cache"),d=a("./cell");C.exports=class{constructor(l,u){this._worksheet=l,this._number=u,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(l){return this._cells[l-1]}getCellEx(l){let u=this._cells[l.col-1];if(!u){const c=this._worksheet.getColumn(l.col);u=new d(this,c,l.address),this._cells[l.col-1]=u}return u}getCell(l){if(typeof l=="string"){const u=this._worksheet.getColumnKey(l);l=u?u.number:h.l2n(l)}return this._cells[l-1]||this.getCellEx({address:h.encodeAddress(this._number,l),row:this._number,col:l})}splice(l,u){const c=l+u;for(var p=arguments.length,A=new Array(p>2?p-2:0),g=2;g<p;g++)A[g-2]=arguments[g];const _=A.length-u,b=this._cells.length;let w,B,k;if(_<0)for(w=l+A.length;w<=b;w++)k=this._cells[w-1],B=this._cells[w-_-1],B?(k=this.getCell(w),k.value=B.value,k.style=B.style,k._comment=B._comment):k&&(k.value=null,k.style={},k._comment=void 0);else if(_>0)for(w=b;w>=c;w--)B=this._cells[w-1],B?(k=this.getCell(w+_),k.value=B.value,k.style=B.style,k._comment=B._comment):this._cells[w+_-1]=void 0;for(w=0;w<A.length;w++)k=this.getCell(l+w),k.value=A[w],k.style={},k._comment=void 0}eachCell(l,u){if(u||(u=l,l=null),l&&l.includeEmpty){const c=this._cells.length;for(let p=1;p<=c;p++)u(this.getCell(p),p)}else this._cells.forEach((c,p)=>{c&&c.type!==f.ValueType.Null&&u(c,p+1)})}addPageBreak(l,u){const c=this._worksheet,p=Math.max(0,l-1)||0,A=Math.max(0,u-1)||16838,g={id:this._number,max:A,man:1};p&&(g.min=p),c.rowBreaks.push(g)}get values(){const l=[];return this._cells.forEach(u=>{u&&u.type!==f.ValueType.Null&&(l[u.col]=u.value)}),l}set values(l){if(this._cells=[],l)if(l instanceof Array){let u=0;l.hasOwnProperty("0")&&(u=1),l.forEach((c,p)=>{c!==void 0&&(this.getCellEx({address:h.encodeAddress(this._number,p+u),row:this._number,col:p+u}).value=c)})}else this._worksheet.eachColumnKey((u,c)=>{l[c]!==void 0&&(this.getCellEx({address:h.encodeAddress(this._number,u.number),row:this._number,col:u.number}).value=l[c])})}get hasValues(){return v.some(this._cells,l=>l&&l.type!==f.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let l=0;return this.eachCell(()=>{l++}),l}get dimensions(){let l=0,u=0;return this._cells.forEach(c=>{c&&c.type!==f.ValueType.Null&&((!l||l>c.col)&&(l=c.col),u<c.col&&(u=c.col))}),l>0?{min:l,max:u}:null}_applyStyle(l,u){return this.style[l]=u,this._cells.forEach(c=>{c&&(c[l]=u)}),u}get numFmt(){return this.style.numFmt}set numFmt(l){this._applyStyle("numFmt",l)}get font(){return this.style.font}set font(l){this._applyStyle("font",l)}get alignment(){return this.style.alignment}set alignment(l){this._applyStyle("alignment",l)}get protection(){return this.style.protection}set protection(l){this._applyStyle("protection",l)}get border(){return this.style.border}set border(l){this._applyStyle("border",l)}get fill(){return this.style.fill}set fill(l){this._applyStyle("fill",l)}get hidden(){return!!this._hidden}set hidden(l){this._hidden=l}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(l){this._outlineLevel=l}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const l=[];let u=0,c=0;return this._cells.forEach(p=>{if(p){const A=p.model;A&&((!u||u>p.col)&&(u=p.col),c<p.col&&(c=p.col),l.push(A))}}),this.height||l.length?{cells:l,number:this.number,min:u,max:c,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(l){if(l.number!==this._number)throw new Error("Invalid row number in model");let u;this._cells=[],l.cells.forEach(c=>{switch(c.type){case d.Types.Merge:break;default:{let p;if(c.address)p=h.decodeAddress(c.address);else if(u){const{row:A}=u,g=u.col+1;p={row:A,col:g,address:h.encodeAddress(A,g),$col$row:`$${h.n2l(g)}$${A}`}}u=p,this.getCellEx(p).model=c;break}}}),l.height?this.height=l.height:delete this.height,this.hidden=l.hidden,this.outlineLevel=l.outlineLevel||0,this.style=l.style&&JSON.parse(JSON.stringify(l.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(a,C,S){const v=a("../utils/col-cache");class f{constructor(d,l,u){this.table=d,this.column=l,this.index=u}_set(d,l){this.table.cacheState(),this.column[d]=l}get name(){return this.column.name}set name(d){this._set("name",d)}get filterButton(){return this.column.filterButton}set filterButton(d){this.column.filterButton=d}get style(){return this.column.style}set style(d){this.column.style=d}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(d){this._set("totalsRowLabel",d)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(d){this._set("totalsRowFunction",d)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(d){this._set("totalsRowResult",d)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(d){this._set("totalsRowFormula",d)}}C.exports=class{constructor(h,d){this.worksheet=h,d&&(this.table=d,this.validate(),this.store())}getFormula(h){switch(h.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${h.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${h.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${h.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${h.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${h.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${h.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${h.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${h.name}])`;case"custom":return h.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+h.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){const{table:h}=this,d=(_,b,w)=>{_[b]===void 0&&(_[b]=w)};d(h,"headerRow",!0),d(h,"totalsRow",!1),d(h,"style",{}),d(h.style,"theme","TableStyleMedium2"),d(h.style,"showFirstColumn",!1),d(h.style,"showLastColumn",!1),d(h.style,"showRowStripes",!1),d(h.style,"showColumnStripes",!1);const l=(_,b)=>{if(!_)throw new Error(b)};l(h.ref,"Table must have ref"),l(h.columns,"Table must have column definitions"),l(h.rows,"Table must have row definitions"),h.tl=v.decodeAddress(h.ref);const{row:u,col:c}=h.tl;l(u>0,"Table must be on valid row"),l(c>0,"Table must be on valid col");const{width:p,filterHeight:A,tableHeight:g}=this;h.autoFilterRef=v.encode(u,c,u+A-1,c+p-1),h.tableRef=v.encode(u,c,u+g-1,c+p-1),h.columns.forEach((_,b)=>{l(_.name,`Column ${b} must have a name`),b===0?d(_,"totalsRowLabel","Total"):(d(_,"totalsRowFunction","none"),_.totalsRowFormula=this.getFormula(_))})}store(){const h=(A,g)=>{g&&Object.keys(g).forEach(_=>{A[_]=g[_]})},{worksheet:d,table:l}=this,{row:u,col:c}=l.tl;let p=0;if(l.headerRow){const A=d.getRow(u+p++);l.columns.forEach((g,_)=>{const{style:b,name:w}=g,B=A.getCell(c+_);B.value=w,h(B,b)})}if(l.rows.forEach(A=>{const g=d.getRow(u+p++);A.forEach((_,b)=>{const w=g.getCell(c+b);w.value=_,h(w,l.columns[b].style)})}),l.totalsRow){const A=d.getRow(u+p++);l.columns.forEach((g,_)=>{const b=A.getCell(c+_);if(_===0)b.value=g.totalsRowLabel;else{const w=this.getFormula(g);b.value=w?{formula:g.totalsRowFormula,result:g.totalsRowResult}:null}h(b,g.style)})}}load(h){const{table:d}=this,{row:l,col:u}=d.tl;let c=0;if(d.headerRow){const p=h.getRow(l+c++);d.columns.forEach((A,g)=>{p.getCell(u+g).value=A.name})}if(d.rows.forEach(p=>{const A=h.getRow(l+c++);p.forEach((g,_)=>{A.getCell(u+_).value=g})}),d.totalsRow){const p=h.getRow(l+c++);d.columns.forEach((A,g)=>{const _=p.getCell(u+g);g===0?_.value=A.totalsRowLabel:this.getFormula(A)&&(_.value={formula:A.totalsRowFormula,result:A.totalsRowResult})})}}get model(){return this.table}set model(h){this.table=h}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const h=v.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let d=0;d<this._cache.tableHeight;d++){const l=this.worksheet.getRow(h.row+d);for(let u=0;u<this._cache.width;u++)l.getCell(h.col+u).value=null}else{for(let d=this.tableHeight;d<this._cache.tableHeight;d++){const l=this.worksheet.getRow(h.row+d);for(let u=0;u<this._cache.width;u++)l.getCell(h.col+u).value=null}for(let d=0;d<this.tableHeight;d++){const l=this.worksheet.getRow(h.row+d);for(let u=this.width;u<this._cache.width;u++)l.getCell(h.col+u).value=null}}this.store()}addRow(h,d){this.cacheState(),d===void 0?this.table.rows.push(h):this.table.rows.splice(d,0,h)}removeRows(h){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(h,d)}getColumn(h){const d=this.table.columns[h];return new f(this,d,h)}addColumn(h,d,l){this.cacheState(),l===void 0?(this.table.columns.push(h),this.table.rows.forEach((u,c)=>{u.push(d[c])})):(this.table.columns.splice(l,0,h),this.table.rows.forEach((u,c)=>{u.splice(l,0,d[c])}))}removeColumns(h){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(h,d),this.table.rows.forEach(l=>{l.splice(h,d)})}_assign(h,d,l){this.cacheState(),h[d]=l}get ref(){return this.table.ref}set ref(h){this._assign(this.table,"ref",h)}get name(){return this.table.name}set name(h){this.table.name=h}get displayName(){return this.table.displyName||this.table.name}set displayNamename(h){this.table.displayName=h}get headerRow(){return this.table.headerRow}set headerRow(h){this._assign(this.table,"headerRow",h)}get totalsRow(){return this.table.totalsRow}set totalsRow(h){this._assign(this.table,"totalsRow",h)}get theme(){return this.table.style.name}set theme(h){this.table.style.name=h}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(h){this.table.style.showFirstColumn=h}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(h){this.table.style.showLastColumn=h}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(h){this.table.style.showRowStripes=h}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(h){this.table.style.showColumnStripes=h}}},{"../utils/col-cache":19}],13:[function(a,C,S){const v=a("./worksheet"),f=a("./defined-names"),h=a("../xlsx/xlsx"),d=a("../csv/csv");C.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new f}get xlsx(){return this._xlsx||(this._xlsx=new h(this)),this._xlsx}get csv(){return this._csv||(this._csv=new d(this)),this._csv}get nextId(){for(let l=1;l<this._worksheets.length;l++)if(!this._worksheets[l])return l;return this._worksheets.length||1}addWorksheet(l,u){const c=this.nextId;u&&(typeof u=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),u={properties:{tabColor:{argb:u}}}):(u.argb||u.theme||u.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),u={properties:{tabColor:u}}));const p=this._worksheets.reduce((_,b)=>(b&&b.orderNo)>_?b.orderNo:_,0),A=Object.assign({},u,{id:c,name:l,orderNo:p+1,workbook:this}),g=new v(A);return this._worksheets[c]=g,g}removeWorksheetEx(l){delete this._worksheets[l.id]}removeWorksheet(l){const u=this.getWorksheet(l);u&&u.destroy()}getWorksheet(l){return l===void 0?this._worksheets.find(Boolean):typeof l=="number"?this._worksheets[l]:typeof l=="string"?this._worksheets.find(u=>u&&u.name===l):void 0}get worksheets(){return this._worksheets.slice(1).sort((l,u)=>l.orderNo-u.orderNo).filter(Boolean)}eachSheet(l){this.worksheets.forEach(u=>{l(u,u.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(l){const u=this.media.length;return this.media.push(Object.assign({},l,{type:"image"})),u}getImage(l){return this.media[l]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(l=>l.model),sheets:this.worksheets.map(l=>l.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(l){this.creator=l.creator,this.lastModifiedBy=l.lastModifiedBy,this.lastPrinted=l.lastPrinted,this.created=l.created,this.modified=l.modified,this.company=l.company,this.manager=l.manager,this.title=l.title,this.subject=l.subject,this.keywords=l.keywords,this.category=l.category,this.description=l.description,this.language=l.language,this.revision=l.revision,this.contentStatus=l.contentStatus,this.properties=l.properties,this.calcProperties=l.calcProperties,this._worksheets=[],l.worksheets.forEach(u=>{const{id:c,name:p,state:A}=u,g=l.sheets&&l.sheets.findIndex(_=>_.id===c);(this._worksheets[c]=new v({id:c,name:p,orderNo:g,state:A,workbook:this})).model=u}),this._definedNames.model=l.definedNames,this.views=l.views,this._themes=l.themes,this.media=l.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(a,C,S){const v=a("../utils/under-dash"),f=a("../utils/col-cache"),h=a("./range"),d=a("./row"),l=a("./column"),u=a("./enums"),c=a("./image"),p=a("./table"),A=a("./data-validations"),g=a("../utils/encryptor"),{copyStyle:_}=a("../utils/copy-style");C.exports=class{constructor(b){b=b||{},this._workbook=b.workbook,this.id=b.id,this.orderNo=b.orderNo,this.name=b.name,this.state=b.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},b.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!b.pageSetup||!b.pageSetup.fitToWidth&&!b.pageSetup.fitToHeight||b.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},b.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},b.headerFooter),this.dataValidations=new A,this.views=b.views||[],this.autoFilter=b.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(b){if(b===void 0&&(b="sheet"+this.id),this._name!==b){if(typeof b!="string")throw new Error("The name has to be a string.");if(b==="")throw new Error("The name can't be empty.");if(b==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(b))throw new Error(`Worksheet name ${b} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(b))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+b);if(b&&b.length>31&&(console.warn(`Worksheet name ${b} exceeds 31 chars. This will be truncated`),b=b.substring(0,31)),this._workbook._worksheets.find(w=>w&&w.name.toLowerCase()===b.toLowerCase()))throw new Error("Worksheet name already exists: "+b);this._name=b}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const b=new h;return this._rows.forEach(w=>{if(w){const B=w.dimensions;B&&b.expand(w.number,B.min,w.number,B.max)}}),b}get columns(){return this._columns}set columns(b){this._headerRowCount=b.reduce((k,T)=>{const L=(T.header?1:T.headers&&T.headers.length)||0;return Math.max(k,L)},0);let w=1;const B=this._columns=[];b.forEach(k=>{const T=new l(this,w++,!1);B.push(T),T.defn=k})}getColumnKey(b){return this._keys[b]}setColumnKey(b,w){this._keys[b]=w}deleteColumnKey(b){delete this._keys[b]}eachColumnKey(b){v.each(this._keys,b)}getColumn(b){if(typeof b=="string"){const w=this._keys[b];if(w)return w;b=f.l2n(b)}if(this._columns||(this._columns=[]),b>this._columns.length){let w=this._columns.length+1;for(;w<=b;)this._columns.push(new l(this,w++))}return this._columns[b-1]}spliceColumns(b,w){const B=this._rows.length;for(var k=arguments.length,T=new Array(k>2?k-2:0),L=2;L<k;L++)T[L-2]=arguments[L];if(T.length>0)for(let j=0;j<B;j++){const $=[b,w];T.forEach(W=>{$.push(W[j]||null)});const X=this.getRow(j+1);X.splice.apply(X,$)}else this._rows.forEach(j=>{j&&j.splice(b,w)});const V=T.length-w,Q=b+w,N=this._columns.length;if(V<0)for(let j=b+T.length;j<=N;j++)this.getColumn(j).defn=this.getColumn(j-V).defn;else if(V>0)for(let j=N;j>=Q;j--)this.getColumn(j+V).defn=this.getColumn(j).defn;for(let j=b;j<b+T.length;j++)this.getColumn(j).defn=null;this.workbook.definedNames.spliceColumns(this.name,b,w,T.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let b=0;return this.eachRow(w=>{b=Math.max(b,w.cellCount)}),b}get actualColumnCount(){const b=[];let w=0;return this.eachRow(B=>{B.eachCell(k=>{let{col:T}=k;b[T]||(b[T]=!0,w++)})}),w}_commitRow(){}get _lastRowNumber(){const b=this._rows;let w=b.length;for(;w>0&&b[w-1]===void 0;)w--;return w}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(b){return this._rows[b-1]}findRows(b,w){return this._rows.slice(b-1,b-1+w)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let b=0;return this.eachRow(()=>{b++}),b}getRow(b){let w=this._rows[b-1];return w||(w=this._rows[b-1]=new d(this,b)),w}getRows(b,w){if(w<1)return;const B=[];for(let k=b;k<b+w;k++)B.push(this.getRow(k));return B}addRow(b){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const B=this._nextRow,k=this.getRow(B);return k.values=b,this._setStyleOption(B,w[0]==="i"?w:"n"),k}addRows(b){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const B=[];return b.forEach(k=>{B.push(this.addRow(k,w))}),B}insertRow(b,w){let B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(b,0,w),this._setStyleOption(b,B),this.getRow(b)}insertRows(b,w){let B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(b,0,...w),B!=="n")for(let k=0;k<w.length;k++)B[0]==="o"&&this.findRow(w.length+b+k)!==void 0?this._copyStyle(w.length+b+k,b+k,B[1]==="+"):B[0]==="i"&&this.findRow(b-1)!==void 0&&this._copyStyle(b-1,b+k,B[1]==="+");return this.getRows(b,w.length)}_setStyleOption(b){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";w[0]==="o"&&this.findRow(b+1)!==void 0?this._copyStyle(b+1,b,w[1]==="+"):w[0]==="i"&&this.findRow(b-1)!==void 0&&this._copyStyle(b-1,b,w[1]==="+")}_copyStyle(b,w){let B=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const k=this.getRow(b),T=this.getRow(w);T.style=_(k.style),k.eachCell({includeEmpty:B},(L,V)=>{T.getCell(V).style=_(L.style)}),T.height=k.height}duplicateRow(b,w){let B=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const k=this._rows[b-1],T=new Array(w).fill(k.values);this.spliceRows(b+1,B?0:w,...T);for(let L=0;L<w;L++){const V=this._rows[b+L];V.style=k.style,V.height=k.height,k.eachCell({includeEmpty:!0},(Q,N)=>{V.getCell(N).style=Q.style})}}spliceRows(b,w){const B=b+w;for(var k=arguments.length,T=new Array(k>2?k-2:0),L=2;L<k;L++)T[L-2]=arguments[L];const V=T.length,Q=V-w,N=this._rows.length;let j,$;if(Q<0)for(b===N&&(this._rows[N-1]=void 0),j=B;j<=N;j++)if($=this._rows[j-1],$){const X=this.getRow(j+Q);X.values=$.values,X.style=$.style,X.height=$.height,$.eachCell({includeEmpty:!0},(W,D)=>{X.getCell(D).style=W.style}),this._rows[j-1]=void 0}else this._rows[j+Q-1]=void 0;else if(Q>0)for(j=N;j>=B;j--)if($=this._rows[j-1],$){const X=this.getRow(j+Q);X.values=$.values,X.style=$.style,X.height=$.height,$.eachCell({includeEmpty:!0},(W,D)=>{if(X.getCell(D).style=W.style,W._value.constructor.name==="MergeValue"){const z=this.getRow(W._row._number+V).getCell(D),M=W._value._master,R=this.getRow(M._row._number+V).getCell(M._column._number);z.merge(R)}})}else this._rows[j+Q-1]=void 0;for(j=0;j<V;j++){const X=this.getRow(b+j);X.style={},X.values=T[j]}this.workbook.definedNames.spliceRows(this.name,b,w,V)}eachRow(b,w){if(w||(w=b,b=void 0),b&&b.includeEmpty){const B=this._rows.length;for(let k=1;k<=B;k++)w(this.getRow(k),k)}else this._rows.forEach(B=>{B&&B.hasValues&&w(B,B.number)})}getSheetValues(){const b=[];return this._rows.forEach(w=>{w&&(b[w.number]=w.values)}),b}findCell(b,w){const B=f.getAddress(b,w),k=this._rows[B.row-1];return k?k.findCell(B.col):void 0}getCell(b,w){const B=f.getAddress(b,w);return this.getRow(B.row).getCellEx(B)}mergeCells(){for(var b=arguments.length,w=new Array(b),B=0;B<b;B++)w[B]=arguments[B];const k=new h(w);this._mergeCellsInternal(k)}mergeCellsWithoutStyle(){for(var b=arguments.length,w=new Array(b),B=0;B<b;B++)w[B]=arguments[B];const k=new h(w);this._mergeCellsInternal(k,!0)}_mergeCellsInternal(b,w){v.each(this._merges,k=>{if(k.intersects(b))throw new Error("Cannot merge already merged cells")});const B=this.getCell(b.top,b.left);for(let k=b.top;k<=b.bottom;k++)for(let T=b.left;T<=b.right;T++)(k>b.top||T>b.left)&&this.getCell(k,T).merge(B,w);this._merges[B.address]=b}_unMergeMaster(b){const w=this._merges[b.address];if(w){for(let B=w.top;B<=w.bottom;B++)for(let k=w.left;k<=w.right;k++)this.getCell(B,k).unmerge();delete this._merges[b.address]}}get hasMerges(){return v.some(this._merges,Boolean)}unMergeCells(){for(var b=arguments.length,w=new Array(b),B=0;B<b;B++)w[B]=arguments[B];const k=new h(w);for(let T=k.top;T<=k.bottom;T++)for(let L=k.left;L<=k.right;L++){const V=this.findCell(T,L);V&&(V.type===u.ValueType.Merge?this._unMergeMaster(V.master):this._merges[V.address]&&this._unMergeMaster(V))}}fillFormula(b,w,B){let k=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared";const T=f.decode(b),{top:L,left:V,bottom:Q,right:N}=T,j=N-V+1,$=f.encodeAddress(L,V),X=k==="shared";let W;W=typeof B=="function"?B:Array.isArray(B)?Array.isArray(B[0])?(z,M)=>B[z-L][M-V]:(z,M)=>B[(z-L)*j+(M-V)]:()=>{};let D=!0;for(let z=L;z<=Q;z++)for(let M=V;M<=N;M++)D?(this.getCell(z,M).value={shareType:k,formula:w,ref:b,result:W(z,M)},D=!1):this.getCell(z,M).value=X?{sharedFormula:$,result:W(z,M)}:W(z,M)}addImage(b,w){const B={type:"image",imageId:b,range:w};this._media.push(new c(this,B))}getImages(){return this._media.filter(b=>b.type==="image")}addBackgroundImage(b){const w={type:"background",imageId:b};this._media.push(new c(this,w))}getBackgroundImageId(){const b=this._media.find(w=>w.type==="background");return b&&b.imageId}protect(b,w){return new Promise(B=>{this.sheetProtection={sheet:!0},w&&"spinCount"in w&&(w.spinCount=Number.isFinite(w.spinCount)?Math.round(Math.max(0,w.spinCount)):1e5),b&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=g.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=w&&"spinCount"in w?w.spinCount:1e5,this.sheetProtection.hashValue=g.convertPasswordToHash(b,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),w&&(this.sheetProtection=Object.assign(this.sheetProtection,w),!b&&"spinCount"in w&&delete this.sheetProtection.spinCount),B()})}unprotect(){this.sheetProtection=null}addTable(b){const w=new p(this,b);return this.tables[b.name]=w,w}getTable(b){return this.tables[b]}removeTable(b){delete this.tables[b]}getTables(){return Object.values(this.tables)}addConditionalFormatting(b){this.conditionalFormattings.push(b)}removeConditionalFormatting(b){typeof b=="number"?this.conditionalFormattings.splice(b,1):this.conditionalFormattings=b instanceof Function?this.conditionalFormattings.filter(b):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(b){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=b}get model(){const b={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(k=>k.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(k=>k.model),conditionalFormattings:this.conditionalFormattings};b.cols=l.toModel(this.columns);const w=b.rows=[],B=b.dimensions=new h;return this._rows.forEach(k=>{const T=k&&k.model;T&&(B.expand(T.number,T.min,T.number,T.max),w.push(T))}),b.merges=[],v.each(this._merges,k=>{b.merges.push(k.range)}),b}_parseRows(b){this._rows=[],b.rows.forEach(w=>{const B=new d(this,w.number);this._rows[B.number-1]=B,B.model=w})}_parseMergeCells(b){v.each(b.mergeCells,w=>{this.mergeCellsWithoutStyle(w)})}set model(b){this.name=b.name,this._columns=l.fromModel(this,b.cols),this._parseRows(b),this._parseMergeCells(b),this.dataValidations=new A(b.dataValidations),this.properties=b.properties,this.pageSetup=b.pageSetup,this.headerFooter=b.headerFooter,this.views=b.views,this.autoFilter=b.autoFilter,this._media=b.media.map(w=>new c(this,w)),this.sheetProtection=b.sheetProtection,this.tables=b.tables.reduce((w,B)=>{const k=new p;return k.model=B,w[B.name]=k,w},{}),this.conditionalFormattings=b.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(a,C,S){a("core-js/modules/es.promise"),a("core-js/modules/es.promise.finally"),a("core-js/modules/es.object.assign"),a("core-js/modules/es.object.keys"),a("core-js/modules/es.object.values"),a("core-js/modules/es.symbol"),a("core-js/modules/es.symbol.async-iterator"),a("core-js/modules/es.array.iterator"),a("core-js/modules/es.array.includes"),a("core-js/modules/es.array.find-index"),a("core-js/modules/es.array.find"),a("core-js/modules/es.string.from-code-point"),a("core-js/modules/es.string.includes"),a("core-js/modules/es.number.is-nan"),a("regenerator-runtime/runtime");const v={Workbook:a("./doc/workbook")},f=a("./doc/enums");Object.keys(f).forEach(h=>{v[h]=f[h]}),C.exports=v},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(a,C,S){const v=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");S.bufferToString=function(f){return typeof f=="string"?f:v?v.decode(f):f.toString()}},{}],17:[function(a,C,S){const v=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:f}=a("buffer");S.stringToBuffer=function(h){return typeof h!="string"?h:v?f.from(v.encode(h).buffer):f.from(h)}},{buffer:220}],18:[function(a,C,S){const v=a("./under-dash"),f=a("./col-cache");C.exports=class{constructor(h){this.template=h,this.sheets={}}addCell(h){this.addCellEx(f.decodeEx(h))}getCell(h){return this.findCellEx(f.decodeEx(h),!0)}findCell(h){return this.findCellEx(f.decodeEx(h),!1)}findCellAt(h,d,l){const u=this.sheets[h],c=u&&u[d];return c&&c[l]}addCellEx(h){if(h.top)for(let d=h.top;d<=h.bottom;d++)for(let l=h.left;l<=h.right;l++)this.getCellAt(h.sheetName,d,l);else this.findCellEx(h,!0)}getCellEx(h){return this.findCellEx(h,!0)}findCellEx(h,d){const l=this.findSheet(h,d),u=this.findSheetRow(l,h,d);return this.findRowCell(u,h,d)}getCellAt(h,d,l){const u=this.sheets[h]||(this.sheets[h]=[]),c=u[d]||(u[d]=[]);return c[l]||(c[l]={sheetName:h,address:f.n2l(l)+d,row:d,col:l})}removeCellEx(h){const d=this.findSheet(h);if(!d)return;const l=this.findSheetRow(d,h);l&&delete l[h.col]}forEachInSheet(h,d){const l=this.sheets[h];l&&l.forEach((u,c)=>{u&&u.forEach((p,A)=>{p&&d(p,c,A)})})}forEach(h){v.each(this.sheets,(d,l)=>{this.forEachInSheet(l,h)})}map(h){const d=[];return this.forEach(l=>{d.push(h(l))}),d}findSheet(h,d){const l=h.sheetName;return this.sheets[l]?this.sheets[l]:d?this.sheets[l]=[]:void 0}findSheetRow(h,d,l){const{row:u}=d;return h&&h[u]?h[u]:l?h[u]=[]:void 0}findRowCell(h,d,l){const{col:u}=d;return h&&h[u]?h[u]:l?h[u]=this.template?Object.assign(d,JSON.parse(JSON.stringify(this.template))):d:void 0}spliceRows(h,d,l,u){const c=this.sheets[h];if(c){const p=[];for(let A=0;A<u;A++)p.push([]);c.splice(d,l,...p)}}spliceColumns(h,d,l,u){const c=this.sheets[h];if(c){const p=[];for(let A=0;A<u;A++)p.push(null);v.each(c,A=>{A.splice(d,l,...p)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(a,C,S){const v=/^[A-Z]+\d+$/,f={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:h=>h<=26?1:h<=676?2:3,_fill(h){let d,l,u,c,p,A=1;if(h>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&h>=1){for(;A<=26;)d=this._dictionary[A-1],this._n2l[A]=d,this._l2n[d]=A,A++;this._l2nFill=1}if(this._l2nFill<2&&h>=2){for(A=27;A<=702;)l=A-27,u=l%26,c=Math.floor(l/26),d=this._dictionary[c]+this._dictionary[u],this._n2l[A]=d,this._l2n[d]=A,A++;this._l2nFill=2}if(this._l2nFill<3&&h>=3){for(A=703;A<=16384;)l=A-703,u=l%26,c=Math.floor(l/26)%26,p=Math.floor(l/676),d=this._dictionary[p]+this._dictionary[c]+this._dictionary[u],this._n2l[A]=d,this._l2n[d]=A,A++;this._l2nFill=3}},l2n(h){if(this._l2n[h]||this._fill(h.length),!this._l2n[h])throw new Error("Out of bounds. Invalid column letter: "+h);return this._l2n[h]},n2l(h){if(h<1||h>16384)throw new Error(h+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[h]||this._fill(this._level(h)),this._n2l[h]},_hash:{},validateAddress(h){if(!v.test(h))throw new Error("Invalid Address: "+h);return!0},decodeAddress(h){const d=h.length<5&&this._hash[h];if(d)return d;let l=!1,u="",c=0,p=!1,A="",g=0;for(let b,w=0;w<h.length;w++)if(b=h.charCodeAt(w),!p&&b>=65&&b<=90)l=!0,u+=h[w],c=26*c+b-64;else if(b>=48&&b<=57)p=!0,A+=h[w],g=10*g+b-48;else if(p&&l&&b!==36)break;if(l){if(c>16384)throw new Error("Out of bounds. Invalid column letter: "+u)}else c=void 0;p||(g=void 0);const _={address:h=u+A,col:c,row:g,$col$row:`$${u}$${A}`};return c<=100&&g<=100&&(this._hash[h]=_,this._hash[_.$col$row]=_),_},getAddress(h,d){if(d){const l=this.n2l(d)+h;return this.decodeAddress(l)}return this.decodeAddress(h)},decode(h){const d=h.split(":");if(d.length===2){const l=this.decodeAddress(d[0]),u=this.decodeAddress(d[1]),c={top:Math.min(l.row,u.row),left:Math.min(l.col,u.col),bottom:Math.max(l.row,u.row),right:Math.max(l.col,u.col)};return c.tl=this.n2l(c.left)+c.top,c.br=this.n2l(c.right)+c.bottom,c.dimensions=`${c.tl}:${c.br}`,c}return this.decodeAddress(h)},decodeEx(h){const d=h.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),l=d[1]||d[2],u=d[3],c=u.split(":");if(c.length>1){let A=this.decodeAddress(c[0]),g=this.decodeAddress(c[1]);const _=Math.min(A.row,g.row),b=Math.min(A.col,g.col),w=Math.max(A.row,g.row),B=Math.max(A.col,g.col);return A=this.n2l(b)+_,g=this.n2l(B)+w,{top:_,left:b,bottom:w,right:B,sheetName:l,tl:{address:A,col:b,row:_,$col$row:`$${this.n2l(b)}$${_}`,sheetName:l},br:{address:g,col:B,row:w,$col$row:`$${this.n2l(B)}$${w}`,sheetName:l},dimensions:`${A}:${g}`}}if(u.startsWith("#"))return l?{sheetName:l,error:u}:{error:u};const p=this.decodeAddress(u);return l?{sheetName:l,...p}:p},encodeAddress:(h,d)=>f.n2l(d)+h,encode(){switch(arguments.length){case 2:return f.encodeAddress(arguments[0],arguments[1]);case 4:return`${f.encodeAddress(arguments[0],arguments[1])}:${f.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(h,d){const[l,u,,c,p]=h,[A,g]=d;return A>=l&&A<=c&&g>=u&&g<=p}};C.exports=f},{}],20:[function(a,C,S){const v=(h,d)=>({...h,...d.reduce((l,u)=>(h[u]&&(l[u]={...h[u]}),l),{})}),f=function(h,d,l){let u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];h[l]&&(d[l]=v(h[l],u))};S.copyStyle=h=>{if(!h)return h;if(d=h,Object.keys(d).length===0)return{};var d;const l={...h};return f(h,l,"font",["color"]),f(h,l,"alignment"),f(h,l,"protection"),h.border&&(f(h,l,"border"),f(h.border,l.border,"top",["color"]),f(h.border,l.border,"left",["color"]),f(h.border,l.border,"bottom",["color"]),f(h.border,l.border,"right",["color"]),f(h.border,l.border,"diagonal",["color"])),h.fill&&(f(h,l,"fill",["fgColor","bgColor","center"]),h.fill.stops&&(l.fill.stops=h.fill.stops.map(u=>v(u,["color"])))),l}},{}],21:[function(a,C,S){(function(v){(function(){const f=a("crypto"),h={hash(d){const l=f.createHash(d);for(var u=arguments.length,c=new Array(u>1?u-1:0),p=1;p<u;p++)c[p-1]=arguments[p];return l.update(v.concat(c)),l.digest()},convertPasswordToHash(d,l,u,c){if(l=l.toLowerCase(),f.getHashes().indexOf(l)<0)throw new Error(`Hash algorithm '${l}' not supported!`);const p=v.from(d,"utf16le");let A=this.hash(l,v.from(u,"base64"),p);for(let g=0;g<c;g++){const _=v.alloc(4);_.writeUInt32LE(g,0),A=this.hash(l,A,_)}return A.toString("base64")},randomBytes:d=>f.randomBytes(d)};C.exports=h}).call(this)}).call(this,a("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(a,C,S){const{SaxesParser:v}=a("saxes"),{PassThrough:f}=a("readable-stream"),{bufferToString:h}=a("./browser-buffer-decode");C.exports=async function*(d){d.pipe&&!d[Symbol.asyncIterator]&&(d=d.pipe(new f));const l=new v;let u;l.on("error",p=>{u=p});let c=[];l.on("opentag",p=>c.push({eventType:"opentag",value:p})),l.on("text",p=>c.push({eventType:"text",value:p})),l.on("closetag",p=>c.push({eventType:"closetag",value:p}));for await(const p of d){if(l.write(h(p)),u)throw u;yield c,c=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(a,C,S){const v=a("./col-cache"),f=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,h=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;C.exports={slideFormula:function(d,l,u){const c=v.decode(l),p=v.decode(u);return d.replace(f,(A,g,_,b,w)=>{if(w)return A;const B=h.exec(b);if(B){const k=B[1],T=B[2].toUpperCase(),L=B[3],V=B[4];if(T.length>3||T.length===3&&T>"XFD")return A;let Q=v.l2n(T),N=parseInt(V,10);return k||(Q+=p.col-c.col),L||(N+=p.row-c.row),(g||"")+(k||"")+v.n2l(Q)+(L||"")+N}return A})}}},{"./col-cache":19}],24:[function(a,C,S){(function(v,f){(function(){const h=a("readable-stream"),d=a("./utils"),l=a("./string-buf");class u{constructor(b,w){this._data=b,this._encoding=w}get length(){return this.toBuffer().length}copy(b,w,B,k){return this.toBuffer().copy(b,w,B,k)}toBuffer(){return this._buffer||(this._buffer=f.from(this._data,this._encoding)),this._buffer}}class c{constructor(b){this._data=b}get length(){return this._data.length}copy(b,w,B,k){return this._data._buf.copy(b,w,B,k)}toBuffer(){return this._data.toBuffer()}}class p{constructor(b){this._data=b}get length(){return this._data.length}copy(b,w,B,k){this._data.copy(b,w,B,k)}toBuffer(){return this._data}}class A{constructor(b){this.size=b,this.buffer=f.alloc(b),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const b=f.alloc(this.iWrite-this.iRead);return this.buffer.copy(b,0,this.iRead,this.iWrite),b}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(b){let w;return b===0?null:b===void 0||b>=this.length?(w=this.toBuffer(),this.iRead=this.iWrite,w):(w=f.alloc(b),this.buffer.copy(w,0,this.iRead,b),this.iRead+=b,w)}write(b,w,B){const k=Math.min(B,this.size-this.iWrite);return b.copy(this.buffer,this.iWrite,w,w+k),this.iWrite+=k,k}}const g=function(_){_=_||{},this.bufSize=_.bufSize||1048576,this.buffers=[],this.batch=_.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};d.inherits(g,h.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return f.concat(this.buffers.map(_=>_.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const b=this.buffers[this.buffers.length-1];if(!b.full)return b}const _=new A(this.bufSize);return this.buffers.push(_),_},async _pipe(_){await Promise.all(this.pipes.map(function(b){return new Promise(w=>{b.write(_.toBuffer(),()=>{w()})})}))},_writeToBuffers(_){let b=0;const w=_.length;for(;b<w;)b+=this._getWritableBuffer().write(_,b,w-b)},async write(_,b,w){let B;if(b instanceof Function&&(w=b,b="utf8"),w=w||d.nop,_ instanceof l)B=new c(_);else if(_ instanceof f)B=new p(_);else{if(!(typeof _=="string"||_ instanceof String||_ instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");B=new u(_,b)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(B);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(B),v.nextTick(w)):(await this._pipe(B),w());else this.paused||this.emit("data",B.toBuffer()),this._writeToBuffers(B),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(_,b,w){const B=k=>{k?w(k):(this._flush(),this.pipes.forEach(T=>{T.end()}),this.emit("finish"))};_?this.write(_,b,B):B()},read(_){let b;if(_){for(b=[];_&&this.buffers.length&&!this.buffers[0].eod;){const w=this.buffers[0],B=w.read(_);_-=B.length,b.push(B),w.eod&&w.full&&this.buffers.shift()}return f.concat(b)}return b=this.buffers.map(w=>w.toBuffer()).filter(Boolean),this.buffers=[],f.concat(b)},setEncoding(_){this.encoding=_},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(_){this.pipes.push(_),!this.paused&&this.buffers.length&&this.end()},unpipe(_){this.pipes=this.pipes.filter(b=>b!==_)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),C.exports=g}).call(this)}).call(this,a("_process"),a("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(a,C,S){(function(v){(function(){C.exports=class{constructor(f){this._buf=v.alloc(f&&f.size||16384),this._encoding=f&&f.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=v.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(f){f=f||0,this._buffer=void 0,this._inPos=f}_grow(f){let h=2*this._buf.length;for(;h<f;)h*=2;const d=v.alloc(h);this._buf.copy(d,0),this._buf=d}addText(f){this._buffer=void 0;let h=this._inPos+this._buf.write(f,this._inPos,this._encoding);for(;h>=this._buf.length-4;)this._grow(this._inPos+f.length),h=this._inPos+this._buf.write(f,this._inPos,this._encoding);this._inPos=h}addStringBuf(f){f.length&&(this._buffer=void 0,this.length+f.length>this.capacity&&this._grow(this.length+f.length),f._buf.copy(this._buf,this._inPos,0,f.length),this._inPos+=f.length)}}}).call(this)}).call(this,a("buffer").Buffer)},{buffer:220}],26:[function(a,C,S){const{toString:v}=Object.prototype,f=/["&<>]/,h={each:function(d,l){d&&(Array.isArray(d)?d.forEach(l):Object.keys(d).forEach(u=>{l(d[u],u)}))},some:function(d,l){return!!d&&(Array.isArray(d)?d.some(l):Object.keys(d).some(u=>l(d[u],u)))},every:function(d,l){return!d||(Array.isArray(d)?d.every(l):Object.keys(d).every(u=>l(d[u],u)))},map:function(d,l){return d?Array.isArray(d)?d.map(l):Object.keys(d).map(u=>l(d[u],u)):[]},keyBy:(d,l)=>d.reduce((u,c)=>(u[c[l]]=c,u),{}),isEqual:function(d,l){const u=typeof d,c=typeof l,p=Array.isArray(d),A=Array.isArray(l);let g;if(u!==c)return!1;switch(typeof d){case"object":if(p||A)return!(!p||!A)&&d.length===l.length&&d.every((_,b)=>{const w=l[b];return h.isEqual(_,w)});if(d===null||l===null)return d===l;if(g=Object.keys(d),Object.keys(l).length!==g.length)return!1;for(const _ of g)if(!l.hasOwnProperty(_))return!1;return h.every(d,(_,b)=>{const w=l[b];return h.isEqual(_,w)});default:return d===l}},escapeHtml(d){const l=f.exec(d);if(!l)return d;let u="",c="",p=0,A=l.index;for(;A<d.length;A++){switch(d.charAt(A)){case'"':c="&quot;";break;case"&":c="&amp;";break;case"'":c="&apos;";break;case"<":c="&lt;";break;case">":c="&gt;";break;default:continue}p!==A&&(u+=d.substring(p,A)),p=A+1,u+=c}return p!==A?u+d.substring(p,A):u},strcmp:(d,l)=>d<l?-1:d>l?1:0,isUndefined:d=>v.call(d)==="[object Undefined]",isObject:d=>v.call(d)==="[object Object]",deepMerge(){const d=arguments[0]||{},{length:l}=arguments;let u,c,p;function A(g,_){u=d[_],p=Array.isArray(g),h.isObject(g)||p?(p?(p=!1,c=u&&Array.isArray(u)?u:[]):c=u&&h.isObject(u)?u:{},d[_]=h.deepMerge(c,g)):h.isUndefined(g)||(d[_]=g)}for(let g=0;g<l;g++)h.each(arguments[g],A);return d}};C.exports=h},{}],27:[function(a,C,S){(function(v,f){(function(){const h=a("fs"),d=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,l={nop(){},promiseImmediate:u=>new Promise(c=>{v.setImmediate?f(()=>{c(u)}):setTimeout(()=>{c(u)},1)}),inherits:function(u,c,p,A){u.super_=c,A||(A=p,p=null),p&&Object.keys(p).forEach(_=>{Object.defineProperty(u,_,Object.getOwnPropertyDescriptor(p,_))});const g={constructor:{value:u,enumerable:!1,writable:!1,configurable:!0}};A&&Object.keys(A).forEach(_=>{g[_]=Object.getOwnPropertyDescriptor(A,_)}),u.prototype=Object.create(c.prototype,g)},dateToExcel:(u,c)=>25569+u.getTime()/864e5-(c?1462:0),excelToDate(u,c){const p=Math.round(24*(u-25569+(c?1462:0))*3600*1e3);return new Date(p)},parsePath(u){const c=u.lastIndexOf("/");return{path:u.substring(0,c),name:u.substring(c+1)}},getRelsPath(u){const c=l.parsePath(u);return`${c.path}/_rels/${c.name}.rels`},xmlEncode(u){const c=d.exec(u);if(!c)return u;let p="",A="",g=0,_=c.index;for(;_<u.length;_++){const b=u.charCodeAt(_);switch(b){case 34:A="&quot;";break;case 38:A="&amp;";break;case 39:A="&apos;";break;case 60:A="&lt;";break;case 62:A="&gt;";break;case 127:A="";break;default:if(b<=31&&(b<=8||b>=11&&b!==13)){A="";break}continue}g!==_&&(p+=u.substring(g,_)),g=_+1,A&&(p+=A)}return g!==_?p+u.substring(g,_):p},xmlDecode:u=>u.replace(/&([a-z]*);/g,c=>{switch(c){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&apos;":return"'";case"&quot;":return'"';default:return c}}),validInt(u){const c=parseInt(u,10);return Number.isNaN(c)?0:c},isDateFmt(u){return u?(u=(u=u.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:u=>new Promise(c=>{h.access(u,h.constants.F_OK,p=>{c(!p)})})},toIsoDateString:u=>u.toIsoString().subsstr(0,10),parseBoolean:u=>u===!0||u==="true"||u===1||u==="1"};C.exports=l}).call(this)}).call(this,typeof Zr<"u"?Zr:typeof self<"u"?self:typeof window<"u"?window:{},a("timers").setImmediate)},{fs:216,timers:523}],28:[function(a,C,S){const v=a("./under-dash"),f=a("./utils");function h(u,c,p){u.push(` ${c}="${f.xmlEncode(p.toString())}"`)}function d(u,c){if(c){const p=[];v.each(c,(A,g)=>{A!==void 0&&h(p,g,A)}),u.push(p.join(""))}}class l{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(c){const p=this._xml;p.push("<?xml"),d(p,c),p.push(`?>
577
+ )`,backgroundSize:"cover",backgroundPosition:"center",borderRadius:"0.12rem"})},null,4)]),o.createElementVNode("div",uV,[o.createElementVNode("div",cV,[o.createElementVNode("span",{style:o.normalizeStyle({color:M.priority?o.unref(tw)(M.priority):o.unref(tw)("low")}),class:"index"}," #"+o.toDisplayString(M.index),5),o.createElementVNode("span",dV,o.toDisplayString(M.title),1)]),o.createElementVNode("div",fV,[o.createElementVNode("span",hV,o.toDisplayString(typeof M.author=="string"&&M.author!=""?M.author:o.unref(Tn).getStaffName(M.userId)),1),o.createElementVNode("span",null,o.toDisplayString(M.createDate?o.unref(as)(M.createDate):M.modified_date?o.unref(as)(M.modified_date):""),1)])])],8,oV))),128))])]),_:1})])):(o.openBlock(),o.createElementBlock("div",pV,[o.createVNode(D,{title:"这里空空的,快去创建你的BCF吧~",type:"model"})]))]),o.createVNode(z,{ref_key:"bcfFilterRef",ref:l},null,512)])}}}),[["__scopeId","data-v-209cccca"]]),mV={class:"mobile_bcf"},gV={class:"mobile_bcf_tool"},vV={class:"mobile_bcf_main"},yV={class:"mobile_bcf_top"},bV=["src"],_V=["src"],wV={class:"mobile_bcf_bottom"},xV=["src"],CV={key:0,class:"bcf_screen_wrapper"},BV={class:"bcf_screen_content"},cw=_n(o.defineComponent({__name:"MobileBCFTool",props:{instruction:{},bcfList:{},userId:{}},emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=G,C=F=>{a("emitHandler",F)},S=I,{instruction:v,bcfList:f,userId:h}=o.toRefs(S),d=o.ref(!0),l=o.ref(!1),u=o.ref(!1),c=o.ref(),p=o.ref("add");o.ref(!1);const A=o.ref(),g=o.ref();o.watch(()=>S.instruction,F=>{var K;F&&F.instruct_name=="checkBcfDetail"&&F.content.bcfDetail&&(g.value=JSON.parse(JSON.stringify(F.content.bcfDetail)),w((K=g.value)==null?void 0:K._id))},{deep:!0});const _=()=>{d.value=!0,b.value=!1,l.value=!1},b=o.ref(!1),w=F=>{C({isTool:!0,event_target:"BCFTool",event_name:"refreshBcfList",content:{}}),setTimeout(()=>{A.value=F,g.value=f.value.find(K=>F==K._id),g.value?(l.value=!1,b.value=!0):_()},500)},B=()=>{l.value=!1,b.value=!0},k=o.ref(!1),T=o.ref(""),L=o.ref(["111","222","333"]),V=F=>{console.log(F)};o.onMounted(()=>{setTimeout(()=>{b.value=!0},1e3)});const Q=(F,K,te)=>{if(C({isTool:!0,event_target:"BCFTool",event_name:"submitUpdateBcf",content:{bcf_guid:F,bcf:K}}),wr.emit("bcfLoading",!0),te){let q=0;f.value.forEach((ie,oe)=>{ie._id==te&&(q=oe)}),f.value[q]=K,g.value=f.value[q],w(te)}},N=F=>{p.value="edit",d.value=!1,b.value=!1,A.value=F,l.value=!0},j=F=>{C({isTool:!0,event_target:"BCFTool",event_name:"submitNewBcf",content:{bcf:F}}),wr.emit("bcfLoading",!0),_()},$=()=>{b.value=!1,C({isTool:!0,event_target:"BCFTool",event_name:"refreshBcfList",content:{}})},X=()=>{C({isTool:!0,event_target:"BCFTool",event_name:"refreshBcfList",content:{}})},W=F=>{u.value=!0,c.value=F},D=()=>{a("closePanel")},z=o.ref(!1),M=o.ref(),R=F=>{M.value=F,z.value=!0},O=()=>{z.value=!1},U=()=>{z.value=!1,M.value()};return(F,K)=>{const te=AV,q=D8,ie=o6,oe=p5;return o.openBlock(),o.createElementBlock("div",mV,[o.withDirectives(o.createElementVNode("div",gV,[o.createElementVNode("div",vV,[o.createElementVNode("div",yV,[o.createElementVNode("div",{class:"back",onClick:D},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/back.png"},null,8,bV)]),K[3]||(K[3]=o.createElementVNode("div",{class:"title"},"BCF",-1)),o.createElementVNode("div",{class:"more",onClick:X},[o.createElementVNode("img",{class:"refresh",src:o.unref(Vt)+"/bim-viewer/bcf-images/refresh.png"},null,8,_V)])]),o.createVNode(te,{instruction:o.unref(v),"bcf-list":o.unref(f),onEmitHandler:C,onCheckBcfDetail:w},null,8,["instruction","bcf-list"]),o.createElementVNode("div",wV,[o.createElementVNode("div",{class:"add_bcf_button",onClick:K[0]||(K[0]=()=>{p.value="add",l.value=!0})},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/addbcf.png"},null,8,xV),K[4]||(K[4]=o.createElementVNode("span",null,"新建BCF",-1))])])]),b.value&&A.value&&g.value?(o.openBlock(),o.createBlock(q,{key:0,"user-id":o.unref(h),"bcf-id":A.value,"bcf-list":o.unref(f),"bcf-content":g.value,onEditBcf:N,onUpdateBcf:Q,onEmitHandler:C,onCloseDetail:$,onBcfScreenshot:R},null,8,["user-id","bcf-id","bcf-list","bcf-content"])):o.createCommentVNode("",!0),l.value?(o.openBlock(),o.createBlock(ie,{key:1,"user-id":o.unref(h),mode:p.value,"bcf-id":A.value,"bcf-list":o.unref(f),"bcf-content":g.value,onCloseAdd:K[1]||(K[1]=ce=>p.value=="edit"?B():_()),onClosePanel:D,onEmitHandler:C,onSubmitBcf:j,onUpdateBcf:Q,onImageZoomIn:W,onBcfScreenshot:R},null,8,["user-id","mode","bcf-id","bcf-list","bcf-content"])):o.createCommentVNode("",!0),k.value?(o.openBlock(),o.createBlock(oe,{key:2,title:T.value,items:L.value,onSelect:V,onClosePanel:K[2]||(K[2]=ce=>k.value=!1)},null,8,["title","items"])):o.createCommentVNode("",!0)],512),[[o.vShow,!z.value]]),z.value?(o.openBlock(),o.createElementBlock("div",CV,[o.createElementVNode("div",BV,[o.createElementVNode("div",{class:"cancel",onClick:o.withModifiers(O,["stop"])}," 取消 "),o.createElementVNode("div",{class:"submit",onClick:o.withModifiers(U,["stop"])}," 立即截屏 ")])])):o.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-dec6b198"]]),EV=Object.freeze(Object.defineProperty({__proto__:null,default:cw},Symbol.toStringTag,{value:"Module"})),PV={StructureTree:o.defineAsyncComponent(()=>Promise.resolve().then(()=>CU)),InspectorTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>L9)),RoamTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>f7)),XRayTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>g7)),MeasureTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>M7)),SectionTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>uH)),CommentTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>EH)),AnnotationTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>DH)),ScreenShotTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>jH)),SettingTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>yz)),NavigateTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>Ez)),BCFTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>w$)),MobileBCFTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>EV)),MouseTool:o.defineAsyncComponent(()=>Promise.resolve().then(()=>E$))},SV={key:0,class:"industry-wrapper"},kV={class:"industry-viewer-content"},MV={key:0,class:"industry-components-wrapper"},TV=o.defineComponent({__name:"viewerEntry",props:{appType:{},instruction:{},fileId:{},fileName:{},filePath:{},modelBuffer:{},metaBuffer:{},modelType:{},themeColor:{},topHeight:{},bottomHeight:{},leftWidth:{},rightWidth:{},treePos:{},inspectorPos:{},commentPos:{},annotationPos:{},roamPos:{},navCubePos:{},navCubeSize:{},skyboxImg:{},commentOffset:{},measureOffset:{},hideTool:{type:Boolean},isPc:{type:Boolean},phone:{type:Boolean},loadMeta:{type:Boolean},outliersDetect:{type:Boolean},backButton:{type:Boolean},backgroundColor:{},reset:{type:Boolean},measure:{type:Boolean},comment:{type:Boolean},tree:{type:Boolean},navigate:{type:Boolean},roam:{type:Boolean},section:{type:Boolean},anno:{type:Boolean},screenshot:{type:Boolean},inspector:{type:Boolean},setting:{type:Boolean},fullscreen:{type:Boolean},share:{type:Boolean},cooperate:{type:Boolean},xray:{type:Boolean},bcf:{type:Boolean},mouse:{type:Boolean},bcfContent:{}},emits:["emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I;let{fileId:S,fileName:v,filePath:f,modelBuffer:h}=C;const d=o.ref(!1),l=o.ref(!1);o.watch(()=>C.bcfContent,b=>{b&&(Tn.BcfStaffList=b.staffList)}),o.onMounted(()=>{u(()=>{uk(),ck(),c(()=>{console.log("自定义配置初始化完毕"),d.value=!0}),Qt("hideTool")&&p()})});const u=b=>{C.filePath||C.modelBuffer?b():(console.error("没有合法的模型数据来源"),setTimeout(()=>{u(b)},300))},c=(b=()=>{})=>{Qn("isMobile",C.phone),Qn("fileName",C.fileName),Qn("isPc",C.isPc),Qn("loadMeta",C.loadMeta),Qn("outliersDetect",C.outliersDetect),Qn("hideTool",C.hideTool),Qn("backButton",C.backButton),Qn("backgroundColor",C.backgroundColor),Qn("topHeight",C.topHeight),Qn("bottomHeight",C.bottomHeight),Qn("leftWidth",C.leftWidth),Qn("rightWidth",C.rightWidth),Qn("themeColor",C.themeColor),Qn("navCubeSize",C.navCubeSize),Qn("navCubePos",C.navCubePos),Qn("commentOffset",C.commentOffset),Qn("measureOffset",C.measureOffset),Qn("treePos",C.treePos),Qn("inspectorPos",C.inspectorPos),Qn("commentPos",C.commentPos),Qn("annotationPos",C.annotationPos),Qn("roamPos",C.roamPos),C.bcfContent&&(Tn.BcfStaffList=C.bcfContent.staffList),l.value=Qt("hideTool");let w=new Image;w.crossOrigin="anonymous",w.src="https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/bim-viewer/skybox/skybox.jpeg",Qn("skyboxImg",w),wr.emit("ThemeConfig"),B();function B(){const k=Object.entries(C);let T=[];if(k.forEach(([L,V])=>{V&&T.push(L)}),T.length==0){b();return}a.setEnableToolsByKey(T),b()}},p=()=>{console.log(a.visibleTools);for(let b=0;b<a.visibleTools.length;b++){const w=a.visibleTools[b];o.watch(()=>w.isActive,B=>{g({isTool:!1,event_target:"ToolBar",event_name:"clickTool",content:{toolId:w.id,toolKey:w.key,status:B}})})}console.log("工具栏监听初始化完毕")},A=G,g=b=>{A("emitHandler",b)},_=b=>{l.value=b};return wr.on("hideToolbar",_),o.onBeforeUnmount(()=>{wr.off("hideToolbar",_)}),o.watch(()=>C.instruction,b=>{b&&(b.instruct_name=="changeBackgroundColor"&&b.content.color&&wr.emit("changeBackgroundColor",b.content.color),b.instruct_name=="setNavCube"&&(Qn("navCubePos",{pos:Qt("navCubePos").pos,posNum:wf(!!b.content.move,286)}),gr.setProperty("--operate-item-right",b.content.move?"300px":"14px")),b.instruct_name=="setAnnoStatus"&&wr.emit("setAnnoStatus",b.content),b.instruct_name=="lastSetsContent"&&wr.emit("lastSetsContent",b.content))}),o.watch(()=>a.isToolActive(8),b=>{Qt("navCubePos").pos.includes(Qt("inspectorPos"))&&Qn("navCubePos",{pos:Qt("navCubePos").pos,posNum:wf(b,286)}),gr.setProperty("--operate-item-right",b?"300px":"14px")}),o.watch(()=>a.isToolActive(17),b=>{Qt("navCubePos").pos.includes(Qt("inspectorPos"))&&Qn("navCubePos",{pos:Qt("navCubePos").pos,posNum:wf(b,286)}),gr.setProperty("--operate-item-right",b?"300px":"14px")}),(b,w)=>{const B=cw,k=s5,T=QN,L=IN;return d.value?(o.openBlock(),o.createElementBlock("div",SV,[w[1]||(w[1]=o.createElementVNode("div",{class:"industry-left-wrapper"},null,-1)),b.bcf&&b.bcfContent&&b.bcfContent.bcfList&&b.bcfContent.staffList?o.withDirectives((o.openBlock(),o.createBlock(B,{key:0,instruction:b.instruction,"user-id":b.bcfContent.userId,"bcf-list":b.bcfContent.bcfList,onClosePanel:w[0]||(w[0]=V=>o.unref(a).setToolActiveStatusBykey("bcf",!1)),onEmitHandler:g},null,8,["instruction","user-id","bcf-list"])),[[o.vShow,o.unref(a).isToolActiveBykey("bcf")]]):o.createCommentVNode("",!0),o.createElementVNode("div",kV,[o.createVNode(k,{instruction:b.instruction,"model-buffer":o.unref(h),"meta-buffer":b.metaBuffer,"model-type":b.modelType,"file-id":o.unref(S),"file-name":o.unref(v),"file-path":o.unref(f),onEmitHandler:g},null,8,["instruction","model-buffer","meta-buffer","model-type","file-id","file-name","file-path"]),o.unref(a).visibleTools.length!=0?(o.openBlock(),o.createElementBlock("div",MV,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(a).visibleTools,(V,Q)=>o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:Q},[V.key!=="bcf"?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(PV)[V.component]),{key:0,"component-id":V.id,onClosePanel:N=>o.unref(a).setToolActiveStatus(V.id,!1),onEmitHandler:g},null,40,["component-id","onClosePanel"])):o.createCommentVNode("",!0)])),[[o.vShow,o.unref(a).isToolActive(V.id)]])),128))])):o.createCommentVNode("",!0),o.unref(a).visibleTools.length>0&&!o.unref(Qt)("isMobile")&&!l.value?(o.openBlock(),o.createBlock(T,{key:1,"visible-tools":o.unref(a).visibleTools,onEmitHandler:g},null,8,["visible-tools"])):o.createCommentVNode("",!0),o.unref(a).visibleTools.length>0&&o.unref(Qt)("isMobile")&&!o.unref(Qt)("hideTool")?(o.openBlock(),o.createBlock(L,{key:2,"visible-tools":o.unref(a).visibleTools,onEmitHandler:g},null,8,["visible-tools"])):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)}}});function IV(I){I&&(I.configs&&Oy(I.configs),I.toolList&&Rd().setEnableTools(I.toolList),I.callback&&I.callback())}function DV(I,G){Ln.SetToolActiveById(I,G),Rd().setToolActiveStatus(I,G)}function FV(I,G){Ln.SetToolActiveByKey(I,G),Rd().setToolActiveStatusBykey(I,G)}function RV(I){Ln.SetAllClose(),Rd().setAllToolClose(I)}const OV={class:"tall_panel_content"},LV={class:"panel_top"},NV={class:"panel_title"},jV={class:"panel_close"},VV={class:"panel_content"},UV={key:0,class:"width-set",id:"lineWidthSet"},dw=_n(o.defineComponent({__name:"tallPanel",props:{panelTitle:{type:String,default:""},width:{type:Number,default:286},clickHandle:{type:Function,default:()=>{}},pos:{type:String,default:"left"},setWidth:{type:Boolean,default:!1}},setup(I){const G=Yn(),a=I,C=o.ref(),S=o.ref(a.width);o.onMounted(()=>{a.pos=="left"&&(C.value.style.left=`${0+Qt("leftWidth")}px`),a.pos=="right"&&(C.value.style.right=`${0+Qt("rightWidth")}px`),C.value.style.top=`${0+Qt("topHeight")}px`,C.value.style.bottom=`${0+Qt("bottomHeight")}px`});let v,f=0,h=0;return document.addEventListener("mousedown",d=>{var l;((l=d.target)==null?void 0:l.id)=="lineWidthSet"&&(v=!0,f=d.x)}),document.addEventListener("mousemove",d=>{v&&(h=d.x-f,f=d.x,S.value+=h,S.value<286&&(S.value=286),gr.setProperty("--left-toggle-left",(14+S.value).toString()+"px"))}),document.addEventListener("mouseup",d=>{v=!1}),o.watch(()=>G.isToolActive(0),d=>{Qt("navCubePos").pos.includes(Qt("treePos"))&&Qn("navCubePos",{pos:Qt("navCubePos").pos,posNum:wf(d,286)}),gr.setProperty("--left-toggle-left",d?(14+S.value).toString()+"px":"14px")}),(d,l)=>{const u=ys;return o.openBlock(),o.createElementBlock("div",{ref_key:"tallPanelWrapper",ref:C,class:"tall_panel_wrapper",id:"tall_panel_wrapper",style:o.normalizeStyle({width:S.value.toString()+"px"})},[o.createElementVNode("div",OV,[o.createElementVNode("div",LV,[o.createElementVNode("div",NV,o.toDisplayString(I.panelTitle),1),o.createElementVNode("div",jV,[o.createVNode(u,{width:18,"click-handle":I.clickHandle,light:o.unref(gr).currentTheme=="blue",dark:o.unref(gr).currentTheme=="light-gray"},null,8,["click-handle","light","dark"])])]),o.createElementVNode("div",VV,[o.renderSlot(d.$slots,"default",{},void 0,!0)])]),I.setWidth?(o.openBlock(),o.createElementBlock("div",UV,l[0]||(l[0]=[o.createElementVNode("div",{class:"set-line"},null,-1)]))):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-cacd0bce"]]),HV={class:"panel_top"},zV={class:"panel_title"},GV={class:"panel_close"},QV={class:"panel_content"},Sf=o.defineComponent({__name:"panel",props:{panelTitle:{type:String,default:""},width:{type:Number,default:240},clickHandle:{type:Function,default:()=>{}}},setup(I){const G=o.ref(!0);return o.onMounted(()=>{}),(a,C)=>{const S=ys;return o.openBlock(),o.createBlock(o.unref(Hp.ElDialog),{class:"panel_dialog",modelValue:G.value,"onUpdate:modelValue":C[0]||(C[0]=v=>G.value=v),width:I.width,draggable:""},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"panel_wrapper",style:o.normalizeStyle({width:I.width.toString()+"px"})},[o.createElementVNode("div",HV,[o.createElementVNode("div",zV,o.toDisplayString(I.panelTitle),1),o.createElementVNode("div",GV,[o.createVNode(S,{width:18,"click-handle":I.clickHandle,light:o.unref(gr).currentTheme=="blue",dark:o.unref(gr).currentTheme=="light-gray"},null,8,["click-handle","light","dark"])])]),o.createElementVNode("div",QV,[o.renderSlot(a.$slots,"default")])],4)]),_:3},8,["modelValue","width"])}}}),kf=[{id:0,name:"对象"},{id:1,name:"类别"},{id:2,name:"楼层"}],fw=[{id:1,name:"铅笔",buttontype:"path",svg:"pencil",svgActive:"pencil-active",isShow:!0},{id:2,name:"箭头",buttontype:"arrow",svg:"arrow",svgActive:"arrow-active",isShow:!1},{id:3,name:"矩形",buttontype:"rect",svg:"rect",svgActive:"rect-active",isShow:!1},{id:4,name:"圆形",buttontype:"ellipse",svg:"ellipse",svgActive:"ellipse-active",isShow:!1},{id:5,name:"文字",buttontype:"text",svg:"text",svgActive:"text-active",isShow:!1}],cu=[{id:1,name:"渐变蓝",color:"linear-gradient(180deg, #fffefb 0%, #daebff 100%)",rgb:[.9254,.9607,1]},{id:2,name:"纯灰度",color:"#F0F0F0",rgb:[.9411,.9411,.9411]},{id:3,name:"昏暗天空",color:"#323237",rgb:[.196,.196,.2156]},{id:4,name:"纯白色",color:"#FFFFFF",rgb:[1,1,1]},{id:5,name:"宝石蓝",color:"#086FFD",rgb:[.0313,.4352,.9921]}],lm=[{id:1,code:"distance",name:"距离",svg:"distance",svgActive:"distance-active"},{id:2,code:"angle",name:"角度",svg:"angle",svgActive:"angle-active"}],um=[{id:0,name:"1280x720px",width:"1280",height:"720"},{id:1,name:"1920x1080px",width:"1920",height:"1080"},{id:2,name:"2560x1440px",width:"2560",height:"1440"},{id:3,name:"自定义"}],WV=[{id:1,code:"top",name:"俯视图",dir_num:4,img:"view-top",imgActive:"view-top-active"},{id:2,code:"bottom",name:"仰视图",dir_num:5,img:"view-bottom",imgActive:"view-bottom-active"},{id:3,code:"left",name:"左视图",dir_num:3,img:"view-left",imgActive:"view-left-active"},{id:4,code:"right",name:"右视图",dir_num:2,img:"view-right",imgActive:"view-right-active"},{id:5,code:"front",name:"前视图",dir_num:0,img:"view-front",imgActive:"view-front-active"},{id:6,code:"back",name:"后视图",dir_num:1,img:"view-back",imgActive:"view-back-active"},{id:7,code:"left-bottom",name:"西南",dir_num:14,img:"view-left-bottom",imgActive:"view-left-bottom-active"},{id:8,code:"right-bottom",name:"东南",dir_num:15,img:"view-right-bottom",imgActive:"view-right-bottom-active"},{id:9,code:"right-top",name:"东北",dir_num:16,img:"view-right-top",imgActive:"view-right-top-active"},{id:10,code:"left-top",name:"西北",dir_num:17,img:"view-left-top",imgActive:"view-left-top-active"}],du=[{id:1,code:"image",name:"图片",okType:"image/*",img:"image",img_active:"image_active",imgActive:"image-active"},{id:2,code:"record",name:"语音",okType:"record",img:"record",img_active:"record_active",imgActive:"record-active"},{id:3,code:"video",name:"视频",okType:"video/*",img:"video",img_active:"video_active",imgActive:"video-active"},{id:4,code:"file",name:"文档",okType:"*/*",img:"file",img_active:"file_active",imgActive:"file-active"},{id:5,code:"text",name:"文字",okType:"text",img:"text",img_active:"text_active",imgActive:"text-active"}],$V=[{id:1,name:"隐藏",img:"hidden",img_active:"hidden-active"},{id:2,name:"透视",img:"opacity",img_active:"opacity-active"},{id:3,name:"选中",img:"select",img_active:"select-active"},{id:0,name:"恢复",img:"reset",img_active:"reset-active"}],KV={key:0,class:"panel_content"},XV={class:"types"},YV=["onClick"],JV={class:"tree"},ZV={key:1,class:"panel_content_null"},qV={class:"pc_tree_type_button"},eU=["onClick"],tU={class:"pc_tree_content"},rU={class:"tree-search-box"},nU={class:"tree-wrapper"},iU=["id"],sU={class:"tree-wrapper"},aU=["id"],oU={class:"tree-wrapper"},lU=["id"],uU={key:2,class:"operate-tree-box"},cU={class:"operate-tree"},dU={class:"tree-title-box"},fU={class:"tree-title-icon"},hU={class:"tree-category-box"},pU={class:"tree-category-list"},AU=["onClick"],mU={class:"tree-search-box"},gU={class:"tree-content"},vU={class:"tree-wrapper"},yU=["id"],bU={class:"tree-wrapper"},_U=["id"],wU={class:"tree-wrapper"},xU=["id"],CU=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"StructureTree",props:["componentId"],emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I,S=o.ref(!1),v=o.ref(!1),f=o.ref(),h=o.ref(),d=o.ref(),l=o.ref(),u=o.ref(0),c=o.ref(),p=o.ref(),A=o.ref(),g=o.ref(),_=o.ref();let b;const w=o.ref(""),B=o.ref(""),k=o.ref("");o.watch(()=>a.isToolActive(C.componentId),R=>{if(S.value&&R){if(v.value||X(kf[0]),B.value==k.value||B.value=="")return;$(B.value)}}),o.watch(w,R=>{var O,U,F;u.value===0?(O=f.value)==null||O.filter(R):u.value===1?(U=h.value)==null||U.filter(R):u.value===2&&((F=d.value)==null||F.filter(R))});const T=(R,O)=>R?O.title.includes(w.value):!0,L={children:"children",label:"title",value:"nodeId"},V=G,Q=R=>{V("emitHandler",R)},N=o.ref(!1);o.onMounted(()=>{Qt("userInfo").isInShare&&Qt("userInfo").isShareClient&&(N.value=!0),a.setReadyById(C.componentId)});const j=()=>{v.value=!1,b=window.bimViewer;const{eventTrigger:R}=b;R.on("treeAllReady",O=>{S.value=!0,l.value=O,console.log("初始化结构树数据",l.value),b.SetShowSpaceModeActive(!1)}),Qt("isMobile")||R.on("pickedEntity",O=>{v.value&&(B.value=O.id,a.isToolActive(C.componentId)&&$(O.id))}),Qt("isMobile")&&(R.on("touchEntity",O=>{v.value!==!1&&(B.value=O.id,a.isToolActive(C.componentId)&&$(O.id))}),R.on("touchNothing",()=>{o.nextTick(()=>{_.value=""}),Q({isTool:!0,event_target:"StructureTree",event_name:"touchNothing",content:{msg:"pickedNothing"}})}))};wr.on("BimViewer",j),o.onBeforeUnmount(()=>{wr.off("BimViewer",j)});const $=R=>{let O,U;u.value===0?O=b.objectsExplorer.objectList[R]?b.objectsExplorer.objectList[R]:null:u.value===1?O=b.classesExplorer.objectList[R]?b.classesExplorer.objectList[R]:null:u.value===2&&(O=b.storeysExplorer.objectList[R]?b.storeysExplorer.objectList[R]:null),O&&(_.value=O.nodeId,u.value===0?(f.value.setCurrentKey(O.nodeId,!0),U=document.getElementById(O.nodeId+"0")):u.value===1?(h.value.setCurrentKey(O.nodeId,!0),U=document.getElementById(O.nodeId+"1")):u.value===2&&(d.value.setCurrentKey(O.nodeId,!0),U=document.getElementById(O.nodeId+"2")),setTimeout(()=>{U&&o.nextTick(()=>{U.scrollIntoView({block:"center"})})},200),k.value=R,Q({isTool:!0,event_target:"StructureTree",event_name:"pickedEntity",content:{entityId:R,viewer_nodeId:O.nodeId}}))},X=R=>{if(R.id==0){if(!p.value){if(p.value=l.value.objectsData?l.value.objectsData:[],p.value[0]){p.value[0].title="全部";const O=p.value.map(U=>U.nodeId);f.value.setCheckedKeys(O)}v.value=!0}}else if(R.id==1){if(!g.value&&(A.value=l.value.classesData?l.value.classesData:[],A.value[0])){A.value[0].title="全部";const O=A.value.map(U=>U.nodeId);h.value.setCheckedKeys(O)}}else if(R.id==2&&!g.value&&(g.value=l.value.storeysData?l.value.storeysData:[],g.value[0])){g.value[0].title="全部";const O=g.value.map(U=>U.nodeId);d.value.setCheckedKeys(O)}Q({isTool:!0,event_target:"StructureTree",event_name:"changeTreeStructure",content:{item:R}}),u.value!==R.id&&(u.value=R.id)};let W=[];const D=(R,O)=>{W.includes(R.nodeId)?R.checked=!0:R.checked=!R.checked;const U=b.viewer.scene.objects[R.objectId];U?b.setEntityVisible(U,R.checked):F(R,R.checked),K(R,R.checked),Q({isTool:!0,event_target:"StructureTree",event_name:"clickTreeBox",content:{active_tree:u.value,nodeId:R.nodeId,status:R.checked}});function F(te,q){if(te.checked=q,te.children.length==0){const ie=b.viewer.scene.objects[te.objectId];ie&&b.setEntityVisible(ie,te.checked)}else for(let ie=0;ie<te.children.length;ie++)F(te.children[ie],q)}function K(te,q){te.checked=q,te.parent&&K(te.parent,q)}W=O.halfCheckedKeys},z=(R,O)=>{const U=b.viewer.scene.objects[R.objectId];U&&(b.setAllObjectsSelected(!1),b.setEntitySelected(U),b.viewFitEntity(U)),wr.emit("tree_clickNode",U),Q({isTool:!0,event_target:"StructureTree",event_name:"clickTreeNode",content:{active_tree:u.value,objectId:R.objectId}})},M=()=>{V("closePanel")};return(R,O)=>{const U=AN,F=Sf,K=ji,te=Vi,q=dw,ie=ys;return!o.unref(Qt)("isMobile")&&o.unref(gr).currentTheme=="blue"?(o.openBlock(),o.createBlock(F,{key:0,class:"web_tree_container",width:268,panelTitle:"结构树","click-handle":M},{default:o.withCtx(()=>[v.value?(o.openBlock(),o.createElementBlock("div",KV,[o.createElementVNode("div",XV,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(kf),oe=>(o.openBlock(),o.createElementBlock("div",{key:oe.id,class:o.normalizeClass(["types-item",{"types-item-active":u.value===oe.id}]),onClick:ce=>X(oe)},o.toDisplayString(oe.name),11,YV))),128))]),o.createElementVNode("div",JV,[o.createVNode(U,{ref:"tree",height:700,"node-key":"nodeId",data:c.value,"current-node-key":_.value,"highlight-current":!0,props:L,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},null,8,["data","current-node-key"])])])):(o.openBlock(),o.createElementBlock("div",ZV,O[2]||(O[2]=[o.createElementVNode("span",null,"加载中...",-1)])))]),_:1})):!o.unref(Qt)("isMobile")&&o.unref(gr).currentTheme=="light-gray"?(o.openBlock(),o.createBlock(q,{key:1,class:"pc_structure_container",width:286,panelTitle:"结构树","click-handle":M,pos:o.unref(Qt)("treePos"),setWidth:""},{default:o.withCtx(()=>[o.createElementVNode("div",qV,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(kf),oe=>(o.openBlock(),o.createElementBlock("div",{key:oe.id,class:o.normalizeClass(["type_button",{type_button_active:u.value===oe.id}]),onClick:ce=>X(oe)},o.toDisplayString(oe.name),11,eU))),128))]),o.createElementVNode("div",tU,[o.createElementVNode("div",rU,[o.createVNode(K,{modelValue:w.value,"onUpdate:modelValue":O[0]||(O[0]=oe=>w.value=oe),placeholder:"请输入需搜索的内容","prefix-icon":"Search",clearable:""},null,8,["modelValue"])]),o.withDirectives(o.createElementVNode("div",nU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createVNode(U,{ref_key:"tree0",ref:f,"node-key":"nodeId",data:p.value,"current-node-key":_.value,"highlight-current":!0,props:L,"filter-node-method":T,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},{default:o.withCtx(({node:oe})=>[o.createElementVNode("span",{id:oe.key+"0",class:"tree_node_text"},o.toDisplayString(oe.data.title),9,iU)]),_:1},8,["data","current-node-key"])]),_:1})],512),[[o.vShow,u.value==0]]),o.withDirectives(o.createElementVNode("div",sU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createVNode(U,{ref_key:"tree1",ref:h,"node-key":"nodeId",data:A.value,"current-node-key":_.value,"highlight-current":!0,props:L,"filter-node-method":T,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},{default:o.withCtx(({node:oe})=>[o.createElementVNode("span",{id:oe.key+"1",class:"tree_node_text"},o.toDisplayString(oe.data.title),9,aU)]),_:1},8,["data","current-node-key"])]),_:1})],512),[[o.vShow,u.value==1]]),o.withDirectives(o.createElementVNode("div",oU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createVNode(U,{ref_key:"tree2",ref:d,"node-key":"nodeId",data:g.value,"current-node-key":_.value,"highlight-current":!0,props:L,"filter-node-method":T,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},{default:o.withCtx(({node:oe})=>[o.createElementVNode("span",{id:oe.key+"2",class:"tree_node_text"},o.toDisplayString(oe.data.title),9,lU)]),_:1},8,["data","current-node-key"])]),_:1})],512),[[o.vShow,u.value==2]])])]),_:1},8,["pos"])):(o.openBlock(),o.createElementBlock("div",uU,[o.createElementVNode("div",cU,[o.createElementVNode("div",dU,[O[3]||(O[3]=o.createElementVNode("div",{class:"tree-title"},"结构树",-1)),o.createElementVNode("div",fU,[o.createVNode(ie,{class:"close",width:.4,"size-type":"rem","click-handle":M})])]),o.createElementVNode("div",hU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createElementVNode("div",pU,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(kf),(oe,ce)=>(o.openBlock(),o.createElementBlock("div",{key:ce,class:o.normalizeClass(["tree-category-item",{"tree-category-item-active":oe.id===u.value}]),onClick:ee=>X(oe)},o.toDisplayString(oe.name),11,AU))),128))])]),_:1})]),o.createElementVNode("div",mU,[o.createVNode(K,{modelValue:w.value,"onUpdate:modelValue":O[1]||(O[1]=oe=>w.value=oe),placeholder:"请输入需搜索的内容","prefix-icon":"Search",clearable:""},null,8,["modelValue"])]),o.createElementVNode("div",gU,[o.withDirectives(o.createElementVNode("div",vU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createVNode(U,{ref_key:"tree0",ref:f,"node-key":"nodeId",data:p.value,"current-node-key":_.value,"highlight-current":!0,props:L,"filter-node-method":T,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},{default:o.withCtx(({node:oe})=>[o.createElementVNode("span",{id:oe.key+"0",class:"tree_node_text"},o.toDisplayString(oe.data.title),9,yU)]),_:1},8,["data","current-node-key"])]),_:1})],512),[[o.vShow,u.value==0]]),o.withDirectives(o.createElementVNode("div",bU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createVNode(U,{ref_key:"tree1",ref:h,"node-key":"nodeId",data:A.value,"current-node-key":_.value,"highlight-current":!0,props:L,"filter-node-method":T,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},{default:o.withCtx(({node:oe})=>[o.createElementVNode("span",{id:oe.key+"1",class:"tree_node_text"},o.toDisplayString(oe.data.title),9,_U)]),_:1},8,["data","current-node-key"])]),_:1})],512),[[o.vShow,u.value==1]]),o.withDirectives(o.createElementVNode("div",wU,[o.createVNode(te,null,{default:o.withCtx(()=>[o.createVNode(U,{ref_key:"tree2",ref:d,"node-key":"nodeId",data:g.value,"current-node-key":_.value,"highlight-current":!0,props:L,"filter-node-method":T,"show-checkbox":"",onCheck:D,onNodeClick:z,"empty-text":"暂无数据"},{default:o.withCtx(({node:oe})=>[o.createElementVNode("span",{id:oe.key+"2",class:"tree_node_text"},o.toDisplayString(oe.data.title),9,xU)]),_:1},8,["data","current-node-key"])]),_:1})],512),[[o.vShow,u.value==2]])])])]))}}}),[["__scopeId","data-v-3c1af895"]])},Symbol.toStringTag,{value:"Module"})),hw={ExtendToStructure:"扩建物",ThermalTransmittance:"热透射率",Roughness:"粗糙度",Category:"类型",IsExternal:"是否外部",LoadBearing:"承重",Reference:"参考",Span:"跨度",Slope:"斜坡",Thickness:"厚度",Structural:"结构",Construction:"结构",Graphics:"图形","Coarse Scale Fill Color":"粗补色",Other:"其他",Family:"族",Type:"类","Family and Type":"族和类","Type Id":"类Id","Phase Created":"阶段创建","Enable Analytical Model":"启用分析模型","Base Offset":"基准偏移量","Base Constraint":"基础约束","Location Line":"位置线","Room Bounding":"房间边界","Extrusion End":"挤出端","Extrusion Start":"挤出启动","Level Offset":"水平偏移量","Reference Level":"参考水平","Work Plane":"工作面","Fascia Depth":"筋膜深度","Rafter Cut":"椽断","Analytical Properties":"解析性质",TotalArea:"总面积",ProjectedArea:"总面积",Width:"宽度",Height:"高度",Depth:"深度",Volume:"体积",Mass:"质量",Density:"密度",Material:"材料",Color:"颜色",Finish:"表面处理",FireRating:"防火等级",Insulation:"绝缘",ThermalConductivity:"导热性",Durability:"耐久性",Age:"年代",Condition:"状况",Owner:"所有者",Maintenance:"维护",Cost:"成本",ConstructionDate:"建造日期",Location:"位置",Orientation:"方向",Elevation:"标高",Area:"面积",Length:"长度",FloorCount:"层数",Occupancy:"占用率",StructuralSystem:"结构系统",MechanicalSystem:"机械系统",ElectricalSystem:"电气系统",PlumbingSystem:"管道系统",SafetySystem:"安全系统",EnvironmentalImpact:"环境影响",EnergyEfficiency:"能源效率",WaterUsage:"用水量",NoiseLevel:"噪音水平",Accessibility:"可达性",Compliance:"合规性",BuildingCode:"建筑规范",DesignLife:"设计寿命",ServiceLife:"使用寿命",ManufactureDate:"制造日期",InstallationDate:"安装日期",Warranty:"保修",MaintenanceSchedule:"维护计划",RepairHistory:"维修历史",ReplacementCost:"更换成本",DisposalMethod:"处置方法",Recyclability:"可回收性",HazardousMaterials:"危险材料",Lighting:"照明",Ventilation:"通风",Heating:"供暖",Cooling:"制冷",FireProtection:"防火保护",Security:"安全",Signage:"标识",AccessibilityFeatures:"无障碍特征",AcousticProperties:"声学特性",VisualProperties:"视觉特性",CulturalValue:"文化价值",HistoricalSignificance:"历史意义",ArchitecturalStyle:"建筑风格",StructuralIntegrity:"结构完整性",SeismicPerformance:"抗震性能",WindResistance:"抗风性能",ThermalResistance:"热阻",UVResistance:"抗紫外线",ChemicalResistance:"抗化学性",WeatherResistance:"耐候性",ImpactResistance:"抗冲击性",AbrasionResistance:"耐磨性",FlexuralStrength:"抗弯强度",CompressiveStrength:"抗压强度",TensileStrength:"抗拉强度",Hardness:"硬度",Elasticity:"弹性",Plasticity:"塑性",Brittleness:"脆性",Ductility:"延展性",Conductivity:"导电性",Magnetism:"磁性",ThermalExpansion:"热膨胀",Shrinkage:"收缩",Creep:"蠕变",Fatigue:"疲劳",Corrosion:"腐蚀",Oxidation:"氧化",Pitting:"点蚀",Weathering:"风化",BioDeterioration:"生物劣化",RadiationResistance:"抗辐射",ElectromagneticCompatibility:"电磁兼容",InsulationResistance:"绝缘电阻",DielectricStrength:"介电强度",SurfaceTension:"表面张力",Wettability:"润湿性",Hydrophilicity:"亲水性",Hydrophobicity:"疏水性",Adsorption:"吸附",Absorption:"吸收",Sorption:"吸附吸收",Desorption:"脱附",Porosity:"孔隙率",Permeability:"渗透性",SorptionCapacity:"吸附容量",DesorptionCapacity:"脱附容量",Constraints:"约束",Phases:"阶段",Discipline:"学科",Host:"宿主",RelatedToMass:"相关质量",BaseLevel:"基准层",TopLevel:"顶部层",Offset:"偏移",HeightOffsetFromLevel:"高度偏移",RoomName:"房间名称",RoomNumber:"房间编号",RoomArea:"房间面积",WallType:"墙类型",FloorType:"地板类型",RoofType:"屋顶类型",WindowType:"窗户类型",DoorType:"门类型",ColumnType:"柱类型",BeamType:"梁类型",FamilyName:"族名称",TypeName:"类型名称",InstanceName:"实例名称",Workset:"工作集",Comments:"备注",Manufacturer:"制造商",Model:"模型",AssemblyCode:"装配代码",ConstructionType:"施工类型",FireProofing:"防火",StructuralUsage:"结构用途",FinishCode:"饰面代码",Sustainability:"可持续性",Grade:"等级",StructuralMaterial:"结构材料",ThermalProperties:"热性能",SoundTransmission:"声音传输",VaporBarrier:"防潮层",InsulationType:"绝缘类型",LifeCycle:"生命周期",EnvironmentalCertification:"环境认证",ConstructionPhase:"施工阶段",Pset_ElementShading:"元素遮阳",Pset_ProductRequirements:"产品要求",Pset_QuantityTakeOffCommon:"工程量计算",Pset_QuantityTakeOff:"工程量计算",Pset_ProvisionForVoid:"预留孔洞",Pset_ReinforcementBarPitchOfSlab:"板内钢筋间距",Pset_ReinforcementBarPitchOfBeam:"梁体钢筋间距",Pset_ReinforcementBarPitchOfWall:"墙体钢筋间距",Pset_ReinforcementBarPitchOfPile:"桩基钢筋间距",Pset_ReinforcementBarPitchOfColumn:"柱体钢筋间距",Pset_ReinforcementBarPitchOfFooting:"基础钢筋间距",Pset_ReinforcementBarPitchOfFoundation:"基础构件钢筋间距",Pset_BuildingElementProxyCommon:"建筑构件代理通用",Pset_SpaceFireSafetyRequirements:"空间防火要求",Pset_SpaceThermalRequirements:"空间热工要求",Pset_DoorWindowGlazingType:"门窗玻璃类型",Pset_EnvironmentalImpactIndicators:"环境影响指标",Pset_BeamCommon:"梁通用",Pset_ColumnCommon:"柱通用",Pset_WallCommon:"墙体通用",Pset_WindowCommon:"窗户通用",Pset_DoorCommon:"门通用",Pset_RoofCommon:"屋顶通用",Pset_SlabCommon:"板通用",Pset_CoveringCommon:"覆盖层通用",Pset_FurnitureCommon:"家具通用",Pset_LightFixtureTypeCommon:"灯具类型通用",Pset_ZoneCommon:"区域通用",Pset_SpaceCommon:"空间通用",Pset_BuildingCommon:"建筑通用",Pset_FloorCommon:"地板通用",Pset_StairCommon:"楼梯通用",Pset_RailingCommon:"栏杆通用",Pset_OpeningElementCommon:"开口构件通用",Pset_DistributionPortCommon:"分配端口通用",Pset_DistributionFlowElementCommon:"分配流体构件通用",Pset_ElectricDeviceTypeCommon:"电气设备类型通用",Pset_ValveTypeCommon:"阀门类型通用",Pset_PipeFittingTypeCommon:"管件类型通用",Pset_TankTypeCommon:"储罐类型通用",Pset_HeatExchangerTypeCommon:"换热器类型通用",Pset_TransformerTypeCommon:"变压器类型通用",Pset_PumpTypeCommon:"泵类型通用",Pset_VehicleCommon:"车辆通用",Pset_AirTerminalTypeCommon:"空气终端设备类型通用",Pset_EquipmentTypeCommon:"设备类型通用",Pset_FireSuppressionTerminalTypeCommon:"消防终端设备类型通用",Pset_HumiditySensorTypeCommon:"湿度传感器类型通用",Pset_ReflectorTypeCommon:"反射器类型通用",Pset_FlowInstrumentTypeCommon:"流量仪表类型通用",Pset_HeatTransferDeviceTypeCommon:"热传递设备类型通用"},BU=Object.keys(hw).reduce((I,G)=>{const a=G.trim().toLowerCase().replace(/\s+/g,"");return I[a]=hw[G],I},{});function fu(I){const G=I.trim().toLowerCase().replace(/\s+/g,"");return BU[G]||I}const EU={class:"myInspector_content"},PU={class:"title"},SU=["src"],kU={class:"properties_content"},MU={class:"basic_info_value"},TU={class:"propertysets"},IU=["onClick"],DU={class:"title"},FU=["src"],RU={class:"properties_content"},OU={class:"content_title_value"},LU={class:"content_title"},NU={class:"content_value"},jU={class:"myInspector_empty"},VU=["src"],UU={class:"pc_Inspector_content"},HU={class:"pc_myInspector_content"},zU={class:"title"},GU=["src"],QU={class:"properties_content"},WU={class:"basic_info_value"},$U={class:"propertysets"},KU=["onClick"],XU={class:"title"},YU=["src"],JU={class:"properties_content"},ZU={class:"content_title_value"},qU={class:"content_title"},e9={class:"content_value"},t9={class:"pc_model_info"},r9={class:"model_info_content"},n9={class:"model_info_value"},i9={class:"model_info_content"},s9={class:"model_info_value"},a9={class:"model_info_content"},o9={class:"model_info_value"},l9={class:"model_info_content"},u9={class:"model_info_value"},c9={key:2,class:"mobile_myInspector_wrapper"},d9={class:"detail-title-box"},f9={class:"detail-title-icon"},h9={class:"mobile_myInspector"},p9={class:"mobile_myInspector_content"},A9={class:"basic_info_title"},m9=["src"],g9={class:"basic_info_content"},v9={class:"basic_info_content_value"},y9={class:"content_value"},b9={class:"basic_info_content_value"},_9={class:"content_value"},w9={class:"basic_info_content_value"},x9={class:"content_value"},C9={class:"propertysets"},B9=["onClick"],E9={class:"propertysets_title"},P9=["src"],S9={class:"properties_content"},k9={class:"content_title_value"},M9={class:"content_title"},T9={class:"content_value"},I9={class:"mobile_Inspector_empty"},D9={class:"model_info_value"},F9={class:"model_info_value"},R9={class:"model_info_value"},O9={class:"model_info_value"},L9=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"InspectorTool",props:["componentId"],emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I;o.onMounted(()=>{a.setReadyById(C.componentId)});const S=G,v=T=>{S("emitHandler",T)};let f=window.bimViewer;const h=o.ref(!1),d=o.ref(""),l=o.ref(""),u=o.reactive({entity_name:"无",entity_type:"无",entity_id:"无",propertySets:[],expanded:!0}),c=o.reactive({objectCount:"未知",pSetsCount:"未知",createDate:"未知",author:"未知"});o.watch(()=>a.isToolActive(C.componentId),T=>{if(T&&h.value==!0){if(d.value==l.value)return;g(d.value)}});const p=T=>{f=window.bimViewer;const{eventTrigger:L}=f;L.on("metaLoaded",()=>{const V=window.bimViewer.getModelInfo(T);c.createDate=V.createDate!==""?V.createDate.replace("T"," "):"未知",c.objectCount=V.objectCount!==0?V.objectCount:"未知",c.pSetsCount=V.propertySetCount!==0?V.propertySetCount:"未知",c.author=V.author!==""?V.author:"未知"}),Qt("isMobile")||L.on("pickedEntity",V=>{g(V.id)}),Qt("isMobile")&&L.on("touchEntity",V=>{g(V.id)}),L.on("pickedNothing",()=>{h.value=!1,d.value="",k(),v({isTool:!0,event_target:"InspectorTool",event_name:"pickedNothing",content:{msg:"pickedNothing"}})})},A=T=>{if(!T)return;const L=f.getObjectProperties(T.id);L&&(d.value=T.id,h.value=!0,B(L))};wr.on("BimViewer",p),wr.on("tree_clickNode",A),o.onBeforeUnmount(()=>{wr.off("BimViewer",p),wr.off("tree_clickNode",A)});const g=T=>{if(d.value=T,h.value=!0,!a.isToolActive(C.componentId))return;const L=f.getObjectProperties(T);L&&B(L),l.value=T,Qt("isMobile")?v({isTool:!0,event_target:"InspectorTool",event_name:"touchEntity",content:{entityId:T}}):v({isTool:!0,event_target:"InspectorTool",event_name:"pickedEntity",content:{entityId:T}})},_=()=>{S("closePanel")},b=T=>{T.expanded=!T.expanded},w=T=>T?`${Vt}/bim-viewer/down_icon.png`:`${Vt}/bim-viewer/right_icon.png`,B=T=>{u.entity_name=T.name,u.entity_type=T.type,u.entity_id=T.id,T.propertySets&&(u.propertySets=T.propertySets,u.propertySets.forEach(L=>{gr.currentTheme=="light-gray"?L.expanded=!0:L.expanded=!1}))},k=()=>{u.entity_name="",u.entity_type="",u.entity_id="",u.propertySets=[]};return(T,L)=>{const V=Vi,Q=Sf,N=dw,j=ys;return o.openBlock(),o.createElementBlock(o.Fragment,null,[!o.unref(Qt)("isMobile")&&o.unref(gr).currentTheme=="blue"?(o.openBlock(),o.createBlock(Q,{key:0,class:"myInspector_wrapper",panelTitle:"属性","click-handle":_,style:{height:"var(--inspector-content-height)"}},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",EU,[o.createVNode(V,null,{default:o.withCtx(()=>[o.createElementVNode("div",{class:"basic_info",onClick:L[0]||(L[0]=$=>b(u))},[o.createElementVNode("div",PU,[o.createElementVNode("img",{src:w(u.expanded),class:"triangle"},null,8,SU),L[3]||(L[3]=o.createElementVNode("span",null,"基本属性",-1))]),o.withDirectives(o.createElementVNode("div",kU,[L[4]||(L[4]=o.createElementVNode("div",{class:"basic_info_title"},[o.createElementVNode("span",null,"名称"),o.createElementVNode("span",{style:{"margin-top":"2px"}},"UUID"),o.createElementVNode("span",null,"类型")],-1)),o.createElementVNode("div",MU,[o.createElementVNode("span",null,o.toDisplayString(u.entity_name),1),o.createElementVNode("span",null,o.toDisplayString(u.entity_id),1),o.createElementVNode("span",null,o.toDisplayString(u.entity_type),1)])],512),[[o.vShow,u.expanded]])]),o.createElementVNode("ul",TU,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(u.propertySets,($,X)=>(o.openBlock(),o.createElementBlock("li",{key:X,class:"propertyset",onClick:W=>b($)},[o.createElementVNode("div",DU,[o.createElementVNode("img",{src:w($.expanded),class:"triangle"},null,8,FU),o.createElementVNode("span",null,o.toDisplayString(o.unref(fu)($.name)),1)]),o.withDirectives(o.createElementVNode("div",RU,[o.createElementVNode("ul",OU,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList($.properties,(W,D)=>(o.openBlock(),o.createElementBlock("li",{key:D,class:"properties"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(W,(z,M)=>(o.openBlock(),o.createElementBlock("div",{class:"title_value",key:M},[o.createElementVNode("span",LU,o.toDisplayString(o.unref(fu)(M)),1),o.createElementVNode("span",NU,o.toDisplayString(z),1)]))),128))]))),128))])],512),[[o.vShow,$.expanded]])],8,IU))),128))])]),_:1})],512),[[o.vShow,h.value]]),o.withDirectives(o.createElementVNode("div",jU,[o.createElementVNode("img",{src:o.unref(Vt)+"/bimkk-app/pinapp-empty-box.png"},null,8,VU),L[5]||(L[5]=o.createElementVNode("span",null,"未选中任何对象,请单击模型对象以查看构件属性。",-1))],512),[[o.vShow,!h.value]])]),_:1})):o.createCommentVNode("",!0),!o.unref(Qt)("isMobile")&&o.unref(gr).currentTheme=="light-gray"?(o.openBlock(),o.createBlock(N,{key:1,panelTitle:"属性","click-handle":_,class:"pc_Inspector",pos:o.unref(Qt)("inspectorPos")},{default:o.withCtx(()=>[L[12]||(L[12]=o.createElementVNode("div",{class:"pc_Inspector_type_button",style:{display:"none"}},[o.createElementVNode("div",{class:"type_button"},"实例属性"),o.createElementVNode("div",{class:"type_button"},"类型属性")],-1)),o.createElementVNode("div",UU,[o.withDirectives(o.createElementVNode("div",HU,[o.createVNode(V,null,{default:o.withCtx(()=>[o.createElementVNode("div",{class:"basic_info",onClick:L[1]||(L[1]=$=>b(u))},[o.createElementVNode("div",zU,[o.createElementVNode("img",{src:w(u.expanded),class:"triangle"},null,8,GU),L[6]||(L[6]=o.createElementVNode("span",null,"基本属性",-1))]),o.withDirectives(o.createElementVNode("div",QU,[L[7]||(L[7]=o.createElementVNode("div",{class:"basic_info_title"},[o.createElementVNode("span",null,"名称"),o.createElementVNode("span",{style:{"margin-top":"2px"}},"UUID"),o.createElementVNode("span",null,"类型")],-1)),o.createElementVNode("div",WU,[o.createElementVNode("span",null,o.toDisplayString(u.entity_name),1),o.createElementVNode("span",null,o.toDisplayString(u.entity_id),1),o.createElementVNode("span",null,o.toDisplayString(u.entity_type),1)])],512),[[o.vShow,u.expanded]])]),o.createElementVNode("ul",$U,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(u.propertySets,($,X)=>(o.openBlock(),o.createElementBlock("li",{key:X,class:"propertyset",onClick:W=>b($)},[o.createElementVNode("div",XU,[o.createElementVNode("img",{src:w($.expanded),class:"triangle"},null,8,YU),o.createElementVNode("span",null,o.toDisplayString(o.unref(fu)($.name)),1)]),o.withDirectives(o.createElementVNode("div",JU,[o.createElementVNode("ul",ZU,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList($.properties,(W,D)=>(o.openBlock(),o.createElementBlock("li",{key:D,class:"properties"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(W,(z,M)=>(o.openBlock(),o.createElementBlock("div",{class:"title_value",key:M},[o.createElementVNode("span",qU,o.toDisplayString(o.unref(fu)(M)),1),o.createElementVNode("span",e9,o.toDisplayString(z),1)]))),128))]))),128))])],512),[[o.vShow,$.expanded]])],8,KU))),128))])]),_:1})],512),[[o.vShow,h.value]]),o.withDirectives(o.createElementVNode("div",t9,[o.createElementVNode("div",r9,[L[8]||(L[8]=o.createElementVNode("span",null,"对象数量",-1)),o.createElementVNode("span",n9,o.toDisplayString(c.objectCount),1)]),o.createElementVNode("div",i9,[L[9]||(L[9]=o.createElementVNode("span",null,"属性集数量",-1)),o.createElementVNode("span",s9,o.toDisplayString(c.pSetsCount),1)]),o.createElementVNode("div",a9,[L[10]||(L[10]=o.createElementVNode("span",null,"创建日期",-1)),o.createElementVNode("span",o9,o.toDisplayString(c.createDate),1)]),o.createElementVNode("div",l9,[L[11]||(L[11]=o.createElementVNode("span",null,"作者",-1)),o.createElementVNode("span",u9,o.toDisplayString(c.author),1)])],512),[[o.vShow,!h.value]])])]),_:1},8,["pos"])):o.createCommentVNode("",!0),o.unref(Qt)("isMobile")?(o.openBlock(),o.createElementBlock("div",c9,[o.createElementVNode("div",d9,[L[13]||(L[13]=o.createElementVNode("div",{class:"detail-title"},"属性",-1)),o.createElementVNode("div",f9,[o.createVNode(j,{class:"close",width:.4,"size-type":"rem","click-handle":_})])]),o.createVNode(V,null,{default:o.withCtx(()=>[o.createElementVNode("div",h9,[o.withDirectives(o.createElementVNode("div",p9,[o.createVNode(V,{height:"6.12rem"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"basic_info",onClick:L[2]||(L[2]=$=>b(u))},[o.createElementVNode("div",A9,[o.createElementVNode("img",{src:w(u.expanded),class:"triangle"},null,8,m9),L[14]||(L[14]=o.createElementVNode("span",null,"基本属性",-1))]),o.withDirectives(o.createElementVNode("div",g9,[o.createElementVNode("div",v9,[L[15]||(L[15]=o.createElementVNode("span",{class:"content_title"},"名称",-1)),o.createElementVNode("span",y9,o.toDisplayString(u.entity_name),1)]),o.createElementVNode("div",b9,[L[16]||(L[16]=o.createElementVNode("span",{class:"content_title",style:{"margin-top":"0.04rem"}}," UUID ",-1)),o.createElementVNode("span",_9,o.toDisplayString(u.entity_id),1)]),o.createElementVNode("div",w9,[L[17]||(L[17]=o.createElementVNode("span",{class:"content_title"},"类型",-1)),o.createElementVNode("span",x9,o.toDisplayString(u.entity_type),1)])],512),[[o.vShow,u.expanded]])]),o.createElementVNode("ul",C9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(u.propertySets,($,X)=>(o.openBlock(),o.createElementBlock("li",{key:X,class:"propertyset",onClick:W=>b($)},[o.createElementVNode("div",E9,[o.createElementVNode("img",{src:w($.expanded),class:"triangle"},null,8,P9),o.createElementVNode("span",null,o.toDisplayString(o.unref(fu)($.name)),1)]),o.withDirectives(o.createElementVNode("div",S9,[o.createElementVNode("ul",k9,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList($.properties,(W,D)=>(o.openBlock(),o.createElementBlock("li",{key:D,class:"properties"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(W,(z,M)=>(o.openBlock(),o.createElementBlock("div",{class:"title_value",key:M},[o.createElementVNode("span",M9,o.toDisplayString(o.unref(fu)(M)),1),o.createElementVNode("span",T9,o.toDisplayString(z),1)]))),128))]))),128))])],512),[[o.vShow,$.expanded]])],8,B9))),128))])]),_:1})],512),[[o.vShow,h.value]]),o.withDirectives(o.createElementVNode("div",I9,[o.createElementVNode("div",null,[L[18]||(L[18]=o.createElementVNode("span",null,"对象数量",-1)),o.createElementVNode("span",D9,o.toDisplayString(c.objectCount),1)]),o.createElementVNode("div",null,[L[19]||(L[19]=o.createElementVNode("span",null,"属性集数量",-1)),o.createElementVNode("span",F9,o.toDisplayString(c.pSetsCount),1)]),o.createElementVNode("div",null,[L[20]||(L[20]=o.createElementVNode("span",null,"创建日期",-1)),o.createElementVNode("span",R9,o.toDisplayString(c.createDate),1)]),o.createElementVNode("div",null,[L[21]||(L[21]=o.createElementVNode("span",null,"作者",-1)),o.createElementVNode("span",O9,o.toDisplayString(c.author),1)])],512),[[o.vShow,!h.value]])])]),_:1})])):o.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-18add1d0"]])},Symbol.toStringTag,{value:"Module"})),N9={class:"roam_container_wrapper"},j9={class:"mobile_roam-box"},V9={class:"roam-left"},U9={class:"roam-left-box"},H9={id:"roamMoveForward",class:"roam-left-item"},z9=["src"],G9={class:"roam-left-box"},Q9={id:"roamMoveBackward",class:"roam-left-item roam-left-bottom"},W9=["src"],$9={class:"speed_panel roam-left"},K9={class:"roam-left-item"},X9={class:"up_down_img"},Y9=["src"],J9={class:"speed_text"},Z9={class:"up_down_img"},q9=["src"],e7={class:"roam-right"},t7={id:"roamMoveUp",class:"roam-right-up"},r7=["src"],n7={class:"roam-right-center"},i7={id:"roamMoveLeft",class:"center-left"},s7=["src"],a7={class:"center-center"},o7=["src"],l7={id:"roamMoveRight",class:"center-right"},u7=["src"],c7={id:"roamMoveDown",class:"roam-right-down"},d7=["src"],f7=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"RoamTool",props:["componentId"],emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=o.ref("1"),S=o.ref(!1),v=o.ref(!0),f=I,h=G,d=o.ref(!1),l=V=>{h("emitHandler",V)},u=o.ref(Qt("isMobile"));o.onMounted(()=>{(Qt("isMobile")||Lr.INDUSTRY_CONFIGS.showRoam===!1)&&(v.value=!1),setTimeout(()=>{g(),_(),b(),w(),B(),k()},1e3),a.setReadyById(f.componentId)});const c=()=>{let V=window.bimViewer.eventTrigger;V.on("personModeSpeedUp",Q=>{C.value=Q.toString()}),V.on("personModeSpeedDown",Q=>{C.value=Q.toString()})};wr.on("BimViewer",c),o.onBeforeUnmount(()=>{wr.off("BimViewer",c)});const p=V=>{V?window.bimViewer.firstPersonMode.speedUp():window.bimViewer.firstPersonMode.speedDown()};So.INDUSTRY_CONFIGS.RoamTool||(wr.on("INDUSTRY_CONFIGS",()=>{Lr.INDUSTRY_CONFIGS.showRoam==!1&&(v.value=!1)}),So.INDUSTRY_CONFIGS.RoamTool=!0),o.watch(()=>a.isToolActive(f.componentId),V=>{A(!!V)});const A=V=>{Qt("isMobile")?d.value=V:(Qt("hideTool")||wr.emit("hideToolbar",V),V?v.value&&(S.value=!0):S.value=!1)},g=()=>{var V,Q,N;(V=document.getElementById("roamMoveUp"))==null||V.addEventListener(u.value?"touchstart":"mousedown",j=>{d.value&&(u.value&&j.preventDefault(),window.bimViewer.firstPersonMode.goUp=!0,T("goUp"))}),(Q=document.getElementById("roamMoveUp"))==null||Q.addEventListener(u.value?"touchend":"mouseup",()=>{d.value&&L()}),(N=document.getElementById("roamMoveUp"))==null||N.addEventListener(u.value?"touchcancel":"mouseup",()=>{d.value&&L()})},_=()=>{var V,Q,N;(V=document.getElementById("roamMoveDown"))==null||V.addEventListener(u.value?"touchstart":"mousedown",j=>{d.value&&(u.value&&j.preventDefault(),window.bimViewer.firstPersonMode.goDown=!0,T("goDown"))}),(Q=document.getElementById("roamMoveDown"))==null||Q.addEventListener(u.value?"touchend":"mouseup",()=>{d.value&&L()}),(N=document.getElementById("roamMoveDown"))==null||N.addEventListener(u.value?"touchcancel":"mouseup",()=>{d.value&&L()})},b=()=>{var V,Q,N;(V=document.getElementById("roamMoveLeft"))==null||V.addEventListener(u.value?"touchstart":"mousedown",j=>{d.value&&(u.value&&j.preventDefault(),window.bimViewer.firstPersonMode.goLeft=!0,T("goLeft"))}),(Q=document.getElementById("roamMoveLeft"))==null||Q.addEventListener(u.value?"touchend":"mouseup",()=>{d.value&&L()}),(N=document.getElementById("roamMoveLeft"))==null||N.addEventListener(u.value?"touchcancel":"mouseup",()=>{d.value&&L()})},w=()=>{var V,Q,N;(V=document.getElementById("roamMoveRight"))==null||V.addEventListener(u.value?"touchstart":"mousedown",j=>{d.value&&(u.value&&j.preventDefault(),window.bimViewer.firstPersonMode.goRight=!0,T("goDown"))}),(Q=document.getElementById("roamMoveRight"))==null||Q.addEventListener(u.value?"touchend":"mouseup",()=>{d.value&&L()}),(N=document.getElementById("roamMoveRight"))==null||N.addEventListener(u.value?"touchcancel":"mouseup",()=>{d.value&&L()})},B=()=>{var V,Q,N;(V=document.getElementById("roamMoveForward"))==null||V.addEventListener(u.value?"touchstart":"mousedown",j=>{d.value&&(u.value&&j.preventDefault(),window.bimViewer.firstPersonMode.goForward=!0,T("goForward"))}),(Q=document.getElementById("roamMoveForward"))==null||Q.addEventListener(u.value?"touchend":"mouseup",()=>{d.value&&L()}),(N=document.getElementById("roamMoveForward"))==null||N.addEventListener(u.value?"touchcancel":"mouseup",()=>{d.value&&L()})},k=()=>{var V,Q,N;(V=document.getElementById("roamMoveBackward"))==null||V.addEventListener(u.value?"touchstart":"mousedown",j=>{d.value&&(u.value&&j.preventDefault(),window.bimViewer.firstPersonMode.goBackward=!0,T("goBackward"))}),(Q=document.getElementById("roamMoveBackward"))==null||Q.addEventListener(u.value?"touchend":"mouseup",()=>{d.value&&L()}),(N=document.getElementById("roamMoveBackward"))==null||N.addEventListener(u.value?"touchcancel":"mouseup",()=>{d.value&&L()})},T=V=>{l({isTool:!0,event_target:"RoamTool",event_name:"",content:{roam:V}})},L=()=>{window.bimViewer.firstPersonMode.setdirectionChangeCancel(),l({isTool:!0,event_target:"RoamTool",event_name:"",content:{roam:"stop"}})};return(V,Q)=>(o.openBlock(),o.createElementBlock("div",N9,[o.createElementVNode("div",j9,[o.createElementVNode("div",V9,[o.createElementVNode("div",U9,[o.createElementVNode("div",H9,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/up.svg",alt:""},null,8,z9)])]),o.createElementVNode("div",G9,[o.createElementVNode("div",Q9,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/down.svg",alt:""},null,8,W9)])])]),o.createElementVNode("div",$9,[o.createElementVNode("div",K9,[o.createElementVNode("div",X9,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/plus.svg",onClick:Q[0]||(Q[0]=N=>p(!0)),alt:""},null,8,Y9)]),o.createElementVNode("div",J9,[o.createElementVNode("span",null,o.toDisplayString(C.value)+"X",1)]),o.createElementVNode("div",Z9,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/minus.svg",onClick:Q[1]||(Q[1]=N=>p(!1)),alt:""},null,8,q9)])])]),o.createElementVNode("div",e7,[o.createElementVNode("div",t7,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/top.svg",alt:""},null,8,r7)]),o.createElementVNode("div",n7,[o.createElementVNode("div",i7,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/left.svg",alt:""},null,8,s7)]),o.createElementVNode("div",a7,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/center.svg",alt:""},null,8,o7)]),o.createElementVNode("div",l7,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/right.svg",alt:""},null,8,u7)])]),o.createElementVNode("div",c7,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/roam-bar/bottom.svg",alt:""},null,8,d7)])])])]))}}),[["__scopeId","data-v-91e53e96"]])},Symbol.toStringTag,{value:"Module"})),h7={class:"xray_wrapper"},p7={class:"xray_content"},A7=["onClick"],m7=["src"],g7=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"XRayTool",props:["componentId"],emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I;o.onMounted(()=>{a.setReadyById(C.componentId)});const S=o.ref(0),v=()=>{const{eventTrigger:p}=window.bimViewer;Qt("isMobile")?p.on("touchEntity",A=>{!window.bimViewer.disableClickEvent||!a.isToolActiveBykey("xray")||f(A)}):p.on("pickedEntity",A=>{!window.bimViewer.disableClickEvent||!a.isToolActiveBykey("xray")||f(A)})};wr.on("BimViewer",v),o.onBeforeUnmount(()=>{wr.off("BimViewer",v)});const f=p=>{S.value!=-1&&(S.value==1?h(p):S.value==2?d(p):S.value==3&&l(p))},h=p=>{window.bimViewer.setEntityVisible(p)},d=p=>{window.bimViewer.setEntityHighlighted(p)},l=p=>{window.bimViewer.setEntitySelected(p)},u=()=>{window.bimViewer.setAllObjectsVisible(!0),window.bimViewer.setAllObjectsHighlighted(!1),window.bimViewer.setAllObjectsSelected(!1)},c=p=>{p==0?(S.value=p,u()):S.value=p};return(p,A)=>(o.openBlock(),o.createElementBlock("div",h7,[o.createElementVNode("div",p7,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref($V),(g,_)=>(o.openBlock(),o.createElementBlock("div",{key:_,class:o.normalizeClass(["button_",{button_active:S.value==g.id}]),onClick:b=>c(g.id)},[o.createElementVNode("img",{src:o.unref(Vt)+`/industry-viewer/xray-bar/${S.value==g.id?g.img_active:g.img}.svg`},null,8,m7),o.createElementVNode("span",{class:o.normalizeClass({active_text:S.value==g.id})},o.toDisplayString(g.name),3)],10,A7))),128))])]))}}),[["__scopeId","data-v-07847526"]])},Symbol.toStringTag,{value:"Module"})),v7={class:"mobile_measure_panel"},y7={class:"measure-list"},b7=["onClick"],_7={class:"measure-icon"},w7=["src"],x7={class:"measure-name"},C7={class:"measure-icon"},B7=["src"],E7={class:"mouse_btn"},P7=["src"],S7=["src"],k7=["src"],M7=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"MeasureTool",props:["componentId"],emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I,S=o.ref(0);o.onMounted(()=>{a.setReadyById(C.componentId),gr.currentTheme=="blue"?S.value=224:gr.currentTheme=="light-gray"&&(S.value=202)});let v,f,h,d;const l=o.ref(1),u=o.ref(),c=o.ref(),p=o.ref(),A=o.ref(),g=o.ref(),_=o.ref(),b=o.ref(),w=o.ref(),B=o.ref(1),k=o.ref("m"),T=o.ref(3),L=o.ref(!1),V=G,Q=ve=>{V("emitHandler",ve)},N=()=>{h=window.bimViewer,Ln.SaveViewerState({measure:"distance"}),f=window.bimViewer.measureAngleTool,v=window.bimViewer.measureDistanceTool,d=window.bimViewer.eventTrigger,Qt("isMobile")&&(d.on("newAngleMeasure",ve=>{L.value=!1}),d.on("newDistanceMeasure",ve=>{L.value=!1})),d.on("createAngleMeasure",ve=>{g.value=ve.id,A.value=ve.result,Qt("isMobile")&&(L.value=!0),j("createAngleMeasure",{newMeasure:ve})}),d.on("createDistanceMeasure",ve=>{u.value=ve.id,p.value=ve.id,c.value=ve.result,_.value=ve.xResult?ve.xResult:0,b.value=ve.yResult?ve.yResult:0,w.value=ve.zResult?ve.zResult:0,Qt("isMobile")&&(L.value=!0),j("createAngleMeasure",{newMeasure:ve})}),d.on("clickDistanceMeasure",ve=>{l.value==2&&$(lm[0]),u.value=ve.id,M(ve.id),Qt("isMobile")&&(L.value=!0),j("clickDistanceMeasure",{id:ve.id})}),d.on("clickAngleMeasure",ve=>{l.value==1&&$(lm[1]),D(ve.id),Qt("isMobile")&&(L.value=!0),j("clickAngleMeasure",{id:ve.id})}),v.precision=T.value,v.unit=k.value,v.scale=B.value};wr.on("BimViewer",N),o.onBeforeUnmount(()=>{wr.off("BimViewer",N)}),o.watch(()=>a.isToolActive(3),ve=>{O(ve)});const j=(ve,ue)=>{Q({isTool:!0,event_name:ve,event_target:"MeasureTool",content:ue})},$=ve=>{l.value!==ve.id&&(l.value=ve.id,Ln.SaveViewerState({measure:ve.code}),X(ve),Qt("isMobile")&&(L.value=!1))},X=ve=>{let ue=ve.code;window.bimViewer.measureTool.setActiveByType(ue,!0),Q({isTool:!0,event_name:"",event_target:"MeasureTool",content:{measureTool:ue}})},W=()=>{c.value="",A.value="",l.value===1?(R(p.value),j("destroyMeasureDistance",{id:p.value})):l.value===2&&(z(g.value),j("destroyMeasurementAngle",{id:p.value})),L.value=!1},D=ve=>{g.value=ve,A.value=f.getMeasureResultByID(ve)},z=ve=>f.destroyMeasurementById(ve),M=ve=>{p.value=ve,c.value=v.getMeasureResultByID(ve)},R=ve=>v.destroyMeasurementById(ve),O=ve=>{v.setAllVisible(ve),f.setAllVisible(ve)};o.onMounted(()=>{document.getElementById("top_bar")});const U=o.ref(!1);let F=!1,K=0,te=0,q=0,ie=0;const oe=o.ref(260),ce=o.ref(500),ee=()=>{U.value=!U.value,U.value?ae():Be()},he=ve=>{F?h.measureTool.currentTool.onSimulateMousedown([oe.value,ce.value]):ve.touches.length==1&&(K=ve.touches[0].clientX,te=ve.touches[0].clientY,F=!0)},ne=ve=>{if(ve.touches.length==1){const ue=ve.touches[0].clientX,Ae=ve.touches[0].clientY;q=ue-K,ie=Ae-te,oe.value+=q,ce.value+=ie;let P=new Int16Array(2);P[0]=oe.value+5,P[1]=ce.value+6,K=ue,te=Ae,h.measureTool.currentTool.onSimulateMousemove([oe.value,ce.value])}},re=ve=>{F&&h.measureTool.currentTool.onSimulateMouseup([oe.value,ce.value])},ae=()=>{const ve=document.getElementById("measure_mouseGroup");ve==null||ve.addEventListener("touchstart",he),ve==null||ve.addEventListener("touchmove",ne),ve==null||ve.addEventListener("touchend",re),oe.value=260,ce.value=500,K=0,te=0,q=0,ie=0,F=!1},Be=()=>{const ve=document.getElementById("measure_mouseGroup");ve==null||ve.removeEventListener("touchstart",he),ve==null||ve.removeEventListener("touchmove",ne),ve==null||ve.removeEventListener("touchend",re)};return(ve,ue)=>{var Ae,P;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",v7,[o.createElementVNode("div",y7,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(lm),ke=>(o.openBlock(),o.createElementBlock("div",{key:ke.id,class:o.normalizeClass(["measure-item",{"measure-item-active":l.value===ke.id}]),onClick:Ee=>$(ke)},[o.createElementVNode("div",_7,[o.createElementVNode("img",{src:o.unref(Vt)+`/industry-viewer/measure-bar/${l.value===ke.id?ke.svgActive:ke.svg}.svg`,alt:""},null,8,w7),o.createElementVNode("div",x7,o.toDisplayString(ke.name),1)])],10,b7))),128)),L.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"measure-item",onClick:W},[o.createElementVNode("div",C7,[o.createElementVNode("img",{src:o.unref(Vt)+"/industry-viewer/delete.svg",alt:""},null,8,B7),ue[0]||(ue[0]=o.createElementVNode("div",{class:"measure-name",style:{color:"#df1c1c"}}," 删除 ",-1))])])):o.createCommentVNode("",!0)]),o.createElementVNode("div",E7,[o.createElementVNode("div",{class:"mouse",onClick:ee},[o.createElementVNode("img",{src:`${o.unref(Vt)}/industry-viewer/action-bar/${U.value?(Ae=o.unref(a).getToolById(15))==null?void 0:Ae.imgActive:(P=o.unref(a).getToolById(15))==null?void 0:P.img}.svg`},null,8,P7),o.createElementVNode("span",{style:o.normalizeStyle({color:U.value?"#1457F7":"#262626"})},"虚拟鼠标",4)])])]),o.withDirectives(o.createElementVNode("div",{id:"measure_mouseGroup",class:"mouse_group",style:o.normalizeStyle({left:`${oe.value}px`,top:`${ce.value}px`})},[o.createElementVNode("img",{id:"mouse_icon",class:"mouse_icon",src:`${o.unref(Vt)}/industry-viewer/mouse-icon.svg`},null,8,S7),o.createElementVNode("img",{id:"mouse_img",class:"mouse_img",src:`${o.unref(Vt)}/industry-viewer/mouse-active-large.svg`},null,8,k7)],4),[[o.vShow,U.value]])],64)}}}),[["__scopeId","data-v-c58f900a"]])},Symbol.toStringTag,{value:"Module"})),T7={class:"alert_wrapper"},I7={class:"alert_box_wrapper"},D7={class:"alert_box"},F7={class:"alert_img"},R7=["src"],O7={class:"alert_close"},pw=_n(o.defineComponent({__name:"alert",props:{panelTitle:{type:String,default:""},width:{type:Number,default:240},clickHandle:{type:Function,default:()=>{}}},setup(I){return(G,a)=>{const C=ys;return o.openBlock(),o.createElementBlock("div",T7,[o.createElementVNode("div",I7,[o.createElementVNode("div",D7,[o.createElementVNode("div",F7,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/alert_warning.png"},null,8,R7)]),a[0]||(a[0]=o.createElementVNode("div",{class:"alert_title"},"请先在模型上选择一个点",-1)),o.createElementVNode("div",O7,[o.createVNode(C,{"click-handle":I.clickHandle,width:18},null,8,["click-handle"])])])])])}}}),[["__scopeId","data-v-918afff2"]]),L7={class:"mobile_section_panel"},N7={class:"slicing-title-box"},j7={class:"slicing-title-icon"},V7={class:"slicing-content-box"},U7={class:"slicing-select-box"},H7={class:"select-item"},z7={class:"select-item-left"},G7=["src"],Q7=["src"],W7={class:"select-item-center"},$7={class:"item-center-top"},K7={class:"item-center-bottom"},X7={class:"select-item"},Y7={class:"select-item-left"},J7=["src"],Z7=["src"],q7={class:"select-item-center"},eH={class:"item-center-top"},tH={class:"item-center-bottom"},rH={class:"select-item"},nH={class:"select-item-left"},iH=["src"],sH=["src"],aH={class:"select-item-center"},oH={class:"item-center-top"},lH={class:"item-center-bottom"},uH=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"SectionTool",props:["componentId"],emits:["closePanel"],setup(I,{emit:G}){const a=Yn(),C=I,S=o.ref(0);o.onMounted(()=>{a.setReadyById(C.componentId),gr.currentTheme=="blue"?S.value=240:gr.currentTheme=="light-gray"&&(S.value=202),document.addEventListener("click",v)});const v=X=>{l.value&&X.target.id!="controlOperatePanel"&&u(!1)},f=o.ref(!0);o.ref(!1);const h=o.ref(),d=o.ref(),l=o.ref(!1),u=X=>{l.value=X};let c,p;const A=G;o.watch(()=>a.isToolActive(C.componentId),X=>{Qt("isMobile")&&(X?(T(B.value.direction),document.addEventListener("touchmove",b)):document.removeEventListener("touchmove",b))});let g=!1;const _=()=>{c=window.bimViewer.sectionTool,p=window.bimViewer.eventTrigger,Qt("isMobile")||p.on("createSection",X=>{$(),h.value=Object.keys(j()).map(W=>({id:W,isLook:!0,directionLeft:!0})),N(X.id,!0),d.value=X.id,Q(X.id)}),Qt("isMobile")&&(p.on("touchPlaneStart",()=>{g=!0}),p.on("touchPlaneEnd",()=>{g=!1}))};wr.on("BimViewer",_),o.onBeforeUnmount(()=>{wr.off("BimViewer",_),document.removeEventListener("click",v)});const b=()=>{g&&L()},w=o.ref({x:0,y:0,z:0}),B=o.ref({direction:"x"}),k=X=>{T(X)},T=X=>{switch(B.value.direction=X,X){case"x":window.bimViewer.sectionTool.sectionDirection=0,window.bimViewer.sectionTool.setControlPos(100-w.value.x);break;case"y":window.bimViewer.sectionTool.sectionDirection=1,window.bimViewer.sectionTool.setControlPos(w.value.y);break;case"z":window.bimViewer.sectionTool.sectionDirection=2,window.bimViewer.sectionTool.setControlPos(100-w.value.z);break}},L=()=>{switch(B.value.direction){case"x":w.value.x=100-window.bimViewer.sectionTool.getControlPos();break;case"y":w.value.y=window.bimViewer.sectionTool.getControlPos();break;case"z":w.value.z=100-window.bimViewer.sectionTool.getControlPos();break}},V=()=>{c.setActive(!1),A("closePanel")},Q=X=>{c.showSectionPlane(X)},N=(X,W)=>{for(let D=0;D<h.value.length;D++)X==h.value[D].id&&(h.value[D].isLook=W)},j=()=>c.getSectionPlanes(),$=()=>{c.hideControl()};return(X,W)=>{const D=ys,z=Q1,M=Vi,R=pw;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",L7,[o.createElementVNode("div",N7,[W[12]||(W[12]=o.createElementVNode("div",{class:"slicing-title"},"剖切",-1)),o.createElementVNode("div",j7,[o.createVNode(D,{width:.4,"size-type":"rem","click-handle":V})])]),o.createElementVNode("div",V7,[o.createVNode(M,null,{default:o.withCtx(()=>[o.createElementVNode("div",U7,[o.createElementVNode("div",H7,[o.createElementVNode("div",z7,[B.value.direction==="x"?(o.openBlock(),o.createElementBlock("img",{key:0,src:o.unref(Vt)+"/bim-viewer/section_look_icon.png",alt:"",onClick:W[0]||(W[0]=O=>k("x"))},null,8,G7)):(o.openBlock(),o.createElementBlock("img",{key:1,src:o.unref(Vt)+"/bim-viewer/section_unlook_icon.png",alt:"",onClick:W[1]||(W[1]=O=>k("x"))},null,8,Q7))]),o.createElementVNode("div",W7,[o.createElementVNode("div",$7,[W[13]||(W[13]=o.createElementVNode("div",null,"X轴",-1)),o.createElementVNode("div",null,o.toDisplayString(w.value.x)+" %",1)]),o.createElementVNode("div",K7,[o.createVNode(z,{modelValue:w.value.x,"onUpdate:modelValue":W[2]||(W[2]=O=>w.value.x=O),size:"large","show-tooltip":!1,onInput:W[3]||(W[3]=O=>T("x"))},null,8,["modelValue"])])])]),o.createElementVNode("div",X7,[o.createElementVNode("div",Y7,[B.value.direction==="y"?(o.openBlock(),o.createElementBlock("img",{key:0,src:o.unref(Vt)+"/bim-viewer/section_look_icon.png",alt:"",onClick:W[4]||(W[4]=O=>k("y"))},null,8,J7)):(o.openBlock(),o.createElementBlock("img",{key:1,src:o.unref(Vt)+"/bim-viewer/section_unlook_icon.png",alt:"",onClick:W[5]||(W[5]=O=>k("y"))},null,8,Z7))]),o.createElementVNode("div",q7,[o.createElementVNode("div",eH,[W[14]||(W[14]=o.createElementVNode("div",null,"Y轴",-1)),o.createElementVNode("div",null,o.toDisplayString(w.value.y)+" %",1)]),o.createElementVNode("div",tH,[o.createVNode(z,{modelValue:w.value.y,"onUpdate:modelValue":W[6]||(W[6]=O=>w.value.y=O),size:"large","show-tooltip":!1,onInput:W[7]||(W[7]=O=>T("y"))},null,8,["modelValue"])])])]),o.createElementVNode("div",rH,[o.createElementVNode("div",nH,[B.value.direction==="z"?(o.openBlock(),o.createElementBlock("img",{key:0,src:o.unref(Vt)+"/bim-viewer/section_look_icon.png",alt:"",onClick:W[8]||(W[8]=O=>k("z"))},null,8,iH)):(o.openBlock(),o.createElementBlock("img",{key:1,src:o.unref(Vt)+"/bim-viewer/section_unlook_icon.png",alt:"",onClick:W[9]||(W[9]=O=>k("z"))},null,8,sH))]),o.createElementVNode("div",aH,[o.createElementVNode("div",oH,[W[15]||(W[15]=o.createElementVNode("div",null,"Z轴",-1)),o.createElementVNode("div",null,o.toDisplayString(w.value.z)+" %",1)]),o.createElementVNode("div",lH,[o.createVNode(z,{modelValue:w.value.z,"onUpdate:modelValue":W[10]||(W[10]=O=>w.value.z=O),size:"large","show-tooltip":!1,onInput:W[11]||(W[11]=O=>T("z"))},null,8,["modelValue"])])])])])]),_:1})])]),o.withDirectives(o.createVNode(R,{"click-handle":()=>{f.value=!1}},null,8,["click-handle"]),[[o.vShow,f.value&&!o.unref(Qt)("isMobile")]])],64)}}}),[["__scopeId","data-v-8a834966"]])},Symbol.toStringTag,{value:"Module"})),cH={class:"comment_component"},dH={class:"mobile_comments_toolbar"},fH={class:"comment_toolbar"},hH={class:"comment-list"},pH=["onClick"],AH={class:"comment-icon"},mH=["src"],gH={class:"comment-name"},vH={class:"comment-icon"},yH=["src"],bH={key:0,class:"comment_create_text_box"},_H={class:"label-text-edit"},wH={class:"text-edit-head"},xH=["src"],CH={class:"text-edit-body"},BH={class:"text-edit-input"},EH=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"CommentTool",props:["componentId"],emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I;o.onMounted(()=>{a.setReadyById(C.componentId)});let S,v;const f=o.ref(0),h=o.ref(1),d=o.ref(1);o.ref(1),o.ref(fw);const l=o.ref(),u=o.ref(!1),c=o.ref(!1),p=o.ref(!1),A=o.ref(!1),g=o.ref(""),_=o.ref(),b=o.ref({show:!1,title:"标题",content:"内容",submitName:"确认",confirm:()=>{console.log("点击了确认"),b.value.show=!1},close:()=>{console.log("点击了关闭"),b.value.show=!1}}),w=()=>{S=window.bimViewer.commentTool,v=window.bimViewer.eventTrigger,Q(""),v.on("createNew",()=>{f.value=0,Q("")}),v.on("newState",()=>{u.value=!0,c.value=!1}),v.on("noPreviousState",()=>{u.value=!1}),v.on("noNewState",()=>{c.value=!1}),v.on("choseTarget",N=>{p.value=!0,f.value=0,Q("")})};wr.on("BimViewer",w),o.onBeforeUnmount(()=>{wr.off("BimViewer",w)}),o.watch(()=>a.isToolActive(C.componentId),N=>{var j;N?(f.value=1,Q("path"),setTimeout(()=>{var $;Qt("isMobile")&&(($=document.getElementById("svgImage"))==null||$.addEventListener("touchstart",B))},100)):Qt("isMobile")&&((j=document.getElementById("svgImage"))==null||j.removeEventListener("touchstart",B))});const B=N=>{N.target.tagName=="image"&&(f.value===5?(g.value="",_.value=N,A.value=!0):p.value=!1)},k=()=>{g.value?(S.clickCreateText(_.value,g.value),A.value=!1):T("请输入内容")},T=(N,j)=>{b.value={show:!0,title:"提示",content:N,submitName:"确定",confirm:()=>{console.log("点击了确认"),b.value.show=!1},close:()=>{console.log("点击了关闭"),b.value.show=!1}}},L=N=>{f.value===N.id&&(f.value=0),h.value=1,d.value=1,l.value=N.buttontype,f.value=N.id,Q(N.buttontype)},V=()=>{window.bimViewer.commentTool.deleteCurrentComments(),p.value=!1},Q=N=>{S.setCurrentMode(N)};return(N,j)=>{const $=Vi,X=ji;return o.openBlock(),o.createElementBlock("div",cH,[o.createElementVNode("div",{id:"comments_panel",class:"comments_panel",style:o.normalizeStyle({background:o.unref(Qt)("backgroundColor")})},null,4),o.createElementVNode("div",dH,[o.createElementVNode("div",fH,[o.createVNode($,null,{default:o.withCtx(()=>[o.createElementVNode("div",hH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(fw),(W,D)=>(o.openBlock(),o.createElementBlock("div",{key:D,class:o.normalizeClass(["comment-item",{"comment-item-active":f.value===W.id}]),onClick:z=>L(W)},[o.createElementVNode("div",AH,[o.createElementVNode("img",{src:o.unref(Vt)+`/industry-viewer/comment-bar/${f.value===W.id?W.svgActive:W.svg}.svg`},null,8,mH),o.createElementVNode("div",gH,o.toDisplayString(W.name),1)])],10,pH))),128)),p.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"comment-item",onClick:V},[o.createElementVNode("div",vH,[o.createElementVNode("img",{src:o.unref(Vt)+"/industry-viewer/delete.svg"},null,8,yH),j[2]||(j[2]=o.createElementVNode("div",{class:"comment-name",style:{color:"#df1c1c"}}," 删除 ",-1))])])):o.createCommentVNode("",!0)])]),_:1})])]),A.value?(o.openBlock(),o.createElementBlock("div",bH,[o.createElementVNode("div",_H,[o.createElementVNode("div",wH,[o.createElementVNode("img",{class:"text-edit-back",src:o.unref(Vt)+"/industry-viewer/back_gray.svg",onClick:j[0]||(j[0]=W=>A.value=!1)},null,8,xH),j[3]||(j[3]=o.createElementVNode("div",{class:"text-edit-title"},"创建文字批注",-1)),o.createElementVNode("div",{class:"text-edit-finish",onClick:k}," 完成 ")]),o.createElementVNode("div",CH,[o.createElementVNode("div",BH,[o.createVNode(X,{modelValue:g.value,"onUpdate:modelValue":j[1]||(j[1]=W=>g.value=W),type:"textarea",placeholder:"请输入文本内容",autosize:{minRows:2}},null,8,["modelValue"])])])])])):o.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-0b587a92"]])},Symbol.toStringTag,{value:"Module"})),PH={class:"annotation_component"},SH={class:"anno_toolList"},kH=["onClick"],MH={class:"item-img"},TH=["src"],IH={class:"item-name"},DH=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"AnnotationTool",props:["componentId"],emits:["uploadImage","clickAnnotation","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=G,S=k=>{C("emitHandler",k)};let v;const f=o.ref(!0),h=o.ref("");let d;const l=o.ref(),u=I;o.watch(()=>a.isToolActive(u.componentId),k=>{k||(h.value="")}),o.onMounted(()=>{l.value=Qt("annoLimit"),a.setReadyById(u.componentId)});const c={image:`${Vt}/BIMX_Website/main/mainView/function_icon/annotation_icons/image_active.png`,file:`${Vt}/BIMX_Website/main/mainView/function_icon/annotation_icons/file_active.png`,record:`${Vt}/BIMX_Website/main/mainView/function_icon/annotation_icons/record_active.png`,text:`${Vt}/BIMX_Website/main/mainView/function_icon/annotation_icons/text_active.png`,video:`${Vt}/BIMX_Website/main/mainView/function_icon/annotation_icons/video_active.png`},p=()=>{v=window.bimViewer.annotationTool,v.setTypeImage(c),d=window.bimViewer.eventTrigger,d.on("createAnnotation",k=>{S({isTool:!0,event_target:"AnnotationTool",event_name:"createAnnotation",content:{currentAnnotation:k}})}),d.on("markerClicked",k=>{S({isTool:!0,event_target:"AnnotationTool",event_name:"clickAnnotation",content:{targetAnno:k}})}),Qt("isMobile")||d.on("requestDeleteMarker",k=>{S({isTool:!0,event_target:"AnnotationTool",event_name:"requestDelAnno",content:{msg:"请求删除指定标注",annoId:k}})})};wr.on("BimViewer",p);const A=k=>{_(g(k.type))};wr.on("setAnnoStatus",A),o.onBeforeUnmount(()=>{wr.off("BimViewer",p),wr.off("setAnnoStatus",A)});const g=k=>{if(k==="image")return du[0];if(k==="record")return du[1];if(k==="video")return du[2];if(k==="file")return du[3];if(k==="text")return du[4]},_=k=>{h.value===k.code?(h.value="",w(k,!1)):(h.value=k.code,w(k,!0))},b=k=>{window.bimViewer.annotationTool.setEnabled(k)},w=(k,T)=>{b(T),B(k.code,T)},B=(k,T)=>{window.bimViewer.annotationTool.setCurrentType(k),S({isTool:!0,event_target:"AnnotationTool",event_name:"clickAnnoTool",content:{active:T,tool_type:k}})};return(k,T)=>{const L=pw;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",PH,[o.createElementVNode("div",SH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(du),(V,Q)=>(o.openBlock(),o.createElementBlock("div",{key:Q,class:o.normalizeClass(["label-item",{"label-item-active":h.value===V.code}]),onClick:N=>_(V)},[o.createElementVNode("div",MH,[o.createElementVNode("img",{class:"label-item-img",src:o.unref(Vt)+`/industry-viewer/annotation-bar/${h.value===V.code?V.imgActive:V.img}.svg`,alt:""},null,8,TH),o.createElementVNode("div",IH,o.toDisplayString(V.name),1)])],10,kH))),128))])]),o.withDirectives(o.createVNode(L,{"click-handle":()=>{f.value=!1}},null,8,["click-handle"]),[[o.vShow,f.value]])],64)}}}),[["__scopeId","data-v-6962f253"]])},Symbol.toStringTag,{value:"Module"})),FH={class:"wrapper"},RH={class:"screen_thumbnail"},OH=["src"],LH={class:"validity-period"},NH={key:0,class:"custom"},jH=Object.freeze(Object.defineProperty({__proto__:null,default:o.defineComponent({__name:"ScreenShotTool",props:["componentId"],emits:["closePanel"],setup(I,{emit:G}){const a=Yn(),C=I,S=o.ref(0),v=o.ref(),f=o.ref(),h=o.ref(),d=G;o.onMounted(()=>{v.value=1280,f.value=720,a.setReadyById(C.componentId)}),o.watch(()=>a.isToolActive(C.componentId),A=>{A&&c(220,124,!1)});const l=A=>{S.value=A,A!==3&&(v.value=um[A].width,f.value=um[A].height)},u=()=>{d("closePanel")},c=(A,g,_)=>{const b=document.getElementById("myCanvas"),w=document.createElement("a");w.download="screenshot.png";const B=document.createElement("canvas"),k=B.getContext("2d");if(b&&k){B.width=A,B.height=g;const T=A/b.width,L=g/b.height,V=Math.max(T,L),Q=b.width*V,N=b.height*V,j=(A-Q)/2,$=(g-N)/2;k.clearRect(0,0,A,g),k.fillStyle="transparent",k.fillRect(0,0,A,g),k.drawImage(b,0,0,b.width,b.height,j,$,Q,N),_?B.toBlob(function(X){const W=URL.createObjectURL(X);w.href=W,w.click(),URL.revokeObjectURL(W)}):h.value=B.toDataURL("image/png")}},p=()=>{c(v.value,f.value,!0)};return(A,g)=>{const _=XR,b=YR,w=ji,B=Sf;return o.openBlock(),o.createBlock(B,{class:"screen_container",width:240,panelTitle:"截图","click-handle":u},{default:o.withCtx(()=>[o.createElementVNode("div",FH,[o.createElementVNode("div",RH,[o.createElementVNode("img",{class:"thumbnail_img",src:h.value,alt:""},null,8,OH)]),o.createVNode(b,{modelValue:S.value,"onUpdate:modelValue":g[0]||(g[0]=k=>S.value=k),onChange:l},{default:o.withCtx(()=>[o.createElementVNode("div",LH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(um),k=>(o.openBlock(),o.createElementBlock("div",{key:k.id,class:"period_box"},[o.createVNode(_,{label:k.id},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(k.name),1)]),_:2},1032,["label"])]))),128))])]),_:1},8,["modelValue"]),S.value===3?(o.openBlock(),o.createElementBlock("div",NH,[o.createVNode(w,{modelValue:v.value,"onUpdate:modelValue":g[1]||(g[1]=k=>v.value=k),placeholder:"请输入长度"},null,8,["modelValue"]),g[3]||(g[3]=o.createTextVNode(" x ")),o.createVNode(w,{modelValue:f.value,"onUpdate:modelValue":g[2]||(g[2]=k=>f.value=k),placeholder:"请输入宽度"},null,8,["modelValue"])])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"footer"},[o.createElementVNode("div",{class:"btn1",onClick:u}," 取消 "),o.createElementVNode("div",{class:"btn2",onClick:p}," 保存 ")])])]),_:1})}}})},Symbol.toStringTag,{value:"Module"}));class VH{constructor(G){Fn(this,"duration");Fn(this,"active");Fn(this,"remainingTime");Fn(this,"timerInterval");this.duration=G,this.remainingTime=G,this.active=!1}start(G){this.active&&(this.remainingTime=this.duration,clearInterval(this.timerInterval)),this.active=!0;const a=()=>{if(this.remainingTime<=0){clearInterval(this.timerInterval),this.active=!1,this.remainingTime=this.duration,G();return}this.remainingTime-=1};this.timerInterval=setInterval(a,1e3)}stop(){this.active&&(clearInterval(this.timerInterval),this.active=!1)}}const UH={style:{height:"var(--setting-content-height)"}},HH={key:0,class:"color-list"},zH=["onClick"],GH={class:"setting-effect"},QH={class:"setting-effect"},WH={class:"light-slider"},$H={key:1,class:"setting-title"},KH={key:2,class:"setting-effect"},XH={class:"setting-effect"},YH={class:"setting-effect"},JH={class:"setting-effect"},ZH={class:"setting-effect"},qH={class:"setting-effect"},ez={class:"setting-effect"},tz={class:"setting_panel"},rz={class:"setting-title-box"},nz={class:"setting-title-icon"},iz={class:"setting-color-box"},sz={class:"setting-color-list"},az=["onClick"],oz={class:"setting-config-box"},lz={class:"setting-switch-item"},uz={class:"setting-switch-item"},cz={class:"light-slider"},dz={class:"setting-switch-item"},fz={class:"setting-switch-item"},hz={class:"setting-switch-item"},pz={class:"setting-switch-item"},Az={class:"setting-switch-item"},mz={class:"setting-switch-item"},gz={class:"setting-switch-item"},vz={class:"speed-slider"},yz=Object.freeze(Object.defineProperty({__proto__:null,default:_n(o.defineComponent({__name:"SettingTool",props:{instruction:{},componentId:{}},emits:["closePanel","emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I,S=o.ref(0);o.onMounted(()=>{a.setReadyById(C.componentId),gr.currentTheme=="blue"?S.value=240:gr.currentTheme=="light-gray"&&(S.value=202)});let v;const f=o.ref(!1),h=o.ref(!1),d=o.ref(!1),l=o.ref(!1),u=o.ref(!1),c=o.ref(!0),p=o.ref(!1),A=o.ref(!1),g=o.ref(1),_=o.ref(50),b=o.ref(!1),w=new VH(5);o.watch(()=>a.isToolActive(C.componentId),ce=>{ce===!1&&(w.stop(),b.value&&j())});const B=o.ref(50),k=o.ref(["亮"]),T=o.ref(["亮","暗"]),L=o.ref("linear-gradient(180deg, #fffefb 0%, #daebff 100%)"),V=G,Q=()=>{v=window.bimViewer,v.viewer.scene.on("aabb",()=>{te(p.value),q(k.value[0])})},N=()=>{b.value=!0,w.start(()=>{j()})},j=()=>{var ee,he;let ce;Qt("isMobile")?ce={backgroundColor:((ee=cu.find(ne=>ne.id==g.value))==null?void 0:ee.name)??"渐变蓝",showEdges:d.value,lightIntensity:_.value,skyBox:l.value,orthoMode:u.value,modelType2D:c.value,yAxisDown:f.value,zAxisUp:h.value,showSpace:p.value,spaceEffect:k.value[0],touchDollySpeed:B.value}:ce={backgroundColor:((he=cu.find(ne=>ne.id==g.value))==null?void 0:he.name)??"渐变蓝",showEdges:d.value,lightIntensity:_.value,skyBox:l.value,orthoMode:u.value,modelType2D:c.value,yAxisDown:f.value,zAxisUp:h.value,showSpace:p.value,spaceEffect:k.value[0]},X({isTool:!0,event_target:"SettingTool",event_name:"saveSetting",content:{newSets:ce}}),b.value=!1},$=ce=>{const ee=ce.lastSet,he=cu.find(ne=>ne.name==ee.backgroundColor);g.value=he?he.id:1,R(he??cu[0]),d.value=ee.showEdges,U(d.value),_.value=ee.lightIntensity,O(_.value),u.value=ee.orthoMode,K(u.value),c.value=ee.modelType2D,F(c.value),p.value=ee.showSpace,te(p.value),k.value=[ee.spaceEffect],q(k.value[0]),f.value=ee.yAxisDown,f.value&&M(),h.value=ee.zAxisUp,h.value&&z(),Qt("isMobile")?(B.value=ee.touchDollySpeed,oe(B.value)):(l.value=ee.skyBox,ie(l.value)),b.value=!1};wr.on("BimViewer",Q),wr.on("lastSetsContent",$),o.onBeforeUnmount(()=>{wr.off("BimViewer",Q),wr.off("lastSetsContent",$)});const X=ce=>{V("emitHandler",ce)},W=ce=>{ce&&ce.target.id!="setting_back"||(V("closePanel"),D(!1))},D=(ce=!A.value)=>{A.value=ce},z=ce=>{N(),window.bimViewer.setWorldAxisZUp(h.value),K(u.value)},M=ce=>{N(),window.bimViewer.setWorldAxisYDown(f.value),K(u.value)},R=ce=>{N(),g.value=ce.id,L.value=ce.color,wr.emit("changeBackgroundColor",ce.color)},O=ce=>{N(),v.setLightIntensity(ce)},U=ce=>{N(),v.setAllObjectsEdges(ce),ce||v.setObjectsEdges(Ln.entityState.edgesObjectIds,!0)},F=ce=>{N(),v.SetThreeDModeActive(ce),Qt("isMobile")&&(window.bimViewer.navCubeMode.visible=!1)},K=ce=>{N(),v.SetOrthoModeActive(ce)},te=ce=>{N(),v.SetShowSpaceModeActive(ce)},q=ce=>{N(),ce=="亮"?window.bimViewer.setSpaceMaterialColor(1):window.bimViewer.setSpaceMaterialColor(2),k.value=T.value.includes(ce)?[ce]:[]},ie=ce=>{N(),v.SetSkyBoxToolActive(ce)},oe=ce=>{N(),ce==0?v.viewer.cameraControl.customTouchDollyRate=.05/50:v.viewer.cameraControl.customTouchDollyRate=ce/50};return(ce,ee)=>{const he=rN,ne=Q1,re=NA,ae=m1,Be=Vi,ve=Sf,ue=ys,Ae=o.resolveComponent("SuccessFilled"),P=tn;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.unref(Qt)("isMobile")?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(ve,{key:0,class:"setting_contaier",width:S.value,panelTitle:"设置","click-handle":W,style:{height:"var(--setting-panel-height)"}},{default:o.withCtx(()=>[o.createElementVNode("div",UH,[o.createVNode(Be,null,{default:o.withCtx(()=>[ee[45]||(ee[45]=o.createElementVNode("div",{class:"setting-title"},"效果",-1)),o.createElementVNode("div",{class:"setting-effect",onClick:ee[0]||(ee[0]=ke=>D())},[ee[35]||(ee[35]=o.createTextVNode(" 背景颜色 ")),o.createElementVNode("div",{class:"choose-color",style:o.normalizeStyle({background:L.value})},null,4)]),A.value?(o.openBlock(),o.createElementBlock("div",HH,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(cu),ke=>(o.openBlock(),o.createElementBlock("div",{key:ke.id,class:o.normalizeClass(["color-item",{"color-item-active":g.value===ke.id}]),onClick:Ee=>R(ke)},[o.createElementVNode("div",{class:"bg",style:o.normalizeStyle({background:ke.color,border:ke.id===4?"1px solid #F1F1F1":"none"})},null,4),o.createTextVNode(" "+o.toDisplayString(ke.name),1)],10,zH))),128))])):o.createCommentVNode("",!0),o.createElementVNode("div",GH,[ee[36]||(ee[36]=o.createTextVNode(" 显示边缘 ")),o.createVNode(he,{modelValue:d.value,"onUpdate:modelValue":ee[1]||(ee[1]=ke=>d.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[2]||(ee[2]=ke=>U())},null,8,["modelValue"])]),o.createElementVNode("div",QH,[ee[37]||(ee[37]=o.createTextVNode(" 光源强度 ")),o.createElementVNode("div",WH,[o.createVNode(ne,{modelValue:_.value,"onUpdate:modelValue":ee[3]||(ee[3]=ke=>_.value=ke),onInput:ee[4]||(ee[4]=ke=>O(_.value))},null,8,["modelValue"])])]),o.unref(Qt)("skyboxImg")?(o.openBlock(),o.createElementBlock("div",$H," 外观模式 ")):o.createCommentVNode("",!0),o.unref(Qt)("skyboxImg")?(o.openBlock(),o.createElementBlock("div",KH,[ee[38]||(ee[38]=o.createTextVNode(" 天空盒 ")),o.createVNode(he,{modelValue:l.value,"onUpdate:modelValue":ee[5]||(ee[5]=ke=>l.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[6]||(ee[6]=ke=>ie())},null,8,["modelValue"])])):o.createCommentVNode("",!0),ee[46]||(ee[46]=o.createElementVNode("div",{class:"setting-title"},"模型视角切换",-1)),o.createElementVNode("div",XH,[ee[39]||(ee[39]=o.createTextVNode(" 透视/正交 ")),o.createVNode(he,{modelValue:u.value,"onUpdate:modelValue":ee[7]||(ee[7]=ke=>u.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[8]||(ee[8]=ke=>K())},null,8,["modelValue"])]),o.createElementVNode("div",YH,[ee[40]||(ee[40]=o.createTextVNode(" 2D/3D ")),o.createVNode(he,{modelValue:c.value,"onUpdate:modelValue":ee[9]||(ee[9]=ke=>c.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[10]||(ee[10]=ke=>F())},null,8,["modelValue"])]),o.createElementVNode("div",JH,[ee[41]||(ee[41]=o.createElementVNode("div",null,"模型倒置",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:f.value,"onUpdate:modelValue":ee[11]||(ee[11]=ke=>f.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[12]||(ee[12]=ke=>M())},null,8,["modelValue"])])]),o.createElementVNode("div",ZH,[ee[42]||(ee[42]=o.createElementVNode("div",null,"Z轴向上",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:h.value,"onUpdate:modelValue":ee[13]||(ee[13]=ke=>h.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[14]||(ee[14]=ke=>z())},null,8,["modelValue"])])]),o.createElementVNode("div",qH,[ee[43]||(ee[43]=o.createTextVNode(" 显示模型空间 ")),o.createVNode(he,{modelValue:p.value,"onUpdate:modelValue":ee[15]||(ee[15]=ke=>p.value=ke),style:{"--el-switch-on-color":"#0065fc"},onChange:ee[16]||(ee[16]=ke=>te())},null,8,["modelValue"])]),o.createElementVNode("div",ez,[ee[44]||(ee[44]=o.createTextVNode(" 空间效果 ")),o.createVNode(ae,{modelValue:k.value,"onUpdate:modelValue":ee[17]||(ee[17]=ke=>k.value=ke),size:"small"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(T.value,ke=>(o.openBlock(),o.createBlock(re,{key:ke,label:ke,onChange:Ee=>q(ke)},null,8,["label","onChange"]))),128))]),_:1},8,["modelValue"])])]),_:1})])]),_:1},8,["width"])),o.unref(Qt)("isMobile")?(o.openBlock(),o.createElementBlock("div",{key:1,id:"setting_back",class:"setting_back",onClick:W},[o.createElementVNode("div",tz,[o.createElementVNode("div",rz,[ee[47]||(ee[47]=o.createElementVNode("div",{class:"setting-title"},"设置",-1)),o.createElementVNode("div",nz,[o.createVNode(ue,{width:.4,"size-type":"rem","click-handle":W})])]),o.createElementVNode("div",iz,[o.createElementVNode("div",sz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(cu),(ke,Ee)=>(o.openBlock(),o.createElementBlock("div",{key:Ee,class:o.normalizeClass(["setting-color-item",{"setting-color-item-active":g.value===ke.id}]),onClick:pe=>R(ke)},[o.createElementVNode("div",{class:"setting-color-icon",style:o.normalizeStyle({background:ke.color,border:ke.id===g.value?"0.02rem solid #0065FC":""})},null,4),o.createElementVNode("div",{class:"setting-color-name",style:o.normalizeStyle({color:ke.id===g.value?"#0065FC":""})},[o.createTextVNode(o.toDisplayString(ke.name)+" ",1),ke.id===g.value?(o.openBlock(),o.createBlock(P,{key:0,color:"#0065fc",size:"0.24rem"},{default:o.withCtx(()=>[o.createVNode(Ae)]),_:1})):o.createCommentVNode("",!0)],4)],10,az))),128))])]),o.createElementVNode("div",oz,[o.createVNode(Be,{height:"188"},{default:o.withCtx(()=>[o.createElementVNode("div",lz,[ee[48]||(ee[48]=o.createElementVNode("div",null,"显示边缘",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:d.value,"onUpdate:modelValue":ee[18]||(ee[18]=ke=>d.value=ke),size:"large",onChange:ee[19]||(ee[19]=ke=>U())},null,8,["modelValue"])])]),o.createElementVNode("div",uz,[ee[49]||(ee[49]=o.createElementVNode("div",null,"光源强度",-1)),o.createElementVNode("div",cz,[o.createVNode(ne,{modelValue:_.value,"onUpdate:modelValue":ee[20]||(ee[20]=ke=>_.value=ke),onInput:ee[21]||(ee[21]=ke=>O(_.value))},null,8,["modelValue"])])]),o.createElementVNode("div",dz,[ee[50]||(ee[50]=o.createElementVNode("div",null,"透视/正交",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:u.value,"onUpdate:modelValue":ee[22]||(ee[22]=ke=>u.value=ke),size:"large",onChange:ee[23]||(ee[23]=ke=>K())},null,8,["modelValue"])])]),o.createElementVNode("div",fz,[ee[51]||(ee[51]=o.createElementVNode("div",null,"2D/3D",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:c.value,"onUpdate:modelValue":ee[24]||(ee[24]=ke=>c.value=ke),size:"large",onChange:ee[25]||(ee[25]=ke=>F())},null,8,["modelValue"])])]),o.createElementVNode("div",hz,[ee[52]||(ee[52]=o.createElementVNode("div",null,"模型倒置",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:f.value,"onUpdate:modelValue":ee[26]||(ee[26]=ke=>f.value=ke),size:"large",onChange:ee[27]||(ee[27]=ke=>M())},null,8,["modelValue"])])]),o.createElementVNode("div",pz,[ee[53]||(ee[53]=o.createElementVNode("div",null,"Z轴向上",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:h.value,"onUpdate:modelValue":ee[28]||(ee[28]=ke=>h.value=ke),size:"large",onChange:ee[29]||(ee[29]=ke=>z())},null,8,["modelValue"])])]),o.createElementVNode("div",Az,[ee[54]||(ee[54]=o.createElementVNode("div",null,"显示模型空间",-1)),o.createElementVNode("div",null,[o.createVNode(he,{modelValue:p.value,"onUpdate:modelValue":ee[30]||(ee[30]=ke=>p.value=ke),size:"large",onChange:ee[31]||(ee[31]=ke=>te())},null,8,["modelValue"])])]),o.createElementVNode("div",mz,[ee[55]||(ee[55]=o.createElementVNode("div",null,"空间效果",-1)),o.createVNode(ae,{modelValue:k.value,"onUpdate:modelValue":ee[32]||(ee[32]=ke=>k.value=ke)},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(T.value,ke=>(o.openBlock(),o.createBlock(re,{key:ke,label:ke,onChange:Ee=>q(ke)},null,8,["label","onChange"]))),128))]),_:1},8,["modelValue"])]),o.createElementVNode("div",gz,[ee[56]||(ee[56]=o.createElementVNode("div",null,"缩放速率",-1)),o.createElementVNode("div",vz,[o.createVNode(ne,{modelValue:B.value,"onUpdate:modelValue":ee[33]||(ee[33]=ke=>B.value=ke),onInput:ee[34]||(ee[34]=ke=>oe(B.value))},null,8,["modelValue"])])])]),_:1})])])])):o.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-281730f0"]])},Symbol.toStringTag,{value:"Module"})),bz={class:"best-view-box"},_z={class:"best-view-list"},wz=["onClick"],xz={class:"best-view-icon"},Cz=["src"],Bz={class:"best-view-name"},Ez=Object.freeze(Object.defineProperty({__proto__:null,default:o.defineComponent({__name:"NavigateTool",props:["componentId"],emits:["emitHandler"],setup(I,{emit:G}){const a=Yn(),C=I;o.onMounted(()=>{a.setReadyById(C.componentId)});const S=G,v=d=>{S("emitHandler",d)},f=o.ref(),h=d=>{if(d.id===f.value){f.value="";return}f.value=d.id,window.bimViewer.setDirection(d.dir_num),v({isTool:!0,event_target:"NavigateTool",event_name:"changeNav",content:{direction:d.dir_num}})};return(d,l)=>(o.openBlock(),o.createElementBlock("div",bz,[o.createElementVNode("div",_z,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(WV),u=>(o.openBlock(),o.createElementBlock("div",{key:u.id,class:o.normalizeClass(["best-view-item",{"best-view-item-active":f.value===u.id}]),onClick:c=>h(u)},[o.createElementVNode("div",xz,[o.createElementVNode("img",{src:o.unref(Vt)+`/bim-viewer/best-view/${f.value===u.id?u.imgActive:u.img}.svg`,alt:""},null,8,Cz),o.createElementVNode("div",Bz,o.toDisplayString(u.name),1)])],10,wz))),128))])]))}})},Symbol.toStringTag,{value:"Module"})),Pz={class:"tall_panel_content"},Sz={class:"panel_top"},kz={class:"panel_header_left"},Mz=["src"],Tz={class:"panel_close"},Iz={class:"panel_content"},Dz={key:0,class:"width-set",id:"lineWidthSet2"},Fz=_n(o.defineComponent({__name:"tallPanel_noPos",props:{panelTitle:{type:String,default:""},width:{type:Number,default:398},clickHandle:{type:Function,default:()=>{}},pos:{type:String,default:"left"},setWidth:{type:Boolean,default:!1},head:{type:Boolean,default:!0}},emits:["refresh"],setup(I,{emit:G}){Yn();const a=G,C=I;o.watch(()=>C.head,u=>{u?gr.setProperty("--panel-top-height","40px"):gr.setProperty("--panel-top-height","0px")});const S=o.ref(),v=o.ref(C.width);o.onMounted(()=>{C.pos=="left"&&(S.value.style.left=`${0+Qt("leftWidth")}px`),C.pos=="right"&&(S.value.style.right=`${0+Qt("rightWidth")}px`),S.value.style.top=`${0+Qt("topHeight")}px`,S.value.style.bottom=`${0+Qt("bottomHeight")}px`});const f=()=>{a("refresh")};let h,d=0,l=0;return document.addEventListener("mousedown",u=>{var c;((c=u.target)==null?void 0:c.id)=="lineWidthSet2"&&(h=!0,d=u.x)}),document.addEventListener("mousemove",u=>{h&&(l=u.x-d,d=u.x,v.value+=l,v.value<398&&(v.value=398),gr.setProperty("--tall-panel-outside-width",`${v.value}px`))}),document.addEventListener("mouseup",u=>{h=!1}),(u,c)=>{const p=ys;return o.openBlock(),o.createElementBlock("div",{ref_key:"tallPanelWrapper",ref:S,class:"tall_panel_wrapper",id:"tall_panel_wrapper",style:o.normalizeStyle({width:v.value.toString()+"px"})},[o.createElementVNode("div",Pz,[o.withDirectives(o.createElementVNode("div",Sz,[o.createElementVNode("div",kz,[o.createElementVNode("span",null,o.toDisplayString(I.panelTitle),1),o.createElementVNode("div",{class:"refresh",onClick:f},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/refresh_dark_gray.png"},null,8,Mz)])]),o.createElementVNode("div",Tz,[o.createVNode(p,{width:18,"click-handle":I.clickHandle,light:o.unref(gr).currentTheme=="blue",dark:o.unref(gr).currentTheme=="light-gray"},null,8,["click-handle","light","dark"])])],512),[[o.vShow,C.head]]),o.createElementVNode("div",Iz,[o.renderSlot(u.$slots,"default",{},void 0,!0)])]),I.setWidth?(o.openBlock(),o.createElementBlock("div",Dz,c[0]||(c[0]=[o.createElementVNode("div",{class:"set-line"},null,-1)]))):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-e1bfe9ee"]]),Rz=["src"],Oz=_n(o.defineComponent({__name:"imageZoomIn",props:{imgContent:{}},emits:["closeImg"],setup(I,{emit:G}){const a=G,C=I,S=o.ref(C.imgContent),v=()=>{a("closeImg")};return(f,h)=>(o.openBlock(),o.createElementBlock("div",{class:"image_zoomin_wrapper",onClick:v},[o.createElementVNode("div",{class:"img_wrapper",onClick:v},[o.createElementVNode("img",{src:S.value},null,8,Rz)])]))}}),[["__scopeId","data-v-6ec4d410"]]),Lz={class:"check_object_panel"},Nz={class:"check_page_title"},jz=["src"],Vz={class:"close"},Uz={class:"check_object_wrapper"},Hz={class:"wrapper"},zz=["onClick"],Gz=_n(o.defineComponent({__name:"checkObjectPanel",props:{entityList:{}},emits:["closePanel","closeCheck"],setup(I,{emit:G}){const a=G,C=f=>{window.bimViewer.setAllObjectsSelected(!1),window.bimViewer.flyToObject(f,()=>{window.bimViewer.setObjectsSelected([f],!0)})},S=()=>{a("closeCheck")},v=()=>{S(),a("closePanel")};return(f,h)=>{const d=ys,l=Vi;return o.openBlock(),o.createElementBlock("div",Lz,[o.createElementVNode("div",Nz,[o.createElementVNode("div",{class:"back",onClick:S},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/back.png"},null,8,jz),h[0]||(h[0]=o.createElementVNode("span",null,"查看元素",-1))]),o.createElementVNode("div",Vz,[o.createVNode(d,{width:18,clickHandle:v})])]),o.createElementVNode("div",Uz,[o.createElementVNode("div",Hz,[o.createVNode(l,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.entityList,(u,c)=>(o.openBlock(),o.createElementBlock("div",{key:c,class:"objects"},[o.createElementVNode("div",{class:o.normalizeClass(c%2==1?"entity":"entity_1"),onClick:p=>C(u)},[o.createElementVNode("span",null,o.toDisplayString(u),1)],10,zz)]))),128))]),_:1})])])])}}}),[["__scopeId","data-v-2b161b61"]]),Qz={class:"new_comment"},Wz={class:"comment_input"},$z={key:0,class:"snapshot_list"},Kz={class:"comment_submit"},Xz={class:"opt-left"},Yz=["src"],Jz={class:"opt-right"},Aw=_n(o.defineComponent({__name:"commentInput",props:{userId:{},commentGuid:{},oldComment:{},mode:{},snapshotList:{}},emits:["submitComment","updateComment","cancel","addViewPoint"],setup(I,{emit:G}){const a=G,C=I,{userId:S,mode:v}=C,f=o.ref(C.oldComment?C.oldComment:""),h=o.ref([]);o.watch(()=>C.snapshotList,A=>{h.value=A||[]},{immediate:!0});const d=()=>{const A={guid:window.bimViewer.bcfTool.getNewGuid(),author:Tn.getStaffName(S),date:new Date().toISOString(),comment:f.value,snapshotList:h.value};a("submitComment",A)},l=()=>{a("updateComment",C.commentGuid,f.value,h.value)},u=()=>{a("cancel")},c=()=>{const A=window.bimViewer.bcfTool.getBCFView();let g=h.value.length;h.value.push({guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:A,index:g})},p=A=>{h.value.splice(A,1)};return(A,g)=>{const _=ji,b=vl;return o.openBlock(),o.createElementBlock("div",Qz,[o.createElementVNode("div",Wz,[o.createElementVNode("div",{class:"camera-comment",style:o.normalizeStyle({backgroundColor:o.unref(v)=="add"?"#F9F9F9":"#fff"})},[o.createVNode(_,{modelValue:f.value,"onUpdate:modelValue":g[0]||(g[0]=w=>f.value=w),class:"comment-el-input",type:"textarea",placeholder:"请输入评论内容 ~"},null,8,["modelValue"])],4),h.value.length>0?(o.openBlock(),o.createElementBlock("div",$z,[o.createVNode(b,{ref:"imageViewRef","snapshot-list":h.value,"edit-enable":!0,onDeleteView:p},null,8,["snapshot-list"])])):o.createCommentVNode("",!0)]),o.createElementVNode("div",Kz,[o.createElementVNode("div",Xz,[h.value.length==0?(o.openBlock(),o.createElementBlock("img",{key:0,class:"img",src:o.unref(Vt)+"/bim-viewer/bcf-images/camera_gray.png",onClick:c},null,8,Yz)):o.createCommentVNode("",!0)]),o.createElementVNode("div",Jz,[o.createElementVNode("span",{onClick:u},"取消"),o.createElementVNode("div",{class:"submit_button",onClick:g[1]||(g[1]=w=>o.unref(v)=="add"?d():l())}," 提交 ")])])])}}}),[["__scopeId","data-v-c9526bba"]]),Zz={class:"comment_content"},qz={class:"title"},eG=["src"],tG={class:"comments_list"},rG={key:0,class:"empty"},nG={key:1,class:"comments"},iG={class:"comment_info"},sG={class:"author_info"},aG=["src"],oG={class:"author_time"},lG={class:"author"},uG={class:"time"},cG={key:0,class:"more"},dG=["src"],fG={class:"edit_panel"},hG=["onClick"],pG=["onClick"],AG={key:0,class:"content"},mG={key:0,class:"snapshot_list"},gG={key:2,class:"split_line"},vG=_n(o.defineComponent({__name:"commentsView",props:{userId:{},commentList:{}},emits:["updateComment","deleteComment","addViewPoint","imageZoomIn"],setup(I,{emit:G}){const a=G,C=I,S=o.ref(Tn.BcfStaffList),v=o.ref(Tn.getStaffName(C.userId)),f=o.ref(-1),h=()=>{a("addViewPoint")},d=(A,g,_)=>{C.commentList&&(C.commentList[f.value].comment=g,C.commentList[f.value].snapshotList=_,a("updateComment",A,C.commentList[f.value])),f.value=-1},l=A=>{a("imageZoomIn",A)},u=A=>{f.value=A},c=A=>{a("deleteComment",A)},p=A=>{let g;return typeof A=="string"&&A!=""?S.value.forEach(_=>{_.userName==A&&(g=_.avatar)}):typeof A=="number"&&S.value.forEach(_=>{_.userId==A&&(g=_.avatar)}),g||"bimkk-image/user/user-avatar.png"};return(A,g)=>{const _=vl,b=Aw;return o.openBlock(),o.createElementBlock("div",Zz,[o.createElementVNode("div",qz,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/comment.png"},null,8,eG),o.createElementVNode("span",null,o.toDisplayString(C.commentList&&C.commentList.length)+" 评论",1)]),o.createElementVNode("div",tG,[!C.commentList||C.commentList.length==0?(o.openBlock(),o.createElementBlock("div",rG," 暂无评论 ")):(o.openBlock(),o.createElementBlock("div",nG,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(C.commentList,(w,B)=>(o.openBlock(),o.createElementBlock("div",{key:B,class:"comment"},[o.createElementVNode("div",iG,[o.createElementVNode("div",sG,[o.createElementVNode("img",{src:`${o.unref(Vt)}/${p(w.author)}`,alt:""},null,8,aG),o.createElementVNode("div",oG,[o.createElementVNode("span",lG,o.toDisplayString(typeof w.author=="string"&&w.author!=""?w.author:typeof w.userId=="number"?o.unref(Tn).getStaffName(w.userId):w.author),1),o.createElementVNode("span",uG,o.toDisplayString(o.unref(aw)(w.date)),1)])]),v.value==w.author&&B!=f.value&&B!=-1?(o.openBlock(),o.createElementBlock("div",cG,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/more.png",alt:""},null,8,dG),o.createElementVNode("div",fG,[o.createElementVNode("div",{class:"edit",onClick:k=>u(B)},g[1]||(g[1]=[o.createElementVNode("span",null,"编辑",-1)]),8,hG),o.createElementVNode("div",{class:"delete",onClick:k=>c(w.guid)},g[2]||(g[2]=[o.createElementVNode("span",null,"删除",-1)]),8,pG)])])):o.createCommentVNode("",!0)]),B!=f.value&&B!=-1?(o.openBlock(),o.createElementBlock("div",AG,[o.createElementVNode("div",null,o.toDisplayString(w.comment),1),w.snapshotList&&w.snapshotList.length>0?(o.openBlock(),o.createElementBlock("div",mG,[o.createVNode(_,{ref_for:!0,ref:"imageViewRef","snapshot-list":w.snapshotList,"edit-enable":!1,onImageZoomIn:l},null,8,["snapshot-list"])])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createBlock(b,{key:1,"user-id":A.userId,mode:"update","comment-guid":w.guid,"old-comment":w.comment,"snapshot-list":w.snapshotList,onAddViewPoint:h,onCancel:g[0]||(g[0]=()=>{f.value=-1}),onUpdateComment:d},null,8,["user-id","comment-guid","old-comment","snapshot-list"])),C.commentList&&B!=C.commentList.length-1?(o.openBlock(),o.createElementBlock("div",gG)):o.createCommentVNode("",!0)]))),128))]))])])}}}),[["__scopeId","data-v-a8c22e31"]]),yG={key:0,class:"bcf_detail_wrapper"},bG={class:"detail_page_title"},_G={class:"back"},wG=["src"],xG={key:0,class:"title_2"},CG=["src"],BG={class:"header_right"},EG={key:0,class:"edit_buttons"},PG=["src"],SG=["src"],kG={class:"close"},MG={class:"content_scrollbar"},TG={class:"bcf_detail_content"},IG={class:"bcf_id_time"},DG={class:"snpshot_wrapper"},FG={class:"snapshot_container"},RG={key:0,class:"empty_image"},OG=["src"],LG=["src"],NG=["src"],jG={class:"bcf_content"},VG={class:"content"},UG={class:"select_item"},HG={class:"select_wrapper"},zG={class:"select_item"},GG={class:"select_wrapper"},QG={class:"select_item"},WG={class:"select_wrapper"},$G={class:"select_item"},KG={class:"select_wrapper"},XG={class:"content"},YG={class:"select_item"},JG={class:"select_wrapper"},ZG={class:"select_item"},qG={class:"select_wrapper"},eQ={class:"select_item"},tQ={class:"select_item"},rQ={class:"select_wrapper"},nQ={class:"select_item"},iQ={key:0,class:"tag_list"},sQ={key:1,class:"select_wrapper"},aQ={class:"add_comment"},oQ={class:"switch"},lQ=["src"],uQ={class:"num"},cQ={class:"current_index"},dQ=["src"],fQ=_n(o.defineComponent({__name:"BCFDetailPanel",props:{bcfId:{},userId:{},bcfList:{},bcfContent:{}},emits:["closePanel","closeDetail","editBcf","updateBcf","refreshCurrentBcf","emitHandler","imageZoomIn","switchCurrentBcf"],setup(I,{emit:G}){const a=G,C=be=>{a("emitHandler",be)},S=I,{bcfList:v}=S,f=o.ref(S.bcfId),h=o.ref(),d=o.ref(0),l=o.ref(S.bcfContent),u=o.ref(""),c=o.ref(),p=o.ref(),A=o.ref(),g=o.ref(),_=o.ref(),b=o.ref(),w=o.ref(),B=o.ref(),k=o.ref(),T=o.ref(),L=o.ref(),V=o.ref(),Q=o.ref(),N=o.ref(!1),j=o.ref(!0),$=o.ref(-1),X=o.ref(new Map),W=o.ref(0),D=o.ref(!1),z=o.ref(),M=o.ref(!1),R=o.ref(!1),O=o.ref("bcf"),U=o.ref(""),F=o.ref(),K=o.ref(!0),te=o.ref(!1);o.onMounted(()=>{const be=new Date;let xe=be.getDate(),Me=be.getFullYear(),Le=be.getMonth();u.value=`${Me}-${Le+1}-${xe}`,l.value||console.log("no bcfContent!"),v.forEach((Ve,Ye)=>{Ve._id==f.value&&(d.value=Ye,$.value=0,q(),N.value=!0)}),N.value||ke()}),o.watch(()=>S.bcfContent,be=>{be&&(l.value=JSON.parse(JSON.stringify(be)),q())});const q=()=>{h.value=l.value.guid,p.value=l.value.index,A.value=l.value.title,g.value=l.value.type?l.value.type:"",_.value=l.value.priority?uu(l.value.priority):"",b.value=l.value.status?l.value.status:"",w.value=l.value.stage?l.value.stage:"",k.value=l.value.dueDate?as(l.value.dueDate):"",T.value=l.value.description?l.value.description:"",L.value=l.value.labels?l.value.labels:[],typeof l.value.assignedTo=="string"&&l.value.assignedTo!=""?B.value=l.value.assignedTo:l.value.assignedTo&&(B.value=Tn.getStaffName(l.value.assignedTo)),typeof l.value.author=="string"&&l.value.author!=""?V.value=l.value.author:V.value=Tn.getStaffName(l.value.userId),l.value.viewPoints?(c.value=l.value.viewPoints,F.value&&(l.value.viewPoints.length>0?((!$.value||$.value==-1)&&($.value=0),F.value.updateList(c.value,$.value)):(c.value=void 0,$.value=-1))):(c.value=void 0,$.value=-1),ie(),ee()},ie=()=>{c.value?c.value.forEach((be,xe)=>{const Me=be.bcfView.components;if(Me){const{selection:Le}=Me;if(Le){let Ve=Le.map(lt=>lt.ifc_guid);X.value.set(xe,Ve);let Ye=X.value.get($.value);Ye&&(W.value=Ye.length),window.bimViewer.setAllObjectsSelected(!1),window.bimViewer.setObjectsSelected(Ye,!0)}else X.value.set(xe,[]),W.value=0,window.bimViewer.setAllObjectsSelected(!1)}else window.bimViewer.setAllObjectsSelected(!1),X.value=new Map,W.value=0}):(window.bimViewer.setAllObjectsSelected(!1),c.value=[],X.value=new Map,W.value=0)},oe=be=>{if(d.value==0){if(be=="last")return}else if(d.value==v.length-1&&be=="next")return;be=="next"&&(d.value+=1),be=="last"&&(d.value-=1),l.value=v[d.value],$.value=0,a("switchCurrentBcf",be)},ce=be=>{$.value=be,ie(),ee()},ee=()=>{if(l.value.comments)if(!c.value||c.value.length==0)Q.value=l.value.comments;else{let be=[];l.value.comments.forEach(xe=>{xe.viewPoint?c.value&&c.value[$.value].guid&&xe.viewPoint==c.value[$.value].guid&&be.push(xe):be.push(xe)}),Q.value=be}else Q.value=[]},he=()=>{a("editBcf",f)},ne=()=>{O.value="bcf",z.value=l.value.title,M.value=!0},re=()=>{D.value=!0},ae=be=>{be?(U.value=be,O.value="comment",z.value="这条评论",M.value=!0):console.log("comment guid undefined")},Be=(be,xe,Me)=>{let Le;be=="new"&&(Le={bcf_guid:h.value,type:be,bcf_cmt:Me}),be=="modify"&&(Le={bcf_guid:h.value,type:be,bcf_cmt_guid:xe,bcf_cmt:Me}),be=="delete"&&(Le={bcf_guid:h.value,type:be,bcf_cmt_guid:xe}),C({isTool:!0,event_target:"BCFTool",event_name:"modifyBcfComments",content:Le})},ve=be=>{if(D.value=!1,c.value&&c.value.length>0){let xe=c.value[$.value];xe&&xe.guid&&(be.viewPoint=xe.guid)}Be("new",be.guid,be)},ue=(be,xe)=>{Be("modify",be,xe)},Ae=be=>{Be("delete",be),M.value=!1},P=()=>{C({isTool:!0,event_target:"BCFTool",event_name:"deleteBcf",content:{bcf_guid:h.value}}),wr.emit("bcfLoading",!0),M.value=!1,ke()},ke=()=>{a("closeDetail")},Ee=()=>{a("closePanel")},pe=be=>{a("imageZoomIn",be)},fe=()=>{W.value!=0&&(R.value=!0,!(X.value.size==0||!X.value.get($.value))&&window.bimViewer.setObjectsSelected(X.value.get($.value),!0))},ye=()=>{const be=window.bimViewer.bcfTool.getBCFView();c.value||(c.value=[]);let xe=c.value.length;c.value.push({guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:be,index:xe}),F.value&&F.value.updateList(c.value)},de=()=>{wr.emit("bcfLoading",!0),a("refreshCurrentBcf")};return(be,xe)=>{const Me=ys,Le=vl,Ve=Aw,Ye=vG,lt=Vi,ot=ow,At=Gz;return N.value?(o.openBlock(),o.createElementBlock("div",yG,[o.createElementVNode("div",bG,[o.createElementVNode("div",_G,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/back.png",onClick:ke},null,8,wG),o.createElementVNode("span",{class:"title_1",onMouseenter:xe[0]||(xe[0]=st=>te.value=!0),onMouseleave:xe[1]||(xe[1]=st=>te.value=!1)},o.toDisplayString(A.value),33),te.value?(o.openBlock(),o.createElementBlock("span",xG,o.toDisplayString(A.value),1)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"refresh",onClick:de},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/refresh_dark_gray.png"},null,8,CG)])]),o.createElementVNode("div",BG,[K.value?(o.openBlock(),o.createElementBlock("div",EG,[o.createElementVNode("div",{class:"edit_button",onClick:he},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/edit.png"},null,8,PG)]),o.createElementVNode("div",{class:"edit_button",onClick:ne},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/delete_dark.png"},null,8,SG)])])):o.createCommentVNode("",!0),o.createElementVNode("div",kG,[o.createVNode(Me,{width:18,"click-handle":Ee})])])]),o.createElementVNode("div",MG,[o.createVNode(lt,null,{default:o.withCtx(()=>[o.createElementVNode("div",TG,[o.createElementVNode("div",IG,[o.createElementVNode("div",{style:o.normalizeStyle({backgroundColor:o.unref(Cf)(l.value.priority?l.value.priority:"low"),color:"#fff"})},"#"+o.toDisplayString(p.value),5),o.createElementVNode("div",null,o.toDisplayString(l.value.createDate&&o.unref(as)(l.value.createDate)),1)]),o.createElementVNode("div",DG,[o.createElementVNode("div",FG,[c.value&&c.value.length>0?(o.openBlock(),o.createBlock(Le,{key:1,ref_key:"imageViewRef",ref:F,"snapshot-list":c.value,"edit-enable":!1,onImageZoomIn:pe,onSwitchViewPoints:ce},null,8,["snapshot-list"])):(o.openBlock(),o.createElementBlock("div",RG,[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/empty.png"},null,8,OG)])),b.value?(o.openBlock(),o.createElementBlock("div",{key:2,class:"stage",style:o.normalizeStyle({backgroundColor:o.unref(nw)(b.value)})},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/bulb.png"},null,8,LG),o.createElementVNode("span",null,o.toDisplayString(b.value),1)],4)):o.createCommentVNode("",!0)])]),o.createElementVNode("div",{class:o.normalizeClass(W.value&&W.value>0?"object object_1":"object"),onClick:fe},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/select_num.png"},null,8,NG),o.createElementVNode("span",null,o.toDisplayString(W.value)+" 个元素",1)],2),o.createElementVNode("div",jG,[o.createElementVNode("div",VG,[o.createElementVNode("div",UG,[xe[8]||(xe[8]=o.createElementVNode("span",null,"类别:",-1)),o.createElementVNode("div",HG,o.toDisplayString(g.value),1)]),o.createElementVNode("div",zG,[xe[9]||(xe[9]=o.createElementVNode("span",null,"分配给:",-1)),o.createElementVNode("div",GG,o.toDisplayString(B.value),1)]),o.createElementVNode("div",QG,[xe[10]||(xe[10]=o.createElementVNode("span",null,"截止日期:",-1)),o.createElementVNode("div",WG,o.toDisplayString(k.value),1)]),o.createElementVNode("div",$G,[xe[11]||(xe[11]=o.createElementVNode("span",null,"问题描述:",-1)),o.createElementVNode("div",KG,o.toDisplayString(T.value),1)])]),o.createElementVNode("div",XG,[o.createElementVNode("div",YG,[xe[12]||(xe[12]=o.createElementVNode("span",null,"状态:",-1)),o.createElementVNode("div",JG,o.toDisplayString(b.value),1)]),o.createElementVNode("div",ZG,[xe[13]||(xe[13]=o.createElementVNode("span",null,"阶段:",-1)),o.createElementVNode("div",qG,o.toDisplayString(w.value),1)]),o.createElementVNode("div",eQ,[xe[14]||(xe[14]=o.createElementVNode("span",null,"优先级:",-1)),o.createElementVNode("div",{class:"select_wrapper",style:o.normalizeStyle({color:o.unref(rw)(_.value)})},o.toDisplayString(_.value),5)]),o.createElementVNode("div",tQ,[xe[15]||(xe[15]=o.createElementVNode("span",null,"创建人:",-1)),o.createElementVNode("div",rQ,o.toDisplayString(V.value),1)]),o.createElementVNode("div",nQ,[xe[16]||(xe[16]=o.createElementVNode("span",null,"标签:",-1)),L.value.length>0?(o.openBlock(),o.createElementBlock("div",iQ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(L.value,(st,bt)=>(o.openBlock(),o.createElementBlock("div",{key:bt,class:"tag"},[o.createElementVNode("span",null,o.toDisplayString(st),1)]))),128))])):(o.openBlock(),o.createElementBlock("div",sQ))])])])]),o.createElementVNode("div",aQ,[D.value?(o.openBlock(),o.createBlock(Ve,{key:1,"bcf-id":f.value,"user-id":be.userId,mode:"add",onAddViewPoint:ye,onCancel:xe[3]||(xe[3]=st=>D.value=!1),onSubmitComment:ve},null,8,["bcf-id","user-id"])):(o.openBlock(),o.createElementBlock("div",{key:0,class:"comment_button",onClick:xe[2]||(xe[2]=st=>re())}," 立即评论 "))]),j.value?(o.openBlock(),o.createBlock(Ye,{key:0,"user-id":be.userId,"comment-list":Q.value?[...Q.value.slice().sort((st,bt)=>{const rt=new Date(st.modified_date?st.modified_date:st.date),tt=new Date(bt.modified_date?bt.modified_date:bt.date);return rt<tt?1:-1})]:void 0,onAddViewPoint:ye,onUpdateComment:ue,onDeleteComment:ae,onImageZoomIn:pe},null,8,["user-id","comment-list"])):o.createCommentVNode("",!0)]),_:1})]),o.createElementVNode("div",oQ,[o.createElementVNode("div",{class:"last",onClick:xe[4]||(xe[4]=st=>oe("last"))},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/last.png"},null,8,lQ)]),o.createElementVNode("div",uQ,[o.createElementVNode("span",cQ,o.toDisplayString(d.value+1),1),xe[17]||(xe[17]=o.createElementVNode("span",null,"/",-1)),o.createElementVNode("span",null,o.toDisplayString(o.unref(v).length),1)]),o.createElementVNode("div",{class:"next",onClick:xe[5]||(xe[5]=st=>oe("next"))},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/next.png"},null,8,dQ)])]),M.value?(o.openBlock(),o.createBlock(ot,{key:0,"delete-content-name":z.value,"delete-type":O.value,"comment-id":U.value,onConfirmDeleteBcf:P,onConfirmDeleteComment:Ae,onClosePanel:xe[6]||(xe[6]=()=>{M.value=!1})},null,8,["delete-content-name","delete-type","comment-id"])):o.createCommentVNode("",!0),o.withDirectives(o.createVNode(At,{"entity-list":X.value.get($.value),onCloseCheck:xe[7]||(xe[7]=st=>R.value=!1),onClosePanel:Ee},null,8,["entity-list"]),[[o.vShow,R.value]])])):o.createCommentVNode("",!0)}}}),[["__scopeId","data-v-726dc6d8"]]),hQ={class:"bcf_add_object_wrapper"},pQ={class:"add_page_title"},AQ=["src"],mQ={class:"close"},gQ={key:0,class:"add_content"},vQ={key:0,class:"select_object"},yQ={class:"content"},bQ={class:"content_count"},_Q={class:"count"},wQ={class:"num"},xQ=["src"],CQ={class:"content_scrollbar"},BQ={class:"content_list"},EQ={key:1,class:"object_empty"},PQ=["src"],SQ=["src"],kQ={key:1,class:"add_content"},MQ={key:0,class:"content"},TQ=["src"],IQ={class:"content_count"},DQ={class:"count"},FQ={class:"num"},RQ=["src"],OQ={class:"content_scrollbar"},LQ={class:"content_list"},NQ={class:"eye"},jQ=["src"],VQ={key:1},UQ=_n(o.defineComponent({__name:"addObjectOrAnno",props:{mode:{},objectList:{}},emits:["closePanel","closeAdd","saveObject","saveAnno"],setup(I,{emit:G}){const a=I,C=o.ref(a.mode),{objectList:S}=a,v=o.ref([]),f=o.ref(S?[...S]:[]),h=o.ref([]),d=o.ref(!1),l=o.ref(!1),u=G,c=L=>{C.value!="anno"&&(window.bimViewer.setEntitySelected(L),f.value=window.bimViewer.viewer.scene.selectedObjectIds)},p=L=>{v.value.push({annoId:L.id,hide:!1,choose:!1}),window.bimViewer.bcfTool.enableAnno=!1};o.onMounted(()=>{C.value=="select"&&(f.value.length>0&&(window.bimViewer.setAllObjectsSelected(!1),window.bimViewer.setObjectsSelected(f.value,!0)),window.bimViewer.eventTrigger.on("pickedEntity",c),window.bimViewer.eventTrigger.on("bcfNewAnno",p))}),o.onBeforeUnmount(()=>{C.value=="select"&&(window.bimViewer.eventTrigger.off("pickedEntity",c),window.bimViewer.eventTrigger.off("bcfNewAnno",p))});const A=L=>{l.value=L.length>0&&L.length<f.value.length,d.value=L.length===f.value.length},g=L=>{h.value=L?f.value:[],l.value=!1},_=L=>{L.forEach(V=>{v.value.forEach(Q=>{Q.choose=V===Q.annoId})}),l.value=L.length>0&&L.length<f.value.length,d.value=L.length===f.value.length},b=()=>{window.bimViewer.bcfTool.enableAnno=!0},w=()=>{let L=!1;h.value.length==f.value.length&&(d.value=!1,L=!0),h.value.forEach(V=>{f.value=f.value.filter(Q=>Q!=V),window.bimViewer.setObjectsSelected([V],!1)}),L&&(h.value=[]),l.value=!1},B=()=>{u("saveObject",f.value),u("closeAdd")},k=()=>{C.value=="select"?(window.bimViewer.setAllObjectsSelected(!1),f.value.length==0?B():(f.value=S||[],window.bimViewer.setObjectsSelected(f.value,!0)),u("closeAdd")):u("saveAnno",f)},T=()=>{k(),u("closePanel")};return(L,V)=>{const Q=ys,N=NA,j=m1,$=Vi;return o.openBlock(),o.createElementBlock("div",hQ,[o.createElementVNode("div",pQ,[o.createElementVNode("div",{class:"back",onClick:k},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/back.png"},null,8,AQ),o.createElementVNode("span",null,o.toDisplayString(C.value=="select"?"添加对象":"添加标记"),1)]),o.createElementVNode("div",mQ,[o.createVNode(Q,{width:18,clickHandle:T})])]),C.value=="select"?(o.openBlock(),o.createElementBlock("div",gQ,[f.value&&f.value.length>0?(o.openBlock(),o.createElementBlock("div",vQ,[o.createElementVNode("div",yQ,[o.createElementVNode("div",bQ,[o.createElementVNode("div",_Q,[V[4]||(V[4]=o.createElementVNode("span",null,"已添加对象共:",-1)),o.createElementVNode("span",wQ,o.toDisplayString(f.value.length)+"个",1)]),o.createElementVNode("div",{class:o.normalizeClass(h.value.length>0?"del_btn_chose":"del_btn"),onClick:w},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/delete_blue.png"},null,8,xQ),V[5]||(V[5]=o.createElementVNode("span",null,"删除",-1))],2)]),o.createElementVNode("div",CQ,[o.createVNode($,null,{default:o.withCtx(()=>[o.createElementVNode("div",BQ,[o.createVNode(N,{modelValue:d.value,"onUpdate:modelValue":V[0]||(V[0]=X=>d.value=X),class:"header",indeterminate:l.value,onChange:g,label:"全部"},null,8,["modelValue","indeterminate"]),o.createVNode(j,{modelValue:h.value,"onUpdate:modelValue":V[1]||(V[1]=X=>h.value=X),onChange:A},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,(X,W)=>(o.openBlock(),o.createBlock(N,{class:o.normalizeClass(W%2==1?"line1":"line2"),label:X,key:X},{default:o.withCtx(()=>[o.createElementVNode("span",null,o.toDisplayString(X),1)]),_:2},1032,["class","label"]))),128))]),_:1},8,["modelValue"])])]),_:1})])]),o.createElementVNode("div",{class:"save_button",onClick:B}," 保存 ")])):(o.openBlock(),o.createElementBlock("div",EQ,[o.createElementVNode("img",{class:"empty_img",src:o.unref(Vt)+"/bim-viewer/bcf-images/object_empty.png"},null,8,PQ),V[6]||(V[6]=o.createElementVNode("span",null,"直接点击模型上的结构即可添加对象",-1)),o.createElementVNode("img",{class:"mouse",src:o.unref(Vt)+"/bim-viewer/bcf-images/mouse.png"},null,8,SQ),V[7]||(V[7]=o.createElementVNode("span",null,"按下鼠标左键可连续多选",-1))]))])):(o.openBlock(),o.createElementBlock("div",kQ,[v.value&&v.value.length>0?(o.openBlock(),o.createElementBlock("div",MQ,[o.createElementVNode("div",{class:"add_button",onClick:b},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/anno.png"},null,8,TQ),V[8]||(V[8]=o.createElementVNode("span",null,"添加标记",-1))]),o.createElementVNode("div",IQ,[o.createElementVNode("div",DQ,[V[9]||(V[9]=o.createElementVNode("span",null,"已添加标注共:",-1)),o.createElementVNode("span",FQ,o.toDisplayString(v.value.length)+"个",1)]),o.createElementVNode("div",{class:o.normalizeClass(h.value.length>0?"del_btn_chose":"del_btn")},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/delete_blue.png"},null,8,RQ),V[10]||(V[10]=o.createElementVNode("span",null,"删除",-1))],2)]),o.createElementVNode("div",OQ,[o.createVNode($,null,{default:o.withCtx(()=>[o.createElementVNode("div",LQ,[o.createVNode(N,{class:"header",modelValue:d.value,"onUpdate:modelValue":V[2]||(V[2]=X=>d.value=X),indeterminate:l.value,onChange:g,label:"全部"},null,8,["modelValue","indeterminate"]),o.createVNode(j,{modelValue:h.value,"onUpdate:modelValue":V[3]||(V[3]=X=>h.value=X),onChange:_},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,(X,W)=>(o.openBlock(),o.createBlock(N,{class:o.normalizeClass(W%2==1?"line1":"line2"),label:X,key:X},{default:o.withCtx(()=>[o.createElementVNode("div",NQ,[o.createElementVNode("img",{src:`${o.unref(Vt)}/bim-viewer/bcf-images/${v.value[W].hide?"eye_light":"eye_dark"}.png`},null,8,jQ)]),o.createElementVNode("span",null,o.toDisplayString(X),1)]),_:2},1032,["class","label"]))),128))]),_:1},8,["modelValue"])])]),_:1})])])):(o.openBlock(),o.createElementBlock("div",VQ,V[11]||(V[11]=[o.createElementVNode("div",{class:"empty_"},null,-1)])))]))])}}}),[["__scopeId","data-v-2aff9df2"]]),HQ={class:"bcf_add_wrapper"},zQ={class:"add_page_title"},GQ=["src"],QQ={class:"close"},WQ={class:"content_scrollbar"},$Q={class:"bcf_add_content"},KQ={class:"bcf_id_time"},XQ={class:"snpshot_wrapper"},YQ={class:"snapshot_container"},JQ={key:0,class:"upload_button"},ZQ=["src"],qQ=["src"],eW={class:"add_object_annotation"},tW={class:"new_icon"},rW=["src"],nW=["src"],iW={class:"new_button"},sW=["src"],aW={key:0,class:"object_num"},oW={class:"bcf_content"},lW={class:"content"},uW={class:"select_item"},cW={class:"select_wrapper"},dW={class:"select_item"},fW={class:"select_wrapper"},hW={class:"select_item"},pW={class:"select_wrapper"},AW={class:"select_item"},mW={class:"select_wrapper"},gW={class:"select_item"},vW={class:"select_wrapper"},yW={class:"select_item"},bW={class:"select_wrapper"},_W={class:"select_item"},wW={class:"select_wrapper"},xW={class:"select_item"},CW={class:"select_wrapper"},BW={class:"select_item"},EW={class:"select_wrapper"},PW=_n(o.defineComponent({__name:"BCFAddPanel",props:{bcfId:{},userId:{},mode:{},bcfContent:{},bcfList:{}},emits:["closePanel","closeAdd","submitBcf","updateBcf","imageZoomIn"],setup(I,{emit:G}){const a=G,C=I,{bcfId:S,mode:v,userId:f,bcfContent:h,bcfList:d}=C,l=o.ref("select"),u=o.ref(""),c=o.ref(),p=o.ref(),A=o.ref([]),g=o.ref(),_=o.ref(),b=o.ref(""),w=o.ref(""),B=o.ref(""),k=o.ref(""),T=o.ref(""),L=o.ref(),V=o.ref(),Q=o.ref(""),N=o.ref([]),j=o.ref(iw),$=o.ref(Bf),X=o.ref(Ef),W=o.ref(sw),D=o.ref(Pf),z=o.ref(Tn.BcfStaffList),M=o.ref(),R=o.ref(0),O=o.ref(),U=o.ref(!1),F=Ae=>{U.value||window.bimViewer.setEntitySelected(Ae)};o.onMounted(()=>{if(window.bimViewer.disableClickEvent=!0,window.bimViewer.eventTrigger.on("pickedEntity",F),v=="add"){const Ae=new Date;let P=Ae.getDate(),ke=Ae.getFullYear(),Ee=Ae.getMonth();if(u.value=`${ke}-${Ee+1}-${P}`,d.length>0){let pe=d[d.length-1];pe&&pe.index&&(_.value=pe.index+1)}else _.value=1;O.value=[]}else if(h)if(_.value=h.index,b.value=h.title,w.value=h.type?h.type:"",B.value=h.priority?uu(h.priority):"",k.value=h.status?h.status:"",T.value=h.stage?h.stage:"",L.value=typeof h.assignedTo=="number"?h.assignedTo:void 0,V.value=h.dueDate?as(h.dueDate):"",Q.value=h.description?h.description:"",N.value=h.labels?h.labels:[],h.viewPoints){if(M.value=0,A.value=h.viewPoints,h.viewPoints.length==0)return;let Ae=h.viewPoints[0].bcfView.components;Ae?Ae.selection?(O.value=Ae.selection.map(P=>P.ifc_guid),R.value=O.value.length,window.bimViewer.setObjectsSelected(O.value,!0)):(O.value=[],window.bimViewer.setAllObjectsSelected(!1)):window.bimViewer.setAllObjectsSelected(!1)}else window.bimViewer.setAllObjectsSelected(!1)}),o.onBeforeUnmount(()=>{window.bimViewer.disableClickEvent=!1,window.bimViewer.setAllObjectsSelected(!1),window.bimViewer.eventTrigger.off("pickedEntity",F)});const K=Ae=>{A.value=A.value.filter((P,ke)=>ke!=Ae),c.value&&c.value.updateList(A.value,"delete")},te=()=>{const Ae=window.bimViewer.bcfTool.getBCFView();let P=A.value.length;A.value.push({guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:Ae,index:P}),M.value=A.value.length-1,c.value&&c.value.updateList(A.value,"update"),Ae.components.selection&&Ae.components.selection.length>0?he():(O.value=[],R.value=0)},q=Ae=>{let P=Ae.target.files[0];if(P){const ke=new FileReader;ke.readAsDataURL(P),ke.onload=()=>{ie(ke.result)}}},ie=Ae=>{O.value&&O.value.length!=0&&O.value.forEach(Ee=>{});let P=window.bimViewer.bcfTool.getBCFView();P.snapshot.snapshot_data=Ae;let ke=A.value.length;A.value.push({guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:P,index:ke}),M.value=A.value.length-1,c.value&&c.value.updateList(A.value,"update"),O.value=window.bimViewer.viewer.scene.selectedObjectIds,R.value=O.value.length},oe=Ae=>{if(Ae>=0){M.value=Ae;let P=A.value[M.value].bcfView;if(P&&P.components){let ke=P.components.selection;O.value=ke==null?void 0:ke.map(Ee=>Ee.ifc_guid),R.value=O.value&&O.value.length}else M.value=void 0,O.value=[],R.value=0}else M.value=void 0,O.value=[],R.value=0},ce=()=>{if(b.value==""){Hp.ElMessage.error("请输入标题!");return}const Ae={title:b.value,author:f,stage:T.value,status:k.value,assignedTo:L.value,createDate:new Date().toISOString(),dueDate:V.value?V.value.toISOString():void 0,description:Q.value,labels:N.value,priority:xf(B.value),type:w.value,viewPoints:A.value};a("submitBcf",Ae)},ee=()=>{h&&(g.value={_id:h._id,fileId:h.fileId,userId:h.userId,guid:h.guid,title:b.value,author:h.author,priority:xf(B.value),index:_.value,type:w.value,stage:T.value,status:k.value,labels:N.value,dueDate:V.value?V.value:void 0,createDate:h.createDate,assignedTo:L.value,description:Q.value,viewPoints:A.value,comments:h.comments,modified_date:new Date().toISOString(),modified_author:Tn.getStaffName(f)},a("updateBcf",g.value.guid,g.value,"content"))},he=Ae=>{if(O.value=Ae||window.bimViewer.viewer.scene.selectedObjectIds,R.value=O.value.length,!O.value||O.value.length==0)return;let P=[];if(O.value!=0&&O.value.forEach(ke=>{P.push({ifc_guid:ke})}),A.value[M.value]){let ke=A.value[M.value].bcfView;if(ke){if(ke.components)ke.components.selection=P;else{let Ee={selection:P,visibility:{default_visibility:!0}};ke.components=Ee}console.log("有bcfView点击saveObject:",A.value[M.value].bcfView)}else A.value[M.value]={guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:{components:{selection:P,visibility:{default_visibility:!0}}}},console.log("没有bcfView点击saveObject:",A.value[M.value].bcfView)}else{let ke={components:{selection:P,visibility:{default_visibility:!0}}},Ee={guid:window.bimViewer.bcfTool.getNewGuid(),bcfView:ke,index:1};A.value.push(Ee),M.value=0,c.value&&c.value.updateList(A.value,"update"),console.log("没有视角点击saveObject:",A.value[M.value].bcfView)}},ne=Ae=>{U.value=!0,l.value=Ae},re=Ae=>{he(Ae),ae()},ae=()=>{U.value=!1},Be=()=>{a("closeAdd")},ve=()=>{a("closePanel")},ue=Ae=>{a("imageZoomIn",Ae)};return(Ae,P)=>{const ke=ys,Ee=vl,pe=ji,fe=em,ye=qA,de=bf,be=Vi,xe=UQ;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",HQ,[o.createElementVNode("div",zQ,[o.createElementVNode("div",{class:"back",onClick:Be},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/back.png"},null,8,GQ),o.createElementVNode("span",null,o.toDisplayString(o.unref(v)=="add"?"新建BCF":"返回"),1)]),o.createElementVNode("div",QQ,[o.createVNode(ke,{width:18,"click-handle":ve})])]),o.createElementVNode("div",WQ,[o.createVNode(be,null,{default:o.withCtx(()=>{var Me;return[o.createElementVNode("div",$Q,[o.createElementVNode("div",KQ,[o.createElementVNode("div",null,"#"+o.toDisplayString(_.value),1),o.createElementVNode("div",null,o.toDisplayString(o.unref(v)=="add"?u.value:o.unref(as)((Me=o.unref(h))==null?void 0:Me.createDate)),1)]),o.createElementVNode("div",XQ,[o.createElementVNode("div",YQ,[A.value.length==0?(o.openBlock(),o.createElementBlock("div",JQ,[o.createElementVNode("div",{class:"shot",onClick:P[0]||(P[0]=Le=>te())},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/camera.png"},null,8,ZQ),P[16]||(P[16]=o.createTextVNode(" 添加视角 "))]),o.createElementVNode("div",{class:"upload",onClick:P[1]||(P[1]=Le=>p.value.click())},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/upload.png"},null,8,qQ),P[17]||(P[17]=o.createTextVNode(" 上传图片 "))])])):(o.openBlock(),o.createBlock(Ee,{key:1,ref_key:"imageViewRef",ref:c,"snapshot-list":A.value,"edit-enable":!0,onSwitchViewPoints:oe,onImageZoomIn:ue,onDeleteView:K},null,8,["snapshot-list"]))])]),o.createElementVNode("div",eW,[o.withDirectives(o.createElementVNode("div",tW,[o.createElementVNode("img",{class:"newBcfView",src:o.unref(Vt)+"/bim-viewer/bcf-images/camera_gray.png",onClick:P[2]||(P[2]=Le=>te())},null,8,rW),o.createElementVNode("img",{class:"newImage",src:o.unref(Vt)+"/bim-viewer/bcf-images/upload_gray.png",onClick:P[3]||(P[3]=Le=>p.value.click())},null,8,nW),o.createElementVNode("input",{ref_key:"imgInputRef",ref:p,type:"file",accept:"image/*",style:{display:"none"},onChange:q},null,544)],512),[[o.vShow,A.value.length>0]]),o.createElementVNode("div",iW,[o.createElementVNode("div",{class:o.normalizeClass((A.value.length>0,"object")),onClick:P[4]||(P[4]=Le=>ne("select"))},[o.createElementVNode("img",{src:o.unref(Vt)+"/bim-viewer/bcf-images/add_select.png"},null,8,sW),P[18]||(P[18]=o.createElementVNode("span",null,"添加模型对象",-1)),R.value!=0?(o.openBlock(),o.createElementBlock("div",aW,o.toDisplayString(R.value),1)):o.createCommentVNode("",!0)],2)])]),o.createElementVNode("div",oW,[o.createElementVNode("div",lW,[o.createElementVNode("div",uW,[P[19]||(P[19]=o.createElementVNode("div",null,[o.createTextVNode(" 标题 "),o.createElementVNode("span",{style:{color:"#f54d4d"}},"*")],-1)),o.createElementVNode("div",cW,[o.createVNode(pe,{modelValue:b.value,"onUpdate:modelValue":P[5]||(P[5]=Le=>b.value=Le),placeholder:"请输入"},null,8,["modelValue"])])]),o.createElementVNode("div",dW,[P[20]||(P[20]=o.createElementVNode("span",null,"类别",-1)),o.createElementVNode("div",fW,[o.createVNode(ye,{modelValue:w.value,"onUpdate:modelValue":P[6]||(P[6]=Le=>w.value=Le),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(j.value,(Le,Ve)=>(o.openBlock(),o.createBlock(fe,{key:Ve,value:Le},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",hW,[P[21]||(P[21]=o.createElementVNode("span",null,"优先级",-1)),o.createElementVNode("div",pW,[o.createVNode(ye,{modelValue:B.value,"onUpdate:modelValue":P[7]||(P[7]=Le=>B.value=Le),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList($.value,(Le,Ve)=>(o.openBlock(),o.createBlock(fe,{key:Ve,value:Le},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",AW,[P[22]||(P[22]=o.createElementVNode("span",null,"状态",-1)),o.createElementVNode("div",mW,[o.createVNode(ye,{modelValue:k.value,"onUpdate:modelValue":P[8]||(P[8]=Le=>k.value=Le),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(X.value,(Le,Ve)=>(o.openBlock(),o.createBlock(fe,{key:Ve,value:Le},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",gW,[P[23]||(P[23]=o.createElementVNode("span",null,"阶段",-1)),o.createElementVNode("div",vW,[o.createVNode(ye,{modelValue:T.value,"onUpdate:modelValue":P[9]||(P[9]=Le=>T.value=Le),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(W.value,(Le,Ve)=>(o.openBlock(),o.createBlock(fe,{key:Ve,value:Le},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",yW,[P[24]||(P[24]=o.createElementVNode("span",null,"分配给",-1)),o.createElementVNode("div",bW,[o.createVNode(ye,{modelValue:L.value,"onUpdate:modelValue":P[10]||(P[10]=Le=>L.value=Le),clearable:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z.value,Le=>(o.openBlock(),o.createBlock(fe,{key:Le.userId,value:Le.userId,label:`${Le.userName}(${Le.mobile})`},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",_W,[P[25]||(P[25]=o.createElementVNode("span",null,"截止日期",-1)),o.createElementVNode("div",wW,[o.createVNode(de,{modelValue:V.value,"onUpdate:modelValue":P[11]||(P[11]=Le=>V.value=Le),type:"datetime",placeholder:"请选择日期"},null,8,["modelValue"])])]),o.createElementVNode("div",xW,[P[26]||(P[26]=o.createElementVNode("span",null,"问题描述",-1)),o.createElementVNode("div",CW,[o.createVNode(pe,{modelValue:Q.value,"onUpdate:modelValue":P[12]||(P[12]=Le=>Q.value=Le),type:"textarea",placeholder:"请输入"},null,8,["modelValue"])])]),o.createElementVNode("div",BW,[P[27]||(P[27]=o.createElementVNode("span",null,"标签",-1)),o.createElementVNode("div",EW,[o.createVNode(ye,{modelValue:N.value,"onUpdate:modelValue":P[13]||(P[13]=Le=>N.value=Le),multiple:"",placeholder:"请选择"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(D.value,(Le,Ve)=>(o.openBlock(),o.createBlock(fe,{key:Ve,value:Le},null,8,["value"]))),128))]),_:1},8,["modelValue"])])])])]),o.unref(v)=="add"?(o.openBlock(),o.createElementBlock("div",{key:0,class:"submit_button",onClick:P[14]||(P[14]=Le=>ce())}," 立即创建 ")):(o.openBlock(),o.createElementBlock("div",{key:1,class:"submit_button",onClick:P[15]||(P[15]=Le=>ee())}," 确认修改 "))])]}),_:1})])]),U.value?(o.openBlock(),o.createBlock(xe,{key:0,mode:l.value,"object-list":O.value,onSaveObject:re,onCloseAdd:ae,onClosePanel:ve},null,8,["mode","object-list"])):o.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-f12db54a"]]),SW={class:"filter"},kW=["src"],MW={class:"filter_panel"},TW={class:"header"},IW={class:"content"},DW={class:"select_item"},FW={class:"select_wrapper"},RW={class:"select_item"},OW={class:"select_wrapper"},LW={class:"select_item"},NW={class:"select_wrapper"},jW={class:"select_item"},VW={class:"select_wrapper"},UW={class:"select_item"},HW={class:"select_wrapper"},zW={class:"select_item"},GW={class:"select_wrapper"},QW={class:"footer"},WW=_n(o.defineComponent({__name:"BCFFilter",props:{instruction:{},bcfList:{}},emits:["filterBcfList","resetFilter"],setup(I,{emit:G}){const a=G,C=I,S=o.ref(C.bcfList);o.watch(()=>C.instruction,T=>{T&&T.instruct_name=="updateBcfList"&&T.content.bcfList&&(S.value=JSON.parse(JSON.stringify(T.content.bcfList)))},{deep:!0});const v=o.ref(),f=o.ref(),h=o.ref(),d=o.ref(),l=o.ref(),u=o.ref(),c=o.ref(Tn.BcfStaffList),p=o.ref(!1),A=o.ref(Bf),g=o.ref(Ef),_=o.ref(Pf),b=o.ref(!1),w=()=>{b.value=!0},B=()=>{if(!v.value&&!f.value&&!h.value&&!d.value&&!d.value&&!l.value&&(!u.value||u.value.length==0))k();else{let T=JSON.parse(JSON.stringify(S.value)).slice();v.value&&(T=T.filter(L=>L.priority&&uu(L.priority)==v.value)),f.value&&(T=T.filter(L=>typeof L.author=="string"?Tn.getStaffId(L.author)==f.value||Tn.getStaffName(f.value)==L.author:L.author==f.value)),h.value&&(T=T.filter(L=>L.status==h.value)),d.value&&(T=T.filter(L=>as(L.createDate)==as(d.value.toISOString()))),l.value&&(T=T.filter(L=>typeof L.assignedTo=="string"?Tn.getStaffId(L.assignedTo)==l.value||Tn.getStaffName(l.value)==L.assignedTo:L.assignedTo==l.value)),u.value&&(T=T.filter(L=>!!(L.labels&&L.labels.find(V=>{var Q;return(Q=u.value)==null?void 0:Q.includes(V)})))),a("filterBcfList",T)}},k=()=>{a("resetFilter"),b.value=!1,v.value=void 0,f.value=void 0,h.value=void 0,d.value=void 0,l.value=void 0,u.value=void 0};return(T,L)=>{const V=ys,Q=em,N=qA,j=bf;return o.openBlock(),o.createElementBlock("div",SW,[o.createElementVNode("div",{class:"filter_button",onClick:L[0]||(L[0]=$=>p.value=!p.value)},[o.createElementVNode("img",{class:"filter_button_img",src:o.unref(Vt)+"/bim-viewer/bcf-images/filter.png"},null,8,kW),L[7]||(L[7]=o.createElementVNode("span",null,"筛选",-1))]),o.withDirectives(o.createElementVNode("div",MW,[o.createElementVNode("div",TW,[L[8]||(L[8]=o.createElementVNode("span",null,"筛选",-1)),o.createVNode(V,{width:18,class:"close","click-handle":()=>{p.value=!1}},null,8,["click-handle"])]),o.createElementVNode("div",IW,[o.createElementVNode("div",DW,[L[9]||(L[9]=o.createElementVNode("span",null,"优先级",-1)),o.createElementVNode("div",FW,[o.createVNode(N,{modelValue:v.value,"onUpdate:modelValue":L[1]||(L[1]=$=>v.value=$),placeholder:"请选择",clearable:"",onChange:w},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,($,X)=>(o.openBlock(),o.createBlock(Q,{key:X,value:$},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",RW,[L[10]||(L[10]=o.createElementVNode("span",null,"状态",-1)),o.createElementVNode("div",OW,[o.createVNode(N,{modelValue:h.value,"onUpdate:modelValue":L[2]||(L[2]=$=>h.value=$),placeholder:"请选择",clearable:"",onChange:w},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,($,X)=>(o.openBlock(),o.createBlock(Q,{key:X,value:$},null,8,["value"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",LW,[L[11]||(L[11]=o.createElementVNode("span",null,"创建日期",-1)),o.createElementVNode("div",NW,[o.createVNode(j,{modelValue:d.value,"onUpdate:modelValue":L[3]||(L[3]=$=>d.value=$),type:"date",placeholder:"请选择日期",onChange:w},null,8,["modelValue"])])]),o.createElementVNode("div",jW,[L[12]||(L[12]=o.createElementVNode("span",null,"分配给",-1)),o.createElementVNode("div",VW,[o.createVNode(N,{modelValue:l.value,"onUpdate:modelValue":L[4]||(L[4]=$=>l.value=$),placeholder:"请选择",clearable:"",onChange:w},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.value,$=>(o.openBlock(),o.createBlock(Q,{key:$.userId,value:$.userId,label:`${$.userName}(${$.mobile})`},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",UW,[L[13]||(L[13]=o.createElementVNode("span",null,"创建人",-1)),o.createElementVNode("div",HW,[o.createVNode(N,{modelValue:f.value,"onUpdate:modelValue":L[5]||(L[5]=$=>f.value=$),placeholder:"请选择",clearable:"",onChange:w},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.value,$=>(o.openBlock(),o.createBlock(Q,{key:$.userId,value:$.userId,label:`${$.userName}(${$.mobile})`},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])]),o.createElementVNode("div",zW,[L[14]||(L[14]=o.createElementVNode("span",null,"标签",-1)),o.createElementVNode("div",GW,[o.createVNode(N,{modelValue:u.value,"onUpdate:modelValue":L[6]||(L[6]=$=>u.value=$),multiple:"",placeholder:"请选择",onChange:w},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(_.value,($,X)=>(o.openBlock(),o.createBlock(Q,{key:X,value:$},null,8,["value"]))),128))]),_:1},8,["modelValue"])])])]),o.createElementVNode("div",QW,[o.createElementVNode("div",{class:"reset",onClick:k}," 重置 "),o.createElementVNode("div",{class:o.normalizeClass(b.value?"save_allow":"save"),onClick:B}," 搜索 ",2)])],512),[[o.vShow,p.value]])])}}}),[["__scopeId","data-v-b86d14fc"]]);function Mf(I){throw new Error('Could not dynamically require "'+I+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $W={exports:{}};/*! ExcelJS 19-10-2023 */(function(I,G){(function(a){I.exports=a()})(function(){return function a(C,S,v){function f(l,u){if(!S[l]){if(!C[l]){var c=typeof Mf=="function"&&Mf;if(!u&&c)return c(l,!0);if(h)return h(l,!0);var p=new Error("Cannot find module '"+l+"'");throw p.code="MODULE_NOT_FOUND",p}var A=S[l]={exports:{}};C[l][0].call(A.exports,function(g){return f(C[l][1][g]||g)},A,A.exports,a,C,S,v)}return S[l].exports}for(var h=typeof Mf=="function"&&Mf,d=0;d<v.length;d++)f(v[d]);return f}({1:[function(a,C,S){const v=a("fs"),f=a("fast-csv"),h=a("dayjs/plugin/customParseFormat"),d=a("dayjs/plugin/utc"),l=a("dayjs").extend(h).extend(d),u=a("../utils/stream-buf"),{fs:{exists:c}}=a("../utils/utils"),p={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};C.exports=class{constructor(A){this.workbook=A,this.worksheet=null}async readFile(A,g){if(g=g||{},!await c(A))throw new Error("File not found: "+A);const _=v.createReadStream(A),b=await this.read(_,g);return _.close(),b}read(A,g){return g=g||{},new Promise((_,b)=>{const w=this.workbook.addWorksheet(g.sheetName),B=g.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],k=g.map||function(L){if(L==="")return null;const V=Number(L);if(!Number.isNaN(V)&&V!==1/0)return V;const Q=B.reduce((j,$)=>{if(j)return j;const X=l(L,$,!0);return X.isValid()?X:null},null);if(Q)return new Date(Q.valueOf());const N=p[L];return N!==void 0?N:L},T=f.parse(g.parserOptions).on("data",L=>{w.addRow(L.map(k))}).on("end",()=>{T.emit("worksheet",w)});T.on("worksheet",_).on("error",b),A.pipe(T)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(A,g){return new Promise((_,b)=>{g=g||{};const w=this.workbook.getWorksheet(g.sheetName||g.sheetId),B=f.format(g.formatterOptions);A.on("finish",()=>{_()}),B.on("error",b),B.pipe(A);const{dateFormat:k,dateUTC:T}=g,L=g.map||(N=>{if(N){if(N.text||N.hyperlink)return N.hyperlink||N.text||"";if(N.formula||N.result)return N.result||"";if(N instanceof Date)return k?T?l.utc(N).format(k):l(N).format(k):T?l.utc(N).format():l(N).format();if(N.error)return N.error;if(typeof N=="object")return JSON.stringify(N)}return N}),V=g.includeEmptyRows===void 0||g.includeEmptyRows;let Q=1;w&&w.eachRow((N,j)=>{if(V)for(;Q++<j-1;)B.write([]);const{values:$}=N;$.shift(),B.write($.map(L)),Q=j}),B.end()})}writeFile(A,g){const _={encoding:(g=g||{}).encoding||"utf8"},b=v.createWriteStream(A,_);return this.write(b,g)}async writeBuffer(A){const g=new u;return await this.write(g,A),g.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(a,C,S){const v=a("../utils/col-cache");class f{constructor(d,l){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=d,l)if(typeof l=="string"){const c=v.decodeAddress(l);this.nativeCol=c.col+u,this.nativeColOff=0,this.nativeRow=c.row+u,this.nativeRowOff=0}else l.nativeCol!==void 0?(this.nativeCol=l.nativeCol||0,this.nativeColOff=l.nativeColOff||0,this.nativeRow=l.nativeRow||0,this.nativeRowOff=l.nativeRowOff||0):l.col!==void 0?(this.col=l.col+u,this.row=l.row+u):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(d){return d instanceof f||d==null?d:new f(d)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(d){this.nativeCol=Math.floor(d),this.nativeColOff=Math.floor((d-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(d){this.nativeRow=Math.floor(d),this.nativeRowOff=Math.floor((d-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(d){this.nativeCol=d.nativeCol,this.nativeColOff=d.nativeColOff,this.nativeRow=d.nativeRow,this.nativeRowOff=d.nativeRowOff}}C.exports=f},{"../utils/col-cache":19}],3:[function(a,C,S){const v=a("../utils/col-cache"),f=a("../utils/under-dash"),h=a("./enums"),{slideFormula:d}=a("../utils/shared-formula"),l=a("./note");class u{constructor(A,g,_){if(!A||!g)throw new Error("A Cell needs a Row");this._row=A,this._column=g,v.validateAddress(_),this._address=_,this._value=c.create(u.Types.Null,this),this.style=this._mergeStyle(A.style,g.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(A){this.style.numFmt=A}get font(){return this.style.font}set font(A){this.style.font=A}get alignment(){return this.style.alignment}set alignment(A){this.style.alignment=A}get border(){return this.style.border}set border(A){this.style.border=A}get fill(){return this.style.fill}set fill(A){this.style.fill=A}get protection(){return this.style.protection}set protection(A){this.style.protection=A}_mergeStyle(A,g,_){const b=A&&A.numFmt||g&&g.numFmt;b&&(_.numFmt=b);const w=A&&A.font||g&&g.font;w&&(_.font=w);const B=A&&A.alignment||g&&g.alignment;B&&(_.alignment=B);const k=A&&A.border||g&&g.border;k&&(_.border=k);const T=A&&A.fill||g&&g.fill;T&&(_.fill=T);const L=A&&A.protection||g&&g.protection;return L&&(_.protection=L),_}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===u.Types.Merge}merge(A,g){this._value.release(),this._value=c.create(u.Types.Merge,this,A),g||(this.style=A.style)}unmerge(){this.type===u.Types.Merge&&(this._value.release(),this._value=c.create(u.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(A){return this._value.type===u.Types.Merge&&this._value.isMergedTo(A)}get master(){return this.type===u.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===u.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(A){this.type!==u.Types.Merge?(this._value.release(),this._value=c.create(c.getType(A),this,A)):this._value.master.value=A}get note(){return this._comment&&this._comment.note}set note(A){this._comment=new l(A)}get text(){return this._value.toString()}get html(){return f.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(A){this.type===u.Types.String&&(this._value=c.create(u.Types.Hyperlink,this,{text:this._value.value,hyperlink:A}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:A}=this._row;return{sheetName:A.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(A){this.names=[A]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(A){const{definedNames:g}=this.workbook;g.removeAllNames(this.fullAddress),A.forEach(_=>{g.addEx(this.fullAddress,_)})}addName(A){this.workbook.definedNames.addEx(this.fullAddress,A)}removeName(A){this.workbook.definedNames.removeEx(this.fullAddress,A)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(A){this._dataValidations.add(this.address,A)}get model(){const{model:A}=this._value;return A.style=this.style,this._comment&&(A.comment=this._comment.model),A}set model(A){if(this._value.release(),this._value=c.create(A.type,this),this._value.model=A,A.comment)switch(A.comment.type){case"note":this._comment=l.fromModel(A.comment)}A.style?this.style=A.style:this.style={}}}u.Types=h.ValueType;const c={getType:p=>p==null?u.Types.Null:p instanceof String||typeof p=="string"?u.Types.String:typeof p=="number"?u.Types.Number:typeof p=="boolean"?u.Types.Boolean:p instanceof Date?u.Types.Date:p.text&&p.hyperlink?u.Types.Hyperlink:p.formula||p.sharedFormula?u.Types.Formula:p.richText?u.Types.RichText:p.sharedString?u.Types.SharedString:p.error?u.Types.Error:u.Types.JSON,types:[{t:u.Types.Null,f:class{constructor(p){this.model={address:p.address,type:u.Types.Null}}get value(){return null}set value(p){}get type(){return u.Types.Null}get effectiveType(){return u.Types.Null}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return""}release(){}toString(){return""}}},{t:u.Types.Number,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.Number,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}get type(){return u.Types.Number}get effectiveType(){return u.Types.Number}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.String,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.String,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}get type(){return u.Types.String}get effectiveType(){return u.Types.String}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:u.Types.Date,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.Date,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}get type(){return u.Types.Date}get effectiveType(){return u.Types.Date}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.Hyperlink,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.Hyperlink,text:A?A.text:void 0,hyperlink:A?A.hyperlink:void 0},A&&A.tooltip&&(this.model.tooltip=A.tooltip)}get value(){const p={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(p.tooltip=this.model.tooltip),p}set value(p){this.model={text:p.text,hyperlink:p.hyperlink},p.tooltip&&(this.model.tooltip=p.tooltip)}get text(){return this.model.text}set text(p){this.model.text=p}get hyperlink(){return this.model.hyperlink}set hyperlink(p){this.model.hyperlink=p}get type(){return u.Types.Hyperlink}get effectiveType(){return u.Types.Hyperlink}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:u.Types.Formula,f:class{constructor(p,A){this.cell=p,this.model={address:p.address,type:u.Types.Formula,shareType:A?A.shareType:void 0,ref:A?A.ref:void 0,formula:A?A.formula:void 0,sharedFormula:A?A.sharedFormula:void 0,result:A?A.result:void 0}}_copyModel(p){const A={},g=_=>{const b=p[_];b&&(A[_]=b)};return g("formula"),g("result"),g("ref"),g("shareType"),g("sharedFormula"),A}get value(){return this._copyModel(this.model)}set value(p){this.model=this._copyModel(p)}validate(p){switch(c.getType(p)){case u.Types.Null:case u.Types.String:case u.Types.Number:case u.Types.Date:break;case u.Types.Hyperlink:case u.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(p){this.model.formula=p}get formulaType(){return this.model.formula?h.FormulaType.Master:this.model.sharedFormula?h.FormulaType.Shared:h.FormulaType.None}get result(){return this.model.result}set result(p){this.model.result=p}get type(){return u.Types.Formula}get effectiveType(){const p=this.model.result;return p==null?h.ValueType.Null:p instanceof String||typeof p=="string"?h.ValueType.String:typeof p=="number"?h.ValueType.Number:p instanceof Date?h.ValueType.Date:p.text&&p.hyperlink?h.ValueType.Hyperlink:p.formula?h.ValueType.Formula:h.ValueType.Null}get address(){return this.model.address}set address(p){this.model.address=p}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:p}=this.cell,A=p.findCell(this.model.sharedFormula);this._translatedFormula=A&&d(A.formula,A.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:u.Types.Merge,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.Merge,master:A?A.address:void 0},this._master=A,A&&A.addMergeRef()}get value(){return this._master.value}set value(p){p instanceof u?(this._master&&this._master.releaseMergeRef(),p.addMergeRef(),this._master=p):this._master.value=p}isMergedTo(p){return p===this._master}get master(){return this._master}get type(){return u.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:u.Types.JSON,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.String,value:JSON.stringify(A),rawValue:A}}get value(){return this.model.rawValue}set value(p){this.model.rawValue=p,this.model.value=JSON.stringify(p)}get type(){return u.Types.String}get effectiveType(){return u.Types.String}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:u.Types.SharedString,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.SharedString,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}get type(){return u.Types.SharedString}get effectiveType(){return u.Types.SharedString}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.RichText,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.String,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}toString(){return this.model.value.richText.map(p=>p.text).join("")}get type(){return u.Types.RichText}get effectiveType(){return u.Types.RichText}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:u.Types.Boolean,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.Boolean,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}get type(){return u.Types.Boolean}get effectiveType(){return u.Types.Boolean}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.Error,f:class{constructor(p,A){this.model={address:p.address,type:u.Types.Error,value:A}}get value(){return this.model.value}set value(p){this.model.value=p}get type(){return u.Types.Error}get effectiveType(){return u.Types.Error}get address(){return this.model.address}set address(p){this.model.address=p}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((p,A)=>(p[A.t]=A.f,p),[]),create(p,A,g){const _=this.types[p];if(!_)throw new Error("Could not create Value of type "+p);return new _(A,g)}};C.exports=u},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(a,C,S){const v=a("../utils/under-dash"),f=a("./enums"),h=a("../utils/col-cache");class d{constructor(u,c,p){this._worksheet=u,this._number=c,p!==!1&&(this.defn=p)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return h.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(u){u?(this.key=u.key,this.width=u.width!==void 0?u.width:9,this.outlineLevel=u.outlineLevel,u.style?this.style=u.style:this.style={},this.header=u.header,this._hidden=!!u.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(u){u!==void 0?(this._header=u,this.headers.forEach((c,p)=>{this._worksheet.getCell(p+1,this.number).value=c})):this._header=void 0}get key(){return this._key}set key(u){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=u,u&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(u){this._hidden=u}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(u){this._outlineLevel=u}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(u){return this.width===u.width&&this.hidden===u.hidden&&this.outlineLevel===u.outlineLevel&&v.isEqual(this.style,u.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const u=this.style;return!u||!(u.font||u.numFmt||u.alignment||u.border||u.fill||u.protection)}get headerCount(){return this.headers.length}eachCell(u,c){const p=this.number;c||(c=u,u=null),this._worksheet.eachRow(u,(A,g)=>{c(A.getCell(p),g)})}get values(){const u=[];return this.eachCell((c,p)=>{c&&c.type!==f.ValueType.Null&&(u[p]=c.value)}),u}set values(u){if(!u)return;const c=this.number;let p=0;u.hasOwnProperty("0")&&(p=1),u.forEach((A,g)=>{this._worksheet.getCell(g+p,c).value=A})}_applyStyle(u,c){return this.style[u]=c,this.eachCell(p=>{p[u]=c}),c}get numFmt(){return this.style.numFmt}set numFmt(u){this._applyStyle("numFmt",u)}get font(){return this.style.font}set font(u){this._applyStyle("font",u)}get alignment(){return this.style.alignment}set alignment(u){this._applyStyle("alignment",u)}get protection(){return this.style.protection}set protection(u){this._applyStyle("protection",u)}get border(){return this.style.border}set border(u){this._applyStyle("border",u)}get fill(){return this.style.fill}set fill(u){this._applyStyle("fill",u)}static toModel(u){const c=[];let p=null;return u&&u.forEach((A,g)=>{A.isDefault?p&&(p=null):p&&A.equivalentTo(p)?p.max=g+1:(p={min:g+1,max:g+1,width:A.width!==void 0?A.width:9,style:A.style,isCustomWidth:A.isCustomWidth,hidden:A.hidden,outlineLevel:A.outlineLevel,collapsed:A.collapsed},c.push(p))}),c.length?c:void 0}static fromModel(u,c){const p=[];let A=1,g=0;for(c=(c=c||[]).sort(function(_,b){return _.min-b.min});g<c.length;){const _=c[g++];for(;A<_.min;)p.push(new d(u,A++));for(;A<=_.max;)p.push(new d(u,A++,_))}return p.length?p:null}}C.exports=d},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(a,C,S){C.exports=class{constructor(v){this.model=v||{}}add(v,f){return this.model[v]=f}find(v){return this.model[v]}remove(v){this.model[v]=void 0}}},{}],6:[function(a,C,S){const v=a("../utils/under-dash"),f=a("../utils/col-cache"),h=a("../utils/cell-matrix"),d=a("./range"),l=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;C.exports=class{constructor(){this.matrixMap={}}getMatrix(u){return this.matrixMap[u]||(this.matrixMap[u]=new h)}add(u,c){const p=f.decodeEx(u);this.addEx(p,c)}addEx(u,c){const p=this.getMatrix(c);if(u.top)for(let A=u.left;A<=u.right;A++)for(let g=u.top;g<=u.bottom;g++){const _={sheetName:u.sheetName,address:f.n2l(A)+g,row:g,col:A};p.addCellEx(_)}else p.addCellEx(u)}remove(u,c){const p=f.decodeEx(u);this.removeEx(p,c)}removeEx(u,c){this.getMatrix(c).removeCellEx(u)}removeAllNames(u){v.each(this.matrixMap,c=>{c.removeCellEx(u)})}forEach(u){v.each(this.matrixMap,(c,p)=>{c.forEach(A=>{u(p,A)})})}getNames(u){return this.getNamesEx(f.decodeEx(u))}getNamesEx(u){return v.map(this.matrixMap,(c,p)=>c.findCellEx(u)&&p).filter(Boolean)}_explore(u,c){c.mark=!1;const{sheetName:p}=c,A=new d(c.row,c.col,c.row,c.col,p);let g,_;function b(B,k){const T=u.findCellAt(p,B,c.col);return!(!T||!T.mark)&&(A[k]=B,T.mark=!1,!0)}for(_=c.row-1;b(_,"top");_--);for(_=c.row+1;b(_,"bottom");_++);function w(B,k){const T=[];for(_=A.top;_<=A.bottom;_++){const L=u.findCellAt(p,_,B);if(!L||!L.mark)return!1;T.push(L)}A[k]=B;for(let L=0;L<T.length;L++)T[L].mark=!1;return!0}for(g=c.col-1;w(g,"left");g--);for(g=c.col+1;w(g,"right");g++);return A}getRanges(u,c){return(c=c||this.matrixMap[u])?(c.forEach(p=>{p.mark=!0}),{name:u,ranges:c.map(p=>p.mark&&this._explore(c,p)).filter(Boolean).map(p=>p.$shortRange)}):{name:u,ranges:[]}}normaliseMatrix(u,c){u.forEachInSheet(c,(p,A,g)=>{p&&(p.row===A&&p.col===g||(p.row=A,p.col=g,p.address=f.n2l(g)+A))})}spliceRows(u,c,p,A){v.each(this.matrixMap,g=>{g.spliceRows(u,c,p,A),this.normaliseMatrix(g,u)})}spliceColumns(u,c,p,A){v.each(this.matrixMap,g=>{g.spliceColumns(u,c,p,A),this.normaliseMatrix(g,u)})}get model(){return v.map(this.matrixMap,(u,c)=>this.getRanges(c,u)).filter(u=>u.ranges.length)}set model(u){const c=this.matrixMap={};u.forEach(p=>{const A=c[p.name]=new h;p.ranges.forEach(g=>{l.test(g.split("!").pop()||"")&&A.addCell(g)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(a,C,S){C.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(a,C,S){const v=a("../utils/col-cache"),f=a("./anchor");C.exports=class{constructor(h,d){this.worksheet=h,this.model=d}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(h){let{type:d,imageId:l,range:u,hyperlinks:c}=h;if(this.type=d,this.imageId=l,d==="image")if(typeof u=="string"){const p=v.decode(u);this.range={tl:new f(this.worksheet,{col:p.left,row:p.top},-1),br:new f(this.worksheet,{col:p.right,row:p.bottom},0),editAs:"oneCell"}}else this.range={tl:new f(this.worksheet,u.tl,0),br:u.br&&new f(this.worksheet,u.br,0),ext:u.ext,editAs:u.editAs,hyperlinks:c||u.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(a,C,S){const v=a("../utils/under-dash");class f{constructor(d){this.note=d}get model(){let d=null;switch(typeof this.note){case"string":d={type:"note",note:{texts:[{text:this.note}]}};break;default:d={type:"note",note:this.note}}return v.deepMerge({},f.DEFAULT_CONFIGS,d)}set model(d){const{note:l}=d,{texts:u}=l;u.length===1&&Object.keys(u[0]).length===1?this.note=u[0].text:this.note=l}static fromModel(d){const l=new f;return l.model=d,l}}f.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},C.exports=f},{"../utils/under-dash":26}],10:[function(a,C,S){const v=a("../utils/col-cache");class f{constructor(){this.decode(arguments)}setTLBR(d,l,u,c,p){if(arguments.length<4){const A=v.decodeAddress(d),g=v.decodeAddress(l);this.model={top:Math.min(A.row,g.row),left:Math.min(A.col,g.col),bottom:Math.max(A.row,g.row),right:Math.max(A.col,g.col),sheetName:u},this.setTLBR(A.row,A.col,g.row,g.col,p)}else this.model={top:Math.min(d,u),left:Math.min(l,c),bottom:Math.max(d,u),right:Math.max(l,c),sheetName:p}}decode(d){switch(d.length){case 5:this.setTLBR(d[0],d[1],d[2],d[3],d[4]);break;case 4:this.setTLBR(d[0],d[1],d[2],d[3]);break;case 3:this.setTLBR(d[0],d[1],d[2]);break;case 2:this.setTLBR(d[0],d[1]);break;case 1:{const l=d[0];if(l instanceof f)this.model={top:l.model.top,left:l.model.left,bottom:l.model.bottom,right:l.model.right,sheetName:l.sheetName};else if(l instanceof Array)this.decode(l);else if(l.top&&l.left&&l.bottom&&l.right)this.model={top:l.top,left:l.left,bottom:l.bottom,right:l.right,sheetName:l.sheetName};else{const u=v.decodeEx(l);u.top?this.model={top:u.top,left:u.left,bottom:u.bottom,right:u.right,sheetName:u.sheetName}:this.model={top:u.row,left:u.col,bottom:u.row,right:u.col,sheetName:u.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+d.length)}}get top(){return this.model.top||1}set top(d){this.model.top=d}get left(){return this.model.left||1}set left(d){this.model.left=d}get bottom(){return this.model.bottom||1}set bottom(d){this.model.bottom=d}get right(){return this.model.right||1}set right(d){this.model.right=d}get sheetName(){return this.model.sheetName}set sheetName(d){this.model.sheetName=d}get _serialisedSheetName(){const{sheetName:d}=this.model;return d?/^[a-zA-Z0-9]*$/.test(d)?d+"!":`'${d}'!`:""}expand(d,l,u,c){(!this.model.top||d<this.top)&&(this.top=d),(!this.model.left||l<this.left)&&(this.left=l),(!this.model.bottom||u>this.bottom)&&(this.bottom=u),(!this.model.right||c>this.right)&&(this.right=c)}expandRow(d){if(d){const{dimensions:l,number:u}=d;l&&this.expand(u,l.min,u,l.max)}}expandToAddress(d){const l=v.decodeEx(d);this.expand(l.row,l.col,l.row,l.col)}get tl(){return v.n2l(this.left)+this.top}get $t$l(){return`$${v.n2l(this.left)}$${this.top}`}get br(){return v.n2l(this.right)+this.bottom}get $b$r(){return`$${v.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(d){return(!d.sheetName||!this.sheetName||d.sheetName===this.sheetName)&&!(d.bottom<this.top)&&!(d.top>this.bottom)&&!(d.right<this.left)&&!(d.left>this.right)}contains(d){const l=v.decodeEx(d);return this.containsEx(l)}containsEx(d){return(!d.sheetName||!this.sheetName||d.sheetName===this.sheetName)&&d.row>=this.top&&d.row<=this.bottom&&d.col>=this.left&&d.col<=this.right}forEachAddress(d){for(let l=this.left;l<=this.right;l++)for(let u=this.top;u<=this.bottom;u++)d(v.encodeAddress(u,l),u,l)}}C.exports=f},{"../utils/col-cache":19}],11:[function(a,C,S){const v=a("../utils/under-dash"),f=a("./enums"),h=a("../utils/col-cache"),d=a("./cell");C.exports=class{constructor(l,u){this._worksheet=l,this._number=u,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(l){return this._cells[l-1]}getCellEx(l){let u=this._cells[l.col-1];if(!u){const c=this._worksheet.getColumn(l.col);u=new d(this,c,l.address),this._cells[l.col-1]=u}return u}getCell(l){if(typeof l=="string"){const u=this._worksheet.getColumnKey(l);l=u?u.number:h.l2n(l)}return this._cells[l-1]||this.getCellEx({address:h.encodeAddress(this._number,l),row:this._number,col:l})}splice(l,u){const c=l+u;for(var p=arguments.length,A=new Array(p>2?p-2:0),g=2;g<p;g++)A[g-2]=arguments[g];const _=A.length-u,b=this._cells.length;let w,B,k;if(_<0)for(w=l+A.length;w<=b;w++)k=this._cells[w-1],B=this._cells[w-_-1],B?(k=this.getCell(w),k.value=B.value,k.style=B.style,k._comment=B._comment):k&&(k.value=null,k.style={},k._comment=void 0);else if(_>0)for(w=b;w>=c;w--)B=this._cells[w-1],B?(k=this.getCell(w+_),k.value=B.value,k.style=B.style,k._comment=B._comment):this._cells[w+_-1]=void 0;for(w=0;w<A.length;w++)k=this.getCell(l+w),k.value=A[w],k.style={},k._comment=void 0}eachCell(l,u){if(u||(u=l,l=null),l&&l.includeEmpty){const c=this._cells.length;for(let p=1;p<=c;p++)u(this.getCell(p),p)}else this._cells.forEach((c,p)=>{c&&c.type!==f.ValueType.Null&&u(c,p+1)})}addPageBreak(l,u){const c=this._worksheet,p=Math.max(0,l-1)||0,A=Math.max(0,u-1)||16838,g={id:this._number,max:A,man:1};p&&(g.min=p),c.rowBreaks.push(g)}get values(){const l=[];return this._cells.forEach(u=>{u&&u.type!==f.ValueType.Null&&(l[u.col]=u.value)}),l}set values(l){if(this._cells=[],l)if(l instanceof Array){let u=0;l.hasOwnProperty("0")&&(u=1),l.forEach((c,p)=>{c!==void 0&&(this.getCellEx({address:h.encodeAddress(this._number,p+u),row:this._number,col:p+u}).value=c)})}else this._worksheet.eachColumnKey((u,c)=>{l[c]!==void 0&&(this.getCellEx({address:h.encodeAddress(this._number,u.number),row:this._number,col:u.number}).value=l[c])})}get hasValues(){return v.some(this._cells,l=>l&&l.type!==f.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let l=0;return this.eachCell(()=>{l++}),l}get dimensions(){let l=0,u=0;return this._cells.forEach(c=>{c&&c.type!==f.ValueType.Null&&((!l||l>c.col)&&(l=c.col),u<c.col&&(u=c.col))}),l>0?{min:l,max:u}:null}_applyStyle(l,u){return this.style[l]=u,this._cells.forEach(c=>{c&&(c[l]=u)}),u}get numFmt(){return this.style.numFmt}set numFmt(l){this._applyStyle("numFmt",l)}get font(){return this.style.font}set font(l){this._applyStyle("font",l)}get alignment(){return this.style.alignment}set alignment(l){this._applyStyle("alignment",l)}get protection(){return this.style.protection}set protection(l){this._applyStyle("protection",l)}get border(){return this.style.border}set border(l){this._applyStyle("border",l)}get fill(){return this.style.fill}set fill(l){this._applyStyle("fill",l)}get hidden(){return!!this._hidden}set hidden(l){this._hidden=l}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(l){this._outlineLevel=l}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const l=[];let u=0,c=0;return this._cells.forEach(p=>{if(p){const A=p.model;A&&((!u||u>p.col)&&(u=p.col),c<p.col&&(c=p.col),l.push(A))}}),this.height||l.length?{cells:l,number:this.number,min:u,max:c,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(l){if(l.number!==this._number)throw new Error("Invalid row number in model");let u;this._cells=[],l.cells.forEach(c=>{switch(c.type){case d.Types.Merge:break;default:{let p;if(c.address)p=h.decodeAddress(c.address);else if(u){const{row:A}=u,g=u.col+1;p={row:A,col:g,address:h.encodeAddress(A,g),$col$row:`$${h.n2l(g)}$${A}`}}u=p,this.getCellEx(p).model=c;break}}}),l.height?this.height=l.height:delete this.height,this.hidden=l.hidden,this.outlineLevel=l.outlineLevel||0,this.style=l.style&&JSON.parse(JSON.stringify(l.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(a,C,S){const v=a("../utils/col-cache");class f{constructor(d,l,u){this.table=d,this.column=l,this.index=u}_set(d,l){this.table.cacheState(),this.column[d]=l}get name(){return this.column.name}set name(d){this._set("name",d)}get filterButton(){return this.column.filterButton}set filterButton(d){this.column.filterButton=d}get style(){return this.column.style}set style(d){this.column.style=d}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(d){this._set("totalsRowLabel",d)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(d){this._set("totalsRowFunction",d)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(d){this._set("totalsRowResult",d)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(d){this._set("totalsRowFormula",d)}}C.exports=class{constructor(h,d){this.worksheet=h,d&&(this.table=d,this.validate(),this.store())}getFormula(h){switch(h.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${h.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${h.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${h.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${h.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${h.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${h.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${h.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${h.name}])`;case"custom":return h.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+h.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){const{table:h}=this,d=(_,b,w)=>{_[b]===void 0&&(_[b]=w)};d(h,"headerRow",!0),d(h,"totalsRow",!1),d(h,"style",{}),d(h.style,"theme","TableStyleMedium2"),d(h.style,"showFirstColumn",!1),d(h.style,"showLastColumn",!1),d(h.style,"showRowStripes",!1),d(h.style,"showColumnStripes",!1);const l=(_,b)=>{if(!_)throw new Error(b)};l(h.ref,"Table must have ref"),l(h.columns,"Table must have column definitions"),l(h.rows,"Table must have row definitions"),h.tl=v.decodeAddress(h.ref);const{row:u,col:c}=h.tl;l(u>0,"Table must be on valid row"),l(c>0,"Table must be on valid col");const{width:p,filterHeight:A,tableHeight:g}=this;h.autoFilterRef=v.encode(u,c,u+A-1,c+p-1),h.tableRef=v.encode(u,c,u+g-1,c+p-1),h.columns.forEach((_,b)=>{l(_.name,`Column ${b} must have a name`),b===0?d(_,"totalsRowLabel","Total"):(d(_,"totalsRowFunction","none"),_.totalsRowFormula=this.getFormula(_))})}store(){const h=(A,g)=>{g&&Object.keys(g).forEach(_=>{A[_]=g[_]})},{worksheet:d,table:l}=this,{row:u,col:c}=l.tl;let p=0;if(l.headerRow){const A=d.getRow(u+p++);l.columns.forEach((g,_)=>{const{style:b,name:w}=g,B=A.getCell(c+_);B.value=w,h(B,b)})}if(l.rows.forEach(A=>{const g=d.getRow(u+p++);A.forEach((_,b)=>{const w=g.getCell(c+b);w.value=_,h(w,l.columns[b].style)})}),l.totalsRow){const A=d.getRow(u+p++);l.columns.forEach((g,_)=>{const b=A.getCell(c+_);if(_===0)b.value=g.totalsRowLabel;else{const w=this.getFormula(g);b.value=w?{formula:g.totalsRowFormula,result:g.totalsRowResult}:null}h(b,g.style)})}}load(h){const{table:d}=this,{row:l,col:u}=d.tl;let c=0;if(d.headerRow){const p=h.getRow(l+c++);d.columns.forEach((A,g)=>{p.getCell(u+g).value=A.name})}if(d.rows.forEach(p=>{const A=h.getRow(l+c++);p.forEach((g,_)=>{A.getCell(u+_).value=g})}),d.totalsRow){const p=h.getRow(l+c++);d.columns.forEach((A,g)=>{const _=p.getCell(u+g);g===0?_.value=A.totalsRowLabel:this.getFormula(A)&&(_.value={formula:A.totalsRowFormula,result:A.totalsRowResult})})}}get model(){return this.table}set model(h){this.table=h}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const h=v.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let d=0;d<this._cache.tableHeight;d++){const l=this.worksheet.getRow(h.row+d);for(let u=0;u<this._cache.width;u++)l.getCell(h.col+u).value=null}else{for(let d=this.tableHeight;d<this._cache.tableHeight;d++){const l=this.worksheet.getRow(h.row+d);for(let u=0;u<this._cache.width;u++)l.getCell(h.col+u).value=null}for(let d=0;d<this.tableHeight;d++){const l=this.worksheet.getRow(h.row+d);for(let u=this.width;u<this._cache.width;u++)l.getCell(h.col+u).value=null}}this.store()}addRow(h,d){this.cacheState(),d===void 0?this.table.rows.push(h):this.table.rows.splice(d,0,h)}removeRows(h){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(h,d)}getColumn(h){const d=this.table.columns[h];return new f(this,d,h)}addColumn(h,d,l){this.cacheState(),l===void 0?(this.table.columns.push(h),this.table.rows.forEach((u,c)=>{u.push(d[c])})):(this.table.columns.splice(l,0,h),this.table.rows.forEach((u,c)=>{u.splice(l,0,d[c])}))}removeColumns(h){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(h,d),this.table.rows.forEach(l=>{l.splice(h,d)})}_assign(h,d,l){this.cacheState(),h[d]=l}get ref(){return this.table.ref}set ref(h){this._assign(this.table,"ref",h)}get name(){return this.table.name}set name(h){this.table.name=h}get displayName(){return this.table.displyName||this.table.name}set displayNamename(h){this.table.displayName=h}get headerRow(){return this.table.headerRow}set headerRow(h){this._assign(this.table,"headerRow",h)}get totalsRow(){return this.table.totalsRow}set totalsRow(h){this._assign(this.table,"totalsRow",h)}get theme(){return this.table.style.name}set theme(h){this.table.style.name=h}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(h){this.table.style.showFirstColumn=h}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(h){this.table.style.showLastColumn=h}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(h){this.table.style.showRowStripes=h}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(h){this.table.style.showColumnStripes=h}}},{"../utils/col-cache":19}],13:[function(a,C,S){const v=a("./worksheet"),f=a("./defined-names"),h=a("../xlsx/xlsx"),d=a("../csv/csv");C.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new f}get xlsx(){return this._xlsx||(this._xlsx=new h(this)),this._xlsx}get csv(){return this._csv||(this._csv=new d(this)),this._csv}get nextId(){for(let l=1;l<this._worksheets.length;l++)if(!this._worksheets[l])return l;return this._worksheets.length||1}addWorksheet(l,u){const c=this.nextId;u&&(typeof u=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),u={properties:{tabColor:{argb:u}}}):(u.argb||u.theme||u.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),u={properties:{tabColor:u}}));const p=this._worksheets.reduce((_,b)=>(b&&b.orderNo)>_?b.orderNo:_,0),A=Object.assign({},u,{id:c,name:l,orderNo:p+1,workbook:this}),g=new v(A);return this._worksheets[c]=g,g}removeWorksheetEx(l){delete this._worksheets[l.id]}removeWorksheet(l){const u=this.getWorksheet(l);u&&u.destroy()}getWorksheet(l){return l===void 0?this._worksheets.find(Boolean):typeof l=="number"?this._worksheets[l]:typeof l=="string"?this._worksheets.find(u=>u&&u.name===l):void 0}get worksheets(){return this._worksheets.slice(1).sort((l,u)=>l.orderNo-u.orderNo).filter(Boolean)}eachSheet(l){this.worksheets.forEach(u=>{l(u,u.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(l){const u=this.media.length;return this.media.push(Object.assign({},l,{type:"image"})),u}getImage(l){return this.media[l]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(l=>l.model),sheets:this.worksheets.map(l=>l.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(l){this.creator=l.creator,this.lastModifiedBy=l.lastModifiedBy,this.lastPrinted=l.lastPrinted,this.created=l.created,this.modified=l.modified,this.company=l.company,this.manager=l.manager,this.title=l.title,this.subject=l.subject,this.keywords=l.keywords,this.category=l.category,this.description=l.description,this.language=l.language,this.revision=l.revision,this.contentStatus=l.contentStatus,this.properties=l.properties,this.calcProperties=l.calcProperties,this._worksheets=[],l.worksheets.forEach(u=>{const{id:c,name:p,state:A}=u,g=l.sheets&&l.sheets.findIndex(_=>_.id===c);(this._worksheets[c]=new v({id:c,name:p,orderNo:g,state:A,workbook:this})).model=u}),this._definedNames.model=l.definedNames,this.views=l.views,this._themes=l.themes,this.media=l.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(a,C,S){const v=a("../utils/under-dash"),f=a("../utils/col-cache"),h=a("./range"),d=a("./row"),l=a("./column"),u=a("./enums"),c=a("./image"),p=a("./table"),A=a("./data-validations"),g=a("../utils/encryptor"),{copyStyle:_}=a("../utils/copy-style");C.exports=class{constructor(b){b=b||{},this._workbook=b.workbook,this.id=b.id,this.orderNo=b.orderNo,this.name=b.name,this.state=b.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},b.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!b.pageSetup||!b.pageSetup.fitToWidth&&!b.pageSetup.fitToHeight||b.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},b.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},b.headerFooter),this.dataValidations=new A,this.views=b.views||[],this.autoFilter=b.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(b){if(b===void 0&&(b="sheet"+this.id),this._name!==b){if(typeof b!="string")throw new Error("The name has to be a string.");if(b==="")throw new Error("The name can't be empty.");if(b==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(b))throw new Error(`Worksheet name ${b} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(b))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+b);if(b&&b.length>31&&(console.warn(`Worksheet name ${b} exceeds 31 chars. This will be truncated`),b=b.substring(0,31)),this._workbook._worksheets.find(w=>w&&w.name.toLowerCase()===b.toLowerCase()))throw new Error("Worksheet name already exists: "+b);this._name=b}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const b=new h;return this._rows.forEach(w=>{if(w){const B=w.dimensions;B&&b.expand(w.number,B.min,w.number,B.max)}}),b}get columns(){return this._columns}set columns(b){this._headerRowCount=b.reduce((k,T)=>{const L=(T.header?1:T.headers&&T.headers.length)||0;return Math.max(k,L)},0);let w=1;const B=this._columns=[];b.forEach(k=>{const T=new l(this,w++,!1);B.push(T),T.defn=k})}getColumnKey(b){return this._keys[b]}setColumnKey(b,w){this._keys[b]=w}deleteColumnKey(b){delete this._keys[b]}eachColumnKey(b){v.each(this._keys,b)}getColumn(b){if(typeof b=="string"){const w=this._keys[b];if(w)return w;b=f.l2n(b)}if(this._columns||(this._columns=[]),b>this._columns.length){let w=this._columns.length+1;for(;w<=b;)this._columns.push(new l(this,w++))}return this._columns[b-1]}spliceColumns(b,w){const B=this._rows.length;for(var k=arguments.length,T=new Array(k>2?k-2:0),L=2;L<k;L++)T[L-2]=arguments[L];if(T.length>0)for(let j=0;j<B;j++){const $=[b,w];T.forEach(W=>{$.push(W[j]||null)});const X=this.getRow(j+1);X.splice.apply(X,$)}else this._rows.forEach(j=>{j&&j.splice(b,w)});const V=T.length-w,Q=b+w,N=this._columns.length;if(V<0)for(let j=b+T.length;j<=N;j++)this.getColumn(j).defn=this.getColumn(j-V).defn;else if(V>0)for(let j=N;j>=Q;j--)this.getColumn(j+V).defn=this.getColumn(j).defn;for(let j=b;j<b+T.length;j++)this.getColumn(j).defn=null;this.workbook.definedNames.spliceColumns(this.name,b,w,T.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let b=0;return this.eachRow(w=>{b=Math.max(b,w.cellCount)}),b}get actualColumnCount(){const b=[];let w=0;return this.eachRow(B=>{B.eachCell(k=>{let{col:T}=k;b[T]||(b[T]=!0,w++)})}),w}_commitRow(){}get _lastRowNumber(){const b=this._rows;let w=b.length;for(;w>0&&b[w-1]===void 0;)w--;return w}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(b){return this._rows[b-1]}findRows(b,w){return this._rows.slice(b-1,b-1+w)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let b=0;return this.eachRow(()=>{b++}),b}getRow(b){let w=this._rows[b-1];return w||(w=this._rows[b-1]=new d(this,b)),w}getRows(b,w){if(w<1)return;const B=[];for(let k=b;k<b+w;k++)B.push(this.getRow(k));return B}addRow(b){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const B=this._nextRow,k=this.getRow(B);return k.values=b,this._setStyleOption(B,w[0]==="i"?w:"n"),k}addRows(b){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const B=[];return b.forEach(k=>{B.push(this.addRow(k,w))}),B}insertRow(b,w){let B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(b,0,w),this._setStyleOption(b,B),this.getRow(b)}insertRows(b,w){let B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(b,0,...w),B!=="n")for(let k=0;k<w.length;k++)B[0]==="o"&&this.findRow(w.length+b+k)!==void 0?this._copyStyle(w.length+b+k,b+k,B[1]==="+"):B[0]==="i"&&this.findRow(b-1)!==void 0&&this._copyStyle(b-1,b+k,B[1]==="+");return this.getRows(b,w.length)}_setStyleOption(b){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";w[0]==="o"&&this.findRow(b+1)!==void 0?this._copyStyle(b+1,b,w[1]==="+"):w[0]==="i"&&this.findRow(b-1)!==void 0&&this._copyStyle(b-1,b,w[1]==="+")}_copyStyle(b,w){let B=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const k=this.getRow(b),T=this.getRow(w);T.style=_(k.style),k.eachCell({includeEmpty:B},(L,V)=>{T.getCell(V).style=_(L.style)}),T.height=k.height}duplicateRow(b,w){let B=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const k=this._rows[b-1],T=new Array(w).fill(k.values);this.spliceRows(b+1,B?0:w,...T);for(let L=0;L<w;L++){const V=this._rows[b+L];V.style=k.style,V.height=k.height,k.eachCell({includeEmpty:!0},(Q,N)=>{V.getCell(N).style=Q.style})}}spliceRows(b,w){const B=b+w;for(var k=arguments.length,T=new Array(k>2?k-2:0),L=2;L<k;L++)T[L-2]=arguments[L];const V=T.length,Q=V-w,N=this._rows.length;let j,$;if(Q<0)for(b===N&&(this._rows[N-1]=void 0),j=B;j<=N;j++)if($=this._rows[j-1],$){const X=this.getRow(j+Q);X.values=$.values,X.style=$.style,X.height=$.height,$.eachCell({includeEmpty:!0},(W,D)=>{X.getCell(D).style=W.style}),this._rows[j-1]=void 0}else this._rows[j+Q-1]=void 0;else if(Q>0)for(j=N;j>=B;j--)if($=this._rows[j-1],$){const X=this.getRow(j+Q);X.values=$.values,X.style=$.style,X.height=$.height,$.eachCell({includeEmpty:!0},(W,D)=>{if(X.getCell(D).style=W.style,W._value.constructor.name==="MergeValue"){const z=this.getRow(W._row._number+V).getCell(D),M=W._value._master,R=this.getRow(M._row._number+V).getCell(M._column._number);z.merge(R)}})}else this._rows[j+Q-1]=void 0;for(j=0;j<V;j++){const X=this.getRow(b+j);X.style={},X.values=T[j]}this.workbook.definedNames.spliceRows(this.name,b,w,V)}eachRow(b,w){if(w||(w=b,b=void 0),b&&b.includeEmpty){const B=this._rows.length;for(let k=1;k<=B;k++)w(this.getRow(k),k)}else this._rows.forEach(B=>{B&&B.hasValues&&w(B,B.number)})}getSheetValues(){const b=[];return this._rows.forEach(w=>{w&&(b[w.number]=w.values)}),b}findCell(b,w){const B=f.getAddress(b,w),k=this._rows[B.row-1];return k?k.findCell(B.col):void 0}getCell(b,w){const B=f.getAddress(b,w);return this.getRow(B.row).getCellEx(B)}mergeCells(){for(var b=arguments.length,w=new Array(b),B=0;B<b;B++)w[B]=arguments[B];const k=new h(w);this._mergeCellsInternal(k)}mergeCellsWithoutStyle(){for(var b=arguments.length,w=new Array(b),B=0;B<b;B++)w[B]=arguments[B];const k=new h(w);this._mergeCellsInternal(k,!0)}_mergeCellsInternal(b,w){v.each(this._merges,k=>{if(k.intersects(b))throw new Error("Cannot merge already merged cells")});const B=this.getCell(b.top,b.left);for(let k=b.top;k<=b.bottom;k++)for(let T=b.left;T<=b.right;T++)(k>b.top||T>b.left)&&this.getCell(k,T).merge(B,w);this._merges[B.address]=b}_unMergeMaster(b){const w=this._merges[b.address];if(w){for(let B=w.top;B<=w.bottom;B++)for(let k=w.left;k<=w.right;k++)this.getCell(B,k).unmerge();delete this._merges[b.address]}}get hasMerges(){return v.some(this._merges,Boolean)}unMergeCells(){for(var b=arguments.length,w=new Array(b),B=0;B<b;B++)w[B]=arguments[B];const k=new h(w);for(let T=k.top;T<=k.bottom;T++)for(let L=k.left;L<=k.right;L++){const V=this.findCell(T,L);V&&(V.type===u.ValueType.Merge?this._unMergeMaster(V.master):this._merges[V.address]&&this._unMergeMaster(V))}}fillFormula(b,w,B){let k=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared";const T=f.decode(b),{top:L,left:V,bottom:Q,right:N}=T,j=N-V+1,$=f.encodeAddress(L,V),X=k==="shared";let W;W=typeof B=="function"?B:Array.isArray(B)?Array.isArray(B[0])?(z,M)=>B[z-L][M-V]:(z,M)=>B[(z-L)*j+(M-V)]:()=>{};let D=!0;for(let z=L;z<=Q;z++)for(let M=V;M<=N;M++)D?(this.getCell(z,M).value={shareType:k,formula:w,ref:b,result:W(z,M)},D=!1):this.getCell(z,M).value=X?{sharedFormula:$,result:W(z,M)}:W(z,M)}addImage(b,w){const B={type:"image",imageId:b,range:w};this._media.push(new c(this,B))}getImages(){return this._media.filter(b=>b.type==="image")}addBackgroundImage(b){const w={type:"background",imageId:b};this._media.push(new c(this,w))}getBackgroundImageId(){const b=this._media.find(w=>w.type==="background");return b&&b.imageId}protect(b,w){return new Promise(B=>{this.sheetProtection={sheet:!0},w&&"spinCount"in w&&(w.spinCount=Number.isFinite(w.spinCount)?Math.round(Math.max(0,w.spinCount)):1e5),b&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=g.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=w&&"spinCount"in w?w.spinCount:1e5,this.sheetProtection.hashValue=g.convertPasswordToHash(b,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),w&&(this.sheetProtection=Object.assign(this.sheetProtection,w),!b&&"spinCount"in w&&delete this.sheetProtection.spinCount),B()})}unprotect(){this.sheetProtection=null}addTable(b){const w=new p(this,b);return this.tables[b.name]=w,w}getTable(b){return this.tables[b]}removeTable(b){delete this.tables[b]}getTables(){return Object.values(this.tables)}addConditionalFormatting(b){this.conditionalFormattings.push(b)}removeConditionalFormatting(b){typeof b=="number"?this.conditionalFormattings.splice(b,1):this.conditionalFormattings=b instanceof Function?this.conditionalFormattings.filter(b):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(b){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=b}get model(){const b={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(k=>k.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(k=>k.model),conditionalFormattings:this.conditionalFormattings};b.cols=l.toModel(this.columns);const w=b.rows=[],B=b.dimensions=new h;return this._rows.forEach(k=>{const T=k&&k.model;T&&(B.expand(T.number,T.min,T.number,T.max),w.push(T))}),b.merges=[],v.each(this._merges,k=>{b.merges.push(k.range)}),b}_parseRows(b){this._rows=[],b.rows.forEach(w=>{const B=new d(this,w.number);this._rows[B.number-1]=B,B.model=w})}_parseMergeCells(b){v.each(b.mergeCells,w=>{this.mergeCellsWithoutStyle(w)})}set model(b){this.name=b.name,this._columns=l.fromModel(this,b.cols),this._parseRows(b),this._parseMergeCells(b),this.dataValidations=new A(b.dataValidations),this.properties=b.properties,this.pageSetup=b.pageSetup,this.headerFooter=b.headerFooter,this.views=b.views,this.autoFilter=b.autoFilter,this._media=b.media.map(w=>new c(this,w)),this.sheetProtection=b.sheetProtection,this.tables=b.tables.reduce((w,B)=>{const k=new p;return k.model=B,w[B.name]=k,w},{}),this.conditionalFormattings=b.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(a,C,S){a("core-js/modules/es.promise"),a("core-js/modules/es.promise.finally"),a("core-js/modules/es.object.assign"),a("core-js/modules/es.object.keys"),a("core-js/modules/es.object.values"),a("core-js/modules/es.symbol"),a("core-js/modules/es.symbol.async-iterator"),a("core-js/modules/es.array.iterator"),a("core-js/modules/es.array.includes"),a("core-js/modules/es.array.find-index"),a("core-js/modules/es.array.find"),a("core-js/modules/es.string.from-code-point"),a("core-js/modules/es.string.includes"),a("core-js/modules/es.number.is-nan"),a("regenerator-runtime/runtime");const v={Workbook:a("./doc/workbook")},f=a("./doc/enums");Object.keys(f).forEach(h=>{v[h]=f[h]}),C.exports=v},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(a,C,S){const v=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");S.bufferToString=function(f){return typeof f=="string"?f:v?v.decode(f):f.toString()}},{}],17:[function(a,C,S){const v=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:f}=a("buffer");S.stringToBuffer=function(h){return typeof h!="string"?h:v?f.from(v.encode(h).buffer):f.from(h)}},{buffer:220}],18:[function(a,C,S){const v=a("./under-dash"),f=a("./col-cache");C.exports=class{constructor(h){this.template=h,this.sheets={}}addCell(h){this.addCellEx(f.decodeEx(h))}getCell(h){return this.findCellEx(f.decodeEx(h),!0)}findCell(h){return this.findCellEx(f.decodeEx(h),!1)}findCellAt(h,d,l){const u=this.sheets[h],c=u&&u[d];return c&&c[l]}addCellEx(h){if(h.top)for(let d=h.top;d<=h.bottom;d++)for(let l=h.left;l<=h.right;l++)this.getCellAt(h.sheetName,d,l);else this.findCellEx(h,!0)}getCellEx(h){return this.findCellEx(h,!0)}findCellEx(h,d){const l=this.findSheet(h,d),u=this.findSheetRow(l,h,d);return this.findRowCell(u,h,d)}getCellAt(h,d,l){const u=this.sheets[h]||(this.sheets[h]=[]),c=u[d]||(u[d]=[]);return c[l]||(c[l]={sheetName:h,address:f.n2l(l)+d,row:d,col:l})}removeCellEx(h){const d=this.findSheet(h);if(!d)return;const l=this.findSheetRow(d,h);l&&delete l[h.col]}forEachInSheet(h,d){const l=this.sheets[h];l&&l.forEach((u,c)=>{u&&u.forEach((p,A)=>{p&&d(p,c,A)})})}forEach(h){v.each(this.sheets,(d,l)=>{this.forEachInSheet(l,h)})}map(h){const d=[];return this.forEach(l=>{d.push(h(l))}),d}findSheet(h,d){const l=h.sheetName;return this.sheets[l]?this.sheets[l]:d?this.sheets[l]=[]:void 0}findSheetRow(h,d,l){const{row:u}=d;return h&&h[u]?h[u]:l?h[u]=[]:void 0}findRowCell(h,d,l){const{col:u}=d;return h&&h[u]?h[u]:l?h[u]=this.template?Object.assign(d,JSON.parse(JSON.stringify(this.template))):d:void 0}spliceRows(h,d,l,u){const c=this.sheets[h];if(c){const p=[];for(let A=0;A<u;A++)p.push([]);c.splice(d,l,...p)}}spliceColumns(h,d,l,u){const c=this.sheets[h];if(c){const p=[];for(let A=0;A<u;A++)p.push(null);v.each(c,A=>{A.splice(d,l,...p)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(a,C,S){const v=/^[A-Z]+\d+$/,f={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:h=>h<=26?1:h<=676?2:3,_fill(h){let d,l,u,c,p,A=1;if(h>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&h>=1){for(;A<=26;)d=this._dictionary[A-1],this._n2l[A]=d,this._l2n[d]=A,A++;this._l2nFill=1}if(this._l2nFill<2&&h>=2){for(A=27;A<=702;)l=A-27,u=l%26,c=Math.floor(l/26),d=this._dictionary[c]+this._dictionary[u],this._n2l[A]=d,this._l2n[d]=A,A++;this._l2nFill=2}if(this._l2nFill<3&&h>=3){for(A=703;A<=16384;)l=A-703,u=l%26,c=Math.floor(l/26)%26,p=Math.floor(l/676),d=this._dictionary[p]+this._dictionary[c]+this._dictionary[u],this._n2l[A]=d,this._l2n[d]=A,A++;this._l2nFill=3}},l2n(h){if(this._l2n[h]||this._fill(h.length),!this._l2n[h])throw new Error("Out of bounds. Invalid column letter: "+h);return this._l2n[h]},n2l(h){if(h<1||h>16384)throw new Error(h+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[h]||this._fill(this._level(h)),this._n2l[h]},_hash:{},validateAddress(h){if(!v.test(h))throw new Error("Invalid Address: "+h);return!0},decodeAddress(h){const d=h.length<5&&this._hash[h];if(d)return d;let l=!1,u="",c=0,p=!1,A="",g=0;for(let b,w=0;w<h.length;w++)if(b=h.charCodeAt(w),!p&&b>=65&&b<=90)l=!0,u+=h[w],c=26*c+b-64;else if(b>=48&&b<=57)p=!0,A+=h[w],g=10*g+b-48;else if(p&&l&&b!==36)break;if(l){if(c>16384)throw new Error("Out of bounds. Invalid column letter: "+u)}else c=void 0;p||(g=void 0);const _={address:h=u+A,col:c,row:g,$col$row:`$${u}$${A}`};return c<=100&&g<=100&&(this._hash[h]=_,this._hash[_.$col$row]=_),_},getAddress(h,d){if(d){const l=this.n2l(d)+h;return this.decodeAddress(l)}return this.decodeAddress(h)},decode(h){const d=h.split(":");if(d.length===2){const l=this.decodeAddress(d[0]),u=this.decodeAddress(d[1]),c={top:Math.min(l.row,u.row),left:Math.min(l.col,u.col),bottom:Math.max(l.row,u.row),right:Math.max(l.col,u.col)};return c.tl=this.n2l(c.left)+c.top,c.br=this.n2l(c.right)+c.bottom,c.dimensions=`${c.tl}:${c.br}`,c}return this.decodeAddress(h)},decodeEx(h){const d=h.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),l=d[1]||d[2],u=d[3],c=u.split(":");if(c.length>1){let A=this.decodeAddress(c[0]),g=this.decodeAddress(c[1]);const _=Math.min(A.row,g.row),b=Math.min(A.col,g.col),w=Math.max(A.row,g.row),B=Math.max(A.col,g.col);return A=this.n2l(b)+_,g=this.n2l(B)+w,{top:_,left:b,bottom:w,right:B,sheetName:l,tl:{address:A,col:b,row:_,$col$row:`$${this.n2l(b)}$${_}`,sheetName:l},br:{address:g,col:B,row:w,$col$row:`$${this.n2l(B)}$${w}`,sheetName:l},dimensions:`${A}:${g}`}}if(u.startsWith("#"))return l?{sheetName:l,error:u}:{error:u};const p=this.decodeAddress(u);return l?{sheetName:l,...p}:p},encodeAddress:(h,d)=>f.n2l(d)+h,encode(){switch(arguments.length){case 2:return f.encodeAddress(arguments[0],arguments[1]);case 4:return`${f.encodeAddress(arguments[0],arguments[1])}:${f.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(h,d){const[l,u,,c,p]=h,[A,g]=d;return A>=l&&A<=c&&g>=u&&g<=p}};C.exports=f},{}],20:[function(a,C,S){const v=(h,d)=>({...h,...d.reduce((l,u)=>(h[u]&&(l[u]={...h[u]}),l),{})}),f=function(h,d,l){let u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];h[l]&&(d[l]=v(h[l],u))};S.copyStyle=h=>{if(!h)return h;if(d=h,Object.keys(d).length===0)return{};var d;const l={...h};return f(h,l,"font",["color"]),f(h,l,"alignment"),f(h,l,"protection"),h.border&&(f(h,l,"border"),f(h.border,l.border,"top",["color"]),f(h.border,l.border,"left",["color"]),f(h.border,l.border,"bottom",["color"]),f(h.border,l.border,"right",["color"]),f(h.border,l.border,"diagonal",["color"])),h.fill&&(f(h,l,"fill",["fgColor","bgColor","center"]),h.fill.stops&&(l.fill.stops=h.fill.stops.map(u=>v(u,["color"])))),l}},{}],21:[function(a,C,S){(function(v){(function(){const f=a("crypto"),h={hash(d){const l=f.createHash(d);for(var u=arguments.length,c=new Array(u>1?u-1:0),p=1;p<u;p++)c[p-1]=arguments[p];return l.update(v.concat(c)),l.digest()},convertPasswordToHash(d,l,u,c){if(l=l.toLowerCase(),f.getHashes().indexOf(l)<0)throw new Error(`Hash algorithm '${l}' not supported!`);const p=v.from(d,"utf16le");let A=this.hash(l,v.from(u,"base64"),p);for(let g=0;g<c;g++){const _=v.alloc(4);_.writeUInt32LE(g,0),A=this.hash(l,A,_)}return A.toString("base64")},randomBytes:d=>f.randomBytes(d)};C.exports=h}).call(this)}).call(this,a("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(a,C,S){const{SaxesParser:v}=a("saxes"),{PassThrough:f}=a("readable-stream"),{bufferToString:h}=a("./browser-buffer-decode");C.exports=async function*(d){d.pipe&&!d[Symbol.asyncIterator]&&(d=d.pipe(new f));const l=new v;let u;l.on("error",p=>{u=p});let c=[];l.on("opentag",p=>c.push({eventType:"opentag",value:p})),l.on("text",p=>c.push({eventType:"text",value:p})),l.on("closetag",p=>c.push({eventType:"closetag",value:p}));for await(const p of d){if(l.write(h(p)),u)throw u;yield c,c=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(a,C,S){const v=a("./col-cache"),f=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,h=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;C.exports={slideFormula:function(d,l,u){const c=v.decode(l),p=v.decode(u);return d.replace(f,(A,g,_,b,w)=>{if(w)return A;const B=h.exec(b);if(B){const k=B[1],T=B[2].toUpperCase(),L=B[3],V=B[4];if(T.length>3||T.length===3&&T>"XFD")return A;let Q=v.l2n(T),N=parseInt(V,10);return k||(Q+=p.col-c.col),L||(N+=p.row-c.row),(g||"")+(k||"")+v.n2l(Q)+(L||"")+N}return A})}}},{"./col-cache":19}],24:[function(a,C,S){(function(v,f){(function(){const h=a("readable-stream"),d=a("./utils"),l=a("./string-buf");class u{constructor(b,w){this._data=b,this._encoding=w}get length(){return this.toBuffer().length}copy(b,w,B,k){return this.toBuffer().copy(b,w,B,k)}toBuffer(){return this._buffer||(this._buffer=f.from(this._data,this._encoding)),this._buffer}}class c{constructor(b){this._data=b}get length(){return this._data.length}copy(b,w,B,k){return this._data._buf.copy(b,w,B,k)}toBuffer(){return this._data.toBuffer()}}class p{constructor(b){this._data=b}get length(){return this._data.length}copy(b,w,B,k){this._data.copy(b,w,B,k)}toBuffer(){return this._data}}class A{constructor(b){this.size=b,this.buffer=f.alloc(b),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const b=f.alloc(this.iWrite-this.iRead);return this.buffer.copy(b,0,this.iRead,this.iWrite),b}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(b){let w;return b===0?null:b===void 0||b>=this.length?(w=this.toBuffer(),this.iRead=this.iWrite,w):(w=f.alloc(b),this.buffer.copy(w,0,this.iRead,b),this.iRead+=b,w)}write(b,w,B){const k=Math.min(B,this.size-this.iWrite);return b.copy(this.buffer,this.iWrite,w,w+k),this.iWrite+=k,k}}const g=function(_){_=_||{},this.bufSize=_.bufSize||1048576,this.buffers=[],this.batch=_.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};d.inherits(g,h.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return f.concat(this.buffers.map(_=>_.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const b=this.buffers[this.buffers.length-1];if(!b.full)return b}const _=new A(this.bufSize);return this.buffers.push(_),_},async _pipe(_){await Promise.all(this.pipes.map(function(b){return new Promise(w=>{b.write(_.toBuffer(),()=>{w()})})}))},_writeToBuffers(_){let b=0;const w=_.length;for(;b<w;)b+=this._getWritableBuffer().write(_,b,w-b)},async write(_,b,w){let B;if(b instanceof Function&&(w=b,b="utf8"),w=w||d.nop,_ instanceof l)B=new c(_);else if(_ instanceof f)B=new p(_);else{if(!(typeof _=="string"||_ instanceof String||_ instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");B=new u(_,b)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(B);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(B),v.nextTick(w)):(await this._pipe(B),w());else this.paused||this.emit("data",B.toBuffer()),this._writeToBuffers(B),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(_,b,w){const B=k=>{k?w(k):(this._flush(),this.pipes.forEach(T=>{T.end()}),this.emit("finish"))};_?this.write(_,b,B):B()},read(_){let b;if(_){for(b=[];_&&this.buffers.length&&!this.buffers[0].eod;){const w=this.buffers[0],B=w.read(_);_-=B.length,b.push(B),w.eod&&w.full&&this.buffers.shift()}return f.concat(b)}return b=this.buffers.map(w=>w.toBuffer()).filter(Boolean),this.buffers=[],f.concat(b)},setEncoding(_){this.encoding=_},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(_){this.pipes.push(_),!this.paused&&this.buffers.length&&this.end()},unpipe(_){this.pipes=this.pipes.filter(b=>b!==_)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),C.exports=g}).call(this)}).call(this,a("_process"),a("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(a,C,S){(function(v){(function(){C.exports=class{constructor(f){this._buf=v.alloc(f&&f.size||16384),this._encoding=f&&f.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=v.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(f){f=f||0,this._buffer=void 0,this._inPos=f}_grow(f){let h=2*this._buf.length;for(;h<f;)h*=2;const d=v.alloc(h);this._buf.copy(d,0),this._buf=d}addText(f){this._buffer=void 0;let h=this._inPos+this._buf.write(f,this._inPos,this._encoding);for(;h>=this._buf.length-4;)this._grow(this._inPos+f.length),h=this._inPos+this._buf.write(f,this._inPos,this._encoding);this._inPos=h}addStringBuf(f){f.length&&(this._buffer=void 0,this.length+f.length>this.capacity&&this._grow(this.length+f.length),f._buf.copy(this._buf,this._inPos,0,f.length),this._inPos+=f.length)}}}).call(this)}).call(this,a("buffer").Buffer)},{buffer:220}],26:[function(a,C,S){const{toString:v}=Object.prototype,f=/["&<>]/,h={each:function(d,l){d&&(Array.isArray(d)?d.forEach(l):Object.keys(d).forEach(u=>{l(d[u],u)}))},some:function(d,l){return!!d&&(Array.isArray(d)?d.some(l):Object.keys(d).some(u=>l(d[u],u)))},every:function(d,l){return!d||(Array.isArray(d)?d.every(l):Object.keys(d).every(u=>l(d[u],u)))},map:function(d,l){return d?Array.isArray(d)?d.map(l):Object.keys(d).map(u=>l(d[u],u)):[]},keyBy:(d,l)=>d.reduce((u,c)=>(u[c[l]]=c,u),{}),isEqual:function(d,l){const u=typeof d,c=typeof l,p=Array.isArray(d),A=Array.isArray(l);let g;if(u!==c)return!1;switch(typeof d){case"object":if(p||A)return!(!p||!A)&&d.length===l.length&&d.every((_,b)=>{const w=l[b];return h.isEqual(_,w)});if(d===null||l===null)return d===l;if(g=Object.keys(d),Object.keys(l).length!==g.length)return!1;for(const _ of g)if(!l.hasOwnProperty(_))return!1;return h.every(d,(_,b)=>{const w=l[b];return h.isEqual(_,w)});default:return d===l}},escapeHtml(d){const l=f.exec(d);if(!l)return d;let u="",c="",p=0,A=l.index;for(;A<d.length;A++){switch(d.charAt(A)){case'"':c="&quot;";break;case"&":c="&amp;";break;case"'":c="&apos;";break;case"<":c="&lt;";break;case">":c="&gt;";break;default:continue}p!==A&&(u+=d.substring(p,A)),p=A+1,u+=c}return p!==A?u+d.substring(p,A):u},strcmp:(d,l)=>d<l?-1:d>l?1:0,isUndefined:d=>v.call(d)==="[object Undefined]",isObject:d=>v.call(d)==="[object Object]",deepMerge(){const d=arguments[0]||{},{length:l}=arguments;let u,c,p;function A(g,_){u=d[_],p=Array.isArray(g),h.isObject(g)||p?(p?(p=!1,c=u&&Array.isArray(u)?u:[]):c=u&&h.isObject(u)?u:{},d[_]=h.deepMerge(c,g)):h.isUndefined(g)||(d[_]=g)}for(let g=0;g<l;g++)h.each(arguments[g],A);return d}};C.exports=h},{}],27:[function(a,C,S){(function(v,f){(function(){const h=a("fs"),d=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,l={nop(){},promiseImmediate:u=>new Promise(c=>{v.setImmediate?f(()=>{c(u)}):setTimeout(()=>{c(u)},1)}),inherits:function(u,c,p,A){u.super_=c,A||(A=p,p=null),p&&Object.keys(p).forEach(_=>{Object.defineProperty(u,_,Object.getOwnPropertyDescriptor(p,_))});const g={constructor:{value:u,enumerable:!1,writable:!1,configurable:!0}};A&&Object.keys(A).forEach(_=>{g[_]=Object.getOwnPropertyDescriptor(A,_)}),u.prototype=Object.create(c.prototype,g)},dateToExcel:(u,c)=>25569+u.getTime()/864e5-(c?1462:0),excelToDate(u,c){const p=Math.round(24*(u-25569+(c?1462:0))*3600*1e3);return new Date(p)},parsePath(u){const c=u.lastIndexOf("/");return{path:u.substring(0,c),name:u.substring(c+1)}},getRelsPath(u){const c=l.parsePath(u);return`${c.path}/_rels/${c.name}.rels`},xmlEncode(u){const c=d.exec(u);if(!c)return u;let p="",A="",g=0,_=c.index;for(;_<u.length;_++){const b=u.charCodeAt(_);switch(b){case 34:A="&quot;";break;case 38:A="&amp;";break;case 39:A="&apos;";break;case 60:A="&lt;";break;case 62:A="&gt;";break;case 127:A="";break;default:if(b<=31&&(b<=8||b>=11&&b!==13)){A="";break}continue}g!==_&&(p+=u.substring(g,_)),g=_+1,A&&(p+=A)}return g!==_?p+u.substring(g,_):p},xmlDecode:u=>u.replace(/&([a-z]*);/g,c=>{switch(c){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&apos;":return"'";case"&quot;":return'"';default:return c}}),validInt(u){const c=parseInt(u,10);return Number.isNaN(c)?0:c},isDateFmt(u){return u?(u=(u=u.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:u=>new Promise(c=>{h.access(u,h.constants.F_OK,p=>{c(!p)})})},toIsoDateString:u=>u.toIsoString().subsstr(0,10),parseBoolean:u=>u===!0||u==="true"||u===1||u==="1"};C.exports=l}).call(this)}).call(this,typeof Zr<"u"?Zr:typeof self<"u"?self:typeof window<"u"?window:{},a("timers").setImmediate)},{fs:216,timers:523}],28:[function(a,C,S){const v=a("./under-dash"),f=a("./utils");function h(u,c,p){u.push(` ${c}="${f.xmlEncode(p.toString())}"`)}function d(u,c){if(c){const p=[];v.each(c,(A,g)=>{A!==void 0&&h(p,g,A)}),u.push(p.join(""))}}class l{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(c){const p=this._xml;p.push("<?xml"),d(p,c),p.push(`?>
578
578
  `)}openNode(c,p){const A=this.tos,g=this._xml;A&&this.open&&g.push(">"),this._stack.push(c),g.push("<"),g.push(c),d(g,p),this.leaf=!0,this.open=!0}addAttribute(c,p){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");p!==void 0&&h(this._xml,c,p)}addAttributes(c){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");d(this._xml,c)}writeText(c){const p=this._xml;this.open&&(p.push(">"),this.open=!1),this.leaf=!1,p.push(f.xmlEncode(c.toString()))}writeXml(c){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(c)}closeNode(){const c=this._stack.pop(),p=this._xml;this.leaf?p.push("/>"):(p.push("</"),p.push(c),p.push(">")),this.open=!1,this.leaf=!1}leafNode(c,p,A){this.openNode(c,p),A!==void 0&&this.writeText(A),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){const c=this._rollbacks.pop();this._xml.length>c.xml&&this._xml.splice(c.xml,this._xml.length-c.xml),this._stack.length>c.stack&&this._stack.splice(c.stack,this._stack.length-c.stack),this.leaf=c.leaf,this.open=c.open}get xml(){return this.closeAll(),this._xml.join("")}}l.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},C.exports=l},{"./under-dash":26,"./utils":27}],29:[function(a,C,S){(function(v){(function(){const f=a("events"),h=a("jszip"),d=a("./stream-buf"),{stringToBuffer:l}=a("./browser-buffer-encode");class u extends f.EventEmitter{constructor(p){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},p),this.zip=new h,this.stream=new d}append(p,A){A.hasOwnProperty("base64")&&A.base64?this.zip.file(A.name,p,{base64:!0}):(v.browser&&typeof p=="string"&&(p=l(p)),this.zip.file(A.name,p))}async finalize(){const p=await this.zip.generateAsync(this.options);this.stream.end(p),this.emit("finish")}read(p){return this.stream.read(p)}setEncoding(p){return this.stream.setEncoding(p)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(p,A){return this.stream.pipe(p,A)}unpipe(p){return this.stream.unpipe(p)}unshift(p){return this.stream.unshift(p)}wrap(p){return this.stream.wrap(p)}}C.exports={ZipWriter:u}}).call(this)}).call(this,a("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(a,C,S){C.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],31:[function(a,C,S){C.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],32:[function(a,C,S){const v=a("../../utils/parse-sax"),f=a("../../utils/xml-stream");class h{prepare(){}render(){}parseOpen(l){}parseText(l){}parseClose(l){}reconcile(l,u){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(l=>{l instanceof h?l.reset():l.xform&&l.xform.reset()})}mergeModel(l){this.model=Object.assign(this.model||{},l)}async parse(l){for await(const u of l)for(const{eventType:c,value:p}of u)if(c==="opentag")this.parseOpen(p);else if(c==="text")this.parseText(p);else if(c==="closetag"&&!this.parseClose(p.name))return this.model;return this.model}async parseStream(l){return this.parse(v(l))}get xml(){return this.toXml(this.model)}toXml(l){const u=new f;return this.render(u,l),u.xml}static toAttribute(l,u){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(l===void 0){if(c)return u}else if(c||l!==u)return l.toString()}static toStringAttribute(l,u){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return h.toAttribute(l,u,c)}static toStringValue(l,u){return l===void 0?u:l}static toBoolAttribute(l,u){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(l===void 0){if(c)return u}else if(c||l!==u)return l?"1":"0"}static toBoolValue(l,u){return l===void 0?u:l==="1"}static toIntAttribute(l,u){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return h.toAttribute(l,u,c)}static toIntValue(l,u){return l===void 0?u:parseInt(l,10)}static toFloatAttribute(l,u){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return h.toAttribute(l,u,c)}static toFloatValue(l,u){return l===void 0?u:parseFloat(l)}}C.exports=h},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(a,C,S){const v=a("../base-xform"),f=a("../../../utils/col-cache");function h(l){try{return f.decodeEx(l),!0}catch{return!1}}function d(l){const u=[];let c=!1,p="";return l.split(",").forEach(A=>{if(!A)return;const g=(A.match(/'/g)||[]).length;if(!g)return void(c?p+=A+",":h(A)&&u.push(A));const _=g%2==0;!c&&_&&h(A)?u.push(A):c&&!_?(c=!1,h(p+A)&&u.push(p+A),p=""):(c=!0,p+=A+",")}),u}C.exports=class extends v{render(l,u){l.openNode("definedName",{name:u.name,localSheetId:u.localSheetId}),l.writeText(u.ranges.join(",")),l.closeNode()}parseOpen(l){switch(l.name){case"definedName":return this._parsedName=l.attributes.name,this._parsedLocalSheetId=l.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}parseText(l){this._parsedText.push(l)}parseClose(){return this.model={name:this._parsedName,ranges:d(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(a,C,S){const v=a("../../../utils/utils"),f=a("../base-xform");C.exports=class extends f{render(h,d){h.leafNode("sheet",{sheetId:d.id,name:d.name,state:d.state,"r:id":d.rId})}parseOpen(h){return h.name==="sheet"&&(this.model={name:v.xmlDecode(h.attributes.name),id:parseInt(h.attributes.sheetId,10),state:h.attributes.state,rId:h.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{render(f,h){f.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:h.fullCalcOnLoad?1:void 0})}parseOpen(f){return f.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{render(f,h){f.leafNode("workbookPr",{date1904:h.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(f){return f.name==="workbookPr"&&(this.model={date1904:f.attributes.date1904==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{render(f,h){const d={xWindow:h.x||0,yWindow:h.y||0,windowWidth:h.width||12e3,windowHeight:h.height||24e3,firstSheet:h.firstSheet,activeTab:h.activeTab};h.visibility&&h.visibility!=="visible"&&(d.visibility=h.visibility),f.leafNode("workbookView",d)}parseOpen(f){if(f.name==="workbookView"){const h=this.model={},d=function(u,c,p){const A=c!==void 0?h[u]=c:p;A!==void 0&&(h[u]=A)},l=function(u,c,p){const A=c!==void 0?h[u]=parseInt(c,10):p;A!==void 0&&(h[u]=A)};return l("x",f.attributes.xWindow,0),l("y",f.attributes.yWindow,0),l("width",f.attributes.windowWidth,25e3),l("height",f.attributes.windowHeight,1e4),d("visibility",f.attributes.visibility,"visible"),l("activeTab",f.attributes.activeTab,void 0),l("firstSheet",f.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(a,C,S){const v=a("../../../utils/under-dash"),f=a("../../../utils/col-cache"),h=a("../../../utils/xml-stream"),d=a("../base-xform"),l=a("../static-xform"),u=a("../list-xform"),c=a("./defined-name-xform"),p=a("./sheet-xform"),A=a("./workbook-view-xform"),g=a("./workbook-properties-xform"),_=a("./workbook-calc-properties-xform");class b extends d{constructor(){super(),this.map={fileVersion:b.STATIC_XFORMS.fileVersion,workbookPr:new g,bookViews:new u({tag:"bookViews",count:!1,childXform:new A}),sheets:new u({tag:"sheets",count:!1,childXform:new p}),definedNames:new u({tag:"definedNames",count:!1,childXform:new c}),calcPr:new _}}prepare(B){B.sheets=B.worksheets;const k=[];let T=0;B.sheets.forEach(L=>{if(L.pageSetup&&L.pageSetup.printArea&&L.pageSetup.printArea.split("&&").forEach(V=>{const Q=V.split(":"),N={name:"_xlnm.Print_Area",ranges:[`'${L.name}'!$${Q[0]}:$${Q[1]}`],localSheetId:T};k.push(N)}),L.pageSetup&&(L.pageSetup.printTitlesRow||L.pageSetup.printTitlesColumn)){const V=[];if(L.pageSetup.printTitlesColumn){const N=L.pageSetup.printTitlesColumn.split(":");V.push(`'${L.name}'!$${N[0]}:$${N[1]}`)}if(L.pageSetup.printTitlesRow){const N=L.pageSetup.printTitlesRow.split(":");V.push(`'${L.name}'!$${N[0]}:$${N[1]}`)}const Q={name:"_xlnm.Print_Titles",ranges:V,localSheetId:T};k.push(Q)}T++}),k.length&&(B.definedNames=B.definedNames.concat(k)),(B.media||[]).forEach((L,V)=>{L.name=L.type+(V+1)})}render(B,k){B.openXml(h.StdDocAttributes),B.openNode("workbook",b.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(B),this.map.workbookPr.render(B,k.properties),this.map.bookViews.render(B,k.views),this.map.sheets.render(B,k.sheets),this.map.definedNames.render(B,k.definedNames),this.map.calcPr.render(B,k.calcProperties),B.closeNode()}parseOpen(B){if(this.parser)return this.parser.parseOpen(B),!0;switch(B.name){case"workbook":return!0;default:return this.parser=this.map[B.name],this.parser&&this.parser.parseOpen(B),!0}}parseText(B){this.parser&&this.parser.parseText(B)}parseClose(B){if(this.parser)return this.parser.parseClose(B)||(this.parser=void 0),!0;switch(B){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}reconcile(B){const k=(B.workbookRels||[]).reduce((N,j)=>(N[j.Id]=j,N),{}),T=[];let L,V=0;(B.sheets||[]).forEach(N=>{const j=k[N.rId];j&&(L=B.worksheetHash["xl/"+j.Target.replace(/^(\s|\/xl\/)+/,"")],L&&(L.name=N.name,L.id=N.id,L.state=N.state,T[V++]=L))});const Q=[];v.each(B.definedNames,N=>{if(N.name==="_xlnm.Print_Area"){if(L=T[N.localSheetId],L){L.pageSetup||(L.pageSetup={});const j=f.decodeEx(N.ranges[0]);L.pageSetup.printArea=L.pageSetup.printArea?`${L.pageSetup.printArea}&&${j.dimensions}`:j.dimensions}}else if(N.name==="_xlnm.Print_Titles"){if(L=T[N.localSheetId],L){L.pageSetup||(L.pageSetup={});const j=N.ranges.join(","),$=/\$/g,X=/\$\d+:\$\d+/,W=j.match(X);if(W&&W.length){const M=W[0];L.pageSetup.printTitlesRow=M.replace($,"")}const D=/\$[A-Z]+:\$[A-Z]+/,z=j.match(D);if(z&&z.length){const M=z[0];L.pageSetup.printTitlesColumn=M.replace($,"")}}}else Q.push(N)}),B.definedNames=Q,B.media.forEach((N,j)=>{N.index=j})}}b.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},b.STATIC_XFORMS={fileVersion:new l({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},C.exports=b},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./defined-name-xform":33,"./sheet-xform":34,"./workbook-calc-properties-xform":35,"./workbook-properties-xform":36,"./workbook-view-xform":37}],39:[function(a,C,S){const v=a("../strings/rich-text-xform"),f=a("../../../utils/utils"),h=a("../base-xform"),d=C.exports=function(l){this.model=l};f.inherits(d,h,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new v),this._richTextXform},render(l,u){u=u||this.model,l.openNode("comment",{ref:u.ref,authorId:0}),l.openNode("text"),u&&u.note&&u.note.texts&&u.note.texts.forEach(c=>{this.richTextXform.render(l,c)}),l.closeNode(),l.closeNode()},parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"comment":return this.model={type:"note",note:{texts:[]},...l.attributes},!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(l),!0;default:return!1}},parseText(l){this.parser&&this.parser.parseText(l)},parseClose(l){switch(l){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(l),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(a,C,S){const v=a("../../../utils/xml-stream"),f=a("../../../utils/utils"),h=a("../base-xform"),d=a("./comment-xform"),l=C.exports=function(){this.map={comment:new d}};f.inherits(l,h,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(u,c){c=c||this.model,u.openXml(v.StdDocAttributes),u.openNode("comments",l.COMMENTS_ATTRIBUTES),u.openNode("authors"),u.leafNode("author",null,"Author"),u.closeNode(),u.openNode("commentList"),c.comments.forEach(p=>{this.map.comment.render(u,p)}),u.closeNode(),u.closeNode()},parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(u),!0;default:return!1}},parseText(u){this.parser&&this.parser.parseText(u)},parseClose(u){switch(u){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(u),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(a,C,S){const v=a("../../base-xform");C.exports=class extends v{constructor(f){super(),this._model=f}get tag(){return this._model&&this._model.tag}render(f,h,d){(h===d[2]||this.tag==="x:SizeWithCells"&&h===d[1])&&f.leafNode(this.tag)}parseOpen(f){switch(f.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../base-xform":32}],42:[function(a,C,S){const v=a("../../base-xform");C.exports=class extends v{constructor(f){super(),this._model=f}get tag(){return this._model&&this._model.tag}render(f,h){f.leafNode(this.tag,null,h)}parseOpen(f){switch(f.name){case this.tag:return this.text="",!0;default:return!1}}parseText(f){this.text=f}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"x:Anchor"}getAnchorRect(f){const h=Math.floor(f.left),d=Math.floor(68*(f.left-h)),l=Math.floor(f.top),u=Math.floor(18*(f.top-l)),c=Math.floor(f.right),p=Math.floor(68*(f.right-c)),A=Math.floor(f.bottom);return[h,d,l,u,c,p,A,Math.floor(18*(f.bottom-A))]}getDefaultRect(f){const h=f.col,d=Math.max(f.row-2,0);return[h,6,d,14,h+2,2,d+4,16]}render(f,h){const d=h.anchor?this.getAnchorRect(h.anchor):this.getDefaultRect(h.refAddress);f.leafNode("x:Anchor",null,d.join(", "))}parseOpen(f){switch(f.name){case this.tag:return this.text="",!0;default:return!1}}parseText(f){this.text=f}parseClose(){return!1}}},{"../base-xform":32}],44:[function(a,C,S){const v=a("../base-xform"),f=a("./vml-anchor-xform"),h=a("./style/vml-protection-xform"),d=a("./style/vml-position-xform"),l=["twoCells","oneCells","absolute"];C.exports=class extends v{constructor(){super(),this.map={"x:Anchor":new f,"x:Locked":new h({tag:"x:Locked"}),"x:LockText":new h({tag:"x:LockText"}),"x:SizeWithCells":new d({tag:"x:SizeWithCells"}),"x:MoveWithCells":new d({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(u,c){const{protection:p,editAs:A}=c.note;u.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(u,A,l),this.map["x:SizeWithCells"].render(u,A,l),this.map["x:Anchor"].render(u,c),this.map["x:Locked"].render(u,p.locked),u.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(u,p.lockText),u.leafNode("x:Row",null,c.refAddress.row-1),u.leafNode("x:Column",null,c.refAddress.col-1),u.closeNode()}parseOpen(u){switch(u.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.normalizeModel(),!1;default:return!0}}normalizeModel(){const u=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),c=Object.keys(u).length;this.model.editAs=l[c],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}}},{"../base-xform":32,"./style/vml-position-xform":41,"./style/vml-protection-xform":42,"./vml-anchor-xform":43}],45:[function(a,C,S){const v=a("../../../utils/xml-stream"),f=a("../base-xform"),h=a("./vml-shape-xform");class d extends f{constructor(){super(),this.map={"v:shape":new h}}get tag(){return"xml"}render(u,c){u.openXml(v.StdDocAttributes),u.openNode(this.tag,d.DRAWING_ATTRIBUTES),u.openNode("o:shapelayout",{"v:ext":"edit"}),u.leafNode("o:idmap",{"v:ext":"edit",data:1}),u.closeNode(),u.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),u.leafNode("v:stroke",{joinstyle:"miter"}),u.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),u.closeNode(),c.comments.forEach((p,A)=>{this.map["v:shape"].render(u,p,A)}),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(u){case this.tag:return!1;default:return!0}}reconcile(u,c){u.anchors.forEach(p=>{p.br?this.map["xdr:twoCellAnchor"].reconcile(p,c):this.map["xdr:oneCellAnchor"].reconcile(p,c)})}}d.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},C.exports=d},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(a,C,S){const v=a("../base-xform"),f=a("./vml-textbox-xform"),h=a("./vml-client-data-xform");class d extends v{constructor(){super(),this.map={"v:textbox":new f,"x:ClientData":new h}}get tag(){return"v:shape"}render(u,c,p){u.openNode("v:shape",d.V_SHAPE_ATTRIBUTES(c,p)),u.leafNode("v:fill",{color2:"infoBackground [80]"}),u.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),u.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(u,c),this.map["x:ClientData"].render(u,c),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset(),this.model={margins:{insetmode:u.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}}d.V_SHAPE_ATTRIBUTES=(l,u)=>({id:"_x0000_s"+(1025+u),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":l.note.margins&&l.note.margins.insetmode}),C.exports=d},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"v:textbox"}conversionUnit(f,h,d){return`${parseFloat(f)*h.toFixed(2)}${d}`}reverseConversionUnit(f){return(f||"").split(",").map(h=>Number(parseFloat(this.conversionUnit(parseFloat(h),.1,"")).toFixed(2)))}render(f,h){const d={style:"mso-direction-alt:auto"};if(h&&h.note){let{inset:l}=h.note&&h.note.margins;Array.isArray(l)&&(l=l.map(u=>this.conversionUnit(u,10,"mm")).join(",")),l&&(d.inset=l)}f.openNode("v:textbox",d),f.leafNode("div",{style:"text-align:left"}),f.closeNode()}parseOpen(f){switch(f.name){case this.tag:return this.model={inset:this.reverseConversionUnit(f.attributes.inset)},!0;default:return!0}}parseText(){}parseClose(f){switch(f){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],48:[function(a,C,S){const v=a("./base-xform");C.exports=class extends v{createNewModel(f){return{}}parseOpen(f){return this.parser=this.parser||this.map[f.name],this.parser?(this.parser.parseOpen(f),!0):f.name===this.tag&&(this.model=this.createNewModel(f),!0)}parseText(f){this.parser&&this.parser.parseText(f)}onParserClose(f,h){this.model[f]=h.model}parseClose(f){return this.parser?(this.parser.parseClose(f)||(this.onParserClose(f,this.parser),this.parser=void 0),!0):f!==this.tag}}},{"./base-xform":32}],49:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{render(f,h){f.openNode("HeadingPairs"),f.openNode("vt:vector",{size:2,baseType:"variant"}),f.openNode("vt:variant"),f.leafNode("vt:lpstr",void 0,"Worksheets"),f.closeNode(),f.openNode("vt:variant"),f.leafNode("vt:i4",void 0,h.length),f.closeNode(),f.closeNode(),f.closeNode()}parseOpen(f){return f.name==="HeadingPairs"}parseText(){}parseClose(f){return f!=="HeadingPairs"}}},{"../base-xform":32}],50:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{render(f,h){f.openNode("TitlesOfParts"),f.openNode("vt:vector",{size:h.length,baseType:"lpstr"}),h.forEach(d=>{f.leafNode("vt:lpstr",void 0,d.name)}),f.closeNode(),f.closeNode()}parseOpen(f){return f.name==="TitlesOfParts"}parseText(){}parseClose(f){return f!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(a,C,S){const v=a("../../../utils/xml-stream"),f=a("../base-xform"),h=a("../simple/string-xform"),d=a("./app-heading-pairs-xform"),l=a("./app-titles-of-parts-xform");class u extends f{constructor(){super(),this.map={Company:new h({tag:"Company"}),Manager:new h({tag:"Manager"}),HeadingPairs:new d,TitleOfParts:new l}}render(p,A){p.openXml(v.StdDocAttributes),p.openNode("Properties",u.PROPERTY_ATTRIBUTES),p.leafNode("Application",void 0,"Microsoft Excel"),p.leafNode("DocSecurity",void 0,"0"),p.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(p,A.worksheets),this.map.TitleOfParts.render(p,A.worksheets),this.map.Company.render(p,A.company||""),this.map.Manager.render(p,A.manager),p.leafNode("LinksUpToDate",void 0,"false"),p.leafNode("SharedDoc",void 0,"false"),p.leafNode("HyperlinksChanged",void 0,"false"),p.leafNode("AppVersion",void 0,"16.0300"),p.closeNode()}parseOpen(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case"Properties":return!0;default:return this.parser=this.map[p.name],!!this.parser&&(this.parser.parseOpen(p),!0)}}parseText(p){this.parser&&this.parser.parseText(p)}parseClose(p){if(this.parser)return this.parser.parseClose(p)||(this.parser=void 0),!0;switch(p){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}u.DateFormat=function(c){return c.toISOString().replace(/[.]\d{3,6}/,"")},u.DateAttrs={"xsi:type":"dcterms:W3CDTF"},u.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},C.exports=u},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(a,C,S){const v=a("../../../utils/xml-stream"),f=a("../base-xform");class h extends f{render(l,u){l.openXml(v.StdDocAttributes),l.openNode("Types",h.PROPERTY_ATTRIBUTES);const c={};(u.media||[]).forEach(p=>{if(p.type==="image"){const A=p.extension;c[A]||(c[A]=!0,l.leafNode("Default",{Extension:A,ContentType:"image/"+A}))}}),l.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),l.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),l.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),u.worksheets.forEach(p=>{const A=`/xl/worksheets/sheet${p.id}.xml`;l.leafNode("Override",{PartName:A,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),l.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),l.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),u.sharedStrings&&u.sharedStrings.count&&l.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),u.tables&&u.tables.forEach(p=>{l.leafNode("Override",{PartName:"/xl/tables/"+p.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),u.drawings&&u.drawings.forEach(p=>{l.leafNode("Override",{PartName:`/xl/drawings/${p.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),u.commentRefs&&(l.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),u.commentRefs.forEach(p=>{let{commentName:A}=p;l.leafNode("Override",{PartName:`/xl/${A}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),l.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),l.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),l.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}h.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},C.exports=h},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(a,C,S){const v=a("../../../utils/xml-stream"),f=a("../base-xform"),h=a("../simple/date-xform"),d=a("../simple/string-xform"),l=a("../simple/integer-xform");class u extends f{constructor(){super(),this.map={"dc:creator":new d({tag:"dc:creator"}),"dc:title":new d({tag:"dc:title"}),"dc:subject":new d({tag:"dc:subject"}),"dc:description":new d({tag:"dc:description"}),"dc:identifier":new d({tag:"dc:identifier"}),"dc:language":new d({tag:"dc:language"}),"cp:keywords":new d({tag:"cp:keywords"}),"cp:category":new d({tag:"cp:category"}),"cp:lastModifiedBy":new d({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new h({tag:"cp:lastPrinted",format:u.DateFormat}),"cp:revision":new l({tag:"cp:revision"}),"cp:version":new d({tag:"cp:version"}),"cp:contentStatus":new d({tag:"cp:contentStatus"}),"cp:contentType":new d({tag:"cp:contentType"}),"dcterms:created":new h({tag:"dcterms:created",attrs:u.DateAttrs,format:u.DateFormat}),"dcterms:modified":new h({tag:"dcterms:modified",attrs:u.DateAttrs,format:u.DateFormat})}}render(p,A){p.openXml(v.StdDocAttributes),p.openNode("cp:coreProperties",u.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(p,A.creator),this.map["dc:title"].render(p,A.title),this.map["dc:subject"].render(p,A.subject),this.map["dc:description"].render(p,A.description),this.map["dc:identifier"].render(p,A.identifier),this.map["dc:language"].render(p,A.language),this.map["cp:keywords"].render(p,A.keywords),this.map["cp:category"].render(p,A.category),this.map["cp:lastModifiedBy"].render(p,A.lastModifiedBy),this.map["cp:lastPrinted"].render(p,A.lastPrinted),this.map["cp:revision"].render(p,A.revision),this.map["cp:version"].render(p,A.version),this.map["cp:contentStatus"].render(p,A.contentStatus),this.map["cp:contentType"].render(p,A.contentType),this.map["dcterms:created"].render(p,A.created),this.map["dcterms:modified"].render(p,A.modified),p.closeNode()}parseOpen(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[p.name],this.parser)return this.parser.parseOpen(p),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(p))}}parseText(p){this.parser&&this.parser.parseText(p)}parseClose(p){if(this.parser)return this.parser.parseClose(p)||(this.parser=void 0),!0;switch(p){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: "+p)}}}u.DateFormat=function(c){return c.toISOString().replace(/[.]\d{3}/,"")},u.DateAttrs={"xsi:type":"dcterms:W3CDTF"},u.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},C.exports=u},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{render(f,h){f.leafNode("Relationship",h)}parseOpen(f){switch(f.name){case"Relationship":return this.model=f.attributes,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(a,C,S){const v=a("../../../utils/xml-stream"),f=a("../base-xform"),h=a("./relationship-xform");class d extends f{constructor(){super(),this.map={Relationship:new h}}render(u,c){c=c||this._values,u.openXml(v.StdDocAttributes),u.openNode("Relationships",d.RELATIONSHIPS_ATTRIBUTES),c.forEach(p=>{this.map.Relationship.render(u,p)}),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[u.name],this.parser)return this.parser.parseOpen(u),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(u))}}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(u){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: "+u)}}}d.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},C.exports=d},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case this.tag:this.reset(),this.model={range:{editAs:f.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[f.name],this.parser&&this.parser.parseOpen(f)}return!0}parseText(f){this.parser&&this.parser.parseText(f)}reconcilePicture(f,h){if(f&&f.rId){const d=h.rels[f.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(d){const l=d[1],u=h.mediaIndex[l];return h.media[u]}}}}},{"../base-xform":32}],57:[function(a,C,S){const v=a("../base-xform"),f=a("./blip-xform");C.exports=class extends v{constructor(){super(),this.map={"a:blip":new f}}get tag(){return"xdr:blipFill"}render(h,d){h.openNode(this.tag),this.map["a:blip"].render(h,d),h.openNode("a:stretch"),h.leafNode("a:fillRect"),h.closeNode(),h.closeNode()}parseOpen(h){if(this.parser)return this.parser.parseOpen(h),!0;switch(h.name){case this.tag:this.reset();break;default:this.parser=this.map[h.name],this.parser&&this.parser.parseOpen(h)}return!0}parseText(){}parseClose(h){if(this.parser)return this.parser.parseClose(h)||(this.parser=void 0),!0;switch(h){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}}},{"../base-xform":32,"./blip-xform":58}],58:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"a:blip"}render(f,h){f.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":h.rId,cstate:"print"})}parseOpen(f){switch(f.name){case this.tag:return this.model={rId:f.attributes["r:embed"]},!0;default:return!0}}parseText(){}parseClose(f){switch(f){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],59:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"xdr:cNvPicPr"}render(f){f.openNode(this.tag),f.leafNode("a:picLocks",{noChangeAspect:"1"}),f.closeNode()}parseOpen(f){switch(f.name){case this.tag:default:return!0}}parseText(){}parseClose(f){switch(f){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],60:[function(a,C,S){const v=a("../base-xform"),f=a("./hlink-click-xform"),h=a("./ext-lst-xform");C.exports=class extends v{constructor(){super(),this.map={"a:hlinkClick":new f,"a:extLst":new h}}get tag(){return"xdr:cNvPr"}render(d,l){d.openNode(this.tag,{id:l.index,name:"Picture "+l.index}),this.map["a:hlinkClick"].render(d,l),this.map["a:extLst"].render(d,l),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case this.tag:this.reset();break;default:this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d)}return!0}parseText(){}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.parser=void 0),!0;switch(d){case this.tag:return this.model=this.map["a:hlinkClick"].model,!1;default:return!0}}}},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(a,C,S){const v=a("../base-xform"),f=a("../simple/integer-xform");C.exports=class extends v{constructor(h){super(),this.tag=h.tag,this.map={"xdr:col":new f({tag:"xdr:col",zero:!0}),"xdr:colOff":new f({tag:"xdr:colOff",zero:!0}),"xdr:row":new f({tag:"xdr:row",zero:!0}),"xdr:rowOff":new f({tag:"xdr:rowOff",zero:!0})}}render(h,d){h.openNode(this.tag),this.map["xdr:col"].render(h,d.nativeCol),this.map["xdr:colOff"].render(h,d.nativeColOff),this.map["xdr:row"].render(h,d.nativeRow),this.map["xdr:rowOff"].render(h,d.nativeRowOff),h.closeNode()}parseOpen(h){if(this.parser)return this.parser.parseOpen(h),!0;switch(h.name){case this.tag:this.reset();break;default:this.parser=this.map[h.name],this.parser&&this.parser.parseOpen(h)}return!0}parseText(h){this.parser&&this.parser.parseText(h)}parseClose(h){if(this.parser)return this.parser.parseClose(h)||(this.parser=void 0),!0;switch(h){case this.tag:return this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1;default:return!0}}}},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(a,C,S){const v=a("../../../utils/col-cache"),f=a("../../../utils/xml-stream"),h=a("../base-xform"),d=a("./two-cell-anchor-xform"),l=a("./one-cell-anchor-xform");class u extends h{constructor(){super(),this.map={"xdr:twoCellAnchor":new d,"xdr:oneCellAnchor":new l}}prepare(p){p.anchors.forEach((A,g)=>{A.anchorType=function(_){return(typeof _.range=="string"?v.decode(_.range):_.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"}(A),this.map[A.anchorType].prepare(A,{index:g})})}get tag(){return"xdr:wsDr"}render(p,A){p.openXml(f.StdDocAttributes),p.openNode(this.tag,u.DRAWING_ATTRIBUTES),A.anchors.forEach(g=>{this.map[g.anchorType].render(p,g)}),p.closeNode()}parseOpen(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[p.name],this.parser&&this.parser.parseOpen(p)}return!0}parseText(p){this.parser&&this.parser.parseText(p)}parseClose(p){if(this.parser)return this.parser.parseClose(p)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(p){case this.tag:return!1;default:return!0}}reconcile(p,A){p.anchors.forEach(g=>{g.br?this.map["xdr:twoCellAnchor"].reconcile(g,A):this.map["xdr:oneCellAnchor"].reconcile(g,A)})}}u.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},C.exports=u},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"a:extLst"}render(f){f.openNode(this.tag),f.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),f.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),f.closeNode(),f.closeNode()}parseOpen(f){switch(f.name){case this.tag:default:return!0}}parseText(){}parseClose(f){switch(f){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],64:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{constructor(f){super(),this.tag=f.tag,this.map={}}render(f,h){f.openNode(this.tag);const d=Math.floor(9525*h.width),l=Math.floor(9525*h.height);f.addAttribute("cx",d),f.addAttribute("cy",l),f.closeNode()}parseOpen(f){return f.name===this.tag&&(this.model={width:parseInt(f.attributes.cx||"0",10)/9525,height:parseInt(f.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"a:hlinkClick"}render(f,h){h.hyperlinks&&h.hyperlinks.rId&&f.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":h.hyperlinks.rId,tooltip:h.hyperlinks.tooltip})}parseOpen(f){switch(f.name){case this.tag:return this.model={hyperlinks:{rId:f.attributes["r:id"],tooltip:f.attributes.tooltip}},!0;default:return!0}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(a,C,S){const v=a("../base-xform"),f=a("./c-nv-pr-xform"),h=a("./c-nv-pic-pr-xform");C.exports=class extends v{constructor(){super(),this.map={"xdr:cNvPr":new f,"xdr:cNvPicPr":new h}}get tag(){return"xdr:nvPicPr"}render(d,l){d.openNode(this.tag),this.map["xdr:cNvPr"].render(d,l),this.map["xdr:cNvPicPr"].render(d,l),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case this.tag:this.reset();break;default:this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d)}return!0}parseText(){}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.parser=void 0),!0;switch(d){case this.tag:return this.model=this.map["xdr:cNvPr"].model,!1;default:return!0}}}},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(a,C,S){const v=a("./base-cell-anchor-xform"),f=a("../static-xform"),h=a("./cell-position-xform"),d=a("./ext-xform"),l=a("./pic-xform");C.exports=class extends v{constructor(){super(),this.map={"xdr:from":new h({tag:"xdr:from"}),"xdr:ext":new d({tag:"xdr:ext"}),"xdr:pic":new l,"xdr:clientData":new f({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(u,c){this.map["xdr:pic"].prepare(u.picture,c)}render(u,c){u.openNode(this.tag,{editAs:c.range.editAs||"oneCell"}),this.map["xdr:from"].render(u,c.range.tl),this.map["xdr:ext"].render(u,c.range.ext),this.map["xdr:pic"].render(u,c.picture),this.map["xdr:clientData"].render(u,{}),u.closeNode()}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(u,c){u.medium=this.reconcilePicture(u.picture,c)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(a,C,S){const v=a("../base-xform"),f=a("../static-xform"),h=a("./blip-fill-xform"),d=a("./nv-pic-pr-xform"),l=a("./sp-pr");C.exports=class extends v{constructor(){super(),this.map={"xdr:nvPicPr":new d,"xdr:blipFill":new h,"xdr:spPr":new f(l)}}get tag(){return"xdr:pic"}prepare(u,c){u.index=c.index+1}render(u,c){u.openNode(this.tag),this.map["xdr:nvPicPr"].render(u,c),this.map["xdr:blipFill"].render(u,c),this.map["xdr:spPr"].render(u,c),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset();break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(){}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(u){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(a,C,S){C.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],70:[function(a,C,S){const v=a("./base-cell-anchor-xform"),f=a("../static-xform"),h=a("./cell-position-xform"),d=a("./pic-xform");C.exports=class extends v{constructor(){super(),this.map={"xdr:from":new h({tag:"xdr:from"}),"xdr:to":new h({tag:"xdr:to"}),"xdr:pic":new d,"xdr:clientData":new f({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(l,u){this.map["xdr:pic"].prepare(l.picture,u)}render(l,u){l.openNode(this.tag,{editAs:u.range.editAs||"oneCell"}),this.map["xdr:from"].render(l,u.range.tl),this.map["xdr:to"].render(l,u.range.br),this.map["xdr:pic"].render(l,u.picture),this.map["xdr:clientData"].render(l,{}),l.closeNode()}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;switch(l){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(l,u){l.medium=this.reconcilePicture(l.picture,u)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(a,C,S){const v=a("./base-xform");C.exports=class extends v{constructor(f){super(),this.tag=f.tag,this.always=!!f.always,this.count=f.count,this.empty=f.empty,this.$count=f.$count||"count",this.$=f.$,this.childXform=f.childXform,this.maxItems=f.maxItems}prepare(f,h){const{childXform:d}=this;f&&f.forEach((l,u)=>{h.index=u,d.prepare(l,h)})}render(f,h){if(this.always||h&&h.length){f.openNode(this.tag,this.$),this.count&&f.addAttribute(this.$count,h&&h.length||0);const{childXform:d}=this;(h||[]).forEach((l,u)=>{d.render(f,l,u)}),f.closeNode()}else this.empty&&f.leafNode(this.tag)}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(f)&&(this.parser=this.childXform,!0)}}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){if(this.parser){if(!this.parser.parseClose(f)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(f,h){if(f){const{childXform:d}=this;f.forEach(l=>{d.reconcile(l,h)})}}}},{"./base-xform":32}],72:[function(a,C,S){const v=a("../../../utils/col-cache"),f=a("../base-xform");C.exports=class extends f{get tag(){return"autoFilter"}render(h,d){if(d)if(typeof d=="string")h.leafNode("autoFilter",{ref:d});else{const l=function(p){return typeof p=="string"?p:v.getAddress(p.row,p.column).address},u=l(d.from),c=l(d.to);u&&c&&h.leafNode("autoFilter",{ref:`${u}:${c}`})}}parseOpen(h){h.name==="autoFilter"&&(this.model=h.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(a,C,S){const v=a("../../../utils/utils"),f=a("../base-xform"),h=a("../../../doc/range"),d=a("../../../doc/enums"),l=a("../strings/rich-text-xform");function u(c){if(c==null)return d.ValueType.Null;if(c instanceof String||typeof c=="string")return d.ValueType.String;if(typeof c=="number")return d.ValueType.Number;if(typeof c=="boolean")return d.ValueType.Boolean;if(c instanceof Date)return d.ValueType.Date;if(c.text&&c.hyperlink)return d.ValueType.Hyperlink;if(c.formula)return d.ValueType.Formula;if(c.error)return d.ValueType.Error;throw new Error("I could not understand type of value")}C.exports=class extends f{constructor(){super(),this.richTextXForm=new l}get tag(){return"c"}prepare(c,p){const A=p.styles.addStyleModel(c.style||{},function(g){switch(g.type){case d.ValueType.Formula:return u(g.result);default:return g.type}}(c));switch(A&&(c.styleId=A),c.comment&&p.comments.push({...c.comment,ref:c.address}),c.type){case d.ValueType.String:case d.ValueType.RichText:p.sharedStrings&&(c.ssId=p.sharedStrings.add(c.value));break;case d.ValueType.Date:p.date1904&&(c.date1904=!0);break;case d.ValueType.Hyperlink:p.sharedStrings&&c.text!==void 0&&c.text!==null&&(c.ssId=p.sharedStrings.add(c.text)),p.hyperlinks.push({address:c.address,target:c.hyperlink,tooltip:c.tooltip});break;case d.ValueType.Merge:p.merges.add(c);break;case d.ValueType.Formula:if(p.date1904&&(c.date1904=!0),c.shareType==="shared"&&(c.si=p.siFormulae++),c.formula)p.formulae[c.address]=c;else if(c.sharedFormula){const g=p.formulae[c.sharedFormula];if(!g)throw new Error("Shared Formula master must exist above and or left of clone for cell "+c.address);g.si===void 0?(g.shareType="shared",g.si=p.siFormulae++,g.range=new h(g.address,c.address)):g.range&&g.range.expandToAddress(c.address),c.si=g.si}}}renderFormula(c,p){let A=null;switch(p.shareType){case"shared":A={t:"shared",ref:p.ref||p.range.range,si:p.si};break;case"array":A={t:"array",ref:p.ref};break;default:p.si!==void 0&&(A={t:"shared",si:p.si})}switch(u(p.result)){case d.ValueType.Null:c.leafNode("f",A,p.formula);break;case d.ValueType.String:c.addAttribute("t","str"),c.leafNode("f",A,p.formula),c.leafNode("v",null,p.result);break;case d.ValueType.Number:c.leafNode("f",A,p.formula),c.leafNode("v",null,p.result);break;case d.ValueType.Boolean:c.addAttribute("t","b"),c.leafNode("f",A,p.formula),c.leafNode("v",null,p.result?1:0);break;case d.ValueType.Error:c.addAttribute("t","e"),c.leafNode("f",A,p.formula),c.leafNode("v",null,p.result.error);break;case d.ValueType.Date:c.leafNode("f",A,p.formula),c.leafNode("v",null,v.dateToExcel(p.result,p.date1904));break;default:throw new Error("I could not understand type of value")}}render(c,p){if(p.type!==d.ValueType.Null||p.styleId){switch(c.openNode("c"),c.addAttribute("r",p.address),p.styleId&&c.addAttribute("s",p.styleId),p.type){case d.ValueType.Null:break;case d.ValueType.Number:c.leafNode("v",null,p.value);break;case d.ValueType.Boolean:c.addAttribute("t","b"),c.leafNode("v",null,p.value?"1":"0");break;case d.ValueType.Error:c.addAttribute("t","e"),c.leafNode("v",null,p.value.error);break;case d.ValueType.String:case d.ValueType.RichText:p.ssId!==void 0?(c.addAttribute("t","s"),c.leafNode("v",null,p.ssId)):p.value&&p.value.richText?(c.addAttribute("t","inlineStr"),c.openNode("is"),p.value.richText.forEach(A=>{this.richTextXForm.render(c,A)}),c.closeNode("is")):(c.addAttribute("t","str"),c.leafNode("v",null,p.value));break;case d.ValueType.Date:c.leafNode("v",null,v.dateToExcel(p.value,p.date1904));break;case d.ValueType.Hyperlink:p.ssId!==void 0?(c.addAttribute("t","s"),c.leafNode("v",null,p.ssId)):(c.addAttribute("t","str"),c.leafNode("v",null,p.text));break;case d.ValueType.Formula:this.renderFormula(c,p);break;case d.ValueType.Merge:}c.closeNode()}}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case"c":return this.model={address:c.attributes.r},this.t=c.attributes.t,c.attributes.s&&(this.model.styleId=parseInt(c.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=c.attributes.si,this.model.shareType=c.attributes.t,this.model.ref=c.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(c),!0;default:return!1}}parseText(c){if(this.parser)this.parser.parseText(c);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+c:c;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+c:c:this.model.value=this.model.value?this.model.value+c:c}}parseClose(c){switch(c){case"c":{const{model:p}=this;if(p.formula||p.shareType)p.type=d.ValueType.Formula,p.value&&(this.t==="str"?p.result=v.xmlDecode(p.value):this.t==="b"?p.result=parseInt(p.value,10)!==0:this.t==="e"?p.result={error:p.value}:p.result=parseFloat(p.value),p.value=void 0);else if(p.value!==void 0)switch(this.t){case"s":p.type=d.ValueType.String,p.value=parseInt(p.value,10);break;case"str":p.type=d.ValueType.String,p.value=v.xmlDecode(p.value);break;case"inlineStr":p.type=d.ValueType.String;break;case"b":p.type=d.ValueType.Boolean,p.value=parseInt(p.value,10)!==0;break;case"e":p.type=d.ValueType.Error,p.value={error:p.value};break;default:p.type=d.ValueType.Number,p.value=parseFloat(p.value)}else p.styleId?p.type=d.ValueType.Null:p.type=d.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(c),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(c),!0)}}reconcile(c,p){const A=c.styleId&&p.styles&&p.styles.getStyleModel(c.styleId);switch(A&&(c.style=A),c.styleId!==void 0&&(c.styleId=void 0),c.type){case d.ValueType.String:typeof c.value=="number"&&p.sharedStrings&&(c.value=p.sharedStrings.getString(c.value)),c.value.richText&&(c.type=d.ValueType.RichText);break;case d.ValueType.Number:A&&v.isDateFmt(A.numFmt)&&(c.type=d.ValueType.Date,c.value=v.excelToDate(c.value,p.date1904));break;case d.ValueType.Formula:c.result!==void 0&&A&&v.isDateFmt(A.numFmt)&&(c.result=v.excelToDate(c.result,p.date1904)),c.shareType==="shared"&&(c.ref?p.formulae[c.si]=c.address:(c.sharedFormula=p.formulae[c.si],delete c.shareType),delete c.si)}const g=p.hyperlinkMap[c.address];g&&(c.type===d.ValueType.Formula?(c.text=c.result,c.result=void 0):(c.text=c.value,c.value=void 0),c.type=d.ValueType.Hyperlink,c.hyperlink=g);const _=p.commentsMap&&p.commentsMap[c.address];_&&(c.comment=_)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(a,C,S){const v=a("../../base-xform");C.exports=class extends v{get tag(){return"x14:cfIcon"}render(f,h){f.leafNode(this.tag,{iconSet:h.iconSet,iconId:h.iconId})}parseOpen(f){let{attributes:h}=f;this.model={iconSet:h.iconSet,iconId:v.toIntValue(h.iconId)}}parseClose(f){return f!==this.tag}}},{"../../base-xform":32}],75:[function(a,C,S){const{v4:v}=a("uuid"),f=a("../../base-xform"),h=a("../../composite-xform"),d=a("./databar-ext-xform"),l=a("./icon-set-ext-xform"),u={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class c extends h{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new d,"x14:iconSet":this.iconSetXform=new l}}get tag(){return"x14:cfRule"}static isExt(A){return A.type==="dataBar"?d.isExt(A):!(A.type!=="iconSet"||!A.custom&&!u[A.iconSet])}prepare(A){c.isExt(A)&&(A.x14Id=`{${v()}}`.toUpperCase())}render(A,g){if(c.isExt(g))switch(g.type){case"dataBar":this.renderDataBar(A,g);break;case"iconSet":this.renderIconSet(A,g)}}renderDataBar(A,g){A.openNode(this.tag,{type:"dataBar",id:g.x14Id}),this.databarXform.render(A,g),A.closeNode()}renderIconSet(A,g){A.openNode(this.tag,{type:"iconSet",priority:g.priority,id:g.x14Id||`{${v()}}`}),this.iconSetXform.render(A,g),A.closeNode()}createNewModel(A){let{attributes:g}=A;return{type:g.type,x14Id:g.id,priority:f.toIntValue(g.priority)}}onParserClose(A,g){Object.assign(this.model,g.model)}}C.exports=c},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(a,C,S){const v=a("../../composite-xform"),f=a("./f-ext-xform");C.exports=class extends v{constructor(){super(),this.map={"xm:f":this.fExtXform=new f}}get tag(){return"x14:cfvo"}render(h,d){h.openNode(this.tag,{type:d.type}),d.value!==void 0&&this.fExtXform.render(h,d.value),h.closeNode()}createNewModel(h){return{type:h.attributes.type}}onParserClose(h,d){switch(h){case"xm:f":this.model.value=d.model?parseFloat(d.model):0}}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(a,C,S){const v=a("../../composite-xform"),f=a("./sqref-ext-xform"),h=a("./cf-rule-ext-xform");C.exports=class extends v{constructor(){super(),this.map={"xm:sqref":this.sqRef=new f,"x14:cfRule":this.cfRule=new h}}get tag(){return"x14:conditionalFormatting"}prepare(d,l){d.rules.forEach(u=>{this.cfRule.prepare(u,l)})}render(d,l){l.rules.some(h.isExt)&&(d.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),l.rules.filter(h.isExt).forEach(u=>this.cfRule.render(d,u)),this.sqRef.render(d,l.ref),d.closeNode())}createNewModel(){return{rules:[]}}onParserClose(d,l){switch(d){case"xm:sqref":this.model.ref=l.model;break;case"x14:cfRule":this.model.rules.push(l.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(a,C,S){const v=a("../../composite-xform"),f=a("./cf-rule-ext-xform"),h=a("./conditional-formatting-ext-xform");C.exports=class extends v{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new h}}get tag(){return"x14:conditionalFormattings"}hasContent(d){return d.hasExtContent===void 0&&(d.hasExtContent=d.some(l=>l.rules.some(f.isExt))),d.hasExtContent}prepare(d,l){d.forEach(u=>{this.cfXform.prepare(u,l)})}render(d,l){this.hasContent(l)&&(d.openNode(this.tag),l.forEach(u=>this.cfXform.render(d,u)),d.closeNode())}createNewModel(){return[]}onParserClose(d,l){this.model.push(l.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(a,C,S){const v=a("../../base-xform"),f=a("../../composite-xform"),h=a("../../style/color-xform"),d=a("./cfvo-ext-xform");C.exports=class extends f{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new d,"x14:borderColor":this.borderColorXform=new h("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new h("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new h("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new h("x14:axisColor")}}static isExt(l){return!l.gradient}get tag(){return"x14:dataBar"}render(l,u){l.openNode(this.tag,{minLength:v.toIntAttribute(u.minLength,0,!0),maxLength:v.toIntAttribute(u.maxLength,100,!0),border:v.toBoolAttribute(u.border,!1),gradient:v.toBoolAttribute(u.gradient,!0),negativeBarColorSameAsPositive:v.toBoolAttribute(u.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:v.toBoolAttribute(u.negativeBarBorderColorSameAsPositive,!0),axisPosition:v.toAttribute(u.axisPosition,"auto"),direction:v.toAttribute(u.direction,"leftToRight")}),u.cfvo.forEach(c=>{this.cfvoXform.render(l,c)}),this.borderColorXform.render(l,u.borderColor),this.negativeBorderColorXform.render(l,u.negativeBorderColor),this.negativeFillColorXform.render(l,u.negativeFillColor),this.axisColorXform.render(l,u.axisColor),l.closeNode()}createNewModel(l){let{attributes:u}=l;return{cfvo:[],minLength:v.toIntValue(u.minLength,0),maxLength:v.toIntValue(u.maxLength,100),border:v.toBoolValue(u.border,!1),gradient:v.toBoolValue(u.gradient,!0),negativeBarColorSameAsPositive:v.toBoolValue(u.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:v.toBoolValue(u.negativeBarBorderColorSameAsPositive,!0),axisPosition:v.toStringValue(u.axisPosition,"auto"),direction:v.toStringValue(u.direction,"leftToRight")}}onParserClose(l,u){const[,c]=l.split(":");switch(c){case"cfvo":this.model.cfvo.push(u.model);break;default:this.model[c]=u.model}}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(a,C,S){const v=a("../../base-xform");C.exports=class extends v{get tag(){return"xm:f"}render(f,h){f.leafNode(this.tag,null,h)}parseOpen(){this.model=""}parseText(f){this.model+=f}parseClose(f){return f!==this.tag}}},{"../../base-xform":32}],81:[function(a,C,S){const v=a("../../base-xform"),f=a("../../composite-xform"),h=a("./cfvo-ext-xform"),d=a("./cf-icon-ext-xform");C.exports=class extends f{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new h,"x14:cfIcon":this.cfIconXform=new d}}get tag(){return"x14:iconSet"}render(l,u){l.openNode(this.tag,{iconSet:v.toStringAttribute(u.iconSet),reverse:v.toBoolAttribute(u.reverse,!1),showValue:v.toBoolAttribute(u.showValue,!0),custom:v.toBoolAttribute(u.icons,!1)}),u.cfvo.forEach(c=>{this.cfvoXform.render(l,c)}),u.icons&&u.icons.forEach((c,p)=>{c.iconId=p,this.cfIconXform.render(l,c)}),l.closeNode()}createNewModel(l){let{attributes:u}=l;return{cfvo:[],iconSet:v.toStringValue(u.iconSet,"3TrafficLights"),reverse:v.toBoolValue(u.reverse,!1),showValue:v.toBoolValue(u.showValue,!0)}}onParserClose(l,u){const[,c]=l.split(":");switch(c){case"cfvo":this.model.cfvo.push(u.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(u.model);break;default:this.model[c]=u.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(a,C,S){const v=a("../../base-xform");C.exports=class extends v{get tag(){return"xm:sqref"}render(f,h){f.leafNode(this.tag,null,h)}parseOpen(){this.model=""}parseText(f){this.model+=f}parseClose(f){return f!==this.tag}}},{"../../base-xform":32}],83:[function(a,C,S){const v=a("../../base-xform"),f=a("../../composite-xform"),h=a("../../../../doc/range"),d=a("./databar-xform"),l=a("./ext-lst-ref-xform"),u=a("./formula-xform"),c=a("./color-scale-xform"),p=a("./icon-set-xform"),A={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},g=b=>{const{type:w,operator:B}=b;switch(w){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:w};default:return{type:w,operator:B}}};class _ extends f{constructor(){super(),this.map={dataBar:this.databarXform=new d,extLst:this.extLstRefXform=new l,formula:this.formulaXform=new u,colorScale:this.colorScaleXform=new c,iconSet:this.iconSetXform=new p}}get tag(){return"cfRule"}static isPrimitive(w){return w.type!=="iconSet"||!w.custom&&!A[w.iconSet]}render(w,B){switch(B.type){case"expression":this.renderExpression(w,B);break;case"cellIs":this.renderCellIs(w,B);break;case"top10":this.renderTop10(w,B);break;case"aboveAverage":this.renderAboveAverage(w,B);break;case"dataBar":this.renderDataBar(w,B);break;case"colorScale":this.renderColorScale(w,B);break;case"iconSet":this.renderIconSet(w,B);break;case"containsText":this.renderText(w,B);break;case"timePeriod":this.renderTimePeriod(w,B)}}renderExpression(w,B){w.openNode(this.tag,{type:"expression",dxfId:B.dxfId,priority:B.priority}),this.formulaXform.render(w,B.formulae[0]),w.closeNode()}renderCellIs(w,B){w.openNode(this.tag,{type:"cellIs",dxfId:B.dxfId,priority:B.priority,operator:B.operator}),B.formulae.forEach(k=>{this.formulaXform.render(w,k)}),w.closeNode()}renderTop10(w,B){w.leafNode(this.tag,{type:"top10",dxfId:B.dxfId,priority:B.priority,percent:v.toBoolAttribute(B.percent,!1),bottom:v.toBoolAttribute(B.bottom,!1),rank:v.toIntValue(B.rank,10,!0)})}renderAboveAverage(w,B){w.leafNode(this.tag,{type:"aboveAverage",dxfId:B.dxfId,priority:B.priority,aboveAverage:v.toBoolAttribute(B.aboveAverage,!0)})}renderDataBar(w,B){w.openNode(this.tag,{type:"dataBar",priority:B.priority}),this.databarXform.render(w,B),this.extLstRefXform.render(w,B),w.closeNode()}renderColorScale(w,B){w.openNode(this.tag,{type:"colorScale",priority:B.priority}),this.colorScaleXform.render(w,B),w.closeNode()}renderIconSet(w,B){_.isPrimitive(B)&&(w.openNode(this.tag,{type:"iconSet",priority:B.priority}),this.iconSetXform.render(w,B),w.closeNode())}renderText(w,B){w.openNode(this.tag,{type:B.operator,dxfId:B.dxfId,priority:B.priority,operator:v.toStringAttribute(B.operator,"containsText")});const k=(T=>{if(T.formulae&&T.formulae[0])return T.formulae[0];const L=new h(T.ref),{tl:V}=L;switch(T.operator){case"containsText":return`NOT(ISERROR(SEARCH("${T.text}",${V})))`;case"containsBlanks":return`LEN(TRIM(${V}))=0`;case"notContainsBlanks":return`LEN(TRIM(${V}))>0`;case"containsErrors":return`ISERROR(${V})`;case"notContainsErrors":return`NOT(ISERROR(${V}))`;default:return}})(B);k&&this.formulaXform.render(w,k),w.closeNode()}renderTimePeriod(w,B){w.openNode(this.tag,{type:"timePeriod",dxfId:B.dxfId,priority:B.priority,timePeriod:B.timePeriod});const k=(T=>{if(T.formulae&&T.formulae[0])return T.formulae[0];const L=new h(T.ref),{tl:V}=L;switch(T.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${V},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${V},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${V},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${V},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${V},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${V},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${V},1)=TODAY()-1`;case"today":return`FLOOR(${V},1)=TODAY()`;case"tomorrow":return`FLOOR(${V},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${V},1)<=6,FLOOR(${V},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${V})=MONTH(EDATE(TODAY(),0-1)),YEAR(${V})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${V})=MONTH(TODAY()),YEAR(${V})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${V})=MONTH(EDATE(TODAY(),0+1)),YEAR(${V})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(B);k&&this.formulaXform.render(w,k),w.closeNode()}createNewModel(w){let{attributes:B}=w;return{...g(B),dxfId:v.toIntValue(B.dxfId),priority:v.toIntValue(B.priority),timePeriod:B.timePeriod,percent:v.toBoolValue(B.percent),bottom:v.toBoolValue(B.bottom),rank:v.toIntValue(B.rank),aboveAverage:v.toBoolValue(B.aboveAverage)}}onParserClose(w,B){switch(w){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,B.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(B.model)}}}C.exports=_},{"../../../../doc/range":10,"../../base-xform":32,"../../composite-xform":48,"./color-scale-xform":85,"./databar-xform":88,"./ext-lst-ref-xform":89,"./formula-xform":90,"./icon-set-xform":91}],84:[function(a,C,S){const v=a("../../base-xform");C.exports=class extends v{get tag(){return"cfvo"}render(f,h){f.leafNode(this.tag,{type:h.type,val:h.value})}parseOpen(f){this.model={type:f.attributes.type,value:v.toFloatValue(f.attributes.val)}}parseClose(f){return f!==this.tag}}},{"../../base-xform":32}],85:[function(a,C,S){const v=a("../../composite-xform"),f=a("../../style/color-xform"),h=a("./cfvo-xform");C.exports=class extends v{constructor(){super(),this.map={cfvo:this.cfvoXform=new h,color:this.colorXform=new f}}get tag(){return"colorScale"}render(d,l){d.openNode(this.tag),l.cfvo.forEach(u=>{this.cfvoXform.render(d,u)}),l.color.forEach(u=>{this.colorXform.render(d,u)}),d.closeNode()}createNewModel(d){return{cfvo:[],color:[]}}onParserClose(d,l){this.model[d].push(l.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(a,C,S){const v=a("../../composite-xform"),f=a("./cf-rule-xform");C.exports=class extends v{constructor(){super(),this.map={cfRule:new f}}get tag(){return"conditionalFormatting"}render(h,d){d.rules.some(f.isPrimitive)&&(h.openNode(this.tag,{sqref:d.ref}),d.rules.forEach(l=>{f.isPrimitive(l)&&(l.ref=d.ref,this.map.cfRule.render(h,l))}),h.closeNode())}createNewModel(h){let{attributes:d}=h;return{ref:d.sqref,rules:[]}}onParserClose(h,d){this.model.rules.push(d.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(a,C,S){const v=a("../../base-xform"),f=a("./conditional-formatting-xform");C.exports=class extends v{constructor(){super(),this.cfXform=new f}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(h,d){let l=h.reduce((u,c)=>Math.max(u,...c.rules.map(p=>p.priority||0)),1);h.forEach(u=>{u.rules.forEach(c=>{c.priority||(c.priority=l++),c.style&&(c.dxfId=d.styles.addDxfStyle(c.style))})})}render(h,d){d.forEach(l=>{this.cfXform.render(h,l)})}parseOpen(h){if(this.parser)return this.parser.parseOpen(h),!0;switch(h.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(h),!0;default:return!1}}parseText(h){this.parser&&this.parser.parseText(h)}parseClose(h){return!!this.parser&&(!!this.parser.parseClose(h)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(h,d){h.forEach(l=>{l.rules.forEach(u=>{u.dxfId!==void 0&&(u.style=d.styles.getDxfStyle(u.dxfId),delete u.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(a,C,S){const v=a("../../composite-xform"),f=a("../../style/color-xform"),h=a("./cfvo-xform");C.exports=class extends v{constructor(){super(),this.map={cfvo:this.cfvoXform=new h,color:this.colorXform=new f}}get tag(){return"dataBar"}render(d,l){d.openNode(this.tag),l.cfvo.forEach(u=>{this.cfvoXform.render(d,u)}),this.colorXform.render(d,l.color),d.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(d,l){switch(d){case"cfvo":this.model.cfvo.push(l.model);break;case"color":this.model.color=l.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(a,C,S){const v=a("../../base-xform"),f=a("../../composite-xform");class h extends v{get tag(){return"x14:id"}render(u,c){u.leafNode(this.tag,null,c)}parseOpen(){this.model=""}parseText(u){this.model+=u}parseClose(u){return u!==this.tag}}class d extends f{constructor(){super(),this.map={"x14:id":this.idXform=new h}}get tag(){return"ext"}render(u,c){u.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(u,c.x14Id),u.closeNode()}createNewModel(){return{}}onParserClose(u,c){this.model.x14Id=c.model}}C.exports=class extends f{constructor(){super(),this.map={ext:new d}}get tag(){return"extLst"}render(l,u){l.openNode(this.tag),this.map.ext.render(l,u),l.closeNode()}createNewModel(){return{}}onParserClose(l,u){Object.assign(this.model,u.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(a,C,S){const v=a("../../base-xform");C.exports=class extends v{get tag(){return"formula"}render(f,h){f.leafNode(this.tag,null,h)}parseOpen(){this.model=""}parseText(f){this.model+=f}parseClose(f){return f!==this.tag}}},{"../../base-xform":32}],91:[function(a,C,S){const v=a("../../base-xform"),f=a("../../composite-xform"),h=a("./cfvo-xform");C.exports=class extends f{constructor(){super(),this.map={cfvo:this.cfvoXform=new h}}get tag(){return"iconSet"}render(d,l){d.openNode(this.tag,{iconSet:v.toStringAttribute(l.iconSet,"3TrafficLights"),reverse:v.toBoolAttribute(l.reverse,!1),showValue:v.toBoolAttribute(l.showValue,!0)}),l.cfvo.forEach(u=>{this.cfvoXform.render(d,u)}),d.closeNode()}createNewModel(d){let{attributes:l}=d;return{iconSet:v.toStringValue(l.iconSet,"3TrafficLights"),reverse:v.toBoolValue(l.reverse),showValue:v.toBoolValue(l.showValue),cfvo:[]}}onParserClose(d,l){this.model[d].push(l.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(a,C,S){const v=a("../../../utils/utils"),f=a("../base-xform");C.exports=class extends f{get tag(){return"col"}prepare(h,d){const l=d.styles.addStyleModel(h.style||{});l&&(h.styleId=l)}render(h,d){h.openNode("col"),h.addAttribute("min",d.min),h.addAttribute("max",d.max),d.width&&h.addAttribute("width",d.width),d.styleId&&h.addAttribute("style",d.styleId),d.hidden&&h.addAttribute("hidden","1"),d.bestFit&&h.addAttribute("bestFit","1"),d.outlineLevel&&h.addAttribute("outlineLevel",d.outlineLevel),d.collapsed&&h.addAttribute("collapsed","1"),h.addAttribute("customWidth","1"),h.closeNode()}parseOpen(h){if(h.name==="col"){const d=this.model={min:parseInt(h.attributes.min||"0",10),max:parseInt(h.attributes.max||"0",10),width:h.attributes.width===void 0?void 0:parseFloat(h.attributes.width||"0")};return h.attributes.style&&(d.styleId=parseInt(h.attributes.style,10)),v.parseBoolean(h.attributes.hidden)&&(d.hidden=!0),v.parseBoolean(h.attributes.bestFit)&&(d.bestFit=!0),h.attributes.outlineLevel&&(d.outlineLevel=parseInt(h.attributes.outlineLevel,10)),v.parseBoolean(h.attributes.collapsed)&&(d.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(h,d){h.styleId&&(h.style=d.styles.getStyleModel(h.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(a,C,S){const v=a("../../../utils/under-dash"),f=a("../../../utils/utils"),h=a("../../../utils/col-cache"),d=a("../base-xform"),l=a("../../../doc/range");function u(p,A,g,_){const b=A[g];b!==void 0?p[g]=b:_!==void 0&&(p[g]=_)}function c(p,A,g,_){const b=A[g];b!==void 0&&(p[g]=f.parseBoolean(b))}C.exports=class extends d{get tag(){return"dataValidations"}render(p,A){const g=function(_){const b=v.map(_,(k,T)=>({address:T,dataValidation:k,marked:!1})).sort((k,T)=>v.strcmp(k.address,T.address)),w=v.keyBy(b,"address"),B=(k,T,L)=>{for(let V=0;V<T;V++){const Q=h.encodeAddress(k.row+V,L);if(!_[Q]||!v.isEqual(_[k.address],_[Q]))return!1}return!0};return b.map(k=>{if(!k.marked){const T=h.decodeEx(k.address);if(T.dimensions)return w[T.dimensions].marked=!0,{...k.dataValidation,sqref:k.address};let L=1,V=h.encodeAddress(T.row+L,T.col);for(;_[V]&&v.isEqual(k.dataValidation,_[V]);)L++,V=h.encodeAddress(T.row+L,T.col);let Q=1;for(;B(T,L,T.col+Q);)Q++;for(let N=0;N<L;N++)for(let j=0;j<Q;j++)V=h.encodeAddress(T.row+N,T.col+j),w[V].marked=!0;if(L>1||Q>1){const N=T.row+(L-1),j=T.col+(Q-1);return{...k.dataValidation,sqref:`${k.address}:${h.encodeAddress(N,j)}`}}return{...k.dataValidation,sqref:k.address}}return null}).filter(Boolean)}(A);g.length&&(p.openNode("dataValidations",{count:g.length}),g.forEach(_=>{p.openNode("dataValidation"),_.type!=="any"&&(p.addAttribute("type",_.type),_.operator&&_.type!=="list"&&_.operator!=="between"&&p.addAttribute("operator",_.operator),_.allowBlank&&p.addAttribute("allowBlank","1")),_.showInputMessage&&p.addAttribute("showInputMessage","1"),_.promptTitle&&p.addAttribute("promptTitle",_.promptTitle),_.prompt&&p.addAttribute("prompt",_.prompt),_.showErrorMessage&&p.addAttribute("showErrorMessage","1"),_.errorStyle&&p.addAttribute("errorStyle",_.errorStyle),_.errorTitle&&p.addAttribute("errorTitle",_.errorTitle),_.error&&p.addAttribute("error",_.error),p.addAttribute("sqref",_.sqref),(_.formulae||[]).forEach((b,w)=>{p.openNode("formula"+(w+1)),_.type==="date"?p.writeText(f.dateToExcel(new Date(b))):p.writeText(b),p.closeNode()}),p.closeNode()}),p.closeNode())}parseOpen(p){switch(p.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=p.attributes.sqref;const A={type:p.attributes.type||"any",formulae:[]};switch(p.attributes.type&&c(A,p.attributes,"allowBlank"),c(A,p.attributes,"showInputMessage"),c(A,p.attributes,"showErrorMessage"),A.type){case"any":case"list":case"custom":break;default:u(A,p.attributes,"operator","between")}return u(A,p.attributes,"promptTitle"),u(A,p.attributes,"prompt"),u(A,p.attributes,"errorStyle"),u(A,p.attributes,"errorTitle"),u(A,p.attributes,"error"),this._dataValidation=A,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(p){this._formula&&this._formula.push(p)}parseClose(p){switch(p){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(A=>{A.includes(":")?new l(A).forEachAddress(g=>{this.model[g]=this._dataValidation}):this.model[A]=this._dataValidation}),!0;case"formula1":case"formula2":{let A=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":A=parseInt(A,10);break;case"decimal":A=parseFloat(A);break;case"date":A=f.excelToDate(parseFloat(A))}return this._dataValidation.formulae.push(A),this._formula=void 0,!0}default:return!0}}}},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"dimension"}render(f,h){h&&f.leafNode("dimension",{ref:h})}parseOpen(f){return f.name==="dimension"&&(this.model=f.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"drawing"}render(f,h){h&&f.leafNode(this.tag,{"r:id":h.rId})}parseOpen(f){switch(f.name){case this.tag:return this.model={rId:f.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(a,C,S){const v=a("../composite-xform"),f=a("./cf-ext/conditional-formattings-ext-xform");class h extends v{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new f}}get tag(){return"ext"}hasContent(l){return this.conditionalFormattings.hasContent(l.conditionalFormattings)}prepare(l,u){this.conditionalFormattings.prepare(l.conditionalFormattings,u)}render(l,u){l.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(l,u.conditionalFormattings),l.closeNode()}createNewModel(){return{}}onParserClose(l,u){this.model[l]=u.model}}C.exports=class extends v{constructor(){super(),this.map={ext:this.ext=new h}}get tag(){return"extLst"}prepare(d,l){this.ext.prepare(d,l)}hasContent(d){return this.ext.hasContent(d)}render(d,l){this.hasContent(l)&&(d.openNode("extLst"),this.ext.render(d,l),d.closeNode())}createNewModel(){return{}}onParserClose(d,l){Object.assign(this.model,l.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"headerFooter"}render(f,h){if(h){f.addRollback();let d=!1;f.openNode("headerFooter"),h.differentFirst&&(f.addAttribute("differentFirst","1"),d=!0),h.differentOddEven&&(f.addAttribute("differentOddEven","1"),d=!0),h.oddHeader&&typeof h.oddHeader=="string"&&(f.leafNode("oddHeader",null,h.oddHeader),d=!0),h.oddFooter&&typeof h.oddFooter=="string"&&(f.leafNode("oddFooter",null,h.oddFooter),d=!0),h.evenHeader&&typeof h.evenHeader=="string"&&(f.leafNode("evenHeader",null,h.evenHeader),d=!0),h.evenFooter&&typeof h.evenFooter=="string"&&(f.leafNode("evenFooter",null,h.evenFooter),d=!0),h.firstHeader&&typeof h.firstHeader=="string"&&(f.leafNode("firstHeader",null,h.firstHeader),d=!0),h.firstFooter&&typeof h.firstFooter=="string"&&(f.leafNode("firstFooter",null,h.firstFooter),d=!0),d?(f.closeNode(),f.commit()):f.rollback()}}parseOpen(f){switch(f.name){case"headerFooter":return this.model={},f.attributes.differentFirst&&(this.model.differentFirst=parseInt(f.attributes.differentFirst,0)===1),f.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(f.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}parseText(f){switch(this.currentNode){case"oddHeader":this.model.oddHeader=f;break;case"oddFooter":this.model.oddFooter=f;break;case"evenHeader":this.model.evenHeader=f;break;case"evenFooter":this.model.evenFooter=f;break;case"firstHeader":this.model.firstHeader=f;break;case"firstFooter":this.model.firstFooter=f}}parseClose(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}}},{"../base-xform":32}],98:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"hyperlink"}render(f,h){this.isInternalLink(h)?f.leafNode("hyperlink",{ref:h.address,"r:id":h.rId,tooltip:h.tooltip,location:h.target}):f.leafNode("hyperlink",{ref:h.address,"r:id":h.rId,tooltip:h.tooltip})}parseOpen(f){return f.name==="hyperlink"&&(this.model={address:f.attributes.ref,rId:f.attributes["r:id"],tooltip:f.attributes.tooltip},f.attributes.location&&(this.model.target=f.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(f){return f.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(f.target)}}},{"../base-xform":32}],99:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"mergeCell"}render(f,h){f.leafNode("mergeCell",{ref:h})}parseOpen(f){return f.name==="mergeCell"&&(this.model=f.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(a,C,S){const v=a("../../../utils/under-dash"),f=a("../../../doc/range"),h=a("../../../utils/col-cache"),d=a("../../../doc/enums");C.exports=class{constructor(){this.merges={}}add(l){if(this.merges[l.master])this.merges[l.master].expandToAddress(l.address);else{const u=`${l.master}:${l.address}`;this.merges[l.master]=new f(u)}}get mergeCells(){return v.map(this.merges,l=>l.range)}reconcile(l,u){v.each(l,c=>{const p=h.decode(c);for(let A=p.top;A<=p.bottom;A++){const g=u[A-1];for(let _=p.left;_<=p.right;_++){const b=g.cells[_-1];b?b.type===d.ValueType.Merge&&(b.master=p.tl):g.cells[_]={type:d.ValueType.Null,address:h.encodeAddress(A,_)}}}})}getMasterAddress(l){const u=this.hash[l];return u&&u.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(a,C,S){const v=a("../base-xform"),f=h=>h!==void 0;C.exports=class extends v{get tag(){return"outlinePr"}render(h,d){return!(!d||!f(d.summaryBelow)&&!f(d.summaryRight))&&(h.leafNode(this.tag,{summaryBelow:f(d.summaryBelow)?Number(d.summaryBelow):void 0,summaryRight:f(d.summaryRight)?Number(d.summaryRight):void 0}),!0)}parseOpen(h){return h.name===this.tag&&(this.model={summaryBelow:f(h.attributes.summaryBelow)?!!Number(h.attributes.summaryBelow):void 0,summaryRight:f(h.attributes.summaryRight)?!!Number(h.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"brk"}render(f,h){f.leafNode("brk",h)}parseOpen(f){return f.name==="brk"&&(this.model=f.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(a,C,S){const v=a("../../../utils/under-dash"),f=a("../base-xform");C.exports=class extends f{get tag(){return"pageMargins"}render(h,d){if(d){const l={left:d.left,right:d.right,top:d.top,bottom:d.bottom,header:d.header,footer:d.footer};v.some(l,u=>u!==void 0)&&h.leafNode(this.tag,l)}}parseOpen(h){switch(h.name){case this.tag:return this.model={left:parseFloat(h.attributes.left||.7),right:parseFloat(h.attributes.right||.7),top:parseFloat(h.attributes.top||.75),bottom:parseFloat(h.attributes.bottom||.75),header:parseFloat(h.attributes.header||.3),footer:parseFloat(h.attributes.footer||.3)},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"pageSetUpPr"}render(f,h){return!(!h||!h.fitToPage)&&(f.leafNode(this.tag,{fitToPage:h.fitToPage?"1":void 0}),!0)}parseOpen(f){return f.name===this.tag&&(this.model={fitToPage:f.attributes.fitToPage==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(a,C,S){const v=a("../../../utils/under-dash"),f=a("../base-xform");function h(c){return c?"1":void 0}function d(c){switch(c){case"overThenDown":return c;default:return}}function l(c){switch(c){case"atEnd":case"asDisplyed":return c;default:return}}function u(c){switch(c){case"dash":case"blank":case"NA":return c;default:return}}C.exports=class extends f{get tag(){return"pageSetup"}render(c,p){if(p){const A={paperSize:p.paperSize,orientation:p.orientation,horizontalDpi:p.horizontalDpi,verticalDpi:p.verticalDpi,pageOrder:d(p.pageOrder),blackAndWhite:h(p.blackAndWhite),draft:h(p.draft),cellComments:l(p.cellComments),errors:u(p.errors),scale:p.scale,fitToWidth:p.fitToWidth,fitToHeight:p.fitToHeight,firstPageNumber:p.firstPageNumber,useFirstPageNumber:h(p.firstPageNumber),usePrinterDefaults:h(p.usePrinterDefaults),copies:p.copies};v.some(A,g=>g!==void 0)&&c.leafNode(this.tag,A)}}parseOpen(c){switch(c.name){case this.tag:return this.model={paperSize:(p=c.attributes.paperSize,p!==void 0?parseInt(p,10):void 0),orientation:c.attributes.orientation||"portrait",horizontalDpi:parseInt(c.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(c.attributes.verticalDpi||"4294967295",10),pageOrder:c.attributes.pageOrder||"downThenOver",blackAndWhite:c.attributes.blackAndWhite==="1",draft:c.attributes.draft==="1",cellComments:c.attributes.cellComments||"None",errors:c.attributes.errors||"displayed",scale:parseInt(c.attributes.scale||"100",10),fitToWidth:parseInt(c.attributes.fitToWidth||"1",10),fitToHeight:parseInt(c.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(c.attributes.firstPageNumber||"1",10),useFirstPageNumber:c.attributes.useFirstPageNumber==="1",usePrinterDefaults:c.attributes.usePrinterDefaults==="1",copies:parseInt(c.attributes.copies||"1",10)},!0;default:return!1}var p}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"picture"}render(f,h){h&&f.leafNode(this.tag,{"r:id":h.rId})}parseOpen(f){switch(f.name){case this.tag:return this.model={rId:f.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(a,C,S){const v=a("../../../utils/under-dash"),f=a("../base-xform");function h(d){return d?"1":void 0}C.exports=class extends f{get tag(){return"printOptions"}render(d,l){if(l){const u={headings:h(l.showRowColHeaders),gridLines:h(l.showGridLines),horizontalCentered:h(l.horizontalCentered),verticalCentered:h(l.verticalCentered)};v.some(u,c=>c!==void 0)&&d.leafNode(this.tag,u)}}parseOpen(d){switch(d.name){case this.tag:return this.model={showRowColHeaders:d.attributes.headings==="1",showGridLines:d.attributes.gridLines==="1",horizontalCentered:d.attributes.horizontalCentered==="1",verticalCentered:d.attributes.verticalCentered==="1"},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(a,C,S){const v=a("./page-breaks-xform"),f=a("../list-xform");C.exports=class extends f{constructor(){super({tag:"rowBreaks",count:!0,childXform:new v})}render(h,d){if(d&&d.length){h.openNode(this.tag,this.$),this.count&&(h.addAttribute(this.$count,d.length),h.addAttribute("manualBreakCount",d.length));const{childXform:l}=this;d.forEach(u=>{l.render(h,u)}),h.closeNode()}else this.empty&&h.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(a,C,S){const v=a("../base-xform"),f=a("../../../utils/utils"),h=a("./cell-xform");C.exports=class extends v{constructor(d){super(),this.maxItems=d&&d.maxItems,this.map={c:new h}}get tag(){return"row"}prepare(d,l){const u=l.styles.addStyleModel(d.style);u&&(d.styleId=u);const c=this.map.c;d.cells.forEach(p=>{c.prepare(p,l)})}render(d,l,u){d.openNode("row"),d.addAttribute("r",l.number),l.height&&(d.addAttribute("ht",l.height),d.addAttribute("customHeight","1")),l.hidden&&d.addAttribute("hidden","1"),l.min>0&&l.max>0&&l.min<=l.max&&d.addAttribute("spans",`${l.min}:${l.max}`),l.styleId&&(d.addAttribute("s",l.styleId),d.addAttribute("customFormat","1")),d.addAttribute("x14ac:dyDescent","0.25"),l.outlineLevel&&d.addAttribute("outlineLevel",l.outlineLevel),l.collapsed&&d.addAttribute("collapsed","1");const c=this.map.c;l.cells.forEach(p=>{c.render(d,p,u)}),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;if(d.name==="row"){this.numRowsSeen+=1;const l=d.attributes.spans?d.attributes.spans.split(":").map(c=>parseInt(c,10)):[void 0,void 0],u=this.model={number:parseInt(d.attributes.r,10),min:l[0],max:l[1],cells:[]};return d.attributes.s&&(u.styleId=parseInt(d.attributes.s,10)),f.parseBoolean(d.attributes.hidden)&&(u.hidden=!0),f.parseBoolean(d.attributes.bestFit)&&(u.bestFit=!0),d.attributes.ht&&(u.height=parseFloat(d.attributes.ht)),d.attributes.outlineLevel&&(u.outlineLevel=parseInt(d.attributes.outlineLevel,10)),f.parseBoolean(d.attributes.collapsed)&&(u.collapsed=!0),!0}return this.parser=this.map[d.name],!!this.parser&&(this.parser.parseOpen(d),!0)}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser){if(!this.parser.parseClose(d)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(d,l){d.style=d.styleId?l.styles.getStyleModel(d.styleId):{},d.styleId!==void 0&&(d.styleId=void 0);const u=this.map.c;d.cells.forEach(c=>{u.reconcile(c,l)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(a,C,S){const v=a("../../../utils/under-dash"),f=a("../base-xform");C.exports=class extends f{get tag(){return"sheetFormatPr"}render(h,d){if(d){const l={defaultRowHeight:d.defaultRowHeight,outlineLevelRow:d.outlineLevelRow,outlineLevelCol:d.outlineLevelCol,"x14ac:dyDescent":d.dyDescent};d.defaultColWidth&&(l.defaultColWidth=d.defaultColWidth),d.defaultRowHeight&&d.defaultRowHeight===15||(l.customHeight="1"),v.some(l,u=>u!==void 0)&&h.leafNode("sheetFormatPr",l)}}parseOpen(h){return h.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(h.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(h.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(h.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(h.attributes.outlineLevelCol||"0",10)},h.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(h.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(a,C,S){const v=a("../base-xform"),f=a("../style/color-xform"),h=a("./page-setup-properties-xform"),d=a("./outline-properties-xform");C.exports=class extends v{constructor(){super(),this.map={tabColor:new f("tabColor"),pageSetUpPr:new h,outlinePr:new d}}get tag(){return"sheetPr"}render(l,u){if(u){l.addRollback(),l.openNode("sheetPr");let c=!1;c=this.map.tabColor.render(l,u.tabColor)||c,c=this.map.pageSetUpPr.render(l,u.pageSetup)||c,c=this.map.outlinePr.render(l,u.outlineProperties)||c,c?(l.closeNode(),l.commit()):l.rollback()}}parseOpen(l){return this.parser?(this.parser.parseOpen(l),!0):l.name===this.tag?(this.reset(),!0):!!this.map[l.name]&&(this.parser=this.map[l.name],this.parser.parseOpen(l),!0)}parseText(l){return!!this.parser&&(this.parser.parseText(l),!0)}parseClose(l){return this.parser?(this.parser.parseClose(l)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(a,C,S){const v=a("../../../utils/under-dash"),f=a("../base-xform");function h(l,u){return l?u:void 0}function d(l,u){return l===u||void 0}C.exports=class extends f{get tag(){return"sheetProtection"}render(l,u){if(u){const c={sheet:h(u.sheet,"1"),selectLockedCells:u.selectLockedCells===!1?"1":void 0,selectUnlockedCells:u.selectUnlockedCells===!1?"1":void 0,formatCells:h(u.formatCells,"0"),formatColumns:h(u.formatColumns,"0"),formatRows:h(u.formatRows,"0"),insertColumns:h(u.insertColumns,"0"),insertRows:h(u.insertRows,"0"),insertHyperlinks:h(u.insertHyperlinks,"0"),deleteColumns:h(u.deleteColumns,"0"),deleteRows:h(u.deleteRows,"0"),sort:h(u.sort,"0"),autoFilter:h(u.autoFilter,"0"),pivotTables:h(u.pivotTables,"0")};u.sheet&&(c.algorithmName=u.algorithmName,c.hashValue=u.hashValue,c.saltValue=u.saltValue,c.spinCount=u.spinCount,c.objects=h(u.objects===!1,"1"),c.scenarios=h(u.scenarios===!1,"1")),v.some(c,p=>p!==void 0)&&l.leafNode(this.tag,c)}}parseOpen(l){switch(l.name){case this.tag:return this.model={sheet:d(l.attributes.sheet,"1"),objects:l.attributes.objects!=="1"&&void 0,scenarios:l.attributes.scenarios!=="1"&&void 0,selectLockedCells:l.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:l.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:d(l.attributes.formatCells,"0"),formatColumns:d(l.attributes.formatColumns,"0"),formatRows:d(l.attributes.formatRows,"0"),insertColumns:d(l.attributes.insertColumns,"0"),insertRows:d(l.attributes.insertRows,"0"),insertHyperlinks:d(l.attributes.insertHyperlinks,"0"),deleteColumns:d(l.attributes.deleteColumns,"0"),deleteRows:d(l.attributes.deleteRows,"0"),sort:d(l.attributes.sort,"0"),autoFilter:d(l.attributes.autoFilter,"0"),pivotTables:d(l.attributes.pivotTables,"0")},l.attributes.algorithmName&&(this.model.algorithmName=l.attributes.algorithmName,this.model.hashValue=l.attributes.hashValue,this.model.saltValue=l.attributes.saltValue,this.model.spinCount=parseInt(l.attributes.spinCount,10)),!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(a,C,S){const v=a("../../../utils/col-cache"),f=a("../base-xform"),h={frozen:"frozen",frozenSplit:"frozen",split:"split"};C.exports=class extends f{get tag(){return"sheetView"}prepare(d){switch(d.state){case"frozen":case"split":break;default:d.state="normal"}}render(d,l){d.openNode("sheetView",{workbookViewId:l.workbookViewId||0});const u=function(_,b,w){w&&d.addAttribute(_,b)};let c,p,A,g;switch(u("rightToLeft","1",l.rightToLeft===!0),u("tabSelected","1",l.tabSelected),u("showRuler","0",l.showRuler===!1),u("showRowColHeaders","0",l.showRowColHeaders===!1),u("showGridLines","0",l.showGridLines===!1),u("zoomScale",l.zoomScale,l.zoomScale),u("zoomScaleNormal",l.zoomScaleNormal,l.zoomScaleNormal),u("view",l.style,l.style),l.state){case"frozen":p=l.xSplit||0,A=l.ySplit||0,c=l.topLeftCell||v.getAddress(A+1,p+1).address,g=(l.xSplit&&l.ySplit?"bottomRight":l.xSplit&&"topRight")||"bottomLeft",d.leafNode("pane",{xSplit:l.xSplit||void 0,ySplit:l.ySplit||void 0,topLeftCell:c,activePane:g,state:"frozen"}),d.leafNode("selection",{pane:g,activeCell:l.activeCell,sqref:l.activeCell});break;case"split":l.activePane==="topLeft"&&(l.activePane=void 0),d.leafNode("pane",{xSplit:l.xSplit||void 0,ySplit:l.ySplit||void 0,topLeftCell:l.topLeftCell,activePane:l.activePane}),d.leafNode("selection",{pane:l.activePane,activeCell:l.activeCell,sqref:l.activeCell});break;case"normal":l.activeCell&&d.leafNode("selection",{activeCell:l.activeCell,sqref:l.activeCell})}d.closeNode()}parseOpen(d){switch(d.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(d.attributes.workbookViewId,10),rightToLeft:d.attributes.rightToLeft==="1",tabSelected:d.attributes.tabSelected==="1",showRuler:d.attributes.showRuler!=="0",showRowColHeaders:d.attributes.showRowColHeaders!=="0",showGridLines:d.attributes.showGridLines!=="0",zoomScale:parseInt(d.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(d.attributes.zoomScaleNormal||"100",10),style:d.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(d.attributes.xSplit||"0",10),ySplit:parseInt(d.attributes.ySplit||"0",10),topLeftCell:d.attributes.topLeftCell,activePane:d.attributes.activePane||"topLeft",state:d.attributes.state},!0;case"selection":{const l=d.attributes.pane||"topLeft";return this.selections[l]={pane:l,activeCell:d.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(d){let l,u;switch(d){case"sheetView":return this.sheetView&&this.pane?(l=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:h[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(l.activePane=this.pane.activePane),u=this.selections[this.pane.activePane],u&&u.activeCell&&(l.activeCell=u.activeCell),this.sheetView.style&&(l.style=this.sheetView.style)):(l=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},u=this.selections.topLeft,u&&u.activeCell&&(l.activeCell=u.activeCell),this.sheetView.style&&(l.style=this.sheetView.style)),!1;default:return!0}}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"tablePart"}render(f,h){h&&f.leafNode(this.tag,{"r:id":h.rId})}parseOpen(f){switch(f.name){case this.tag:return this.model={rId:f.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(a,C,S){const v=a("../../../utils/under-dash"),f=a("../../../utils/col-cache"),h=a("../../../utils/xml-stream"),d=a("../../rel-type"),l=a("./merges"),u=a("../base-xform"),c=a("../list-xform"),p=a("./row-xform"),A=a("./col-xform"),g=a("./dimension-xform"),_=a("./hyperlink-xform"),b=a("./merge-cell-xform"),w=a("./data-validations-xform"),B=a("./sheet-properties-xform"),k=a("./sheet-format-properties-xform"),T=a("./sheet-view-xform"),L=a("./sheet-protection-xform"),V=a("./page-margins-xform"),Q=a("./page-setup-xform"),N=a("./print-options-xform"),j=a("./auto-filter-xform"),$=a("./picture-xform"),X=a("./drawing-xform"),W=a("./table-part-xform"),D=a("./row-breaks-xform"),z=a("./header-footer-xform"),M=a("./cf/conditional-formattings-xform"),R=a("./ext-lst-xform"),O=(F,K)=>{if(!K||!K.length)return F;if(!F||!F.length)return K;const te={},q={};return F.forEach(ie=>{te[ie.ref]=ie,ie.rules.forEach(oe=>{const{x14Id:ce}=oe;ce&&(q[ce]=oe)})}),K.forEach(ie=>{ie.rules.forEach(oe=>{const ce=q[oe.x14Id];ce?((ee,he)=>{Object.keys(he).forEach(ne=>{const re=ee[ne],ae=he[ne];re===void 0&&ae!==void 0&&(ee[ne]=ae)})})(ce,oe):te[ie.ref]?te[ie.ref].rules.push(oe):F.push({ref:ie.ref,rules:[oe]})})}),F};class U extends u{constructor(K){super();const{maxRows:te,maxCols:q,ignoreNodes:ie}=K||{};this.ignoreNodes=ie||[],this.map={sheetPr:new B,dimension:new g,sheetViews:new c({tag:"sheetViews",count:!1,childXform:new T}),sheetFormatPr:new k,cols:new c({tag:"cols",count:!1,childXform:new A}),sheetData:new c({tag:"sheetData",count:!1,empty:!0,childXform:new p({maxItems:q}),maxItems:te}),autoFilter:new j,mergeCells:new c({tag:"mergeCells",count:!0,childXform:new b}),rowBreaks:new D,hyperlinks:new c({tag:"hyperlinks",count:!1,childXform:new _}),pageMargins:new V,dataValidations:new w,pageSetup:new Q,headerFooter:new z,printOptions:new N,picture:new $,drawing:new X,sheetProtection:new L,tableParts:new c({tag:"tableParts",count:!0,childXform:new W}),conditionalFormatting:new M,extLst:new R}}prepare(K,te){te.merges=new l,K.hyperlinks=te.hyperlinks=[],K.comments=te.comments=[],te.formulae={},te.siFormulae=0,this.map.cols.prepare(K.cols,te),this.map.sheetData.prepare(K.rows,te),this.map.conditionalFormatting.prepare(K.conditionalFormattings,te),K.mergeCells=te.merges.mergeCells;const q=K.rels=[];function ie(ee){return"rId"+(ee.length+1)}if(K.hyperlinks.forEach(ee=>{const he=ie(q);ee.rId=he,q.push({Id:he,Type:d.Hyperlink,Target:ee.target,TargetMode:"External"})}),K.comments.length>0){const ee={Id:ie(q),Type:d.Comments,Target:`../comments${K.id}.xml`};q.push(ee);const he={Id:ie(q),Type:d.VmlDrawing,Target:`../drawings/vmlDrawing${K.id}.vml`};q.push(he),K.comments.forEach(ne=>{ne.refAddress=f.decodeAddress(ne.ref)}),te.commentRefs.push({commentName:"comments"+K.id,vmlDrawing:"vmlDrawing"+K.id})}const oe=[];let ce;K.media.forEach(ee=>{if(ee.type==="background"){const he=ie(q);ce=te.media[ee.imageId],q.push({Id:he,Type:d.Image,Target:`../media/${ce.name}.${ce.extension}`}),K.background={rId:he},K.image=te.media[ee.imageId]}else if(ee.type==="image"){let{drawing:he}=K;ce=te.media[ee.imageId],he||(he=K.drawing={rId:ie(q),name:"drawing"+ ++te.drawingsCount,anchors:[],rels:[]},te.drawings.push(he),q.push({Id:he.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${he.name}.xml`}));let ne=this.preImageId===ee.imageId?oe[ee.imageId]:oe[he.rels.length];ne||(ne=ie(he.rels),oe[he.rels.length]=ne,he.rels.push({Id:ne,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${ce.name}.${ce.extension}`}));const re={picture:{rId:ne},range:ee.range};if(ee.hyperlinks&&ee.hyperlinks.hyperlink){const ae=ie(he.rels);oe[he.rels.length]=ae,re.picture.hyperlinks={tooltip:ee.hyperlinks.tooltip,rId:ae},he.rels.push({Id:ae,Type:d.Hyperlink,Target:ee.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=ee.imageId,he.anchors.push(re)}}),K.tables.forEach(ee=>{const he=ie(q);ee.rId=he,q.push({Id:he,Type:d.Table,Target:"../tables/"+ee.target}),ee.columns.forEach(ne=>{const{style:re}=ne;re&&(ne.dxfId=te.styles.addDxfStyle(re))})}),this.map.extLst.prepare(K,te)}render(K,te){K.openXml(h.StdDocAttributes),K.openNode("worksheet",U.WORKSHEET_ATTRIBUTES);const q=te.properties?{defaultRowHeight:te.properties.defaultRowHeight,dyDescent:te.properties.dyDescent,outlineLevelCol:te.properties.outlineLevelCol,outlineLevelRow:te.properties.outlineLevelRow}:void 0;te.properties&&te.properties.defaultColWidth&&(q.defaultColWidth=te.properties.defaultColWidth);const ie={outlineProperties:te.properties&&te.properties.outlineProperties,tabColor:te.properties&&te.properties.tabColor,pageSetup:te.pageSetup&&te.pageSetup.fitToPage?{fitToPage:te.pageSetup.fitToPage}:void 0},oe=te.pageSetup&&te.pageSetup.margins,ce={showRowColHeaders:te.pageSetup&&te.pageSetup.showRowColHeaders,showGridLines:te.pageSetup&&te.pageSetup.showGridLines,horizontalCentered:te.pageSetup&&te.pageSetup.horizontalCentered,verticalCentered:te.pageSetup&&te.pageSetup.verticalCentered},ee=te.sheetProtection;this.map.sheetPr.render(K,ie),this.map.dimension.render(K,te.dimensions),this.map.sheetViews.render(K,te.views),this.map.sheetFormatPr.render(K,q),this.map.cols.render(K,te.cols),this.map.sheetData.render(K,te.rows),this.map.sheetProtection.render(K,ee),this.map.autoFilter.render(K,te.autoFilter),this.map.mergeCells.render(K,te.mergeCells),this.map.conditionalFormatting.render(K,te.conditionalFormattings),this.map.dataValidations.render(K,te.dataValidations),this.map.hyperlinks.render(K,te.hyperlinks),this.map.printOptions.render(K,ce),this.map.pageMargins.render(K,oe),this.map.pageSetup.render(K,te.pageSetup),this.map.headerFooter.render(K,te.headerFooter),this.map.rowBreaks.render(K,te.rowBreaks),this.map.drawing.render(K,te.drawing),this.map.picture.render(K,te.background),this.map.tableParts.render(K,te.tables),this.map.extLst.render(K,te),te.rels&&te.rels.forEach(he=>{he.Type===d.VmlDrawing&&K.leafNode("legacyDrawing",{"r:id":he.Id})}),K.closeNode()}parseOpen(K){return this.parser?(this.parser.parseOpen(K),!0):K.name==="worksheet"?(v.each(this.map,te=>{te.reset()}),!0):(this.map[K.name]&&!this.ignoreNodes.includes(K.name)&&(this.parser=this.map[K.name],this.parser.parseOpen(K)),!0)}parseText(K){this.parser&&this.parser.parseText(K)}parseClose(K){if(this.parser)return this.parser.parseClose(K)||(this.parser=void 0),!0;switch(K){case"worksheet":{const te=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(te.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(te.outlineProperties=this.map.sheetPr.model.outlineProperties);const q={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},ie=Object.assign(q,this.map.pageSetup.model,this.map.printOptions.model),oe=O(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:te,views:this.map.sheetViews.model,pageSetup:ie,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:oe},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}default:return!0}}reconcile(K,te){const q=(K.relationships||[]).reduce((oe,ce)=>{if(oe[ce.Id]=ce,ce.Type===d.Comments&&(K.comments=te.comments[ce.Target].comments),ce.Type===d.VmlDrawing&&K.comments&&K.comments.length){const ee=te.vmlDrawings[ce.Target].comments;K.comments.forEach((he,ne)=>{he.note=Object.assign({},he.note,ee[ne])})}return oe},{});if(te.commentsMap=(K.comments||[]).reduce((oe,ce)=>(ce.ref&&(oe[ce.ref]=ce),oe),{}),te.hyperlinkMap=(K.hyperlinks||[]).reduce((oe,ce)=>(ce.rId&&(oe[ce.address]=q[ce.rId].Target),oe),{}),te.formulae={},K.rows=K.rows&&K.rows.filter(Boolean)||[],K.rows.forEach(oe=>{oe.cells=oe.cells&&oe.cells.filter(Boolean)||[]}),this.map.cols.reconcile(K.cols,te),this.map.sheetData.reconcile(K.rows,te),this.map.conditionalFormatting.reconcile(K.conditionalFormattings,te),K.media=[],K.drawing){const oe=q[K.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(oe){const ce=oe[1];te.drawings[ce].anchors.forEach(ee=>{if(ee.medium){const he={type:"image",imageId:ee.medium.index,range:ee.range,hyperlinks:ee.picture.hyperlinks};K.media.push(he)}})}}const ie=K.background&&q[K.background.rId];if(ie){const oe=ie.Target.split("/media/")[1],ce=te.mediaIndex&&te.mediaIndex[oe];ce!==void 0&&K.media.push({type:"background",imageId:ce})}K.tables=(K.tables||[]).map(oe=>{const ce=q[oe.rId];return te.tables[ce.Target]}),delete K.relationships,delete K.hyperlinks,delete K.comments}}U.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},C.exports=U},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../../rel-type":31,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":72,"./cf/conditional-formattings-xform":87,"./col-xform":92,"./data-validations-xform":93,"./dimension-xform":94,"./drawing-xform":95,"./ext-lst-xform":96,"./header-footer-xform":97,"./hyperlink-xform":98,"./merge-cell-xform":99,"./merges":100,"./page-margins-xform":103,"./page-setup-xform":105,"./picture-xform":106,"./print-options-xform":107,"./row-breaks-xform":108,"./row-xform":109,"./sheet-format-properties-xform":110,"./sheet-properties-xform":111,"./sheet-protection-xform":112,"./sheet-view-xform":113,"./table-part-xform":114}],116:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{constructor(f){super(),this.tag=f.tag,this.attr=f.attr}render(f,h){h&&(f.openNode(this.tag),f.closeNode())}parseOpen(f){f.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{constructor(f){super(),this.tag=f.tag,this.attr=f.attr,this.attrs=f.attrs,this._format=f.format||function(h){try{return Number.isNaN(h.getTime())?"":h.toISOString()}catch{return""}},this._parse=f.parse||function(h){return new Date(h)}}render(f,h){h&&(f.openNode(this.tag),this.attrs&&f.addAttributes(this.attrs),this.attr?f.addAttribute(this.attr,this._format(h)):f.writeText(this._format(h)),f.closeNode())}parseOpen(f){f.name===this.tag&&(this.attr?this.model=this._parse(f.attributes[this.attr]):this.text=[])}parseText(f){this.attr||this.text.push(f)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{constructor(f){super(),this.tag=f.tag,this.attr=f.attr,this.attrs=f.attrs,this.zero=f.zero}render(f,h){(h||this.zero)&&(f.openNode(this.tag),this.attrs&&f.addAttributes(this.attrs),this.attr?f.addAttribute(this.attr,h):f.writeText(h),f.closeNode())}parseOpen(f){return f.name===this.tag&&(this.attr?this.model=parseInt(f.attributes[this.attr],10):this.text=[],!0)}parseText(f){this.attr||this.text.push(f)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{constructor(f){super(),this.tag=f.tag,this.attr=f.attr,this.attrs=f.attrs}render(f,h){h!==void 0&&(f.openNode(this.tag),this.attrs&&f.addAttributes(this.attrs),this.attr?f.addAttribute(this.attr,h):f.writeText(h),f.closeNode())}parseOpen(f){f.name===this.tag&&(this.attr?this.model=f.attributes[this.attr]:this.text=[])}parseText(f){this.attr||this.text.push(f)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(a,C,S){const v=a("./base-xform"),f=a("../../utils/xml-stream");C.exports=class extends v{constructor(h){super(),this._model=h}render(h){if(!this._xml){const d=new f;(function l(u,c){u.openNode(c.tag,c.$),c.c&&c.c.forEach(p=>{l(u,p)}),c.t&&u.writeText(c.t),u.closeNode()})(d,this._model),this._xml=d.xml}h.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(h){switch(h){case this._model.tag:return!1;default:return!0}}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(a,C,S){const v=a("./text-xform"),f=a("./rich-text-xform"),h=a("../base-xform");C.exports=class extends h{constructor(){super(),this.map={r:new f,t:new v}}get tag(){return"rPh"}render(d,l){if(d.openNode(this.tag,{sb:l.sb||0,eb:l.eb||0}),l&&l.hasOwnProperty("richText")&&l.richText){const{r:u}=this.map;l.richText.forEach(c=>{u.render(d,c)})}else l&&this.map.t.render(d,l.text);d.closeNode()}parseOpen(d){const{name:l}=d;return this.parser?(this.parser.parseOpen(d),!0):l===this.tag?(this.model={sb:parseInt(d.attributes.sb,10),eb:parseInt(d.attributes.eb,10)},!0):(this.parser=this.map[l],!!this.parser&&(this.parser.parseOpen(d),!0))}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser){if(!this.parser.parseClose(d)){switch(d){case"r":{let l=this.model.richText;l||(l=this.model.richText=[]),l.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(d){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(a,C,S){const v=a("./text-xform"),f=a("../style/font-xform"),h=a("../base-xform");class d extends h{constructor(u){super(),this.model=u}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new v)}get fontXform(){return this._fontXform||(this._fontXform=new f(d.FONT_OPTIONS))}render(u,c){c=c||this.model,u.openNode("r"),c.font&&this.fontXform.render(u,c.font),this.textXform.render(u,c.text),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(u),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(u),!0;default:return!1}}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){switch(u){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(u),!0}}}d.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},C.exports=d},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(a,C,S){const v=a("./text-xform"),f=a("./rich-text-xform"),h=a("./phonetic-text-xform"),d=a("../base-xform");C.exports=class extends d{constructor(l){super(),this.model=l,this.map={r:new f,t:new v,rPh:new h}}get tag(){return"si"}render(l,u){l.openNode(this.tag),u&&u.hasOwnProperty("richText")&&u.richText?u.richText.length?u.richText.forEach(c=>{this.map.r.render(l,c)}):this.map.t.render(l,""):u!=null&&this.map.t.render(l,u),l.closeNode()}parseOpen(l){const{name:u}=l;return this.parser?(this.parser.parseOpen(l),!0):u===this.tag?(this.model={},!0):(this.parser=this.map[u],!!this.parser&&(this.parser.parseOpen(l),!0))}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){if(this.parser){if(!this.parser.parseClose(l)){switch(l){case"r":{let u=this.model.richText;u||(u=this.model.richText=[]),u.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(l){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(a,C,S){const v=a("../../../utils/xml-stream"),f=a("../base-xform"),h=a("./shared-string-xform");C.exports=class extends f{constructor(d){super(),this.model=d||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new h)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(d){return this.model.values[d]}add(d){return d.richText?this.addRichText(d):this.addText(d)}addText(d){let l=this.hash[d];return l===void 0&&(l=this.hash[d]=this.model.values.length,this.model.values.push(d)),this.model.count++,l}addRichText(d){const l=this.sharedStringXform.toXml(d);let u=this.rich[l];return u===void 0&&(u=this.rich[l]=this.model.values.length,this.model.values.push(d)),this.model.count++,u}render(d,l){l=l||this._values,d.openXml(v.StdDocAttributes),d.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:l.count,uniqueCount:l.values.length});const u=this.sharedStringXform;l.values.forEach(c=>{u.render(d,c)}),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(d),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(d))}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(d){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: "+d)}}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"t"}render(f,h){f.openNode("t"),/^\s|\n|\s$/.test(h)&&f.addAttribute("xml:space","preserve"),f.writeText(h),f.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(f,h)=>String.fromCharCode(parseInt(h,16)))}parseOpen(f){switch(f.name){case"t":return this._text=[],!0;default:return!1}}parseText(f){this._text.push(f)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(a,C,S){const v=a("../../../doc/enums"),f=a("../../../utils/utils"),h=a("../base-xform"),d={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((u,c)=>(u[c]=!0,u),{}),horizontal(u){return this.horizontalValues[u]?u:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((u,c)=>(u[c]=!0,u),{}),vertical(u){return u==="middle"?"center":this.verticalValues[u]?u:void 0},wrapText:u=>!!u||void 0,shrinkToFit:u=>!!u||void 0,textRotation(u){switch(u){case"vertical":return u;default:return(u=f.validInt(u))>=-90&&u<=90?u:void 0}},indent:u=>(u=f.validInt(u),Math.max(0,u)),readingOrder(u){switch(u){case"ltr":return v.ReadingOrder.LeftToRight;case"rtl":return v.ReadingOrder.RightToLeft;default:return}}},l={toXml(u){if(u=d.textRotation(u)){if(u==="vertical")return 255;const c=Math.round(u);if(c>=0&&c<=90)return c;if(c<0&&c>=-90)return 90-c}},toModel(u){const c=f.validInt(u);if(c!==void 0){if(c===255)return"vertical";if(c>=0&&c<=90)return c;if(c>90&&c<=180)return 90-c}}};C.exports=class extends h{get tag(){return"alignment"}render(u,c){u.addRollback(),u.openNode("alignment");let p=!1;function A(g,_){_&&(u.addAttribute(g,_),p=!0)}A("horizontal",d.horizontal(c.horizontal)),A("vertical",d.vertical(c.vertical)),A("wrapText",!!d.wrapText(c.wrapText)&&"1"),A("shrinkToFit",!!d.shrinkToFit(c.shrinkToFit)&&"1"),A("indent",d.indent(c.indent)),A("textRotation",l.toXml(c.textRotation)),A("readingOrder",d.readingOrder(c.readingOrder)),u.closeNode(),p?u.commit():u.rollback()}parseOpen(u){const c={};let p=!1;function A(g,_,b){g&&(c[_]=b,p=!0)}A(u.attributes.horizontal,"horizontal",u.attributes.horizontal),A(u.attributes.vertical,"vertical",u.attributes.vertical==="center"?"middle":u.attributes.vertical),A(u.attributes.wrapText,"wrapText",f.parseBoolean(u.attributes.wrapText)),A(u.attributes.shrinkToFit,"shrinkToFit",f.parseBoolean(u.attributes.shrinkToFit)),A(u.attributes.indent,"indent",parseInt(u.attributes.indent,10)),A(u.attributes.textRotation,"textRotation",l.toModel(u.attributes.textRotation)),A(u.attributes.readingOrder,"readingOrder",u.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=p?c:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(a,C,S){const v=a("../base-xform"),f=a("../../../utils/utils"),h=a("./color-xform");class d extends v{constructor(u){super(),this.name=u,this.map={color:new h}}get tag(){return this.name}render(u,c,p){const A=c&&c.color||p||this.defaultColor;u.openNode(this.name),c&&c.style&&(u.addAttribute("style",c.style),A&&this.map.color.render(u,A)),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.name:{const{style:c}=u.attributes;return this.model=c?{style:c}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(u),!0;default:return!1}}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){return this.parser?(this.parser.parseClose(u)||(this.parser=void 0),!0):(u===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(u){return d.validStyleValues[u]}}d.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((l,u)=>(l[u]=!0,l),{}),C.exports=class extends v{constructor(){super(),this.map={top:new d("top"),left:new d("left"),bottom:new d("bottom"),right:new d("right"),diagonal:new d("diagonal")}}render(l,u){const{color:c}=u;function p(A,g){A&&!A.color&&u.color&&(A={...A,color:u.color}),g.render(l,A,c)}l.openNode("border"),u.diagonal&&u.diagonal.style&&(u.diagonal.up&&l.addAttribute("diagonalUp","1"),u.diagonal.down&&l.addAttribute("diagonalDown","1")),p(u.left,this.map.left),p(u.right,this.map.right),p(u.top,this.map.top),p(u.bottom,this.map.bottom),p(u.diagonal,this.map.diagonal),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"border":return this.reset(),this.diagonalUp=f.parseBoolean(l.attributes.diagonalUp),this.diagonalDown=f.parseBoolean(l.attributes.diagonalDown),!0;default:return this.parser=this.map[l.name],!!this.parser&&(this.parser.parseOpen(l),!0)}}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;if(l==="border"){const u=this.model={},c=function(p,A,g){A&&(g&&Object.assign(A,g),u[p]=A)};c("left",this.map.left.model),c("right",this.map.right.model),c("top",this.map.top.model),c("bottom",this.map.bottom.model),c("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{constructor(f){super(),this.name=f||"color"}get tag(){return this.name}render(f,h){return!!h&&(f.openNode(this.name),h.argb?f.addAttribute("rgb",h.argb):h.theme!==void 0?(f.addAttribute("theme",h.theme),h.tint!==void 0&&f.addAttribute("tint",h.tint)):h.indexed!==void 0?f.addAttribute("indexed",h.indexed):f.addAttribute("auto","1"),f.closeNode(),!0)}parseOpen(f){return f.name===this.name&&(f.attributes.rgb?this.model={argb:f.attributes.rgb}:f.attributes.theme?(this.model={theme:parseInt(f.attributes.theme,10)},f.attributes.tint&&(this.model.tint=parseFloat(f.attributes.tint))):f.attributes.indexed?this.model={indexed:parseInt(f.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(a,C,S){const v=a("../base-xform"),f=a("./alignment-xform"),h=a("./border-xform"),d=a("./fill-xform"),l=a("./font-xform"),u=a("./numfmt-xform"),c=a("./protection-xform");C.exports=class extends v{constructor(){super(),this.map={alignment:new f,border:new h,fill:new d,font:new l,numFmt:new u,protection:new c}}get tag(){return"dxf"}render(p,A){if(p.openNode(this.tag),A.font&&this.map.font.render(p,A.font),A.numFmt&&A.numFmtId){const g={id:A.numFmtId,formatCode:A.numFmt};this.map.numFmt.render(p,g)}A.fill&&this.map.fill.render(p,A.fill),A.alignment&&this.map.alignment.render(p,A.alignment),A.border&&this.map.border.render(p,A.border),A.protection&&this.map.protection.render(p,A.protection),p.closeNode()}parseOpen(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[p.name],this.parser&&this.parser.parseOpen(p),!0}}parseText(p){this.parser&&this.parser.parseText(p)}parseClose(p){return this.parser?(this.parser.parseClose(p)||(this.parser=void 0),!0):p!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}},{"../base-xform":32,"./alignment-xform":126,"./border-xform":127,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./protection-xform":133}],130:[function(a,C,S){const v=a("../base-xform"),f=a("./color-xform");class h extends v{constructor(){super(),this.map={color:new f}}get tag(){return"stop"}render(p,A){p.openNode("stop"),p.addAttribute("position",A.position),this.map.color.render(p,A.color),p.closeNode()}parseOpen(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case"stop":return this.model={position:parseFloat(p.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(p),!0;default:return!1}}parseText(){}parseClose(p){return!!this.parser&&(this.parser.parseClose(p)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class d extends v{constructor(){super(),this.map={fgColor:new f("fgColor"),bgColor:new f("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(p,A){p.openNode("patternFill"),p.addAttribute("patternType",A.pattern),A.fgColor&&this.map.fgColor.render(p,A.fgColor),A.bgColor&&this.map.bgColor.render(p,A.bgColor),p.closeNode()}parseOpen(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case"patternFill":return this.model={type:"pattern",pattern:p.attributes.patternType},!0;default:return this.parser=this.map[p.name],!!this.parser&&(this.parser.parseOpen(p),!0)}}parseText(p){this.parser&&this.parser.parseText(p)}parseClose(p){return!!this.parser&&(this.parser.parseClose(p)||(this.parser.model&&(this.model[p]=this.parser.model),this.parser=void 0),!0)}}class l extends v{constructor(){super(),this.map={stop:new h}}get name(){return"gradient"}get tag(){return"gradientFill"}render(p,A){switch(p.openNode("gradientFill"),A.gradient){case"angle":p.addAttribute("degree",A.degree);break;case"path":p.addAttribute("type","path"),A.center.left&&(p.addAttribute("left",A.center.left),A.center.right===void 0&&p.addAttribute("right",A.center.left)),A.center.right&&p.addAttribute("right",A.center.right),A.center.top&&(p.addAttribute("top",A.center.top),A.center.bottom===void 0&&p.addAttribute("bottom",A.center.top)),A.center.bottom&&p.addAttribute("bottom",A.center.bottom)}const g=this.map.stop;A.stops.forEach(_=>{g.render(p,_)}),p.closeNode()}parseOpen(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case"gradientFill":{const A=this.model={stops:[]};return p.attributes.degree?(A.gradient="angle",A.degree=parseInt(p.attributes.degree,10)):p.attributes.type==="path"&&(A.gradient="path",A.center={left:p.attributes.left?parseFloat(p.attributes.left):0,top:p.attributes.top?parseFloat(p.attributes.top):0},p.attributes.right!==p.attributes.left&&(A.center.right=p.attributes.right?parseFloat(p.attributes.right):0),p.attributes.bottom!==p.attributes.top&&(A.center.bottom=p.attributes.bottom?parseFloat(p.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(p),!0;default:return!1}}parseText(p){this.parser&&this.parser.parseText(p)}parseClose(p){return!!this.parser&&(this.parser.parseClose(p)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class u extends v{constructor(){super(),this.map={patternFill:new d,gradientFill:new l}}get tag(){return"fill"}render(p,A){switch(p.addRollback(),p.openNode("fill"),A.type){case"pattern":this.map.patternFill.render(p,A);break;case"gradient":this.map.gradientFill.render(p,A);break;default:return void p.rollback()}p.closeNode(),p.commit()}parseOpen(p){if(this.parser)return this.parser.parseOpen(p),!0;switch(p.name){case"fill":return this.model={},!0;default:return this.parser=this.map[p.name],!!this.parser&&(this.parser.parseOpen(p),!0)}}parseText(p){this.parser&&this.parser.parseText(p)}parseClose(p){return!!this.parser&&(this.parser.parseClose(p)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(p){return u.validPatternValues[p]}}u.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((c,p)=>(c[p]=!0,c),{}),u.StopXform=h,u.PatternFillXform=d,u.GradientFillXform=l,C.exports=u},{"../base-xform":32,"./color-xform":128}],131:[function(a,C,S){const v=a("./color-xform"),f=a("../simple/boolean-xform"),h=a("../simple/integer-xform"),d=a("../simple/string-xform"),l=a("./underline-xform"),u=a("../../../utils/under-dash"),c=a("../base-xform");class p extends c{constructor(g){super(),this.options=g||p.OPTIONS,this.map={b:{prop:"bold",xform:new f({tag:"b",attr:"val"})},i:{prop:"italic",xform:new f({tag:"i",attr:"val"})},u:{prop:"underline",xform:new l},charset:{prop:"charset",xform:new h({tag:"charset",attr:"val"})},color:{prop:"color",xform:new v},condense:{prop:"condense",xform:new f({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new f({tag:"extend",attr:"val"})},family:{prop:"family",xform:new h({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new f({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new d({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new d({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new f({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new f({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new h({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new d({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(g,_){const{map:b}=this;g.openNode(this.options.tagName),u.each(this.map,(w,B)=>{b[B].xform.render(g,_[w.prop])}),g.closeNode()}parseOpen(g){if(this.parser)return this.parser.parseOpen(g),!0;if(this.map[g.name])return this.parser=this.map[g.name].xform,this.parser.parseOpen(g);switch(g.name){case this.options.tagName:return this.model={},!0;default:return!1}}parseText(g){this.parser&&this.parser.parseText(g)}parseClose(g){if(this.parser&&!this.parser.parseClose(g)){const _=this.map[g];return this.parser.model&&(this.model[_.prop]=this.parser.model),this.parser=void 0,!0}switch(g){case this.options.tagName:return!1;default:return!0}}}p.OPTIONS={tagName:"font",fontNameTag:"name"},C.exports=p},{"../../../utils/under-dash":26,"../base-xform":32,"../simple/boolean-xform":116,"../simple/integer-xform":118,"../simple/string-xform":119,"./color-xform":128,"./underline-xform":136}],132:[function(a,C,S){const v=a("../../../utils/under-dash"),f=a("../../defaultnumformats"),h=a("../base-xform"),d=function(){const u={};return v.each(f,(c,p)=>{c.f&&(u[c.f]=parseInt(p,10))}),u}();class l extends h{constructor(c,p){super(),this.id=c,this.formatCode=p}get tag(){return"numFmt"}render(c,p){c.leafNode("numFmt",{numFmtId:p.id,formatCode:p.formatCode})}parseOpen(c){switch(c.name){case"numFmt":return this.model={id:parseInt(c.attributes.numFmtId,10),formatCode:c.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}parseText(){}parseClose(){return!1}}l.getDefaultFmtId=function(u){return d[u]},l.getDefaultFmtCode=function(u){return f[u]&&f[u].f},C.exports=l},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(a,C,S){const v=a("../base-xform"),f={boolean:(h,d)=>h===void 0?d:h};C.exports=class extends v{get tag(){return"protection"}render(h,d){h.addRollback(),h.openNode("protection");let l=!1;function u(c,p){p!==void 0&&(h.addAttribute(c,p),l=!0)}u("locked",f.boolean(d.locked,!0)?void 0:"0"),u("hidden",f.boolean(d.hidden,!1)?"1":void 0),h.closeNode(),l?h.commit():h.rollback()}parseOpen(h){const d={locked:h.attributes.locked!=="0",hidden:h.attributes.hidden==="1"},l=!d.locked||d.hidden;this.model=l?d:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(a,C,S){const v=a("../base-xform"),f=a("./alignment-xform"),h=a("./protection-xform");C.exports=class extends v{constructor(d){super(),this.xfId=!(!d||!d.xfId),this.map={alignment:new f,protection:new h}}get tag(){return"xf"}render(d,l){d.openNode("xf",{numFmtId:l.numFmtId||0,fontId:l.fontId||0,fillId:l.fillId||0,borderId:l.borderId||0}),this.xfId&&d.addAttribute("xfId",l.xfId||0),l.numFmtId&&d.addAttribute("applyNumberFormat","1"),l.fontId&&d.addAttribute("applyFont","1"),l.fillId&&d.addAttribute("applyFill","1"),l.borderId&&d.addAttribute("applyBorder","1"),l.alignment&&d.addAttribute("applyAlignment","1"),l.protection&&d.addAttribute("applyProtection","1"),l.alignment&&this.map.alignment.render(d,l.alignment),l.protection&&this.map.protection.render(d,l.protection),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"xf":return this.model={numFmtId:parseInt(d.attributes.numFmtId,10),fontId:parseInt(d.attributes.fontId,10),fillId:parseInt(d.attributes.fillId,10),borderId:parseInt(d.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(d.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(d),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(d),!0;default:return!1}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){return this.parser?(this.parser.parseClose(d)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):d!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(a,C,S){const v=a("../../../doc/enums"),f=a("../../../utils/xml-stream"),h=a("../base-xform"),d=a("../static-xform"),l=a("../list-xform"),u=a("./font-xform"),c=a("./fill-xform"),p=a("./border-xform"),A=a("./numfmt-xform"),g=a("./style-xform"),_=a("./dxf-xform");class b extends h{constructor(B){super(),this.map={numFmts:new l({tag:"numFmts",count:!0,childXform:new A}),fonts:new l({tag:"fonts",count:!0,childXform:new u,$:{"x14ac:knownFonts":1}}),fills:new l({tag:"fills",count:!0,childXform:new c}),borders:new l({tag:"borders",count:!0,childXform:new p}),cellStyleXfs:new l({tag:"cellStyleXfs",count:!0,childXform:new g}),cellXfs:new l({tag:"cellXfs",count:!0,childXform:new g({xfId:!0})}),dxfs:new l({tag:"dxfs",always:!0,count:!0,childXform:new _}),numFmt:new A,font:new u,fill:new c,border:new p,style:new g({xfId:!0}),cellStyles:b.STATIC_XFORMS.cellStyles,tableStyles:b.STATIC_XFORMS.tableStyles,extLst:b.STATIC_XFORMS.extLst},B&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(B,k){k=k||this.model,B.openXml(f.StdDocAttributes),B.openNode("styleSheet",b.STYLESHEET_ATTRIBUTES),this.index?(k.numFmts&&k.numFmts.length&&(B.openNode("numFmts",{count:k.numFmts.length}),k.numFmts.forEach(T=>{B.writeXml(T)}),B.closeNode()),k.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),B.openNode("fonts",{count:k.fonts.length,"x14ac:knownFonts":1}),k.fonts.forEach(T=>{B.writeXml(T)}),B.closeNode(),B.openNode("fills",{count:k.fills.length}),k.fills.forEach(T=>{B.writeXml(T)}),B.closeNode(),B.openNode("borders",{count:k.borders.length}),k.borders.forEach(T=>{B.writeXml(T)}),B.closeNode(),this.map.cellStyleXfs.render(B,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),B.openNode("cellXfs",{count:k.styles.length}),k.styles.forEach(T=>{B.writeXml(T)}),B.closeNode()):(this.map.numFmts.render(B,k.numFmts),this.map.fonts.render(B,k.fonts),this.map.fills.render(B,k.fills),this.map.borders.render(B,k.borders),this.map.cellStyleXfs.render(B,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(B,k.styles)),b.STATIC_XFORMS.cellStyles.render(B),this.map.dxfs.render(B,k.dxfs),b.STATIC_XFORMS.tableStyles.render(B),b.STATIC_XFORMS.extLst.render(B),B.closeNode()}parseOpen(B){if(this.parser)return this.parser.parseOpen(B),!0;switch(B.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[B.name],this.parser&&this.parser.parseOpen(B),!0}}parseText(B){this.parser&&this.parser.parseText(B)}parseClose(B){if(this.parser)return this.parser.parseClose(B)||(this.parser=void 0),!0;switch(B){case"styleSheet":{this.model={};const k=(T,L)=>{L.model&&L.model.length&&(this.model[T]=L.model)};if(k("numFmts",this.map.numFmts),k("fonts",this.map.fonts),k("fills",this.map.fills),k("borders",this.map.borders),k("styles",this.map.cellXfs),k("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){const T=this.index.numFmt;this.model.numFmts.forEach(L=>{T[L.id]=L.formatCode})}return!1}default:return!0}}addStyleModel(B,k){if(!B)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(B))return this.weakMap.get(B);const T={};if(k=k||v.ValueType.Number,B.numFmt)T.numFmtId=this._addNumFmtStr(B.numFmt);else switch(k){case v.ValueType.Number:T.numFmtId=this._addNumFmtStr("General");break;case v.ValueType.Date:T.numFmtId=this._addNumFmtStr("mm-dd-yy")}B.font&&(T.fontId=this._addFont(B.font)),B.border&&(T.borderId=this._addBorder(B.border)),B.fill&&(T.fillId=this._addFill(B.fill)),B.alignment&&(T.alignment=B.alignment),B.protection&&(T.protection=B.protection);const L=this._addStyle(T);return this.weakMap&&this.weakMap.set(B,L),L}getStyleModel(B){const k=this.model.styles[B];if(!k)return null;let T=this.index.model[B];if(T)return T;if(T=this.index.model[B]={},k.numFmtId){const V=this.index.numFmt[k.numFmtId]||A.getDefaultFmtCode(k.numFmtId);V&&(T.numFmt=V)}function L(V,Q,N){if(N||N===0){const j=Q[N];j&&(T[V]=j)}}return L("font",this.model.fonts,k.fontId),L("border",this.model.borders,k.borderId),L("fill",this.model.fills,k.fillId),k.alignment&&(T.alignment=k.alignment),k.protection&&(T.protection=k.protection),T}addDxfStyle(B){return B.numFmt&&(B.numFmtId=this._addNumFmtStr(B.numFmt)),this.model.dxfs.push(B),this.model.dxfs.length-1}getDxfStyle(B){return this.model.dxfs[B]}_addStyle(B){const k=this.map.style.toXml(B);let T=this.index.style[k];return T===void 0&&(T=this.index.style[k]=this.model.styles.length,this.model.styles.push(k)),T}_addNumFmtStr(B){let k=A.getDefaultFmtId(B);if(k!==void 0||(k=this.index.numFmt[B],k!==void 0))return k;k=this.index.numFmt[B]=164+this.model.numFmts.length;const T=this.map.numFmt.toXml({id:k,formatCode:B});return this.model.numFmts.push(T),k}_addFont(B){const k=this.map.font.toXml(B);let T=this.index.font[k];return T===void 0&&(T=this.index.font[k]=this.model.fonts.length,this.model.fonts.push(k)),T}_addBorder(B){const k=this.map.border.toXml(B);let T=this.index.border[k];return T===void 0&&(T=this.index.border[k]=this.model.borders.length,this.model.borders.push(k)),T}_addFill(B){const k=this.map.fill.toXml(B);let T=this.index.fill[k];return T===void 0&&(T=this.index.fill[k]=this.model.fills.length,this.model.fills.push(k)),T}}b.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},b.STATIC_XFORMS={cellStyles:new d({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new d({tag:"dxfs",$:{count:0}}),tableStyles:new d({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new d({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})},b.Mock=class extends b{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}}parseStream(w){return w.autodrain(),Promise.resolve()}addStyleModel(w,B){switch(B){case v.ValueType.Date:return this.dateStyleId;default:return 0}}get dateStyleId(){if(!this._dateStyleId){const w={numFmtId:A.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(w)}return this._dateStyleId}getStyleModel(){return{}}},C.exports=b},{"../../../doc/enums":7,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./border-xform":127,"./dxf-xform":129,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./style-xform":134}],136:[function(a,C,S){const v=a("../base-xform");class f extends v{constructor(d){super(),this.model=d}get tag(){return"u"}render(d,l){if((l=l||this.model)===!0)d.leafNode("u");else{const u=f.Attributes[l];u&&d.leafNode("u",u)}}parseOpen(d){d.name==="u"&&(this.model=d.attributes.val||!0)}parseText(){}parseClose(){return!1}}f.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},C.exports=f},{"../base-xform":32}],137:[function(a,C,S){const v=a("../base-xform"),f=a("./filter-column-xform");C.exports=class extends v{constructor(){super(),this.map={filterColumn:new f}}get tag(){return"autoFilter"}prepare(h){h.columns.forEach((d,l)=>{this.map.filterColumn.prepare(d,{index:l})})}render(h,d){return h.openNode(this.tag,{ref:d.autoFilterRef}),d.columns.forEach(l=>{this.map.filterColumn.render(h,l)}),h.closeNode(),!0}parseOpen(h){if(this.parser)return this.parser.parseOpen(h),!0;switch(h.name){case this.tag:return this.model={autoFilterRef:h.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[h.name],this.parser)return this.parseOpen(h),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(h))}}parseText(h){this.parser&&this.parser.parseText(h)}parseClose(h){if(this.parser)return this.parser.parseClose(h)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(h){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: "+h)}}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"customFilter"}render(f,h){f.leafNode(this.tag,{val:h.val,operator:h.operator})}parseOpen(f){return f.name===this.tag&&(this.model={val:f.attributes.val,operator:f.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(a,C,S){const v=a("../base-xform"),f=a("../list-xform"),h=a("./custom-filter-xform"),d=a("./filter-xform");C.exports=class extends v{constructor(){super(),this.map={customFilters:new f({tag:"customFilters",count:!1,empty:!0,childXform:new h}),filters:new f({tag:"filters",count:!1,empty:!0,childXform:new d})}}get tag(){return"filterColumn"}prepare(l,u){l.colId=u.index.toString()}render(l,u){return u.customFilters?(l.openNode(this.tag,{colId:u.colId,hiddenButton:u.filterButton?"0":"1"}),this.map.customFilters.render(l,u.customFilters),l.closeNode(),!0):(l.leafNode(this.tag,{colId:u.colId,hiddenButton:u.filterButton?"0":"1"}),!0)}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;const{attributes:u}=l;switch(l.name){case this.tag:return this.model={filterButton:u.hiddenButton==="0"},!0;default:if(this.parser=this.map[l.name],this.parser)return this.parseOpen(l),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(l))}}parseText(){}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;switch(l){case this.tag:return this.model.customFilters=this.map.customFilters.model,!1;default:return!0}}}},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"filter"}render(f,h){f.leafNode(this.tag,{val:h.val})}parseOpen(f){return f.name===this.tag&&(this.model={val:f.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"tableColumn"}prepare(f,h){f.id=h.index+1}render(f,h){return f.leafNode(this.tag,{id:h.id.toString(),name:h.name,totalsRowLabel:h.totalsRowLabel,totalsRowFunction:h.totalsRowFunction,dxfId:h.dxfId}),!0}parseOpen(f){if(f.name===this.tag){const{attributes:h}=f;return this.model={name:h.name,totalsRowLabel:h.totalsRowLabel,totalsRowFunction:h.totalsRowFunction,dxfId:h.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(a,C,S){const v=a("../base-xform");C.exports=class extends v{get tag(){return"tableStyleInfo"}render(f,h){return f.leafNode(this.tag,{name:h.theme?h.theme:void 0,showFirstColumn:h.showFirstColumn?"1":"0",showLastColumn:h.showLastColumn?"1":"0",showRowStripes:h.showRowStripes?"1":"0",showColumnStripes:h.showColumnStripes?"1":"0"}),!0}parseOpen(f){if(f.name===this.tag){const{attributes:h}=f;return this.model={theme:h.name?h.name:null,showFirstColumn:h.showFirstColumn==="1",showLastColumn:h.showLastColumn==="1",showRowStripes:h.showRowStripes==="1",showColumnStripes:h.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(a,C,S){const v=a("../../../utils/xml-stream"),f=a("../base-xform"),h=a("../list-xform"),d=a("./auto-filter-xform"),l=a("./table-column-xform"),u=a("./table-style-info-xform");class c extends f{constructor(){super(),this.map={autoFilter:new d,tableColumns:new h({tag:"tableColumns",count:!0,empty:!0,childXform:new l}),tableStyleInfo:new u}}prepare(A,g){this.map.autoFilter.prepare(A),this.map.tableColumns.prepare(A.columns,g)}get tag(){return"table"}render(A,g){A.openXml(v.StdDocAttributes),A.openNode(this.tag,{...c.TABLE_ATTRIBUTES,id:g.id,name:g.name,displayName:g.displayName||g.name,ref:g.tableRef,totalsRowCount:g.totalsRow?"1":void 0,totalsRowShown:g.totalsRow?void 0:"1",headerRowCount:g.headerRow?"1":"0"}),this.map.autoFilter.render(A,g),this.map.tableColumns.render(A,g.columns),this.map.tableStyleInfo.render(A,g.style),A.closeNode()}parseOpen(A){if(this.parser)return this.parser.parseOpen(A),!0;const{name:g,attributes:_}=A;switch(g){case this.tag:this.reset(),this.model={name:_.name,displayName:_.displayName||_.name,tableRef:_.ref,totalsRow:_.totalsRowCount==="1",headerRow:_.headerRowCount==="1"};break;default:this.parser=this.map[A.name],this.parser&&this.parser.parseOpen(A)}return!0}parseText(A){this.parser&&this.parser.parseText(A)}parseClose(A){if(this.parser)return this.parser.parseClose(A)||(this.parser=void 0),!0;switch(A){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((g,_)=>{this.model.columns[_].filterButton=g.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(A,g){A.columns.forEach(_=>{_.dxfId!==void 0&&(_.style=g.styles.getDxfStyle(_.dxfId))})}}c.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},C.exports=c},{"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":137,"./table-column-xform":141,"./table-style-info-xform":142}],144:[function(a,C,S){(function(v,f){(function(){const h=a("fs"),d=a("jszip"),{PassThrough:l}=a("readable-stream"),u=a("../utils/zip-stream"),c=a("../utils/stream-buf"),p=a("../utils/utils"),A=a("../utils/xml-stream"),{bufferToString:g}=a("../utils/browser-buffer-decode"),_=a("./xform/style/styles-xform"),b=a("./xform/core/core-xform"),w=a("./xform/strings/shared-strings-xform"),B=a("./xform/core/relationships-xform"),k=a("./xform/core/content-types-xform"),T=a("./xform/core/app-xform"),L=a("./xform/book/workbook-xform"),V=a("./xform/sheet/worksheet-xform"),Q=a("./xform/drawing/drawing-xform"),N=a("./xform/table/table-xform"),j=a("./xform/comment/comments-xform"),$=a("./xform/comment/vml-notes-xform"),X=a("./xml/theme1");class W{constructor(z){this.workbook=z}async readFile(z,M){if(!await p.fs.exists(z))throw new Error("File not found: "+z);const R=h.createReadStream(z);try{const O=await this.read(R,M);return R.close(),O}catch(O){throw R.close(),O}}parseRels(z){return new B().parseStream(z)}parseWorkbook(z){return new L().parseStream(z)}parseSharedStrings(z){return new w().parseStream(z)}reconcile(z,M){const R=new L,O=new V(M),U=new Q,F=new N;R.reconcile(z);const K={media:z.media,mediaIndex:z.mediaIndex};Object.keys(z.drawings).forEach(ie=>{const oe=z.drawings[ie],ce=z.drawingRels[ie];ce&&(K.rels=ce.reduce((ee,he)=>(ee[he.Id]=he,ee),{}),(oe.anchors||[]).forEach(ee=>{const he=ee.picture&&ee.picture.hyperlinks;he&&K.rels[he.rId]&&(he.hyperlink=K.rels[he.rId].Target,delete he.rId)}),U.reconcile(oe,K))});const te={styles:z.styles};Object.values(z.tables).forEach(ie=>{F.reconcile(ie,te)});const q={styles:z.styles,sharedStrings:z.sharedStrings,media:z.media,mediaIndex:z.mediaIndex,date1904:z.properties&&z.properties.date1904,drawings:z.drawings,comments:z.comments,tables:z.tables,vmlDrawings:z.vmlDrawings};z.worksheets.forEach(ie=>{ie.relationships=z.worksheetRels[ie.sheetNo],O.reconcile(ie,q)}),delete z.worksheetHash,delete z.worksheetRels,delete z.globalRels,delete z.sharedStrings,delete z.workbookRels,delete z.sheetDefs,delete z.styles,delete z.mediaIndex,delete z.drawings,delete z.drawingRels,delete z.vmlDrawings}async _processWorksheetEntry(z,M,R,O,U){const F=new V(O),K=await F.parseStream(z);K.sheetNo=R,M.worksheetHash[U]=K,M.worksheets.push(K)}async _processCommentEntry(z,M,R){const O=new j,U=await O.parseStream(z);M.comments[`../${R}.xml`]=U}async _processTableEntry(z,M,R){const O=new N,U=await O.parseStream(z);M.tables[`../tables/${R}.xml`]=U}async _processWorksheetRelsEntry(z,M,R){const O=new B,U=await O.parseStream(z);M.worksheetRels[R]=U}async _processMediaEntry(z,M,R){const O=R.lastIndexOf(".");if(O>=1){const U=R.substr(O+1),F=R.substr(0,O);await new Promise((K,te)=>{const q=new c;q.on("finish",()=>{M.mediaIndex[R]=M.media.length,M.mediaIndex[F]=M.media.length;const ie={type:"image",name:F,extension:U,buffer:q.toBuffer()};M.media.push(ie),K()}),z.on("error",ie=>{te(ie)}),z.pipe(q)})}}async _processDrawingEntry(z,M,R){const O=new Q,U=await O.parseStream(z);M.drawings[R]=U}async _processDrawingRelsEntry(z,M,R){const O=new B,U=await O.parseStream(z);M.drawingRels[R]=U}async _processVmlDrawingEntry(z,M,R){const O=new $,U=await O.parseStream(z);M.vmlDrawings[`../drawings/${R}.vml`]=U}async _processThemeEntry(z,M,R){await new Promise((O,U)=>{const F=new c;z.on("error",U),F.on("error",U),F.on("finish",()=>{M.themes[R]=F.read().toString(),O()}),z.pipe(F)})}createInputStream(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}async read(z,M){!z[Symbol.asyncIterator]&&z.pipe&&(z=z.pipe(new l));const R=[];for await(const O of z)R.push(O);return this.load(f.concat(R),M)}async load(z,M){let R;R=M&&M.base64?f.from(z.toString(),"base64"):z;const O={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},U=await d.loadAsync(R);for(const F of Object.values(U.files))if(!F.dir){let K,te=F.name;if(te[0]==="/"&&(te=te.substr(1)),te.match(/xl\/media\//)||te.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))K=new l,K.write(await F.async("nodebuffer"));else{let q;K=new l({writableObjectMode:!0,readableObjectMode:!0}),q=v.browser?g(await F.async("nodebuffer")):await F.async("string");const ie=16384;for(let oe=0;oe<q.length;oe+=ie)K.write(q.substring(oe,oe+ie))}switch(K.end(),te){case"_rels/.rels":O.globalRels=await this.parseRels(K);break;case"xl/workbook.xml":{const q=await this.parseWorkbook(K);O.sheets=q.sheets,O.definedNames=q.definedNames,O.views=q.views,O.properties=q.properties,O.calcProperties=q.calcProperties;break}case"xl/_rels/workbook.xml.rels":O.workbookRels=await this.parseRels(K);break;case"xl/sharedStrings.xml":O.sharedStrings=new w,await O.sharedStrings.parseStream(K);break;case"xl/styles.xml":O.styles=new _,await O.styles.parseStream(K);break;case"docProps/app.xml":{const q=new T,ie=await q.parseStream(K);O.company=ie.company,O.manager=ie.manager;break}case"docProps/core.xml":{const q=new b,ie=await q.parseStream(K);Object.assign(O,ie);break}default:{let q=te.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(q){await this._processWorksheetEntry(K,O,q[1],M,te);break}if(q=te.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),q){await this._processWorksheetRelsEntry(K,O,q[1]);break}if(q=te.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),q){await this._processThemeEntry(K,O,q[1]);break}if(q=te.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),q){await this._processMediaEntry(K,O,q[1]);break}if(q=te.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),q){await this._processDrawingEntry(K,O,q[1]);break}if(q=te.match(/xl\/(comments\d+)[.]xml/),q){await this._processCommentEntry(K,O,q[1]);break}if(q=te.match(/xl\/tables\/(table\d+)[.]xml/),q){await this._processTableEntry(K,O,q[1]);break}if(q=te.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),q){await this._processDrawingRelsEntry(K,O,q[1]);break}if(q=te.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),q){await this._processVmlDrawingEntry(K,O,q[1]);break}}}}return this.reconcile(O,M),this.workbook.model=O,this.workbook}async addMedia(z,M){await Promise.all(M.media.map(async R=>{if(R.type==="image"){const O=`xl/media/${R.name}.${R.extension}`;if(R.filename){const U=await function(F,K){return new Promise((te,q)=>{h.readFile(F,K,(ie,oe)=>{ie?q(ie):te(oe)})})}(R.filename);return z.append(U,{name:O})}if(R.buffer)return z.append(R.buffer,{name:O});if(R.base64){const U=R.base64,F=U.substring(U.indexOf(",")+1);return z.append(F,{name:O,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(z,M){const R=new Q,O=new B;M.worksheets.forEach(U=>{const{drawing:F}=U;if(F){R.prepare(F,{});let K=R.toXml(F);z.append(K,{name:`xl/drawings/${F.name}.xml`}),K=O.toXml(F.rels),z.append(K,{name:`xl/drawings/_rels/${F.name}.xml.rels`})}})}addTables(z,M){const R=new N;M.worksheets.forEach(O=>{const{tables:U}=O;U.forEach(F=>{R.prepare(F,{});const K=R.toXml(F);z.append(K,{name:"xl/tables/"+F.target})})})}async addContentTypes(z,M){const R=new k().toXml(M);z.append(R,{name:"[Content_Types].xml"})}async addApp(z,M){const R=new T().toXml(M);z.append(R,{name:"docProps/app.xml"})}async addCore(z,M){const R=new b;z.append(R.toXml(M),{name:"docProps/core.xml"})}async addThemes(z,M){const R=M.themes||{theme1:X};Object.keys(R).forEach(O=>{const U=R[O],F=`xl/theme/${O}.xml`;z.append(U,{name:F})})}async addOfficeRels(z){const M=new B().toXml([{Id:"rId1",Type:W.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:W.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:W.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);z.append(M,{name:"_rels/.rels"})}async addWorkbookRels(z,M){let R=1;const O=[{Id:"rId"+R++,Type:W.RelType.Styles,Target:"styles.xml"},{Id:"rId"+R++,Type:W.RelType.Theme,Target:"theme/theme1.xml"}];M.sharedStrings.count&&O.push({Id:"rId"+R++,Type:W.RelType.SharedStrings,Target:"sharedStrings.xml"}),M.worksheets.forEach(F=>{F.rId="rId"+R++,O.push({Id:F.rId,Type:W.RelType.Worksheet,Target:`worksheets/sheet${F.id}.xml`})});const U=new B().toXml(O);z.append(U,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(z,M){M.sharedStrings&&M.sharedStrings.count&&z.append(M.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(z,M){const{xml:R}=M.styles;R&&z.append(R,{name:"xl/styles.xml"})}async addWorkbook(z,M){const R=new L;z.append(R.toXml(M),{name:"xl/workbook.xml"})}async addWorksheets(z,M){const R=new V,O=new B,U=new j,F=new $;M.worksheets.forEach(K=>{let te=new A;R.render(te,K),z.append(te.xml,{name:`xl/worksheets/sheet${K.id}.xml`}),K.rels&&K.rels.length&&(te=new A,O.render(te,K.rels),z.append(te.xml,{name:`xl/worksheets/_rels/sheet${K.id}.xml.rels`})),K.comments.length>0&&(te=new A,U.render(te,K),z.append(te.xml,{name:`xl/comments${K.id}.xml`}),te=new A,F.render(te,K),z.append(te.xml,{name:`xl/drawings/vmlDrawing${K.id}.vml`}))})}_finalize(z){return new Promise((M,R)=>{z.on("finish",()=>{M(this)}),z.on("error",R),z.finalize()})}prepareModel(z,M){z.creator=z.creator||"ExcelJS",z.lastModifiedBy=z.lastModifiedBy||"ExcelJS",z.created=z.created||new Date,z.modified=z.modified||new Date,z.useSharedStrings=M.useSharedStrings===void 0||M.useSharedStrings,z.useStyles=M.useStyles===void 0||M.useStyles,z.sharedStrings=new w,z.styles=z.useStyles?new _(!0):new _.Mock;const R=new L,O=new V;R.prepare(z);const U={sharedStrings:z.sharedStrings,styles:z.styles,date1904:z.properties.date1904,drawingsCount:0,media:z.media};U.drawings=z.drawings=[],U.commentRefs=z.commentRefs=[];let F=0;z.tables=[],z.worksheets.forEach(K=>{K.tables.forEach(te=>{F++,te.target=`table${F}.xml`,te.id=F,z.tables.push(te)}),O.prepare(K,U)})}async write(z,M){M=M||{};const{model:R}=this.workbook,O=new u.ZipWriter(M.zip);return O.pipe(z),this.prepareModel(R,M),await this.addContentTypes(O,R),await this.addOfficeRels(O,R),await this.addWorkbookRels(O,R),await this.addWorksheets(O,R),await this.addSharedStrings(O,R),await this.addDrawings(O,R),await this.addTables(O,R),await Promise.all([this.addThemes(O,R),this.addStyles(O,R)]),await this.addMedia(O,R),await Promise.all([this.addApp(O,R),this.addCore(O,R)]),await this.addWorkbook(O,R),this._finalize(O)}writeFile(z,M){const R=h.createWriteStream(z);return new Promise((O,U)=>{R.on("finish",()=>{O()}),R.on("error",F=>{U(F)}),this.write(R,M).then(()=>{R.end()}).catch(F=>{U(F)})})}async writeBuffer(z){const M=new c;return await this.write(M,z),M.read()}}W.RelType=a("./rel-type"),C.exports=W}).call(this)}).call(this,a("_process"),a("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":24,"../utils/utils":27,"../utils/xml-stream":28,"../utils/zip-stream":29,"./rel-type":31,"./xform/book/workbook-xform":38,"./xform/comment/comments-xform":40,"./xform/comment/vml-notes-xform":45,"./xform/core/app-xform":51,"./xform/core/content-types-xform":52,"./xform/core/core-xform":53,"./xform/core/relationships-xform":55,"./xform/drawing/drawing-xform":62,"./xform/sheet/worksheet-xform":115,"./xform/strings/shared-strings-xform":124,"./xform/style/styles-xform":135,"./xform/table/table-xform":143,"./xml/theme1":145,_process:467,buffer:220,fs:216,jszip:441,"readable-stream":491}],145:[function(a,C,S){C.exports=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
579
579
  <a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"> <a:themeElements> <a:clrScheme name="Office"> <a:dk1> <a:sysClr val="windowText" lastClr="000000"/> </a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/> </a:lt1> <a:dk2> <a:srgbClr val="1F497D"/> </a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/> </a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/> </a:accent1> <a:accent2> <a:srgbClr val="C0504D"/> </a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/> </a:accent3> <a:accent4> <a:srgbClr val="8064A2"/> </a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/> </a:accent5> <a:accent6> <a:srgbClr val="F79646"/> </a:accent6> <a:hlink> <a:srgbClr val="0000FF"/> </a:hlink> <a:folHlink> <a:srgbClr val="800080"/> </a:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </a:lnStyleLst> <a:effectStyleLst> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="38000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> <a:scene3d> <a:camera prst="orthographicFront"> <a:rot lat="0" lon="0" rev="0"/> </a:camera> <a:lightRig rig="threePt" dir="t"> <a:rot lat="0" lon="0" rev="1200000"/> </a:lightRig> </a:scene3d> <a:sp3d> <a:bevelT w="63500" h="25400"/> </a:sp3d> </a:effectStyle> </a:effectStyleLst> <a:bgFillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="40000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="40000"> <a:schemeClr val="phClr"> <a:tint val="45000"/> <a:shade val="99000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="20000"/> <a:satMod val="255000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="-80000" r="50000" b="180000"/> </a:path> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="80000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="30000"/> <a:satMod val="200000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="50000" r="50000" b="50000"/> </a:path> </a:gradFill> </a:bgFillStyleLst> </a:fmtScheme> </a:themeElements> <a:objectDefaults> <a:spDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="1"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="3"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="2"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="lt1"/> </a:fontRef> </a:style> </a:spDef> <a:lnDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="2"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="0"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="1"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="tx1"/> </a:fontRef> </a:style> </a:lnDef> </a:objectDefaults> <a:extraClrSchemeLst/> </a:theme>`},{}],146:[function(a,C,S){(function(v){(function(){Object.defineProperty(S,"__esModule",{value:!0}),S.CsvFormatterStream=void 0;const f=a("stream"),h=a("./formatter");class d extends f.Transform{constructor(u){super({writableObjectMode:u.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=u,this.rowFormatter=new h.RowFormatter(u),this.hasWrittenBOM=!u.writeBOM}transform(u){return this.rowFormatter.rowTransform=u,this}_transform(u,c,p){let A=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(u,(g,_)=>g?(A=!0,p(g)):(_&&_.forEach(b=>{this.push(v.from(b,"utf8"))}),A=!0,p()))}catch(g){if(A)throw g;p(g)}}_flush(u){this.rowFormatter.finish((c,p)=>c?u(c):(p&&p.forEach(A=>{this.push(v.from(A,"utf8"))}),u()))}}S.CsvFormatterStream=d}).call(this)}).call(this,a("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(a,C,S){Object.defineProperty(S,"__esModule",{value:!0}),S.FormatterOptions=void 0,S.FormatterOptions=class{constructor(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var f;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=`
580
580
  `,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,v||{}),(v==null?void 0:v.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(v==null?void 0:v.quote)===!0?this.quote='"':(v==null?void 0:v.quote)===!1&&(this.quote=""),typeof(v==null?void 0:v.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((f=v.writeHeaders)===null||f===void 0||f),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(a,C,S){var v=function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(S,"__esModule",{value:!0}),S.FieldFormatter=void 0;const f=v(a("lodash.isboolean")),h=v(a("lodash.isnil")),d=v(a("lodash.escaperegexp"));S.FieldFormatter=class{constructor(l){this._headers=null,this.formatterOptions=l,l.headers!==null&&(this.headers=l.headers),this.REPLACE_REGEXP=new RegExp(l.quote,"g");const u=`[${l.delimiter}${d.default(l.rowDelimiter)}|\r|