if(!nexacro.PopupDiv){nexacro.PopupDiv=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){nexacro.Div.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i);this.callbackfunction=null;this.visible=false;this._isSelfStyle=true;this._isSelfClass=true;this._is_window=true;this._attached_comp=this;this._is_init=false;this.returnvalue="";this._track_on=false;this._event_list={"onclick":1,"ondblclick":1,"onkeypress":1,"onkeydown":1,"onkeyup":1,"onkillfocus":1,"onsetfocus":1,"ondrag":1,"ondragenter":1,"ondragleave":1,"ondragmove":1,"ondrop":1,"onlbuttondown":1,"onlbuttonup":1,"onload":1,"onmouseenter":1,"onmouseleave":1,"onmousemove":1,"onmove":1,"onsize":1,"onrbuttondown":1,"onrbuttonup":1,"oncloseup":1,"onpopup":1,"onlayoutchanged":1,"canlayoutchange":1,"onmousewheel":1,"onmousedown":1,"onmouseup":1,"onvscroll":1,"onhscroll":1,"ontouchstart":1,"ontouchmove":1,"ontouchend":1,"ontap":1,"ondbltap":1,"onpinchstart":1,"onpinch":1,"onpinchend":1,"onflingstart":1,"onfling":1,"onflingend":1,"onlongpress":1,"onslidestart":1,"onslide":1,"onslideend":1,"onzoom":1};this._accessibility_role="form";};var _pPopupDiv=nexacro._createPrototype(nexacro.Div,nexacro.PopupDiv);nexacro.PopupDiv.prototype=_pPopupDiv;_pPopupDiv._type_name="PopupDiv";_pPopupDiv._is_popup_control=true;_pPopupDiv._is_selfclose=true;_pPopupDiv._default_zindex=nexacro._zindex_popup;_pPopupDiv._track_capture=true;_pPopupDiv.on_create_control_element=function(_a){var _b;if(this._is_scrollable){_b=this.on_create_popupscrollable_control_element(_a);}else{_b=this.on_create_popup_control_element(_a);}if(_b&&this._default_zindex>0){_b.setElementZIndex(this._default_zindex);}return _b;};_pPopupDiv.on_created=function(_a){nexacro.Div.prototype.on_created.call(this,_a);nexacro.PopupComponent.prototype.on_created.call(this,_a);this._refform=this;};_pPopupDiv.destroyComponent=nexacro.PopupComponent.prototype.destroyComponent;_pPopupDiv.set_visible=function(_a){if(this._track_on){nexacro.PopupComponent.prototype.set_visible.apply(this,arguments);}};_pPopupDiv.on_update_position=function(_a,_b){if(this.visible||!nexacro._allow_default_pinchzoom){nexacro.Div.prototype.on_update_position.call(this,_a,_b);}else{var _c=this._control_element;if(_c){_c.setElementPosition(0,0);_c.setElementSize(1,1);this._updateClientSize(_c);if(_b){this.on_fire_onmove(this._adjust_left,this._adjust_top);}if(_a){this.on_fire_onsize(this._adjust_width,this._adjust_height);}}}};_pPopupDiv.on_fire_onpopup=function(_a){if(this.onpopup&&this.onpopup._has_handlers){var _b=new nexacro.EventInfo(_a);_b.eventid="onpopup";return this.onpopup._fireEvent(this,_b);}return false;};_pPopupDiv.on_fire_onmove=function(_a,_b){if(this.onmove&&this.onmove._has_handlers){var _c=new nexacro.MoveEventInfo(this,"onmove",_a,_b);return this.onmove._fireEvent(this,_c);}return false;};_pPopupDiv.on_fire_oncloseup=function(_a){if(this.callbackfunction){this.callbackfunction.call(this.parent,this.id,this.returnvalue);}if(this.oncloseup&&this.oncloseup._has_handlers){var _b=new nexacro.EventInfo(_a);_b.eventid="oncloseup";return this.oncloseup._fireEvent(this,_b);}return false;};_pPopupDiv.trackPopup=function(_a,_b,_c,_d,_e){this.returnvalue="";if(_c==null&&_d==null){_c=this._adjust_width;_d=this._adjust_height;}var _f= +_a;var _g= +_b;var _h= +_c;var _i= +_d;var _j=this._getWindowFrame();var _k=_j._adjust_width;var _l=_j._adjust_height;if(_f+_h>_k){var _n=_f-_h;if(_n>0){_f=_n;}else{_f=_k-_h;}}if(_g+_i>_l){var _o=_l-_i;if(_o<0){_g=0;_i=_l;}else{_g=_o;}}this._track_on=true;if(this._is_loading){this._wait_pop_position={obj:null,left:_f,top:_g,width:_h,height:_i};}else{this._popup(_f,_g,_h,_i);}if(_e&&typeof _e=="string"){this.callbackfunction=this.parent[_e];}else{this.callbackfunction=undefined;}this.setFocus();this.on_fire_onpopup(this);var _m=this._getWindow();if(_m&&this._track_capture){_m._setCaptureLock(this,true,false);}return (this.async?true:this.returnvalue);};_pPopupDiv.trackPopupByComponent=function(_a,_b,_c,_d,_e,_f){this.returnvalue="";if(_d==null&&_e==null){_d=this._adjust_width;_e=this._adjust_height;}if(_f&&typeof _f=="string"){this.callbackfunction=this.parent[_f];}else{this.callbackfunction=undefined;}this._track_on=true;if(this._is_loading){this._wait_pop_position={obj:_a,left:_b,top:_c,width:_d,height:_e};}else{this._popupBy(_a,_b,_c,_d,_e);}this.setFocus();this.on_fire_onpopup(this);var _g=this._getWindow();if(_g&&this._track_capture){_g._setCaptureLock(this,true,false);}return (this.async?true:this.returnvalue);};_pPopupDiv.closePopup=function(_a){this.returnvalue=_a;if(this.visible){this._closePopup(true);return true;}return false;};_pPopupDiv._getAllPos=function(){var _a=this;var _b=0;var _c=0;while(_a){if(_a._adjust_left!=null){_b+=_a._adjust_left;_c+=_a._adjust_top;}_a=_a.parent;}return {left:_b,top:_c};};_pPopupDiv.isPopup=nexacro.PopupComponent.prototype._is_popup;_pPopupDiv._popup=nexacro.PopupComponent.prototype._popup;_pPopupDiv._popupBy=nexacro.PopupComponent.prototype._popupBy;_pPopupDiv._getWindowHandle=nexacro.PopupComponent.prototype._getWindowHandle;_pPopupDiv._getWindow=nexacro.PopupComponent.prototype._getWindow;_pPopupDiv._findOwnerElementHandle=nexacro.PopupComponent.prototype._findOwnerElementHandle;_pPopupDiv._closePopup=function(){var _a=this._getWindow();if(_a&&this._track_capture){_a._releaseCaptureLock(this);}nexacro.PopupComponent.prototype._closePopup.apply(this,arguments);this._track_on=false;};_pPopupDiv._isPopupVisible=function(){return this.visible;};_pPopupDiv._getMainFrame=function(){var _a=this;while(_a&&!_a._is_main){_a=_a.parent;}return _a;};_pPopupDiv._getWindowFrame=function(){var _a=this._getWindow();if(_a){return _a.frame;}return null;};_pPopupDiv._control_popup=function(_a,_b,_c,_d){var _e=this._getWindowFrame();var _f=_e._adjust_width;var _g=_e._adjust_height;if(_a+_c>_f){var _h=_a-_c;if(_h>0){_a=_h;}else{_a=_f-_c;}}if(_b+_d>_g){_b=_g-_d;}this._popup(_a,_b,_c,_d);};_pPopupDiv._clearEventListener=function(_a){if(this._is_init&&application.getActiveForm()){var _b=application.getActiveForm()._event_list;if(!_b[_a]){return;}}nexacro.EventSinkObject.prototype._clearEventListener.apply(this,arguments);};_pPopupDiv._on_init=function(){this._is_init=true;nexacro.FormBase.prototype._on_init.apply(this,arguments);this._is_init=false;};_pPopupDiv._on_load=function(){var _a=nexacro.Form.prototype._on_load.apply(this,arguments);var _b=this._wait_pop_position;if(_b){if(_b.obj){this._popupBy(_b.obj,_b.left,_b.top,_b.width,_b.height);}else{this._popup(_b.left,_b.top,_b.width,_b.height);}_b=null;delete this._wait_pop_position;}return _a;};_pPopupDiv._on_bubble_mousewheel=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o){if(!this._is_alive){return;}if(_l===undefined){if(!_n){_n=this;if(!_n._is_reference_control){_n=this._getReferenceComponent(_n);}}if(this.visible&&this._isEnable()){var _p=this._getClientXY(_h,_i);_l=this.on_fire_user_onmousewheel(_b,_c,_d,_e,_f,_g,_j,_k,_h,_i,_p[0],_p[0],this,_n);var _q=this._getFromComponent(this);if(_l!==true){if(!_q.onmousewheel||(_q.onmousewheel&&!_q.onmousewheel.defaultprevented)){var _r=this.on_fire_sys_onmousewheel(_b,_c,_d,_e,_f,_g,_j,_k,_h,_i,_p[0],_p[0],this,_n);if(_r){return false;}if(this.vscrollbar&&this.vscrollbar.enable){var _s=this.vscrollbar;var _t=_s._pos;this._setVScrollDefaultAction(_s,_c);var _u=_s._pos;if(_t!=_u){return false;}}if(nexacro.OSVersion=="Mac OS"){if(this.hscrollbar&&this.hscrollbar.enable){var _v=this.hscrollbar;var _w=_v._pos;this._setHScrollDefaultAction(_v,_b);var _x=_v._pos;if(_w!=_x){return false;}}}return;}if(_l===false){_l=undefined;}if(!_q.onmousewheel||(_q.onmousewheel&&!_q.onmousewheel.stoppropagation)){if(this.parent&&!this.parent._is_application){var _y=this._getRecalcCanvasXY(_a,_h,_i);_h=_y[0];_i=_y[1];if(this._is_subcontrol){return this.parent._on_bubble_mousewheel(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,null,_n,_o);}else{return this.parent._on_bubble_mousewheel(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,false,this,_n,_o);}}}}}}else{if(this.visible&&this._isEnable()){var _p=this._getClientXY(_h,_i);_l=this.on_fire_user_onmousewheel(_b,_c,_d,_e,_f,_g,_j,_k,_h,_i,_p[0],_p[0],_m,_n);var _q=this._getFromComponent(this);if(_l!==true){if(!_q.onmousewheel||(_q.onmousewheel&&!_q.onmousewheel.defaultprevented)){var _r=this.on_fire_sys_onmousewheel(_b,_c,_d,_e,_f,_g,_j,_k,_h,_i,_p[0],_p[0],_m,_n);if(_r){return false;}if(this._isWheelScrollable(_c)&&this.vscrollbar&&this.vscrollbar.enable){var _s=this.vscrollbar;var _t=_s._pos;this._setVScrollDefaultAction(_s,_c);var _u=_s._pos;if(_t!=_u){return false;}}if(nexacro.OSVersion=="Mac OS"){if(this._isWheelScrollable(_b)&&this.hscrollbar&&this.hscrollbar.enable){var _v=this.hscrollbar;var _w=_v._pos;this._setHScrollDefaultAction(_v,_b);var _x=_v._pos;if(_w!=_x){return false;}}}return;}if(!_q.onmousewheel||(_q.onmousewheel&&!_q.onmousewheel.stoppropagation)){if(this.parent&&!this.parent._is_application){_h+=this._adjust_left-this._scroll_left||0;_i+=this._adjust_top-this._scroll_top||0;return this.parent._on_bubble_mousewheel(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,false,_m,_n,_o);}}}}}};_pPopupDiv.on_fire_sys_onslide=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){nexacro.Component.prototype.on_fire_sys_onslide.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i);return true;};delete _pPopupDiv;nexacro.PopupDivCtrl=function(_a,_b,_c,_d,_e,_f){nexacro.PopupDiv.call(this,_a,_b,_c,_d,_e,_f);};var _pPopupDivCtrl=nexacro.PopupDivCtrl.prototype=nexacro._createPrototype(nexacro.PopupDiv,nexacro.PopupDivCtrl);_pPopupDivCtrl._is_subcontrol=true;nexacro._setForControlStyleFinder(_pPopupDivCtrl);delete _pPopupDivCtrl;}