{"version":3,"file":"vendors-node_modules_balkangraph_orgchart_js_orgchart_js.d152cf98c45d962fa693.bundle.js","mappings":";;;;;;;;AAAA","sources":["webpack://HRMSPortal/./node_modules/@balkangraph/orgchart.js/orgchart.js"],"sourcesContent":["var OrgChart=function(t,e){var r=this;if((\"string\"==typeof t||t instanceof String)&&(t=document.querySelector(t)),this.element=t,this.config=OrgChart.mergeDeep(OrgChart._defaultConfig(e),e),this._layoutConfigs={base:{orientation:this.config.orientation,levelSeparation:this.config.levelSeparation,mixedHierarchyNodesSeparation:this.config.mixedHierarchyNodesSeparation,assistantSeparation:this.config.assistantSeparation,subtreeSeparation:this.config.subtreeSeparation,siblingSeparation:this.config.siblingSeparation,layout:this.config.layout,columns:this.config.columns,collapse:this.config.collapse,partnerNodeSeparation:this.config.partnerNodeSeparation}},this.config.tags)for(var i in this.config.tags){var a=this.config.tags[i];null!=a.subTreeConfig&&(this._layoutConfigs[i]={orientation:null!=a.subTreeConfig.orientation?a.subTreeConfig.orientation:this.config.orientation,levelSeparation:null!=a.subTreeConfig.levelSeparation?a.subTreeConfig.levelSeparation:this.config.levelSeparation,mixedHierarchyNodesSeparation:null!=a.subTreeConfig.mixedHierarchyNodesSeparation?a.subTreeConfig.mixedHierarchyNodesSeparation:this.config.mixedHierarchyNodesSeparation,assistantSeparation:null!=a.subTreeConfig.assistantSeparation?a.subTreeConfig.assistantSeparation:this.config.assistantSeparation,subtreeSeparation:null!=a.subTreeConfig.subtreeSeparation?a.subTreeConfig.subtreeSeparation:this.config.subtreeSeparation,siblingSeparation:null!=a.subTreeConfig.siblingSeparation?a.subTreeConfig.siblingSeparation:this.config.siblingSeparation,layout:null!=a.subTreeConfig.layout?a.subTreeConfig.layout:this.config.layout,columns:null!=a.subTreeConfig.columns?a.subTreeConfig.columns:this.config.columns,collapse:null!=a.subTreeConfig.collapse?a.subTreeConfig.collapse:this.config.collapse,partnerNodeSeparation:null!=a.subTreeConfig.partnerNodeSeparation?a.subTreeConfig.partnerNodeSeparation:this.config.partnerNodeSeparation})}this._event_id=OrgChart._guid(),OrgChart._validateConfig(this.config)&&(this._vScroll={},this.config.ui||(this.ui=OrgChart.ui),this.config.editUI?this.editUI=this.config.editUI:this.editUI=new OrgChart.editUI,this.editUI.init(this),this.config.filterUI?this.filterUI=this.config.filterUI:this.filterUI=new OrgChart.filterUI,this.filterUI.init(this),this.manager=new OrgChart.manager(this),this.config.searchUI?this.searchUI=this.config.searchUI:this.searchUI=new OrgChart.searchUI,this.config.nodeMenuUI?this.nodeMenuUI=this.config.nodeMenuUI:this.nodeMenuUI=new OrgChart.menuUI,this.nodeMenuUI.init(this,this.config.nodeMenu),this.config.nodeCircleMenuUI?this.nodeCircleMenuUI=this.config.nodeCircleMenuUI:this.nodeCircleMenuUI=new OrgChart.circleMenuUI,this.nodeCircleMenuUI.init(this,this.config.nodeCircleMenu),this.config.nodeContextMenuUI?this.nodeContextMenuUI=this.config.nodeContextMenuUI:this.nodeContextMenuUI=new OrgChart.menuUI,this.nodeContextMenuUI.init(this,this.config.nodeContextMenu),this.config.toolbarUI?this.toolbarUI=this.config.toolbarUI:this.toolbarUI=new OrgChart.toolbarUI,this.config.notifierUI?this.notifierUI=this.config.notifierUI:this.notifierUI=new OrgChart.notifierUI,this.notifierUI.init(this),this.config.menuUI?this.menuUI=this.config.menuUI:this.menuUI=new OrgChart.menuUI,this.menuUI.init(this,this.config.menu),this.config.xScrollUI||(this.xScrollUI=new OrgChart.xScrollUI(this.element,this.config,(function(){return{boundary:r.response.boundary,scale:r.getScale(),viewBox:r.getViewBox(),padding:r.config.padding}}),(function(t){r.setViewBox(t)}),(function(){r._draw(!0,OrgChart.action.xScroll)}))),this.config.yScrollUI||(this.yScrollUI=new OrgChart.yScrollUI(this.element,this.config,(function(){return{boundary:r.response.boundary,scale:r.getScale(),viewBox:r.getViewBox(),padding:r.config.padding}}),(function(t){r.setViewBox(t)}),(function(){r._draw(!0,OrgChart.action.xScroll)}))),this.element.classList.add(\"boc-\"+this.config.mode),this._gragStartedId=null,this._timeout=null,this._touch=null,this._initialized=!1,this._loaded=!1,this._moveInterval=null,this._movePosition=null,this.response=null,this.nodes=null,this.isVisible=null,OrgChart._intersectionObserver(this.element,(function(t){r.isVisible=t,!1!==OrgChart.events.publish(\"visibility-change\",[r])&&OrgChart.LAZY_LOADING&&r.isVisible&&(r._loaded?r._draw(!1,OrgChart.action.update):(r._setInitialSizeIfNotSet(),r._draw(!1,OrgChart.action.init)))})))};OrgChart._defaultConfig=function(t){return{interactive:!0,mode:\"light\",lazyLoading:!0,enableDragDrop:!1,enableSearch:!0,enableTouch:!1,enablePan:!0,keyNavigation:!1,miniMap:!1,nodeMenu:null,nodeCircleMenu:null,nodeContextMenu:null,menu:null,toolbar:!1,sticky:!0,nodeMouseClick:OrgChart.action.details,nodeMouseDbClick:OrgChart.none,mouseScrool:OrgChart.action.zoom,showXScroll:OrgChart.none,showYScroll:OrgChart.none,template:\"ana\",tags:{},min:!1,nodeBinding:{},linkBinding:{},searchFields:null,searchDisplayField:null,searchFieldsWeight:null,searchFieldsAbbreviation:null,nodes:[],clinks:[],slinks:[],groupDottedLines:[],dottedLines:[],levelSeparation:60,siblingSeparation:20,subtreeSeparation:40,mixedHierarchyNodesSeparation:15,assistantSeparation:100,minPartnerSeparation:50,partnerChildrenSplitSeparation:20,partnerNodeSeparation:15,columns:10,padding:30,orientation:OrgChart.orientation.top,layout:OrgChart.normal,scaleInitial:1,scaleMin:.1,scaleMax:5,orderBy:null,editUI:null,filterUI:null,searchUI:null,xScrollUI:null,yScrollUI:null,nodeMenuUI:null,nodeCircleMenuUI:null,nodeContextMenuUI:null,toolbarUI:null,notifierUI:null,menuUI:null,exportUrl:\"https://balkan.app/export\",collapse:{},expand:{},align:OrgChart.CENTER,UI:null,anim:{func:OrgChart.anim.outPow,duration:200},zoom:{speed:120,smooth:12},roots:null,state:null,editForm:{readOnly:!1,titleBinding:\"name\",photoBinding:\"img\",addMore:\"Add more fields\",addMoreBtn:\"Add\",addMoreFieldName:\"Field name\",saveAndCloseBtn:\"Save and close\",cancelBtn:\"Cancel\",generateElementsFromFields:!0,focusBinding:null,buttons:{edit:{icon:OrgChart.icon.edit(24,24,\"#fff\"),text:\"Edit\",hideIfEditMode:!0,hideIfDetailsMode:!1},share:{icon:OrgChart.icon.share(24,24,\"#fff\"),text:\"Share\"},pdf:{icon:OrgChart.icon.pdf(24,24,\"#fff\"),text:\"Save as PDF\"},remove:{icon:OrgChart.icon.remove(24,24,\"#fff\"),text:\"Remove\",hideIfDetailsMode:!0}},elements:[]}}},OrgChart.prototype.load=function(t,e){var r=this;return this.config.nodes=t,this._draw(!1,OrgChart.action.init,void 0,(function(){r.filterUI.update(),e&&e()})),this},OrgChart.prototype.loadXML=function(t,e){var r=OrgChart._xml2json(t);return this.load(r,e)},OrgChart.prototype.getXML=function(){return OrgChart._json2xml(this.config.nodes)},OrgChart.prototype.on=function(t,e){return OrgChart.events.on(t,e,this._event_id),this},OrgChart.prototype.draw=function(t,e,r){null==t&&(t=OrgChart.action.update),this._draw(!1,t,e,r)},OrgChart.prototype._draw=function(t,e,r,i){var a=this;if(!OrgChart.LAZY_LOADING||this.isVisible)if(OrgChart.LAZY_LOADING||this._initialized||(this._setInitialSizeIfNotSet(),0!=this.width()&&0!=this.height())){this._hideBeforeAnimationCompleted=!1;var n=e==OrgChart.action.init?null:this.getViewBox();this.manager.read(t,this.width(),this.height(),n,e,r,(function(n){if(!a.notifierUI.show(n.notif)&&(!1!==a.config.lazyLoading||!0!==t||e===OrgChart.action.exporting)){e!=OrgChart.action.exporting&&(a.nodes=n.nodes,a.visibleNodeIds=n.visibleNodeIds,a.roots=n.roots),a.editUI.fields=n.allFields;var o={defs:\"\"};OrgChart.events.publish(\"renderdefs\",[a,o]);var l=a.ui.defs(o.defs),s=a.getScale(n.viewBox);l+=a.ui.pointer(a.config,e,s);var h=a.getViewBox(),d=n.viewBox;o={content:l,res:n};OrgChart.events.publish(\"prerender\",[a,o]),l=o.content;for(var c=0;c0){a._hideBeforeAnimation(C[0].length);for(c=0;co?h-o:o,g=d-l>l?d-l:l,p=c>g?c:g,u=document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\"),f=document.createElementNS(\"http://www.w3.org/2000/svg\",\"clipPath\"),m=document.createElementNS(\"http://www.w3.org/2000/svg\",\"rect\"),C=document.createElementNS(\"http://www.w3.org/2000/svg\",\"circle\"),b=OrgChart.randomId();f.setAttribute(\"id\",b);var O={ripple:OrgChart.t(i.templateName,i.min,this.getScale()).ripple,node:i};OrgChart.events.publish(\"ripple\",[this,O]),m.setAttribute(\"x\",O.ripple.rect?O.ripple.rect.x:0),m.setAttribute(\"y\",O.ripple.rect?O.ripple.rect.y:0),m.setAttribute(\"width\",O.ripple.rect?O.ripple.rect.width:i.w),m.setAttribute(\"height\",O.ripple.rect?O.ripple.rect.height:i.h),m.setAttribute(\"rx\",O.ripple.radius),m.setAttribute(\"ry\",O.ripple.radius),C.setAttribute(\"clip-path\",\"url(#\"+b+\")\"),C.setAttribute(\"cx\",o),C.setAttribute(\"cy\",l),C.setAttribute(\"r\",0),C.setAttribute(\"fill\",O.ripple.color),C.setAttribute(\"class\",\"boc-ripple\"),f.appendChild(m),u.appendChild(f),u.appendChild(C),a.appendChild(u),OrgChart.animate(C,{r:0,opacity:1},{r:p,opacity:0},500,OrgChart.anim.outPow,(function(){a.removeChild(u)}))}}},OrgChart.prototype.center=function(t,e,r){var i,a,n=t,o=!0,l=!0;e&&null!=e.parentState&&(i=e.parentState),e&&null!=e.childrenState&&(a=e.childrenState),e&&null!=e.rippleId&&(n=e.rippleId),e&&null!=e.vertical&&(o=e.vertical),e&&null!=e.horizontal&&(l=e.horizontal);var s={parentState:i,childrenState:a,rippleId:n,vertical:o,horizontal:l};this._draw(!1,OrgChart.action.centerNode,{id:t,options:s},r)},OrgChart.prototype.fit=function(t){this.config.scaleInitial=OrgChart.match.boundary,this._draw(!0,OrgChart.action.init,{method:\"fit\"},t)},OrgChart.prototype.toggleFullScreen=function(){var t=document.querySelector(\"[\"+OrgChart.attr.tlbr+\"r='fullScreen']\");document.fullscreenElement==this.element||document.webkitFullscreenElement==this.element||document.mozFullScreenElement==this.element||document.msFullscreenElement==this.element?(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),t&&(t.innerHTML=OrgChart.toolbarUI.openFullScreenIcon)):(this.element.requestFullscreen?this.element.requestFullscreen():this.element.mozRequestFullScreen?this.element.mozRequestFullScreen():this.element.webkitRequestFullscreen?this.element.webkitRequestFullscreen():this.element.msRequestFullscreen&&this.element.msRequestFullscreen(),t&&(t.innerHTML=OrgChart.toolbarUI.closeFullScreenIcon))},OrgChart.prototype.getNode=function(t){return this.nodes[t]},OrgChart.prototype.setLayout=function(t,e){e||(e=\"base\"),this._layoutConfigs[e].layout=t,this._draw(!1,OrgChart.action.update)},OrgChart.prototype.setOrientation=function(t,e){e||(e=\"base\"),this._layoutConfigs[e].orientation=t,this._draw(!1,OrgChart.action.update)},OrgChart.prototype.search=function(t,e,r){return OrgChart.isNEU(e)&&(e=this.searchUI._searchFields),OrgChart.isNEU(r)&&(r=e),OrgChart._search.search(this.config.nodes,t,e,r,this.config.searchDisplayField,this.config.searchFieldsWeight,this.searchUI._searchFieldsAbbreviation)},OrgChart.prototype._hideBeforeAnimation=function(t){if(1!=this._hideBeforeAnimationCompleted&&!(t&&tOrgChart.TEXT_THRESHOLD)for(var r=0;rOrgChart.IMAGES_THRESHOLD)for(r=0;rOrgChart.LINKS_THRESHOLD)for(r=0;rOrgChart.BUTTONS_THRESHOLD)for(r=0;rOrgChart.BUTTONS_THRESHOLD)for(r=0;r=0;r--)this.config.nodes[r].pid!=t&&this.config.nodes[r].stpid!=t||(this.config.nodes[r].pid=e.pid,this.config.nodes[r].stpid=e.stpid),this.config.nodes[r].id==t&&this.config.nodes.splice(r,1);return this},OrgChart.prototype._getNewPidsAndStpidsForIds=function(t){var e=this.get(t),r={},i={};if(e)for(var a=this.config.nodes.length-1;a>=0;a--)this.config.nodes[a].pid==t?r[this.config.nodes[a].id]=e.pid:this.config.nodes[a].stpid==t&&(i[this.config.nodes[a].id]=e.stpid);return{newPidsForIds:r,newStpidsForIds:i}},OrgChart.prototype.addNode=function(t,e,r){var i=this;if(!0===r&&!1===OrgChart.events.publish(\"add\",[this,t]))return!1;this.add(t),i._draw(!1,OrgChart.action.insert,{id:t.pid,insertedNodeId:t.id},(function(){i.ripple(t.id),e&&e(),OrgChart.events.publish(\"added\",[i,t.id]),i.filterUI.update()})),OrgChart.events.publish(\"adding\",[i,t.id])},OrgChart.prototype.add=function(t){return null==t.id&&console.error(\"Call addNode without id\"),this.config.nodes.push(t),this},OrgChart.prototype._get=function(t){var e=this.__get(t);if(e)return e;if((this.config.groupDottedLines.length||this.config.dottedLines.length)&&!OrgChart.isNEU(t)&&\"string\"==typeof t&&(-1!=t.indexOf(\"balkan_group_dotted_\")||-1!=t.indexOf(\"balkan_dotted_\"))){var r=(t=(t=t.replace(\"balkan_group_dotted_\",\"\")).replace(\"balkan_dotted_\",\"\")).indexOf(\"_balkan_id_\");if(t=t.substring(r+\"_balkan_id_\".length),e=this.__get(t))return e}return null},OrgChart.prototype.__get=function(t){for(var e=0;ed+1&&(clearInterval(l),n&&n(t))}),s)},OrgChart.anim={},OrgChart.anim.inPow=function(t){return t<0?0:t>1?1:Math.pow(t,2)},OrgChart.anim.outPow=function(t){if(t<0)return 0;if(t>1)return 1;return-1*(Math.pow(t-1,2)+-1)},OrgChart.anim.inOutPow=function(t){if(t<0)return 0;if(t>1)return 1;if((t*=2)<1)return OrgChart.anim.inPow(t,2)/2;return-.5*(Math.pow(t-2,2)+-2)},OrgChart.anim.inSin=function(t){return t<0?0:t>1?1:1-Math.cos(t*(Math.PI/2))},OrgChart.anim.outSin=function(t){return t<0?0:t>1?1:Math.sin(t*(Math.PI/2))},OrgChart.anim.inOutSin=function(t){return t<0?0:t>1?1:-.5*(Math.cos(Math.PI*t)-1)},OrgChart.anim.inExp=function(t){return t<0?0:t>1?1:Math.pow(2,10*(t-1))},OrgChart.anim.outExp=function(t){return t<0?0:t>1?1:1-Math.pow(2,-10*t)},OrgChart.anim.inOutExp=function(t){return t<0?0:t>1?1:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,10*(-2*t+1)))},OrgChart.anim.inCirc=function(t){return t<0?0:t>1?1:-(Math.sqrt(1-t*t)-1)},OrgChart.anim.outCirc=function(t){return t<0?0:t>1?1:Math.sqrt(1-(t-1)*(t-1))},OrgChart.anim.inOutCirc=function(t){return t<0?0:t>1?1:t<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(2*t-2)*(2*t-2))+1)},OrgChart.anim.rebound=function(t){return t<0?0:t>1?1:t<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-1.5/2.75)*(t-1.5/2.75)+.75):t<2.5/2.75?1-(7.5625*(t-2.25/2.75)*(t-2.25/2.75)+.9375):1-(7.5625*(t-2.625/2.75)*(t-2.625/2.75)+.984375)},OrgChart.anim.inBack=function(t){return t<0?0:t>1?1:t*t*(2.70158*t-1.70158)},OrgChart.anim.outBack=function(t){return t<0?0:t>1?1:(t-1)*(t-1)*(2.70158*(t-1)+1.70158)+1},OrgChart.anim.inOutBack=function(t){return t<0?0:t>1?1:t<.5?4*t*t*(7.1898*t-2.5949)*.5:.5*((2*t-2)*(2*t-2)*(3.5949*(2*t-2)+2.5949)+2)},OrgChart.anim.impulse=function(t){var e=2*t;return e*Math.exp(1-e)},OrgChart.anim.expPulse=function(t){return Math.exp(-2*Math.pow(t,2))},void 0===OrgChart&&(OrgChart={}),OrgChart.prototype._attachInitEventHandlers=function(t){this._addEvent(window,\"resize\",this._resizeHandler)},OrgChart.prototype._attachEventHandlers=function(t){if(this.config.interactive){t=this.getSvg();this.config.enableTouch||OrgChart.isMobile()?(this._addEvent(t,\"touchstart\",this._globalMouseDownHandler),this._addEvent(t,\"touchend\",this._globalClickHandler)):(this._addEvent(t,\"mousedown\",this._globalMouseDownHandler),this._addEvent(t,\"click\",this._globalClickHandler),this._addEvent(t,\"contextmenu\",this._globalContextHandler),this._addEvent(t,\"dblclick\",this._globalDbClickHandler),this.config.mouseScrool!=OrgChart.action.zoom&&this.config.mouseScrool!=OrgChart.action.ctrlZoom||(this._addEvent(t,\"DOMMouseScroll\",this._mouseScrollHandler),this._addEvent(t,\"mousewheel\",this._mouseScrollHandler)));var e=this.getMenuButton();e&&this._addEvent(e,\"click\",this._menuClickHandler)}},OrgChart.prototype._addEvent=function(t,e,r,i){var a,n;(i||(i=\"\"),t.getListenerList||(t.getListenerList={}),t.getListenerList[e+i])||(a=this,n=r,r=function(){if(n)return n.apply(a,[this,arguments[0]])},t.addEventListener?\"mousewheel\"==e?t.addEventListener(e,o,{passive:!1}):t.addEventListener(e,o,!1):t.attachEvent(\"on\"+e,(function(){var e=r.call(t,window.event);return!1===e&&(window.event.returnValue=!1,window.event.cancelBubble=!0),e})),t.getListenerList[e+i]=o);function o(t){var e=r.apply(this,arguments);return!1===e&&(t.stopPropagation(),t.preventDefault()),e}},OrgChart.prototype._removeEvent=function(t,e){if(t.getListenerList[e]){var r=t.getListenerList[e];t.removeEventListener(e,r,!1),delete t.getListenerList[e]}},void 0===OrgChart&&(OrgChart={}),OrgChart.VERSION=\"8.11.05\",OrgChart.orientation={},OrgChart.orientation.top=0,OrgChart.orientation.bottom=1,OrgChart.orientation.right=2,OrgChart.orientation.left=3,OrgChart.orientation.top_left=4,OrgChart.orientation.bottom_left=5,OrgChart.orientation.right_top=6,OrgChart.orientation.left_top=7,OrgChart.align={},OrgChart.align.center=OrgChart.CENTER=8,OrgChart.align.orientation=OrgChart.ORIENTATION=9,OrgChart.attr={},OrgChart.attr.l=\"data-l\",OrgChart.attr.id=\"data-id\",OrgChart.attr.sl=\"data-sl\",OrgChart.attr.lbl=\"data-lbl\",OrgChart.attr.val=\"data-val\",OrgChart.attr.tlbr=\"data-tlbr\",OrgChart.attr.item=\"data-item\",OrgChart.attr.layout=\"data-layout\",OrgChart.attr.node_id=\"data-n-id\",OrgChart.attr.link_id=\"data-l-id\",OrgChart.attr.field_name=\"data-f-name\",OrgChart.attr.c_link_to=\"data-c-l-to\",OrgChart.attr.c_link_from=\"data-c-l-from\",OrgChart.attr.s_link_to=\"data-s-l-to\",OrgChart.attr.s_link_from=\"data-s-l-from\",OrgChart.attr.control_add=\"data-ctrl-add\",OrgChart.attr.control_expcoll_id=\"data-ctrl-ec-id\",OrgChart.attr.control_up_id=\"data-ctrl-up-id\",OrgChart.attr.control_export_menu=\"data-ctrl-menu\",OrgChart.attr.control_node_menu_id=\"data-ctrl-n-menu-id\",OrgChart.attr.control_node_circle_menu_id=\"data-ctrl-n-c-menu-id\",OrgChart.attr.control_node_circle_menu_name=\"data-ctrl-n-c-menu-name\",OrgChart.attr.control_node_circle_menu_wrraper_id=\"data-ctrl-n-c-menu-wrapper-id\",OrgChart.attr.width=\"data-width\",OrgChart.attr.text_overflow=\"data-text-overflow\",OrgChart.ID=\"id\",OrgChart.PID=\"pid\",OrgChart.STPID=\"stpid\",OrgChart.TAGS=\"tags\",OrgChart.NODES=\"nodes\",OrgChart.ELASTIC=\"elastic\",OrgChart.ASSISTANT=\"Assistant\",OrgChart.action={},OrgChart.action.expand=0,OrgChart.action.collapse=1,OrgChart.action.maximize=101,OrgChart.action.minimize=102,OrgChart.action.expandCollapse=501,OrgChart.action.edit=1,OrgChart.action.zoom=2,OrgChart.action.ctrlZoom=22,OrgChart.action.scroll=41,OrgChart.action.xScroll=3,OrgChart.action.yScroll=4,OrgChart.action.none=5,OrgChart.action.init=6,OrgChart.action.update=7,OrgChart.action.move=70,OrgChart.action.pan=8,OrgChart.action.centerNode=9,OrgChart.action.resize=10,OrgChart.action.insert=11,OrgChart.action.insertfirst=12,OrgChart.action.details=13,OrgChart.action.exporting=14,OrgChart.none=400001,OrgChart.scroll={},OrgChart.scroll.visible=!0,OrgChart.scroll.smooth=12,OrgChart.scroll.speed=120,OrgChart.scroll.safari={smooth:12,speed:250},OrgChart.match={},OrgChart.match.height=100001,OrgChart.match.width=100002,OrgChart.match.boundary=100003,OrgChart.layout={},OrgChart.layout.normal=OrgChart.normal=0,OrgChart.layout.mixed=OrgChart.mixed=1,OrgChart.layout.tree=OrgChart.tree=2,OrgChart.layout.treeLeftOffset=OrgChart.treeLeftOffset=3,OrgChart.layout.treeRightOffset=OrgChart.treeRightOffset=4,OrgChart.nodeOpenTag=\"\",OrgChart.linkOpenTag=\"',OrgChart.expcollOpenTag=\"',OrgChart.upOpenTag=\"',OrgChart.linkFieldsOpenTag='',OrgChart.grCloseTag=\"\",OrgChart.A5w=420,OrgChart.A5h=595,OrgChart.A4w=595,OrgChart.A4h=842,OrgChart.A3w=842,OrgChart.A3h=1191,OrgChart.A2w=1191,OrgChart.A2h=1684,OrgChart.A1w=1684,OrgChart.A1h=2384,OrgChart.Letterw=612,OrgChart.Letterh=791,OrgChart.Legalw=612,OrgChart.Legalh=1009,OrgChart.COLLAPSE_PARENT_NEIGHBORS=1,OrgChart.COLLAPSE_SUB_CHILDRENS=2,OrgChart.COLLAPSE_PARENT_SUB_CHILDREN_EXCEPT_CLICKED=3,OrgChart.TEXT_THRESHOLD=400,OrgChart.IMAGES_THRESHOLD=100,OrgChart.LINKS_THRESHOLD=200,OrgChart.BUTTONS_THRESHOLD=70,OrgChart.ANIM_THRESHOLD=50,OrgChart.IT_IS_LONELY_HERE='{link}',OrgChart.RES={},OrgChart.RES.IT_IS_LONELY_HERE_LINK=\"It's lonely here, add your first node\",OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE=3,OrgChart.STRING_TAGS=!1,OrgChart.MAX_NODES_MESS=\"The trial has expired or 200 nodes limit was reached!
See more\",OrgChart.OFFLINE_MESS=\"The evaluation version requires internet connection!
See more\",OrgChart.SEARCH_PLACEHOLDER=\"Search... type ? to get help.\",OrgChart.SEARCH_HELP_SYMBOL=\"?\",OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE=!1,OrgChart.SEARCH_RESULT_LIMIT=10,OrgChart.IMPORT_MESSAGE=\"Choose the columns (fields) in your data file that contain the required information.\",OrgChart.FIXED_POSITION_ON_CLICK=!1,OrgChart.RENDER_LINKS_BEFORE_NODES=!1,OrgChart.MIXED_LAYOUT_ALL_NODES=!0,OrgChart.MIXED_LAYOUT_FOR_NODES_WITH_COLLAPSED_CHILDREN=!1,OrgChart.LINK_ROUNDED_CORNERS=5,OrgChart.MOVE_STEP=5,OrgChart.CLINK_CURVE=1,OrgChart.MAX_DEPTH=200,OrgChart.SCALE_FACTOR=1.44,OrgChart.LAZY_LOADING_FACTOR=500,OrgChart.HIDE_EDIT_FORM_ON_PAN=!0,OrgChart.LAZY_LOADING=!0,OrgChart.ARRAY_FIELDS=[\"tags\"],OrgChart.CSV_DELIMITER=\",\",OrgChart.EDITFORM_CLOSE_BTN='',OrgChart.ESCAPE_HTML=!1,OrgChart.VERTICAL_CHILDREN_ASSISTANT=!1,\"undefined\"!=typeof module&&(module.exports=OrgChart),OrgChart._intersects=function(t,e,r){var i=t.x-r.siblingSeparation/4,a=t.y,n=t.x+t.w+r.siblingSeparation/4,o=t.y;switch(r.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:i=t.x,a=t.y-r.siblingSeparation/4,n=t.x,o=t.y+t.h+r.siblingSeparation/4}var l,s,h,d=e.p,c=e.q,g=e.r,p=e.s;return 0!==(l=(n-i)*(p-c)-(g-d)*(o-a))&&(s=((a-o)*(g-i)+(n-i)*(p-a))/l,0<(h=((p-c)*(g-i)+(d-g)*(p-a))/l)&&h<1&&0`},OrgChart.editUI.prototype.content=function(t,e,r,i,a){var n,o=this.obj.config.editForm.readOnly,l=JSON.parse(JSON.stringify(this.obj.config.editForm.elements)),s=this.obj.config.editForm.addMore,h=this.obj.config.editForm.saveAndCloseBtn,d=this.obj.config.editForm.cancelBtn,c=this.obj.config.editForm.buttons,g=this.obj.config.editForm.titleBinding,p=this.obj.config.editForm.photoBinding,u=this.obj.getNode(t),f=this.obj._get(t),m=OrgChart.t(u.templateName,u.min,this.obj.getScale()),C=f[g],b=f[p];if(this.obj.config.editForm.generateElementsFromFields)for(var O=0;O`;var w=!e,k=e?\"display:none;\":\"\",S=e||!s?\"display:none;\":\"\",I=m.editFormHeaderColor?`style=\"background-color:${m.editFormHeaderColor};\"`:\"\",A=document.createElement(\"form\");if(A.setAttribute(\"data-boc-edit-form\",\"\"),A.classList.add(\"boc-edit-form\"),A.classList.add(this.obj.config.mode),A.classList.add(u.templateName),A.classList.add(OrgChart.ui._defsIds[u.templateName]),Array.isArray(u.tags)&&u.tags.length)for(O=0;O\\n
\\n ${L}\\n ${OrgChart.editUI.renderHeaderContent(C,b,u,f)}\\n
\\n
\\n ${function(){if(a)return\"\";var t=\"\";for(var r in c){var i=c[r];OrgChart.isNEU(i)||(w&&i.hideIfEditMode||e&&i.hideIfDetailsMode||o&&\"Edit\"==i.text||(t+=`
${i.icon}
`))}return t}()} \\n
\\n \\n
\\n
\\n
\\n ${function(){for(var t=\"\",r=0;r';for(var a=0;a\"}else{s=OrgChart.elements[i.type](f,i,\"280px\",e);!OrgChart.isNEU(s.id)&&OrgChart.isNEU(n)&&OrgChart.isNEU(s.value)&&(n=s.id),OrgChart.isNEU(s.value)||E.push(`${i.label}: ${s.value}`),t+=s.html}}return t}()}\\n\\n
\\n ${s}\\n
\\n
\\n
\\n
\\n
\\n
\\n \\n
\\n
\\n \\n
\\n
`,{element:A,focusId:n,title:C,shareText:E.join(\"\\n\")}},OrgChart.editUI.prototype.hide=function(){if(!1===OrgChart.events.publish(\"hide\",[this]))return!1;OrgChart.isNEU(this.interval)&&(clearInterval(this.interval),this.interval=null);var t=this.obj.element.querySelector(\"[data-boc-edit-form]\");t&&t.parentNode&&t.parentNode.removeChild(t)},OrgChart.editUI.renderHeaderContent=function(t,e,r,i){return`

${OrgChart._escapeGreaterLessSign(t)}

\\n
${e}
`},OrgChart.prototype.getSvg=function(){var t=this.element.getElementsByTagName(\"svg\");return t&&t.length?t[0]:null},OrgChart.prototype.getPointerElement=function(){return this.element.querySelector(\"g[data-pointer]\")},OrgChart.prototype.getNodeElement=function(t){return this.element.querySelector(\"g[\"+OrgChart.attr.node_id+\"='\"+t+\"']\")},OrgChart.prototype.getMenuButton=function(){return this.element.querySelector(\"[\"+OrgChart.attr.control_export_menu+\"]\")},OrgChart.menuUI=function(){},OrgChart.menuUI.prototype.init=function(t,e){this.obj=t,this.wrapper=null,this.menu=e,this._event_id=OrgChart._guid()},OrgChart.menuUI.prototype.showStickIn=function(t,e,r,i){this._show(t,null,e,r,i)},OrgChart.menuUI.prototype.show=function(t,e,r,i,a){this._show(t,e,r,i,a)},OrgChart.menuUI.prototype._show=function(t,e,r,i,a){var n=this;this.hide();var o=\"\";a||(a=this.menu);var l={firstNodeId:r,secondNodeId:i,menu:a};if(!1===OrgChart.events.publish(\"show\",[this,l]))return!1;for(var s in a=l.menu){var h=a[s].icon,d=a[s].text;void 0===h&&(h=OrgChart.icon[s]?OrgChart.icon[s](24,24,\"#7A7A7A\"):\"\"),\"function\"==typeof d&&(d=d()),\"function\"==typeof h&&(h=h()),o+=\"
'+h+\"  \"+d+\"
\"}if(\"\"!=o){if(this.wrapper=document.createElement(\"div\"),this.wrapper.className=\"boc-chart-menu\",this.wrapper.style.left=\"-99999px\",this.wrapper.style.top=\"-99999px\",this.wrapper.innerHTML=o,this.obj.element.appendChild(this.wrapper),null==e){var c=OrgChart._menuPosition(t,this.wrapper,this.obj.getSvg());t=c.x,e=c.y}var g=t+45;this.wrapper.style.left=g+\"px\",this.wrapper.style.top=e+\"px\",this.wrapper.style.left=g-this.wrapper.offsetWidth+\"px\";var p=t-this.wrapper.offsetWidth;OrgChart.animate(this.wrapper,{opacity:0,left:g-this.wrapper.offsetWidth},{opacity:1,left:p},300,OrgChart.anim.inOutPow);for(var u=this.wrapper.getElementsByTagName(\"div\"),f=0;f=0;t--)clearInterval(this._buttonsInterval[t]),this._buttonsInterval.splice(t,1);this._buttonsInterval=[];for(t=this._linesInterval.length-1;t>=0;t--)clearInterval(this._linesInterval[t]),this._linesInterval.splice(t,1);this._linesInterval=[];var e=this.obj.element.querySelector(\"[\"+OrgChart.attr.control_node_circle_menu_wrraper_id+\"]\");if(null!=e){var r=e.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id),i=this.obj.getNode(r),a=OrgChart.t(i.templateName,i.min,this.obj.getScale()),n=this.obj.element.querySelector(\"[\"+OrgChart.attr.control_node_circle_menu_id+'=\"'+r+'\"]').querySelectorAll(\"line\");n[0].setAttribute(\"x1\",-a.nodeCircleMenuButton.radius/2),n[0].setAttribute(\"x2\",a.nodeCircleMenuButton.radius/2),n[0].setAttribute(\"y1\",-6),n[0].setAttribute(\"y2\",-6),n[1].setAttribute(\"x1\",-a.nodeCircleMenuButton.radius/2),n[1].setAttribute(\"x2\",a.nodeCircleMenuButton.radius/2),n[1].setAttribute(\"y1\",0),n[1].setAttribute(\"y2\",0),n[2].setAttribute(\"x1\",-a.nodeCircleMenuButton.radius/2),n[2].setAttribute(\"x2\",a.nodeCircleMenuButton.radius/2),n[2].setAttribute(\"y1\",6),n[2].setAttribute(\"y2\",6),e.parentElement.removeChild(e),e=null}},OrgChart.circleMenuUI.prototype.on=function(t,e){return OrgChart.events.on(t,e,this._event_id),this},void 0===OrgChart&&(OrgChart={}),OrgChart.idb={version:1,dbName:\"BALKAN\",tableName:\"orgchart-js\",keyPath:\"id\"},OrgChart.idb.db=null,OrgChart.idb._open=function(t){if(OrgChart._browser().msie)t&&t(!1);else if((navigator.userAgent.toLowerCase().indexOf(\"safari\")>0||navigator.userAgent.toLowerCase().indexOf(\"firefox\")>0)&&window.location!==window.parent.location)t&&t(!1);else{if(!window.indexedDB)return console.error(\"Your browser doesn't support a stable version of IndexedDB.\"),void(t&&t(!1));if(null==OrgChart.idb.db){var e=indexedDB.open(OrgChart.idb.dbName,OrgChart.idb.version);e.onerror=function(e){console.error(\"Cannot open database!\"),t&&t(!1)},e.onsuccess=function(e){OrgChart.idb.db=e.target.result,t&&t(!0)},e.onupgradeneeded=function(t){var e=t.target.result;e.objectStoreNames.contains(OrgChart.idb.tableName)&&e.deleteObjectStore(OrgChart.idb.tableName);e.createObjectStore(OrgChart.idb.tableName,{keyPath:OrgChart.idb.keyPath})}}else t&&t(!0)}},OrgChart.idb.read=function(t,e){OrgChart.idb._open((function(r){if(r){var i=OrgChart.idb.db.transaction([OrgChart.idb.tableName]).objectStore(OrgChart.idb.tableName).get(t);i.onerror=function(t){console.error(\"Unable to retrieve data from database!\"),e&&e(!1)},i.onsuccess=function(t){i.result?e&&e(!0,i.result):e&&e(null)}}else e&&e(!1)}))},OrgChart.idb.write=function(t,e){OrgChart.idb.read(t.id,(function(r){if(null==r){var i=OrgChart.idb.db.transaction([OrgChart.idb.tableName],\"readwrite\").objectStore(OrgChart.idb.tableName).add(t);i.onerror=function(t){console.error(\"Unable to add data to database!\"),e&&e(!1)},i.onsuccess=function(t){e&&e(!0)}}else e&&e(r)}))},OrgChart.idb.put=function(t,e){OrgChart.idb._open((function(r){if(r){var i=OrgChart.idb.db.transaction([OrgChart.idb.tableName],\"readwrite\").objectStore(OrgChart.idb.tableName).put(t);i.onerror=function(t){console.error(\"Unable to put data to database!\"),e&&e(!1)},i.onsuccess=function(t){e&&e(!0)}}else e&&e(!1)}))},OrgChart.idb.delete=function(t,e){OrgChart.idb._open((function(r){if(r){var i=OrgChart.idb.db.transaction([OrgChart.idb.tableName],\"readwrite\").objectStore(OrgChart.idb.tableName).delete(t);i.onerror=function(t){console.error(\"Unable to retrieve data from database!\"),e&&e(!1)},i.onsuccess=function(t){i.error?e&&e(!1):e&&e(!0)}}else e&&e(!1)}))},OrgChart.toolbarUI=function(){},OrgChart.toolbarUI.expandAllIcon='',OrgChart.toolbarUI.fitIcon='',OrgChart.toolbarUI.openFullScreenIcon='',OrgChart.toolbarUI.closeFullScreenIcon='',OrgChart.toolbarUI.zoomInIcon='',OrgChart.toolbarUI.zoomOutIcon='',OrgChart.toolbarUI.layoutIcon=\"',OrgChart.toolbarUI.prototype.init=function(t,e){if(e){this.obj=t,this.toolbar=e,this._visible=!1,this.div=document.createElement(\"div\"),this.div.classList.add(\"boc-toolbar-container\"),Object.assign(this.div.style,{position:\"absolute\",padding:\"3px\",right:this.obj.config.padding-10+\"px\",bottom:this.obj.config.padding-10+\"px\"}),e.expandAll&&(this.div.innerHTML+=\"
'+OrgChart.toolbarUI.expandAllIcon+\"
\"),e.fit&&(this.div.innerHTML+=\"
'+OrgChart.toolbarUI.fitIcon+\"
\"),e.zoom&&(this.div.innerHTML+=\"
'+OrgChart.toolbarUI.zoomInIcon+\"
\",this.div.innerHTML+=\"
'+OrgChart.toolbarUI.zoomOutIcon+\"
\"),e.layout&&(this.div.innerHTML+=\"
'+OrgChart.toolbarUI.layoutIcon+\"
\",this.layouts=document.createElement(\"div\"),this.layouts.classList.add(\"boc-toolbar-layout\"),this.layouts.innerHTML=\"',this.obj.element.appendChild(this.layouts)),e.fullScreen&&(this.div.innerHTML+=\"
'+OrgChart.toolbarUI.openFullScreenIcon+\"
\"),this.obj.element.appendChild(this.div),this.layoutBtn=this.div.querySelector(\"[\"+OrgChart.attr.tlbr+'=\"layout\"]');var r=this.div.querySelector(\"[\"+OrgChart.attr.tlbr+'=\"plus\"]'),i=this.div.querySelector(\"[\"+OrgChart.attr.tlbr+'=\"minus\"]'),a=this.div.querySelector(\"[\"+OrgChart.attr.tlbr+'=\"fit\"]'),n=this.div.querySelector(\"[\"+OrgChart.attr.tlbr+'=\"fullScreen\"]'),o=this.div.querySelector(\"[\"+OrgChart.attr.tlbr+'=\"expand\"]'),l=this;r&&r.addEventListener(\"click\",(function(){l.obj.zoom(!0,null,!0)})),i&&i.addEventListener(\"click\",(function(){l.obj.zoom(!1,null,!0)})),a&&a.addEventListener(\"click\",(function(){l.obj.fit()})),n&&n.addEventListener(\"click\",(function(){l.obj.toggleFullScreen()})),o&&o.addEventListener(\"click\",(function(){l.obj.expand(null,\"all\")})),this.layoutBtn&&this.layoutBtn.addEventListener(\"click\",(function(){l._visible?l.hideLayout():l.showLayout()})),this.layouts&&this.layouts.addEventListener(\"click\",(function(t){for(var e=t.target;e;){if(e.hasAttribute&&e.hasAttribute(OrgChart.attr.layout)){e=e.getAttribute(OrgChart.attr.layout),l.obj.setLayout(OrgChart[e]);break}e=e.parentNode}}))}},OrgChart.toolbarUI.prototype.showLayout=function(){this._visible=!0,this.layoutBtn.style.transform=\"rotate(180deg) translateX(0px) translateY(0px)\",OrgChart.animate(this.div,{bottom:this.obj.config.padding-10},{bottom:this.obj.config.padding+135},this.obj.config.anim.duration,this.obj.config.anim.func),OrgChart.animate(this.layouts,{bottom:-145},{bottom:0},this.obj.config.anim.duration,this.obj.config.anim.func)},OrgChart.toolbarUI.prototype.hideLayout=function(){this._visible=!1,this.layoutBtn.style.transform=\"rotate(0deg) translateX(0px) translateY(0px)\",OrgChart.animate(this.div,{bottom:this.obj.config.padding+135},{bottom:this.obj.config.padding-10},this.obj.config.anim.duration,this.obj.config.anim.func),OrgChart.animate(this.layouts,{bottom:0},{bottom:-145},this.obj.config.anim.duration,this.obj.config.anim.func)},OrgChart.notifierUI=function(){},OrgChart.notifierUI.prototype.init=function(t){this.obj=t},OrgChart.notifierUI.prototype.show=function(t,e){if(null==t)return!1;1==t&&(t=OrgChart.MAX_NODES_MESS,e=\"#FFCA28\"),2==t&&(t=OrgChart.OFFLINE_MESS,e=\"#FFCA28\");var r=document.createElement(\"div\");r.innerHTML=t,Object.assign(r.style,{position:\"absolute\",\"background-color\":e,color:\"#ffffff\",padding:\"15px\",\"border-radius\":\"40px\",opacity:0,overflow:\"hidden\",\"white-space\":\"nowrap\",\"text-align\":\"center\"}),this.obj.element.appendChild(r);var i=this.obj.width()/2-r.offsetWidth/2,a=this.obj.height()/2-r.offsetHeight/2;r.style.left=i+\"px\",r.style.top=a+\"px\";var n=r.offsetWidth;return r.style.width=\"20px\",OrgChart.animate(r,{opacity:0,width:10},{opacity:1,width:n},this.obj.config.anim.duration,this.obj.config.anim.func),!0},void 0===OrgChart&&(OrgChart={}),OrgChart.icon={},OrgChart.icon.png=function(t,e,r){return''},OrgChart.icon.pdf=function(t,e,r){return''},OrgChart.icon.svg=function(t,e,r){return''},OrgChart.icon.csv=function(t,e,r){return''},OrgChart.icon.json=function(t,e,r){return''},OrgChart.icon.excel=function(t,e,r){return''},OrgChart.icon.edit=function(t,e,r){return''},OrgChart.icon.details=function(t,e,r){return''},OrgChart.icon.remove=function(t,e,r){return''},OrgChart.icon.add=function(t,e,r){return''},OrgChart.icon.search=function(t,e,r){return''},OrgChart.icon.xml=function(t,e,r){return''},OrgChart.icon.link=function(t,e,r){return''},OrgChart.icon.happy=function(t,e,r){return''},OrgChart.icon.sad=function(t,e,r){return''},OrgChart.icon.share=function(t,e,r,i,a){return null==i&&(i=0),null==a&&(a=0),`\\n \\n `},OrgChart.icon.user=function(t,e,r,i,a){return OrgChart.isNEU(i)&&(i=0),OrgChart.isNEU(a)&&(a=0),`\\n \\n \\n `},OrgChart.icon.close=function(t,e,r,i,a){return null==i&&(i=0),null==a&&(a=0),`\\n \\n `},OrgChart.prototype.exportPDFProfile=function(t,e){t=this._defaultExportProfileOptions(t,\"pdf\"),this._exportProfile(t,e)},OrgChart.prototype.exportPDFPreview=function(t){OrgChart.pdfPrevUI.show(this,t)},OrgChart.prototype.exportPNGProfile=function(t,e){t=this._defaultExportProfileOptions(t,\"png\"),this._exportProfile(t,e)},OrgChart.prototype.shareProfile=function(t){var e;\"object\"==typeof t?t=(e=t).focusId:e=this.editUI.content(t,!0,!0,\"100%\",!0);var r=new URL(window.location.href);r.searchParams.append(\"nodeId\",t);var i={title:e.title,text:e.shareText,url:r.href};try{navigator.share(i)}catch(t){console.error(\"error: \"+t)}},OrgChart.prototype.exportPDF=function(t,e){t=this._defaultExportOptions(t,\"pdf\"),this._export(t,e)},OrgChart.prototype.exportPNG=function(t,e){t=this._defaultExportOptions(t,\"png\"),this._export(t,e)},OrgChart.prototype.exportSVG=function(t,e){t=this._defaultExportOptions(t,\"svg\"),this._export(t,e)},OrgChart.prototype._defaultExportOptions=function(t,e){return null==t&&(t={}),\"svg\"==e?(t.ext=\"svg\",t.mime=\"image/svg+xml\"):\"pdf\"==e?(t.mime=\"application/pdf\",t.ext=\"pdf\"):\"png\"==e&&(t.mime=\"image/png\",t.ext=\"png\"),null==t.margin&&(t.margin=[50,40,50,40]),null==t.padding&&(t.padding=0),null==t.landscape&&(t.landscape=!1),null==t.filename&&(t.filename=\"OrgChart.\"+t.ext),null==t.scale&&(t.scale=\"fit\"),null==t.format&&(t.format=\"fit\"),null==t.header&&(t.header=\"\"),\"pdf\"==e&&null==t.footer?t.footer=\"Page {current-page} of {total-pages}\":null==t.footer&&(t.footer=\"\"),null==t.openInNewTab&&(t.openInNewTab=!1),null==t.mode&&(t.mode=\"boc-\"+this.config.mode),t},OrgChart.prototype._export=function(t,e){var r=this,i={id:t.nodeId,expandChildren:t.expandChildren,min:t.min};t.margin&&t.margin[0]<2&&(t.margin[0]=2),t.margin&&t.margin[1]<2&&(t.margin[1]=2),t.margin&&t.margin[2]<2&&(t.margin[2]=2),t.margin&&t.margin[3]<2&&(t.margin[3]=2),this._draw(!1,OrgChart.action.exporting,i,(function(i){var a=document.createElement(\"div\");if(a.innerHTML=i,t.padding>0){var n=a.querySelector(\"svg\"),o=OrgChart._getViewBox(n);o[0]-=t.padding,o[1]-=t.padding,o[2]+=2*t.padding,o[3]+=2*t.padding,n.setAttribute(\"viewBox\",o.join()),n.setAttribute(\"width\",o[2]),n.setAttribute(\"height\",o[3])}if(\"svg\"==t.ext)if(e)e(t,a.innerHTML);else{(n=a.querySelector(\"svg\")).classList.add(\"boc-\"+r.config.mode);var l={content:a.innerHTML,options:t,styles:\"\"},s=OrgChart.events.publish(\"exportstart\",[r,l]),h=r.element.querySelector(\"[data-boc-styles]\");if(h&&(l.styles+=h.outerHTML),l.styles&&(a.childNodes[0].insertAdjacentHTML(\"afterbegin\",l.styles),l.content=a.innerHTML),!1===s)return!1;if(!1===(s=OrgChart.events.publish(\"exportend\",[r,l])))return!1;OrgChart._downloadFile(t.mime,l.content,l.options.filename,l.options.openInNewTab,l.options.ext)}else r._pages(t,a.querySelector(\"svg\"),(function(i){var n={content:a.innerHTML,options:t,pages:i,styles:\"\"},o=OrgChart.events.publish(\"exportstart\",[r,n]),l=r.element.querySelector(\"[data-boc-styles]\");if(l&&(n.styles+=l.outerHTML),!1===o)return!1;e||OrgChart.loading.show(r),e?e(r,n,a.querySelector(\"svg\")):(n=JSON.stringify(n),OrgChart._ajax(r.config.exportUrl+\"/v3\",\"POST\",n,\"arraybuffer\",(function(e){var i=OrgChart.events.publish(\"exportend\",[r,e]);if(OrgChart.loading.hide(r),!1===i)return!1;OrgChart._downloadFile(t.mime,e,t.filename,t.openInNewTab,t.ext)})))}))}))},OrgChart.prototype.exportCSV=function(t){var e=OrgChart._defaultExportProfileOptionsForCSV_SVG_JSON(t,\"csv\"),r=this.getNode(e.nodeId),i=null;r?(i=[],OrgChart._exportIterateForJSON_XML_CSV(this,r,e,i)):!1===e.min||!1===e.expandChildren?OrgChart._exportIterateForJSON_XML_CSV(this,this.roots,e,i):i=JSON.parse(JSON.stringify(this.config.nodes));var a={ext:\"csv\",filename:t,options:e,nodes:i};if(!1===OrgChart.events.publish(\"exportstart\",[this,a]))return!1;var n=OrgChart._json2csv(a.nodes),o={ext:a.ext,filename:a.filename,options:e,nodes:a.nodes,content:n};if(!1===OrgChart.events.publish(\"exportend\",[this,o]))return!1;OrgChart._downloadFile(\"text/csv;charset=utf-8;\",\"\\ufeff\"+o.content,o.options.filename,o.options.openInNewTab,o.ext)},OrgChart.prototype.exportXML=function(t){var e=OrgChart._defaultExportProfileOptionsForCSV_SVG_JSON(t,\"xml\"),r=this.getNode(e.nodeId),i=null;r?(i=[],OrgChart._exportIterateForJSON_XML_CSV(this,r,e,i)):!1===e.min||!1===e.expandChildren?OrgChart._exportIterateForJSON_XML_CSV(this,this.roots,e,i):i=JSON.parse(JSON.stringify(this.config.nodes));var a={ext:\"xml\",filename:t,options:e,nodes:i};if(!1===OrgChart.events.publish(\"exportstart\",[this,a]))return!1;var n=OrgChart._json2xml(a.nodes),o={ext:a.ext,filename:a.filename,options:e,nodes:a.nodes,content:n};if(!1===OrgChart.events.publish(\"exportend\",[this,o]))return!1;OrgChart._downloadFile(\"application/xml\",o.content,o.options.filename,o.options.openInNewTab,o.ext)},OrgChart.prototype.exportJSON=function(t){var e=OrgChart._defaultExportProfileOptionsForCSV_SVG_JSON(t,\"json\"),r=this.getNode(e.nodeId),i=null;r?(i=[],OrgChart._exportIterateForJSON_XML_CSV(this,r,e,i)):!1===e.min||!1===e.expandChildren?OrgChart._exportIterateForJSON_XML_CSV(this,this.roots,e,i):i=JSON.parse(JSON.stringify(this.config.nodes));var a={ext:\"json\",filename:e.filename,options:e,nodes:i};if(!1===OrgChart.events.publish(\"exportstart\",[this,a]))return!1;var n={ext:a.ext,filename:a.filename,options:e,nodes:a.nodes,content:JSON.stringify(a.nodes)};if(!1===OrgChart.events.publish(\"exportend\",[this,n]))return!1;OrgChart._downloadFile(\"application/json\",n.content,n.options.filename,n.options.openInNewTab,n.ext)},OrgChart._exportIterateForJSON_XML_CSV=function(t,e,r,i){if(Array.isArray(e))for(var a=0;a0){if(OrgChart.isNEU(r))return!0;for(var i=0;i=0;i--)t[r][i].event_id==e&&t[r].splice(i,1)},publish:function(e,r){if(t[e]){for(var i=[],a=0;a0){var o=!0;for(a=0;a0?this.substring(0,t)+e+this.substr(t):e+this}),Array.prototype.unique||Object.defineProperty(Array.prototype,\"unique\",{value:function(){for(var t=this.concat(),e=0;ei[0]/10)return;if(o>i[1]/10)return}}else if(-1!=e.type.indexOf(\"touch\")&&null==this._touch)return;for(var l=e.target;l!=t;){if(l.hasAttribute(OrgChart.attr.control_expcoll_id)){var s=l.getAttribute(OrgChart.attr.control_expcoll_id),h=this.getNode(s);return void this._expCollHandler(h.id)}if(l.hasAttribute(OrgChart.attr.node_id)){s=l.getAttribute(OrgChart.attr.node_id),h=this.getNode(s);return void this._nodeClickHandler(h.id,e)}if(l.hasAttribute(OrgChart.attr.control_node_menu_id)){e.stopPropagation(),e.preventDefault();s=l.getAttribute(OrgChart.attr.control_node_menu_id),h=this.getNode(s);return void this._nodeMenuClickHandler(h.id,l,e)}if(l.hasAttribute(OrgChart.attr.control_node_circle_menu_id)){e.stopPropagation(),e.preventDefault();s=l.getAttribute(OrgChart.attr.control_node_circle_menu_id);return void this._nodeCircleMenuClickHandler(s)}if(l.hasAttribute(OrgChart.attr.control_node_circle_menu_name))return e.stopPropagation(),e.preventDefault(),void this._nodeCircleMenuItemClickHandler(l,e);if(l.hasAttribute(OrgChart.attr.control_add))return void this._lonelyButtonHandler();if(l.hasAttribute(OrgChart.attr.control_up_id)){s=l.getAttribute(OrgChart.attr.control_up_id);return e.stopPropagation(),e.preventDefault(),void this._upHandler(s)}if(l.hasAttribute(OrgChart.attr.c_link_from))return void OrgChart.events.publish(\"clink-click\",[this,{from:l.getAttribute(OrgChart.attr.c_link_from),to:l.getAttribute(OrgChart.attr.c_link_to),event:e}]);if(l.hasAttribute(OrgChart.attr.s_link_from))return void OrgChart.events.publish(\"slink-click\",[this,{from:l.getAttribute(OrgChart.attr.s_link_from),to:l.getAttribute(OrgChart.attr.s_link_to),event:e}]);l=l.parentNode}},OrgChart.prototype._globalContextHandler=function(t,e){for(var r=e.target;r!=t;){if(r.hasAttribute(OrgChart.attr.node_id)){var i=r.getAttribute(OrgChart.attr.node_id),a=this.getNode(i);return void this._nodeContextHandler(a.id,e)}r=r.parentNode}},OrgChart.prototype._nodeContextHandler=function(t,e){e.preventDefault(),OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide(),this.nodeCircleMenuUI.hide();var r=this.get(t),i=null;if(null!=r&&Array.isArray(r.tags))for(var a=0;a0?e++:e--,l+=e,r.zoom(1-e/12/50,s),parseInt(l)==parseInt(o)?i=!1:h(t)}()}},OrgChart.prototype._nodeCircleNodeMenuItemMouseDownHandler=function(t,e,r){var i=t.parentNode.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id),a=t.getAttribute(OrgChart.attr.control_node_circle_menu_name),n=this.nodeCircleMenuUI._menu[a];if(n.draggable){var o=this,l=OrgChart._getClientXY(e),s=this.getNode(i);t._dragEventFired=!1;var h=o.getScale(),d=null,c=null;this._gragStartedId=i,document.body.style.mozUserSelect=document.body.style.webkitUserSelect=document.body.style.userSelect=\"none\";var g=this.getSvg(),p={x:l.x,y:l.y},u=t.cloneNode(!0);g.insertBefore(u,g.firstChild);var f=OrgChart._getTransform(u),m=f[4],C=f[5],b=function(t){for(;t&&!t.hasAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id);)t=t.parentNode;if(t){var e=OrgChart._getTransform(t);return{x:e[4],y:e[5]}}console.error(\"cannot find parent\"+OrgChart.attr.control_node_circle_menu_wrraper_id)}(t);u.setAttribute(\"transform\",\"matrix(1,0,0,1,\"+(m+b.x)+\",\"+(C+b.y)+\")\"),u.style.opacity=.7;var O=function(t,e){if(null!=t){e.classList.remove(\"boc-drag-over\");for(var r=OrgChart.getStParentNodes(o.getNode(d)),i=0;iOrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE||Math.abs(r.y-p.y)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE))!1===OrgChart.events.publish(\"drag\",[o.nodeCircleMenuUI,{from:I,menuItem:n,menuItemName:a}])&&x(),t._dragEventFired=!0;u.setAttribute(\"transform\",\"matrix(\"+f.toString()+\")\")}}},x=function(e){if(o.moveEnd(),g.classList&&(g.classList.remove(\"boc-cursor-grab\"),g.classList.remove(\"boc-cursor-move\"),g.classList.remove(\"boc-cursor-nodrop\"),g.classList.remove(\"boc-cursor-copy\")),g.removeEventListener(r.move,v),g.removeEventListener(r.up,x),r.leave&&g.removeEventListener(r.leave,x),s.id==d||null==d)return g.removeChild(u),o._gragStartedId=null,void(t._dragEventFired&&OrgChart.events.publish(\"drop\",[o.nodeCircleMenuUI,{from:s.id,menuItemName:a,menuItem:n}]));var i=o.getNode(d);OrgChart.events.publish(\"drop\",[o.nodeCircleMenuUI,{from:s.id,to:i.id,menuItem:n,menuItemName:a}]),O(d,c),g.removeChild(u),o._gragStartedId=null};g.addEventListener(r.move,v),g.addEventListener(r.up,x),r.leave&&g.addEventListener(r.leave,x)}},OrgChart.prototype._nodeMouseDownHandler=function(t,e,r){if(this.config.enableDragDrop){var i=OrgChart._getClientXY(e),a=t.getAttribute(OrgChart.attr.node_id),n=this.getNode(a);t._dragEventFired=!1;var o=null,l=null;this._gragStartedId=a,document.body.style.mozUserSelect=document.body.style.webkitUserSelect=document.body.style.userSelect=\"none\";var s=this,h=this.getSvg(),d={x:i.x,y:i.y},c=OrgChart._getTransform(t),g=c[4],p=c[5],u=s.getScale(),f=t.cloneNode(!0);f.setAttribute(\"data-n-id\",\"draging\"),h.insertBefore(f,h.firstChild),f.style.opacity=.7;var m=function(t,e){if(null!=t){e.classList.remove(\"boc-drag-over\");for(var r=s.getNode(o),i=OrgChart.getStParentNodes(r),a=0;aOrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE||Math.abs(r.y-d.y)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE))!1===OrgChart.events.publish(\"drag\",[s,k,e])&&b(),t._dragEventFired=!0;f.setAttribute(\"transform\",\"matrix(\"+c.toString()+\")\")}}},b=function(e){if(s.moveEnd(),h.classList&&(h.classList.remove(\"boc-cursor-grab\"),h.classList.remove(\"boc-cursor-move\"),h.classList.remove(\"boc-cursor-nodrop\"),h.classList.remove(\"boc-cursor-copy\")),h.removeEventListener(r.move,C),h.removeEventListener(r.up,b),r.leave&&h.removeEventListener(r.leave,b),n.id==o||null==o)return t._dragEventFired&&OrgChart.events.publish(\"drop\",[s,n.id,void 0,f]),h.removeChild(f),void(s._gragStartedId=null);var i=s.getNode(o);if(!1===OrgChart.events.publish(\"drop\",[s,n.id,i.id,f]))return m(o,l),h.removeChild(f),void(s._gragStartedId=null);if(s.canUpdateLink(n.id,o)){var a=s.get(n.id);a.pid=o,a.stpid=null,s.updateNode(a,null,!0)}else h.removeChild(f),m(o,l);s._gragStartedId=null};h.addEventListener(r.move,C),h.addEventListener(r.up,b),r.leave&&h.addEventListener(r.leave,b)}},OrgChart.prototype._resizeHandler=function(t,e){if(this.isVisible){var r=this.getViewBox(),i=this.getSvg(),a=i.getAttribute(\"width\"),n=i.getAttribute(\"height\"),o=a/r[2],l=n/r[3],s=o>l?l:o;i.setAttribute(\"width\",this.width()),i.setAttribute(\"height\",this.height()),r[2]=this.width()/s,r[3]=this.height()/s,this.setViewBox(r),this.xScrollUI.create(this.width()),this.yScrollUI.create(this.height()),this._draw(!1,OrgChart.action.resize)}},OrgChart.prototype._nodeDbClickHandler=function(t,e){if(!1===OrgChart.events.publish(\"dbclick\",[this,this.get(t)]))return!1;this._commonClickHandler(t,e,this.config.nodeMouseDbClick)},OrgChart.prototype._nodeClickHandler=function(t,e){var r=this.getNodeElement(t);if(r&&r._dragEventFired)r._dragEventFired=!1;else{if(!1===OrgChart.events.publish(\"click\",[this,{node:this.getNode(t),event:e}]))return!1;this._commonClickHandler(t,e,this.config.nodeMouseClick)}},OrgChart.prototype._nodeCircleMenuItemClickHandler=function(t,e){var r=t.parentNode.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id),i=t.getAttribute(OrgChart.attr.control_node_circle_menu_name),a=this.nodeCircleMenuUI._menu[i];OrgChart.events.publish(\"click\",[this.nodeCircleMenuUI,{nodeId:r,menuItemName:i,menuItem:a,event:e}])},OrgChart.prototype._nodeCircleMenuClickHandler=function(t){OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide();var e=this.getNode(t),r=null;if(Array.isArray(e.tags))for(var i=0;i1&&(s.type=\"pinch\",s.dist=Math.sqrt((o.x-l.x)*(o.x-l.x)+(o.y-l.y)*(o.y-l.y))),\"pan\"==s.type&&(this._hideBeforeAnimation(),this._changeCursorOnPanStart(a,n,e));var h=function(t){var e=OrgChart._getClientTouchesXY(t,0);if(s&&\"pan\"==s.type){i._hideBeforeAnimation(),s.diffX=e.x-s.x0,s.diffY=e.y-s.y0;var r=-s.diffY/n+s.viewBoxTop,o=-s.diffX/n+s.viewBoxLeft;i._move(r,o,a)}else if(s&&\"pinch\"==s.type){var l=OrgChart._getClientTouchesXY(t,1),h=Math.sqrt((e.x-l.x)*(e.x-l.x)+(e.y-l.y)*(e.y-l.y)),d=1+(h-s.dist)/(s.dist/100)/100;s.dist=h;var c=OrgChart._pinchMiddlePointInPercent(i.element,i.width(),i.height(),t);i.zoom(d,c)}},d=function(){\"pan\"==s.type&&i.config.sticky?setTimeout((function(){OrgChart._moveToBoundaryArea(t,i.getViewBox(),i.response.boundary,(function(){i._draw(!0,OrgChart.action.pan)}))}),0):\"pan\"!=s.type||i.config.sticky||setTimeout((function(){i._draw(!0,OrgChart.action.pan)}),0),\"pan\"==s.type&&i._changeCursorOnPanEnd(),s=null,t.removeEventListener(r.move,h),t.removeEventListener(r.up,d),r.leave&&t.removeEventListener(r.leave,d),r.touchstart&&t.removeEventListener(r.touchstart,d)};this.config.enablePan&&(t.addEventListener(r.move,h),t.addEventListener(r.up,d),r.leave&&t.addEventListener(r.leave,d),r.touchstart&&t.addEventListener(r.touchstart,d))},OrgChart.prototype._changeCursorOnPanStart=function(t,e,r){var i=this.getPointerElement(),a=OrgChart._getOffsetXY(this.element,r),n=a.x/e+t[0]-16/e,o=a.y/e+t[1]-16/e;i.style.display=\"inherit\",i.setAttribute(\"transform\",\"matrix(0,0,0,0,\"+n+\",\"+o+\")\"),OrgChart.animate(i,{transform:[0,0,0,0,n,o],opacity:0},{transform:[1/e,0,0,1/e,n,o],opacity:1},300,OrgChart.anim.outBack)},OrgChart.prototype._changeCursorOnPanEnd=function(){this.getPointerElement().style.display=\"none\"},OrgChart.searchUI=function(){this.lastSearch=[],this._searchAfterEnterPress=!1},OrgChart.searchUI.prototype.init=function(t){this.obj=t,this._initSearchFields();var e=this,r=this.obj.config.padding-10,i=this.obj.config.padding-10,a=this.obj.getMenuButton();if(a){var n=a.getBoundingClientRect(),o=this.obj.getSvg().getBoundingClientRect();r=o.right-n.left+10,i=n.top-o.top-10}var l=document.createElement(\"div\");l.classList.add(\"boc-search\"),l.style.right=r+\"px\",l.style.top=i+\"px\";var s=OrgChart.elements.textbox({},{label:OrgChart.SEARCH_PLACEHOLDER,btn:\"X\"},\"320px\");l.innerHTML+=s.html,this.xBtn=l.querySelector(\"[data-input-btn]\"),this.xBtn.style.display=\"none\",this.searchTableWrapper=document.createElement(\"div\"),l.appendChild(this.searchTableWrapper);var h=t.getSvg().nextSibling;this.obj.element.insertBefore(l,h),OrgChart.input.init(l),this.input=document.getElementById(s.id),this.xBtn.addEventListener(\"click\",(function(t){t.preventDefault(),e.hide()})),this.input.addEventListener(\"keypress\",(function(t){\"Enter\"==t.key&&t.preventDefault()})),this.input.addEventListener(\"focus\",(function(t){e.xBtn.style.display=\"\",e._search()})),this.input.addEventListener(\"blur\",(function(t){OrgChart.isNEU(e.input.value)&&OrgChart.SEARCH_HELP_SYMBOL!=e.input.value&&(e.xBtn.style.display=\"none\")})),this.input.addEventListener(\"keydown\",(function(t){(\"ArrowDown\"==t.key||\"ArrowUp\"==t.key)&&t.preventDefault()})),this.input.addEventListener(\"keyup\",(function(t){\"ArrowDown\"==t.key?d():\"ArrowUp\"==t.key?c():\"Enter\"==t.key?e._enterHandler():\"Escape\"==t.key?e.hide():e._search()}));var d=function(){var t=e.obj.element.querySelectorAll(\"[data-search-item-id]\"),r=e.obj.element.querySelector('[data-selected=\"yes\"]');null==r&&t.length>0?t[0].setAttribute(\"data-selected\",\"yes\"):t.length>0&&r.nextSibling&&r.nextSibling.setAttribute&&(r.removeAttribute(\"data-selected\"),r.nextSibling.setAttribute(\"data-selected\",\"yes\"))},c=function(){var t=e.obj.element.querySelectorAll(\"[data-search-item-id]\"),r=e.obj.element.querySelector('[data-selected=\"yes\"]');null==r&&t.length>0?t[t.length-1].setAttribute(\"data-selected\",\"yes\"):t.length>0&&r.previousSibling&&r.previousSibling.setAttribute&&(r.removeAttribute(\"data-selected\"),r.previousSibling.setAttribute(\"data-selected\",\"yes\"))}},OrgChart.searchUI.prototype._enterHandler=function(){var t=this.obj.element.querySelector('[data-selected=\"yes\"]');if(t){if(t.hasAttribute(\"data-search-item-id\")){var e=t.getAttribute(\"data-search-item-id\");if(this.input.value!=OrgChart.SEARCH_HELP_SYMBOL)0!=OrgChart.events.publish(\"searchclick\",[this.obj,e])&&this.obj.center(e);else this.input.value=e+\" \",this.searchTableWrapper.innerHTML=\"\"}}else this._searchAfterEnterPress=!0,this.__search(),this.searchTableWrapper.innerHTML=\"\",this.obj.draw()},OrgChart.searchUI.prototype._initSearchFields=function(){if(null==this.obj.config.searchFields){this._searchFields=[];for(var t=0;t\\n \\n ${function(){for(var t=\"\",i=0;i=OrgChart.SEARCH_RESULT_LIMIT);i++){var a=e.lastSearch[i],n=\"\";if(r){var o=e.obj._get(a.id);\"function\"==typeof r?n=r(e.obj,e.obj.getNode(a.id),o):o[r]&&(n=o[r])}var l=\"\",s=\"\";e.obj.config.searchDisplayField==a.__searchField?l=a.__searchMarks:e.obj.config.searchDisplayField?(l=a[e.obj.config.searchDisplayField],OrgChart.isNEU(l)&&(l=\"\"),s=a.__searchMarks):l=a.__searchMarks,t+=OrgChart.searchUI.createItem(n,a.id,l,s)}return t}()} \\n \\n `}this.searchTableWrapper.innerHTML=t;for(var i=this.obj.element.querySelectorAll(\"[data-search-item-id]\"),a=0;a${e}${this._searchFieldsAbbreviation[e]}`;return t+=\"\"},OrgChart.searchUI.createItem=function(t,e,r,i){return r&&(r=\"\"+r+\"\"),`\\n \\n ${t=t?`
`:`
${OrgChart.icon.user(32,32,\"#aeaeae\")}
`}\\n \\n ${r}
${i}\\n `},OrgChart.searchUI.prototype.hide=function(){this._searchAfterEnterPress&&(this._searchAfterEnterPress=!1,this.obj.draw()),this.lastSearch=[],this.xBtn&&(this.xBtn.style.display=\"none\"),this.searchTableWrapper&&(this.searchTableWrapper.innerHTML=\"\"),this.input&&(this.input.value=\"\",document.activeElement==this.input&&this.input.blur(),document.activeElement==this.xBtn&&OrgChart.input.blurHandler(this.input))},void 0===OrgChart&&(OrgChart={}),OrgChart.manager=function(t){this.config=t.config,this.layoutConfigs=t._layoutConfigs,this.visibleNodeIds=[],this.viewBox=null,this.action=null,this.actionParams=null,this.nodes={},this.oldNodes={},this.maxX=null,this.maxY=null,this.minX=null,this.minY=null,this.bordersByRootIdAndLevel=null,this.roots=null,this.state=null,this.vbIsInitializedFromState=!1,this.rootList=[],this.instance=t},OrgChart.manager.prototype.read=function(t,e,r,i,a,n,o,l){var s=this;OrgChart.state._get(this.config.state,e,r,(function(h){s.state=h,s.action=a,s.actionParams=n,a!=OrgChart.action.init||!s.state||n&&n.method&&\"fit\"==n.method?(s.viewBox=i,s.vbIsInitializedFromState=!1):(s.viewBox=s.state.vb,s.vbIsInitializedFromState=!0,Array.isArray(s.state.roots)&&(s.config.roots=s.state.roots));var d=s.maxX,c=s.maxY,g=s.minX,p=s.minY,u=s.bordersByRootIdAndLevel,f=s.roots,m=s.nodes;if(t){var C=OrgChart.manager._getResponse(e,r,s.visibleNodeIds,s.config,d,c,g,p,s.viewBox,f,s.action,s.actionParams,m,s.oldNodes,s.vbIsInitializedFromState);a!=OrgChart.action.exporting&&(s.maxX=d,s.maxY=c,s.minX=g,s.minY=p,s.roots=f,s.nodes=m,s.visibleNodeIds=C.visibleNodeIds),C.bordersByRootIdAndLevel=u,C.roots=f,C.adjustify={x:0,y:0},s.state&&(C.adjustify=s.state.adjustify),o(C)}else s.oldNodes=m||null,s._read((function(t){d=t.maxX,c=t.maxY,g=t.minX,p=t.minY,u=t.bordersByRootIdAndLevel,f=t.roots,m=t.nodes;var i=OrgChart.manager._getResponse(e,r,s.visibleNodeIds,s.config,d,c,g,p,s.viewBox,f,s.action,s.actionParams,m,s.oldNodes,s.vbIsInitializedFromState);i.notif=t.limit,i.roots=f,i.bordersByRootIdAndLevel=u,i.adjustify=t.adjustify,a!=OrgChart.action.exporting&&(s.maxX=d,s.maxY=c,s.minX=g,s.minY=p,s.roots=f,s.nodes=m,s.visibleNodeIds=i.visibleNodeIds,s.bordersByRootIdAndLevel=u,s.rootList=t.rootList),o(i)}),l)}))},OrgChart.manager.prototype._read=function(t,e){var r=this,i=OrgChart.manager._createNodes(this.instance);e(i);var a=i.nodes,n=i.roots,o=OrgChart.remote;null==o&&(o=OrgChart.local),o._setPositions(n,r.layoutConfigs,(function(e){var o=OrgChart.manager._doNotChangePositionOfClickedNodeIfAny(n,a,r.action,r.actionParams,r.oldNodes,r.config.orientation);r.state&&r.action==OrgChart.action.init&&(o=r.state.adjustify);for(var l={minX:null,minY:null,maxX:null,maxY:null},s={},h=0;h=e.collapse.level-1&&-1==i.indexOf(t.id):a==OrgChart.action.centerNode||a==OrgChart.action.insert||a==OrgChart.action.expand||a==OrgChart.action.collapse?i.has(t.id)&&(t.collapsed=!1):a==OrgChart.action.update&&r&&r.changeRoots&&r.changeRoots.has(t.id)&&(t.collapsed=!1)},OrgChart.manager._initNode=function(t,e,r,i,a,n,o){var l=o.manager.config,s=o.manager.layoutConfigs,h=o.manager.action,d=o.manager.actionParams,c=o.manager.state,g=s[r||\"base\"];null==t.parent&&OrgChart.manager._setCollpasedProperty(t,g,d,a,h,i-1,c);for(var p=0;p0&&(t.subLevels=m),-1!=t.tags.indexOf(\"assistant\")&&null!=t.parent&&(t.isAssistant=!0);var C=OrgChart.t(t.templateName,t.min);t.w=C&&C.size?C.size[0]:0,t.h=C&&C.size?C.size[1]:0,t.padding=C&&C.padding?C.padding:[0,0,0,0];var b={node:t};OrgChart.events.publish(\"node-initialized\",[o,b]),OrgChart.events.publish(\"node-created\",[t])},OrgChart.manager._iterate=function(t,e,r,i,a,n,o,l,s,h,d,c){var g=c.manager.layoutConfigs;if(OrgChart.manager._initNode(e,r,s,i,h,d,c),e.isAssistant&&(n[e.pid]||(n[e.pid]=[]),n[e.pid].push(e.id)),e.subLevels>0&&o.push(e.id),OrgChart.MIXED_LAYOUT_FOR_NODES_WITH_COLLAPSED_CHILDREN&&!e.isAssistant&&e.parent){if(e.parent&&e.parent.children.length&&e.parent.children[e.parent.children.length-1]==e){for(var p=[],u=0,f=0,m=0;m1&&p.length==e.parent.children.length-u-f||!OrgChart.MIXED_LAYOUT_ALL_NODES&&p.length>1)&&(l[e.pid]=p)}}else if(!e.isAssistant&&0==e.childrenIds.length&&e.parent&&!l[e.pid]){for(p=[],u=0,f=0,m=0;m1&&p.length==e.parent.childrenIds.length-u-f||!OrgChart.MIXED_LAYOUT_ALL_NODES&&p.length>1)&&(l[e.pid]=p)}e.stChildren.length&&(t.stContainerNodes||(t.stContainerNodes=[]),t.stContainerNodes.push(e));for(var b=0;b-1&&O.childrenIds.splice(z,1);s.push(c)}}}e.roots=[];for(d=0;d=0;d--)s[d].collapsed&&s.splice(d,1);for(d=0;d=0;x--)if(N[L[x]])for(f=0;f-1&&(O.children.splice(z,1),O.children.splice(z,0,j)),j.children.push(C),j.parent=O,C.parent=j,l[j.id]=j}}for(var Y in w){(O=l[Y]).hasAssistants=!0;j=new OrgChart.node(O.id+\"_split_assitant_0\",O.id,[\"assistant\"],\"split\");OrgChart.manager._initDinamicNode(j,O.lcn,!0),l[j.id]=j;var q=[];for(x=O.children.length-1;x>=0;x--){(D=O.children[x]).isAssistant?(D.parent=null,O.children.splice(x,1),q.splice(0,0,D.id)):D.isPartner||(D.parent&&S[D.parent.id]&&j&&D.parent.id!=j.id&&(Object.defineProperty(S,j.id,Object.getOwnPropertyDescriptor(S,D.parent.id)),delete S[D.parent.id]),D.parent=j,j.children.unshift(D),O.children.splice(x,1))}if(q.length%2){var X=l[q[q.length-1]],$=new OrgChart.node(X.id+\"_mirror\",O.pid,[],\"mirror\");OrgChart.manager._initDinamicNode($,X.lcn,!0),X._m=$.id,$.isAssistant=!0,$.w=X.w,$.h=X.h,l[$.id]=$,q.splice(q.length-1,0,$.id)}var V=1;for(x=q.length-1;x>=0;x--)if(x%2&&x!=q.length-1){var G=new OrgChart.node(O.id+\"_split_assitant_\"+V,O.pid,[],\"split\");OrgChart.manager._initDinamicNode(G,O.lcn,!0),l[G.id]=G,q.splice(x,0,G.id),V++}else x%2&&q.splice(x,0,j.id);for(x=0;x=0;d--){O=(D=l[nt[d]]).parent,D.layout=OrgChart.mixed;for(x=O.children.length-1;x>=0;x--)if(D.id==O.children[x].id){O.children.splice(x,1);break}if(d>0){var ot=l[nt[d-1]];D.parent=ot,D.layout=OrgChart.mixed,ot.children.push(D)}else O.children.push(D)}}else if(rt.layout==OrgChart.tree||rt.layout==OrgChart.treeRightOffset||rt.layout==OrgChart.treeLeftOffset){j=new OrgChart.node(O.id+\"_split_0\",it.id,[],\"split\");OrgChart.manager._initDinamicNode(j,O.lcn),l[j.id]=j,j.layout=OrgChart.tree;var lt=[];for(d=rt.childrenIds.length-1;d>=0;d--){for(D=l[rt.childrenIds[d]],x=0;x=0;x--)if(x%2&&x!=lt.length-1){G=new OrgChart.node(O.id+\"_split_\"+V,it.id,[],\"split\");OrgChart.manager._initDinamicNode(G,O.lcn),G.layout=OrgChart.tree,l[G.id]=G,lt.splice(x,0,G.id),V++}else x%2&<.splice(x,0,j.id);for(x=0;xo&&l>r;return d&&(d=i+n>s&&h>i),d}if(a(t,r))return!0;for(var n=0;ne.sl&&(e=r);for(var i=0;i=a-o)switch(w=(a+o)/2-y/2,i.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:w=(o-a)/2-y/2}else switch(w=f.x-y/2+OrgChart.manager._getNodeWidth(f,i)/2,i.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:(w=-(y/2-(o-a)/2))-i.padding&&(w=-i.padding)}if(_-2*i.padding>=n-l)switch(k=(n+l)/2-_/2,i.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:k=(l-n)/2-_/2}else switch((k=-(_/2-(n-l)/2))>-i.padding&&(k=-i.padding),i.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:(k=-(_/2-(l-n)/2))C.right?C.right:C.left),s[0]>C.right&&s[0]>C.left&&(s[0]=C.left>C.right?C.left:C.right),s[1]C.bottom?C.bottom:C.top),s[1]>C.bottom&&s[1]>C.top&&(s[1]=C.top>C.bottom?C.top:C.bottom))}if(d==OrgChart.action.centerNode||d==OrgChart.action.maximize){var S=g[c.id];1==c.options.horizontal&&(s[0]=S.x+S.w/2-s[2]/2),1==c.options.vertical&&(s[1]=S.y+S.h/2-s[3]/2),i.sticky&&(s[0]C.right?C.right:C.left),s[0]>C.right&&s[0]>C.left&&(s[0]=C.left>C.right?C.left:C.right),s[1]C.bottom?C.bottom:C.top),s[1]>C.bottom&&s[1]>C.top&&(s[1]=C.top>C.bottom?C.top:C.bottom))}if(d==OrgChart.action.insert||d==OrgChart.action.expand||d==OrgChart.action.collapse||d==OrgChart.action.update||d==OrgChart.action.centerNode||d==OrgChart.action.maximize){var I=null;if(d==OrgChart.action.insert&&c&&null!=c.insertedNodeId&&null!=c.insertedNodeId)I=g[c.insertedNodeId];else if(d==OrgChart.action.update&&c&&null!=c.visId&&null!=c.visId)I=g[c.visId];else if(d!=OrgChart.action.expand&&d!=OrgChart.action.collapse&&d!=OrgChart.action.maximize||!c||null==c.id||null==c.id){if(d==OrgChart.action.centerNode||d==OrgChart.action.maximize){switch(i.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:c.options.vertical||(I=g[c.id]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:c.options.horizontal||(I=g[c.id])}I&&(I=OrgChart.manager._getMostDeepChild(I,g))}}else I=g[c.id],I=OrgChart.manager._getMostDeepChild(I,g);if(!OrgChart.FIXED_POSITION_ON_CLICK&&I)switch(i.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:var A=I.y+I.h-s[3]+i.padding;s[1]A&&(s[1]=A);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:A=I.x-i.padding;s[0]>A&&(s[0]=A);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:A=I.x+I.w-s[2]+i.padding;s[0]0&&(h[r-1].children.push(d),d.parent=h[r-1]),e[d.id]=d,h.push(d)}if(h.length){for(var c=h[h.length-1],g=h[0],p=t.children.length-1;p>=0;p--){var u=t.children[p];c.children.unshift(u),u.parent=c,t.children.splice(p,1)}t.children.push(g),g.parent=t}}},OrgChart.manager._verticalAssistantLevelCountIterate=function(t,e,r){r.max',svg:'{content}',link:'',pointer:'',node:'',plus:'',minus:'',nodeMenuButton:'',menuButton:'



',img_0:'',link_field_0:'{val}',editFormHeaderColor:\"#039BE5\"},OrgChart.templates.ana={defs:\"\",size:[250,120],linkAdjuster:{fromX:0,fromY:0,toX:0,toY:0},ripple:{radius:0,color:\"#e6e6e6\",rect:null},expandCollapseSize:30,svg:'{content}',link:'',assistanseLink:'',pointer:'',node:'',plus:'',minus:'',up:'',nodeMenuButton:'',menuButton:OrgChart.templates.base.menuButton,img_0:'',link_field_0:'{val}',field_0:\"{val}',field_1:\"{val}',padding:[50,20,35,20],editFormHeaderColor:\"#039BE5\"},OrgChart.templates.split=Object.assign({},OrgChart.templates.ana),OrgChart.templates.split.size=[10,10],OrgChart.templates.split.node='',OrgChart.templates.split.field_0=\"\",OrgChart.templates.split.field_1=\"\",OrgChart.templates.split.img_0=\"\",OrgChart.templates.dot=Object.assign({},OrgChart.templates.split),OrgChart.templates.group=Object.assign({},OrgChart.templates.ana),OrgChart.templates.group.size=[250,120],OrgChart.templates.group.node='',OrgChart.templates.group.link='',OrgChart.templates.group.nodeMenuButton='',OrgChart.templates.group.field_0=\"{val}',OrgChart.templates.group.field_1=\"\",OrgChart.templates.group.ripple={radius:50,color:\"#aeaeae\"},OrgChart.templates.invisibleGroup=Object.assign({},OrgChart.templates.group),OrgChart.templates.invisibleGroup.node=\"\",OrgChart.templates.invisibleGroup.padding=[0,0,0,0],OrgChart.templates.invisibleGroup.field_0=\"\",OrgChart.templates.invisibleGroup.nodeMenuButton=\"\",OrgChart.templates.mirror={linkAdjuster:{},link:\"\",node:\"\",nodeMenuButton:\"\",size:[0,0]},OrgChart.templates.ula=Object.assign({},OrgChart.templates.ana),OrgChart.templates.ula.field_0=\"{val}',OrgChart.templates.ula.field_1=\"{val}',OrgChart.templates.ula.node='',OrgChart.templates.ula.img_0='',OrgChart.templates.ula.menu='',OrgChart.templates.ula.nodeMenuButton='',OrgChart.templates.olivia=Object.assign({},OrgChart.templates.ana),OrgChart.templates.olivia.defs='\\n \\'',OrgChart.templates.olivia.field_0=\"{val}',OrgChart.templates.olivia.field_1=\"{val}',OrgChart.templates.olivia.node='',OrgChart.templates.olivia.img_0='',OrgChart.templates.olivia.nodeMenuButton='',OrgChart.templates.belinda=Object.assign({},OrgChart.templates.ana),OrgChart.templates.belinda.size=[180,180],OrgChart.templates.belinda.ripple={radius:90,color:\"#e6e6e6\",rect:null},OrgChart.templates.belinda.node='',OrgChart.templates.belinda.img_0='',OrgChart.templates.belinda.field_0=\"{val}',OrgChart.templates.belinda.field_1=\"{val}',OrgChart.templates.belinda.link='',OrgChart.templates.belinda.nodeMenuButton='',OrgChart.templates.rony=Object.assign({},OrgChart.templates.ana),OrgChart.templates.rony.svg='{content}',OrgChart.templates.rony.defs='',OrgChart.templates.rony.size=[180,250],OrgChart.templates.rony.ripple={color:\"#F57C00\",radius:5,rect:null},OrgChart.templates.rony.img_0='',OrgChart.templates.rony.node='',OrgChart.templates.rony.field_0=\"{val}',OrgChart.templates.rony.field_1=\"{val}',OrgChart.templates.rony.field_2=\"{val}',OrgChart.templates.rony.link='',OrgChart.templates.rony.plus='',OrgChart.templates.rony.minus='',OrgChart.templates.rony.nodeMenuButton='',OrgChart.templates.mery=Object.assign({},OrgChart.templates.ana),OrgChart.templates.mery.ripple={color:\"#e6e6e6\",radius:50,rect:null},OrgChart.templates.mery.node='',OrgChart.templates.mery.link='',OrgChart.templates.mery.img_0='',OrgChart.templates.mery.field_0=\"{val}',OrgChart.templates.mery.field_1=\"{val}',OrgChart.templates.mery.nodeMenuButton='',OrgChart.templates.polina=Object.assign({},OrgChart.templates.ana),OrgChart.templates.polina.size=[300,80],OrgChart.templates.polina.ripple={color:\"#e6e6e6\",radius:40,rect:null},OrgChart.templates.polina.node='',OrgChart.templates.polina.img_0='',OrgChart.templates.polina.field_0=\"{val}',OrgChart.templates.polina.field_1=\"{val}',OrgChart.templates.polina.link='',OrgChart.templates.polina.nodeMenuButton='',OrgChart.templates.mila=Object.assign({},OrgChart.templates.ana),OrgChart.templates.mila.node='',OrgChart.templates.mila.img_0='',OrgChart.templates.mila.field_0=\"{val}',OrgChart.templates.mila.nodeMenuButton='',OrgChart.templates.diva=Object.assign({},OrgChart.templates.ana),OrgChart.templates.diva.size=[200,170],OrgChart.templates.diva.node='',OrgChart.templates.diva.img_0='',OrgChart.templates.diva.field_0=\"{val}',OrgChart.templates.diva.field_1=\"{val}',OrgChart.templates.diva.pointer='',OrgChart.templates.diva.nodeMenuButton='',OrgChart.templates.luba=Object.assign({},OrgChart.templates.ana),OrgChart.templates.luba.svg='{content}',OrgChart.templates.luba.defs='',OrgChart.templates.luba.node='',OrgChart.templates.luba.img_0='',OrgChart.templates.luba.nodeMenuButton='',OrgChart.templates.luba.field_0=\"{val}',OrgChart.templates.luba.field_1=\"{val}',OrgChart.templates.luba.plus='',OrgChart.templates.luba.minus='',OrgChart.templates.luba.expandCollapseSize=36,OrgChart.templates.isla=Object.assign({},OrgChart.templates.ana),OrgChart.templates.isla.defs='',OrgChart.templates.isla.size=[180,120],OrgChart.templates.isla.node='',OrgChart.templates.isla.field_0=\"{val}',OrgChart.templates.isla.field_1=\"{val}',OrgChart.templates.isla.img_0='',OrgChart.templates.isla.minus='',OrgChart.templates.isla.plus='',OrgChart.templates.isla.nodeMenuButton='',OrgChart.templates.isla.ripple={radius:0,color:\"#F57C00\",rect:{x:0,y:20,width:180,height:100}},OrgChart.templates.deborah=Object.assign({},OrgChart.templates.polina),OrgChart.templates.deborah.size=[150,150],OrgChart.templates.deborah.node='',OrgChart.templates.deborah.img_0='',OrgChart.templates.deborah.field_0=\"{val}',OrgChart.templates.deborah.field_1=\"{val}',OrgChart.templates.deborah.nodeMenuButton='',OrgChart.templates.subLevel=Object.assign({},OrgChart.templates.base),OrgChart.templates.subLevel.size=[0,0],OrgChart.templates.subLevel.node=\"\",OrgChart.templates.subLevel.plus=\"\",OrgChart.templates.subLevel.minus=\"\",OrgChart.templates.subLevel.nodeMenuButton=\"\",OrgChart.templates.group_dotted_lines=Object.assign({},OrgChart.templates.group),OrgChart.templates.group_dotted_lines.size=[250,120],OrgChart.templates.group_dotted_lines.link='',OrgChart.templates.group_dotted_lines.node='',OrgChart.templates.group_dotted_lines.nodeGroupDottedCloseButton=''+OrgChart.icon.close(25,25,\"#fff\",-13,8)+\"\",OrgChart.templates.group_dotted_lines.field_0='Dotted Lines',OrgChart.templates.group_dotted_lines.field_1=\"\",OrgChart.templates.group_dotted_lines.img_0=\"\",OrgChart.templates.group_dotted_lines.ripple.radius=5,OrgChart.templates.group_dotted_lines.min=Object.assign({},OrgChart.templates.olivia),OrgChart.templates.group_dotted_lines.min.nodeGroupDottedOpenButton='{children-total-count}',OrgChart.ui={_defsIds:{},defs:function(t){var e=\"\";for(var r in OrgChart.templates){var i=OrgChart.templates[r];i.defs&&(OrgChart.ui._defsIds[r]=OrgChart.randomId(),e+=i.defs.replaceAll(\"{randId}\",OrgChart.ui._defsIds[r]))}return\"\"+e+t+\"\"},lonely:function(t){return t.nodes&&t.nodes.length?\"\":OrgChart.IT_IS_LONELY_HERE.replace(\"{link}\",OrgChart.RES.IT_IS_LONELY_HERE_LINK)},pointer:function(t,e,r){return e===OrgChart.action.exporting?\"\":OrgChart.t(t.template,!1,r).pointer},node:function(t,e,r,i,a,n,o,l,s,h){var d=OrgChart.t(t.templateName,t.min,s),c=d.node.replaceAll(\"{w}\",t.w).replaceAll(\"{h}\",t.h);d.defs&&(c=c.replaceAll(\"{randId}\",OrgChart.ui._defsIds[t.templateName])),null==o&&(o=i.nodeBinding);var g={node:t,data:e};for(var p in o){var u,f=o[p];e&&(u=e[f]);var m=OrgChart._lblIsImg(i,p);if(g.value=u,g.element=d[p],g.name=f,g.field=p,!1!==OrgChart.events.publish(\"field\",[h,g])&&null!=g.value&&null!=g.value&&null!=g.element){if(!m&&\"string\"==typeof g.value){var C=g.element;C&&(C=C.replaceAll(\"{ew}\",t.w-(t.padding?t.padding[1]:0)).replaceAll(\"{cw}\",t.w/2)),g.value=OrgChart.wrapText(g.value,C)}var b=g.element.replace(\"{val}\",g.value);c+=b=b.replaceAll(\"{ew}\",t.w-(t.padding?t.padding[1]:0)).replaceAll(\"{cw}\",t.w/2).replaceAll(\"{randId}\",OrgChart.randomId()).replaceAll(\"{randId2}\",OrgChart.randomId())}}var O=OrgChart._getPosition(r,t,a,n),v=\"node\";Array.isArray(t.tags)&&t.tags.length&&(v+=\" \"+t.tags.join(\" \")),t.layout&&(v+=\" tree-layout\");var x=\"\";t.lcn&&(x='lcn=\"'+t.lcn+'\"');var y=OrgChart.nodeOpenTag.replace(\"{lcn}\",x).replace(\"{id}\",t.id).replace(\"{class}\",v).replace(\"{sl}\",t.sl).replace(\"{level}\",t.level).replace(\"{x}\",O.x).replace(\"{y}\",O.y),_=OrgChart._getOpacity(r,t);return c=(y=y.replace(\"{opacity}\",_))+(c+=OrgChart.ui.nodeBtns(i,t,l,d,h))+OrgChart.grCloseTag},nodeBtns:function(t,e,r,i,a){var n=\"\";return null==t.nodeMenu||e.isSplit||r===OrgChart.action.exporting||(n+=i.nodeMenuButton.replace(\"{id}\",e.id).replace(\"{cw}\",e.w/2).replace(\"{ch}\",e.h/2).replace(\"{ew}\",e.w-(e.padding?e.padding[1]:0)).replace(\"{eh}\",e.h-(e.padding?e.padding[2]:0))),null==t.nodeCircleMenu||e.isSplit||r===OrgChart.action.exporting||OrgChart.isNEU(i.nodeCircleMenuButton)||(n+=''),n},expandCollapseBtn:function(t,e,r,i,a){var n=\"\";if(i!==OrgChart.action.exporting&&!e.isSplit){var o=r[e.lcn?e.lcn:\"base\"],l=0,s=0,h=OrgChart.t(e.templateName,e.min,a);if(e.childrenIds.length>0){if(e.hasPartners){for(var d=!1,c=0;cn&&(d=i-h)),ta&&r==a&&(r+=h),e!=n&&i==n&&(o=r,l=d=i,ta&&(s=r-h)),en&&i==n&&(i+=h)),{x1:t,y1:e,x2:r,y2:i,x3:a,y3:n,qx1:o,qy1:l,qx2:s,qy2:d}},_linkTopToBottom:function(t,e,r,i,a){var n,o,l,s,h,d=0;return n=t.x+t.w/2+r.linkAdjuster.toX,o=t.y+t.h+r.linkAdjuster.toY,s=l=e.x+e.w/2+r.linkAdjuster.fromX,h=e.y+r.linkAdjuster.fromY,{xa:n,ya:o,xb:n,yb:d=t.rightNeighbor&&t.rightNeighbor.isAssistant&&\"split\"==e.templateName?t.rightNeighbor.y+t.rightNeighbor.h+i:\"split\"!=t.templateName||!e.isAssistant&&2!=e.layout?\"split\"==e.templateName?o+i:null!=a?a:h-i:h,xc:l,yc:d,xd:s,yd:h,x:l,y:OrgChart.isNEU(e.parentPartner)?d+16:d,rotate:0}},_linkBottomToTop:function(t,e,r,i,a){var n,o,l,s,h,d=0;return n=t.x+t.w/2+r.linkAdjuster.toX,o=t.y+r.linkAdjuster.toY,s=l=e.x+e.w/2+r.linkAdjuster.fromX,h=e.y+e.h+r.linkAdjuster.fromY,{xa:n,ya:o,xb:n,yb:d=t.rightNeighbor&&t.rightNeighbor.isAssistant&&\"split\"==e.templateName?t.rightNeighbor.y-i:\"split\"!=t.templateName||!e.isAssistant&&2!=e.layout?\"split\"==e.templateName?o-i:null!=a?a:h+i:h,xc:l,yc:d,xd:s,yd:h,x:l,y:d-14,rotate:0}},_linkRightToLeft:function(t,e,r,i,a){var n,o,l,s,h,d,c=0;return n=t.x+r.linkAdjuster.toX,o=t.y+t.h/2+r.linkAdjuster.toY,h=e.x+e.w+r.linkAdjuster.fromX,d=s=e.y+e.h/2+r.linkAdjuster.fromY,l=o,90,{xa:n,ya:o,xb:c=t.rightNeighbor&&t.rightNeighbor.isAssistant&&\"split\"==e.templateName?t.rightNeighbor.x-i:\"split\"!=t.templateName||!e.isAssistant&&2!=e.layout?\"split\"==e.templateName?n-i:null!=a?a:h+i:h,yb:l,xc:c,yc:s,xd:h,yd:d,x:c-16,y:s,rotate:90}},_linkLeftToRight:function(t,e,r,i,a){var n,o,l,s,h,d,c=0;return n=t.x+t.w+r.linkAdjuster.toX,o=t.y+t.h/2+r.linkAdjuster.toY,h=e.x+r.linkAdjuster.fromX,d=s=e.y+e.h/2+r.linkAdjuster.fromY,l=o,270,{xa:n,ya:o,xb:c=t.rightNeighbor&&t.rightNeighbor.isAssistant&&\"split\"==e.templateName?t.rightNeighbor.x+t.rightNeighbor.w+i:\"split\"!=t.templateName||!e.isAssistant&&2!=e.layout?\"split\"==e.templateName?n+i:null!=a?a:h-i:h,yb:l,xc:c,yc:s,xd:h,yd:d,x:c+14,y:s,rotate:270}},_linkPpTop:function(t,e,r,i,a,n){var o=t.ppnodes[r.id],l=o.y+o.h/2,s=i.minY-(i.minY-a.maxY)/2,h=(i.minY-a.maxY)/t.maxSidePartnersWithChildren/4,d=OrgChart.ui.__linkPpBottomTop(t,e,r,s,h,o),c=d.x;return s=d.mid,OrgChart.ui._linkTopToBottom({x:c,y:l,w:0,h:0},r,n,0,s)},_linkPpBottom:function(t,e,r,i,a,n){var o=t.ppnodes[r.id],l=o.y+o.h/2,s=i.maxY-(i.maxY-a.minY)/2,h=(i.maxY-a.minY)/t.maxSidePartnersWithChildren/4,d=OrgChart.ui.__linkPpBottomTop(t,e,r,s,h,o),c=d.x;return s=d.mid,OrgChart.ui._linkBottomToTop({x:c,y:l,w:0,h:0},r,n,0,s)},_linkPpLeft:function(t,e,r,i,a,n){var o=t.ppnodes[r.id],l=i.minX-(i.minX-a.maxX)/2,s=(i.minX-a.maxX)/t.maxSidePartnersWithChildren/4,h=o.x+o.w/2,d=OrgChart.ui.__linkPpLeftRight(t,e,r,l,s,o),c=d.y;return l=d.mid,OrgChart.ui._linkLeftToRight({x:h,y:c,w:0,h:0},r,n,0,l)},_linkPpRight:function(t,e,r,i,a,n){var o=t.ppnodes[r.id],l=i.maxX-(i.maxX-a.minX)/2,s=(i.maxX-a.minX)/t.maxSidePartnersWithChildren/4,h=o.x+o.w/2,d=OrgChart.ui.__linkPpLeftRight(t,e,r,l,s,o),c=d.y;return l=d.mid,OrgChart.ui._linkRightToLeft({x:h,y:c,w:0,h:0},r,n,0,l)},__linkPpBottomTop:function(t,e,r,i,a,n){var o=0;return 1==n.isPartner?(o=n.x-e.partnerSeparation/2+t.indexes[r.id]*t.partnerChildrenSplitSeparation-(t.rightIds.length-1)*t.partnerChildrenSplitSeparation/2,t.lastLeft&&ot.firstRight.x+t.firstRight.w/2?ot.firstRight.y+t.firstRight.h/2?o(d=r/t[3])?d:h}else s=i;else s=r/l;else s=e/o;else s=(h=e/o)>(d=r/l)?d:h;return s&&s>a&&(s=a),s&&sr.right?r.right:r.left),e[0]>r.right&&e[0]>r.left&&(a[0]=r.left>r.right?r.left:r.right),e[1]r.bottom?r.bottom:r.top),e[1]>r.bottom&&e[1]>r.top&&(a[1]=r.top>r.bottom?r.top:r.bottom),e[0]!==a[0]||e[1]!==a[1]?OrgChart.animate(t,{viewBox:e},{viewBox:a},300,OrgChart.anim.outPow,(function(){i&&i()})):i&&i()},OrgChart.randomId=function(){return\"_\"+(\"0000\"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)},OrgChart._getClientXY=function(t){return-1==t.type.indexOf(\"touch\")?{x:t.clientX,y:t.clientY}:t.changedTouches.length?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:void 0},OrgChart._getClientTouchesXY=function(t,e){return-1!=t.type.indexOf(\"touch\")?t.touches.length=0,e=\"undefined\"!=typeof InstallTrigger,r=/constructor/i.test(window.HTMLElement)||\"[object SafariRemoteNotification]\"===(!window.safari||void 0!==window.safari&&safari.pushNotification).toString(),i=!!document.documentMode,a=!i&&!!window.StyleMedia,n=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime);return{opera:t,firefox:e,safari:r,msie:i,edge:a,chrome:n,blink:(n||t)&&!!window.CSS}},OrgChart._menuPosition=function(t,e,r){var i=t.getBoundingClientRect(),a=r.getBoundingClientRect(),n=e.getBoundingClientRect(),o=i.left-a.left,l=i.top-a.top;return i.top+n.height>a.top+a.height&&(l-=n.height),i.left-n.width1===t.nodeType))},OrgChart._getTestDiv=function(){var t=document.getElementById(\"orgchart_js_test_div\");return t||((t=document.createElement(\"div\")).id=\"orgchart_js_test_div\",t.style.position=\"fixed\",t.style.top=\"-10000px\",t.style.left=\"-10000px\",document.body.appendChild(t)),t},OrgChart._getLabelSize=function(t){var e=OrgChart._getTestDiv();return e.innerHTML=\"\"+t+\"\",e.querySelector(\"text\").getBoundingClientRect()},OrgChart.wrapText=function(t,e){var r=e.toLowerCase();if(-1==r.indexOf(\"\"+e+\"\";var a,n,o=(new DOMParser).parseFromString(e,\"text/xml\").getElementsByTagName(\"text\")[0],l=parseFloat(o.getAttribute(\"x\")),s=parseFloat(o.getAttribute(\"y\")),h=o.getAttribute(\"text-anchor\"),d=o.getAttribute(OrgChart.attr.width),c=o.getAttribute(OrgChart.attr.text_overflow),g=\"http://www.w3.org/2000/svg\",p=i.getElementsByTagName(\"svg\")[0].getElementsByTagName(\"text\")[0];c||(c=\"ellipsis\");var u=c.split(\"-\");if(u.length>1&&(a=parseInt(c.split(\"-\")[1]),u.length>2&&\"ellipsis\"==u[2]&&(n=!0)),!d)return OrgChart._escapeHtml(t);if(d=parseFloat(d),l||(l=0),s||(s=0),l||(h=\"start\"),\"ellipsis\"==c){p.removeChild(p.firstChild),p.textContent=t;for(var f=p.getComputedTextLength(),m=2;f>d;)p.textContent=t.substring(0,t.length-m),p.textContent+=\"...\",f=p.getComputedTextLength(),m++;return m>2?`${OrgChart._escapeHtml(t)}${p.textContent}`:OrgChart._escapeHtml(t)}if(-1!=c.indexOf(\"multiline\")){var C=t.split(\" \"),b=p.getBBox().height;p.textContent=\"\";var O=document.createElementNS(g,\"tspan\"),v=document.createTextNode(C[0]);O.setAttributeNS(null,\"x\",l),O.setAttributeNS(null,\"y\",s),O.setAttributeNS(null,\"text-anchor\",h),O.appendChild(v),p.appendChild(O);m=1;for(var x=1,y=1;yd){if(O.firstChild.data=O.firstChild.data.slice(0,_),x++,a&&x>a){if(n&&p.children.length==a){var w=p.children[a-1].textContent;p.children[a-1].textContent=w.substring(0,w.length-3)+\"...\"}break}(O=document.createElementNS(g,\"tspan\")).setAttributeNS(null,\"x\",l),O.setAttributeNS(null,\"y\",s+b*m),O.setAttributeNS(null,\"text-anchor\",h),v=document.createTextNode(C[y]),O.appendChild(v),p.appendChild(O),m++}}var k=\"\";if(null!=p.innerHTML)k=p.innerHTML,p.innerHTML=\"\";else{var S=\"\";for(y=p.childNodes.length-1;y>=0;y--)S=XMLSerializer().serializeToString(p.childNodes[y])+S,p.removeChild(p.childNodes[y]);k=S}return k}},OrgChart._downloadFile=function(t,e,r,i,a){var n=new Blob([e],{type:t});if(1==i){var o=URL.createObjectURL(n);window.open(o,\"_blank\").focus()}else if(navigator.msSaveBlob)navigator.msSaveBlob(n,r);else{var l=document.createElement(\"a\");if(void 0!==l.download){o=URL.createObjectURL(n);l.setAttribute(\"href\",o);var s=r;s.toLowerCase().endsWith(a.toLowerCase())||(s=s+\".\"+a),l.setAttribute(\"download\",s),l.style.visibility=\"hidden\",document.body.appendChild(l),l.click(),document.body.removeChild(l)}}},OrgChart._getPosition=function(t,e,r,i){var a={x:e.x,y:e.y};if(null!=r&&(a.x=r),null!=i&&(a.y=r),t&&3==t.length){var n=t[0].indexOf(e.id);-1!=n&&null!=t[1][n].transform&&(null==r&&(a.x=t[1][n].transform[4]),null==i&&(a.y=t[1][n].transform[5]))}return a},OrgChart._getOpacity=function(t,e){var r=1;if(t&&3==t.length){var i=t[0].indexOf(e.id);-1!=i&&null!=t[1][i].opacity&&(r=t[1][i].opacity)}return r},OrgChart.t=function(t,e,r){var i=OrgChart.templates[t];null==i&&console.error(`Template \"${t}\" does not exist!`);var a=null;if(null!=r&&i.scaleLessThen){var n=[];for(var o in i.scaleLessThen){var l=parseFloat(o);r0){n.sort((function(t,e){return t-e}));var s=i.scaleLessThen[n[0]];for(var h in s)null==a&&(a=Object.assign({},i)),a[h]=s[h]}}return e?null==a?i.min?i.min:i:a.min?a.min:a:null==a?i:a},OrgChart.setNodeSize=function(t){var e=OrgChart.t(t.templateName,t.min);t.w=e&&e.size?e.size[0]:0,t.h=e&&e.size?e.size[1]:0},OrgChart._imgs2base64=function(t,e,r,i){var a=t.getElementsByTagName(e),n=a.length;0==n&&i();for(var o=0;o'+(new XMLSerializer).serializeToString(e.documentElement)},OrgChart._xml2json=function(t){for(var e=(new DOMParser).parseFromString(t,\"text/xml\").getElementsByTagName(\"node\"),r=[],i=0;i=0&&(n='\"'+n+'\"'),i>0&&(r+=OrgChart.CSV_DELIMITER),r+=n}return r+\"\\n\"},i=\"\",a=0;ae.maxX)&&(e.maxX=t.x+t.w),(null==e.maxY||null!=t.y&&t.y+t.h>e.maxY)&&(e.maxY=t.y+t.h)},OrgChart.getStParentNodes=function(t,e){for(e||(e=[]);t.parent;)t=t.parent;return t.stParent&&(e.push(t.stParent),OrgChart.getStParentNodes(t.stParent,e)),e},OrgChart.getRootOf=function(t){for(;t&&t.parent;)t=t.parent;return t},OrgChart._getViewBox=function(t){var e=null;return t?(e=(e=\"[\"+(e=t.getAttribute(\"viewBox\"))+\"]\").replace(/\\ /g,\",\"),e=JSON.parse(e)):null},OrgChart.isNEU=function(t){return null==t||\"\"===t},OrgChart.gradientCircleForDefs=function(t,e,r,i){function a(t,e,r,i){var a=(i-90)*Math.PI/180;return{x:t+r*Math.cos(a),y:e+r*Math.sin(a)}}function n(t,e,r,i,n){var o=a(t,e,r,n),l=a(t,e,r,i),s=n-i<=180?\"0\":\"1\";return[\"M\",o.x,o.y,\"A\",r,r,0,s,0,l.x,l.y].join(\" \")}return Array.isArray(e)||(e=[e,e,e,e,e,e]),`\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n `},OrgChart._intersectionObserver=function(t,e){\"function\"==typeof IntersectionObserver?new IntersectionObserver((function(t,r){t.forEach((function(t){var r=t.intersectionRatio>0;0==t.intersectionRatio&&(r=t.isIntersecting),e(r)}))})).observe(t):e(!0)},OrgChart.convertCsvToNodes=function(t){for(var e=OrgChart._csvToArray(t),r=e[0],i=[],a=1;a/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\"):t},OrgChart._escapeDoubleQuotes=function(t){return\"string\"==typeof t?t.replace(/\"/g,\""\"):t},OrgChart._escapeGreaterLessSign=function(t){return\"string\"==typeof t?t.replace(//g,\">\"):t},OrgChart.xScrollUI=function(t,e,r,i,a){this.element=t,this.requestParams=r,this.config=e,this.onSetViewBoxCallback=i,this.onDrawCallback=a,this.pos=0},OrgChart.xScrollUI.prototype.addListener=function(t){var e=this;if((this.config.mouseScrool==OrgChart.action.xScroll||this.config.mouseScrool==OrgChart.action.scroll)&&this.bar){var r=OrgChart._getScrollSensitivity();!function(t,r,i){var a=!1;function n(){a=!0;var t=(e.pos-e.bar.scrollLeft)/i;if(t>0)t++;else{if(0==t)return void(a=!1);t--}Math.ceil(e.bar.scrollLeft)==Math.ceil(e.pos)?a=!1:(e.bar.scrollLeft+=t,o(n))}t.addEventListener(\"wheel\",(function(t){var i=0;if(e.config.mouseScrool==OrgChart.action.xScroll)(i=t.deltaX||t.wheelDeltaX)||(i=t.deltaY||t.wheelDeltaY);else if(e.config.mouseScrool==OrgChart.action.scroll&&!(i=t.shiftKey?t.deltaY||t.wheelDeltaY:t.deltaX||t.wheelDeltaX))return;i=-i,i=Math.max(-1,Math.min(1,i)),e.pos+=-i*r;var o=parseFloat(e.innerBar.clientWidth)-parseFloat(e.bar.clientWidth);e.pos<0&&(e.pos=0);e.pos>o&&(e.pos=o);a||n()}),{passive:!0});var o=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,20)}}(t,r.speed,r.smooth)}},OrgChart.xScrollUI.prototype.create=function(t){if(this.config.showXScroll===OrgChart.scroll.visible||this.config.mouseScrool===OrgChart.action.scroll||this.config.mouseScrool===OrgChart.action.xScroll){var e=this;this.bar&&this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.bar=document.createElement(\"div\"),this.innerBar=document.createElement(\"div\");this.requestParams();this.innerBar.innerHTML=\" \",Object.assign(this.bar.style,{position:\"absolute\",left:0,bottom:0,width:t+\"px\",\"overflow-x\":\"scroll\",height:\"20px\"}),this.element.appendChild(this.bar),this.bar.appendChild(this.innerBar),this.bar.addEventListener(\"scroll\",(function(){if(this.ignore)this.ignore=!1;else{var t=e.requestParams(),r=(parseFloat(e.innerBar.clientWidth)-parseFloat(e.bar.clientWidth))/100,i=this.scrollLeft/r,a=(t.boundary.right-t.boundary.left)/100;t.viewBox[0]=i*a+t.boundary.left,e.onSetViewBoxCallback(t.viewBox),clearTimeout(this._timeout),this._timeout=setTimeout((function(){e.onDrawCallback()}),500)}}))}},OrgChart.xScrollUI.prototype.setPosition=function(){if(this.bar){var t=this.requestParams(),e=Math.abs(t.boundary.maxX-t.boundary.minX)*t.scale;switch(this.config.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:e=Math.abs(t.boundary.minX*t.scale)}this.innerBar.style.width=e+\"px\";var r=(t.boundary.right-t.boundary.left)/100,i=(t.viewBox[0]-t.boundary.left)/r;i<0?i=0:i>100&&(i=100);var a=(parseFloat(this.innerBar.clientWidth)-parseFloat(this.bar.clientWidth))/100,n=i*a;this.bar.ignore=!0,this.bar.scrollLeft=n,this.pos=this.bar.scrollLeft,this.bar.style.visibility=a<=0?\"hidden\":\"\",this.config.showXScroll!==OrgChart.scroll.visible&&(this.bar.style.visibility=\"hidden\")}},OrgChart.yScrollUI=function(t,e,r,i,a){this.element=t,this.requestParams=r,this.config=e,this.onSetViewBoxCallback=i,this.onDrawCallback=a,this.pos=0},OrgChart.yScrollUI.prototype.addListener=function(t){var e=this;if(this.config.mouseScrool==OrgChart.action.yScroll||this.config.mouseScrool==OrgChart.action.scroll){var r=OrgChart._getScrollSensitivity();!function(t,r,i){var a=!1;function n(){a=!0;var t=(e.pos-e.bar.scrollTop)/i;if(t>0)t++;else{if(0==t)return void(a=!1);t--}Math.ceil(e.bar.scrollTop)==Math.ceil(e.pos)?a=!1:(e.bar.scrollTop+=t,o(n))}t.addEventListener(\"wheel\",(function(t){var i=0;if(e.config.mouseScrool==OrgChart.action.yScroll)(i=t.deltaY||t.wheelDeltaY)||(i=t.deltaX||t.wheelDeltaX);else if(e.config.mouseScrool==OrgChart.action.scroll&&!(i=t.shiftKey?t.deltaX||t.wheelDeltaX:t.deltaY||t.wheelDeltaY))return;i=-i,i=Math.max(-1,Math.min(1,i)),e.pos+=-i*r;var o=parseFloat(e.innerBar.clientHeight)-parseFloat(e.bar.clientHeight);e.pos<0&&(e.pos=0);e.pos>o&&(e.pos=o);a||n()}),{passive:!0});var o=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,20)}}(t,r.speed,r.smooth)}},OrgChart.yScrollUI.prototype.create=function(t){if(this.config.showYScroll===OrgChart.scroll.visible||this.config.mouseScrool===OrgChart.action.scroll||this.config.mouseScrool===OrgChart.action.yScroll){var e=this;this.bar&&this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.bar=document.createElement(\"div\"),this.innerBar=document.createElement(\"div\"),this.innerBar.innerHTML=\" \",Object.assign(this.bar.style,{position:\"absolute\",right:0,bottom:0,height:t+\"px\",\"overflow-y\":\"scroll\",width:\"20px\"}),this.element.appendChild(this.bar),this.bar.appendChild(this.innerBar),this.bar.addEventListener(\"scroll\",(function(){if(this.ignore)this.ignore=!1;else{var t=e.requestParams(),r=(parseFloat(e.innerBar.clientHeight)-parseFloat(e.bar.clientHeight))/100,i=this.scrollTop/r,a=(t.boundary.bottom-t.boundary.top)/100;t.viewBox[1]=i*a+t.boundary.top,e.onSetViewBoxCallback(t.viewBox),clearTimeout(this._timeout),this._timeout=setTimeout((function(){e.onDrawCallback()}),500)}}))}},OrgChart.yScrollUI.prototype.setPosition=function(){if(this.bar){var t=this.requestParams(),e=Math.abs(t.boundary.maxY-t.boundary.minY)*t.scale;switch(this.config.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:e=Math.abs(t.boundary.minY*t.scale)}this.innerBar.style.height=e+\"px\";var r=(t.boundary.bottom-t.boundary.top)/100,i=(t.viewBox[1]-t.boundary.top)/Math.abs(r);i<0?i=0:i>100&&(i=100);var a=(parseFloat(this.innerBar.clientHeight)-parseFloat(this.bar.clientHeight))/100,n=i*a;this.bar.ignore=!0,this.bar.scrollTop=n,this.pos=this.bar.scrollTop,this.bar.style.visibility=a<=0?\"hidden\":\"\",this.config.showYScroll!==OrgChart.scroll.visible&&(this.bar.style.visibility=\"hidden\")}},OrgChart.prototype.zoom=function(t,e,r,i){var a=this.getViewBox().slice(0),n=a,o=a[2],l=a[3];!0===t?(a[2]=a[2]/OrgChart.SCALE_FACTOR,a[3]=a[3]/OrgChart.SCALE_FACTOR):!1===t?(a[2]=a[2]*OrgChart.SCALE_FACTOR,a[3]=a[3]*OrgChart.SCALE_FACTOR):(a[2]=a[2]/t,a[3]=a[3]/t),e||(e=[50,50]),a[0]=n[0]-(a[2]-o)/(100/e[0]),a[1]=n[1]-(a[3]-l)/(100/e[1]);var s=this.getScale(a);if(a[2]=this.width()/s,a[3]=this.height()/s,!0===t&&sthis.config.scaleMin||0!=t&&1!=t&&sthis.config.scaleMin){this._hideBeforeAnimation();var h=this;r?(clearTimeout(h._timeout),OrgChart.animate(this.getSvg(),{viewbox:this.getViewBox()},{viewbox:a},this.config.anim.duration,this.config.anim.func,(function(){clearTimeout(h._timeout),h._timeout=setTimeout((function(){h._draw(!0,OrgChart.action.zoom,null,i)}),500)}))):(this.setViewBox(a),clearTimeout(h._timeout),h._timeout=setTimeout((function(){h._draw(!0,OrgChart.action.zoom,null,i)}),500))}},OrgChart.loading={},OrgChart.loading.show=function(t){var e=document.createElement(\"div\");e.id=\"boc-loading\",e.innerHTML='
',t.element.appendChild(e)},OrgChart.loading.hide=function(t){var e=t.element.querySelector(\"#boc-loading\");e&&e.parentNode.removeChild(e)},OrgChart.pdfPrevUI={},OrgChart.loc||(OrgChart.loc={}),OrgChart.loc.ppdfCmdTitle=\"PDF Preview\",OrgChart.loc.ppdfSave=\"Save\",OrgChart.loc.ppdfCancel=\"Cancel\",OrgChart.loc.ppdfFormat=\"Format\",OrgChart.loc.ppdfFitToDrwaing=\"Fit\",OrgChart.loc.ppdfA4=\"A4\",OrgChart.loc.ppdfA3=\"A3\",OrgChart.loc.ppdfA2=\"A2\",OrgChart.loc.ppdfA1=\"A1\",OrgChart.loc.ppdfLetter=\"Letter\",OrgChart.loc.ppdfLegal=\"Legal\",OrgChart.loc.ppdfLayout=\"Layout\",OrgChart.loc.ppdfPortrait=\"Portrait\",OrgChart.loc.ppdfLandscape=\"Landscape\",OrgChart.loc.ppdfFittopagewidth=\"Fit to page width\",OrgChart.loc.ppdfMargin=\"Margin\",OrgChart.loc.ppdfHeader=\"Header\",OrgChart.loc.ppdfFooter=\"Footer\",OrgChart.loc.ppdfScale=\"Scale\",OrgChart.pdfPrevUI.show=function(t,e){OrgChart.pdfPrevUI.hide(t),e=t._defaultExportOptions(e,\"pdf\");var r=document.createElement(\"div\");r.classList.add(t.config.mode),r.id=\"boc-ppdf-btns\",Object.assign(r.style,{position:\"absolute\",top:0,left:0,\"background-color\":\"#fff\",\"z-index\":5,margin:\"0 0 0 -265px\",\"box-shadow\":\"0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)\",width:\"265px\",height:\"100%\",\"font-family\":\"Roboto,Helvetica\",color:\"#757575\",\"text-align\":\"right\",padding:\"10px\"}),t.element.appendChild(r),r.innerHTML=\"

\"+OrgChart.loc.ppdfCmdTitle+'

 
';var i=document.createElement(\"div\");i.id=\"boc-ppdf-wrapper\",Object.assign(i.style,{\"overflow-y\":\"scroll\",\"z-index\":11,position:\"absolute\",top:0,left:\"285px\",\"background-color\":\"#eee\",width:t.width()-270+\"px\",height:\"100%\"}),t.element.appendChild(i),i.innerHTML='
';var a,n,o,l=t.element.querySelector(\"#boc-ppdf-size\"),s=t.element.querySelector(\"#boc-ppdf-layout\"),h=t.element.querySelector(\"#boc-ppdf-scale\"),d=t.element.querySelector(\"#boc-ppdf-margin\"),c=t.element.querySelector(\"#boc-ppdf-header\"),g=t.element.querySelector(\"#boc-ppdf-footer\");l.value=e.format,s.value=e.landscape,h.value=e.scale,d.value=e.margin,c.value=e.header,g.value=e.footer,OrgChart.animate(t.element.querySelector(\"#boc-ppdf-btns\"),{margin:[0,0,0,-250]},{margin:[0,0,0,0]},300,OrgChart.anim.outSin,(function(){t.exportPDF(e,OrgChart.pdfPrevUI._handler)})),t.element.querySelector(\"#boc-prev-cancel\").addEventListener(\"click\",(function(){OrgChart.pdfPrevUI.hide(t)})),t.element.querySelector(\"#boc-prev-save\").addEventListener(\"click\",(function(){t.exportPDF(e),OrgChart.pdfPrevUI.hide(t)})),OrgChart.pdfPrevUI._showHide(l,s,h),l.addEventListener(\"change\",(function(){OrgChart.animate(t.element.querySelector(\"#boc-ppdf-content\"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,(function(){t.element.querySelector(\"#boc-ppdf-content\").innerHTML=\"\",e.format=l.value,t.exportPDF(e,OrgChart.pdfPrevUI._handler),OrgChart.pdfPrevUI._showHide(l,s,h)}))})),s.addEventListener(\"change\",(function(){OrgChart.animate(t.element.querySelector(\"#boc-ppdf-content\"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,(function(){t.element.querySelector(\"#boc-ppdf-content\").innerHTML=\"\",e.landscape=\"true\"==s.value,t.exportPDF(e,OrgChart.pdfPrevUI._handler),OrgChart.pdfPrevUI._showHide(l,s,h)}))})),h.addEventListener(\"change\",(function(){OrgChart.animate(t.element.querySelector(\"#boc-ppdf-content\"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,(function(){t.element.querySelector(\"#boc-ppdf-content\").innerHTML=\"\",e.scale=h.value,t.exportPDF(e,OrgChart.pdfPrevUI._handler),OrgChart.pdfPrevUI._showHide(l,s,h)}))})),d.addEventListener(\"keyup\",(function(){clearTimeout(a),a=setTimeout((function(){OrgChart.animate(t.element.querySelector(\"#boc-ppdf-content\"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,(function(){t.element.querySelector(\"#boc-ppdf-content\").innerHTML=\"\";var r=d.value.split(\",\");if(4==r.length){for(var i=0;i
';return n&&(d+='
'+n+\"
\"),d+=t,o&&(d+='
'+o+\"
\"),d+=\"
\",d+=\"\"},OrgChart.pdfPrevUI.hide=function(t){var e=t.element.querySelector(\"#boc-ppdf-wrapper\");if(e){e.parentNode.removeChild(e),e.style.opacity=0;var r=t.element.querySelector(\"#boc-ppdf-btns\");r.parentNode.removeChild(r)}},void 0===OrgChart&&(OrgChart={}),OrgChart.events.on(\"renderdefs\",(function(t,e){for(var r=0;rf?(m.y=p,C.y=f+c.h):(m.y=p+d.h,C.y=f);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:b<=O?(y=-1,m.x=b+d.w/10,C.x=O+c.w/10):(y=1,m.x=b-d.w/10,C.x=O+c.w/10),p==f?(y=-1,m.y=p+d.h,C.y=f+c.h):p>f?(m.y=p,C.y=f+c.h):(m.y=p+d.h,C.y=f);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:v<=x?(y=-1,m.y=v+d.h/5,C.y=x+c.h/5):(y=1,m.y=v-d.h/5,C.y=x+c.h/5),g==u?(y=-1,m.x=g,C.x=u):g>u?(m.x=g,C.x=u+c.w):(m.x=g+d.w,C.x=u);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:v<=x?(y=1,m.y=v+d.h/5,C.y=x+c.h/5):(y=-1,m.y=v-d.h/5,C.y=x+c.h/5),g==u?(y=1,m.x=g+d.w,C.x=u+c.w):g>u?(m.x=g,C.x=u+c.w):(m.x=g+d.w,C.x=u)}var _=A(m,C,y),w=h.template;w||(w=\"orange\");var k=OrgChart.clinkTemplates[w],S=(r=m,a=_,n=void 0,o=void 0,n=((i=C).x-r.x)/2+r.x,o=(i.y-r.y)/2+r.y,{x:(n-a.x)/2+a.x,y:(o-a.y)/2+a.y});h.label&&(l+=k.label.replace(\"{x}\",S.x).replace(\"{y}\",S.y).replace(\"{val}\",h.label));var I=\"M\"+m.x+\",\"+m.y+\"C\"+m.x+\",\"+m.y+\" \"+_.x+\",\"+_.y+\" \"+C.x+\",\"+C.y;l+=(\"').replace(\"{from}\",d.id).replace(\"{to}\",c.id)+k.link.replaceAll(\"{d}\",I)+'',l+=OrgChart.grCloseTag}function A(t,e,r){null==r&&(r=1);var i=e.x-t.x,a=e.y-t.y,n=Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))/3;return n=n/(Math.sqrt(i*i+a*a)*r)*OrgChart.CLINK_CURVE,{x:t.x+i/2-a*n,y:t.y+a/2+i*n}}}e.content+=l},OrgChart.prototype.addClink=function(t,e,r,i){return this.removeClink(t,e),this.config.clinks.push({from:t,to:e,label:r,template:i}),this},OrgChart.prototype.removeClink=function(t,e){for(var r=this.config.clinks.length-1;r>=0;r--){var i=this.config.clinks[r];i.from==t&&i.to==e&&this.config.clinks.splice(r,1)}return this},OrgChart.clinkTemplates={},OrgChart.clinkTemplates.orange={defs:' ',link:'',label:'{val}'},OrgChart.clinkTemplates.blue={defs:' ',link:'',label:'{val}'},OrgChart.clinkTemplates.yellow={defs:' ',link:'',label:'{val}'},void 0===OrgChart&&(OrgChart={}),OrgChart.events.on(\"renderdefs\",(function(t,e){for(var r=0;re.x&&(d=\"right\");break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:case OrgChart.orientation.right:case OrgChart.orientation.right_top:d=\"top\",n.y>e.y&&(d=\"bottom\")}var p=OrgChart.t(e.templateName,e.min,i),u=g.levelSeparation;(e.parent&&e.parent.layout==OrgChart.mixed||e.parent&&e.parent.layout==OrgChart.tree)&&(u=g.mixedHierarchyNodesSeparation);var f={p:e.x+e.w/2+p.expandCollapseSize,q:e.y,r:e.x+e.w/2+p.expandCollapseSize,s:a.minY+u};if(e.sl==n.sl)switch(h=n,g.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:s.push([f.p,f.q]),s.push([f.p,f.q-u/3]),p=OrgChart.t(h.templateName,h.min,i),s.push([h.x+h.w/2+p.expandCollapseSize,s[s.length-1][1]]),s.push([s[s.length-1][0],h.y]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:f.q=e.y+e.h,f.s=a.maxY-u,s.push([f.p,f.q]),s.push([f.r,e.y+e.h+u/3]),p=OrgChart.t(h.templateName,h.min,i),s.push([h.x+h.w/2+p.expandCollapseSize,s[s.length-1][1]]),s.push([s[s.length-1][0],h.y+h.h]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:f.p=e.x,f.q=e.y+e.h/2+p.expandCollapseSize,f.r=a.minX-u,f.s=e.y+e.h/2+p.expandCollapseSize,s.push([f.p,f.q]),s.push([e.x-u/3,f.q]),p=OrgChart.t(h.templateName,h.min,i),s.push([s[s.length-1][0],h.y+h.h/2+p.expandCollapseSize]),s.push([h.x,s[s.length-1][1]]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:f.p=e.x+e.w,f.q=e.y+e.h/2+p.expandCollapseSize,f.r=a.maxX+u,f.s=e.y+e.h/2+p.expandCollapseSize,s.push([f.p,f.q]),s.push([e.x+e.w+u/3,f.q]),p=OrgChart.t(h.templateName,h.min,i),s.push([s[s.length-1][0],h.y+h.h/2+p.expandCollapseSize]),s.push([h.x+h.w,s[s.length-1][1]])}else{switch(g.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:s.push([f.p,f.q]),s.push([f.r,e.y-u/3]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:f.q=e.y+e.h,f.s=a.maxY-u,s.push([f.p,f.q]),s.push([f.r,e.y+e.h+u/3]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:f.p=e.x,f.q=e.y+e.h/2+p.expandCollapseSize,f.r=a.minX-u,f.s=e.y+e.h/2+p.expandCollapseSize,s.push([f.p,f.q]),s.push([e.x-u/3,f.q]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:f.p=e.x+e.w,f.q=e.y+e.h/2+p.expandCollapseSize,f.r=a.maxX+u,f.s=e.y+e.h/2+p.expandCollapseSize,s.push([f.p,f.q]),s.push([e.x+e.w+u/3,f.q])}for(var m=e;null==h;){var C=!1,b=m.parent,O=b.leftNeighbor,v=b.rightNeighbor;if(b.id==n.id?h=b:OrgChart._intersects(b,f,t.config)&&(f=OrgChart._addPoint(b,s,t.config,f,d),C=!0),b.id!=n.id){for(;O;){if(O.id==n.id){h=O;break}OrgChart._intersects(O,f,t.config)&&(f=OrgChart._addPoint(O,s,t.config,f,d),C=!0),O=O.leftNeighbor}for(;v;){if(v.id==n.id){h=v;break}OrgChart._intersects(v,f,t.config)&&(f=OrgChart._addPoint(v,s,t.config,f,d),C=!0),v=v.rightNeighbor}}if(!C){var x=s[s.length-1][0],y=0;if(b.parent)switch(u=g.levelSeparation,b.parent.layout!=OrgChart.mixed&&b.parent.layout!=OrgChart.tree||(u=g.mixedHierarchyNodesSeparation),g.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:y=b.parent.y+b.parent.h+u*(2/3);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:y=b.parent.y-u*(2/3);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:x=b.parent.x+b.parent.w+u*(2/3),y=s[s.length-1][1];break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:x=b.parent.x-u*(2/3),y=s[s.length-1][1]}s.push([x,y])}m=b}switch(p=OrgChart.t(h.templateName,h.min,i),s.splice(s.length-1,1),g.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:s.push([h.x+h.w/2+p.expandCollapseSize,s[s.length-1][1]]),s.push([s[s.length-1][0],h.y+h.h]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:s.push([h.x+h.w/2+p.expandCollapseSize,s[s.length-1][1]]),s.push([s[s.length-1][0],h.y]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:s.push([s[s.length-1][0],h.y+h.h/2+p.expandCollapseSize]),s.push([h.x+h.w,s[s.length-1][1]]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:s.push([s[s.length-1][0],h.y+h.h/2+p.expandCollapseSize]),s.push([h.x,s[s.length-1][1]])}}var _=l.template;_||(_=\"orange\");var w,k,S=null;switch((p=OrgChart.slinkTemplates[_]).labelPosition){case\"start\":S={x:s[1][0],y:s[1][1]};break;case\"middle\":var I=Math.ceil(s.length/2);w=s[I],k=s[I-1],S={x:(w[0]+k[0])/2,y:(w[1]+k[1])/2};break;case\"end\":S={x:s[s.length-2][0],y:s[s.length-2][1]}}o&&(s=s.reverse()),s[0]=\"M\"+s[0].join(\",\");for(var A=1;A').replace(\"{from}\",T).replace(\"{to}\",B)+p.link.replaceAll(\"{d}\",E)+'',r+=OrgChart.grCloseTag}for(var o=0;o=h.sl?n(s,h,!1):n(h,s,!0))}e.content+=r},OrgChart.prototype.addSlink=function(t,e,r,i){return this.removeClink(t,e),this.config.slinks.push({from:t,to:e,label:r,template:i}),this},OrgChart.prototype.removeSlink=function(t,e){for(var r=this.config.slinks.length-1;r>=0;r--){var i=this.config.slinks[r];i.from==t&&i.to==e&&this.config.slinks.splice(r,1)}return this},OrgChart.slinkTemplates={},OrgChart.slinkTemplates.orange={defs:' ',link:'',label:'{val}',labelPosition:\"middle\"},OrgChart.slinkTemplates.blue={defs:' ',link:'',label:'{val}',labelPosition:\"middle\"},OrgChart.slinkTemplates.yellow={defs:' ',link:'',label:'{val}',labelPosition:\"middle\"},OrgChart.events.on(\"renderbuttons\",(function(t,e){if(e.node&&e.node.tags&&e.node.tags.has(\"group-dotted-lines\")){var r=t.getScale(),i=OrgChart.t(e.node.templateName,e.node.min,r),a=\"\";e.node.min?(i.nodeGroupDottedOpenButton||console.error(`[${e.node.templateName}].nodeGroupDottedOpenButton is not defined`),a+=``,a+=i.nodeGroupDottedOpenButton):(i.nodeGroupDottedCloseButton||console.error(`[${e.node.templateName}].nodeGroupDottedCloseButton is not defined`),a+=``,a+=i.nodeGroupDottedCloseButton),a=(a+=\"\").replaceAll(\"{cw}\",e.node.w/2).replaceAll(\"{ch}\",e.node.h/2).replaceAll(\"{ew}\",e.node.w-(e.node.padding?e.node.padding[1]:0)).replaceAll(\"{eh}\",e.node.h-(e.node.padding?e.node.padding[2]:0));var n=t.getNode(e.node.stChildrenIds[0]);if(-1!=a.indexOf(\"{collapsed-children-count}\")){var o=OrgChart.collapsedChildrenCount(t,n);a=a.replace(\"{collapsed-children-count}\",o)}if(-1!=a.indexOf(\"{collapsed-children-total-count}\")){var l=OrgChart.collapsedChildrenTotalCount(t,n);a=a.replace(\"{collapsed-children-total-count}\",l)}if(-1!=a.indexOf(\"{children-count}\")){var s=OrgChart.childrenCount(t,n);a=a.replace(\"{children-count}\",s)}if(-1!=a.indexOf(\"{children-total-count}\")){var h=OrgChart.childrenTotalCount(t,n);a=a.replace(\"{children-total-count}\",h)}e.html+=a}})),OrgChart.events.on(\"redraw\",(function(t,e){if(t.config.groupDottedLines.length){for(var r=t.element.querySelectorAll(\"[data-ctrl-n-dotted-close]\"),i=0;ir[0]&&nr[1]&&o1){var d=h[0];o[d]&&(r=[o[d]],h=(s=s.replace(d,\"\").trim()).split(\" \"))}h=h.filter((function(t,e,r){return r.indexOf(t)===e}));for(var c={},g=0;g=0;b--)l[b].id==C&&l.splice(b,1);OrgChart._search.addNodeToResult(l,i,p,e,f,a)}}else c[C]=e.__score,OrgChart._search.addNodeToResult(l,i,p,e,f,a)}}}return l.sort((function(t,e){return t.__scoree.__score?-1:0})),l},OrgChart._search.addNodeToResult=function(t,e,r,i,a,n){var o={};o.id=r.id,OrgChart.isNEU(r[n])||(o[n]=r[n]);for(var l=0;l0?100:0,d=0,c=0;c=1&&n[p-1].start>n[p].start){h=0;break}}var f=0;0!=l&&(f=l/o);var m=l>0?100:0;0!=s&&(m=100-s/o);var C=0;i&&i[r]&&(C=i[r]),u&&(u=u/100*50),f>0&&(f=f/100*10),m>0&&(m=m/100*10),h>0&&(h=h/100*10),C>0&&(C=C/100*20);var b=Math.round(1e4*(u+f+m+h+C));n.sort((function(t,e){return t.starte.start?1:0}));var O=e;for(p=n.length-1;p>=0;p--)O=(O=O.insert(n[p].start+n[p].length,\"\")).insert(n[p].start,\"\");return{__searchMarks:O,__score:b}},OrgChart._search.searchIndexesOf=function(t,e){var r=[];if(!OrgChart.isNEU(t))for(var i=0;i-1;)r.push({length:a.length,start:n,searchPhrase:a}),n+=a.length}return r.sort((function(t,e){return t.lengthe.length||t.starte.start?1:0})),r=r.filter((function(t){for(var e=!1,i=0;i=o&&n<=l){e=!0;break}if(a<=o&&n>=l){e=!0;break}}return!e}))},OrgChart.events.on(\"redraw\",(function(t,e){if(t.config.state){var r=[],i=[];!function t(e){if(Array.isArray(e))for(var a=0;a=0){l=s.childrenIds[o];this._keyNavigationActiveNodeId=l,this.center(l)}}}else if(\"ArrowUp\"==e.code){var s;if(s=this.getNode(a.pid)){l=s.id;if(a.isAssistant||s.hasAssistants||a.isPartner||s.hasPartners){o=s.childrenIds.indexOf(a.id);--o>=0&&(l=s.childrenIds[o])}this._keyNavigationActiveNodeId=l,this.center(l)}}else if(\"ArrowDown\"==e.code)a.childrenIds.length&&(this._keyNavigationActiveNodeId=a.childrenIds[0],this.center(a.childrenIds[0]));else if(\"Space\"==e.code){var h=r.getAttribute(OrgChart.attr.node_id);return void this.toggleExpandCollapse(h,e)}}},OrgChart.events.on(\"redraw\",(function(t,e){t.config.keyNavigation&&OrgChart._keyNavigation(t)})),OrgChart.events.on(\"click\",(function(t,e){t.config&&t.config.keyNavigation&&(t._keyNavigationActiveNodeId=e.node.id,t.center(e.node.id))})),OrgChart._keyNavigation=function(t){var e=t.element.querySelector(\":focus\");if(e&&e.parentElement&&e.parentElement.hasAttribute(OrgChart.attr.node_id)){var r=e.parentElement;(a=(i=e).querySelector(\"title\"))&&a.parentNode.removeChild(a),i.removeAttribute(\"tabindex\")}if(!OrgChart.isNEU(t._keyNavigationActiveNodeId)&&((r=t.getNodeElement(t._keyNavigationActiveNodeId))&&r.children.length)){var i;(i=r.children[0]).setAttribute(\"tabindex\",2);var a,n={text:\"\",id:t._keyNavigationActiveNodeId};if(OrgChart.events.publish(\"screen-reader-text\",[t,n]),!OrgChart.isNEU(n.text))(a=document.createElementNS(\"http://www.w3.org/2000/svg\",\"title\")).innerHTML=n.text,i.appendChild(a);OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&t.searchUI.hide(),i.focus()}},OrgChart.elements={},OrgChart.elements.textbox=function(t,e,r,i){var a=OrgChart.elements._vidrf(t,e,i);if(a.doNotRender)return{html:\"\"};var n=\"\";return e.btn&&(n=`${e.btn}`),{html:`
\\n
\\n \\n \\n ${n}\\n
\\n
`,id:a.id,value:a.value}},OrgChart.elements.checkbox=function(t,e,r,i){var a=OrgChart.elements._vidrf(t,e,i);if(a.doNotRender)return{html:\"\"};var n=a.value?\"checked\":\"\",o=i?'onclick=\"return false;\"':\"\";return{html:`
\\n \\n
`,id:a.id,value:n}},OrgChart.elements.select=function(t,e,r,i){if(i)return OrgChart.elements.textbox(t,e,r,i);var a=OrgChart.elements._vidrf(t,e,i);return a.doNotRender?{html:\"\"}:{html:`
\\n
\\n \\n \\n
\\n
`,id:a.id,value:a.value}},OrgChart.elements.date=function(t,e,r,i){var a=OrgChart.elements._vidrf(t,e,i);return a.doNotRender?{html:\"\"}:{html:`
\\n
\\n \\n \\n
\\n
`,id:a.id,value:a.value}},OrgChart.elements._vidrf=function(t,e,r){var i={};if(e.binding||(e.binding=\"\"),e.label||(e.label=\"\"),\"select\"!=e.type||Array.isArray(e.options)?i.options=e.options:i.options=[],i.value=t&&!OrgChart.isNEU(t[e.binding])?t[e.binding]:\"\",r&&i.options)for(var a=0;a '+a+\"\",e.classList.add(\"boc-validation-error\"),!1):n&&!OrgChart.input.validatePassword(e.value)?(r.innerHTML+=' '+n+\"\",e.classList.add(\"boc-validation-error\"),!1):o&&!OrgChart.input.isValidEmail(e.value)?(r.innerHTML+=' '+o+\"\",e.classList.add(\"boc-validation-error\"),!1):!(l&&!OrgChart.input.isValidEmails(e.value))||(r.innerHTML+=' '+l+\"\",e.classList.add(\"boc-validation-error\"),!1)},OrgChart.input.validateAndGetData=function(t){for(var e=t.querySelectorAll(\"[data-boc-input]\"),r=!0,i=0;i18)&&-1==t.indexOf(\" \"))},OrgChart.input.isValidEmails=function(t){if(t)for(var e=t.split(\",\"),r=0;r()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(String(t).toLowerCase())},OrgChart.ui.css=function(){return''},void 0===OrgChart&&(OrgChart={}),OrgChart.prototype.onField=function(t){return this.on(\"field\",(function(e,r){return t.call(e,r)}))},OrgChart.prototype.onInit=function(t){return this.on(\"init\",(function(e){return t.call(e)}))},OrgChart.prototype.onRedraw=function(t){return this.on(\"redraw\",(function(e){return t.call(e)}))},OrgChart.prototype.onUpdateNode=function(t){return this.on(\"update\",(function(e,r,i){var a={oldData:r,newData:i};return t.call(e,a)}))},OrgChart.prototype.onRemoveNode=function(t){return this.on(\"remove\",(function(e,r,i){var a={id:r,newPidsAndStpidsForIds:i};return t.call(e,a)}))},OrgChart.prototype.onAddNode=function(t){return this.on(\"add\",(function(e,r){var i={data:r};return t.call(e,i)}))},OrgChart.prototype.onDrop=function(t){return this.on(\"drop\",(function(e,r,i,a){var n={dragId:r,dropId:i,dragNodeElement:a};return t.call(e,n)}))},OrgChart.prototype.onDrag=function(t){return this.on(\"drag\",(function(e,r,i){var a={dragId:r,event:i};return t.call(e,a)}))},OrgChart.prototype.onExpandCollpaseButtonClick=function(t){return this.on(\"expcollclick\",(function(e,r,i,a){var n={collapsing:r,id:i,ids:a};return t.call(e,n)}))},OrgChart.prototype.onExportStart=function(t){return this.on(\"exportstart\",(function(e,r){return t.call(e,r)}))},OrgChart.prototype.onExportEnd=function(t){return this.on(\"exportend\",(function(e,r){return t.call(e,r)}))},OrgChart.prototype.onNodeClick=function(t){return this.on(\"click\",(function(e,r){return t.call(e,r)}))},OrgChart.prototype.onNodeDoubleClick=function(t){return this.on(\"dbclick\",(function(e,r){var i={data:r};return t.call(e,i)}))},OrgChart.filterUI=function(){},OrgChart.filterUI.prototype.init=function(t){this.instance=t,this.filterBy=null,this._event_id=OrgChart._guid()},OrgChart.filterUI.prototype.addFilterTag=function(t){if(!this.instance.config.filterBy)return!1;if(OrgChart.isNEU(t))return!1;if(null!==this.filterBy||\"object\"!=typeof this.instance.config.filterBy||Array.isArray(this.instance.config.filterBy)||(this.filterBy=JSON.parse(JSON.stringify(this.instance.config.filterBy))),null!=this.filterBy)for(var e in this.filterBy){var r=t[e];if(null!=r){var i=this.filterBy[e];if(null!=i){var a=i[r];if(null!=a&&!1===a.checked)return!0}}}return!1},OrgChart.filterUI.prototype.show=function(t){var e=this.instance.element.querySelector('[data-filter-field=\"'+t+'\"]');e&&e.click()},OrgChart.filterUI.prototype.hide=function(){var t=this.instance.element.querySelector(\"[data-filter-close]\");t&&t.click()},OrgChart.filterUI.prototype.update=function(){if(this.instance.config.filterBy){var t={};if(\"all\"==this.instance.config.filterBy)for(var e=0;e${l}`;d.innerHTML=`
${c}
`,d.addEventListener(\"click\",(function(t){if(t.target.hasAttribute(\"data-filter-close\")||t.target.hasAttribute(\"data-filter-field\")){for(var e=t.target.getAttribute(\"data-filter-field\"),r=h.instance.element.querySelectorAll(\"[data-filter-menu]\"),i=0;i\\n \\n \\n `;for(var s in h.filterBy[e]){var d=h.filterBy[e][s],c=d.text;null==c&&(c=s),l+=`
\\n \\n \\n
`}(o=document.createElement(\"div\")).innerHTML=`
\\n Filter by ${e}:\\n ${l}\\n
`,o.setAttribute(\"data-filter-menu\",e),o.classList.add(\"boc-filter-menu\"),t.target.parentNode.parentNode.appendChild(o);var g=o.querySelectorAll(\"input\");for(i=0;i0&&(r.c=OrgChart.remote._convertToIdArray(t.children)),t.stChildren.length>0&&(r.v=OrgChart.remote._convertToIdArray(t.stChildren)),null!=t.layout&&0!=t.layout&&(r.l=t.layout),t.isAssistant&&(r.a=1),t.isSplit&&(r.s=t.isSplit),t.padding&&(r.q=t.padding),t.lcn&&(r.k=t.lcn),t.stContainerNodes&&(r.b=OrgChart.remote._convertToIdArray(t.stContainerNodes)),t._m&&(r.m=t._m.id),t.isPartner&&(r.i=t.isPartner),t.hasPartners&&(r.g=t.hasPartners),t.partnerSeparation&&(r.e=t.partnerSeparation),e.push(r);for(var i=0;i