eDrawings
Components
Sheets
Layers
Tables
Configuration
Hide/Show
Transparent/Solid
Hide Others
Show All
Remove
Clear
Model viewing failed. Please reload to try again. If the failure persists, please report the information below to customer support.
Server:
Model ID:
Drop your content here
Or

Connection timed-out. Reload the page to continue.

arentJQ){var pos=scrollParentJQ.scrollTop()+targetJQ.position().top;eDwUIUtils.scrollToTarget(scrollParentJQ,pos,menuHidden?"none":"slow")}targetJQ.removeAttr("inhibitScroll");eDwUIUtils.hide("#edrawings-component-tree-menu",menuHidden)})}};eDwUIBaseEventHandlers.prototype.handleSelectionChange=function(iViewer,iSelObj,iIsObjSelected){if(!iSelObj)return;this.setTreeNodeSelected(iViewer,iSelObj,iIsObjSelected)};eDwUIBaseEventHandlers.prototype.handleNodeAttribChange=function(iViewer,iHierNodesAndAttribs){eDwUIUtils.updateIcons(iHierNodesAndAttribs)};eDwUIBaseEventHandlers.prototype.populateMBDNotes=function(iViewer){var _this=this;var model=iViewer.getModel();var modelHC=model.getHCModel();var viewHC=iViewer.getHCView();var modelViews=model.getModelViews();var _loop_1=function(modelView){var hierNode=modelView.Hierarchy;var children=modelHC.getNodeChildren(hierNode.HOOPSID);var count=children.length;var modelIDs=[];var noteIDs=[];for(var j=0;jcanvasWidth){posx=canvasWidth-menuWidth-5}var posy=iY;if(posy+menuHeight>canvasHeight){posy=canvasHeight-menuHeight-5}contextMenu.css({top:posy+"px",left:posx+"px"});eDwUIUtils.hide("#edrawings-context-menu",false)};eDwUIContextMenu.prototype.hide=function(){eDwUIUtils.hide("#edrawings-context-menu",true)};return eDwUIContextMenu}();return eDwUIContextMenu});define("eDwUIDebugHTMLGenerator",["require","exports","eDwUIHTMLGenerator"],function(require,exports,eDwUIHTMLGenerator){"use strict";var eDwUIDebugHTMLGenerator=function(_super){__extends(eDwUIDebugHTMLGenerator,_super);function eDwUIDebugHTMLGenerator(iViewer,iPanelUIID){var _this=_super.call(this,iViewer,iPanelUIID)||this;_this.mHCModel=iViewer.getModel().getHCModel();return _this}eDwUIDebugHTMLGenerator.prototype.getNodeFromID=function(iNodeID){return getHCNode(iNodeID)};eDwUIDebugHTMLGenerator.prototype.getPostSpanHTML=function(iAdditionalClasses){return""};eDwUIDebugHTMLGenerator.prototype.forNodeGetName=function(iNode){return this.mHCModel.getNodeName(getHCNode(iNode))};eDwUIDebugHTMLGenerator.prototype.forNodeGetID=function(iNode){return getHCNode(iNode)};eDwUIDebugHTMLGenerator.prototype.forNodeGetParentID=function(iNode){return this.mHCModel.getNodeParent(getHCNode(iNode))};eDwUIDebugHTMLGenerator.prototype.forNodeGetChildren=function(iNode){return this.mHCModel.getNodeChildren(getHCNode(iNode))};eDwUIDebugHTMLGenerator.prototype.forNodeHasChildren=function(iNode){return this.forNodeGetChildren(iNode).length>0};eDwUIDebugHTMLGenerator.prototype.forNodeGetDataAttributes=function(iNode){return _super.prototype.forNodeGetDataAttributes.call(this,iNode)};eDwUIDebugHTMLGenerator.prototype.forNodeGetElementContent=function(iNode){var nodeHCID=this.forNodeGetID(iNode);return this.forNodeGetName(iNode)+" ID: "+nodeHCID+" TYPE: "+this.mHCModel.getNodeType(nodeHCID)};eDwUIDebugHTMLGenerator.prototype.forNodeGetDisplayStateCSSClass=function(iNode){return"edrawings-body-visible"};return eDwUIDebugHTMLGenerator}(eDwUIHTMLGenerator);function isHCNode(iNode){return!isNaN(iNode)}function getHCNode(iNode){if(!isHCNode(iNode)){throw new Error("Not an HC node:\n"+JSON.stringify(iNode))}return iNode}return eDwUIDebugHTMLGenerator});define("eDwUIHTMLEventMgr",["require","exports"],function(require,exports){"use strict";var eDwUIHTMLEventMgr=function(){function eDwUIHTMLEventMgr(){this.mEventHandlerData={}}eDwUIHTMLEventMgr.prototype.addDelegatedEventHandler=function(iElemSelector,iEventName,iEventHandler){if(!iElemSelector||!iEventName||!iEventHandler)return false;var selectors=iElemSelector.split(" ");if(selectors.length<2)return false;var ancestorElementID=selectors.shift();var ancestorElementJQ=$(ancestorElementID);if(!ancestorElementJQ)return false;var ancestorElement=$(ancestorElementJQ)[0];if(!ancestorElement)return false;return this.commonAddEventHandler(ancestorElementJQ,iEventName,iEventHandler,selectors.join().replace(".",""))};eDwUIHTMLEventMgr.prototype.addEventHandler=function(iElemID,iEventName,iEventHandler){if(!iElemID||!iEventName||!iEventHandler)return false;var elementJQ;if(iElemID==="window"){elementJQ=$(window);elementJQ[0].id="window";elementJQ[0].className="";elementJQ[0].nodeType=Node.ELEMENT_NODE}else if(iElemID==="document"){elementJQ=$(document);elementJQ[0].id="document";elementJQ[0].className=""}else{elementJQ=$(iElemID)}if(!elementJQ)return false;var element=$(elementJQ)[0];if(!element)return false;return this.commonAddEventHandler(elementJQ,iEventName,iEventHandler)};eDwUIHTMLEventMgr.prototype.removeAllEventHandlers=function(){for(var eventName in this.mEventHandlerData){if(this.mEventHandlerData.hasOwnProperty(eventName)){var handlersOfEvent=this.mEventHandlerData[eventName];for(var elemID in handlersOfEvent){if(handlersOfEvent.hasOwnProperty(elemID)){this.removeEventHandlersByID(elemID,eventName,handlersOfEvent)}}this.mEventHandlerData[eventName]={}}}this.mEventHandlerData={}};eDwUIHTMLEventMgr.prototype.removeEventHandlers=function(iElemID,iEventName){var handlersRemoved=false;if(this.mEventHandlerData.hasOwnProperty(iEventName)){var handlersOfEvent=this.mEventHandlerData[iEventName];if(handlersOfEvent.hasOwnProperty(iElemID)){handlersRemoved=this.removeEventHandlersByID(iElemID,iEventName,handlersOfEvent)}}return handlersRemoved};eDwUIHTMLEventMgr.prototype.commonAddEventHandler=function(iElementJQ,iEventName,iEventHandler,iElemClasses){if(iElemClasses===void 0){iElemClasses=""}if(!iElementJQ||!$(iElementJQ))return false;var element=$(iElementJQ)[0];if(!element)return false;var eventHandlerData=this.mEventHandlerData;var handlersOfEvent=eventHandlerData[iEventName];if(!handlersOfEvent){handlersOfEvent=eventHandlerData[iEventName]={}}var elemHandlers=handlersOfEvent[element.id];if(!elemHandlers){elemHandlers=handlersOfEvent[element.id]={MainDispatcher:null,Handlers:[]}}if(elemHandlers.MainDispatcher){element.removeEventListener(iEventName,elemHandlers.MainDispatcher,true)}elemHandlers.MainDispatcher=function(ioEvent){eventDispatcher(ioEvent,elemHandlers.Handlers)};element.addEventListener(iEventName,elemHandlers.MainDispatcher,true);elemHandlers.Handlers.push({Element:element,TargetElemClasses:iElemClasses,Handler:iEventHandler});console.debugLog("UIEvents","Event name = "+iEventName+", id = "+element.id+", classes = "+iElemClasses+", Num handlers = "+elemHandlers.Handlers.length);return true};eDwUIHTMLEventMgr.prototype.removeEventHandlersByID=function(iElemID,iEventName,ioHandlersOfEvent){var handlersRemoved=false;var elemHandlers=ioHandlersOfEvent[iElemID];if(!elemHandlers){elemHandlers=ioHandlersOfEvent[iElemID]={MainDispatcher:null,Handlers:[]}}if(elemHandlers.Handlers.length){var handler=elemHandlers.Handlers[0];handler.Element.removeEventListener(iEventName,elemHandlers.MainDispatcher,true);handlersRemoved=true}return handlersRemoved};return eDwUIHTMLEventMgr}();function eventDispatcher(ioEvent,iHandlerObjs){var handlers=iHandlerObjs;if(!iHandlerObjs||!iHandlerObjs.length)return;console.debugLog("UIEvents","Event = "+ioEvent.type+", Num handlers = "+iHandlerObjs.length);var runHandler=false;var eventTarget=ioEvent.target;while(eventTarget&&!runHandler){for(var i=0;i-1?"":" edrawings-list-option ";var highlight=this.getHighlightClass(iNode);var currOffset=iLeftPaddingInPX===undefined?this.mInitialLeftPaddingInPX+"px":iLeftPaddingInPX+"px";var generatedHTML="
";generatedHTML+=this.getPreSpanHTML(iNode,additionalClasses,expanded,iIgnoreChildren);generatedHTML+=""+this.forNodeGetElementContent(iNode)+"";generatedHTML+=this.getPostSpanHTML(nonRootClass+" "+additionalClasses);generatedHTML+="
";return generatedHTML};eDwUIHTMLGenerator.prototype.getNodeFromID=function(iNodeID){var modelViews=this.mViewer.getModel().getModelViews();for(var _i=0,modelViews_6=modelViews;_i
";return generatedHTML};eDwUIHTMLGenerator.prototype.getPostSpanHTML=function(iAdditionalClasses){return"
"};eDwUIHTMLGenerator.prototype.forNodeGetName=function(iNode){return getHierarchyNode(iNode).Name};eDwUIHTMLGenerator.prototype.forNodeGetID=function(iNode){return getHierarchyNode(iNode).HOOPSID};eDwUIHTMLGenerator.prototype.forNodeGetParentID=function(iNode){var parentHierNode=getHierarchyNode(iNode).ParentNode;return parentHierNode?parentHierNode.HOOPSID:undefined};eDwUIHTMLGenerator.prototype.forNodeGetChildren=function(iNode){var childrenObj=getHierarchyNode(iNode).getChildren();return Object.keys(childrenObj).map(function(key){return childrenObj[key]})};eDwUIHTMLGenerator.prototype.forNodeHasChildren=function(iNode){return this.forNodeGetChildren(iNode).length>0};eDwUIHTMLGenerator.prototype.forNodeGetDataAttributes=function(iNode){var parentNodeID=this.forNodeGetParentID(iNode);return" data-hoopsid='"+this.forNodeGetID(iNode)+"' "+(parentNodeID!==undefined?"data-hoopsparentid='"+parentNodeID+"' ":"")};eDwUIHTMLGenerator.prototype.forNodeGetElementContent=function(iNode){return this.forNodeGetName(iNode)};eDwUIHTMLGenerator.prototype.forNodeGetDisplayStateCSSClass=function(iNode){return eDwUIHTMLGenerator.getDisplayStateCSSClass(getHierarchyNode(iNode))};return eDwUIHTMLGenerator}();function isHierarchyNode(iNode){return iNode.Name}function getHierarchyNode(iNode){if(!isHierarchyNode(iNode)){throw new Error("Not a hierarchy node:\n"+JSON.stringify(iNode))}return iNode}return eDwUIHTMLGenerator});define("eDwUILayerHTMLGenerator",["require","exports","eDwUIHTMLGenerator"],function(require,exports,eDwUIHTMLGenerator){"use strict";var eDwUILayerHTMLGenerator=function(_super){__extends(eDwUILayerHTMLGenerator,_super);function eDwUILayerHTMLGenerator(iViewer,iPanelUIID){return _super.call(this,iViewer,iPanelUIID)||this}eDwUILayerHTMLGenerator.prototype.generateHTML=function(iAdditionalClasses){return __awaiter(this,void 0,void 0,function(){var generatedHTML,activeModelView,layerNodes,_i,layerNodes_1,layerNode;return __generator(this,function(_a){generatedHTML="";activeModelView=this.mViewer.getModel().getActiveModelView();if(activeModelView&&activeModelView.Hierarchy){layerNodes=activeModelView.Hierarchy.findNodes("Category","layer");if(layerNodes.length){generatedHTML+="
"+" "+""+"Select all
"}for(_i=0,layerNodes_1=layerNodes;_i"};eDwUILayerHTMLGenerator.prototype.getPostSpanHTML=function(iAdditionalClasses){return""};return eDwUILayerHTMLGenerator}(eDwUIHTMLGenerator);return eDwUILayerHTMLGenerator});define("eDwUIMarkupHTMLGenerator",["require","exports","eDwUIHTMLGenerator"],function(require,exports,eDwUIHTMLGenerator){"use strict";var eDwUIMarkupHTMLGenerator=function(_super){__extends(eDwUIMarkupHTMLGenerator,_super);function eDwUIMarkupHTMLGenerator(iViewer,iPanelUIID){return _super.call(this,iViewer,iPanelUIID)||this}eDwUIMarkupHTMLGenerator.prototype.generateHTML=function(iAdditionalClasses){return __awaiter(this,void 0,void 0,function(){var generatedHTML,markupMgr,keys,i,view;return __generator(this,function(_a){generatedHTML="";markupMgr=this.mViewer.HCViewer.getMarkupManager();keys=markupMgr.getMarkupViewKeys();for(i=0;i"+"
"+""+view.getName()+""}return[2,generatedHTML]})})};return eDwUIMarkupHTMLGenerator}(eDwUIHTMLGenerator);return eDwUIMarkupHTMLGenerator});define("eDwUIMeasureHTMLGenerator",["require","exports","eDwUIHTMLGenerator"],function(require,exports,eDwUIHTMLGenerator){"use strict";var eDwUIMeasureHTMLGenerator=function(_super){__extends(eDwUIMeasureHTMLGenerator,_super);function eDwUIMeasureHTMLGenerator(iViewer,iPanelUIID){return _super.call(this,iViewer,iPanelUIID)||this}eDwUIMeasureHTMLGenerator.prototype.setMeasureResult=function(iMeasureResult){this.mMeasureResult=iMeasureResult};eDwUIMeasureHTMLGenerator.prototype.generateHTML=function(iAdditionalClasses){return __awaiter(this,void 0,void 0,function(){var generatedHTML,model,fCount,lCount,pCount,i,obj,faceEntity,lineEntity,pointEntity,nodeId,eType,count,highlight,status_1;return __generator(this,function(_a){switch(_a.label){case 0:generatedHTML="";model=this.mViewer.getModel().getHCModel();fCount=0,lCount=0,pCount=0;i=0;_a.label=1;case 1:if(!(i"+"
"+""+eType+" -"+count+"\n"+""+""+this.mMeasureResult.Descriptions[i]+"
"+" ";_a.label=9;case 9:++i;return[3,1];case 10:return[2,generatedHTML]}})})};return eDwUIMeasureHTMLGenerator}(eDwUIHTMLGenerator);return eDwUIMeasureHTMLGenerator});define("eDwUIMessageReporter",["require","exports","jquery","eDwEventMgr","eDwUIUtils","utils"],function(require,exports,$,eDwEventMgr,eDwUIUtils,utils){"use strict";var _this=this;var eDwUIMessageReporter=function(){function eDwUIMessageReporter(){}eDwUIMessageReporter.showServerLoadErrorPanel=function(iServerID,iModelCacheName){l_addParagraphToPanelText({},"edrawings-server-load-failure-1");l_addParagraphToPanelText({"server-id":iServerID},"edrawings-server-load-failure-2");l_addParagraphToPanelText({"model-cache-name":iModelCacheName},"edrawings-server-load-failure-3");eDwUIMessageReporter.showMessagePanel("",true,false,"edrawings-error-title edrawings-dialog-no-close")};eDwUIMessageReporter.showResultPanel=function(iResult){var showButtons=false;if(utils.isOfType(iResult,"ServerID")){showButtons=eDwUIMessageReporter.showConversionResultPanel(iResult)}else{switch(iResult.ErrorCode){default:showButtons=eDwUIMessageReporter.showPanelGeneric(iResult);break}}return showButtons};eDwUIMessageReporter.showMessagePanel=function(iMsg,iModal,iShowButtons,iDlgClasses){if(iMsg===void 0){iMsg=""}if(iModal===void 0){iModal=true}if(iShowButtons===void 0){iShowButtons=false}if(iDlgClasses===void 0){iDlgClasses="edrawings-info-title edrawings-dialog-no-close"}var msgPanelText=$("#edrawings-dialog-panel-text");if(iMsg)msgPanelText.html(iMsg);var opts={modal:iModal,width:window.innerWidth*.6,minWidth:200,dialogClass:iDlgClasses,closeOnEscape:iShowButtons};var msgPanel=$("#edrawings-dialog-panel");if(iShowButtons){$.extend(opts,{buttons:{Ok:function(){msgPanel.dialog("close")}},close:function(iEvent){$(".edrawings-dialog-content").remove()}})}msgPanel.dialog(opts);if(iDlgClasses.indexOf("edrawings")>-1&&iDlgClasses.indexOf("title")>-1){var msgPanelTitle=msgPanel.prev().find(".ui-dialog-title");msgPanelTitle.text(eDwUIUtils.getCSSContent(msgPanelTitle))}};eDwUIMessageReporter.showConversionResultPanel=function(iResult){var showButtons=l_shouldShowButtons();switch(iResult.ErrorCode){case"URLNotAccessible":l_addParagraphToPanelText({"file-url":iResult.ErrorData[0]},"edrawings-server-url-inaccessible");eDwUIMessageReporter.showMessagePanel("",true,false,"edrawings-error-title edrawings-dialog-no-close");break;case"UnsupportedFileType":l_addParagraphToPanelText({file:iResult.FileName},"edrawings-server-unsupported-file-type");eDwUIMessageReporter.showMessagePanel("",true,showButtons,"edrawings-error-title edrawings-dialog-no-close");break;default:if(l_isDebug()){eDwUIMessageReporter.showPanelGeneric(iResult)}else{eDwUIMessageReporter.showServerLoadErrorPanel(iResult.ServerID,iResult.ModelCacheName)}break}return showButtons};eDwUIMessageReporter.showPanelGeneric=function(iResult){var showButtons=l_shouldShowButtons();switch(iResult.ErrorCode){case"AJAXFailure":l_addParagraphToPanelText({},"edrawings-server-ajax-failure");eDwUIMessageReporter.showMessagePanel("",true,false,"edrawings-error-title edrawings-dialog-no-close");break;case"IncompleteFileProcessing":l_addParagraphToPanelText({},"edrawings-unable-process-file");eDwUIMessageReporter.showMessagePanel("",true,true,"edrawings-error-title edrawings-dialog-no-close");break;default:var msg="
"+iResult.ErrorCode+"
";for(var _i=0,_a=iResult.ErrorData;_i<_a.length;_i++){var data=_a[_i];msg+="
"+data+"
"}eDwUIMessageReporter.showMessagePanel(msg,true);break}return showButtons};return eDwUIMessageReporter}();eDwEventMgr.get().addEventHandlerFunc("LoadUIPanel",function(){(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){eDwUIUtils.loadPanel("#edrawings-dialog-panel","dialogpanel.html");return[2]})})})()});function l_addParagraphToPanelText(iOptions,iTextClass){var msgPanelText=$("#edrawings-dialog-panel-text");var elemJQ=$("
");msgPanelText.append(elemJQ);elemJQ.attr(iOptions)}function l_shouldShowButtons(){var viewerFeatOpts={DragDrop:false};eDwUIUtils.getRequestedQueryStringParams(location.href,viewerFeatOpts,false);return viewerFeatOpts.DragDrop}function l_isDebug(){var viewerFeatOpts={Debug:false};eDwUIUtils.getRequestedQueryStringParams(location.href,viewerFeatOpts,false);return viewerFeatOpts.Debug}return eDwUIMessageReporter});define("eDwUIModelViewHTMLGenerator",["require","exports","eDwUIHTMLGenerator"],function(require,exports,eDwUIHTMLGenerator){"use strict";var eDwUIModelViewHTMLGenerator=function(_super){__extends(eDwUIModelViewHTMLGenerator,_super);function eDwUIModelViewHTMLGenerator(iViewer,iPanelUIID){return _super.call(this,iViewer,iPanelUIID)||this}eDwUIModelViewHTMLGenerator.prototype.generateHTML=function(iAdditionalClasses){return __awaiter(this,void 0,void 0,function(){var generatedHTML,modelViews,_i,modelViews_7,modelView,modelViewHierNode;return __generator(this,function(_a){generatedHTML="";modelViews=this.mViewer.getModel().getModelViews();for(_i=0,modelViews_7=modelViews;_i"+""+modelView.Name+""}return generatedHTML};eDwUIModelViewTabHTMLGenerator.prototype.shouldIncludeNode=function(iHierNode){if(iHierNode.Category==="layer"||iHierNode.Category==="table"){return false}return _super.prototype.shouldIncludeNode.call(this,iHierNode)};return eDwUIModelViewTabHTMLGenerator}(eDwUIHTMLGenerator);return eDwUIModelViewTabHTMLGenerator});define("eDwUISheetTreeHTMLGenerator",["require","exports","eDwUIHTMLGenerator"],function(require,exports,eDwUIHTMLGenerator){"use strict";var eDwUISheetTreeHTMLGenerator=function(_super){__extends(eDwUISheetTreeHTMLGenerator,_super);function eDwUISheetTreeHTMLGenerator(iViewer,iPanelUIID){return _super.call(this,iViewer,iPanelUIID)||this}eDwUISheetTreeHTMLGenerator.prototype.shouldIncludeNode=function(iHierNode){if(iHierNode.Category==="layer")return false;return _super.prototype.shouldIncludeNode.call(this,iHierNode)};return eDwUISheetTreeHTMLGenerator}(eDwUIHTMLGenerator);return eDwUISheetTreeHTMLGenerator});define("eDwUITableHTMLGenerator",["require","exports","eDwUIHTMLGenerator"],function(require,exports,eDwUIHTMLGenerator){"use strict";var eDwUITableHTMLGenerator=function(_super){__extends(eDwUITableHTMLGenerator,_super);function eDwUITableHTMLGenerator(iViewer,iPanelUIID){return _super.call(this,iViewer,iPanelUIID)||this}eDwUITableHTMLGenerator.prototype.generateHTML=function(iAdditionalClasses){return __awaiter(this,void 0,void 0,function(){var generatedHTML,activeModelView,tableNodes,_i,tableNodes_1,tableNode;return __generator(this,function(_a){generatedHTML="";activeModelView=this.mViewer.getModel().getActiveModelView();if(activeModelView&&activeModelView.Hierarchy){tableNodes=activeModelView.Hierarchy.findNodes("Category","table");for(_i=0,tableNodes_1=tableNodes;_i-1){var hierNode=iViewer.getModel().getHierarchyNode(iID);if(hierNode){return{node:$("span[data-hoopsid='"+hierNode.HOOPSID+"']"),ownerDiv:$("div[data-hoopsid='"+hierNode.HOOPSID+"']")}}}return null}exports.getListElements=getListElements;function createUIGenerators(iViewer){var panelID="#edrawings-component-tree-menu";l_generators[panelID]=new eDwUICompTreeHTMLGenerator(iViewer,panelID);panelID="#edrawings-sheet-tree-menu";l_generators[panelID]=new eDwUISheetTreeHTMLGenerator(iViewer,panelID);panelID="#edrawings-layer-control-menu";l_generators[panelID]=new eDwUILayerHTMLGenerator(iViewer,panelID);panelID="#edrawings-tables-menu";l_generators[panelID]=new eDwUITableHTMLGenerator(iViewer,panelID);panelID="#edrawings-config-navigation";l_generators[panelID]=new eDwUIModelViewHTMLGenerator(iViewer,panelID);panelID="#edrawings-configurations-menu";l_generators[panelID]=new eDwUIModelViewHTMLGenerator(iViewer,panelID);panelID="#edrawings-config-tab-list";l_generators[panelID]=new eDwUIModelViewTabHTMLGenerator(iViewer,panelID);panelID="#edrawings-debug-menu";l_generators[panelID]=new eDwUIDebugHTMLGenerator(iViewer,panelID);panelID="#edrawings-annot-control-menu";l_generators[panelID]=new eDwUIAnnotHTMLGenerator(iViewer,panelID);panelID="#edrawings-markup-menu";l_generators[panelID]=new eDwUIMarkupHTMLGenerator(iViewer,panelID);panelID="#edrawings-measure-menu";l_generators[panelID]=new eDwUIMeasureHTMLGenerator(iViewer,panelID)}exports.createUIGenerators=createUIGenerators;function getUIGenerator(iName){return l_generators[iName]}exports.getUIGenerator=getUIGenerator;function getUIPanelID(iTarget){var panelJQ=iTarget.closest(".edrawings-submenu");return panelJQ?"#"+panelJQ[0].id:""}exports.getUIPanelID=getUIPanelID;function updateUI(iViewer,iModelView){return __awaiter(this,void 0,void 0,function(){function regenList(iList,iHTML){iList.empty();iList.append(iHTML)}var list,gen,listHTML,list,gen,modelViews,_i,modelViews_9,modelView;return __generator(this,function(_a){switch(_a.label){case 0:if(!iViewer)return[3,7];return[4,l_populateLayerPanel(iViewer)];case 1:_a.sent();return[4,populateModelViewPanel(iViewer,"#edrawings-configurations-menu","config-tree-text")];case 2:_a.sent();if(iViewer.ViewerFeatureOpts.Debug)l_populateDebugPanel(iViewer);if(!iViewer.ViewerFeatureOpts.Annot)return[3,4];return[4,l_populateAnnotPanel(iViewer)];case 3:_a.sent();_a.label=4;case 4:if(!iViewer.TableMgr.numTables())return[3,6];return[4,l_populateTablesPanel(iViewer)];case 5:_a.sent();_a.label=6;case 6:if(iModelView){if(iModelView.Category==="config"){list=$("#edrawings-component-tree-menu .edrawings-submenu-list");gen=getUIGenerator("#edrawings-component-tree-menu");regenList(list,gen.generateHTMLForChildNodes(iModelView.Hierarchy,false))}else{listHTML="";list=$("#edrawings-sheet-tree-menu .edrawings-submenu-list");gen=getUIGenerator("#edrawings-sheet-tree-menu");modelViews=iViewer.getModel().getModelViews();for(_i=0,modelViews_9=modelViews;_i0){var viewTab=targetSpans.filter(iFilter);if(viewTab.length>0){viewTab.parent().addClass(iTargetClass)}}}exports.updateModelViewTargets=updateModelViewTargets;function activatePanelResizeInput(iPanelID,iInputEventIDSuffix,iHandlers){var mouseDown="mousedown"+iInputEventIDSuffix;var mouseMove="mousemove"+iInputEventIDSuffix;var mouseUp="mouseup"+iInputEventIDSuffix;$(document).on(mouseDown,".edrawings-menu-resizer",function(iEvent){var msg="Panel resize: "+mouseDown;console.debugLog("UIPanelResize",msg);iEvent.preventDefault();var origMouseX=iEvent.clientX;var origMenuWidth=$(iPanelID).width();$(document).on(mouseMove,function(iEvent){var pressedLMB=eDwKeyMgr.get().isLMBPressed(iEvent);var msg="Panel resize LMB "+mouseMove+": ";msg+=pressedLMB?"true":"false";console.debugLog("UIPanelResize",msg);if(!pressedLMB)return;iEvent.preventDefault();iHandlers.onResizePanel(iEvent,iPanelID,origMouseX,origMenuWidth);iEvent.stopImmediatePropagation()});iEvent.stopImmediatePropagation()});$(document).on(mouseUp,function(iEvent){var msg="Panel resize: "+mouseUp;console.debugLog("UIPanelResize",msg);iEvent.preventDefault();$(document).off(mouseMove)})}exports.activatePanelResizeInput=activatePanelResizeInput;function deactivateMoveInput(iInputEventIDSuffix){$(document).off("mousemove"+iInputEventIDSuffix);$(document).off("mousedown"+iInputEventIDSuffix);$(document).off("mouseup"+iInputEventIDSuffix)}exports.deactivateMoveInput=deactivateMoveInput;function loadComponentHTML(iViewerOpts){l_loadContextMenu();l_loadSheetTreePanel();l_loadLayerPanel();l_loadAnnotPanel();l_loadTablesPanel();l_loadDebugPanel();if(iViewerOpts.Tree){l_loadComponentTreePanel()}l_loadConfigPanel();if(iViewerOpts.Measure){l_loadMeasurePanel()}l_loadMarkupPanel();eDwEventMgr.get().fireEvents("LoadUIPanel")}exports.loadComponentHTML=loadComponentHTML;function inhibitEventBehavior(iEvent){iEvent.preventDefault();iEvent.stopPropagation()}exports.inhibitEventBehavior=inhibitEventBehavior;function getCurrentMeasureMode(){var vertexEnabled=l_isActive("#edrawings-measure-vertex-button")?eDwTypes_24.MeasureMode.VERTEX:0;var edgeEnabled=l_isActive("#edrawings-measure-edge-button")?eDwTypes_24.MeasureMode.EDGE:0;var faceEnabled=l_isActive("#edrawings-measure-face-button")?eDwTypes_24.MeasureMode.FACE:0;var holeEnabled=l_isActive("#edrawings-measure-hole-button")?eDwTypes_24.MeasureMode.HOLE:0;return vertexEnabled|edgeEnabled|faceEnabled|holeEnabled}exports.getCurrentMeasureMode=getCurrentMeasureMode;function syncMeasureModeUI(iMeasureMgr){function setMeasureButton(iID,iMeasureModes,iTargetModes){var method=iMeasureModes&iTargetModes?"addClass":"removeClass";$(iID)[method]("active-button")}$("#edrawings-measure-distant-unit").val(iMeasureMgr.getDistanceUnit());$("#edrawings-measure-angle-unit").val(iMeasureMgr.getAngleUnit());var measureMode=iMeasureMgr.getMeasureMode();setMeasureButton("#edrawings-measure-vertex-button",measureMode,eDwTypes_24.MeasureMode.VERTEX);setMeasureButton("#edrawings-measure-edge-button",measureMode,eDwTypes_24.MeasureMode.EDGE);setMeasureButton("#edrawings-measure-face-button",measureMode,eDwTypes_24.MeasureMode.FACE)}exports.syncMeasureModeUI=syncMeasureModeUI;function getCurrentMarkupMode(){if(l_isActive("#edrawings-markup-text-button"))return eDwTypes_24.MarkupMode.Text;if(l_isActive("#edrawings-markup-circle-button"))return eDwTypes_24.MarkupMode.Circle;if(l_isActive("#edrawings-markup-rectangle-button")){return eDwTypes_24.MarkupMode.Rectangle}if(l_isActive("#edrawings-markup-polyline-button")){return eDwTypes_24.MarkupMode.Polyline}if(l_isActive("#edrawings-markup-bezier-button"))return eDwTypes_24.MarkupMode.Bezier;if(l_isActive("#edrawings-markup-image-button"))return eDwTypes_24.MarkupMode.Image;return eDwTypes_24.MarkupMode.None}exports.getCurrentMarkupMode=getCurrentMarkupMode;function syncMarkupModeUI(iMarkupMgr){function setMarkupButton(iID,iMeasureModes,iTargetModes){var method=iMeasureModes===iTargetModes?"addClass":"removeClass";$(iID)[method]("active-button")}var markupmode=iMarkupMgr.getMarkupMode();setMarkupButton("#edrawings-markup-text-button",markupmode,eDwTypes_24.MarkupMode.Text);setMarkupButton("#edrawings-markup-rectangle-button",markupmode,eDwTypes_24.MarkupMode.Rectangle);setMarkupButton("#edrawings-markup-circle-button",markupmode,eDwTypes_24.MarkupMode.Circle);setMarkupButton("#edrawings-markup-polyline-button",markupmode,eDwTypes_24.MarkupMode.Polyline)}exports.syncMarkupModeUI=syncMarkupModeUI;function populateModelViewPanel(iViewer,iPanelUIID,iTextClass){return __awaiter(this,void 0,void 0,function(){var listModelViewMenu,gen,_a,_b;return __generator(this,function(_c){switch(_c.label){case 0:listModelViewMenu=$(iPanelUIID+" .edrawings-submenu-list");listModelViewMenu.empty();gen=getUIGenerator(iPanelUIID);_b=(_a=listModelViewMenu).append;return[4,gen.generateHTML(iTextClass)];case 1:_b.apply(_a,[_c.sent()]);return[2]}})})}exports.populateModelViewPanel=populateModelViewPanel;function populateModelViewTabs(iViewer){var panelUIID="#edrawings-config-tab-list";var modelViewTabs=$(panelUIID);modelViewTabs.empty();var gen=getUIGenerator(panelUIID);modelViewTabs.append(gen.generateHTML(""))}exports.populateModelViewTabs=populateModelViewTabs;function getText(iElement){return $(iElement).text().trim()}exports.getText=getText;function getTarget(iTarget){return iTarget.hasClass("config-tab-text")?iTarget.parent():iTarget}exports.getTarget=getTarget;function getSpanText(iTarget){var target=getTarget(iTarget);if(!target.is("span")){target=target.find("span")}if(!target||!target.length)return"";return target[0].innerText}exports.getSpanText=getSpanText;function loadPanel(iElemOrClassID,iPanelHTML){return __awaiter(this,void 0,void 0,function(){var iExcp_14;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);return[4,eDwServiceMgr.get().load(iElemOrClassID,iPanelHTML)];case 1:_a.sent();return[3,3];case 2:iExcp_14=_a.sent();console.debugLog("PanelLoad","Failed to load "+iPanelHTML+": "+iExcp_14.message);return[3,3];case 3:return[2]}})})}exports.loadPanel=loadPanel;function hide(iSelector,iOff){var selJQ=$(iSelector);selJQ[iOff?"addClass":"removeClass"]("edrawings-ui-hide");return selJQ}exports.hide=hide;function getCSSContent(iJQElem){if(iJQElem){return iJQElem.css("content").replace(/^['"]+|\s+|\\|(;\s?})+|['"]$/g,"")}return""}exports.getCSSContent=getCSSContent;function getRequestedQueryStringParams(iURL,ioViewerFeatOpts,iWarnOfOtherParams){if(iWarnOfOtherParams===void 0){iWarnOfOtherParams=true}var hashes=iURL.slice(iURL.indexOf("?")+1).split("&");for(var i=0;i1){var strVal=hash[1];var val=strVal==="true"?true:strVal==="false"?false:strVal;if(ioViewerFeatOpts.hasOwnProperty(hash[0])){ioViewerFeatOpts[hash[0]]=val}else if(iWarnOfOtherParams){console.warn(hash[0]+" is not a valid query parameter.")}}}}exports.getRequestedQueryStringParams=getRequestedQueryStringParams;function getScrollParent(iTargetJQ){return iTargetJQ&&iTargetJQ.scrollParent?iTargetJQ.scrollParent():null}exports.getScrollParent=getScrollParent;function getPosition(iTargetJQ){var ret={top:0,left:0};if(iTargetJQ)ret=iTargetJQ.position();return ret}exports.getPosition=getPosition;function scrollToTarget(iTargetJQ,iPos,iAnimationSpeed,iStartPos){if(iAnimationSpeed===void 0){iAnimationSpeed="slow"}if(iStartPos===void 0){iStartPos="scrollTop"}if(!iTargetJQ)return;if(iAnimationSpeed==="none"){iTargetJQ[iStartPos](iPos)}else{iTargetJQ.animate((_a={},_a[iStartPos]=iPos,_a),iAnimationSpeed)}var _a}exports.scrollToTarget=scrollToTarget;var l_generators={};function l_loadContextMenu(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-context-menu","contextmenu.html")];case 1:_a.sent();return[2]}})})})()}function l_loadSheetTreePanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-sheet-tree-menu","sheetspanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadLayerPanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-layer-control-menu","layerspanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadAnnotPanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-annot-control-menu","annotpanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadTablesPanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-tables-menu","tablespanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadDebugPanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-debug-menu","debugpanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadComponentTreePanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){var viewerFeatOpts;return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-component-tree-menu","componentpanel.html")];case 1:_a.sent();viewerFeatOpts={Exp:false};getRequestedQueryStringParams(location.href,viewerFeatOpts,false);if(viewerFeatOpts.Exp){hide("#edrawings-component-tree-menu .edrawings-menu-info",false)}return[2]}})})})()}function l_loadConfigPanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-configurations-menu","configpanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadMeasurePanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-measure-menu","measurepanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadMarkupPanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-markup-menu","markuppanel.html")];case 1:_a.sent();return[2]}})})})()}function m_makePair(iFirst,iSecond){return{First:iFirst,Second:iSecond}}function l_isActive(iID){return $(iID).hasClass("active-button")}function l_getAllDisplayStateCSSClasses(iHierNode){var classes="";for(var displayState in eDwNodeAttributes_2.NodeDisplayState){classes+="edrawings-"+iHierNode.Category+"-"+displayState.toLowerCase()+" "}return classes}function l_populatePanel(iViewer,iCategoryName,iListID,iPanelUIID,iAdditionalClasses){if(iAdditionalClasses===void 0){iAdditionalClasses=""}return __awaiter(this,void 0,void 0,function(){var activeModelView,nodes,list,gen,_a,_b;return __generator(this,function(_c){switch(_c.label){case 0:activeModelView=iViewer.getModel().getActiveModelView();if(!activeModelView||!activeModelView.Hierarchy)return[2];nodes=activeModelView.Hierarchy.findNodes("Category",iCategoryName);list=$(iListID);list.empty();gen=getUIGenerator(iPanelUIID);_b=(_a=list).append;return[4,gen.generateHTML(iAdditionalClasses)];case 1:_b.apply(_a,[_c.sent()]);return[2]}})})}function l_populateAnnotPanel(iViewer){return __awaiter(this,void 0,void 0,function(){var activeModelView,list,gen,_a,_b;return __generator(this,function(_c){switch(_c.label){case 0:activeModelView=iViewer.getModel().getActiveModelView();if(!activeModelView||!activeModelView.Hierarchy)return[2];list=$("#edrawings-annot-control-list");list.empty();gen=getUIGenerator("#edrawings-annot-control-menu");_b=(_a=list).append;return[4,gen.generateHTML("")];case 1:_b.apply(_a,[_c.sent()]);return[2]}})})}function l_populateLayerPanel(iViewer){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,l_populatePanel(iViewer,"layer","#edrawings-layer-control-list","#edrawings-layer-control-menu")];case 1:_a.sent();return[2]}})})}function l_populateTablesPanel(iViewer){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,l_populatePanel(iViewer,"table","#edrawings-tables-control-list","#edrawings-tables-menu")];case 1:_a.sent();return[2]}})})}function l_populateDebugPanel(iViewer){var list=$("#edrawings-debug-menu .edrawings-submenu-list");list.empty();var gen=getUIGenerator("#edrawings-debug-menu");var modelView=iViewer.getModel().getActiveModelView();list.append(gen.generateHTMLForChildNodes(modelView.Hierarchy.HOOPSID,false))}});define("eDwView",["require","exports","eDwSelMgr","eDwMeasureMgr","eDwMarkupMgr","eDwXSectionMgr","eDwViewMgr","eDwTimer","eDwOperatorMgr","eDwCompXformMgr","eDwEventMgr","eDwHistoryMgr","eDwModel","eDwTypes","eDwMBDNoteMgr","eDwTouchOpsMgr","eDwTableMgr","eDrawingsBase"],function(require,exports,eDwSelMgr,eDwMeasureMgr,eDwMarkupMgr,eDwXSectionMgr,eDwViewMgr,eDwTimer,eDwOperatorMgr,eDwCompXformMgr,eDwEventMgr,eDwHistoryMgr,eDwModel,eDwTypes_25,eDwMBDNoteMgr,eDwTouchOpsMgr,eDwTableMgr){"use strict";var eDwView=function(){function eDwView(iViewerInfo,iFeatureOptions){this.mElemID=iViewerInfo.containerId;this.HCViewer=new eDwTypes_25.HC.WebViewer(iViewerInfo);this.mTimer=new eDwTimer;this.ViewerFeatureOpts=iFeatureOptions;this.mDrawMode=iFeatureOptions.RenderType;this.OperatorMgr=new eDwOperatorMgr(this);this.TableMgr=new eDwTableMgr(this);var streamAll=this.HCViewer.getStreamingMode()===eDwTypes_25.HC.StreamingMode.All;var timeBeforeTimeout=streamAll?14400:120;var timeBeforeWarnTimeout=timeBeforeTimeout-10;this.HCViewer.setClientTimeout(timeBeforeTimeout,timeBeforeWarnTimeout);this.mFitCamera=null;this.mModelKey=iViewerInfo.model;this.setupWebViewer()}eDwView.prototype.getHCView=function(){return this.HCViewer.getView()};eDwView.prototype.getModel=function(){if(!this.mModel){this.mModel=new eDwModel(this)}return this.mModel};eDwView.prototype.processProductStructure=function(){this.MBDNoteMgr=new eDwMBDNoteMgr(this);this.mFitCamera=this.getHCView().getCamera();var bbox=this.mModel.getBoundingBox();if(bbox.extents().equals(eDwTypes_25.HC.Point3.zero())){this.mModel.calculateBoundingBox()}$("#"+this.mElemID).trigger("edw:AddViewerEvents",this);this.finishInit()};eDwView.prototype.setupWebViewer=function(){var _this=this;var processingSelection=false;var eventMgr=eDwEventMgr.get();this.mHCCallbacksObj={sceneReady:function(){console.debugLog("ViewerLoad","Scene ready");_this.HCViewer.resizeCanvas()},streamingActivated:function(){console.debugLog("Viewer","Streaming activated")},streamingDeactivated:function(){var streamMode=_this.HCViewer.getStreamingMode();if(streamMode===eDwTypes_25.HC.StreamingMode.All){setTimeout(function(){console.debugLog("Viewer","Streaming finished. Closing connection...");_this.HCViewer.closeConnection()},5e3)}console.debugLog("Viewer","Streaming deactivated")},selection:function(iSelEvent){if(!processingSelection){processingSelection=true;try{_this.SelectionMgr.onSelection(iSelEvent)}catch(iException){}processingSelection=false}},timeoutWarning:function(iRemainingMinutes){console.debugLog("Viewer","Inactivity timeout pending in "+iRemainingMinutes+" minutes.");_this.mTimer.ellapsed();_this.mTimer.dumpToConsole()},timeout:function(){console.debugLog("Viewer","Inactivity timeout");_this.mTimer.ellapsed();_this.mTimer.dumpToConsole();eventMgr.fireEvents("Timeout",_this)},modelLoadFailure:function(iModelName,iReason){console.warn("Model "+iModelName+" load failed: "+iReason);eventMgr.fireEvents("ModelLoadFailure",_this,iModelName,iReason)},deprecated:function(iDeprecatedFuncName){console.debugLog("Debug",iDeprecatedFuncName)},info:function(iInfoType,iMsg){console.debugLog("Debug",iInfoType.toString()+" "+iMsg)},missingModel:function(iModelPath){console.debugLog("Debug","Missing model: "+iModelPath)},webGlContextLost:function(){console.debugLog("Debug","Browser lost GL context! Render incomplete!!")},click:function(iMousePos,iEvent){console.debugLog("Debug","Mouse clicked")},modelStructureReady:function(){console.debugLog("ViewerLoad","Model structure ready.");$("#"+_this.mElemID).trigger("edw:ModelLoaded",_this)},modelSwitched:function(){console.debugLog("ViewerLoad","Model switch done.");$("#"+_this.mElemID).trigger("edw:ModelLoaded",_this)},viewCreated:function(iView){eventMgr.fireEvents("ViewCreated",iView)},viewLoaded:function(iView){eventMgr.fireEvents("ViewLoaded",iView)},viewDeleted:function(iView){eventMgr.fireEvents("ViewDeleted",iView)},camera:function(iCamera){eventMgr.fireEvents("CameraChange",iCamera)}};this.HCViewer.setCallbacks(this.mHCCallbacksObj);this.HCViewer.start()};eDwView.prototype.getInitCamera=function(){return this.mFitCamera};eDwView.prototype.getCurrModelKey=function(){return this.mModelKey};eDwView.prototype.unregister=function(){if(this.HCViewer)this.HCViewer.unsetCallbacks(this.mHCCallbacksObj);this.OperatorMgr.unregisterAll();eDwEventMgr.get().fireEvents("Done",this)};eDwView.prototype.destroy=function(){this.HCViewer.shutdown()};eDwView.prototype.setExplosionLevel=function(iLevel){this.HCViewer.getExplodeManager().setMagnitude(iLevel);eDwEventMgr.get().fireEvents("ExplodeLevelChange",this,iLevel)};eDwView.prototype.getExplosionLevel=function(){return this.HCViewer.getExplodeManager().getMagnitude()};eDwView.prototype.getDrawMode=function(){return this.mDrawMode};eDwView.prototype.setDrawMode=function(iValue){var view=this.getHCView();var settings=view.getHiddenLineSettings();switch(iValue){case"ShadedWithEdges":view.setDrawMode(eDwTypes_25.HC.DrawMode.WireframeOnShaded);this.SelectionMgr.setColorForViewMode(eDwTypes_25.HC.DrawMode.WireframeOnShaded);break;case"Shaded":view.setDrawMode(eDwTypes_25.HC.DrawMode.Shaded);this.SelectionMgr.setColorForViewMode(eDwTypes_25.HC.DrawMode.Shaded);break;case"HiddenLinesRemoved":settings.setObscuredLineTransparency(0);view.setDrawMode(eDwTypes_25.HC.DrawMode.HiddenLine);this.SelectionMgr.setColorForViewMode(eDwTypes_25.HC.DrawMode.HiddenLine);break;case"HiddenLinesVisible":settings.setObscuredLineTransparency(.5);view.setDrawMode(eDwTypes_25.HC.DrawMode.HiddenLine);this.SelectionMgr.setColorForViewMode(eDwTypes_25.HC.DrawMode.HiddenLine);break;case"Wireframe":settings.setObscuredLineTransparency(1);view.setDrawMode(eDwTypes_25.HC.DrawMode.HiddenLine);this.SelectionMgr.setColorForViewMode(eDwTypes_25.HC.DrawMode.HiddenLine);break;default:throw new Error("Unknown draw mode: "+iValue)}this.mDrawMode=iValue;eDwEventMgr.get().fireEvents("DrawModeChange",this,iValue)};eDwView.prototype.getPerspectiveMode=function(){return this.getHCView().getProjectionMode()===eDwTypes_25.HC.Projection.Perspective};eDwView.prototype.setPerspectiveMode=function(iValue){if(!iValue){this.getHCView().setProjectionMode(eDwTypes_25.HC.Projection.Orthographic)}else{this.getHCView().setProjectionMode(eDwTypes_25.HC.Projection.Perspective)}eDwEventMgr.get().fireEvents("ProjModeChange",this,iValue);return iValue};eDwView.prototype.resetDrawMode=function(){this.setDrawMode(this.ViewerFeatureOpts.RenderType)};eDwView.prototype.initializeManagers=function(){new eDwSelMgr(this);new eDwMeasureMgr(this);new eDwMarkupMgr(this);new eDwXSectionMgr(this);new eDwViewMgr(this);new eDwCompXformMgr(this);if(eDwTouchOpsMgr.isTouchEnabled()&&this.ViewerFeatureOpts.Exp){new eDwTouchOpsMgr(this)}};eDwView.prototype.drawDebugBoundingBox=function(bbox){return __awaiter(this,void 0,void 0,function(){var modelHC,beautifulGreen,width,height,length,vmin,vmax,p0,p1,p2,p3,p4,p5,p6,p7,polylineData0,polylineData1,polylineData2,polylineData3,rgba,i,tmp,boxMesh,key,meshInstance;return __generator(this,function(_a){switch(_a.label){case 0:modelHC=this.getModel().getHCModel();beautifulGreen=new Communicator.Color(0,255,0);width=bbox.max.x-bbox.min.x;height=bbox.max.y-bbox.min.y;length=Math.max(width,height);vmin=bbox.min;vmax=bbox.max;p0=new Communicator.Point3(vmin.x,vmin.y,vmax.z);p1=new Communicator.Point3(vmin.x,vmax.y,vmax.z);p2=new Communicator.Point3(vmax.x,vmax.y,vmax.z);p3=new Communicator.Point3(vmax.x,vmin.y,vmax.z);p4=new Communicator.Point3(vmin.x,vmin.y,vmin.z);p5=new Communicator.Point3(vmin.x,vmax.y,vmin.z);p6=new Communicator.Point3(vmax.x,vmax.y,vmin.z);p7=new Communicator.Point3(vmax.x,vmin.y,vmin.z);polylineData0=[p0.x,p0.y,p0.z,p1.x,p1.y,p1.z,p2.x,p2.y,p2.z,p3.x,p3.y,p3.z,p0.x,p0.y,p0.z];polylineData1=[p4.x,p4.y,p4.z,p5.x,p5.y,p5.z,p6.x,p6.y,p6.z,p7.x,p7.y,p7.z,p4.x,p4.y,p4.z];polylineData2=[p4.x,p4.y,p4.z,p0.x,p0.y,p0.z,p1.x,p1.y,p1.z,p5.x,p5.y,p5.z,p4.x,p4.y,p4.z];polylineData3=[p7.x,p7.y,p7.z,p3.x,p3.y,p3.z,p2.x,p2.y,p2.z,p6.x,p6.y,p6.z,p7.x,p7.y,p7.z];rgba=[];for(i=0;i<5;i++){tmp=[beautifulGreen.r,beautifulGreen.g,beautifulGreen.b,255];rgba=rgba.concat(tmp)}boxMesh=new Communicator.MeshData;boxMesh.addPolyline(polylineData0,rgba);boxMesh.addPolyline(polylineData1,rgba);boxMesh.addPolyline(polylineData2,rgba);boxMesh.addPolyline(polylineData3,rgba);return[4,modelHC.createMesh(boxMesh)];case 1:key=_a.sent();meshInstance=new Communicator.MeshInstanceData(key);return[2,modelHC.createMeshInstance(meshInstance)]}})})};eDwView.prototype.finishInit=function(){eDwEventMgr.get().fireEvents("Init",this);this.mModel.notifyDataChange(this.mModel.getActiveModelView());this.HCViewer.enableBackgroundSheet(false);eDwHistoryMgr.get().clear()};return eDwView}();return eDwView});define("eDwViewMgr",["require","exports","eDwEventMgr","eDwTypes","eDrawingsBase"],function(require,exports,eDwEventMgr,eDwTypes_26){"use strict";var eDwViewMgr=function(){function eDwViewMgr(iViewer){if(!iViewer)throw new Error("Must have viewer object");iViewer.ViewMgr=this;this.mViewAnimationIndex=0;this.mViewAnimationActive=false;this.mAnimationTimeOutID=-1;this.mViewer=iViewer}eDwViewMgr.prototype.start=function(){if(this.mViewer.getModel().isDrawing())return;eDwEventMgr.get().fireEvents("StartAnimation",this.mViewer);this.mViewAnimationActive=true;this.animateNextView()};eDwViewMgr.prototype.stop=function(){this.mViewAnimationActive=false;if(this.mAnimationTimeOutID>-1){window.clearTimeout(this.mAnimationTimeOutID);this.mAnimationTimeOutID=-1}eDwEventMgr.get().fireEvents("StopAnimation",this.mViewer)};eDwViewMgr.prototype.isActive=function(){return this.mViewAnimationActive};eDwViewMgr.prototype.setViewOrientation=function(iEyeDir,iDuration){if(iDuration===void 0){iDuration=400}var center=this.mViewer.getModel().getBoundingBox().center();var viewHC=this.mViewer.getHCView();var camera=viewHC.getCamera().copy();var pos=camera.getPosition().copy();var target=camera.getTarget();var up=camera.getUp();pos=pos.subtract(target);var dist=pos.length();switch(iEyeDir){case Communicator.ViewOrientation.Front:pos.set(0,0,1).scale(dist).add(center);up.set(0,1,0);break;case Communicator.ViewOrientation.Back:pos.set(0,0,-1).scale(dist).add(center);up.set(0,1,0);break;case Communicator.ViewOrientation.Left:pos.set(-1,0,0).scale(dist).add(center);up.set(0,1,0);break;case Communicator.ViewOrientation.Right:pos.set(1,0,0).scale(dist).add(center);up.set(0,1,0);break;case Communicator.ViewOrientation.Top:pos.set(0,1,0).scale(dist).add(center);up.set(0,0,-1);break;case Communicator.ViewOrientation.Bottom:pos.set(0,-1,0).scale(dist).add(center);up.set(0,0,1);break;case Communicator.ViewOrientation.Iso:pos.set(1,1,1).normalize().scale(dist).add(center);up.set(-.408204,.816541,-.408204);break;default:throw new Error("Unsupported orientation: "+iEyeDir)}camera.setPosition(pos);camera.setTarget(center);camera.setUp(up);viewHC.fitWorld(iDuration,camera);return camera};eDwViewMgr.prototype.setViewOrientationToDirection=function(normal){var camera=this.mViewer.getHCView().getCamera();var position=camera.getPosition();var target=camera.getTarget();var up=camera.getUp();var delta=target.subtract(position);var distance=delta.length();var bbox=this.mViewer.getModel().getBoundingBox();var bbox_min=bbox.min;var bbox_max=bbox.max;target=Communicator.Point3.add(bbox_max,bbox_min).scale(.5);var eyeVec=Communicator.Point3.scale(normal,distance);position=Communicator.Point3.add(target,eyeVec);var vTest=new Communicator.Point3(1,0,0);var isParallel=Communicator.Point3.dot(vTest,normal);if(Math.abs(Math.abs(isParallel)-1)<.001){vTest.set(0,1,0);var vec=Communicator.Point3.cross(normal,vTest);vec=vec.normalize();up=Communicator.Point3.cross(vec,normal);up=up.normalize()}else{up=Communicator.Point3.cross(normal,vTest);up=up.normalize()}var dotProd=Communicator.Point3.dot(up,new Communicator.Point3(1,0,0));if(Math.abs(Math.abs(dotProd)-1)<.001&&dotProd<0){up=up.negate()}dotProd=Communicator.Point3.dot(up,new Communicator.Point3(0,1,0));if(Math.abs(Math.abs(dotProd)-1)<.001&&dotProd<0){up=up.negate()}dotProd=Communicator.Point3.dot(up,new Communicator.Point3(0,0,1));if(Math.abs(Math.abs(dotProd)-1)<.001&&dotProd<0){up=up.negate()}camera.setPosition(position);camera.setTarget(target);camera.setUp(up);this.setCamera(camera,500);return camera};eDwViewMgr.prototype.setCamera=function(iCamera,iTimeInMS){if(iTimeInMS===void 0){iTimeInMS=400}this.mViewer.getHCView().setCamera(iCamera,iTimeInMS)};eDwViewMgr.prototype.enableAmbientOcclusion=function(iEnable){this.mViewer.getHCView().setAmbientOcclusionEnabled(iEnable);eDwEventMgr.get().fireEvents("AmbientOcclChange",this,iEnable)};eDwViewMgr.prototype.fitScreenToNodes=function(iNodeHCIDs,ioCamera){return __awaiter(this,void 0,void 0,function(){var modelHC,bbox,subtract,viewVec,center,add,ratio,boxMaxLen;return __generator(this,function(_a){switch(_a.label){case 0:if(!ioCamera)return[2];modelHC=this.mViewer.getModel().getHCModel();return[4,modelHC.getNodesBounding(iNodeHCIDs)];case 1:bbox=_a.sent();subtract=eDwTypes_26.HC.Point3.subtract;viewVec=subtract(ioCamera.getPosition(),ioCamera.getTarget());center=bbox.center().copy();ioCamera.setTarget(center);add=eDwTypes_26.HC.Point3.add;ioCamera.setPosition(add(center,viewVec));ratio=ioCamera.getWidth()/ioCamera.getHeight();if(this.mViewer.getModel().isDrawing()){bbox.min.z=bbox.max.z=0}boxMaxLen=bbox.extents().length();ioCamera.setHeight(boxMaxLen);ioCamera.setWidth(boxMaxLen*ratio);this.setCamera(ioCamera,400);return[2]}})})};eDwViewMgr.prototype.onCameraUpdate=function(){this.mViewAnimationIndex+=1;if(this.mViewAnimationIndex>=eDwViewMgr.viewAnimations.length){this.mViewAnimationIndex=0;this.mViewAnimationActive=false;this.stop()}if(this.mViewAnimationActive){this.animateNextView()}};eDwViewMgr.prototype.animateNextView=function(){var _this=this;if(this.mViewAnimationActive){this.setViewOrientation(eDwViewMgr.viewAnimations[this.mViewAnimationIndex],2e3);var self_1=this;this.mAnimationTimeOutID=window.setTimeout(function(){_this.onCameraUpdate()},2e3)}};eDwViewMgr.viewAnimations=[Communicator.ViewOrientation.Front,Communicator.ViewOrientation.Back,Communicator.ViewOrientation.Left,Communicator.ViewOrientation.Right,Communicator.ViewOrientation.Bottom,Communicator.ViewOrientation.Top,Communicator.ViewOrientation.Iso];return eDwViewMgr}();return eDwViewMgr});define("eDwXSectionMgr",["require","exports","eDwXSectionOperator","eDwGeomUtils","eDwTypes","eDwTypes","eDrawingsBase"],function(require,exports,eDwXSectionOperator,eDwGeomUtils,eDwTypes_27,eDwTypes_28){"use strict";var cSectionCapFaceColor=new eDwTypes_28.HC.Color(128,128,128);var cSectionCapOutlineColor=new eDwTypes_28.HC.Color(255,0,0);var eDwXSectionMgr=function(){function eDwXSectionMgr(iViewer){iViewer.XSectionMgr=this;this.mViewer=iViewer;var xSectionOp=new eDwXSectionOperator(iViewer);this.mXSectionOpID=iViewer.OperatorMgr.registerCustomOperator(xSectionOp);this.HCXSectionMgr=iViewer.HCViewer.getCuttingManager();this.SectionCapVisibility=false;this.mXSectionIndex=eDwTypes_27.SectionPlaneOrientation.XY.Index}eDwXSectionMgr.prototype.unregister=function(){this.mViewer.OperatorMgr.unregisterCustomOperatorByID(this.mXSectionOpID);this.mViewer.XSectionMgr=null};eDwXSectionMgr.prototype.turnOnSectionPlane=function(iOn){if(this.getHCXSection()){if(iOn){var ret=this.mViewer.OperatorMgr.push(this.mXSectionOpID);console.debugLog("Section","Section plane operator push ret = "+ret);this.HCXSectionMgr.setCappingGeometryVisibility(true)}else{var opID=this.mViewer.OperatorMgr.pop();console.debugLog("Section","Popped op ID = "+opID+" xSection op ID = "+this.mXSectionOpID)}}};eDwXSectionMgr.prototype.activateCurrent=function(){this.getHCXSection().activate()};eDwXSectionMgr.prototype.deactivateCurrent=function(){this.getHCXSection().deactivate()};eDwXSectionMgr.prototype.isCurrentActive=function(){return this.getHCXSection().isActive()};Object.defineProperty(eDwXSectionMgr.prototype,"SectionIndex",{get:function(){return this.mXSectionIndex},enumerable:true,configurable:true});eDwXSectionMgr.prototype.setSectionPlane=function(ioSection,iAllowActivation){if(iAllowActivation===void 0){iAllowActivation=true}return __awaiter(this,void 0,void 0,function(){var bbox,bboxExtents,needsActivation,sectionHC,numActive,boxCenter,sectionPlane,minPlanePt,maxPlanePt,vec,centerPt,dir,mirrorPlaneNormal,mirrorPlane,maxOnPlnPt,minOnPlnPt,mirrorPlaneDist,distDir,revDistDir,pts;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.mViewer.getModel().calculateBoundingBox()];case 1:bbox=_a.sent();bboxExtents=bbox.extents();if(!ioSection||bboxExtents.equals(eDwTypes_28.HC.Point3.zero()))return[2];needsActivation=false;sectionHC=this.getHCXSection();if(ioSection.Index!==this.mXSectionIndex){if(sectionHC){needsActivation=sectionHC.isActive();sectionHC.deactivate();this.HCXSectionMgr.refreshPlaneGeometry()}this.mXSectionIndex=ioSection.Index;sectionHC=this.getHCXSection()}numActive=this.HCXSectionMgr.getActiveCuttingSectionCount();boxCenter=bbox.center();if(sectionHC.getCount()<1){sectionPlane=ioSection.Plane.copy();sectionPlane.d=-sectionPlane.distanceToPoint(boxCenter);minPlanePt=eDwGeomUtils.dropPointOnPlane(bbox.min,sectionPlane);maxPlanePt=eDwGeomUtils.dropPointOnPlane(bbox.max,sectionPlane);vec=maxPlanePt.copy().subtract(minPlanePt);vec=vec.scale(.55);centerPt=eDwGeomUtils.dropPointOnPlane(boxCenter,sectionPlane);dir=sectionPlane.normal.copy();centerPt=centerPt.add(dir.scale(sectionPlane.d));mirrorPlaneNormal=eDwTypes_28.HC.Point3.zero();eDwTypes_28.HC.MeasureUtils.oneVectorCross(sectionPlane.normal.copy(),mirrorPlaneNormal);mirrorPlane=eDwTypes_28.HC.Plane.createFromPointAndNormal(centerPt,mirrorPlaneNormal);maxOnPlnPt=eDwTypes_28.HC.Point3.add(centerPt,vec);minOnPlnPt=eDwTypes_28.HC.Point3.add(centerPt,vec.scale(-1));mirrorPlaneDist=mirrorPlane.distanceToPoint(maxOnPlnPt);distDir=mirrorPlaneNormal.copy().scale(2*mirrorPlaneDist);revDistDir=distDir.copy().scale(-1);pts=[];pts.push(minOnPlnPt);pts.push(eDwTypes_28.HC.Point3.add(maxOnPlnPt,revDistDir));pts.push(maxOnPlnPt);pts.push(eDwTypes_28.HC.Point3.add(minOnPlnPt,distDir));sectionHC=this.getHCXSection();sectionHC.addPlane(sectionPlane,pts);sectionHC.setColor(eDwTypes_28.HC.Color.createFromFloat(0,1,0));sectionHC.setTransparency(.3);needsActivation=true}if(sectionHC&&needsActivation&&iAllowActivation){sectionHC.activate()}this.HCXSectionMgr.setStandinGeometryPickable(true);return[2]}})})};eDwXSectionMgr.prototype.flipSectionPlane=function(){var sectionHC=this.getHCXSection();if(!sectionHC)return;var sectionPlane=sectionHC.getPlane(0);if(!sectionPlane)return;sectionPlane.normal.negate();sectionPlane.d=-sectionPlane.d;sectionHC.updatePlane(0,sectionPlane)};eDwXSectionMgr.prototype.setViewToSectionPlane=function(){var sectionHC=this.getHCXSection();if(!sectionHC)return null;var sectionPlane=sectionHC.getPlane(0);if(!sectionPlane)return null;return this.mViewer.ViewMgr.setViewOrientationToDirection(sectionPlane.normal.copy())};eDwXSectionMgr.prototype.moveCurrentAlongNormal=function(iDistVec){var camera=this.mViewer.getHCView().getCamera();var camPosition=camera.getPosition();var camTarget=camera.getTarget();var camUp=camera.getUp();var camZ=camTarget.subtract(camPosition);camZ=camZ.normalize();var camY=camUp.normalize();var camX=eDwTypes_28.HC.Point3.cross(camZ,camY);var realVec=camX.scale(iDistVec.x).add(camY.scale(iDistVec.y)).add(camZ.scale(iDistVec.z));var sectionHC=this.getHCXSection();var sectionPlane=sectionHC.getPlane(0);var normal=sectionPlane.normal.copy();normal=normal.normalize();var distance=eDwTypes_28.HC.Point3.dot(realVec,normal);if(Math.abs(distance)<1e-6)return;sectionPlane.d-=distance;sectionHC.updatePlane(0,sectionPlane)};Object.defineProperty(eDwXSectionMgr.prototype,"SectionCapVisibility",{get:function(){return this.mEnableSectionCaps},set:function(iEnable){this.mEnableSectionCaps=iEnable;this.setSectionCapVisibility(iEnable)},enumerable:true,configurable:true});eDwXSectionMgr.prototype.disableSectionCapVisibility=function(iDisable){this.setSectionCapVisibility(iDisable?false:this.mEnableSectionCaps)};eDwXSectionMgr.prototype.projectPoint=function(iPnt){var sectionHC=this.getHCXSection();var sectionPlane=sectionHC.getPlane(0);return eDwGeomUtils.dropPointOnPlane(iPnt,sectionPlane)};eDwXSectionMgr.prototype.getHCXSection=function(){return this.HCXSectionMgr.getCuttingSection(this.mXSectionIndex)};eDwXSectionMgr.prototype.setSectionCapVisibility=function(iEnable){var enable=iEnable;var drawMode=this.mViewer.getDrawMode();if(drawMode!=="Shaded"&&drawMode!=="ShadedWithEdges"){enable=false}this.HCXSectionMgr.setCappingFaceColor(enable?cSectionCapFaceColor:null);this.HCXSectionMgr.setCappingLineColor(enable?null:cSectionCapOutlineColor)};return eDwXSectionMgr}();return eDwXSectionMgr});define("eDwXSectionOperator",["require","exports","eDwTypes","eDwBaseOperator","eDwCommandMgr","eDwMoveSectionPlaneCmd","eDrawingsBase"],function(require,exports,eDwTypes_29,eDwBaseOperator,eDwCommandMgr,eDwMoveSectionPlaneCmd){"use strict";var eDwXSectionOperator=function(_super){__extends(eDwXSectionOperator,_super);function eDwXSectionOperator(iViewer){return _super.call(this,iViewer)||this}eDwXSectionOperator.prototype.onActivate=function(){_super.prototype.onActivate.call(this);this.mViewer.XSectionMgr.activateCurrent()};eDwXSectionOperator.prototype.onDeactivate=function(){this.mViewer.XSectionMgr.deactivateCurrent();_super.prototype.onDeactivate.call(this)};eDwXSectionOperator.prototype.onMouseDown=function(ioMouseEvent){if(!ioMouseEvent||!this.mViewer.XSectionMgr.isCurrentActive()){ioMouseEvent.setHandled(true);return}var selObj=eDwBaseOperator.getPickResult(ioMouseEvent);var selID=selObj.getNodeId();if(!selObj||selObj.getNodeId()>=0){ioMouseEvent.setHandled(false);return}_super.prototype.onMouseDown.call(this,ioMouseEvent);var sectionMgr=this.mViewer.XSectionMgr;sectionMgr.disableSectionCapVisibility(true);if(selObj){var typeOfSel=selObj.getSelectionType();selObj=typeOfSel===eDwTypes_29.HC.SelectionType.None?null:selObj}ioMouseEvent.setHandled(true);var selNodeID=selObj.getNodeId();if(selNodeID){console.debugLog("Section","sel obj = "+JSON.stringify(selObj));var sectionMgrHC=this.mViewer.XSectionMgr.HCXSectionMgr;if(sectionMgrHC.getCuttingSectionFromNodeId(selNodeID)){this.mSectionDragPt=this.screenToWorld(ioMouseEvent.getPosition())}}if(this.mMoveSectionCmd)this.mMoveSectionCmd.cancel();this.mMoveSectionCmd=new eDwMoveSectionPlaneCmd(this.mViewer)};eDwXSectionOperator.prototype.onMouseMove=function(ioMouseEvent){ioMouseEvent.setHandled(false);var crossSectionMgr=this.mViewer.XSectionMgr;if(!crossSectionMgr.isCurrentActive()){return}if(this.mCurMouse&&this.mSectionDragPt){var coords=ioMouseEvent.getPosition();var current=this.screenToWorld(coords);var delta=eDwTypes_29.HC.Point3.subtract(current,this.mSectionDragPt);this.mViewer.XSectionMgr.moveCurrentAlongNormal(delta);this.mSectionDragPt=current;ioMouseEvent.setHandled(true)}};eDwXSectionOperator.prototype.onMouseUp=function(ioMouseEvent){_super.prototype.onMouseUp.call(this,ioMouseEvent);this.mViewer.XSectionMgr.disableSectionCapVisibility(false);ioMouseEvent.setHandled(false);this.mSectionDragPt=null;var cmdMgr=eDwCommandMgr.get();cmdMgr.add(this.mMoveSectionCmd);cmdMgr.remove(this.mMoveSectionCmd,"commit");this.mMoveSectionCmd=null};eDwXSectionOperator.prototype.onTouchStart=function(ioTouchEvent){var _this=this;this.wrapAndCallAsMouseEvent(ioTouchEvent,eDwTypes_29.HC.MouseInputType.Down,function(ioMouseEvent){_this.onMouseDown(ioMouseEvent)})};eDwXSectionOperator.prototype.onTouchMove=function(ioTouchEvent){var _this=this;this.wrapAndCallAsMouseEvent(ioTouchEvent,eDwTypes_29.HC.MouseInputType.Move,function(ioMouseEvent){_this.onMouseMove(ioMouseEvent)})};eDwXSectionOperator.prototype.onTouchEnd=function(ioTouchEvent){var _this=this;this.wrapAndCallAsMouseEvent(ioTouchEvent,eDwTypes_29.HC.MouseInputType.Up,function(ioMouseEvent){_this.onMouseUp(ioMouseEvent)})};eDwXSectionOperator.prototype.needsSelection=function(iEventType){return iEventType===eDwTypes_29.HC.EventType.MouseDown||iEventType===eDwTypes_29.HC.EventType.TouchStart};eDwXSectionOperator.prototype.screenToWorld=function(iScrPt){var view=this.mViewer.getHCView();var normScrPt=view.pointToWindowPosition(iScrPt);var input=new Communicator.Point3(normScrPt.x,normScrPt.y,0);var projMatrix=view.getProjectionMatrix();projMatrix.m[15]=1;var invMat=Communicator.Matrix.inverse(projMatrix).transpose();var worldPt=new Communicator.Point3(0,0,0);var div=input.x*invMat.m[3]+input.y*invMat.m[7]+input.z*invMat.m[11]+invMat.m[15];worldPt.x=(input.x*invMat.m[0]+input.y*invMat.m[1]+input.z*invMat.m[2]+invMat.m[3])/div;worldPt.y=(input.x*invMat.m[4]+input.y*invMat.m[5]+input.z*invMat.m[6]+invMat.m[7])/div;worldPt.z=(input.x*invMat.m[8]+input.y*invMat.m[9]+input.z*invMat.m[10]+invMat.m[11])/div;return worldPt};return eDwXSectionOperator}(eDwBaseOperator);return eDwXSectionOperator});define("eDwZoomToFitCmd",["require","exports","eDwSupportsHistoryCmd"],function(require,exports,eDwSupportsHistoryCmd){"use strict";var eDwZoomToFitCmd=function(_super){__extends(eDwZoomToFitCmd,_super);function eDwZoomToFitCmd(iViewer,iNodeID,iCamera){var _this=_super.call(this,iViewer)||this;_this.mInitialCamera=iCamera.copy();_this.mFinalCamera=iCamera.copy();_this.mNodeHCID=iNodeID;return _this}eDwZoomToFitCmd.prototype.undo=function(){if(!_super.prototype.undo.call(this))return false;this.mViewer.ViewMgr.setCamera(this.mInitialCamera);return true};eDwZoomToFitCmd.prototype.redo=function(){if(!_super.prototype.redo.call(this))return false;this.mViewer.ViewMgr.setCamera(this.mFinalCamera);return true};eDwZoomToFitCmd.prototype.commit=function(){_super.prototype.commit.call(this);this.mViewer.ViewMgr.fitScreenToNodes([this.mNodeHCID],this.mFinalCamera)};Object.defineProperty(eDwZoomToFitCmd.prototype,"Aggregable",{get:function(){return true},enumerable:true,configurable:true});return eDwZoomToFitCmd}(eDwSupportsHistoryCmd);return eDwZoomToFitCmd});requirejs.config({baseUrl:"./js/3rdParty",paths:{eDrawingsBase:"eDrawingsBase.min",jquery:"jquery-2.1.4.min","jquery-ui":"jquery-ui-1.11.4.min","jquery.fullscreen":"jquery.fullscreen.min","jquery.iframe-transport":"jquery.iframe-transport","jquery.fileupload":"jquery.fileupload","solidworks.web":"solidworks.web"},map:{"jquery.fileupload":{"jquery-ui/ui/widget":"jquery-ui"}},shim:{eDrawingsBase:{deps:["jquery"]},"jquery-ui":{deps:["jquery"]},"jquery.fullscreen":{deps:["jquery"]}}});requirejs(["eDrawingsWebViewer"],function(eDwWebViewer){console.excludeDebugLogCategories=["UIEvents","BaseSelOp","Operator"];eDwWebViewer.start()});define("utils",["require","exports"],function(require,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});function forAll(iFunc,iDictionary){if(!iDictionary)return;Object.keys(iDictionary).forEach(function(iKeyString){var key=parseInt(iKeyString,10);iFunc(key,iDictionary[key])})}exports.forAll=forAll;function getUint8Array(iBase64EncodedString){var binString=window.atob(iBase64EncodedString);var len=binString.length;var bytes=new Uint8Array(len);for(var i=0;i