diff --git a/Public/www/javascript/gxg.js b/Public/www/javascript/gxg.js index 71f6bf9..e15af07 100644 --- a/Public/www/javascript/gxg.js +++ b/Public/www/javascript/gxg.js @@ -2685,12 +2685,12 @@ else{return nil}})();},$$193.$$s=self,$$193.$$arity=1,$$193));$writer=[self.$Big var self=Opal.top,$nesting=[],nil=Opal.nil,$$$=Opal.$$$,$$=Opal.$$,$module=Opal.module,$klass=Opal.klass,$truthy=Opal.truthy,$send=Opal.send,$hash2=Opal.hash2;Opal.add_stubs(['$is_a?','$raise','$uuid','$title','$version','$to_s','$[]','$each','$library_loaded?','$<<','$load_libraries','$==','$>','$size','$loaded?','$base64?','$decode64','$set_script','$instance_eval','$log_error','$to_sym','$the_refrence']);(function($base,$parent_nesting){var self=$module($base,'Libraries');var $nesting=[self].concat($parent_nesting);return nil})($nesting[0],$nesting);return(function($base,$parent_nesting){var self=$module($base,'GxG');var $nesting=[self].concat($parent_nesting);return(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Library');var $nesting=[self].concat($parent_nesting),$Library_initialize$1,$Library_uuid$4,$Library_title$5,$Library_version$6,$Library_type$7,$Library_local$8,$Library_global$9,$Library_set_script$10,$Library_require_resource$11,$Library_require_module_resource$13,$Library_loaded$ques$15;self.$$prototype.uuid=self.$$prototype.title=self.$$prototype.version=self.$$prototype.type=self.$$prototype.local=self.$$prototype.global=self.$$prototype.source=nil;Opal.def(self,'$initialize',$Library_initialize$1=function $$initialize(the_definition){var $$2,$$3,self=this,$ret_or_1=nil,load_list=nil;if(the_definition==null){the_definition=nil;};if($truthy(the_definition['$is_a?']($$$($$$($$($nesting,'GxG'),'Database'),'PersistedHash')))){}else{self.$raise($$($nesting,'ArgumentError'),"You MUST provide a persisted source object.")};self.uuid=the_definition.$uuid();self.title=the_definition.$title();self.version=the_definition.$version();self.type=(function(){if($truthy(($ret_or_1=the_definition['$[]']("type")))){return $ret_or_1}else{return "text/javascript"};return nil;})().$to_s();load_list=[];if($truthy(the_definition['$[]']("requirements")['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'PersistedArray')))){$send(the_definition['$[]']("requirements"),'each',[],($$2=function(the_requirement){var self=$$2.$$s==null?this:$$2.$$s;if(the_requirement==null){the_requirement=nil;};if($truthy($$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object")['$library_loaded?'](the_requirement))){return nil}else{return load_list['$<<'](the_requirement)};},$$2.$$s=self,$$2.$$arity=1,$$2))};$send($$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object"),'load_libraries',[load_list],($$3=function(all_loaded){var self=$$3.$$s==null?this:$$3.$$s,$ret_or_2=nil,the_uuid=nil,the_type=nil,the_charset=nil,the_src=nil,the_script=nil;if(self.src==null)self.src=nil;if(self.local==null)self.local=nil;if(self.global==null)self.global=nil;if(self.uuid==null)self.uuid=nil;if(self.type==null)self.type=nil;if(self.charset==null)self.charset=nil;if(self.source==null)self.source=nil;if(self.title==null)self.title=nil;if(all_loaded==null){all_loaded=nil;};if(all_loaded['$=='](true)){self.src=the_definition['$[]']("options")['$[]']("src").$to_s();if($truthy($rb_gt(self.src.$size(),0))){}else{self.src=nil};self.charset=(function(){if($truthy(($ret_or_2=the_definition['$[]']("options")['$[]']("charset")))){return $ret_or_2}else{return "utf-8"};return nil;})().$to_s();self.local=the_definition['$[]']("options")['$[]']("local");if($truthy(self.local)){}else{self.local=false};self.global=the_definition['$[]']("options")['$[]']("global").$to_s();if($truthy($rb_gt(self.global.$size(),0))){}else{self.global=nil};if($truthy(self['$loaded?']())){}else{if($truthy($rb_gt(self.global.$to_s().$size(),0))){}else if($truthy((self.type="text/javascript"))){self.global="Opal"}else{self.global="GxG"};if($truthy(self.src['$is_a?']($$$('::','String')))){the_uuid=self.uuid;the_type=self.type;the_charset=self.charset;the_src=self.src;var the_element=document.createElement('script');the_element.id=the_uuid;the_element.type=the_type;the_element.charset=the_charset;the_element.src=the_src;document.body.appendChild(the_element);;}else{the_script=the_definition['$[]']("options")['$[]']("native").$to_s();if($truthy(the_script['$is_a?']($$$('::','String')))){if($truthy($rb_gt(the_script.$size(),0))){if($truthy(the_script['$base64?']())){the_script=the_script.$to_s().$decode64()};the_uuid=self.uuid;the_type=self.type;the_charset=self.charset;var the_element=document.createElement('script');the_element.id=the_uuid;the_element.type=the_type;the_element.charset=the_charset;the_element.innerHTML=the_script;document.body.appendChild(the_element);;}};};};self.source=the_definition;self.$set_script(self.source['$[]']("script").$to_s());return(self.source=nil);}else{return self.$raise($$($nesting,'Exception'),""+"Library load error - skipping library intitialization: "+(self.title))};},$$3.$$s=self,$$3.$$arity=1,$$3));return self;},$Library_initialize$1.$$arity=-1);Opal.def(self,'$uuid',$Library_uuid$4=function $$uuid(){var self=this;return self.uuid},$Library_uuid$4.$$arity=0);Opal.def(self,'$title',$Library_title$5=function $$title(){var self=this;return self.title},$Library_title$5.$$arity=0);Opal.def(self,'$version',$Library_version$6=function $$version(){var self=this;return self.version},$Library_version$6.$$arity=0);Opal.def(self,'$type',$Library_type$7=function $$type(){var self=this;return self.type},$Library_type$7.$$arity=0);Opal.def(self,'$local',$Library_local$8=function $$local(){var self=this;return self.local},$Library_local$8.$$arity=0);Opal.def(self,'$global',$Library_global$9=function $$global(){var self=this;return self.global},$Library_global$9.$$arity=0);Opal.def(self,'$set_script',$Library_set_script$10=function $$set_script(the_script_body){var $a,self=this,result=nil,the_error=nil;if(the_script_body==null){the_script_body="";};result=false;if($truthy($rb_gt(the_script_body.$size(),0))){try{if($truthy(the_script_body['$base64?']())){the_script_body=the_script_body.$decode64()};if(self.local['$=='](true)){self.$instance_eval(the_script_body)}else{($a=the_script_body,typeof Opal.compile==='function'?eval(Opal.compile($a,{scope_variables:["result","the_script_body"],arity_check:false,file:'(eval)',eval:true})):self.$eval($a))};result=true;}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) try{self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":$hash2(["script"],{"script":the_script_body})}))}finally{Opal.pop_exception();}}else{throw $err;}};};return result;},$Library_set_script$10.$$arity=-1);Opal.def(self,'$require_resource',$Library_require_resource$11=function $$require_resource(the_reference){var $$12,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=false;if($truthy(self.source)){(function(){var $brk=Opal.new_brk();try{return $send(self.source['$[]']("content"),'each',[],($$12=function(the_script){var self=$$12.$$s==null?this:$$12.$$s,$ret_or_3=nil,$ret_or_4=nil,$ret_or_5=nil;if(the_script==null){the_script=nil;};if($truthy((function(){if($truthy(($ret_or_3=(function(){if($truthy(($ret_or_4=(function(){if($truthy(($ret_or_5=the_script.$title()['$=='](the_reference)))){return $ret_or_5}else{return the_script.$uuid()['$=='](self.$the_refrence().$to_s().$to_sym())};return nil;})()))){return the_script['$[]']("component").$to_s()['$==']("script")}else{return $ret_or_4};return nil;})()))){return the_script['$[]']("type").$to_s()['$==']("text/ruby")}else{return $ret_or_3};return nil;})())){self.$set_script(the_script['$[]']("script").$to_s());result=true;Opal.brk(nil,$brk);}else{return nil};},$$12.$$s=self,$$12.$$brk=$brk,$$12.$$arity=1,$$12))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};return result;},$Library_require_resource$11.$$arity=-1);Opal.def(self,'$require_module_resource',$Library_require_module_resource$13=function $$require_module_resource(the_reference){var $$14,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=false;if($truthy(self.source)){(function(){var $brk=Opal.new_brk();try{return $send(self.source['$[]']("content"),'each',[],($$14=function(the_script){var self=$$14.$$s==null?this:$$14.$$s,$a,$b,$ret_or_6=nil,$ret_or_7=nil,$ret_or_8=nil;if(the_script==null){the_script=nil;};if($truthy((function(){if($truthy(($ret_or_6=(function(){if($truthy(($ret_or_7=(function(){if($truthy(($ret_or_8=the_script.$title()['$=='](the_reference)))){return $ret_or_8}else{return the_script.$uuid()['$=='](self.$the_refrence().$to_s().$to_sym())};return nil;})()))){return the_script['$[]']("component").$to_s()['$==']("script")}else{return $ret_or_7};return nil;})()))){return the_script['$[]']("type").$to_s()['$==']("text/ruby")}else{return $ret_or_6};return nil;})())){if($truthy($rb_gt(the_script['$[]']("script").$size(),0))){if($truthy(the_script['$[]']("script")['$base64?']())){($a=the_script['$[]']("script").$to_s().$decode64(),typeof Opal.compile==='function'?eval(Opal.compile($a,{scope_variables:["$ret_or_6","$ret_or_7","$ret_or_8","the_script","result","the_reference"],arity_check:false,file:'(eval)',eval:true})):self.$eval($a))}else{($b=the_script['$[]']("script").$to_s(),typeof Opal.compile==='function'?eval(Opal.compile($b,{scope_variables:["$ret_or_6","$ret_or_7","$ret_or_8","the_script","result","the_reference"],arity_check:false,file:'(eval)',eval:true})):self.$eval($b))};result=true;Opal.brk(nil,$brk);}else{return nil}}else{return nil};},$$14.$$s=self,$$14.$$brk=$brk,$$14.$$arity=1,$$14))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};return result;},$Library_require_module_resource$13.$$arity=-1);return(Opal.def(self,'$loaded?',$Library_loaded$ques$15=function(){var $a,self=this;if(self.type['$==']("text/javascript")){if($truthy((window.hasOwnProperty(self.global.$to_s())))){return true}else{return false}}else if($truthy(self.global)){if($truthy(($a=""+"defined? "+(self.global.$to_s()),typeof Opal.compile==='function'?eval(Opal.compile($a,{scope_variables:[],arity_check:false,file:'(eval)',eval:true})):self.$eval($a)))){return true}else{return false}}else{return false}},$Library_loaded$ques$15.$$arity=0),nil)&&'loaded?';})($nesting[0],null,$nesting)})($nesting[0],$nesting);};Opal.modules["web/gxg_applications"]=function(Opal){function $rb_minus(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs-rhs:lhs['$-'](rhs);} function $rb_gt(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs>rhs:lhs['$>'](rhs);} -var self=Opal.top,$nesting=[],nil=Opal.nil,$$$=Opal.$$$,$$=Opal.$$,$module=Opal.module,$klass=Opal.klass,$hash2=Opal.hash2,$truthy=Opal.truthy,$send=Opal.send;Opal.add_stubs(['$[]','$is_a?','$to_sym','$to_s','$uuid','$[]=','$-','$each','$base64?','$decode64','$json?','$parse','$process_import','$log_error','$title','$unpersist','$==','$is_any?','$library_loaded?','$<<','$load_libraries','$get_library','$>','$size','$instance_eval','$log_warn','$the_refrence','$get_resource','$app_state_pull','$app_state_push','$values','$delete','$search','$respond_to?','$downcase','$to_proc','$method','$element','$call','$state_pull','$application_close','$inspect','$valid_uuid?','$get_window','$keys','$find_child','$set_application','$unlink_viewport','$unlink_window','$window_close','$exit','$get_viewport','$gxg_each_child','$destroy']);return(function($base,$parent_nesting){var self=$module($base,'GxG');var $nesting=[self].concat($parent_nesting);return(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Application');var $nesting=[self].concat($parent_nesting),$Application_initialize$1,$Application_get_resource$7,$Application_require_resource$9,$Application_title$10,$Application_credentialed$11,$Application_unique$12,$Application_location$13,$Application_libraries$14,$Application_state_data$15,$Application_state_pull$16,$Application_state_push$18,$Application_get_library$20,$Application_link_viewport$22,$Application_unlink_viewport$23,$Application_viewports$25,$Application_get_viewport$26,$Application_link_window$28,$Application_unlink_window$29,$Application_windows$31,$Application_get_window$32,$Application_process_uuid$34,$Application_source_uuid$35,$Application_search_resources$36,$Application_on$38,$Application_remove_listener$39,$Application_event_handler$40,$Application_run$41,$Application_exitready$ques$42,$Application_before_exit$43,$Application_exit$44,$Application_window_close$46,$Application_viewport_clear$48;self.$$prototype.viewports=self.$$prototype.windows=self.$$prototype.definition=self.$$prototype.title=self.$$prototype.credentialed=self.$$prototype.unique=self.$$prototype.location=self.$$prototype.libraries=self.$$prototype.state=self.$$prototype.process=self.$$prototype.event_handlers=self.$$prototype.event_listeners=nil;Opal.def(self,'$initialize',$Application_initialize$1=function $$initialize(settings){var $$2,$$3,$$4,$$5,self=this,$ret_or_1=nil,$writer=nil,$ret_or_2=nil,$ret_or_3=nil,the_error=nil,the_opts=nil,load_list=nil;if(settings==null){settings=$hash2([],{});};self.process=settings['$[]']("application");self.definition=settings['$[]']("source");self.title="Untitled";self.state=(function(){if($truthy(($ret_or_1=settings['$[]']("state")))){return $ret_or_1}else{return $hash2([],{})};return nil;})();self.viewports=$hash2([],{});if($truthy(settings['$[]']("viewport")['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport')))){$writer=[settings['$[]']("viewport").$uuid().$to_s().$to_sym(),settings['$[]']("viewport")];$send(self.viewports,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(settings['$[]']("viewports")['$is_a?']($$$('::','Array')))){$send(settings['$[]']("viewports"),'each',[],($$2=function(the_viewport){var self=$$2.$$s==null?this:$$2.$$s;if(self.viewports==null)self.viewports=nil;if(the_viewport==null){the_viewport=nil;};if($truthy(the_viewport['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport')))){$writer=[the_viewport.$uuid().$to_s().$to_sym(),the_viewport];$send(self.viewports,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};},$$2.$$s=self,$$2.$$arity=1,$$2))};self.windows=$hash2([],{});if($truthy(settings['$[]']("window")['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'Window')))){$writer=[settings['$[]']("window").$uuid().$to_s().$to_sym(),settings['$[]']("window")];$send(self.windows,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(settings['$[]']("windows")['$is_a?']($$$('::','Array')))){$send(settings['$[]']("windows"),'each',[],($$3=function(the_window){var self=$$3.$$s==null?this:$$3.$$s;if(self.windows==null)self.windows=nil;if(the_window==null){the_window=nil;};if($truthy(the_window['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'Window')))){$writer=[the_window.$uuid().$to_s().$to_sym(),the_window];$send(self.windows,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};},$$3.$$s=self,$$3.$$arity=1,$$3))};self.libraries=$hash2([],{});self.event_handlers=$hash2([],{});self.event_listeners=$hash2([],{});self.credentialed=(function(){if($truthy(($ret_or_2=settings['$[]']("credentialed")))){return $ret_or_2}else{return false};return nil;})();self.unique=(function(){if($truthy(($ret_or_3=settings['$[]']("unique")))){return $ret_or_3}else{return true};return nil;})();self.location=settings['$[]']("location");self.heap=$hash2([],{});if($truthy(self.definition['$is_a?']($$$('::','String')))){if($truthy(self.definition['$base64?']())){self.definition=self.definition.$decode64()};if($truthy(self.definition['$json?']())){try{self.definition=$$$('::','JSON').$parse(self.definition,$hash2(["symbolize_names"],{"symbolize_names":true}));self.definition=$$$($$$('::','GxG'),'Database').$process_import(self.definition);}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) -try{self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":$hash2(["definition"],{"definition":self.definition})}))}finally{Opal.pop_exception();}}else{throw $err;}};};};if($truthy(self.definition['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.title=self.definition.$title();the_opts=self.definition['$[]']("options").$unpersist();if(the_opts['$[]']("credentialed")['$=='](true)){self.credentialed=true}else{self.credentialed=false};if(the_opts['$[]']("unique")['$=='](true)){self.unique=true}else{self.unique=false};};if($truthy(self.definition['$is_any?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){load_list=[];if($truthy(self.definition['$[]']("requirements")['$is_any?']($$$($$$($$$('::','GxG'),'Database'),'DetachedArray'),$$$($$$($$$('::','GxG'),'Database'),'PersistedArray')))){$send(self.definition['$[]']("requirements"),'each',[],($$4=function(the_requirement){var self=$$4.$$s==null?this:$$4.$$s;if(the_requirement==null){the_requirement=nil;};if($truthy($$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object")['$library_loaded?'](the_requirement))){return nil}else{return load_list['$<<'](the_requirement)};},$$4.$$s=self,$$4.$$arity=1,$$4))};$send($$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object"),'load_libraries',[load_list],($$5=function(all_loaded){var self=$$5.$$s==null?this:$$5.$$s,$$6;if(self.definition==null)self.definition=nil;if(all_loaded==null){all_loaded=nil;};if(all_loaded['$=='](true)){if($truthy(self.definition['$[]']("requirements")['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'PersistedArray')))){$send(self.definition['$[]']("requirements"),'each',[],($$6=function(the_requirement){var self=$$6.$$s==null?this:$$6.$$s,the_library=nil;if(self.libraries==null)self.libraries=nil;if(the_requirement==null){the_requirement=nil;};the_library=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$get_library(the_requirement);if($truthy(the_library)){$writer=[the_library.$uuid(),the_library];$send(self.libraries,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};},$$6.$$s=self,$$6.$$arity=1,$$6))};if($truthy($rb_gt(self.definition['$[]']("script").$size(),0))){if($truthy(self.definition['$[]']("script")['$base64?']())){return self.$instance_eval(self.definition['$[]']("script").$to_s().$decode64())}else{return self.$instance_eval(self.definition['$[]']("script").$to_s())}}else{return nil};}else{return self.$log_warn(""+"Library load error - not processing main application script for "+(self.definition.$title())+".")};},$$5.$$s=self,$$5.$$arity=1,$$5));};return self;},$Application_initialize$1.$$arity=-1);Opal.def(self,'$get_resource',$Application_get_resource$7=function $$get_resource(the_reference){var $$8,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy(self.definition)){(function(){var $brk=Opal.new_brk();try{return $send(self.definition['$[]']("content"),'each',[],($$8=function(the_object){var self=$$8.$$s==null?this:$$8.$$s,$ret_or_4=nil;if(the_object==null){the_object=nil;};if($truthy((function(){if($truthy(($ret_or_4=the_object.$title()['$=='](the_reference)))){return $ret_or_4}else{return the_object.$uuid()['$=='](self.$the_refrence().$to_s().$to_sym())};return nil;})())){result=the_object;Opal.brk(nil,$brk);}else{return nil};},$$8.$$s=self,$$8.$$brk=$brk,$$8.$$arity=1,$$8))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};return result;},$Application_get_resource$7.$$arity=-1);Opal.def(self,'$require_resource',$Application_require_resource$9=function $$require_resource(the_reference){var self=this,result=nil,the_script=nil,$ret_or_5=nil;if(the_reference==null){the_reference=nil;};result=false;if($truthy(self.definition)){the_script=self.$get_resource(the_reference);if($truthy(the_script)){if($truthy((function(){if($truthy(($ret_or_5=the_script['$[]']("component").$to_s()['$==']("script")))){return the_script['$[]']("type").$to_s()['$==']("text/ruby")}else{return $ret_or_5};return nil;})())){if($truthy($rb_gt(the_script['$[]']("script").$size(),0))){if($truthy(the_script['$[]']("script")['$base64?']())){self.$instance_eval(the_script['$[]']("script").$to_s().$decode64())}else{self.$instance_eval(the_script['$[]']("script").$to_s())};result=true;}}};};return result;},$Application_require_resource$9.$$arity=-1);Opal.def(self,'$title',$Application_title$10=function $$title(){var self=this;return self.title},$Application_title$10.$$arity=0);Opal.def(self,'$credentialed',$Application_credentialed$11=function $$credentialed(){var self=this;return self.credentialed},$Application_credentialed$11.$$arity=0);Opal.def(self,'$unique',$Application_unique$12=function $$unique(){var self=this;return self.unique},$Application_unique$12.$$arity=0);Opal.def(self,'$location',$Application_location$13=function $$location(){var self=this;return self.location},$Application_location$13.$$arity=0);Opal.def(self,'$libraries',$Application_libraries$14=function $$libraries(){var self=this;return self.libraries},$Application_libraries$14.$$arity=0);Opal.def(self,'$state_data',$Application_state_data$15=function $$state_data(){var self=this;return self.state},$Application_state_data$15.$$arity=0);Opal.def(self,'$state_pull',$Application_state_pull$16=function $$state_pull(){var $$17,self=this;return $send($$$($$($nesting,'GxG'),'CONNECTION'),'app_state_pull',[$hash2(["application"],{"application":self.process.$to_s()})],($$17=function(response){var self=$$17.$$s==null?this:$$17.$$s;if(response==null){response=nil;};if($truthy(response['$is_a?']($$$('::','Hash')))){if($truthy(response['$[]']("result")['$is_a?']($$$('::','Hash')))){self.state=response['$[]']("result");return true;}else{return false}}else{return false};},$$17.$$s=self,$$17.$$arity=1,$$17))},$Application_state_pull$16.$$arity=0);Opal.def(self,'$state_push',$Application_state_push$18=function $$state_push(){var $$19,self=this;return $send($$$($$($nesting,'GxG'),'CONNECTION'),'app_state_push',[$hash2(["application","data"],{"application":self.process.$to_s(),"data":self.state})],($$19=function(response){var self=$$19.$$s==null?this:$$19.$$s;if(response==null){response=nil;};if($truthy(response['$is_a?']($$$('::','Hash')))){if(response['$[]']("result")['$=='](true)){return true}else{return false}}else{return false};},$$19.$$s=self,$$19.$$arity=1,$$19))},$Application_state_push$18.$$arity=0);Opal.def(self,'$get_library',$Application_get_library$20=function $$get_library(the_reference){var $$21,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){result=self.libraries['$[]'](the_reference.$to_s().$to_sym());if($truthy(result)){}else{(function(){var $brk=Opal.new_brk();try{return $send(self.libraries.$values(),'each',[],($$21=function(the_library){var self=$$21.$$s==null?this:$$21.$$s;if(the_library==null){the_library=nil;};if(the_library.$title()['$=='](the_reference)){result=the_library;Opal.brk(nil,$brk);}else{return nil};},$$21.$$s=self,$$21.$$brk=$brk,$$21.$$arity=1,$$21))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};};return result;},$Application_get_library$20.$$arity=-1);Opal.def(self,'$link_viewport',$Application_link_viewport$22=function $$link_viewport(the_viewport){var self=this,$writer=nil;if(the_viewport==null){the_viewport=nil;};if($truthy(the_viewport['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport')))){$writer=[the_viewport.$uuid().$to_s().$to_sym(),the_viewport];$send(self.viewports,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}else{return false};},$Application_link_viewport$22.$$arity=-1);Opal.def(self,'$unlink_viewport',$Application_unlink_viewport$23=function $$unlink_viewport(the_reference){var $$24,self=this;if(the_reference==null){the_reference=nil;};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){if($truthy(self.viewports['$[]'](the_reference.$to_s().$to_sym()))){self.viewports.$delete(the_reference.$to_s().$to_sym())}else{(function(){var $brk=Opal.new_brk();try{return $send(self.viewports.$values(),'each',[],($$24=function(the_viewport){var self=$$24.$$s==null?this:$$24.$$s;if(self.viewports==null)self.viewports=nil;if(the_viewport==null){the_viewport=nil;};if(the_viewport.$title()['$=='](the_reference)){self.viewports.$delete(the_viewport.$uuid());Opal.brk(nil,$brk);}else{return nil};},$$24.$$s=self,$$24.$$brk=$brk,$$24.$$arity=1,$$24))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};return true;}else{return false};},$Application_unlink_viewport$23.$$arity=-1);Opal.def(self,'$viewports',$Application_viewports$25=function $$viewports(){var self=this;return self.viewports},$Application_viewports$25.$$arity=0);Opal.def(self,'$get_viewport',$Application_get_viewport$26=function $$get_viewport(the_reference){var $$27,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){result=self.viewports['$[]'](the_reference.$to_s().$to_sym());if($truthy(result)){}else{(function(){var $brk=Opal.new_brk();try{return $send(self.viewports.$values(),'each',[],($$27=function(the_viewport){var self=$$27.$$s==null?this:$$27.$$s;if(the_viewport==null){the_viewport=nil;};if(the_viewport.$title()['$=='](the_reference)){result=the_viewport;Opal.brk(nil,$brk);}else{return nil};},$$27.$$s=self,$$27.$$brk=$brk,$$27.$$arity=1,$$27))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};};return result;},$Application_get_viewport$26.$$arity=-1);Opal.def(self,'$link_window',$Application_link_window$28=function $$link_window(the_window){var self=this,$writer=nil;if(the_window==null){the_window=nil;};if($truthy(the_window['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'Window')))){$writer=[the_window.$uuid().$to_s().$to_sym(),the_window];$send(self.windows,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}else{return false};},$Application_link_window$28.$$arity=-1);Opal.def(self,'$unlink_window',$Application_unlink_window$29=function $$unlink_window(the_reference){var $$30,self=this;if(the_reference==null){the_reference=nil;};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){if($truthy(self.windows['$[]'](the_reference.$to_s().$to_sym()))){self.windows.$delete(the_reference.$to_s().$to_sym())}else{(function(){var $brk=Opal.new_brk();try{return $send(self.windows.$values(),'each',[],($$30=function(the_window){var self=$$30.$$s==null?this:$$30.$$s;if(self.windows==null)self.windows=nil;if(the_window==null){the_window=nil;};if(the_window.$title()['$=='](the_reference)){self.windows.$delete(the_window.$uuid());Opal.brk(nil,$brk);}else{return nil};},$$30.$$s=self,$$30.$$brk=$brk,$$30.$$arity=1,$$30))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};return true;}else{return false};},$Application_unlink_window$29.$$arity=-1);Opal.def(self,'$windows',$Application_windows$31=function $$windows(){var self=this;return self.windows},$Application_windows$31.$$arity=0);Opal.def(self,'$get_window',$Application_get_window$32=function $$get_window(the_reference){var $$33,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){result=self.windows['$[]'](the_reference.$to_s().$to_sym());if($truthy(result)){}else{(function(){var $brk=Opal.new_brk();try{return $send(self.windows.$values(),'each',[],($$33=function(the_window){var self=$$33.$$s==null?this:$$33.$$s;if(the_window==null){the_window=nil;};if(the_window.$title()['$=='](the_reference)){result=the_window;Opal.brk(nil,$brk);}else{return nil};},$$33.$$s=self,$$33.$$brk=$brk,$$33.$$arity=1,$$33))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};};return result;},$Application_get_window$32.$$arity=-1);Opal.def(self,'$process_uuid',$Application_process_uuid$34=function $$process_uuid(){var self=this;return self.process},$Application_process_uuid$34.$$arity=0);Opal.def(self,'$source_uuid',$Application_source_uuid$35=function $$source_uuid(){var self=this;if($truthy(self.definition['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){return self.definition.$uuid()}else{return nil}},$Application_source_uuid$35.$$arity=0);Opal.def(self,'$search_resources',$Application_search_resources$36=function $$search_resources(the_reference){var $$37,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){if($truthy(self.definition)){(function(){var $brk=Opal.new_brk();try{return $send(self.definition['$[]']("content"),'search',[],($$37=function(item,selector,container){var self=$$37.$$s==null?this:$$37.$$s,$ret_or_6=nil;if(item==null){item=nil;};if(selector==null){selector=nil;};if(container==null){container=nil;};if($truthy(item['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy((function(){if($truthy(($ret_or_6=the_reference.$to_s().$to_sym()['$=='](item.$uuid().$to_s().$to_sym())))){return $ret_or_6}else{return the_reference.$to_s()['$=='](item.$title().$to_s())};return nil;})())){result=item;Opal.brk(nil,$brk);}else{return nil}}else{return nil};},$$37.$$s=self,$$37.$$brk=$brk,$$37.$$arity=3,$$37))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()}};return result;},$Application_search_resources$36.$$arity=-1);Opal.def(self,'$on',$Application_on$38=function $$on(the_event_type,captured){var $iter=$Application_on$38.$$p,block=$iter||nil,self=this,$writer=nil;if($iter)$Application_on$38.$$p=null;if($iter)$Application_on$38.$$p=null;;if(the_event_type==null){the_event_type=nil;};if(captured==null){captured=false;};if($truthy(the_event_type['$is_any?']($$$('::','String'),$$$('::','Symbol')))){if($truthy(block['$respond_to?']("call"))){$writer=[the_event_type.$to_s().$downcase().$to_sym(),block];$send(self.event_handlers,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=[the_event_type.$to_s().$downcase().$to_sym(),self.$method("event_handler").$to_proc()];$send(self.event_listeners,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return self.$element().addEventListener(the_event_type.$to_s().$downcase(),self.event_listeners['$[]'](the_event_type.$to_s().$downcase().$to_sym()),captured);}else{return nil}}else{return nil};},$Application_on$38.$$arity=-1);Opal.def(self,'$remove_listener',$Application_remove_listener$39=function $$remove_listener(the_event_type){var self=this,$ret_or_7=nil;if(the_event_type==null){the_event_type=nil;};if($truthy((function(){if($truthy(($ret_or_7=self.event_handlers['$[]'](the_event_type.$to_s().$downcase().$to_sym())))){return self.event_listeners['$[]'](the_event_type.$to_s().$downcase().$to_sym())}else{return $ret_or_7};return nil;})())){self.$element().removeEventListener(the_event_type.$to_s().$downcase(),self.event_listeners['$[]'](the_event_type.$to_s().$downcase().$to_sym()));;self.event_handlers.$delete(the_event_type.$to_s().$downcase().$to_sym());self.event_listeners.$delete(the_event_type.$to_s().$downcase().$to_sym());};return true;},$Application_remove_listener$39.$$arity=-1);Opal.def(self,'$event_handler',$Application_event_handler$40=function $$event_handler(the_event){var self=this,the_type=nil,event_record=nil,genre=nil,$ret_or_8=nil,fields=nil;the_type=(the_event.type).$to_s().$downcase().$to_sym();event_record=$hash2([],{});if($truthy(self.event_handlers['$[]'](the_type))){genre=(function(){if($truthy(($ret_or_8=$$$($$$($$$($$($nesting,'GxG'),'Gui'),'EventHandlers'),'EVENT_GENRES')['$[]'](the_type)))){return $ret_or_8}else{return "event"};return nil;})();if($truthy(genre)){fields=$$$($$$($$$($$($nesting,'GxG'),'Gui'),'EventHandlers'),'EVENT_FIELDS')['$[]'](genre);if($truthy(fields)){serializer=function thisOne(e){if(e){var o={eventName:e.toString(),altKey:e.altKey,bubbles:e.bubbles,button:e.button,buttons:e.buttons,cancelBubble:e.cancelBubble,cancelable:e.cancelable,clientX:e.clientX,clientY:e.clientY,composed:e.composed,ctrlKey:e.ctrlKey,currentTarget:e.currentTarget?e.currentTarget.outerHTML:null,defaultPrevented:e.defaultPrevented,detail:e.detail,eventPhase:e.eventPhase,fromElement:e.fromElement?e.fromElement.outerHTML:null,isTrusted:e.isTrusted,layerX:e.layerX,layerY:e.layerY,metaKey:e.metaKey,movementX:e.movementX,movementY:e.movementY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,relatedTarget:e.relatedTarget?e.relatedTarget.outerHTML:null,returnValue:e.returnValue,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey,sourceCapabilities:e.sourceCapabilities?e.sourceCapabilities.toString():null,target:e.target?e.target.outerHTML:null,timeStamp:e.timeStamp,toElement:e.toElement?e.toElement.outerHTML:null,type:e.type,view:e.view?e.view.toString():null,which:e.which,x:e.x,y:e.y};return o;};};event_record=JSON.stringify(serializer(the_event));;event_record=$$$('::','JSON').$parse(event_record.$to_s(),$hash2(["symbolize_names"],{"symbolize_names":true}));};};return self.event_handlers['$[]'](the_type).$call(event_record);}else{return nil};},$Application_event_handler$40.$$arity=1);Opal.def(self,'$run',$Application_run$41=function $$run(data){var self=this;if(data==null){data=$hash2([],{});};if($truthy(data['$is_a?']($$$('::','Hash')))){if(data['$[]']("restore")['$=='](true)){return self.$state_pull()}else{return nil}}else{return nil};},$Application_run$41.$$arity=-1);Opal.def(self,'$exitready?',$Application_exitready$ques$42=function(data){var self=this;if(data==null){data=$hash2([],{});};return "ready";},$Application_exitready$ques$42.$$arity=-1);Opal.def(self,'$before_exit',$Application_before_exit$43=function $$before_exit(data){var self=this;if(data==null){data=$hash2([],{});};return true;},$Application_before_exit$43.$$arity=-1);Opal.def(self,'$exit',$Application_exit$44=function $$exit(data){var $$45,self=this;if(data==null){data=$hash2([],{});};$send($$$($$($nesting,'GxG'),'CONNECTION'),'application_close',[$hash2(["application"],{"application":self.process})],($$45=function(response){var self=$$45.$$s==null?this:$$45.$$s;if(self.process==null)self.process=nil;if(response==null){response=nil;};if($truthy(response['$is_a?']($$$('::','Hash')))){if(response['$[]']("result")['$=='](true)){return $$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("processes").$delete(self.process)}else{return self.$log_warn(""+"Could not close application "+(self.process.$inspect())+" : "+(response.$inspect()))}}else{return self.$log_warn(""+"Malformed response: "+(response.$inspect()))};},$$45.$$s=self,$$45.$$arity=1,$$45));return true;},$Application_exit$44.$$arity=-1);Opal.def(self,'$window_close',$Application_window_close$46=function $$window_close(details){var $$47,self=this,the_window=nil;if(details==null){details=$hash2([],{});};if($truthy(details['$is_a?']($$$('::','Hash')))){if($truthy($$($nesting,'GxG')['$valid_uuid?'](details['$[]']("window")))){the_window=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$get_window(details['$[]']("window"));if($truthy(the_window)){$send(self.viewports.$keys(),'each',[],($$47=function(the_reference){var self=$$47.$$s==null?this:$$47.$$s,the_viewport=nil;if(the_reference==null){the_reference=nil;};the_viewport=the_window.$find_child(the_reference);if($truthy(the_viewport)){the_viewport.$set_application(nil);return self.$unlink_viewport(the_reference);}else{return nil};},$$47.$$s=self,$$47.$$arity=1,$$47));self.$unlink_window(the_window.$uuid());$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$window_close(the_window.$uuid());if($truthy($rb_gt(self.windows.$size(),0))){return nil}else{return self.$exit()};}else{return nil};}else{return self.$log_warn(""+"Invalid Argument passed: "+(details.$inspect()))}}else{return nil};},$Application_window_close$46.$$arity=-1);return(Opal.def(self,'$viewport_clear',$Application_viewport_clear$48=function $$viewport_clear(the_reference){var $$49,self=this,viewport=nil;if(the_reference==null){the_reference=nil;};viewport=self.$get_viewport(the_reference);if($truthy(viewport)){$send(viewport,'gxg_each_child',[],($$49=function(the_item){var self=$$49.$$s==null?this:$$49.$$s;if(the_item==null){the_item=nil;};if(the_item['$=='](viewport)){return nil}else{return the_item.$destroy()};},$$49.$$s=self,$$49.$$arity=1,$$49));return true;}else{return false};},$Application_viewport_clear$48.$$arity=-1),nil)&&'viewport_clear';})($nesting[0],null,$nesting)})($nesting[0],$nesting)};Opal.modules["web/gxg_vdom"]=function(Opal){function $rb_plus(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs+rhs:lhs['$+'](rhs);} +var self=Opal.top,$nesting=[],nil=Opal.nil,$$$=Opal.$$$,$$=Opal.$$,$module=Opal.module,$klass=Opal.klass,$hash2=Opal.hash2,$truthy=Opal.truthy,$send=Opal.send;Opal.add_stubs(['$[]','$is_a?','$to_sym','$to_s','$uuid','$[]=','$-','$each','$base64?','$decode64','$json?','$parse','$process_import','$log_error','$title','$unpersist','$==','$is_any?','$library_loaded?','$<<','$load_libraries','$get_library','$>','$size','$instance_eval','$log_warn','$the_refrence','$get_resource','$app_state_pull','$app_state_push','$values','$delete','$search','$respond_to?','$downcase','$to_proc','$method','$element','$call','$state_pull','$application_close','$inspect','$valid_uuid?','$get_window','$keys','$find_child','$set_application','$unlink_viewport','$unlink_window','$window_close','$exit','$get_viewport','$gxg_each_child','$destroy']);return(function($base,$parent_nesting){var self=$module($base,'GxG');var $nesting=[self].concat($parent_nesting);return(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Application');var $nesting=[self].concat($parent_nesting),$Application_initialize$1,$Application_get_resource$7,$Application_require_resource$9,$Application_title$10,$Application_credentialed$11,$Application_unique$12,$Application_location$13,$Application_libraries$14,$Application_state_data$15,$Application_state_pull$16,$Application_state_push$18,$Application_get_library$20,$Application_link_viewport$22,$Application_unlink_viewport$23,$Application_viewports$25,$Application_get_viewport$26,$Application_link_window$28,$Application_unlink_window$29,$Application_windows$31,$Application_get_window$32,$Application_process_uuid$34,$Application_source_uuid$35,$Application_search_resources$36,$Application_on$38,$Application_remove_listener$39,$Application_event_handler$40,$Application_menu_item_select$41,$Application_run$42,$Application_exitready$ques$43,$Application_before_exit$44,$Application_exit$45,$Application_window_close$47,$Application_viewport_clear$49;self.$$prototype.viewports=self.$$prototype.windows=self.$$prototype.definition=self.$$prototype.title=self.$$prototype.credentialed=self.$$prototype.unique=self.$$prototype.location=self.$$prototype.libraries=self.$$prototype.state=self.$$prototype.process=self.$$prototype.event_handlers=self.$$prototype.event_listeners=nil;Opal.def(self,'$initialize',$Application_initialize$1=function $$initialize(settings){var $$2,$$3,$$4,$$5,self=this,$ret_or_1=nil,$writer=nil,$ret_or_2=nil,$ret_or_3=nil,the_error=nil,the_opts=nil,load_list=nil;if(settings==null){settings=$hash2([],{});};self.process=settings['$[]']("application");self.definition=settings['$[]']("source");self.title="Untitled";self.state=(function(){if($truthy(($ret_or_1=settings['$[]']("state")))){return $ret_or_1}else{return $hash2([],{})};return nil;})();self.viewports=$hash2([],{});if($truthy(settings['$[]']("viewport")['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport')))){$writer=[settings['$[]']("viewport").$uuid().$to_s().$to_sym(),settings['$[]']("viewport")];$send(self.viewports,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(settings['$[]']("viewports")['$is_a?']($$$('::','Array')))){$send(settings['$[]']("viewports"),'each',[],($$2=function(the_viewport){var self=$$2.$$s==null?this:$$2.$$s;if(self.viewports==null)self.viewports=nil;if(the_viewport==null){the_viewport=nil;};if($truthy(the_viewport['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport')))){$writer=[the_viewport.$uuid().$to_s().$to_sym(),the_viewport];$send(self.viewports,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};},$$2.$$s=self,$$2.$$arity=1,$$2))};self.windows=$hash2([],{});if($truthy(settings['$[]']("window")['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'Window')))){$writer=[settings['$[]']("window").$uuid().$to_s().$to_sym(),settings['$[]']("window")];$send(self.windows,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(settings['$[]']("windows")['$is_a?']($$$('::','Array')))){$send(settings['$[]']("windows"),'each',[],($$3=function(the_window){var self=$$3.$$s==null?this:$$3.$$s;if(self.windows==null)self.windows=nil;if(the_window==null){the_window=nil;};if($truthy(the_window['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'Window')))){$writer=[the_window.$uuid().$to_s().$to_sym(),the_window];$send(self.windows,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};},$$3.$$s=self,$$3.$$arity=1,$$3))};self.libraries=$hash2([],{});self.event_handlers=$hash2([],{});self.event_listeners=$hash2([],{});self.credentialed=(function(){if($truthy(($ret_or_2=settings['$[]']("credentialed")))){return $ret_or_2}else{return false};return nil;})();self.unique=(function(){if($truthy(($ret_or_3=settings['$[]']("unique")))){return $ret_or_3}else{return true};return nil;})();self.location=settings['$[]']("location");self.heap=$hash2([],{});if($truthy(self.definition['$is_a?']($$$('::','String')))){if($truthy(self.definition['$base64?']())){self.definition=self.definition.$decode64()};if($truthy(self.definition['$json?']())){try{self.definition=$$$('::','JSON').$parse(self.definition,$hash2(["symbolize_names"],{"symbolize_names":true}));self.definition=$$$($$$('::','GxG'),'Database').$process_import(self.definition);}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) +try{self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":$hash2(["definition"],{"definition":self.definition})}))}finally{Opal.pop_exception();}}else{throw $err;}};};};if($truthy(self.definition['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.title=self.definition.$title();the_opts=self.definition['$[]']("options").$unpersist();if(the_opts['$[]']("credentialed")['$=='](true)){self.credentialed=true}else{self.credentialed=false};if(the_opts['$[]']("unique")['$=='](true)){self.unique=true}else{self.unique=false};};if($truthy(self.definition['$is_any?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){load_list=[];if($truthy(self.definition['$[]']("requirements")['$is_any?']($$$($$$($$$('::','GxG'),'Database'),'DetachedArray'),$$$($$$($$$('::','GxG'),'Database'),'PersistedArray')))){$send(self.definition['$[]']("requirements"),'each',[],($$4=function(the_requirement){var self=$$4.$$s==null?this:$$4.$$s;if(the_requirement==null){the_requirement=nil;};if($truthy($$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object")['$library_loaded?'](the_requirement))){return nil}else{return load_list['$<<'](the_requirement)};},$$4.$$s=self,$$4.$$arity=1,$$4))};$send($$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object"),'load_libraries',[load_list],($$5=function(all_loaded){var self=$$5.$$s==null?this:$$5.$$s,$$6;if(self.definition==null)self.definition=nil;if(all_loaded==null){all_loaded=nil;};if(all_loaded['$=='](true)){if($truthy(self.definition['$[]']("requirements")['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'PersistedArray')))){$send(self.definition['$[]']("requirements"),'each',[],($$6=function(the_requirement){var self=$$6.$$s==null?this:$$6.$$s,the_library=nil;if(self.libraries==null)self.libraries=nil;if(the_requirement==null){the_requirement=nil;};the_library=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$get_library(the_requirement);if($truthy(the_library)){$writer=[the_library.$uuid(),the_library];$send(self.libraries,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};},$$6.$$s=self,$$6.$$arity=1,$$6))};if($truthy($rb_gt(self.definition['$[]']("script").$size(),0))){if($truthy(self.definition['$[]']("script")['$base64?']())){return self.$instance_eval(self.definition['$[]']("script").$to_s().$decode64())}else{return self.$instance_eval(self.definition['$[]']("script").$to_s())}}else{return nil};}else{return self.$log_warn(""+"Library load error - not processing main application script for "+(self.definition.$title())+".")};},$$5.$$s=self,$$5.$$arity=1,$$5));};return self;},$Application_initialize$1.$$arity=-1);Opal.def(self,'$get_resource',$Application_get_resource$7=function $$get_resource(the_reference){var $$8,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy(self.definition)){(function(){var $brk=Opal.new_brk();try{return $send(self.definition['$[]']("content"),'each',[],($$8=function(the_object){var self=$$8.$$s==null?this:$$8.$$s,$ret_or_4=nil;if(the_object==null){the_object=nil;};if($truthy((function(){if($truthy(($ret_or_4=the_object.$title()['$=='](the_reference)))){return $ret_or_4}else{return the_object.$uuid()['$=='](self.$the_refrence().$to_s().$to_sym())};return nil;})())){result=the_object;Opal.brk(nil,$brk);}else{return nil};},$$8.$$s=self,$$8.$$brk=$brk,$$8.$$arity=1,$$8))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};return result;},$Application_get_resource$7.$$arity=-1);Opal.def(self,'$require_resource',$Application_require_resource$9=function $$require_resource(the_reference){var self=this,result=nil,the_script=nil,$ret_or_5=nil;if(the_reference==null){the_reference=nil;};result=false;if($truthy(self.definition)){the_script=self.$get_resource(the_reference);if($truthy(the_script)){if($truthy((function(){if($truthy(($ret_or_5=the_script['$[]']("component").$to_s()['$==']("script")))){return the_script['$[]']("type").$to_s()['$==']("text/ruby")}else{return $ret_or_5};return nil;})())){if($truthy($rb_gt(the_script['$[]']("script").$size(),0))){if($truthy(the_script['$[]']("script")['$base64?']())){self.$instance_eval(the_script['$[]']("script").$to_s().$decode64())}else{self.$instance_eval(the_script['$[]']("script").$to_s())};result=true;}}};};return result;},$Application_require_resource$9.$$arity=-1);Opal.def(self,'$title',$Application_title$10=function $$title(){var self=this;return self.title},$Application_title$10.$$arity=0);Opal.def(self,'$credentialed',$Application_credentialed$11=function $$credentialed(){var self=this;return self.credentialed},$Application_credentialed$11.$$arity=0);Opal.def(self,'$unique',$Application_unique$12=function $$unique(){var self=this;return self.unique},$Application_unique$12.$$arity=0);Opal.def(self,'$location',$Application_location$13=function $$location(){var self=this;return self.location},$Application_location$13.$$arity=0);Opal.def(self,'$libraries',$Application_libraries$14=function $$libraries(){var self=this;return self.libraries},$Application_libraries$14.$$arity=0);Opal.def(self,'$state_data',$Application_state_data$15=function $$state_data(){var self=this;return self.state},$Application_state_data$15.$$arity=0);Opal.def(self,'$state_pull',$Application_state_pull$16=function $$state_pull(){var $$17,self=this;return $send($$$($$($nesting,'GxG'),'CONNECTION'),'app_state_pull',[$hash2(["application"],{"application":self.process.$to_s()})],($$17=function(response){var self=$$17.$$s==null?this:$$17.$$s;if(response==null){response=nil;};if($truthy(response['$is_a?']($$$('::','Hash')))){if($truthy(response['$[]']("result")['$is_a?']($$$('::','Hash')))){self.state=response['$[]']("result");return true;}else{return false}}else{return false};},$$17.$$s=self,$$17.$$arity=1,$$17))},$Application_state_pull$16.$$arity=0);Opal.def(self,'$state_push',$Application_state_push$18=function $$state_push(){var $$19,self=this;return $send($$$($$($nesting,'GxG'),'CONNECTION'),'app_state_push',[$hash2(["application","data"],{"application":self.process.$to_s(),"data":self.state})],($$19=function(response){var self=$$19.$$s==null?this:$$19.$$s;if(response==null){response=nil;};if($truthy(response['$is_a?']($$$('::','Hash')))){if(response['$[]']("result")['$=='](true)){return true}else{return false}}else{return false};},$$19.$$s=self,$$19.$$arity=1,$$19))},$Application_state_push$18.$$arity=0);Opal.def(self,'$get_library',$Application_get_library$20=function $$get_library(the_reference){var $$21,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){result=self.libraries['$[]'](the_reference.$to_s().$to_sym());if($truthy(result)){}else{(function(){var $brk=Opal.new_brk();try{return $send(self.libraries.$values(),'each',[],($$21=function(the_library){var self=$$21.$$s==null?this:$$21.$$s;if(the_library==null){the_library=nil;};if(the_library.$title()['$=='](the_reference)){result=the_library;Opal.brk(nil,$brk);}else{return nil};},$$21.$$s=self,$$21.$$brk=$brk,$$21.$$arity=1,$$21))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};};return result;},$Application_get_library$20.$$arity=-1);Opal.def(self,'$link_viewport',$Application_link_viewport$22=function $$link_viewport(the_viewport){var self=this,$writer=nil;if(the_viewport==null){the_viewport=nil;};if($truthy(the_viewport['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport')))){$writer=[the_viewport.$uuid().$to_s().$to_sym(),the_viewport];$send(self.viewports,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}else{return false};},$Application_link_viewport$22.$$arity=-1);Opal.def(self,'$unlink_viewport',$Application_unlink_viewport$23=function $$unlink_viewport(the_reference){var $$24,self=this;if(the_reference==null){the_reference=nil;};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){if($truthy(self.viewports['$[]'](the_reference.$to_s().$to_sym()))){self.viewports.$delete(the_reference.$to_s().$to_sym())}else{(function(){var $brk=Opal.new_brk();try{return $send(self.viewports.$values(),'each',[],($$24=function(the_viewport){var self=$$24.$$s==null?this:$$24.$$s;if(self.viewports==null)self.viewports=nil;if(the_viewport==null){the_viewport=nil;};if(the_viewport.$title()['$=='](the_reference)){self.viewports.$delete(the_viewport.$uuid());Opal.brk(nil,$brk);}else{return nil};},$$24.$$s=self,$$24.$$brk=$brk,$$24.$$arity=1,$$24))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};return true;}else{return false};},$Application_unlink_viewport$23.$$arity=-1);Opal.def(self,'$viewports',$Application_viewports$25=function $$viewports(){var self=this;return self.viewports},$Application_viewports$25.$$arity=0);Opal.def(self,'$get_viewport',$Application_get_viewport$26=function $$get_viewport(the_reference){var $$27,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){result=self.viewports['$[]'](the_reference.$to_s().$to_sym());if($truthy(result)){}else{(function(){var $brk=Opal.new_brk();try{return $send(self.viewports.$values(),'each',[],($$27=function(the_viewport){var self=$$27.$$s==null?this:$$27.$$s;if(the_viewport==null){the_viewport=nil;};if(the_viewport.$title()['$=='](the_reference)){result=the_viewport;Opal.brk(nil,$brk);}else{return nil};},$$27.$$s=self,$$27.$$brk=$brk,$$27.$$arity=1,$$27))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};};return result;},$Application_get_viewport$26.$$arity=-1);Opal.def(self,'$link_window',$Application_link_window$28=function $$link_window(the_window){var self=this,$writer=nil;if(the_window==null){the_window=nil;};if($truthy(the_window['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'Window')))){$writer=[the_window.$uuid().$to_s().$to_sym(),the_window];$send(self.windows,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}else{return false};},$Application_link_window$28.$$arity=-1);Opal.def(self,'$unlink_window',$Application_unlink_window$29=function $$unlink_window(the_reference){var $$30,self=this;if(the_reference==null){the_reference=nil;};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){if($truthy(self.windows['$[]'](the_reference.$to_s().$to_sym()))){self.windows.$delete(the_reference.$to_s().$to_sym())}else{(function(){var $brk=Opal.new_brk();try{return $send(self.windows.$values(),'each',[],($$30=function(the_window){var self=$$30.$$s==null?this:$$30.$$s;if(self.windows==null)self.windows=nil;if(the_window==null){the_window=nil;};if(the_window.$title()['$=='](the_reference)){self.windows.$delete(the_window.$uuid());Opal.brk(nil,$brk);}else{return nil};},$$30.$$s=self,$$30.$$brk=$brk,$$30.$$arity=1,$$30))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};return true;}else{return false};},$Application_unlink_window$29.$$arity=-1);Opal.def(self,'$windows',$Application_windows$31=function $$windows(){var self=this;return self.windows},$Application_windows$31.$$arity=0);Opal.def(self,'$get_window',$Application_get_window$32=function $$get_window(the_reference){var $$33,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){result=self.windows['$[]'](the_reference.$to_s().$to_sym());if($truthy(result)){}else{(function(){var $brk=Opal.new_brk();try{return $send(self.windows.$values(),'each',[],($$33=function(the_window){var self=$$33.$$s==null?this:$$33.$$s;if(the_window==null){the_window=nil;};if(the_window.$title()['$=='](the_reference)){result=the_window;Opal.brk(nil,$brk);}else{return nil};},$$33.$$s=self,$$33.$$brk=$brk,$$33.$$arity=1,$$33))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};};return result;},$Application_get_window$32.$$arity=-1);Opal.def(self,'$process_uuid',$Application_process_uuid$34=function $$process_uuid(){var self=this;return self.process},$Application_process_uuid$34.$$arity=0);Opal.def(self,'$source_uuid',$Application_source_uuid$35=function $$source_uuid(){var self=this;if($truthy(self.definition['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){return self.definition.$uuid()}else{return nil}},$Application_source_uuid$35.$$arity=0);Opal.def(self,'$search_resources',$Application_search_resources$36=function $$search_resources(the_reference){var $$37,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){if($truthy(self.definition)){(function(){var $brk=Opal.new_brk();try{return $send(self.definition['$[]']("content"),'search',[],($$37=function(item,selector,container){var self=$$37.$$s==null?this:$$37.$$s,$ret_or_6=nil;if(item==null){item=nil;};if(selector==null){selector=nil;};if(container==null){container=nil;};if($truthy(item['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy((function(){if($truthy(($ret_or_6=the_reference.$to_s().$to_sym()['$=='](item.$uuid().$to_s().$to_sym())))){return $ret_or_6}else{return the_reference.$to_s()['$=='](item.$title().$to_s())};return nil;})())){result=item;Opal.brk(nil,$brk);}else{return nil}}else{return nil};},$$37.$$s=self,$$37.$$brk=$brk,$$37.$$arity=3,$$37))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()}};return result;},$Application_search_resources$36.$$arity=-1);Opal.def(self,'$on',$Application_on$38=function $$on(the_event_type,captured){var $iter=$Application_on$38.$$p,block=$iter||nil,self=this,$writer=nil;if($iter)$Application_on$38.$$p=null;if($iter)$Application_on$38.$$p=null;;if(the_event_type==null){the_event_type=nil;};if(captured==null){captured=false;};if($truthy(the_event_type['$is_any?']($$$('::','String'),$$$('::','Symbol')))){if($truthy(block['$respond_to?']("call"))){$writer=[the_event_type.$to_s().$downcase().$to_sym(),block];$send(self.event_handlers,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=[the_event_type.$to_s().$downcase().$to_sym(),self.$method("event_handler").$to_proc()];$send(self.event_listeners,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return self.$element().addEventListener(the_event_type.$to_s().$downcase(),self.event_listeners['$[]'](the_event_type.$to_s().$downcase().$to_sym()),captured);}else{return nil}}else{return nil};},$Application_on$38.$$arity=-1);Opal.def(self,'$remove_listener',$Application_remove_listener$39=function $$remove_listener(the_event_type){var self=this,$ret_or_7=nil;if(the_event_type==null){the_event_type=nil;};if($truthy((function(){if($truthy(($ret_or_7=self.event_handlers['$[]'](the_event_type.$to_s().$downcase().$to_sym())))){return self.event_listeners['$[]'](the_event_type.$to_s().$downcase().$to_sym())}else{return $ret_or_7};return nil;})())){self.$element().removeEventListener(the_event_type.$to_s().$downcase(),self.event_listeners['$[]'](the_event_type.$to_s().$downcase().$to_sym()));;self.event_handlers.$delete(the_event_type.$to_s().$downcase().$to_sym());self.event_listeners.$delete(the_event_type.$to_s().$downcase().$to_sym());};return true;},$Application_remove_listener$39.$$arity=-1);Opal.def(self,'$event_handler',$Application_event_handler$40=function $$event_handler(the_event){var self=this,the_type=nil,event_record=nil,genre=nil,$ret_or_8=nil,fields=nil;the_type=(the_event.type).$to_s().$downcase().$to_sym();event_record=$hash2([],{});if($truthy(self.event_handlers['$[]'](the_type))){genre=(function(){if($truthy(($ret_or_8=$$$($$$($$$($$($nesting,'GxG'),'Gui'),'EventHandlers'),'EVENT_GENRES')['$[]'](the_type)))){return $ret_or_8}else{return "event"};return nil;})();if($truthy(genre)){fields=$$$($$$($$$($$($nesting,'GxG'),'Gui'),'EventHandlers'),'EVENT_FIELDS')['$[]'](genre);if($truthy(fields)){serializer=function thisOne(e){if(e){var o={eventName:e.toString(),altKey:e.altKey,bubbles:e.bubbles,button:e.button,buttons:e.buttons,cancelBubble:e.cancelBubble,cancelable:e.cancelable,clientX:e.clientX,clientY:e.clientY,composed:e.composed,ctrlKey:e.ctrlKey,currentTarget:e.currentTarget?e.currentTarget.outerHTML:null,defaultPrevented:e.defaultPrevented,detail:e.detail,eventPhase:e.eventPhase,fromElement:e.fromElement?e.fromElement.outerHTML:null,isTrusted:e.isTrusted,layerX:e.layerX,layerY:e.layerY,metaKey:e.metaKey,movementX:e.movementX,movementY:e.movementY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,relatedTarget:e.relatedTarget?e.relatedTarget.outerHTML:null,returnValue:e.returnValue,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey,sourceCapabilities:e.sourceCapabilities?e.sourceCapabilities.toString():null,target:e.target?e.target.outerHTML:null,timeStamp:e.timeStamp,toElement:e.toElement?e.toElement.outerHTML:null,type:e.type,view:e.view?e.view.toString():null,which:e.which,x:e.x,y:e.y};return o;};};event_record=JSON.stringify(serializer(the_event));;event_record=$$$('::','JSON').$parse(event_record.$to_s(),$hash2(["symbolize_names"],{"symbolize_names":true}));};};return self.event_handlers['$[]'](the_type).$call(event_record);}else{return nil};},$Application_event_handler$40.$$arity=1);Opal.def(self,'$menu_item_select',$Application_menu_item_select$41=function $$menu_item_select(data){var self=this;if(data==null){data=nil;};return nil;},$Application_menu_item_select$41.$$arity=-1);Opal.def(self,'$run',$Application_run$42=function $$run(data){var self=this;if(data==null){data=$hash2([],{});};if($truthy(data['$is_a?']($$$('::','Hash')))){if(data['$[]']("restore")['$=='](true)){return self.$state_pull()}else{return nil}}else{return nil};},$Application_run$42.$$arity=-1);Opal.def(self,'$exitready?',$Application_exitready$ques$43=function(data){var self=this;if(data==null){data=$hash2([],{});};return "ready";},$Application_exitready$ques$43.$$arity=-1);Opal.def(self,'$before_exit',$Application_before_exit$44=function $$before_exit(data){var self=this;if(data==null){data=$hash2([],{});};return true;},$Application_before_exit$44.$$arity=-1);Opal.def(self,'$exit',$Application_exit$45=function $$exit(data){var $$46,self=this;if(data==null){data=$hash2([],{});};$send($$$($$($nesting,'GxG'),'CONNECTION'),'application_close',[$hash2(["application"],{"application":self.process})],($$46=function(response){var self=$$46.$$s==null?this:$$46.$$s;if(self.process==null)self.process=nil;if(response==null){response=nil;};if($truthy(response['$is_a?']($$$('::','Hash')))){if(response['$[]']("result")['$=='](true)){return $$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("processes").$delete(self.process)}else{return self.$log_warn(""+"Could not close application "+(self.process.$inspect())+" : "+(response.$inspect()))}}else{return self.$log_warn(""+"Malformed response: "+(response.$inspect()))};},$$46.$$s=self,$$46.$$arity=1,$$46));return true;},$Application_exit$45.$$arity=-1);Opal.def(self,'$window_close',$Application_window_close$47=function $$window_close(details){var $$48,self=this,the_window=nil;if(details==null){details=$hash2([],{});};if($truthy(details['$is_a?']($$$('::','Hash')))){if($truthy($$($nesting,'GxG')['$valid_uuid?'](details['$[]']("window")))){the_window=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$get_window(details['$[]']("window"));if($truthy(the_window)){$send(self.viewports.$keys(),'each',[],($$48=function(the_reference){var self=$$48.$$s==null?this:$$48.$$s,the_viewport=nil;if(the_reference==null){the_reference=nil;};the_viewport=the_window.$find_child(the_reference);if($truthy(the_viewport)){the_viewport.$set_application(nil);return self.$unlink_viewport(the_reference);}else{return nil};},$$48.$$s=self,$$48.$$arity=1,$$48));self.$unlink_window(the_window.$uuid());$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$window_close(the_window.$uuid());if($truthy($rb_gt(self.windows.$size(),0))){return nil}else{return self.$exit()};}else{return nil};}else{return self.$log_warn(""+"Invalid Argument passed: "+(details.$inspect()))}}else{return nil};},$Application_window_close$47.$$arity=-1);return(Opal.def(self,'$viewport_clear',$Application_viewport_clear$49=function $$viewport_clear(the_reference){var $$50,self=this,viewport=nil;if(the_reference==null){the_reference=nil;};viewport=self.$get_viewport(the_reference);if($truthy(viewport)){$send(viewport,'gxg_each_child',[],($$50=function(the_item){var self=$$50.$$s==null?this:$$50.$$s;if(the_item==null){the_item=nil;};if(the_item['$=='](viewport)){return nil}else{return the_item.$destroy()};},$$50.$$s=self,$$50.$$arity=1,$$50));return true;}else{return false};},$Application_viewport_clear$49.$$arity=-1),nil)&&'viewport_clear';})($nesting[0],null,$nesting)})($nesting[0],$nesting)};Opal.modules["web/gxg_vdom"]=function(Opal){function $rb_plus(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs+rhs:lhs['$+'](rhs);} function $rb_minus(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs-rhs:lhs['$-'](rhs);} function $rb_gt(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs>rhs:lhs['$>'](rhs);} function $rb_ge(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs>=rhs:lhs['$>='](rhs);} -var self=Opal.top,$nesting=[],nil=Opal.nil,$$$=Opal.$$$,$$=Opal.$$,$module=Opal.module,$class_variable_set=Opal.class_variable_set,$hash2=Opal.hash2,$truthy=Opal.truthy,$range=Opal.range,$klass=Opal.klass,$send=Opal.send,$class_variable_get=Opal.class_variable_get,$send2=Opal.send2,$find_super=Opal.find_super,$gvars=Opal.gvars,$alias=Opal.alias;Opal.add_stubs(['$is_any?','$unpersist','$==','$[]','$to_s','$downcase','$extname','$===','$include?','$+','$relative_url','$log_warn','$inspect','$to_sym','$valid_properties','$each','$keys','$[]=','$-','$to_i','$style_sheet','$>','$<<','$new','$is_a?','$name','$rule_names','$remove_rule','$find_rule','$size','$index','$gsub','$expand_path','$each_with_index','$reverse','$delete_at','$native_object','$to_a','$create_element','$factory','$update_classes','$_stylize','$style','$class','$set_attribute','$join','$map','$_before_create','$before_create','$create','$_after_create','$after_create','$cascade','$raise','$component_class','$title','$register_object','$values','$call','$clone','$shift','$children','$each_child','$clearning_queue','$unregister_object','$page','$delete','$every_child','$remove_listeners','$forget_child','$parent','$element','$has_key?','$uuid','$split','$last','$each_pair','$set_state','$!','$get_state','$add_state','$merge_style','$respond_to?','$component','$domtype','$to_proc','$method','$remove_listener','$parse','$base64?','$decode64','$instance_eval','$log_error','$include','$uuid_generate','$find_object','$puts','$to_n','$compile','$find_child','$included','$each_included','$send','$start','$animate','$layout_refresh','$find_parent_type','$valid_uuid?','$theme_icon','$theme_background','$theme_widget','$theme_font','$site_asset','$attr_reader','$dasherize','$!~','$strip','$capitalize','$creation','$set_text','$root','$build_components','$disable','$clear_attribute','$type','$to_f','$version','$>=','$loaded?','$library_pull','$json?','$process_import','$load_library','$set_busy','$application_open','$pull_object','$merge','$run','$!=','$add_child','$set_application','$get_viewport','$link_viewport','$link_window','$track_deltas','$set_script','$on','$close','$build_page','$find_object_by','$detach','$body','$all_descendants','$destroy','$clear','$clear_rules','$refresh_css_cache','$load_font','$set_rule','$load_libraries','$load_page']);return(function($base,$parent_nesting){var self=$module($base,'GxG');var $nesting=[self].concat($parent_nesting);return(function($base,$parent_nesting){var self=$module($base,'Gui');var $nesting=[self].concat($parent_nesting);return(function($base,$parent_nesting){var self=$module($base,'Vdom');var $nesting=[self].concat($parent_nesting),$Vdom_load_font$1,$Vdom_style_sheet$11,$Vdom_refresh_css_cache$13,$Vdom_valid_properties$15,$Vdom_get_property_name$16,$Vdom_rules$17,$Vdom_rule_names$19,$Vdom_find_rule$21,$Vdom_clear_rules$23,$Vdom_set_rule$25,$Vdom_remove_rule$27,$Vdom_load_page$227,$Vdom_navigate_to$232;$class_variable_set($nesting[0],'@@CssCache',[]);$class_variable_set($nesting[0],'@@CssRuleProperties',$hash2([],{}));Opal.defs(self,'$load_font',$Vdom_load_font$1=function $$load_font(font_profile){var self=this,thefamily=nil,$ret_or_1=nil,thestyle=nil,$ret_or_2=nil,theweight=nil,$ret_or_3=nil,fontformat=nil,$case=nil,source_url=nil;if(font_profile==null){font_profile=nil;};if($truthy(font_profile['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(font_profile['$is_any?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){font_profile=font_profile.$unpersist()};if(font_profile['$[]']("resource_type")['$==']("font-face")){thefamily=(function(){if($truthy(($ret_or_1=font_profile['$[]']("font_family")))){return $ret_or_1}else{return "Unknown"};return nil;})().$to_s();thestyle=(function(){if($truthy(($ret_or_2=font_profile['$[]']("font_style")))){return $ret_or_2}else{return "normal"};return nil;})().$to_s();theweight=(function(){if($truthy(($ret_or_3=font_profile['$[]']("font_weight")))){return $ret_or_3}else{return 400};return nil;})().$to_s();if($truthy(font_profile['$[]']("format"))){fontformat=font_profile['$[]']("format").$to_s().$downcase()}else{$case=$$($nesting,'File').$extname(font_profile['$[]']("source")).$downcase();if(".ttf"['$===']($case)||".otf"['$===']($case)){fontformat="truetype"} +var self=Opal.top,$nesting=[],nil=Opal.nil,$$$=Opal.$$$,$$=Opal.$$,$module=Opal.module,$class_variable_set=Opal.class_variable_set,$hash2=Opal.hash2,$truthy=Opal.truthy,$range=Opal.range,$klass=Opal.klass,$send=Opal.send,$class_variable_get=Opal.class_variable_get,$send2=Opal.send2,$find_super=Opal.find_super,$gvars=Opal.gvars,$alias=Opal.alias;Opal.add_stubs(['$is_any?','$unpersist','$==','$[]','$to_s','$downcase','$extname','$===','$include?','$+','$relative_url','$log_warn','$inspect','$to_sym','$valid_properties','$each','$keys','$[]=','$-','$to_i','$style_sheet','$>','$<<','$new','$is_a?','$name','$rule_names','$remove_rule','$find_rule','$size','$index','$gsub','$expand_path','$each_with_index','$reverse','$delete_at','$native_object','$to_a','$create_element','$factory','$update_classes','$_stylize','$style','$class','$set_attribute','$join','$map','$_before_create','$before_create','$create','$_after_create','$after_create','$cascade','$raise','$component_class','$title','$register_object','$values','$call','$clone','$shift','$children','$each_child','$clearning_queue','$unregister_object','$page','$delete','$every_child','$remove_listeners','$forget_child','$parent','$element','$has_key?','$uuid','$split','$last','$each_pair','$set_state','$!','$get_state','$add_state','$merge_style','$respond_to?','$component','$domtype','$to_proc','$method','$remove_listener','$parse','$base64?','$decode64','$instance_eval','$log_error','$include','$uuid_generate','$find_object','$puts','$to_n','$compile','$find_child','$included','$each_included','$send','$start','$animate','$layout_refresh','$find_parent_type','$valid_uuid?','$theme_icon','$theme_background','$theme_widget','$theme_font','$site_asset','$attr_reader','$dasherize','$!~','$strip','$capitalize','$creation','$set_text','$root','$build_components','$disable','$clear_attribute','$type','$to_f','$version','$>=','$loaded?','$library_pull','$json?','$process_import','$load_library','$set_busy','$application_open','$pull_object','$merge','$run','$!=','$add_child','$set_application','$get_viewport','$link_viewport','$link_window','$track_deltas','$set_script','$on','$close','$build_page','$find_object_by','$detach','$body','$all_descendants','$destroy','$clear','$clear_rules','$refresh_css_cache','$load_font','$set_rule','$load_libraries','$load_page']);return(function($base,$parent_nesting){var self=$module($base,'GxG');var $nesting=[self].concat($parent_nesting);return(function($base,$parent_nesting){var self=$module($base,'Gui');var $nesting=[self].concat($parent_nesting);return(function($base,$parent_nesting){var self=$module($base,'Vdom');var $nesting=[self].concat($parent_nesting),$Vdom_load_font$1,$Vdom_style_sheet$11,$Vdom_refresh_css_cache$13,$Vdom_valid_properties$15,$Vdom_get_property_name$16,$Vdom_rules$17,$Vdom_rule_names$19,$Vdom_find_rule$21,$Vdom_clear_rules$23,$Vdom_set_rule$25,$Vdom_remove_rule$27,$Vdom_load_page$229,$Vdom_navigate_to$234;$class_variable_set($nesting[0],'@@CssCache',[]);$class_variable_set($nesting[0],'@@CssRuleProperties',$hash2([],{}));Opal.defs(self,'$load_font',$Vdom_load_font$1=function $$load_font(font_profile){var self=this,thefamily=nil,$ret_or_1=nil,thestyle=nil,$ret_or_2=nil,theweight=nil,$ret_or_3=nil,fontformat=nil,$case=nil,source_url=nil;if(font_profile==null){font_profile=nil;};if($truthy(font_profile['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(font_profile['$is_any?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){font_profile=font_profile.$unpersist()};if(font_profile['$[]']("resource_type")['$==']("font-face")){thefamily=(function(){if($truthy(($ret_or_1=font_profile['$[]']("font_family")))){return $ret_or_1}else{return "Unknown"};return nil;})().$to_s();thestyle=(function(){if($truthy(($ret_or_2=font_profile['$[]']("font_style")))){return $ret_or_2}else{return "normal"};return nil;})().$to_s();theweight=(function(){if($truthy(($ret_or_3=font_profile['$[]']("font_weight")))){return $ret_or_3}else{return 400};return nil;})().$to_s();if($truthy(font_profile['$[]']("format"))){fontformat=font_profile['$[]']("format").$to_s().$downcase()}else{$case=$$($nesting,'File').$extname(font_profile['$[]']("source")).$downcase();if(".ttf"['$===']($case)||".otf"['$===']($case)){fontformat="truetype"} else if(".eot"['$===']($case)){fontformat="embedded-opentype"} else if(".svg"['$===']($case)){fontformat="svg"} else if(".woff"['$===']($case)){fontformat="woff"} @@ -2698,14 +2698,14 @@ else if(".woff2"['$===']($case)){fontformat="woff2"} else{fontformat="unknown"}};if($truthy(["sftp:","ftp:/","http:","https"]['$include?'](font_profile['$[]']("source")['$[]']($range(0,4,false)).$downcase()))){source_url=font_profile['$[]']("source")}else{source_url=$rb_plus($$$($$$('::','GxG'),'CONNECTION').$relative_url().$to_s(),font_profile['$[]']("source"))};var family=thefamily.$to_s();var sourceurl="url('"+source_url+"')";var theformat="format('"+fontformat+"')";if(theformat=="format('unknown')"){var sourcestring=sourceurl;}else{var sourcestring=(sourceurl+" "+theformat);};var theweight=theweight;var thestyle=thestyle;var thefont=new FontFace(family,sourceurl,{weight:theweight,style:thestyle});thefont.load().then(function(loaded_face){document.fonts.add(loaded_face);}).catch(function(error){alert(error);});;return true;}else{self.$log_warn(""+"You attempted to load a non-font resource as a font: "+(font_profile.$inspect()));return false;};}else{self.$log_warn(""+"You attempted to load a font with the wrong value: "+(font_profile.$inspect()));return false;};},$Vdom_load_font$1.$$arity=-1);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'CSSRule');var $nesting=[self].concat($parent_nesting),$CSSRule_initialize$2,$CSSRule_native_object$3,$CSSRule_inspect$4,$CSSRule_name$5,$CSSRule_keys$6,$CSSRule_$$$7,$CSSRule_$$$eq$8,$CSSRule_merge$9;self.$$prototype.native_rule=self.$$prototype.name=nil;Opal.def(self,'$initialize',$CSSRule_initialize$2=function $$initialize(the_native_rule){var self=this,$ret_or_4=nil;self.native_rule=the_native_rule;return(self.name=(function(){if($truthy(($ret_or_4=self.native_rule.selectorText))){return $ret_or_4}else{return ""};return nil;})().$to_s().$to_sym());},$CSSRule_initialize$2.$$arity=1);Opal.def(self,'$native_object',$CSSRule_native_object$3=function $$native_object(){var self=this;return self.native_rule},$CSSRule_native_object$3.$$arity=0);Opal.def(self,'$inspect',$CSSRule_inspect$4=function $$inspect(){var self=this;return ""+""},$CSSRule_inspect$4.$$arity=0);Opal.def(self,'$name',$CSSRule_name$5=function $$name(){var self=this;return self.name},$CSSRule_name$5.$$arity=0);Opal.def(self,'$keys',$CSSRule_keys$6=function $$keys(){var self=this;return $$$($$$($$($nesting,'GxG'),'Gui'),'Vdom').$valid_properties()},$CSSRule_keys$6.$$arity=0);Opal.def(self,'$[]',$CSSRule_$$$7=function(the_key){var self=this;return self.native_rule.style[the_key]},$CSSRule_$$$7.$$arity=1);Opal.def(self,'$[]=',$CSSRule_$$$eq$8=function(the_key,the_value){var self=this,$ret_or_5=nil;self.native_rule.style[the_key]=(function(){if($truthy(($ret_or_5=the_value))){return $ret_or_5}else{return ""};return nil;})();return the_value;},$CSSRule_$$$eq$8.$$arity=2);return(Opal.def(self,'$merge',$CSSRule_merge$9=function $$merge(properties){var $$10,self=this;if(properties==null){properties=$hash2([],{});};$send(properties.$keys(),'each',[],($$10=function(the_key){var self=$$10.$$s==null?this:$$10.$$s,$writer=nil;if(the_key==null){the_key=nil;};$writer=[the_key,properties['$[]'](the_key)];$send(self,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];},$$10.$$s=self,$$10.$$arity=1,$$10));return self;},$CSSRule_merge$9.$$arity=-1),nil)&&'merge';})($nesting[0],null,$nesting);Opal.defs(self,'$style_sheet',$Vdom_style_sheet$11=function $$style_sheet(){var $$12,self=this,result=nil,sheets=nil;result=nil;sheets=(document.styleSheets.length).$to_i();(function(){var $brk=Opal.new_brk();try{return $send(Opal.Range.$new(0,$rb_minus(sheets,1),false),'each',[],($$12=function(sheet_index){var self=$$12.$$s==null?this:$$12.$$s,the_sheet=nil;if(sheet_index==null){sheet_index=nil;};the_sheet=document.styleSheets[sheet_index];if($truthy(the_sheet)){if($truthy((the_sheet.href).$to_s()['$include?']("/themes/page.css"))){result=the_sheet;Opal.brk(nil,$brk);}else{return nil}}else{return nil};},$$12.$$s=self,$$12.$$brk=$brk,$$12.$$arity=1,$$12))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();return result;},$Vdom_style_sheet$11.$$arity=0);Opal.defs(self,'$refresh_css_cache',$Vdom_refresh_css_cache$13=function $$refresh_css_cache(){var $$14,self=this,the_style_sheet=nil,new_cache=nil,ruleset=nil,the_error=nil,rules_count=nil,end_index=nil;the_style_sheet=$$$($$$($$($nesting,'GxG'),'Gui'),'Vdom').$style_sheet();if($truthy(the_style_sheet)){new_cache=[];try{ruleset=the_style_sheet.cssRules}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) try{ruleset=the_style_sheet.rules}finally{Opal.pop_exception();}}else{throw $err;}};;if($truthy(ruleset)){rules_count=(ruleset.length).$to_i();if($truthy($rb_gt(rules_count,0))){end_index=$rb_minus((ruleset.length).$to_i(),1)}else{end_index=0};$send(Opal.Range.$new(0,end_index,false),'each',[],($$14=function(indexer){var self=$$14.$$s==null?this:$$14.$$s,native_rule=nil;if(indexer==null){indexer=nil;};try{native_rule=the_style_sheet.cssRules[indexer]}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) try{native_rule=the_style_sheet.rules[indexer]}finally{Opal.pop_exception();}}else{throw $err;}};;if($truthy(native_rule)){return new_cache['$<<']($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'CSSRule').$new(native_rule))}else{return nil};},$$14.$$s=self,$$14.$$arity=1,$$14));};$class_variable_set($nesting[0],'@@CssCache',new_cache);};return true;},$Vdom_refresh_css_cache$13.$$arity=0);Opal.defs(self,'$valid_properties',$Vdom_valid_properties$15=function $$valid_properties(){var self=this;return $class_variable_get($nesting[0],'@@CssRuleProperties',false).$keys()},$Vdom_valid_properties$15.$$arity=0);Opal.defs(self,'$get_property_name',$Vdom_get_property_name$16=function $$get_property_name(the_key){var self=this,result=nil;if(the_key==null){the_key=nil;};result=nil;if($truthy(the_key['$is_a?']($$$('::','Symbol')))){result=$class_variable_get($nesting[0],'@@CssRuleProperties',false)['$[]'](the_key)};return result;},$Vdom_get_property_name$16.$$arity=-1);Opal.defs(self,'$rules',$Vdom_rules$17=function $$rules(){var $$18,self=this,result=nil;result=[];$send($class_variable_get($nesting[0],'@@CssCache',false),'each',[],($$18=function(entry){var self=$$18.$$s==null?this:$$18.$$s;if(entry==null){entry=nil;};return result['$<<'](entry.$name());},$$18.$$s=self,$$18.$$arity=1,$$18));return result;},$Vdom_rules$17.$$arity=0);Opal.defs(self,'$rule_names',$Vdom_rule_names$19=function $$rule_names(){var $$20,self=this,result=nil;result=[];$send($class_variable_get($nesting[0],'@@CssCache',false),'each',[],($$20=function(entry){var self=$$20.$$s==null?this:$$20.$$s;if(entry==null){entry=nil;};return result['$<<'](entry.$name());},$$20.$$s=self,$$20.$$arity=1,$$20));return result;},$Vdom_rule_names$19.$$arity=0);Opal.defs(self,'$find_rule',$Vdom_find_rule$21=function $$find_rule(the_rule_selector){var $$22,self=this,result=nil;if(the_rule_selector==null){the_rule_selector=nil;};result=[];$send($class_variable_get($nesting[0],'@@CssCache',false),'each',[],($$22=function(entry){var self=$$22.$$s==null?this:$$22.$$s;if(entry==null){entry=nil;};if(entry.$name()['$=='](the_rule_selector.$to_s().$to_sym())){return result['$<<'](entry)}else{return nil};},$$22.$$s=self,$$22.$$arity=1,$$22));return result;},$Vdom_find_rule$21.$$arity=-1);Opal.defs(self,'$clear_rules',$Vdom_clear_rules$23=function $$clear_rules(){var $$24,self=this,list=nil;list=$$$($$$($$$('::','GxG'),'Gui'),'Vdom').$rule_names();$send(list,'each',[],($$24=function(the_rule_name){var self=$$24.$$s==null?this:$$24.$$s;if(the_rule_name==null){the_rule_name=nil;};if(the_rule_name['$=='](".hidden")){return nil}else{return $$$($$$($$$('::','GxG'),'Gui'),'Vdom').$remove_rule(the_rule_name)};},$$24.$$s=self,$$24.$$arity=1,$$24));return true;},$Vdom_clear_rules$23.$$arity=0);Opal.defs(self,'$set_rule',$Vdom_set_rule$25=function $$set_rule(the_rule_selector,the_properties,options){var $$26,self=this,the_style_sheet=nil,found=nil,the_site_prefix=nil,rule_string=nil,native_rule=nil,the_error=nil;if(the_rule_selector==null){the_rule_selector=nil;};if(the_properties==null){the_properties=$hash2([],{});};if(options==null){options=$hash2(["merge"],{"merge":true});};the_style_sheet=$$$($$$($$($nesting,'GxG'),'Gui'),'Vdom').$style_sheet();if($truthy(the_style_sheet)){found=$$$($$$($$($nesting,'GxG'),'Gui'),'Vdom').$find_rule(the_rule_selector);if($truthy($rb_gt(found.$size(),0))){$$$($$$($$($nesting,'GxG'),'Gui'),'Vdom').$remove_rule(the_rule_selector)};the_site_prefix=$$$($$$('::','GxG'),'CONNECTION').$relative_url();rule_string="{ ";$send(the_properties.$keys(),'each',[],($$26=function(property_key){var self=$$26.$$s==null?this:$$26.$$s,the_value=nil,end_point=nil,the_path=nil,$ret_or_6=nil,$ret_or_7=nil,$ret_or_8=nil,$ret_or_9=nil;if(property_key==null){property_key=nil;};the_value=the_properties['$[]'](property_key).$to_s();if($truthy(the_value['$include?']("url("))){end_point=the_value.$index(")");the_path=the_value['$[]'](Opal.Range.$new(4,$rb_minus(end_point,1),false));if($truthy((function(){if($truthy(($ret_or_6=the_path['$[]'](0)['$==']("'")))){return $ret_or_6}else{return the_path['$[]'](0)['$==']("\"")};return nil;})())){the_path=the_path['$[]']($range(1,-1,false))};if($truthy((function(){if($truthy(($ret_or_7=the_path['$[]'](-1)['$==']("'")))){return $ret_or_7}else{return the_path['$[]'](-1)['$==']("\"")};return nil;})())){the_path=the_path['$[]']($range(0,-2,false))};if($truthy((function(){if($truthy(($ret_or_8=(function(){if($truthy(($ret_or_9=the_path['$include?']("data:")))){return $ret_or_9}else{return the_path['$include?']("http:")};return nil;})()))){return $ret_or_8}else{return the_path['$include?']("https:")};return nil;})())){}else if($truthy(the_path['$[]'](Opal.Range.$new(0,$rb_minus(the_site_prefix.$size(),1),false))['$=='](the_site_prefix))){}else{the_value=$rb_plus($rb_plus("url('",$$($nesting,'File').$expand_path($rb_plus($rb_plus(the_site_prefix,"/"),the_path))),"')").$gsub("//","/")};};return(rule_string=$rb_plus(rule_string,""+(property_key.$to_s())+": "+(the_value.$to_s())+"; "));},$$26.$$s=self,$$26.$$arity=1,$$26));rule_string=$rb_plus(rule_string," }");if((the_style_sheet.insertRule($rb_plus(the_rule_selector.$to_s(),rule_string.$to_s()),(the_style_sheet.cssRules.length))).$to_i()['$=='](((the_style_sheet.cssRules.length-1)).$to_i())){try{native_rule=the_style_sheet.cssRules[(the_style_sheet.cssRules.length-1)]}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) -try{native_rule=the_style_sheet.rules[(the_style_sheet.cssRules.length-1)]}finally{Opal.pop_exception();}}else{throw $err;}};;$class_variable_get($nesting[0],'@@CssCache',false)['$<<']($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'CSSRule').$new(native_rule));return true;}else{self.$log_warn("GxG Style Sheet Rule creation failed..");return false;};}else{self.$log_warn("GxG Style Sheet not found.");return false;};},$Vdom_set_rule$25.$$arity=-1);Opal.defs(self,'$remove_rule',$Vdom_remove_rule$27=function $$remove_rule(the_rule_selector){var $$28,$$29,$$30,self=this,found_indexes=nil,found=nil;if(the_rule_selector==null){the_rule_selector=nil;};found_indexes=[];$send($class_variable_get($nesting[0],'@@CssCache',false),'each_with_index',[],($$28=function(entry,index){var self=$$28.$$s==null?this:$$28.$$s,$ret_or_10=nil;if(entry==null){entry=nil;};if(index==null){index=nil;};if($truthy((function(){if($truthy(($ret_or_10=entry.$name()['$=='](the_rule_selector.$to_s().$to_sym())))){return $ret_or_10}else{return entry.$name()['$=='](the_rule_selector.$to_s())};return nil;})())){return found_indexes['$<<'](index)}else{return nil};},$$28.$$s=self,$$28.$$arity=2,$$28));found=[];$send(found_indexes.$reverse(),'each',[],($$29=function(the_index){var self=$$29.$$s==null?this:$$29.$$s;if(the_index==null){the_index=nil;};return found['$<<']($class_variable_get($nesting[0],'@@CssCache',false).$delete_at(the_index));},$$29.$$s=self,$$29.$$arity=1,$$29));if($truthy($rb_gt(found.$size(),0))){$send(found,'each',[],($$30=function(the_rule){var self=$$30.$$s==null?this:$$30.$$s,$$31,native_rule=nil,the_sheet=nil,rule_count=nil;if(the_rule==null){the_rule=nil;};native_rule=the_rule.$native_object();the_sheet=$$$($$$($$($nesting,'GxG'),'Gui'),'Vdom').$style_sheet();if($truthy(the_sheet)){rule_count=(the_sheet.cssRules.length).$to_i();if($truthy($rb_gt(rule_count,0))){return $send(Opal.Range.$new(0,$rb_minus(rule_count,1),false).$to_a().$reverse(),'each',[],($$31=function(rule_index){var self=$$31.$$s==null?this:$$31.$$s,other_native_rule=nil;if(rule_index==null){rule_index=nil;};other_native_rule=the_sheet.cssRules[rule_index];if($truthy(other_native_rule)){if($truthy(native_rule.selectorText==other_native_rule.selectorText)){return the_sheet.deleteRule(rule_index)}else{return nil}}else{return nil};},$$31.$$s=self,$$31.$$arity=1,$$31))}else{return nil};}else{return nil};},$$30.$$s=self,$$30.$$arity=1,$$30));return true;}else{return false};},$Vdom_remove_rule$27.$$arity=-1);(function($base,$parent_nesting){var self=$module($base,'ElementMethods');var $nesting=[self].concat($parent_nesting),$ElementMethods__before_create$32,$ElementMethods_before_create$33,$ElementMethods_create$34,$ElementMethods__after_create$35,$ElementMethods_after_create$36,$ElementMethods_style$37,$ElementMethods__stylize$38,$ElementMethods_cascade$40,$ElementMethods_creation$41,$ElementMethods_add_child$42,$ElementMethods_each_child$43,$ElementMethods_all_descendants$45,$ElementMethods_forget_children$47,$ElementMethods_forget_child$49,$ElementMethods_destroy$50,$ElementMethods_method_missing$52,$ElementMethods_dom_id$53,$ElementMethods_title$54,$ElementMethods_update_classes$55,$ElementMethods_option_replace$58,$ElementMethods_set_state$59,$ElementMethods_set_states$60,$ElementMethods_get_state$62,$ElementMethods_get_states$63,$ElementMethods_toggle_state$64,$ElementMethods_state_active$ques$65,$ElementMethods_add_states$66,$ElementMethods_add_state$68,$ElementMethods_value$69,$ElementMethods_get_text$70,$ElementMethods_value$eq$71,$ElementMethods_set_text$72,$ElementMethods_html$73,$ElementMethods_set_style$74,$ElementMethods_merge_style$76,$ElementMethods_set_bg_color$78,$ElementMethods_get_attribute$79,$ElementMethods_set_attribute$80,$ElementMethods_clear_attribute$81,$ElementMethods_each_child$82,$ElementMethods_every_child$84,$ElementMethods_find_child$87,$ElementMethods_find_descendant$88,$ElementMethods_find_descendants$90,$ElementMethods_find_ancestor$92,$ElementMethods_find_ancestors$93;Opal.def(self,'$_before_create',$ElementMethods__before_create$32=function $$_before_create(){var self=this;return nil},$ElementMethods__before_create$32.$$arity=0);Opal.def(self,'$before_create',$ElementMethods_before_create$33=function $$before_create(){var self=this;return nil},$ElementMethods_before_create$33.$$arity=0);Opal.def(self,'$create',$ElementMethods_create$34=function $$create(){var self=this;if(self.domtype==null)self.domtype=nil;if(self.parent==null)self.parent=nil;if(self.options==null)self.options=nil;if($truthy(self.domtype)){return(self.element=self.$factory().$create_element(self,self.domtype,self.parent,self.options))}else{return nil}},$ElementMethods_create$34.$$arity=0);Opal.def(self,'$_after_create',$ElementMethods__after_create$35=function $$_after_create(){var self=this;self.$update_classes();return self.$_stylize();},$ElementMethods__after_create$35.$$arity=0);Opal.def(self,'$after_create',$ElementMethods_after_create$36=function $$after_create(){var self=this;return nil},$ElementMethods_after_create$36.$$arity=0);Opal.def(self,'$style',$ElementMethods_style$37=function $$style(){var self=this,$ret_or_11=nil;if(self.style==null)self.style=nil;return(self.style=(function(){if($truthy(($ret_or_11=self.style))){return $ret_or_11}else{return $hash2([],{})};return nil;})())},$ElementMethods_style$37.$$arity=0);Opal.def(self,'$_stylize',$ElementMethods__stylize$38=function $$_stylize(){var $$39,self=this,styles=nil;styles=self.$style();if(styles.$class()['$==']($$($nesting,'Hash'))){return self.$set_attribute("style",$send(styles,'map',[],($$39=function(k,v){var self=$$39.$$s==null?this:$$39.$$s;if(k==null){k=nil;};if(v==null){v=nil;};return ""+(k)+":"+(v)+";";},$$39.$$s=self,$$39.$$arity=2,$$39)).$join())}else{return nil};},$ElementMethods__stylize$38.$$arity=0);Opal.def(self,'$cascade',$ElementMethods_cascade$40=function $$cascade(){var self=this;return nil},$ElementMethods_cascade$40.$$arity=0);Opal.def(self,'$creation',$ElementMethods_creation$41=function $$creation(){var self=this;self.$_before_create();self.$before_create();self.$create();self.$_after_create();self.$after_create();self.$_stylize();return self.$cascade();},$ElementMethods_creation$41.$$arity=0);Opal.def(self,'$add_child',$ElementMethods_add_child$42=function $$add_child(options){var self=this,new_child=nil,element_class=nil,$writer=nil;if(self.children==null)self.children=nil;if(options==null){options=$hash2([],{});};new_child=nil;if(options['$[]']("component").$to_s().$downcase().$to_sym()['$==']("unknown")){self.$raise("Unknown Component Type")}else{element_class=$$$($$($nesting,'GxG'),'Gui').$component_class(options['$[]']("component").$to_s().$downcase().$to_sym());if($truthy(element_class['$is_a?']($$$('::','Class')))){new_child=element_class.$new(self,options);$writer=[new_child.$title().$to_s().$to_sym(),new_child];$send(self.children,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object").$register_object(new_child.$title(),new_child);}else{self.$raise("Unknown Component Type")};};return new_child;},$ElementMethods_add_child$42.$$arity=-1);Opal.def(self,'$each_child',$ElementMethods_each_child$43=function $$each_child(){var $iter=$ElementMethods_each_child$43.$$p,block=$iter||nil,$$44,self=this;if(self.children==null)self.children=nil;if($iter)$ElementMethods_each_child$43.$$p=null;if($iter)$ElementMethods_each_child$43.$$p=null;;return $send(self.children.$values(),'each',[],($$44=function(the_child){var self=$$44.$$s==null?this:$$44.$$s;if(the_child==null){the_child=nil;};return block.$call(the_child);},$$44.$$s=self,$$44.$$arity=1,$$44));},$ElementMethods_each_child$43.$$arity=0);Opal.def(self,'$all_descendants',$ElementMethods_all_descendants$45=function $$all_descendants(){var $iter=$ElementMethods_all_descendants$45.$$p,block=$iter||nil,$a,$$46,self=this,entry=nil;if(self.children==null)self.children=nil;if(self.process_queue==null)self.process_queue=nil;if($iter)$ElementMethods_all_descendants$45.$$p=null;if($iter)$ElementMethods_all_descendants$45.$$p=null;;self.process_queue=self.children.$values().$clone();while($truthy($rb_gt(self.process_queue.$size(),0))){entry=self.process_queue.$shift();if($truthy(entry)){block.$call(entry);if($truthy($rb_gt(entry.$children().$values().$size(),0))){$send(entry,'each_child',[],($$46=function(the_child){var self=$$46.$$s==null?this:$$46.$$s;if(self.process_queue==null)self.process_queue=nil;if(the_child==null){the_child=nil;};return self.process_queue['$<<'](the_child);},$$46.$$s=self,$$46.$$arity=1,$$46))};};};},$ElementMethods_all_descendants$45.$$arity=0);Opal.def(self,'$forget_children',$ElementMethods_forget_children$47=function $$forget_children(){var $a,$$48,self=this,clearing_queue=nil,entry=nil;if(self.children==null)self.children=nil;clearing_queue=self.children.$values();while($truthy($rb_gt(self.$clearning_queue().$size(),0))){entry=clearing_queue.$shift();if($truthy(entry)){$send(entry.$children().$values(),'each',[],($$48=function(the_child){var self=$$48.$$s==null?this:$$48.$$s;if(the_child==null){the_child=nil;};return clearing_queue['$<<'](the_child);},$$48.$$s=self,$$48.$$arity=1,$$48));self.$page().$unregister_object(entry.$title().$to_s());};};return(self.children=$hash2([],{}));},$ElementMethods_forget_children$47.$$arity=0);Opal.def(self,'$forget_child',$ElementMethods_forget_child$49=function $$forget_child(the_title){var self=this;if(self.children==null)self.children=nil;self.$page().$unregister_object(the_title);return self.children.$delete(the_title.$to_s().$to_sym());},$ElementMethods_forget_child$49.$$arity=1);Opal.def(self,'$destroy',$ElementMethods_destroy$50=function $$destroy(){var $$51,self=this;if(self.title==null)self.title=nil;$send(self,'every_child',[],($$51=function(the_child){var self=$$51.$$s==null?this:$$51.$$s;if(the_child==null){the_child=nil;};the_child.$remove_listeners();return self.$page().$unregister_object(the_child.$title().$to_s());},$$51.$$s=self,$$51.$$arity=1,$$51));self.$remove_listeners();self.$parent().$forget_child(self.title.$to_s());self.$parent().$element().removeChild(self.$element());return true;},$ElementMethods_destroy$50.$$arity=0);Opal.def(self,'$method_missing',$ElementMethods_method_missing$52=function $$method_missing(method_name,$a){var $iter=$ElementMethods_method_missing$52.$$p,block=$iter||nil,$post_args,args,self=this;if(self.children==null)self.children=nil;if($iter)$ElementMethods_method_missing$52.$$p=null;if($iter)$ElementMethods_method_missing$52.$$p=null;;$post_args=Opal.slice.call(arguments,1,arguments.length);args=$post_args;;if($truthy(self.children['$has_key?'](method_name))){return self.children['$[]'](method_name)}else{return $send2(self,$find_super(self,'method_missing',$ElementMethods_method_missing$52,false,true),'method_missing',[method_name].concat(Opal.to_a(args)),$iter)};},$ElementMethods_method_missing$52.$$arity=-2);Opal.def(self,'$dom_id',$ElementMethods_dom_id$53=function $$dom_id(){var self=this;return self.$uuid().$to_s()},$ElementMethods_dom_id$53.$$arity=0);Opal.def(self,'$title',$ElementMethods_title$54=function $$title(){var self=this;if(self.title==null)self.title=nil;return self.title},$ElementMethods_title$54.$$arity=0);Opal.def(self,'$update_classes',$ElementMethods_update_classes$55=function $$update_classes(){var $$56,$$57,self=this,new_classes=nil,class_list=nil;if(self.element==null)self.element=nil;if(self.states==null)self.states=nil;new_classes="";class_list=(self.element.className).$split(" ");$send(class_list,'each_with_index',[],($$56=function(the_classname,indexer){var self=$$56.$$s==null?this:$$56.$$s;if(self.states==null)self.states=nil;if(the_classname==null){the_classname=nil;};if(indexer==null){indexer=nil;};if($truthy(self.states.$keys()['$include?'](the_classname.$to_s().$to_sym()))){return nil}else{new_classes=$rb_plus(new_classes,the_classname);if(the_classname['$=='](class_list.$last())){return nil}else{return(new_classes=$rb_plus(new_classes," "))};};},$$56.$$s=self,$$56.$$arity=2,$$56));if($truthy($rb_gt(self.states.$keys().$size(),0))){new_classes=$rb_plus(new_classes," ")};$send(self.states,'each_pair',[],($$57=function(the_state,the_value){var self=$$57.$$s==null?this:$$57.$$s;if(self.states==null)self.states=nil;if(the_state==null){the_state=nil;};if(the_value==null){the_value=nil;};if(the_value['$=='](true)){new_classes=$rb_plus(new_classes,the_state.$to_s());if(self.states.$keys().$last()['$=='](the_state)){return nil}else{return(new_classes=$rb_plus(new_classes," "))};}else{return nil};},$$57.$$s=self,$$57.$$arity=2,$$57));self.element.className=new_classes.$to_s();return true;},$ElementMethods_update_classes$55.$$arity=0);Opal.def(self,'$option_replace',$ElementMethods_option_replace$58=function $$option_replace(key,default$){var self=this,value=nil,$ret_or_12=nil;if(self.options==null)self.options=nil;if(default$==null){default$=nil;};value=(function(){if($truthy(($ret_or_12=self.options['$[]'](key)))){return $ret_or_12}else{return default$};return nil;})();if($truthy(self.options['$has_key?'](key))){self.options.$delete(key)};return value;},$ElementMethods_option_replace$58.$$arity=-2);Opal.def(self,'$set_state',$ElementMethods_set_state$59=function $$set_state(the_state,the_value){var self=this,$writer=nil;if(self.states==null)self.states=nil;if(the_value==null){the_value=false;};if(the_value['$=='](true)){$writer=[the_state.$to_s().$to_sym(),true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];}else{$writer=[the_state.$to_s().$to_sym(),false];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};return self.$update_classes();},$ElementMethods_set_state$59.$$arity=-2);Opal.def(self,'$set_states',$ElementMethods_set_states$60=function $$set_states(the_state_list){var $$61,self=this;if(the_state_list==null){the_state_list=$hash2([],{});};$send(the_state_list,'each_pair',[],($$61=function(the_state,the_value){var self=$$61.$$s==null?this:$$61.$$s,$writer=nil;if(self.states==null)self.states=nil;if(the_state==null){the_state=nil;};if(the_value==null){the_value=nil;};if(the_value['$=='](true)){$writer=[the_state.$to_s().$to_sym(),true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{$writer=[the_state.$to_s().$to_sym(),false];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$$61.$$s=self,$$61.$$arity=2,$$61));return self.$update_classes();},$ElementMethods_set_states$60.$$arity=-1);Opal.def(self,'$get_state',$ElementMethods_get_state$62=function $$get_state(the_state){var self=this,$ret_or_13=nil;if(self.states==null)self.states=nil;if($truthy(($ret_or_13=self.states['$[]'](the_state.$to_s().$to_sym())))){return $ret_or_13}else{return false}},$ElementMethods_get_state$62.$$arity=1);Opal.def(self,'$get_states',$ElementMethods_get_states$63=function $$get_states(){var self=this;if(self.states==null)self.states=nil;return self.states},$ElementMethods_get_states$63.$$arity=0);Opal.def(self,'$toggle_state',$ElementMethods_toggle_state$64=function $$toggle_state(the_state){var self=this;return self.$set_state(the_state,self.$get_state(the_state)['$!']())},$ElementMethods_toggle_state$64.$$arity=1);Opal.def(self,'$state_active?',$ElementMethods_state_active$ques$65=function(the_state){var self=this;if(self.states==null)self.states=nil;return self.states.$keys()['$include?'](the_state.$to_s().$to_sym())},$ElementMethods_state_active$ques$65.$$arity=1);Opal.def(self,'$add_states',$ElementMethods_add_states$66=function $$add_states(states){var $$67,self=this;return $send(states,'each',[],($$67=function(state){var self=$$67.$$s==null?this:$$67.$$s;if(state==null){state=nil;};return self.$add_state(state);},$$67.$$s=self,$$67.$$arity=1,$$67))},$ElementMethods_add_states$66.$$arity=1);Opal.def(self,'$add_state',$ElementMethods_add_state$68=function $$add_state(state,value){var self=this;if(value==null){value=false;};return self.$set_state(state,value);},$ElementMethods_add_state$68.$$arity=-2);Opal.def(self,'$value',$ElementMethods_value$69=function $$value(){var self=this;if(self.element==null)self.element=nil;return self.element.innerHTML},$ElementMethods_value$69.$$arity=0);Opal.def(self,'$get_text',$ElementMethods_get_text$70=function $$get_text(){var self=this;if(self.element==null)self.element=nil;return self.element.textContent},$ElementMethods_get_text$70.$$arity=0);Opal.def(self,'$value=',$ElementMethods_value$eq$71=function(value){var self=this;if(self.element==null)self.element=nil;return self.element.value=value},$ElementMethods_value$eq$71.$$arity=1);Opal.def(self,'$set_text',$ElementMethods_set_text$72=function $$set_text(value){var self=this;if(self.element==null)self.element=nil;return self.element.textContent=value},$ElementMethods_set_text$72.$$arity=1);Opal.def(self,'$html',$ElementMethods_html$73=function $$html(raw_html){var self=this;if(self.element==null)self.element=nil;return self.element.innerHTML=raw_html},$ElementMethods_html$73.$$arity=1);Opal.def(self,'$set_style',$ElementMethods_set_style$74=function $$set_style(the_style){var $$75,self=this,new_style=nil;if(self.element==null)self.element=nil;if(the_style==null){the_style=$hash2([],{});};new_style="";if($truthy(the_style['$is_a?']($$$('::','Hash')))){$send(the_style,'each_pair',[],($$75=function(property,value){var self=$$75.$$s==null?this:$$75.$$s;if(property==null){property=nil;};if(value==null){value=nil;};return(new_style=$rb_plus($rb_plus(new_style,""+(property.$to_s())+": "),""+(value.$to_s())+";"));},$$75.$$s=self,$$75.$$arity=2,$$75));self.element.setAttribute("style",new_style);;return true;}else{return false};},$ElementMethods_set_style$74.$$arity=-1);Opal.def(self,'$merge_style',$ElementMethods_merge_style$76=function $$merge_style(the_style){var $$77,self=this;if(the_style==null){the_style=$hash2([],{});};if($truthy(the_style['$is_a?']($$$('::','Hash')))){$send(the_style,'each_pair',[],($$77=function(property,value){var self=$$77.$$s==null?this:$$77.$$s;if(property==null){property=nil;};if(value==null){value=nil;};return self.$element().style[property]=value.$to_s();},$$77.$$s=self,$$77.$$arity=2,$$77));return true;}else{return false};},$ElementMethods_merge_style$76.$$arity=-1);Opal.def(self,'$set_bg_color',$ElementMethods_set_bg_color$78=function $$set_bg_color(the_color){var self=this;if(the_color==null){the_color=0;};return self.$merge_style($hash2(["background-color"],{"background-color":""+"#"+(the_color.$to_s())}));},$ElementMethods_set_bg_color$78.$$arity=-1);Opal.def(self,'$get_attribute',$ElementMethods_get_attribute$79=function $$get_attribute(the_attribute){var self=this,result=nil,the_element=nil,the_value=nil;if(the_attribute==null){the_attribute=nil;};result="";if($truthy(the_attribute)){the_element=self.$element();the_value=nil;if(the_element.getAttributeNames().includes(the_attribute)){if(the_element.getAttribute(the_attribute)!=null){the_value=the_element.getAttribute(the_attribute);}else{the_value=true;};};;result=the_value.$to_s();};return result;},$ElementMethods_get_attribute$79.$$arity=-1);Opal.def(self,'$set_attribute',$ElementMethods_set_attribute$80=function $$set_attribute(the_attribute,the_value){var self=this,result=nil;if(the_attribute==null){the_attribute=nil;};if(the_value==null){the_value=nil;};result=false;if($truthy(the_attribute)){if($truthy(the_value)){result=self.$element().setAttribute(the_attribute,the_value)}else{result=self.$element().setAttribute(the_attribute,null)}};return result;},$ElementMethods_set_attribute$80.$$arity=-1);Opal.def(self,'$clear_attribute',$ElementMethods_clear_attribute$81=function $$clear_attribute(the_attribute){var self=this,result=nil;if(the_attribute==null){the_attribute=nil;};result=false;if($truthy(the_attribute)){self.$element().removeAttribute(the_attribute);result=true;};return result;},$ElementMethods_clear_attribute$81.$$arity=-1);Opal.def(self,'$each_child',$ElementMethods_each_child$82=function $$each_child(){var $iter=$ElementMethods_each_child$82.$$p,block=$iter||nil,$$83,self=this;if(self.children==null)self.children=nil;if($iter)$ElementMethods_each_child$82.$$p=null;if($iter)$ElementMethods_each_child$82.$$p=null;;if($truthy(block['$respond_to?']("call"))){return $send(self.children.$values(),'each',[],($$83=function(the_child){var self=$$83.$$s==null?this:$$83.$$s;if(the_child==null){the_child=nil;};return block.$call(the_child);},$$83.$$s=self,$$83.$$arity=1,$$83))}else{return self.children.$values().$each()};},$ElementMethods_each_child$82.$$arity=0);Opal.def(self,'$every_child',$ElementMethods_every_child$84=function $$every_child(){var $iter=$ElementMethods_every_child$84.$$p,block=$iter||nil,$a,$$85,$$86,self=this,child_manifest=nil,build_queue=nil,entry=nil;if($iter)$ElementMethods_every_child$84.$$p=null;if($iter)$ElementMethods_every_child$84.$$p=null;;child_manifest=[];build_queue=[self];while($truthy($rb_gt(build_queue.$size(),0))){entry=build_queue.$shift();if($truthy(entry)){if($truthy($rb_gt(entry.$children().$keys().$size(),0))){$send(entry.$children().$values(),'each',[],($$85=function(the_child){var self=$$85.$$s==null?this:$$85.$$s;if(the_child==null){the_child=nil;};child_manifest['$<<'](the_child);if($truthy($rb_gt(the_child.$children().$keys().$size(),0))){return build_queue['$<<'](the_child)}else{return nil};},$$85.$$s=self,$$85.$$arity=1,$$85))}};};if($truthy(block['$respond_to?']("call"))){return $send(child_manifest,'each',[],($$86=function(the_child){var self=$$86.$$s==null?this:$$86.$$s;if(the_child==null){the_child=nil;};return block.$call(the_child);},$$86.$$s=self,$$86.$$arity=1,$$86))}else{return child_manifest.$values().$each()};},$ElementMethods_every_child$84.$$arity=0);Opal.def(self,'$find_child',$ElementMethods_find_child$87=function $$find_child(the_reference){var $a,self=this,result=nil,search_queue=nil,entry=nil,$ret_or_14=nil,$ret_or_15=nil,$ret_or_16=nil,$ret_or_17=nil;if(the_reference==null){the_reference=nil;};result=nil;search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy((function(){if($truthy(($ret_or_14=(function(){if($truthy(($ret_or_15=(function(){if($truthy(($ret_or_16=(function(){if($truthy(($ret_or_17=entry.$uuid()['$=='](the_reference)))){return $ret_or_17}else{return entry.$title()['$=='](the_reference)};return nil;})()))){return $ret_or_16}else{return entry.$component()['$=='](the_reference)};return nil;})()))){return $ret_or_15}else{return entry.$class()['$=='](the_reference)};return nil;})()))){return $ret_or_14}else{return entry.$domtype()['$=='](the_reference)};return nil;})())){result=entry;break;;}};};return result;},$ElementMethods_find_child$87.$$arity=-1);Opal.def(self,'$find_descendant',$ElementMethods_find_descendant$88=function $$find_descendant(the_reference){var $a,$$89,self=this,result=nil,search_queue=nil,entry=nil,$ret_or_18=nil,$ret_or_19=nil,$ret_or_20=nil,$ret_or_21=nil;if(the_reference==null){the_reference=nil;};result=nil;search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy((function(){if($truthy(($ret_or_18=(function(){if($truthy(($ret_or_19=(function(){if($truthy(($ret_or_20=(function(){if($truthy(($ret_or_21=entry.$uuid()['$=='](the_reference)))){return $ret_or_21}else{return entry.$title()['$=='](the_reference)};return nil;})()))){return $ret_or_20}else{return entry.$component()['$=='](the_reference)};return nil;})()))){return $ret_or_19}else{return entry.$class()['$=='](the_reference)};return nil;})()))){return $ret_or_18}else{return entry.$domtype()['$=='](the_reference)};return nil;})())){result=entry;break;;};if($truthy(result)){}else{$send(entry.$children().$values(),'each',[],($$89=function(the_child){var self=$$89.$$s==null?this:$$89.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$89.$$s=self,$$89.$$arity=1,$$89))};};};return result;},$ElementMethods_find_descendant$88.$$arity=-1);Opal.def(self,'$find_descendants',$ElementMethods_find_descendants$90=function $$find_descendants(the_reference){var $a,$$91,self=this,result=nil,search_queue=nil,entry=nil,$ret_or_22=nil,$ret_or_23=nil,$ret_or_24=nil,$ret_or_25=nil;if(the_reference==null){the_reference=nil;};result=[];search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy((function(){if($truthy(($ret_or_22=(function(){if($truthy(($ret_or_23=(function(){if($truthy(($ret_or_24=(function(){if($truthy(($ret_or_25=entry.$uuid()['$=='](the_reference)))){return $ret_or_25}else{return entry.$title()['$=='](the_reference)};return nil;})()))){return $ret_or_24}else{return entry.$component()['$=='](the_reference)};return nil;})()))){return $ret_or_23}else{return entry.$class()['$=='](the_reference)};return nil;})()))){return $ret_or_22}else{return entry.$domtype()['$=='](the_reference)};return nil;})())){result['$<<'](entry)};$send(entry.$children().$values(),'each',[],($$91=function(the_child){var self=$$91.$$s==null?this:$$91.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$91.$$s=self,$$91.$$arity=1,$$91));};};return result;},$ElementMethods_find_descendants$90.$$arity=-1);Opal.def(self,'$find_ancestor',$ElementMethods_find_ancestor$92=function $$find_ancestor(the_reference){var $a,self=this,result=nil,search_queue=nil,entry=nil,$ret_or_26=nil,$ret_or_27=nil,$ret_or_28=nil,$ret_or_29=nil;if(the_reference==null){the_reference=nil;};result=nil;search_queue=[self.$parent()];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy((function(){if($truthy(($ret_or_26=(function(){if($truthy(($ret_or_27=(function(){if($truthy(($ret_or_28=(function(){if($truthy(($ret_or_29=entry.$uuid()['$=='](the_reference)))){return $ret_or_29}else{return entry.$title()['$=='](the_reference)};return nil;})()))){return $ret_or_28}else{return entry.$component()['$=='](the_reference)};return nil;})()))){return $ret_or_27}else{return entry.$class()['$=='](the_reference)};return nil;})()))){return $ret_or_26}else{return entry.$domtype()['$=='](the_reference)};return nil;})())){result=entry;break;;}else if(entry.$component()['$==']("page")){}else{search_queue['$<<'](entry.$parent())}};};return result;},$ElementMethods_find_ancestor$92.$$arity=-1);return(Opal.def(self,'$find_ancestors',$ElementMethods_find_ancestors$93=function $$find_ancestors(the_reference){var $a,self=this,result=nil,search_queue=nil,entry=nil,$ret_or_30=nil,$ret_or_31=nil,$ret_or_32=nil,$ret_or_33=nil;if(the_reference==null){the_reference=nil;};result=[];search_queue=[self.$parent()];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy((function(){if($truthy(($ret_or_30=(function(){if($truthy(($ret_or_31=(function(){if($truthy(($ret_or_32=(function(){if($truthy(($ret_or_33=entry.$uuid()['$=='](the_reference)))){return $ret_or_33}else{return entry.$title()['$=='](the_reference)};return nil;})()))){return $ret_or_32}else{return entry.$component()['$=='](the_reference)};return nil;})()))){return $ret_or_31}else{return entry.$class()['$=='](the_reference)};return nil;})()))){return $ret_or_30}else{return entry.$domtype()['$=='](the_reference)};return nil;})())){result['$<<'](entry)};if(entry.$component()['$==']("page")){}else{search_queue['$<<'](entry.$parent())};};};return result;},$ElementMethods_find_ancestors$93.$$arity=-1),nil)&&'find_ancestors';})($nesting[0],$nesting);(function($base,$parent_nesting){var self=$module($base,'EventHandlers');var $nesting=[self].concat($parent_nesting),$EventHandlers_on$94,$EventHandlers_remove_listener$95,$EventHandlers_remove_listeners$96,$EventHandlers_event_handler$98,$EventHandlers_set_script$99;Opal.const_set($nesting[0],'EVENT_TYPES',["abort","afterprint","animatedend","animationiteration","animationstart","beforeprint","beforeunload","blur","canplay","canplaythrough","change","click","contextmenu","copy","cut","dblclick","drag","dragend","dragcenter","dragleave","dragover","dragstart","drop","durationchange","ended","error","focus","focusin","focusout","fullscreenchange","fullscreenerror","hashchange","input","invalid","keydown","keypress","keyup","load","loadeddata","loadedmetadata","loadstart","message","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","offline","online","open","pagehide","pageshow","paste","play","playing","popstate","progress","ratechange","resize","reset","scroll","search","seeked","select","show","stalled","storage","submit","suspend","timeupdate","toggle","touchcancel","touchend","touchmove","touchstart","transitionend","unload","volumechange","waiting","wheel"]);Opal.const_set($nesting[0],'EVENT_GENRES',$hash2(["click","contextmenu","dblclick","mouseenter","mouseleave","mouseover","mouseup","mousedown","mousemove","mouseout","keydown","keypress","keyup","touchcancel","touchmove","touchstart","touchend","animationstart","animationend","animationiteration","animationpause","animationresume","animationstop","input","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","wheel","abort","beforeunload","error","load","resize","scroll","select","unload","blur","focus","focusin","focusout","afterprint","beforeprint","canplay","canplaythrough","change","fullscreenchange","fullscreenerror","invalid","loadeddata","loadedmetadata","message","offline","online","open","close","pause","play","playing","progress","changerate","reset","search","seek","seeking","show","hide","stalled","submit","suspend","timeupdate","toggle","waiting","copy","cut","paste","pagehide","pageshow","popstate","loadstart","storage","credentialchanged"],{"click":"mouse","contextmenu":"mouse","dblclick":"mouse","mouseenter":"mouse","mouseleave":"mouse","mouseover":"mouse","mouseup":"mouse","mousedown":"mouse","mousemove":"mouse","mouseout":"mouse","keydown":"keyboard","keypress":"keyboard","keyup":"keyboard","touchcancel":"touch","touchmove":"touch","touchstart":"touch","touchend":"touch","animationstart":"animation","animationend":"animation","animationiteration":"animation","animationpause":"animation","animationresume":"animation","animationstop":"animation","input":"input","drag":"drag","dragend":"drag","dragenter":"drag","dragleave":"drag","dragover":"drag","dragstart":"drag","drop":"drag","wheel":"wheel","abort":"ui","beforeunload":"ui","error":"ui","load":"ui","resize":"ui","scroll":"ui","select":"ui","unload":"ui","blur":"focus","focus":"focus","focusin":"focus","focusout":"focus","afterprint":"event","beforeprint":"event","canplay":"event","canplaythrough":"event","change":"event","fullscreenchange":"event","fullscreenerror":"event","invalid":"event","loadeddata":"event","loadedmetadata":"event","message":"event","offline":"event","online":"event","open":"event","close":"event","pause":"event","play":"event","playing":"event","progress":"event","changerate":"event","reset":"event","search":"event","seek":"event","seeking":"event","show":"event","hide":"event","stalled":"event","submit":"event","suspend":"event","timeupdate":"event","toggle":"event","waiting":"event","copy":"clipboard","cut":"clipboard","paste":"clipboard","pagehide":"transition","pageshow":"transition","popstate":"history","loadstart":"progress","storage":"storage","credentialchanged":"ui"}));Opal.const_set($nesting[0],'EVENT_FIELDS',$hash2(["mouse","keyboard","touch","animation","input","drag","wheel","ui","focus","event","transition","history","progress","storage","clipboard"],{"mouse":["altKey","button","buttons","clientX","clientY","ctrlKey","metaKey","movementX","movementY","offsetX","offsetY","pageX","pageY","screenX","screenY","shiftKey","which","detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"keyboard":["altKey","charCode","code","ctrlKey","metaKey","isComposing","key","keyCode","location","shift","repeat","shiftKey","which","detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"touch":["altKey","ctrlKey","metaKey","shiftKey","detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"animation":["animationName","elapsedTime","pseudoElement","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"input":["data","inputType","isComposing","detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"drag":["dataTranser","altKey","button","buttons","clientX","clientY","ctrlKey","metaKey","movementX","movementY","offsetX","offsetY","pageX","pageY","screenX","screenY","shiftKey","which","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"wheel":["deltaX","deltaY","deltaZ","deltaMode","altKey","button","buttons","clientX","clientY","ctrlKey","metaKey","movementX","movementY","offsetX","offsetY","pageX","pageY","screenX","screenY","shiftKey","which","detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"ui":["detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"focus":["relatedTarget","detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"event":["bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"transition":["persisted","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"history":["state","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"progress":["lengthComputable","loaded","total","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"storage":["key","newValue","oldValue","storageArea","url","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"clipboard":["clipboardData","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"]}));Opal.def(self,'$on',$EventHandlers_on$94=function $$on(the_event_type,captured){var $iter=$EventHandlers_on$94.$$p,block=$iter||nil,self=this,result=nil,$writer=nil;if(self.event_handlers==null)self.event_handlers=nil;if(self.event_listeners==null)self.event_listeners=nil;if($iter)$EventHandlers_on$94.$$p=null;if($iter)$EventHandlers_on$94.$$p=null;;if(the_event_type==null){the_event_type=nil;};if(captured==null){captured=false;};result=false;if($truthy(self.event_handlers['$is_a?']($$$('::','Hash')))){}else{self.event_handlers=$hash2([],{});self.event_listeners=$hash2([],{});};if($truthy(the_event_type['$is_any?']($$$('::','String'),$$$('::','Symbol')))){if($truthy(block['$respond_to?']("call"))){$writer=[the_event_type.$to_s().$downcase().$to_sym(),block];$send(self.event_handlers,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=[the_event_type.$to_s().$downcase().$to_sym(),self.$method("event_handler").$to_proc()];$send(self.event_listeners,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.$element().addEventListener(the_event_type.$to_s().$downcase(),self.event_listeners['$[]'](the_event_type.$to_s().$downcase().$to_sym()),captured);result=true;}};return result;},$EventHandlers_on$94.$$arity=-1);Opal.def(self,'$remove_listener',$EventHandlers_remove_listener$95=function $$remove_listener(the_event_type){var self=this,$ret_or_34=nil;if(self.event_handlers==null)self.event_handlers=nil;if(self.event_listeners==null)self.event_listeners=nil;if(the_event_type==null){the_event_type=nil;};if($truthy((function(){if($truthy(($ret_or_34=self.event_handlers['$[]'](the_event_type.$to_s().$downcase().$to_sym())))){return self.event_listeners['$[]'](the_event_type.$to_s().$downcase().$to_sym())}else{return $ret_or_34};return nil;})())){self.$element().removeEventListener(the_event_type.$to_s().$downcase(),self.event_listeners['$[]'](the_event_type.$to_s().$downcase().$to_sym()));;self.event_handlers.$delete(the_event_type.$to_s().$downcase().$to_sym());self.event_listeners.$delete(the_event_type.$to_s().$downcase().$to_sym());};return true;},$EventHandlers_remove_listener$95.$$arity=-1);Opal.def(self,'$remove_listeners',$EventHandlers_remove_listeners$96=function $$remove_listeners(){var $$97,self=this;if(self.event_handlers==null)self.event_handlers=nil;$send(self.event_handlers.$keys().$clone(),'each',[],($$97=function(the_event_type){var self=$$97.$$s==null?this:$$97.$$s;if(the_event_type==null){the_event_type=nil;};return self.$remove_listener(the_event_type);},$$97.$$s=self,$$97.$$arity=1,$$97));return true;},$EventHandlers_remove_listeners$96.$$arity=0);Opal.def(self,'$event_handler',$EventHandlers_event_handler$98=function $$event_handler(the_event){var self=this,the_type=nil,event_record=nil,genre=nil,$ret_or_35=nil,fields=nil;if(self.event_handlers==null)self.event_handlers=nil;the_type=(the_event.type).$to_s().$downcase().$to_sym();event_record=$hash2([],{});if($truthy(self.event_handlers['$[]'](the_type))){genre=(function(){if($truthy(($ret_or_35=$$$($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'EventHandlers'),'EVENT_GENRES')['$[]'](the_type)))){return $ret_or_35}else{return "event"};return nil;})();if($truthy(genre)){fields=$$$($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'EventHandlers'),'EVENT_FIELDS')['$[]'](genre);if($truthy(fields)){serializer=function thisOne(e){if(e){var o={eventName:e.toString(),altKey:e.altKey,bubbles:e.bubbles,button:e.button,buttons:e.buttons,cancelBubble:e.cancelBubble,cancelable:e.cancelable,clientX:e.clientX,clientY:e.clientY,composed:e.composed,ctrlKey:e.ctrlKey,currentTarget:e.currentTarget?e.currentTarget.outerHTML:null,defaultPrevented:e.defaultPrevented,detail:e.detail,eventPhase:e.eventPhase,fromElement:e.fromElement?e.fromElement.outerHTML:null,isTrusted:e.isTrusted,layerX:e.layerX,layerY:e.layerY,metaKey:e.metaKey,movementX:e.movementX,movementY:e.movementY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,relatedTarget:e.relatedTarget?e.relatedTarget.outerHTML:null,returnValue:e.returnValue,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey,sourceCapabilities:e.sourceCapabilities?e.sourceCapabilities.toString():null,target:e.target?e.target.outerHTML:null,timeStamp:e.timeStamp,toElement:e.toElement?e.toElement.outerHTML:null,type:e.type,view:e.view?e.view.toString():null,which:e.which,x:e.x,y:e.y};return o;};};event_record=JSON.stringify(serializer(the_event));;event_record=$$$('::','JSON').$parse(event_record.$to_s(),$hash2(["symbolize_names"],{"symbolize_names":true}));};};return self.event_handlers['$[]'](the_type).$call(event_record);}else{return nil};},$EventHandlers_event_handler$98.$$arity=1);return(Opal.def(self,'$set_script',$EventHandlers_set_script$99=function $$set_script(the_script_body,alternate_target){var self=this,result=nil,the_error=nil;if(the_script_body==null){the_script_body="";};if(alternate_target==null){alternate_target=nil;};result=false;if($truthy($rb_gt(the_script_body.$size(),0))){try{if($truthy(the_script_body['$base64?']())){the_script_body=the_script_body.$decode64()};if($truthy(alternate_target)){alternate_target.$remove_listeners();alternate_target.$instance_eval(the_script_body);}else{self.$remove_listeners();self.$instance_eval(the_script_body);};result=true;}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) -try{self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":$hash2(["script"],{"script":the_script_body})}))}finally{Opal.pop_exception();}}else{throw $err;}};};return result;},$EventHandlers_set_script$99.$$arity=-1),nil)&&'set_script';})($nesting[0],$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Animation');var $nesting=[self].concat($parent_nesting),$Animation_initialize$100,$Animation_update_targets$102,$Animation_update_origin$103,$Animation_update_destination$104,$Animation_update_options$105,$Animation_uuid$107,$Animation_compile$108,$Animation_start$119,$Animation_stop$121,$Animation_pause$123,$Animation_resume$125,$Animation_included$127,$Animation_each_included$129,$Animation_broadcast$131;self.$$prototype.uuid=self.$$prototype.target_list=self.$$prototype.targets=self.$$prototype.origin=self.$$prototype.destination=self.$$prototype.options=self.$$prototype.tweens=nil;self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'EventHandlers'));Opal.def(self,'$initialize',$Animation_initialize$100=function $$initialize(details,the_uuid){var $$101,self=this,the_options=nil,callback_map=nil,$ret_or_36=nil;if(details==null){details=$hash2([],{});};if(the_uuid==null){the_uuid=nil;};self.event_handlers=$hash2([],{});self.event_listeners=$hash2([],{});if($truthy(details['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(details['$[]']("origin"))){if($truthy(details['$[]']("origin")['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.origin=details['$[]']("origin").$unpersist()}else{self.origin=details['$[]']("origin")}}else{self.origin=nil};if($truthy(details['$[]']("destination"))){}else{self.$raise($$($nesting,'ArgumentError'),"You MUST provide a :destination state for the object.")};if($truthy(details['$[]']("destination")['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.destination=details['$[]']("destination").$unpersist()}else{self.destination=details['$[]']("destination")};if($truthy(details['$[]']("options"))){self.options=$hash2([],{});if($truthy(details['$[]']("options")['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){the_options=details['$[]']("options").$unpersist()}else{the_options=details['$[]']("options")};callback_map=$hash2(["animationstart","animationend","animationiteration","animationstop","animationpause","animationresume"],{"animationstart":"start","animationend":"complete","animationiteration":"update","animationstop":"stop","animationpause":"pause","animationresume":"resume"});$send(the_options,'each_pair',[],($$101=function(the_key,the_value){var self=$$101.$$s==null?this:$$101.$$s,$writer=nil;if(self.event_handlers==null)self.event_handlers=nil;if(self.options==null)self.options=nil;if(the_key==null){the_key=nil;};if(the_value==null){the_value=nil;};if($truthy(callback_map.$keys()['$include?'](the_key))){if($truthy(the_value['$respond_to?']("call"))){$writer=[the_key,the_value];$send(self.event_handlers,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=[the_key,the_value];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;}else{return self.$log_warn(""+"Attempted to pass an invalid object as an event handler. "+(the_key.$inspect())+" --> "+(the_value.$inspect()))}}else{$writer=[the_key,the_value];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$$101.$$s=self,$$101.$$arity=2,$$101));}else{self.options=nil};if($truthy(details['$[]']("targets"))){}else{self.$raise($$($nesting,'ArgumentError'),"You MUST provide a one or more :targets.")};if($truthy(details['$[]']("targets")['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.target_list=details['$[]']("targets").$unpersist()}else{self.target_list=details['$[]']("targets")};};self.uuid=(function(){if($truthy(($ret_or_36=the_uuid))){return $ret_or_36}else{return $$$('::','GxG').$uuid_generate()};return nil;})().$to_s().$to_sym();self.targets=nil;self.tweens=[];return self;},$Animation_initialize$100.$$arity=-1);Opal.def(self,'$update_targets',$Animation_update_targets$102=function $$update_targets(data){var self=this,result=nil;if(data==null){data=nil;};result=false;if($truthy(data['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(data['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.target_list=data.$unpersist()}else{self.target_list=data};result=true;};return result;},$Animation_update_targets$102.$$arity=-1);Opal.def(self,'$update_origin',$Animation_update_origin$103=function $$update_origin(data){var self=this,result=nil;if(data==null){data=nil;};result=false;if($truthy(data['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(data['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.origin=data.$unpersist()}else{self.origin=data};result=true;};return result;},$Animation_update_origin$103.$$arity=-1);Opal.def(self,'$update_destination',$Animation_update_destination$104=function $$update_destination(data){var self=this,result=nil;if(data==null){data=nil;};result=false;if($truthy(data['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(data['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.destination=data.$unpersist()}else{self.destination=data};result=true;};return result;},$Animation_update_destination$104.$$arity=-1);Opal.def(self,'$update_options',$Animation_update_options$105=function $$update_options(data){var $$106,self=this,result=nil,the_options=nil,callback_map=nil;if(data==null){data=nil;};result=false;if($truthy(data['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(data['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){the_options=data.$unpersist()}else{the_options=data};self.options=$hash2([],{});callback_map=$hash2(["animationstart","animationend","animationiteration","animationstop","animationpause","animationresume"],{"animationstart":"start","animationend":"complete","animationiteration":"update","animationstop":"stop","animationpause":"pause","animationresume":"resume"});$send(the_options,'each_pair',[],($$106=function(the_key,the_value){var self=$$106.$$s==null?this:$$106.$$s,$writer=nil;if(self.event_handlers==null)self.event_handlers=nil;if(self.options==null)self.options=nil;if(the_key==null){the_key=nil;};if(the_value==null){the_value=nil;};if($truthy(callback_map.$keys()['$include?'](the_key))){if($truthy(the_value['$respond_to?']("call"))){$writer=[the_key,the_value];$send(self.event_handlers,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=[the_key,the_value];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;}else{return self.$log_warn(""+"Attempted to pass an invalid object as an event handler. "+(the_key.$inspect())+" --> "+(the_value.$inspect()))}}else{$writer=[the_key,the_value];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$$106.$$s=self,$$106.$$arity=2,$$106));result=true;};return result;},$Animation_update_options$105.$$arity=-1);Opal.def(self,'$uuid',$Animation_uuid$107=function $$uuid(){var self=this;return self.uuid},$Animation_uuid$107.$$arity=0);Opal.def(self,'$compile',$Animation_compile$108=function $$compile(){var $$109,$$114,$$115,$$116,$$117,$$118,self=this,result=nil,native_targets=nil,from_state=nil,to_state=nil,options=nil,callback_map=nil,the_error=nil;result=false;try{self.targets=[];native_targets=[];$send(self.target_list.$keys(),'each',[],($$109=function(the_method){var self=$$109.$$s==null?this:$$109.$$s,$$110,$$112,$$113;if(self.target_list==null)self.target_list=nil;if(the_method==null){the_method=nil;};if(the_method['$==']("class")){if($truthy(self.target_list['$[]']("class")['$is_a?']($$$('::','String')))){}else{self.$raise($$($nesting,'Exception'),""+"You MUST provide :class target as a String, not: "+(self.target_list['$[]']("class").$class().$inspect()))};$send(self.target_list['$[]']("class").$split(" "),'each',[],($$110=function(the_classname){var self=$$110.$$s==null?this:$$110.$$s,$$111,found_list=nil,found_length=nil;if(the_classname==null){the_classname=nil;};if($truthy($rb_gt(the_classname.$size(),0))){found_list=document.getElementsByClassName(the_classname);found_length=(found_list.length).$to_i();if($truthy($rb_gt(found_length,0))){return $send(Opal.Range.$new(0,$rb_minus(found_length,1),false),'each',[],($$111=function(the_index){var self=$$111.$$s==null?this:$$111.$$s,the_element=nil;if(self.targets==null)self.targets=nil;if(the_index==null){the_index=nil;};the_element=found_list.item(the_index);if($truthy(self.targets['$include?'](the_element))){return nil}else{return self.targets['$<<'](the_element)};},$$111.$$s=self,$$111.$$arity=1,$$111))}else{return nil};}else{return nil};},$$110.$$s=self,$$110.$$arity=1,$$110));};if(the_method['$==']("objects")){if($truthy(self.target_list['$[]']("objects")['$is_a?']($$$('::','Array')))){}else{self.$raise($$($nesting,'Exception'),""+"You MUST provide :object target list as an Array, not: "+(self.target_list['$[]']("objects").$class().$inspect()))};$send(self.target_list['$[]']("objects"),'each',[],($$112=function(the_reference){var self=$$112.$$s==null?this:$$112.$$s,found_object=nil,element_id=nil,found_element=nil;if(self.targets==null)self.targets=nil;if(the_reference==null){the_reference=nil;};found_object=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$find_object(the_reference.$to_s().$to_sym());if($truthy(found_object)){element_id=found_object.$element().attributes.getNamedItem('id')||0;if($truthy(element_id==0)){return nil}else{found_element=document.getElementById(element_id);if($truthy(found_element)){if($truthy(self.targets['$include?'](found_element))){return nil}else{return self.targets['$<<'](found_element)}}else{return nil};};}else{return nil};},$$112.$$s=self,$$112.$$arity=1,$$112));};if(the_method['$==']("elements")){if($truthy(self.target_list['$[]']("elements")['$is_a?']($$$('::','Array')))){}else{self.$raise($$($nesting,'Exception'),""+"You MUST provide :elements target list as an Array, not: "+(self.target_list['$[]']("elements").$class().$inspect()))};$send(self.target_list['$[]']("elements"),'each',[],($$113=function(the_element){var self=$$113.$$s==null?this:$$113.$$s,element_id=nil,found_element=nil;if(self.targets==null)self.targets=nil;if(the_element==null){the_element=nil;};element_id=the_element.attributes.getNamedItem('id')||0;if($truthy(element_id==0)){return nil}else{element_id=element_id.value;found_element=document.getElementById(element_id);if($truthy(found_element)){if($truthy(self.targets['$include?'](found_element))){return nil}else{return self.targets['$<<'](found_element)}}else{return nil};};},$$113.$$s=self,$$113.$$arity=1,$$113));};if(the_method['$==']("assets")){return nil}else{return nil};},$$109.$$s=self,$$109.$$arity=1,$$109));if($truthy($rb_gt(self.targets.$size(),0))){}else{self.$puts("No valid targets resulted.")};$send(self.targets,'each',[],($$114=function(the_element){var self=$$114.$$s==null?this:$$114.$$s;if(the_element==null){the_element=nil;};return native_targets.push(the_element);},$$114.$$s=self,$$114.$$arity=1,$$114));if($truthy(self.origin['$is_a?']($$$('::','Hash')))){if($truthy($rb_gt(self.origin.$size(),0))){from_state=$hash2([],{});$send(self.origin,'each_pair',[],($$115=function(the_key,the_value){var self=$$115.$$s==null?this:$$115.$$s,$ret_or_37=nil,new_key=nil,$writer=nil;if(the_key==null){the_key=nil;};if(the_value==null){the_value=nil;};if($truthy((function(){if($truthy(($ret_or_37=the_key['$==']("attribue")))){return $ret_or_37}else{return the_key['$==']("attribute")};return nil;})())){new_key="attr"}else{new_key=the_key};$writer=[new_key,the_value];$send(from_state,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$$115.$$s=self,$$115.$$arity=2,$$115));}else{from_state=nil}}else{from_state=nil};if($truthy($rb_gt(self.destination.$size(),0))){to_state=$hash2([],{});$send(self.destination,'each_pair',[],($$116=function(the_key,the_value){var self=$$116.$$s==null?this:$$116.$$s,$ret_or_38=nil,new_key=nil,$writer=nil;if(the_key==null){the_key=nil;};if(the_value==null){the_value=nil;};if($truthy((function(){if($truthy(($ret_or_38=the_key['$==']("attribue")))){return $ret_or_38}else{return the_key['$==']("attribute")};return nil;})())){new_key="attr"}else{new_key=the_key};$writer=[new_key,the_value];$send(to_state,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$$116.$$s=self,$$116.$$arity=2,$$116));}else{self.$raise($$($nesting,'Exception'),""+"You MUST define a valid :destination state. not: "+(self.destination.$inspect()))};if($truthy(self.options['$is_a?']($$$('::','Hash')))){if($truthy($rb_gt(self.options.$size(),0))){options=$hash2([],{});callback_map=$hash2(["animationstart","animationend","animationiteration","animationstop","animationpause","animationresume"],{"animationstart":"start","animationend":"complete","animationiteration":"update","animationstop":"stop","animationpause":"pause","animationresume":"resume"});$send(self.options,'each_pair',[],($$117=function(the_key,the_value){var self=$$117.$$s==null?this:$$117.$$s,new_key=nil,$writer=nil;if(self.event_handlers==null)self.event_handlers=nil;if(the_key==null){the_key=nil;};if(the_value==null){the_value=nil;};if($truthy(callback_map.$keys()['$include?'](the_key))){new_key=callback_map['$[]'](the_key);if($truthy(self.event_handlers['$[]'](the_key)['$respond_to?']("call"))){$writer=[new_key,self.event_handlers['$[]'](the_key)];$send(options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};}else if($truthy(["start_time"]['$include?'](the_key))){return nil}else{$writer=[the_key,the_value];$send(options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$$117.$$s=self,$$117.$$arity=2,$$117));}else{options=nil}}else{options=nil};self.tweens=[];$send(self.targets,'each',[],($$118=function(the_target){var self=$$118.$$s==null?this:$$118.$$s;if(self.tweens==null)self.tweens=nil;if(the_target==null){the_target=nil;};if($truthy(from_state)){if($truthy(options)){return self.tweens['$<<'](KUTE.fromTo(the_target,from_state.$to_n(),to_state.$to_n(),options.$to_n()))}else{return self.tweens['$<<'](KUTE.fromTo(the_target,from_state.$to_n(),to_state.$to_n()))}}else if($truthy(options)){return self.tweens['$<<'](KUTE.to(the_target,to_state.$to_n(),options.$to_n()))}else{return self.tweens['$<<'](KUTE.to(the_target,to_state.$to_n()))};},$$118.$$s=self,$$118.$$arity=1,$$118));result=true;}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) -try{self.$log_error($hash2(["error"],{"error":the_error}));self.targets=nil;self.tweens=[];}finally{Opal.pop_exception();}}else{throw $err;}};;return result;},$Animation_compile$108.$$arity=0);Opal.def(self,'$start',$Animation_start$119=function $$start(the_time){var $$120,self=this;if(the_time==null){the_time=nil;};if($truthy($rb_gt(self.tweens.$size(),0))){}else{self.$compile()};if($truthy(the_time['$is_a?']($$$('::','Numeric')))){}else{the_time=window.performance.now()};if($truthy($rb_gt(self.tweens.$size(),0))){return $send(self.tweens,'each',[],($$120=function(the_tween){var self=$$120.$$s==null?this:$$120.$$s;if(the_tween==null){the_tween=nil;};return the_tween.start(the_time);},$$120.$$s=self,$$120.$$arity=1,$$120))}else{return nil};},$Animation_start$119.$$arity=-1);Opal.def(self,'$stop',$Animation_stop$121=function $$stop(){var $$122,self=this;if($truthy($rb_gt(self.tweens.$size(),0))){return $send(self.tweens,'each',[],($$122=function(the_tween){var self=$$122.$$s==null?this:$$122.$$s;if(the_tween==null){the_tween=nil;};return the_tween.stop();},$$122.$$s=self,$$122.$$arity=1,$$122))}else{return nil}},$Animation_stop$121.$$arity=0);Opal.def(self,'$pause',$Animation_pause$123=function $$pause(){var $$124,self=this;if($truthy($rb_gt(self.tweens.$size(),0))){return $send(self.tweens,'each',[],($$124=function(the_tween){var self=$$124.$$s==null?this:$$124.$$s;if(the_tween==null){the_tween=nil;};return the_tween.pause();},$$124.$$s=self,$$124.$$arity=1,$$124))}else{return nil}},$Animation_pause$123.$$arity=0);Opal.def(self,'$resume',$Animation_resume$125=function $$resume(){var $$126,self=this;if($truthy($rb_gt(self.tweens.$size(),0))){return $send(self.tweens,'each',[],($$126=function(the_tween){var self=$$126.$$s==null?this:$$126.$$s;if(the_tween==null){the_tween=nil;};return the_tween.resume();},$$126.$$s=self,$$126.$$arity=1,$$126))}else{return nil}},$Animation_resume$125.$$arity=0);Opal.def(self,'$included',$Animation_included$127=function $$included(){var $$128,self=this,result=nil;result=[];if($truthy(self.targets)){$send(self.targets,'each',[],($$128=function(the_element){var self=$$128.$$s==null?this:$$128.$$s,element_id=nil,found_object=nil;if(the_element==null){the_element=nil;};element_id=the_element.attributes.getNamedItem('id')||0;if($truthy(element_id==0)){return nil}else{element_id=element_id.value;found_object=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$find_child(element_id.$to_s());if($truthy(found_object)){return result['$<<'](found_object)}else{return nil};};},$$128.$$s=self,$$128.$$arity=1,$$128))};return result;},$Animation_included$127.$$arity=0);Opal.def(self,'$each_included',$Animation_each_included$129=function $$each_included(){var $iter=$Animation_each_included$129.$$p,block=$iter||nil,$$130,self=this;if($iter)$Animation_each_included$129.$$p=null;if($iter)$Animation_each_included$129.$$p=null;;if($truthy(block['$respond_to?']("call"))){return $send(self.$included(),'each',[],($$130=function(the_object){var self=$$130.$$s==null?this:$$130.$$s;if(the_object==null){the_object=nil;};return block.$call(the_object);},$$130.$$s=self,$$130.$$arity=1,$$130))}else{return self.$included().$each()};},$Animation_each_included$129.$$arity=0);return(Opal.def(self,'$broadcast',$Animation_broadcast$131=function $$broadcast(the_method,the_parameters){var $$132,self=this;if(the_method==null){the_method=nil;};if(the_parameters==null){the_parameters=nil;};return $send(self,'each_included',[],($$132=function(the_object){var self=$$132.$$s==null?this:$$132.$$s;if(the_object==null){the_object=nil;};return the_object.$send(the_method,the_parameters);},$$132.$$s=self,$$132.$$arity=1,$$132));},$Animation_broadcast$131.$$arity=-1),nil)&&'broadcast';})($nesting[0],null,$nesting);(function($base,$parent_nesting){var self=$module($base,'AnimationSupport');var $nesting=[self].concat($parent_nesting),$AnimationSupport_animate$133,$AnimationSupport_show$134,$AnimationSupport_hide$136;Opal.def(self,'$animate',$AnimationSupport_animate$133=function $$animate(animation_parameters){var self=this,the_animation=nil,start_time=nil;if(animation_parameters==null){animation_parameters=nil;};if($truthy(animation_parameters['$[]']("destination")['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){the_animation=$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'Animation').$new($hash2(["targets","origin","destination","options"],{"targets":$hash2(["elements"],{"elements":[self.$element()]}),"origin":animation_parameters['$[]']("origin"),"destination":animation_parameters['$[]']("destination"),"options":animation_parameters['$[]']("options")}));start_time=window.performance.now();if($truthy(animation_parameters['$[]']("options")['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){start_time=animation_parameters['$[]']("options")['$[]']("start_time")};the_animation.$compile();the_animation.$start(start_time);return true;}else{self.$log_warn(""+"Ignoring invalid animation: NO valid :destination state specified (required). not: "+(animation_parameters['$[]']("destination").$inspect()));return false;};},$AnimationSupport_animate$133.$$arity=-1);Opal.def(self,'$show',$AnimationSupport_show$134=function $$show(transition_parameters){var $iter=$AnimationSupport_show$134.$$p,block=$iter||nil,$$135,self=this,$writer=nil;if($iter)$AnimationSupport_show$134.$$p=null;if($iter)$AnimationSupport_show$134.$$p=null;;if(transition_parameters==null){transition_parameters=nil;};if($truthy(transition_parameters['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(transition_parameters['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){transition_parameters=transition_parameters.$unpersist()};if($truthy(transition_parameters['$[]']("destination")['$is_a?']($$$('::','Hash')))){if($truthy(transition_parameters['$[]']("destination")['$[]']("opacity")['$is_a?']($$$('::','Numeric')))){if($truthy(transition_parameters['$[]']("origin")['$is_a?']($$$('::','Hash')))){if($truthy(transition_parameters['$[]']("origin")['$[]']("opacity")['$is_a?']($$$('::','Numeric')))){self.$merge_style($hash2(["opacity"],{"opacity":transition_parameters['$[]']("origin")['$[]']("opacity")}))}else{self.$merge_style($hash2(["opacity"],{"opacity":0}))}}else{self.$merge_style($hash2(["opacity"],{"opacity":0}))}}};self.$set_state("hidden",false);if($truthy(block['$respond_to?']("call"))){if($truthy(transition_parameters['$[]']("options"))){}else{$writer=["options",$hash2([],{})];$send(transition_parameters,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};$writer=["animationend",$send($$($nesting,'Proc'),'new',[],($$135=function(){var self=$$135.$$s==null?this:$$135.$$s;return block.$call()},$$135.$$s=self,$$135.$$arity=0,$$135))];$send(transition_parameters['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};self.$animate(transition_parameters);}else{self.$set_state("hidden",false);if($truthy(block['$respond_to?']("call"))){block.$call()};};$$$($$$('::','GxG'),'Gui').$layout_refresh();return true;},$AnimationSupport_show$134.$$arity=-1);return(Opal.def(self,'$hide',$AnimationSupport_hide$136=function $$hide(transition_parameters){var $iter=$AnimationSupport_hide$136.$$p,block=$iter||nil,$$137,$$138,$$139,$$140,self=this,$writer=nil,set_state=nil,old_complete=nil;if($iter)$AnimationSupport_hide$136.$$p=null;if($iter)$AnimationSupport_hide$136.$$p=null;;if(transition_parameters==null){transition_parameters=nil;};if($truthy(transition_parameters['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(transition_parameters['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){transition_parameters=transition_parameters.$unpersist()};if($truthy(block['$respond_to?']("call"))){if($truthy(transition_parameters['$[]']("options"))){}else{$writer=["options",$hash2([],{})];$send(transition_parameters,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};$writer=["animationend",$send($$($nesting,'Proc'),'new',[],($$137=function(){var self=$$137.$$s==null?this:$$137.$$s;self.$set_state("hidden",true);return block.$call();},$$137.$$s=self,$$137.$$arity=0,$$137))];$send(transition_parameters['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;}else{set_state=nil;if($truthy(transition_parameters['$[]']("options"))){if($truthy(transition_parameters['$[]']("options")['$[]']("animationend")['$respond_to?']("call"))){old_complete=transition_parameters['$[]']("options")['$[]']("animationend");set_state=$send($$($nesting,'Proc'),'new',[],($$138=function(){var self=$$138.$$s==null?this:$$138.$$s;old_complete.$call();return self.$set_state("hidden",true);},$$138.$$s=self,$$138.$$arity=0,$$138));}else{set_state=$send($$($nesting,'Proc'),'new',[],($$139=function(){var self=$$139.$$s==null?this:$$139.$$s;return self.$set_state("hidden",true)},$$139.$$s=self,$$139.$$arity=0,$$139))}}else{$writer=["options",$hash2([],{})];$send(transition_parameters,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;set_state=$send($$($nesting,'Proc'),'new',[],($$140=function(){var self=$$140.$$s==null?this:$$140.$$s;return self.$set_state("hidden",true)},$$140.$$s=self,$$140.$$arity=0,$$140));};if($truthy(set_state)){if($truthy(transition_parameters['$[]']("options")['$is_a?']($$$('::','Hash')))){}else{$writer=["options",$hash2([],{})];$send(transition_parameters,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};$writer=["animationend",set_state];$send(transition_parameters['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};};self.$animate(transition_parameters);}else{self.$set_state("hidden",true);if($truthy(block['$respond_to?']("call"))){block.$call()};};$$$($$$('::','GxG'),'Gui').$layout_refresh();return true;},$AnimationSupport_hide$136.$$arity=-1),nil)&&'hide';})($nesting[0],$nesting);(function($base,$parent_nesting){var self=$module($base,'ApplicationSupport');var $nesting=[self].concat($parent_nesting),$ApplicationSupport_find_parent_type$141,$ApplicationSupport_viewport$142,$ApplicationSupport_tree_node$143,$ApplicationSupport_tree$144,$ApplicationSupport_window$145,$ApplicationSupport_find_parent$146,$ApplicationSupport_find_child_type$147,$ApplicationSupport_find_child$148,$ApplicationSupport_find_peer$150;Opal.def(self,'$find_parent_type',$ApplicationSupport_find_parent_type$141=function $$find_parent_type(the_type){var $a,self=this,result=nil,search_queue=nil,entry=nil;if(the_type==null){the_type=nil;};result=nil;if($truthy(the_type['$is_any?']($$$('::','Class'),$$$('::','String'),$$$('::','Symbol')))){if($truthy(the_type['$is_any?']($$$('::','String'),$$$('::','Symbol')))){the_type=$$$($$($nesting,'GxG'),'Gui').$component_class(the_type.$to_s().$to_sym())};if($truthy(the_type['$is_a?']($$$('::','Class')))){search_queue=[self];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(entry['$is_a?'](the_type))){result=entry;break;;};search_queue['$<<'](entry.$parent());};};};};return result;},$ApplicationSupport_find_parent_type$141.$$arity=-1);Opal.def(self,'$viewport',$ApplicationSupport_viewport$142=function $$viewport(){var self=this;return self.$find_parent_type($$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport'))},$ApplicationSupport_viewport$142.$$arity=0);Opal.def(self,'$tree_node',$ApplicationSupport_tree_node$143=function $$tree_node(){var self=this;return self.$find_parent_type($$$($$$($$$('::','GxG'),'Gui'),'TreeNode'))},$ApplicationSupport_tree_node$143.$$arity=0);Opal.def(self,'$tree',$ApplicationSupport_tree$144=function $$tree(){var self=this;return self.$find_parent_type($$$($$$($$$('::','GxG'),'Gui'),'Tree'))},$ApplicationSupport_tree$144.$$arity=0);Opal.def(self,'$window',$ApplicationSupport_window$145=function $$window(){var self=this;return self.$find_parent_type($$$($$$($$$('::','GxG'),'Gui'),'Window'))},$ApplicationSupport_window$145.$$arity=0);Opal.def(self,'$find_parent',$ApplicationSupport_find_parent$146=function $$find_parent(the_reference){var $a,self=this,result=nil,uuid_check=nil,search_queue=nil,entry=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_reference))){uuid_check=true}else{uuid_check=false};search_queue=[self.$parent()];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(uuid_check)){if(entry.$uuid()['$=='](the_reference)){result=entry;break;;}}else if(entry.$title()['$=='](the_reference)){result=entry;break;;};if($truthy(result)){}else{search_queue['$<<'](entry.$parent())};};};return result;},$ApplicationSupport_find_parent$146.$$arity=-1);Opal.def(self,'$find_child_type',$ApplicationSupport_find_child_type$147=function $$find_child_type(the_type){var $a,self=this,result=nil,search_queue=nil,entry=nil;if(the_type==null){the_type=nil;};result=nil;if($truthy(the_type['$is_any?']($$$('::','Class'),$$$('::','String'),$$$('::','Symbol')))){if($truthy(the_type['$is_any?']($$$('::','String'),$$$('::','Symbol')))){the_type=$$$($$($nesting,'GxG'),'Gui').$component_class(the_type.$to_s().$to_sym())};if($truthy(the_type['$is_a?']($$$('::','Class')))){search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(entry['$is_a?'](the_type))){result=entry;break;;}};};};};return result;},$ApplicationSupport_find_child_type$147.$$arity=-1);Opal.def(self,'$find_child',$ApplicationSupport_find_child$148=function $$find_child(the_reference){var $a,$$149,self=this,result=nil,uuid_check=nil,search_queue=nil,entry=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_reference))){uuid_check=true}else{uuid_check=false};search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(uuid_check)){if(entry.$uuid()['$=='](the_reference)){result=entry;break;;}}else if(entry.$title()['$=='](the_reference)){result=entry;break;;};if($truthy(result)){}else{$send(entry.$children().$values(),'each',[],($$149=function(the_child){var self=$$149.$$s==null?this:$$149.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$149.$$s=self,$$149.$$arity=1,$$149))};};};return result;},$ApplicationSupport_find_child$148.$$arity=-1);return(Opal.def(self,'$find_peer',$ApplicationSupport_find_peer$150=function $$find_peer(the_reference){var self=this;if(the_reference==null){the_reference=nil;};return self.$parent().$find_child(the_reference);},$ApplicationSupport_find_peer$150.$$arity=-1),nil)&&'find_peer';})($nesting[0],$nesting);(function($base,$parent_nesting){var self=$module($base,'ThemeSupport');var $nesting=[self].concat($parent_nesting),$ThemeSupport_theme_icon$151,$ThemeSupport_theme_background$152,$ThemeSupport_theme_widget$153,$ThemeSupport_theme_font$154,$ThemeSupport_site_asset$155;Opal.def(self,'$theme_icon',$ThemeSupport_theme_icon$151=function $$theme_icon(image_name){var self=this;if(image_name==null){image_name=nil;};return $$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$theme_icon(image_name);},$ThemeSupport_theme_icon$151.$$arity=-1);Opal.def(self,'$theme_background',$ThemeSupport_theme_background$152=function $$theme_background(image_name){var self=this;if(image_name==null){image_name=nil;};return $$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$theme_background(image_name);},$ThemeSupport_theme_background$152.$$arity=-1);Opal.def(self,'$theme_widget',$ThemeSupport_theme_widget$153=function $$theme_widget(image_name){var self=this;if(image_name==null){image_name=nil;};return $$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$theme_widget(image_name);},$ThemeSupport_theme_widget$153.$$arity=-1);Opal.def(self,'$theme_font',$ThemeSupport_theme_font$154=function $$theme_font(font_name){var self=this;if(font_name==null){font_name=nil;};return $$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$theme_font(font_name);},$ThemeSupport_theme_font$154.$$arity=-1);return(Opal.def(self,'$site_asset',$ThemeSupport_site_asset$155=function $$site_asset(asset_path){var self=this;if(asset_path==null){asset_path=nil;};return $$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$site_asset(asset_path);},$ThemeSupport_site_asset$155.$$arity=-1),nil)&&'site_asset';})($nesting[0],$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Factory');var $nesting=[self].concat($parent_nesting),$Factory_initialize$156,$Factory_create_element$157,$Factory_dasherize$159,$Factory_camelize$160;self.$attr_reader("body");Opal.def(self,'$initialize',$Factory_initialize$156=function $$initialize(target){var self=this;self.body=document.body;while(document.body.firstChild){document.body.removeChild(document.body.firstChild);};;},$Factory_initialize$156.$$arity=1);Opal.def(self,'$create_element',$Factory_create_element$157=function $$create_element(target,type,parent,options){var $$158,self=this,element=nil;if(options==null){options=$hash2([],{});};if(type['$==']("body")){element=document.body}else{element=document.createElement(type)};if(type['$==']("body")){}else if(options['$[]']("prepend")['$=='](true)){parent.$element().insertBefore(element,options['$[]']("prepend").$element())}else{parent.$element().appendChild(element)};element.classList.add(self.$dasherize(target.$class().$name()));if($truthy(options['$has_key?']("id")['$!']())){element.id=target.$uuid().$to_s()};$send(options,'each',[],($$158=function(name,value){var self=$$158.$$s==null?this:$$158.$$s,$case=nil;if(name==null){name=nil;};if(value==null){value=nil;};return(function(){$case=name;if("prepend"['$===']($case)){return nil} +try{native_rule=the_style_sheet.rules[(the_style_sheet.cssRules.length-1)]}finally{Opal.pop_exception();}}else{throw $err;}};;$class_variable_get($nesting[0],'@@CssCache',false)['$<<']($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'CSSRule').$new(native_rule));return true;}else{self.$log_warn("GxG Style Sheet Rule creation failed..");return false;};}else{self.$log_warn("GxG Style Sheet not found.");return false;};},$Vdom_set_rule$25.$$arity=-1);Opal.defs(self,'$remove_rule',$Vdom_remove_rule$27=function $$remove_rule(the_rule_selector){var $$28,$$29,$$30,self=this,found_indexes=nil,found=nil;if(the_rule_selector==null){the_rule_selector=nil;};found_indexes=[];$send($class_variable_get($nesting[0],'@@CssCache',false),'each_with_index',[],($$28=function(entry,index){var self=$$28.$$s==null?this:$$28.$$s,$ret_or_10=nil;if(entry==null){entry=nil;};if(index==null){index=nil;};if($truthy((function(){if($truthy(($ret_or_10=entry.$name()['$=='](the_rule_selector.$to_s().$to_sym())))){return $ret_or_10}else{return entry.$name()['$=='](the_rule_selector.$to_s())};return nil;})())){return found_indexes['$<<'](index)}else{return nil};},$$28.$$s=self,$$28.$$arity=2,$$28));found=[];$send(found_indexes.$reverse(),'each',[],($$29=function(the_index){var self=$$29.$$s==null?this:$$29.$$s;if(the_index==null){the_index=nil;};return found['$<<']($class_variable_get($nesting[0],'@@CssCache',false).$delete_at(the_index));},$$29.$$s=self,$$29.$$arity=1,$$29));if($truthy($rb_gt(found.$size(),0))){$send(found,'each',[],($$30=function(the_rule){var self=$$30.$$s==null?this:$$30.$$s,$$31,native_rule=nil,the_sheet=nil,rule_count=nil;if(the_rule==null){the_rule=nil;};native_rule=the_rule.$native_object();the_sheet=$$$($$$($$($nesting,'GxG'),'Gui'),'Vdom').$style_sheet();if($truthy(the_sheet)){rule_count=(the_sheet.cssRules.length).$to_i();if($truthy($rb_gt(rule_count,0))){return $send(Opal.Range.$new(0,$rb_minus(rule_count,1),false).$to_a().$reverse(),'each',[],($$31=function(rule_index){var self=$$31.$$s==null?this:$$31.$$s,other_native_rule=nil;if(rule_index==null){rule_index=nil;};other_native_rule=the_sheet.cssRules[rule_index];if($truthy(other_native_rule)){if($truthy(native_rule.selectorText==other_native_rule.selectorText)){return the_sheet.deleteRule(rule_index)}else{return nil}}else{return nil};},$$31.$$s=self,$$31.$$arity=1,$$31))}else{return nil};}else{return nil};},$$30.$$s=self,$$30.$$arity=1,$$30));return true;}else{return false};},$Vdom_remove_rule$27.$$arity=-1);(function($base,$parent_nesting){var self=$module($base,'ElementMethods');var $nesting=[self].concat($parent_nesting),$ElementMethods__before_create$32,$ElementMethods_before_create$33,$ElementMethods_create$34,$ElementMethods__after_create$35,$ElementMethods_after_create$36,$ElementMethods_style$37,$ElementMethods__stylize$38,$ElementMethods_cascade$40,$ElementMethods_creation$41,$ElementMethods_add_child$42,$ElementMethods_each_child$43,$ElementMethods_all_descendants$45,$ElementMethods_forget_children$47,$ElementMethods_forget_child$49,$ElementMethods_destroy$50,$ElementMethods_method_missing$52,$ElementMethods_dom_id$53,$ElementMethods_title$54,$ElementMethods_update_classes$55,$ElementMethods_option_replace$58,$ElementMethods_set_state$59,$ElementMethods_set_states$60,$ElementMethods_get_state$62,$ElementMethods_get_states$63,$ElementMethods_toggle_state$64,$ElementMethods_set_application$65,$ElementMethods_application$66,$ElementMethods_state_active$ques$67,$ElementMethods_add_states$68,$ElementMethods_add_state$70,$ElementMethods_value$71,$ElementMethods_get_text$72,$ElementMethods_value$eq$73,$ElementMethods_set_text$74,$ElementMethods_html$75,$ElementMethods_set_style$76,$ElementMethods_merge_style$78,$ElementMethods_set_bg_color$80,$ElementMethods_get_attribute$81,$ElementMethods_set_attribute$82,$ElementMethods_clear_attribute$83,$ElementMethods_each_child$84,$ElementMethods_every_child$86,$ElementMethods_find_child$89,$ElementMethods_find_descendant$90,$ElementMethods_find_descendants$92,$ElementMethods_find_ancestor$94,$ElementMethods_find_ancestors$95;Opal.def(self,'$_before_create',$ElementMethods__before_create$32=function $$_before_create(){var self=this;return nil},$ElementMethods__before_create$32.$$arity=0);Opal.def(self,'$before_create',$ElementMethods_before_create$33=function $$before_create(){var self=this;return nil},$ElementMethods_before_create$33.$$arity=0);Opal.def(self,'$create',$ElementMethods_create$34=function $$create(){var self=this;if(self.domtype==null)self.domtype=nil;if(self.parent==null)self.parent=nil;if(self.options==null)self.options=nil;if($truthy(self.domtype)){return(self.element=self.$factory().$create_element(self,self.domtype,self.parent,self.options))}else{return nil}},$ElementMethods_create$34.$$arity=0);Opal.def(self,'$_after_create',$ElementMethods__after_create$35=function $$_after_create(){var self=this;self.$update_classes();return self.$_stylize();},$ElementMethods__after_create$35.$$arity=0);Opal.def(self,'$after_create',$ElementMethods_after_create$36=function $$after_create(){var self=this;return nil},$ElementMethods_after_create$36.$$arity=0);Opal.def(self,'$style',$ElementMethods_style$37=function $$style(){var self=this,$ret_or_11=nil;if(self.style==null)self.style=nil;return(self.style=(function(){if($truthy(($ret_or_11=self.style))){return $ret_or_11}else{return $hash2([],{})};return nil;})())},$ElementMethods_style$37.$$arity=0);Opal.def(self,'$_stylize',$ElementMethods__stylize$38=function $$_stylize(){var $$39,self=this,styles=nil;styles=self.$style();if(styles.$class()['$==']($$($nesting,'Hash'))){return self.$set_attribute("style",$send(styles,'map',[],($$39=function(k,v){var self=$$39.$$s==null?this:$$39.$$s;if(k==null){k=nil;};if(v==null){v=nil;};return ""+(k)+":"+(v)+";";},$$39.$$s=self,$$39.$$arity=2,$$39)).$join())}else{return nil};},$ElementMethods__stylize$38.$$arity=0);Opal.def(self,'$cascade',$ElementMethods_cascade$40=function $$cascade(){var self=this;return nil},$ElementMethods_cascade$40.$$arity=0);Opal.def(self,'$creation',$ElementMethods_creation$41=function $$creation(){var self=this;self.$_before_create();self.$before_create();self.$create();self.$_after_create();self.$after_create();self.$_stylize();return self.$cascade();},$ElementMethods_creation$41.$$arity=0);Opal.def(self,'$add_child',$ElementMethods_add_child$42=function $$add_child(options,other_data){var self=this,new_child=nil,element_class=nil,$writer=nil;if(self.children==null)self.children=nil;if(options==null){options=$hash2([],{});};if(other_data==null){other_data=$hash2([],{});};new_child=nil;if(options['$[]']("component").$to_s().$downcase().$to_sym()['$==']("unknown")){self.$raise("Unknown Component Type")}else{element_class=$$$($$($nesting,'GxG'),'Gui').$component_class(options['$[]']("component").$to_s().$downcase().$to_sym());if($truthy(element_class['$is_a?']($$$('::','Class')))){new_child=element_class.$new(self,options,other_data);$writer=[new_child.$title().$to_s().$to_sym(),new_child];$send(self.children,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object").$register_object(new_child.$title(),new_child);}else{self.$raise("Unknown Component Type")};};return new_child;},$ElementMethods_add_child$42.$$arity=-1);Opal.def(self,'$each_child',$ElementMethods_each_child$43=function $$each_child(){var $iter=$ElementMethods_each_child$43.$$p,block=$iter||nil,$$44,self=this;if(self.children==null)self.children=nil;if($iter)$ElementMethods_each_child$43.$$p=null;if($iter)$ElementMethods_each_child$43.$$p=null;;return $send(self.children.$values(),'each',[],($$44=function(the_child){var self=$$44.$$s==null?this:$$44.$$s;if(the_child==null){the_child=nil;};return block.$call(the_child);},$$44.$$s=self,$$44.$$arity=1,$$44));},$ElementMethods_each_child$43.$$arity=0);Opal.def(self,'$all_descendants',$ElementMethods_all_descendants$45=function $$all_descendants(){var $iter=$ElementMethods_all_descendants$45.$$p,block=$iter||nil,$a,$$46,self=this,entry=nil;if(self.children==null)self.children=nil;if(self.process_queue==null)self.process_queue=nil;if($iter)$ElementMethods_all_descendants$45.$$p=null;if($iter)$ElementMethods_all_descendants$45.$$p=null;;self.process_queue=self.children.$values().$clone();while($truthy($rb_gt(self.process_queue.$size(),0))){entry=self.process_queue.$shift();if($truthy(entry)){block.$call(entry);if($truthy($rb_gt(entry.$children().$values().$size(),0))){$send(entry,'each_child',[],($$46=function(the_child){var self=$$46.$$s==null?this:$$46.$$s;if(self.process_queue==null)self.process_queue=nil;if(the_child==null){the_child=nil;};return self.process_queue['$<<'](the_child);},$$46.$$s=self,$$46.$$arity=1,$$46))};};};},$ElementMethods_all_descendants$45.$$arity=0);Opal.def(self,'$forget_children',$ElementMethods_forget_children$47=function $$forget_children(){var $a,$$48,self=this,clearing_queue=nil,entry=nil;if(self.children==null)self.children=nil;clearing_queue=self.children.$values();while($truthy($rb_gt(self.$clearning_queue().$size(),0))){entry=clearing_queue.$shift();if($truthy(entry)){$send(entry.$children().$values(),'each',[],($$48=function(the_child){var self=$$48.$$s==null?this:$$48.$$s;if(the_child==null){the_child=nil;};return clearing_queue['$<<'](the_child);},$$48.$$s=self,$$48.$$arity=1,$$48));self.$page().$unregister_object(entry.$title().$to_s());};};return(self.children=$hash2([],{}));},$ElementMethods_forget_children$47.$$arity=0);Opal.def(self,'$forget_child',$ElementMethods_forget_child$49=function $$forget_child(the_title){var self=this;if(self.children==null)self.children=nil;self.$page().$unregister_object(the_title);return self.children.$delete(the_title.$to_s().$to_sym());},$ElementMethods_forget_child$49.$$arity=1);Opal.def(self,'$destroy',$ElementMethods_destroy$50=function $$destroy(){var $$51,self=this;if(self.title==null)self.title=nil;$send(self,'every_child',[],($$51=function(the_child){var self=$$51.$$s==null?this:$$51.$$s;if(the_child==null){the_child=nil;};the_child.$remove_listeners();return self.$page().$unregister_object(the_child.$title().$to_s());},$$51.$$s=self,$$51.$$arity=1,$$51));self.$remove_listeners();self.$parent().$forget_child(self.title.$to_s());self.$parent().$element().removeChild(self.$element());return true;},$ElementMethods_destroy$50.$$arity=0);Opal.def(self,'$method_missing',$ElementMethods_method_missing$52=function $$method_missing(method_name,$a){var $iter=$ElementMethods_method_missing$52.$$p,block=$iter||nil,$post_args,args,self=this;if(self.children==null)self.children=nil;if($iter)$ElementMethods_method_missing$52.$$p=null;if($iter)$ElementMethods_method_missing$52.$$p=null;;$post_args=Opal.slice.call(arguments,1,arguments.length);args=$post_args;;if($truthy(self.children['$has_key?'](method_name))){return self.children['$[]'](method_name)}else{return $send2(self,$find_super(self,'method_missing',$ElementMethods_method_missing$52,false,true),'method_missing',[method_name].concat(Opal.to_a(args)),$iter)};},$ElementMethods_method_missing$52.$$arity=-2);Opal.def(self,'$dom_id',$ElementMethods_dom_id$53=function $$dom_id(){var self=this;return self.$uuid().$to_s()},$ElementMethods_dom_id$53.$$arity=0);Opal.def(self,'$title',$ElementMethods_title$54=function $$title(){var self=this;if(self.title==null)self.title=nil;return self.title},$ElementMethods_title$54.$$arity=0);Opal.def(self,'$update_classes',$ElementMethods_update_classes$55=function $$update_classes(){var $$56,$$57,self=this,new_classes=nil,class_list=nil;if(self.element==null)self.element=nil;if(self.states==null)self.states=nil;new_classes="";class_list=(self.element.className).$split(" ");$send(class_list,'each_with_index',[],($$56=function(the_classname,indexer){var self=$$56.$$s==null?this:$$56.$$s;if(self.states==null)self.states=nil;if(the_classname==null){the_classname=nil;};if(indexer==null){indexer=nil;};if($truthy(self.states.$keys()['$include?'](the_classname.$to_s().$to_sym()))){return nil}else{new_classes=$rb_plus(new_classes,the_classname);if(the_classname['$=='](class_list.$last())){return nil}else{return(new_classes=$rb_plus(new_classes," "))};};},$$56.$$s=self,$$56.$$arity=2,$$56));if($truthy($rb_gt(self.states.$keys().$size(),0))){new_classes=$rb_plus(new_classes," ")};$send(self.states,'each_pair',[],($$57=function(the_state,the_value){var self=$$57.$$s==null?this:$$57.$$s;if(self.states==null)self.states=nil;if(the_state==null){the_state=nil;};if(the_value==null){the_value=nil;};if(the_value['$=='](true)){new_classes=$rb_plus(new_classes,the_state.$to_s());if(self.states.$keys().$last()['$=='](the_state)){return nil}else{return(new_classes=$rb_plus(new_classes," "))};}else{return nil};},$$57.$$s=self,$$57.$$arity=2,$$57));self.element.className=new_classes.$to_s();return true;},$ElementMethods_update_classes$55.$$arity=0);Opal.def(self,'$option_replace',$ElementMethods_option_replace$58=function $$option_replace(key,default$){var self=this,value=nil,$ret_or_12=nil;if(self.options==null)self.options=nil;if(default$==null){default$=nil;};value=(function(){if($truthy(($ret_or_12=self.options['$[]'](key)))){return $ret_or_12}else{return default$};return nil;})();if($truthy(self.options['$has_key?'](key))){self.options.$delete(key)};return value;},$ElementMethods_option_replace$58.$$arity=-2);Opal.def(self,'$set_state',$ElementMethods_set_state$59=function $$set_state(the_state,the_value){var self=this,$writer=nil;if(self.states==null)self.states=nil;if(the_value==null){the_value=false;};if(the_value['$=='](true)){$writer=[the_state.$to_s().$to_sym(),true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];}else{$writer=[the_state.$to_s().$to_sym(),false];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};return self.$update_classes();},$ElementMethods_set_state$59.$$arity=-2);Opal.def(self,'$set_states',$ElementMethods_set_states$60=function $$set_states(the_state_list){var $$61,self=this;if(the_state_list==null){the_state_list=$hash2([],{});};$send(the_state_list,'each_pair',[],($$61=function(the_state,the_value){var self=$$61.$$s==null?this:$$61.$$s,$writer=nil;if(self.states==null)self.states=nil;if(the_state==null){the_state=nil;};if(the_value==null){the_value=nil;};if(the_value['$=='](true)){$writer=[the_state.$to_s().$to_sym(),true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{$writer=[the_state.$to_s().$to_sym(),false];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$$61.$$s=self,$$61.$$arity=2,$$61));return self.$update_classes();},$ElementMethods_set_states$60.$$arity=-1);Opal.def(self,'$get_state',$ElementMethods_get_state$62=function $$get_state(the_state){var self=this,$ret_or_13=nil;if(self.states==null)self.states=nil;if($truthy(($ret_or_13=self.states['$[]'](the_state.$to_s().$to_sym())))){return $ret_or_13}else{return false}},$ElementMethods_get_state$62.$$arity=1);Opal.def(self,'$get_states',$ElementMethods_get_states$63=function $$get_states(){var self=this;if(self.states==null)self.states=nil;return self.states},$ElementMethods_get_states$63.$$arity=0);Opal.def(self,'$toggle_state',$ElementMethods_toggle_state$64=function $$toggle_state(the_state){var self=this;return self.$set_state(the_state,self.$get_state(the_state)['$!']())},$ElementMethods_toggle_state$64.$$arity=1);Opal.def(self,'$set_application',$ElementMethods_set_application$65=function $$set_application(the_application){var self=this;if(the_application==null){the_application=nil;};return(self.application=the_application);},$ElementMethods_set_application$65.$$arity=-1);Opal.def(self,'$application',$ElementMethods_application$66=function $$application(){var self=this;if(self.application==null)self.application=nil;return self.application},$ElementMethods_application$66.$$arity=0);Opal.def(self,'$state_active?',$ElementMethods_state_active$ques$67=function(the_state){var self=this;if(self.states==null)self.states=nil;return self.states.$keys()['$include?'](the_state.$to_s().$to_sym())},$ElementMethods_state_active$ques$67.$$arity=1);Opal.def(self,'$add_states',$ElementMethods_add_states$68=function $$add_states(states){var $$69,self=this;return $send(states,'each',[],($$69=function(state){var self=$$69.$$s==null?this:$$69.$$s;if(state==null){state=nil;};return self.$add_state(state);},$$69.$$s=self,$$69.$$arity=1,$$69))},$ElementMethods_add_states$68.$$arity=1);Opal.def(self,'$add_state',$ElementMethods_add_state$70=function $$add_state(state,value){var self=this;if(value==null){value=false;};return self.$set_state(state,value);},$ElementMethods_add_state$70.$$arity=-2);Opal.def(self,'$value',$ElementMethods_value$71=function $$value(){var self=this;if(self.element==null)self.element=nil;return self.element.innerHTML},$ElementMethods_value$71.$$arity=0);Opal.def(self,'$get_text',$ElementMethods_get_text$72=function $$get_text(){var self=this;if(self.element==null)self.element=nil;return self.element.textContent},$ElementMethods_get_text$72.$$arity=0);Opal.def(self,'$value=',$ElementMethods_value$eq$73=function(value){var self=this;if(self.element==null)self.element=nil;return self.element.value=value},$ElementMethods_value$eq$73.$$arity=1);Opal.def(self,'$set_text',$ElementMethods_set_text$74=function $$set_text(value){var self=this;if(self.element==null)self.element=nil;return self.element.textContent=value},$ElementMethods_set_text$74.$$arity=1);Opal.def(self,'$html',$ElementMethods_html$75=function $$html(raw_html){var self=this;if(self.element==null)self.element=nil;return self.element.innerHTML=raw_html},$ElementMethods_html$75.$$arity=1);Opal.def(self,'$set_style',$ElementMethods_set_style$76=function $$set_style(the_style){var $$77,self=this,new_style=nil;if(self.element==null)self.element=nil;if(the_style==null){the_style=$hash2([],{});};new_style="";if($truthy(the_style['$is_a?']($$$('::','Hash')))){$send(the_style,'each_pair',[],($$77=function(property,value){var self=$$77.$$s==null?this:$$77.$$s;if(property==null){property=nil;};if(value==null){value=nil;};return(new_style=$rb_plus($rb_plus(new_style,""+(property.$to_s())+": "),""+(value.$to_s())+";"));},$$77.$$s=self,$$77.$$arity=2,$$77));self.element.setAttribute("style",new_style);;return true;}else{return false};},$ElementMethods_set_style$76.$$arity=-1);Opal.def(self,'$merge_style',$ElementMethods_merge_style$78=function $$merge_style(the_style){var $$79,self=this;if(the_style==null){the_style=$hash2([],{});};if($truthy(the_style['$is_a?']($$$('::','Hash')))){$send(the_style,'each_pair',[],($$79=function(property,value){var self=$$79.$$s==null?this:$$79.$$s;if(property==null){property=nil;};if(value==null){value=nil;};return self.$element().style[property]=value.$to_s();},$$79.$$s=self,$$79.$$arity=2,$$79));return true;}else{return false};},$ElementMethods_merge_style$78.$$arity=-1);Opal.def(self,'$set_bg_color',$ElementMethods_set_bg_color$80=function $$set_bg_color(the_color){var self=this;if(the_color==null){the_color=0;};return self.$merge_style($hash2(["background-color"],{"background-color":""+"#"+(the_color.$to_s())}));},$ElementMethods_set_bg_color$80.$$arity=-1);Opal.def(self,'$get_attribute',$ElementMethods_get_attribute$81=function $$get_attribute(the_attribute){var self=this,result=nil,the_element=nil,the_value=nil;if(the_attribute==null){the_attribute=nil;};result="";if($truthy(the_attribute)){the_element=self.$element();the_value=nil;if(the_element.getAttributeNames().includes(the_attribute)){if(the_element.getAttribute(the_attribute)!=null){the_value=the_element.getAttribute(the_attribute);}else{the_value=true;};};;result=the_value.$to_s();};return result;},$ElementMethods_get_attribute$81.$$arity=-1);Opal.def(self,'$set_attribute',$ElementMethods_set_attribute$82=function $$set_attribute(the_attribute,the_value){var self=this,result=nil;if(the_attribute==null){the_attribute=nil;};if(the_value==null){the_value=nil;};result=false;if($truthy(the_attribute)){if($truthy(the_value)){result=self.$element().setAttribute(the_attribute,the_value)}else{result=self.$element().setAttribute(the_attribute,null)}};return result;},$ElementMethods_set_attribute$82.$$arity=-1);Opal.def(self,'$clear_attribute',$ElementMethods_clear_attribute$83=function $$clear_attribute(the_attribute){var self=this,result=nil;if(the_attribute==null){the_attribute=nil;};result=false;if($truthy(the_attribute)){self.$element().removeAttribute(the_attribute);result=true;};return result;},$ElementMethods_clear_attribute$83.$$arity=-1);Opal.def(self,'$each_child',$ElementMethods_each_child$84=function $$each_child(){var $iter=$ElementMethods_each_child$84.$$p,block=$iter||nil,$$85,self=this;if(self.children==null)self.children=nil;if($iter)$ElementMethods_each_child$84.$$p=null;if($iter)$ElementMethods_each_child$84.$$p=null;;if($truthy(block['$respond_to?']("call"))){return $send(self.children.$values(),'each',[],($$85=function(the_child){var self=$$85.$$s==null?this:$$85.$$s;if(the_child==null){the_child=nil;};return block.$call(the_child);},$$85.$$s=self,$$85.$$arity=1,$$85))}else{return self.children.$values().$each()};},$ElementMethods_each_child$84.$$arity=0);Opal.def(self,'$every_child',$ElementMethods_every_child$86=function $$every_child(){var $iter=$ElementMethods_every_child$86.$$p,block=$iter||nil,$a,$$87,$$88,self=this,child_manifest=nil,build_queue=nil,entry=nil;if($iter)$ElementMethods_every_child$86.$$p=null;if($iter)$ElementMethods_every_child$86.$$p=null;;child_manifest=[];build_queue=[self];while($truthy($rb_gt(build_queue.$size(),0))){entry=build_queue.$shift();if($truthy(entry)){if($truthy($rb_gt(entry.$children().$keys().$size(),0))){$send(entry.$children().$values(),'each',[],($$87=function(the_child){var self=$$87.$$s==null?this:$$87.$$s;if(the_child==null){the_child=nil;};child_manifest['$<<'](the_child);if($truthy($rb_gt(the_child.$children().$keys().$size(),0))){return build_queue['$<<'](the_child)}else{return nil};},$$87.$$s=self,$$87.$$arity=1,$$87))}};};if($truthy(block['$respond_to?']("call"))){return $send(child_manifest,'each',[],($$88=function(the_child){var self=$$88.$$s==null?this:$$88.$$s;if(the_child==null){the_child=nil;};return block.$call(the_child);},$$88.$$s=self,$$88.$$arity=1,$$88))}else{return child_manifest.$values().$each()};},$ElementMethods_every_child$86.$$arity=0);Opal.def(self,'$find_child',$ElementMethods_find_child$89=function $$find_child(the_reference){var $a,self=this,result=nil,search_queue=nil,entry=nil,$ret_or_14=nil,$ret_or_15=nil,$ret_or_16=nil,$ret_or_17=nil;if(the_reference==null){the_reference=nil;};result=nil;search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy((function(){if($truthy(($ret_or_14=(function(){if($truthy(($ret_or_15=(function(){if($truthy(($ret_or_16=(function(){if($truthy(($ret_or_17=entry.$uuid()['$=='](the_reference)))){return $ret_or_17}else{return entry.$title()['$=='](the_reference)};return nil;})()))){return $ret_or_16}else{return entry.$component()['$=='](the_reference)};return nil;})()))){return $ret_or_15}else{return entry.$class()['$=='](the_reference)};return nil;})()))){return $ret_or_14}else{return entry.$domtype()['$=='](the_reference)};return nil;})())){result=entry;break;;}};};return result;},$ElementMethods_find_child$89.$$arity=-1);Opal.def(self,'$find_descendant',$ElementMethods_find_descendant$90=function $$find_descendant(the_reference){var $a,$$91,self=this,result=nil,search_queue=nil,entry=nil,$ret_or_18=nil,$ret_or_19=nil,$ret_or_20=nil,$ret_or_21=nil;if(the_reference==null){the_reference=nil;};result=nil;search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy((function(){if($truthy(($ret_or_18=(function(){if($truthy(($ret_or_19=(function(){if($truthy(($ret_or_20=(function(){if($truthy(($ret_or_21=entry.$uuid()['$=='](the_reference)))){return $ret_or_21}else{return entry.$title()['$=='](the_reference)};return nil;})()))){return $ret_or_20}else{return entry.$component()['$=='](the_reference)};return nil;})()))){return $ret_or_19}else{return entry.$class()['$=='](the_reference)};return nil;})()))){return $ret_or_18}else{return entry.$domtype()['$=='](the_reference)};return nil;})())){result=entry;break;;};if($truthy(result)){}else{$send(entry.$children().$values(),'each',[],($$91=function(the_child){var self=$$91.$$s==null?this:$$91.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$91.$$s=self,$$91.$$arity=1,$$91))};};};return result;},$ElementMethods_find_descendant$90.$$arity=-1);Opal.def(self,'$find_descendants',$ElementMethods_find_descendants$92=function $$find_descendants(the_reference){var $a,$$93,self=this,result=nil,search_queue=nil,entry=nil,$ret_or_22=nil,$ret_or_23=nil,$ret_or_24=nil,$ret_or_25=nil;if(the_reference==null){the_reference=nil;};result=[];search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy((function(){if($truthy(($ret_or_22=(function(){if($truthy(($ret_or_23=(function(){if($truthy(($ret_or_24=(function(){if($truthy(($ret_or_25=entry.$uuid()['$=='](the_reference)))){return $ret_or_25}else{return entry.$title()['$=='](the_reference)};return nil;})()))){return $ret_or_24}else{return entry.$component()['$=='](the_reference)};return nil;})()))){return $ret_or_23}else{return entry.$class()['$=='](the_reference)};return nil;})()))){return $ret_or_22}else{return entry.$domtype()['$=='](the_reference)};return nil;})())){result['$<<'](entry)};$send(entry.$children().$values(),'each',[],($$93=function(the_child){var self=$$93.$$s==null?this:$$93.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$93.$$s=self,$$93.$$arity=1,$$93));};};return result;},$ElementMethods_find_descendants$92.$$arity=-1);Opal.def(self,'$find_ancestor',$ElementMethods_find_ancestor$94=function $$find_ancestor(the_reference){var $a,self=this,result=nil,search_queue=nil,entry=nil,$ret_or_26=nil,$ret_or_27=nil,$ret_or_28=nil,$ret_or_29=nil;if(the_reference==null){the_reference=nil;};result=nil;search_queue=[self.$parent()];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy((function(){if($truthy(($ret_or_26=(function(){if($truthy(($ret_or_27=(function(){if($truthy(($ret_or_28=(function(){if($truthy(($ret_or_29=entry.$uuid()['$=='](the_reference)))){return $ret_or_29}else{return entry.$title()['$=='](the_reference)};return nil;})()))){return $ret_or_28}else{return entry.$component()['$=='](the_reference)};return nil;})()))){return $ret_or_27}else{return entry.$class()['$=='](the_reference)};return nil;})()))){return $ret_or_26}else{return entry.$domtype()['$=='](the_reference)};return nil;})())){result=entry;break;;}else if(entry.$component()['$==']("page")){}else{search_queue['$<<'](entry.$parent())}};};return result;},$ElementMethods_find_ancestor$94.$$arity=-1);return(Opal.def(self,'$find_ancestors',$ElementMethods_find_ancestors$95=function $$find_ancestors(the_reference){var $a,self=this,result=nil,search_queue=nil,entry=nil,$ret_or_30=nil,$ret_or_31=nil,$ret_or_32=nil,$ret_or_33=nil;if(the_reference==null){the_reference=nil;};result=[];search_queue=[self.$parent()];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy((function(){if($truthy(($ret_or_30=(function(){if($truthy(($ret_or_31=(function(){if($truthy(($ret_or_32=(function(){if($truthy(($ret_or_33=entry.$uuid()['$=='](the_reference)))){return $ret_or_33}else{return entry.$title()['$=='](the_reference)};return nil;})()))){return $ret_or_32}else{return entry.$component()['$=='](the_reference)};return nil;})()))){return $ret_or_31}else{return entry.$class()['$=='](the_reference)};return nil;})()))){return $ret_or_30}else{return entry.$domtype()['$=='](the_reference)};return nil;})())){result['$<<'](entry)};if(entry.$component()['$==']("page")){}else{search_queue['$<<'](entry.$parent())};};};return result;},$ElementMethods_find_ancestors$95.$$arity=-1),nil)&&'find_ancestors';})($nesting[0],$nesting);(function($base,$parent_nesting){var self=$module($base,'EventHandlers');var $nesting=[self].concat($parent_nesting),$EventHandlers_on$96,$EventHandlers_remove_listener$97,$EventHandlers_remove_listeners$98,$EventHandlers_event_handler$100,$EventHandlers_set_script$101;Opal.const_set($nesting[0],'EVENT_TYPES',["abort","afterprint","animatedend","animationiteration","animationstart","beforeprint","beforeunload","blur","canplay","canplaythrough","change","click","contextmenu","copy","cut","dblclick","drag","dragend","dragcenter","dragleave","dragover","dragstart","drop","durationchange","ended","error","focus","focusin","focusout","fullscreenchange","fullscreenerror","hashchange","input","invalid","keydown","keypress","keyup","load","loadeddata","loadedmetadata","loadstart","message","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","offline","online","open","pagehide","pageshow","paste","play","playing","popstate","progress","ratechange","resize","reset","scroll","search","seeked","select","show","stalled","storage","submit","suspend","timeupdate","toggle","touchcancel","touchend","touchmove","touchstart","transitionend","unload","volumechange","waiting","wheel"]);Opal.const_set($nesting[0],'EVENT_GENRES',$hash2(["click","contextmenu","dblclick","mouseenter","mouseleave","mouseover","mouseup","mousedown","mousemove","mouseout","keydown","keypress","keyup","touchcancel","touchmove","touchstart","touchend","animationstart","animationend","animationiteration","animationpause","animationresume","animationstop","input","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","wheel","abort","beforeunload","error","load","resize","scroll","select","unload","blur","focus","focusin","focusout","afterprint","beforeprint","canplay","canplaythrough","change","fullscreenchange","fullscreenerror","invalid","loadeddata","loadedmetadata","message","offline","online","open","close","pause","play","playing","progress","changerate","reset","search","seek","seeking","show","hide","stalled","submit","suspend","timeupdate","toggle","waiting","copy","cut","paste","pagehide","pageshow","popstate","loadstart","storage","credentialchanged"],{"click":"mouse","contextmenu":"mouse","dblclick":"mouse","mouseenter":"mouse","mouseleave":"mouse","mouseover":"mouse","mouseup":"mouse","mousedown":"mouse","mousemove":"mouse","mouseout":"mouse","keydown":"keyboard","keypress":"keyboard","keyup":"keyboard","touchcancel":"touch","touchmove":"touch","touchstart":"touch","touchend":"touch","animationstart":"animation","animationend":"animation","animationiteration":"animation","animationpause":"animation","animationresume":"animation","animationstop":"animation","input":"input","drag":"drag","dragend":"drag","dragenter":"drag","dragleave":"drag","dragover":"drag","dragstart":"drag","drop":"drag","wheel":"wheel","abort":"ui","beforeunload":"ui","error":"ui","load":"ui","resize":"ui","scroll":"ui","select":"ui","unload":"ui","blur":"focus","focus":"focus","focusin":"focus","focusout":"focus","afterprint":"event","beforeprint":"event","canplay":"event","canplaythrough":"event","change":"event","fullscreenchange":"event","fullscreenerror":"event","invalid":"event","loadeddata":"event","loadedmetadata":"event","message":"event","offline":"event","online":"event","open":"event","close":"event","pause":"event","play":"event","playing":"event","progress":"event","changerate":"event","reset":"event","search":"event","seek":"event","seeking":"event","show":"event","hide":"event","stalled":"event","submit":"event","suspend":"event","timeupdate":"event","toggle":"event","waiting":"event","copy":"clipboard","cut":"clipboard","paste":"clipboard","pagehide":"transition","pageshow":"transition","popstate":"history","loadstart":"progress","storage":"storage","credentialchanged":"ui"}));Opal.const_set($nesting[0],'EVENT_FIELDS',$hash2(["mouse","keyboard","touch","animation","input","drag","wheel","ui","focus","event","transition","history","progress","storage","clipboard"],{"mouse":["altKey","button","buttons","clientX","clientY","ctrlKey","metaKey","movementX","movementY","offsetX","offsetY","pageX","pageY","screenX","screenY","shiftKey","which","detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"keyboard":["altKey","charCode","code","ctrlKey","metaKey","isComposing","key","keyCode","location","shift","repeat","shiftKey","which","detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"touch":["altKey","ctrlKey","metaKey","shiftKey","detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"animation":["animationName","elapsedTime","pseudoElement","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"input":["data","inputType","isComposing","detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"drag":["dataTranser","altKey","button","buttons","clientX","clientY","ctrlKey","metaKey","movementX","movementY","offsetX","offsetY","pageX","pageY","screenX","screenY","shiftKey","which","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"wheel":["deltaX","deltaY","deltaZ","deltaMode","altKey","button","buttons","clientX","clientY","ctrlKey","metaKey","movementX","movementY","offsetX","offsetY","pageX","pageY","screenX","screenY","shiftKey","which","detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"ui":["detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"focus":["relatedTarget","detail","view","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"event":["bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"transition":["persisted","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"history":["state","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"progress":["lengthComputable","loaded","total","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"storage":["key","newValue","oldValue","storageArea","url","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"],"clipboard":["clipboardData","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","isTrusted","target","timeStamp"]}));Opal.def(self,'$on',$EventHandlers_on$96=function $$on(the_event_type,captured){var $iter=$EventHandlers_on$96.$$p,block=$iter||nil,self=this,result=nil,$writer=nil;if(self.event_handlers==null)self.event_handlers=nil;if(self.event_listeners==null)self.event_listeners=nil;if($iter)$EventHandlers_on$96.$$p=null;if($iter)$EventHandlers_on$96.$$p=null;;if(the_event_type==null){the_event_type=nil;};if(captured==null){captured=false;};result=false;if($truthy(self.event_handlers['$is_a?']($$$('::','Hash')))){}else{self.event_handlers=$hash2([],{});self.event_listeners=$hash2([],{});};if($truthy(the_event_type['$is_any?']($$$('::','String'),$$$('::','Symbol')))){if($truthy(block['$respond_to?']("call"))){$writer=[the_event_type.$to_s().$downcase().$to_sym(),block];$send(self.event_handlers,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=[the_event_type.$to_s().$downcase().$to_sym(),self.$method("event_handler").$to_proc()];$send(self.event_listeners,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.$element().addEventListener(the_event_type.$to_s().$downcase(),self.event_listeners['$[]'](the_event_type.$to_s().$downcase().$to_sym()),captured);result=true;}};return result;},$EventHandlers_on$96.$$arity=-1);Opal.def(self,'$remove_listener',$EventHandlers_remove_listener$97=function $$remove_listener(the_event_type){var self=this,$ret_or_34=nil;if(self.event_handlers==null)self.event_handlers=nil;if(self.event_listeners==null)self.event_listeners=nil;if(the_event_type==null){the_event_type=nil;};if($truthy((function(){if($truthy(($ret_or_34=self.event_handlers['$[]'](the_event_type.$to_s().$downcase().$to_sym())))){return self.event_listeners['$[]'](the_event_type.$to_s().$downcase().$to_sym())}else{return $ret_or_34};return nil;})())){self.$element().removeEventListener(the_event_type.$to_s().$downcase(),self.event_listeners['$[]'](the_event_type.$to_s().$downcase().$to_sym()));;self.event_handlers.$delete(the_event_type.$to_s().$downcase().$to_sym());self.event_listeners.$delete(the_event_type.$to_s().$downcase().$to_sym());};return true;},$EventHandlers_remove_listener$97.$$arity=-1);Opal.def(self,'$remove_listeners',$EventHandlers_remove_listeners$98=function $$remove_listeners(){var $$99,self=this;if(self.event_handlers==null)self.event_handlers=nil;$send(self.event_handlers.$keys().$clone(),'each',[],($$99=function(the_event_type){var self=$$99.$$s==null?this:$$99.$$s;if(the_event_type==null){the_event_type=nil;};return self.$remove_listener(the_event_type);},$$99.$$s=self,$$99.$$arity=1,$$99));return true;},$EventHandlers_remove_listeners$98.$$arity=0);Opal.def(self,'$event_handler',$EventHandlers_event_handler$100=function $$event_handler(the_event){var self=this,the_type=nil,event_record=nil,genre=nil,$ret_or_35=nil,fields=nil;if(self.event_handlers==null)self.event_handlers=nil;the_type=(the_event.type).$to_s().$downcase().$to_sym();event_record=$hash2([],{});if($truthy(self.event_handlers['$[]'](the_type))){genre=(function(){if($truthy(($ret_or_35=$$$($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'EventHandlers'),'EVENT_GENRES')['$[]'](the_type)))){return $ret_or_35}else{return "event"};return nil;})();if($truthy(genre)){fields=$$$($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'EventHandlers'),'EVENT_FIELDS')['$[]'](genre);if($truthy(fields)){serializer=function thisOne(e){if(e){var o={eventName:e.toString(),altKey:e.altKey,bubbles:e.bubbles,button:e.button,buttons:e.buttons,cancelBubble:e.cancelBubble,cancelable:e.cancelable,clientX:e.clientX,clientY:e.clientY,composed:e.composed,ctrlKey:e.ctrlKey,currentTarget:e.currentTarget?e.currentTarget.outerHTML:null,defaultPrevented:e.defaultPrevented,detail:e.detail,eventPhase:e.eventPhase,fromElement:e.fromElement?e.fromElement.outerHTML:null,isTrusted:e.isTrusted,layerX:e.layerX,layerY:e.layerY,metaKey:e.metaKey,movementX:e.movementX,movementY:e.movementY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,relatedTarget:e.relatedTarget?e.relatedTarget.outerHTML:null,returnValue:e.returnValue,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey,sourceCapabilities:e.sourceCapabilities?e.sourceCapabilities.toString():null,target:e.target?e.target.outerHTML:null,timeStamp:e.timeStamp,toElement:e.toElement?e.toElement.outerHTML:null,type:e.type,view:e.view?e.view.toString():null,which:e.which,x:e.x,y:e.y};return o;};};event_record=JSON.stringify(serializer(the_event));;event_record=$$$('::','JSON').$parse(event_record.$to_s(),$hash2(["symbolize_names"],{"symbolize_names":true}));};};return self.event_handlers['$[]'](the_type).$call(event_record);}else{return nil};},$EventHandlers_event_handler$100.$$arity=1);return(Opal.def(self,'$set_script',$EventHandlers_set_script$101=function $$set_script(the_script_body,alternate_target){var self=this,result=nil,the_error=nil;if(the_script_body==null){the_script_body="";};if(alternate_target==null){alternate_target=nil;};result=false;if($truthy($rb_gt(the_script_body.$size(),0))){try{if($truthy(the_script_body['$base64?']())){the_script_body=the_script_body.$decode64()};if($truthy(alternate_target)){alternate_target.$remove_listeners();alternate_target.$instance_eval(the_script_body);}else{self.$remove_listeners();self.$instance_eval(the_script_body);};result=true;}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) +try{self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":$hash2(["script"],{"script":the_script_body})}))}finally{Opal.pop_exception();}}else{throw $err;}};};return result;},$EventHandlers_set_script$101.$$arity=-1),nil)&&'set_script';})($nesting[0],$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Animation');var $nesting=[self].concat($parent_nesting),$Animation_initialize$102,$Animation_update_targets$104,$Animation_update_origin$105,$Animation_update_destination$106,$Animation_update_options$107,$Animation_uuid$109,$Animation_compile$110,$Animation_start$121,$Animation_stop$123,$Animation_pause$125,$Animation_resume$127,$Animation_included$129,$Animation_each_included$131,$Animation_broadcast$133;self.$$prototype.uuid=self.$$prototype.target_list=self.$$prototype.targets=self.$$prototype.origin=self.$$prototype.destination=self.$$prototype.options=self.$$prototype.tweens=nil;self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'EventHandlers'));Opal.def(self,'$initialize',$Animation_initialize$102=function $$initialize(details,the_uuid){var $$103,self=this,the_options=nil,callback_map=nil,$ret_or_36=nil;if(details==null){details=$hash2([],{});};if(the_uuid==null){the_uuid=nil;};self.event_handlers=$hash2([],{});self.event_listeners=$hash2([],{});if($truthy(details['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(details['$[]']("origin"))){if($truthy(details['$[]']("origin")['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.origin=details['$[]']("origin").$unpersist()}else{self.origin=details['$[]']("origin")}}else{self.origin=nil};if($truthy(details['$[]']("destination"))){}else{self.$raise($$($nesting,'ArgumentError'),"You MUST provide a :destination state for the object.")};if($truthy(details['$[]']("destination")['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.destination=details['$[]']("destination").$unpersist()}else{self.destination=details['$[]']("destination")};if($truthy(details['$[]']("options"))){self.options=$hash2([],{});if($truthy(details['$[]']("options")['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){the_options=details['$[]']("options").$unpersist()}else{the_options=details['$[]']("options")};callback_map=$hash2(["animationstart","animationend","animationiteration","animationstop","animationpause","animationresume"],{"animationstart":"start","animationend":"complete","animationiteration":"update","animationstop":"stop","animationpause":"pause","animationresume":"resume"});$send(the_options,'each_pair',[],($$103=function(the_key,the_value){var self=$$103.$$s==null?this:$$103.$$s,$writer=nil;if(self.event_handlers==null)self.event_handlers=nil;if(self.options==null)self.options=nil;if(the_key==null){the_key=nil;};if(the_value==null){the_value=nil;};if($truthy(callback_map.$keys()['$include?'](the_key))){if($truthy(the_value['$respond_to?']("call"))){$writer=[the_key,the_value];$send(self.event_handlers,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=[the_key,the_value];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;}else{return self.$log_warn(""+"Attempted to pass an invalid object as an event handler. "+(the_key.$inspect())+" --> "+(the_value.$inspect()))}}else{$writer=[the_key,the_value];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$$103.$$s=self,$$103.$$arity=2,$$103));}else{self.options=nil};if($truthy(details['$[]']("targets"))){}else{self.$raise($$($nesting,'ArgumentError'),"You MUST provide a one or more :targets.")};if($truthy(details['$[]']("targets")['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.target_list=details['$[]']("targets").$unpersist()}else{self.target_list=details['$[]']("targets")};};self.uuid=(function(){if($truthy(($ret_or_36=the_uuid))){return $ret_or_36}else{return $$$('::','GxG').$uuid_generate()};return nil;})().$to_s().$to_sym();self.targets=nil;self.tweens=[];return self;},$Animation_initialize$102.$$arity=-1);Opal.def(self,'$update_targets',$Animation_update_targets$104=function $$update_targets(data){var self=this,result=nil;if(data==null){data=nil;};result=false;if($truthy(data['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(data['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.target_list=data.$unpersist()}else{self.target_list=data};result=true;};return result;},$Animation_update_targets$104.$$arity=-1);Opal.def(self,'$update_origin',$Animation_update_origin$105=function $$update_origin(data){var self=this,result=nil;if(data==null){data=nil;};result=false;if($truthy(data['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(data['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.origin=data.$unpersist()}else{self.origin=data};result=true;};return result;},$Animation_update_origin$105.$$arity=-1);Opal.def(self,'$update_destination',$Animation_update_destination$106=function $$update_destination(data){var self=this,result=nil;if(data==null){data=nil;};result=false;if($truthy(data['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(data['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.destination=data.$unpersist()}else{self.destination=data};result=true;};return result;},$Animation_update_destination$106.$$arity=-1);Opal.def(self,'$update_options',$Animation_update_options$107=function $$update_options(data){var $$108,self=this,result=nil,the_options=nil,callback_map=nil;if(data==null){data=nil;};result=false;if($truthy(data['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(data['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){the_options=data.$unpersist()}else{the_options=data};self.options=$hash2([],{});callback_map=$hash2(["animationstart","animationend","animationiteration","animationstop","animationpause","animationresume"],{"animationstart":"start","animationend":"complete","animationiteration":"update","animationstop":"stop","animationpause":"pause","animationresume":"resume"});$send(the_options,'each_pair',[],($$108=function(the_key,the_value){var self=$$108.$$s==null?this:$$108.$$s,$writer=nil;if(self.event_handlers==null)self.event_handlers=nil;if(self.options==null)self.options=nil;if(the_key==null){the_key=nil;};if(the_value==null){the_value=nil;};if($truthy(callback_map.$keys()['$include?'](the_key))){if($truthy(the_value['$respond_to?']("call"))){$writer=[the_key,the_value];$send(self.event_handlers,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=[the_key,the_value];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;}else{return self.$log_warn(""+"Attempted to pass an invalid object as an event handler. "+(the_key.$inspect())+" --> "+(the_value.$inspect()))}}else{$writer=[the_key,the_value];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$$108.$$s=self,$$108.$$arity=2,$$108));result=true;};return result;},$Animation_update_options$107.$$arity=-1);Opal.def(self,'$uuid',$Animation_uuid$109=function $$uuid(){var self=this;return self.uuid},$Animation_uuid$109.$$arity=0);Opal.def(self,'$compile',$Animation_compile$110=function $$compile(){var $$111,$$116,$$117,$$118,$$119,$$120,self=this,result=nil,native_targets=nil,from_state=nil,to_state=nil,options=nil,callback_map=nil,the_error=nil;result=false;try{self.targets=[];native_targets=[];$send(self.target_list.$keys(),'each',[],($$111=function(the_method){var self=$$111.$$s==null?this:$$111.$$s,$$112,$$114,$$115;if(self.target_list==null)self.target_list=nil;if(the_method==null){the_method=nil;};if(the_method['$==']("class")){if($truthy(self.target_list['$[]']("class")['$is_a?']($$$('::','String')))){}else{self.$raise($$($nesting,'Exception'),""+"You MUST provide :class target as a String, not: "+(self.target_list['$[]']("class").$class().$inspect()))};$send(self.target_list['$[]']("class").$split(" "),'each',[],($$112=function(the_classname){var self=$$112.$$s==null?this:$$112.$$s,$$113,found_list=nil,found_length=nil;if(the_classname==null){the_classname=nil;};if($truthy($rb_gt(the_classname.$size(),0))){found_list=document.getElementsByClassName(the_classname);found_length=(found_list.length).$to_i();if($truthy($rb_gt(found_length,0))){return $send(Opal.Range.$new(0,$rb_minus(found_length,1),false),'each',[],($$113=function(the_index){var self=$$113.$$s==null?this:$$113.$$s,the_element=nil;if(self.targets==null)self.targets=nil;if(the_index==null){the_index=nil;};the_element=found_list.item(the_index);if($truthy(self.targets['$include?'](the_element))){return nil}else{return self.targets['$<<'](the_element)};},$$113.$$s=self,$$113.$$arity=1,$$113))}else{return nil};}else{return nil};},$$112.$$s=self,$$112.$$arity=1,$$112));};if(the_method['$==']("objects")){if($truthy(self.target_list['$[]']("objects")['$is_a?']($$$('::','Array')))){}else{self.$raise($$($nesting,'Exception'),""+"You MUST provide :object target list as an Array, not: "+(self.target_list['$[]']("objects").$class().$inspect()))};$send(self.target_list['$[]']("objects"),'each',[],($$114=function(the_reference){var self=$$114.$$s==null?this:$$114.$$s,found_object=nil,element_id=nil,found_element=nil;if(self.targets==null)self.targets=nil;if(the_reference==null){the_reference=nil;};found_object=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$find_object(the_reference.$to_s().$to_sym());if($truthy(found_object)){element_id=found_object.$element().attributes.getNamedItem('id')||0;if($truthy(element_id==0)){return nil}else{found_element=document.getElementById(element_id);if($truthy(found_element)){if($truthy(self.targets['$include?'](found_element))){return nil}else{return self.targets['$<<'](found_element)}}else{return nil};};}else{return nil};},$$114.$$s=self,$$114.$$arity=1,$$114));};if(the_method['$==']("elements")){if($truthy(self.target_list['$[]']("elements")['$is_a?']($$$('::','Array')))){}else{self.$raise($$($nesting,'Exception'),""+"You MUST provide :elements target list as an Array, not: "+(self.target_list['$[]']("elements").$class().$inspect()))};$send(self.target_list['$[]']("elements"),'each',[],($$115=function(the_element){var self=$$115.$$s==null?this:$$115.$$s,element_id=nil,found_element=nil;if(self.targets==null)self.targets=nil;if(the_element==null){the_element=nil;};element_id=the_element.attributes.getNamedItem('id')||0;if($truthy(element_id==0)){return nil}else{element_id=element_id.value;found_element=document.getElementById(element_id);if($truthy(found_element)){if($truthy(self.targets['$include?'](found_element))){return nil}else{return self.targets['$<<'](found_element)}}else{return nil};};},$$115.$$s=self,$$115.$$arity=1,$$115));};if(the_method['$==']("assets")){return nil}else{return nil};},$$111.$$s=self,$$111.$$arity=1,$$111));if($truthy($rb_gt(self.targets.$size(),0))){}else{self.$puts("No valid targets resulted.")};$send(self.targets,'each',[],($$116=function(the_element){var self=$$116.$$s==null?this:$$116.$$s;if(the_element==null){the_element=nil;};return native_targets.push(the_element);},$$116.$$s=self,$$116.$$arity=1,$$116));if($truthy(self.origin['$is_a?']($$$('::','Hash')))){if($truthy($rb_gt(self.origin.$size(),0))){from_state=$hash2([],{});$send(self.origin,'each_pair',[],($$117=function(the_key,the_value){var self=$$117.$$s==null?this:$$117.$$s,$ret_or_37=nil,new_key=nil,$writer=nil;if(the_key==null){the_key=nil;};if(the_value==null){the_value=nil;};if($truthy((function(){if($truthy(($ret_or_37=the_key['$==']("attribue")))){return $ret_or_37}else{return the_key['$==']("attribute")};return nil;})())){new_key="attr"}else{new_key=the_key};$writer=[new_key,the_value];$send(from_state,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$$117.$$s=self,$$117.$$arity=2,$$117));}else{from_state=nil}}else{from_state=nil};if($truthy($rb_gt(self.destination.$size(),0))){to_state=$hash2([],{});$send(self.destination,'each_pair',[],($$118=function(the_key,the_value){var self=$$118.$$s==null?this:$$118.$$s,$ret_or_38=nil,new_key=nil,$writer=nil;if(the_key==null){the_key=nil;};if(the_value==null){the_value=nil;};if($truthy((function(){if($truthy(($ret_or_38=the_key['$==']("attribue")))){return $ret_or_38}else{return the_key['$==']("attribute")};return nil;})())){new_key="attr"}else{new_key=the_key};$writer=[new_key,the_value];$send(to_state,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$$118.$$s=self,$$118.$$arity=2,$$118));}else{self.$raise($$($nesting,'Exception'),""+"You MUST define a valid :destination state. not: "+(self.destination.$inspect()))};if($truthy(self.options['$is_a?']($$$('::','Hash')))){if($truthy($rb_gt(self.options.$size(),0))){options=$hash2([],{});callback_map=$hash2(["animationstart","animationend","animationiteration","animationstop","animationpause","animationresume"],{"animationstart":"start","animationend":"complete","animationiteration":"update","animationstop":"stop","animationpause":"pause","animationresume":"resume"});$send(self.options,'each_pair',[],($$119=function(the_key,the_value){var self=$$119.$$s==null?this:$$119.$$s,new_key=nil,$writer=nil;if(self.event_handlers==null)self.event_handlers=nil;if(the_key==null){the_key=nil;};if(the_value==null){the_value=nil;};if($truthy(callback_map.$keys()['$include?'](the_key))){new_key=callback_map['$[]'](the_key);if($truthy(self.event_handlers['$[]'](the_key)['$respond_to?']("call"))){$writer=[new_key,self.event_handlers['$[]'](the_key)];$send(options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};}else if($truthy(["start_time"]['$include?'](the_key))){return nil}else{$writer=[the_key,the_value];$send(options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$$119.$$s=self,$$119.$$arity=2,$$119));}else{options=nil}}else{options=nil};self.tweens=[];$send(self.targets,'each',[],($$120=function(the_target){var self=$$120.$$s==null?this:$$120.$$s;if(self.tweens==null)self.tweens=nil;if(the_target==null){the_target=nil;};if($truthy(from_state)){if($truthy(options)){return self.tweens['$<<'](KUTE.fromTo(the_target,from_state.$to_n(),to_state.$to_n(),options.$to_n()))}else{return self.tweens['$<<'](KUTE.fromTo(the_target,from_state.$to_n(),to_state.$to_n()))}}else if($truthy(options)){return self.tweens['$<<'](KUTE.to(the_target,to_state.$to_n(),options.$to_n()))}else{return self.tweens['$<<'](KUTE.to(the_target,to_state.$to_n()))};},$$120.$$s=self,$$120.$$arity=1,$$120));result=true;}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) +try{self.$log_error($hash2(["error"],{"error":the_error}));self.targets=nil;self.tweens=[];}finally{Opal.pop_exception();}}else{throw $err;}};;return result;},$Animation_compile$110.$$arity=0);Opal.def(self,'$start',$Animation_start$121=function $$start(the_time){var $$122,self=this;if(the_time==null){the_time=nil;};if($truthy($rb_gt(self.tweens.$size(),0))){}else{self.$compile()};if($truthy(the_time['$is_a?']($$$('::','Numeric')))){}else{the_time=window.performance.now()};if($truthy($rb_gt(self.tweens.$size(),0))){return $send(self.tweens,'each',[],($$122=function(the_tween){var self=$$122.$$s==null?this:$$122.$$s;if(the_tween==null){the_tween=nil;};return the_tween.start(the_time);},$$122.$$s=self,$$122.$$arity=1,$$122))}else{return nil};},$Animation_start$121.$$arity=-1);Opal.def(self,'$stop',$Animation_stop$123=function $$stop(){var $$124,self=this;if($truthy($rb_gt(self.tweens.$size(),0))){return $send(self.tweens,'each',[],($$124=function(the_tween){var self=$$124.$$s==null?this:$$124.$$s;if(the_tween==null){the_tween=nil;};return the_tween.stop();},$$124.$$s=self,$$124.$$arity=1,$$124))}else{return nil}},$Animation_stop$123.$$arity=0);Opal.def(self,'$pause',$Animation_pause$125=function $$pause(){var $$126,self=this;if($truthy($rb_gt(self.tweens.$size(),0))){return $send(self.tweens,'each',[],($$126=function(the_tween){var self=$$126.$$s==null?this:$$126.$$s;if(the_tween==null){the_tween=nil;};return the_tween.pause();},$$126.$$s=self,$$126.$$arity=1,$$126))}else{return nil}},$Animation_pause$125.$$arity=0);Opal.def(self,'$resume',$Animation_resume$127=function $$resume(){var $$128,self=this;if($truthy($rb_gt(self.tweens.$size(),0))){return $send(self.tweens,'each',[],($$128=function(the_tween){var self=$$128.$$s==null?this:$$128.$$s;if(the_tween==null){the_tween=nil;};return the_tween.resume();},$$128.$$s=self,$$128.$$arity=1,$$128))}else{return nil}},$Animation_resume$127.$$arity=0);Opal.def(self,'$included',$Animation_included$129=function $$included(){var $$130,self=this,result=nil;result=[];if($truthy(self.targets)){$send(self.targets,'each',[],($$130=function(the_element){var self=$$130.$$s==null?this:$$130.$$s,element_id=nil,found_object=nil;if(the_element==null){the_element=nil;};element_id=the_element.attributes.getNamedItem('id')||0;if($truthy(element_id==0)){return nil}else{element_id=element_id.value;found_object=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$find_child(element_id.$to_s());if($truthy(found_object)){return result['$<<'](found_object)}else{return nil};};},$$130.$$s=self,$$130.$$arity=1,$$130))};return result;},$Animation_included$129.$$arity=0);Opal.def(self,'$each_included',$Animation_each_included$131=function $$each_included(){var $iter=$Animation_each_included$131.$$p,block=$iter||nil,$$132,self=this;if($iter)$Animation_each_included$131.$$p=null;if($iter)$Animation_each_included$131.$$p=null;;if($truthy(block['$respond_to?']("call"))){return $send(self.$included(),'each',[],($$132=function(the_object){var self=$$132.$$s==null?this:$$132.$$s;if(the_object==null){the_object=nil;};return block.$call(the_object);},$$132.$$s=self,$$132.$$arity=1,$$132))}else{return self.$included().$each()};},$Animation_each_included$131.$$arity=0);return(Opal.def(self,'$broadcast',$Animation_broadcast$133=function $$broadcast(the_method,the_parameters){var $$134,self=this;if(the_method==null){the_method=nil;};if(the_parameters==null){the_parameters=nil;};return $send(self,'each_included',[],($$134=function(the_object){var self=$$134.$$s==null?this:$$134.$$s;if(the_object==null){the_object=nil;};return the_object.$send(the_method,the_parameters);},$$134.$$s=self,$$134.$$arity=1,$$134));},$Animation_broadcast$133.$$arity=-1),nil)&&'broadcast';})($nesting[0],null,$nesting);(function($base,$parent_nesting){var self=$module($base,'AnimationSupport');var $nesting=[self].concat($parent_nesting),$AnimationSupport_animate$135,$AnimationSupport_show$136,$AnimationSupport_hide$138;Opal.def(self,'$animate',$AnimationSupport_animate$135=function $$animate(animation_parameters){var self=this,the_animation=nil,start_time=nil;if(animation_parameters==null){animation_parameters=nil;};if($truthy(animation_parameters['$[]']("destination")['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){the_animation=$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'Animation').$new($hash2(["targets","origin","destination","options"],{"targets":$hash2(["elements"],{"elements":[self.$element()]}),"origin":animation_parameters['$[]']("origin"),"destination":animation_parameters['$[]']("destination"),"options":animation_parameters['$[]']("options")}));start_time=window.performance.now();if($truthy(animation_parameters['$[]']("options")['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){start_time=animation_parameters['$[]']("options")['$[]']("start_time")};the_animation.$compile();the_animation.$start(start_time);return true;}else{self.$log_warn(""+"Ignoring invalid animation: NO valid :destination state specified (required). not: "+(animation_parameters['$[]']("destination").$inspect()));return false;};},$AnimationSupport_animate$135.$$arity=-1);Opal.def(self,'$show',$AnimationSupport_show$136=function $$show(transition_parameters){var $iter=$AnimationSupport_show$136.$$p,block=$iter||nil,$$137,self=this,$writer=nil;if($iter)$AnimationSupport_show$136.$$p=null;if($iter)$AnimationSupport_show$136.$$p=null;;if(transition_parameters==null){transition_parameters=nil;};if($truthy(transition_parameters['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(transition_parameters['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){transition_parameters=transition_parameters.$unpersist()};if($truthy(transition_parameters['$[]']("destination")['$is_a?']($$$('::','Hash')))){if($truthy(transition_parameters['$[]']("destination")['$[]']("opacity")['$is_a?']($$$('::','Numeric')))){if($truthy(transition_parameters['$[]']("origin")['$is_a?']($$$('::','Hash')))){if($truthy(transition_parameters['$[]']("origin")['$[]']("opacity")['$is_a?']($$$('::','Numeric')))){self.$merge_style($hash2(["opacity"],{"opacity":transition_parameters['$[]']("origin")['$[]']("opacity")}))}else{self.$merge_style($hash2(["opacity"],{"opacity":0}))}}else{self.$merge_style($hash2(["opacity"],{"opacity":0}))}}};self.$set_state("hidden",false);if($truthy(block['$respond_to?']("call"))){if($truthy(transition_parameters['$[]']("options"))){}else{$writer=["options",$hash2([],{})];$send(transition_parameters,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};$writer=["animationend",$send($$($nesting,'Proc'),'new',[],($$137=function(){var self=$$137.$$s==null?this:$$137.$$s;return block.$call()},$$137.$$s=self,$$137.$$arity=0,$$137))];$send(transition_parameters['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};self.$animate(transition_parameters);}else{self.$set_state("hidden",false);if($truthy(block['$respond_to?']("call"))){block.$call()};};$$$($$$('::','GxG'),'Gui').$layout_refresh();return true;},$AnimationSupport_show$136.$$arity=-1);return(Opal.def(self,'$hide',$AnimationSupport_hide$138=function $$hide(transition_parameters){var $iter=$AnimationSupport_hide$138.$$p,block=$iter||nil,$$139,$$140,$$141,$$142,self=this,$writer=nil,set_state=nil,old_complete=nil;if($iter)$AnimationSupport_hide$138.$$p=null;if($iter)$AnimationSupport_hide$138.$$p=null;;if(transition_parameters==null){transition_parameters=nil;};if($truthy(transition_parameters['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(transition_parameters['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){transition_parameters=transition_parameters.$unpersist()};if($truthy(block['$respond_to?']("call"))){if($truthy(transition_parameters['$[]']("options"))){}else{$writer=["options",$hash2([],{})];$send(transition_parameters,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};$writer=["animationend",$send($$($nesting,'Proc'),'new',[],($$139=function(){var self=$$139.$$s==null?this:$$139.$$s;self.$set_state("hidden",true);return block.$call();},$$139.$$s=self,$$139.$$arity=0,$$139))];$send(transition_parameters['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;}else{set_state=nil;if($truthy(transition_parameters['$[]']("options"))){if($truthy(transition_parameters['$[]']("options")['$[]']("animationend")['$respond_to?']("call"))){old_complete=transition_parameters['$[]']("options")['$[]']("animationend");set_state=$send($$($nesting,'Proc'),'new',[],($$140=function(){var self=$$140.$$s==null?this:$$140.$$s;old_complete.$call();return self.$set_state("hidden",true);},$$140.$$s=self,$$140.$$arity=0,$$140));}else{set_state=$send($$($nesting,'Proc'),'new',[],($$141=function(){var self=$$141.$$s==null?this:$$141.$$s;return self.$set_state("hidden",true)},$$141.$$s=self,$$141.$$arity=0,$$141))}}else{$writer=["options",$hash2([],{})];$send(transition_parameters,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;set_state=$send($$($nesting,'Proc'),'new',[],($$142=function(){var self=$$142.$$s==null?this:$$142.$$s;return self.$set_state("hidden",true)},$$142.$$s=self,$$142.$$arity=0,$$142));};if($truthy(set_state)){if($truthy(transition_parameters['$[]']("options")['$is_a?']($$$('::','Hash')))){}else{$writer=["options",$hash2([],{})];$send(transition_parameters,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};$writer=["animationend",set_state];$send(transition_parameters['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};};self.$animate(transition_parameters);}else{self.$set_state("hidden",true);if($truthy(block['$respond_to?']("call"))){block.$call()};};$$$($$$('::','GxG'),'Gui').$layout_refresh();return true;},$AnimationSupport_hide$138.$$arity=-1),nil)&&'hide';})($nesting[0],$nesting);(function($base,$parent_nesting){var self=$module($base,'ApplicationSupport');var $nesting=[self].concat($parent_nesting),$ApplicationSupport_find_parent_type$143,$ApplicationSupport_viewport$144,$ApplicationSupport_tree_node$145,$ApplicationSupport_tree$146,$ApplicationSupport_window$147,$ApplicationSupport_find_parent$148,$ApplicationSupport_find_child_type$149,$ApplicationSupport_find_child$150,$ApplicationSupport_find_peer$152;Opal.def(self,'$find_parent_type',$ApplicationSupport_find_parent_type$143=function $$find_parent_type(the_type){var $a,self=this,result=nil,search_queue=nil,entry=nil;if(the_type==null){the_type=nil;};result=nil;if($truthy(the_type['$is_any?']($$$('::','Class'),$$$('::','String'),$$$('::','Symbol')))){if($truthy(the_type['$is_any?']($$$('::','String'),$$$('::','Symbol')))){the_type=$$$($$($nesting,'GxG'),'Gui').$component_class(the_type.$to_s().$to_sym())};if($truthy(the_type['$is_a?']($$$('::','Class')))){search_queue=[self];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(entry['$is_a?'](the_type))){result=entry;break;;};search_queue['$<<'](entry.$parent());};};};};return result;},$ApplicationSupport_find_parent_type$143.$$arity=-1);Opal.def(self,'$viewport',$ApplicationSupport_viewport$144=function $$viewport(){var self=this;return self.$find_parent_type($$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport'))},$ApplicationSupport_viewport$144.$$arity=0);Opal.def(self,'$tree_node',$ApplicationSupport_tree_node$145=function $$tree_node(){var self=this;return self.$find_parent_type($$$($$$($$$('::','GxG'),'Gui'),'TreeNode'))},$ApplicationSupport_tree_node$145.$$arity=0);Opal.def(self,'$tree',$ApplicationSupport_tree$146=function $$tree(){var self=this;return self.$find_parent_type($$$($$$($$$('::','GxG'),'Gui'),'Tree'))},$ApplicationSupport_tree$146.$$arity=0);Opal.def(self,'$window',$ApplicationSupport_window$147=function $$window(){var self=this;return self.$find_parent_type($$$($$$($$$('::','GxG'),'Gui'),'Window'))},$ApplicationSupport_window$147.$$arity=0);Opal.def(self,'$find_parent',$ApplicationSupport_find_parent$148=function $$find_parent(the_reference){var $a,self=this,result=nil,uuid_check=nil,search_queue=nil,entry=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_reference))){uuid_check=true}else{uuid_check=false};search_queue=[self.$parent()];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(uuid_check)){if(entry.$uuid()['$=='](the_reference)){result=entry;break;;}}else if(entry.$title()['$=='](the_reference)){result=entry;break;;};if($truthy(result)){}else{search_queue['$<<'](entry.$parent())};};};return result;},$ApplicationSupport_find_parent$148.$$arity=-1);Opal.def(self,'$find_child_type',$ApplicationSupport_find_child_type$149=function $$find_child_type(the_type){var $a,self=this,result=nil,search_queue=nil,entry=nil;if(the_type==null){the_type=nil;};result=nil;if($truthy(the_type['$is_any?']($$$('::','Class'),$$$('::','String'),$$$('::','Symbol')))){if($truthy(the_type['$is_any?']($$$('::','String'),$$$('::','Symbol')))){the_type=$$$($$($nesting,'GxG'),'Gui').$component_class(the_type.$to_s().$to_sym())};if($truthy(the_type['$is_a?']($$$('::','Class')))){search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(entry['$is_a?'](the_type))){result=entry;break;;}};};};};return result;},$ApplicationSupport_find_child_type$149.$$arity=-1);Opal.def(self,'$find_child',$ApplicationSupport_find_child$150=function $$find_child(the_reference){var $a,$$151,self=this,result=nil,uuid_check=nil,search_queue=nil,entry=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_reference))){uuid_check=true}else{uuid_check=false};search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(uuid_check)){if(entry.$uuid()['$=='](the_reference)){result=entry;break;;}}else if(entry.$title()['$=='](the_reference)){result=entry;break;;};if($truthy(result)){}else{$send(entry.$children().$values(),'each',[],($$151=function(the_child){var self=$$151.$$s==null?this:$$151.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$151.$$s=self,$$151.$$arity=1,$$151))};};};return result;},$ApplicationSupport_find_child$150.$$arity=-1);return(Opal.def(self,'$find_peer',$ApplicationSupport_find_peer$152=function $$find_peer(the_reference){var self=this;if(the_reference==null){the_reference=nil;};return self.$parent().$find_child(the_reference);},$ApplicationSupport_find_peer$152.$$arity=-1),nil)&&'find_peer';})($nesting[0],$nesting);(function($base,$parent_nesting){var self=$module($base,'ThemeSupport');var $nesting=[self].concat($parent_nesting),$ThemeSupport_theme_icon$153,$ThemeSupport_theme_background$154,$ThemeSupport_theme_widget$155,$ThemeSupport_theme_font$156,$ThemeSupport_site_asset$157;Opal.def(self,'$theme_icon',$ThemeSupport_theme_icon$153=function $$theme_icon(image_name){var self=this;if(image_name==null){image_name=nil;};return $$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$theme_icon(image_name);},$ThemeSupport_theme_icon$153.$$arity=-1);Opal.def(self,'$theme_background',$ThemeSupport_theme_background$154=function $$theme_background(image_name){var self=this;if(image_name==null){image_name=nil;};return $$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$theme_background(image_name);},$ThemeSupport_theme_background$154.$$arity=-1);Opal.def(self,'$theme_widget',$ThemeSupport_theme_widget$155=function $$theme_widget(image_name){var self=this;if(image_name==null){image_name=nil;};return $$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$theme_widget(image_name);},$ThemeSupport_theme_widget$155.$$arity=-1);Opal.def(self,'$theme_font',$ThemeSupport_theme_font$156=function $$theme_font(font_name){var self=this;if(font_name==null){font_name=nil;};return $$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$theme_font(font_name);},$ThemeSupport_theme_font$156.$$arity=-1);return(Opal.def(self,'$site_asset',$ThemeSupport_site_asset$157=function $$site_asset(asset_path){var self=this;if(asset_path==null){asset_path=nil;};return $$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$site_asset(asset_path);},$ThemeSupport_site_asset$157.$$arity=-1),nil)&&'site_asset';})($nesting[0],$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Factory');var $nesting=[self].concat($parent_nesting),$Factory_initialize$158,$Factory_create_element$159,$Factory_dasherize$161,$Factory_camelize$162;self.$attr_reader("body");Opal.def(self,'$initialize',$Factory_initialize$158=function $$initialize(target){var self=this;self.body=document.body;while(document.body.firstChild){document.body.removeChild(document.body.firstChild);};;},$Factory_initialize$158.$$arity=1);Opal.def(self,'$create_element',$Factory_create_element$159=function $$create_element(target,type,parent,options){var $$160,self=this,element=nil;if(options==null){options=$hash2([],{});};if(type['$==']("body")){element=document.body}else{element=document.createElement(type)};if(type['$==']("body")){}else if(options['$[]']("prepend")['$=='](true)){parent.$element().insertBefore(element,options['$[]']("prepend").$element())}else{parent.$element().appendChild(element)};element.classList.add(self.$dasherize(target.$class().$name()));if($truthy(options['$has_key?']("id")['$!']())){element.id=target.$uuid().$to_s()};$send(options,'each',[],($$160=function(name,value){var self=$$160.$$s==null?this:$$160.$$s,$case=nil;if(name==null){name=nil;};if(value==null){value=nil;};return(function(){$case=name;if("prepend"['$===']($case)){return nil} else if("content"['$===']($case)){return element.appendChild(document.createTextNode(value))} -else{return element.setAttribute(name,value)}})();},$$158.$$s=self,$$158.$$arity=2,$$158));return element;},$Factory_create_element$157.$$arity=-4);Opal.def(self,'$dasherize',$Factory_dasherize$159=function $$dasherize(class_name){var self=this,the_name=nil;the_name=class_name.$gsub("::","-").$downcase().$gsub("_","-");if(the_name['$[]'](0)['$==']("-")){the_name=the_name['$[]']($range(1,-1,false))};return the_name;},$Factory_dasherize$159.$$arity=1);return(Opal.def(self,'$camelize',$Factory_camelize$160=function $$camelize(class_name){var $$161,self=this;if($truthy(class_name['$!~'](/-/))){return class_name};return $send(class_name,'gsub',[/(?:-|(\/))([a-z\d]*)/],($$161=function(){var self=$$161.$$s==null?this:$$161.$$s,$a;return ""+((($a=$gvars['~'])===nil?nil:$a['$[]'](1)))+((($a=$gvars['~'])===nil?nil:$a['$[]'](2)).$capitalize())},$$161.$$s=self,$$161.$$arity=0,$$161)).$strip();},$Factory_camelize$160.$$arity=1),nil)&&'camelize';})($nesting[0],null,$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BaseElement');var $nesting=[self].concat($parent_nesting),$BaseElement_set_settings$162,$BaseElement_initialize$163,$BaseElement_parent$166,$BaseElement_root$167,$BaseElement_factory$168,$BaseElement_build$169;self.$$prototype.uuid=self.$$prototype.component=self.$$prototype.states=self.$$prototype.parent=nil;self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'ElementMethods'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'EventHandlers'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'AnimationSupport'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'ApplicationSupport'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'ThemeSupport'));self.$attr_reader("uuid","title","component","parent","children","element","domtype","settings");Opal.def(self,'$set_settings',$BaseElement_set_settings$162=function $$set_settings(the_settings){var self=this;if(the_settings==null){the_settings=nil;};return(self.settings=the_settings);},$BaseElement_set_settings$162.$$arity=-1);$alias(self,"settings=","set_settings");Opal.def(self,'$initialize',$BaseElement_initialize$163=function $$initialize(parent,options){var $$164,$$165,self=this,$ret_or_39=nil,$ret_or_40=nil,$ret_or_41=nil,$writer=nil;if(options==null){options=$hash2([],{});};if($truthy(options['$is_a?']($$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){self.uuid=options.$uuid().$to_s().$to_sym();self.title=options.$title().$to_s();}else{self.uuid=(function(){if($truthy(($ret_or_39=options['$[]']("uuid")))){return $ret_or_39}else{return $$$('::','GxG').$uuid_generate()};return nil;})().$to_s().$to_sym();self.title=(function(){if($truthy(($ret_or_40=options['$[]']("title")))){return $ret_or_40}else{return ""+"Untitled Component "+(self.uuid.$to_s())};return nil;})().$to_s();};self.component=(function(){if($truthy(($ret_or_41=options['$[]']("component")))){return $ret_or_41}else{return "unknown"};return nil;})().$to_s().$downcase().$to_sym();self.parent=parent;self.settings=options['$[]']("settings");self.children=$hash2([],{});self.element=nil;self.domtype="div";self.states=$hash2([],{});$writer=[self.component.$to_s().$gsub(".","-").$to_sym(),true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(options['$[]']("options")['$is_a?']($$$('::','Hash'),$$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){if($truthy(options['$[]']("options")['$[]']("states")['$is_a?']($$$('::','Array'),$$$($$$($$($nesting,'GxG'),'Database'),'DetachedArray')))){$send(options['$[]']("options")['$[]']("states"),'each',[],($$164=function(the_state){var self=$$164.$$s==null?this:$$164.$$s;if(self.states==null)self.states=nil;if(the_state==null){the_state=nil;};$writer=[the_state.$to_s().$to_sym(),true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];},$$164.$$s=self,$$164.$$arity=1,$$164))}};self.style=$hash2([],{});if($truthy(options['$[]']("options")['$is_a?']($$$('::','Hash'),$$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){if($truthy(options['$[]']("options")['$[]']("style")['$is_a?']($$$('::','Hash'),$$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){self.style=options['$[]']("options")['$[]']("style")}};self.options=$hash2([],{});if($truthy(options['$[]']("options")['$is_a?']($$$('::','Hash'),$$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){$send(options['$[]']("options"),'each_pair',[],($$165=function(the_option,the_value){var self=$$165.$$s==null?this:$$165.$$s;if(self.options==null)self.options=nil;if(the_option==null){the_option=nil;};if(the_value==null){the_value=nil;};if($truthy(["background-color","icon","label","data","content","uuid","title","opacity","window_title","menu","top","right","bottom","left","height","width","close","minimize","maximize","resize","scroll","modal","track","states","style"]['$include?'](the_option.$to_s().$to_sym()))){return nil}else{$writer=[the_option.$to_s().$to_sym(),the_value.$to_s()];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$$165.$$s=self,$$165.$$arity=2,$$165))};self.event_handlers=$hash2([],{});self.event_listeners=$hash2([],{});self.$creation();if($truthy(options['$[]']("options")['$is_a?']($$$('::','Hash'),$$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){if($truthy(options['$[]']("content")['$is_a?']($$$('::','String')))){self.$set_text(options['$[]']("content"))}};return self;},$BaseElement_initialize$163.$$arity=-2);Opal.def(self,'$parent',$BaseElement_parent$166=function $$parent(){var self=this;return self.parent},$BaseElement_parent$166.$$arity=0);Opal.def(self,'$root',$BaseElement_root$167=function $$root(){var $a,self=this,result=nil,search_queue=nil,entry=nil;result=nil;search_queue=[self.parent];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if(entry.$component()['$==']("page")){result=entry;break;;}else{search_queue['$<<'](entry.$parent())}};};return result;},$BaseElement_root$167.$$arity=0);Opal.def(self,'$factory',$BaseElement_factory$168=function $$factory(){var self=this;return self.$root().$factory()},$BaseElement_factory$168.$$arity=0);return(Opal.def(self,'$build',$BaseElement_build$169=function $$build(content_manifest,options){var self=this;if(content_manifest==null){content_manifest=nil;};if(options==null){options=$hash2([],{});};return self.$page().$build_components(self,content_manifest,options);},$BaseElement_build$169.$$arity=-1),nil)&&'build';})($nesting[0],null,$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BaseInputElement');var $nesting=[self].concat($parent_nesting),$BaseInputElement__before_create$170,$BaseInputElement_value$171,$BaseInputElement_value$eq$172,$BaseInputElement__after_create$173,$BaseInputElement_disable$174,$BaseInputElement_enable$175;self.$$prototype.options=self.$$prototype.element=self.$$prototype.disabled=nil;Opal.def(self,'$_before_create',$BaseInputElement__before_create$170=function $$_before_create(){var $iter=$BaseInputElement__before_create$170.$$p,$yield=$iter||nil,self=this,$ret_or_42=nil,$writer=nil,$ret_or_43=nil;if($iter)$BaseInputElement__before_create$170.$$p=null;$send2(self,$find_super(self,'_before_create',$BaseInputElement__before_create$170,false,true),'_before_create',[],null);self.domtype="input";if($truthy(($ret_or_42=self.options['$[]']("type")))){$ret_or_42}else{$writer=["type","text"];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options['$[]']("content"))){$writer=["value",self.options.$delete("content")];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};return(self.disabled=(function(){if($truthy(($ret_or_43=self.options['$[]']("disabled")))){return $ret_or_43}else{return false};return nil;})());},$BaseInputElement__before_create$170.$$arity=0);Opal.def(self,'$value',$BaseInputElement_value$171=function $$value(){var self=this;return self.element.value},$BaseInputElement_value$171.$$arity=0);Opal.def(self,'$value=',$BaseInputElement_value$eq$172=function(value){var self=this;return self.element.value=value},$BaseInputElement_value$eq$172.$$arity=1);Opal.def(self,'$_after_create',$BaseInputElement__after_create$173=function $$_after_create(){var $iter=$BaseInputElement__after_create$173.$$p,$yield=$iter||nil,self=this;if($iter)$BaseInputElement__after_create$173.$$p=null;$send2(self,$find_super(self,'_after_create',$BaseInputElement__after_create$173,false,true),'_after_create',[],null);if($truthy(self.disabled)){return self.$disable()}else{return nil};},$BaseInputElement__after_create$173.$$arity=0);Opal.def(self,'$disable',$BaseInputElement_disable$174=function $$disable(){var self=this;return self.$set_attribute("disabled","disabled")},$BaseInputElement_disable$174.$$arity=0);return(Opal.def(self,'$enable',$BaseInputElement_enable$175=function $$enable(){var self=this;return self.$clear_attribute("disabled")},$BaseInputElement_enable$175.$$arity=0),nil)&&'enable';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BaseClickableElement');var $nesting=[self].concat($parent_nesting),$BaseClickableElement__before_create$176;return(Opal.def(self,'$_before_create',$BaseClickableElement__before_create$176=function $$_before_create(){var $iter=$BaseClickableElement__before_create$176.$$p,$yield=$iter||nil,self=this;if($iter)$BaseClickableElement__before_create$176.$$p=null;return $send2(self,$find_super(self,'_before_create',$BaseClickableElement__before_create$176,false,true),'_before_create',[],null)},$BaseClickableElement__before_create$176.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Page');var $nesting=[self].concat($parent_nesting),$Page_set_settings$177,$Page_get_library$178,$Page_library_loaded$ques$181,$Page_load_library$184,$Page_load_libraries$187,$Page_application_open$190,$Page_site_asset$194,$Page_theme_icon$195,$Page_theme_background$196,$Page_theme_widget$197,$Page_theme_font$198,$Page_theme_window_title_layout$199,$Page_build_components$200,$Page_build$202,$Page_build_page$203,$Page_initialize$206,$Page_find_object_by_dom_id$210,$Page_find_object$212,$Page_find_object_by$214,$Page_register_object$216,$Page_unregister_object$217,$Page_factory$218,$Page_element$219,$Page_parent$220,$Page_root$221,$Page_domclear$222,$Page_clear$223;self.$$prototype.theme_prefix=self.$$prototype.settings=self.$$prototype.element=self.$$prototype.uuid=self.$$prototype.title=self.$$prototype.title_registry=self.$$prototype.factory=nil;self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'ElementMethods'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'EventHandlers'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'AnimationSupport'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'ApplicationSupport'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'ThemeSupport'));self.$attr_reader("uuid","title","component","parent","children","domtype","settings");Opal.def(self,'$set_settings',$Page_set_settings$177=function $$set_settings(the_settings){var self=this;if(the_settings==null){the_settings=nil;};return(self.settings=the_settings);},$Page_set_settings$177.$$arity=-1);$alias(self,"settings=","set_settings");Opal.def(self,'$get_library',$Page_get_library$178=function $$get_library(the_reference){var $$179,$$180,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy(the_reference['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){(function(){var $brk=Opal.new_brk();try{return $send($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries").$values(),'each',[],($$179=function(the_library){var self=$$179.$$s==null?this:$$179.$$s,$ret_or_44=nil,$ret_or_45=nil;if(the_library==null){the_library=nil;};if($truthy((function(){if($truthy(($ret_or_44=the_library.$title()['$=='](the_reference['$[]']("library").$to_s())))){return the_library.$type()['$==']((function(){if($truthy(($ret_or_45=the_reference['$[]']("type")))){return $ret_or_45}else{return the_library.$type()};return nil;})())}else{return $ret_or_44};return nil;})())){if($truthy(the_reference['$[]']("maximum"))){if($truthy(Opal.Range.$new(the_reference['$[]']("minimum").$to_f(),the_reference['$[]']("maximum").$to_f(),false)['$include?'](the_library.$version()))){result=the_library;Opal.brk(nil,$brk);}else{return nil}}else if($truthy($rb_ge(the_library.$version(),the_reference['$[]']("minimum").$to_f()))){result=the_library;Opal.brk(nil,$brk);}else{return nil}}else{return nil};},$$179.$$s=self,$$179.$$brk=$brk,$$179.$$arity=1,$$179))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()}else if($truthy($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries")['$[]'](the_reference.$to_s().$to_sym()))){result=$$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries")['$[]'](the_reference.$to_s().$to_sym())}else{(function(){var $brk=Opal.new_brk();try{return $send($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries").$values(),'each',[],($$180=function(the_library){var self=$$180.$$s==null?this:$$180.$$s;if(the_library==null){the_library=nil;};if(the_library.$title()['$=='](the_reference)){result=the_library;Opal.brk(nil,$brk);}else{return nil};},$$180.$$s=self,$$180.$$brk=$brk,$$180.$$arity=1,$$180))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};return result;},$Page_get_library$178.$$arity=-1);Opal.def(self,'$library_loaded?',$Page_library_loaded$ques$181=function(the_reference){var $$182,$$183,self=this,found=nil;if(the_reference==null){the_reference=nil;};if($truthy(the_reference['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){found=false;(function(){var $brk=Opal.new_brk();try{return $send($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries").$values(),'each',[],($$182=function(the_library){var self=$$182.$$s==null?this:$$182.$$s,$ret_or_46=nil,$ret_or_47=nil;if(the_library==null){the_library=nil;};if($truthy((function(){if($truthy(($ret_or_46=the_library.$title()['$=='](the_reference['$[]']("library").$to_s())))){return the_library.$type()['$==']((function(){if($truthy(($ret_or_47=the_reference['$[]']("type")))){return $ret_or_47}else{return the_library.$type()};return nil;})().$to_s())}else{return $ret_or_46};return nil;})())){if($truthy(the_reference['$[]']("maximum"))){if($truthy(Opal.Range.$new(the_reference['$[]']("minimum").$to_f(),the_reference['$[]']("maximum").$to_f(),false)['$include?'](the_library.$version()))){found=the_library['$loaded?']();Opal.brk(nil,$brk);}else{return nil}}else if($truthy($rb_ge(the_library.$version(),the_reference['$[]']("minimum").$to_f()))){found=the_library['$loaded?']();Opal.brk(nil,$brk);}else{return nil}}else{return nil};},$$182.$$s=self,$$182.$$brk=$brk,$$182.$$arity=1,$$182))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();return found;}else if($truthy($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries")['$[]'](the_reference.$to_s().$to_sym()))){return true}else{found=false;(function(){var $brk=Opal.new_brk();try{return $send($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries").$values(),'each',[],($$183=function(the_library){var self=$$183.$$s==null?this:$$183.$$s;if(the_library==null){the_library=nil;};if(the_library.$title()['$=='](the_reference)){found=the_library['$loaded?']();Opal.brk(nil,$brk);}else{return nil};},$$183.$$s=self,$$183.$$brk=$brk,$$183.$$arity=1,$$183))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();return found;};},$Page_library_loaded$ques$181.$$arity=-1);Opal.def(self,'$load_library',$Page_load_library$184=function $$load_library(criteria){var $iter=$Page_load_library$184.$$p,block=$iter||nil,$$185,self=this,maximum=nil,$ret_or_48=nil,$ret_or_49=nil;if($iter)$Page_load_library$184.$$p=null;if($iter)$Page_load_library$184.$$p=null;;if(criteria==null){criteria=nil;};if($truthy(criteria['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(criteria['$[]']("maximum"))){maximum=criteria['$[]']("maximum").$to_f()}else{maximum=nil};return $send($$$($$($nesting,'GxG'),'CONNECTION'),'library_pull',[$hash2(["library","type","minimum","maximum","dependencies","loaded"],{"library":criteria['$[]']("library").$to_s(),"type":(function(){if($truthy(($ret_or_48=criteria['$[]']("type")))){return $ret_or_48}else{return "text/ruby"};return nil;})().$to_s(),"minimum":(function(){if($truthy(($ret_or_49=criteria['$[]']("minimum")))){return $ret_or_49}else{return 0.0};return nil;})().$to_f(),"maximum":maximum,"dependencies":true,"loaded":$$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries").$keys()})],($$185=function(response){var self=$$185.$$s==null?this:$$185.$$s,$$186;if(response==null){response=nil;};if($truthy(response['$is_a?']($$$('::','Hash')))){if($truthy(response['$[]']("result")['$is_a?']($$$('::','Array')))){return $send(response['$[]']("result"),'each',[],($$186=function(the_record){var self=$$186.$$s==null?this:$$186.$$s,definition=nil,$writer=nil;if(the_record==null){the_record=nil;};if($truthy($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries").$keys()['$include?'](the_record['$[]']("uuid").$to_s().$to_sym()))){return nil}else{definition=the_record['$[]']("data");if($truthy(definition['$is_a?']($$$('::','String')))){if($truthy(definition['$base64?']())){definition=definition.$decode64()};if($truthy(definition['$json?']())){definition=$$$('::','JSON').$parse(definition,$hash2(["symbolize_names"],{"symbolize_names":true}))};if($truthy(definition['$is_a?']($$$('::','Hash')))){definition=$$$($$$('::','GxG'),'Database').$process_import(definition)};if($truthy(definition['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){$writer=[the_record['$[]']("uuid").$to_s().$to_sym(),$$$($$$('::','GxG'),'Library').$new(definition)];$send($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(block['$respond_to?']("call"))){return block.$call($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries")['$[]'](the_record['$[]']("uuid").$to_s().$to_sym()))}else{return nil};}else{return nil};}else{return nil};};},$$186.$$s=self,$$186.$$arity=1,$$186))}else{return nil}}else{return nil};},$$185.$$s=self,$$185.$$arity=1,$$185));}else{return nil};},$Page_load_library$184.$$arity=-1);Opal.def(self,'$load_libraries',$Page_load_libraries$187=function $$load_libraries(load_queue){var $iter=$Page_load_libraries$187.$$p,block=$iter||nil,$$188,self=this,result=nil;if($iter)$Page_load_libraries$187.$$p=null;if($iter)$Page_load_libraries$187.$$p=null;;if(load_queue==null){load_queue=[];};result=true;if($truthy(load_queue['$is_any?']($$$('::','Array'),$$$($$$($$$('::','GxG'),'Database'),'DetachedArray')))){(function(){var $brk=Opal.new_brk();try{return $send(load_queue,'each',[],($$188=function(the_requirement){var self=$$188.$$s==null?this:$$188.$$s,$$189;if(the_requirement==null){the_requirement=nil;};return(function(){var $brk=Opal.new_brk();try{return $send($$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object"),'load_library',[the_requirement],($$189=function(the_library){var self=$$189.$$s==null?this:$$189.$$s;if(the_library==null){the_library=nil;};if($truthy(the_library['$loaded?']())){return nil}else{self.$log_warn(""+"Unable to load library: "+(the_library.$title()));result=false;Opal.brk(nil,$brk);};},$$189.$$s=self,$$189.$$brk=$brk,$$189.$$arity=1,$$189))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();},$$188.$$s=self,$$188.$$brk=$brk,$$188.$$arity=1,$$188))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};if($truthy(block['$respond_to?']("call"))){block.$call(result)};return result;},$Page_load_libraries$187.$$arity=-1);Opal.def(self,'$application_open',$Page_application_open$190=function $$application_open(specifier,parameters){var $$191,$$192,self=this,result=nil,error_hander=nil;if(specifier==null){specifier=$hash2([],{});};if(parameters==null){parameters=$hash2([],{});};result=false;if($truthy(specifier['$is_a?']($$$('::','Hash')))){error_hander=$send($$($nesting,'Proc'),'new',[],($$191=function(){var self=$$191.$$s==null?this:$$191.$$s;return nil},$$191.$$s=self,$$191.$$arity=0,$$191));self.$set_busy(true);$send($$$($$($nesting,'GxG'),'CONNECTION'),'application_open',[specifier,error_hander],($$192=function(app_stub){var self=$$192.$$s==null?this:$$192.$$s,$$193;if(app_stub==null){app_stub=nil;};if($truthy(app_stub['$is_a?']($$$('::','Hash')))){if($truthy(app_stub['$[]']("result")['$is_a?']($$$('::','Hash')))){return $send($$$($$($nesting,'GxG'),'CONNECTION'),'pull_object',[app_stub['$[]']("result")['$[]']("location")],($$193=function(source_object){var self=$$193.$$s==null?this:$$193.$$s,$writer=nil;if(source_object==null){source_object=nil;};$writer=[app_stub['$[]']("result")['$[]']("application").$to_s().$to_sym(),$$$($$($nesting,'GxG'),'Application').$new(app_stub['$[]']("result").$merge($hash2(["source"],{"source":source_object})))];$send($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("processes"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;result=$$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("processes")['$[]'](app_stub['$[]']("result")['$[]']("application").$to_s().$to_sym()).$run(parameters);return self.$set_busy(false);},$$193.$$s=self,$$193.$$arity=1,$$193))}else{return self.$log_warn($rb_plus("Error opening Application: ",app_stub.$inspect()))}}else{return self.$log_warn(""+"Malformed response: "+(app_stub.$inspect()))};},$$192.$$s=self,$$192.$$arity=1,$$192));}else{self.$log_warn(""+"Invalid Argument: "+(specifier.$inspect()))};return result;},$Page_application_open$190.$$arity=-1);Opal.def(self,'$site_asset',$Page_site_asset$194=function $$site_asset(asset_path){var self=this,host_prefix=nil;if(asset_path==null){asset_path=nil;};if($truthy((window.location['href'])['$include?']("https://"))){host_prefix=$rb_plus("https://",window.location['host'])}else{host_prefix=$rb_plus("http://",window.location['host'])};if($truthy($$$($$$('::','GxG'),'CONNECTION').$relative_url().$to_s()['$[]'](0)['$!=']("/"))){host_prefix=$rb_plus(host_prefix,"/")};if($truthy(asset_path)){return $rb_plus(host_prefix,$$($nesting,'File').$expand_path($rb_plus($rb_plus($$$($$$('::','GxG'),'CONNECTION').$relative_url().$to_s(),"/"),asset_path.$to_s())));}else{return ""};},$Page_site_asset$194.$$arity=-1);Opal.def(self,'$theme_icon',$Page_theme_icon$195=function $$theme_icon(image_name){var self=this;if(image_name==null){image_name=nil;};if($truthy(image_name)){return $rb_plus($rb_plus(self.theme_prefix,"/icons/"),image_name.$to_s());}else{return ""};},$Page_theme_icon$195.$$arity=-1);Opal.def(self,'$theme_background',$Page_theme_background$196=function $$theme_background(image_name){var self=this;if(image_name==null){image_name=nil;};if($truthy(image_name)){return $rb_plus($rb_plus(self.theme_prefix,"/backgrounds/"),image_name.$to_s());}else{return ""};},$Page_theme_background$196.$$arity=-1);Opal.def(self,'$theme_widget',$Page_theme_widget$197=function $$theme_widget(image_name){var self=this;if(image_name==null){image_name=nil;};if($truthy(image_name)){return $rb_plus($rb_plus(self.theme_prefix,"/widgets/"),image_name.$to_s());}else{return ""};},$Page_theme_widget$197.$$arity=-1);Opal.def(self,'$theme_font',$Page_theme_font$198=function $$theme_font(font_name){var self=this;if(font_name==null){font_name=nil;};if($truthy(font_name)){return $rb_plus($rb_plus(self.theme_prefix,"/fonts/"),font_name.$to_s());}else{return ""};},$Page_theme_font$198.$$arity=-1);Opal.def(self,'$theme_window_title_layout',$Page_theme_window_title_layout$199=function $$theme_window_title_layout(){var self=this;return $hash2(["left","center","right"],{"left":["close","minimize","maximize"],"center":["title"],"right":[]})},$Page_theme_window_title_layout$199.$$arity=0);Opal.def(self,'$build_components',$Page_build_components$200=function $$build_components(root_object,content_manifest,options){var $a,$$201,self=this,result=nil,$ret_or_50=nil,build_queue=nil,record=nil;if(root_object==null){root_object=nil;};if(content_manifest==null){content_manifest=nil;};if(options==null){options=$hash2([],{});};result=false;if($truthy(root_object)){}else{root_object=$$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object")};if($truthy((function(){if($truthy(($ret_or_50=root_object))){return content_manifest['$is_any?']($$$('::','Array'),$$$($$$($$$('::','GxG'),'Database'),'DetachedArray'))}else{return $ret_or_50};return nil;})())){build_queue=[$hash2(["parent","content"],{"parent":root_object,"content":content_manifest})];while($truthy($rb_gt(build_queue.$size(),0))){record=build_queue.$shift();if($truthy(record)){$send(record['$[]']("content"),'each',[],($$201=function(the_entry){var self=$$201.$$s==null?this:$$201.$$s,new_object=nil,$ret_or_51=nil,$ret_or_52=nil,$ret_or_53=nil;if(the_entry==null){the_entry=nil;};new_object=record['$[]']("parent").$add_child(the_entry);if($truthy($rb_gt(the_entry['$[]']("content").$size(),0))){build_queue['$<<']($hash2(["parent","content"],{"parent":new_object,"content":the_entry['$[]']("content")}))};if($truthy((function(){if($truthy(($ret_or_51=the_entry['$[]']("component").$to_s().$downcase().$to_sym()['$==']("application_viewport")))){return options['$[]']("application")}else{return $ret_or_51};return nil;})())){new_object.$set_application(options['$[]']("application"));if($truthy(options['$[]']("application").$get_viewport(new_object.$uuid()))){}else{options['$[]']("application").$link_viewport(new_object)};};if($truthy((function(){if($truthy(($ret_or_52=the_entry['$[]']("component").$to_s().$downcase().$to_sym()['$==']("window")))){return options['$[]']("application")}else{return $ret_or_52};return nil;})())){options['$[]']("application").$link_window(new_object);new_object.$set_application(options['$[]']("application"));};if($truthy((function(){if($truthy(($ret_or_53=the_entry['$[]']("component").$to_s().$downcase().$to_sym()['$==']("dialog_box")))){return options['$[]']("application")}else{return $ret_or_53};return nil;})())){new_object.$set_application(options['$[]']("application"))};if($truthy(record['$[]']("parent")['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'Window')))){if($truthy(the_entry['$[]']("options")['$[]']("track"))){return record['$[]']("parent").$track_deltas(new_object.$uuid(),new_object,the_entry['$[]']("options")['$[]']("track"))}else{return nil}}else{return nil};},$$201.$$s=self,$$201.$$arity=1,$$201))};};result=true;};return result;},$Page_build_components$200.$$arity=-1);Opal.def(self,'$build',$Page_build$202=function $$build(content_manifest,options){var self=this;if(content_manifest==null){content_manifest=nil;};if(options==null){options=$hash2([],{});};return self.$build_components(self,content_manifest,options);},$Page_build$202.$$arity=-1);Opal.def(self,'$build_page',$Page_build_page$203=function $$build_page(page_definition){var $$204,$$205,self=this,$ret_or_54=nil;if(page_definition==null){page_definition=nil;};if($truthy(page_definition['$is_any?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.element=document.body;self.settings=page_definition['$[]']("settings");self.theme_prefix=$rb_plus($$$($$$('::','GxG'),'CONNECTION').$relative_url(),""+"/themes/"+((function(){if($truthy(($ret_or_54=self.settings['$[]']("theme")))){return $ret_or_54}else{return "default"};return nil;})()));self.uuid=page_definition.$uuid().$to_s().$to_sym();self.element.id=self.uuid.$to_s();self.title=self.settings['$[]']("page_title").$to_s();document.title=self.title.$to_s();self.component="org.gxg.gui.page";self.parent=self;self.children=$hash2([],{});self.domtype="body";self.states=$hash2(["org-gxg-gui-page"],{"org-gxg-gui-page":true});if($truthy(page_definition['$[]']("options")['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(page_definition['$[]']("options")['$[]']("states")['$is_any?']($$$('::','Array'),$$$($$$($$$('::','GxG'),'Database'),'PersistedArray'),$$$($$$($$$('::','GxG'),'Database'),'DetachedArray')))){$send(page_definition['$[]']("options")['$[]']("states"),'each',[],($$204=function(the_state){var self=$$204.$$s==null?this:$$204.$$s,$writer=nil;if(self.states==null)self.states=nil;if(the_state==null){the_state=nil;};$writer=[the_state.$to_s().$to_sym(),true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];},$$204.$$s=self,$$204.$$arity=1,$$204))}};self.style=$hash2([],{});if($truthy(page_definition['$[]']("options")['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(page_definition['$[]']("options")['$[]']("style")['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.style=page_definition['$[]']("options")['$[]']("style")}};self.options=$hash2([],{});if($truthy(page_definition['$[]']("options")['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){$send(page_definition['$[]']("options"),'each_pair',[],($$205=function(the_option,the_value){var self=$$205.$$s==null?this:$$205.$$s,$writer=nil;if(self.options==null)self.options=nil;if(the_option==null){the_option=nil;};if(the_value==null){the_value=nil;};if($truthy(["background-color","data","icon","label","content","uuid","title","opacity","window_title","menu","top","right","bottom","left","height","width","close","minimize","maximize","resize","scroll","modal","track","states","style"]['$include?'](the_option.$to_s().$to_sym()))){return nil}else{$writer=[the_option.$to_s().$to_sym(),the_value.$to_s()];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$$205.$$s=self,$$205.$$arity=2,$$205))};self.event_handlers=$hash2([],{});self.event_listeners=$hash2([],{});self.$creation();if($truthy(page_definition['$[]']("script")['$is_a?']($$$('::','String')))){if($truthy($rb_gt(page_definition['$[]']("script").$size(),0))){self.$set_script(page_definition['$[]']("script"))}};return self.$build_components(self,page_definition['$[]']("content"));}else{return nil};},$Page_build_page$203.$$arity=-1);Opal.def(self,'$initialize',$Page_initialize$206=function $$initialize(page_definition){var $$207,$$208,$$209,self=this,$writer=nil;if(page_definition==null){page_definition=nil;};$writer=["object",self];$send($$$($$$('::','GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$send($$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object"),'on',["onbeforeunload"],($$207=function(event){var self=$$207.$$s==null?this:$$207.$$s;if(event==null){event=nil;};return $$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("socket").$close();},$$207.$$s=self,$$207.$$arity=1,$$207));$send($$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object"),'on',["beforeunload"],($$208=function(event){var self=$$208.$$s==null?this:$$208.$$s;if(event==null){event=nil;};return $$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("socket").$close();},$$208.$$s=self,$$208.$$arity=1,$$208));$send($$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object"),'on',["onunload"],($$209=function(event){var self=$$209.$$s==null?this:$$209.$$s;if(event==null){event=nil;};return $$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("socket").$close();},$$209.$$s=self,$$209.$$arity=1,$$209));self.theme_prefix=$rb_plus($$$($$$('::','GxG'),'CONNECTION').$relative_url(),""+"/themes/"+($$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("theme")));self.settings=nil;self.busy=false;self.window_switcher=nil;self.window_registry=$hash2([],{});self.dialog=nil;self.dialog_queue=[];self.title_registry=$hash2([],{});self.$build_page(page_definition);return self;},$Page_initialize$206.$$arity=-1);Opal.def(self,'$find_object_by_dom_id',$Page_find_object_by_dom_id$210=function $$find_object_by_dom_id(the_id){var $a,$$211,self=this,result=nil,search_queue=nil,entry=nil,attrib=nil;if(the_id==null){the_id=nil;};result=nil;if($truthy(the_id['$is_a?']($$$('::','Numeric')))){the_id=$rb_plus("_",the_id.$to_i().$to_s())}else{the_id=the_id.$to_s()};search_queue=[self];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();attrib=entry.$element().attributes.getNamedItem('id')||0;if($truthy(attrib==0)){}else{attrib=attrib.value;if($truthy((attrib.$to_s()==the_id.$to_s()))){result=entry;break;;};};if($truthy(entry['$respond_to?']("children"))){(function(){var $brk=Opal.new_brk();try{return $send(entry.$children().$keys(),'each',[],($$211=function(the_child_key){var self=$$211.$$s==null?this:$$211.$$s;if(the_child_key==null){the_child_key=nil;};attrib=entry.$children()['$[]'](the_child_key).$element().attributes.getNamedItem('id')||0;if($truthy(attrib==0)){return nil}else{attrib=attrib.value;if($truthy((attrib.$to_s()==the_id.$to_s()))){result=entry.$children()['$[]'](the_child_key);Opal.brk(nil,$brk);}else{return search_queue['$<<'](entry.$children()['$[]'](the_child_key))};};},$$211.$$s=self,$$211.$$brk=$brk,$$211.$$arity=1,$$211))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};};return result;},$Page_find_object_by_dom_id$210.$$arity=-1);Opal.def(self,'$find_object',$Page_find_object$212=function $$find_object(object_name){var $a,$$213,self=this,result=nil,search_queue=nil,entry=nil;if(object_name==null){object_name=nil;};result=nil;search_queue=[self];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry['$respond_to?']("children"))){if($truthy(entry.$children()['$[]'](object_name))){result=entry.$children()['$[]'](object_name);break;;}else{$send(entry.$children().$keys(),'each',[],($$213=function(the_child){var self=$$213.$$s==null?this:$$213.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](entry.$children()['$[]'](the_child));},$$213.$$s=self,$$213.$$arity=1,$$213))}};};return result;},$Page_find_object$212.$$arity=-1);Opal.def(self,'$find_object_by',$Page_find_object_by$214=function $$find_object_by(the_title){var $$215,self=this,result=nil,uuid_check=nil;if(the_title==null){the_title=nil;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_title))){uuid_check=true}else{uuid_check=false};(function(){var $brk=Opal.new_brk();try{return $send(self.title_registry.$keys(),'each',[],($$215=function(the_uuid){var self=$$215.$$s==null?this:$$215.$$s;if(self.title_registry==null)self.title_registry=nil;if(the_uuid==null){the_uuid=nil;};if(uuid_check['$=='](true)){if($truthy(self.title_registry['$[]'](the_uuid).$to_s()['$include?'](the_title.$to_s()))){result=self.$find_object(the_uuid);Opal.brk(nil,$brk);}else{return nil}}else if(the_title['$=='](self.title_registry['$[]'](the_uuid))){result=self.$find_object(the_uuid);Opal.brk(nil,$brk);}else{return nil};},$$215.$$s=self,$$215.$$brk=$brk,$$215.$$arity=1,$$215))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();return result;},$Page_find_object_by$214.$$arity=-1);Opal.def(self,'$register_object',$Page_register_object$216=function $$register_object(the_title,the_object){var self=this,$ret_or_55=nil,$writer=nil;if(the_title==null){the_title=nil;};if(the_object==null){the_object=nil;};if($truthy((function(){if($truthy(($ret_or_55=the_title))){return the_object}else{return $ret_or_55};return nil;})())){$writer=[the_object.$uuid(),the_title.$to_s()];$send(self.title_registry,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}else{return false};},$Page_register_object$216.$$arity=-1);Opal.def(self,'$unregister_object',$Page_unregister_object$217=function $$unregister_object(the_title){var self=this,the_object=nil;if(the_title==null){the_title=nil;};if($truthy(the_title)){the_object=self.$find_object_by(the_title);if($truthy(the_object)){if($truthy(the_object['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport')))){the_object.$detach()};self.title_registry.$delete(the_object.$uuid());};return true;}else{return false};},$Page_unregister_object$217.$$arity=-1);Opal.def(self,'$factory',$Page_factory$218=function $$factory(){var self=this,$ret_or_56=nil;return(self.factory=(function(){if($truthy(($ret_or_56=self.factory))){return $ret_or_56}else{return $$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'Factory').$new(self)};return nil;})())},$Page_factory$218.$$arity=0);Opal.def(self,'$element',$Page_element$219=function $$element(){var self=this;return self.$factory().$body()},$Page_element$219.$$arity=0);Opal.def(self,'$parent',$Page_parent$220=function $$parent(){var self=this;return self},$Page_parent$220.$$arity=0);Opal.def(self,'$root',$Page_root$221=function $$root(){var self=this;return self},$Page_root$221.$$arity=0);Opal.def(self,'$domclear',$Page_domclear$222=function $$domclear(){var self=this;while(document.body.firstChild){document.body.removeChild(document.body.firstChild);};;return true;},$Page_domclear$222.$$arity=0);return(Opal.def(self,'$clear',$Page_clear$223=function $$clear(){var $$224,$$225,$$226,self=this,the_attributes=nil;$send(self,'all_descendants',[],($$224=function(the_child){var self=$$224.$$s==null?this:$$224.$$s;if(the_child==null){the_child=nil;};return the_child.$remove_listeners();},$$224.$$s=self,$$224.$$arity=1,$$224));self.$remove_listeners();$send(self,'each_child',[],($$225=function(the_child){var self=$$225.$$s==null?this:$$225.$$s;if(the_child==null){the_child=nil;};return the_child.$destroy();},$$225.$$s=self,$$225.$$arity=1,$$225));the_attributes=document.body.getAttributeNames();$send(the_attributes,'each',[],($$226=function(the_attribute){var self=$$226.$$s==null?this:$$226.$$s;if(the_attribute==null){the_attribute=nil;};return self.$clear_attribute(the_attribute);},$$226.$$s=self,$$226.$$arity=1,$$226));return true;},$Page_clear$223.$$arity=0),nil)&&'clear';})($nesting[0],null,$nesting);Opal.defs(self,'$load_page',$Vdom_load_page$227=function $$load_page(page_object){var $$228,$$231,self=this,the_theme=nil,$ret_or_57=nil;if(page_object==null){page_object=nil;};if($truthy($$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object")['$is_any?']($$$($$$($$$('::','GxG'),'Gui'),'Page'),$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'Page')))){$$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object").$clear();$$$($$$($$$('::','GxG'),'Gui'),'Vdom').$clear_rules();$$$($$$($$$('::','GxG'),'Gui'),'Vdom').$refresh_css_cache();};the_theme=(function(){if($truthy(($ret_or_57=page_object['$[]']("settings")['$[]']("theme")))){return $ret_or_57}else{return "default"};return nil;})();$send($$$($$$('::','GxG'),'CONNECTION'),'pull_object',[""+"/Public/www/content/themes/"+(the_theme)],($$228=function(response){var self=$$228.$$s==null?this:$$228.$$s,$$229,$$230,$writer=nil;if(response==null){response=nil;};if($truthy(response['$is_a?']($$$('::','Array')))){$send(response['$[]'](0)['$[]']("resources"),'each',[],($$229=function(resource_profile){var self=$$229.$$s==null?this:$$229.$$s;if(resource_profile==null){resource_profile=nil;};if(resource_profile['$[]']("resource_type")['$==']("font-face")){return $$$($$$($$$('::','GxG'),'Gui'),'Vdom').$load_font(resource_profile)}else{return nil};},$$229.$$s=self,$$229.$$arity=1,$$229));$send(response['$[]'](0)['$[]']("rules"),'each_pair',[],($$230=function(rule_name,rule_properties){var self=$$230.$$s==null?this:$$230.$$s;if(rule_name==null){rule_name=nil;};if(rule_properties==null){rule_properties=nil;};return $$$($$$($$$('::','GxG'),'Gui'),'Vdom').$set_rule(rule_name,rule_properties);},$$230.$$s=self,$$230.$$arity=2,$$230));if($truthy($$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object")['$is_any?']($$$($$$($$$('::','GxG'),'Gui'),'Page'),$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'Page')))){$$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object").$build_page(page_object)}else{$writer=["object",$$$($$$($$$('::','GxG'),'Gui'),'Page').$new(page_object)];$send($$$($$$('::','GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};return $$$($$$('::','GxG'),'Gui').$layout_refresh();}else{return self.$log_error($hash2(["error"],{"error":$$($nesting,'Exception').$new("Invalid theme object as response.")}))};},$$228.$$s=self,$$228.$$arity=1,$$228));if($truthy(page_object['$[]']("requirements")['$is_any?']($$$('::','Array'),$$$($$$($$$('::','GxG'),'Database'),'DetachedArray'),$$$($$$($$$('::','GxG'),'Database'),'PersistedArray')))){if($truthy($rb_gt(page_object['$[]']("requirements").$size(),0))){self.$load_libraries(page_object['$[]']("requirements"))}};if($truthy(page_object['$[]']("auto_start")['$is_any?']($$$('::','Array'),$$$($$$($$$('::','GxG'),'Database'),'DetachedArray'),$$$($$$($$$('::','GxG'),'Database'),'PersistedArray')))){if($truthy($rb_gt(page_object['$[]']("auto_start").$size(),0))){$send(page_object['$[]']("auto_start"),'each',[],($$231=function(the_requirement){var self=$$231.$$s==null?this:$$231.$$s;if(the_requirement==null){the_requirement=nil;};return self.$application_open($hash2(["name","restore"],{"name":the_requirement['$[]']("name"),"restore":true}));},$$231.$$s=self,$$231.$$arity=1,$$231))}};return true;},$Vdom_load_page$227.$$arity=-1);return(Opal.defs(self,'$navigate_to',$Vdom_navigate_to$232=function $$navigate_to(the_location){var $$233,$$234,self=this,request_path=nil,$ret_or_58=nil,$writer=nil,error_handler=nil;if(the_location==null){the_location="";};if($truthy($rb_gt($$$($$$('::','GxG'),'CONNECTION').$relative_url().$to_s().$size(),0))){request_path=the_location['$[]'](Opal.Range.$new($$$($$$('::','GxG'),'CONNECTION').$relative_url().$size(),-1,false))}else{request_path=the_location};if($truthy((function(){if($truthy(($ret_or_58=request_path['$==']("/")))){return $ret_or_58}else{return request_path['$==']("")};return nil;})())){request_path="/index"};if(request_path['$[]'](0)['$==']("/")){}else{request_path=$rb_plus("/",request_path)};$writer=["host_path",request_path];$send($$$($$$('::','GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy($$$($$($nesting,'GxG'),'PAGES')['$[]'](request_path))){return $$$($$$($$($nesting,'GxG'),'Gui'),'Vdom').$load_page($$$($$($nesting,'GxG'),'PAGES')['$[]'](request_path))}else{error_handler=$send($$($nesting,'Proc'),'new',[],($$233=function(error){var self=$$233.$$s==null?this:$$233.$$s;if(error==null){error=nil;};return self.$log_error(error.$inspect());},$$233.$$s=self,$$233.$$arity=1,$$233));return $send($$$($$$('::','GxG'),'CONNECTION'),'pull_object',[""+"/Public/www/content/pages"+(request_path),error_handler],($$234=function(response){var self=$$234.$$s==null?this:$$234.$$s;if(response==null){response=nil;};self.$puts(""+"Response (Page Load): "+(response.$inspect()));if($truthy(response['$is_any?']($$$('::','Array')))){$writer=[request_path,response['$[]'](0)];$send($$$($$($nesting,'GxG'),'PAGES'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$$$($$$($$($nesting,'GxG'),'Gui'),'Vdom').$load_page($$$($$($nesting,'GxG'),'PAGES')['$[]'](request_path));}else{self.$log_error($hash2(["error"],{"error":$$($nesting,'Exception').$new("Invalid page object as response.")}))};return $$$($$$('::','GxG'),'Gui').$layout_refresh();},$$234.$$s=self,$$234.$$arity=1,$$234));};},$Vdom_navigate_to$232.$$arity=-1),nil)&&'navigate_to';})($nesting[0],$nesting)})($nesting[0],$nesting)})($nesting[0],$nesting)};Opal.modules["web/gxg_foundation"]=function(Opal){function $rb_minus(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs-rhs:lhs['$-'](rhs);} +else{return element.setAttribute(name,value)}})();},$$160.$$s=self,$$160.$$arity=2,$$160));return element;},$Factory_create_element$159.$$arity=-4);Opal.def(self,'$dasherize',$Factory_dasherize$161=function $$dasherize(class_name){var self=this,the_name=nil;the_name=class_name.$gsub("::","-").$downcase().$gsub("_","-");if(the_name['$[]'](0)['$==']("-")){the_name=the_name['$[]']($range(1,-1,false))};return the_name;},$Factory_dasherize$161.$$arity=1);return(Opal.def(self,'$camelize',$Factory_camelize$162=function $$camelize(class_name){var $$163,self=this;if($truthy(class_name['$!~'](/-/))){return class_name};return $send(class_name,'gsub',[/(?:-|(\/))([a-z\d]*)/],($$163=function(){var self=$$163.$$s==null?this:$$163.$$s,$a;return ""+((($a=$gvars['~'])===nil?nil:$a['$[]'](1)))+((($a=$gvars['~'])===nil?nil:$a['$[]'](2)).$capitalize())},$$163.$$s=self,$$163.$$arity=0,$$163)).$strip();},$Factory_camelize$162.$$arity=1),nil)&&'camelize';})($nesting[0],null,$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BaseElement');var $nesting=[self].concat($parent_nesting),$BaseElement_set_settings$164,$BaseElement_initialize$165,$BaseElement_parent$168,$BaseElement_root$169,$BaseElement_factory$170,$BaseElement_build$171;self.$$prototype.uuid=self.$$prototype.component=self.$$prototype.states=self.$$prototype.parent=nil;self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'ElementMethods'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'EventHandlers'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'AnimationSupport'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'ApplicationSupport'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'ThemeSupport'));self.$attr_reader("uuid","title","component","parent","children","element","domtype","settings");Opal.def(self,'$set_settings',$BaseElement_set_settings$164=function $$set_settings(the_settings){var self=this;if(the_settings==null){the_settings=nil;};return(self.settings=the_settings);},$BaseElement_set_settings$164.$$arity=-1);$alias(self,"settings=","set_settings");Opal.def(self,'$initialize',$BaseElement_initialize$165=function $$initialize(parent,options,other_data){var $$166,$$167,self=this,$ret_or_39=nil,$ret_or_40=nil,$ret_or_41=nil,$writer=nil;if(options==null){options=$hash2([],{});};if(other_data==null){other_data=$hash2([],{});};if($truthy(options['$is_a?']($$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){self.uuid=options.$uuid().$to_s().$to_sym();if($truthy($rb_gt(options['$[]']("title").$to_s().$size(),0))){self.title=options['$[]']("title").$to_s()}else{self.title=options.$title().$to_s()};}else{self.uuid=(function(){if($truthy(($ret_or_39=options['$[]']("uuid")))){return $ret_or_39}else{return $$$('::','GxG').$uuid_generate()};return nil;})().$to_s().$to_sym();self.title=(function(){if($truthy(($ret_or_40=options['$[]']("title")))){return $ret_or_40}else{return ""+"Untitled Component "+(self.uuid.$to_s())};return nil;})().$to_s();};self.component=(function(){if($truthy(($ret_or_41=options['$[]']("component")))){return $ret_or_41}else{return "unknown"};return nil;})().$to_s().$downcase().$to_sym();self.parent=parent;if($truthy(options['$[]']("settings")['$is_a?']($$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){self.settings=options['$[]']("settings").$unpersist()}else if($truthy(options['$[]']("settings")['$is_a?']($$$('::','Hash')))){self.settings=options['$[]']("settings")}else{self.settings=$hash2([],{})};if($truthy(other_data['$[]']("application"))){self.application=other_data['$[]']("application")}else{self.application=nil};self.children=$hash2([],{});self.element=nil;self.domtype="div";self.states=$hash2([],{});$writer=[self.component.$to_s().$gsub(".","-").$to_sym(),true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(options['$[]']("options")['$is_any?']($$$('::','Hash'),$$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){if($truthy(options['$[]']("options")['$[]']("states")['$is_any?']($$$('::','Array'),$$$($$$($$($nesting,'GxG'),'Database'),'DetachedArray')))){$send(options['$[]']("options")['$[]']("states"),'each',[],($$166=function(the_state){var self=$$166.$$s==null?this:$$166.$$s;if(self.states==null)self.states=nil;if(the_state==null){the_state=nil;};$writer=[the_state.$to_s().$to_sym(),true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];},$$166.$$s=self,$$166.$$arity=1,$$166))}};self.style=$hash2([],{});if($truthy(options['$[]']("options")['$is_a?']($$$('::','Hash'),$$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){if($truthy(options['$[]']("options")['$[]']("style")['$is_a?']($$$('::','Hash'),$$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){self.style=options['$[]']("options")['$[]']("style")}};self.options=$hash2([],{});if($truthy(options['$[]']("options")['$is_a?']($$$('::','Hash'),$$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){$send(options['$[]']("options"),'each_pair',[],($$167=function(the_option,the_value){var self=$$167.$$s==null?this:$$167.$$s;if(self.options==null)self.options=nil;if(the_option==null){the_option=nil;};if(the_value==null){the_value=nil;};if($truthy(["background-color","icon","label","data","content","uuid","title","opacity","window_title","menu","top","right","bottom","left","height","width","close","minimize","maximize","resize","scroll","modal","track","states","style"]['$include?'](the_option.$to_s().$to_sym()))){return nil}else{$writer=[the_option.$to_s().$to_sym(),the_value.$to_s()];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$$167.$$s=self,$$167.$$arity=2,$$167))};self.event_handlers=$hash2([],{});self.event_listeners=$hash2([],{});self.$creation();if($truthy(options['$[]']("options")['$is_a?']($$$('::','Hash'),$$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){if($truthy(options['$[]']("content")['$is_a?']($$$('::','String')))){self.$set_text(options['$[]']("content"))}};return self;},$BaseElement_initialize$165.$$arity=-2);Opal.def(self,'$parent',$BaseElement_parent$168=function $$parent(){var self=this;return self.parent},$BaseElement_parent$168.$$arity=0);Opal.def(self,'$root',$BaseElement_root$169=function $$root(){var $a,self=this,result=nil,search_queue=nil,entry=nil;result=nil;search_queue=[self.parent];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if(entry.$component()['$==']("page")){result=entry;break;;}else{search_queue['$<<'](entry.$parent())}};};return result;},$BaseElement_root$169.$$arity=0);Opal.def(self,'$factory',$BaseElement_factory$170=function $$factory(){var self=this;return self.$root().$factory()},$BaseElement_factory$170.$$arity=0);return(Opal.def(self,'$build',$BaseElement_build$171=function $$build(content_manifest,options){var self=this;if(content_manifest==null){content_manifest=nil;};if(options==null){options=$hash2([],{});};return self.$page().$build_components(self,content_manifest,options);},$BaseElement_build$171.$$arity=-1),nil)&&'build';})($nesting[0],null,$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BaseInputElement');var $nesting=[self].concat($parent_nesting),$BaseInputElement__before_create$172,$BaseInputElement_value$173,$BaseInputElement_value$eq$174,$BaseInputElement__after_create$175,$BaseInputElement_disable$176,$BaseInputElement_enable$177;self.$$prototype.options=self.$$prototype.element=self.$$prototype.disabled=nil;Opal.def(self,'$_before_create',$BaseInputElement__before_create$172=function $$_before_create(){var $iter=$BaseInputElement__before_create$172.$$p,$yield=$iter||nil,self=this,$ret_or_42=nil,$writer=nil,$ret_or_43=nil;if($iter)$BaseInputElement__before_create$172.$$p=null;$send2(self,$find_super(self,'_before_create',$BaseInputElement__before_create$172,false,true),'_before_create',[],null);self.domtype="input";if($truthy(($ret_or_42=self.options['$[]']("type")))){$ret_or_42}else{$writer=["type","text"];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options['$[]']("content"))){$writer=["value",self.options.$delete("content")];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};return(self.disabled=(function(){if($truthy(($ret_or_43=self.options['$[]']("disabled")))){return $ret_or_43}else{return false};return nil;})());},$BaseInputElement__before_create$172.$$arity=0);Opal.def(self,'$value',$BaseInputElement_value$173=function $$value(){var self=this;return self.element.value},$BaseInputElement_value$173.$$arity=0);Opal.def(self,'$value=',$BaseInputElement_value$eq$174=function(value){var self=this;return self.element.value=value},$BaseInputElement_value$eq$174.$$arity=1);Opal.def(self,'$_after_create',$BaseInputElement__after_create$175=function $$_after_create(){var $iter=$BaseInputElement__after_create$175.$$p,$yield=$iter||nil,self=this;if($iter)$BaseInputElement__after_create$175.$$p=null;$send2(self,$find_super(self,'_after_create',$BaseInputElement__after_create$175,false,true),'_after_create',[],null);if($truthy(self.disabled)){return self.$disable()}else{return nil};},$BaseInputElement__after_create$175.$$arity=0);Opal.def(self,'$disable',$BaseInputElement_disable$176=function $$disable(){var self=this;return self.$set_attribute("disabled","disabled")},$BaseInputElement_disable$176.$$arity=0);return(Opal.def(self,'$enable',$BaseInputElement_enable$177=function $$enable(){var self=this;return self.$clear_attribute("disabled")},$BaseInputElement_enable$177.$$arity=0),nil)&&'enable';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BaseClickableElement');var $nesting=[self].concat($parent_nesting),$BaseClickableElement__before_create$178;return(Opal.def(self,'$_before_create',$BaseClickableElement__before_create$178=function $$_before_create(){var $iter=$BaseClickableElement__before_create$178.$$p,$yield=$iter||nil,self=this;if($iter)$BaseClickableElement__before_create$178.$$p=null;return $send2(self,$find_super(self,'_before_create',$BaseClickableElement__before_create$178,false,true),'_before_create',[],null)},$BaseClickableElement__before_create$178.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Page');var $nesting=[self].concat($parent_nesting),$Page_set_settings$179,$Page_get_library$180,$Page_library_loaded$ques$183,$Page_load_library$186,$Page_load_libraries$189,$Page_application_open$192,$Page_site_asset$196,$Page_theme_icon$197,$Page_theme_background$198,$Page_theme_widget$199,$Page_theme_font$200,$Page_theme_window_title_layout$201,$Page_build_components$202,$Page_build$204,$Page_build_page$205,$Page_initialize$208,$Page_find_object_by_dom_id$212,$Page_find_object$214,$Page_find_object_by$216,$Page_register_object$218,$Page_unregister_object$219,$Page_factory$220,$Page_element$221,$Page_parent$222,$Page_root$223,$Page_domclear$224,$Page_clear$225;self.$$prototype.theme_prefix=self.$$prototype.settings=self.$$prototype.element=self.$$prototype.uuid=self.$$prototype.title=self.$$prototype.title_registry=self.$$prototype.factory=nil;self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'ElementMethods'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'EventHandlers'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'AnimationSupport'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'ApplicationSupport'));self.$include($$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'ThemeSupport'));self.$attr_reader("uuid","title","component","parent","children","domtype","settings");Opal.def(self,'$set_settings',$Page_set_settings$179=function $$set_settings(the_settings){var self=this;if(the_settings==null){the_settings=nil;};return(self.settings=the_settings);},$Page_set_settings$179.$$arity=-1);$alias(self,"settings=","set_settings");Opal.def(self,'$get_library',$Page_get_library$180=function $$get_library(the_reference){var $$181,$$182,self=this,result=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy(the_reference['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){(function(){var $brk=Opal.new_brk();try{return $send($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries").$values(),'each',[],($$181=function(the_library){var self=$$181.$$s==null?this:$$181.$$s,$ret_or_44=nil,$ret_or_45=nil;if(the_library==null){the_library=nil;};if($truthy((function(){if($truthy(($ret_or_44=the_library.$title()['$=='](the_reference['$[]']("library").$to_s())))){return the_library.$type()['$==']((function(){if($truthy(($ret_or_45=the_reference['$[]']("type")))){return $ret_or_45}else{return the_library.$type()};return nil;})())}else{return $ret_or_44};return nil;})())){if($truthy(the_reference['$[]']("maximum"))){if($truthy(Opal.Range.$new(the_reference['$[]']("minimum").$to_f(),the_reference['$[]']("maximum").$to_f(),false)['$include?'](the_library.$version()))){result=the_library;Opal.brk(nil,$brk);}else{return nil}}else if($truthy($rb_ge(the_library.$version(),the_reference['$[]']("minimum").$to_f()))){result=the_library;Opal.brk(nil,$brk);}else{return nil}}else{return nil};},$$181.$$s=self,$$181.$$brk=$brk,$$181.$$arity=1,$$181))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()}else if($truthy($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries")['$[]'](the_reference.$to_s().$to_sym()))){result=$$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries")['$[]'](the_reference.$to_s().$to_sym())}else{(function(){var $brk=Opal.new_brk();try{return $send($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries").$values(),'each',[],($$182=function(the_library){var self=$$182.$$s==null?this:$$182.$$s;if(the_library==null){the_library=nil;};if(the_library.$title()['$=='](the_reference)){result=the_library;Opal.brk(nil,$brk);}else{return nil};},$$182.$$s=self,$$182.$$brk=$brk,$$182.$$arity=1,$$182))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};return result;},$Page_get_library$180.$$arity=-1);Opal.def(self,'$library_loaded?',$Page_library_loaded$ques$183=function(the_reference){var $$184,$$185,self=this,found=nil;if(the_reference==null){the_reference=nil;};if($truthy(the_reference['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){found=false;(function(){var $brk=Opal.new_brk();try{return $send($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries").$values(),'each',[],($$184=function(the_library){var self=$$184.$$s==null?this:$$184.$$s,$ret_or_46=nil,$ret_or_47=nil;if(the_library==null){the_library=nil;};if($truthy((function(){if($truthy(($ret_or_46=the_library.$title()['$=='](the_reference['$[]']("library").$to_s())))){return the_library.$type()['$==']((function(){if($truthy(($ret_or_47=the_reference['$[]']("type")))){return $ret_or_47}else{return the_library.$type()};return nil;})().$to_s())}else{return $ret_or_46};return nil;})())){if($truthy(the_reference['$[]']("maximum"))){if($truthy(Opal.Range.$new(the_reference['$[]']("minimum").$to_f(),the_reference['$[]']("maximum").$to_f(),false)['$include?'](the_library.$version()))){found=the_library['$loaded?']();Opal.brk(nil,$brk);}else{return nil}}else if($truthy($rb_ge(the_library.$version(),the_reference['$[]']("minimum").$to_f()))){found=the_library['$loaded?']();Opal.brk(nil,$brk);}else{return nil}}else{return nil};},$$184.$$s=self,$$184.$$brk=$brk,$$184.$$arity=1,$$184))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();return found;}else if($truthy($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries")['$[]'](the_reference.$to_s().$to_sym()))){return true}else{found=false;(function(){var $brk=Opal.new_brk();try{return $send($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries").$values(),'each',[],($$185=function(the_library){var self=$$185.$$s==null?this:$$185.$$s;if(the_library==null){the_library=nil;};if(the_library.$title()['$=='](the_reference)){found=the_library['$loaded?']();Opal.brk(nil,$brk);}else{return nil};},$$185.$$s=self,$$185.$$brk=$brk,$$185.$$arity=1,$$185))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();return found;};},$Page_library_loaded$ques$183.$$arity=-1);Opal.def(self,'$load_library',$Page_load_library$186=function $$load_library(criteria){var $iter=$Page_load_library$186.$$p,block=$iter||nil,$$187,self=this,maximum=nil,$ret_or_48=nil,$ret_or_49=nil;if($iter)$Page_load_library$186.$$p=null;if($iter)$Page_load_library$186.$$p=null;;if(criteria==null){criteria=nil;};if($truthy(criteria['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(criteria['$[]']("maximum"))){maximum=criteria['$[]']("maximum").$to_f()}else{maximum=nil};return $send($$$($$($nesting,'GxG'),'CONNECTION'),'library_pull',[$hash2(["library","type","minimum","maximum","dependencies","loaded"],{"library":criteria['$[]']("library").$to_s(),"type":(function(){if($truthy(($ret_or_48=criteria['$[]']("type")))){return $ret_or_48}else{return "text/ruby"};return nil;})().$to_s(),"minimum":(function(){if($truthy(($ret_or_49=criteria['$[]']("minimum")))){return $ret_or_49}else{return 0.0};return nil;})().$to_f(),"maximum":maximum,"dependencies":true,"loaded":$$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries").$keys()})],($$187=function(response){var self=$$187.$$s==null?this:$$187.$$s,$$188;if(response==null){response=nil;};if($truthy(response['$is_a?']($$$('::','Hash')))){if($truthy(response['$[]']("result")['$is_a?']($$$('::','Array')))){return $send(response['$[]']("result"),'each',[],($$188=function(the_record){var self=$$188.$$s==null?this:$$188.$$s,definition=nil,$writer=nil;if(the_record==null){the_record=nil;};if($truthy($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries").$keys()['$include?'](the_record['$[]']("uuid").$to_s().$to_sym()))){return nil}else{definition=the_record['$[]']("data");if($truthy(definition['$is_a?']($$$('::','String')))){if($truthy(definition['$base64?']())){definition=definition.$decode64()};if($truthy(definition['$json?']())){definition=$$$('::','JSON').$parse(definition,$hash2(["symbolize_names"],{"symbolize_names":true}))};if($truthy(definition['$is_a?']($$$('::','Hash')))){definition=$$$($$$('::','GxG'),'Database').$process_import(definition)};if($truthy(definition['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){$writer=[the_record['$[]']("uuid").$to_s().$to_sym(),$$$($$$('::','GxG'),'Library').$new(definition)];$send($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(block['$respond_to?']("call"))){return block.$call($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("libraries")['$[]'](the_record['$[]']("uuid").$to_s().$to_sym()))}else{return nil};}else{return nil};}else{return nil};};},$$188.$$s=self,$$188.$$arity=1,$$188))}else{return nil}}else{return nil};},$$187.$$s=self,$$187.$$arity=1,$$187));}else{return nil};},$Page_load_library$186.$$arity=-1);Opal.def(self,'$load_libraries',$Page_load_libraries$189=function $$load_libraries(load_queue){var $iter=$Page_load_libraries$189.$$p,block=$iter||nil,$$190,self=this,result=nil;if($iter)$Page_load_libraries$189.$$p=null;if($iter)$Page_load_libraries$189.$$p=null;;if(load_queue==null){load_queue=[];};result=true;if($truthy(load_queue['$is_any?']($$$('::','Array'),$$$($$$($$$('::','GxG'),'Database'),'DetachedArray')))){(function(){var $brk=Opal.new_brk();try{return $send(load_queue,'each',[],($$190=function(the_requirement){var self=$$190.$$s==null?this:$$190.$$s,$$191;if(the_requirement==null){the_requirement=nil;};return(function(){var $brk=Opal.new_brk();try{return $send($$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object"),'load_library',[the_requirement],($$191=function(the_library){var self=$$191.$$s==null?this:$$191.$$s;if(the_library==null){the_library=nil;};if($truthy(the_library['$loaded?']())){return nil}else{self.$log_warn(""+"Unable to load library: "+(the_library.$title()));result=false;Opal.brk(nil,$brk);};},$$191.$$s=self,$$191.$$brk=$brk,$$191.$$arity=1,$$191))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();},$$190.$$s=self,$$190.$$brk=$brk,$$190.$$arity=1,$$190))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};if($truthy(block['$respond_to?']("call"))){block.$call(result)};return result;},$Page_load_libraries$189.$$arity=-1);Opal.def(self,'$application_open',$Page_application_open$192=function $$application_open(specifier,parameters){var $$193,$$194,self=this,result=nil,error_hander=nil;if(specifier==null){specifier=$hash2([],{});};if(parameters==null){parameters=$hash2([],{});};result=false;if($truthy(specifier['$is_a?']($$$('::','Hash')))){error_hander=$send($$($nesting,'Proc'),'new',[],($$193=function(){var self=$$193.$$s==null?this:$$193.$$s;return nil},$$193.$$s=self,$$193.$$arity=0,$$193));self.$set_busy(true);$send($$$($$($nesting,'GxG'),'CONNECTION'),'application_open',[specifier,error_hander],($$194=function(app_stub){var self=$$194.$$s==null?this:$$194.$$s,$$195;if(app_stub==null){app_stub=nil;};if($truthy(app_stub['$is_a?']($$$('::','Hash')))){if($truthy(app_stub['$[]']("result")['$is_a?']($$$('::','Hash')))){return $send($$$($$($nesting,'GxG'),'CONNECTION'),'pull_object',[app_stub['$[]']("result")['$[]']("location")],($$195=function(source_object){var self=$$195.$$s==null?this:$$195.$$s,$writer=nil;if(source_object==null){source_object=nil;};$writer=[app_stub['$[]']("result")['$[]']("application").$to_s().$to_sym(),$$$($$($nesting,'GxG'),'Application').$new(app_stub['$[]']("result").$merge($hash2(["source"],{"source":source_object})))];$send($$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("processes"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;result=$$$($$($nesting,'GxG'),'APPLICATIONS')['$[]']("processes")['$[]'](app_stub['$[]']("result")['$[]']("application").$to_s().$to_sym()).$run(parameters);return self.$set_busy(false);},$$195.$$s=self,$$195.$$arity=1,$$195))}else{return self.$log_warn($rb_plus("Error opening Application: ",app_stub.$inspect()))}}else{return self.$log_warn(""+"Malformed response: "+(app_stub.$inspect()))};},$$194.$$s=self,$$194.$$arity=1,$$194));}else{self.$log_warn(""+"Invalid Argument: "+(specifier.$inspect()))};return result;},$Page_application_open$192.$$arity=-1);Opal.def(self,'$site_asset',$Page_site_asset$196=function $$site_asset(asset_path){var self=this,host_prefix=nil;if(asset_path==null){asset_path=nil;};if($truthy((window.location['href'])['$include?']("https://"))){host_prefix=$rb_plus("https://",window.location['host'])}else{host_prefix=$rb_plus("http://",window.location['host'])};if($truthy($$$($$$('::','GxG'),'CONNECTION').$relative_url().$to_s()['$[]'](0)['$!=']("/"))){host_prefix=$rb_plus(host_prefix,"/")};if($truthy(asset_path)){return $rb_plus(host_prefix,$$($nesting,'File').$expand_path($rb_plus($rb_plus($$$($$$('::','GxG'),'CONNECTION').$relative_url().$to_s(),"/"),asset_path.$to_s())));}else{return ""};},$Page_site_asset$196.$$arity=-1);Opal.def(self,'$theme_icon',$Page_theme_icon$197=function $$theme_icon(image_name){var self=this;if(image_name==null){image_name=nil;};if($truthy(image_name)){return $rb_plus($rb_plus(self.theme_prefix,"/icons/"),image_name.$to_s());}else{return ""};},$Page_theme_icon$197.$$arity=-1);Opal.def(self,'$theme_background',$Page_theme_background$198=function $$theme_background(image_name){var self=this;if(image_name==null){image_name=nil;};if($truthy(image_name)){return $rb_plus($rb_plus(self.theme_prefix,"/backgrounds/"),image_name.$to_s());}else{return ""};},$Page_theme_background$198.$$arity=-1);Opal.def(self,'$theme_widget',$Page_theme_widget$199=function $$theme_widget(image_name){var self=this;if(image_name==null){image_name=nil;};if($truthy(image_name)){return $rb_plus($rb_plus(self.theme_prefix,"/widgets/"),image_name.$to_s());}else{return ""};},$Page_theme_widget$199.$$arity=-1);Opal.def(self,'$theme_font',$Page_theme_font$200=function $$theme_font(font_name){var self=this;if(font_name==null){font_name=nil;};if($truthy(font_name)){return $rb_plus($rb_plus(self.theme_prefix,"/fonts/"),font_name.$to_s());}else{return ""};},$Page_theme_font$200.$$arity=-1);Opal.def(self,'$theme_window_title_layout',$Page_theme_window_title_layout$201=function $$theme_window_title_layout(){var self=this;return $hash2(["left","center","right"],{"left":["close","minimize","maximize"],"center":["title"],"right":[]})},$Page_theme_window_title_layout$201.$$arity=0);Opal.def(self,'$build_components',$Page_build_components$202=function $$build_components(root_object,content_manifest,options){var $a,$$203,self=this,result=nil,$ret_or_50=nil,build_queue=nil,record=nil;if(root_object==null){root_object=nil;};if(content_manifest==null){content_manifest=nil;};if(options==null){options=$hash2([],{});};result=false;if($truthy(root_object)){}else{root_object=$$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object")};if($truthy((function(){if($truthy(($ret_or_50=root_object))){return content_manifest['$is_any?']($$$('::','Array'),$$$($$$($$$('::','GxG'),'Database'),'DetachedArray'))}else{return $ret_or_50};return nil;})())){build_queue=[$hash2(["parent","content"],{"parent":root_object,"content":content_manifest})];while($truthy($rb_gt(build_queue.$size(),0))){record=build_queue.$shift();if($truthy(record)){$send(record['$[]']("content"),'each',[],($$203=function(the_entry){var self=$$203.$$s==null?this:$$203.$$s,new_object=nil,$ret_or_51=nil,$ret_or_52=nil,$ret_or_53=nil,$ret_or_54=nil,$ret_or_55=nil;if(the_entry==null){the_entry=nil;};new_object=record['$[]']("parent").$add_child(the_entry,options);if($truthy($rb_gt(the_entry['$[]']("content").$size(),0))){build_queue['$<<']($hash2(["parent","content"],{"parent":new_object,"content":the_entry['$[]']("content")}))};if($truthy((function(){if($truthy(($ret_or_51=the_entry['$[]']("component").$to_s().$downcase().$to_sym()['$==']("org.gxg.gui.application.viewport")))){return options['$[]']("application")}else{return $ret_or_51};return nil;})())){new_object.$set_application(options['$[]']("application"));if($truthy(options['$[]']("application").$get_viewport(new_object.$uuid()))){}else{options['$[]']("application").$link_viewport(new_object)};};if($truthy((function(){if($truthy(($ret_or_52=the_entry['$[]']("component").$to_s().$downcase().$to_sym()['$==']("org.gxg.gui.window")))){return options['$[]']("application")}else{return $ret_or_52};return nil;})())){options['$[]']("application").$link_window(new_object);new_object.$set_application(options['$[]']("application"));};if($truthy((function(){if($truthy(($ret_or_53=the_entry['$[]']("component").$to_s().$downcase().$to_sym()['$==']("org.gxg.gui.window.dialog")))){return options['$[]']("application")}else{return $ret_or_53};return nil;})())){new_object.$set_application(options['$[]']("application"))};if($truthy((function(){if($truthy(($ret_or_54=the_entry['$[]']("component").$to_s().$downcase().$to_sym()['$==']("org.gxg.gui.menu.bar")))){return options['$[]']("application")}else{return $ret_or_54};return nil;})())){new_object.$set_application(options['$[]']("application"))};if($truthy((function(){if($truthy(($ret_or_55=the_entry['$[]']("component").$to_s().$downcase().$to_sym()['$==']("org.gxg.gui.menu")))){return options['$[]']("application")}else{return $ret_or_55};return nil;})())){new_object.$set_application(options['$[]']("application"))};if($truthy(record['$[]']("parent")['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'Window')))){if($truthy(the_entry['$[]']("options")['$[]']("track"))){return record['$[]']("parent").$track_deltas(new_object.$uuid(),new_object,the_entry['$[]']("options")['$[]']("track"))}else{return nil}}else{return nil};},$$203.$$s=self,$$203.$$arity=1,$$203))};};result=true;};return result;},$Page_build_components$202.$$arity=-1);Opal.def(self,'$build',$Page_build$204=function $$build(content_manifest,options){var self=this;if(content_manifest==null){content_manifest=nil;};if(options==null){options=$hash2([],{});};return self.$build_components(self,content_manifest,options);},$Page_build$204.$$arity=-1);Opal.def(self,'$build_page',$Page_build_page$205=function $$build_page(page_definition){var $$206,$$207,self=this,$ret_or_56=nil;if(page_definition==null){page_definition=nil;};if($truthy(page_definition['$is_any?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.element=document.body;self.settings=page_definition['$[]']("settings");self.theme_prefix=$rb_plus($$$($$$('::','GxG'),'CONNECTION').$relative_url(),""+"/themes/"+((function(){if($truthy(($ret_or_56=self.settings['$[]']("theme")))){return $ret_or_56}else{return "default"};return nil;})()));self.uuid=page_definition.$uuid().$to_s().$to_sym();self.element.id=self.uuid.$to_s();self.title=self.settings['$[]']("page_title").$to_s();document.title=self.title.$to_s();self.component="org.gxg.gui.page";self.parent=self;self.children=$hash2([],{});self.domtype="body";self.states=$hash2(["org-gxg-gui-page"],{"org-gxg-gui-page":true});if($truthy(page_definition['$[]']("options")['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(page_definition['$[]']("options")['$[]']("states")['$is_any?']($$$('::','Array'),$$$($$$($$$('::','GxG'),'Database'),'PersistedArray'),$$$($$$($$$('::','GxG'),'Database'),'DetachedArray')))){$send(page_definition['$[]']("options")['$[]']("states"),'each',[],($$206=function(the_state){var self=$$206.$$s==null?this:$$206.$$s,$writer=nil;if(self.states==null)self.states=nil;if(the_state==null){the_state=nil;};$writer=[the_state.$to_s().$to_sym(),true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];},$$206.$$s=self,$$206.$$arity=1,$$206))}};self.style=$hash2([],{});if($truthy(page_definition['$[]']("options")['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(page_definition['$[]']("options")['$[]']("style")['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.style=page_definition['$[]']("options")['$[]']("style")}};self.options=$hash2([],{});if($truthy(page_definition['$[]']("options")['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){$send(page_definition['$[]']("options"),'each_pair',[],($$207=function(the_option,the_value){var self=$$207.$$s==null?this:$$207.$$s,$writer=nil;if(self.options==null)self.options=nil;if(the_option==null){the_option=nil;};if(the_value==null){the_value=nil;};if($truthy(["background-color","data","icon","label","content","uuid","title","opacity","window_title","menu","top","right","bottom","left","height","width","close","minimize","maximize","resize","scroll","modal","track","states","style"]['$include?'](the_option.$to_s().$to_sym()))){return nil}else{$writer=[the_option.$to_s().$to_sym(),the_value.$to_s()];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$$207.$$s=self,$$207.$$arity=2,$$207))};self.event_handlers=$hash2([],{});self.event_listeners=$hash2([],{});self.$creation();if($truthy(page_definition['$[]']("script")['$is_a?']($$$('::','String')))){if($truthy($rb_gt(page_definition['$[]']("script").$size(),0))){self.$set_script(page_definition['$[]']("script"))}};return self.$build_components(self,page_definition['$[]']("content"));}else{return nil};},$Page_build_page$205.$$arity=-1);Opal.def(self,'$initialize',$Page_initialize$208=function $$initialize(page_definition){var $$209,$$210,$$211,self=this,$writer=nil;if(page_definition==null){page_definition=nil;};$writer=["object",self];$send($$$($$$('::','GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$send($$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object"),'on',["onbeforeunload"],($$209=function(event){var self=$$209.$$s==null?this:$$209.$$s;if(event==null){event=nil;};return $$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("socket").$close();},$$209.$$s=self,$$209.$$arity=1,$$209));$send($$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object"),'on',["beforeunload"],($$210=function(event){var self=$$210.$$s==null?this:$$210.$$s;if(event==null){event=nil;};return $$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("socket").$close();},$$210.$$s=self,$$210.$$arity=1,$$210));$send($$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object"),'on',["onunload"],($$211=function(event){var self=$$211.$$s==null?this:$$211.$$s;if(event==null){event=nil;};return $$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("socket").$close();},$$211.$$s=self,$$211.$$arity=1,$$211));self.theme_prefix=$rb_plus($$$($$$('::','GxG'),'CONNECTION').$relative_url(),""+"/themes/"+($$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("theme")));self.settings=nil;self.busy=false;self.window_switcher=nil;self.window_registry=$hash2([],{});self.dialog=nil;self.dialog_queue=[];self.title_registry=$hash2([],{});self.$build_page(page_definition);return self;},$Page_initialize$208.$$arity=-1);Opal.def(self,'$find_object_by_dom_id',$Page_find_object_by_dom_id$212=function $$find_object_by_dom_id(the_id){var $a,$$213,self=this,result=nil,search_queue=nil,entry=nil,attrib=nil;if(the_id==null){the_id=nil;};result=nil;if($truthy(the_id['$is_a?']($$$('::','Numeric')))){the_id=$rb_plus("_",the_id.$to_i().$to_s())}else{the_id=the_id.$to_s()};search_queue=[self];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();attrib=entry.$element().attributes.getNamedItem('id')||0;if($truthy(attrib==0)){}else{attrib=attrib.value;if($truthy((attrib.$to_s()==the_id.$to_s()))){result=entry;break;;};};if($truthy(entry['$respond_to?']("children"))){(function(){var $brk=Opal.new_brk();try{return $send(entry.$children().$keys(),'each',[],($$213=function(the_child_key){var self=$$213.$$s==null?this:$$213.$$s;if(the_child_key==null){the_child_key=nil;};attrib=entry.$children()['$[]'](the_child_key).$element().attributes.getNamedItem('id')||0;if($truthy(attrib==0)){return nil}else{attrib=attrib.value;if($truthy((attrib.$to_s()==the_id.$to_s()))){result=entry.$children()['$[]'](the_child_key);Opal.brk(nil,$brk);}else{return search_queue['$<<'](entry.$children()['$[]'](the_child_key))};};},$$213.$$s=self,$$213.$$brk=$brk,$$213.$$arity=1,$$213))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()};};return result;},$Page_find_object_by_dom_id$212.$$arity=-1);Opal.def(self,'$find_object',$Page_find_object$214=function $$find_object(object_name){var $a,$$215,self=this,result=nil,search_queue=nil,entry=nil;if(object_name==null){object_name=nil;};result=nil;search_queue=[self];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry['$respond_to?']("children"))){if($truthy(entry.$children()['$[]'](object_name))){result=entry.$children()['$[]'](object_name);break;;}else{$send(entry.$children().$keys(),'each',[],($$215=function(the_child){var self=$$215.$$s==null?this:$$215.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](entry.$children()['$[]'](the_child));},$$215.$$s=self,$$215.$$arity=1,$$215))}};};return result;},$Page_find_object$214.$$arity=-1);Opal.def(self,'$find_object_by',$Page_find_object_by$216=function $$find_object_by(the_title){var $$217,self=this,result=nil,uuid_check=nil;if(the_title==null){the_title=nil;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_title))){uuid_check=true}else{uuid_check=false};(function(){var $brk=Opal.new_brk();try{return $send(self.title_registry.$keys(),'each',[],($$217=function(the_uuid){var self=$$217.$$s==null?this:$$217.$$s;if(self.title_registry==null)self.title_registry=nil;if(the_uuid==null){the_uuid=nil;};if(uuid_check['$=='](true)){if($truthy(self.title_registry['$[]'](the_uuid).$to_s()['$include?'](the_title.$to_s()))){result=self.$find_object(the_uuid);Opal.brk(nil,$brk);}else{return nil}}else if(the_title['$=='](self.title_registry['$[]'](the_uuid))){result=self.$find_object(the_uuid);Opal.brk(nil,$brk);}else{return nil};},$$217.$$s=self,$$217.$$brk=$brk,$$217.$$arity=1,$$217))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();return result;},$Page_find_object_by$216.$$arity=-1);Opal.def(self,'$register_object',$Page_register_object$218=function $$register_object(the_title,the_object){var self=this,$ret_or_57=nil,$writer=nil;if(the_title==null){the_title=nil;};if(the_object==null){the_object=nil;};if($truthy((function(){if($truthy(($ret_or_57=the_title))){return the_object}else{return $ret_or_57};return nil;})())){$writer=[the_object.$uuid(),the_title.$to_s()];$send(self.title_registry,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}else{return false};},$Page_register_object$218.$$arity=-1);Opal.def(self,'$unregister_object',$Page_unregister_object$219=function $$unregister_object(the_title){var self=this,the_object=nil;if(the_title==null){the_title=nil;};if($truthy(the_title)){the_object=self.$find_object_by(the_title);if($truthy(the_object)){if($truthy(the_object['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport')))){the_object.$detach()};self.title_registry.$delete(the_object.$uuid());};return true;}else{return false};},$Page_unregister_object$219.$$arity=-1);Opal.def(self,'$factory',$Page_factory$220=function $$factory(){var self=this,$ret_or_58=nil;return(self.factory=(function(){if($truthy(($ret_or_58=self.factory))){return $ret_or_58}else{return $$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'Factory').$new(self)};return nil;})())},$Page_factory$220.$$arity=0);Opal.def(self,'$element',$Page_element$221=function $$element(){var self=this;return self.$factory().$body()},$Page_element$221.$$arity=0);Opal.def(self,'$parent',$Page_parent$222=function $$parent(){var self=this;return self},$Page_parent$222.$$arity=0);Opal.def(self,'$root',$Page_root$223=function $$root(){var self=this;return self},$Page_root$223.$$arity=0);Opal.def(self,'$domclear',$Page_domclear$224=function $$domclear(){var self=this;while(document.body.firstChild){document.body.removeChild(document.body.firstChild);};;return true;},$Page_domclear$224.$$arity=0);return(Opal.def(self,'$clear',$Page_clear$225=function $$clear(){var $$226,$$227,$$228,self=this,the_attributes=nil;$send(self,'all_descendants',[],($$226=function(the_child){var self=$$226.$$s==null?this:$$226.$$s;if(the_child==null){the_child=nil;};return the_child.$remove_listeners();},$$226.$$s=self,$$226.$$arity=1,$$226));self.$remove_listeners();$send(self,'each_child',[],($$227=function(the_child){var self=$$227.$$s==null?this:$$227.$$s;if(the_child==null){the_child=nil;};return the_child.$destroy();},$$227.$$s=self,$$227.$$arity=1,$$227));the_attributes=document.body.getAttributeNames();$send(the_attributes,'each',[],($$228=function(the_attribute){var self=$$228.$$s==null?this:$$228.$$s;if(the_attribute==null){the_attribute=nil;};return self.$clear_attribute(the_attribute);},$$228.$$s=self,$$228.$$arity=1,$$228));return true;},$Page_clear$225.$$arity=0),nil)&&'clear';})($nesting[0],null,$nesting);Opal.defs(self,'$load_page',$Vdom_load_page$229=function $$load_page(page_object){var $$230,$$233,self=this,the_theme=nil,$ret_or_59=nil;if(page_object==null){page_object=nil;};if($truthy($$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object")['$is_any?']($$$($$$($$$('::','GxG'),'Gui'),'Page'),$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'Page')))){$$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object").$clear();$$$($$$($$$('::','GxG'),'Gui'),'Vdom').$clear_rules();$$$($$$($$$('::','GxG'),'Gui'),'Vdom').$refresh_css_cache();};the_theme=(function(){if($truthy(($ret_or_59=page_object['$[]']("settings")['$[]']("theme")))){return $ret_or_59}else{return "default"};return nil;})();$send($$$($$$('::','GxG'),'CONNECTION'),'pull_object',[""+"/Public/www/content/themes/"+(the_theme)],($$230=function(response){var self=$$230.$$s==null?this:$$230.$$s,$$231,$$232,$writer=nil;if(response==null){response=nil;};if($truthy(response['$is_a?']($$$('::','Array')))){$send(response['$[]'](0)['$[]']("resources"),'each',[],($$231=function(resource_profile){var self=$$231.$$s==null?this:$$231.$$s;if(resource_profile==null){resource_profile=nil;};if(resource_profile['$[]']("resource_type")['$==']("font-face")){return $$$($$$($$$('::','GxG'),'Gui'),'Vdom').$load_font(resource_profile)}else{return nil};},$$231.$$s=self,$$231.$$arity=1,$$231));$send(response['$[]'](0)['$[]']("rules"),'each_pair',[],($$232=function(rule_name,rule_properties){var self=$$232.$$s==null?this:$$232.$$s;if(rule_name==null){rule_name=nil;};if(rule_properties==null){rule_properties=nil;};return $$$($$$($$$('::','GxG'),'Gui'),'Vdom').$set_rule(rule_name,rule_properties);},$$232.$$s=self,$$232.$$arity=2,$$232));if($truthy($$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object")['$is_any?']($$$($$$($$$('::','GxG'),'Gui'),'Page'),$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'Page')))){$$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object").$build_page(page_object)}else{$writer=["object",$$$($$$($$$('::','GxG'),'Gui'),'Page').$new(page_object)];$send($$$($$$('::','GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};return $$$($$$('::','GxG'),'Gui').$layout_refresh();}else{return self.$log_error($hash2(["error"],{"error":$$($nesting,'Exception').$new("Invalid theme object as response.")}))};},$$230.$$s=self,$$230.$$arity=1,$$230));if($truthy(page_object['$[]']("requirements")['$is_any?']($$$('::','Array'),$$$($$$($$$('::','GxG'),'Database'),'DetachedArray'),$$$($$$($$$('::','GxG'),'Database'),'PersistedArray')))){if($truthy($rb_gt(page_object['$[]']("requirements").$size(),0))){self.$load_libraries(page_object['$[]']("requirements"))}};if($truthy(page_object['$[]']("auto_start")['$is_any?']($$$('::','Array'),$$$($$$($$$('::','GxG'),'Database'),'DetachedArray'),$$$($$$($$$('::','GxG'),'Database'),'PersistedArray')))){if($truthy($rb_gt(page_object['$[]']("auto_start").$size(),0))){$send(page_object['$[]']("auto_start"),'each',[],($$233=function(the_requirement){var self=$$233.$$s==null?this:$$233.$$s;if(the_requirement==null){the_requirement=nil;};return self.$application_open($hash2(["name","restore"],{"name":the_requirement['$[]']("name"),"restore":true}));},$$233.$$s=self,$$233.$$arity=1,$$233))}};return true;},$Vdom_load_page$229.$$arity=-1);return(Opal.defs(self,'$navigate_to',$Vdom_navigate_to$234=function $$navigate_to(the_location){var $$235,$$236,self=this,request_path=nil,$ret_or_60=nil,$writer=nil,error_handler=nil;if(the_location==null){the_location="";};if($truthy($rb_gt($$$($$$('::','GxG'),'CONNECTION').$relative_url().$to_s().$size(),0))){request_path=the_location['$[]'](Opal.Range.$new($$$($$$('::','GxG'),'CONNECTION').$relative_url().$size(),-1,false))}else{request_path=the_location};if($truthy((function(){if($truthy(($ret_or_60=request_path['$==']("/")))){return $ret_or_60}else{return request_path['$==']("")};return nil;})())){request_path="/index"};if(request_path['$[]'](0)['$==']("/")){}else{request_path=$rb_plus("/",request_path)};$writer=["host_path",request_path];$send($$$($$$('::','GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy($$$($$($nesting,'GxG'),'PAGES')['$[]'](request_path))){return $$$($$$($$($nesting,'GxG'),'Gui'),'Vdom').$load_page($$$($$($nesting,'GxG'),'PAGES')['$[]'](request_path))}else{error_handler=$send($$($nesting,'Proc'),'new',[],($$235=function(error){var self=$$235.$$s==null?this:$$235.$$s;if(error==null){error=nil;};return self.$log_error(error.$inspect());},$$235.$$s=self,$$235.$$arity=1,$$235));return $send($$$($$$('::','GxG'),'CONNECTION'),'pull_object',[""+"/Public/www/content/pages"+(request_path),error_handler],($$236=function(response){var self=$$236.$$s==null?this:$$236.$$s;if(response==null){response=nil;};self.$puts(""+"Response (Page Load): "+(response.$inspect()));if($truthy(response['$is_any?']($$$('::','Array')))){$writer=[request_path,response['$[]'](0)];$send($$$($$($nesting,'GxG'),'PAGES'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$$$($$$($$($nesting,'GxG'),'Gui'),'Vdom').$load_page($$$($$($nesting,'GxG'),'PAGES')['$[]'](request_path));}else{self.$log_error($hash2(["error"],{"error":$$($nesting,'Exception').$new("Invalid page object as response.")}))};return $$$($$$('::','GxG'),'Gui').$layout_refresh();},$$236.$$s=self,$$236.$$arity=1,$$236));};},$Vdom_navigate_to$234.$$arity=-1),nil)&&'navigate_to';})($nesting[0],$nesting)})($nesting[0],$nesting)})($nesting[0],$nesting)};Opal.modules["web/gxg_foundation"]=function(Opal){function $rb_minus(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs-rhs:lhs['$-'](rhs);} function $rb_gt(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs>rhs:lhs['$>'](rhs);} function $rb_plus(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs+rhs:lhs['$+'](rhs);} -var self=Opal.top,$nesting=[],nil=Opal.nil,$$$=Opal.$$$,$$=Opal.$$,$module=Opal.module,$klass=Opal.klass,$send2=Opal.send2,$find_super=Opal.find_super,$send=Opal.send,$hash2=Opal.hash2,$truthy=Opal.truthy;Opal.add_stubs(['$to_s','$clone','$[]=','$-','$values','$children','$>','$size','$shift','$==','$domtype','$to_sym','$title','$value','$each','$<<','$delete','$[]','$on','$index','$keys','$component_class','$is_any?','$is_a?','$component_registered?','$!=','$log_warn','$inspect','$register_component_class','$include?','$new','$build_components','$page','$title=','$find_object_by','$set_text','$add_child','$+','$set_attribute','$uuid','$set_script','$find_descendant','$raise','$downcase','$value=','$private','$log_error']);(function($base,$parent_nesting){var self=$module($base,'GxG');var $nesting=[self].concat($parent_nesting);return(function($base,$parent_nesting){var self=$module($base,'Gui');var $nesting=[self].concat($parent_nesting),$Gui_component_class$126,$Gui_class_component$127,$Gui_component_registered$ques$128,$Gui_register_component_class$129;(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Page');var $nesting=[self].concat($parent_nesting);return nil})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'Page'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Abbreviation');var $nesting=[self].concat($parent_nesting),$Abbreviation__before_create$1;self.$$prototype.title=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Abbreviation__before_create$1=function $$_before_create(){var $iter=$Abbreviation__before_create$1.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Abbreviation__before_create$1.$$p=null;$send2(self,$find_super(self,'_before_create',$Abbreviation__before_create$1,false,true),'_before_create',[],null);self.domtype="abbr";$writer=["title",self.title.$clone().$to_s()];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$Abbreviation__before_create$1.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Address');var $nesting=[self].concat($parent_nesting),$Address__before_create$2;return(Opal.def(self,'$_before_create',$Address__before_create$2=function $$_before_create(){var $iter=$Address__before_create$2.$$p,$yield=$iter||nil,self=this;if($iter)$Address__before_create$2.$$p=null;$send2(self,$find_super(self,'_before_create',$Address__before_create$2,false,true),'_before_create',[],null);return(self.domtype="address");},$Address__before_create$2.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Area');var $nesting=[self].concat($parent_nesting),$Area__before_create$3;return(Opal.def(self,'$_before_create',$Area__before_create$3=function $$_before_create(){var $iter=$Area__before_create$3.$$p,$yield=$iter||nil,self=this;if($iter)$Area__before_create$3.$$p=null;$send2(self,$find_super(self,'_before_create',$Area__before_create$3,false,true),'_before_create',[],null);return(self.domtype="area");},$Area__before_create$3.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Bold');var $nesting=[self].concat($parent_nesting),$Bold__before_create$4;return(Opal.def(self,'$_before_create',$Bold__before_create$4=function $$_before_create(){var $iter=$Bold__before_create$4.$$p,$yield=$iter||nil,self=this;if($iter)$Bold__before_create$4.$$p=null;$send2(self,$find_super(self,'_before_create',$Bold__before_create$4,false,true),'_before_create',[],null);return(self.domtype="b");},$Bold__before_create$4.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Bdi');var $nesting=[self].concat($parent_nesting),$Bdi__before_create$5;return(Opal.def(self,'$_before_create',$Bdi__before_create$5=function $$_before_create(){var $iter=$Bdi__before_create$5.$$p,$yield=$iter||nil,self=this;if($iter)$Bdi__before_create$5.$$p=null;$send2(self,$find_super(self,'_before_create',$Bdi__before_create$5,false,true),'_before_create',[],null);return(self.domtype="bdi");},$Bdi__before_create$5.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Bdo');var $nesting=[self].concat($parent_nesting),$Bdo__before_create$6;return(Opal.def(self,'$_before_create',$Bdo__before_create$6=function $$_before_create(){var $iter=$Bdo__before_create$6.$$p,$yield=$iter||nil,self=this;if($iter)$Bdo__before_create$6.$$p=null;$send2(self,$find_super(self,'_before_create',$Bdo__before_create$6,false,true),'_before_create',[],null);return(self.domtype="bdo");},$Bdo__before_create$6.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BlockQuote');var $nesting=[self].concat($parent_nesting),$BlockQuote__before_create$7;return(Opal.def(self,'$_before_create',$BlockQuote__before_create$7=function $$_before_create(){var $iter=$BlockQuote__before_create$7.$$p,$yield=$iter||nil,self=this;if($iter)$BlockQuote__before_create$7.$$p=null;$send2(self,$find_super(self,'_before_create',$BlockQuote__before_create$7,false,true),'_before_create',[],null);return(self.domtype="blockquote");},$BlockQuote__before_create$7.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Break');var $nesting=[self].concat($parent_nesting),$Break__before_create$8;return(Opal.def(self,'$_before_create',$Break__before_create$8=function $$_before_create(){var $iter=$Break__before_create$8.$$p,$yield=$iter||nil,self=this;if($iter)$Break__before_create$8.$$p=null;$send2(self,$find_super(self,'_before_create',$Break__before_create$8,false,true),'_before_create',[],null);return(self.domtype="br");},$Break__before_create$8.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Caption');var $nesting=[self].concat($parent_nesting),$Caption__before_create$9;return(Opal.def(self,'$_before_create',$Caption__before_create$9=function $$_before_create(){var $iter=$Caption__before_create$9.$$p,$yield=$iter||nil,self=this;if($iter)$Caption__before_create$9.$$p=null;$send2(self,$find_super(self,'_before_create',$Caption__before_create$9,false,true),'_before_create',[],null);return(self.domtype="caption");},$Caption__before_create$9.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Cite');var $nesting=[self].concat($parent_nesting),$Cite__before_create$10;return(Opal.def(self,'$_before_create',$Cite__before_create$10=function $$_before_create(){var $iter=$Cite__before_create$10.$$p,$yield=$iter||nil,self=this;if($iter)$Cite__before_create$10.$$p=null;$send2(self,$find_super(self,'_before_create',$Cite__before_create$10,false,true),'_before_create',[],null);return(self.domtype="cite");},$Cite__before_create$10.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Code');var $nesting=[self].concat($parent_nesting),$Code__before_create$11;return(Opal.def(self,'$_before_create',$Code__before_create$11=function $$_before_create(){var $iter=$Code__before_create$11.$$p,$yield=$iter||nil,self=this;if($iter)$Code__before_create$11.$$p=null;$send2(self,$find_super(self,'_before_create',$Code__before_create$11,false,true),'_before_create',[],null);return(self.domtype="code");},$Code__before_create$11.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Column');var $nesting=[self].concat($parent_nesting),$Column__before_create$12;return(Opal.def(self,'$_before_create',$Column__before_create$12=function $$_before_create(){var $iter=$Column__before_create$12.$$p,$yield=$iter||nil,self=this;if($iter)$Column__before_create$12.$$p=null;$send2(self,$find_super(self,'_before_create',$Column__before_create$12,false,true),'_before_create',[],null);return(self.domtype="col");},$Column__before_create$12.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ColumnGroup');var $nesting=[self].concat($parent_nesting),$ColumnGroup__before_create$13;return(Opal.def(self,'$_before_create',$ColumnGroup__before_create$13=function $$_before_create(){var $iter=$ColumnGroup__before_create$13.$$p,$yield=$iter||nil,self=this;if($iter)$ColumnGroup__before_create$13.$$p=null;$send2(self,$find_super(self,'_before_create',$ColumnGroup__before_create$13,false,true),'_before_create',[],null);return(self.domtype="colgroup");},$ColumnGroup__before_create$13.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Data');var $nesting=[self].concat($parent_nesting),$Data__before_create$14;return(Opal.def(self,'$_before_create',$Data__before_create$14=function $$_before_create(){var $iter=$Data__before_create$14.$$p,$yield=$iter||nil,self=this;if($iter)$Data__before_create$14.$$p=null;$send2(self,$find_super(self,'_before_create',$Data__before_create$14,false,true),'_before_create',[],null);return(self.domtype="data");},$Data__before_create$14.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DataList');var $nesting=[self].concat($parent_nesting),$DataList__before_create$15;return(Opal.def(self,'$_before_create',$DataList__before_create$15=function $$_before_create(){var $iter=$DataList__before_create$15.$$p,$yield=$iter||nil,self=this;if($iter)$DataList__before_create$15.$$p=null;$send2(self,$find_super(self,'_before_create',$DataList__before_create$15,false,true),'_before_create',[],null);return(self.domtype="datalist");},$DataList__before_create$15.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Description');var $nesting=[self].concat($parent_nesting),$Description__before_create$16;return(Opal.def(self,'$_before_create',$Description__before_create$16=function $$_before_create(){var $iter=$Description__before_create$16.$$p,$yield=$iter||nil,self=this;if($iter)$Description__before_create$16.$$p=null;$send2(self,$find_super(self,'_before_create',$Description__before_create$16,false,true),'_before_create',[],null);return(self.domtype="dd");},$Description__before_create$16.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Deleted');var $nesting=[self].concat($parent_nesting),$Deleted__before_create$17;return(Opal.def(self,'$_before_create',$Deleted__before_create$17=function $$_before_create(){var $iter=$Deleted__before_create$17.$$p,$yield=$iter||nil,self=this;if($iter)$Deleted__before_create$17.$$p=null;$send2(self,$find_super(self,'_before_create',$Deleted__before_create$17,false,true),'_before_create',[],null);return(self.domtype="del");},$Deleted__before_create$17.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Details');var $nesting=[self].concat($parent_nesting),$Details__before_create$18;return(Opal.def(self,'$_before_create',$Details__before_create$18=function $$_before_create(){var $iter=$Details__before_create$18.$$p,$yield=$iter||nil,self=this;if($iter)$Details__before_create$18.$$p=null;$send2(self,$find_super(self,'_before_create',$Details__before_create$18,false,true),'_before_create',[],null);return(self.domtype="details");},$Details__before_create$18.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Dfn');var $nesting=[self].concat($parent_nesting),$Dfn__before_create$19;return(Opal.def(self,'$_before_create',$Dfn__before_create$19=function $$_before_create(){var $iter=$Dfn__before_create$19.$$p,$yield=$iter||nil,self=this;if($iter)$Dfn__before_create$19.$$p=null;$send2(self,$find_super(self,'_before_create',$Dfn__before_create$19,false,true),'_before_create',[],null);return(self.domtype="dfn");},$Dfn__before_create$19.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Dialog');var $nesting=[self].concat($parent_nesting),$Dialog__before_create$20;return(Opal.def(self,'$_before_create',$Dialog__before_create$20=function $$_before_create(){var $iter=$Dialog__before_create$20.$$p,$yield=$iter||nil,self=this;if($iter)$Dialog__before_create$20.$$p=null;$send2(self,$find_super(self,'_before_create',$Dialog__before_create$20,false,true),'_before_create',[],null);return(self.domtype="dialog");},$Dialog__before_create$20.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Division');var $nesting=[self].concat($parent_nesting),$Division__before_create$21;return(Opal.def(self,'$_before_create',$Division__before_create$21=function $$_before_create(){var $iter=$Division__before_create$21.$$p,$yield=$iter||nil,self=this;if($iter)$Division__before_create$21.$$p=null;$send2(self,$find_super(self,'_before_create',$Division__before_create$21,false,true),'_before_create',[],null);return(self.domtype="div");},$Division__before_create$21.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DescriptionList');var $nesting=[self].concat($parent_nesting),$DescriptionList__before_create$22;return(Opal.def(self,'$_before_create',$DescriptionList__before_create$22=function $$_before_create(){var $iter=$DescriptionList__before_create$22.$$p,$yield=$iter||nil,self=this;if($iter)$DescriptionList__before_create$22.$$p=null;$send2(self,$find_super(self,'_before_create',$DescriptionList__before_create$22,false,true),'_before_create',[],null);return(self.domtype="dl");},$DescriptionList__before_create$22.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DescriptionTerm');var $nesting=[self].concat($parent_nesting),$DescriptionTerm__before_create$23;return(Opal.def(self,'$_before_create',$DescriptionTerm__before_create$23=function $$_before_create(){var $iter=$DescriptionTerm__before_create$23.$$p,$yield=$iter||nil,self=this;if($iter)$DescriptionTerm__before_create$23.$$p=null;$send2(self,$find_super(self,'_before_create',$DescriptionTerm__before_create$23,false,true),'_before_create',[],null);return(self.domtype="dt");},$DescriptionTerm__before_create$23.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Emphasis');var $nesting=[self].concat($parent_nesting),$Emphasis__before_create$24;return(Opal.def(self,'$_before_create',$Emphasis__before_create$24=function $$_before_create(){var $iter=$Emphasis__before_create$24.$$p,$yield=$iter||nil,self=this;if($iter)$Emphasis__before_create$24.$$p=null;$send2(self,$find_super(self,'_before_create',$Emphasis__before_create$24,false,true),'_before_create',[],null);return(self.domtype="em");},$Emphasis__before_create$24.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Figure');var $nesting=[self].concat($parent_nesting),$Figure__before_create$25;return(Opal.def(self,'$_before_create',$Figure__before_create$25=function $$_before_create(){var $iter=$Figure__before_create$25.$$p,$yield=$iter||nil,self=this;if($iter)$Figure__before_create$25.$$p=null;$send2(self,$find_super(self,'_before_create',$Figure__before_create$25,false,true),'_before_create',[],null);return(self.domtype="figure");},$Figure__before_create$25.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'FigureCaption');var $nesting=[self].concat($parent_nesting),$FigureCaption__before_create$26;return(Opal.def(self,'$_before_create',$FigureCaption__before_create$26=function $$_before_create(){var $iter=$FigureCaption__before_create$26.$$p,$yield=$iter||nil,self=this;if($iter)$FigureCaption__before_create$26.$$p=null;$send2(self,$find_super(self,'_before_create',$FigureCaption__before_create$26,false,true),'_before_create',[],null);return(self.domtype="figcaption");},$FigureCaption__before_create$26.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ThemeDivider');var $nesting=[self].concat($parent_nesting),$ThemeDivider__before_create$27;return(Opal.def(self,'$_before_create',$ThemeDivider__before_create$27=function $$_before_create(){var $iter=$ThemeDivider__before_create$27.$$p,$yield=$iter||nil,self=this;if($iter)$ThemeDivider__before_create$27.$$p=null;$send2(self,$find_super(self,'_before_create',$ThemeDivider__before_create$27,false,true),'_before_create',[],null);return(self.domtype="hr");},$ThemeDivider__before_create$27.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Italic');var $nesting=[self].concat($parent_nesting),$Italic__before_create$28;return(Opal.def(self,'$_before_create',$Italic__before_create$28=function $$_before_create(){var $iter=$Italic__before_create$28.$$p,$yield=$iter||nil,self=this;if($iter)$Italic__before_create$28.$$p=null;$send2(self,$find_super(self,'_before_create',$Italic__before_create$28,false,true),'_before_create',[],null);return(self.domtype="i");},$Italic__before_create$28.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'InlineFrame');var $nesting=[self].concat($parent_nesting),$InlineFrame__before_create$29;return(Opal.def(self,'$_before_create',$InlineFrame__before_create$29=function $$_before_create(){var $iter=$InlineFrame__before_create$29.$$p,$yield=$iter||nil,self=this;if($iter)$InlineFrame__before_create$29.$$p=null;$send2(self,$find_super(self,'_before_create',$InlineFrame__before_create$29,false,true),'_before_create',[],null);return(self.domtype="iframe");},$InlineFrame__before_create$29.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Insertion');var $nesting=[self].concat($parent_nesting),$Insertion__before_create$30;return(Opal.def(self,'$_before_create',$Insertion__before_create$30=function $$_before_create(){var $iter=$Insertion__before_create$30.$$p,$yield=$iter||nil,self=this;if($iter)$Insertion__before_create$30.$$p=null;$send2(self,$find_super(self,'_before_create',$Insertion__before_create$30,false,true),'_before_create',[],null);return(self.domtype="ins");},$Insertion__before_create$30.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'KeyboardKey');var $nesting=[self].concat($parent_nesting),$KeyboardKey__before_create$31;return(Opal.def(self,'$_before_create',$KeyboardKey__before_create$31=function $$_before_create(){var $iter=$KeyboardKey__before_create$31.$$p,$yield=$iter||nil,self=this;if($iter)$KeyboardKey__before_create$31.$$p=null;$send2(self,$find_super(self,'_before_create',$KeyboardKey__before_create$31,false,true),'_before_create',[],null);return(self.domtype="kbd");},$KeyboardKey__before_create$31.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Map');var $nesting=[self].concat($parent_nesting),$Map__before_create$32;return(Opal.def(self,'$_before_create',$Map__before_create$32=function $$_before_create(){var $iter=$Map__before_create$32.$$p,$yield=$iter||nil,self=this;if($iter)$Map__before_create$32.$$p=null;$send2(self,$find_super(self,'_before_create',$Map__before_create$32,false,true),'_before_create',[],null);return(self.domtype="map");},$Map__before_create$32.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Mark');var $nesting=[self].concat($parent_nesting),$Mark__before_create$33;return(Opal.def(self,'$_before_create',$Mark__before_create$33=function $$_before_create(){var $iter=$Mark__before_create$33.$$p,$yield=$iter||nil,self=this;if($iter)$Mark__before_create$33.$$p=null;$send2(self,$find_super(self,'_before_create',$Mark__before_create$33,false,true),'_before_create',[],null);return(self.domtype="mark");},$Mark__before_create$33.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Meter');var $nesting=[self].concat($parent_nesting),$Meter__before_create$34;return(Opal.def(self,'$_before_create',$Meter__before_create$34=function $$_before_create(){var $iter=$Meter__before_create$34.$$p,$yield=$iter||nil,self=this;if($iter)$Meter__before_create$34.$$p=null;$send2(self,$find_super(self,'_before_create',$Meter__before_create$34,false,true),'_before_create',[],null);return(self.domtype="meter");},$Meter__before_create$34.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'NoScript');var $nesting=[self].concat($parent_nesting),$NoScript__before_create$35;return(Opal.def(self,'$_before_create',$NoScript__before_create$35=function $$_before_create(){var $iter=$NoScript__before_create$35.$$p,$yield=$iter||nil,self=this;if($iter)$NoScript__before_create$35.$$p=null;$send2(self,$find_super(self,'_before_create',$NoScript__before_create$35,false,true),'_before_create',[],null);return(self.domtype="noscript");},$NoScript__before_create$35.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Object');var $nesting=[self].concat($parent_nesting),$Object__before_create$36;return(Opal.def(self,'$_before_create',$Object__before_create$36=function $$_before_create(){var $iter=$Object__before_create$36.$$p,$yield=$iter||nil,self=this;if($iter)$Object__before_create$36.$$p=null;$send2(self,$find_super(self,'_before_create',$Object__before_create$36,false,true),'_before_create',[],null);return(self.domtype="object");},$Object__before_create$36.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OptionGroup');var $nesting=[self].concat($parent_nesting),$OptionGroup__before_create$37;return(Opal.def(self,'$_before_create',$OptionGroup__before_create$37=function $$_before_create(){var $iter=$OptionGroup__before_create$37.$$p,$yield=$iter||nil,self=this;if($iter)$OptionGroup__before_create$37.$$p=null;$send2(self,$find_super(self,'_before_create',$OptionGroup__before_create$37,false,true),'_before_create',[],null);return(self.domtype="optgroup");},$OptionGroup__before_create$37.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Parameter');var $nesting=[self].concat($parent_nesting),$Parameter__before_create$38;return(Opal.def(self,'$_before_create',$Parameter__before_create$38=function $$_before_create(){var $iter=$Parameter__before_create$38.$$p,$yield=$iter||nil,self=this;if($iter)$Parameter__before_create$38.$$p=null;$send2(self,$find_super(self,'_before_create',$Parameter__before_create$38,false,true),'_before_create',[],null);return(self.domtype="param");},$Parameter__before_create$38.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Picture');var $nesting=[self].concat($parent_nesting),$Picture__before_create$39;return(Opal.def(self,'$_before_create',$Picture__before_create$39=function $$_before_create(){var $iter=$Picture__before_create$39.$$p,$yield=$iter||nil,self=this;if($iter)$Picture__before_create$39.$$p=null;$send2(self,$find_super(self,'_before_create',$Picture__before_create$39,false,true),'_before_create',[],null);return(self.domtype="picture");},$Picture__before_create$39.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Preformatted');var $nesting=[self].concat($parent_nesting),$Preformatted__before_create$40;return(Opal.def(self,'$_before_create',$Preformatted__before_create$40=function $$_before_create(){var $iter=$Preformatted__before_create$40.$$p,$yield=$iter||nil,self=this;if($iter)$Preformatted__before_create$40.$$p=null;$send2(self,$find_super(self,'_before_create',$Preformatted__before_create$40,false,true),'_before_create',[],null);return(self.domtype="pre");},$Preformatted__before_create$40.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Progress');var $nesting=[self].concat($parent_nesting),$Progress__before_create$41;return(Opal.def(self,'$_before_create',$Progress__before_create$41=function $$_before_create(){var $iter=$Progress__before_create$41.$$p,$yield=$iter||nil,self=this;if($iter)$Progress__before_create$41.$$p=null;$send2(self,$find_super(self,'_before_create',$Progress__before_create$41,false,true),'_before_create',[],null);return(self.domtype="progress");},$Progress__before_create$41.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Quotation');var $nesting=[self].concat($parent_nesting),$Quotation__before_create$42;return(Opal.def(self,'$_before_create',$Quotation__before_create$42=function $$_before_create(){var $iter=$Quotation__before_create$42.$$p,$yield=$iter||nil,self=this;if($iter)$Quotation__before_create$42.$$p=null;$send2(self,$find_super(self,'_before_create',$Quotation__before_create$42,false,true),'_before_create',[],null);return(self.domtype="q");},$Quotation__before_create$42.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'StrikeThrough');var $nesting=[self].concat($parent_nesting),$StrikeThrough__before_create$43;return(Opal.def(self,'$_before_create',$StrikeThrough__before_create$43=function $$_before_create(){var $iter=$StrikeThrough__before_create$43.$$p,$yield=$iter||nil,self=this;if($iter)$StrikeThrough__before_create$43.$$p=null;$send2(self,$find_super(self,'_before_create',$StrikeThrough__before_create$43,false,true),'_before_create',[],null);return(self.domtype="s");},$StrikeThrough__before_create$43.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Sample');var $nesting=[self].concat($parent_nesting),$Sample__before_create$44;return(Opal.def(self,'$_before_create',$Sample__before_create$44=function $$_before_create(){var $iter=$Sample__before_create$44.$$p,$yield=$iter||nil,self=this;if($iter)$Sample__before_create$44.$$p=null;$send2(self,$find_super(self,'_before_create',$Sample__before_create$44,false,true),'_before_create',[],null);return(self.domtype="samp");},$Sample__before_create$44.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Source');var $nesting=[self].concat($parent_nesting),$Source__before_create$45;return(Opal.def(self,'$_before_create',$Source__before_create$45=function $$_before_create(){var $iter=$Source__before_create$45.$$p,$yield=$iter||nil,self=this;if($iter)$Source__before_create$45.$$p=null;$send2(self,$find_super(self,'_before_create',$Source__before_create$45,false,true),'_before_create',[],null);return(self.domtype="source");},$Source__before_create$45.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Strong');var $nesting=[self].concat($parent_nesting),$Strong__before_create$46;return(Opal.def(self,'$_before_create',$Strong__before_create$46=function $$_before_create(){var $iter=$Strong__before_create$46.$$p,$yield=$iter||nil,self=this;if($iter)$Strong__before_create$46.$$p=null;$send2(self,$find_super(self,'_before_create',$Strong__before_create$46,false,true),'_before_create',[],null);return(self.domtype="strong");},$Strong__before_create$46.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Small');var $nesting=[self].concat($parent_nesting),$Small__before_create$47;return(Opal.def(self,'$_before_create',$Small__before_create$47=function $$_before_create(){var $iter=$Small__before_create$47.$$p,$yield=$iter||nil,self=this;if($iter)$Small__before_create$47.$$p=null;$send2(self,$find_super(self,'_before_create',$Small__before_create$47,false,true),'_before_create',[],null);return(self.domtype="small");},$Small__before_create$47.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Style');var $nesting=[self].concat($parent_nesting),$Style__before_create$48;return(Opal.def(self,'$_before_create',$Style__before_create$48=function $$_before_create(){var $iter=$Style__before_create$48.$$p,$yield=$iter||nil,self=this;if($iter)$Style__before_create$48.$$p=null;$send2(self,$find_super(self,'_before_create',$Style__before_create$48,false,true),'_before_create',[],null);return(self.domtype="style");},$Style__before_create$48.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'SubScript');var $nesting=[self].concat($parent_nesting),$SubScript__before_create$49;return(Opal.def(self,'$_before_create',$SubScript__before_create$49=function $$_before_create(){var $iter=$SubScript__before_create$49.$$p,$yield=$iter||nil,self=this;if($iter)$SubScript__before_create$49.$$p=null;$send2(self,$find_super(self,'_before_create',$SubScript__before_create$49,false,true),'_before_create',[],null);return(self.domtype="sub");},$SubScript__before_create$49.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Summary');var $nesting=[self].concat($parent_nesting),$Summary__before_create$50;return(Opal.def(self,'$_before_create',$Summary__before_create$50=function $$_before_create(){var $iter=$Summary__before_create$50.$$p,$yield=$iter||nil,self=this;if($iter)$Summary__before_create$50.$$p=null;$send2(self,$find_super(self,'_before_create',$Summary__before_create$50,false,true),'_before_create',[],null);return(self.domtype="summary");},$Summary__before_create$50.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'SuperScript');var $nesting=[self].concat($parent_nesting),$SuperScript__before_create$51;return(Opal.def(self,'$_before_create',$SuperScript__before_create$51=function $$_before_create(){var $iter=$SuperScript__before_create$51.$$p,$yield=$iter||nil,self=this;if($iter)$SuperScript__before_create$51.$$p=null;$send2(self,$find_super(self,'_before_create',$SuperScript__before_create$51,false,true),'_before_create',[],null);return(self.domtype="sup");},$SuperScript__before_create$51.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Svg');var $nesting=[self].concat($parent_nesting),$Svg__before_create$52;return(Opal.def(self,'$_before_create',$Svg__before_create$52=function $$_before_create(){var $iter=$Svg__before_create$52.$$p,$yield=$iter||nil,self=this;if($iter)$Svg__before_create$52.$$p=null;$send2(self,$find_super(self,'_before_create',$Svg__before_create$52,false,true),'_before_create',[],null);return(self.domtype="svg");},$Svg__before_create$52.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Template');var $nesting=[self].concat($parent_nesting),$Template__before_create$53;return(Opal.def(self,'$_before_create',$Template__before_create$53=function $$_before_create(){var $iter=$Template__before_create$53.$$p,$yield=$iter||nil,self=this;if($iter)$Template__before_create$53.$$p=null;$send2(self,$find_super(self,'_before_create',$Template__before_create$53,false,true),'_before_create',[],null);return(self.domtype="template");},$Template__before_create$53.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Time');var $nesting=[self].concat($parent_nesting),$Time__before_create$54;return(Opal.def(self,'$_before_create',$Time__before_create$54=function $$_before_create(){var $iter=$Time__before_create$54.$$p,$yield=$iter||nil,self=this;if($iter)$Time__before_create$54.$$p=null;$send2(self,$find_super(self,'_before_create',$Time__before_create$54,false,true),'_before_create',[],null);return(self.domtype="time");},$Time__before_create$54.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Track');var $nesting=[self].concat($parent_nesting),$Track__before_create$55;return(Opal.def(self,'$_before_create',$Track__before_create$55=function $$_before_create(){var $iter=$Track__before_create$55.$$p,$yield=$iter||nil,self=this;if($iter)$Track__before_create$55.$$p=null;$send2(self,$find_super(self,'_before_create',$Track__before_create$55,false,true),'_before_create',[],null);return(self.domtype="track");},$Track__before_create$55.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Misspelled');var $nesting=[self].concat($parent_nesting),$Misspelled__before_create$56;return(Opal.def(self,'$_before_create',$Misspelled__before_create$56=function $$_before_create(){var $iter=$Misspelled__before_create$56.$$p,$yield=$iter||nil,self=this;if($iter)$Misspelled__before_create$56.$$p=null;$send2(self,$find_super(self,'_before_create',$Misspelled__before_create$56,false,true),'_before_create',[],null);return(self.domtype="u");},$Misspelled__before_create$56.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Variable');var $nesting=[self].concat($parent_nesting),$Variable__before_create$57;return(Opal.def(self,'$_before_create',$Variable__before_create$57=function $$_before_create(){var $iter=$Variable__before_create$57.$$p,$yield=$iter||nil,self=this;if($iter)$Variable__before_create$57.$$p=null;$send2(self,$find_super(self,'_before_create',$Variable__before_create$57,false,true),'_before_create',[],null);return(self.domtype="var");},$Variable__before_create$57.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'WordBreak');var $nesting=[self].concat($parent_nesting),$WordBreak__before_create$58;return(Opal.def(self,'$_before_create',$WordBreak__before_create$58=function $$_before_create(){var $iter=$WordBreak__before_create$58.$$p,$yield=$iter||nil,self=this;if($iter)$WordBreak__before_create$58.$$p=null;$send2(self,$find_super(self,'_before_create',$WordBreak__before_create$58,false,true),'_before_create',[],null);return(self.domtype="wbr");},$WordBreak__before_create$58.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header');var $nesting=[self].concat($parent_nesting),$Header__before_create$59;return(Opal.def(self,'$_before_create',$Header__before_create$59=function $$_before_create(){var $iter=$Header__before_create$59.$$p,$yield=$iter||nil,self=this;if($iter)$Header__before_create$59.$$p=null;$send2(self,$find_super(self,'_before_create',$Header__before_create$59,false,true),'_before_create',[],null);return(self.domtype="header");},$Header__before_create$59.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Navigation');var $nesting=[self].concat($parent_nesting),$Navigation__before_create$60;return(Opal.def(self,'$_before_create',$Navigation__before_create$60=function $$_before_create(){var $iter=$Navigation__before_create$60.$$p,$yield=$iter||nil,self=this;if($iter)$Navigation__before_create$60.$$p=null;$send2(self,$find_super(self,'_before_create',$Navigation__before_create$60,false,true),'_before_create',[],null);return(self.domtype="nav");},$Navigation__before_create$60.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Main');var $nesting=[self].concat($parent_nesting),$Main__before_create$61;return(Opal.def(self,'$_before_create',$Main__before_create$61=function $$_before_create(){var $iter=$Main__before_create$61.$$p,$yield=$iter||nil,self=this;if($iter)$Main__before_create$61.$$p=null;$send2(self,$find_super(self,'_before_create',$Main__before_create$61,false,true),'_before_create',[],null);return(self.domtype="main");},$Main__before_create$61.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Section');var $nesting=[self].concat($parent_nesting),$Section__before_create$62;return(Opal.def(self,'$_before_create',$Section__before_create$62=function $$_before_create(){var $iter=$Section__before_create$62.$$p,$yield=$iter||nil,self=this;if($iter)$Section__before_create$62.$$p=null;$send2(self,$find_super(self,'_before_create',$Section__before_create$62,false,true),'_before_create',[],null);return(self.domtype="section");},$Section__before_create$62.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Article');var $nesting=[self].concat($parent_nesting),$Article__before_create$63;return(Opal.def(self,'$_before_create',$Article__before_create$63=function $$_before_create(){var $iter=$Article__before_create$63.$$p,$yield=$iter||nil,self=this;if($iter)$Article__before_create$63.$$p=null;$send2(self,$find_super(self,'_before_create',$Article__before_create$63,false,true),'_before_create',[],null);return(self.domtype="article");},$Article__before_create$63.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Aside');var $nesting=[self].concat($parent_nesting),$Aside__before_create$64;return(Opal.def(self,'$_before_create',$Aside__before_create$64=function $$_before_create(){var $iter=$Aside__before_create$64.$$p,$yield=$iter||nil,self=this;if($iter)$Aside__before_create$64.$$p=null;$send2(self,$find_super(self,'_before_create',$Aside__before_create$64,false,true),'_before_create',[],null);return(self.domtype="aside");},$Aside__before_create$64.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Footer');var $nesting=[self].concat($parent_nesting),$Footer__before_create$65;return(Opal.def(self,'$_before_create',$Footer__before_create$65=function $$_before_create(){var $iter=$Footer__before_create$65.$$p,$yield=$iter||nil,self=this;if($iter)$Footer__before_create$65.$$p=null;$send2(self,$find_super(self,'_before_create',$Footer__before_create$65,false,true),'_before_create',[],null);return(self.domtype="footer");},$Footer__before_create$65.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Form');var $nesting=[self].concat($parent_nesting),$Form__before_create$66,$Form_form_data$67;Opal.def(self,'$_before_create',$Form__before_create$66=function $$_before_create(){var $iter=$Form__before_create$66.$$p,$yield=$iter||nil,self=this;if($iter)$Form__before_create$66.$$p=null;$send2(self,$find_super(self,'_before_create',$Form__before_create$66,false,true),'_before_create',[],null);return(self.domtype="div");},$Form__before_create$66.$$arity=0);return(Opal.def(self,'$form_data',$Form_form_data$67=function $$form_data(){var $a,$$68,self=this,result=nil,search_queue=nil,entry=nil,$writer=nil;result=$hash2([],{});search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if(entry.$domtype()['$==']("input")){$writer=[entry.$title().$to_s().$to_sym(),entry.$value()];$send(result,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];}else{$send(entry.$children().$values(),'each',[],($$68=function(the_child){var self=$$68.$$s==null?this:$$68.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$68.$$s=self,$$68.$$arity=1,$$68))}};};return result;},$Form_form_data$67.$$arity=0),nil)&&'form_data';})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ButtonInput');var $nesting=[self].concat($parent_nesting),$ButtonInput__before_create$69;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$ButtonInput__before_create$69=function $$_before_create(){var $iter=$ButtonInput__before_create$69.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ButtonInput__before_create$69.$$p=null;$send2(self,$find_super(self,'_before_create',$ButtonInput__before_create$69,false,true),'_before_create',[],null);$writer=["type","button"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$ButtonInput__before_create$69.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseClickableElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'SubmitButton');var $nesting=[self].concat($parent_nesting),$SubmitButton__before_create$70;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$SubmitButton__before_create$70=function $$_before_create(){var $iter=$SubmitButton__before_create$70.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$SubmitButton__before_create$70.$$p=null;$send2(self,$find_super(self,'_before_create',$SubmitButton__before_create$70,false,true),'_before_create',[],null);$writer=["type","submit"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$SubmitButton__before_create$70.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseClickableElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Block');var $nesting=[self].concat($parent_nesting),$Block__before_create$71;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Block__before_create$71=function $$_before_create(){var $iter=$Block__before_create$71.$$p,$yield=$iter||nil,self=this;if($iter)$Block__before_create$71.$$p=null;$send2(self,$find_super(self,'_before_create',$Block__before_create$71,false,true),'_before_create',[],null);self.domtype="div";self.options.$delete("type");return true;},$Block__before_create$71.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseClickableElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'CheckBox');var $nesting=[self].concat($parent_nesting),$CheckBox__before_create$72;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$CheckBox__before_create$72=function $$_before_create(){var $iter=$CheckBox__before_create$72.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$CheckBox__before_create$72.$$p=null;$send2(self,$find_super(self,'_before_create',$CheckBox__before_create$72,false,true),'_before_create',[],null);$writer=["type","checkbox"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$CheckBox__before_create$72.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseClickableElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Image');var $nesting=[self].concat($parent_nesting),$Image__before_create$73;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Image__before_create$73=function $$_before_create(){var $iter=$Image__before_create$73.$$p,$yield=$iter||nil,self=this,$writer=nil,$ret_or_1=nil;if($iter)$Image__before_create$73.$$p=null;$send2(self,$find_super(self,'_before_create',$Image__before_create$73,false,true),'_before_create',[],null);self.domtype="image";if($truthy(self.options['$[]']("source"))){$writer=["src",self.options.$delete("source")];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(($ret_or_1=self.options['$[]']("alt")))){return $ret_or_1}else{$writer=["alt",self.options['$[]']("src")];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Image__before_create$73.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Video');var $nesting=[self].concat($parent_nesting),$Video__before_create$74;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Video__before_create$74=function $$_before_create(){var $iter=$Video__before_create$74.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Video__before_create$74.$$p=null;$send2(self,$find_super(self,'_before_create',$Video__before_create$74,false,true),'_before_create',[],null);self.domtype="video";if($truthy(self.options['$[]']("source"))){$writer=["src",self.options.$delete("source")];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};},$Video__before_create$74.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Audio');var $nesting=[self].concat($parent_nesting),$Audio__before_create$75;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Audio__before_create$75=function $$_before_create(){var $iter=$Audio__before_create$75.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Audio__before_create$75.$$p=null;$send2(self,$find_super(self,'_before_create',$Audio__before_create$75,false,true),'_before_create',[],null);self.domtype="audio";if($truthy(self.options['$[]']("source"))){$writer=["src",self.options.$delete("source")];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};},$Audio__before_create$75.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Canvas');var $nesting=[self].concat($parent_nesting),$Canvas__before_create$76;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Canvas__before_create$76=function $$_before_create(){var $iter=$Canvas__before_create$76.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Canvas__before_create$76.$$p=null;$send2(self,$find_super(self,'_before_create',$Canvas__before_create$76,false,true),'_before_create',[],null);self.domtype="canvas";if($truthy(self.options['$[]']("source"))){$writer=["src",self.options.$delete("source")];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};},$Canvas__before_create$76.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'HiddenInput');var $nesting=[self].concat($parent_nesting),$HiddenInput__before_create$77;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$HiddenInput__before_create$77=function $$_before_create(){var $iter=$HiddenInput__before_create$77.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$HiddenInput__before_create$77.$$p=null;$send2(self,$find_super(self,'_before_create',$HiddenInput__before_create$77,false,true),'_before_create',[],null);$writer=["type","hidden"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$HiddenInput__before_create$77.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'FileInput');var $nesting=[self].concat($parent_nesting),$FileInput__before_create$78;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$FileInput__before_create$78=function $$_before_create(){var $iter=$FileInput__before_create$78.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$FileInput__before_create$78.$$p=null;$send2(self,$find_super(self,'_before_create',$FileInput__before_create$78,false,true),'_before_create',[],null);$writer=["type","file"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$FileInput__before_create$78.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TextInput');var $nesting=[self].concat($parent_nesting),$TextInput__before_create$79;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$TextInput__before_create$79=function $$_before_create(){var $iter=$TextInput__before_create$79.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TextInput__before_create$79.$$p=null;$send2(self,$find_super(self,'_before_create',$TextInput__before_create$79,false,true),'_before_create',[],null);$writer=["type","text"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$TextInput__before_create$79.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'PasswordInput');var $nesting=[self].concat($parent_nesting),$PasswordInput__before_create$80;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$PasswordInput__before_create$80=function $$_before_create(){var $iter=$PasswordInput__before_create$80.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$PasswordInput__before_create$80.$$p=null;$send2(self,$find_super(self,'_before_create',$PasswordInput__before_create$80,false,true),'_before_create',[],null);$writer=["type","password"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$PasswordInput__before_create$80.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ResetInput');var $nesting=[self].concat($parent_nesting),$ResetInput__before_create$81;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$ResetInput__before_create$81=function $$_before_create(){var $iter=$ResetInput__before_create$81.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ResetInput__before_create$81.$$p=null;$send2(self,$find_super(self,'_before_create',$ResetInput__before_create$81,false,true),'_before_create',[],null);$writer=["type","reset"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$ResetInput__before_create$81.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'RadioButton');var $nesting=[self].concat($parent_nesting),$RadioButton__before_create$82;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$RadioButton__before_create$82=function $$_before_create(){var $iter=$RadioButton__before_create$82.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$RadioButton__before_create$82.$$p=null;$send2(self,$find_super(self,'_before_create',$RadioButton__before_create$82,false,true),'_before_create',[],null);$writer=["type","radio"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$RadioButton__before_create$82.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ColorPicker');var $nesting=[self].concat($parent_nesting),$ColorPicker__before_create$83;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$ColorPicker__before_create$83=function $$_before_create(){var $iter=$ColorPicker__before_create$83.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ColorPicker__before_create$83.$$p=null;$send2(self,$find_super(self,'_before_create',$ColorPicker__before_create$83,false,true),'_before_create',[],null);$writer=["type","color"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$ColorPicker__before_create$83.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DatePicker');var $nesting=[self].concat($parent_nesting),$DatePicker__before_create$84;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$DatePicker__before_create$84=function $$_before_create(){var $iter=$DatePicker__before_create$84.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$DatePicker__before_create$84.$$p=null;$send2(self,$find_super(self,'_before_create',$DatePicker__before_create$84,false,true),'_before_create',[],null);$writer=["type","date"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$DatePicker__before_create$84.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DateTimeLocal');var $nesting=[self].concat($parent_nesting),$DateTimeLocal__before_create$85;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$DateTimeLocal__before_create$85=function $$_before_create(){var $iter=$DateTimeLocal__before_create$85.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$DateTimeLocal__before_create$85.$$p=null;$send2(self,$find_super(self,'_before_create',$DateTimeLocal__before_create$85,false,true),'_before_create',[],null);$writer=["type","datetime-local"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$DateTimeLocal__before_create$85.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'EmailInput');var $nesting=[self].concat($parent_nesting),$EmailInput__before_create$86;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$EmailInput__before_create$86=function $$_before_create(){var $iter=$EmailInput__before_create$86.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$EmailInput__before_create$86.$$p=null;$send2(self,$find_super(self,'_before_create',$EmailInput__before_create$86,false,true),'_before_create',[],null);$writer=["type","email"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$EmailInput__before_create$86.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'MonthPicker');var $nesting=[self].concat($parent_nesting),$MonthPicker__before_create$87;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$MonthPicker__before_create$87=function $$_before_create(){var $iter=$MonthPicker__before_create$87.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$MonthPicker__before_create$87.$$p=null;$send2(self,$find_super(self,'_before_create',$MonthPicker__before_create$87,false,true),'_before_create',[],null);$writer=["type","month"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$MonthPicker__before_create$87.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'NumberInput');var $nesting=[self].concat($parent_nesting),$NumberInput__before_create$88;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$NumberInput__before_create$88=function $$_before_create(){var $iter=$NumberInput__before_create$88.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$NumberInput__before_create$88.$$p=null;$send2(self,$find_super(self,'_before_create',$NumberInput__before_create$88,false,true),'_before_create',[],null);$writer=["type","number"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$NumberInput__before_create$88.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'RangeInput');var $nesting=[self].concat($parent_nesting),$RangeInput__before_create$89;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$RangeInput__before_create$89=function $$_before_create(){var $iter=$RangeInput__before_create$89.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$RangeInput__before_create$89.$$p=null;$send2(self,$find_super(self,'_before_create',$RangeInput__before_create$89,false,true),'_before_create',[],null);$writer=["type","range"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$RangeInput__before_create$89.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'SearchInput');var $nesting=[self].concat($parent_nesting),$SearchInput__before_create$90;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$SearchInput__before_create$90=function $$_before_create(){var $iter=$SearchInput__before_create$90.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$SearchInput__before_create$90.$$p=null;$send2(self,$find_super(self,'_before_create',$SearchInput__before_create$90,false,true),'_before_create',[],null);$writer=["type","search"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$SearchInput__before_create$90.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'PhoneInput');var $nesting=[self].concat($parent_nesting),$PhoneInput__before_create$91;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$PhoneInput__before_create$91=function $$_before_create(){var $iter=$PhoneInput__before_create$91.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$PhoneInput__before_create$91.$$p=null;$send2(self,$find_super(self,'_before_create',$PhoneInput__before_create$91,false,true),'_before_create',[],null);$writer=["type","tel"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$PhoneInput__before_create$91.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TimePicker');var $nesting=[self].concat($parent_nesting),$TimePicker__before_create$92;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$TimePicker__before_create$92=function $$_before_create(){var $iter=$TimePicker__before_create$92.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TimePicker__before_create$92.$$p=null;$send2(self,$find_super(self,'_before_create',$TimePicker__before_create$92,false,true),'_before_create',[],null);$writer=["type","time"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$TimePicker__before_create$92.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'UrlInput');var $nesting=[self].concat($parent_nesting),$UrlInput__before_create$93;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$UrlInput__before_create$93=function $$_before_create(){var $iter=$UrlInput__before_create$93.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$UrlInput__before_create$93.$$p=null;$send2(self,$find_super(self,'_before_create',$UrlInput__before_create$93,false,true),'_before_create',[],null);$writer=["type","url"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$UrlInput__before_create$93.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'WeekPicker');var $nesting=[self].concat($parent_nesting),$WeekPicker__before_create$94;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$WeekPicker__before_create$94=function $$_before_create(){var $iter=$WeekPicker__before_create$94.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$WeekPicker__before_create$94.$$p=null;$send2(self,$find_super(self,'_before_create',$WeekPicker__before_create$94,false,true),'_before_create',[],null);$writer=["type","week"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$WeekPicker__before_create$94.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Label');var $nesting=[self].concat($parent_nesting),$Label__before_create$95;return(Opal.def(self,'$_before_create',$Label__before_create$95=function $$_before_create(){var $iter=$Label__before_create$95.$$p,$yield=$iter||nil,self=this;if($iter)$Label__before_create$95.$$p=null;$send2(self,$find_super(self,'_before_create',$Label__before_create$95,false,true),'_before_create',[],null);return(self.domtype="label");},$Label__before_create$95.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TextArea');var $nesting=[self].concat($parent_nesting),$TextArea__before_create$96;return(Opal.def(self,'$_before_create',$TextArea__before_create$96=function $$_before_create(){var $iter=$TextArea__before_create$96.$$p,$yield=$iter||nil,self=this;if($iter)$TextArea__before_create$96.$$p=null;$send2(self,$find_super(self,'_before_create',$TextArea__before_create$96,false,true),'_before_create',[],null);return(self.domtype="textarea");},$TextArea__before_create$96.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Output');var $nesting=[self].concat($parent_nesting),$Output__before_create$97;return(Opal.def(self,'$_before_create',$Output__before_create$97=function $$_before_create(){var $iter=$Output__before_create$97.$$p,$yield=$iter||nil,self=this;if($iter)$Output__before_create$97.$$p=null;$send2(self,$find_super(self,'_before_create',$Output__before_create$97,false,true),'_before_create',[],null);return(self.domtype="output");},$Output__before_create$97.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Paragraph');var $nesting=[self].concat($parent_nesting),$Paragraph__before_create$98;return(Opal.def(self,'$_before_create',$Paragraph__before_create$98=function $$_before_create(){var $iter=$Paragraph__before_create$98.$$p,$yield=$iter||nil,self=this;if($iter)$Paragraph__before_create$98.$$p=null;$send2(self,$find_super(self,'_before_create',$Paragraph__before_create$98,false,true),'_before_create',[],null);return(self.domtype="p");},$Paragraph__before_create$98.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header1');var $nesting=[self].concat($parent_nesting),$Header1__before_create$99;return(Opal.def(self,'$_before_create',$Header1__before_create$99=function $$_before_create(){var $iter=$Header1__before_create$99.$$p,$yield=$iter||nil,self=this;if($iter)$Header1__before_create$99.$$p=null;$send2(self,$find_super(self,'_before_create',$Header1__before_create$99,false,true),'_before_create',[],null);return(self.domtype="h1");},$Header1__before_create$99.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header2');var $nesting=[self].concat($parent_nesting),$Header2__before_create$100;return(Opal.def(self,'$_before_create',$Header2__before_create$100=function $$_before_create(){var $iter=$Header2__before_create$100.$$p,$yield=$iter||nil,self=this;if($iter)$Header2__before_create$100.$$p=null;$send2(self,$find_super(self,'_before_create',$Header2__before_create$100,false,true),'_before_create',[],null);return(self.domtype="h2");},$Header2__before_create$100.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header3');var $nesting=[self].concat($parent_nesting),$Header3__before_create$101;return(Opal.def(self,'$_before_create',$Header3__before_create$101=function $$_before_create(){var $iter=$Header3__before_create$101.$$p,$yield=$iter||nil,self=this;if($iter)$Header3__before_create$101.$$p=null;$send2(self,$find_super(self,'_before_create',$Header3__before_create$101,false,true),'_before_create',[],null);return(self.domtype="h3");},$Header3__before_create$101.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header4');var $nesting=[self].concat($parent_nesting),$Header4__before_create$102;return(Opal.def(self,'$_before_create',$Header4__before_create$102=function $$_before_create(){var $iter=$Header4__before_create$102.$$p,$yield=$iter||nil,self=this;if($iter)$Header4__before_create$102.$$p=null;$send2(self,$find_super(self,'_before_create',$Header4__before_create$102,false,true),'_before_create',[],null);return(self.domtype="h4");},$Header4__before_create$102.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header5');var $nesting=[self].concat($parent_nesting),$Header5__before_create$103;return(Opal.def(self,'$_before_create',$Header5__before_create$103=function $$_before_create(){var $iter=$Header5__before_create$103.$$p,$yield=$iter||nil,self=this;if($iter)$Header5__before_create$103.$$p=null;$send2(self,$find_super(self,'_before_create',$Header5__before_create$103,false,true),'_before_create',[],null);return(self.domtype="h5");},$Header5__before_create$103.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header6');var $nesting=[self].concat($parent_nesting),$Header6__before_create$104;return(Opal.def(self,'$_before_create',$Header6__before_create$104=function $$_before_create(){var $iter=$Header6__before_create$104.$$p,$yield=$iter||nil,self=this;if($iter)$Header6__before_create$104.$$p=null;$send2(self,$find_super(self,'_before_create',$Header6__before_create$104,false,true),'_before_create',[],null);return(self.domtype="h6");},$Header6__before_create$104.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'List');var $nesting=[self].concat($parent_nesting),$List__before_create$105;return(Opal.def(self,'$_before_create',$List__before_create$105=function $$_before_create(){var $iter=$List__before_create$105.$$p,$yield=$iter||nil,self=this;if($iter)$List__before_create$105.$$p=null;$send2(self,$find_super(self,'_before_create',$List__before_create$105,false,true),'_before_create',[],null);return(self.domtype="ul");},$List__before_create$105.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrderedList');var $nesting=[self].concat($parent_nesting),$OrderedList__before_create$106;return(Opal.def(self,'$_before_create',$OrderedList__before_create$106=function $$_before_create(){var $iter=$OrderedList__before_create$106.$$p,$yield=$iter||nil,self=this;if($iter)$OrderedList__before_create$106.$$p=null;$send2(self,$find_super(self,'_before_create',$OrderedList__before_create$106,false,true),'_before_create',[],null);return(self.domtype="ol");},$OrderedList__before_create$106.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ListItem');var $nesting=[self].concat($parent_nesting),$ListItem__before_create$107;return(Opal.def(self,'$_before_create',$ListItem__before_create$107=function $$_before_create(){var $iter=$ListItem__before_create$107.$$p,$yield=$iter||nil,self=this;if($iter)$ListItem__before_create$107.$$p=null;$send2(self,$find_super(self,'_before_create',$ListItem__before_create$107,false,true),'_before_create',[],null);return(self.domtype="li");},$ListItem__before_create$107.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Anchor');var $nesting=[self].concat($parent_nesting),$Anchor__before_create$108;return(Opal.def(self,'$_before_create',$Anchor__before_create$108=function $$_before_create(){var $iter=$Anchor__before_create$108.$$p,$yield=$iter||nil,self=this;if($iter)$Anchor__before_create$108.$$p=null;$send2(self,$find_super(self,'_before_create',$Anchor__before_create$108,false,true),'_before_create',[],null);return(self.domtype="a");},$Anchor__before_create$108.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ExternalLink');var $nesting=[self].concat($parent_nesting),$ExternalLink__before_create$109;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$ExternalLink__before_create$109=function $$_before_create(){var $iter=$ExternalLink__before_create$109.$$p,$yield=$iter||nil,self=this,$ret_or_2=nil,$writer=nil;if($iter)$ExternalLink__before_create$109.$$p=null;$send2(self,$find_super(self,'_before_create',$ExternalLink__before_create$109,false,true),'_before_create',[],null);if($truthy(($ret_or_2=self.options['$[]']("target")))){$ret_or_2}else{$writer=["target","_blank"];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};return(self.domtype="a");},$ExternalLink__before_create$109.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Button');var $nesting=[self].concat($parent_nesting),$Button__before_create$110,$Button__after_create$111;self.$$prototype.options=self.$$prototype.states=nil;Opal.def(self,'$_before_create',$Button__before_create$110=function $$_before_create(){var $iter=$Button__before_create$110.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Button__before_create$110.$$p=null;$send2(self,$find_super(self,'_before_create',$Button__before_create$110,false,true),'_before_create',[],null);self.domtype="button";if(self.options['$[]']("type")['$==']("button")){}else{$writer=["type","button"];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("button")['$=='](true)){return nil}else{$writer=["button",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Button__before_create$110.$$arity=0);return(Opal.def(self,'$_after_create',$Button__after_create$111=function $$_after_create(){var $$112,$iter=$Button__after_create$111.$$p,$yield=$iter||nil,self=this;if($iter)$Button__after_create$111.$$p=null;$send2(self,$find_super(self,'_after_create',$Button__after_create$111,false,true),'_after_create',[],null);return $send(self,'on',["click"],($$112=function(the_event){var self=$$112.$$s==null?this:$$112.$$s;if(the_event==null){the_event=nil;};return document.activeElement.blur();;},$$112.$$s=self,$$112.$$arity=1,$$112));},$Button__after_create$111.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Table');var $nesting=[self].concat($parent_nesting),$Table__before_create$113;return(Opal.def(self,'$_before_create',$Table__before_create$113=function $$_before_create(){var $iter=$Table__before_create$113.$$p,$yield=$iter||nil,self=this;if($iter)$Table__before_create$113.$$p=null;$send2(self,$find_super(self,'_before_create',$Table__before_create$113,false,true),'_before_create',[],null);return(self.domtype="table");},$Table__before_create$113.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TableHeader');var $nesting=[self].concat($parent_nesting),$TableHeader__before_create$114;return(Opal.def(self,'$_before_create',$TableHeader__before_create$114=function $$_before_create(){var $iter=$TableHeader__before_create$114.$$p,$yield=$iter||nil,self=this;if($iter)$TableHeader__before_create$114.$$p=null;$send2(self,$find_super(self,'_before_create',$TableHeader__before_create$114,false,true),'_before_create',[],null);return(self.domtype="th");},$TableHeader__before_create$114.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TableRow');var $nesting=[self].concat($parent_nesting),$TableRow__before_create$115;return(Opal.def(self,'$_before_create',$TableRow__before_create$115=function $$_before_create(){var $iter=$TableRow__before_create$115.$$p,$yield=$iter||nil,self=this;if($iter)$TableRow__before_create$115.$$p=null;$send2(self,$find_super(self,'_before_create',$TableRow__before_create$115,false,true),'_before_create',[],null);return(self.domtype="tr");},$TableRow__before_create$115.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TableCell');var $nesting=[self].concat($parent_nesting),$TableCell__before_create$116;return(Opal.def(self,'$_before_create',$TableCell__before_create$116=function $$_before_create(){var $iter=$TableCell__before_create$116.$$p,$yield=$iter||nil,self=this;if($iter)$TableCell__before_create$116.$$p=null;$send2(self,$find_super(self,'_before_create',$TableCell__before_create$116,false,true),'_before_create',[],null);return(self.domtype="td");},$TableCell__before_create$116.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BlockTable');var $nesting=[self].concat($parent_nesting),$BlockTable__before_create$117;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$BlockTable__before_create$117=function $$_before_create(){var $iter=$BlockTable__before_create$117.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$BlockTable__before_create$117.$$p=null;$send2(self,$find_super(self,'_before_create',$BlockTable__before_create$117,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("table")['$=='](true)){return nil}else{$writer=["table",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$BlockTable__before_create$117.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BlockTableHeader');var $nesting=[self].concat($parent_nesting),$BlockTableHeader__before_create$118;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$BlockTableHeader__before_create$118=function $$_before_create(){var $iter=$BlockTableHeader__before_create$118.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$BlockTableHeader__before_create$118.$$p=null;$send2(self,$find_super(self,'_before_create',$BlockTableHeader__before_create$118,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("th")['$=='](true)){return nil}else{$writer=["th",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$BlockTableHeader__before_create$118.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BlockTableRow');var $nesting=[self].concat($parent_nesting),$BlockTableRow__before_create$119;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$BlockTableRow__before_create$119=function $$_before_create(){var $iter=$BlockTableRow__before_create$119.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$BlockTableRow__before_create$119.$$p=null;$send2(self,$find_super(self,'_before_create',$BlockTableRow__before_create$119,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("tr")['$=='](true)){return nil}else{$writer=["tr",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$BlockTableRow__before_create$119.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BlockTableCell');var $nesting=[self].concat($parent_nesting),$BlockTableCell__before_create$120;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$BlockTableCell__before_create$120=function $$_before_create(){var $iter=$BlockTableCell__before_create$120.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$BlockTableCell__before_create$120.$$p=null;$send2(self,$find_super(self,'_before_create',$BlockTableCell__before_create$120,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("td")['$=='](true)){return nil}else{$writer=["td",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$BlockTableCell__before_create$120.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Span');var $nesting=[self].concat($parent_nesting),$Span__before_create$121;return(Opal.def(self,'$_before_create',$Span__before_create$121=function $$_before_create(){var $iter=$Span__before_create$121.$$p,$yield=$iter||nil,self=this;if($iter)$Span__before_create$121.$$p=null;$send2(self,$find_super(self,'_before_create',$Span__before_create$121,false,true),'_before_create',[],null);return(self.domtype="span");},$Span__before_create$121.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Select');var $nesting=[self].concat($parent_nesting),$Select__before_create$122;return(Opal.def(self,'$_before_create',$Select__before_create$122=function $$_before_create(){var $iter=$Select__before_create$122.$$p,$yield=$iter||nil,self=this;if($iter)$Select__before_create$122.$$p=null;$send2(self,$find_super(self,'_before_create',$Select__before_create$122,false,true),'_before_create',[],null);return(self.domtype="select");},$Select__before_create$122.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Option');var $nesting=[self].concat($parent_nesting),$Option__before_create$123;return(Opal.def(self,'$_before_create',$Option__before_create$123=function $$_before_create(){var $iter=$Option__before_create$123.$$p,$yield=$iter||nil,self=this;if($iter)$Option__before_create$123.$$p=null;$send2(self,$find_super(self,'_before_create',$Option__before_create$123,false,true),'_before_create',[],null);return(self.domtype="option");},$Option__before_create$123.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'FieldSet');var $nesting=[self].concat($parent_nesting),$FieldSet__before_create$124;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$FieldSet__before_create$124=function $$_before_create(){var $iter=$FieldSet__before_create$124.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$FieldSet__before_create$124.$$p=null;$send2(self,$find_super(self,'_before_create',$FieldSet__before_create$124,false,true),'_before_create',[],null);self.domtype="fieldset";if(self.states['$[]']("fieldset")['$=='](true)){return nil}else{$writer=["fieldset",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$FieldSet__before_create$124.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Legend');var $nesting=[self].concat($parent_nesting),$Legend__before_create$125;return(Opal.def(self,'$_before_create',$Legend__before_create$125=function $$_before_create(){var $iter=$Legend__before_create$125.$$p,$yield=$iter||nil,self=this;if($iter)$Legend__before_create$125.$$p=null;$send2(self,$find_super(self,'_before_create',$Legend__before_create$125,false,true),'_before_create',[],null);return(self.domtype="legend");},$Legend__before_create$125.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);Opal.const_set($nesting[0],'COMPONENT_CLASSES',$hash2(["org.gxg.gui.page","org.gxg.gui.abbreviation","org.gxg.gui.address","org.gxg.gui.area","org.gxg.gui.bold","org.gxg.gui.bdi","org.gxg.gui.bdo","org.gxg.gui.blockquote","org.gxg.gui.break","org.gxg.gui.caption","org.gxg.gui.cite","org.gxg.gui.code","org.gxg.gui.column","org.gxg.gui.column.group","org.gxg.gui.data","org.gxg.gui.data.list","org.gxg.gui.description","org.gxg.gui.deleted","org.gxg.gui.details","org.gxg.gui.dfn","org.gxg.gui.dialog","org.gxg.gui.division","org.gxg.gui.description.list","org.gxg.gui.description.item","org.gxg.gui.emphasis","org.gxg.gui.figure","org.gxg.gui.figure.caption","org.gxg.gui.theme.divider","org.gxg.gui.italic","org.gxg.gui.frame.inline","org.gxg.gui.insertion","org.gxg.gui.keyboard.key","org.gxg.gui.map","org.gxg.gui.mark","org.gxg.gui.meter","org.gxg.gui.noscript","org.gxg.gui.object","org.gxg.gui.option.group","org.gxg.gui.parameter","org.gxg.gui.picture","org.gxg.gui.preformatted","org.gxg.gui.progress","org.gxg.gui.quotation","org.gxg.gui.strike.through","org.gxg.gui.sample","org.gxg.gui.section","org.gxg.gui.small","org.gxg.gui.source","org.gxg.gui.strong","org.gxg.gui.style","org.gxg.gui.sub.script","org.gxg.gui.summary","org.gxg.gui.super.script","org.gxg.gui.svg","org.gxg.gui.template","org.gxg.gui.text.area","org.gxg.gui.time","org.gxg.gui.track","org.gxg.gui.misspelled","org.gxg.gui.variable","org.gxg.gui.word.break","org.gxg.gui.header","org.gxg.gui.navigator","org.gxg.gui.main","org.gxg.gui.article","org.gxg.gui.aside","org.gxg.gui.footer","org.gxg.gui.form","org.gxg.gui.input.button","org.gxg.gui.input.button.submit","org.gxg.gui.block","org.gxg.gui.button.checkbox","org.gxg.gui.image","org.gxg.gui.video","org.gxg.gui.audio","org.gxg.gui.canvas","org.gxg.gui.input.hidden","org.gxg.gui.input.file","org.gxg.gui.input.text","org.gxg.gui.input.password","org.gxg.gui.input.reset","org.gxg.gui.button.radio","org.gxg.gui.picker.color","org.gxg.gui.picker.date","org.gxg.gui.input.datetime.local","org.gxg.gui.input.email","org.gxg.gui.picker.month","org.gxg.gui.picker.number","org.gxg.gui.input.range","org.gxg.gui.input.search","org.gxg.gui.input.phone","org.gxg.gui.picker.time","org.gxg.gui.input.url","org.gxg.gui.picker.week","org.gxg.gui.label","org.gxg.gui.output","org.gxg.gui.paragraph","org.gxg.gui.header.one","org.gxg.gui.header.two","org.gxg.gui.header.three","org.gxg.gui.header.four","org.gxg.gui.header.five","org.gxg.gui.header.six","org.gxg.gui.list","org.gxg.gui.list.ordered","org.gxg.gui.list.item","org.gxg.gui.link.anchor","org.gxg.gui.link.external","org.gxg.gui.button","org.gxg.gui.table","org.gxg.gui.table.header","org.gxg.gui.table.row","org.gxg.gui.table.cell","org.gxg.gui.block.table","org.gxg.gui.block.table.header","org.gxg.gui.block.table.row","org.gxg.gui.block.table.cell","org.gxg.gui.span","org.gxg.gui.select","org.gxg.gui.option","org.gxg.gui.field.set","org.gxg.gui.legend"],{"org.gxg.gui.page":$$$($$$($$$('::','GxG'),'Gui'),'Page'),"org.gxg.gui.abbreviation":$$$($$$($$$('::','GxG'),'Gui'),'Abbreviation'),"org.gxg.gui.address":$$$($$$($$$('::','GxG'),'Gui'),'Address'),"org.gxg.gui.area":$$$($$$($$$('::','GxG'),'Gui'),'Area'),"org.gxg.gui.bold":$$$($$$($$$('::','GxG'),'Gui'),'Bold'),"org.gxg.gui.bdi":$$$($$$($$$('::','GxG'),'Gui'),'Bdi'),"org.gxg.gui.bdo":$$$($$$($$$('::','GxG'),'Gui'),'Bdo'),"org.gxg.gui.blockquote":$$$($$$($$$('::','GxG'),'Gui'),'BlockQuote'),"org.gxg.gui.break":$$$($$$($$$('::','GxG'),'Gui'),'Break'),"org.gxg.gui.caption":$$$($$$($$$('::','GxG'),'Gui'),'Caption'),"org.gxg.gui.cite":$$$($$$($$$('::','GxG'),'Gui'),'Cite'),"org.gxg.gui.code":$$$($$$($$$('::','GxG'),'Gui'),'Code'),"org.gxg.gui.column":$$$($$$($$$('::','GxG'),'Gui'),'Column'),"org.gxg.gui.column.group":$$$($$$($$$('::','GxG'),'Gui'),'ColumnGroup'),"org.gxg.gui.data":$$$($$$($$$('::','GxG'),'Gui'),'Data'),"org.gxg.gui.data.list":$$$($$$($$$('::','GxG'),'Gui'),'DataList'),"org.gxg.gui.description":$$$($$$($$$('::','GxG'),'Gui'),'Description'),"org.gxg.gui.deleted":$$$($$$($$$('::','GxG'),'Gui'),'Deleted'),"org.gxg.gui.details":$$$($$$($$$('::','GxG'),'Gui'),'Details'),"org.gxg.gui.dfn":$$$($$$($$$('::','GxG'),'Gui'),'Dfn'),"org.gxg.gui.dialog":$$$($$$($$$('::','GxG'),'Gui'),'Dialog'),"org.gxg.gui.division":$$$($$$($$$('::','GxG'),'Gui'),'Division'),"org.gxg.gui.description.list":$$$($$$($$$('::','GxG'),'Gui'),'DescriptionList'),"org.gxg.gui.description.item":$$$($$$($$$('::','GxG'),'Gui'),'DescriptionTerm'),"org.gxg.gui.emphasis":$$$($$$($$$('::','GxG'),'Gui'),'Emphasis'),"org.gxg.gui.figure":$$$($$$($$$('::','GxG'),'Gui'),'Figure'),"org.gxg.gui.figure.caption":$$$($$$($$$('::','GxG'),'Gui'),'FigureCaption'),"org.gxg.gui.theme.divider":$$$($$$($$$('::','GxG'),'Gui'),'ThemeDivider'),"org.gxg.gui.italic":$$$($$$($$$('::','GxG'),'Gui'),'Italic'),"org.gxg.gui.frame.inline":$$$($$$($$$('::','GxG'),'Gui'),'InlineFrame'),"org.gxg.gui.insertion":$$$($$$($$$('::','GxG'),'Gui'),'Insertion'),"org.gxg.gui.keyboard.key":$$$($$$($$$('::','GxG'),'Gui'),'KeyboardKey'),"org.gxg.gui.map":$$$($$$($$$('::','GxG'),'Gui'),'Map'),"org.gxg.gui.mark":$$$($$$($$$('::','GxG'),'Gui'),'Mark'),"org.gxg.gui.meter":$$$($$$($$$('::','GxG'),'Gui'),'Meter'),"org.gxg.gui.noscript":$$$($$$($$$('::','GxG'),'Gui'),'NoScript'),"org.gxg.gui.object":$$$($$$($$$('::','GxG'),'Gui'),'Object'),"org.gxg.gui.option.group":$$$($$$($$$('::','GxG'),'Gui'),'OptionGroup'),"org.gxg.gui.parameter":$$$($$$($$$('::','GxG'),'Gui'),'Parameter'),"org.gxg.gui.picture":$$$($$$($$$('::','GxG'),'Gui'),'Picture'),"org.gxg.gui.preformatted":$$$($$$($$$('::','GxG'),'Gui'),'Preformatted'),"org.gxg.gui.progress":$$$($$$($$$('::','GxG'),'Gui'),'Progress'),"org.gxg.gui.quotation":$$$($$$($$$('::','GxG'),'Gui'),'Quotation'),"org.gxg.gui.strike.through":$$$($$$($$$('::','GxG'),'Gui'),'StrikeThrough'),"org.gxg.gui.sample":$$$($$$($$$('::','GxG'),'Gui'),'Sample'),"org.gxg.gui.section":$$$($$$($$$('::','GxG'),'Gui'),'Section'),"org.gxg.gui.small":$$$($$$($$$('::','GxG'),'Gui'),'Small'),"org.gxg.gui.source":$$$($$$($$$('::','GxG'),'Gui'),'Source'),"org.gxg.gui.strong":$$$($$$($$$('::','GxG'),'Gui'),'Strong'),"org.gxg.gui.style":$$$($$$($$$('::','GxG'),'Gui'),'Style'),"org.gxg.gui.sub.script":$$$($$$($$$('::','GxG'),'Gui'),'SubScript'),"org.gxg.gui.summary":$$$($$$($$$('::','GxG'),'Gui'),'Summary'),"org.gxg.gui.super.script":$$$($$$($$$('::','GxG'),'Gui'),'SuperScript'),"org.gxg.gui.svg":$$$($$$($$$('::','GxG'),'Gui'),'Svg'),"org.gxg.gui.template":$$$($$$($$$('::','GxG'),'Gui'),'Template'),"org.gxg.gui.text.area":$$$($$$($$$('::','GxG'),'Gui'),'TextArea'),"org.gxg.gui.time":$$$($$$($$$('::','GxG'),'Gui'),'Time'),"org.gxg.gui.track":$$$($$$($$$('::','GxG'),'Gui'),'Track'),"org.gxg.gui.misspelled":$$$($$$($$$('::','GxG'),'Gui'),'Misspelled'),"org.gxg.gui.variable":$$$($$$($$$('::','GxG'),'Gui'),'Variable'),"org.gxg.gui.word.break":$$$($$$($$$('::','GxG'),'Gui'),'WordBreak'),"org.gxg.gui.header":$$$($$$($$$('::','GxG'),'Gui'),'Header'),"org.gxg.gui.navigator":$$$($$$($$$('::','GxG'),'Gui'),'Navigation'),"org.gxg.gui.main":$$$($$$($$$('::','GxG'),'Gui'),'Main'),"org.gxg.gui.article":$$$($$$($$$('::','GxG'),'Gui'),'Article'),"org.gxg.gui.aside":$$$($$$($$$('::','GxG'),'Gui'),'Aside'),"org.gxg.gui.footer":$$$($$$($$$('::','GxG'),'Gui'),'Footer'),"org.gxg.gui.form":$$$($$$($$$('::','GxG'),'Gui'),'Form'),"org.gxg.gui.input.button":$$$($$$($$$('::','GxG'),'Gui'),'ButtonInput'),"org.gxg.gui.input.button.submit":$$$($$$($$$('::','GxG'),'Gui'),'SubmitButton'),"org.gxg.gui.block":$$$($$$($$$('::','GxG'),'Gui'),'Block'),"org.gxg.gui.button.checkbox":$$$($$$($$$('::','GxG'),'Gui'),'CheckBox'),"org.gxg.gui.image":$$$($$$($$$('::','GxG'),'Gui'),'Image'),"org.gxg.gui.video":$$$($$$($$$('::','GxG'),'Gui'),'Video'),"org.gxg.gui.audio":$$$($$$($$$('::','GxG'),'Gui'),'Audio'),"org.gxg.gui.canvas":$$$($$$($$$('::','GxG'),'Gui'),'Canvas'),"org.gxg.gui.input.hidden":$$$($$$($$$('::','GxG'),'Gui'),'HiddenInput'),"org.gxg.gui.input.file":$$$($$$($$$('::','GxG'),'Gui'),'FileInput'),"org.gxg.gui.input.text":$$$($$$($$$('::','GxG'),'Gui'),'TextInput'),"org.gxg.gui.input.password":$$$($$$($$$('::','GxG'),'Gui'),'PasswordInput'),"org.gxg.gui.input.reset":$$$($$$($$$('::','GxG'),'Gui'),'ResetInput'),"org.gxg.gui.button.radio":$$$($$$($$$('::','GxG'),'Gui'),'RadioButton'),"org.gxg.gui.picker.color":$$$($$$($$$('::','GxG'),'Gui'),'ColorPicker'),"org.gxg.gui.picker.date":$$$($$$($$$('::','GxG'),'Gui'),'DatePicker'),"org.gxg.gui.input.datetime.local":$$$($$$($$$('::','GxG'),'Gui'),'DateTimeLocal'),"org.gxg.gui.input.email":$$$($$$($$$('::','GxG'),'Gui'),'EmailInput'),"org.gxg.gui.picker.month":$$$($$$($$$('::','GxG'),'Gui'),'MonthPicker'),"org.gxg.gui.picker.number":$$$($$$($$$('::','GxG'),'Gui'),'NumberInput'),"org.gxg.gui.input.range":$$$($$$($$$('::','GxG'),'Gui'),'RangeInput'),"org.gxg.gui.input.search":$$$($$$($$$('::','GxG'),'Gui'),'SearchInput'),"org.gxg.gui.input.phone":$$$($$$($$$('::','GxG'),'Gui'),'PhoneInput'),"org.gxg.gui.picker.time":$$$($$$($$$('::','GxG'),'Gui'),'TimePicker'),"org.gxg.gui.input.url":$$$($$$($$$('::','GxG'),'Gui'),'UrlInput'),"org.gxg.gui.picker.week":$$$($$$($$$('::','GxG'),'Gui'),'WeekPicker'),"org.gxg.gui.label":$$$($$$($$$('::','GxG'),'Gui'),'Label'),"org.gxg.gui.output":$$$($$$($$$('::','GxG'),'Gui'),'Output'),"org.gxg.gui.paragraph":$$$($$$($$$('::','GxG'),'Gui'),'Paragraph'),"org.gxg.gui.header.one":$$$($$$($$$('::','GxG'),'Gui'),'Header1'),"org.gxg.gui.header.two":$$$($$$($$$('::','GxG'),'Gui'),'Header2'),"org.gxg.gui.header.three":$$$($$$($$$('::','GxG'),'Gui'),'Header3'),"org.gxg.gui.header.four":$$$($$$($$$('::','GxG'),'Gui'),'Header4'),"org.gxg.gui.header.five":$$$($$$($$$('::','GxG'),'Gui'),'Header5'),"org.gxg.gui.header.six":$$$($$$($$$('::','GxG'),'Gui'),'Header6'),"org.gxg.gui.list":$$$($$$($$$('::','GxG'),'Gui'),'List'),"org.gxg.gui.list.ordered":$$$($$$($$$('::','GxG'),'Gui'),'OrderedList'),"org.gxg.gui.list.item":$$$($$$($$$('::','GxG'),'Gui'),'ListItem'),"org.gxg.gui.link.anchor":$$$($$$($$$('::','GxG'),'Gui'),'Anchor'),"org.gxg.gui.link.external":$$$($$$($$$('::','GxG'),'Gui'),'ExternalLink'),"org.gxg.gui.button":$$$($$$($$$('::','GxG'),'Gui'),'Button'),"org.gxg.gui.table":$$$($$$($$$('::','GxG'),'Gui'),'Table'),"org.gxg.gui.table.header":$$$($$$($$$('::','GxG'),'Gui'),'TableHeader'),"org.gxg.gui.table.row":$$$($$$($$$('::','GxG'),'Gui'),'TableRow'),"org.gxg.gui.table.cell":$$$($$$($$$('::','GxG'),'Gui'),'TableCell'),"org.gxg.gui.block.table":$$$($$$($$$('::','GxG'),'Gui'),'BlockTable'),"org.gxg.gui.block.table.header":$$$($$$($$$('::','GxG'),'Gui'),'BlockTableHeader'),"org.gxg.gui.block.table.row":$$$($$$($$$('::','GxG'),'Gui'),'BlockTableRow'),"org.gxg.gui.block.table.cell":$$$($$$($$$('::','GxG'),'Gui'),'BlockTableCell'),"org.gxg.gui.span":$$$($$$($$$('::','GxG'),'Gui'),'Span'),"org.gxg.gui.select":$$$($$$($$$('::','GxG'),'Gui'),'Select'),"org.gxg.gui.option":$$$($$$($$$('::','GxG'),'Gui'),'Option'),"org.gxg.gui.field.set":$$$($$$($$$('::','GxG'),'Gui'),'FieldSet'),"org.gxg.gui.legend":$$$($$$($$$('::','GxG'),'Gui'),'Legend')}));Opal.defs(self,'$component_class',$Gui_component_class$126=function $$component_class(the_type_specifier){var self=this,result=nil;if(the_type_specifier==null){the_type_specifier=nil;};result=nil;if($truthy(the_type_specifier)){result=$$$($$$($$($nesting,'GxG'),'Gui'),'COMPONENT_CLASSES')['$[]'](the_type_specifier.$to_s().$to_sym())};return result;},$Gui_component_class$126.$$arity=-1);Opal.defs(self,'$class_component',$Gui_class_component$127=function $$class_component(the_class_specifier){var self=this,result=nil,found_index=nil;if(the_class_specifier==null){the_class_specifier=nil;};result=nil;if($truthy(the_class_specifier)){found_index=$$$($$$($$($nesting,'GxG'),'Gui'),'COMPONENT_CLASSES').$values().$index(the_class_specifier);if($truthy(found_index)){result=$$$($$$($$($nesting,'GxG'),'Gui'),'COMPONENT_CLASSES').$keys()['$[]'](found_index)};};return result;},$Gui_class_component$127.$$arity=-1);Opal.defs(self,'$component_registered?',$Gui_component_registered$ques$128=function(the_specifier){var self=this;if(the_specifier==null){the_specifier=nil;};if($truthy($$$($$($nesting,'GxG'),'Gui').$component_class(the_specifier))){return true}else{return false};},$Gui_component_registered$ques$128.$$arity=-1);return(Opal.defs(self,'$register_component_class',$Gui_register_component_class$129=function $$register_component_class(the_specifier,the_constant){var self=this,$ret_or_3=nil,$writer=nil;if(the_specifier==null){the_specifier=nil;};if(the_constant==null){the_constant=nil;};if($truthy((function(){if($truthy(($ret_or_3=the_specifier['$is_any?']($$$('::','String'),$$$('::','Symbol'))))){return the_constant['$is_a?']($$$('::','Class'))}else{return $ret_or_3};return nil;})())){if($truthy($$$($$($nesting,'GxG'),'Gui')['$component_registered?'](the_specifier.$to_s().$to_sym()))){if($truthy($$$($$($nesting,'GxG'),'Gui').$component_class(the_specifier.$to_s().$to_sym())['$!='](the_constant))){$writer=[the_specifier.$to_s().$to_sym(),the_constant];$send($$$($$$($$($nesting,'GxG'),'Gui'),'COMPONENT_CLASSES'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}else{self.$log_warn(""+"Component Class "+(the_specifier.$to_s().$to_sym().$inspect())+" => "+(the_constant.$inspect())+" already defined.");return false;}}else{$writer=[the_specifier.$to_s().$to_sym(),the_constant];$send($$$($$$($$($nesting,'GxG'),'Gui'),'COMPONENT_CLASSES'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}}else{return false};},$Gui_register_component_class$129.$$arity=-1),nil)&&'register_component_class';})($nesting[0],$nesting)})($nesting[0],$nesting);(function($base,$parent_nesting){var self=$module($base,'GxG');var $nesting=[self].concat($parent_nesting);return(function($base,$parent_nesting){var self=$module($base,'Gui');var $nesting=[self].concat($parent_nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'GridContainer');var $nesting=[self].concat($parent_nesting),$GridContainer__before_create$130,$GridContainer__after_create$131;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$GridContainer__before_create$130=function $$_before_create(){var $iter=$GridContainer__before_create$130.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$GridContainer__before_create$130.$$p=null;$send2(self,$find_super(self,'_before_create',$GridContainer__before_create$130,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("grid-container")['$=='](true)){return nil}else{$writer=["grid-container",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$GridContainer__before_create$130.$$arity=0);return(Opal.def(self,'$_after_create',$GridContainer__after_create$131=function $$_after_create(){var $iter=$GridContainer__after_create$131.$$p,$yield=$iter||nil,self=this;if($iter)$GridContainer__after_create$131.$$p=null;$send2(self,$find_super(self,'_after_create',$GridContainer__after_create$131,false,true),'_after_create',[],null);return $(document).foundation();;},$GridContainer__after_create$131.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.grid.container",$$$($$$($$$('::','GxG'),'Gui'),'GridContainer'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'GridX');var $nesting=[self].concat($parent_nesting),$GridX__before_create$132,$GridX__after_create$133;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$GridX__before_create$132=function $$_before_create(){var $iter=$GridX__before_create$132.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$GridX__before_create$132.$$p=null;$send2(self,$find_super(self,'_before_create',$GridX__before_create$132,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("grid-x")['$=='](true)){return nil}else{$writer=["grid-x",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$GridX__before_create$132.$$arity=0);return(Opal.def(self,'$_after_create',$GridX__after_create$133=function $$_after_create(){var $iter=$GridX__after_create$133.$$p,$yield=$iter||nil,self=this;if($iter)$GridX__after_create$133.$$p=null;$send2(self,$find_super(self,'_after_create',$GridX__after_create$133,false,true),'_after_create',[],null);return $(document).foundation();;},$GridX__after_create$133.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.grid.x",$$$($$$($$$('::','GxG'),'Gui'),'GridX'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'GridY');var $nesting=[self].concat($parent_nesting),$GridY__before_create$134,$GridY__after_create$135;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$GridY__before_create$134=function $$_before_create(){var $iter=$GridY__before_create$134.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$GridY__before_create$134.$$p=null;$send2(self,$find_super(self,'_before_create',$GridY__before_create$134,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("grid-y")['$=='](true)){return nil}else{$writer=["grid-y",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$GridY__before_create$134.$$arity=0);return(Opal.def(self,'$_after_create',$GridY__after_create$135=function $$_after_create(){var $iter=$GridY__after_create$135.$$p,$yield=$iter||nil,self=this;if($iter)$GridY__after_create$135.$$p=null;$send2(self,$find_super(self,'_after_create',$GridY__after_create$135,false,true),'_after_create',[],null);return $(document).foundation();;},$GridY__after_create$135.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.grid.y",$$$($$$($$$('::','GxG'),'Gui'),'GridY'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Accordion');var $nesting=[self].concat($parent_nesting),$Accordion__before_create$136,$Accordion__after_create$137;self.$$prototype.states=self.$$prototype.options=nil;Opal.def(self,'$_before_create',$Accordion__before_create$136=function $$_before_create(){var $iter=$Accordion__before_create$136.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Accordion__before_create$136.$$p=null;$send2(self,$find_super(self,'_before_create',$Accordion__before_create$136,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("accordion")['$=='](true)){}else{$writer=["accordion",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-accordion"))){return nil}else{$writer=["data-accordion",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Accordion__before_create$136.$$arity=0);return(Opal.def(self,'$_after_create',$Accordion__after_create$137=function $$_after_create(){var $iter=$Accordion__after_create$137.$$p,$yield=$iter||nil,self=this;if($iter)$Accordion__after_create$137.$$p=null;$send2(self,$find_super(self,'_after_create',$Accordion__after_create$137,false,true),'_after_create',[],null);return $(document).foundation();;},$Accordion__after_create$137.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.accordion",$$$($$$($$$('::','GxG'),'Gui'),'Accordion'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'AccordionItem');var $nesting=[self].concat($parent_nesting),$AccordionItem__before_create$138,$AccordionItem__after_create$139;self.$$prototype.states=self.$$prototype.options=nil;Opal.def(self,'$_before_create',$AccordionItem__before_create$138=function $$_before_create(){var $iter=$AccordionItem__before_create$138.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$AccordionItem__before_create$138.$$p=null;$send2(self,$find_super(self,'_before_create',$AccordionItem__before_create$138,false,true),'_before_create',[],null);self.domtype="li";if(self.states['$[]']("accordion-item")['$=='](true)){}else{$writer=["accordion-item",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-accordion-item"))){return nil}else{$writer=["data-accordion-item",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$AccordionItem__before_create$138.$$arity=0);return(Opal.def(self,'$_after_create',$AccordionItem__after_create$139=function $$_after_create(){var $iter=$AccordionItem__after_create$139.$$p,$yield=$iter||nil,self=this;if($iter)$AccordionItem__after_create$139.$$p=null;$send2(self,$find_super(self,'_after_create',$AccordionItem__after_create$139,false,true),'_after_create',[],null);return $(document).foundation();;},$AccordionItem__after_create$139.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.accordion.item",$$$($$$($$$('::','GxG'),'Gui'),'AccordionItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'AccordionMenu');var $nesting=[self].concat($parent_nesting),$AccordionMenu__before_create$140,$AccordionMenu__after_create$141;self.$$prototype.states=self.$$prototype.options=nil;Opal.def(self,'$_before_create',$AccordionMenu__before_create$140=function $$_before_create(){var $iter=$AccordionMenu__before_create$140.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$AccordionMenu__before_create$140.$$p=null;$send2(self,$find_super(self,'_before_create',$AccordionMenu__before_create$140,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("vertical")['$=='](true)){}else{$writer=["vertical",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("menu")['$=='](true)){}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-accordion-menu"))){return nil}else{$writer=["data-accordion-menu",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$AccordionMenu__before_create$140.$$arity=0);return(Opal.def(self,'$_after_create',$AccordionMenu__after_create$141=function $$_after_create(){var $iter=$AccordionMenu__after_create$141.$$p,$yield=$iter||nil,self=this;if($iter)$AccordionMenu__after_create$141.$$p=null;$send2(self,$find_super(self,'_after_create',$AccordionMenu__after_create$141,false,true),'_after_create',[],null);return $(document).foundation();;},$AccordionMenu__after_create$141.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.accordion.menu",$$$($$$($$$('::','GxG'),'Gui'),'AccordionMenu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'AccordionSubMenu');var $nesting=[self].concat($parent_nesting),$AccordionSubMenu__before_create$142,$AccordionSubMenu__after_create$143;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$AccordionSubMenu__before_create$142=function $$_before_create(){var $iter=$AccordionSubMenu__before_create$142.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$AccordionSubMenu__before_create$142.$$p=null;$send2(self,$find_super(self,'_before_create',$AccordionSubMenu__before_create$142,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("vertical")['$=='](true)){}else{$writer=["vertical",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("menu")['$=='](true)){}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("nested")['$=='](true)){return nil}else{$writer=["nested",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$AccordionSubMenu__before_create$142.$$arity=0);return(Opal.def(self,'$_after_create',$AccordionSubMenu__after_create$143=function $$_after_create(){var $iter=$AccordionSubMenu__after_create$143.$$p,$yield=$iter||nil,self=this;if($iter)$AccordionSubMenu__after_create$143.$$p=null;$send2(self,$find_super(self,'_after_create',$AccordionSubMenu__after_create$143,false,true),'_after_create',[],null);return $(document).foundation();;},$AccordionSubMenu__after_create$143.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.accordion.submenu",$$$($$$($$$('::','GxG'),'Gui'),'AccordionSubMenu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'AccordionMenuItem');var $nesting=[self].concat($parent_nesting),$AccordionMenuItem__before_create$144;return(Opal.def(self,'$_before_create',$AccordionMenuItem__before_create$144=function $$_before_create(){var $iter=$AccordionMenuItem__before_create$144.$$p,$yield=$iter||nil,self=this;if($iter)$AccordionMenuItem__before_create$144.$$p=null;$send2(self,$find_super(self,'_before_create',$AccordionMenuItem__before_create$144,false,true),'_before_create',[],null);return(self.domtype="li");},$AccordionMenuItem__before_create$144.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.accordion.menu.item",$$$($$$($$$('::','GxG'),'Gui'),'AccordionMenuItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'AnchorButton');var $nesting=[self].concat($parent_nesting),$AnchorButton__before_create$145,$AnchorButton__after_create$146;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$AnchorButton__before_create$145=function $$_before_create(){var $iter=$AnchorButton__before_create$145.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$AnchorButton__before_create$145.$$p=null;$send2(self,$find_super(self,'_before_create',$AnchorButton__before_create$145,false,true),'_before_create',[],null);self.domtype="a";if(self.states['$[]']("button")['$=='](true)){return nil}else{$writer=["button",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$AnchorButton__before_create$145.$$arity=0);return(Opal.def(self,'$_after_create',$AnchorButton__after_create$146=function $$_after_create(){var $iter=$AnchorButton__after_create$146.$$p,$yield=$iter||nil,self=this;if($iter)$AnchorButton__after_create$146.$$p=null;$send2(self,$find_super(self,'_after_create',$AnchorButton__after_create$146,false,true),'_after_create',[],null);return $(document).foundation();;},$AnchorButton__after_create$146.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.anchor.button",$$$($$$($$$('::','GxG'),'Gui'),'AnchorButton'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Badge');var $nesting=[self].concat($parent_nesting),$Badge__before_create$147,$Badge__after_create$148;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$Badge__before_create$147=function $$_before_create(){var $iter=$Badge__before_create$147.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Badge__before_create$147.$$p=null;$send2(self,$find_super(self,'_before_create',$Badge__before_create$147,false,true),'_before_create',[],null);self.domtype="span";if(self.states['$[]']("badge")['$=='](true)){return nil}else{$writer=["badge",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Badge__before_create$147.$$arity=0);return(Opal.def(self,'$_after_create',$Badge__after_create$148=function $$_after_create(){var $iter=$Badge__after_create$148.$$p,$yield=$iter||nil,self=this;if($iter)$Badge__after_create$148.$$p=null;$send2(self,$find_super(self,'_after_create',$Badge__after_create$148,false,true),'_after_create',[],null);return $(document).foundation();;},$Badge__after_create$148.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.badge",$$$($$$($$$('::','GxG'),'Gui'),'Badge'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Breadcrumb');var $nesting=[self].concat($parent_nesting),$Breadcrumb__before_create$149,$Breadcrumb__after_create$150;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$Breadcrumb__before_create$149=function $$_before_create(){var $iter=$Breadcrumb__before_create$149.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Breadcrumb__before_create$149.$$p=null;$send2(self,$find_super(self,'_before_create',$Breadcrumb__before_create$149,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("breadcrumb")['$=='](true)){return nil}else{$writer=["breadcrumb",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Breadcrumb__before_create$149.$$arity=0);return(Opal.def(self,'$_after_create',$Breadcrumb__after_create$150=function $$_after_create(){var $iter=$Breadcrumb__after_create$150.$$p,$yield=$iter||nil,self=this;if($iter)$Breadcrumb__after_create$150.$$p=null;$send2(self,$find_super(self,'_after_create',$Breadcrumb__after_create$150,false,true),'_after_create',[],null);return $(document).foundation();;},$Breadcrumb__after_create$150.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.breadcrumb",$$$($$$($$$('::','GxG'),'Gui'),'Breadcrumb'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BreadcrumbItem');var $nesting=[self].concat($parent_nesting),$BreadcrumbItem__before_create$151,$BreadcrumbItem__after_create$152;Opal.def(self,'$_before_create',$BreadcrumbItem__before_create$151=function $$_before_create(){var $iter=$BreadcrumbItem__before_create$151.$$p,$yield=$iter||nil,self=this;if($iter)$BreadcrumbItem__before_create$151.$$p=null;$send2(self,$find_super(self,'_before_create',$BreadcrumbItem__before_create$151,false,true),'_before_create',[],null);return(self.domtype="li");},$BreadcrumbItem__before_create$151.$$arity=0);return(Opal.def(self,'$_after_create',$BreadcrumbItem__after_create$152=function $$_after_create(){var $iter=$BreadcrumbItem__after_create$152.$$p,$yield=$iter||nil,self=this;if($iter)$BreadcrumbItem__after_create$152.$$p=null;$send2(self,$find_super(self,'_after_create',$BreadcrumbItem__after_create$152,false,true),'_after_create',[],null);return $(document).foundation();;},$BreadcrumbItem__after_create$152.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.breadcrumb.item",$$$($$$($$$('::','GxG'),'Gui'),'BreadcrumbItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ButtonGroup');var $nesting=[self].concat($parent_nesting),$ButtonGroup__before_create$153,$ButtonGroup__after_create$154;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$ButtonGroup__before_create$153=function $$_before_create(){var $iter=$ButtonGroup__before_create$153.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ButtonGroup__before_create$153.$$p=null;$send2(self,$find_super(self,'_before_create',$ButtonGroup__before_create$153,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("button-group")['$=='](true)){return nil}else{$writer=["button-group",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$ButtonGroup__before_create$153.$$arity=0);return(Opal.def(self,'$_after_create',$ButtonGroup__after_create$154=function $$_after_create(){var $iter=$ButtonGroup__after_create$154.$$p,$yield=$iter||nil,self=this;if($iter)$ButtonGroup__after_create$154.$$p=null;$send2(self,$find_super(self,'_after_create',$ButtonGroup__after_create$154,false,true),'_after_create',[],null);return $(document).foundation();;},$ButtonGroup__after_create$154.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.button.group",$$$($$$($$$('::','GxG'),'Gui'),'ButtonGroup'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Callout');var $nesting=[self].concat($parent_nesting),$Callout__before_create$155,$Callout__after_create$156;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$Callout__before_create$155=function $$_before_create(){var $iter=$Callout__before_create$155.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Callout__before_create$155.$$p=null;$send2(self,$find_super(self,'_before_create',$Callout__before_create$155,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("callout")['$=='](true)){return nil}else{$writer=["callout",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Callout__before_create$155.$$arity=0);return(Opal.def(self,'$_after_create',$Callout__after_create$156=function $$_after_create(){var $iter=$Callout__after_create$156.$$p,$yield=$iter||nil,self=this;if($iter)$Callout__after_create$156.$$p=null;$send2(self,$find_super(self,'_after_create',$Callout__after_create$156,false,true),'_after_create',[],null);return $(document).foundation();;},$Callout__after_create$156.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.callout",$$$($$$($$$('::','GxG'),'Gui'),'Callout'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ColoredLabel');var $nesting=[self].concat($parent_nesting),$ColoredLabel__before_create$157;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$ColoredLabel__before_create$157=function $$_before_create(){var $iter=$ColoredLabel__before_create$157.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ColoredLabel__before_create$157.$$p=null;$send2(self,$find_super(self,'_before_create',$ColoredLabel__before_create$157,false,true),'_before_create',[],null);self.domtype="span";if(self.states['$[]']("label")['$=='](true)){return nil}else{$writer=["label",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$ColoredLabel__before_create$157.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.label.colored",$$$($$$($$$('::','GxG'),'Gui'),'ColoredLabel'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DrilldownMenu');var $nesting=[self].concat($parent_nesting),$DrilldownMenu__before_create$158,$DrilldownMenu__after_create$159;self.$$prototype.states=self.$$prototype.options=nil;Opal.def(self,'$_before_create',$DrilldownMenu__before_create$158=function $$_before_create(){var $iter=$DrilldownMenu__before_create$158.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$DrilldownMenu__before_create$158.$$p=null;$send2(self,$find_super(self,'_before_create',$DrilldownMenu__before_create$158,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("vertical")['$=='](true)){}else{$writer=["vertical",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("menu")['$=='](true)){}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-drilldown"))){return nil}else{$writer=["data-drilldown",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$DrilldownMenu__before_create$158.$$arity=0);return(Opal.def(self,'$_after_create',$DrilldownMenu__after_create$159=function $$_after_create(){var $iter=$DrilldownMenu__after_create$159.$$p,$yield=$iter||nil,self=this;if($iter)$DrilldownMenu__after_create$159.$$p=null;$send2(self,$find_super(self,'_after_create',$DrilldownMenu__after_create$159,false,true),'_after_create',[],null);return $(document).foundation();;},$DrilldownMenu__after_create$159.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.drilldown.menu",$$$($$$($$$('::','GxG'),'Gui'),'DrilldownMenu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DrilldownSubMenu');var $nesting=[self].concat($parent_nesting),$DrilldownSubMenu__before_create$160,$DrilldownSubMenu__after_create$161;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$DrilldownSubMenu__before_create$160=function $$_before_create(){var $iter=$DrilldownSubMenu__before_create$160.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$DrilldownSubMenu__before_create$160.$$p=null;$send2(self,$find_super(self,'_before_create',$DrilldownSubMenu__before_create$160,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("vertical")['$=='](true)){}else{$writer=["vertical",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("menu")['$=='](true)){return nil}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$DrilldownSubMenu__before_create$160.$$arity=0);return(Opal.def(self,'$_after_create',$DrilldownSubMenu__after_create$161=function $$_after_create(){var $iter=$DrilldownSubMenu__after_create$161.$$p,$yield=$iter||nil,self=this;if($iter)$DrilldownSubMenu__after_create$161.$$p=null;$send2(self,$find_super(self,'_after_create',$DrilldownSubMenu__after_create$161,false,true),'_after_create',[],null);return $(document).foundation();;},$DrilldownSubMenu__after_create$161.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.drilldown.submenu",$$$($$$($$$('::','GxG'),'Gui'),'DrilldownSubMenu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DrilldownMenuItem');var $nesting=[self].concat($parent_nesting),$DrilldownMenuItem__before_create$162;return(Opal.def(self,'$_before_create',$DrilldownMenuItem__before_create$162=function $$_before_create(){var $iter=$DrilldownMenuItem__before_create$162.$$p,$yield=$iter||nil,self=this;if($iter)$DrilldownMenuItem__before_create$162.$$p=null;$send2(self,$find_super(self,'_before_create',$DrilldownMenuItem__before_create$162,false,true),'_before_create',[],null);return(self.domtype="li");},$DrilldownMenuItem__before_create$162.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.drilldown.menu.item",$$$($$$($$$('::','GxG'),'Gui'),'DrilldownMenuItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DropdownSubMenu');var $nesting=[self].concat($parent_nesting),$DropdownSubMenu__before_create$163,$DropdownSubMenu__after_create$164;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$DropdownSubMenu__before_create$163=function $$_before_create(){var $iter=$DropdownSubMenu__before_create$163.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$DropdownSubMenu__before_create$163.$$p=null;$send2(self,$find_super(self,'_before_create',$DropdownSubMenu__before_create$163,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("menu")['$=='](true)){return nil}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$DropdownSubMenu__before_create$163.$$arity=0);return(Opal.def(self,'$_after_create',$DropdownSubMenu__after_create$164=function $$_after_create(){var $iter=$DropdownSubMenu__after_create$164.$$p,$yield=$iter||nil,self=this;if($iter)$DropdownSubMenu__after_create$164.$$p=null;$send2(self,$find_super(self,'_after_create',$DropdownSubMenu__after_create$164,false,true),'_after_create',[],null);return $(document).foundation();;},$DropdownSubMenu__after_create$164.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.dropdown.submenu",$$$($$$($$$('::','GxG'),'Gui'),'DropdownSubMenu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DropdownMenuItem');var $nesting=[self].concat($parent_nesting),$DropdownMenuItem__before_create$165;return(Opal.def(self,'$_before_create',$DropdownMenuItem__before_create$165=function $$_before_create(){var $iter=$DropdownMenuItem__before_create$165.$$p,$yield=$iter||nil,self=this;if($iter)$DropdownMenuItem__before_create$165.$$p=null;$send2(self,$find_super(self,'_before_create',$DropdownMenuItem__before_create$165,false,true),'_before_create',[],null);return(self.domtype="li");},$DropdownMenuItem__before_create$165.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.dropdown.menu.item",$$$($$$($$$('::','GxG'),'Gui'),'DropdownMenuItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Equalizer');var $nesting=[self].concat($parent_nesting),$Equalizer__before_create$166;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Equalizer__before_create$166=function $$_before_create(){var $iter=$Equalizer__before_create$166.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Equalizer__before_create$166.$$p=null;$send2(self,$find_super(self,'_before_create',$Equalizer__before_create$166,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("grid-x")['$=='](true)){}else{$writer=["grid-x",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("grid-margin-x")['$=='](true)){}else{$writer=["grid-margin-x",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-equalizer"))){}else{$writer=["data-equalizer",nil];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-equalize-on"))){return nil}else{$writer=["data-equalize-on","medium"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Equalizer__before_create$166.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.equalizer",$$$($$$($$$('::','GxG'),'Gui'),'Equalizer'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'FlexGridRow');var $nesting=[self].concat($parent_nesting),$FlexGridRow__before_create$167;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$FlexGridRow__before_create$167=function $$_before_create(){var $iter=$FlexGridRow__before_create$167.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$FlexGridRow__before_create$167.$$p=null;$send2(self,$find_super(self,'_before_create',$FlexGridRow__before_create$167,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("row")['$=='](true)){return nil}else{$writer=["row",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$FlexGridRow__before_create$167.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.flexgrid.row",$$$($$$($$$('::','GxG'),'Gui'),'FlexGridRow'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'FlexGridColumn');var $nesting=[self].concat($parent_nesting),$FlexGridColumn__before_create$168;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$FlexGridColumn__before_create$168=function $$_before_create(){var $iter=$FlexGridColumn__before_create$168.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$FlexGridColumn__before_create$168.$$p=null;$send2(self,$find_super(self,'_before_create',$FlexGridColumn__before_create$168,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("columns")['$=='](true)){return nil}else{$writer=["columns",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$FlexGridColumn__before_create$168.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.flexgrid.column",$$$($$$($$$('::','GxG'),'Gui'),'FlexGridColumn'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Embed');var $nesting=[self].concat($parent_nesting),$Embed__before_create$169;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$Embed__before_create$169=function $$_before_create(){var $iter=$Embed__before_create$169.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Embed__before_create$169.$$p=null;$send2(self,$find_super(self,'_before_create',$Embed__before_create$169,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("responsive-embed")['$=='](true)){return nil}else{$writer=["responsive-embed",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Embed__before_create$169.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.embed",$$$($$$($$$('::','GxG'),'Gui'),'Embed'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'MediaObject');var $nesting=[self].concat($parent_nesting),$MediaObject__before_create$170;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$MediaObject__before_create$170=function $$_before_create(){var $iter=$MediaObject__before_create$170.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$MediaObject__before_create$170.$$p=null;$send2(self,$find_super(self,'_before_create',$MediaObject__before_create$170,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("media-object")['$=='](true)){return nil}else{$writer=["media-object",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$MediaObject__before_create$170.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.media.object",$$$($$$($$$('::','GxG'),'Gui'),'MediaObject'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'MediaObjectSection');var $nesting=[self].concat($parent_nesting),$MediaObjectSection__before_create$171;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$MediaObjectSection__before_create$171=function $$_before_create(){var $iter=$MediaObjectSection__before_create$171.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$MediaObjectSection__before_create$171.$$p=null;$send2(self,$find_super(self,'_before_create',$MediaObjectSection__before_create$171,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("media-object-section")['$=='](true)){return nil}else{$writer=["media-object-section",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$MediaObjectSection__before_create$171.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.media.object.section",$$$($$$($$$('::','GxG'),'Gui'),'MediaObjectSection'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DropdownMenu');var $nesting=[self].concat($parent_nesting),$DropdownMenu__before_create$172,$DropdownMenu_add_menu_item$173;self.$$prototype.states=self.$$prototype.options=nil;Opal.def(self,'$_before_create',$DropdownMenu__before_create$172=function $$_before_create(){var $iter=$DropdownMenu__before_create$172.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$DropdownMenu__before_create$172.$$p=null;$send2(self,$find_super(self,'_before_create',$DropdownMenu__before_create$172,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("dropdown")['$=='](true)){}else{$writer=["dropdown",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("menu")['$=='](true)){}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-dropdown-menu"))){return nil}else{$writer=["data-dropdown-menu",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$DropdownMenu__before_create$172.$$arity=0);return(Opal.def(self,'$add_menu_item',$DropdownMenu_add_menu_item$173=function $$add_menu_item(label,data){var self=this,the_item=nil,$writer=nil;if(label==null){label=nil;};if(data==null){data=nil;};the_item=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.dropdown.menu.item"];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2(["label","data"],{"label":label,"data":data})];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2([],{})];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.$page().$build_components(self,[the_item]);return true;},$DropdownMenu_add_menu_item$173.$$arity=-1),nil)&&'add_menu_item';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.dropdown.menu",$$$($$$($$$('::','GxG'),'Gui'),'DropdownMenu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'MenuBar');var $nesting=[self].concat($parent_nesting);return nil})($nesting[0],$$$($$$($$$('::','GxG'),'Gui'),'DropdownMenu'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.menu.bar",$$$($$$($$$('::','GxG'),'Gui'),'MenuBar'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Menu');var $nesting=[self].concat($parent_nesting),$Menu__before_create$174,$Menu_add_menu_item$175;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$Menu__before_create$174=function $$_before_create(){var $iter=$Menu__before_create$174.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Menu__before_create$174.$$p=null;$send2(self,$find_super(self,'_before_create',$Menu__before_create$174,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("menu")['$=='](true)){return nil}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Menu__before_create$174.$$arity=0);return(Opal.def(self,'$add_menu_item',$Menu_add_menu_item$175=function $$add_menu_item(label,data){var self=this,the_item=nil,$writer=nil;if(label==null){label=nil;};if(data==null){data=nil;};the_item=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.menu.item"];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2(["label","data"],{"label":label,"data":data})];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2([],{})];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.$page().$build_components(self,[the_item]);return true;},$Menu_add_menu_item$175.$$arity=-1),nil)&&'add_menu_item';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.menu",$$$($$$($$$('::','GxG'),'Gui'),'Menu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'MenuItem');var $nesting=[self].concat($parent_nesting),$MenuItem__before_create$176,$MenuItem_initialize$177,$MenuItem_cascade$178,$MenuItem_set_label$179,$MenuItem_set_data$180,$MenuItem_select$181;self.$$prototype.uuid=self.$$prototype.settings=self.$$prototype.label=nil;Opal.def(self,'$_before_create',$MenuItem__before_create$176=function $$_before_create(){var $iter=$MenuItem__before_create$176.$$p,$yield=$iter||nil,self=this;if($iter)$MenuItem__before_create$176.$$p=null;$send2(self,$find_super(self,'_before_create',$MenuItem__before_create$176,false,true),'_before_create',[],null);return(self.domtype="li");},$MenuItem__before_create$176.$$arity=0);Opal.def(self,'$initialize',$MenuItem_initialize$177=function $$initialize(the_parent,options){var $iter=$MenuItem_initialize$177.$$p,$yield=$iter||nil,self=this;if($iter)$MenuItem_initialize$177.$$p=null;self.label=nil;$send2(self,$find_super(self,'initialize',$MenuItem_initialize$177,false,true),'initialize',[the_parent,options],null);return self;},$MenuItem_initialize$177.$$arity=2);Opal.def(self,'$cascade',$MenuItem_cascade$178=function $$cascade(){var self=this,label=nil,$writer=nil,$ret_or_4=nil,the_object=nil;label=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"label "+(self.uuid.$to_s())];$send(label,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","anchor"];$send(label,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(label,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["content"],{"content":(function(){if($truthy(($ret_or_4=self.settings['$[]']("label")))){return $ret_or_4}else{return "Untitled"};return nil;})().$to_s()})];$send(label,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" menu_item = self.find_parent_type(::GxG::Gui::MenuItem)\n"+" if menu_item\n"+" unless menu_item.get_state(:disabled) == true\n"+" menu_item.select()\n"+" end\n"+" end\n"+" end\n"+" "];$send(label,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(label,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.$page().$build_components(self,[label]);the_object=self.$page().$find_object_by(""+"label "+(self.uuid.$to_s()));if($truthy(the_object)){return(self.label=the_object)}else{return nil};},$MenuItem_cascade$178.$$arity=0);Opal.def(self,'$set_label',$MenuItem_set_label$179=function $$set_label(the_text){var self=this,$writer=nil;if(the_text==null){the_text=nil;};if($truthy(self.label)){self.label.$set_text(the_text.$to_s());$writer=["label",the_text.$to_s()];$send(self.settings,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;}else{return nil};},$MenuItem_set_label$179.$$arity=-1);Opal.def(self,'$set_data',$MenuItem_set_data$180=function $$set_data(data){var self=this,$writer=nil;if(data==null){data=nil;};$writer=["data",data];$send(self.settings,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];},$MenuItem_set_data$180.$$arity=-1);return(Opal.def(self,'$select',$MenuItem_select$181=function $$select(data){var self=this;if(data==null){data=nil;};return nil;},$MenuItem_select$181.$$arity=-1),nil)&&'select';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.menu.item",$$$($$$($$$('::','GxG'),'Gui'),'MenuItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OffCanvasWrapper');var $nesting=[self].concat($parent_nesting),$OffCanvasWrapper__before_create$182;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$OffCanvasWrapper__before_create$182=function $$_before_create(){var $iter=$OffCanvasWrapper__before_create$182.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OffCanvasWrapper__before_create$182.$$p=null;$send2(self,$find_super(self,'_before_create',$OffCanvasWrapper__before_create$182,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("off-canvas-wrapper")['$=='](true)){return nil}else{$writer=["off-canvas-wrapper",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OffCanvasWrapper__before_create$182.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.offcanvas.wrapper",$$$($$$($$$('::','GxG'),'Gui'),'OffCanvasWrapper'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OffCanvasWrapperInner');var $nesting=[self].concat($parent_nesting),$OffCanvasWrapperInner__before_create$183;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$OffCanvasWrapperInner__before_create$183=function $$_before_create(){var $iter=$OffCanvasWrapperInner__before_create$183.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OffCanvasWrapperInner__before_create$183.$$p=null;$send2(self,$find_super(self,'_before_create',$OffCanvasWrapperInner__before_create$183,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("off-canvas-wrapper-inner")['$=='](true)){}else{$writer=["off-canvas-wrapper-inner",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-off-canvas-wrapper"))){return nil}else{$writer=["data-off-canvas-wrapper",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OffCanvasWrapperInner__before_create$183.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.offcanvas.wrapper.inner",$$$($$$($$$('::','GxG'),'Gui'),'OffCanvasWrapperInner'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OffCanvasLeft');var $nesting=[self].concat($parent_nesting),$OffCanvasLeft__before_create$184;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$OffCanvasLeft__before_create$184=function $$_before_create(){var $iter=$OffCanvasLeft__before_create$184.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OffCanvasLeft__before_create$184.$$p=null;$send2(self,$find_super(self,'_before_create',$OffCanvasLeft__before_create$184,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("off-canvas")['$=='](true)){}else{$writer=["off-canvas",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("position-left")['$=='](true)){}else{$writer=["position-left",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-off-canvas"))){return nil}else{$writer=["data-off-canvas",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OffCanvasLeft__before_create$184.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.offcanvas.left",$$$($$$($$$('::','GxG'),'Gui'),'OffCanvasLeft'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OffCanvasRight');var $nesting=[self].concat($parent_nesting),$OffCanvasRight__before_create$185;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$OffCanvasRight__before_create$185=function $$_before_create(){var $iter=$OffCanvasRight__before_create$185.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OffCanvasRight__before_create$185.$$p=null;$send2(self,$find_super(self,'_before_create',$OffCanvasRight__before_create$185,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("off-canvas")['$=='](true)){}else{$writer=["off-canvas",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("position-right")['$=='](true)){}else{$writer=["position-right",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-off-canvas"))){}else{$writer=["data-off-canvas",nil];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-position"))){return nil}else{$writer=["data-position","right"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OffCanvasRight__before_create$185.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.offcanvas.right",$$$($$$($$$('::','GxG'),'Gui'),'OffCanvasRight'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OffCanvasContent');var $nesting=[self].concat($parent_nesting),$OffCanvasContent__before_create$186;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$OffCanvasContent__before_create$186=function $$_before_create(){var $iter=$OffCanvasContent__before_create$186.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OffCanvasContent__before_create$186.$$p=null;$send2(self,$find_super(self,'_before_create',$OffCanvasContent__before_create$186,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("off-canvas-content")['$=='](true)){}else{$writer=["off-canvas-content",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-off-canvas-content"))){return nil}else{$writer=["data-off-canvas-content",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OffCanvasContent__before_create$186.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.offcanvas.content",$$$($$$($$$('::','GxG'),'Gui'),'OffCanvasContent'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Orbit');var $nesting=[self].concat($parent_nesting),$Orbit__before_create$187;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Orbit__before_create$187=function $$_before_create(){var $iter=$Orbit__before_create$187.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Orbit__before_create$187.$$p=null;$send2(self,$find_super(self,'_before_create',$Orbit__before_create$187,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("orbit")['$=='](true)){}else{$writer=["orbit",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("role"))){}else{$writer=["role","region"];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-orbit"))){return nil}else{$writer=["data-orbit",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Orbit__before_create$187.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit",$$$($$$($$$('::','GxG'),'Gui'),'Orbit'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrbitContainer');var $nesting=[self].concat($parent_nesting),$OrbitContainer__before_create$188;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$OrbitContainer__before_create$188=function $$_before_create(){var $iter=$OrbitContainer__before_create$188.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OrbitContainer__before_create$188.$$p=null;$send2(self,$find_super(self,'_before_create',$OrbitContainer__before_create$188,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("orbit-container")['$=='](true)){return nil}else{$writer=["orbit-container",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OrbitContainer__before_create$188.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit.container",$$$($$$($$$('::','GxG'),'Gui'),'OrbitContainer'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrbitPrevious');var $nesting=[self].concat($parent_nesting),$OrbitPrevious__before_create$189;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$OrbitPrevious__before_create$189=function $$_before_create(){var $iter=$OrbitPrevious__before_create$189.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OrbitPrevious__before_create$189.$$p=null;$send2(self,$find_super(self,'_before_create',$OrbitPrevious__before_create$189,false,true),'_before_create',[],null);self.domtype="button";if(self.states['$[]']("orbit-previous")['$=='](true)){return nil}else{$writer=["orbit-previous",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OrbitPrevious__before_create$189.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit.previous",$$$($$$($$$('::','GxG'),'Gui'),'OrbitPrevious'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrbitNext');var $nesting=[self].concat($parent_nesting),$OrbitNext__before_create$190;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$OrbitNext__before_create$190=function $$_before_create(){var $iter=$OrbitNext__before_create$190.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OrbitNext__before_create$190.$$p=null;$send2(self,$find_super(self,'_before_create',$OrbitNext__before_create$190,false,true),'_before_create',[],null);self.domtype="button";if(self.states['$[]']("orbit-next")['$=='](true)){return nil}else{$writer=["orbit-next",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OrbitNext__before_create$190.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit.next",$$$($$$($$$('::','GxG'),'Gui'),'OrbitNext'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrbitSlide');var $nesting=[self].concat($parent_nesting),$OrbitSlide__before_create$191;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$OrbitSlide__before_create$191=function $$_before_create(){var $iter=$OrbitSlide__before_create$191.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OrbitSlide__before_create$191.$$p=null;$send2(self,$find_super(self,'_before_create',$OrbitSlide__before_create$191,false,true),'_before_create',[],null);self.domtype="li";if(self.states['$[]']("orbit-slide")['$=='](true)){return nil}else{$writer=["orbit-slide",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OrbitSlide__before_create$191.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit.slide",$$$($$$($$$('::','GxG'),'Gui'),'OrbitSlide'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrbitNavigator');var $nesting=[self].concat($parent_nesting),$OrbitNavigator__before_create$192;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$OrbitNavigator__before_create$192=function $$_before_create(){var $iter=$OrbitNavigator__before_create$192.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OrbitNavigator__before_create$192.$$p=null;$send2(self,$find_super(self,'_before_create',$OrbitNavigator__before_create$192,false,true),'_before_create',[],null);self.domtype="nav";if(self.states['$[]']("orbit-bullets")['$=='](true)){return nil}else{$writer=["orbit-bullets",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OrbitNavigator__before_create$192.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit.navigator",$$$($$$($$$('::','GxG'),'Gui'),'OrbitNavigator'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrbitBullet');var $nesting=[self].concat($parent_nesting),$OrbitBullet__before_create$193;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$OrbitBullet__before_create$193=function $$_before_create(){var $iter=$OrbitBullet__before_create$193.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OrbitBullet__before_create$193.$$p=null;$send2(self,$find_super(self,'_before_create',$OrbitBullet__before_create$193,false,true),'_before_create',[],null);self.domtype="button";if($truthy(self.options.$keys()['$include?']("data-slide"))){return nil}else{$writer=["data-slide","0"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OrbitBullet__before_create$193.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit.bullet",$$$($$$($$$('::','GxG'),'Gui'),'OrbitBullet'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Pagination');var $nesting=[self].concat($parent_nesting),$Pagination__before_create$194;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Pagination__before_create$194=function $$_before_create(){var $iter=$Pagination__before_create$194.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Pagination__before_create$194.$$p=null;$send2(self,$find_super(self,'_before_create',$Pagination__before_create$194,false,true),'_before_create',[],null);self.domtype="ul";if($truthy(self.options.$keys()['$include?']("role"))){return nil}else{$writer=["role","navigation"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Pagination__before_create$194.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.pagination",$$$($$$($$$('::','GxG'),'Gui'),'Pagination'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'PaginationItem');var $nesting=[self].concat($parent_nesting),$PaginationItem__before_create$195;return(Opal.def(self,'$_before_create',$PaginationItem__before_create$195=function $$_before_create(){var $iter=$PaginationItem__before_create$195.$$p,$yield=$iter||nil,self=this;if($iter)$PaginationItem__before_create$195.$$p=null;$send2(self,$find_super(self,'_before_create',$PaginationItem__before_create$195,false,true),'_before_create',[],null);return(self.domtype="li");},$PaginationItem__before_create$195.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.pagination.item",$$$($$$($$$('::','GxG'),'Gui'),'PaginationItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ProgressBar');var $nesting=[self].concat($parent_nesting),$ProgressBar__before_create$196;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$ProgressBar__before_create$196=function $$_before_create(){var $iter=$ProgressBar__before_create$196.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ProgressBar__before_create$196.$$p=null;$send2(self,$find_super(self,'_before_create',$ProgressBar__before_create$196,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("progress")['$=='](true)){}else{$writer=["progress",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("role"))){return nil}else{$writer=["role","progressbar"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$ProgressBar__before_create$196.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.progress.bar",$$$($$$($$$('::','GxG'),'Gui'),'ProgressBar'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ProgressMeter');var $nesting=[self].concat($parent_nesting),$ProgressMeter__before_create$197;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$ProgressMeter__before_create$197=function $$_before_create(){var $iter=$ProgressMeter__before_create$197.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ProgressMeter__before_create$197.$$p=null;$send2(self,$find_super(self,'_before_create',$ProgressMeter__before_create$197,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("progress-meter")['$=='](true)){return nil}else{$writer=["progress-meter",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$ProgressMeter__before_create$197.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.progress.meter",$$$($$$($$$('::','GxG'),'Gui'),'ProgressMeter'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'HorizontalSlider');var $nesting=[self].concat($parent_nesting),$HorizontalSlider__before_create$198,$HorizontalSlider__after_create$199,$HorizontalSlider_set_script$200;self.$$prototype.states=self.$$prototype.options=self.$$prototype.data_second=self.$$prototype.data_start=self.$$prototype.data_end=self.$$prototype.uuid=nil;Opal.def(self,'$_before_create',$HorizontalSlider__before_create$198=function $$_before_create(){var $iter=$HorizontalSlider__before_create$198.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$HorizontalSlider__before_create$198.$$p=null;$send2(self,$find_super(self,'_before_create',$HorizontalSlider__before_create$198,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("slider")['$=='](true)){}else{$writer=["slider",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options['$[]']("data-initial-start"))){self.data_start=self.options.$delete("data-initial-start")}else{self.data_start="50"};if($truthy(self.options['$[]']("data-initial-end"))){self.data_second=self.options.$delete("data-initial-end")}else{self.data_second=nil};if($truthy(self.options['$[]']("data-end"))){return(self.data_end=self.options.$delete("data-end"))}else{return(self.data_end="200")};},$HorizontalSlider__before_create$198.$$arity=0);Opal.def(self,'$_after_create',$HorizontalSlider__after_create$199=function $$_after_create(){var $iter=$HorizontalSlider__after_create$199.$$p,$yield=$iter||nil,self=this,container_one=nil,slider=nil,handle=nil,handle_two=nil,container_two=nil,value_containter=nil,container_three=nil,value_containter_two=nil;if($iter)$HorizontalSlider__after_create$199.$$p=null;$send2(self,$find_super(self,'_after_create',$HorizontalSlider__after_create$199,false,true),'_after_create',[],null);if($truthy(self.data_second)){container_one=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider_container","settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-10 columns"]}),"script":"","content":[]}));slider=container_one.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider","settings":$hash2([],{}),"options":$hash2(["data-slider","data-initial-start","data-initial-end","data-end","states"],{"data-slider":nil,"data-initial-start":self.data_start,"data-initial-end":self.data_second,"data-end":self.data_end,"states":["slider"]}),"script":"","content":[]}));handle=slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_handle","settings":$hash2([],{}),"options":$hash2(["data-slider-handle","role","tabindex","states"],{"data-slider-handle":nil,"role":"slider","tabindex":"1","states":["slider-handle"]}),"script":"","content":[]}));slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_groove","settings":$hash2([],{}),"options":$hash2(["data-slider-fill","states"],{"data-slider-fill":nil,"states":["slider-fill"]}),"script":"","content":[]}));handle_two=slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_handle_two","settings":$hash2([],{}),"options":$hash2(["data-slider-handle","role","tabindex","states"],{"data-slider-handle":nil,"role":"slider","tabindex":"1","states":["slider-handle"]}),"script":"","content":[]}));container_two=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("value_container",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-2 columns"]}),"script":"","content":[]}));value_containter=container_two.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.picker.number","title":"slider_value","settings":$hash2([],{}),"options":$hash2([],{}),"script":"","content":[]}));container_three=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("value_container_two",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-2 columns"]}),"script":"","content":[]}));value_containter_two=container_three.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.picker.number","title":"slider_value_two","settings":$hash2([],{}),"options":$hash2([],{}),"script":"","content":[]}));handle.$set_attribute("aria-controls",value_containter.$uuid().$to_s());handle_two.$set_attribute("aria-controls",value_containter_two.$uuid().$to_s());}else{container_one=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider_container","settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-10 columns"]}),"script":"","content":[]}));slider=container_one.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider","settings":$hash2([],{}),"options":$hash2(["data-slider","data-initial-start","data-end","states"],{"data-slider":nil,"data-initial-start":self.data_start,"data-end":self.data_end,"states":["slider"]}),"script":"","content":[]}));handle=slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_handle","settings":$hash2([],{}),"options":$hash2(["data-slider-handle","role","tabindex","states"],{"data-slider-handle":nil,"role":"slider","tabindex":"1","states":["slider-handle"]}),"script":"","content":[]}));slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_groove","settings":$hash2([],{}),"options":$hash2(["data-slider-fill","states"],{"data-slider-fill":nil,"states":["slider-fill"]}),"script":"","content":[]}));container_two=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("value_container",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-2 columns"]}),"script":"","content":[]}));value_containter=container_two.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.picker.number","title":"slider_value","settings":$hash2([],{}),"options":$hash2([],{}),"script":"","content":[]}));handle.$set_attribute("aria-controls",value_containter.$uuid().$to_s());};return $(document).foundation();;},$HorizontalSlider__after_create$199.$$arity=0);return(Opal.def(self,'$set_script',$HorizontalSlider_set_script$200=function $$set_script(the_script_body,alternate_target){var $iter=$HorizontalSlider_set_script$200.$$p,$yield=$iter||nil,self=this,handle=nil,handle_two=nil;if($iter)$HorizontalSlider_set_script$200.$$p=null;if(the_script_body==null){the_script_body="";};if(alternate_target==null){alternate_target=nil;};if($truthy(alternate_target)){return alternate_target.$set_script(the_script_body)}else if($truthy(self.data_second)){handle=self.$find_descendant("slider_handle");if($truthy(handle)){}else{self.$raise("Unable to find slider handle object.")};$send2(self,$find_super(self,'set_script',$HorizontalSlider_set_script$200,false,true),'set_script',[the_script_body,handle],null);handle_two=self.$find_descendant("slider_handle_two");if($truthy(handle_two)){}else{self.$raise("Unable to find slider handle object.")};return $send2(self,$find_super(self,'set_script',$HorizontalSlider_set_script$200,false,true),'set_script',[the_script_body,handle_two],null);}else{handle=self.$find_descendant("slider_handle");if($truthy(handle)){}else{self.$raise("Unable to find slider handle object.")};return $send2(self,$find_super(self,'set_script',$HorizontalSlider_set_script$200,false,true),'set_script',[the_script_body,handle],null);};},$HorizontalSlider_set_script$200.$$arity=-1),nil)&&'set_script';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.slider.horizontal",$$$($$$($$$('::','GxG'),'Gui'),'HorizontalSlider'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'VerticalSlider');var $nesting=[self].concat($parent_nesting),$VerticalSlider__before_create$201,$VerticalSlider__after_create$202,$VerticalSlider_set_script$203;self.$$prototype.states=self.$$prototype.options=self.$$prototype.data_second=self.$$prototype.data_start=self.$$prototype.data_end=self.$$prototype.uuid=nil;Opal.def(self,'$_before_create',$VerticalSlider__before_create$201=function $$_before_create(){var $iter=$VerticalSlider__before_create$201.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$VerticalSlider__before_create$201.$$p=null;$send2(self,$find_super(self,'_before_create',$VerticalSlider__before_create$201,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("slider")['$=='](true)){}else{$writer=["slider",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("vertical")['$=='](true)){}else{$writer=["vertical",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options['$[]']("data-initial-start"))){self.data_start=self.options.$delete("data-initial-start")}else{self.data_start="50"};if($truthy(self.options['$[]']("data-initial-end"))){self.data_second=self.options.$delete("data-initial-end")}else{self.data_second=nil};if($truthy(self.options['$[]']("data-end"))){return(self.data_end=self.options.$delete("data-end"))}else{return(self.data_end="200")};},$VerticalSlider__before_create$201.$$arity=0);Opal.def(self,'$_after_create',$VerticalSlider__after_create$202=function $$_after_create(){var $iter=$VerticalSlider__after_create$202.$$p,$yield=$iter||nil,self=this,container_one=nil,slider=nil,handle=nil,handle_two=nil,container_two=nil,value_containter=nil,container_three=nil,value_containter_two=nil;if($iter)$VerticalSlider__after_create$202.$$p=null;$send2(self,$find_super(self,'_after_create',$VerticalSlider__after_create$202,false,true),'_after_create',[],null);if($truthy(self.data_second)){container_one=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider_container","settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-10 columns"]}),"script":"","content":[]}));slider=container_one.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider","settings":$hash2([],{}),"options":$hash2(["data-slider","data-initial-start","data-initial-end","data-end","states"],{"data-slider":nil,"data-initial-start":self.data_start,"data-initial-end":self.data_second,"data-end":self.data_end,"states":["vertical","slider"]}),"script":"","content":[]}));handle=slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_handle","settings":$hash2([],{}),"options":$hash2(["data-slider-handle","role","tabindex","states"],{"data-slider-handle":nil,"role":"slider","tabindex":"1","states":["slider-handle"]}),"script":"","content":[]}));slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_groove","settings":$hash2([],{}),"options":$hash2(["data-slider-fill","states"],{"data-slider-fill":nil,"states":["slider-fill"]}),"script":"","content":[]}));handle_two=slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_handle_two","settings":$hash2([],{}),"options":$hash2(["data-slider-handle","role","tabindex","states"],{"data-slider-handle":nil,"role":"slider","tabindex":"1","states":["slider-handle"]}),"script":"","content":[]}));container_two=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("value_container",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-2 columns"]}),"script":"","content":[]}));value_containter=container_two.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.picker.number","title":"slider_value","settings":$hash2([],{}),"options":$hash2([],{}),"script":"","content":[]}));container_three=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("value_container_two",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-2 columns"]}),"script":"","content":[]}));value_containter_two=container_three.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.picker.number","title":"slider_value_two","settings":$hash2([],{}),"options":$hash2([],{}),"script":"","content":[]}));handle.$set_attribute("aria-controls",value_containter.$uuid().$to_s());handle_two.$set_attribute("aria-controls",value_containter_two.$uuid().$to_s());}else{container_one=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider_container","settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-10 columns"]}),"script":"","content":[]}));slider=container_one.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider","settings":$hash2([],{}),"options":$hash2(["data-slider","data-initial-start","data-end","states"],{"data-slider":nil,"data-initial-start":self.data_start,"data-end":self.data_end,"states":["vertical","slider"]}),"script":"","content":[]}));handle=slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_handle","settings":$hash2([],{}),"options":$hash2(["data-slider-handle","role","tabindex","states"],{"data-slider-handle":nil,"role":"slider","tabindex":"1","states":["slider-handle"]}),"script":"","content":[]}));slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_groove","settings":$hash2([],{}),"options":$hash2(["data-slider-fill","states"],{"data-slider-fill":nil,"states":["slider-fill"]}),"script":"","content":[]}));container_two=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("value_container",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-2 columns"]}),"script":"","content":[]}));value_containter=container_two.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.picker.number","title":"slider_value","settings":$hash2([],{}),"options":$hash2([],{}),"script":"","content":[]}));handle.$set_attribute("aria-controls",value_containter.$uuid().$to_s());};return $(document).foundation();;},$VerticalSlider__after_create$202.$$arity=0);return(Opal.def(self,'$set_script',$VerticalSlider_set_script$203=function $$set_script(the_script_body,alternate_target){var $iter=$VerticalSlider_set_script$203.$$p,$yield=$iter||nil,self=this,handle=nil,handle_two=nil;if($iter)$VerticalSlider_set_script$203.$$p=null;if(the_script_body==null){the_script_body="";};if(alternate_target==null){alternate_target=nil;};if($truthy(alternate_target)){return alternate_target.$set_script(the_script_body)}else if($truthy(self.data_second)){handle=self.$find_descendant("slider_handle");if($truthy(handle)){}else{self.$raise("Unable to find slider handle object.")};$send2(self,$find_super(self,'set_script',$VerticalSlider_set_script$203,false,true),'set_script',[the_script_body,handle],null);handle_two=self.$find_descendant("slider_handle_two");if($truthy(handle_two)){}else{self.$raise("Unable to find slider handle object.")};return $send2(self,$find_super(self,'set_script',$VerticalSlider_set_script$203,false,true),'set_script',[the_script_body,handle_two],null);}else{handle=self.$find_descendant("slider_handle");if($truthy(handle)){}else{self.$raise("Unable to find slider handle object.")};return $send2(self,$find_super(self,'set_script',$VerticalSlider_set_script$203,false,true),'set_script',[the_script_body,handle],null);};},$VerticalSlider_set_script$203.$$arity=-1),nil)&&'set_script';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.slider.vertical",$$$($$$($$$('::','GxG'),'Gui'),'VerticalSlider'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'StickyContainer');var $nesting=[self].concat($parent_nesting),$StickyContainer__before_create$204;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$StickyContainer__before_create$204=function $$_before_create(){var $iter=$StickyContainer__before_create$204.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$StickyContainer__before_create$204.$$p=null;$send2(self,$find_super(self,'_before_create',$StickyContainer__before_create$204,false,true),'_before_create',[],null);self.domtype="div";if($truthy(self.options.$keys()['$include?']("data-sticky-container"))){return nil}else{$writer=["data-sticky-container",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$StickyContainer__before_create$204.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.sticky.container",$$$($$$($$$('::','GxG'),'Gui'),'StickyContainer'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Sticky');var $nesting=[self].concat($parent_nesting),$Sticky__before_create$205;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Sticky__before_create$205=function $$_before_create(){var $iter=$Sticky__before_create$205.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Sticky__before_create$205.$$p=null;$send2(self,$find_super(self,'_before_create',$Sticky__before_create$205,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("sticky")['$=='](true)){}else{$writer=["sticky",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-sticky"))){return nil}else{$writer=["data-sticky",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Sticky__before_create$205.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.sticky",$$$($$$($$$('::','GxG'),'Gui'),'Sticky'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Switch');var $nesting=[self].concat($parent_nesting),$Switch__before_create$206,$Switch__after_create$207;self.$$prototype.states=self.$$prototype.uuid=nil;Opal.def(self,'$_before_create',$Switch__before_create$206=function $$_before_create(){var $iter=$Switch__before_create$206.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Switch__before_create$206.$$p=null;$send2(self,$find_super(self,'_before_create',$Switch__before_create$206,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("switch")['$=='](true)){return nil}else{$writer=["switch",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Switch__before_create$206.$$arity=0);return(Opal.def(self,'$_after_create',$Switch__after_create$207=function $$_after_create(){var self=this,input_one=nil,label_one=nil,span_one=nil;input_one=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.button.checkbox","title":$rb_plus("switch_input",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["switch-input"]}),"script":"","content":[]}));label_one=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.label","title":$rb_plus("switch_paddle",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["for","states"],{"for":input_one.$uuid().$to_s(),"states":["switch-paddle"]}),"script":"","content":[]}));span_one=label_one.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":$rb_plus("switch_span",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["show-for-sr"]}),"script":"","content":[]}));return $(document).foundation();;},$Switch__after_create$207.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.switch",$$$($$$($$$('::','GxG'),'Gui'),'Switch'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TabContent');var $nesting=[self].concat($parent_nesting),$TabContent__before_create$208;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$TabContent__before_create$208=function $$_before_create(){var $iter=$TabContent__before_create$208.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TabContent__before_create$208.$$p=null;$send2(self,$find_super(self,'_before_create',$TabContent__before_create$208,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("tabs-panel")['$=='](true)){return nil}else{$writer=["tabs-panel",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$TabContent__before_create$208.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.tab.content",$$$($$$($$$('::','GxG'),'Gui'),'TabContent'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TabSet');var $nesting=[self].concat($parent_nesting),$TabSet__before_create$209,$TabSet__after_create$210,$TabSet_add_child$211;self.$$prototype.uuid=self.$$prototype.tabs=self.$$prototype.tab_content=nil;Opal.def(self,'$_before_create',$TabSet__before_create$209=function $$_before_create(){var $iter=$TabSet__before_create$209.$$p,$yield=$iter||nil,self=this;if($iter)$TabSet__before_create$209.$$p=null;$send2(self,$find_super(self,'_before_create',$TabSet__before_create$209,false,true),'_before_create',[],null);return(self.domtype="div");},$TabSet__before_create$209.$$arity=0);Opal.def(self,'$_after_create',$TabSet__after_create$210=function $$_after_create(){var self=this;self.tabs=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.list","title":$rb_plus("tabs",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["data-tabs","states"],{"data-tabs":nil,"states":["tabs"]}),"script":"","content":[]}));self.tab_content=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("tab_content",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["data-tabs-content","states"],{"data-tabs-content":self.tabs.$uuid().$to_s(),"states":["tabs-content"]}),"script":"","content":[]}));return $(document).foundation();;},$TabSet__after_create$210.$$arity=0);return(Opal.def(self,'$add_child',$TabSet_add_child$211=function $$add_child(options){var self=this,new_child=nil,item=nil,link=nil,$writer=nil;if(options==null){options=$hash2([],{});};new_child=nil;if(options['$[]']("component").$to_s().$downcase().$to_sym()['$==']("tab_content")){new_child=self.tab_content.$add_child(options);item=self.tabs.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.list.item","title":$rb_plus("tab",new_child.$uuid().$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["tabs-title"]}),"script":"","content":[]}));link=item.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.link.anchor","title":$rb_plus("link",new_child.$uuid().$to_s()),"settings":$hash2([],{}),"options":$hash2(["href","states"],{"href":$rb_plus("#",new_child.$uuid().$to_s()),"states":[]}),"script":"","content":[]}));$writer=[new_child.$title().$to_s()];$send(link,'value=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;}else{self.$raise("Unacceptable Component Type")};return new_child;},$TabSet_add_child$211.$$arity=-1),nil)&&'add_child';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.tab.set",$$$($$$($$$('::','GxG'),'Gui'),'TabSet'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Thumbnail');var $nesting=[self].concat($parent_nesting),$Thumbnail__before_create$212;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$Thumbnail__before_create$212=function $$_before_create(){var $iter=$Thumbnail__before_create$212.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Thumbnail__before_create$212.$$p=null;$send2(self,$find_super(self,'_before_create',$Thumbnail__before_create$212,false,true),'_before_create',[],null);self.domtype="img";if(self.states['$[]']("thumbnail")['$=='](true)){return nil}else{$writer=["thumbnail",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Thumbnail__before_create$212.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.thumbnail",$$$($$$($$$('::','GxG'),'Gui'),'Thumbnail'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Titlebar');var $nesting=[self].concat($parent_nesting),$Titlebar__before_create$213;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$Titlebar__before_create$213=function $$_before_create(){var $iter=$Titlebar__before_create$213.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Titlebar__before_create$213.$$p=null;$send2(self,$find_super(self,'_before_create',$Titlebar__before_create$213,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("title-bar")['$=='](true)){return nil}else{$writer=["title-bar",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Titlebar__before_create$213.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.titlebar",$$$($$$($$$('::','GxG'),'Gui'),'Titlebar'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TitlebarLeft');var $nesting=[self].concat($parent_nesting),$TitlebarLeft__before_create$214;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$TitlebarLeft__before_create$214=function $$_before_create(){var $iter=$TitlebarLeft__before_create$214.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TitlebarLeft__before_create$214.$$p=null;$send2(self,$find_super(self,'_before_create',$TitlebarLeft__before_create$214,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("title-bar-left")['$=='](true)){return nil}else{$writer=["title-bar-left",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$TitlebarLeft__before_create$214.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.titlebar.left",$$$($$$($$$('::','GxG'),'Gui'),'TitlebarLeft'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TitlebarRight');var $nesting=[self].concat($parent_nesting),$TitlebarRight__before_create$215;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$TitlebarRight__before_create$215=function $$_before_create(){var $iter=$TitlebarRight__before_create$215.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TitlebarRight__before_create$215.$$p=null;$send2(self,$find_super(self,'_before_create',$TitlebarRight__before_create$215,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("title-bar-right")['$=='](true)){return nil}else{$writer=["title-bar-right",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$TitlebarRight__before_create$215.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.titlebar.right",$$$($$$($$$('::','GxG'),'Gui'),'TitlebarRight'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Topbar');var $nesting=[self].concat($parent_nesting),$Topbar__before_create$216;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$Topbar__before_create$216=function $$_before_create(){var $iter=$Topbar__before_create$216.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Topbar__before_create$216.$$p=null;$send2(self,$find_super(self,'_before_create',$Topbar__before_create$216,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("top-bar")['$=='](true)){return nil}else{$writer=["top-bar",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Topbar__before_create$216.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.topbar",$$$($$$($$$('::','GxG'),'Gui'),'Topbar'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TopbarLeft');var $nesting=[self].concat($parent_nesting),$TopbarLeft__before_create$217;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$TopbarLeft__before_create$217=function $$_before_create(){var $iter=$TopbarLeft__before_create$217.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TopbarLeft__before_create$217.$$p=null;$send2(self,$find_super(self,'_before_create',$TopbarLeft__before_create$217,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("top-bar-left")['$=='](true)){return nil}else{$writer=["top-bar-left",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$TopbarLeft__before_create$217.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.topbar.left",$$$($$$($$$('::','GxG'),'Gui'),'TopbarLeft'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TopbarRight');var $nesting=[self].concat($parent_nesting),$TopbarRight__before_create$218;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$TopbarRight__before_create$218=function $$_before_create(){var $iter=$TopbarRight__before_create$218.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TopbarRight__before_create$218.$$p=null;$send2(self,$find_super(self,'_before_create',$TopbarRight__before_create$218,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("top-bar-right")['$=='](true)){return nil}else{$writer=["top-bar-right",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$TopbarRight__before_create$218.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);return $$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.topbar.right",$$$($$$($$$('::','GxG'),'Gui'),'TopbarRight'));})($nesting[0],$nesting)})($nesting[0],$nesting);return(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Object');var $nesting=[self].concat($parent_nesting),$Object_new_component$219;self.$private();return(Opal.def(self,'$new_component',$Object_new_component$219=function $$new_component(the_format_moniker){var self=this,result=nil,$writer=nil;if(the_format_moniker==null){the_format_moniker=nil;};result=nil;if($truthy(the_format_moniker)){if($truthy($$$($$$('::','GxG'),'Gui')['$component_registered?'](the_format_moniker.$to_s().$to_sym()))){result=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component",the_format_moniker.$to_s()];$send(result,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(result,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2([],{})];$send(result,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(result,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(result,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;}else{self.$log_error(""+"Component "+(the_format_moniker.$inspect())+" not registered.")}}else{self.$log_error("You MUST specify a registered component moniker.")};return result;},$Object_new_component$219.$$arity=-1),nil)&&'new_component';})($nesting[0],null,$nesting);};Opal.modules["web/gxg_layout"]=function(Opal){function $rb_minus(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs-rhs:lhs['$-'](rhs);} +var self=Opal.top,$nesting=[],nil=Opal.nil,$$$=Opal.$$$,$$=Opal.$$,$module=Opal.module,$klass=Opal.klass,$send2=Opal.send2,$find_super=Opal.find_super,$send=Opal.send,$hash2=Opal.hash2,$truthy=Opal.truthy;Opal.add_stubs(['$to_s','$clone','$[]=','$-','$values','$children','$>','$size','$shift','$==','$domtype','$to_sym','$title','$value','$each','$<<','$delete','$[]','$on','$index','$keys','$component_class','$is_any?','$is_a?','$component_registered?','$!=','$log_warn','$inspect','$register_component_class','$include?','$new_component','$title=','$build_components','$page','$find_object_by','$set_text','$state_active?','$set_state','$application','$menu_item_select','$new','$add_child','$+','$set_attribute','$uuid','$set_script','$find_descendant','$raise','$downcase','$value=','$private','$log_error']);(function($base,$parent_nesting){var self=$module($base,'GxG');var $nesting=[self].concat($parent_nesting);return(function($base,$parent_nesting){var self=$module($base,'Gui');var $nesting=[self].concat($parent_nesting),$Gui_component_class$126,$Gui_class_component$127,$Gui_component_registered$ques$128,$Gui_register_component_class$129;(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Page');var $nesting=[self].concat($parent_nesting);return nil})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'Page'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Abbreviation');var $nesting=[self].concat($parent_nesting),$Abbreviation__before_create$1;self.$$prototype.title=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Abbreviation__before_create$1=function $$_before_create(){var $iter=$Abbreviation__before_create$1.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Abbreviation__before_create$1.$$p=null;$send2(self,$find_super(self,'_before_create',$Abbreviation__before_create$1,false,true),'_before_create',[],null);self.domtype="abbr";$writer=["title",self.title.$clone().$to_s()];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$Abbreviation__before_create$1.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Address');var $nesting=[self].concat($parent_nesting),$Address__before_create$2;return(Opal.def(self,'$_before_create',$Address__before_create$2=function $$_before_create(){var $iter=$Address__before_create$2.$$p,$yield=$iter||nil,self=this;if($iter)$Address__before_create$2.$$p=null;$send2(self,$find_super(self,'_before_create',$Address__before_create$2,false,true),'_before_create',[],null);return(self.domtype="address");},$Address__before_create$2.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Area');var $nesting=[self].concat($parent_nesting),$Area__before_create$3;return(Opal.def(self,'$_before_create',$Area__before_create$3=function $$_before_create(){var $iter=$Area__before_create$3.$$p,$yield=$iter||nil,self=this;if($iter)$Area__before_create$3.$$p=null;$send2(self,$find_super(self,'_before_create',$Area__before_create$3,false,true),'_before_create',[],null);return(self.domtype="area");},$Area__before_create$3.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Bold');var $nesting=[self].concat($parent_nesting),$Bold__before_create$4;return(Opal.def(self,'$_before_create',$Bold__before_create$4=function $$_before_create(){var $iter=$Bold__before_create$4.$$p,$yield=$iter||nil,self=this;if($iter)$Bold__before_create$4.$$p=null;$send2(self,$find_super(self,'_before_create',$Bold__before_create$4,false,true),'_before_create',[],null);return(self.domtype="b");},$Bold__before_create$4.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Bdi');var $nesting=[self].concat($parent_nesting),$Bdi__before_create$5;return(Opal.def(self,'$_before_create',$Bdi__before_create$5=function $$_before_create(){var $iter=$Bdi__before_create$5.$$p,$yield=$iter||nil,self=this;if($iter)$Bdi__before_create$5.$$p=null;$send2(self,$find_super(self,'_before_create',$Bdi__before_create$5,false,true),'_before_create',[],null);return(self.domtype="bdi");},$Bdi__before_create$5.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Bdo');var $nesting=[self].concat($parent_nesting),$Bdo__before_create$6;return(Opal.def(self,'$_before_create',$Bdo__before_create$6=function $$_before_create(){var $iter=$Bdo__before_create$6.$$p,$yield=$iter||nil,self=this;if($iter)$Bdo__before_create$6.$$p=null;$send2(self,$find_super(self,'_before_create',$Bdo__before_create$6,false,true),'_before_create',[],null);return(self.domtype="bdo");},$Bdo__before_create$6.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BlockQuote');var $nesting=[self].concat($parent_nesting),$BlockQuote__before_create$7;return(Opal.def(self,'$_before_create',$BlockQuote__before_create$7=function $$_before_create(){var $iter=$BlockQuote__before_create$7.$$p,$yield=$iter||nil,self=this;if($iter)$BlockQuote__before_create$7.$$p=null;$send2(self,$find_super(self,'_before_create',$BlockQuote__before_create$7,false,true),'_before_create',[],null);return(self.domtype="blockquote");},$BlockQuote__before_create$7.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Break');var $nesting=[self].concat($parent_nesting),$Break__before_create$8;return(Opal.def(self,'$_before_create',$Break__before_create$8=function $$_before_create(){var $iter=$Break__before_create$8.$$p,$yield=$iter||nil,self=this;if($iter)$Break__before_create$8.$$p=null;$send2(self,$find_super(self,'_before_create',$Break__before_create$8,false,true),'_before_create',[],null);return(self.domtype="br");},$Break__before_create$8.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Caption');var $nesting=[self].concat($parent_nesting),$Caption__before_create$9;return(Opal.def(self,'$_before_create',$Caption__before_create$9=function $$_before_create(){var $iter=$Caption__before_create$9.$$p,$yield=$iter||nil,self=this;if($iter)$Caption__before_create$9.$$p=null;$send2(self,$find_super(self,'_before_create',$Caption__before_create$9,false,true),'_before_create',[],null);return(self.domtype="caption");},$Caption__before_create$9.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Cite');var $nesting=[self].concat($parent_nesting),$Cite__before_create$10;return(Opal.def(self,'$_before_create',$Cite__before_create$10=function $$_before_create(){var $iter=$Cite__before_create$10.$$p,$yield=$iter||nil,self=this;if($iter)$Cite__before_create$10.$$p=null;$send2(self,$find_super(self,'_before_create',$Cite__before_create$10,false,true),'_before_create',[],null);return(self.domtype="cite");},$Cite__before_create$10.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Code');var $nesting=[self].concat($parent_nesting),$Code__before_create$11;return(Opal.def(self,'$_before_create',$Code__before_create$11=function $$_before_create(){var $iter=$Code__before_create$11.$$p,$yield=$iter||nil,self=this;if($iter)$Code__before_create$11.$$p=null;$send2(self,$find_super(self,'_before_create',$Code__before_create$11,false,true),'_before_create',[],null);return(self.domtype="code");},$Code__before_create$11.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Column');var $nesting=[self].concat($parent_nesting),$Column__before_create$12;return(Opal.def(self,'$_before_create',$Column__before_create$12=function $$_before_create(){var $iter=$Column__before_create$12.$$p,$yield=$iter||nil,self=this;if($iter)$Column__before_create$12.$$p=null;$send2(self,$find_super(self,'_before_create',$Column__before_create$12,false,true),'_before_create',[],null);return(self.domtype="col");},$Column__before_create$12.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ColumnGroup');var $nesting=[self].concat($parent_nesting),$ColumnGroup__before_create$13;return(Opal.def(self,'$_before_create',$ColumnGroup__before_create$13=function $$_before_create(){var $iter=$ColumnGroup__before_create$13.$$p,$yield=$iter||nil,self=this;if($iter)$ColumnGroup__before_create$13.$$p=null;$send2(self,$find_super(self,'_before_create',$ColumnGroup__before_create$13,false,true),'_before_create',[],null);return(self.domtype="colgroup");},$ColumnGroup__before_create$13.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Data');var $nesting=[self].concat($parent_nesting),$Data__before_create$14;return(Opal.def(self,'$_before_create',$Data__before_create$14=function $$_before_create(){var $iter=$Data__before_create$14.$$p,$yield=$iter||nil,self=this;if($iter)$Data__before_create$14.$$p=null;$send2(self,$find_super(self,'_before_create',$Data__before_create$14,false,true),'_before_create',[],null);return(self.domtype="data");},$Data__before_create$14.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DataList');var $nesting=[self].concat($parent_nesting),$DataList__before_create$15;return(Opal.def(self,'$_before_create',$DataList__before_create$15=function $$_before_create(){var $iter=$DataList__before_create$15.$$p,$yield=$iter||nil,self=this;if($iter)$DataList__before_create$15.$$p=null;$send2(self,$find_super(self,'_before_create',$DataList__before_create$15,false,true),'_before_create',[],null);return(self.domtype="datalist");},$DataList__before_create$15.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Description');var $nesting=[self].concat($parent_nesting),$Description__before_create$16;return(Opal.def(self,'$_before_create',$Description__before_create$16=function $$_before_create(){var $iter=$Description__before_create$16.$$p,$yield=$iter||nil,self=this;if($iter)$Description__before_create$16.$$p=null;$send2(self,$find_super(self,'_before_create',$Description__before_create$16,false,true),'_before_create',[],null);return(self.domtype="dd");},$Description__before_create$16.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Deleted');var $nesting=[self].concat($parent_nesting),$Deleted__before_create$17;return(Opal.def(self,'$_before_create',$Deleted__before_create$17=function $$_before_create(){var $iter=$Deleted__before_create$17.$$p,$yield=$iter||nil,self=this;if($iter)$Deleted__before_create$17.$$p=null;$send2(self,$find_super(self,'_before_create',$Deleted__before_create$17,false,true),'_before_create',[],null);return(self.domtype="del");},$Deleted__before_create$17.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Details');var $nesting=[self].concat($parent_nesting),$Details__before_create$18;return(Opal.def(self,'$_before_create',$Details__before_create$18=function $$_before_create(){var $iter=$Details__before_create$18.$$p,$yield=$iter||nil,self=this;if($iter)$Details__before_create$18.$$p=null;$send2(self,$find_super(self,'_before_create',$Details__before_create$18,false,true),'_before_create',[],null);return(self.domtype="details");},$Details__before_create$18.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Dfn');var $nesting=[self].concat($parent_nesting),$Dfn__before_create$19;return(Opal.def(self,'$_before_create',$Dfn__before_create$19=function $$_before_create(){var $iter=$Dfn__before_create$19.$$p,$yield=$iter||nil,self=this;if($iter)$Dfn__before_create$19.$$p=null;$send2(self,$find_super(self,'_before_create',$Dfn__before_create$19,false,true),'_before_create',[],null);return(self.domtype="dfn");},$Dfn__before_create$19.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Dialog');var $nesting=[self].concat($parent_nesting),$Dialog__before_create$20;return(Opal.def(self,'$_before_create',$Dialog__before_create$20=function $$_before_create(){var $iter=$Dialog__before_create$20.$$p,$yield=$iter||nil,self=this;if($iter)$Dialog__before_create$20.$$p=null;$send2(self,$find_super(self,'_before_create',$Dialog__before_create$20,false,true),'_before_create',[],null);return(self.domtype="dialog");},$Dialog__before_create$20.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Division');var $nesting=[self].concat($parent_nesting),$Division__before_create$21;return(Opal.def(self,'$_before_create',$Division__before_create$21=function $$_before_create(){var $iter=$Division__before_create$21.$$p,$yield=$iter||nil,self=this;if($iter)$Division__before_create$21.$$p=null;$send2(self,$find_super(self,'_before_create',$Division__before_create$21,false,true),'_before_create',[],null);return(self.domtype="div");},$Division__before_create$21.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DescriptionList');var $nesting=[self].concat($parent_nesting),$DescriptionList__before_create$22;return(Opal.def(self,'$_before_create',$DescriptionList__before_create$22=function $$_before_create(){var $iter=$DescriptionList__before_create$22.$$p,$yield=$iter||nil,self=this;if($iter)$DescriptionList__before_create$22.$$p=null;$send2(self,$find_super(self,'_before_create',$DescriptionList__before_create$22,false,true),'_before_create',[],null);return(self.domtype="dl");},$DescriptionList__before_create$22.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DescriptionTerm');var $nesting=[self].concat($parent_nesting),$DescriptionTerm__before_create$23;return(Opal.def(self,'$_before_create',$DescriptionTerm__before_create$23=function $$_before_create(){var $iter=$DescriptionTerm__before_create$23.$$p,$yield=$iter||nil,self=this;if($iter)$DescriptionTerm__before_create$23.$$p=null;$send2(self,$find_super(self,'_before_create',$DescriptionTerm__before_create$23,false,true),'_before_create',[],null);return(self.domtype="dt");},$DescriptionTerm__before_create$23.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Emphasis');var $nesting=[self].concat($parent_nesting),$Emphasis__before_create$24;return(Opal.def(self,'$_before_create',$Emphasis__before_create$24=function $$_before_create(){var $iter=$Emphasis__before_create$24.$$p,$yield=$iter||nil,self=this;if($iter)$Emphasis__before_create$24.$$p=null;$send2(self,$find_super(self,'_before_create',$Emphasis__before_create$24,false,true),'_before_create',[],null);return(self.domtype="em");},$Emphasis__before_create$24.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Figure');var $nesting=[self].concat($parent_nesting),$Figure__before_create$25;return(Opal.def(self,'$_before_create',$Figure__before_create$25=function $$_before_create(){var $iter=$Figure__before_create$25.$$p,$yield=$iter||nil,self=this;if($iter)$Figure__before_create$25.$$p=null;$send2(self,$find_super(self,'_before_create',$Figure__before_create$25,false,true),'_before_create',[],null);return(self.domtype="figure");},$Figure__before_create$25.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'FigureCaption');var $nesting=[self].concat($parent_nesting),$FigureCaption__before_create$26;return(Opal.def(self,'$_before_create',$FigureCaption__before_create$26=function $$_before_create(){var $iter=$FigureCaption__before_create$26.$$p,$yield=$iter||nil,self=this;if($iter)$FigureCaption__before_create$26.$$p=null;$send2(self,$find_super(self,'_before_create',$FigureCaption__before_create$26,false,true),'_before_create',[],null);return(self.domtype="figcaption");},$FigureCaption__before_create$26.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ThemeDivider');var $nesting=[self].concat($parent_nesting),$ThemeDivider__before_create$27;return(Opal.def(self,'$_before_create',$ThemeDivider__before_create$27=function $$_before_create(){var $iter=$ThemeDivider__before_create$27.$$p,$yield=$iter||nil,self=this;if($iter)$ThemeDivider__before_create$27.$$p=null;$send2(self,$find_super(self,'_before_create',$ThemeDivider__before_create$27,false,true),'_before_create',[],null);return(self.domtype="hr");},$ThemeDivider__before_create$27.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Italic');var $nesting=[self].concat($parent_nesting),$Italic__before_create$28;return(Opal.def(self,'$_before_create',$Italic__before_create$28=function $$_before_create(){var $iter=$Italic__before_create$28.$$p,$yield=$iter||nil,self=this;if($iter)$Italic__before_create$28.$$p=null;$send2(self,$find_super(self,'_before_create',$Italic__before_create$28,false,true),'_before_create',[],null);return(self.domtype="i");},$Italic__before_create$28.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'InlineFrame');var $nesting=[self].concat($parent_nesting),$InlineFrame__before_create$29;return(Opal.def(self,'$_before_create',$InlineFrame__before_create$29=function $$_before_create(){var $iter=$InlineFrame__before_create$29.$$p,$yield=$iter||nil,self=this;if($iter)$InlineFrame__before_create$29.$$p=null;$send2(self,$find_super(self,'_before_create',$InlineFrame__before_create$29,false,true),'_before_create',[],null);return(self.domtype="iframe");},$InlineFrame__before_create$29.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Insertion');var $nesting=[self].concat($parent_nesting),$Insertion__before_create$30;return(Opal.def(self,'$_before_create',$Insertion__before_create$30=function $$_before_create(){var $iter=$Insertion__before_create$30.$$p,$yield=$iter||nil,self=this;if($iter)$Insertion__before_create$30.$$p=null;$send2(self,$find_super(self,'_before_create',$Insertion__before_create$30,false,true),'_before_create',[],null);return(self.domtype="ins");},$Insertion__before_create$30.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'KeyboardKey');var $nesting=[self].concat($parent_nesting),$KeyboardKey__before_create$31;return(Opal.def(self,'$_before_create',$KeyboardKey__before_create$31=function $$_before_create(){var $iter=$KeyboardKey__before_create$31.$$p,$yield=$iter||nil,self=this;if($iter)$KeyboardKey__before_create$31.$$p=null;$send2(self,$find_super(self,'_before_create',$KeyboardKey__before_create$31,false,true),'_before_create',[],null);return(self.domtype="kbd");},$KeyboardKey__before_create$31.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Map');var $nesting=[self].concat($parent_nesting),$Map__before_create$32;return(Opal.def(self,'$_before_create',$Map__before_create$32=function $$_before_create(){var $iter=$Map__before_create$32.$$p,$yield=$iter||nil,self=this;if($iter)$Map__before_create$32.$$p=null;$send2(self,$find_super(self,'_before_create',$Map__before_create$32,false,true),'_before_create',[],null);return(self.domtype="map");},$Map__before_create$32.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Mark');var $nesting=[self].concat($parent_nesting),$Mark__before_create$33;return(Opal.def(self,'$_before_create',$Mark__before_create$33=function $$_before_create(){var $iter=$Mark__before_create$33.$$p,$yield=$iter||nil,self=this;if($iter)$Mark__before_create$33.$$p=null;$send2(self,$find_super(self,'_before_create',$Mark__before_create$33,false,true),'_before_create',[],null);return(self.domtype="mark");},$Mark__before_create$33.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Meter');var $nesting=[self].concat($parent_nesting),$Meter__before_create$34;return(Opal.def(self,'$_before_create',$Meter__before_create$34=function $$_before_create(){var $iter=$Meter__before_create$34.$$p,$yield=$iter||nil,self=this;if($iter)$Meter__before_create$34.$$p=null;$send2(self,$find_super(self,'_before_create',$Meter__before_create$34,false,true),'_before_create',[],null);return(self.domtype="meter");},$Meter__before_create$34.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'NoScript');var $nesting=[self].concat($parent_nesting),$NoScript__before_create$35;return(Opal.def(self,'$_before_create',$NoScript__before_create$35=function $$_before_create(){var $iter=$NoScript__before_create$35.$$p,$yield=$iter||nil,self=this;if($iter)$NoScript__before_create$35.$$p=null;$send2(self,$find_super(self,'_before_create',$NoScript__before_create$35,false,true),'_before_create',[],null);return(self.domtype="noscript");},$NoScript__before_create$35.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Object');var $nesting=[self].concat($parent_nesting),$Object__before_create$36;return(Opal.def(self,'$_before_create',$Object__before_create$36=function $$_before_create(){var $iter=$Object__before_create$36.$$p,$yield=$iter||nil,self=this;if($iter)$Object__before_create$36.$$p=null;$send2(self,$find_super(self,'_before_create',$Object__before_create$36,false,true),'_before_create',[],null);return(self.domtype="object");},$Object__before_create$36.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OptionGroup');var $nesting=[self].concat($parent_nesting),$OptionGroup__before_create$37;return(Opal.def(self,'$_before_create',$OptionGroup__before_create$37=function $$_before_create(){var $iter=$OptionGroup__before_create$37.$$p,$yield=$iter||nil,self=this;if($iter)$OptionGroup__before_create$37.$$p=null;$send2(self,$find_super(self,'_before_create',$OptionGroup__before_create$37,false,true),'_before_create',[],null);return(self.domtype="optgroup");},$OptionGroup__before_create$37.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Parameter');var $nesting=[self].concat($parent_nesting),$Parameter__before_create$38;return(Opal.def(self,'$_before_create',$Parameter__before_create$38=function $$_before_create(){var $iter=$Parameter__before_create$38.$$p,$yield=$iter||nil,self=this;if($iter)$Parameter__before_create$38.$$p=null;$send2(self,$find_super(self,'_before_create',$Parameter__before_create$38,false,true),'_before_create',[],null);return(self.domtype="param");},$Parameter__before_create$38.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Picture');var $nesting=[self].concat($parent_nesting),$Picture__before_create$39;return(Opal.def(self,'$_before_create',$Picture__before_create$39=function $$_before_create(){var $iter=$Picture__before_create$39.$$p,$yield=$iter||nil,self=this;if($iter)$Picture__before_create$39.$$p=null;$send2(self,$find_super(self,'_before_create',$Picture__before_create$39,false,true),'_before_create',[],null);return(self.domtype="picture");},$Picture__before_create$39.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Preformatted');var $nesting=[self].concat($parent_nesting),$Preformatted__before_create$40;return(Opal.def(self,'$_before_create',$Preformatted__before_create$40=function $$_before_create(){var $iter=$Preformatted__before_create$40.$$p,$yield=$iter||nil,self=this;if($iter)$Preformatted__before_create$40.$$p=null;$send2(self,$find_super(self,'_before_create',$Preformatted__before_create$40,false,true),'_before_create',[],null);return(self.domtype="pre");},$Preformatted__before_create$40.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Progress');var $nesting=[self].concat($parent_nesting),$Progress__before_create$41;return(Opal.def(self,'$_before_create',$Progress__before_create$41=function $$_before_create(){var $iter=$Progress__before_create$41.$$p,$yield=$iter||nil,self=this;if($iter)$Progress__before_create$41.$$p=null;$send2(self,$find_super(self,'_before_create',$Progress__before_create$41,false,true),'_before_create',[],null);return(self.domtype="progress");},$Progress__before_create$41.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Quotation');var $nesting=[self].concat($parent_nesting),$Quotation__before_create$42;return(Opal.def(self,'$_before_create',$Quotation__before_create$42=function $$_before_create(){var $iter=$Quotation__before_create$42.$$p,$yield=$iter||nil,self=this;if($iter)$Quotation__before_create$42.$$p=null;$send2(self,$find_super(self,'_before_create',$Quotation__before_create$42,false,true),'_before_create',[],null);return(self.domtype="q");},$Quotation__before_create$42.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'StrikeThrough');var $nesting=[self].concat($parent_nesting),$StrikeThrough__before_create$43;return(Opal.def(self,'$_before_create',$StrikeThrough__before_create$43=function $$_before_create(){var $iter=$StrikeThrough__before_create$43.$$p,$yield=$iter||nil,self=this;if($iter)$StrikeThrough__before_create$43.$$p=null;$send2(self,$find_super(self,'_before_create',$StrikeThrough__before_create$43,false,true),'_before_create',[],null);return(self.domtype="s");},$StrikeThrough__before_create$43.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Sample');var $nesting=[self].concat($parent_nesting),$Sample__before_create$44;return(Opal.def(self,'$_before_create',$Sample__before_create$44=function $$_before_create(){var $iter=$Sample__before_create$44.$$p,$yield=$iter||nil,self=this;if($iter)$Sample__before_create$44.$$p=null;$send2(self,$find_super(self,'_before_create',$Sample__before_create$44,false,true),'_before_create',[],null);return(self.domtype="samp");},$Sample__before_create$44.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Source');var $nesting=[self].concat($parent_nesting),$Source__before_create$45;return(Opal.def(self,'$_before_create',$Source__before_create$45=function $$_before_create(){var $iter=$Source__before_create$45.$$p,$yield=$iter||nil,self=this;if($iter)$Source__before_create$45.$$p=null;$send2(self,$find_super(self,'_before_create',$Source__before_create$45,false,true),'_before_create',[],null);return(self.domtype="source");},$Source__before_create$45.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Strong');var $nesting=[self].concat($parent_nesting),$Strong__before_create$46;return(Opal.def(self,'$_before_create',$Strong__before_create$46=function $$_before_create(){var $iter=$Strong__before_create$46.$$p,$yield=$iter||nil,self=this;if($iter)$Strong__before_create$46.$$p=null;$send2(self,$find_super(self,'_before_create',$Strong__before_create$46,false,true),'_before_create',[],null);return(self.domtype="strong");},$Strong__before_create$46.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Small');var $nesting=[self].concat($parent_nesting),$Small__before_create$47;return(Opal.def(self,'$_before_create',$Small__before_create$47=function $$_before_create(){var $iter=$Small__before_create$47.$$p,$yield=$iter||nil,self=this;if($iter)$Small__before_create$47.$$p=null;$send2(self,$find_super(self,'_before_create',$Small__before_create$47,false,true),'_before_create',[],null);return(self.domtype="small");},$Small__before_create$47.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Style');var $nesting=[self].concat($parent_nesting),$Style__before_create$48;return(Opal.def(self,'$_before_create',$Style__before_create$48=function $$_before_create(){var $iter=$Style__before_create$48.$$p,$yield=$iter||nil,self=this;if($iter)$Style__before_create$48.$$p=null;$send2(self,$find_super(self,'_before_create',$Style__before_create$48,false,true),'_before_create',[],null);return(self.domtype="style");},$Style__before_create$48.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'SubScript');var $nesting=[self].concat($parent_nesting),$SubScript__before_create$49;return(Opal.def(self,'$_before_create',$SubScript__before_create$49=function $$_before_create(){var $iter=$SubScript__before_create$49.$$p,$yield=$iter||nil,self=this;if($iter)$SubScript__before_create$49.$$p=null;$send2(self,$find_super(self,'_before_create',$SubScript__before_create$49,false,true),'_before_create',[],null);return(self.domtype="sub");},$SubScript__before_create$49.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Summary');var $nesting=[self].concat($parent_nesting),$Summary__before_create$50;return(Opal.def(self,'$_before_create',$Summary__before_create$50=function $$_before_create(){var $iter=$Summary__before_create$50.$$p,$yield=$iter||nil,self=this;if($iter)$Summary__before_create$50.$$p=null;$send2(self,$find_super(self,'_before_create',$Summary__before_create$50,false,true),'_before_create',[],null);return(self.domtype="summary");},$Summary__before_create$50.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'SuperScript');var $nesting=[self].concat($parent_nesting),$SuperScript__before_create$51;return(Opal.def(self,'$_before_create',$SuperScript__before_create$51=function $$_before_create(){var $iter=$SuperScript__before_create$51.$$p,$yield=$iter||nil,self=this;if($iter)$SuperScript__before_create$51.$$p=null;$send2(self,$find_super(self,'_before_create',$SuperScript__before_create$51,false,true),'_before_create',[],null);return(self.domtype="sup");},$SuperScript__before_create$51.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Svg');var $nesting=[self].concat($parent_nesting),$Svg__before_create$52;return(Opal.def(self,'$_before_create',$Svg__before_create$52=function $$_before_create(){var $iter=$Svg__before_create$52.$$p,$yield=$iter||nil,self=this;if($iter)$Svg__before_create$52.$$p=null;$send2(self,$find_super(self,'_before_create',$Svg__before_create$52,false,true),'_before_create',[],null);return(self.domtype="svg");},$Svg__before_create$52.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Template');var $nesting=[self].concat($parent_nesting),$Template__before_create$53;return(Opal.def(self,'$_before_create',$Template__before_create$53=function $$_before_create(){var $iter=$Template__before_create$53.$$p,$yield=$iter||nil,self=this;if($iter)$Template__before_create$53.$$p=null;$send2(self,$find_super(self,'_before_create',$Template__before_create$53,false,true),'_before_create',[],null);return(self.domtype="template");},$Template__before_create$53.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Time');var $nesting=[self].concat($parent_nesting),$Time__before_create$54;return(Opal.def(self,'$_before_create',$Time__before_create$54=function $$_before_create(){var $iter=$Time__before_create$54.$$p,$yield=$iter||nil,self=this;if($iter)$Time__before_create$54.$$p=null;$send2(self,$find_super(self,'_before_create',$Time__before_create$54,false,true),'_before_create',[],null);return(self.domtype="time");},$Time__before_create$54.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Track');var $nesting=[self].concat($parent_nesting),$Track__before_create$55;return(Opal.def(self,'$_before_create',$Track__before_create$55=function $$_before_create(){var $iter=$Track__before_create$55.$$p,$yield=$iter||nil,self=this;if($iter)$Track__before_create$55.$$p=null;$send2(self,$find_super(self,'_before_create',$Track__before_create$55,false,true),'_before_create',[],null);return(self.domtype="track");},$Track__before_create$55.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Misspelled');var $nesting=[self].concat($parent_nesting),$Misspelled__before_create$56;return(Opal.def(self,'$_before_create',$Misspelled__before_create$56=function $$_before_create(){var $iter=$Misspelled__before_create$56.$$p,$yield=$iter||nil,self=this;if($iter)$Misspelled__before_create$56.$$p=null;$send2(self,$find_super(self,'_before_create',$Misspelled__before_create$56,false,true),'_before_create',[],null);return(self.domtype="u");},$Misspelled__before_create$56.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Variable');var $nesting=[self].concat($parent_nesting),$Variable__before_create$57;return(Opal.def(self,'$_before_create',$Variable__before_create$57=function $$_before_create(){var $iter=$Variable__before_create$57.$$p,$yield=$iter||nil,self=this;if($iter)$Variable__before_create$57.$$p=null;$send2(self,$find_super(self,'_before_create',$Variable__before_create$57,false,true),'_before_create',[],null);return(self.domtype="var");},$Variable__before_create$57.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'WordBreak');var $nesting=[self].concat($parent_nesting),$WordBreak__before_create$58;return(Opal.def(self,'$_before_create',$WordBreak__before_create$58=function $$_before_create(){var $iter=$WordBreak__before_create$58.$$p,$yield=$iter||nil,self=this;if($iter)$WordBreak__before_create$58.$$p=null;$send2(self,$find_super(self,'_before_create',$WordBreak__before_create$58,false,true),'_before_create',[],null);return(self.domtype="wbr");},$WordBreak__before_create$58.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header');var $nesting=[self].concat($parent_nesting),$Header__before_create$59;return(Opal.def(self,'$_before_create',$Header__before_create$59=function $$_before_create(){var $iter=$Header__before_create$59.$$p,$yield=$iter||nil,self=this;if($iter)$Header__before_create$59.$$p=null;$send2(self,$find_super(self,'_before_create',$Header__before_create$59,false,true),'_before_create',[],null);return(self.domtype="header");},$Header__before_create$59.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Navigation');var $nesting=[self].concat($parent_nesting),$Navigation__before_create$60;return(Opal.def(self,'$_before_create',$Navigation__before_create$60=function $$_before_create(){var $iter=$Navigation__before_create$60.$$p,$yield=$iter||nil,self=this;if($iter)$Navigation__before_create$60.$$p=null;$send2(self,$find_super(self,'_before_create',$Navigation__before_create$60,false,true),'_before_create',[],null);return(self.domtype="nav");},$Navigation__before_create$60.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Main');var $nesting=[self].concat($parent_nesting),$Main__before_create$61;return(Opal.def(self,'$_before_create',$Main__before_create$61=function $$_before_create(){var $iter=$Main__before_create$61.$$p,$yield=$iter||nil,self=this;if($iter)$Main__before_create$61.$$p=null;$send2(self,$find_super(self,'_before_create',$Main__before_create$61,false,true),'_before_create',[],null);return(self.domtype="main");},$Main__before_create$61.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Section');var $nesting=[self].concat($parent_nesting),$Section__before_create$62;return(Opal.def(self,'$_before_create',$Section__before_create$62=function $$_before_create(){var $iter=$Section__before_create$62.$$p,$yield=$iter||nil,self=this;if($iter)$Section__before_create$62.$$p=null;$send2(self,$find_super(self,'_before_create',$Section__before_create$62,false,true),'_before_create',[],null);return(self.domtype="section");},$Section__before_create$62.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Article');var $nesting=[self].concat($parent_nesting),$Article__before_create$63;return(Opal.def(self,'$_before_create',$Article__before_create$63=function $$_before_create(){var $iter=$Article__before_create$63.$$p,$yield=$iter||nil,self=this;if($iter)$Article__before_create$63.$$p=null;$send2(self,$find_super(self,'_before_create',$Article__before_create$63,false,true),'_before_create',[],null);return(self.domtype="article");},$Article__before_create$63.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Aside');var $nesting=[self].concat($parent_nesting),$Aside__before_create$64;return(Opal.def(self,'$_before_create',$Aside__before_create$64=function $$_before_create(){var $iter=$Aside__before_create$64.$$p,$yield=$iter||nil,self=this;if($iter)$Aside__before_create$64.$$p=null;$send2(self,$find_super(self,'_before_create',$Aside__before_create$64,false,true),'_before_create',[],null);return(self.domtype="aside");},$Aside__before_create$64.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Footer');var $nesting=[self].concat($parent_nesting),$Footer__before_create$65;return(Opal.def(self,'$_before_create',$Footer__before_create$65=function $$_before_create(){var $iter=$Footer__before_create$65.$$p,$yield=$iter||nil,self=this;if($iter)$Footer__before_create$65.$$p=null;$send2(self,$find_super(self,'_before_create',$Footer__before_create$65,false,true),'_before_create',[],null);return(self.domtype="footer");},$Footer__before_create$65.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Form');var $nesting=[self].concat($parent_nesting),$Form__before_create$66,$Form_form_data$67;Opal.def(self,'$_before_create',$Form__before_create$66=function $$_before_create(){var $iter=$Form__before_create$66.$$p,$yield=$iter||nil,self=this;if($iter)$Form__before_create$66.$$p=null;$send2(self,$find_super(self,'_before_create',$Form__before_create$66,false,true),'_before_create',[],null);return(self.domtype="div");},$Form__before_create$66.$$arity=0);return(Opal.def(self,'$form_data',$Form_form_data$67=function $$form_data(){var $a,$$68,self=this,result=nil,search_queue=nil,entry=nil,$writer=nil;result=$hash2([],{});search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if(entry.$domtype()['$==']("input")){$writer=[entry.$title().$to_s().$to_sym(),entry.$value()];$send(result,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];}else{$send(entry.$children().$values(),'each',[],($$68=function(the_child){var self=$$68.$$s==null?this:$$68.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$68.$$s=self,$$68.$$arity=1,$$68))}};};return result;},$Form_form_data$67.$$arity=0),nil)&&'form_data';})($nesting[0],$$$($$$($$$($$($nesting,'GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ButtonInput');var $nesting=[self].concat($parent_nesting),$ButtonInput__before_create$69;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$ButtonInput__before_create$69=function $$_before_create(){var $iter=$ButtonInput__before_create$69.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ButtonInput__before_create$69.$$p=null;$send2(self,$find_super(self,'_before_create',$ButtonInput__before_create$69,false,true),'_before_create',[],null);$writer=["type","button"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$ButtonInput__before_create$69.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseClickableElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'SubmitButton');var $nesting=[self].concat($parent_nesting),$SubmitButton__before_create$70;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$SubmitButton__before_create$70=function $$_before_create(){var $iter=$SubmitButton__before_create$70.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$SubmitButton__before_create$70.$$p=null;$send2(self,$find_super(self,'_before_create',$SubmitButton__before_create$70,false,true),'_before_create',[],null);$writer=["type","submit"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$SubmitButton__before_create$70.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseClickableElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Block');var $nesting=[self].concat($parent_nesting),$Block__before_create$71;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Block__before_create$71=function $$_before_create(){var $iter=$Block__before_create$71.$$p,$yield=$iter||nil,self=this;if($iter)$Block__before_create$71.$$p=null;$send2(self,$find_super(self,'_before_create',$Block__before_create$71,false,true),'_before_create',[],null);self.domtype="div";self.options.$delete("type");return true;},$Block__before_create$71.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseClickableElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'CheckBox');var $nesting=[self].concat($parent_nesting),$CheckBox__before_create$72;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$CheckBox__before_create$72=function $$_before_create(){var $iter=$CheckBox__before_create$72.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$CheckBox__before_create$72.$$p=null;$send2(self,$find_super(self,'_before_create',$CheckBox__before_create$72,false,true),'_before_create',[],null);$writer=["type","checkbox"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$CheckBox__before_create$72.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseClickableElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Image');var $nesting=[self].concat($parent_nesting),$Image__before_create$73;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Image__before_create$73=function $$_before_create(){var $iter=$Image__before_create$73.$$p,$yield=$iter||nil,self=this,$writer=nil,$ret_or_1=nil;if($iter)$Image__before_create$73.$$p=null;$send2(self,$find_super(self,'_before_create',$Image__before_create$73,false,true),'_before_create',[],null);self.domtype="image";if($truthy(self.options['$[]']("source"))){$writer=["src",self.options.$delete("source")];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(($ret_or_1=self.options['$[]']("alt")))){return $ret_or_1}else{$writer=["alt",self.options['$[]']("src")];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Image__before_create$73.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Video');var $nesting=[self].concat($parent_nesting),$Video__before_create$74;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Video__before_create$74=function $$_before_create(){var $iter=$Video__before_create$74.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Video__before_create$74.$$p=null;$send2(self,$find_super(self,'_before_create',$Video__before_create$74,false,true),'_before_create',[],null);self.domtype="video";if($truthy(self.options['$[]']("source"))){$writer=["src",self.options.$delete("source")];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};},$Video__before_create$74.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Audio');var $nesting=[self].concat($parent_nesting),$Audio__before_create$75;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Audio__before_create$75=function $$_before_create(){var $iter=$Audio__before_create$75.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Audio__before_create$75.$$p=null;$send2(self,$find_super(self,'_before_create',$Audio__before_create$75,false,true),'_before_create',[],null);self.domtype="audio";if($truthy(self.options['$[]']("source"))){$writer=["src",self.options.$delete("source")];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};},$Audio__before_create$75.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Canvas');var $nesting=[self].concat($parent_nesting),$Canvas__before_create$76;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Canvas__before_create$76=function $$_before_create(){var $iter=$Canvas__before_create$76.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Canvas__before_create$76.$$p=null;$send2(self,$find_super(self,'_before_create',$Canvas__before_create$76,false,true),'_before_create',[],null);self.domtype="canvas";if($truthy(self.options['$[]']("source"))){$writer=["src",self.options.$delete("source")];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};},$Canvas__before_create$76.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'HiddenInput');var $nesting=[self].concat($parent_nesting),$HiddenInput__before_create$77;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$HiddenInput__before_create$77=function $$_before_create(){var $iter=$HiddenInput__before_create$77.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$HiddenInput__before_create$77.$$p=null;$send2(self,$find_super(self,'_before_create',$HiddenInput__before_create$77,false,true),'_before_create',[],null);$writer=["type","hidden"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$HiddenInput__before_create$77.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'FileInput');var $nesting=[self].concat($parent_nesting),$FileInput__before_create$78;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$FileInput__before_create$78=function $$_before_create(){var $iter=$FileInput__before_create$78.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$FileInput__before_create$78.$$p=null;$send2(self,$find_super(self,'_before_create',$FileInput__before_create$78,false,true),'_before_create',[],null);$writer=["type","file"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$FileInput__before_create$78.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TextInput');var $nesting=[self].concat($parent_nesting),$TextInput__before_create$79;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$TextInput__before_create$79=function $$_before_create(){var $iter=$TextInput__before_create$79.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TextInput__before_create$79.$$p=null;$send2(self,$find_super(self,'_before_create',$TextInput__before_create$79,false,true),'_before_create',[],null);$writer=["type","text"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$TextInput__before_create$79.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'PasswordInput');var $nesting=[self].concat($parent_nesting),$PasswordInput__before_create$80;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$PasswordInput__before_create$80=function $$_before_create(){var $iter=$PasswordInput__before_create$80.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$PasswordInput__before_create$80.$$p=null;$send2(self,$find_super(self,'_before_create',$PasswordInput__before_create$80,false,true),'_before_create',[],null);$writer=["type","password"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$PasswordInput__before_create$80.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ResetInput');var $nesting=[self].concat($parent_nesting),$ResetInput__before_create$81;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$ResetInput__before_create$81=function $$_before_create(){var $iter=$ResetInput__before_create$81.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ResetInput__before_create$81.$$p=null;$send2(self,$find_super(self,'_before_create',$ResetInput__before_create$81,false,true),'_before_create',[],null);$writer=["type","reset"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$ResetInput__before_create$81.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'RadioButton');var $nesting=[self].concat($parent_nesting),$RadioButton__before_create$82;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$RadioButton__before_create$82=function $$_before_create(){var $iter=$RadioButton__before_create$82.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$RadioButton__before_create$82.$$p=null;$send2(self,$find_super(self,'_before_create',$RadioButton__before_create$82,false,true),'_before_create',[],null);$writer=["type","radio"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$RadioButton__before_create$82.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ColorPicker');var $nesting=[self].concat($parent_nesting),$ColorPicker__before_create$83;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$ColorPicker__before_create$83=function $$_before_create(){var $iter=$ColorPicker__before_create$83.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ColorPicker__before_create$83.$$p=null;$send2(self,$find_super(self,'_before_create',$ColorPicker__before_create$83,false,true),'_before_create',[],null);$writer=["type","color"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$ColorPicker__before_create$83.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DatePicker');var $nesting=[self].concat($parent_nesting),$DatePicker__before_create$84;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$DatePicker__before_create$84=function $$_before_create(){var $iter=$DatePicker__before_create$84.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$DatePicker__before_create$84.$$p=null;$send2(self,$find_super(self,'_before_create',$DatePicker__before_create$84,false,true),'_before_create',[],null);$writer=["type","date"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$DatePicker__before_create$84.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DateTimeLocal');var $nesting=[self].concat($parent_nesting),$DateTimeLocal__before_create$85;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$DateTimeLocal__before_create$85=function $$_before_create(){var $iter=$DateTimeLocal__before_create$85.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$DateTimeLocal__before_create$85.$$p=null;$send2(self,$find_super(self,'_before_create',$DateTimeLocal__before_create$85,false,true),'_before_create',[],null);$writer=["type","datetime-local"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$DateTimeLocal__before_create$85.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'EmailInput');var $nesting=[self].concat($parent_nesting),$EmailInput__before_create$86;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$EmailInput__before_create$86=function $$_before_create(){var $iter=$EmailInput__before_create$86.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$EmailInput__before_create$86.$$p=null;$send2(self,$find_super(self,'_before_create',$EmailInput__before_create$86,false,true),'_before_create',[],null);$writer=["type","email"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$EmailInput__before_create$86.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'MonthPicker');var $nesting=[self].concat($parent_nesting),$MonthPicker__before_create$87;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$MonthPicker__before_create$87=function $$_before_create(){var $iter=$MonthPicker__before_create$87.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$MonthPicker__before_create$87.$$p=null;$send2(self,$find_super(self,'_before_create',$MonthPicker__before_create$87,false,true),'_before_create',[],null);$writer=["type","month"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$MonthPicker__before_create$87.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'NumberInput');var $nesting=[self].concat($parent_nesting),$NumberInput__before_create$88;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$NumberInput__before_create$88=function $$_before_create(){var $iter=$NumberInput__before_create$88.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$NumberInput__before_create$88.$$p=null;$send2(self,$find_super(self,'_before_create',$NumberInput__before_create$88,false,true),'_before_create',[],null);$writer=["type","number"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$NumberInput__before_create$88.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'RangeInput');var $nesting=[self].concat($parent_nesting),$RangeInput__before_create$89;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$RangeInput__before_create$89=function $$_before_create(){var $iter=$RangeInput__before_create$89.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$RangeInput__before_create$89.$$p=null;$send2(self,$find_super(self,'_before_create',$RangeInput__before_create$89,false,true),'_before_create',[],null);$writer=["type","range"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$RangeInput__before_create$89.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'SearchInput');var $nesting=[self].concat($parent_nesting),$SearchInput__before_create$90;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$SearchInput__before_create$90=function $$_before_create(){var $iter=$SearchInput__before_create$90.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$SearchInput__before_create$90.$$p=null;$send2(self,$find_super(self,'_before_create',$SearchInput__before_create$90,false,true),'_before_create',[],null);$writer=["type","search"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$SearchInput__before_create$90.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'PhoneInput');var $nesting=[self].concat($parent_nesting),$PhoneInput__before_create$91;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$PhoneInput__before_create$91=function $$_before_create(){var $iter=$PhoneInput__before_create$91.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$PhoneInput__before_create$91.$$p=null;$send2(self,$find_super(self,'_before_create',$PhoneInput__before_create$91,false,true),'_before_create',[],null);$writer=["type","tel"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$PhoneInput__before_create$91.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TimePicker');var $nesting=[self].concat($parent_nesting),$TimePicker__before_create$92;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$TimePicker__before_create$92=function $$_before_create(){var $iter=$TimePicker__before_create$92.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TimePicker__before_create$92.$$p=null;$send2(self,$find_super(self,'_before_create',$TimePicker__before_create$92,false,true),'_before_create',[],null);$writer=["type","time"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$TimePicker__before_create$92.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'UrlInput');var $nesting=[self].concat($parent_nesting),$UrlInput__before_create$93;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$UrlInput__before_create$93=function $$_before_create(){var $iter=$UrlInput__before_create$93.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$UrlInput__before_create$93.$$p=null;$send2(self,$find_super(self,'_before_create',$UrlInput__before_create$93,false,true),'_before_create',[],null);$writer=["type","url"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$UrlInput__before_create$93.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'WeekPicker');var $nesting=[self].concat($parent_nesting),$WeekPicker__before_create$94;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$WeekPicker__before_create$94=function $$_before_create(){var $iter=$WeekPicker__before_create$94.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$WeekPicker__before_create$94.$$p=null;$send2(self,$find_super(self,'_before_create',$WeekPicker__before_create$94,false,true),'_before_create',[],null);$writer=["type","week"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$WeekPicker__before_create$94.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseInputElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Label');var $nesting=[self].concat($parent_nesting),$Label__before_create$95;return(Opal.def(self,'$_before_create',$Label__before_create$95=function $$_before_create(){var $iter=$Label__before_create$95.$$p,$yield=$iter||nil,self=this;if($iter)$Label__before_create$95.$$p=null;$send2(self,$find_super(self,'_before_create',$Label__before_create$95,false,true),'_before_create',[],null);return(self.domtype="label");},$Label__before_create$95.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TextArea');var $nesting=[self].concat($parent_nesting),$TextArea__before_create$96;return(Opal.def(self,'$_before_create',$TextArea__before_create$96=function $$_before_create(){var $iter=$TextArea__before_create$96.$$p,$yield=$iter||nil,self=this;if($iter)$TextArea__before_create$96.$$p=null;$send2(self,$find_super(self,'_before_create',$TextArea__before_create$96,false,true),'_before_create',[],null);return(self.domtype="textarea");},$TextArea__before_create$96.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Output');var $nesting=[self].concat($parent_nesting),$Output__before_create$97;return(Opal.def(self,'$_before_create',$Output__before_create$97=function $$_before_create(){var $iter=$Output__before_create$97.$$p,$yield=$iter||nil,self=this;if($iter)$Output__before_create$97.$$p=null;$send2(self,$find_super(self,'_before_create',$Output__before_create$97,false,true),'_before_create',[],null);return(self.domtype="output");},$Output__before_create$97.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Paragraph');var $nesting=[self].concat($parent_nesting),$Paragraph__before_create$98;return(Opal.def(self,'$_before_create',$Paragraph__before_create$98=function $$_before_create(){var $iter=$Paragraph__before_create$98.$$p,$yield=$iter||nil,self=this;if($iter)$Paragraph__before_create$98.$$p=null;$send2(self,$find_super(self,'_before_create',$Paragraph__before_create$98,false,true),'_before_create',[],null);return(self.domtype="p");},$Paragraph__before_create$98.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header1');var $nesting=[self].concat($parent_nesting),$Header1__before_create$99;return(Opal.def(self,'$_before_create',$Header1__before_create$99=function $$_before_create(){var $iter=$Header1__before_create$99.$$p,$yield=$iter||nil,self=this;if($iter)$Header1__before_create$99.$$p=null;$send2(self,$find_super(self,'_before_create',$Header1__before_create$99,false,true),'_before_create',[],null);return(self.domtype="h1");},$Header1__before_create$99.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header2');var $nesting=[self].concat($parent_nesting),$Header2__before_create$100;return(Opal.def(self,'$_before_create',$Header2__before_create$100=function $$_before_create(){var $iter=$Header2__before_create$100.$$p,$yield=$iter||nil,self=this;if($iter)$Header2__before_create$100.$$p=null;$send2(self,$find_super(self,'_before_create',$Header2__before_create$100,false,true),'_before_create',[],null);return(self.domtype="h2");},$Header2__before_create$100.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header3');var $nesting=[self].concat($parent_nesting),$Header3__before_create$101;return(Opal.def(self,'$_before_create',$Header3__before_create$101=function $$_before_create(){var $iter=$Header3__before_create$101.$$p,$yield=$iter||nil,self=this;if($iter)$Header3__before_create$101.$$p=null;$send2(self,$find_super(self,'_before_create',$Header3__before_create$101,false,true),'_before_create',[],null);return(self.domtype="h3");},$Header3__before_create$101.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header4');var $nesting=[self].concat($parent_nesting),$Header4__before_create$102;return(Opal.def(self,'$_before_create',$Header4__before_create$102=function $$_before_create(){var $iter=$Header4__before_create$102.$$p,$yield=$iter||nil,self=this;if($iter)$Header4__before_create$102.$$p=null;$send2(self,$find_super(self,'_before_create',$Header4__before_create$102,false,true),'_before_create',[],null);return(self.domtype="h4");},$Header4__before_create$102.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header5');var $nesting=[self].concat($parent_nesting),$Header5__before_create$103;return(Opal.def(self,'$_before_create',$Header5__before_create$103=function $$_before_create(){var $iter=$Header5__before_create$103.$$p,$yield=$iter||nil,self=this;if($iter)$Header5__before_create$103.$$p=null;$send2(self,$find_super(self,'_before_create',$Header5__before_create$103,false,true),'_before_create',[],null);return(self.domtype="h5");},$Header5__before_create$103.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Header6');var $nesting=[self].concat($parent_nesting),$Header6__before_create$104;return(Opal.def(self,'$_before_create',$Header6__before_create$104=function $$_before_create(){var $iter=$Header6__before_create$104.$$p,$yield=$iter||nil,self=this;if($iter)$Header6__before_create$104.$$p=null;$send2(self,$find_super(self,'_before_create',$Header6__before_create$104,false,true),'_before_create',[],null);return(self.domtype="h6");},$Header6__before_create$104.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'List');var $nesting=[self].concat($parent_nesting),$List__before_create$105;return(Opal.def(self,'$_before_create',$List__before_create$105=function $$_before_create(){var $iter=$List__before_create$105.$$p,$yield=$iter||nil,self=this;if($iter)$List__before_create$105.$$p=null;$send2(self,$find_super(self,'_before_create',$List__before_create$105,false,true),'_before_create',[],null);return(self.domtype="ul");},$List__before_create$105.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrderedList');var $nesting=[self].concat($parent_nesting),$OrderedList__before_create$106;return(Opal.def(self,'$_before_create',$OrderedList__before_create$106=function $$_before_create(){var $iter=$OrderedList__before_create$106.$$p,$yield=$iter||nil,self=this;if($iter)$OrderedList__before_create$106.$$p=null;$send2(self,$find_super(self,'_before_create',$OrderedList__before_create$106,false,true),'_before_create',[],null);return(self.domtype="ol");},$OrderedList__before_create$106.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ListItem');var $nesting=[self].concat($parent_nesting),$ListItem__before_create$107;return(Opal.def(self,'$_before_create',$ListItem__before_create$107=function $$_before_create(){var $iter=$ListItem__before_create$107.$$p,$yield=$iter||nil,self=this;if($iter)$ListItem__before_create$107.$$p=null;$send2(self,$find_super(self,'_before_create',$ListItem__before_create$107,false,true),'_before_create',[],null);return(self.domtype="li");},$ListItem__before_create$107.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Anchor');var $nesting=[self].concat($parent_nesting),$Anchor__before_create$108;return(Opal.def(self,'$_before_create',$Anchor__before_create$108=function $$_before_create(){var $iter=$Anchor__before_create$108.$$p,$yield=$iter||nil,self=this;if($iter)$Anchor__before_create$108.$$p=null;$send2(self,$find_super(self,'_before_create',$Anchor__before_create$108,false,true),'_before_create',[],null);return(self.domtype="a");},$Anchor__before_create$108.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ExternalLink');var $nesting=[self].concat($parent_nesting),$ExternalLink__before_create$109;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$ExternalLink__before_create$109=function $$_before_create(){var $iter=$ExternalLink__before_create$109.$$p,$yield=$iter||nil,self=this,$ret_or_2=nil,$writer=nil;if($iter)$ExternalLink__before_create$109.$$p=null;$send2(self,$find_super(self,'_before_create',$ExternalLink__before_create$109,false,true),'_before_create',[],null);if($truthy(($ret_or_2=self.options['$[]']("target")))){$ret_or_2}else{$writer=["target","_blank"];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};return(self.domtype="a");},$ExternalLink__before_create$109.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Button');var $nesting=[self].concat($parent_nesting),$Button__before_create$110,$Button__after_create$111;self.$$prototype.options=self.$$prototype.states=nil;Opal.def(self,'$_before_create',$Button__before_create$110=function $$_before_create(){var $iter=$Button__before_create$110.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Button__before_create$110.$$p=null;$send2(self,$find_super(self,'_before_create',$Button__before_create$110,false,true),'_before_create',[],null);self.domtype="button";if(self.options['$[]']("type")['$==']("button")){}else{$writer=["type","button"];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("button")['$=='](true)){return nil}else{$writer=["button",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Button__before_create$110.$$arity=0);return(Opal.def(self,'$_after_create',$Button__after_create$111=function $$_after_create(){var $$112,$iter=$Button__after_create$111.$$p,$yield=$iter||nil,self=this;if($iter)$Button__after_create$111.$$p=null;$send2(self,$find_super(self,'_after_create',$Button__after_create$111,false,true),'_after_create',[],null);return $send(self,'on',["click"],($$112=function(the_event){var self=$$112.$$s==null?this:$$112.$$s;if(the_event==null){the_event=nil;};return document.activeElement.blur();;},$$112.$$s=self,$$112.$$arity=1,$$112));},$Button__after_create$111.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Table');var $nesting=[self].concat($parent_nesting),$Table__before_create$113;return(Opal.def(self,'$_before_create',$Table__before_create$113=function $$_before_create(){var $iter=$Table__before_create$113.$$p,$yield=$iter||nil,self=this;if($iter)$Table__before_create$113.$$p=null;$send2(self,$find_super(self,'_before_create',$Table__before_create$113,false,true),'_before_create',[],null);return(self.domtype="table");},$Table__before_create$113.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TableHeader');var $nesting=[self].concat($parent_nesting),$TableHeader__before_create$114;return(Opal.def(self,'$_before_create',$TableHeader__before_create$114=function $$_before_create(){var $iter=$TableHeader__before_create$114.$$p,$yield=$iter||nil,self=this;if($iter)$TableHeader__before_create$114.$$p=null;$send2(self,$find_super(self,'_before_create',$TableHeader__before_create$114,false,true),'_before_create',[],null);return(self.domtype="th");},$TableHeader__before_create$114.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TableRow');var $nesting=[self].concat($parent_nesting),$TableRow__before_create$115;return(Opal.def(self,'$_before_create',$TableRow__before_create$115=function $$_before_create(){var $iter=$TableRow__before_create$115.$$p,$yield=$iter||nil,self=this;if($iter)$TableRow__before_create$115.$$p=null;$send2(self,$find_super(self,'_before_create',$TableRow__before_create$115,false,true),'_before_create',[],null);return(self.domtype="tr");},$TableRow__before_create$115.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TableCell');var $nesting=[self].concat($parent_nesting),$TableCell__before_create$116;return(Opal.def(self,'$_before_create',$TableCell__before_create$116=function $$_before_create(){var $iter=$TableCell__before_create$116.$$p,$yield=$iter||nil,self=this;if($iter)$TableCell__before_create$116.$$p=null;$send2(self,$find_super(self,'_before_create',$TableCell__before_create$116,false,true),'_before_create',[],null);return(self.domtype="td");},$TableCell__before_create$116.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BlockTable');var $nesting=[self].concat($parent_nesting),$BlockTable__before_create$117;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$BlockTable__before_create$117=function $$_before_create(){var $iter=$BlockTable__before_create$117.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$BlockTable__before_create$117.$$p=null;$send2(self,$find_super(self,'_before_create',$BlockTable__before_create$117,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("table")['$=='](true)){return nil}else{$writer=["table",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$BlockTable__before_create$117.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BlockTableHeader');var $nesting=[self].concat($parent_nesting),$BlockTableHeader__before_create$118;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$BlockTableHeader__before_create$118=function $$_before_create(){var $iter=$BlockTableHeader__before_create$118.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$BlockTableHeader__before_create$118.$$p=null;$send2(self,$find_super(self,'_before_create',$BlockTableHeader__before_create$118,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("th")['$=='](true)){return nil}else{$writer=["th",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$BlockTableHeader__before_create$118.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BlockTableRow');var $nesting=[self].concat($parent_nesting),$BlockTableRow__before_create$119;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$BlockTableRow__before_create$119=function $$_before_create(){var $iter=$BlockTableRow__before_create$119.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$BlockTableRow__before_create$119.$$p=null;$send2(self,$find_super(self,'_before_create',$BlockTableRow__before_create$119,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("tr")['$=='](true)){return nil}else{$writer=["tr",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$BlockTableRow__before_create$119.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BlockTableCell');var $nesting=[self].concat($parent_nesting),$BlockTableCell__before_create$120;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$BlockTableCell__before_create$120=function $$_before_create(){var $iter=$BlockTableCell__before_create$120.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$BlockTableCell__before_create$120.$$p=null;$send2(self,$find_super(self,'_before_create',$BlockTableCell__before_create$120,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("td")['$=='](true)){return nil}else{$writer=["td",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$BlockTableCell__before_create$120.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Span');var $nesting=[self].concat($parent_nesting),$Span__before_create$121;return(Opal.def(self,'$_before_create',$Span__before_create$121=function $$_before_create(){var $iter=$Span__before_create$121.$$p,$yield=$iter||nil,self=this;if($iter)$Span__before_create$121.$$p=null;$send2(self,$find_super(self,'_before_create',$Span__before_create$121,false,true),'_before_create',[],null);return(self.domtype="span");},$Span__before_create$121.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Select');var $nesting=[self].concat($parent_nesting),$Select__before_create$122;return(Opal.def(self,'$_before_create',$Select__before_create$122=function $$_before_create(){var $iter=$Select__before_create$122.$$p,$yield=$iter||nil,self=this;if($iter)$Select__before_create$122.$$p=null;$send2(self,$find_super(self,'_before_create',$Select__before_create$122,false,true),'_before_create',[],null);return(self.domtype="select");},$Select__before_create$122.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Option');var $nesting=[self].concat($parent_nesting),$Option__before_create$123;return(Opal.def(self,'$_before_create',$Option__before_create$123=function $$_before_create(){var $iter=$Option__before_create$123.$$p,$yield=$iter||nil,self=this;if($iter)$Option__before_create$123.$$p=null;$send2(self,$find_super(self,'_before_create',$Option__before_create$123,false,true),'_before_create',[],null);return(self.domtype="option");},$Option__before_create$123.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'FieldSet');var $nesting=[self].concat($parent_nesting),$FieldSet__before_create$124;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$FieldSet__before_create$124=function $$_before_create(){var $iter=$FieldSet__before_create$124.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$FieldSet__before_create$124.$$p=null;$send2(self,$find_super(self,'_before_create',$FieldSet__before_create$124,false,true),'_before_create',[],null);self.domtype="fieldset";if(self.states['$[]']("fieldset")['$=='](true)){return nil}else{$writer=["fieldset",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$FieldSet__before_create$124.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Legend');var $nesting=[self].concat($parent_nesting),$Legend__before_create$125;return(Opal.def(self,'$_before_create',$Legend__before_create$125=function $$_before_create(){var $iter=$Legend__before_create$125.$$p,$yield=$iter||nil,self=this;if($iter)$Legend__before_create$125.$$p=null;$send2(self,$find_super(self,'_before_create',$Legend__before_create$125,false,true),'_before_create',[],null);return(self.domtype="legend");},$Legend__before_create$125.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);Opal.const_set($nesting[0],'COMPONENT_CLASSES',$hash2(["org.gxg.gui.page","org.gxg.gui.abbreviation","org.gxg.gui.address","org.gxg.gui.area","org.gxg.gui.bold","org.gxg.gui.bdi","org.gxg.gui.bdo","org.gxg.gui.blockquote","org.gxg.gui.break","org.gxg.gui.caption","org.gxg.gui.cite","org.gxg.gui.code","org.gxg.gui.column","org.gxg.gui.column.group","org.gxg.gui.data","org.gxg.gui.data.list","org.gxg.gui.description","org.gxg.gui.deleted","org.gxg.gui.details","org.gxg.gui.dfn","org.gxg.gui.dialog","org.gxg.gui.division","org.gxg.gui.description.list","org.gxg.gui.description.item","org.gxg.gui.emphasis","org.gxg.gui.figure","org.gxg.gui.figure.caption","org.gxg.gui.theme.divider","org.gxg.gui.italic","org.gxg.gui.frame.inline","org.gxg.gui.insertion","org.gxg.gui.keyboard.key","org.gxg.gui.map","org.gxg.gui.mark","org.gxg.gui.meter","org.gxg.gui.noscript","org.gxg.gui.object","org.gxg.gui.option.group","org.gxg.gui.parameter","org.gxg.gui.picture","org.gxg.gui.preformatted","org.gxg.gui.progress","org.gxg.gui.quotation","org.gxg.gui.strike.through","org.gxg.gui.sample","org.gxg.gui.section","org.gxg.gui.small","org.gxg.gui.source","org.gxg.gui.strong","org.gxg.gui.style","org.gxg.gui.sub.script","org.gxg.gui.summary","org.gxg.gui.super.script","org.gxg.gui.svg","org.gxg.gui.template","org.gxg.gui.text.area","org.gxg.gui.time","org.gxg.gui.track","org.gxg.gui.misspelled","org.gxg.gui.variable","org.gxg.gui.word.break","org.gxg.gui.header","org.gxg.gui.navigator","org.gxg.gui.main","org.gxg.gui.article","org.gxg.gui.aside","org.gxg.gui.footer","org.gxg.gui.form","org.gxg.gui.input.button","org.gxg.gui.input.button.submit","org.gxg.gui.block","org.gxg.gui.button.checkbox","org.gxg.gui.image","org.gxg.gui.video","org.gxg.gui.audio","org.gxg.gui.canvas","org.gxg.gui.input.hidden","org.gxg.gui.input.file","org.gxg.gui.input.text","org.gxg.gui.input.password","org.gxg.gui.input.reset","org.gxg.gui.button.radio","org.gxg.gui.picker.color","org.gxg.gui.picker.date","org.gxg.gui.input.datetime.local","org.gxg.gui.input.email","org.gxg.gui.picker.month","org.gxg.gui.picker.number","org.gxg.gui.input.range","org.gxg.gui.input.search","org.gxg.gui.input.phone","org.gxg.gui.picker.time","org.gxg.gui.input.url","org.gxg.gui.picker.week","org.gxg.gui.label","org.gxg.gui.output","org.gxg.gui.paragraph","org.gxg.gui.header.one","org.gxg.gui.header.two","org.gxg.gui.header.three","org.gxg.gui.header.four","org.gxg.gui.header.five","org.gxg.gui.header.six","org.gxg.gui.list","org.gxg.gui.list.ordered","org.gxg.gui.list.item","org.gxg.gui.link.anchor","org.gxg.gui.link.external","org.gxg.gui.button","org.gxg.gui.table","org.gxg.gui.table.header","org.gxg.gui.table.row","org.gxg.gui.table.cell","org.gxg.gui.block.table","org.gxg.gui.block.table.header","org.gxg.gui.block.table.row","org.gxg.gui.block.table.cell","org.gxg.gui.span","org.gxg.gui.select","org.gxg.gui.option","org.gxg.gui.field.set","org.gxg.gui.legend"],{"org.gxg.gui.page":$$$($$$($$$('::','GxG'),'Gui'),'Page'),"org.gxg.gui.abbreviation":$$$($$$($$$('::','GxG'),'Gui'),'Abbreviation'),"org.gxg.gui.address":$$$($$$($$$('::','GxG'),'Gui'),'Address'),"org.gxg.gui.area":$$$($$$($$$('::','GxG'),'Gui'),'Area'),"org.gxg.gui.bold":$$$($$$($$$('::','GxG'),'Gui'),'Bold'),"org.gxg.gui.bdi":$$$($$$($$$('::','GxG'),'Gui'),'Bdi'),"org.gxg.gui.bdo":$$$($$$($$$('::','GxG'),'Gui'),'Bdo'),"org.gxg.gui.blockquote":$$$($$$($$$('::','GxG'),'Gui'),'BlockQuote'),"org.gxg.gui.break":$$$($$$($$$('::','GxG'),'Gui'),'Break'),"org.gxg.gui.caption":$$$($$$($$$('::','GxG'),'Gui'),'Caption'),"org.gxg.gui.cite":$$$($$$($$$('::','GxG'),'Gui'),'Cite'),"org.gxg.gui.code":$$$($$$($$$('::','GxG'),'Gui'),'Code'),"org.gxg.gui.column":$$$($$$($$$('::','GxG'),'Gui'),'Column'),"org.gxg.gui.column.group":$$$($$$($$$('::','GxG'),'Gui'),'ColumnGroup'),"org.gxg.gui.data":$$$($$$($$$('::','GxG'),'Gui'),'Data'),"org.gxg.gui.data.list":$$$($$$($$$('::','GxG'),'Gui'),'DataList'),"org.gxg.gui.description":$$$($$$($$$('::','GxG'),'Gui'),'Description'),"org.gxg.gui.deleted":$$$($$$($$$('::','GxG'),'Gui'),'Deleted'),"org.gxg.gui.details":$$$($$$($$$('::','GxG'),'Gui'),'Details'),"org.gxg.gui.dfn":$$$($$$($$$('::','GxG'),'Gui'),'Dfn'),"org.gxg.gui.dialog":$$$($$$($$$('::','GxG'),'Gui'),'Dialog'),"org.gxg.gui.division":$$$($$$($$$('::','GxG'),'Gui'),'Division'),"org.gxg.gui.description.list":$$$($$$($$$('::','GxG'),'Gui'),'DescriptionList'),"org.gxg.gui.description.item":$$$($$$($$$('::','GxG'),'Gui'),'DescriptionTerm'),"org.gxg.gui.emphasis":$$$($$$($$$('::','GxG'),'Gui'),'Emphasis'),"org.gxg.gui.figure":$$$($$$($$$('::','GxG'),'Gui'),'Figure'),"org.gxg.gui.figure.caption":$$$($$$($$$('::','GxG'),'Gui'),'FigureCaption'),"org.gxg.gui.theme.divider":$$$($$$($$$('::','GxG'),'Gui'),'ThemeDivider'),"org.gxg.gui.italic":$$$($$$($$$('::','GxG'),'Gui'),'Italic'),"org.gxg.gui.frame.inline":$$$($$$($$$('::','GxG'),'Gui'),'InlineFrame'),"org.gxg.gui.insertion":$$$($$$($$$('::','GxG'),'Gui'),'Insertion'),"org.gxg.gui.keyboard.key":$$$($$$($$$('::','GxG'),'Gui'),'KeyboardKey'),"org.gxg.gui.map":$$$($$$($$$('::','GxG'),'Gui'),'Map'),"org.gxg.gui.mark":$$$($$$($$$('::','GxG'),'Gui'),'Mark'),"org.gxg.gui.meter":$$$($$$($$$('::','GxG'),'Gui'),'Meter'),"org.gxg.gui.noscript":$$$($$$($$$('::','GxG'),'Gui'),'NoScript'),"org.gxg.gui.object":$$$($$$($$$('::','GxG'),'Gui'),'Object'),"org.gxg.gui.option.group":$$$($$$($$$('::','GxG'),'Gui'),'OptionGroup'),"org.gxg.gui.parameter":$$$($$$($$$('::','GxG'),'Gui'),'Parameter'),"org.gxg.gui.picture":$$$($$$($$$('::','GxG'),'Gui'),'Picture'),"org.gxg.gui.preformatted":$$$($$$($$$('::','GxG'),'Gui'),'Preformatted'),"org.gxg.gui.progress":$$$($$$($$$('::','GxG'),'Gui'),'Progress'),"org.gxg.gui.quotation":$$$($$$($$$('::','GxG'),'Gui'),'Quotation'),"org.gxg.gui.strike.through":$$$($$$($$$('::','GxG'),'Gui'),'StrikeThrough'),"org.gxg.gui.sample":$$$($$$($$$('::','GxG'),'Gui'),'Sample'),"org.gxg.gui.section":$$$($$$($$$('::','GxG'),'Gui'),'Section'),"org.gxg.gui.small":$$$($$$($$$('::','GxG'),'Gui'),'Small'),"org.gxg.gui.source":$$$($$$($$$('::','GxG'),'Gui'),'Source'),"org.gxg.gui.strong":$$$($$$($$$('::','GxG'),'Gui'),'Strong'),"org.gxg.gui.style":$$$($$$($$$('::','GxG'),'Gui'),'Style'),"org.gxg.gui.sub.script":$$$($$$($$$('::','GxG'),'Gui'),'SubScript'),"org.gxg.gui.summary":$$$($$$($$$('::','GxG'),'Gui'),'Summary'),"org.gxg.gui.super.script":$$$($$$($$$('::','GxG'),'Gui'),'SuperScript'),"org.gxg.gui.svg":$$$($$$($$$('::','GxG'),'Gui'),'Svg'),"org.gxg.gui.template":$$$($$$($$$('::','GxG'),'Gui'),'Template'),"org.gxg.gui.text.area":$$$($$$($$$('::','GxG'),'Gui'),'TextArea'),"org.gxg.gui.time":$$$($$$($$$('::','GxG'),'Gui'),'Time'),"org.gxg.gui.track":$$$($$$($$$('::','GxG'),'Gui'),'Track'),"org.gxg.gui.misspelled":$$$($$$($$$('::','GxG'),'Gui'),'Misspelled'),"org.gxg.gui.variable":$$$($$$($$$('::','GxG'),'Gui'),'Variable'),"org.gxg.gui.word.break":$$$($$$($$$('::','GxG'),'Gui'),'WordBreak'),"org.gxg.gui.header":$$$($$$($$$('::','GxG'),'Gui'),'Header'),"org.gxg.gui.navigator":$$$($$$($$$('::','GxG'),'Gui'),'Navigation'),"org.gxg.gui.main":$$$($$$($$$('::','GxG'),'Gui'),'Main'),"org.gxg.gui.article":$$$($$$($$$('::','GxG'),'Gui'),'Article'),"org.gxg.gui.aside":$$$($$$($$$('::','GxG'),'Gui'),'Aside'),"org.gxg.gui.footer":$$$($$$($$$('::','GxG'),'Gui'),'Footer'),"org.gxg.gui.form":$$$($$$($$$('::','GxG'),'Gui'),'Form'),"org.gxg.gui.input.button":$$$($$$($$$('::','GxG'),'Gui'),'ButtonInput'),"org.gxg.gui.input.button.submit":$$$($$$($$$('::','GxG'),'Gui'),'SubmitButton'),"org.gxg.gui.block":$$$($$$($$$('::','GxG'),'Gui'),'Block'),"org.gxg.gui.button.checkbox":$$$($$$($$$('::','GxG'),'Gui'),'CheckBox'),"org.gxg.gui.image":$$$($$$($$$('::','GxG'),'Gui'),'Image'),"org.gxg.gui.video":$$$($$$($$$('::','GxG'),'Gui'),'Video'),"org.gxg.gui.audio":$$$($$$($$$('::','GxG'),'Gui'),'Audio'),"org.gxg.gui.canvas":$$$($$$($$$('::','GxG'),'Gui'),'Canvas'),"org.gxg.gui.input.hidden":$$$($$$($$$('::','GxG'),'Gui'),'HiddenInput'),"org.gxg.gui.input.file":$$$($$$($$$('::','GxG'),'Gui'),'FileInput'),"org.gxg.gui.input.text":$$$($$$($$$('::','GxG'),'Gui'),'TextInput'),"org.gxg.gui.input.password":$$$($$$($$$('::','GxG'),'Gui'),'PasswordInput'),"org.gxg.gui.input.reset":$$$($$$($$$('::','GxG'),'Gui'),'ResetInput'),"org.gxg.gui.button.radio":$$$($$$($$$('::','GxG'),'Gui'),'RadioButton'),"org.gxg.gui.picker.color":$$$($$$($$$('::','GxG'),'Gui'),'ColorPicker'),"org.gxg.gui.picker.date":$$$($$$($$$('::','GxG'),'Gui'),'DatePicker'),"org.gxg.gui.input.datetime.local":$$$($$$($$$('::','GxG'),'Gui'),'DateTimeLocal'),"org.gxg.gui.input.email":$$$($$$($$$('::','GxG'),'Gui'),'EmailInput'),"org.gxg.gui.picker.month":$$$($$$($$$('::','GxG'),'Gui'),'MonthPicker'),"org.gxg.gui.picker.number":$$$($$$($$$('::','GxG'),'Gui'),'NumberInput'),"org.gxg.gui.input.range":$$$($$$($$$('::','GxG'),'Gui'),'RangeInput'),"org.gxg.gui.input.search":$$$($$$($$$('::','GxG'),'Gui'),'SearchInput'),"org.gxg.gui.input.phone":$$$($$$($$$('::','GxG'),'Gui'),'PhoneInput'),"org.gxg.gui.picker.time":$$$($$$($$$('::','GxG'),'Gui'),'TimePicker'),"org.gxg.gui.input.url":$$$($$$($$$('::','GxG'),'Gui'),'UrlInput'),"org.gxg.gui.picker.week":$$$($$$($$$('::','GxG'),'Gui'),'WeekPicker'),"org.gxg.gui.label":$$$($$$($$$('::','GxG'),'Gui'),'Label'),"org.gxg.gui.output":$$$($$$($$$('::','GxG'),'Gui'),'Output'),"org.gxg.gui.paragraph":$$$($$$($$$('::','GxG'),'Gui'),'Paragraph'),"org.gxg.gui.header.one":$$$($$$($$$('::','GxG'),'Gui'),'Header1'),"org.gxg.gui.header.two":$$$($$$($$$('::','GxG'),'Gui'),'Header2'),"org.gxg.gui.header.three":$$$($$$($$$('::','GxG'),'Gui'),'Header3'),"org.gxg.gui.header.four":$$$($$$($$$('::','GxG'),'Gui'),'Header4'),"org.gxg.gui.header.five":$$$($$$($$$('::','GxG'),'Gui'),'Header5'),"org.gxg.gui.header.six":$$$($$$($$$('::','GxG'),'Gui'),'Header6'),"org.gxg.gui.list":$$$($$$($$$('::','GxG'),'Gui'),'List'),"org.gxg.gui.list.ordered":$$$($$$($$$('::','GxG'),'Gui'),'OrderedList'),"org.gxg.gui.list.item":$$$($$$($$$('::','GxG'),'Gui'),'ListItem'),"org.gxg.gui.link.anchor":$$$($$$($$$('::','GxG'),'Gui'),'Anchor'),"org.gxg.gui.link.external":$$$($$$($$$('::','GxG'),'Gui'),'ExternalLink'),"org.gxg.gui.button":$$$($$$($$$('::','GxG'),'Gui'),'Button'),"org.gxg.gui.table":$$$($$$($$$('::','GxG'),'Gui'),'Table'),"org.gxg.gui.table.header":$$$($$$($$$('::','GxG'),'Gui'),'TableHeader'),"org.gxg.gui.table.row":$$$($$$($$$('::','GxG'),'Gui'),'TableRow'),"org.gxg.gui.table.cell":$$$($$$($$$('::','GxG'),'Gui'),'TableCell'),"org.gxg.gui.block.table":$$$($$$($$$('::','GxG'),'Gui'),'BlockTable'),"org.gxg.gui.block.table.header":$$$($$$($$$('::','GxG'),'Gui'),'BlockTableHeader'),"org.gxg.gui.block.table.row":$$$($$$($$$('::','GxG'),'Gui'),'BlockTableRow'),"org.gxg.gui.block.table.cell":$$$($$$($$$('::','GxG'),'Gui'),'BlockTableCell'),"org.gxg.gui.span":$$$($$$($$$('::','GxG'),'Gui'),'Span'),"org.gxg.gui.select":$$$($$$($$$('::','GxG'),'Gui'),'Select'),"org.gxg.gui.option":$$$($$$($$$('::','GxG'),'Gui'),'Option'),"org.gxg.gui.field.set":$$$($$$($$$('::','GxG'),'Gui'),'FieldSet'),"org.gxg.gui.legend":$$$($$$($$$('::','GxG'),'Gui'),'Legend')}));Opal.defs(self,'$component_class',$Gui_component_class$126=function $$component_class(the_type_specifier){var self=this,result=nil;if(the_type_specifier==null){the_type_specifier=nil;};result=nil;if($truthy(the_type_specifier)){result=$$$($$$($$($nesting,'GxG'),'Gui'),'COMPONENT_CLASSES')['$[]'](the_type_specifier.$to_s().$to_sym())};return result;},$Gui_component_class$126.$$arity=-1);Opal.defs(self,'$class_component',$Gui_class_component$127=function $$class_component(the_class_specifier){var self=this,result=nil,found_index=nil;if(the_class_specifier==null){the_class_specifier=nil;};result=nil;if($truthy(the_class_specifier)){found_index=$$$($$$($$($nesting,'GxG'),'Gui'),'COMPONENT_CLASSES').$values().$index(the_class_specifier);if($truthy(found_index)){result=$$$($$$($$($nesting,'GxG'),'Gui'),'COMPONENT_CLASSES').$keys()['$[]'](found_index)};};return result;},$Gui_class_component$127.$$arity=-1);Opal.defs(self,'$component_registered?',$Gui_component_registered$ques$128=function(the_specifier){var self=this;if(the_specifier==null){the_specifier=nil;};if($truthy($$$($$($nesting,'GxG'),'Gui').$component_class(the_specifier))){return true}else{return false};},$Gui_component_registered$ques$128.$$arity=-1);return(Opal.defs(self,'$register_component_class',$Gui_register_component_class$129=function $$register_component_class(the_specifier,the_constant){var self=this,$ret_or_3=nil,$writer=nil;if(the_specifier==null){the_specifier=nil;};if(the_constant==null){the_constant=nil;};if($truthy((function(){if($truthy(($ret_or_3=the_specifier['$is_any?']($$$('::','String'),$$$('::','Symbol'))))){return the_constant['$is_a?']($$$('::','Class'))}else{return $ret_or_3};return nil;})())){if($truthy($$$($$($nesting,'GxG'),'Gui')['$component_registered?'](the_specifier.$to_s().$to_sym()))){if($truthy($$$($$($nesting,'GxG'),'Gui').$component_class(the_specifier.$to_s().$to_sym())['$!='](the_constant))){$writer=[the_specifier.$to_s().$to_sym(),the_constant];$send($$$($$$($$($nesting,'GxG'),'Gui'),'COMPONENT_CLASSES'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}else{self.$log_warn(""+"Component Class "+(the_specifier.$to_s().$to_sym().$inspect())+" => "+(the_constant.$inspect())+" already defined.");return false;}}else{$writer=[the_specifier.$to_s().$to_sym(),the_constant];$send($$$($$$($$($nesting,'GxG'),'Gui'),'COMPONENT_CLASSES'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}}else{return false};},$Gui_register_component_class$129.$$arity=-1),nil)&&'register_component_class';})($nesting[0],$nesting)})($nesting[0],$nesting);(function($base,$parent_nesting){var self=$module($base,'GxG');var $nesting=[self].concat($parent_nesting);return(function($base,$parent_nesting){var self=$module($base,'Gui');var $nesting=[self].concat($parent_nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'GridContainer');var $nesting=[self].concat($parent_nesting),$GridContainer__before_create$130,$GridContainer__after_create$131;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$GridContainer__before_create$130=function $$_before_create(){var $iter=$GridContainer__before_create$130.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$GridContainer__before_create$130.$$p=null;$send2(self,$find_super(self,'_before_create',$GridContainer__before_create$130,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("grid-container")['$=='](true)){return nil}else{$writer=["grid-container",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$GridContainer__before_create$130.$$arity=0);return(Opal.def(self,'$_after_create',$GridContainer__after_create$131=function $$_after_create(){var $iter=$GridContainer__after_create$131.$$p,$yield=$iter||nil,self=this;if($iter)$GridContainer__after_create$131.$$p=null;$send2(self,$find_super(self,'_after_create',$GridContainer__after_create$131,false,true),'_after_create',[],null);return $(document).foundation();;},$GridContainer__after_create$131.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.grid.container",$$$($$$($$$('::','GxG'),'Gui'),'GridContainer'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'GridX');var $nesting=[self].concat($parent_nesting),$GridX__before_create$132,$GridX__after_create$133;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$GridX__before_create$132=function $$_before_create(){var $iter=$GridX__before_create$132.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$GridX__before_create$132.$$p=null;$send2(self,$find_super(self,'_before_create',$GridX__before_create$132,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("grid-x")['$=='](true)){return nil}else{$writer=["grid-x",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$GridX__before_create$132.$$arity=0);return(Opal.def(self,'$_after_create',$GridX__after_create$133=function $$_after_create(){var $iter=$GridX__after_create$133.$$p,$yield=$iter||nil,self=this;if($iter)$GridX__after_create$133.$$p=null;$send2(self,$find_super(self,'_after_create',$GridX__after_create$133,false,true),'_after_create',[],null);return $(document).foundation();;},$GridX__after_create$133.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.grid.x",$$$($$$($$$('::','GxG'),'Gui'),'GridX'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'GridY');var $nesting=[self].concat($parent_nesting),$GridY__before_create$134,$GridY__after_create$135;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$GridY__before_create$134=function $$_before_create(){var $iter=$GridY__before_create$134.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$GridY__before_create$134.$$p=null;$send2(self,$find_super(self,'_before_create',$GridY__before_create$134,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("grid-y")['$=='](true)){return nil}else{$writer=["grid-y",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$GridY__before_create$134.$$arity=0);return(Opal.def(self,'$_after_create',$GridY__after_create$135=function $$_after_create(){var $iter=$GridY__after_create$135.$$p,$yield=$iter||nil,self=this;if($iter)$GridY__after_create$135.$$p=null;$send2(self,$find_super(self,'_after_create',$GridY__after_create$135,false,true),'_after_create',[],null);return $(document).foundation();;},$GridY__after_create$135.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.grid.y",$$$($$$($$$('::','GxG'),'Gui'),'GridY'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Accordion');var $nesting=[self].concat($parent_nesting),$Accordion__before_create$136,$Accordion__after_create$137;self.$$prototype.states=self.$$prototype.options=nil;Opal.def(self,'$_before_create',$Accordion__before_create$136=function $$_before_create(){var $iter=$Accordion__before_create$136.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Accordion__before_create$136.$$p=null;$send2(self,$find_super(self,'_before_create',$Accordion__before_create$136,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("accordion")['$=='](true)){}else{$writer=["accordion",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-accordion"))){return nil}else{$writer=["data-accordion",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Accordion__before_create$136.$$arity=0);return(Opal.def(self,'$_after_create',$Accordion__after_create$137=function $$_after_create(){var $iter=$Accordion__after_create$137.$$p,$yield=$iter||nil,self=this;if($iter)$Accordion__after_create$137.$$p=null;$send2(self,$find_super(self,'_after_create',$Accordion__after_create$137,false,true),'_after_create',[],null);return $(document).foundation();;},$Accordion__after_create$137.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.accordion",$$$($$$($$$('::','GxG'),'Gui'),'Accordion'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'AccordionItem');var $nesting=[self].concat($parent_nesting),$AccordionItem__before_create$138,$AccordionItem__after_create$139;self.$$prototype.states=self.$$prototype.options=nil;Opal.def(self,'$_before_create',$AccordionItem__before_create$138=function $$_before_create(){var $iter=$AccordionItem__before_create$138.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$AccordionItem__before_create$138.$$p=null;$send2(self,$find_super(self,'_before_create',$AccordionItem__before_create$138,false,true),'_before_create',[],null);self.domtype="li";if(self.states['$[]']("accordion-item")['$=='](true)){}else{$writer=["accordion-item",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-accordion-item"))){return nil}else{$writer=["data-accordion-item",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$AccordionItem__before_create$138.$$arity=0);return(Opal.def(self,'$_after_create',$AccordionItem__after_create$139=function $$_after_create(){var $iter=$AccordionItem__after_create$139.$$p,$yield=$iter||nil,self=this;if($iter)$AccordionItem__after_create$139.$$p=null;$send2(self,$find_super(self,'_after_create',$AccordionItem__after_create$139,false,true),'_after_create',[],null);return $(document).foundation();;},$AccordionItem__after_create$139.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.accordion.item",$$$($$$($$$('::','GxG'),'Gui'),'AccordionItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'AccordionMenu');var $nesting=[self].concat($parent_nesting),$AccordionMenu__before_create$140,$AccordionMenu__after_create$141;self.$$prototype.states=self.$$prototype.options=nil;Opal.def(self,'$_before_create',$AccordionMenu__before_create$140=function $$_before_create(){var $iter=$AccordionMenu__before_create$140.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$AccordionMenu__before_create$140.$$p=null;$send2(self,$find_super(self,'_before_create',$AccordionMenu__before_create$140,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("vertical")['$=='](true)){}else{$writer=["vertical",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("menu")['$=='](true)){}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-accordion-menu"))){return nil}else{$writer=["data-accordion-menu",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$AccordionMenu__before_create$140.$$arity=0);return(Opal.def(self,'$_after_create',$AccordionMenu__after_create$141=function $$_after_create(){var $iter=$AccordionMenu__after_create$141.$$p,$yield=$iter||nil,self=this;if($iter)$AccordionMenu__after_create$141.$$p=null;$send2(self,$find_super(self,'_after_create',$AccordionMenu__after_create$141,false,true),'_after_create',[],null);return $(document).foundation();;},$AccordionMenu__after_create$141.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.accordion.menu",$$$($$$($$$('::','GxG'),'Gui'),'AccordionMenu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'AccordionSubMenu');var $nesting=[self].concat($parent_nesting),$AccordionSubMenu__before_create$142,$AccordionSubMenu__after_create$143;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$AccordionSubMenu__before_create$142=function $$_before_create(){var $iter=$AccordionSubMenu__before_create$142.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$AccordionSubMenu__before_create$142.$$p=null;$send2(self,$find_super(self,'_before_create',$AccordionSubMenu__before_create$142,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("vertical")['$=='](true)){}else{$writer=["vertical",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("menu")['$=='](true)){}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("nested")['$=='](true)){return nil}else{$writer=["nested",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$AccordionSubMenu__before_create$142.$$arity=0);return(Opal.def(self,'$_after_create',$AccordionSubMenu__after_create$143=function $$_after_create(){var $iter=$AccordionSubMenu__after_create$143.$$p,$yield=$iter||nil,self=this;if($iter)$AccordionSubMenu__after_create$143.$$p=null;$send2(self,$find_super(self,'_after_create',$AccordionSubMenu__after_create$143,false,true),'_after_create',[],null);return $(document).foundation();;},$AccordionSubMenu__after_create$143.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.accordion.submenu",$$$($$$($$$('::','GxG'),'Gui'),'AccordionSubMenu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'AccordionMenuItem');var $nesting=[self].concat($parent_nesting),$AccordionMenuItem__before_create$144;return(Opal.def(self,'$_before_create',$AccordionMenuItem__before_create$144=function $$_before_create(){var $iter=$AccordionMenuItem__before_create$144.$$p,$yield=$iter||nil,self=this;if($iter)$AccordionMenuItem__before_create$144.$$p=null;$send2(self,$find_super(self,'_before_create',$AccordionMenuItem__before_create$144,false,true),'_before_create',[],null);return(self.domtype="li");},$AccordionMenuItem__before_create$144.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.accordion.menu.item",$$$($$$($$$('::','GxG'),'Gui'),'AccordionMenuItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'AnchorButton');var $nesting=[self].concat($parent_nesting),$AnchorButton__before_create$145,$AnchorButton__after_create$146;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$AnchorButton__before_create$145=function $$_before_create(){var $iter=$AnchorButton__before_create$145.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$AnchorButton__before_create$145.$$p=null;$send2(self,$find_super(self,'_before_create',$AnchorButton__before_create$145,false,true),'_before_create',[],null);self.domtype="a";if(self.states['$[]']("button")['$=='](true)){return nil}else{$writer=["button",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$AnchorButton__before_create$145.$$arity=0);return(Opal.def(self,'$_after_create',$AnchorButton__after_create$146=function $$_after_create(){var $iter=$AnchorButton__after_create$146.$$p,$yield=$iter||nil,self=this;if($iter)$AnchorButton__after_create$146.$$p=null;$send2(self,$find_super(self,'_after_create',$AnchorButton__after_create$146,false,true),'_after_create',[],null);return $(document).foundation();;},$AnchorButton__after_create$146.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.anchor.button",$$$($$$($$$('::','GxG'),'Gui'),'AnchorButton'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Badge');var $nesting=[self].concat($parent_nesting),$Badge__before_create$147,$Badge__after_create$148;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$Badge__before_create$147=function $$_before_create(){var $iter=$Badge__before_create$147.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Badge__before_create$147.$$p=null;$send2(self,$find_super(self,'_before_create',$Badge__before_create$147,false,true),'_before_create',[],null);self.domtype="span";if(self.states['$[]']("badge")['$=='](true)){return nil}else{$writer=["badge",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Badge__before_create$147.$$arity=0);return(Opal.def(self,'$_after_create',$Badge__after_create$148=function $$_after_create(){var $iter=$Badge__after_create$148.$$p,$yield=$iter||nil,self=this;if($iter)$Badge__after_create$148.$$p=null;$send2(self,$find_super(self,'_after_create',$Badge__after_create$148,false,true),'_after_create',[],null);return $(document).foundation();;},$Badge__after_create$148.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.badge",$$$($$$($$$('::','GxG'),'Gui'),'Badge'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Breadcrumb');var $nesting=[self].concat($parent_nesting),$Breadcrumb__before_create$149,$Breadcrumb__after_create$150;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$Breadcrumb__before_create$149=function $$_before_create(){var $iter=$Breadcrumb__before_create$149.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Breadcrumb__before_create$149.$$p=null;$send2(self,$find_super(self,'_before_create',$Breadcrumb__before_create$149,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("breadcrumb")['$=='](true)){return nil}else{$writer=["breadcrumb",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Breadcrumb__before_create$149.$$arity=0);return(Opal.def(self,'$_after_create',$Breadcrumb__after_create$150=function $$_after_create(){var $iter=$Breadcrumb__after_create$150.$$p,$yield=$iter||nil,self=this;if($iter)$Breadcrumb__after_create$150.$$p=null;$send2(self,$find_super(self,'_after_create',$Breadcrumb__after_create$150,false,true),'_after_create',[],null);return $(document).foundation();;},$Breadcrumb__after_create$150.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.breadcrumb",$$$($$$($$$('::','GxG'),'Gui'),'Breadcrumb'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'BreadcrumbItem');var $nesting=[self].concat($parent_nesting),$BreadcrumbItem__before_create$151,$BreadcrumbItem__after_create$152;Opal.def(self,'$_before_create',$BreadcrumbItem__before_create$151=function $$_before_create(){var $iter=$BreadcrumbItem__before_create$151.$$p,$yield=$iter||nil,self=this;if($iter)$BreadcrumbItem__before_create$151.$$p=null;$send2(self,$find_super(self,'_before_create',$BreadcrumbItem__before_create$151,false,true),'_before_create',[],null);return(self.domtype="li");},$BreadcrumbItem__before_create$151.$$arity=0);return(Opal.def(self,'$_after_create',$BreadcrumbItem__after_create$152=function $$_after_create(){var $iter=$BreadcrumbItem__after_create$152.$$p,$yield=$iter||nil,self=this;if($iter)$BreadcrumbItem__after_create$152.$$p=null;$send2(self,$find_super(self,'_after_create',$BreadcrumbItem__after_create$152,false,true),'_after_create',[],null);return $(document).foundation();;},$BreadcrumbItem__after_create$152.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.breadcrumb.item",$$$($$$($$$('::','GxG'),'Gui'),'BreadcrumbItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ButtonGroup');var $nesting=[self].concat($parent_nesting),$ButtonGroup__before_create$153,$ButtonGroup__after_create$154;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$ButtonGroup__before_create$153=function $$_before_create(){var $iter=$ButtonGroup__before_create$153.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ButtonGroup__before_create$153.$$p=null;$send2(self,$find_super(self,'_before_create',$ButtonGroup__before_create$153,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("button-group")['$=='](true)){return nil}else{$writer=["button-group",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$ButtonGroup__before_create$153.$$arity=0);return(Opal.def(self,'$_after_create',$ButtonGroup__after_create$154=function $$_after_create(){var $iter=$ButtonGroup__after_create$154.$$p,$yield=$iter||nil,self=this;if($iter)$ButtonGroup__after_create$154.$$p=null;$send2(self,$find_super(self,'_after_create',$ButtonGroup__after_create$154,false,true),'_after_create',[],null);return $(document).foundation();;},$ButtonGroup__after_create$154.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.button.group",$$$($$$($$$('::','GxG'),'Gui'),'ButtonGroup'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Callout');var $nesting=[self].concat($parent_nesting),$Callout__before_create$155,$Callout__after_create$156;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$Callout__before_create$155=function $$_before_create(){var $iter=$Callout__before_create$155.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Callout__before_create$155.$$p=null;$send2(self,$find_super(self,'_before_create',$Callout__before_create$155,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("callout")['$=='](true)){return nil}else{$writer=["callout",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Callout__before_create$155.$$arity=0);return(Opal.def(self,'$_after_create',$Callout__after_create$156=function $$_after_create(){var $iter=$Callout__after_create$156.$$p,$yield=$iter||nil,self=this;if($iter)$Callout__after_create$156.$$p=null;$send2(self,$find_super(self,'_after_create',$Callout__after_create$156,false,true),'_after_create',[],null);return $(document).foundation();;},$Callout__after_create$156.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.callout",$$$($$$($$$('::','GxG'),'Gui'),'Callout'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ColoredLabel');var $nesting=[self].concat($parent_nesting),$ColoredLabel__before_create$157;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$ColoredLabel__before_create$157=function $$_before_create(){var $iter=$ColoredLabel__before_create$157.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ColoredLabel__before_create$157.$$p=null;$send2(self,$find_super(self,'_before_create',$ColoredLabel__before_create$157,false,true),'_before_create',[],null);self.domtype="span";if(self.states['$[]']("label")['$=='](true)){return nil}else{$writer=["label",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$ColoredLabel__before_create$157.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.label.colored",$$$($$$($$$('::','GxG'),'Gui'),'ColoredLabel'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DrilldownMenu');var $nesting=[self].concat($parent_nesting),$DrilldownMenu__before_create$158,$DrilldownMenu__after_create$159;self.$$prototype.states=self.$$prototype.options=nil;Opal.def(self,'$_before_create',$DrilldownMenu__before_create$158=function $$_before_create(){var $iter=$DrilldownMenu__before_create$158.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$DrilldownMenu__before_create$158.$$p=null;$send2(self,$find_super(self,'_before_create',$DrilldownMenu__before_create$158,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("vertical")['$=='](true)){}else{$writer=["vertical",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("menu")['$=='](true)){}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-drilldown"))){return nil}else{$writer=["data-drilldown",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$DrilldownMenu__before_create$158.$$arity=0);return(Opal.def(self,'$_after_create',$DrilldownMenu__after_create$159=function $$_after_create(){var $iter=$DrilldownMenu__after_create$159.$$p,$yield=$iter||nil,self=this;if($iter)$DrilldownMenu__after_create$159.$$p=null;$send2(self,$find_super(self,'_after_create',$DrilldownMenu__after_create$159,false,true),'_after_create',[],null);return $(document).foundation();;},$DrilldownMenu__after_create$159.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.drilldown.menu",$$$($$$($$$('::','GxG'),'Gui'),'DrilldownMenu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DrilldownSubMenu');var $nesting=[self].concat($parent_nesting),$DrilldownSubMenu__before_create$160,$DrilldownSubMenu__after_create$161;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$DrilldownSubMenu__before_create$160=function $$_before_create(){var $iter=$DrilldownSubMenu__before_create$160.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$DrilldownSubMenu__before_create$160.$$p=null;$send2(self,$find_super(self,'_before_create',$DrilldownSubMenu__before_create$160,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("vertical")['$=='](true)){}else{$writer=["vertical",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("menu")['$=='](true)){return nil}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$DrilldownSubMenu__before_create$160.$$arity=0);return(Opal.def(self,'$_after_create',$DrilldownSubMenu__after_create$161=function $$_after_create(){var $iter=$DrilldownSubMenu__after_create$161.$$p,$yield=$iter||nil,self=this;if($iter)$DrilldownSubMenu__after_create$161.$$p=null;$send2(self,$find_super(self,'_after_create',$DrilldownSubMenu__after_create$161,false,true),'_after_create',[],null);return $(document).foundation();;},$DrilldownSubMenu__after_create$161.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.drilldown.submenu",$$$($$$($$$('::','GxG'),'Gui'),'DrilldownSubMenu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DrilldownMenuItem');var $nesting=[self].concat($parent_nesting),$DrilldownMenuItem__before_create$162;return(Opal.def(self,'$_before_create',$DrilldownMenuItem__before_create$162=function $$_before_create(){var $iter=$DrilldownMenuItem__before_create$162.$$p,$yield=$iter||nil,self=this;if($iter)$DrilldownMenuItem__before_create$162.$$p=null;$send2(self,$find_super(self,'_before_create',$DrilldownMenuItem__before_create$162,false,true),'_before_create',[],null);return(self.domtype="li");},$DrilldownMenuItem__before_create$162.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.drilldown.menu.item",$$$($$$($$$('::','GxG'),'Gui'),'DrilldownMenuItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DropdownSubMenu');var $nesting=[self].concat($parent_nesting),$DropdownSubMenu__before_create$163,$DropdownSubMenu__after_create$164;self.$$prototype.states=nil;Opal.def(self,'$_before_create',$DropdownSubMenu__before_create$163=function $$_before_create(){var $iter=$DropdownSubMenu__before_create$163.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$DropdownSubMenu__before_create$163.$$p=null;$send2(self,$find_super(self,'_before_create',$DropdownSubMenu__before_create$163,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("menu")['$=='](true)){return nil}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$DropdownSubMenu__before_create$163.$$arity=0);return(Opal.def(self,'$_after_create',$DropdownSubMenu__after_create$164=function $$_after_create(){var $iter=$DropdownSubMenu__after_create$164.$$p,$yield=$iter||nil,self=this;if($iter)$DropdownSubMenu__after_create$164.$$p=null;$send2(self,$find_super(self,'_after_create',$DropdownSubMenu__after_create$164,false,true),'_after_create',[],null);return $(document).foundation();;},$DropdownSubMenu__after_create$164.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.dropdown.submenu",$$$($$$($$$('::','GxG'),'Gui'),'DropdownSubMenu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DropdownMenuItem');var $nesting=[self].concat($parent_nesting),$DropdownMenuItem__before_create$165,$DropdownMenuItem_initialize$166,$DropdownMenuItem_cascade$167,$DropdownMenuItem_label$168,$DropdownMenuItem_set_label_text$169,$DropdownMenuItem_enabled$ques$170,$DropdownMenuItem_enable$171,$DropdownMenuItem_disable$172,$DropdownMenuItem_set_data$173,$DropdownMenuItem_select$174;self.$$prototype.uuid=self.$$prototype.settings=self.$$prototype.application=self.$$prototype.label=self.$$prototype.parent=nil;Opal.def(self,'$_before_create',$DropdownMenuItem__before_create$165=function $$_before_create(){var $iter=$DropdownMenuItem__before_create$165.$$p,$yield=$iter||nil,self=this;if($iter)$DropdownMenuItem__before_create$165.$$p=null;$send2(self,$find_super(self,'_before_create',$DropdownMenuItem__before_create$165,false,true),'_before_create',[],null);return(self.domtype="li");},$DropdownMenuItem__before_create$165.$$arity=0);Opal.def(self,'$initialize',$DropdownMenuItem_initialize$166=function $$initialize(the_parent,options,other_data){var $iter=$DropdownMenuItem_initialize$166.$$p,$yield=$iter||nil,self=this;if($iter)$DropdownMenuItem_initialize$166.$$p=null;if(other_data==null){other_data=$hash2([],{});};self.label=nil;$send2(self,$find_super(self,'initialize',$DropdownMenuItem_initialize$166,false,true),'initialize',[the_parent,options,other_data],null);return self;},$DropdownMenuItem_initialize$166.$$arity=-3);Opal.def(self,'$cascade',$DropdownMenuItem_cascade$167=function $$cascade(){var self=this,label=nil,$writer=nil,$ret_or_4=nil,the_object=nil;label=self.$new_component("org.gxg.gui.link.anchor");$writer=[""+"label "+(self.uuid.$to_s())];$send(label,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["content"],{"content":(function(){if($truthy(($ret_or_4=self.settings['$[]']("label")))){return $ret_or_4}else{return "Untitled"};return nil;})().$to_s()})];$send(label,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" if @parent.enabled?\n"+" @parent.selecct()\n"+" end\n"+" end\n"+" "];$send(label,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.$page().$build_components(self,[label],$hash2(["application"],{"application":self.application}));the_object=self.$page().$find_object_by(""+"label "+(self.uuid.$to_s()));if($truthy(the_object)){return(self.label=the_object)}else{return nil};},$DropdownMenuItem_cascade$167.$$arity=0);Opal.def(self,'$label',$DropdownMenuItem_label$168=function $$label(){var self=this;return self.label},$DropdownMenuItem_label$168.$$arity=0);Opal.def(self,'$set_label_text',$DropdownMenuItem_set_label_text$169=function $$set_label_text(the_text){var self=this,$writer=nil;if(the_text==null){the_text=nil;};if($truthy(self.label)){self.label.$set_text(the_text.$to_s());$writer=["label",the_text.$to_s()];$send(self.settings,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;}else{return nil};},$DropdownMenuItem_set_label_text$169.$$arity=-1);Opal.def(self,'$enabled?',$DropdownMenuItem_enabled$ques$170=function(){var self=this;if($truthy(self.label)){if($truthy(self.label['$state_active?']("menu-item-disabled"))){return false}else{return true}}else{return false}},$DropdownMenuItem_enabled$ques$170.$$arity=0);Opal.def(self,'$enable',$DropdownMenuItem_enable$171=function $$enable(){var self=this;if($truthy(self.label)){return self.label.$set_state("menu-item-disabled",false)}else{return nil}},$DropdownMenuItem_enable$171.$$arity=0);Opal.def(self,'$disable',$DropdownMenuItem_disable$172=function $$disable(){var self=this;if($truthy(self.label)){return self.label.$set_state("menu-item-disabled",true)}else{return nil}},$DropdownMenuItem_disable$172.$$arity=0);Opal.def(self,'$set_data',$DropdownMenuItem_set_data$173=function $$set_data(data){var self=this,$writer=nil;if(data==null){data=nil;};$writer=["data",data];$send(self.settings,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];},$DropdownMenuItem_set_data$173.$$arity=-1);return(Opal.def(self,'$select',$DropdownMenuItem_select$174=function $$select(data){var self=this,application=nil;if(data==null){data=nil;};application=self.parent.$application();if($truthy(application)){return application.$menu_item_select(self.settings)}else{return nil};},$DropdownMenuItem_select$174.$$arity=-1),nil)&&'select';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.dropdown.menu.item",$$$($$$($$$('::','GxG'),'Gui'),'DropdownMenuItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Equalizer');var $nesting=[self].concat($parent_nesting),$Equalizer__before_create$175;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Equalizer__before_create$175=function $$_before_create(){var $iter=$Equalizer__before_create$175.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Equalizer__before_create$175.$$p=null;$send2(self,$find_super(self,'_before_create',$Equalizer__before_create$175,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("grid-x")['$=='](true)){}else{$writer=["grid-x",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("grid-margin-x")['$=='](true)){}else{$writer=["grid-margin-x",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-equalizer"))){}else{$writer=["data-equalizer",nil];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-equalize-on"))){return nil}else{$writer=["data-equalize-on","medium"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Equalizer__before_create$175.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.equalizer",$$$($$$($$$('::','GxG'),'Gui'),'Equalizer'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'FlexGridRow');var $nesting=[self].concat($parent_nesting),$FlexGridRow__before_create$176;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$FlexGridRow__before_create$176=function $$_before_create(){var $iter=$FlexGridRow__before_create$176.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$FlexGridRow__before_create$176.$$p=null;$send2(self,$find_super(self,'_before_create',$FlexGridRow__before_create$176,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("row")['$=='](true)){return nil}else{$writer=["row",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$FlexGridRow__before_create$176.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.flexgrid.row",$$$($$$($$$('::','GxG'),'Gui'),'FlexGridRow'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'FlexGridColumn');var $nesting=[self].concat($parent_nesting),$FlexGridColumn__before_create$177;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$FlexGridColumn__before_create$177=function $$_before_create(){var $iter=$FlexGridColumn__before_create$177.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$FlexGridColumn__before_create$177.$$p=null;$send2(self,$find_super(self,'_before_create',$FlexGridColumn__before_create$177,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("columns")['$=='](true)){return nil}else{$writer=["columns",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$FlexGridColumn__before_create$177.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.flexgrid.column",$$$($$$($$$('::','GxG'),'Gui'),'FlexGridColumn'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Embed');var $nesting=[self].concat($parent_nesting),$Embed__before_create$178;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$Embed__before_create$178=function $$_before_create(){var $iter=$Embed__before_create$178.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Embed__before_create$178.$$p=null;$send2(self,$find_super(self,'_before_create',$Embed__before_create$178,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("responsive-embed")['$=='](true)){return nil}else{$writer=["responsive-embed",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Embed__before_create$178.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.embed",$$$($$$($$$('::','GxG'),'Gui'),'Embed'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'MediaObject');var $nesting=[self].concat($parent_nesting),$MediaObject__before_create$179;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$MediaObject__before_create$179=function $$_before_create(){var $iter=$MediaObject__before_create$179.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$MediaObject__before_create$179.$$p=null;$send2(self,$find_super(self,'_before_create',$MediaObject__before_create$179,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("media-object")['$=='](true)){return nil}else{$writer=["media-object",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$MediaObject__before_create$179.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.media.object",$$$($$$($$$('::','GxG'),'Gui'),'MediaObject'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'MediaObjectSection');var $nesting=[self].concat($parent_nesting),$MediaObjectSection__before_create$180;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$MediaObjectSection__before_create$180=function $$_before_create(){var $iter=$MediaObjectSection__before_create$180.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$MediaObjectSection__before_create$180.$$p=null;$send2(self,$find_super(self,'_before_create',$MediaObjectSection__before_create$180,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("media-object-section")['$=='](true)){return nil}else{$writer=["media-object-section",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$MediaObjectSection__before_create$180.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.media.object.section",$$$($$$($$$('::','GxG'),'Gui'),'MediaObjectSection'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DropdownMenu');var $nesting=[self].concat($parent_nesting),$DropdownMenu__before_create$181,$DropdownMenu_add_menu_item$182;self.$$prototype.states=self.$$prototype.options=self.$$prototype.application=nil;Opal.def(self,'$_before_create',$DropdownMenu__before_create$181=function $$_before_create(){var $iter=$DropdownMenu__before_create$181.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$DropdownMenu__before_create$181.$$p=null;$send2(self,$find_super(self,'_before_create',$DropdownMenu__before_create$181,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("dropdown")['$=='](true)){}else{$writer=["dropdown",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("menu")['$=='](true)){}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-dropdown-menu"))){return nil}else{$writer=["data-dropdown-menu",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$DropdownMenu__before_create$181.$$arity=0);return(Opal.def(self,'$add_menu_item',$DropdownMenu_add_menu_item$182=function $$add_menu_item(label,data){var self=this,the_item=nil,$writer=nil;if(label==null){label=nil;};if(data==null){data=nil;};the_item=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.dropdown.menu.item"];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2(["label","data"],{"label":label,"data":data})];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2([],{})];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.$page().$build_components(self,[the_item],$hash2(["application"],{"application":self.application}));return true;},$DropdownMenu_add_menu_item$182.$$arity=-1),nil)&&'add_menu_item';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.dropdown.menu",$$$($$$($$$('::','GxG'),'Gui'),'DropdownMenu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'MenuBar');var $nesting=[self].concat($parent_nesting);return nil})($nesting[0],$$$($$$($$$('::','GxG'),'Gui'),'DropdownMenu'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.menu.bar",$$$($$$($$$('::','GxG'),'Gui'),'MenuBar'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Menu');var $nesting=[self].concat($parent_nesting),$Menu__before_create$183,$Menu_add_menu_item$184;self.$$prototype.states=self.$$prototype.application=nil;Opal.def(self,'$_before_create',$Menu__before_create$183=function $$_before_create(){var $iter=$Menu__before_create$183.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Menu__before_create$183.$$p=null;$send2(self,$find_super(self,'_before_create',$Menu__before_create$183,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("menu")['$=='](true)){return nil}else{$writer=["menu",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Menu__before_create$183.$$arity=0);return(Opal.def(self,'$add_menu_item',$Menu_add_menu_item$184=function $$add_menu_item(label,data){var self=this,the_item=nil,$writer=nil;if(label==null){label=nil;};if(data==null){data=nil;};the_item=self.$new_component("org.gxg.gui.menu.item");$writer=["settings",$hash2(["label","data"],{"label":label,"data":data})];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.$page().$build_components(self,[the_item],$hash2(["application"],{"application":self.application}));return true;},$Menu_add_menu_item$184.$$arity=-1),nil)&&'add_menu_item';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.menu",$$$($$$($$$('::','GxG'),'Gui'),'Menu'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'MenuItem');var $nesting=[self].concat($parent_nesting),$MenuItem__before_create$185,$MenuItem_initialize$186,$MenuItem_cascade$187,$MenuItem_label$188,$MenuItem_set_label_text$189,$MenuItem_enabled$ques$190,$MenuItem_enable$191,$MenuItem_disable$192,$MenuItem_set_data$193,$MenuItem_select$194;self.$$prototype.uuid=self.$$prototype.settings=self.$$prototype.application=self.$$prototype.label=self.$$prototype.parent=nil;Opal.def(self,'$_before_create',$MenuItem__before_create$185=function $$_before_create(){var $iter=$MenuItem__before_create$185.$$p,$yield=$iter||nil,self=this;if($iter)$MenuItem__before_create$185.$$p=null;$send2(self,$find_super(self,'_before_create',$MenuItem__before_create$185,false,true),'_before_create',[],null);return(self.domtype="li");},$MenuItem__before_create$185.$$arity=0);Opal.def(self,'$initialize',$MenuItem_initialize$186=function $$initialize(the_parent,options,other_data){var $iter=$MenuItem_initialize$186.$$p,$yield=$iter||nil,self=this;if($iter)$MenuItem_initialize$186.$$p=null;if(other_data==null){other_data=$hash2([],{});};self.label=nil;$send2(self,$find_super(self,'initialize',$MenuItem_initialize$186,false,true),'initialize',[the_parent,options,other_data],null);return self;},$MenuItem_initialize$186.$$arity=-3);Opal.def(self,'$cascade',$MenuItem_cascade$187=function $$cascade(){var self=this,label=nil,$writer=nil,$ret_or_5=nil,the_object=nil;label=self.$new_component("org.gxg.gui.link.anchor");$writer=[""+"label "+(self.uuid.$to_s())];$send(label,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["content"],{"content":(function(){if($truthy(($ret_or_5=self.settings['$[]']("label")))){return $ret_or_5}else{return "Untitled"};return nil;})().$to_s()})];$send(label,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" if @parent.enabled?\n"+" @parent.selecct()\n"+" end\n"+" end\n"+" "];$send(label,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.$page().$build_components(self,[label],$hash2(["application"],{"application":self.application}));the_object=self.$page().$find_object_by(""+"label "+(self.uuid.$to_s()));if($truthy(the_object)){return(self.label=the_object)}else{return nil};},$MenuItem_cascade$187.$$arity=0);Opal.def(self,'$label',$MenuItem_label$188=function $$label(){var self=this;return self.label},$MenuItem_label$188.$$arity=0);Opal.def(self,'$set_label_text',$MenuItem_set_label_text$189=function $$set_label_text(the_text){var self=this,$writer=nil;if(the_text==null){the_text=nil;};if($truthy(self.label)){self.label.$set_text(the_text.$to_s());$writer=["label",the_text.$to_s()];$send(self.settings,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;}else{return nil};},$MenuItem_set_label_text$189.$$arity=-1);Opal.def(self,'$enabled?',$MenuItem_enabled$ques$190=function(){var self=this;if($truthy(self.label)){if($truthy(self.label['$state_active?']("menu-item-disabled"))){return false}else{return true}}else{return false}},$MenuItem_enabled$ques$190.$$arity=0);Opal.def(self,'$enable',$MenuItem_enable$191=function $$enable(){var self=this;if($truthy(self.label)){return self.label.$set_state("menu-item-disabled",false)}else{return nil}},$MenuItem_enable$191.$$arity=0);Opal.def(self,'$disable',$MenuItem_disable$192=function $$disable(){var self=this;if($truthy(self.label)){return self.label.$set_state("menu-item-disabled",true)}else{return nil}},$MenuItem_disable$192.$$arity=0);Opal.def(self,'$set_data',$MenuItem_set_data$193=function $$set_data(data){var self=this,$writer=nil;if(data==null){data=nil;};$writer=["data",data];$send(self.settings,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];},$MenuItem_set_data$193.$$arity=-1);return(Opal.def(self,'$select',$MenuItem_select$194=function $$select(data){var self=this,application=nil;if(data==null){data=nil;};application=self.parent.$application();if($truthy(application)){return application.$menu_item_select(self.settings)}else{return nil};},$MenuItem_select$194.$$arity=-1),nil)&&'select';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.menu.item",$$$($$$($$$('::','GxG'),'Gui'),'MenuItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OffCanvasWrapper');var $nesting=[self].concat($parent_nesting),$OffCanvasWrapper__before_create$195;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$OffCanvasWrapper__before_create$195=function $$_before_create(){var $iter=$OffCanvasWrapper__before_create$195.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OffCanvasWrapper__before_create$195.$$p=null;$send2(self,$find_super(self,'_before_create',$OffCanvasWrapper__before_create$195,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("off-canvas-wrapper")['$=='](true)){return nil}else{$writer=["off-canvas-wrapper",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OffCanvasWrapper__before_create$195.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.offcanvas.wrapper",$$$($$$($$$('::','GxG'),'Gui'),'OffCanvasWrapper'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OffCanvasWrapperInner');var $nesting=[self].concat($parent_nesting),$OffCanvasWrapperInner__before_create$196;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$OffCanvasWrapperInner__before_create$196=function $$_before_create(){var $iter=$OffCanvasWrapperInner__before_create$196.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OffCanvasWrapperInner__before_create$196.$$p=null;$send2(self,$find_super(self,'_before_create',$OffCanvasWrapperInner__before_create$196,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("off-canvas-wrapper-inner")['$=='](true)){}else{$writer=["off-canvas-wrapper-inner",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-off-canvas-wrapper"))){return nil}else{$writer=["data-off-canvas-wrapper",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OffCanvasWrapperInner__before_create$196.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.offcanvas.wrapper.inner",$$$($$$($$$('::','GxG'),'Gui'),'OffCanvasWrapperInner'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OffCanvasLeft');var $nesting=[self].concat($parent_nesting),$OffCanvasLeft__before_create$197;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$OffCanvasLeft__before_create$197=function $$_before_create(){var $iter=$OffCanvasLeft__before_create$197.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OffCanvasLeft__before_create$197.$$p=null;$send2(self,$find_super(self,'_before_create',$OffCanvasLeft__before_create$197,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("off-canvas")['$=='](true)){}else{$writer=["off-canvas",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("position-left")['$=='](true)){}else{$writer=["position-left",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-off-canvas"))){return nil}else{$writer=["data-off-canvas",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OffCanvasLeft__before_create$197.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.offcanvas.left",$$$($$$($$$('::','GxG'),'Gui'),'OffCanvasLeft'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OffCanvasRight');var $nesting=[self].concat($parent_nesting),$OffCanvasRight__before_create$198;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$OffCanvasRight__before_create$198=function $$_before_create(){var $iter=$OffCanvasRight__before_create$198.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OffCanvasRight__before_create$198.$$p=null;$send2(self,$find_super(self,'_before_create',$OffCanvasRight__before_create$198,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("off-canvas")['$=='](true)){}else{$writer=["off-canvas",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("position-right")['$=='](true)){}else{$writer=["position-right",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-off-canvas"))){}else{$writer=["data-off-canvas",nil];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-position"))){return nil}else{$writer=["data-position","right"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OffCanvasRight__before_create$198.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.offcanvas.right",$$$($$$($$$('::','GxG'),'Gui'),'OffCanvasRight'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OffCanvasContent');var $nesting=[self].concat($parent_nesting),$OffCanvasContent__before_create$199;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$OffCanvasContent__before_create$199=function $$_before_create(){var $iter=$OffCanvasContent__before_create$199.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OffCanvasContent__before_create$199.$$p=null;$send2(self,$find_super(self,'_before_create',$OffCanvasContent__before_create$199,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("off-canvas-content")['$=='](true)){}else{$writer=["off-canvas-content",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-off-canvas-content"))){return nil}else{$writer=["data-off-canvas-content",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OffCanvasContent__before_create$199.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.offcanvas.content",$$$($$$($$$('::','GxG'),'Gui'),'OffCanvasContent'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Orbit');var $nesting=[self].concat($parent_nesting),$Orbit__before_create$200;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Orbit__before_create$200=function $$_before_create(){var $iter=$Orbit__before_create$200.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Orbit__before_create$200.$$p=null;$send2(self,$find_super(self,'_before_create',$Orbit__before_create$200,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("orbit")['$=='](true)){}else{$writer=["orbit",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("role"))){}else{$writer=["role","region"];$send(self.options,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-orbit"))){return nil}else{$writer=["data-orbit",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Orbit__before_create$200.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit",$$$($$$($$$('::','GxG'),'Gui'),'Orbit'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrbitContainer');var $nesting=[self].concat($parent_nesting),$OrbitContainer__before_create$201;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$OrbitContainer__before_create$201=function $$_before_create(){var $iter=$OrbitContainer__before_create$201.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OrbitContainer__before_create$201.$$p=null;$send2(self,$find_super(self,'_before_create',$OrbitContainer__before_create$201,false,true),'_before_create',[],null);self.domtype="ul";if(self.states['$[]']("orbit-container")['$=='](true)){return nil}else{$writer=["orbit-container",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OrbitContainer__before_create$201.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit.container",$$$($$$($$$('::','GxG'),'Gui'),'OrbitContainer'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrbitPrevious');var $nesting=[self].concat($parent_nesting),$OrbitPrevious__before_create$202;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$OrbitPrevious__before_create$202=function $$_before_create(){var $iter=$OrbitPrevious__before_create$202.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OrbitPrevious__before_create$202.$$p=null;$send2(self,$find_super(self,'_before_create',$OrbitPrevious__before_create$202,false,true),'_before_create',[],null);self.domtype="button";if(self.states['$[]']("orbit-previous")['$=='](true)){return nil}else{$writer=["orbit-previous",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OrbitPrevious__before_create$202.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit.previous",$$$($$$($$$('::','GxG'),'Gui'),'OrbitPrevious'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrbitNext');var $nesting=[self].concat($parent_nesting),$OrbitNext__before_create$203;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$OrbitNext__before_create$203=function $$_before_create(){var $iter=$OrbitNext__before_create$203.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OrbitNext__before_create$203.$$p=null;$send2(self,$find_super(self,'_before_create',$OrbitNext__before_create$203,false,true),'_before_create',[],null);self.domtype="button";if(self.states['$[]']("orbit-next")['$=='](true)){return nil}else{$writer=["orbit-next",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OrbitNext__before_create$203.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit.next",$$$($$$($$$('::','GxG'),'Gui'),'OrbitNext'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrbitSlide');var $nesting=[self].concat($parent_nesting),$OrbitSlide__before_create$204;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$OrbitSlide__before_create$204=function $$_before_create(){var $iter=$OrbitSlide__before_create$204.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OrbitSlide__before_create$204.$$p=null;$send2(self,$find_super(self,'_before_create',$OrbitSlide__before_create$204,false,true),'_before_create',[],null);self.domtype="li";if(self.states['$[]']("orbit-slide")['$=='](true)){return nil}else{$writer=["orbit-slide",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OrbitSlide__before_create$204.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit.slide",$$$($$$($$$('::','GxG'),'Gui'),'OrbitSlide'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrbitNavigator');var $nesting=[self].concat($parent_nesting),$OrbitNavigator__before_create$205;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$OrbitNavigator__before_create$205=function $$_before_create(){var $iter=$OrbitNavigator__before_create$205.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OrbitNavigator__before_create$205.$$p=null;$send2(self,$find_super(self,'_before_create',$OrbitNavigator__before_create$205,false,true),'_before_create',[],null);self.domtype="nav";if(self.states['$[]']("orbit-bullets")['$=='](true)){return nil}else{$writer=["orbit-bullets",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OrbitNavigator__before_create$205.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit.navigator",$$$($$$($$$('::','GxG'),'Gui'),'OrbitNavigator'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'OrbitBullet');var $nesting=[self].concat($parent_nesting),$OrbitBullet__before_create$206;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$OrbitBullet__before_create$206=function $$_before_create(){var $iter=$OrbitBullet__before_create$206.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$OrbitBullet__before_create$206.$$p=null;$send2(self,$find_super(self,'_before_create',$OrbitBullet__before_create$206,false,true),'_before_create',[],null);self.domtype="button";if($truthy(self.options.$keys()['$include?']("data-slide"))){return nil}else{$writer=["data-slide","0"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$OrbitBullet__before_create$206.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.orbit.bullet",$$$($$$($$$('::','GxG'),'Gui'),'OrbitBullet'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Pagination');var $nesting=[self].concat($parent_nesting),$Pagination__before_create$207;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Pagination__before_create$207=function $$_before_create(){var $iter=$Pagination__before_create$207.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Pagination__before_create$207.$$p=null;$send2(self,$find_super(self,'_before_create',$Pagination__before_create$207,false,true),'_before_create',[],null);self.domtype="ul";if($truthy(self.options.$keys()['$include?']("role"))){return nil}else{$writer=["role","navigation"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Pagination__before_create$207.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.pagination",$$$($$$($$$('::','GxG'),'Gui'),'Pagination'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'PaginationItem');var $nesting=[self].concat($parent_nesting),$PaginationItem__before_create$208;return(Opal.def(self,'$_before_create',$PaginationItem__before_create$208=function $$_before_create(){var $iter=$PaginationItem__before_create$208.$$p,$yield=$iter||nil,self=this;if($iter)$PaginationItem__before_create$208.$$p=null;$send2(self,$find_super(self,'_before_create',$PaginationItem__before_create$208,false,true),'_before_create',[],null);return(self.domtype="li");},$PaginationItem__before_create$208.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.pagination.item",$$$($$$($$$('::','GxG'),'Gui'),'PaginationItem'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ProgressBar');var $nesting=[self].concat($parent_nesting),$ProgressBar__before_create$209;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$ProgressBar__before_create$209=function $$_before_create(){var $iter=$ProgressBar__before_create$209.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ProgressBar__before_create$209.$$p=null;$send2(self,$find_super(self,'_before_create',$ProgressBar__before_create$209,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("progress")['$=='](true)){}else{$writer=["progress",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("role"))){return nil}else{$writer=["role","progressbar"];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$ProgressBar__before_create$209.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.progress.bar",$$$($$$($$$('::','GxG'),'Gui'),'ProgressBar'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ProgressMeter');var $nesting=[self].concat($parent_nesting),$ProgressMeter__before_create$210;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$ProgressMeter__before_create$210=function $$_before_create(){var $iter=$ProgressMeter__before_create$210.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$ProgressMeter__before_create$210.$$p=null;$send2(self,$find_super(self,'_before_create',$ProgressMeter__before_create$210,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("progress-meter")['$=='](true)){return nil}else{$writer=["progress-meter",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$ProgressMeter__before_create$210.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.progress.meter",$$$($$$($$$('::','GxG'),'Gui'),'ProgressMeter'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'HorizontalSlider');var $nesting=[self].concat($parent_nesting),$HorizontalSlider__before_create$211,$HorizontalSlider__after_create$212,$HorizontalSlider_set_script$213;self.$$prototype.states=self.$$prototype.options=self.$$prototype.data_second=self.$$prototype.data_start=self.$$prototype.data_end=self.$$prototype.uuid=nil;Opal.def(self,'$_before_create',$HorizontalSlider__before_create$211=function $$_before_create(){var $iter=$HorizontalSlider__before_create$211.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$HorizontalSlider__before_create$211.$$p=null;$send2(self,$find_super(self,'_before_create',$HorizontalSlider__before_create$211,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("slider")['$=='](true)){}else{$writer=["slider",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options['$[]']("data-initial-start"))){self.data_start=self.options.$delete("data-initial-start")}else{self.data_start="50"};if($truthy(self.options['$[]']("data-initial-end"))){self.data_second=self.options.$delete("data-initial-end")}else{self.data_second=nil};if($truthy(self.options['$[]']("data-end"))){return(self.data_end=self.options.$delete("data-end"))}else{return(self.data_end="200")};},$HorizontalSlider__before_create$211.$$arity=0);Opal.def(self,'$_after_create',$HorizontalSlider__after_create$212=function $$_after_create(){var $iter=$HorizontalSlider__after_create$212.$$p,$yield=$iter||nil,self=this,container_one=nil,slider=nil,handle=nil,handle_two=nil,container_two=nil,value_containter=nil,container_three=nil,value_containter_two=nil;if($iter)$HorizontalSlider__after_create$212.$$p=null;$send2(self,$find_super(self,'_after_create',$HorizontalSlider__after_create$212,false,true),'_after_create',[],null);if($truthy(self.data_second)){container_one=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider_container","settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-10 columns"]}),"script":"","content":[]}));slider=container_one.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider","settings":$hash2([],{}),"options":$hash2(["data-slider","data-initial-start","data-initial-end","data-end","states"],{"data-slider":nil,"data-initial-start":self.data_start,"data-initial-end":self.data_second,"data-end":self.data_end,"states":["slider"]}),"script":"","content":[]}));handle=slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_handle","settings":$hash2([],{}),"options":$hash2(["data-slider-handle","role","tabindex","states"],{"data-slider-handle":nil,"role":"slider","tabindex":"1","states":["slider-handle"]}),"script":"","content":[]}));slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_groove","settings":$hash2([],{}),"options":$hash2(["data-slider-fill","states"],{"data-slider-fill":nil,"states":["slider-fill"]}),"script":"","content":[]}));handle_two=slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_handle_two","settings":$hash2([],{}),"options":$hash2(["data-slider-handle","role","tabindex","states"],{"data-slider-handle":nil,"role":"slider","tabindex":"1","states":["slider-handle"]}),"script":"","content":[]}));container_two=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("value_container",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-2 columns"]}),"script":"","content":[]}));value_containter=container_two.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.picker.number","title":"slider_value","settings":$hash2([],{}),"options":$hash2([],{}),"script":"","content":[]}));container_three=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("value_container_two",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-2 columns"]}),"script":"","content":[]}));value_containter_two=container_three.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.picker.number","title":"slider_value_two","settings":$hash2([],{}),"options":$hash2([],{}),"script":"","content":[]}));handle.$set_attribute("aria-controls",value_containter.$uuid().$to_s());handle_two.$set_attribute("aria-controls",value_containter_two.$uuid().$to_s());}else{container_one=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider_container","settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-10 columns"]}),"script":"","content":[]}));slider=container_one.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider","settings":$hash2([],{}),"options":$hash2(["data-slider","data-initial-start","data-end","states"],{"data-slider":nil,"data-initial-start":self.data_start,"data-end":self.data_end,"states":["slider"]}),"script":"","content":[]}));handle=slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_handle","settings":$hash2([],{}),"options":$hash2(["data-slider-handle","role","tabindex","states"],{"data-slider-handle":nil,"role":"slider","tabindex":"1","states":["slider-handle"]}),"script":"","content":[]}));slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_groove","settings":$hash2([],{}),"options":$hash2(["data-slider-fill","states"],{"data-slider-fill":nil,"states":["slider-fill"]}),"script":"","content":[]}));container_two=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("value_container",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-2 columns"]}),"script":"","content":[]}));value_containter=container_two.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.picker.number","title":"slider_value","settings":$hash2([],{}),"options":$hash2([],{}),"script":"","content":[]}));handle.$set_attribute("aria-controls",value_containter.$uuid().$to_s());};return $(document).foundation();;},$HorizontalSlider__after_create$212.$$arity=0);return(Opal.def(self,'$set_script',$HorizontalSlider_set_script$213=function $$set_script(the_script_body,alternate_target){var $iter=$HorizontalSlider_set_script$213.$$p,$yield=$iter||nil,self=this,handle=nil,handle_two=nil;if($iter)$HorizontalSlider_set_script$213.$$p=null;if(the_script_body==null){the_script_body="";};if(alternate_target==null){alternate_target=nil;};if($truthy(alternate_target)){return alternate_target.$set_script(the_script_body)}else if($truthy(self.data_second)){handle=self.$find_descendant("slider_handle");if($truthy(handle)){}else{self.$raise("Unable to find slider handle object.")};$send2(self,$find_super(self,'set_script',$HorizontalSlider_set_script$213,false,true),'set_script',[the_script_body,handle],null);handle_two=self.$find_descendant("slider_handle_two");if($truthy(handle_two)){}else{self.$raise("Unable to find slider handle object.")};return $send2(self,$find_super(self,'set_script',$HorizontalSlider_set_script$213,false,true),'set_script',[the_script_body,handle_two],null);}else{handle=self.$find_descendant("slider_handle");if($truthy(handle)){}else{self.$raise("Unable to find slider handle object.")};return $send2(self,$find_super(self,'set_script',$HorizontalSlider_set_script$213,false,true),'set_script',[the_script_body,handle],null);};},$HorizontalSlider_set_script$213.$$arity=-1),nil)&&'set_script';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.slider.horizontal",$$$($$$($$$('::','GxG'),'Gui'),'HorizontalSlider'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'VerticalSlider');var $nesting=[self].concat($parent_nesting),$VerticalSlider__before_create$214,$VerticalSlider__after_create$215,$VerticalSlider_set_script$216;self.$$prototype.states=self.$$prototype.options=self.$$prototype.data_second=self.$$prototype.data_start=self.$$prototype.data_end=self.$$prototype.uuid=nil;Opal.def(self,'$_before_create',$VerticalSlider__before_create$214=function $$_before_create(){var $iter=$VerticalSlider__before_create$214.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$VerticalSlider__before_create$214.$$p=null;$send2(self,$find_super(self,'_before_create',$VerticalSlider__before_create$214,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("slider")['$=='](true)){}else{$writer=["slider",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.states['$[]']("vertical")['$=='](true)){}else{$writer=["vertical",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options['$[]']("data-initial-start"))){self.data_start=self.options.$delete("data-initial-start")}else{self.data_start="50"};if($truthy(self.options['$[]']("data-initial-end"))){self.data_second=self.options.$delete("data-initial-end")}else{self.data_second=nil};if($truthy(self.options['$[]']("data-end"))){return(self.data_end=self.options.$delete("data-end"))}else{return(self.data_end="200")};},$VerticalSlider__before_create$214.$$arity=0);Opal.def(self,'$_after_create',$VerticalSlider__after_create$215=function $$_after_create(){var $iter=$VerticalSlider__after_create$215.$$p,$yield=$iter||nil,self=this,container_one=nil,slider=nil,handle=nil,handle_two=nil,container_two=nil,value_containter=nil,container_three=nil,value_containter_two=nil;if($iter)$VerticalSlider__after_create$215.$$p=null;$send2(self,$find_super(self,'_after_create',$VerticalSlider__after_create$215,false,true),'_after_create',[],null);if($truthy(self.data_second)){container_one=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider_container","settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-10 columns"]}),"script":"","content":[]}));slider=container_one.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider","settings":$hash2([],{}),"options":$hash2(["data-slider","data-initial-start","data-initial-end","data-end","states"],{"data-slider":nil,"data-initial-start":self.data_start,"data-initial-end":self.data_second,"data-end":self.data_end,"states":["vertical","slider"]}),"script":"","content":[]}));handle=slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_handle","settings":$hash2([],{}),"options":$hash2(["data-slider-handle","role","tabindex","states"],{"data-slider-handle":nil,"role":"slider","tabindex":"1","states":["slider-handle"]}),"script":"","content":[]}));slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_groove","settings":$hash2([],{}),"options":$hash2(["data-slider-fill","states"],{"data-slider-fill":nil,"states":["slider-fill"]}),"script":"","content":[]}));handle_two=slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_handle_two","settings":$hash2([],{}),"options":$hash2(["data-slider-handle","role","tabindex","states"],{"data-slider-handle":nil,"role":"slider","tabindex":"1","states":["slider-handle"]}),"script":"","content":[]}));container_two=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("value_container",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-2 columns"]}),"script":"","content":[]}));value_containter=container_two.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.picker.number","title":"slider_value","settings":$hash2([],{}),"options":$hash2([],{}),"script":"","content":[]}));container_three=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("value_container_two",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-2 columns"]}),"script":"","content":[]}));value_containter_two=container_three.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.picker.number","title":"slider_value_two","settings":$hash2([],{}),"options":$hash2([],{}),"script":"","content":[]}));handle.$set_attribute("aria-controls",value_containter.$uuid().$to_s());handle_two.$set_attribute("aria-controls",value_containter_two.$uuid().$to_s());}else{container_one=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider_container","settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-10 columns"]}),"script":"","content":[]}));slider=container_one.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":"slider","settings":$hash2([],{}),"options":$hash2(["data-slider","data-initial-start","data-end","states"],{"data-slider":nil,"data-initial-start":self.data_start,"data-end":self.data_end,"states":["vertical","slider"]}),"script":"","content":[]}));handle=slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_handle","settings":$hash2([],{}),"options":$hash2(["data-slider-handle","role","tabindex","states"],{"data-slider-handle":nil,"role":"slider","tabindex":"1","states":["slider-handle"]}),"script":"","content":[]}));slider.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":"slider_groove","settings":$hash2([],{}),"options":$hash2(["data-slider-fill","states"],{"data-slider-fill":nil,"states":["slider-fill"]}),"script":"","content":[]}));container_two=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("value_container",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["small-2 columns"]}),"script":"","content":[]}));value_containter=container_two.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.picker.number","title":"slider_value","settings":$hash2([],{}),"options":$hash2([],{}),"script":"","content":[]}));handle.$set_attribute("aria-controls",value_containter.$uuid().$to_s());};return $(document).foundation();;},$VerticalSlider__after_create$215.$$arity=0);return(Opal.def(self,'$set_script',$VerticalSlider_set_script$216=function $$set_script(the_script_body,alternate_target){var $iter=$VerticalSlider_set_script$216.$$p,$yield=$iter||nil,self=this,handle=nil,handle_two=nil;if($iter)$VerticalSlider_set_script$216.$$p=null;if(the_script_body==null){the_script_body="";};if(alternate_target==null){alternate_target=nil;};if($truthy(alternate_target)){return alternate_target.$set_script(the_script_body)}else if($truthy(self.data_second)){handle=self.$find_descendant("slider_handle");if($truthy(handle)){}else{self.$raise("Unable to find slider handle object.")};$send2(self,$find_super(self,'set_script',$VerticalSlider_set_script$216,false,true),'set_script',[the_script_body,handle],null);handle_two=self.$find_descendant("slider_handle_two");if($truthy(handle_two)){}else{self.$raise("Unable to find slider handle object.")};return $send2(self,$find_super(self,'set_script',$VerticalSlider_set_script$216,false,true),'set_script',[the_script_body,handle_two],null);}else{handle=self.$find_descendant("slider_handle");if($truthy(handle)){}else{self.$raise("Unable to find slider handle object.")};return $send2(self,$find_super(self,'set_script',$VerticalSlider_set_script$216,false,true),'set_script',[the_script_body,handle],null);};},$VerticalSlider_set_script$216.$$arity=-1),nil)&&'set_script';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.slider.vertical",$$$($$$($$$('::','GxG'),'Gui'),'VerticalSlider'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'StickyContainer');var $nesting=[self].concat($parent_nesting),$StickyContainer__before_create$217;self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$StickyContainer__before_create$217=function $$_before_create(){var $iter=$StickyContainer__before_create$217.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$StickyContainer__before_create$217.$$p=null;$send2(self,$find_super(self,'_before_create',$StickyContainer__before_create$217,false,true),'_before_create',[],null);self.domtype="div";if($truthy(self.options.$keys()['$include?']("data-sticky-container"))){return nil}else{$writer=["data-sticky-container",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$StickyContainer__before_create$217.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.sticky.container",$$$($$$($$$('::','GxG'),'Gui'),'StickyContainer'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Sticky');var $nesting=[self].concat($parent_nesting),$Sticky__before_create$218;self.$$prototype.states=self.$$prototype.options=nil;return(Opal.def(self,'$_before_create',$Sticky__before_create$218=function $$_before_create(){var $iter=$Sticky__before_create$218.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Sticky__before_create$218.$$p=null;$send2(self,$find_super(self,'_before_create',$Sticky__before_create$218,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("sticky")['$=='](true)){}else{$writer=["sticky",true];$send(self.states,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(self.options.$keys()['$include?']("data-sticky"))){return nil}else{$writer=["data-sticky",nil];$send(self.options,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Sticky__before_create$218.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.sticky",$$$($$$($$$('::','GxG'),'Gui'),'Sticky'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Switch');var $nesting=[self].concat($parent_nesting),$Switch__before_create$219,$Switch__after_create$220;self.$$prototype.states=self.$$prototype.uuid=nil;Opal.def(self,'$_before_create',$Switch__before_create$219=function $$_before_create(){var $iter=$Switch__before_create$219.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Switch__before_create$219.$$p=null;$send2(self,$find_super(self,'_before_create',$Switch__before_create$219,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("switch")['$=='](true)){return nil}else{$writer=["switch",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Switch__before_create$219.$$arity=0);return(Opal.def(self,'$_after_create',$Switch__after_create$220=function $$_after_create(){var self=this,input_one=nil,label_one=nil,span_one=nil;input_one=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.button.checkbox","title":$rb_plus("switch_input",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["switch-input"]}),"script":"","content":[]}));label_one=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.label","title":$rb_plus("switch_paddle",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["for","states"],{"for":input_one.$uuid().$to_s(),"states":["switch-paddle"]}),"script":"","content":[]}));span_one=label_one.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.span","title":$rb_plus("switch_span",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["show-for-sr"]}),"script":"","content":[]}));return $(document).foundation();;},$Switch__after_create$220.$$arity=0),nil)&&'_after_create';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.switch",$$$($$$($$$('::','GxG'),'Gui'),'Switch'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TabContent');var $nesting=[self].concat($parent_nesting),$TabContent__before_create$221;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$TabContent__before_create$221=function $$_before_create(){var $iter=$TabContent__before_create$221.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TabContent__before_create$221.$$p=null;$send2(self,$find_super(self,'_before_create',$TabContent__before_create$221,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("tabs-panel")['$=='](true)){return nil}else{$writer=["tabs-panel",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$TabContent__before_create$221.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.tab.content",$$$($$$($$$('::','GxG'),'Gui'),'TabContent'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TabSet');var $nesting=[self].concat($parent_nesting),$TabSet__before_create$222,$TabSet__after_create$223,$TabSet_add_child$224;self.$$prototype.uuid=self.$$prototype.tabs=self.$$prototype.tab_content=nil;Opal.def(self,'$_before_create',$TabSet__before_create$222=function $$_before_create(){var $iter=$TabSet__before_create$222.$$p,$yield=$iter||nil,self=this;if($iter)$TabSet__before_create$222.$$p=null;$send2(self,$find_super(self,'_before_create',$TabSet__before_create$222,false,true),'_before_create',[],null);return(self.domtype="div");},$TabSet__before_create$222.$$arity=0);Opal.def(self,'$_after_create',$TabSet__after_create$223=function $$_after_create(){var self=this;self.tabs=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.list","title":$rb_plus("tabs",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["data-tabs","states"],{"data-tabs":nil,"states":["tabs"]}),"script":"","content":[]}));self.tab_content=self.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.block","title":$rb_plus("tab_content",self.uuid.$to_s()),"settings":$hash2([],{}),"options":$hash2(["data-tabs-content","states"],{"data-tabs-content":self.tabs.$uuid().$to_s(),"states":["tabs-content"]}),"script":"","content":[]}));return $(document).foundation();;},$TabSet__after_create$223.$$arity=0);return(Opal.def(self,'$add_child',$TabSet_add_child$224=function $$add_child(options,other_data){var self=this,new_child=nil,item=nil,link=nil,$writer=nil;if(options==null){options=$hash2([],{});};if(other_data==null){other_data=$hash2([],{});};new_child=nil;if(options['$[]']("component").$to_s().$downcase().$to_sym()['$==']("tab_content")){new_child=self.tab_content.$add_child(options);item=self.tabs.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.list.item","title":$rb_plus("tab",new_child.$uuid().$to_s()),"settings":$hash2([],{}),"options":$hash2(["states"],{"states":["tabs-title"]}),"script":"","content":[]}));link=item.$add_child($hash2(["component","title","settings","options","script","content"],{"component":"org.gxg.gui.link.anchor","title":$rb_plus("link",new_child.$uuid().$to_s()),"settings":$hash2([],{}),"options":$hash2(["href","states"],{"href":$rb_plus("#",new_child.$uuid().$to_s()),"states":[]}),"script":"","content":[]}));$writer=[new_child.$title().$to_s()];$send(link,'value=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;}else{self.$raise("Unacceptable Component Type")};return new_child;},$TabSet_add_child$224.$$arity=-1),nil)&&'add_child';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.tab.set",$$$($$$($$$('::','GxG'),'Gui'),'TabSet'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Thumbnail');var $nesting=[self].concat($parent_nesting),$Thumbnail__before_create$225;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$Thumbnail__before_create$225=function $$_before_create(){var $iter=$Thumbnail__before_create$225.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Thumbnail__before_create$225.$$p=null;$send2(self,$find_super(self,'_before_create',$Thumbnail__before_create$225,false,true),'_before_create',[],null);self.domtype="img";if(self.states['$[]']("thumbnail")['$=='](true)){return nil}else{$writer=["thumbnail",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Thumbnail__before_create$225.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.thumbnail",$$$($$$($$$('::','GxG'),'Gui'),'Thumbnail'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Titlebar');var $nesting=[self].concat($parent_nesting),$Titlebar__before_create$226;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$Titlebar__before_create$226=function $$_before_create(){var $iter=$Titlebar__before_create$226.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Titlebar__before_create$226.$$p=null;$send2(self,$find_super(self,'_before_create',$Titlebar__before_create$226,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("title-bar")['$=='](true)){return nil}else{$writer=["title-bar",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Titlebar__before_create$226.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.titlebar",$$$($$$($$$('::','GxG'),'Gui'),'Titlebar'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TitlebarLeft');var $nesting=[self].concat($parent_nesting),$TitlebarLeft__before_create$227;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$TitlebarLeft__before_create$227=function $$_before_create(){var $iter=$TitlebarLeft__before_create$227.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TitlebarLeft__before_create$227.$$p=null;$send2(self,$find_super(self,'_before_create',$TitlebarLeft__before_create$227,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("title-bar-left")['$=='](true)){return nil}else{$writer=["title-bar-left",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$TitlebarLeft__before_create$227.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.titlebar.left",$$$($$$($$$('::','GxG'),'Gui'),'TitlebarLeft'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TitlebarRight');var $nesting=[self].concat($parent_nesting),$TitlebarRight__before_create$228;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$TitlebarRight__before_create$228=function $$_before_create(){var $iter=$TitlebarRight__before_create$228.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TitlebarRight__before_create$228.$$p=null;$send2(self,$find_super(self,'_before_create',$TitlebarRight__before_create$228,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("title-bar-right")['$=='](true)){return nil}else{$writer=["title-bar-right",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$TitlebarRight__before_create$228.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.titlebar.right",$$$($$$($$$('::','GxG'),'Gui'),'TitlebarRight'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Topbar');var $nesting=[self].concat($parent_nesting),$Topbar__before_create$229;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$Topbar__before_create$229=function $$_before_create(){var $iter=$Topbar__before_create$229.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$Topbar__before_create$229.$$p=null;$send2(self,$find_super(self,'_before_create',$Topbar__before_create$229,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("top-bar")['$=='](true)){return nil}else{$writer=["top-bar",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$Topbar__before_create$229.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.topbar",$$$($$$($$$('::','GxG'),'Gui'),'Topbar'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TopbarLeft');var $nesting=[self].concat($parent_nesting),$TopbarLeft__before_create$230;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$TopbarLeft__before_create$230=function $$_before_create(){var $iter=$TopbarLeft__before_create$230.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TopbarLeft__before_create$230.$$p=null;$send2(self,$find_super(self,'_before_create',$TopbarLeft__before_create$230,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("top-bar-left")['$=='](true)){return nil}else{$writer=["top-bar-left",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$TopbarLeft__before_create$230.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.topbar.left",$$$($$$($$$('::','GxG'),'Gui'),'TopbarLeft'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TopbarRight');var $nesting=[self].concat($parent_nesting),$TopbarRight__before_create$231;self.$$prototype.states=nil;return(Opal.def(self,'$_before_create',$TopbarRight__before_create$231=function $$_before_create(){var $iter=$TopbarRight__before_create$231.$$p,$yield=$iter||nil,self=this,$writer=nil;if($iter)$TopbarRight__before_create$231.$$p=null;$send2(self,$find_super(self,'_before_create',$TopbarRight__before_create$231,false,true),'_before_create',[],null);self.domtype="div";if(self.states['$[]']("top-bar-right")['$=='](true)){return nil}else{$writer=["top-bar-right",true];$send(self.states,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];};},$TopbarRight__before_create$231.$$arity=0),nil)&&'_before_create'})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);return $$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.topbar.right",$$$($$$($$$('::','GxG'),'Gui'),'TopbarRight'));})($nesting[0],$nesting)})($nesting[0],$nesting);return(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Object');var $nesting=[self].concat($parent_nesting),$Object_new_component$232;self.$private();return(Opal.def(self,'$new_component',$Object_new_component$232=function $$new_component(the_format_moniker){var self=this,result=nil,$writer=nil;if(the_format_moniker==null){the_format_moniker=nil;};result=nil;if($truthy(the_format_moniker)){if($truthy($$$($$$('::','GxG'),'Gui')['$component_registered?'](the_format_moniker.$to_s().$to_sym()))){result=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component",the_format_moniker.$to_s()];$send(result,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(result,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2([],{})];$send(result,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(result,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(result,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;}else{self.$log_error(""+"Component "+(the_format_moniker.$inspect())+" not registered.")}}else{self.$log_error("You MUST specify a registered component moniker.")};return result;},$Object_new_component$232.$$arity=-1),nil)&&'new_component';})($nesting[0],null,$nesting);};Opal.modules["web/gxg_layout"]=function(Opal){function $rb_minus(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs-rhs:lhs['$-'](rhs);} function $rb_divide(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs/rhs:lhs['$/'](rhs);} function $rb_gt(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs>rhs:lhs['$>'](rhs);} function $rb_lt(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhsrhs:lhs['$>'](rhs);} -var self=Opal.top,$nesting=[],nil=Opal.nil,$$$=Opal.$$$,$$=Opal.$$,$module=Opal.module,$klass=Opal.klass,$alias=Opal.alias,$truthy=Opal.truthy,$hash2=Opal.hash2,$send=Opal.send,$send2=Opal.send2,$find_super=Opal.find_super;Opal.add_stubs(['$respond_to?','$unlink_viewport','$register_component_class','$layout_content_area','$[]','$*','$/','$to_f','$height','$width','$[]=','$-','$gxg_merge_style','$parent','$size','$+','$each_pair','$to_sym','$to_s','$===','$include?','$to_i','$gsub','$update_appearance','$is_any?','$delete','$element','$is_a?','$>=','$fit_within_boundaries','$commit_settings','$<=','$<','$>','$set_text','$set_frame','$layout_refresh','$==','$build_components','$page','$find_child','$log_warn','$inspect','$add_child','$original_add_child','$children','$valid_uuid?','$values','$original_children','$shift','$uuid','$title','$each','$<<','$new','$title=','$theme_widget','$find_object_by','$post_event','$dialog_close','$call','$set_attribute','$merge_style','$set_script','$menu_reference','$search_content','$set_menu','$window_register','$before_open','$open','$show','$after_open','$get_window_registration','$before_close','$close','$hide','$after_close','$application','$unlink_window','$set_application','$window_unregister','$destroy','$set_title','$get_window','$link_window','$set_data','$set_responder','$every_child','$dialog_open','$to_proc','$min','$collect','$max','$window_is_in_back?','$window_back_layer','$window_top_layer','$window_next_layer','$step','$get_window_switcher','$next_minimize_slot','$window_send_to_back','$animate','$top','$left','$right','$bottom','$unminimize_effect','$clear_special_state','$unmaximize_effect','$rolldown_effect','$window_restoreable?','$window_restore','$set_special_state','$minimize_effect','$maximize_effect','$window_bring_to_front','$rollup_effect','$keys','$to_h','$sort_by','$each_with_index','$window_repack_layers']);return(function($base,$parent_nesting){var self=$module($base,'GxG');var $nesting=[self].concat($parent_nesting);return(function($base,$parent_nesting){var self=$module($base,'Gui');var $nesting=[self].concat($parent_nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ApplicationViewport');var $nesting=[self].concat($parent_nesting),$ApplicationViewport_set_application$1,$ApplicationViewport_detach$2;self.$$prototype.application=self.$$prototype.uuid=nil;Opal.def(self,'$set_application',$ApplicationViewport_set_application$1=function $$set_application(the_application){var self=this;if(the_application==null){the_application=nil;};return(self.application=the_application);},$ApplicationViewport_set_application$1.$$arity=-1);$alias(self,"application=","set_application");return(Opal.def(self,'$detach',$ApplicationViewport_detach$2=function $$detach(){var self=this;if($truthy(self.application)){if($truthy(self.application['$respond_to?']("unlink_viewport"))){self.application.$unlink_viewport(self.uuid);return(self.application=nil);}else{return nil}}else{return nil}},$ApplicationViewport_detach$2.$$arity=0),nil)&&'detach';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.application.viewport",$$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Window');var $nesting=[self].concat($parent_nesting),$Window_before_close$3,$Window_close$4,$Window_after_close$5,$Window_before_open$6,$Window_open$7,$Window_after_open$8,$Window_set_application$9,$Window_application$10,$Window_commit_settings$11,$Window_track_deltas$14,$Window_untrack_deltas$15,$Window_content$16,$Window_content_width$17,$Window_content_height$18,$Window_set_top$19,$Window_top$20,$Window_set_left$21,$Window_left$22,$Window_set_right$23,$Window_right$24,$Window_set_bottom$25,$Window_bottom$26,$Window_set_width$27,$Window_width$28,$Window_set_height$29,$Window_height$30,$Window_set_position$31,$Window_set_frame$32,$Window_position$33,$Window_fit_within_boundaries$34,$Window_set_window_title$35,$Window_window_title$36,$Window_special_state$37,$Window_set_special_state$38,$Window_clear_special_state$39,$Window_initialize$40,$Window_menu_reference$41,$Window_menu$42,$Window_set_menu$43,$Window_add_child$44,$Window_children$45,$Window_find_child$46,$Window_cascade$48;self.$$prototype.application=self.$$prototype.top=self.$$prototype.left=self.$$prototype.title_object=self.$$prototype.window_title=self.$$prototype.content=self.$$prototype.title_margin=self.$$prototype.menu_margin=self.$$prototype.resize_margin=self.$$prototype.tracking=self.$$prototype.menu_bar=self.$$prototype.menu_area=self.$$prototype.bottom=self.$$prototype.right=self.$$prototype.special_state=self.$$prototype.modal=self.$$prototype.menu_reference=self.$$prototype.uuid=self.$$prototype.closebox=self.$$prototype.minimizebox=self.$$prototype.maximizebox=self.$$prototype.scrolling=self.$$prototype.resize=nil;Opal.def(self,'$before_close',$Window_before_close$3=function $$before_close(data){var self=this;if(data==null){data=nil;};return nil;},$Window_before_close$3.$$arity=-1);Opal.def(self,'$close',$Window_close$4=function $$close(data){var self=this;if(data==null){data=nil;};return nil;},$Window_close$4.$$arity=-1);Opal.def(self,'$after_close',$Window_after_close$5=function $$after_close(data){var self=this;if(data==null){data=nil;};return nil;},$Window_after_close$5.$$arity=-1);Opal.def(self,'$before_open',$Window_before_open$6=function $$before_open(data){var self=this;if(data==null){data=nil;};return nil;},$Window_before_open$6.$$arity=-1);Opal.def(self,'$open',$Window_open$7=function $$open(data){var self=this;if(data==null){data=nil;};return nil;},$Window_open$7.$$arity=-1);Opal.def(self,'$after_open',$Window_after_open$8=function $$after_open(data){var self=this;if(data==null){data=nil;};return nil;},$Window_after_open$8.$$arity=-1);Opal.def(self,'$set_application',$Window_set_application$9=function $$set_application(the_application){var self=this;return(self.application=the_application)},$Window_set_application$9.$$arity=1);$alias(self,"application=","set_application");Opal.def(self,'$application',$Window_application$10=function $$application(){var self=this;return self.application},$Window_application$10.$$arity=0);Opal.def(self,'$commit_settings',$Window_commit_settings$11=function $$commit_settings(){var $$12,self=this,bounds=nil,top_percent=nil,left_percent=nil,height_percent=nil,width_percent=nil,setting=nil,$writer=nil;bounds=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area();top_percent=$rb_times($rb_divide(self.top.$to_f(),bounds['$[]']("page_height").$to_f()),100.0);left_percent=$rb_times($rb_divide(self.left.$to_f(),bounds['$[]']("page_width").$to_f()),100.0);height_percent=$rb_times($rb_divide(self.$height().$to_f(),bounds['$[]']("page_height").$to_f()),100.0);width_percent=$rb_times($rb_divide(self.$width().$to_f(),bounds['$[]']("page_width").$to_f()),100.0);setting=$hash2([],{});$writer=["position","absolute"];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["display","block"];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["tabindex",-1];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["top",""+(top_percent)+"%"];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",""+(left_percent)+"%"];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",""+(height_percent)+"%"];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["width",""+(width_percent)+"%"];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.$gxg_merge_style(setting);if($truthy(self.title_object)){self.title_object.$parent().$gxg_merge_style($hash2(["padding"],{"padding":""+"0px 0px 0px "+($rb_minus($rb_minus($rb_divide(self.$width(),2),$rb_times($rb_divide(self.window_title.$size(),2),8)),60))+"px"}))};if($truthy(self.content)){self.content.$gxg_merge_style($hash2(["height","width"],{"height":""+($rb_minus(self.$height(),$rb_plus($rb_plus(self.title_margin,self.menu_margin),self.resize_margin)))+"px","width":""+($rb_minus(self.$width(),$rb_times(self.resize_margin,2)))+"px"}));$send(self.tracking,'each_pair',[],($$12=function(selector,record){var self=$$12.$$s==null?this:$$12.$$s,$$13,new_style=nil;if(selector==null){selector=nil;};if(record==null){record=nil;};new_style=$hash2([],{});$send(record['$[]']("details"),'each_pair',[],($$13=function(op,value){var self=$$13.$$s==null?this:$$13.$$s,$case=nil;if(self.resize_margin==null)self.resize_margin=nil;if(self.title_margin==null)self.title_margin=nil;if(self.menu_margin==null)self.menu_margin=nil;if(op==null){op=nil;};if(value==null){value=nil;};return(function(){$case=op.$to_s().$to_sym();if("width"['$===']($case)){if($truthy(value.$to_s()['$include?']("%"))){$writer=["width",$rb_plus($rb_times($rb_divide(value.$to_s().$gsub("%","").$to_f(),100.0),$rb_minus(self.$width(),$rb_times(self.resize_margin,2)).$to_f()).$to_i().$to_s(),"px")];$send(new_style,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{$writer=["width",""+(value.$to_s())+"px"];$send(new_style,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}} +var self=Opal.top,$nesting=[],nil=Opal.nil,$$$=Opal.$$$,$$=Opal.$$,$module=Opal.module,$klass=Opal.klass,$alias=Opal.alias,$truthy=Opal.truthy,$hash2=Opal.hash2,$send=Opal.send,$send2=Opal.send2,$find_super=Opal.find_super;Opal.add_stubs(['$respond_to?','$unlink_viewport','$register_component_class','$layout_content_area','$[]','$*','$/','$to_f','$height','$width','$[]=','$-','$gxg_merge_style','$parent','$size','$+','$each_pair','$to_sym','$to_s','$===','$include?','$to_i','$gsub','$update_appearance','$is_any?','$delete','$element','$is_a?','$>=','$fit_within_boundaries','$commit_settings','$<=','$<','$>','$set_text','$set_frame','$layout_refresh','$==','$add_child','$original_add_child','$children','$valid_uuid?','$values','$original_children','$shift','$uuid','$title','$each','$<<','$new','$title=','$theme_widget','$build_components','$page','$find_object_by','$post_event','$dialog_close','$call','$set_attribute','$merge_style','$set_script','$menu_reference','$search_content','$set_menu','$log_warn','$inspect','$window_register','$before_open','$open','$show','$after_open','$get_window_registration','$before_close','$close','$hide','$after_close','$application','$unlink_window','$set_application','$window_unregister','$destroy','$set_title','$get_window','$link_window','$set_data','$set_responder','$every_child','$dialog_open','$to_proc','$min','$collect','$max','$window_is_in_back?','$window_back_layer','$window_top_layer','$window_next_layer','$step','$get_window_switcher','$next_minimize_slot','$window_send_to_back','$animate','$top','$left','$right','$bottom','$find_child','$unminimize_effect','$clear_special_state','$unmaximize_effect','$rolldown_effect','$window_restoreable?','$window_restore','$set_special_state','$minimize_effect','$maximize_effect','$window_bring_to_front','$rollup_effect','$keys','$to_h','$sort_by','$each_with_index','$window_repack_layers']);return(function($base,$parent_nesting){var self=$module($base,'GxG');var $nesting=[self].concat($parent_nesting);return(function($base,$parent_nesting){var self=$module($base,'Gui');var $nesting=[self].concat($parent_nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ApplicationViewport');var $nesting=[self].concat($parent_nesting),$ApplicationViewport_set_application$1,$ApplicationViewport_detach$2;self.$$prototype.application=self.$$prototype.uuid=nil;Opal.def(self,'$set_application',$ApplicationViewport_set_application$1=function $$set_application(the_application){var self=this;if(the_application==null){the_application=nil;};return(self.application=the_application);},$ApplicationViewport_set_application$1.$$arity=-1);$alias(self,"application=","set_application");return(Opal.def(self,'$detach',$ApplicationViewport_detach$2=function $$detach(){var self=this;if($truthy(self.application)){if($truthy(self.application['$respond_to?']("unlink_viewport"))){self.application.$unlink_viewport(self.uuid);return(self.application=nil);}else{return nil}}else{return nil}},$ApplicationViewport_detach$2.$$arity=0),nil)&&'detach';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.application.viewport",$$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Window');var $nesting=[self].concat($parent_nesting),$Window_before_close$3,$Window_close$4,$Window_after_close$5,$Window_before_open$6,$Window_open$7,$Window_after_open$8,$Window_set_application$9,$Window_application$10,$Window_commit_settings$11,$Window_track_deltas$14,$Window_untrack_deltas$15,$Window_content$16,$Window_content_width$17,$Window_content_height$18,$Window_set_top$19,$Window_top$20,$Window_set_left$21,$Window_left$22,$Window_set_right$23,$Window_right$24,$Window_set_bottom$25,$Window_bottom$26,$Window_set_width$27,$Window_width$28,$Window_set_height$29,$Window_height$30,$Window_set_position$31,$Window_set_frame$32,$Window_position$33,$Window_fit_within_boundaries$34,$Window_set_window_title$35,$Window_window_title$36,$Window_special_state$37,$Window_set_special_state$38,$Window_clear_special_state$39,$Window_initialize$40,$Window_menu_reference$41,$Window_menubar$42,$Window_add_child$43,$Window_children$44,$Window_find_child$45,$Window_cascade$47;self.$$prototype.application=self.$$prototype.top=self.$$prototype.left=self.$$prototype.title_object=self.$$prototype.window_title=self.$$prototype.content=self.$$prototype.title_margin=self.$$prototype.menu_margin=self.$$prototype.resize_margin=self.$$prototype.tracking=self.$$prototype.menu_bar=self.$$prototype.menu_area=self.$$prototype.bottom=self.$$prototype.right=self.$$prototype.special_state=self.$$prototype.modal=self.$$prototype.menu_reference=self.$$prototype.uuid=self.$$prototype.closebox=self.$$prototype.minimizebox=self.$$prototype.maximizebox=self.$$prototype.scrolling=self.$$prototype.resize=nil;Opal.def(self,'$before_close',$Window_before_close$3=function $$before_close(data){var self=this;if(data==null){data=nil;};return nil;},$Window_before_close$3.$$arity=-1);Opal.def(self,'$close',$Window_close$4=function $$close(data){var self=this;if(data==null){data=nil;};return nil;},$Window_close$4.$$arity=-1);Opal.def(self,'$after_close',$Window_after_close$5=function $$after_close(data){var self=this;if(data==null){data=nil;};return nil;},$Window_after_close$5.$$arity=-1);Opal.def(self,'$before_open',$Window_before_open$6=function $$before_open(data){var self=this;if(data==null){data=nil;};return nil;},$Window_before_open$6.$$arity=-1);Opal.def(self,'$open',$Window_open$7=function $$open(data){var self=this;if(data==null){data=nil;};return nil;},$Window_open$7.$$arity=-1);Opal.def(self,'$after_open',$Window_after_open$8=function $$after_open(data){var self=this;if(data==null){data=nil;};return nil;},$Window_after_open$8.$$arity=-1);Opal.def(self,'$set_application',$Window_set_application$9=function $$set_application(the_application){var self=this;return(self.application=the_application)},$Window_set_application$9.$$arity=1);$alias(self,"application=","set_application");Opal.def(self,'$application',$Window_application$10=function $$application(){var self=this;return self.application},$Window_application$10.$$arity=0);Opal.def(self,'$commit_settings',$Window_commit_settings$11=function $$commit_settings(){var $$12,self=this,bounds=nil,top_percent=nil,left_percent=nil,height_percent=nil,width_percent=nil,setting=nil,$writer=nil;bounds=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area();top_percent=$rb_times($rb_divide(self.top.$to_f(),bounds['$[]']("page_height").$to_f()),100.0);left_percent=$rb_times($rb_divide(self.left.$to_f(),bounds['$[]']("page_width").$to_f()),100.0);height_percent=$rb_times($rb_divide(self.$height().$to_f(),bounds['$[]']("page_height").$to_f()),100.0);width_percent=$rb_times($rb_divide(self.$width().$to_f(),bounds['$[]']("page_width").$to_f()),100.0);setting=$hash2([],{});$writer=["position","absolute"];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["display","block"];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["tabindex",-1];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["top",""+(top_percent)+"%"];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",""+(left_percent)+"%"];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",""+(height_percent)+"%"];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["width",""+(width_percent)+"%"];$send(setting,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.$gxg_merge_style(setting);if($truthy(self.title_object)){self.title_object.$parent().$gxg_merge_style($hash2(["padding"],{"padding":""+"0px 0px 0px "+($rb_minus($rb_minus($rb_divide(self.$width(),2),$rb_times($rb_divide(self.window_title.$size(),2),8)),60))+"px"}))};if($truthy(self.content)){self.content.$gxg_merge_style($hash2(["height","width"],{"height":""+($rb_minus(self.$height(),$rb_plus($rb_plus(self.title_margin,self.menu_margin),self.resize_margin)))+"px","width":""+($rb_minus(self.$width(),$rb_times(self.resize_margin,2)))+"px"}));$send(self.tracking,'each_pair',[],($$12=function(selector,record){var self=$$12.$$s==null?this:$$12.$$s,$$13,new_style=nil;if(selector==null){selector=nil;};if(record==null){record=nil;};new_style=$hash2([],{});$send(record['$[]']("details"),'each_pair',[],($$13=function(op,value){var self=$$13.$$s==null?this:$$13.$$s,$case=nil;if(self.resize_margin==null)self.resize_margin=nil;if(self.title_margin==null)self.title_margin=nil;if(self.menu_margin==null)self.menu_margin=nil;if(op==null){op=nil;};if(value==null){value=nil;};return(function(){$case=op.$to_s().$to_sym();if("width"['$===']($case)){if($truthy(value.$to_s()['$include?']("%"))){$writer=["width",$rb_plus($rb_times($rb_divide(value.$to_s().$gsub("%","").$to_f(),100.0),$rb_minus(self.$width(),$rb_times(self.resize_margin,2)).$to_f()).$to_i().$to_s(),"px")];$send(new_style,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{$writer=["width",""+(value.$to_s())+"px"];$send(new_style,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}} else if("height"['$===']($case)){if($truthy(value.$to_s()['$include?']("%"))){$writer=["height",$rb_plus($rb_times($rb_divide(value.$to_s().$gsub("%","").$to_f(),100.0),$rb_minus(self.$height(),$rb_plus($rb_plus(self.title_margin,self.menu_margin),self.resize_margin)).$to_f()).$to_i().$to_s(),"px")];$send(new_style,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{$writer=["height",""+(value.$to_s())+"px"];$send(new_style,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}} -else{return nil}})();},$$13.$$s=self,$$13.$$arity=2,$$13));return record['$[]']("object").$gxg_merge_style(new_style);},$$12.$$s=self,$$12.$$arity=2,$$12));};if($truthy(self.menu_bar)){self.menu_area.$gxg_merge_style($hash2(["width"],{"width":""+($rb_minus(self.$width(),$rb_times(self.resize_margin,2)))+"px"}));if($truthy(self.menu_bar['$respond_to?']("update_appearance"))){return self.menu_bar.$update_appearance()}else{return nil};}else{return nil};},$Window_commit_settings$11.$$arity=0);Opal.def(self,'$track_deltas',$Window_track_deltas$14=function $$track_deltas(the_reference,the_object,details){var self=this,$ret_or_1=nil,$ret_or_2=nil,$writer=nil;if(the_reference==null){the_reference=nil;};if(the_object==null){the_object=nil;};if(details==null){details=$hash2([],{});};if($truthy((function(){if($truthy(($ret_or_1=(function(){if($truthy(($ret_or_2=the_reference))){return the_object}else{return $ret_or_2};return nil;})()))){return details['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash'))}else{return $ret_or_1};return nil;})())){$writer=[the_reference,$hash2(["object","details"],{"object":the_object,"details":details})];$send(self.tracking,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}else{return false};},$Window_track_deltas$14.$$arity=-1);Opal.def(self,'$untrack_deltas',$Window_untrack_deltas$15=function $$untrack_deltas(the_reference){var self=this;if(the_reference==null){the_reference=nil;};if($truthy(the_reference)){self.tracking.$delete(the_reference);return true;}else{return false};},$Window_untrack_deltas$15.$$arity=-1);Opal.def(self,'$content',$Window_content$16=function $$content(){var self=this;return self.content},$Window_content$16.$$arity=0);Opal.def(self,'$content_width',$Window_content_width$17=function $$content_width(){var self=this;if($truthy(self.content)){return(self.content.$element().getBoundingClientRect().right-self.content.$element().getBoundingClientRect().left).$to_i()}else{return 0}},$Window_content_width$17.$$arity=0);Opal.def(self,'$content_height',$Window_content_height$18=function $$content_height(){var self=this;if($truthy(self.content)){return(self.content.$element().getBoundingClientRect().bottom-self.content.$element().getBoundingClientRect().top).$to_i()}else{return 0}},$Window_content_height$18.$$arity=0);Opal.def(self,'$set_top',$Window_set_top$19=function $$set_top(the_top){var self=this;if(the_top==null){the_top=nil;};if($truthy(the_top['$is_a?']($$$('::','Numeric')))){if($truthy($rb_ge($rb_minus(self.bottom,the_top),100))){if($truthy($rb_ge(the_top,$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area()['$[]']("top")))){self.top=the_top;self.$fit_within_boundaries();return self.$commit_settings();}else{return nil}}else{return nil}}else{return nil};},$Window_set_top$19.$$arity=-1);$alias(self,"top=","set_top");Opal.def(self,'$top',$Window_top$20=function $$top(){var self=this;return self.top},$Window_top$20.$$arity=0);Opal.def(self,'$set_left',$Window_set_left$21=function $$set_left(the_left){var self=this;if(the_left==null){the_left=nil;};if($truthy(the_left['$is_a?']($$$('::','Numeric')))){if($truthy($rb_ge($rb_minus(self.right,the_left),200))){if($truthy($rb_ge(the_left,$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area()['$[]']("left")))){self.left=the_left;self.$fit_within_boundaries();return self.$commit_settings();}else{return nil}}else{return nil}}else{return nil};},$Window_set_left$21.$$arity=-1);$alias(self,"left=","set_left");Opal.def(self,'$left',$Window_left$22=function $$left(){var self=this;return self.left},$Window_left$22.$$arity=0);Opal.def(self,'$set_right',$Window_set_right$23=function $$set_right(the_right){var self=this;if(the_right==null){the_right=nil;};if($truthy(the_right['$is_a?']($$$('::','Numeric')))){if($truthy($rb_ge($rb_minus(the_right,self.left),200))){if($truthy($rb_le(the_right,$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area()['$[]']("right")))){self.right=the_right;self.$fit_within_boundaries();return self.$commit_settings();}else{return nil}}else{return nil}}else{return nil};},$Window_set_right$23.$$arity=-1);$alias(self,"right=","set_right");Opal.def(self,'$right',$Window_right$24=function $$right(){var self=this;return self.right},$Window_right$24.$$arity=0);Opal.def(self,'$set_bottom',$Window_set_bottom$25=function $$set_bottom(the_bottom){var self=this;if(the_bottom==null){the_bottom=nil;};if($truthy(the_bottom['$is_a?']($$$('::','Numeric')))){if($truthy($rb_ge($rb_minus(the_bottom,self.top),100))){if($truthy($rb_le(the_bottom,$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area()['$[]']("bottom")))){self.bottom=the_bottom;self.$fit_within_boundaries();return self.$commit_settings();}else{return nil}}else{return nil}}else{return nil};},$Window_set_bottom$25.$$arity=-1);$alias(self,"bottom=","set_bottom");Opal.def(self,'$bottom',$Window_bottom$26=function $$bottom(){var self=this;return self.bottom},$Window_bottom$26.$$arity=0);Opal.def(self,'$set_width',$Window_set_width$27=function $$set_width(the_width){var self=this;if(the_width==null){the_width=nil;};if($truthy(the_width['$is_a?']($$$('::','Numeric')))){if($truthy($rb_ge(the_width,200))){if($truthy($rb_le($rb_plus(self.left,the_width),$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area()['$[]']("right")))){self.right=$rb_plus(self.left,the_width);self.$fit_within_boundaries();return self.$commit_settings();}else{return nil}}else{return nil}}else{return nil};},$Window_set_width$27.$$arity=-1);$alias(self,"width=","set_width");Opal.def(self,'$width',$Window_width$28=function $$width(){var self=this;return $rb_minus(self.right,self.left)},$Window_width$28.$$arity=0);Opal.def(self,'$set_height',$Window_set_height$29=function $$set_height(the_height){var self=this;if(the_height==null){the_height=nil;};if($truthy(the_height['$is_a?']($$$('::','Numeric')))){if($truthy($rb_ge(the_height,100))){if($truthy($rb_le($rb_plus(self.top,the_height),$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area()['$[]']("bottom")))){self.bottom=$rb_plus(self.top,the_height);self.$fit_within_boundaries();return self.$commit_settings();}else{return nil}}else{return nil}}else{return nil};},$Window_set_height$29.$$arity=-1);$alias(self,"height=","set_height");Opal.def(self,'$height',$Window_height$30=function $$height(){var self=this;return $rb_minus(self.bottom,self.top)},$Window_height$30.$$arity=0);Opal.def(self,'$set_position',$Window_set_position$31=function $$set_position(the_x,the_y){var self=this,the_width=nil,the_height=nil,bounds=nil,$ret_or_3=nil,$ret_or_4=nil;if(the_x==null){the_x=nil;};if(the_y==null){the_y=nil;};the_width=self.$width();the_height=self.$height();bounds=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area();if($truthy((function(){if($truthy(($ret_or_3=Opal.Range.$new(bounds['$[]']("top"),bounds['$[]']("bottom"),false)['$include?'](the_y.$to_i())))){return Opal.Range.$new(bounds['$[]']("top"),bounds['$[]']("bottom"),false)['$include?']($rb_plus(the_y.$to_i(),the_height))}else{return $ret_or_3};return nil;})())){self.top=the_y.$to_i()};if($truthy((function(){if($truthy(($ret_or_4=Opal.Range.$new(bounds['$[]']("left"),bounds['$[]']("right"),false)['$include?'](the_x.$to_i())))){return Opal.Range.$new(bounds['$[]']("left"),bounds['$[]']("right"),false)['$include?']($rb_plus(the_x.$to_i(),the_width))}else{return $ret_or_4};return nil;})())){self.left=the_x.$to_i()};self.bottom=$rb_plus(self.top,the_height);self.right=$rb_plus(self.left,the_width);self.$fit_within_boundaries();return self.$commit_settings();},$Window_set_position$31.$$arity=-1);Opal.def(self,'$set_frame',$Window_set_frame$32=function $$set_frame(settings){var self=this,$ret_or_5=nil,$ret_or_6=nil,$ret_or_7=nil,$ret_or_8=nil;if(settings==null){settings=nil;};if($truthy(settings['$is_a?']($$$('::','Hash')))){self.top=(function(){if($truthy(($ret_or_5=settings['$[]']("top")))){return $ret_or_5}else{return self.top};return nil;})();self.left=(function(){if($truthy(($ret_or_6=settings['$[]']("left")))){return $ret_or_6}else{return self.left};return nil;})();self.right=(function(){if($truthy(($ret_or_7=settings['$[]']("right")))){return $ret_or_7}else{return self.right};return nil;})();self.bottom=(function(){if($truthy(($ret_or_8=settings['$[]']("bottom")))){return $ret_or_8}else{return self.bottom};return nil;})();self.$fit_within_boundaries();return self.$commit_settings();}else{return nil};},$Window_set_frame$32.$$arity=-1);Opal.def(self,'$position',$Window_position$33=function $$position(){var self=this;return $hash2(["x","y"],{"x":self.left,"y":self.top})},$Window_position$33.$$arity=0);Opal.def(self,'$fit_within_boundaries',$Window_fit_within_boundaries$34=function $$fit_within_boundaries(){var self=this,the_width=nil,the_height=nil,bounds=nil;the_width=self.$width();the_height=self.$height();bounds=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area();if($truthy($rb_lt(self.top,bounds['$[]']("top")))){self.top=bounds['$[]']("top")};if($truthy($rb_lt(self.left,bounds['$[]']("left")))){self.left=bounds['$[]']("left")};self.right=$rb_plus(self.left,the_width);self.bottom=$rb_plus(self.top,the_height);if($truthy($rb_gt(self.bottom,bounds['$[]']("bottom")))){self.bottom=bounds['$[]']("bottom")};if($truthy($rb_gt(self.right,bounds['$[]']("right")))){return(self.right=bounds['$[]']("right"))}else{return nil};},$Window_fit_within_boundaries$34.$$arity=0);Opal.def(self,'$set_window_title',$Window_set_window_title$35=function $$set_window_title(the_title){var self=this;if(the_title==null){the_title=nil;};if($truthy(self.title_object)){if($truthy(the_title['$is_a?']($$$('::','String')))){self.window_title=the_title;self.title_object.$set_text(self.window_title);return self.title_object.$parent().$gxg_merge_style($hash2(["padding"],{"padding":""+"0px 0px 0px "+($rb_minus($rb_minus($rb_divide(self.$width(),2),$rb_times($rb_divide(self.window_title.$size(),2),8)),60))+"px"}));}else{return nil}}else{return nil};},$Window_set_window_title$35.$$arity=-1);$alias(self,"window_title=","set_window_title");Opal.def(self,'$window_title',$Window_window_title$36=function $$window_title(){var self=this;if($truthy(self.title_object)){return self.window_title}else{return nil}},$Window_window_title$36.$$arity=0);Opal.def(self,'$special_state',$Window_special_state$37=function $$special_state(){var self=this;return self.special_state},$Window_special_state$37.$$arity=0);Opal.def(self,'$set_special_state',$Window_set_special_state$38=function $$set_special_state(settings){var self=this,$ret_or_9=nil,$ret_or_10=nil,$ret_or_11=nil,$ret_or_12=nil;if(settings==null){settings=nil;};if($truthy(settings['$is_a?']($$$('::','Hash')))){self.special_state=settings;self.top=(function(){if($truthy(($ret_or_9=settings['$[]']("top")))){return $ret_or_9}else{return self.top};return nil;})();self.left=(function(){if($truthy(($ret_or_10=settings['$[]']("left")))){return $ret_or_10}else{return self.left};return nil;})();self.right=(function(){if($truthy(($ret_or_11=settings['$[]']("right")))){return $ret_or_11}else{return self.right};return nil;})();self.bottom=(function(){if($truthy(($ret_or_12=settings['$[]']("bottom")))){return $ret_or_12}else{return self.bottom};return nil;})();self.$fit_within_boundaries();return self.$commit_settings();}else{return nil};},$Window_set_special_state$38.$$arity=-1);Opal.def(self,'$clear_special_state',$Window_clear_special_state$39=function $$clear_special_state(settings){var self=this;if(settings==null){settings=nil;};self.special_state=nil;if($truthy(settings['$is_a?']($$$('::','Hash')))){return self.$set_frame(settings)}else{return nil};},$Window_clear_special_state$39.$$arity=-1);Opal.def(self,'$initialize',$Window_initialize$40=function $$initialize(the_parent,the_options){var $iter=$Window_initialize$40.$$p,$yield=$iter||nil,self=this,bounds=nil,$ret_or_13=nil,$ret_or_14=nil,$ret_or_15=nil,$ret_or_16=nil,$ret_or_17=nil,$ret_or_18=nil,$ret_or_19=nil,$ret_or_20=nil,$ret_or_21=nil,$ret_or_22=nil,$ret_or_23=nil,$ret_or_24=nil,$ret_or_25=nil,$ret_or_26=nil,$ret_or_27=nil,$ret_or_28=nil;if($iter)$Window_initialize$40.$$p=null;$$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_refresh();bounds=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area();self.special_state=nil;self.content=nil;if($truthy((function(){if($truthy(($ret_or_13=the_options['$[]']("top")['$is_a?']($$$('::','String'))))){return $ret_or_13}else{return the_options['$[]']("top").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("top")['$is_a?']($$$('::','String')))){self.top=$rb_times(bounds['$[]']("page_height"),$rb_divide(the_options['$[]']("top").$gsub("%","").$to_f(),100.0))}else{self.top=$rb_times(bounds['$[]']("page_height"),$rb_divide(the_options['$[]']("top"),100.0))}}else{self.top=(function(){if($truthy(($ret_or_14=the_options['$[]']("top")))){return $ret_or_14}else{return $rb_minus($rb_divide((window.innerHeight).$to_i(),2),50);};return nil;})()};if($truthy((function(){if($truthy(($ret_or_15=the_options['$[]']("left")['$is_a?']($$$('::','String'))))){return $ret_or_15}else{return the_options['$[]']("left").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("left")['$is_a?']($$$('::','String')))){self.left=$rb_times(bounds['$[]']("page_width"),$rb_divide(the_options['$[]']("left").$gsub("%","").$to_f(),100.0))}else{self.left=$rb_times(bounds['$[]']("page_width"),$rb_divide(the_options['$[]']("left"),100.0))}}else{self.left=(function(){if($truthy(($ret_or_16=the_options['$[]']("left")))){return $ret_or_16}else{return $rb_minus($rb_divide((window.innerWidth).$to_i(),2),100);};return nil;})()};if($truthy((function(){if($truthy(($ret_or_17=the_options['$[]']("right")['$is_a?']($$$('::','String'))))){return $ret_or_17}else{return the_options['$[]']("right").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("right")['$is_a?']($$$('::','String')))){self.right=$rb_times(bounds['$[]']("page_width"),$rb_divide(the_options['$[]']("right").$gsub("%","").$to_f(),100.0))}else{self.right=$rb_times(bounds['$[]']("page_width"),$rb_divide(the_options['$[]']("right"),100.0))}}else{self.right=(function(){if($truthy(($ret_or_18=the_options['$[]']("right")))){return $ret_or_18}else{return $rb_plus($rb_divide((window.innerWidth).$to_i(),2),100);};return nil;})()};if($truthy((function(){if($truthy(($ret_or_19=the_options['$[]']("bottom")['$is_a?']($$$('::','String'))))){return $ret_or_19}else{return the_options['$[]']("bottom").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("bottom")['$is_a?']($$$('::','String')))){self.bottom=$rb_times(bounds['$[]']("page_height"),$rb_divide(the_options['$[]']("bottom").$gsub("%","").$to_f(),100.0))}else{self.bottom=$rb_times(bounds['$[]']("page_height"),$rb_divide(the_options['$[]']("bottom"),100.0))}}else{self.bottom=(function(){if($truthy(($ret_or_20=the_options['$[]']("bottom")))){return $ret_or_20}else{return $rb_plus($rb_divide((window.innerHeight).$to_i(),2),50);};return nil;})()};self.window_title=(function(){if($truthy(($ret_or_21=the_options['$[]']("window_title")))){return $ret_or_21}else{return "Untitled"};return nil;})();self.title_object=nil;if($truthy((function(){if($truthy(($ret_or_22=the_options['$[]']("width")['$is_a?']($$$('::','String'))))){return $ret_or_22}else{return the_options['$[]']("width").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("width")['$is_a?']($$$('::','String')))){self.right=$rb_plus(self.left,$rb_times($rb_minus(bounds['$[]']("right"),bounds['$[]']("left")),$rb_divide(the_options['$[]']("width").$gsub("%","").$to_f(),100.0)))}else{self.right=$rb_plus(self.left,$rb_times($rb_minus(bounds['$[]']("right"),bounds['$[]']("left")),$rb_divide(the_options['$[]']("width"),100.0)))}}else if($truthy(the_options['$[]']("width")['$is_a?']($$$('::','Numeric')))){self.right=$rb_plus(self.left,the_options.$delete("width"))};if($truthy((function(){if($truthy(($ret_or_23=the_options['$[]']("height")['$is_a?']($$$('::','String'))))){return $ret_or_23}else{return the_options['$[]']("height").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("height")['$is_a?']($$$('::','String')))){self.bottom=$rb_plus(self.top,$rb_times($rb_minus(bounds['$[]']("bottom"),bounds['$[]']("top")),$rb_divide(the_options['$[]']("height").$gsub("%","").$to_f(),100.0)))}else{self.bottom=$rb_plus(self.top,$rb_times($rb_minus(bounds['$[]']("bottom"),bounds['$[]']("top")),$rb_divide(the_options['$[]']("height"),100.0)))}}else if($truthy(the_options['$[]']("height")['$is_a?']($$$('::','Numeric')))){self.bottom=$rb_plus(self.top,the_options['$[]']("height"))};self.$fit_within_boundaries();self.modal=(function(){if($truthy(($ret_or_24=the_options['$[]']("modal")))){return $ret_or_24}else{return false};return nil;})();self.scrolling=the_options['$[]']("scroll");self.title_margin=24;if(self.modal['$=='](true)){self.resize=false;self.resize_margin=0;}else{self.resize=(function(){if($truthy(($ret_or_25=the_options['$[]']("resize")))){return $ret_or_25}else{return true};return nil;})();self.resize_margin=2;self.title_margin=26;};if(self.modal['$=='](true)){self.closebox=false;self.minimizebox=false;self.maximizebox=false;}else{if(the_options['$[]']("close")['$=='](false)){self.closebox=false}else{self.closebox=(function(){if($truthy(($ret_or_26=the_options['$[]']("close")))){return $ret_or_26}else{return "enabled"};return nil;})().$to_s().$to_sym()};if(the_options['$[]']("minimize")['$=='](false)){self.minimizebox=false}else{self.minimizebox=(function(){if($truthy(($ret_or_27=the_options['$[]']("minimize")))){return $ret_or_27}else{return "enabled"};return nil;})().$to_s().$to_sym()};if(the_options['$[]']("maximize")['$=='](false)){self.maximizebox=false}else{self.maximizebox=(function(){if($truthy(($ret_or_28=the_options['$[]']("maximize")))){return $ret_or_28}else{return "enabled"};return nil;})().$to_s().$to_sym()};};self.tracking=$hash2([],{});self.menu_reference=the_options['$[]']("menu");self.menu_area=nil;self.menu_bar=nil;if($truthy(self.menu_reference)){self.menu_margin=16}else{self.menu_margin=0};$send2(self,$find_super(self,'initialize',$Window_initialize$40,false,true),'initialize',[the_parent,the_options],null);return self;},$Window_initialize$40.$$arity=2);Opal.def(self,'$menu_reference',$Window_menu_reference$41=function $$menu_reference(){var self=this;return self.menu_reference},$Window_menu_reference$41.$$arity=0);Opal.def(self,'$menu',$Window_menu$42=function $$menu(){var self=this;return self.menu_bar},$Window_menu$42.$$arity=0);Opal.def(self,'$set_menu',$Window_set_menu$43=function $$set_menu(the_menu_source){var self=this;if(the_menu_source==null){the_menu_source=nil;};if($truthy(the_menu_source['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(self.menu_area)){self.$page().$build_components(self.menu_area,[the_menu_source]);self.menu_margin=(self.menu_area.$element().getBoundingClientRect().bottom-self.menu_area.$element().getBoundingClientRect().top).$to_i();self.menu_bar=self.$find_child(self.menu_reference,true);if($truthy(self.menu_bar)){self.$commit_settings();return true;}else{self.$log_warn(""+"Unable to properly initialize window menu "+(self.menu_reference.$inspect())+" .");return false;};}else{return false}}else{return false};},$Window_set_menu$43.$$arity=-1);$alias(self,"menu=","set_menu");$alias(self,"original_add_child","add_child");Opal.def(self,'$add_child',$Window_add_child$44=function $$add_child(object_record){var self=this;if(object_record==null){object_record=nil;};if($truthy(self.content)){return self.content.$add_child(object_record)}else{return self.$original_add_child(object_record)};},$Window_add_child$44.$$arity=-1);$alias(self,"original_children","children");Opal.def(self,'$children',$Window_children$45=function $$children(){var self=this;if($truthy(self.content)){return self.content.$children()}else{return $hash2([],{})}},$Window_children$45.$$arity=0);Opal.def(self,'$find_child',$Window_find_child$46=function $$find_child(the_reference,interior){var $a,$$47,self=this,result=nil,uuid_check=nil,search_queue=nil,entry=nil;if(the_reference==null){the_reference=nil;};if(interior==null){interior=false;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_reference))){uuid_check=true}else{uuid_check=false};if(interior['$=='](true)){search_queue=self.$original_children().$values()}else{search_queue=self.$children().$values()};while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(uuid_check)){if(entry.$uuid()['$=='](the_reference)){result=entry;break;;}}else if(entry.$title()['$=='](the_reference)){result=entry;break;;};if($truthy(result)){}else{$send(entry.$children().$values(),'each',[],($$47=function(the_child){var self=$$47.$$s==null?this:$$47.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$47.$$s=self,$$47.$$arity=1,$$47))};};};return result;},$Window_find_child$46.$$arity=-1);return(Opal.def(self,'$cascade',$Window_cascade$48=function $$cascade(){var $$49,self=this,build_list=nil,the_title=nil,$writer=nil,close_box=nil,minimize_box=nil,maximize_box=nil,table=nil,row=nil,cell_one=nil,cell_two=nil,cell_three=nil,interior_component=nil,interior_component_uuid=nil,left_resizer=nil,right_resizer=nil,bottom_resizer=nil,sw_resizer=nil,se_resizer=nil,left_menu_resize=nil,right_menu_resize=nil,menu_cell=nil,menu_row=nil,content_area=nil,row_one=nil,row_two=nil,resizing_areas=nil,the_object=nil;self.$commit_settings();build_list=[];the_title=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"title_object "+(self.uuid.$to_s())];$send(the_title,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.label"];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["content","style"],{"content":self.window_title,"style":$hash2(["width","font-size","text-align"],{"width":"100%","font-size":"16px","text-align":"center"})})];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;close_box=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.image"];$send(close_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(close_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["src","width","height","style"],{"src":self.$theme_widget("close.png"),"width":20,"height":20,"style":$hash2(["padding"],{"padding":"2px"})})];$send(close_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('close.png'))\n"+" the_window = self.window\n"+" if the_window\n"+" if the_window.application\n"+" the_window.application.window_close({:window => the_window.uuid})\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_close(the_window.uuid)\n"+" end\n"+" else\n"+" log_warn('Window Not Found')\n"+" end\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('close_mousedown.png'))\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('close_mouseenter.png'))\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('close.png'))\n"+" end\n"+" end\n"+" "];$send(close_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(close_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;minimize_box=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.image"];$send(minimize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(minimize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["src","width","height","style"],{"src":self.$theme_widget("minimize.png"),"width":20,"height":20,"style":$hash2(["padding"],{"padding":"2px"})})];$send(minimize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('minimize.png'))\n"+" the_window = self.window\n"+" if the_window\n"+" special = the_window.special_state()\n"+" if special.is_a?(::Hash)\n"+" if special[:action] == :minimize\n"+" GxG::DISPLAY_DETAILS[:object].window_restore(the_window.uuid)\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_minimize(the_window.uuid,{:top => the_window.top, :left => the_window.left, :right => the_window.right, :bottom => the_window.bottom})\n"+" end\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_minimize(the_window.uuid,{:top => the_window.top, :left => the_window.left, :right => the_window.right, :bottom => the_window.bottom})\n"+" end\n"+" end\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('minimize_mousedown.png'))\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('minimize_mouseenter.png'))\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('minimize.png'))\n"+" end\n"+" end\n"+" "];$send(minimize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(minimize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;maximize_box=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.image"];$send(maximize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(maximize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["src","width","height","style"],{"src":self.$theme_widget("maximize.png"),"width":20,"height":20,"style":$hash2(["padding"],{"padding":"2px"})})];$send(maximize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('maximize.png'))\n"+" the_window = self.window\n"+" if the_window\n"+" special = the_window.special_state()\n"+" if special.is_a?(::Hash)\n"+" if special[:action] == :maximize\n"+" GxG::DISPLAY_DETAILS[:object].window_restore(the_window.uuid)\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_maximize(the_window.uuid,{:top => the_window.top, :left => the_window.left, :right => the_window.right, :bottom => the_window.bottom})\n"+" end\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_maximize(the_window.uuid,{:top => the_window.top, :left => the_window.left, :right => the_window.right, :bottom => the_window.bottom})\n"+" end\n"+" end\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('maximize_mousedown.png'))\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('maximize_mouseenter.png'))\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('maximize.png'))\n"+" end\n"+" end\n"+" "];$send(maximize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(maximize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;table=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table"];$send(table,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(table,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style","states"],{"style":$hash2(["clear","height","padding","margin","border-radius","border-bottom"],{"clear":"both","height":"24px","padding":"0px","margin":"0px","border-radius":"5px 5px 0px 0px","border-bottom":"1px solid #c2c2c2"}),"states":$hash2(["default-background-color"],{"default-background-color":true})})];$send(table,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(table,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(table,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;row=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.row"];$send(row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","vertical-align","background-color"],{"padding":"0px","margin":"0px","vertical-align":"middle","background-color":"transparent"})})];$send(row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;cell_one=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(cell_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(cell_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","vertical-align","background-color"],{"padding":"0px","margin":"0px","vertical-align":"middle","background-color":"transparent"})})];$send(cell_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(cell_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(cell_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;cell_two=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(cell_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(cell_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","padding","vertical-align","margin","background-color"],{"width":"100%","padding":""+"0px 0px 0px "+($rb_minus($rb_minus($rb_divide(self.$width(),2),$rb_times($rb_divide(self.window_title.$size(),2),8)),60))+"px","vertical-align":"middle","margin":"0px","background-color":"transparent"})})];$send(cell_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(cell_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(cell_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;cell_three=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(cell_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(cell_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["float","padding","vertical-align","margin","background-color"],{"float":"right","padding":"0px","vertical-align":"middle","margin":"0px","background-color":"transparent"})})];$send(cell_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(cell_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(cell_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(self.closebox)){if(self.closebox['$==']("disabled")){$writer=["src",self.$theme_widget("close_disable.png")];$send(close_box['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["states",$hash2(["disabled"],{"disabled":true})];$send(close_box['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};cell_one['$[]']("content")['$<<'](close_box);};if($truthy(self.minimizebox)){if(self.minimizebox['$==']("disabled")){$writer=["src",self.$theme_widget("minimize_disable.png")];$send(minimize_box['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["states",$hash2(["disabled"],{"disabled":true})];$send(minimize_box['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};cell_one['$[]']("content")['$<<'](minimize_box);};if($truthy(self.maximizebox)){if(self.maximizebox['$==']("disabled")){$writer=["src",self.$theme_widget("maximize_disable.png")];$send(maximize_box['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["states",$hash2(["disabled"],{"disabled":true})];$send(maximize_box['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};cell_one['$[]']("content")['$<<'](maximize_box);};$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" #\n"+" if @window_handle\n"+" unless @last_mouse_x\n"+" @last_mouse_x = event[:pageX]\n"+" end\n"+" unless @last_mouse_y\n"+" @last_mouse_y = event[:pageY]\n"+" end\n"+" offset_x = (event[:pageX] - @window_handle.left)\n"+" if event[:pageY] < @window_handle.top\n"+" offset_y = (@window_handle.top - event[:pageY])\n"+" else\n"+" offset_y = (event[:pageY] - @window_handle.top)\n"+" end\n"+" new_x = ((event[:pageX] - offset_x) + (event[:pageX] - @last_mouse_x))\n"+" new_y = ((event[:pageY] - offset_y) + (event[:pageY] - @last_mouse_y))\n"+" @window_handle.set_position(new_x,new_y)\n"+" @last_mouse_x = event[:pageX]\n"+" @last_mouse_y = event[:pageY]\n"+" end\n"+" end\n"+" end\n"+" on(:dblclick) do |event|\n"+" the_window = self.window\n"+" if the_window\n"+" special = the_window.special_state()\n"+" if special.is_a?(::Hash)\n"+" if special[:action] == :rollup\n"+" GxG::DISPLAY_DETAILS[:object].window_restore(the_window.uuid)\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_rollup(the_window.uuid,{:top => the_window.top, :left => the_window.left, :right => the_window.right, :bottom => the_window.bottom})\n"+" end\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_rollup(the_window.uuid,{:top => the_window.top, :left => the_window.left, :right => the_window.right, :bottom => the_window.bottom})\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousemove) do |event|\n"+" @window_handle = self.window\n"+" if ((event[:buttons] & 1) == 1)\n"+" @mode = :drag\n"+" do_drag(event)\n"+" else\n"+" @mode = :hover\n"+" end\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(cell_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;cell_two['$[]']("content")['$<<'](the_title);row['$[]']("content")['$<<'](cell_one);row['$[]']("content")['$<<'](cell_two);row['$[]']("content")['$<<'](cell_three);table['$[]']("content")['$<<'](row);build_list['$<<'](table);interior_component=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"content "+(self.uuid.$to_s())];$send(interior_component,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block"];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style","states"],{"style":$hash2(["clear","padding","margin","border","width","height"],{"clear":"both","padding":"0px","margin":"0px","border":"0px","width":""+($rb_minus(self.$width(),$rb_times(self.resize_margin,2)))+"px","height":""+($rb_minus(self.$height(),$rb_plus($rb_plus(self.title_margin,self.menu_margin),self.resize_margin)))+"px"}),"states":$hash2(["default-background-color"],{"default-background-color":true})})];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;interior_component_uuid=interior_component.$uuid();if($truthy(self.scrolling)){if(self.scrolling['$=='](true)){$writer=["overflow","scroll"];$send(interior_component['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];}else{if(self.scrolling['$==']("vertical")){$writer=["overflow-y","scroll"];$send(interior_component['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.scrolling['$==']("horizontal")){$writer=["overflow-x","scroll"];$send(interior_component['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};}}else{$writer=["overflow","hidden"];$send(interior_component['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};left_resizer=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(left_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(left_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","cursor"],{"width":"2px","cursor":"w-resize"})})];$send(left_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle = self.window\n"+" if window_handle\n"+" window_handle.set_left(event[:pageX])\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(left_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(left_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;right_resizer=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(right_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(right_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","cursor"],{"width":"2px","cursor":"e-resize"})})];$send(right_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle = self.window\n"+" if window_handle\n"+" window_handle.set_right(event[:pageX] + 1)\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(right_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(right_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;bottom_resizer=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(bottom_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(bottom_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["height","cursor"],{"height":"2px","cursor":"s-resize"})})];$send(bottom_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" window_handle = self.window\n"+" if window_handle\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle.set_bottom(event[:pageY] + 4)\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(bottom_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(bottom_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;sw_resizer=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(sw_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(sw_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","height","cursor"],{"width":"2px","height":"2px","cursor":"sw-resize"})})];$send(sw_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle = self.window\n"+" if window_handle\n"+" window_handle.set_left(event[:pageX] - 2)\n"+" window_handle.set_bottom(event[:pageY] + 4)\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(sw_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(sw_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;se_resizer=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(se_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(se_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","height","cursor"],{"width":"2px","height":"2px","cursor":"se-resize"})})];$send(se_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle = self.window\n"+" if window_handle\n"+" window_handle.set_right(event[:pageX] + 2)\n"+" window_handle.set_bottom(event[:pageY] + 4)\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(se_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(se_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;left_menu_resize=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(left_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(left_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","cursor"],{"width":"2px","cursor":"w-resize"})})];$send(left_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle = self.window\n"+" if window_handle\n"+" window_handle.set_left(event[:pageX])\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(left_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(left_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;right_menu_resize=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(right_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(right_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","cursor"],{"width":"2px","cursor":"e-resize"})})];$send(right_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle = self.window\n"+" if window_handle\n"+" window_handle.set_right(event[:pageX] + 1)\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(right_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(right_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;menu_cell=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"menu_area "+(self.uuid.$to_s())];$send(menu_cell,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block.table.cell"];$send(menu_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(menu_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["overflow","height","padding","margin"],{"overflow":"hidden","height":"16px","padding":"0px","margin":"0px"})})];$send(menu_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(menu_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(menu_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;menu_row=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"menu_area_row "+(self.uuid.$to_s())];$send(menu_row,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block.table.row"];$send(menu_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(menu_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["overflow","clear","padding","width","height","margin","vertical-align","background-color","border-bottom"],{"overflow":"hidden","clear":"both","padding":"0px","width":"100%","height":"16px","margin":"0px","vertical-align":"middle","background-color":"transparent","border-bottom":"1px solid #c2c2c2"})})];$send(menu_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(menu_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[left_menu_resize,menu_cell,right_menu_resize]];$send(menu_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;content_area=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"content_area "+(self.uuid.$to_s())];$send(content_area,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block.table.cell"];$send(content_area,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(content_area,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","border"],{"padding":"0px","margin":"0px","border":"0px"})})];$send(content_area,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(content_area,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[interior_component]];$send(content_area,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;row_one=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.row"];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2([],{})];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;row_two=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.row"];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2([],{})];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;resizing_areas=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"window_body "+(self.uuid.$to_s())];$send(resizing_areas,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block.table"];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style","states"],{"style":$hash2(["width"],{"width":"100%"}),"states":$hash2(["default-background-color"],{"default-background-color":true})})];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(self.resize)){$writer=["content",[left_resizer,content_area,right_resizer]];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[sw_resizer,bottom_resizer,se_resizer]];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(self.menu_reference)){$writer=["content",[menu_row,row_one,row_two]];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];}else{$writer=["content",[row_one,row_two]];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};}else if($truthy(self.menu_reference)){$writer=["content",[content_area]];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[menu_row,row_one]];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;}else{$writer=["content",[content_area]];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[row_one]];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};build_list['$<<'](resizing_areas);self.content=nil;self.$page().$build_components(self,build_list);the_object=self.$page().$find_object_by(interior_component_uuid);if($truthy(the_object)){self.content=the_object};the_object=self.$page().$find_object_by(""+"window_body "+(self.uuid.$to_s()));if($truthy(the_object)){self.window_body=the_object};the_object=self.$page().$find_object_by(""+"title_object "+(self.uuid.$to_s()));if($truthy(the_object)){self.title_object=the_object};the_object=self.$page().$find_object_by(""+"menu_area "+(self.uuid.$to_s()));if($truthy(the_object)){self.menu_area=the_object;self.menu_margin=(self.menu_area.$element().getBoundingClientRect().bottom-self.menu_area.$element().getBoundingClientRect().top).$to_i();if($truthy(self.menu_area)){self.menu_area.$parent().$parent().$gxg_merge_style($hash2(["border-collapse"],{"border-collapse":"collapse"}))};};$send($$$($$($nesting,'GxG'),'DISPATCHER'),'post_event',[],($$49=function(){var self=$$49.$$s==null?this:$$49.$$s;return self.$commit_settings()},$$49.$$s=self,$$49.$$arity=0,$$49));return self;},$Window_cascade$48.$$arity=0),nil)&&'cascade';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.window",$$$($$$($$$('::','GxG'),'Gui'),'Window'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DialogBox');var $nesting=[self].concat($parent_nesting),$DialogBox__before_create$50,$DialogBox_uuid$51,$DialogBox_before_close$52,$DialogBox_after_close$53,$DialogBox_before_open$54,$DialogBox_after_open$55,$DialogBox_set_application$56,$DialogBox_application$57,$DialogBox_set_window_title$58,$DialogBox_window_title$59,$DialogBox_set_data$60,$DialogBox_data$61,$DialogBox_set_responder$62,$DialogBox_respond$63,$DialogBox_top$64,$DialogBox_left$65,$DialogBox_right$66,$DialogBox_bottom$67,$DialogBox_width$68,$DialogBox_height$69,$DialogBox_position$70,$DialogBox_layer$71,$DialogBox_initialize$72,$DialogBox_add_child$73,$DialogBox_children$74,$DialogBox_find_child$75,$DialogBox_cascade$77,$DialogBox_open$78,$DialogBox_close$79;self.$$prototype.uuid=self.$$prototype.application=self.$$prototype.title_object=self.$$prototype.window_title=self.$$prototype.data=self.$$prototype.responder=self.$$prototype.top=self.$$prototype.left=self.$$prototype.right=self.$$prototype.bottom=self.$$prototype.layer=self.$$prototype.opacity=self.$$prototype.content=self.$$prototype.background_color=nil;Opal.def(self,'$_before_create',$DialogBox__before_create$50=function $$_before_create(){var $iter=$DialogBox__before_create$50.$$p,$yield=$iter||nil,self=this;if($iter)$DialogBox__before_create$50.$$p=null;return $send2(self,$find_super(self,'_before_create',$DialogBox__before_create$50,false,true),'_before_create',[],null)},$DialogBox__before_create$50.$$arity=0);Opal.def(self,'$uuid',$DialogBox_uuid$51=function $$uuid(){var self=this;return self.uuid},$DialogBox_uuid$51.$$arity=0);Opal.def(self,'$before_close',$DialogBox_before_close$52=function $$before_close(data){var self=this;if(data==null){data=nil;};return nil;},$DialogBox_before_close$52.$$arity=-1);Opal.def(self,'$after_close',$DialogBox_after_close$53=function $$after_close(data){var self=this;if(data==null){data=nil;};return nil;},$DialogBox_after_close$53.$$arity=-1);Opal.def(self,'$before_open',$DialogBox_before_open$54=function $$before_open(data){var self=this;if(data==null){data=nil;};return nil;},$DialogBox_before_open$54.$$arity=-1);Opal.def(self,'$after_open',$DialogBox_after_open$55=function $$after_open(data){var self=this;if(data==null){data=nil;};return nil;},$DialogBox_after_open$55.$$arity=-1);Opal.def(self,'$set_application',$DialogBox_set_application$56=function $$set_application(the_application){var self=this;return(self.application=the_application)},$DialogBox_set_application$56.$$arity=1);$alias(self,"application=","set_application");Opal.def(self,'$application',$DialogBox_application$57=function $$application(){var self=this;return self.application},$DialogBox_application$57.$$arity=0);Opal.def(self,'$set_window_title',$DialogBox_set_window_title$58=function $$set_window_title(the_title){var self=this;if(the_title==null){the_title=nil;};if($truthy(self.title_object)){if($truthy(the_title['$is_a?']($$$('::','String')))){self.window_title=the_title;return self.title_object.$set_text(self.window_title);}else{return nil}}else{return nil};},$DialogBox_set_window_title$58.$$arity=-1);$alias(self,"window_title=","set_window_title");Opal.def(self,'$window_title',$DialogBox_window_title$59=function $$window_title(){var self=this;if($truthy(self.title_object)){return self.window_title}else{return nil}},$DialogBox_window_title$59.$$arity=0);Opal.def(self,'$set_data',$DialogBox_set_data$60=function $$set_data(data){var self=this;if(data==null){data=$hash2([],{});};return(self.data=data);},$DialogBox_set_data$60.$$arity=-1);$alias(self,"data=","set_data");Opal.def(self,'$data',$DialogBox_data$61=function $$data(){var self=this;return self.data},$DialogBox_data$61.$$arity=0);Opal.def(self,'$set_responder',$DialogBox_set_responder$62=function $$set_responder(block){var self=this;if(block==null){block=nil;};if($truthy(block['$respond_to?']("call"))){return(self.responder=block)}else{return nil};},$DialogBox_set_responder$62.$$arity=-1);$alias(self,"responder=","set_responder");Opal.def(self,'$respond',$DialogBox_respond$63=function $$respond(data){var self=this;if(data==null){data=nil;};self.$page().$dialog_close();if($truthy(self.responder['$respond_to?']("call"))){return self.responder.$call(data)}else{return nil};},$DialogBox_respond$63.$$arity=-1);Opal.def(self,'$top',$DialogBox_top$64=function $$top(){var self=this;return self.top},$DialogBox_top$64.$$arity=0);Opal.def(self,'$left',$DialogBox_left$65=function $$left(){var self=this;return self.left},$DialogBox_left$65.$$arity=0);Opal.def(self,'$right',$DialogBox_right$66=function $$right(){var self=this;return self.right},$DialogBox_right$66.$$arity=0);Opal.def(self,'$bottom',$DialogBox_bottom$67=function $$bottom(){var self=this;return self.bottom},$DialogBox_bottom$67.$$arity=0);Opal.def(self,'$width',$DialogBox_width$68=function $$width(){var self=this;return $rb_minus(self.right,self.left)},$DialogBox_width$68.$$arity=0);Opal.def(self,'$height',$DialogBox_height$69=function $$height(){var self=this;return $rb_minus(self.bottom,self.top)},$DialogBox_height$69.$$arity=0);Opal.def(self,'$position',$DialogBox_position$70=function $$position(){var self=this;return $hash2(["x","y"],{"x":self.left,"y":self.top})},$DialogBox_position$70.$$arity=0);Opal.def(self,'$layer',$DialogBox_layer$71=function $$layer(){var self=this;return self.layer},$DialogBox_layer$71.$$arity=0);Opal.def(self,'$initialize',$DialogBox_initialize$72=function $$initialize(the_parent,the_options){var $iter=$DialogBox_initialize$72.$$p,$yield=$iter||nil,self=this,the_width=nil,$ret_or_29=nil,the_height=nil,$ret_or_30=nil,$ret_or_31=nil,$ret_or_32=nil,$ret_or_33=nil,$ret_or_34=nil,$ret_or_35=nil,$ret_or_36=nil,$ret_or_37=nil,$ret_or_38=nil,$ret_or_39=nil,$ret_or_40=nil,$ret_or_41=nil;if($iter)$DialogBox_initialize$72.$$p=null;self.special_state=nil;self.content=nil;the_width=nil;if($truthy((function(){if($truthy(($ret_or_29=the_options['$[]']("width")['$is_a?']($$$('::','String'))))){return $ret_or_29}else{return the_options['$[]']("width").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("width")['$is_a?']($$$('::','String')))){the_width=$rb_times((window.innerWidth).$to_f(),$rb_divide(the_options['$[]']("width").$gsub("%","").$to_f(),100.0))}else{the_width=$rb_times((window.innerWidth).$to_f(),$rb_divide(the_options['$[]']("width"),100.0))}}else if($truthy(the_options['$[]']("width")['$is_a?']($$$('::','Numeric')))){the_width=the_options['$[]']("width").$to_f()};if($truthy(the_width)){self.left=$rb_minus($rb_divide((window.innerWidth).$to_f(),2.0),$rb_divide(the_width,2.0));self.right=$rb_plus($rb_divide((window.innerWidth).$to_f(),2.0),$rb_divide(the_width,2.0));};the_height=nil;if($truthy((function(){if($truthy(($ret_or_30=the_options['$[]']("height")['$is_a?']($$$('::','String'))))){return $ret_or_30}else{return the_options['$[]']("height").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("height")['$is_a?']($$$('::','String')))){the_height=$rb_times((window.innerHeight).$to_f(),$rb_divide(the_options['$[]']("height").$gsub("%","").$to_f(),100.0))}else{the_height=$rb_times((window.innerHeight).$to_f(),$rb_divide(the_options['$[]']("height"),100.0))}}else if($truthy(the_options['$[]']("height")['$is_a?']($$$('::','Numeric')))){the_height=the_options['$[]']("height").$to_f()};if($truthy(the_height)){self.top=$rb_minus($rb_divide((window.innerHeight).$to_f(),2.0),$rb_divide(the_height,2.0));self.bottom=$rb_plus($rb_divide((window.innerHeight).$to_f(),2.0),$rb_divide(the_height,2.0));};if($truthy((function(){if($truthy(($ret_or_31=the_options['$[]']("top")['$is_a?']($$$('::','String'))))){return $ret_or_31}else{return the_options['$[]']("top").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("top")['$is_a?']($$$('::','String')))){self.top=$rb_times((window.innerHeight).$to_f(),$rb_divide(the_options['$[]']("top").$gsub("%","").$to_f(),100.0))}else{self.top=$rb_times((window.innerHeight).$to_f(),$rb_divide(the_options['$[]']("top"),100.0))}}else if($truthy(the_height)){}else{self.top=(function(){if($truthy(($ret_or_32=the_options['$[]']("top")))){return $ret_or_32}else{return $rb_minus($rb_divide((window.innerHeight).$to_i(),2),150);};return nil;})()};if($truthy((function(){if($truthy(($ret_or_33=the_options['$[]']("left")['$is_a?']($$$('::','String'))))){return $ret_or_33}else{return the_options['$[]']("left").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("left")['$is_a?']($$$('::','String')))){self.left=$rb_times((window.innerWidth).$to_f(),$rb_divide(the_options['$[]']("left").$gsub("%","").$to_f(),100.0))}else{self.left=$rb_times((window.innerWidth).$to_f(),$rb_divide(the_options['$[]']("left"),100.0))}}else if($truthy(the_width)){}else{self.left=(function(){if($truthy(($ret_or_34=the_options['$[]']("left")))){return $ret_or_34}else{return $rb_minus($rb_divide((window.innerWidth).$to_i(),2),300);};return nil;})()};if($truthy((function(){if($truthy(($ret_or_35=the_options['$[]']("right")['$is_a?']($$$('::','String'))))){return $ret_or_35}else{return the_options['$[]']("right").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("right")['$is_a?']($$$('::','String')))){self.right=$rb_times((window.innerWidth).$to_f(),$rb_divide(the_options['$[]']("right").$gsub("%","").$to_f(),100.0))}else{self.right=$rb_times((window.innerWidth).$to_f(),$rb_divide(the_options['$[]']("right"),100.0))}}else if($truthy(the_width)){}else{self.right=(function(){if($truthy(($ret_or_36=the_options['$[]']("right")))){return $ret_or_36}else{return $rb_plus($rb_divide((window.innerWidth).$to_i(),2),300);};return nil;})()};if($truthy((function(){if($truthy(($ret_or_37=the_options['$[]']("bottom")['$is_a?']($$$('::','String'))))){return $ret_or_37}else{return the_options['$[]']("bottom").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("bottom")['$is_a?']($$$('::','String')))){self.bottom=$rb_times((window.innerHeight).$to_f(),$rb_divide(the_options['$[]']("bottom").$gsub("%","").$to_f(),100.0))}else{self.bottom=$rb_times((window.innerHeight).$to_f(),$rb_divide(the_options['$[]']("bottom"),100.0))}}else if($truthy(the_height)){}else{self.bottom=(function(){if($truthy(($ret_or_38=the_options['$[]']("bottom")))){return $ret_or_38}else{return $rb_plus($rb_divide((window.innerHeight).$to_i(),2),150);};return nil;})()};self.window_title=(function(){if($truthy(($ret_or_39=the_options['$[]']("window_title")))){return $ret_or_39}else{return "Untitled"};return nil;})();self.title_object=nil;self.opacity=(function(){if($truthy(($ret_or_40=the_options['$[]']("opacity")))){return $ret_or_40}else{return 0.8};return nil;})();self.background_color=(function(){if($truthy(($ret_or_41=the_options['$[]']("background-color")))){return $ret_or_41}else{return ""+"rgba(0,0,0,"+(self.opacity.$to_s())+")"};return nil;})();self.layer=2000;self.tracking=$hash2([],{});self.responder=nil;self.data=$hash2([],{});$send2(self,$find_super(self,'initialize',$DialogBox_initialize$72,false,true),'initialize',[the_parent,the_options],null);self.$set_attribute("draggable",false);return self;},$DialogBox_initialize$72.$$arity=2);$alias(self,"original_add_child","add_child");Opal.def(self,'$add_child',$DialogBox_add_child$73=function $$add_child(component_record){var self=this;if($truthy(self.content)){return self.content.$add_child(component_record)}else{return self.$original_add_child(component_record)}},$DialogBox_add_child$73.$$arity=1);$alias(self,"original_children","children");Opal.def(self,'$children',$DialogBox_children$74=function $$children(){var self=this;if($truthy(self.content)){return self.content.$children()}else{return $hash2([],{})}},$DialogBox_children$74.$$arity=0);Opal.def(self,'$find_child',$DialogBox_find_child$75=function $$find_child(the_reference,interior){var $a,$$76,self=this,result=nil,uuid_check=nil,search_queue=nil,entry=nil;if(the_reference==null){the_reference=nil;};if(interior==null){interior=false;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_reference))){uuid_check=true}else{uuid_check=false};if(interior['$=='](true)){search_queue=self.$original_children().$values()}else{search_queue=self.$children().$values()};while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(uuid_check)){if(entry.$uuid()['$=='](the_reference)){result=entry;break;;}}else if(entry.$title()['$=='](the_reference)){result=entry;break;;};if($truthy(result)){}else{$send(entry.$children().$values(),'each',[],($$76=function(the_child){var self=$$76.$$s==null?this:$$76.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$76.$$s=self,$$76.$$arity=1,$$76))};};};return result;},$DialogBox_find_child$75.$$arity=-1);Opal.def(self,'$cascade',$DialogBox_cascade$77=function $$cascade(){var self=this,mouse_event_capture=nil,build_list=nil,modal_frame=nil,$writer=nil,the_title=nil,title_cell=nil,title_row=nil,interior_component=nil,content_row=nil,the_object=nil;self.$merge_style($hash2(["position","top","left","width","height","background-color","z-index"],{"position":"absolute","top":"0px","left":"0px","width":"100%","height":"100%","background-color":self.background_color,"z-index":self.layer}));mouse_event_capture=""+"\n"+" on(:mouseup,true) do |event|\n"+" end\n"+" on(:mousedown,true) do |event|\n"+" end\n"+" on(:mousemove,true) do |event|\n"+" end\n"+" on(:mouseenter,true) do |event|\n"+" end\n"+" on(:mouseleave,true) do |event|\n"+" end\n"+" ";self.$set_script(mouse_event_capture);build_list=[];modal_frame=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"modal_frame "+(self.uuid.$to_s())];$send(modal_frame,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block.table"];$send(modal_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(modal_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style","states"],{"style":$hash2(["opacity","clear","overflow","position","top","left","width","height","padding","margin","border-radius","z-index"],{"opacity":1.0,"clear":"both","overflow":"hidden","position":"absolute","top":""+(self.top)+"px","left":""+(self.left)+"px","width":""+(self.$width())+"px","height":""+(self.$height())+"px","padding":"0px","margin":"0px","border-radius":"5px 5px 5px 5px","z-index":$rb_plus(self.layer,100)}),"states":$hash2(["default-background-color"],{"default-background-color":true})})];$send(modal_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(modal_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(modal_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;the_title=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"title "+(self.uuid.$to_s())];$send(the_title,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.label"];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["content","style"],{"content":self.window_title,"style":$hash2(["opacity","width","font-size","text-align"],{"opacity":1.0,"width":"100%","font-size":"16px","text-align":"center"})})];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;title_cell=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(title_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(title_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["opacity","width","padding","margin","vertical-align","background-color"],{"opacity":1.0,"width":"100%","padding":""+"0px 0px 0px "+($rb_minus($rb_divide(self.$width(),2),$rb_times($rb_divide(self.window_title.$size(),2),8)))+"px","margin":"0px","vertical-align":"middle","background-color":"transparent"})})];$send(title_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(title_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[the_title]];$send(title_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;title_row=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.row"];$send(title_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(title_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["opacity","clear","padding","width","height","margin","vertical-align","background-color","border-bottom"],{"opacity":1.0,"clear":"both","padding":"0px","width":"100%","height":"24px","margin":"0px","vertical-align":"middle","background-color":"#ffffff","border-bottom":"1px solid #c2c2c2"})})];$send(title_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(title_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[title_cell]];$send(title_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;interior_component=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"content "+(self.uuid.$to_s())];$send(interior_component,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block.table.cell"];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style","states"],{"style":$hash2(["opacity","clear","padding","margin","border","width","height"],{"opacity":1.0,"clear":"both","padding":"0px","margin":"0px","border":"0px","width":""+(self.$width())+"px","height":""+(self.$height())+"px"}),"states":$hash2(["default-background-color"],{"default-background-color":true})})];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;content_row=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.row"];$send(content_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(content_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["opacity","width","height","padding","margin","border"],{"opacity":1.0,"width":""+(self.$width())+"px","height":""+($rb_minus(self.$height(),24))+"px","padding":"0px","margin":"0px","border":"0px"})})];$send(content_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(content_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[interior_component]];$send(content_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[title_row,content_row]];$send(modal_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;build_list['$<<'](modal_frame);self.content=nil;self.$page().$build_components(self,build_list);the_object=self.$page().$find_object_by(""+"content "+(self.uuid.$to_s()));if($truthy(the_object)){self.content=the_object};the_object=self.$page().$find_object_by(""+"title "+(self.uuid.$to_s()));if($truthy(the_object)){return(self.title_object=the_object)}else{return nil};},$DialogBox_cascade$77.$$arity=0);Opal.def(self,'$open',$DialogBox_open$78=function $$open(details){var self=this;if(details==null){details=$hash2([],{});};return nil;},$DialogBox_open$78.$$arity=-1);return(Opal.def(self,'$close',$DialogBox_close$79=function $$close(details){var self=this;if(details==null){details=$hash2([],{});};return nil;},$DialogBox_close$79.$$arity=-1),nil)&&'close';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.window.dialog",$$$($$$($$$('::','GxG'),'Gui'),'DialogBox'));return(function($base,$parent_nesting){var self=$module($base,'Vdom');var $nesting=[self].concat($parent_nesting);return(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Page');var $nesting=[self].concat($parent_nesting),$Page_window_open$80,$Page_window_close$81,$Page_dialog_open$82,$Page_dialog_close$83,$Page_window_is_in_back$ques$86,$Page_window_is_in_front$ques$88,$Page_window_send_to_back$90,$Page_window_bring_to_front$91,$Page_next_minimize_slot$92,$Page_minimize_effect$96,$Page_unminimize_effect$100,$Page_maximize_effect$103,$Page_unmaximize_effect$106,$Page_rollup_effect$109,$Page_rolldown_effect$111,$Page_window_restoreable$ques$114,$Page_window_restore$115,$Page_window_minimize$119,$Page_window_maximize$121,$Page_window_rollup$123,$Page_get_window_registration$125,$Page_get_window$126,$Page_window_list$127,$Page_window_repack_layers$129,$Page_window_top_layer$132,$Page_window_back_layer$134,$Page_window_next_layer$137,$Page_window_register$140,$Page_window_unregister$141,$Page_set_window_switcher$142,$Page_get_window_switcher$143;self.$$prototype.dialog=self.$$prototype.dialog_queue=self.$$prototype.window_registry=self.$$prototype.window_switcher=nil;Opal.def(self,'$window_open',$Page_window_open$80=function $$window_open(build_source,the_application){var self=this,new_window=nil,the_menu_source=nil;if(build_source==null){build_source=nil;};if(the_application==null){the_application=nil;};if($truthy(build_source['$is_a?']($$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){self.$build_components(self,[build_source],$hash2(["application"],{"application":the_application}));new_window=self.$find_object_by(build_source.$uuid());if($truthy(new_window)){if($truthy(new_window.$menu_reference())){the_menu_source=the_application.$search_content(new_window.$menu_reference());if($truthy(the_menu_source['$is_a?']($$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){new_window.$set_menu(the_menu_source)}else{self.$log_warn(""+"Invalid Menu Resource referenced: "+(new_window.$menu_reference().$inspect()))};};self.$window_register(new_window.$uuid(),new_window);new_window.$before_open();new_window.$open();new_window.$show();new_window.$after_open();return true;}else{self.$log_warn("Unable to locate newly created window object.");return false;};}else{return false};},$Page_window_open$80.$$arity=-1);Opal.def(self,'$window_close',$Page_window_close$81=function $$window_close(the_reference,options){var self=this,registration=nil;if(the_reference==null){the_reference=nil;};if(options==null){options=$hash2([],{});};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){registration=self.$get_window_registration(the_reference);if($truthy(registration)){registration['$[]']("window").$before_close();registration['$[]']("window").$close();registration['$[]']("window").$hide();registration['$[]']("window").$after_close();if($truthy(registration['$[]']("window").$application())){registration['$[]']("window").$application().$unlink_window(the_reference);registration['$[]']("window").$set_application(nil);};self.$window_unregister(the_reference);registration['$[]']("window").$destroy();return true;}else{return false};}else{return false};},$Page_window_close$81.$$arity=-1);Opal.def(self,'$dialog_open',$Page_dialog_open$82=function $$dialog_open(build_source,the_application,details){var $iter=$Page_dialog_open$82.$$p,block=$iter||nil,self=this,new_window=nil;if($iter)$Page_dialog_open$82.$$p=null;if($iter)$Page_dialog_open$82.$$p=null;;if(build_source==null){build_source=nil;};if(the_application==null){the_application=nil;};if(details==null){details=nil;};if($truthy(build_source['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(self.dialog['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'DialogBox')))){self.dialog_queue['$<<']($hash2(["source","application","details","responder"],{"source":build_source,"application":the_application,"details":details,"responder":block}));return true;}else{self.$page().$build_components(self,[build_source],$hash2(["application"],{"application":the_application}));new_window=self.$page().$find_object_by(build_source.$uuid());if($truthy(new_window)){new_window.$set_title(build_source.$title());if($truthy(the_application['$is_a?']($$$($$$('::','GxG'),'Application')))){new_window.$set_application(the_application);if($truthy(the_application.$get_window(build_source.$uuid()))){}else{the_application.$link_window(new_window)};};if($truthy(details)){new_window.$set_data(details)};if($truthy(block['$respond_to?']("call"))){new_window.$set_responder(block)};new_window.$before_open();new_window.$open();new_window.$show($hash2(["origin","destination"],{"origin":$hash2(["opacity"],{"opacity":0.0}),"destination":$hash2(["opacity"],{"opacity":1.0})}));new_window.$after_open();return true;}else{return false};}}else{return nil};},$Page_dialog_open$82.$$arity=-1);Opal.def(self,'$dialog_close',$Page_dialog_close$83=function $$dialog_close(options){var $$84,self=this,close_procedure=nil,$ret_or_42=nil;if(options==null){options=$hash2([],{});};if($truthy(self.dialog['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'DialogBox')))){self.dialog.$before_close();close_procedure=$send($$($nesting,'Proc'),'new',[],($$84=function(){var self=$$84.$$s==null?this:$$84.$$s,$$85,entry=nil;if(self.dialog==null)self.dialog=nil;if(self.dialog_queue==null)self.dialog_queue=nil;self.dialog.$close();self.dialog.$after_close();$send(self.dialog,'every_child',[],($$85=function(the_child){var self=$$85.$$s==null?this:$$85.$$s,the_application=nil;if(the_child==null){the_child=nil;};if($truthy(the_child['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport')))){the_application=the_child.$application();if($truthy(the_application)){return the_application.$unlink_viewport(the_child.$title())}else{return nil};}else{return nil};},$$85.$$s=self,$$85.$$arity=1,$$85));self.dialog.$destroy();self.dialog=nil;if($truthy($rb_gt(self.dialog_queue.$size(),0))){entry=self.dialog_queue.$shift();return $send(self.$page(),'dialog_open',[entry['$[]']("source"),entry['$[]']("application"),entry['$[]']("details")],entry['$[]']("responder").$to_proc());}else{return nil};},$$84.$$s=self,$$84.$$arity=0,$$84));if($truthy((function(){if($truthy(($ret_or_42=options['$[]']("origin")))){return options['$[]']("destination")}else{return $ret_or_42};return nil;})())){$send(self.dialog,'hide',[options],close_procedure.$to_proc())}else{$send(self.dialog,'hide',[$hash2(["origin","destination","options"],{"origin":$hash2(["opacity"],{"opacity":1}),"destination":$hash2(["opacity"],{"opacity":0}),"options":$hash2(["duration"],{"duration":500})})],close_procedure.$to_proc())};};return true;},$Page_dialog_close$83.$$arity=-1);Opal.def(self,'$window_is_in_back?',$Page_window_is_in_back$ques$86=function(the_reference){var $$87,self=this,the_record=nil,bottom_layer=nil,$ret_or_43=nil;if(the_reference==null){the_reference=nil;};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){bottom_layer=(function(){if($truthy(($ret_or_43=$send(self.window_registry,'collect',[],($$87=function(uuid,entry){var self=$$87.$$s==null?this:$$87.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$87.$$s=self,$$87.$$arity=2,$$87)).$min()))){return $ret_or_43}else{return 0};return nil;})();if(the_record['$[]']("layer")['$=='](bottom_layer)){return true}else{return false};}else{return false};},$Page_window_is_in_back$ques$86.$$arity=-1);Opal.def(self,'$window_is_in_front?',$Page_window_is_in_front$ques$88=function(the_reference){var $$89,self=this,the_record=nil,top_layer=nil,$ret_or_44=nil;if(the_reference==null){the_reference=nil;};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){top_layer=(function(){if($truthy(($ret_or_44=$send(self.window_registry,'collect',[],($$89=function(uuid,entry){var self=$$89.$$s==null?this:$$89.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$89.$$s=self,$$89.$$arity=2,$$89)).$max()))){return $ret_or_44}else{return 0};return nil;})();if(the_record['$[]']("layer")['$=='](top_layer)){return true}else{return false};}else{return false};},$Page_window_is_in_front$ques$88.$$arity=-1);Opal.def(self,'$window_send_to_back',$Page_window_send_to_back$90=function $$window_send_to_back(the_reference){var self=this,the_record=nil,back_layer=nil,$writer=nil;if(the_reference==null){the_reference=nil;};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if($truthy(self['$window_is_in_back?'](the_reference))){return nil}else{back_layer=self.$window_back_layer();the_record['$[]']("window").$gxg_merge_style("z-index",$rb_plus(200,back_layer));$writer=["layer",back_layer];$send(the_record,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;}}else{return false};},$Page_window_send_to_back$90.$$arity=-1);Opal.def(self,'$window_bring_to_front',$Page_window_bring_to_front$91=function $$window_bring_to_front(the_reference,options){var self=this,the_record=nil,front_layer=nil,$writer=nil;if(the_reference==null){the_reference=nil;};if(options==null){options=$hash2([],{});};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if(the_record['$[]']("layer")['$=='](self.$window_top_layer())){}else{front_layer=self.$window_next_layer();the_record['$[]']("window").$gxg_merge_style("z-index",$rb_plus(200,front_layer));$writer=["layer",front_layer];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};return true;}else{return false};},$Page_window_bring_to_front$91.$$arity=-1);Opal.def(self,'$next_minimize_slot',$Page_next_minimize_slot$92=function $$next_minimize_slot(){var $$93,self=this,cell_width=nil,cell_height=nil,bounds=nil,columns=nil,rows=nil,found=nil;cell_width=200;cell_height=24;bounds=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area();columns=Opal.Range.$new(0,$rb_minus(bounds['$[]']("right"),bounds['$[]']("left")).$step(cell_width).$size(),false);rows=Opal.Range.$new(0,$rb_minus(bounds['$[]']("bottom"),bounds['$[]']("top")).$step(cell_height).$size(),false);found=nil;(function(){var $brk=Opal.new_brk();try{return $send(Opal.Range.$new(0,$rb_minus(rows,1),false),'each',[],($$93=function(the_row){var self=$$93.$$s==null?this:$$93.$$s,$$94;if(the_row==null){the_row=nil;};(function(){var $brk=Opal.new_brk();try{return $send(Opal.Range.$new(0,$rb_minus(columns,1),false),'each',[],($$94=function(the_column){var self=$$94.$$s==null?this:$$94.$$s,$$95,is_in=nil,test_rect=nil;if(self.window_registry==null)self.window_registry=nil;if(the_column==null){the_column=nil;};is_in=false;test_rect=$hash2(["top","left","right","bottom"],{"top":$rb_plus(bounds['$[]']("top"),$rb_times(the_row,cell_height)),"left":$rb_plus(bounds['$[]']("left"),$rb_times(the_column,cell_width)),"right":$rb_plus($rb_plus(bounds['$[]']("left"),$rb_times(the_column,cell_width)),cell_width),"bottom":$rb_plus($rb_plus(bounds['$[]']("top"),$rb_times(the_row,cell_height)),cell_height)});(function(){var $brk=Opal.new_brk();try{return $send(self.window_registry.$values(),'each',[],($$95=function(the_record){var self=$$95.$$s==null?this:$$95.$$s,this_rect=nil,$writer=nil,$ret_or_45=nil,$ret_or_46=nil,$ret_or_47=nil;if(the_record==null){the_record=nil;};this_rect=$hash2(["top","left","right","bottom"],{"top":0,"left":0,"right":0,"bottom":0});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(this_rect,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(this_rect,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["right",(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i()];$send(this_rect,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["bottom",(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i()];$send(this_rect,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy((function(){if($truthy(($ret_or_45=(function(){if($truthy(($ret_or_46=(function(){if($truthy(($ret_or_47=this_rect['$[]']("top")['$=='](test_rect['$[]']("top"))))){return this_rect['$[]']("left")['$=='](test_rect['$[]']("left"))}else{return $ret_or_47};return nil;})()))){return this_rect['$[]']("right")['$=='](test_rect['$[]']("right"))}else{return $ret_or_46};return nil;})()))){return this_rect['$[]']("bottom")['$=='](test_rect['$[]']("bottom"))}else{return $ret_or_45};return nil;})())){is_in=true;Opal.brk(nil,$brk);}else{return nil};},$$95.$$s=self,$$95.$$brk=$brk,$$95.$$arity=1,$$95))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();if($truthy(is_in)){return nil}else{found=test_rect;Opal.brk(nil,$brk);};},$$94.$$s=self,$$94.$$brk=$brk,$$94.$$arity=1,$$94))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();if($truthy(found)){Opal.brk(nil,$brk)}else{return nil};},$$93.$$s=self,$$93.$$brk=$brk,$$93.$$arity=1,$$93))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();return found;},$Page_next_minimize_slot$92.$$arity=0);Opal.def(self,'$minimize_effect',$Page_minimize_effect$96=function $$minimize_effect(the_record){var $iter=$Page_minimize_effect$96.$$p,block=$iter||nil,$$97,$$98,$$99,self=this,switcher=nil,origin=nil,$writer=nil,origin_right=nil,origin_bottom=nil,destination=nil,destination_right=nil,destination_bottom=nil,conclude=nil,the_slot=nil,animate_content=nil,settings=nil;if($iter)$Page_minimize_effect$96.$$p=null;if($iter)$Page_minimize_effect$96.$$p=null;;if(the_record==null){the_record=nil;};switcher=self.$get_window_switcher();if($truthy(switcher)){origin=$hash2(["opacity"],{"opacity":1});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;origin_right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();origin_bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();$writer=["width",$rb_minus(origin_right,origin['$[]']("left"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(origin_bottom,origin['$[]']("top"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2(["opacity"],{"opacity":0});$writer=["top",(switcher.$element().getBoundingClientRect().top).$to_i()];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(switcher.$element().getBoundingClientRect().right).$to_i()];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination_right=(switcher.$element().getBoundingClientRect().right).$to_i();destination_bottom=(switcher.$element().getBoundingClientRect().top).$to_i();$writer=["width",$rb_minus(destination_right,destination['$[]']("left"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(destination_bottom,destination['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;conclude=$send($$($nesting,'Proc'),'new',[],($$97=function(){var self=$$97.$$s==null?this:$$97.$$s;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil}},$$97.$$s=self,$$97.$$arity=0,$$97));}else{the_slot=self.$next_minimize_slot();origin=$hash2(["opacity"],{"opacity":1});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;origin_right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();origin_bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();$writer=["width",$rb_minus(origin_right,origin['$[]']("left"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(origin_bottom,origin['$[]']("top"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2(["opacity"],{"opacity":0.5});$writer=["top",the_slot['$[]']("top")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",the_slot['$[]']("left")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination_right=the_slot['$[]']("right");destination_bottom=the_slot['$[]']("bottom");$writer=["width",$rb_minus(destination_right,destination['$[]']("left"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(destination_bottom,destination['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;conclude=$send($$($nesting,'Proc'),'new',[],($$98=function(){var self=$$98.$$s==null?this:$$98.$$s;self.$window_send_to_back(the_record['$[]']("window").$uuid());if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil};},$$98.$$s=self,$$98.$$arity=0,$$98));};animate_content=$send($$($nesting,'Proc'),'new',[],($$99=function(){var self=$$99.$$s==null?this:$$99.$$s,top=nil,left=nil,right=nil,bottom=nil;top=(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i();left=(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i();right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();return the_record['$[]']("window").$set_frame($hash2(["top","left","right","bottom"],{"top":top,"left":left,"right":right,"bottom":bottom}));},$$99.$$s=self,$$99.$$arity=0,$$99));the_record['$[]']("window").$animate($hash2(["origin","destination","options"],{"origin":origin,"destination":destination,"options":$hash2(["duration","animationiteration","animationend"],{"duration":500,"animationiteration":animate_content,"animationend":conclude})}));settings=$hash2(["action","top","left","right","bottom"],{"action":"minimize","top":0,"left":0,"right":0,"bottom":0});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["right",(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["bottom",(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return settings;},$Page_minimize_effect$96.$$arity=-1);Opal.def(self,'$unminimize_effect',$Page_unminimize_effect$100=function $$unminimize_effect(the_record){var $iter=$Page_unminimize_effect$100.$$p,block=$iter||nil,$$101,$$102,self=this,switcher=nil,origin=nil,$writer=nil,origin_right=nil,origin_bottom=nil,destination=nil,destination_right=nil,destination_bottom=nil,animate_content=nil,conclude=nil;if($iter)$Page_unminimize_effect$100.$$p=null;if($iter)$Page_unminimize_effect$100.$$p=null;;if(the_record==null){the_record=nil;};switcher=self.$get_window_switcher();if($truthy(switcher)){origin=$hash2(["opacity"],{"opacity":0});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;origin_right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();origin_bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();$writer=["width",$rb_minus(origin_right,origin['$[]']("left"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(origin_bottom,origin['$[]']("top"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2(["opacity"],{"opacity":1});$writer=["top",the_record['$[]']("restore")['$[]']("settings")['$[]']("top")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",the_record['$[]']("restore")['$[]']("settings")['$[]']("left")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination_right=the_record['$[]']("restore")['$[]']("settings")['$[]']("right");destination_bottom=the_record['$[]']("restore")['$[]']("settings")['$[]']("bottom");$writer=["width",$rb_minus(destination_right,destination['$[]']("left"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(destination_bottom,destination['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;}else{origin=$hash2(["opacity"],{"opacity":0.5});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;origin_right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();origin_bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();$writer=["width",$rb_minus(origin_right,origin['$[]']("left"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(origin_bottom,origin['$[]']("top"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2(["opacity"],{"opacity":1});$writer=["top",the_record['$[]']("restore")['$[]']("settings")['$[]']("top")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",the_record['$[]']("restore")['$[]']("settings")['$[]']("left")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination_right=the_record['$[]']("restore")['$[]']("settings")['$[]']("right");destination_bottom=the_record['$[]']("restore")['$[]']("settings")['$[]']("bottom");$writer=["width",$rb_minus(destination_right,destination['$[]']("left"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(destination_bottom,destination['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};animate_content=$send($$($nesting,'Proc'),'new',[],($$101=function(){var self=$$101.$$s==null?this:$$101.$$s,top=nil,left=nil,right=nil,bottom=nil;top=(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i();left=(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i();right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();return the_record['$[]']("window").$set_frame($hash2(["top","left","right","bottom"],{"top":top,"left":left,"right":right,"bottom":bottom}));},$$101.$$s=self,$$101.$$arity=0,$$101));conclude=$send($$($nesting,'Proc'),'new',[],($$102=function(){var self=$$102.$$s==null?this:$$102.$$s;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil}},$$102.$$s=self,$$102.$$arity=0,$$102));the_record['$[]']("window").$animate($hash2(["origin","destination","options"],{"origin":origin,"destination":destination,"options":$hash2(["duration","animationiteration","animationend"],{"duration":500,"animationiteration":animate_content,"animationend":conclude})}));return true;},$Page_unminimize_effect$100.$$arity=-1);Opal.def(self,'$maximize_effect',$Page_maximize_effect$103=function $$maximize_effect(the_record){var $iter=$Page_maximize_effect$103.$$p,block=$iter||nil,$$104,$$105,self=this,bounds=nil,origin=nil,$writer=nil,origin_right=nil,origin_bottom=nil,destination=nil,animate_content=nil,conclude=nil,settings=nil;if($iter)$Page_maximize_effect$103.$$p=null;if($iter)$Page_maximize_effect$103.$$p=null;;if(the_record==null){the_record=nil;};bounds=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area();origin=$hash2([],{});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;origin_right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();origin_bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();$writer=["width",$rb_minus(origin_right,origin['$[]']("left"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(origin_bottom,origin['$[]']("top"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2([],{});$writer=["top",bounds['$[]']("top")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",bounds['$[]']("left")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["width",$rb_minus(bounds['$[]']("right"),destination['$[]']("left"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(bounds['$[]']("bottom"),destination['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;animate_content=$send($$($nesting,'Proc'),'new',[],($$104=function(){var self=$$104.$$s==null?this:$$104.$$s,top=nil,left=nil,right=nil,bottom=nil;top=(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i();left=(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i();right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();return the_record['$[]']("window").$set_frame($hash2(["top","left","right","bottom"],{"top":top,"left":left,"right":right,"bottom":bottom}));},$$104.$$s=self,$$104.$$arity=0,$$104));conclude=$send($$($nesting,'Proc'),'new',[],($$105=function(){var self=$$105.$$s==null?this:$$105.$$s;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil}},$$105.$$s=self,$$105.$$arity=0,$$105));the_record['$[]']("window").$animate($hash2(["origin","destination","options"],{"origin":origin,"destination":destination,"options":$hash2(["duration","animationiteration","animationend"],{"duration":500,"animationiteration":animate_content,"animationend":conclude})}));settings=$hash2(["action","top","left","right","bottom"],{"action":"maximize","top":0,"left":0,"right":0,"bottom":0});$writer=["top",bounds['$[]']("top")];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",bounds['$[]']("left")];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["right",bounds['$[]']("right")];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["bottom",bounds['$[]']("bottom")];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return settings;},$Page_maximize_effect$103.$$arity=-1);Opal.def(self,'$unmaximize_effect',$Page_unmaximize_effect$106=function $$unmaximize_effect(the_record){var $iter=$Page_unmaximize_effect$106.$$p,block=$iter||nil,$$107,$$108,self=this,origin=nil,$writer=nil,origin_right=nil,origin_bottom=nil,destination=nil,destination_right=nil,destination_bottom=nil,animate_content=nil,conclude=nil;if($iter)$Page_unmaximize_effect$106.$$p=null;if($iter)$Page_unmaximize_effect$106.$$p=null;;if(the_record==null){the_record=nil;};origin=$hash2([],{});$writer=["top",the_record['$[]']("window").$top()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",the_record['$[]']("window").$left()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;origin_right=the_record['$[]']("window").$right();origin_bottom=the_record['$[]']("window").$bottom();$writer=["width",$rb_minus(origin_right,origin['$[]']("left"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(origin_bottom,origin['$[]']("top"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2([],{});$writer=["top",the_record['$[]']("restore")['$[]']("settings")['$[]']("top")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",the_record['$[]']("restore")['$[]']("settings")['$[]']("left")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination_right=the_record['$[]']("restore")['$[]']("settings")['$[]']("right");destination_bottom=the_record['$[]']("restore")['$[]']("settings")['$[]']("bottom");$writer=["width",$rb_minus(destination_right,destination['$[]']("left"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(destination_bottom,destination['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;animate_content=$send($$($nesting,'Proc'),'new',[],($$107=function(){var self=$$107.$$s==null?this:$$107.$$s,top=nil,left=nil,right=nil,bottom=nil;top=(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i();left=(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i();right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();return the_record['$[]']("window").$set_frame($hash2(["top","left","right","bottom"],{"top":top,"left":left,"right":right,"bottom":bottom}));},$$107.$$s=self,$$107.$$arity=0,$$107));conclude=$send($$($nesting,'Proc'),'new',[],($$108=function(){var self=$$108.$$s==null?this:$$108.$$s;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil}},$$108.$$s=self,$$108.$$arity=0,$$108));the_record['$[]']("window").$animate($hash2(["origin","destination","options"],{"origin":origin,"destination":destination,"options":$hash2(["duration","animationiteration","animationend"],{"duration":500,"animationiteration":animate_content,"animationend":conclude})}));return true;},$Page_unmaximize_effect$106.$$arity=-1);Opal.def(self,'$rollup_effect',$Page_rollup_effect$109=function $$rollup_effect(the_record){var $iter=$Page_rollup_effect$109.$$p,block=$iter||nil,$$110,self=this,origin=nil,the_top=nil,$writer=nil,destination=nil,window_body=nil,settings=nil;if($iter)$Page_rollup_effect$109.$$p=null;if($iter)$Page_rollup_effect$109.$$p=null;;if(the_record==null){the_record=nil;};origin=$hash2([],{});the_top=the_record['$[]']("window").$top();$writer=["height",the_record['$[]']("window").$height()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2([],{});$writer=["height",24];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;window_body=the_record['$[]']("window").$find_child("window_body",true);if($truthy(window_body)){$send(window_body,'hide',[$hash2(["origin","destination"],{"origin":$hash2(["opacity"],{"opacity":1.0}),"destination":$hash2(["opacity"],{"opacity":0.0})})],($$110=function(){var self=$$110.$$s==null?this:$$110.$$s;the_record['$[]']("window").$animate($hash2(["origin","destination"],{"origin":origin,"destination":destination}));if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil};},$$110.$$s=self,$$110.$$arity=0,$$110))};settings=$hash2(["action","top","left","right","bottom"],{"action":"rollup","top":0,"left":0,"right":0,"bottom":0});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["right",(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["bottom",(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return settings;},$Page_rollup_effect$109.$$arity=-1);Opal.def(self,'$rolldown_effect',$Page_rolldown_effect$111=function $$rolldown_effect(the_record){var $iter=$Page_rolldown_effect$111.$$p,block=$iter||nil,$$112,self=this,origin=nil,$writer=nil,destination=nil,conclude=nil;if($iter)$Page_rolldown_effect$111.$$p=null;if($iter)$Page_rolldown_effect$111.$$p=null;;if(the_record==null){the_record=nil;};origin=$hash2([],{});$writer=["height",24];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2([],{});$writer=["height",$rb_minus(the_record['$[]']("restore")['$[]']("settings")['$[]']("bottom"),the_record['$[]']("restore")['$[]']("settings")['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;conclude=$send($$($nesting,'Proc'),'new',[],($$112=function(){var self=$$112.$$s==null?this:$$112.$$s,$$113,window_body=nil;window_body=the_record['$[]']("window").$find_child("window_body",true);if($truthy(window_body)){return $send(window_body,'show',[$hash2(["origin","destination"],{"origin":$hash2(["opacity"],{"opacity":0.0}),"destination":$hash2(["opacity"],{"opacity":1.0})})],($$113=function(){var self=$$113.$$s==null?this:$$113.$$s;the_record['$[]']("window").$commit_settings();if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil};},$$113.$$s=self,$$113.$$arity=0,$$113))}else{return nil};},$$112.$$s=self,$$112.$$arity=0,$$112));the_record['$[]']("window").$animate($hash2(["origin","destination","options"],{"origin":origin,"destination":destination,"options":$hash2(["duration","animationend"],{"duration":500,"animationend":conclude})}));return true;},$Page_rolldown_effect$111.$$arity=-1);Opal.def(self,'$window_restoreable?',$Page_window_restoreable$ques$114=function(the_reference){var self=this,the_record=nil;if(the_reference==null){the_reference=nil;};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if($truthy(the_record['$[]']("restore")['$is_a?']($$$('::','Hash')))){return true}else{return false}}else{return false};},$Page_window_restoreable$ques$114.$$arity=-1);Opal.def(self,'$window_restore',$Page_window_restore$115=function $$window_restore(the_reference,options){var $iter=$Page_window_restore$115.$$p,block=$iter||nil,$$116,$$117,$$118,self=this,the_record=nil,$case=nil;if($iter)$Page_window_restore$115.$$p=null;if($iter)$Page_window_restore$115.$$p=null;;if(the_reference==null){the_reference=nil;};if(options==null){options=$hash2([],{});};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if($truthy(the_record['$[]']("restore")['$is_a?']($$$('::','Hash')))){$case=the_record['$[]']("restore")['$[]']("action");if("minimize"['$===']($case)){$send(self,'unminimize_effect',[the_record],($$116=function(){var self=$$116.$$s==null?this:$$116.$$s,$writer=nil;the_record['$[]']("window").$clear_special_state(the_record['$[]']("restore")['$[]']("settings"));$writer=["restore",nil];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil};},$$116.$$s=self,$$116.$$arity=0,$$116))} -else if("maximize"['$===']($case)){$send(self,'unmaximize_effect',[the_record],($$117=function(){var self=$$117.$$s==null?this:$$117.$$s,$writer=nil;the_record['$[]']("window").$clear_special_state(the_record['$[]']("restore")['$[]']("settings"));$writer=["restore",nil];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil};},$$117.$$s=self,$$117.$$arity=0,$$117))} -else if("rollup"['$===']($case)){$send(self,'rolldown_effect',[the_record],($$118=function(){var self=$$118.$$s==null?this:$$118.$$s,$writer=nil;the_record['$[]']("window").$clear_special_state(the_record['$[]']("restore")['$[]']("settings"));$writer=["restore",nil];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil};},$$118.$$s=self,$$118.$$arity=0,$$118))};return true;}else{return false}}else{return false};},$Page_window_restore$115.$$arity=-1);Opal.def(self,'$window_minimize',$Page_window_minimize$119=function $$window_minimize(the_reference,settings){var $$120,self=this,the_record=nil,$writer=nil;if(the_reference==null){the_reference=nil;};if(settings==null){settings=$hash2([],{});};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if($truthy(self['$window_restoreable?'](the_reference))){$send(self,'window_restore',[the_reference],($$120=function(){var self=$$120.$$s==null?this:$$120.$$s,$writer=nil;settings=$hash2(["top","left","right","bottom"],{"top":the_record['$[]']("window").$top(),"left":the_record['$[]']("window").$left(),"right":the_record['$[]']("window").$right(),"bottom":the_record['$[]']("window").$bottom()});$writer=["restore",$hash2(["action","settings"],{"action":"minimize","settings":settings})];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return the_record['$[]']("window").$set_special_state(self.$minimize_effect(the_record));},$$120.$$s=self,$$120.$$arity=0,$$120))}else{$writer=["restore",$hash2(["action","settings"],{"action":"minimize","settings":settings})];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;the_record['$[]']("window").$set_special_state(self.$minimize_effect(the_record));};return true;}else{return false};},$Page_window_minimize$119.$$arity=-1);Opal.def(self,'$window_maximize',$Page_window_maximize$121=function $$window_maximize(the_reference,settings){var $$122,self=this,the_record=nil,$writer=nil;if(the_reference==null){the_reference=nil;};if(settings==null){settings=$hash2([],{});};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if($truthy(self['$window_restoreable?'](the_reference))){$send(self,'window_restore',[the_reference],($$122=function(){var self=$$122.$$s==null?this:$$122.$$s,$writer=nil;settings=$hash2(["top","left","right","bottom"],{"top":the_record['$[]']("window").$top(),"left":the_record['$[]']("window").$left(),"right":the_record['$[]']("window").$right(),"bottom":the_record['$[]']("window").$bottom()});$writer=["restore",$hash2(["action","settings"],{"action":"maximize","settings":settings})];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;the_record['$[]']("window").$set_special_state(self.$maximize_effect(the_record));return self.$window_bring_to_front(the_reference);},$$122.$$s=self,$$122.$$arity=0,$$122))}else{$writer=["restore",$hash2(["action","settings"],{"action":"maximize","settings":settings})];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;the_record['$[]']("window").$set_special_state(self.$maximize_effect(the_record));self.$window_bring_to_front(the_reference);};return true;}else{return false};},$Page_window_maximize$121.$$arity=-1);Opal.def(self,'$window_rollup',$Page_window_rollup$123=function $$window_rollup(the_reference,settings){var $$124,self=this,the_record=nil,$writer=nil;if(the_reference==null){the_reference=nil;};if(settings==null){settings=$hash2([],{});};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if($truthy(self['$window_restoreable?'](the_reference))){$send(self,'window_restore',[the_reference],($$124=function(){var self=$$124.$$s==null?this:$$124.$$s,$writer=nil;settings=$hash2(["top","left","right","bottom"],{"top":the_record['$[]']("window").$top(),"left":the_record['$[]']("window").$left(),"right":the_record['$[]']("window").$right(),"bottom":the_record['$[]']("window").$bottom()});$writer=["restore",$hash2(["action","settings"],{"action":"rollup","settings":settings})];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return the_record['$[]']("window").$set_special_state(self.$rollup_effect(the_record));},$$124.$$s=self,$$124.$$arity=0,$$124))}else{$writer=["restore",$hash2(["action","settings"],{"action":"rollup","settings":settings})];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;the_record['$[]']("window").$set_special_state(self.$rollup_effect(the_record));};return true;}else{return false};},$Page_window_rollup$123.$$arity=-1);Opal.def(self,'$get_window_registration',$Page_get_window_registration$125=function $$get_window_registration(the_reference){var self=this;if(the_reference==null){the_reference=nil;};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){return self.window_registry['$[]'](the_reference)}else{return nil};},$Page_get_window_registration$125.$$arity=-1);Opal.def(self,'$get_window',$Page_get_window$126=function $$get_window(the_reference){var self=this,registration=nil;if(the_reference==null){the_reference=nil;};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){registration=self.$get_window_registration(the_reference);if($truthy(registration)){return registration['$[]']("window")}else{return nil};}else{return nil};},$Page_get_window$126.$$arity=-1);Opal.def(self,'$window_list',$Page_window_list$127=function $$window_list(){var $$128,self=this,result=nil;result=[];$send(self.window_registry.$keys(),'each',[],($$128=function(reference){var self=$$128.$$s==null?this:$$128.$$s;if(self.window_registry==null)self.window_registry=nil;if(reference==null){reference=nil;};return result['$<<']($hash2(["uuid","title"],{"uuid":reference,"title":self.window_registry['$[]'](reference)['$[]']("window").$title()}));},$$128.$$s=self,$$128.$$arity=1,$$128));return result;},$Page_window_list$127.$$arity=0);Opal.def(self,'$window_repack_layers',$Page_window_repack_layers$129=function $$window_repack_layers(){var $$130,$$131,self=this;self.window_registry=$send(self.window_registry,'sort_by',[],($$130=function(uuid,entry){var self=$$130.$$s==null?this:$$130.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$130.$$s=self,$$130.$$arity=2,$$130)).$to_h();$send(self.window_registry.$values(),'each_with_index',[],($$131=function(entry,indexer){var self=$$131.$$s==null?this:$$131.$$s,$writer=nil;if(entry==null){entry=nil;};if(indexer==null){indexer=nil;};entry['$[]']("window").$gxg_merge_style("z-index",$rb_plus(200,indexer));$writer=["layer",indexer];$send(entry,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$$131.$$s=self,$$131.$$arity=2,$$131));return true;},$Page_window_repack_layers$129.$$arity=0);Opal.def(self,'$window_top_layer',$Page_window_top_layer$132=function $$window_top_layer(){var $$133,self=this,$ret_or_48=nil;if($truthy(($ret_or_48=$send(self.window_registry,'collect',[],($$133=function(uuid,entry){var self=$$133.$$s==null?this:$$133.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$133.$$s=self,$$133.$$arity=2,$$133)).$max()))){return $ret_or_48}else{return 0}},$Page_window_top_layer$132.$$arity=0);Opal.def(self,'$window_back_layer',$Page_window_back_layer$134=function $$window_back_layer(){var $$135,$$136,self=this,back_layer=nil,$ret_or_49=nil,$ret_or_50=nil;back_layer=$rb_minus((function(){if($truthy(($ret_or_49=$send(self.window_registry,'collect',[],($$135=function(uuid,entry){var self=$$135.$$s==null?this:$$135.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$135.$$s=self,$$135.$$arity=2,$$135)).$min()))){return $ret_or_49}else{return 0};return nil;})(),1);if($truthy($rb_lt(back_layer,100))){self.$window_repack_layers();back_layer=$rb_minus((function(){if($truthy(($ret_or_50=$send(self.window_registry,'collect',[],($$136=function(uuid,entry){var self=$$136.$$s==null?this:$$136.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$136.$$s=self,$$136.$$arity=2,$$136)).$min()))){return $ret_or_50}else{return 0};return nil;})(),1);};return back_layer;},$Page_window_back_layer$134.$$arity=0);Opal.def(self,'$window_next_layer',$Page_window_next_layer$137=function $$window_next_layer(){var $$138,$$139,self=this,next_layer=nil,$ret_or_51=nil,$ret_or_52=nil;next_layer=$rb_plus((function(){if($truthy(($ret_or_51=$send(self.window_registry,'collect',[],($$138=function(uuid,entry){var self=$$138.$$s==null?this:$$138.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$138.$$s=self,$$138.$$arity=2,$$138)).$max()))){return $ret_or_51}else{return 0};return nil;})(),1);if($truthy($rb_gt(next_layer,99))){self.$window_repack_layers();next_layer=$rb_plus((function(){if($truthy(($ret_or_52=$send(self.window_registry,'collect',[],($$139=function(uuid,entry){var self=$$139.$$s==null?this:$$139.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$139.$$s=self,$$139.$$arity=2,$$139)).$max()))){return $ret_or_52}else{return 0};return nil;})(),1);};return next_layer;},$Page_window_next_layer$137.$$arity=0);Opal.def(self,'$window_register',$Page_window_register$140=function $$window_register(the_reference,the_instance){var self=this,front_layer=nil,$writer=nil;if(the_reference==null){the_reference=nil;};if(the_instance==null){the_instance=nil;};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){if($truthy(the_instance)){front_layer=self.$window_next_layer();the_instance.$gxg_merge_style("z-index",$rb_plus(200,front_layer));$writer=[the_reference,$hash2(["window","layer","restore"],{"window":the_instance,"layer":front_layer,"restore":nil})];$send(self.window_registry,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}else{return false}}else{return false};},$Page_window_register$140.$$arity=-1);Opal.def(self,'$window_unregister',$Page_window_unregister$141=function $$window_unregister(the_reference){var self=this;if(the_reference==null){the_reference=nil;};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){self.window_registry.$delete(the_reference);return true;}else{return false};},$Page_window_unregister$141.$$arity=-1);Opal.def(self,'$set_window_switcher',$Page_set_window_switcher$142=function $$set_window_switcher(the_switcher){var self=this;if(the_switcher==null){the_switcher=nil;};if($truthy(the_switcher)){return(self.window_switcher=the_switcher)}else{return nil};},$Page_set_window_switcher$142.$$arity=-1);return(Opal.def(self,'$get_window_switcher',$Page_get_window_switcher$143=function $$get_window_switcher(){var self=this;return self.window_switcher},$Page_get_window_switcher$143.$$arity=0),nil)&&'get_window_switcher';})($nesting[0],null,$nesting)})($nesting[0],$nesting);})($nesting[0],$nesting)})($nesting[0],$nesting)};Opal.modules["web/gxg_gui"]=function(Opal){function $rb_gt(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs>rhs:lhs['$>'](rhs);} +else{return nil}})();},$$13.$$s=self,$$13.$$arity=2,$$13));return record['$[]']("object").$gxg_merge_style(new_style);},$$12.$$s=self,$$12.$$arity=2,$$12));};if($truthy(self.menu_bar)){self.menu_area.$gxg_merge_style($hash2(["width"],{"width":""+($rb_minus(self.$width(),$rb_times(self.resize_margin,2)))+"px"}));if($truthy(self.menu_bar['$respond_to?']("update_appearance"))){return self.menu_bar.$update_appearance()}else{return nil};}else{return nil};},$Window_commit_settings$11.$$arity=0);Opal.def(self,'$track_deltas',$Window_track_deltas$14=function $$track_deltas(the_reference,the_object,details){var self=this,$ret_or_1=nil,$ret_or_2=nil,$writer=nil;if(the_reference==null){the_reference=nil;};if(the_object==null){the_object=nil;};if(details==null){details=$hash2([],{});};if($truthy((function(){if($truthy(($ret_or_1=(function(){if($truthy(($ret_or_2=the_reference))){return the_object}else{return $ret_or_2};return nil;})()))){return details['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash'))}else{return $ret_or_1};return nil;})())){$writer=[the_reference,$hash2(["object","details"],{"object":the_object,"details":details})];$send(self.tracking,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}else{return false};},$Window_track_deltas$14.$$arity=-1);Opal.def(self,'$untrack_deltas',$Window_untrack_deltas$15=function $$untrack_deltas(the_reference){var self=this;if(the_reference==null){the_reference=nil;};if($truthy(the_reference)){self.tracking.$delete(the_reference);return true;}else{return false};},$Window_untrack_deltas$15.$$arity=-1);Opal.def(self,'$content',$Window_content$16=function $$content(){var self=this;return self.content},$Window_content$16.$$arity=0);Opal.def(self,'$content_width',$Window_content_width$17=function $$content_width(){var self=this;if($truthy(self.content)){return(self.content.$element().getBoundingClientRect().right-self.content.$element().getBoundingClientRect().left).$to_i()}else{return 0}},$Window_content_width$17.$$arity=0);Opal.def(self,'$content_height',$Window_content_height$18=function $$content_height(){var self=this;if($truthy(self.content)){return(self.content.$element().getBoundingClientRect().bottom-self.content.$element().getBoundingClientRect().top).$to_i()}else{return 0}},$Window_content_height$18.$$arity=0);Opal.def(self,'$set_top',$Window_set_top$19=function $$set_top(the_top){var self=this;if(the_top==null){the_top=nil;};if($truthy(the_top['$is_a?']($$$('::','Numeric')))){if($truthy($rb_ge($rb_minus(self.bottom,the_top),100))){if($truthy($rb_ge(the_top,$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area()['$[]']("top")))){self.top=the_top;self.$fit_within_boundaries();return self.$commit_settings();}else{return nil}}else{return nil}}else{return nil};},$Window_set_top$19.$$arity=-1);$alias(self,"top=","set_top");Opal.def(self,'$top',$Window_top$20=function $$top(){var self=this;return self.top},$Window_top$20.$$arity=0);Opal.def(self,'$set_left',$Window_set_left$21=function $$set_left(the_left){var self=this;if(the_left==null){the_left=nil;};if($truthy(the_left['$is_a?']($$$('::','Numeric')))){if($truthy($rb_ge($rb_minus(self.right,the_left),200))){if($truthy($rb_ge(the_left,$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area()['$[]']("left")))){self.left=the_left;self.$fit_within_boundaries();return self.$commit_settings();}else{return nil}}else{return nil}}else{return nil};},$Window_set_left$21.$$arity=-1);$alias(self,"left=","set_left");Opal.def(self,'$left',$Window_left$22=function $$left(){var self=this;return self.left},$Window_left$22.$$arity=0);Opal.def(self,'$set_right',$Window_set_right$23=function $$set_right(the_right){var self=this;if(the_right==null){the_right=nil;};if($truthy(the_right['$is_a?']($$$('::','Numeric')))){if($truthy($rb_ge($rb_minus(the_right,self.left),200))){if($truthy($rb_le(the_right,$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area()['$[]']("right")))){self.right=the_right;self.$fit_within_boundaries();return self.$commit_settings();}else{return nil}}else{return nil}}else{return nil};},$Window_set_right$23.$$arity=-1);$alias(self,"right=","set_right");Opal.def(self,'$right',$Window_right$24=function $$right(){var self=this;return self.right},$Window_right$24.$$arity=0);Opal.def(self,'$set_bottom',$Window_set_bottom$25=function $$set_bottom(the_bottom){var self=this;if(the_bottom==null){the_bottom=nil;};if($truthy(the_bottom['$is_a?']($$$('::','Numeric')))){if($truthy($rb_ge($rb_minus(the_bottom,self.top),100))){if($truthy($rb_le(the_bottom,$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area()['$[]']("bottom")))){self.bottom=the_bottom;self.$fit_within_boundaries();return self.$commit_settings();}else{return nil}}else{return nil}}else{return nil};},$Window_set_bottom$25.$$arity=-1);$alias(self,"bottom=","set_bottom");Opal.def(self,'$bottom',$Window_bottom$26=function $$bottom(){var self=this;return self.bottom},$Window_bottom$26.$$arity=0);Opal.def(self,'$set_width',$Window_set_width$27=function $$set_width(the_width){var self=this;if(the_width==null){the_width=nil;};if($truthy(the_width['$is_a?']($$$('::','Numeric')))){if($truthy($rb_ge(the_width,200))){if($truthy($rb_le($rb_plus(self.left,the_width),$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area()['$[]']("right")))){self.right=$rb_plus(self.left,the_width);self.$fit_within_boundaries();return self.$commit_settings();}else{return nil}}else{return nil}}else{return nil};},$Window_set_width$27.$$arity=-1);$alias(self,"width=","set_width");Opal.def(self,'$width',$Window_width$28=function $$width(){var self=this;return $rb_minus(self.right,self.left)},$Window_width$28.$$arity=0);Opal.def(self,'$set_height',$Window_set_height$29=function $$set_height(the_height){var self=this;if(the_height==null){the_height=nil;};if($truthy(the_height['$is_a?']($$$('::','Numeric')))){if($truthy($rb_ge(the_height,100))){if($truthy($rb_le($rb_plus(self.top,the_height),$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area()['$[]']("bottom")))){self.bottom=$rb_plus(self.top,the_height);self.$fit_within_boundaries();return self.$commit_settings();}else{return nil}}else{return nil}}else{return nil};},$Window_set_height$29.$$arity=-1);$alias(self,"height=","set_height");Opal.def(self,'$height',$Window_height$30=function $$height(){var self=this;return $rb_minus(self.bottom,self.top)},$Window_height$30.$$arity=0);Opal.def(self,'$set_position',$Window_set_position$31=function $$set_position(the_x,the_y){var self=this,the_width=nil,the_height=nil,bounds=nil,$ret_or_3=nil,$ret_or_4=nil;if(the_x==null){the_x=nil;};if(the_y==null){the_y=nil;};the_width=self.$width();the_height=self.$height();bounds=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area();if($truthy((function(){if($truthy(($ret_or_3=Opal.Range.$new(bounds['$[]']("top"),bounds['$[]']("bottom"),false)['$include?'](the_y.$to_i())))){return Opal.Range.$new(bounds['$[]']("top"),bounds['$[]']("bottom"),false)['$include?']($rb_plus(the_y.$to_i(),the_height))}else{return $ret_or_3};return nil;})())){self.top=the_y.$to_i()};if($truthy((function(){if($truthy(($ret_or_4=Opal.Range.$new(bounds['$[]']("left"),bounds['$[]']("right"),false)['$include?'](the_x.$to_i())))){return Opal.Range.$new(bounds['$[]']("left"),bounds['$[]']("right"),false)['$include?']($rb_plus(the_x.$to_i(),the_width))}else{return $ret_or_4};return nil;})())){self.left=the_x.$to_i()};self.bottom=$rb_plus(self.top,the_height);self.right=$rb_plus(self.left,the_width);self.$fit_within_boundaries();return self.$commit_settings();},$Window_set_position$31.$$arity=-1);Opal.def(self,'$set_frame',$Window_set_frame$32=function $$set_frame(settings){var self=this,$ret_or_5=nil,$ret_or_6=nil,$ret_or_7=nil,$ret_or_8=nil;if(settings==null){settings=nil;};if($truthy(settings['$is_a?']($$$('::','Hash')))){self.top=(function(){if($truthy(($ret_or_5=settings['$[]']("top")))){return $ret_or_5}else{return self.top};return nil;})();self.left=(function(){if($truthy(($ret_or_6=settings['$[]']("left")))){return $ret_or_6}else{return self.left};return nil;})();self.right=(function(){if($truthy(($ret_or_7=settings['$[]']("right")))){return $ret_or_7}else{return self.right};return nil;})();self.bottom=(function(){if($truthy(($ret_or_8=settings['$[]']("bottom")))){return $ret_or_8}else{return self.bottom};return nil;})();self.$fit_within_boundaries();return self.$commit_settings();}else{return nil};},$Window_set_frame$32.$$arity=-1);Opal.def(self,'$position',$Window_position$33=function $$position(){var self=this;return $hash2(["x","y"],{"x":self.left,"y":self.top})},$Window_position$33.$$arity=0);Opal.def(self,'$fit_within_boundaries',$Window_fit_within_boundaries$34=function $$fit_within_boundaries(){var self=this,the_width=nil,the_height=nil,bounds=nil;the_width=self.$width();the_height=self.$height();bounds=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area();if($truthy($rb_lt(self.top,bounds['$[]']("top")))){self.top=bounds['$[]']("top")};if($truthy($rb_lt(self.left,bounds['$[]']("left")))){self.left=bounds['$[]']("left")};self.right=$rb_plus(self.left,the_width);self.bottom=$rb_plus(self.top,the_height);if($truthy($rb_gt(self.bottom,bounds['$[]']("bottom")))){self.bottom=bounds['$[]']("bottom")};if($truthy($rb_gt(self.right,bounds['$[]']("right")))){return(self.right=bounds['$[]']("right"))}else{return nil};},$Window_fit_within_boundaries$34.$$arity=0);Opal.def(self,'$set_window_title',$Window_set_window_title$35=function $$set_window_title(the_title){var self=this;if(the_title==null){the_title=nil;};if($truthy(self.title_object)){if($truthy(the_title['$is_a?']($$$('::','String')))){self.window_title=the_title;self.title_object.$set_text(self.window_title);return self.title_object.$parent().$gxg_merge_style($hash2(["padding"],{"padding":""+"0px 0px 0px "+($rb_minus($rb_minus($rb_divide(self.$width(),2),$rb_times($rb_divide(self.window_title.$size(),2),8)),60))+"px"}));}else{return nil}}else{return nil};},$Window_set_window_title$35.$$arity=-1);$alias(self,"window_title=","set_window_title");Opal.def(self,'$window_title',$Window_window_title$36=function $$window_title(){var self=this;if($truthy(self.title_object)){return self.window_title}else{return nil}},$Window_window_title$36.$$arity=0);Opal.def(self,'$special_state',$Window_special_state$37=function $$special_state(){var self=this;return self.special_state},$Window_special_state$37.$$arity=0);Opal.def(self,'$set_special_state',$Window_set_special_state$38=function $$set_special_state(settings){var self=this,$ret_or_9=nil,$ret_or_10=nil,$ret_or_11=nil,$ret_or_12=nil;if(settings==null){settings=nil;};if($truthy(settings['$is_a?']($$$('::','Hash')))){self.special_state=settings;self.top=(function(){if($truthy(($ret_or_9=settings['$[]']("top")))){return $ret_or_9}else{return self.top};return nil;})();self.left=(function(){if($truthy(($ret_or_10=settings['$[]']("left")))){return $ret_or_10}else{return self.left};return nil;})();self.right=(function(){if($truthy(($ret_or_11=settings['$[]']("right")))){return $ret_or_11}else{return self.right};return nil;})();self.bottom=(function(){if($truthy(($ret_or_12=settings['$[]']("bottom")))){return $ret_or_12}else{return self.bottom};return nil;})();self.$fit_within_boundaries();return self.$commit_settings();}else{return nil};},$Window_set_special_state$38.$$arity=-1);Opal.def(self,'$clear_special_state',$Window_clear_special_state$39=function $$clear_special_state(settings){var self=this;if(settings==null){settings=nil;};self.special_state=nil;if($truthy(settings['$is_a?']($$$('::','Hash')))){return self.$set_frame(settings)}else{return nil};},$Window_clear_special_state$39.$$arity=-1);Opal.def(self,'$initialize',$Window_initialize$40=function $$initialize(the_parent,the_options,other_data){var $iter=$Window_initialize$40.$$p,$yield=$iter||nil,self=this,bounds=nil,$ret_or_13=nil,$ret_or_14=nil,$ret_or_15=nil,$ret_or_16=nil,$ret_or_17=nil,$ret_or_18=nil,$ret_or_19=nil,$ret_or_20=nil,$ret_or_21=nil,$ret_or_22=nil,$ret_or_23=nil,$ret_or_24=nil,$ret_or_25=nil,$ret_or_26=nil,$ret_or_27=nil,$ret_or_28=nil;if($iter)$Window_initialize$40.$$p=null;if(other_data==null){other_data=$hash2([],{});};$$$($$$('::','GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_refresh();bounds=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area();self.special_state=nil;self.content=nil;if($truthy((function(){if($truthy(($ret_or_13=the_options['$[]']("top")['$is_a?']($$$('::','String'))))){return $ret_or_13}else{return the_options['$[]']("top").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("top")['$is_a?']($$$('::','String')))){self.top=$rb_times(bounds['$[]']("page_height"),$rb_divide(the_options['$[]']("top").$gsub("%","").$to_f(),100.0))}else{self.top=$rb_times(bounds['$[]']("page_height"),$rb_divide(the_options['$[]']("top"),100.0))}}else{self.top=(function(){if($truthy(($ret_or_14=the_options['$[]']("top")))){return $ret_or_14}else{return $rb_minus($rb_divide((window.innerHeight).$to_i(),2),50);};return nil;})()};if($truthy((function(){if($truthy(($ret_or_15=the_options['$[]']("left")['$is_a?']($$$('::','String'))))){return $ret_or_15}else{return the_options['$[]']("left").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("left")['$is_a?']($$$('::','String')))){self.left=$rb_times(bounds['$[]']("page_width"),$rb_divide(the_options['$[]']("left").$gsub("%","").$to_f(),100.0))}else{self.left=$rb_times(bounds['$[]']("page_width"),$rb_divide(the_options['$[]']("left"),100.0))}}else{self.left=(function(){if($truthy(($ret_or_16=the_options['$[]']("left")))){return $ret_or_16}else{return $rb_minus($rb_divide((window.innerWidth).$to_i(),2),100);};return nil;})()};if($truthy((function(){if($truthy(($ret_or_17=the_options['$[]']("right")['$is_a?']($$$('::','String'))))){return $ret_or_17}else{return the_options['$[]']("right").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("right")['$is_a?']($$$('::','String')))){self.right=$rb_times(bounds['$[]']("page_width"),$rb_divide(the_options['$[]']("right").$gsub("%","").$to_f(),100.0))}else{self.right=$rb_times(bounds['$[]']("page_width"),$rb_divide(the_options['$[]']("right"),100.0))}}else{self.right=(function(){if($truthy(($ret_or_18=the_options['$[]']("right")))){return $ret_or_18}else{return $rb_plus($rb_divide((window.innerWidth).$to_i(),2),100);};return nil;})()};if($truthy((function(){if($truthy(($ret_or_19=the_options['$[]']("bottom")['$is_a?']($$$('::','String'))))){return $ret_or_19}else{return the_options['$[]']("bottom").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("bottom")['$is_a?']($$$('::','String')))){self.bottom=$rb_times(bounds['$[]']("page_height"),$rb_divide(the_options['$[]']("bottom").$gsub("%","").$to_f(),100.0))}else{self.bottom=$rb_times(bounds['$[]']("page_height"),$rb_divide(the_options['$[]']("bottom"),100.0))}}else{self.bottom=(function(){if($truthy(($ret_or_20=the_options['$[]']("bottom")))){return $ret_or_20}else{return $rb_plus($rb_divide((window.innerHeight).$to_i(),2),50);};return nil;})()};self.window_title=(function(){if($truthy(($ret_or_21=the_options['$[]']("window_title")))){return $ret_or_21}else{return "Untitled"};return nil;})();self.title_object=nil;if($truthy((function(){if($truthy(($ret_or_22=the_options['$[]']("width")['$is_a?']($$$('::','String'))))){return $ret_or_22}else{return the_options['$[]']("width").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("width")['$is_a?']($$$('::','String')))){self.right=$rb_plus(self.left,$rb_times($rb_minus(bounds['$[]']("right"),bounds['$[]']("left")),$rb_divide(the_options['$[]']("width").$gsub("%","").$to_f(),100.0)))}else{self.right=$rb_plus(self.left,$rb_times($rb_minus(bounds['$[]']("right"),bounds['$[]']("left")),$rb_divide(the_options['$[]']("width"),100.0)))}}else if($truthy(the_options['$[]']("width")['$is_a?']($$$('::','Numeric')))){self.right=$rb_plus(self.left,the_options.$delete("width"))};if($truthy((function(){if($truthy(($ret_or_23=the_options['$[]']("height")['$is_a?']($$$('::','String'))))){return $ret_or_23}else{return the_options['$[]']("height").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("height")['$is_a?']($$$('::','String')))){self.bottom=$rb_plus(self.top,$rb_times($rb_minus(bounds['$[]']("bottom"),bounds['$[]']("top")),$rb_divide(the_options['$[]']("height").$gsub("%","").$to_f(),100.0)))}else{self.bottom=$rb_plus(self.top,$rb_times($rb_minus(bounds['$[]']("bottom"),bounds['$[]']("top")),$rb_divide(the_options['$[]']("height"),100.0)))}}else if($truthy(the_options['$[]']("height")['$is_a?']($$$('::','Numeric')))){self.bottom=$rb_plus(self.top,the_options['$[]']("height"))};self.$fit_within_boundaries();self.modal=(function(){if($truthy(($ret_or_24=the_options['$[]']("modal")))){return $ret_or_24}else{return false};return nil;})();self.scrolling=the_options['$[]']("scroll");self.title_margin=24;if(self.modal['$=='](true)){self.resize=false;self.resize_margin=0;}else{self.resize=(function(){if($truthy(($ret_or_25=the_options['$[]']("resize")))){return $ret_or_25}else{return true};return nil;})();self.resize_margin=2;self.title_margin=26;};if(self.modal['$=='](true)){self.closebox=false;self.minimizebox=false;self.maximizebox=false;}else{if(the_options['$[]']("close")['$=='](false)){self.closebox=false}else{self.closebox=(function(){if($truthy(($ret_or_26=the_options['$[]']("close")))){return $ret_or_26}else{return "enabled"};return nil;})().$to_s().$to_sym()};if(the_options['$[]']("minimize")['$=='](false)){self.minimizebox=false}else{self.minimizebox=(function(){if($truthy(($ret_or_27=the_options['$[]']("minimize")))){return $ret_or_27}else{return "enabled"};return nil;})().$to_s().$to_sym()};if(the_options['$[]']("maximize")['$=='](false)){self.maximizebox=false}else{self.maximizebox=(function(){if($truthy(($ret_or_28=the_options['$[]']("maximize")))){return $ret_or_28}else{return "enabled"};return nil;})().$to_s().$to_sym()};};self.tracking=$hash2([],{});self.menu_reference=the_options['$[]']("menu");self.menu_area=nil;self.menu_bar=nil;if($truthy(self.menu_reference)){self.menu_margin=16}else{self.menu_margin=0};$send2(self,$find_super(self,'initialize',$Window_initialize$40,false,true),'initialize',[the_parent,the_options,other_data],null);return self;},$Window_initialize$40.$$arity=-3);Opal.def(self,'$menu_reference',$Window_menu_reference$41=function $$menu_reference(){var self=this;return self.menu_reference},$Window_menu_reference$41.$$arity=0);Opal.def(self,'$menubar',$Window_menubar$42=function $$menubar(){var self=this;return self.menu_area},$Window_menubar$42.$$arity=0);$alias(self,"original_add_child","add_child");Opal.def(self,'$add_child',$Window_add_child$43=function $$add_child(object_record){var self=this;if(object_record==null){object_record=nil;};if($truthy(self.content)){return self.content.$add_child(object_record)}else{return self.$original_add_child(object_record)};},$Window_add_child$43.$$arity=-1);$alias(self,"original_children","children");Opal.def(self,'$children',$Window_children$44=function $$children(){var self=this;if($truthy(self.content)){return self.content.$children()}else{return $hash2([],{})}},$Window_children$44.$$arity=0);Opal.def(self,'$find_child',$Window_find_child$45=function $$find_child(the_reference,interior){var $a,$$46,self=this,result=nil,uuid_check=nil,search_queue=nil,entry=nil;if(the_reference==null){the_reference=nil;};if(interior==null){interior=false;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_reference))){uuid_check=true}else{uuid_check=false};if(interior['$=='](true)){search_queue=self.$original_children().$values()}else{search_queue=self.$children().$values()};while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(uuid_check)){if(entry.$uuid()['$=='](the_reference)){result=entry;break;;}}else if(entry.$title()['$=='](the_reference)){result=entry;break;;};if($truthy(result)){}else{$send(entry.$children().$values(),'each',[],($$46=function(the_child){var self=$$46.$$s==null?this:$$46.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$46.$$s=self,$$46.$$arity=1,$$46))};};};return result;},$Window_find_child$45.$$arity=-1);return(Opal.def(self,'$cascade',$Window_cascade$47=function $$cascade(){var $$48,self=this,build_list=nil,the_title=nil,$writer=nil,close_box=nil,minimize_box=nil,maximize_box=nil,table=nil,row=nil,cell_one=nil,cell_two=nil,cell_three=nil,interior_component=nil,interior_component_uuid=nil,left_resizer=nil,right_resizer=nil,bottom_resizer=nil,sw_resizer=nil,se_resizer=nil,left_menu_resize=nil,right_menu_resize=nil,menu_cell=nil,menu_row=nil,content_area=nil,row_one=nil,row_two=nil,resizing_areas=nil,the_object=nil;self.$commit_settings();build_list=[];the_title=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"title_object "+(self.uuid.$to_s())];$send(the_title,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.label"];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["content","style"],{"content":self.window_title,"style":$hash2(["width","font-size","text-align"],{"width":"100%","font-size":"16px","text-align":"center"})})];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;close_box=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.image"];$send(close_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(close_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["src","width","height","style"],{"src":self.$theme_widget("close.png"),"width":20,"height":20,"style":$hash2(["padding"],{"padding":"2px"})})];$send(close_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('close.png'))\n"+" the_window = self.window\n"+" if the_window\n"+" if the_window.application\n"+" the_window.application.window_close({:window => the_window.uuid})\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_close(the_window.uuid)\n"+" end\n"+" else\n"+" log_warn('Window Not Found')\n"+" end\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('close_mousedown.png'))\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('close_mouseenter.png'))\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('close.png'))\n"+" end\n"+" end\n"+" "];$send(close_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(close_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;minimize_box=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.image"];$send(minimize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(minimize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["src","width","height","style"],{"src":self.$theme_widget("minimize.png"),"width":20,"height":20,"style":$hash2(["padding"],{"padding":"2px"})})];$send(minimize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('minimize.png'))\n"+" the_window = self.window\n"+" if the_window\n"+" special = the_window.special_state()\n"+" if special.is_a?(::Hash)\n"+" if special[:action] == :minimize\n"+" GxG::DISPLAY_DETAILS[:object].window_restore(the_window.uuid)\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_minimize(the_window.uuid,{:top => the_window.top, :left => the_window.left, :right => the_window.right, :bottom => the_window.bottom})\n"+" end\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_minimize(the_window.uuid,{:top => the_window.top, :left => the_window.left, :right => the_window.right, :bottom => the_window.bottom})\n"+" end\n"+" end\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('minimize_mousedown.png'))\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('minimize_mouseenter.png'))\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('minimize.png'))\n"+" end\n"+" end\n"+" "];$send(minimize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(minimize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;maximize_box=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.image"];$send(maximize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(maximize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["src","width","height","style"],{"src":self.$theme_widget("maximize.png"),"width":20,"height":20,"style":$hash2(["padding"],{"padding":"2px"})})];$send(maximize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('maximize.png'))\n"+" the_window = self.window\n"+" if the_window\n"+" special = the_window.special_state()\n"+" if special.is_a?(::Hash)\n"+" if special[:action] == :maximize\n"+" GxG::DISPLAY_DETAILS[:object].window_restore(the_window.uuid)\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_maximize(the_window.uuid,{:top => the_window.top, :left => the_window.left, :right => the_window.right, :bottom => the_window.bottom})\n"+" end\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_maximize(the_window.uuid,{:top => the_window.top, :left => the_window.left, :right => the_window.right, :bottom => the_window.bottom})\n"+" end\n"+" end\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('maximize_mousedown.png'))\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('maximize_mouseenter.png'))\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" unless self.gxg_get_state(:disabled) == true\n"+" self.gxg_set_attribute(:src,theme_widget('maximize.png'))\n"+" end\n"+" end\n"+" "];$send(maximize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(maximize_box,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;table=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table"];$send(table,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(table,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style","states"],{"style":$hash2(["clear","height","padding","margin","border-radius","border-bottom"],{"clear":"both","height":"24px","padding":"0px","margin":"0px","border-radius":"5px 5px 0px 0px","border-bottom":"1px solid #c2c2c2"}),"states":$hash2(["default-background-color"],{"default-background-color":true})})];$send(table,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(table,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(table,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;row=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.row"];$send(row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","vertical-align","background-color"],{"padding":"0px","margin":"0px","vertical-align":"middle","background-color":"transparent"})})];$send(row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;cell_one=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(cell_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(cell_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","vertical-align","background-color"],{"padding":"0px","margin":"0px","vertical-align":"middle","background-color":"transparent"})})];$send(cell_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(cell_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(cell_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;cell_two=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(cell_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(cell_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","padding","vertical-align","margin","background-color"],{"width":"100%","padding":""+"0px 0px 0px "+($rb_minus($rb_minus($rb_divide(self.$width(),2),$rb_times($rb_divide(self.window_title.$size(),2),8)),60))+"px","vertical-align":"middle","margin":"0px","background-color":"transparent"})})];$send(cell_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(cell_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(cell_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;cell_three=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(cell_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(cell_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["float","padding","vertical-align","margin","background-color"],{"float":"right","padding":"0px","vertical-align":"middle","margin":"0px","background-color":"transparent"})})];$send(cell_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(cell_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(cell_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(self.closebox)){if(self.closebox['$==']("disabled")){$writer=["src",self.$theme_widget("close_disable.png")];$send(close_box['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["states",$hash2(["disabled"],{"disabled":true})];$send(close_box['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};cell_one['$[]']("content")['$<<'](close_box);};if($truthy(self.minimizebox)){if(self.minimizebox['$==']("disabled")){$writer=["src",self.$theme_widget("minimize_disable.png")];$send(minimize_box['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["states",$hash2(["disabled"],{"disabled":true})];$send(minimize_box['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};cell_one['$[]']("content")['$<<'](minimize_box);};if($truthy(self.maximizebox)){if(self.maximizebox['$==']("disabled")){$writer=["src",self.$theme_widget("maximize_disable.png")];$send(maximize_box['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["states",$hash2(["disabled"],{"disabled":true})];$send(maximize_box['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};cell_one['$[]']("content")['$<<'](maximize_box);};$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" #\n"+" if @window_handle\n"+" unless @last_mouse_x\n"+" @last_mouse_x = event[:pageX]\n"+" end\n"+" unless @last_mouse_y\n"+" @last_mouse_y = event[:pageY]\n"+" end\n"+" offset_x = (event[:pageX] - @window_handle.left)\n"+" if event[:pageY] < @window_handle.top\n"+" offset_y = (@window_handle.top - event[:pageY])\n"+" else\n"+" offset_y = (event[:pageY] - @window_handle.top)\n"+" end\n"+" new_x = ((event[:pageX] - offset_x) + (event[:pageX] - @last_mouse_x))\n"+" new_y = ((event[:pageY] - offset_y) + (event[:pageY] - @last_mouse_y))\n"+" @window_handle.set_position(new_x,new_y)\n"+" @last_mouse_x = event[:pageX]\n"+" @last_mouse_y = event[:pageY]\n"+" end\n"+" end\n"+" end\n"+" on(:dblclick) do |event|\n"+" the_window = self.window\n"+" if the_window\n"+" special = the_window.special_state()\n"+" if special.is_a?(::Hash)\n"+" if special[:action] == :rollup\n"+" GxG::DISPLAY_DETAILS[:object].window_restore(the_window.uuid)\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_rollup(the_window.uuid,{:top => the_window.top, :left => the_window.left, :right => the_window.right, :bottom => the_window.bottom})\n"+" end\n"+" else\n"+" GxG::DISPLAY_DETAILS[:object].window_rollup(the_window.uuid,{:top => the_window.top, :left => the_window.left, :right => the_window.right, :bottom => the_window.bottom})\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousemove) do |event|\n"+" @window_handle = self.window\n"+" if ((event[:buttons] & 1) == 1)\n"+" @mode = :drag\n"+" do_drag(event)\n"+" else\n"+" @mode = :hover\n"+" end\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(cell_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;cell_two['$[]']("content")['$<<'](the_title);row['$[]']("content")['$<<'](cell_one);row['$[]']("content")['$<<'](cell_two);row['$[]']("content")['$<<'](cell_three);table['$[]']("content")['$<<'](row);build_list['$<<'](table);interior_component=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"content "+(self.uuid.$to_s())];$send(interior_component,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block"];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style","states"],{"style":$hash2(["clear","padding","margin","border","width","height"],{"clear":"both","padding":"0px","margin":"0px","border":"0px","width":""+($rb_minus(self.$width(),$rb_times(self.resize_margin,2)))+"px","height":""+($rb_minus(self.$height(),$rb_plus($rb_plus(self.title_margin,self.menu_margin),self.resize_margin)))+"px"}),"states":$hash2(["default-background-color"],{"default-background-color":true})})];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;interior_component_uuid=interior_component.$uuid();if($truthy(self.scrolling)){if(self.scrolling['$=='](true)){$writer=["overflow","scroll"];$send(interior_component['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];}else{if(self.scrolling['$==']("vertical")){$writer=["overflow-y","scroll"];$send(interior_component['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if(self.scrolling['$==']("horizontal")){$writer=["overflow-x","scroll"];$send(interior_component['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};}}else{$writer=["overflow","hidden"];$send(interior_component['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};left_resizer=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(left_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(left_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","cursor"],{"width":"2px","cursor":"w-resize"})})];$send(left_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle = self.window\n"+" if window_handle\n"+" window_handle.set_left(event[:pageX])\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(left_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(left_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;right_resizer=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(right_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(right_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","cursor"],{"width":"2px","cursor":"e-resize"})})];$send(right_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle = self.window\n"+" if window_handle\n"+" window_handle.set_right(event[:pageX] + 1)\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(right_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(right_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;bottom_resizer=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(bottom_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(bottom_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["height","cursor"],{"height":"2px","cursor":"s-resize"})})];$send(bottom_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" window_handle = self.window\n"+" if window_handle\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle.set_bottom(event[:pageY] + 4)\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(bottom_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(bottom_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;sw_resizer=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(sw_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(sw_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","height","cursor"],{"width":"2px","height":"2px","cursor":"sw-resize"})})];$send(sw_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle = self.window\n"+" if window_handle\n"+" window_handle.set_left(event[:pageX] - 2)\n"+" window_handle.set_bottom(event[:pageY] + 4)\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(sw_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(sw_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;se_resizer=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(se_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(se_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","height","cursor"],{"width":"2px","height":"2px","cursor":"se-resize"})})];$send(se_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle = self.window\n"+" if window_handle\n"+" window_handle.set_right(event[:pageX] + 2)\n"+" window_handle.set_bottom(event[:pageY] + 4)\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(se_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(se_resizer,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;left_menu_resize=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(left_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(left_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","cursor"],{"width":"2px","cursor":"w-resize"})})];$send(left_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle = self.window\n"+" if window_handle\n"+" window_handle.set_left(event[:pageX])\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(left_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(left_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;right_menu_resize=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(right_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(right_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["width","cursor"],{"width":"2px","cursor":"e-resize"})})];$send(right_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def do_drag(event)\n"+" if ((event[:buttons] & 1) == 1)\n"+" window_handle = self.window\n"+" if window_handle\n"+" window_handle.set_right(event[:pageX] + 1)\n"+" end\n"+" end\n"+" end\n"+" on(:mouseup) do |event|\n"+" @mode = :hover\n"+" the_window = self.window\n"+" if the_window\n"+" GxG::DISPLAY_DETAILS[:object].window_bring_to_front(the_window.uuid)\n"+" end\n"+" end\n"+" on(:mousedown) do |event|\n"+" @mode = :drag\n"+" do_drag(event)\n"+" end\n"+" on(:mouseover) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" on(:mouseenter) do |event|\n"+" if @mode == :drag\n"+" do_drag(event)\n"+" end\n"+" end\n"+" "];$send(right_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(right_menu_resize,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;menu_cell=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"menu_area "+(self.uuid.$to_s())];$send(menu_cell,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block.table.cell"];$send(menu_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(menu_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["overflow","height","padding","margin"],{"overflow":"hidden","height":"16px","padding":"0px","margin":"0px"})})];$send(menu_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(menu_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(menu_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;menu_row=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"menu_area_row "+(self.uuid.$to_s())];$send(menu_row,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block.table.row"];$send(menu_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(menu_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["overflow","clear","padding","width","height","margin","vertical-align","background-color","border-bottom"],{"overflow":"hidden","clear":"both","padding":"0px","width":"100%","height":"16px","margin":"0px","vertical-align":"middle","background-color":"transparent","border-bottom":"1px solid #c2c2c2"})})];$send(menu_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(menu_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[left_menu_resize,menu_cell,right_menu_resize]];$send(menu_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;content_area=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"content_area "+(self.uuid.$to_s())];$send(content_area,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block.table.cell"];$send(content_area,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(content_area,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","border"],{"padding":"0px","margin":"0px","border":"0px"})})];$send(content_area,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(content_area,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[interior_component]];$send(content_area,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;row_one=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.row"];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2([],{})];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;row_two=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.row"];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2([],{})];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;resizing_areas=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"window_body "+(self.uuid.$to_s())];$send(resizing_areas,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block.table"];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style","states"],{"style":$hash2(["width"],{"width":"100%"}),"states":$hash2(["default-background-color"],{"default-background-color":true})})];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(self.resize)){$writer=["content",[left_resizer,content_area,right_resizer]];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[sw_resizer,bottom_resizer,se_resizer]];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(self.menu_reference)){$writer=["content",[menu_row,row_one,row_two]];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];}else{$writer=["content",[row_one,row_two]];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};}else if($truthy(self.menu_reference)){$writer=["content",[content_area]];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[menu_row,row_one]];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;}else{$writer=["content",[content_area]];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[row_one]];$send(resizing_areas,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};build_list['$<<'](resizing_areas);self.content=nil;self.$page().$build_components(self,build_list,$hash2(["application"],{"application":self.application}));the_object=self.$page().$find_object_by(interior_component_uuid);if($truthy(the_object)){self.content=the_object};the_object=self.$page().$find_object_by(""+"window_body "+(self.uuid.$to_s()));if($truthy(the_object)){self.window_body=the_object};the_object=self.$page().$find_object_by(""+"title_object "+(self.uuid.$to_s()));if($truthy(the_object)){self.title_object=the_object};the_object=self.$page().$find_object_by(""+"menu_area "+(self.uuid.$to_s()));if($truthy(the_object)){self.menu_area=the_object;self.menu_margin=(self.menu_area.$element().getBoundingClientRect().bottom-self.menu_area.$element().getBoundingClientRect().top).$to_i();if($truthy(self.menu_area)){self.menu_area.$parent().$parent().$gxg_merge_style($hash2(["border-collapse"],{"border-collapse":"collapse"}))};};$send($$$($$($nesting,'GxG'),'DISPATCHER'),'post_event',[],($$48=function(){var self=$$48.$$s==null?this:$$48.$$s;return self.$commit_settings()},$$48.$$s=self,$$48.$$arity=0,$$48));return self;},$Window_cascade$47.$$arity=0),nil)&&'cascade';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.window",$$$($$$($$$('::','GxG'),'Gui'),'Window'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'DialogBox');var $nesting=[self].concat($parent_nesting),$DialogBox__before_create$49,$DialogBox_uuid$50,$DialogBox_before_close$51,$DialogBox_after_close$52,$DialogBox_before_open$53,$DialogBox_after_open$54,$DialogBox_set_application$55,$DialogBox_application$56,$DialogBox_set_window_title$57,$DialogBox_window_title$58,$DialogBox_set_data$59,$DialogBox_data$60,$DialogBox_set_responder$61,$DialogBox_respond$62,$DialogBox_top$63,$DialogBox_left$64,$DialogBox_right$65,$DialogBox_bottom$66,$DialogBox_width$67,$DialogBox_height$68,$DialogBox_position$69,$DialogBox_layer$70,$DialogBox_initialize$71,$DialogBox_add_child$72,$DialogBox_children$73,$DialogBox_find_child$74,$DialogBox_cascade$76,$DialogBox_open$77,$DialogBox_close$78;self.$$prototype.uuid=self.$$prototype.application=self.$$prototype.title_object=self.$$prototype.window_title=self.$$prototype.data=self.$$prototype.responder=self.$$prototype.top=self.$$prototype.left=self.$$prototype.right=self.$$prototype.bottom=self.$$prototype.layer=self.$$prototype.opacity=self.$$prototype.content=self.$$prototype.background_color=nil;Opal.def(self,'$_before_create',$DialogBox__before_create$49=function $$_before_create(){var $iter=$DialogBox__before_create$49.$$p,$yield=$iter||nil,self=this;if($iter)$DialogBox__before_create$49.$$p=null;return $send2(self,$find_super(self,'_before_create',$DialogBox__before_create$49,false,true),'_before_create',[],null)},$DialogBox__before_create$49.$$arity=0);Opal.def(self,'$uuid',$DialogBox_uuid$50=function $$uuid(){var self=this;return self.uuid},$DialogBox_uuid$50.$$arity=0);Opal.def(self,'$before_close',$DialogBox_before_close$51=function $$before_close(data){var self=this;if(data==null){data=nil;};return nil;},$DialogBox_before_close$51.$$arity=-1);Opal.def(self,'$after_close',$DialogBox_after_close$52=function $$after_close(data){var self=this;if(data==null){data=nil;};return nil;},$DialogBox_after_close$52.$$arity=-1);Opal.def(self,'$before_open',$DialogBox_before_open$53=function $$before_open(data){var self=this;if(data==null){data=nil;};return nil;},$DialogBox_before_open$53.$$arity=-1);Opal.def(self,'$after_open',$DialogBox_after_open$54=function $$after_open(data){var self=this;if(data==null){data=nil;};return nil;},$DialogBox_after_open$54.$$arity=-1);Opal.def(self,'$set_application',$DialogBox_set_application$55=function $$set_application(the_application){var self=this;return(self.application=the_application)},$DialogBox_set_application$55.$$arity=1);$alias(self,"application=","set_application");Opal.def(self,'$application',$DialogBox_application$56=function $$application(){var self=this;return self.application},$DialogBox_application$56.$$arity=0);Opal.def(self,'$set_window_title',$DialogBox_set_window_title$57=function $$set_window_title(the_title){var self=this;if(the_title==null){the_title=nil;};if($truthy(self.title_object)){if($truthy(the_title['$is_a?']($$$('::','String')))){self.window_title=the_title;return self.title_object.$set_text(self.window_title);}else{return nil}}else{return nil};},$DialogBox_set_window_title$57.$$arity=-1);$alias(self,"window_title=","set_window_title");Opal.def(self,'$window_title',$DialogBox_window_title$58=function $$window_title(){var self=this;if($truthy(self.title_object)){return self.window_title}else{return nil}},$DialogBox_window_title$58.$$arity=0);Opal.def(self,'$set_data',$DialogBox_set_data$59=function $$set_data(data){var self=this;if(data==null){data=$hash2([],{});};return(self.data=data);},$DialogBox_set_data$59.$$arity=-1);$alias(self,"data=","set_data");Opal.def(self,'$data',$DialogBox_data$60=function $$data(){var self=this;return self.data},$DialogBox_data$60.$$arity=0);Opal.def(self,'$set_responder',$DialogBox_set_responder$61=function $$set_responder(block){var self=this;if(block==null){block=nil;};if($truthy(block['$respond_to?']("call"))){return(self.responder=block)}else{return nil};},$DialogBox_set_responder$61.$$arity=-1);$alias(self,"responder=","set_responder");Opal.def(self,'$respond',$DialogBox_respond$62=function $$respond(data){var self=this;if(data==null){data=nil;};self.$page().$dialog_close();if($truthy(self.responder['$respond_to?']("call"))){return self.responder.$call(data)}else{return nil};},$DialogBox_respond$62.$$arity=-1);Opal.def(self,'$top',$DialogBox_top$63=function $$top(){var self=this;return self.top},$DialogBox_top$63.$$arity=0);Opal.def(self,'$left',$DialogBox_left$64=function $$left(){var self=this;return self.left},$DialogBox_left$64.$$arity=0);Opal.def(self,'$right',$DialogBox_right$65=function $$right(){var self=this;return self.right},$DialogBox_right$65.$$arity=0);Opal.def(self,'$bottom',$DialogBox_bottom$66=function $$bottom(){var self=this;return self.bottom},$DialogBox_bottom$66.$$arity=0);Opal.def(self,'$width',$DialogBox_width$67=function $$width(){var self=this;return $rb_minus(self.right,self.left)},$DialogBox_width$67.$$arity=0);Opal.def(self,'$height',$DialogBox_height$68=function $$height(){var self=this;return $rb_minus(self.bottom,self.top)},$DialogBox_height$68.$$arity=0);Opal.def(self,'$position',$DialogBox_position$69=function $$position(){var self=this;return $hash2(["x","y"],{"x":self.left,"y":self.top})},$DialogBox_position$69.$$arity=0);Opal.def(self,'$layer',$DialogBox_layer$70=function $$layer(){var self=this;return self.layer},$DialogBox_layer$70.$$arity=0);Opal.def(self,'$initialize',$DialogBox_initialize$71=function $$initialize(the_parent,the_options,other_data){var $iter=$DialogBox_initialize$71.$$p,$yield=$iter||nil,self=this,the_width=nil,$ret_or_29=nil,the_height=nil,$ret_or_30=nil,$ret_or_31=nil,$ret_or_32=nil,$ret_or_33=nil,$ret_or_34=nil,$ret_or_35=nil,$ret_or_36=nil,$ret_or_37=nil,$ret_or_38=nil,$ret_or_39=nil,$ret_or_40=nil,$ret_or_41=nil;if($iter)$DialogBox_initialize$71.$$p=null;if(other_data==null){other_data=$hash2([],{});};self.special_state=nil;self.content=nil;the_width=nil;if($truthy((function(){if($truthy(($ret_or_29=the_options['$[]']("width")['$is_a?']($$$('::','String'))))){return $ret_or_29}else{return the_options['$[]']("width").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("width")['$is_a?']($$$('::','String')))){the_width=$rb_times((window.innerWidth).$to_f(),$rb_divide(the_options['$[]']("width").$gsub("%","").$to_f(),100.0))}else{the_width=$rb_times((window.innerWidth).$to_f(),$rb_divide(the_options['$[]']("width"),100.0))}}else if($truthy(the_options['$[]']("width")['$is_a?']($$$('::','Numeric')))){the_width=the_options['$[]']("width").$to_f()};if($truthy(the_width)){self.left=$rb_minus($rb_divide((window.innerWidth).$to_f(),2.0),$rb_divide(the_width,2.0));self.right=$rb_plus($rb_divide((window.innerWidth).$to_f(),2.0),$rb_divide(the_width,2.0));};the_height=nil;if($truthy((function(){if($truthy(($ret_or_30=the_options['$[]']("height")['$is_a?']($$$('::','String'))))){return $ret_or_30}else{return the_options['$[]']("height").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("height")['$is_a?']($$$('::','String')))){the_height=$rb_times((window.innerHeight).$to_f(),$rb_divide(the_options['$[]']("height").$gsub("%","").$to_f(),100.0))}else{the_height=$rb_times((window.innerHeight).$to_f(),$rb_divide(the_options['$[]']("height"),100.0))}}else if($truthy(the_options['$[]']("height")['$is_a?']($$$('::','Numeric')))){the_height=the_options['$[]']("height").$to_f()};if($truthy(the_height)){self.top=$rb_minus($rb_divide((window.innerHeight).$to_f(),2.0),$rb_divide(the_height,2.0));self.bottom=$rb_plus($rb_divide((window.innerHeight).$to_f(),2.0),$rb_divide(the_height,2.0));};if($truthy((function(){if($truthy(($ret_or_31=the_options['$[]']("top")['$is_a?']($$$('::','String'))))){return $ret_or_31}else{return the_options['$[]']("top").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("top")['$is_a?']($$$('::','String')))){self.top=$rb_times((window.innerHeight).$to_f(),$rb_divide(the_options['$[]']("top").$gsub("%","").$to_f(),100.0))}else{self.top=$rb_times((window.innerHeight).$to_f(),$rb_divide(the_options['$[]']("top"),100.0))}}else if($truthy(the_height)){}else{self.top=(function(){if($truthy(($ret_or_32=the_options['$[]']("top")))){return $ret_or_32}else{return $rb_minus($rb_divide((window.innerHeight).$to_i(),2),150);};return nil;})()};if($truthy((function(){if($truthy(($ret_or_33=the_options['$[]']("left")['$is_a?']($$$('::','String'))))){return $ret_or_33}else{return the_options['$[]']("left").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("left")['$is_a?']($$$('::','String')))){self.left=$rb_times((window.innerWidth).$to_f(),$rb_divide(the_options['$[]']("left").$gsub("%","").$to_f(),100.0))}else{self.left=$rb_times((window.innerWidth).$to_f(),$rb_divide(the_options['$[]']("left"),100.0))}}else if($truthy(the_width)){}else{self.left=(function(){if($truthy(($ret_or_34=the_options['$[]']("left")))){return $ret_or_34}else{return $rb_minus($rb_divide((window.innerWidth).$to_i(),2),300);};return nil;})()};if($truthy((function(){if($truthy(($ret_or_35=the_options['$[]']("right")['$is_a?']($$$('::','String'))))){return $ret_or_35}else{return the_options['$[]']("right").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("right")['$is_a?']($$$('::','String')))){self.right=$rb_times((window.innerWidth).$to_f(),$rb_divide(the_options['$[]']("right").$gsub("%","").$to_f(),100.0))}else{self.right=$rb_times((window.innerWidth).$to_f(),$rb_divide(the_options['$[]']("right"),100.0))}}else if($truthy(the_width)){}else{self.right=(function(){if($truthy(($ret_or_36=the_options['$[]']("right")))){return $ret_or_36}else{return $rb_plus($rb_divide((window.innerWidth).$to_i(),2),300);};return nil;})()};if($truthy((function(){if($truthy(($ret_or_37=the_options['$[]']("bottom")['$is_a?']($$$('::','String'))))){return $ret_or_37}else{return the_options['$[]']("bottom").$to_s()['$include?'](".")};return nil;})())){if($truthy(the_options['$[]']("bottom")['$is_a?']($$$('::','String')))){self.bottom=$rb_times((window.innerHeight).$to_f(),$rb_divide(the_options['$[]']("bottom").$gsub("%","").$to_f(),100.0))}else{self.bottom=$rb_times((window.innerHeight).$to_f(),$rb_divide(the_options['$[]']("bottom"),100.0))}}else if($truthy(the_height)){}else{self.bottom=(function(){if($truthy(($ret_or_38=the_options['$[]']("bottom")))){return $ret_or_38}else{return $rb_plus($rb_divide((window.innerHeight).$to_i(),2),150);};return nil;})()};self.window_title=(function(){if($truthy(($ret_or_39=the_options['$[]']("window_title")))){return $ret_or_39}else{return "Untitled"};return nil;})();self.title_object=nil;self.opacity=(function(){if($truthy(($ret_or_40=the_options['$[]']("opacity")))){return $ret_or_40}else{return 0.8};return nil;})();self.background_color=(function(){if($truthy(($ret_or_41=the_options['$[]']("background-color")))){return $ret_or_41}else{return ""+"rgba(0,0,0,"+(self.opacity.$to_s())+")"};return nil;})();self.layer=2000;self.tracking=$hash2([],{});self.responder=nil;self.data=$hash2([],{});$send2(self,$find_super(self,'initialize',$DialogBox_initialize$71,false,true),'initialize',[the_parent,the_options,other_data],null);self.$set_attribute("draggable",false);return self;},$DialogBox_initialize$71.$$arity=-3);$alias(self,"original_add_child","add_child");Opal.def(self,'$add_child',$DialogBox_add_child$72=function $$add_child(component_record){var self=this;if($truthy(self.content)){return self.content.$add_child(component_record)}else{return self.$original_add_child(component_record)}},$DialogBox_add_child$72.$$arity=1);$alias(self,"original_children","children");Opal.def(self,'$children',$DialogBox_children$73=function $$children(){var self=this;if($truthy(self.content)){return self.content.$children()}else{return $hash2([],{})}},$DialogBox_children$73.$$arity=0);Opal.def(self,'$find_child',$DialogBox_find_child$74=function $$find_child(the_reference,interior){var $a,$$75,self=this,result=nil,uuid_check=nil,search_queue=nil,entry=nil;if(the_reference==null){the_reference=nil;};if(interior==null){interior=false;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_reference))){uuid_check=true}else{uuid_check=false};if(interior['$=='](true)){search_queue=self.$original_children().$values()}else{search_queue=self.$children().$values()};while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(uuid_check)){if(entry.$uuid()['$=='](the_reference)){result=entry;break;;}}else if(entry.$title()['$=='](the_reference)){result=entry;break;;};if($truthy(result)){}else{$send(entry.$children().$values(),'each',[],($$75=function(the_child){var self=$$75.$$s==null?this:$$75.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$75.$$s=self,$$75.$$arity=1,$$75))};};};return result;},$DialogBox_find_child$74.$$arity=-1);Opal.def(self,'$cascade',$DialogBox_cascade$76=function $$cascade(){var self=this,mouse_event_capture=nil,build_list=nil,modal_frame=nil,$writer=nil,the_title=nil,title_cell=nil,title_row=nil,interior_component=nil,content_row=nil,the_object=nil;self.$merge_style($hash2(["position","top","left","width","height","background-color","z-index"],{"position":"absolute","top":"0px","left":"0px","width":"100%","height":"100%","background-color":self.background_color,"z-index":self.layer}));mouse_event_capture=""+"\n"+" on(:mouseup,true) do |event|\n"+" end\n"+" on(:mousedown,true) do |event|\n"+" end\n"+" on(:mousemove,true) do |event|\n"+" end\n"+" on(:mouseenter,true) do |event|\n"+" end\n"+" on(:mouseleave,true) do |event|\n"+" end\n"+" ";self.$set_script(mouse_event_capture);build_list=[];modal_frame=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"modal_frame "+(self.uuid.$to_s())];$send(modal_frame,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block.table"];$send(modal_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(modal_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style","states"],{"style":$hash2(["opacity","clear","overflow","position","top","left","width","height","padding","margin","border-radius","z-index"],{"opacity":1.0,"clear":"both","overflow":"hidden","position":"absolute","top":""+(self.top)+"px","left":""+(self.left)+"px","width":""+(self.$width())+"px","height":""+(self.$height())+"px","padding":"0px","margin":"0px","border-radius":"5px 5px 5px 5px","z-index":$rb_plus(self.layer,100)}),"states":$hash2(["default-background-color"],{"default-background-color":true})})];$send(modal_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(modal_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(modal_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;the_title=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"title "+(self.uuid.$to_s())];$send(the_title,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.label"];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["content","style"],{"content":self.window_title,"style":$hash2(["opacity","width","font-size","text-align"],{"opacity":1.0,"width":"100%","font-size":"16px","text-align":"center"})})];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;title_cell=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(title_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(title_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["opacity","width","padding","margin","vertical-align","background-color"],{"opacity":1.0,"width":"100%","padding":""+"0px 0px 0px "+($rb_minus($rb_divide(self.$width(),2),$rb_times($rb_divide(self.window_title.$size(),2),8)))+"px","margin":"0px","vertical-align":"middle","background-color":"transparent"})})];$send(title_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(title_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[the_title]];$send(title_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;title_row=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.row"];$send(title_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(title_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["opacity","clear","padding","width","height","margin","vertical-align","background-color","border-bottom"],{"opacity":1.0,"clear":"both","padding":"0px","width":"100%","height":"24px","margin":"0px","vertical-align":"middle","background-color":"#ffffff","border-bottom":"1px solid #c2c2c2"})})];$send(title_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(title_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[title_cell]];$send(title_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;interior_component=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"content "+(self.uuid.$to_s())];$send(interior_component,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.block.table.cell"];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style","states"],{"style":$hash2(["opacity","clear","padding","margin","border","width","height"],{"opacity":1.0,"clear":"both","padding":"0px","margin":"0px","border":"0px","width":""+(self.$width())+"px","height":""+(self.$height())+"px"}),"states":$hash2(["default-background-color"],{"default-background-color":true})})];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;content_row=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.row"];$send(content_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(content_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["opacity","width","height","padding","margin","border"],{"opacity":1.0,"width":""+(self.$width())+"px","height":""+($rb_minus(self.$height(),24))+"px","padding":"0px","margin":"0px","border":"0px"})})];$send(content_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(content_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[interior_component]];$send(content_row,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[title_row,content_row]];$send(modal_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;build_list['$<<'](modal_frame);self.content=nil;self.$page().$build_components(self,build_list);the_object=self.$page().$find_object_by(""+"content "+(self.uuid.$to_s()));if($truthy(the_object)){self.content=the_object};the_object=self.$page().$find_object_by(""+"title "+(self.uuid.$to_s()));if($truthy(the_object)){return(self.title_object=the_object)}else{return nil};},$DialogBox_cascade$76.$$arity=0);Opal.def(self,'$open',$DialogBox_open$77=function $$open(details){var self=this;if(details==null){details=$hash2([],{});};return nil;},$DialogBox_open$77.$$arity=-1);return(Opal.def(self,'$close',$DialogBox_close$78=function $$close(details){var self=this;if(details==null){details=$hash2([],{});};return nil;},$DialogBox_close$78.$$arity=-1),nil)&&'close';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.window.dialog",$$$($$$($$$('::','GxG'),'Gui'),'DialogBox'));return(function($base,$parent_nesting){var self=$module($base,'Vdom');var $nesting=[self].concat($parent_nesting);return(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Page');var $nesting=[self].concat($parent_nesting),$Page_window_open$79,$Page_window_close$80,$Page_dialog_open$81,$Page_dialog_close$82,$Page_window_is_in_back$ques$85,$Page_window_is_in_front$ques$87,$Page_window_send_to_back$89,$Page_window_bring_to_front$90,$Page_next_minimize_slot$91,$Page_minimize_effect$95,$Page_unminimize_effect$99,$Page_maximize_effect$102,$Page_unmaximize_effect$105,$Page_rollup_effect$108,$Page_rolldown_effect$110,$Page_window_restoreable$ques$113,$Page_window_restore$114,$Page_window_minimize$118,$Page_window_maximize$120,$Page_window_rollup$122,$Page_get_window_registration$124,$Page_get_window$125,$Page_window_list$126,$Page_window_repack_layers$128,$Page_window_top_layer$131,$Page_window_back_layer$133,$Page_window_next_layer$136,$Page_window_register$139,$Page_window_unregister$140,$Page_set_window_switcher$141,$Page_get_window_switcher$142;self.$$prototype.dialog=self.$$prototype.dialog_queue=self.$$prototype.window_registry=self.$$prototype.window_switcher=nil;Opal.def(self,'$window_open',$Page_window_open$79=function $$window_open(build_source,the_application){var self=this,new_window=nil,the_menu_source=nil;if(build_source==null){build_source=nil;};if(the_application==null){the_application=nil;};if($truthy(build_source['$is_a?']($$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){self.$build_components(self,[build_source],$hash2(["application"],{"application":the_application}));new_window=self.$find_object_by(build_source.$uuid());if($truthy(new_window)){if($truthy(new_window.$menu_reference())){the_menu_source=the_application.$search_content(new_window.$menu_reference());if($truthy(the_menu_source['$is_a?']($$$($$$($$($nesting,'GxG'),'Database'),'DetachedHash')))){new_window.$set_menu(the_menu_source)}else{self.$log_warn(""+"Invalid Menu Resource referenced: "+(new_window.$menu_reference().$inspect()))};};self.$window_register(new_window.$uuid(),new_window);new_window.$before_open();new_window.$open();new_window.$show();new_window.$after_open();return true;}else{self.$log_warn("Unable to locate newly created window object.");return false;};}else{return false};},$Page_window_open$79.$$arity=-1);Opal.def(self,'$window_close',$Page_window_close$80=function $$window_close(the_reference,options){var self=this,registration=nil;if(the_reference==null){the_reference=nil;};if(options==null){options=$hash2([],{});};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){registration=self.$get_window_registration(the_reference);if($truthy(registration)){registration['$[]']("window").$before_close();registration['$[]']("window").$close();registration['$[]']("window").$hide();registration['$[]']("window").$after_close();if($truthy(registration['$[]']("window").$application())){registration['$[]']("window").$application().$unlink_window(the_reference);registration['$[]']("window").$set_application(nil);};self.$window_unregister(the_reference);registration['$[]']("window").$destroy();return true;}else{return false};}else{return false};},$Page_window_close$80.$$arity=-1);Opal.def(self,'$dialog_open',$Page_dialog_open$81=function $$dialog_open(build_source,the_application,details){var $iter=$Page_dialog_open$81.$$p,block=$iter||nil,self=this,new_window=nil;if($iter)$Page_dialog_open$81.$$p=null;if($iter)$Page_dialog_open$81.$$p=null;;if(build_source==null){build_source=nil;};if(the_application==null){the_application=nil;};if(details==null){details=nil;};if($truthy(build_source['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(self.dialog['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'DialogBox')))){self.dialog_queue['$<<']($hash2(["source","application","details","responder"],{"source":build_source,"application":the_application,"details":details,"responder":block}));return true;}else{self.$page().$build_components(self,[build_source],$hash2(["application"],{"application":the_application}));new_window=self.$page().$find_object_by(build_source.$uuid());if($truthy(new_window)){new_window.$set_title(build_source.$title());if($truthy(the_application['$is_a?']($$$($$$('::','GxG'),'Application')))){new_window.$set_application(the_application);if($truthy(the_application.$get_window(build_source.$uuid()))){}else{the_application.$link_window(new_window)};};if($truthy(details)){new_window.$set_data(details)};if($truthy(block['$respond_to?']("call"))){new_window.$set_responder(block)};new_window.$before_open();new_window.$open();new_window.$show($hash2(["origin","destination"],{"origin":$hash2(["opacity"],{"opacity":0.0}),"destination":$hash2(["opacity"],{"opacity":1.0})}));new_window.$after_open();return true;}else{return false};}}else{return nil};},$Page_dialog_open$81.$$arity=-1);Opal.def(self,'$dialog_close',$Page_dialog_close$82=function $$dialog_close(options){var $$83,self=this,close_procedure=nil,$ret_or_42=nil;if(options==null){options=$hash2([],{});};if($truthy(self.dialog['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'DialogBox')))){self.dialog.$before_close();close_procedure=$send($$($nesting,'Proc'),'new',[],($$83=function(){var self=$$83.$$s==null?this:$$83.$$s,$$84,entry=nil;if(self.dialog==null)self.dialog=nil;if(self.dialog_queue==null)self.dialog_queue=nil;self.dialog.$close();self.dialog.$after_close();$send(self.dialog,'every_child',[],($$84=function(the_child){var self=$$84.$$s==null?this:$$84.$$s,the_application=nil;if(the_child==null){the_child=nil;};if($truthy(the_child['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport')))){the_application=the_child.$application();if($truthy(the_application)){return the_application.$unlink_viewport(the_child.$title())}else{return nil};}else{return nil};},$$84.$$s=self,$$84.$$arity=1,$$84));self.dialog.$destroy();self.dialog=nil;if($truthy($rb_gt(self.dialog_queue.$size(),0))){entry=self.dialog_queue.$shift();return $send(self.$page(),'dialog_open',[entry['$[]']("source"),entry['$[]']("application"),entry['$[]']("details")],entry['$[]']("responder").$to_proc());}else{return nil};},$$83.$$s=self,$$83.$$arity=0,$$83));if($truthy((function(){if($truthy(($ret_or_42=options['$[]']("origin")))){return options['$[]']("destination")}else{return $ret_or_42};return nil;})())){$send(self.dialog,'hide',[options],close_procedure.$to_proc())}else{$send(self.dialog,'hide',[$hash2(["origin","destination","options"],{"origin":$hash2(["opacity"],{"opacity":1}),"destination":$hash2(["opacity"],{"opacity":0}),"options":$hash2(["duration"],{"duration":500})})],close_procedure.$to_proc())};};return true;},$Page_dialog_close$82.$$arity=-1);Opal.def(self,'$window_is_in_back?',$Page_window_is_in_back$ques$85=function(the_reference){var $$86,self=this,the_record=nil,bottom_layer=nil,$ret_or_43=nil;if(the_reference==null){the_reference=nil;};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){bottom_layer=(function(){if($truthy(($ret_or_43=$send(self.window_registry,'collect',[],($$86=function(uuid,entry){var self=$$86.$$s==null?this:$$86.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$86.$$s=self,$$86.$$arity=2,$$86)).$min()))){return $ret_or_43}else{return 0};return nil;})();if(the_record['$[]']("layer")['$=='](bottom_layer)){return true}else{return false};}else{return false};},$Page_window_is_in_back$ques$85.$$arity=-1);Opal.def(self,'$window_is_in_front?',$Page_window_is_in_front$ques$87=function(the_reference){var $$88,self=this,the_record=nil,top_layer=nil,$ret_or_44=nil;if(the_reference==null){the_reference=nil;};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){top_layer=(function(){if($truthy(($ret_or_44=$send(self.window_registry,'collect',[],($$88=function(uuid,entry){var self=$$88.$$s==null?this:$$88.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$88.$$s=self,$$88.$$arity=2,$$88)).$max()))){return $ret_or_44}else{return 0};return nil;})();if(the_record['$[]']("layer")['$=='](top_layer)){return true}else{return false};}else{return false};},$Page_window_is_in_front$ques$87.$$arity=-1);Opal.def(self,'$window_send_to_back',$Page_window_send_to_back$89=function $$window_send_to_back(the_reference){var self=this,the_record=nil,back_layer=nil,$writer=nil;if(the_reference==null){the_reference=nil;};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if($truthy(self['$window_is_in_back?'](the_reference))){return nil}else{back_layer=self.$window_back_layer();the_record['$[]']("window").$gxg_merge_style("z-index",$rb_plus(200,back_layer));$writer=["layer",back_layer];$send(the_record,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;}}else{return false};},$Page_window_send_to_back$89.$$arity=-1);Opal.def(self,'$window_bring_to_front',$Page_window_bring_to_front$90=function $$window_bring_to_front(the_reference,options){var self=this,the_record=nil,front_layer=nil,$writer=nil;if(the_reference==null){the_reference=nil;};if(options==null){options=$hash2([],{});};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if(the_record['$[]']("layer")['$=='](self.$window_top_layer())){}else{front_layer=self.$window_next_layer();the_record['$[]']("window").$gxg_merge_style("z-index",$rb_plus(200,front_layer));$writer=["layer",front_layer];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};return true;}else{return false};},$Page_window_bring_to_front$90.$$arity=-1);Opal.def(self,'$next_minimize_slot',$Page_next_minimize_slot$91=function $$next_minimize_slot(){var $$92,self=this,cell_width=nil,cell_height=nil,bounds=nil,columns=nil,rows=nil,found=nil;cell_width=200;cell_height=24;bounds=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area();columns=Opal.Range.$new(0,$rb_minus(bounds['$[]']("right"),bounds['$[]']("left")).$step(cell_width).$size(),false);rows=Opal.Range.$new(0,$rb_minus(bounds['$[]']("bottom"),bounds['$[]']("top")).$step(cell_height).$size(),false);found=nil;(function(){var $brk=Opal.new_brk();try{return $send(Opal.Range.$new(0,$rb_minus(rows,1),false),'each',[],($$92=function(the_row){var self=$$92.$$s==null?this:$$92.$$s,$$93;if(the_row==null){the_row=nil;};(function(){var $brk=Opal.new_brk();try{return $send(Opal.Range.$new(0,$rb_minus(columns,1),false),'each',[],($$93=function(the_column){var self=$$93.$$s==null?this:$$93.$$s,$$94,is_in=nil,test_rect=nil;if(self.window_registry==null)self.window_registry=nil;if(the_column==null){the_column=nil;};is_in=false;test_rect=$hash2(["top","left","right","bottom"],{"top":$rb_plus(bounds['$[]']("top"),$rb_times(the_row,cell_height)),"left":$rb_plus(bounds['$[]']("left"),$rb_times(the_column,cell_width)),"right":$rb_plus($rb_plus(bounds['$[]']("left"),$rb_times(the_column,cell_width)),cell_width),"bottom":$rb_plus($rb_plus(bounds['$[]']("top"),$rb_times(the_row,cell_height)),cell_height)});(function(){var $brk=Opal.new_brk();try{return $send(self.window_registry.$values(),'each',[],($$94=function(the_record){var self=$$94.$$s==null?this:$$94.$$s,this_rect=nil,$writer=nil,$ret_or_45=nil,$ret_or_46=nil,$ret_or_47=nil;if(the_record==null){the_record=nil;};this_rect=$hash2(["top","left","right","bottom"],{"top":0,"left":0,"right":0,"bottom":0});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(this_rect,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(this_rect,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["right",(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i()];$send(this_rect,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["bottom",(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i()];$send(this_rect,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy((function(){if($truthy(($ret_or_45=(function(){if($truthy(($ret_or_46=(function(){if($truthy(($ret_or_47=this_rect['$[]']("top")['$=='](test_rect['$[]']("top"))))){return this_rect['$[]']("left")['$=='](test_rect['$[]']("left"))}else{return $ret_or_47};return nil;})()))){return this_rect['$[]']("right")['$=='](test_rect['$[]']("right"))}else{return $ret_or_46};return nil;})()))){return this_rect['$[]']("bottom")['$=='](test_rect['$[]']("bottom"))}else{return $ret_or_45};return nil;})())){is_in=true;Opal.brk(nil,$brk);}else{return nil};},$$94.$$s=self,$$94.$$brk=$brk,$$94.$$arity=1,$$94))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();if($truthy(is_in)){return nil}else{found=test_rect;Opal.brk(nil,$brk);};},$$93.$$s=self,$$93.$$brk=$brk,$$93.$$arity=1,$$93))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();if($truthy(found)){Opal.brk(nil,$brk)}else{return nil};},$$92.$$s=self,$$92.$$brk=$brk,$$92.$$arity=1,$$92))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();return found;},$Page_next_minimize_slot$91.$$arity=0);Opal.def(self,'$minimize_effect',$Page_minimize_effect$95=function $$minimize_effect(the_record){var $iter=$Page_minimize_effect$95.$$p,block=$iter||nil,$$96,$$97,$$98,self=this,switcher=nil,origin=nil,$writer=nil,origin_right=nil,origin_bottom=nil,destination=nil,destination_right=nil,destination_bottom=nil,conclude=nil,the_slot=nil,animate_content=nil,settings=nil;if($iter)$Page_minimize_effect$95.$$p=null;if($iter)$Page_minimize_effect$95.$$p=null;;if(the_record==null){the_record=nil;};switcher=self.$get_window_switcher();if($truthy(switcher)){origin=$hash2(["opacity"],{"opacity":1});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;origin_right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();origin_bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();$writer=["width",$rb_minus(origin_right,origin['$[]']("left"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(origin_bottom,origin['$[]']("top"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2(["opacity"],{"opacity":0});$writer=["top",(switcher.$element().getBoundingClientRect().top).$to_i()];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(switcher.$element().getBoundingClientRect().right).$to_i()];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination_right=(switcher.$element().getBoundingClientRect().right).$to_i();destination_bottom=(switcher.$element().getBoundingClientRect().top).$to_i();$writer=["width",$rb_minus(destination_right,destination['$[]']("left"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(destination_bottom,destination['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;conclude=$send($$($nesting,'Proc'),'new',[],($$96=function(){var self=$$96.$$s==null?this:$$96.$$s;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil}},$$96.$$s=self,$$96.$$arity=0,$$96));}else{the_slot=self.$next_minimize_slot();origin=$hash2(["opacity"],{"opacity":1});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;origin_right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();origin_bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();$writer=["width",$rb_minus(origin_right,origin['$[]']("left"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(origin_bottom,origin['$[]']("top"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2(["opacity"],{"opacity":0.5});$writer=["top",the_slot['$[]']("top")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",the_slot['$[]']("left")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination_right=the_slot['$[]']("right");destination_bottom=the_slot['$[]']("bottom");$writer=["width",$rb_minus(destination_right,destination['$[]']("left"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(destination_bottom,destination['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;conclude=$send($$($nesting,'Proc'),'new',[],($$97=function(){var self=$$97.$$s==null?this:$$97.$$s;self.$window_send_to_back(the_record['$[]']("window").$uuid());if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil};},$$97.$$s=self,$$97.$$arity=0,$$97));};animate_content=$send($$($nesting,'Proc'),'new',[],($$98=function(){var self=$$98.$$s==null?this:$$98.$$s,top=nil,left=nil,right=nil,bottom=nil;top=(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i();left=(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i();right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();return the_record['$[]']("window").$set_frame($hash2(["top","left","right","bottom"],{"top":top,"left":left,"right":right,"bottom":bottom}));},$$98.$$s=self,$$98.$$arity=0,$$98));the_record['$[]']("window").$animate($hash2(["origin","destination","options"],{"origin":origin,"destination":destination,"options":$hash2(["duration","animationiteration","animationend"],{"duration":500,"animationiteration":animate_content,"animationend":conclude})}));settings=$hash2(["action","top","left","right","bottom"],{"action":"minimize","top":0,"left":0,"right":0,"bottom":0});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["right",(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["bottom",(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return settings;},$Page_minimize_effect$95.$$arity=-1);Opal.def(self,'$unminimize_effect',$Page_unminimize_effect$99=function $$unminimize_effect(the_record){var $iter=$Page_unminimize_effect$99.$$p,block=$iter||nil,$$100,$$101,self=this,switcher=nil,origin=nil,$writer=nil,origin_right=nil,origin_bottom=nil,destination=nil,destination_right=nil,destination_bottom=nil,animate_content=nil,conclude=nil;if($iter)$Page_unminimize_effect$99.$$p=null;if($iter)$Page_unminimize_effect$99.$$p=null;;if(the_record==null){the_record=nil;};switcher=self.$get_window_switcher();if($truthy(switcher)){origin=$hash2(["opacity"],{"opacity":0});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;origin_right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();origin_bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();$writer=["width",$rb_minus(origin_right,origin['$[]']("left"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(origin_bottom,origin['$[]']("top"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2(["opacity"],{"opacity":1});$writer=["top",the_record['$[]']("restore")['$[]']("settings")['$[]']("top")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",the_record['$[]']("restore")['$[]']("settings")['$[]']("left")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination_right=the_record['$[]']("restore")['$[]']("settings")['$[]']("right");destination_bottom=the_record['$[]']("restore")['$[]']("settings")['$[]']("bottom");$writer=["width",$rb_minus(destination_right,destination['$[]']("left"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(destination_bottom,destination['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;}else{origin=$hash2(["opacity"],{"opacity":0.5});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;origin_right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();origin_bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();$writer=["width",$rb_minus(origin_right,origin['$[]']("left"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(origin_bottom,origin['$[]']("top"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2(["opacity"],{"opacity":1});$writer=["top",the_record['$[]']("restore")['$[]']("settings")['$[]']("top")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",the_record['$[]']("restore")['$[]']("settings")['$[]']("left")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination_right=the_record['$[]']("restore")['$[]']("settings")['$[]']("right");destination_bottom=the_record['$[]']("restore")['$[]']("settings")['$[]']("bottom");$writer=["width",$rb_minus(destination_right,destination['$[]']("left"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(destination_bottom,destination['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};animate_content=$send($$($nesting,'Proc'),'new',[],($$100=function(){var self=$$100.$$s==null?this:$$100.$$s,top=nil,left=nil,right=nil,bottom=nil;top=(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i();left=(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i();right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();return the_record['$[]']("window").$set_frame($hash2(["top","left","right","bottom"],{"top":top,"left":left,"right":right,"bottom":bottom}));},$$100.$$s=self,$$100.$$arity=0,$$100));conclude=$send($$($nesting,'Proc'),'new',[],($$101=function(){var self=$$101.$$s==null?this:$$101.$$s;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil}},$$101.$$s=self,$$101.$$arity=0,$$101));the_record['$[]']("window").$animate($hash2(["origin","destination","options"],{"origin":origin,"destination":destination,"options":$hash2(["duration","animationiteration","animationend"],{"duration":500,"animationiteration":animate_content,"animationend":conclude})}));return true;},$Page_unminimize_effect$99.$$arity=-1);Opal.def(self,'$maximize_effect',$Page_maximize_effect$102=function $$maximize_effect(the_record){var $iter=$Page_maximize_effect$102.$$p,block=$iter||nil,$$103,$$104,self=this,bounds=nil,origin=nil,$writer=nil,origin_right=nil,origin_bottom=nil,destination=nil,animate_content=nil,conclude=nil,settings=nil;if($iter)$Page_maximize_effect$102.$$p=null;if($iter)$Page_maximize_effect$102.$$p=null;;if(the_record==null){the_record=nil;};bounds=$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$layout_content_area();origin=$hash2([],{});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;origin_right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();origin_bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();$writer=["width",$rb_minus(origin_right,origin['$[]']("left"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(origin_bottom,origin['$[]']("top"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2([],{});$writer=["top",bounds['$[]']("top")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",bounds['$[]']("left")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["width",$rb_minus(bounds['$[]']("right"),destination['$[]']("left"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(bounds['$[]']("bottom"),destination['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;animate_content=$send($$($nesting,'Proc'),'new',[],($$103=function(){var self=$$103.$$s==null?this:$$103.$$s,top=nil,left=nil,right=nil,bottom=nil;top=(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i();left=(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i();right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();return the_record['$[]']("window").$set_frame($hash2(["top","left","right","bottom"],{"top":top,"left":left,"right":right,"bottom":bottom}));},$$103.$$s=self,$$103.$$arity=0,$$103));conclude=$send($$($nesting,'Proc'),'new',[],($$104=function(){var self=$$104.$$s==null?this:$$104.$$s;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil}},$$104.$$s=self,$$104.$$arity=0,$$104));the_record['$[]']("window").$animate($hash2(["origin","destination","options"],{"origin":origin,"destination":destination,"options":$hash2(["duration","animationiteration","animationend"],{"duration":500,"animationiteration":animate_content,"animationend":conclude})}));settings=$hash2(["action","top","left","right","bottom"],{"action":"maximize","top":0,"left":0,"right":0,"bottom":0});$writer=["top",bounds['$[]']("top")];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",bounds['$[]']("left")];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["right",bounds['$[]']("right")];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["bottom",bounds['$[]']("bottom")];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return settings;},$Page_maximize_effect$102.$$arity=-1);Opal.def(self,'$unmaximize_effect',$Page_unmaximize_effect$105=function $$unmaximize_effect(the_record){var $iter=$Page_unmaximize_effect$105.$$p,block=$iter||nil,$$106,$$107,self=this,origin=nil,$writer=nil,origin_right=nil,origin_bottom=nil,destination=nil,destination_right=nil,destination_bottom=nil,animate_content=nil,conclude=nil;if($iter)$Page_unmaximize_effect$105.$$p=null;if($iter)$Page_unmaximize_effect$105.$$p=null;;if(the_record==null){the_record=nil;};origin=$hash2([],{});$writer=["top",the_record['$[]']("window").$top()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",the_record['$[]']("window").$left()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;origin_right=the_record['$[]']("window").$right();origin_bottom=the_record['$[]']("window").$bottom();$writer=["width",$rb_minus(origin_right,origin['$[]']("left"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(origin_bottom,origin['$[]']("top"))];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2([],{});$writer=["top",the_record['$[]']("restore")['$[]']("settings")['$[]']("top")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",the_record['$[]']("restore")['$[]']("settings")['$[]']("left")];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination_right=the_record['$[]']("restore")['$[]']("settings")['$[]']("right");destination_bottom=the_record['$[]']("restore")['$[]']("settings")['$[]']("bottom");$writer=["width",$rb_minus(destination_right,destination['$[]']("left"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",$rb_minus(destination_bottom,destination['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;animate_content=$send($$($nesting,'Proc'),'new',[],($$106=function(){var self=$$106.$$s==null?this:$$106.$$s,top=nil,left=nil,right=nil,bottom=nil;top=(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i();left=(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i();right=(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i();bottom=(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i();return the_record['$[]']("window").$set_frame($hash2(["top","left","right","bottom"],{"top":top,"left":left,"right":right,"bottom":bottom}));},$$106.$$s=self,$$106.$$arity=0,$$106));conclude=$send($$($nesting,'Proc'),'new',[],($$107=function(){var self=$$107.$$s==null?this:$$107.$$s;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil}},$$107.$$s=self,$$107.$$arity=0,$$107));the_record['$[]']("window").$animate($hash2(["origin","destination","options"],{"origin":origin,"destination":destination,"options":$hash2(["duration","animationiteration","animationend"],{"duration":500,"animationiteration":animate_content,"animationend":conclude})}));return true;},$Page_unmaximize_effect$105.$$arity=-1);Opal.def(self,'$rollup_effect',$Page_rollup_effect$108=function $$rollup_effect(the_record){var $iter=$Page_rollup_effect$108.$$p,block=$iter||nil,$$109,self=this,origin=nil,the_top=nil,$writer=nil,destination=nil,window_body=nil,settings=nil;if($iter)$Page_rollup_effect$108.$$p=null;if($iter)$Page_rollup_effect$108.$$p=null;;if(the_record==null){the_record=nil;};origin=$hash2([],{});the_top=the_record['$[]']("window").$top();$writer=["height",the_record['$[]']("window").$height()];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2([],{});$writer=["height",24];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;window_body=the_record['$[]']("window").$find_child("window_body",true);if($truthy(window_body)){$send(window_body,'hide',[$hash2(["origin","destination"],{"origin":$hash2(["opacity"],{"opacity":1.0}),"destination":$hash2(["opacity"],{"opacity":0.0})})],($$109=function(){var self=$$109.$$s==null?this:$$109.$$s;the_record['$[]']("window").$animate($hash2(["origin","destination"],{"origin":origin,"destination":destination}));if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil};},$$109.$$s=self,$$109.$$arity=0,$$109))};settings=$hash2(["action","top","left","right","bottom"],{"action":"rollup","top":0,"left":0,"right":0,"bottom":0});$writer=["top",(the_record['$[]']("window").$element().getBoundingClientRect().top).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["left",(the_record['$[]']("window").$element().getBoundingClientRect().left).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["right",(the_record['$[]']("window").$element().getBoundingClientRect().right).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["bottom",(the_record['$[]']("window").$element().getBoundingClientRect().bottom).$to_i()];$send(settings,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return settings;},$Page_rollup_effect$108.$$arity=-1);Opal.def(self,'$rolldown_effect',$Page_rolldown_effect$110=function $$rolldown_effect(the_record){var $iter=$Page_rolldown_effect$110.$$p,block=$iter||nil,$$111,self=this,origin=nil,$writer=nil,destination=nil,conclude=nil;if($iter)$Page_rolldown_effect$110.$$p=null;if($iter)$Page_rolldown_effect$110.$$p=null;;if(the_record==null){the_record=nil;};origin=$hash2([],{});$writer=["height",24];$send(origin,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;destination=$hash2([],{});$writer=["height",$rb_minus(the_record['$[]']("restore")['$[]']("settings")['$[]']("bottom"),the_record['$[]']("restore")['$[]']("settings")['$[]']("top"))];$send(destination,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;conclude=$send($$($nesting,'Proc'),'new',[],($$111=function(){var self=$$111.$$s==null?this:$$111.$$s,$$112,window_body=nil;window_body=the_record['$[]']("window").$find_child("window_body",true);if($truthy(window_body)){return $send(window_body,'show',[$hash2(["origin","destination"],{"origin":$hash2(["opacity"],{"opacity":0.0}),"destination":$hash2(["opacity"],{"opacity":1.0})})],($$112=function(){var self=$$112.$$s==null?this:$$112.$$s;the_record['$[]']("window").$commit_settings();if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil};},$$112.$$s=self,$$112.$$arity=0,$$112))}else{return nil};},$$111.$$s=self,$$111.$$arity=0,$$111));the_record['$[]']("window").$animate($hash2(["origin","destination","options"],{"origin":origin,"destination":destination,"options":$hash2(["duration","animationend"],{"duration":500,"animationend":conclude})}));return true;},$Page_rolldown_effect$110.$$arity=-1);Opal.def(self,'$window_restoreable?',$Page_window_restoreable$ques$113=function(the_reference){var self=this,the_record=nil;if(the_reference==null){the_reference=nil;};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if($truthy(the_record['$[]']("restore")['$is_a?']($$$('::','Hash')))){return true}else{return false}}else{return false};},$Page_window_restoreable$ques$113.$$arity=-1);Opal.def(self,'$window_restore',$Page_window_restore$114=function $$window_restore(the_reference,options){var $iter=$Page_window_restore$114.$$p,block=$iter||nil,$$115,$$116,$$117,self=this,the_record=nil,$case=nil;if($iter)$Page_window_restore$114.$$p=null;if($iter)$Page_window_restore$114.$$p=null;;if(the_reference==null){the_reference=nil;};if(options==null){options=$hash2([],{});};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if($truthy(the_record['$[]']("restore")['$is_a?']($$$('::','Hash')))){$case=the_record['$[]']("restore")['$[]']("action");if("minimize"['$===']($case)){$send(self,'unminimize_effect',[the_record],($$115=function(){var self=$$115.$$s==null?this:$$115.$$s,$writer=nil;the_record['$[]']("window").$clear_special_state(the_record['$[]']("restore")['$[]']("settings"));$writer=["restore",nil];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil};},$$115.$$s=self,$$115.$$arity=0,$$115))} +else if("maximize"['$===']($case)){$send(self,'unmaximize_effect',[the_record],($$116=function(){var self=$$116.$$s==null?this:$$116.$$s,$writer=nil;the_record['$[]']("window").$clear_special_state(the_record['$[]']("restore")['$[]']("settings"));$writer=["restore",nil];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil};},$$116.$$s=self,$$116.$$arity=0,$$116))} +else if("rollup"['$===']($case)){$send(self,'rolldown_effect',[the_record],($$117=function(){var self=$$117.$$s==null?this:$$117.$$s,$writer=nil;the_record['$[]']("window").$clear_special_state(the_record['$[]']("restore")['$[]']("settings"));$writer=["restore",nil];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(block['$respond_to?']("call"))){return block.$call(true)}else{return nil};},$$117.$$s=self,$$117.$$arity=0,$$117))};return true;}else{return false}}else{return false};},$Page_window_restore$114.$$arity=-1);Opal.def(self,'$window_minimize',$Page_window_minimize$118=function $$window_minimize(the_reference,settings){var $$119,self=this,the_record=nil,$writer=nil;if(the_reference==null){the_reference=nil;};if(settings==null){settings=$hash2([],{});};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if($truthy(self['$window_restoreable?'](the_reference))){$send(self,'window_restore',[the_reference],($$119=function(){var self=$$119.$$s==null?this:$$119.$$s,$writer=nil;settings=$hash2(["top","left","right","bottom"],{"top":the_record['$[]']("window").$top(),"left":the_record['$[]']("window").$left(),"right":the_record['$[]']("window").$right(),"bottom":the_record['$[]']("window").$bottom()});$writer=["restore",$hash2(["action","settings"],{"action":"minimize","settings":settings})];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return the_record['$[]']("window").$set_special_state(self.$minimize_effect(the_record));},$$119.$$s=self,$$119.$$arity=0,$$119))}else{$writer=["restore",$hash2(["action","settings"],{"action":"minimize","settings":settings})];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;the_record['$[]']("window").$set_special_state(self.$minimize_effect(the_record));};return true;}else{return false};},$Page_window_minimize$118.$$arity=-1);Opal.def(self,'$window_maximize',$Page_window_maximize$120=function $$window_maximize(the_reference,settings){var $$121,self=this,the_record=nil,$writer=nil;if(the_reference==null){the_reference=nil;};if(settings==null){settings=$hash2([],{});};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if($truthy(self['$window_restoreable?'](the_reference))){$send(self,'window_restore',[the_reference],($$121=function(){var self=$$121.$$s==null?this:$$121.$$s,$writer=nil;settings=$hash2(["top","left","right","bottom"],{"top":the_record['$[]']("window").$top(),"left":the_record['$[]']("window").$left(),"right":the_record['$[]']("window").$right(),"bottom":the_record['$[]']("window").$bottom()});$writer=["restore",$hash2(["action","settings"],{"action":"maximize","settings":settings})];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;the_record['$[]']("window").$set_special_state(self.$maximize_effect(the_record));return self.$window_bring_to_front(the_reference);},$$121.$$s=self,$$121.$$arity=0,$$121))}else{$writer=["restore",$hash2(["action","settings"],{"action":"maximize","settings":settings})];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;the_record['$[]']("window").$set_special_state(self.$maximize_effect(the_record));self.$window_bring_to_front(the_reference);};return true;}else{return false};},$Page_window_maximize$120.$$arity=-1);Opal.def(self,'$window_rollup',$Page_window_rollup$122=function $$window_rollup(the_reference,settings){var $$123,self=this,the_record=nil,$writer=nil;if(the_reference==null){the_reference=nil;};if(settings==null){settings=$hash2([],{});};the_record=self.$get_window_registration(the_reference);if($truthy(the_record)){if($truthy(self['$window_restoreable?'](the_reference))){$send(self,'window_restore',[the_reference],($$123=function(){var self=$$123.$$s==null?this:$$123.$$s,$writer=nil;settings=$hash2(["top","left","right","bottom"],{"top":the_record['$[]']("window").$top(),"left":the_record['$[]']("window").$left(),"right":the_record['$[]']("window").$right(),"bottom":the_record['$[]']("window").$bottom()});$writer=["restore",$hash2(["action","settings"],{"action":"rollup","settings":settings})];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return the_record['$[]']("window").$set_special_state(self.$rollup_effect(the_record));},$$123.$$s=self,$$123.$$arity=0,$$123))}else{$writer=["restore",$hash2(["action","settings"],{"action":"rollup","settings":settings})];$send(the_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;the_record['$[]']("window").$set_special_state(self.$rollup_effect(the_record));};return true;}else{return false};},$Page_window_rollup$122.$$arity=-1);Opal.def(self,'$get_window_registration',$Page_get_window_registration$124=function $$get_window_registration(the_reference){var self=this;if(the_reference==null){the_reference=nil;};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){return self.window_registry['$[]'](the_reference)}else{return nil};},$Page_get_window_registration$124.$$arity=-1);Opal.def(self,'$get_window',$Page_get_window$125=function $$get_window(the_reference){var self=this,registration=nil;if(the_reference==null){the_reference=nil;};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){registration=self.$get_window_registration(the_reference);if($truthy(registration)){return registration['$[]']("window")}else{return nil};}else{return nil};},$Page_get_window$125.$$arity=-1);Opal.def(self,'$window_list',$Page_window_list$126=function $$window_list(){var $$127,self=this,result=nil;result=[];$send(self.window_registry.$keys(),'each',[],($$127=function(reference){var self=$$127.$$s==null?this:$$127.$$s;if(self.window_registry==null)self.window_registry=nil;if(reference==null){reference=nil;};return result['$<<']($hash2(["uuid","title"],{"uuid":reference,"title":self.window_registry['$[]'](reference)['$[]']("window").$title()}));},$$127.$$s=self,$$127.$$arity=1,$$127));return result;},$Page_window_list$126.$$arity=0);Opal.def(self,'$window_repack_layers',$Page_window_repack_layers$128=function $$window_repack_layers(){var $$129,$$130,self=this;self.window_registry=$send(self.window_registry,'sort_by',[],($$129=function(uuid,entry){var self=$$129.$$s==null?this:$$129.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$129.$$s=self,$$129.$$arity=2,$$129)).$to_h();$send(self.window_registry.$values(),'each_with_index',[],($$130=function(entry,indexer){var self=$$130.$$s==null?this:$$130.$$s,$writer=nil;if(entry==null){entry=nil;};if(indexer==null){indexer=nil;};entry['$[]']("window").$gxg_merge_style("z-index",$rb_plus(200,indexer));$writer=["layer",indexer];$send(entry,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$$130.$$s=self,$$130.$$arity=2,$$130));return true;},$Page_window_repack_layers$128.$$arity=0);Opal.def(self,'$window_top_layer',$Page_window_top_layer$131=function $$window_top_layer(){var $$132,self=this,$ret_or_48=nil;if($truthy(($ret_or_48=$send(self.window_registry,'collect',[],($$132=function(uuid,entry){var self=$$132.$$s==null?this:$$132.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$132.$$s=self,$$132.$$arity=2,$$132)).$max()))){return $ret_or_48}else{return 0}},$Page_window_top_layer$131.$$arity=0);Opal.def(self,'$window_back_layer',$Page_window_back_layer$133=function $$window_back_layer(){var $$134,$$135,self=this,back_layer=nil,$ret_or_49=nil,$ret_or_50=nil;back_layer=$rb_minus((function(){if($truthy(($ret_or_49=$send(self.window_registry,'collect',[],($$134=function(uuid,entry){var self=$$134.$$s==null?this:$$134.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$134.$$s=self,$$134.$$arity=2,$$134)).$min()))){return $ret_or_49}else{return 0};return nil;})(),1);if($truthy($rb_lt(back_layer,100))){self.$window_repack_layers();back_layer=$rb_minus((function(){if($truthy(($ret_or_50=$send(self.window_registry,'collect',[],($$135=function(uuid,entry){var self=$$135.$$s==null?this:$$135.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$135.$$s=self,$$135.$$arity=2,$$135)).$min()))){return $ret_or_50}else{return 0};return nil;})(),1);};return back_layer;},$Page_window_back_layer$133.$$arity=0);Opal.def(self,'$window_next_layer',$Page_window_next_layer$136=function $$window_next_layer(){var $$137,$$138,self=this,next_layer=nil,$ret_or_51=nil,$ret_or_52=nil;next_layer=$rb_plus((function(){if($truthy(($ret_or_51=$send(self.window_registry,'collect',[],($$137=function(uuid,entry){var self=$$137.$$s==null?this:$$137.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$137.$$s=self,$$137.$$arity=2,$$137)).$max()))){return $ret_or_51}else{return 0};return nil;})(),1);if($truthy($rb_gt(next_layer,99))){self.$window_repack_layers();next_layer=$rb_plus((function(){if($truthy(($ret_or_52=$send(self.window_registry,'collect',[],($$138=function(uuid,entry){var self=$$138.$$s==null?this:$$138.$$s;if(uuid==null){uuid=nil;};if(entry==null){entry=nil;};return entry['$[]']("layer");},$$138.$$s=self,$$138.$$arity=2,$$138)).$max()))){return $ret_or_52}else{return 0};return nil;})(),1);};return next_layer;},$Page_window_next_layer$136.$$arity=0);Opal.def(self,'$window_register',$Page_window_register$139=function $$window_register(the_reference,the_instance){var self=this,front_layer=nil,$writer=nil;if(the_reference==null){the_reference=nil;};if(the_instance==null){the_instance=nil;};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){if($truthy(the_instance)){front_layer=self.$window_next_layer();the_instance.$gxg_merge_style("z-index",$rb_plus(200,front_layer));$writer=[the_reference,$hash2(["window","layer","restore"],{"window":the_instance,"layer":front_layer,"restore":nil})];$send(self.window_registry,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return true;}else{return false}}else{return false};},$Page_window_register$139.$$arity=-1);Opal.def(self,'$window_unregister',$Page_window_unregister$140=function $$window_unregister(the_reference){var self=this;if(the_reference==null){the_reference=nil;};if($truthy(the_reference['$is_any?']($$$('::','String'),$$$('::','Symbol')))){self.window_registry.$delete(the_reference);return true;}else{return false};},$Page_window_unregister$140.$$arity=-1);Opal.def(self,'$set_window_switcher',$Page_set_window_switcher$141=function $$set_window_switcher(the_switcher){var self=this;if(the_switcher==null){the_switcher=nil;};if($truthy(the_switcher)){return(self.window_switcher=the_switcher)}else{return nil};},$Page_set_window_switcher$141.$$arity=-1);return(Opal.def(self,'$get_window_switcher',$Page_get_window_switcher$142=function $$get_window_switcher(){var self=this;return self.window_switcher},$Page_get_window_switcher$142.$$arity=0),nil)&&'get_window_switcher';})($nesting[0],null,$nesting)})($nesting[0],$nesting);})($nesting[0],$nesting)})($nesting[0],$nesting)};Opal.modules["web/gxg_gui"]=function(Opal){function $rb_gt(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs>rhs:lhs['$>'](rhs);} function $rb_minus(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs-rhs:lhs['$-'](rhs);} function $rb_plus(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs+rhs:lhs['$+'](rhs);} function $rb_times(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs*rhs:lhs['$*'](rhs);} function $rb_divide(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs/rhs:lhs['$/'](rhs);} -var self=Opal.top,$nesting=[],nil=Opal.nil,$$$=Opal.$$$,$$=Opal.$$,$module=Opal.module,$klass=Opal.klass,$alias=Opal.alias,$truthy=Opal.truthy,$hash2=Opal.hash2,$send=Opal.send,$send2=Opal.send2,$find_super=Opal.find_super,$range=Opal.range;Opal.add_stubs(['$is_a?','$add_child','$original_add_child','$children','$valid_uuid?','$==','$values','$original_children','$>','$size','$shift','$uuid','$title','$each','$<<','$new','$to_s','$title=','$-','$[]=','$build_components','$page','$find_object_by','$respond_to?','$include?','$to_sym','$log_warn','$inspect','$clone','$node_path','$nodes','$split','$node_at_path','$+','$join','$gxg_get_state','$expand','$post_event','$expand_path','$to_proc','$call','$!=','$unhighlight','$highlight','$[]','$register_component_class','$parent','$unshift','$is_any?','$update_appearance','$find_parent_type','$theme_icon','$theme_widget','$merge_style','$show','$set_state','$set_attribute','$tree','$hide','$collapse','$unpersist','$each_pair','$animate','$layout_refresh','$to_i','$*','$to_f','$layout_content_area','$round','$/','$new_component','$dialog_open','$log_error','$===','$basename','$reverse']);return(function($base,$parent_nesting){var self=$module($base,'GxG');var $nesting=[self].concat($parent_nesting);return(function($base,$parent_nesting){var self=$module($base,'Gui');var $nesting=[self].concat($parent_nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Tree');var $nesting=[self].concat($parent_nesting),$Tree_add_child$1,$Tree_children$2,$Tree_find_child$3,$Tree_initialize$5,$Tree_cascade$6,$Tree_update_appearance$7,$Tree_set_processor$8,$Tree_node_at_path$9,$Tree_expand_path$11,$Tree_selection$15,$Tree_select$16,$Tree_expand$17,$Tree_collapse$18;self.$$prototype.content=self.$$prototype.uuid=self.$$prototype.processors=self.$$prototype.selection=nil;$alias(self,"original_add_child","add_child");Opal.def(self,'$add_child',$Tree_add_child$1=function $$add_child(object_record){var self=this;if(object_record==null){object_record=nil;};if($truthy(object_record['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(self.content)){return self.content.$add_child(object_record)}else{return self.$original_add_child(object_record)}}else{return nil};},$Tree_add_child$1.$$arity=-1);$alias(self,"original_children","children");Opal.def(self,'$children',$Tree_children$2=function $$children(){var self=this;if($truthy(self.content)){return self.content.$children()}else{return $hash2([],{})}},$Tree_children$2.$$arity=0);Opal.def(self,'$find_child',$Tree_find_child$3=function $$find_child(the_reference,interior){var $a,$$4,self=this,result=nil,uuid_check=nil,search_queue=nil,entry=nil;if(the_reference==null){the_reference=nil;};if(interior==null){interior=false;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_reference))){uuid_check=true}else{uuid_check=false};if(interior['$=='](true)){search_queue=self.$original_children().$values()}else{search_queue=self.$children().$values()};while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(uuid_check)){if(entry.$uuid()['$=='](the_reference)){result=entry;break;;}}else if(entry.$title()['$=='](the_reference)){result=entry;break;;};if($truthy(result)){}else{$send(entry.$children().$values(),'each',[],($$4=function(the_child){var self=$$4.$$s==null?this:$$4.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$4.$$s=self,$$4.$$arity=1,$$4))};};};return result;},$Tree_find_child$3.$$arity=-1);Opal.def(self,'$initialize',$Tree_initialize$5=function $$initialize(the_parent,the_options){var $iter=$Tree_initialize$5.$$p,$yield=$iter||nil,self=this;if($iter)$Tree_initialize$5.$$p=null;self.content=nil;self.selection=nil;self.processors=$hash2([],{});$send2(self,$find_super(self,'initialize',$Tree_initialize$5,false,true),'initialize',[the_parent,the_options],null);return self;},$Tree_initialize$5.$$arity=2);Opal.def(self,'$cascade',$Tree_cascade$6=function $$cascade(){var self=this,interior_component=nil,$writer=nil,the_object=nil;interior_component=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"content "+(self.uuid.$to_s())];$send(interior_component,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.list"];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["white-space","width","height","list-style","margin","padding"],{"white-space":"nowrap","width":"auto","height":"auto","list-style":"none","margin":"0px","padding":"0px"})})];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.content=nil;self.$page().$build_components(self,[interior_component]);the_object=self.$page().$find_object_by(""+"content "+(self.uuid.$to_s()));if($truthy(the_object)){return(self.content=the_object)}else{return nil};},$Tree_cascade$6.$$arity=0);Opal.def(self,'$update_appearance',$Tree_update_appearance$7=function $$update_appearance(){var self=this;return nil},$Tree_update_appearance$7.$$arity=0);Opal.def(self,'$set_processor',$Tree_set_processor$8=function $$set_processor(the_type){var $iter=$Tree_set_processor$8.$$p,block=$iter||nil,self=this,$writer=nil;if($iter)$Tree_set_processor$8.$$p=null;if($iter)$Tree_set_processor$8.$$p=null;;if(the_type==null){the_type=nil;};if($truthy(block['$respond_to?']("call"))){if($truthy(["select","expand","collapse"]['$include?'](the_type.$to_s().$to_sym()))){$writer=[the_type.$to_s().$to_sym(),block];$send(self.processors,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return self.$log_warn(""+"Unsupported processor type: "+(the_type.$to_s().$to_sym().$inspect()))}}else{return nil};},$Tree_set_processor$8.$$arity=-1);Opal.def(self,'$node_at_path',$Tree_node_at_path$9=function $$node_at_path(the_path){var $a,$$10,self=this,result=nil,search_queue=nil,entry=nil;if(the_path==null){the_path=nil;};result=nil;search_queue=self.$children().$values().$clone();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'TreeNode')))){if(entry.$node_path()['$=='](the_path)){result=entry;break;;}else{$send(entry.$nodes().$values(),'each',[],($$10=function(the_child){var self=$$10.$$s==null?this:$$10.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$10.$$s=self,$$10.$$arity=1,$$10))}};};return result;},$Tree_node_at_path$9.$$arity=-1);Opal.def(self,'$expand_path',$Tree_expand_path$11=function $$expand_path(the_path){var $iter=$Tree_expand_path$11.$$p,block=$iter||nil,$$12,self=this,path_stack=nil,path_array=nil;if($iter)$Tree_expand_path$11.$$p=null;if($iter)$Tree_expand_path$11.$$p=null;;if(the_path==null){the_path=nil;};if($truthy(the_path['$is_a?']($$$('::','String')))){path_stack=[];path_array=the_path.$split("/");(function(){var $brk=Opal.new_brk();try{return $send(path_array,'each',[],($$12=function(entry){var self=$$12.$$s==null?this:$$12.$$s,$$13,$$14,the_node=nil;if(entry==null){entry=nil;};if($truthy($rb_gt(entry.$size(),0))){path_stack['$<<'](entry);the_node=self.$node_at_path($rb_plus("/",path_stack.$join("/")));if($truthy(the_node['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'TreeNode')))){if(the_node.$gxg_get_state("expanded")['$=='](false)){the_node.$expand();$send($$$($$($nesting,'GxG'),'DISPATCHER'),'post_event',["display"],($$13=function(){var self=$$13.$$s==null?this:$$13.$$s;return $send(self,'expand_path',[the_path],block.$to_proc())},$$13.$$s=self,$$13.$$arity=0,$$13));Opal.brk(nil,$brk);};if(the_node.$node_path()['$=='](the_path)){if($truthy(block['$respond_to?']("call"))){return block.$call()}else{return nil}}else{return nil};}else{$send($$$($$($nesting,'GxG'),'DISPATCHER'),'post_event',["display"],($$14=function(){var self=$$14.$$s==null?this:$$14.$$s;return $send(self,'expand_path',[the_path],block.$to_proc())},$$14.$$s=self,$$14.$$arity=0,$$14));Opal.brk(nil,$brk);};}else{return nil};},$$12.$$s=self,$$12.$$brk=$brk,$$12.$$arity=1,$$12))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();};return true;},$Tree_expand_path$11.$$arity=-1);Opal.def(self,'$selection',$Tree_selection$15=function $$selection(){var self=this;return self.selection},$Tree_selection$15.$$arity=0);Opal.def(self,'$select',$Tree_select$16=function $$select(the_node){var self=this;if(the_node==null){the_node=nil;};if($truthy(the_node['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'TreeNode')))){if($truthy(self.selection['$!='](the_node))){if($truthy(self.selection)){self.selection.$unhighlight()};self.selection=the_node;self.selection.$highlight();if($truthy(self.processors['$[]']("select")['$respond_to?']("call"))){return self.processors['$[]']("select").$call(self.selection)}else{return nil};}else{return nil}}else{return nil};},$Tree_select$16.$$arity=-1);Opal.def(self,'$expand',$Tree_expand$17=function $$expand(the_node){var self=this;if(the_node==null){the_node=nil;};if($truthy(the_node['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'TreeNode')))){if($truthy(self.processors['$[]']("expand")['$respond_to?']("call"))){return self.processors['$[]']("expand").$call(the_node)}else{return nil}}else{return nil};},$Tree_expand$17.$$arity=-1);return(Opal.def(self,'$collapse',$Tree_collapse$18=function $$collapse(the_node){var self=this;if(the_node==null){the_node=nil;};if($truthy(the_node['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'TreeNode')))){if($truthy(self.processors['$[]']("collapse")['$respond_to?']("call"))){return self.processors['$[]']("collapse").$call(the_node)}else{return nil}}else{return nil};},$Tree_collapse$18.$$arity=-1),nil)&&'collapse';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("tree",$$$($$$($$$('::','GxG'),'Gui'),'Tree'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TreeNode');var $nesting=[self].concat($parent_nesting),$TreeNode__before_create$19,$TreeNode_add_child$20,$TreeNode_nodes$21,$TreeNode_node_path$22,$TreeNode_find_child$24,$TreeNode_update_appearance$26,$TreeNode_data$27,$TreeNode_appearance$28,$TreeNode_set_appearance$29,$TreeNode_tree_node$30,$TreeNode_tree$31,$TreeNode_initialize$32,$TreeNode_cascade$33,$TreeNode_highlight$34,$TreeNode_unhighlight$35,$TreeNode_expand$36,$TreeNode_collapse$37,$TreeNode_enable$38,$TreeNode_disable$40;self.$$prototype.data=self.$$prototype.content=self.$$prototype.appearance=self.$$prototype.uuid=self.$$prototype.label=self.$$prototype.expander=nil;Opal.def(self,'$_before_create',$TreeNode__before_create$19=function $$_before_create(){var $iter=$TreeNode__before_create$19.$$p,$yield=$iter||nil,self=this;if($iter)$TreeNode__before_create$19.$$p=null;if($truthy(self.data['$is_a?']($$$('::','Hash')))){if($truthy(self.data['$[]']("title"))){self.title=self.data['$[]']("title")}};return $send2(self,$find_super(self,'_before_create',$TreeNode__before_create$19,false,true),'_before_create',[],null);},$TreeNode__before_create$19.$$arity=0);$alias(self,"original_add_child","add_child");Opal.def(self,'$add_child',$TreeNode_add_child$20=function $$add_child(object_record){var self=this;if(object_record==null){object_record=nil;};if($truthy(object_record['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(self.content)){return self.content.$add_child(object_record)}else{return self.$original_add_child(object_record)}}else{return nil};},$TreeNode_add_child$20.$$arity=-1);Opal.def(self,'$nodes',$TreeNode_nodes$21=function $$nodes(){var self=this;if($truthy(self.content)){return self.content.$children()}else{return $hash2([],{})}},$TreeNode_nodes$21.$$arity=0);Opal.def(self,'$node_path',$TreeNode_node_path$22=function $$node_path(){var $a,$$23,self=this,the_path=nil,lineage=nil,the_parent=nil;the_path="";lineage=[self];the_parent=self.$parent();while($truthy(the_parent['$!='](nil))){if($truthy(the_parent['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'TreeNode')))){lineage.$unshift(the_parent)};the_parent=the_parent.$parent();if($truthy(the_parent['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'Tree')))){the_parent=nil};};$send(lineage,'each',[],($$23=function(the_node){var self=$$23.$$s==null?this:$$23.$$s;if(the_node==null){the_node=nil;};return(the_path=$rb_plus(the_path,""+"/"+(the_node.$title())));},$$23.$$s=self,$$23.$$arity=1,$$23));return the_path;},$TreeNode_node_path$22.$$arity=0);Opal.def(self,'$find_child',$TreeNode_find_child$24=function $$find_child(the_reference){var $a,$$25,self=this,result=nil,uuid_check=nil,search_queue=nil,entry=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_reference))){uuid_check=true}else{uuid_check=false};search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(uuid_check)){if(entry.$uuid()['$=='](the_reference)){result=entry;break;;}}else if(entry.$title()['$=='](the_reference)){result=entry;break;;};if($truthy(result)){}else{$send(entry.$children().$values(),'each',[],($$25=function(the_child){var self=$$25.$$s==null?this:$$25.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$25.$$s=self,$$25.$$arity=1,$$25))};};};return result;},$TreeNode_find_child$24.$$arity=-1);Opal.def(self,'$update_appearance',$TreeNode_update_appearance$26=function $$update_appearance(){var self=this;if($truthy(self.appearance['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){return true}else{return false}},$TreeNode_update_appearance$26.$$arity=0);Opal.def(self,'$data',$TreeNode_data$27=function $$data(){var self=this;return self.data},$TreeNode_data$27.$$arity=0);Opal.def(self,'$appearance',$TreeNode_appearance$28=function $$appearance(){var self=this;return self.appearance},$TreeNode_appearance$28.$$arity=0);Opal.def(self,'$set_appearance',$TreeNode_set_appearance$29=function $$set_appearance(the_record){var self=this;if(the_record==null){the_record=nil;};if($truthy(the_record['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.appearance=the_record;return self.$update_appearance();}else{return nil};},$TreeNode_set_appearance$29.$$arity=-1);Opal.def(self,'$tree_node',$TreeNode_tree_node$30=function $$tree_node(){var self=this;return self.$find_parent_type($$$($$$($$$('::','GxG'),'Gui'),'TreeNode'))},$TreeNode_tree_node$30.$$arity=0);Opal.def(self,'$tree',$TreeNode_tree$31=function $$tree(){var self=this;return self.$find_parent_type($$$($$$($$$('::','GxG'),'Gui'),'Tree'))},$TreeNode_tree$31.$$arity=0);Opal.def(self,'$initialize',$TreeNode_initialize$32=function $$initialize(the_parent,the_options){var $iter=$TreeNode_initialize$32.$$p,$yield=$iter||nil,self=this,$ret_or_1=nil,$writer=nil,$ret_or_2=nil,$ret_or_3=nil;if($iter)$TreeNode_initialize$32.$$p=null;self.content=nil;self.appearance=$hash2(["icon","label"],{"icon":self.$theme_icon("folder.svg"),"label":"Untitled"});if($truthy(the_options['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.data=(function(){if($truthy(($ret_or_1=the_options['$[]']("data")))){return $ret_or_1}else{return $hash2(["title","type","content"],{"title":"Untitled","type":"virtual_directory","content":$hash2([],{})})};return nil;})();$writer=["icon",(function(){if($truthy(($ret_or_2=the_options['$[]']("icon")))){return $ret_or_2}else{return self.$theme_icon("folder.svg")};return nil;})().$to_s()];$send(self.appearance,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["label",(function(){if($truthy(($ret_or_3=the_options['$[]']("label")))){return $ret_or_3}else{return self.data['$[]']("title")};return nil;})().$to_s()];$send(self.appearance,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};$send2(self,$find_super(self,'initialize',$TreeNode_initialize$32,false,true),'initialize',[the_parent,the_options],null);return self;},$TreeNode_initialize$32.$$arity=2);Opal.def(self,'$cascade',$TreeNode_cascade$33=function $$cascade(){var self=this,node_frame=nil,$writer=nil,frame_row_one=nil,expander=nil,node_expander_cell=nil,icon=nil,node_icon_cell=nil,the_title=nil,node_label_cell=nil,sublist=nil,subnodes_frame_cell=nil,frame_row_two=nil,the_object=nil;node_frame=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table"];$send(node_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(node_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["nodepath","style"],{"nodepath":self.$node_path(),"style":$hash2([],{})})];$send(node_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(node_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;frame_row_one=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table"];$send(frame_row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(frame_row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2([],{})];$send(frame_row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(frame_row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(frame_row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;expander=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"expander "+(self.uuid.$to_s())];$send(expander,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.image"];$send(expander,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(expander,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["src","width","height","style"],{"src":self.$theme_widget("collapse.svg"),"width":32,"height":32,"style":$hash2(["clear","vertical-align"],{"clear":"both","vertical-align":"middle"})})];$send(expander,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_node = self.tree_node()\n"+" if the_node\n"+" unless the_node.get_state(:disabled) == true\n"+" if self.get_state(:expanded) == true\n"+" self.set_attribute(:src, theme_widget('collapse.svg'))\n"+" self.set_state(:expanded,false)\n"+" the_node.collapse()\n"+" else\n"+" self.set_attribute(:src, theme_widget('expand.svg'))\n"+" self.set_state(:expanded,true)\n"+" the_node.expand()\n"+" end\n"+" end\n"+" end\n"+" end\n"+" "];$send(expander,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(expander,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;node_expander_cell=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(node_expander_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(node_expander_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["float","width","vertical-align"],{"float":"left","width":"32px","vertical-align":"middle"})})];$send(node_expander_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(node_expander_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[expander]];$send(node_expander_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;icon=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"icon "+(self.uuid.$to_s())];$send(icon,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.image"];$send(icon,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(icon,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["src","style"],{"src":self.appearance['$[]']("icon"),"style":$hash2(["clear","width","height","vertical-align"],{"clear":"both","width":"32px","height":"32px","vertical-align":"middle"})})];$send(icon,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_node = self.tree_node()\n"+" if the_node\n"+" the_tree = the_node.tree()\n"+" if the_tree\n"+" the_tree.select(the_node)\n"+" end\n"+" end\n"+" end\n"+" "];$send(icon,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(icon,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;node_icon_cell=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(node_icon_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(node_icon_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["float","width","vertical-align"],{"float":"left","width":"32px","vertical-align":"middle"})})];$send(node_icon_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(node_icon_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[icon]];$send(node_icon_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;the_title=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"title "+(self.uuid.$to_s())];$send(the_title,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","org.gxg.gui.label"];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["content","style"],{"content":self.appearance['$[]']("label"),"style":$hash2(["float","font-size","vertical-align","text-align","margin","padding"],{"float":"left","font-size":"16px","vertical-align":"middle","text-align":"left","margin":"2px","padding":"2px"})})];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_node = self.tree_node()\n"+" if the_node\n"+" the_tree = the_node.tree()\n"+" if the_tree\n"+" the_tree.select(the_node)\n"+" end\n"+" end\n"+" end\n"+" "];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;node_label_cell=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(node_label_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(node_label_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["float","vertical-align"],{"float":"left","vertical-align":"middle"})})];$send(node_label_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(node_label_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[the_title]];$send(node_label_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;frame_row_one=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.row"];$send(frame_row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(frame_row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2([],{})];$send(frame_row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseenter) do |event|\n"+" the_node = self.tree_node()\n"+" if the_node\n"+" the_tree = the_node.highlight()\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" the_node = self.tree_node()\n"+" if the_node\n"+" the_tree = the_node.unhighlight()\n"+" end\n"+" end\n"+" "];$send(frame_row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[node_expander_cell,node_icon_cell,node_label_cell]];$send(frame_row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;sublist=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=[""+"content "+(self.uuid.$to_s())];$send(sublist,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["component","list"];$send(sublist,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(sublist,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["width","height","style"],{"width":"100%","height":"100%","style":$hash2(["list-style"],{"list-style":"none"})})];$send(sublist,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(sublist,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(sublist,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;subnodes_frame_cell=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.cell"];$send(subnodes_frame_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(subnodes_frame_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2([],{})];$send(subnodes_frame_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(subnodes_frame_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[sublist]];$send(subnodes_frame_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;frame_row_two=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();$writer=["component","org.gxg.gui.block.table.row"];$send(frame_row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2([],{})];$send(frame_row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2([],{})];$send(frame_row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""];$send(frame_row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[subnodes_frame_cell]];$send(frame_row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[frame_row_one,frame_row_two]];$send(node_frame,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.content=nil;self.$page().$build_components(self,[node_frame]);the_object=self.$page().$find_object_by(""+"content "+(self.uuid.$to_s()));if($truthy(the_object)){self.content=the_object};the_object=self.$page().$find_object_by(""+"expander "+(self.uuid.$to_s()));if($truthy(the_object)){self.expander=the_object};the_object=self.$page().$find_object_by(""+"icon "+(self.uuid.$to_s()));if($truthy(the_object)){self.icon=the_object};the_object=self.$page().$find_object_by(""+"title "+(self.uuid.$to_s()));if($truthy(the_object)){return(self.label=the_object)}else{return nil};},$TreeNode_cascade$33.$$arity=0);Opal.def(self,'$highlight',$TreeNode_highlight$34=function $$highlight(transition_parameters){var self=this;if(transition_parameters==null){transition_parameters=nil;};if($truthy(self.label)){return self.label.$merge_style($hash2(["background-color"],{"background-color":"#87acd5"}))}else{return nil};},$TreeNode_highlight$34.$$arity=-1);Opal.def(self,'$unhighlight',$TreeNode_unhighlight$35=function $$unhighlight(transition_parameters){var self=this;if(transition_parameters==null){transition_parameters=nil;};if($truthy(self.label)){return self.label.$merge_style($hash2(["background-color"],{"background-color":"#f2f2f2"}))}else{return nil};},$TreeNode_unhighlight$35.$$arity=-1);Opal.def(self,'$expand',$TreeNode_expand$36=function $$expand(transition_parameters){var self=this,the_tree=nil;if(transition_parameters==null){transition_parameters=nil;};self.content.$show(transition_parameters);self.$set_state("expanded",true);if($truthy(self.expander)){self.expander.$set_attribute("src",$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$theme_widget("expand.svg"))};the_tree=self.$tree();if($truthy(the_tree)){return the_tree.$expand(self)}else{return nil};},$TreeNode_expand$36.$$arity=-1);Opal.def(self,'$collapse',$TreeNode_collapse$37=function $$collapse(transition_parameters){var self=this,the_tree=nil;if(transition_parameters==null){transition_parameters=nil;};self.content.$hide(transition_parameters);self.$set_state("expanded",false);if($truthy(self.expander)){self.expander.$set_attribute("src",$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$theme_widget("collapse.svg"))};the_tree=self.$tree();if($truthy(the_tree)){return the_tree.$collapse(self)}else{return nil};},$TreeNode_collapse$37.$$arity=-1);Opal.def(self,'$enable',$TreeNode_enable$38=function $$enable(transition_parameters){var $$39,self=this;if(transition_parameters==null){transition_parameters=nil;};if($truthy(transition_parameters['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(transition_parameters['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){transition_parameters=transition_parameters.$unpersist()}}else{transition_parameters=$hash2(["origin","destination"],{"origin":$hash2(["opacity"],{"opacity":0.5}),"destination":$hash2(["opacity"],{"opacity":1.0})})};return $send(self.$children(),'each_pair',[],($$39=function(name,object){var self=$$39.$$s==null?this:$$39.$$s;if(self.uuid==null)self.uuid=nil;if(name==null){name=nil;};if(object==null){object=nil;};if(name['$=='](((""+"content ")+(self.uuid.$to_s())).$to_sym())){return nil}else{object.$set_state("disabled",false);return object.$animate(transition_parameters);};},$$39.$$s=self,$$39.$$arity=2,$$39));},$TreeNode_enable$38.$$arity=-1);return(Opal.def(self,'$disable',$TreeNode_disable$40=function $$disable(transition_parameters){var $$41,self=this;if(transition_parameters==null){transition_parameters=nil;};if($truthy(transition_parameters['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(transition_parameters['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){transition_parameters=transition_parameters.$unpersist()}}else{transition_parameters=$hash2(["origin","destination"],{"origin":$hash2(["opacity"],{"opacity":1.0}),"destination":$hash2(["opacity"],{"opacity":0.5})})};return $send(self.$children(),'each_pair',[],($$41=function(name,object){var self=$$41.$$s==null?this:$$41.$$s;if(self.uuid==null)self.uuid=nil;if(name==null){name=nil;};if(object==null){object=nil;};if(name['$=='](((""+"content ")+(self.uuid.$to_s())).$to_sym())){return nil}else{object.$animate(transition_parameters);return object.$set_state("disabled",true);};},$$41.$$s=self,$$41.$$arity=2,$$41));},$TreeNode_disable$40.$$arity=-1),nil)&&'disable';})($nesting[0],$$$($$$($$$('::','GxG'),'Gui'),'ListItem'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("tree_node",$$$($$$($$$('::','GxG'),'Gui'),'TreeNode'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Panel');var $nesting=[self].concat($parent_nesting);return nil})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("panel",$$$($$$($$$('::','GxG'),'Gui'),'Panel'));return(function($base,$parent_nesting){var self=$module($base,'Vdom');var $nesting=[self].concat($parent_nesting);return(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Page');var $nesting=[self].concat($parent_nesting),$Page_upload_dialog$42,$Page_choice_dialog$43,$Page_vfs_dialog$44;Opal.def(self,'$upload_dialog',$Page_upload_dialog$42=function $$upload_dialog(the_application,details){var $iter=$Page_upload_dialog$42.$$p,block=$iter||nil,self=this,window_title=nil,$ret_or_4=nil,banner_text=nil,$ret_or_5=nil,destination_path=nil,$ret_or_6=nil,total_width=nil,form_padding=nil,form_margin=nil,inner_width=nil,total_height=nil,banner_font_size=nil,banner_height=nil,input_font_size=nil,form=nil,$writer=nil,file_input=nil,destination=nil,grid_container=nil,cancel_frame=nil,submit_frame=nil,cancel_button=nil,submit_button=nil,viewport=nil,dialog_source=nil,the_error=nil;if($iter)$Page_upload_dialog$42.$$p=null;if($iter)$Page_upload_dialog$42.$$p=null;;if(the_application==null){the_application=nil;};if(details==null){details=nil;};self.$layout_refresh();window_title=(function(){if($truthy(($ret_or_4=details))){return $ret_or_4}else{return $hash2(["title"],{"title":"Choose a file:"})};return nil;})()['$[]']("title").$to_s();banner_text=(function(){if($truthy(($ret_or_5=details))){return $ret_or_5}else{return $hash2(["banner"],{"banner":"Choose a file to upload"})};return nil;})()['$[]']("banner").$to_s();destination_path=(function(){if($truthy(($ret_or_6=details))){return $ret_or_6}else{return $hash2(["destination"],{"destination":nil})};return nil;})()['$[]']("destination").$to_s();total_width=$rb_times(self.$layout_content_area()['$[]']("page_width").$to_f(),0.25).$to_i();form_padding=20;form_margin=5;inner_width=$rb_minus(total_width,$rb_times($rb_plus(form_padding,form_margin),2));total_height=$rb_times($rb_plus(form_padding,form_margin),2);banner_font_size=16;if($truthy($rb_gt(banner_text.$to_s().$size(),40))){banner_height=$rb_times($rb_divide(banner_text.$size().$to_f(),40.0),banner_font_size.$to_f()).$round().$to_i()}else{banner_height=banner_font_size};input_font_size=16;if($truthy($rb_gt(destination_path.$size(),0))){form=self.$new_component("org.gxg.gui.form");$writer=["action","/file_upload"];$send(form['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["method","POST"];$send(form['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["enctype","multipart/form-data"];$send(form['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["style",$hash2(["background-color","padding","margin","width"],{"background-color":"#f2f2f2","padding":"20px","margin":"5px","width":"100%"})];$send(form['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;total_height=330;file_input=self.$new_component("org.gxg.gui.input.file");$writer=["file"];$send(file_input,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["name","file"];$send(file_input['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;form['$[]']("content")['$<<'](file_input);destination=self.$new_component("org.gxg.gui.input.hidden");$writer=["destination"];$send(destination,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["name","destination"];$send(destination['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["value",destination_path];$send(destination['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;form['$[]']("content")['$<<'](destination);grid_container=self.$new_component("org.gxg.gui.grid.container");cancel_frame=self.$new_component("org.gxg.gui.grid.x");submit_frame=self.$new_component("org.gxg.gui.grid.x");cancel_button=self.$new_component("org.gxg.gui.input.button");submit_button=self.$new_component("org.gxg.gui.input.button.submit");cancel_frame['$[]']("content")['$<<'](cancel_button);submit_frame['$[]']("content")['$<<'](submit_button);grid_container['$[]']("content")['$<<'](cancel_frame);grid_container['$[]']("content")['$<<'](submit_frame);form['$[]']("content")['$<<'](grid_container);$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" form = self.find_parent_type(::GxG::Gui::Form)\n"+" if the_window && form\n"+" the_window.respond({:action => :cancel})\n"+" end\n"+" end\n"+" "];$send(cancel_button,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" form = self.find_parent_type(::GxG::Gui::Form)\n"+" if the_window && form\n"+" page.set_busy true\n"+" ::GxG::CONNECTION.post(form) do |response|\n"+" page.set_busy false\n"+" the_window.respond({:action => :upload, :destination => form.form_data[:destination].to_s})\n"+" end\n"+" end\n"+" end\n"+" "];$send(submit_button,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;viewport=self.$new_component("org.gxg.gui.application.viewport");$writer=["gxg_selection_viewport"];$send(viewport,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["style",$hash2(["overflow","width","height"],{"overflow":"hidden","width":"100%","height":"100%"})];$send(viewport['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;viewport['$[]']("content")['$<<'](form);dialog_source=self.$new_component("org.gxg.gui.window.dialog");$writer=[window_title];$send(dialog_source,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["window_title","states","width","height"],{"window_title":window_title,"states":$hash2(["hidden"],{"hidden":true}),"width":350,"height":total_height})];$send(dialog_source,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;dialog_source['$[]']("content")['$<<'](viewport);try{$send(self,'dialog_open',[dialog_source,the_application,details],block.$to_proc());return true;}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) -try{self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":details}));return false;}finally{Opal.pop_exception();}}else{throw $err;}};;}else{self.$log_error("You MUST provide a destination path");return false;};},$Page_upload_dialog$42.$$arity=-1);Opal.def(self,'$choice_dialog',$Page_choice_dialog$43=function $$choice_dialog(the_application,details){var $iter=$Page_choice_dialog$43.$$p,block=$iter||nil,self=this,window_title=nil,$ret_or_7=nil,banner_text=nil,$ret_or_8=nil,one_text=nil,$ret_or_9=nil,two_text=nil,$ret_or_10=nil,three_text=nil,$ret_or_11=nil,default_text=nil,$ret_or_12=nil,dialog_type=nil,$ret_or_13=nil,$ret_or_14=nil,total_width=nil,form_padding=nil,form_margin=nil,inner_width=nil,total_height=nil,banner_font_size=nil,banner_height=nil,input_font_size=nil,banner=nil,banner_cell=nil,text_input=nil,text_input_cell=nil,one_btn=nil,$writer=nil,one_btn_cell=nil,two_btn=nil,two_btn_cell=nil,three_btn=nil,three_btn_cell=nil,cancel_btn=nil,cancel_cell=nil,row_one=nil,row_two=nil,row_three=nil,table_one=nil,table_two=nil,table_three=nil,form=nil,$case=nil,action_btn=nil,action_btn_cell=nil,dialog_source=nil,the_error=nil;if($iter)$Page_choice_dialog$43.$$p=null;if($iter)$Page_choice_dialog$43.$$p=null;;if(the_application==null){the_application=nil;};if(details==null){details=nil;};self.$layout_refresh();window_title=(function(){if($truthy(($ret_or_7=details))){return $ret_or_7}else{return $hash2(["title"],{"title":"Choose"})};return nil;})()['$[]']("title").$to_s();banner_text=(function(){if($truthy(($ret_or_8=details))){return $ret_or_8}else{return $hash2(["banner"],{"banner":"(Please provide some text here)"})};return nil;})()['$[]']("banner").$to_s();one_text=(function(){if($truthy(($ret_or_9=details))){return $ret_or_9}else{return $hash2(["one"],{"one":""})};return nil;})()['$[]']("one").$to_s();two_text=(function(){if($truthy(($ret_or_10=details))){return $ret_or_10}else{return $hash2(["two"],{"two":""})};return nil;})()['$[]']("two").$to_s();three_text=(function(){if($truthy(($ret_or_11=details))){return $ret_or_11}else{return $hash2(["three"],{"three":""})};return nil;})()['$[]']("three").$to_s();default_text=(function(){if($truthy(($ret_or_12=details))){return $ret_or_12}else{return $hash2(["default"],{"default":""})};return nil;})()['$[]']("default").$to_s();dialog_type=(function(){if($truthy(($ret_or_13=(function(){if($truthy(($ret_or_14=details))){return $ret_or_14}else{return $hash2(["type"],{"type":"choose"})};return nil;})()['$[]']("type")))){return $ret_or_13}else{return "choose"};return nil;})();total_width=$rb_times(self.$layout_content_area()['$[]']("page_width").$to_f(),0.25).$to_i();form_padding=20;form_margin=5;inner_width=$rb_minus(total_width,$rb_times($rb_plus(form_padding,form_margin),2));total_height=$rb_times($rb_plus(form_padding,form_margin),2);banner_font_size=16;if($truthy($rb_gt(banner_text.$to_s().$size(),40))){banner_height=$rb_times($rb_divide(banner_text.$size().$to_f(),40.0),banner_font_size.$to_f()).$round().$to_i()}else{banner_height=banner_font_size};input_font_size=16;banner=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.text","options":$hash2(["content","style"],{"content":banner_text,"style":$hash2(["font-size","width"],{"font-size":""+(banner_font_size)+"px","width":"100%"})}),"content":[],"script":""});banner_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin","width","height","vertical-align"],{"padding":"0px","margin":"0px","width":"100%","height":banner_height,"vertical-align":"middle"})}),"content":[banner],"script":""});text_input=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.input.text","options":$hash2(["title","content","style"],{"title":"data","content":default_text,"style":$hash2(["background-color","font-size","width"],{"background-color":"#f2f2f2","font-size":""+(input_font_size)+"px","width":"100%"})}),"content":[],"script":""});text_input_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin","width","vertical-align"],{"padding":"0px","margin":"0px","width":"100%","vertical-align":"middle"})}),"content":[text_input],"script":""});one_btn=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.button","options":$hash2(["content","style"],{"content":one_text,"style":$hash2(["padding","width","height"],{"padding":"2px","width":"80px","height":"32px"})}),"content":[],"script":""});$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.respond({:action => :one})\n"+" end\n"+" end\n"+" "];$send(one_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;one_btn_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin","width","vertical-align"],{"padding":"0px","margin":"0px","width":"40%","vertical-align":"middle"})}),"content":[one_btn],"script":""});two_btn=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.button","options":$hash2(["content","style"],{"content":two_text,"style":$hash2(["padding","width","height"],{"padding":"2px","width":"80px","height":"32px"})}),"content":[],"script":""});$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.respond({:action => :two})\n"+" end\n"+" end\n"+" "];$send(two_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;two_btn_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin","width","vertical-align"],{"padding":"0px","margin":"0px","width":"40%","vertical-align":"middle"})}),"content":[two_btn],"script":""});three_btn=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.button","options":$hash2(["content","style"],{"content":three_text,"style":$hash2(["padding","width","height"],{"padding":"2px","width":"80px","height":"32px"})}),"content":[],"script":""});$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.respond({:action => :three})\n"+" end\n"+" end\n"+" "];$send(three_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;three_btn_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin","width","vertical-align"],{"padding":"0px","margin":"0px","width":"40%","vertical-align":"middle"})}),"content":[three_btn],"script":""});cancel_btn=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.button","options":$hash2(["content","style"],{"content":"Cancel","style":$hash2(["padding","width","height"],{"padding":"2px","width":"80px","height":"32px"})}),"content":[],"script":""});$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.respond({:action => :cancel})\n"+" end\n"+" end\n"+" "];$send(cancel_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;cancel_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin","vertical-align"],{"padding":"0px","margin":"0px","vertical-align":"middle"})}),"content":[cancel_btn],"script":""});row_one=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.row","options":$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"0px","margin":"0px","width":"100%"})}),"content":[banner_cell],"script":""});row_two=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.row","options":$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"0px","margin":"0px","width":"100%"})}),"content":[text_input_cell],"script":""});row_three=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.row","options":$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"0px","margin":"0px","width":"100%"})}),"content":[],"script":""});table_one=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table","options":$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"5px","margin":"0px","width":"100%"})}),"content":[row_one],"script":""});table_two=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table","options":$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"5px","margin":"0px","width":"100%"})}),"content":[row_two],"script":""});table_three=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table","options":$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"5px","margin":"0px","width":"100%"})}),"content":[row_three],"script":""});form=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.form","options":$hash2(["style"],{"style":$hash2(["background-color","padding","margin"],{"background-color":"#f2f2f2","padding":""+(form_padding)+"px","margin":""+(form_margin)+"px"})}),"content":[],"script":""});if($truthy($rb_gt(banner_text.$size(),0))){form['$[]']("content")['$<<'](table_one)};$case=dialog_type;if("choose"['$===']($case)){if($truthy($rb_gt(one_text.$size(),0))){row_three['$[]']("content")['$<<'](one_btn_cell)};if($truthy($rb_gt(two_text.$size(),0))){row_three['$[]']("content")['$<<'](two_btn_cell)};if($truthy($rb_gt(three_text.$size(),0))){row_three['$[]']("content")['$<<'](three_btn_cell)};} +var self=Opal.top,$nesting=[],nil=Opal.nil,$$$=Opal.$$$,$$=Opal.$$,$module=Opal.module,$klass=Opal.klass,$send2=Opal.send2,$find_super=Opal.find_super,$truthy=Opal.truthy,$send=Opal.send,$alias=Opal.alias,$hash2=Opal.hash2,$range=Opal.range;Opal.add_stubs(['$>','$size','$shift','$valid_uuid?','$[]','$children','$uuid','$object_source','$each_child','$<<','$==','$title','$register_component_class','$is_a?','$add_child','$original_add_child','$values','$original_children','$each','$new_component','$to_s','$title=','$-','$[]=','$build_components','$page','$find_object_by','$respond_to?','$include?','$to_sym','$log_warn','$inspect','$clone','$node_path','$nodes','$split','$node_at_path','$+','$join','$gxg_get_state','$expand','$post_event','$expand_path','$to_proc','$call','$!=','$unhighlight','$highlight','$parent','$unshift','$is_any?','$update_appearance','$find_parent_type','$theme_icon','$theme_widget','$new','$merge_style','$show','$set_state','$set_attribute','$tree','$hide','$collapse','$unpersist','$each_pair','$animate','$layout_refresh','$to_i','$*','$to_f','$layout_content_area','$round','$/','$dialog_open','$log_error','$===','$basename','$reverse']);return(function($base,$parent_nesting){var self=$module($base,'GxG');var $nesting=[self].concat($parent_nesting);return(function($base,$parent_nesting){var self=$module($base,'Gui');var $nesting=[self].concat($parent_nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'ApplicationViewport');var $nesting=[self].concat($parent_nesting),$ApplicationViewport__before_create$1,$ApplicationViewport_set_application$2,$ApplicationViewport_application$3,$ApplicationViewport_find_child$4;self.$$prototype.application=nil;Opal.def(self,'$_before_create',$ApplicationViewport__before_create$1=function $$_before_create(){var $iter=$ApplicationViewport__before_create$1.$$p,$yield=$iter||nil,self=this;if($iter)$ApplicationViewport__before_create$1.$$p=null;self.domtype="div";return $send2(self,$find_super(self,'_before_create',$ApplicationViewport__before_create$1,false,true),'_before_create',[],null);},$ApplicationViewport__before_create$1.$$arity=0);Opal.def(self,'$set_application',$ApplicationViewport_set_application$2=function $$set_application(the_application){var self=this;return(self.application=the_application)},$ApplicationViewport_set_application$2.$$arity=1);Opal.def(self,'$application',$ApplicationViewport_application$3=function $$application(){var self=this;return self.application},$ApplicationViewport_application$3.$$arity=0);return(Opal.def(self,'$find_child',$ApplicationViewport_find_child$4=function $$find_child(the_reference){var $a,$$5,$$6,self=this,result=nil,search_queue=nil,entry=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy(the_reference)){search_queue=[self];while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_reference))){if($truthy(entry.$children()['$[]'](self.$object_source().$uuid()))){result=entry.$children()['$[]'](self.$object_source().$uuid());break;;}else{$send(entry,'each_child',[],($$5=function(the_child){var self=$$5.$$s==null?this:$$5.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$5.$$s=self,$$5.$$arity=1,$$5))}}else{(function(){var $brk=Opal.new_brk();try{return $send(entry,'each_child',[],($$6=function(the_child){var self=$$6.$$s==null?this:$$6.$$s;if(the_child==null){the_child=nil;};if(the_child.$title()['$=='](the_reference)){result=the_child;Opal.brk(nil,$brk);}else{return search_queue['$<<'](the_child)};},$$6.$$s=self,$$6.$$brk=$brk,$$6.$$arity=1,$$6))}catch(err){if(err===$brk){return err.$v}else{throw err}}})()}};};};return result;},$ApplicationViewport_find_child$4.$$arity=-1),nil)&&'find_child';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("org.gxg.gui.application.viewport",$$$($$$($$$('::','GxG'),'Gui'),'ApplicationViewport'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Tree');var $nesting=[self].concat($parent_nesting),$Tree_add_child$7,$Tree_children$8,$Tree_find_child$9,$Tree_initialize$11,$Tree_cascade$12,$Tree_update_appearance$13,$Tree_set_processor$14,$Tree_node_at_path$15,$Tree_expand_path$17,$Tree_selection$21,$Tree_select$22,$Tree_expand$23,$Tree_collapse$24;self.$$prototype.content=self.$$prototype.uuid=self.$$prototype.processors=self.$$prototype.selection=nil;$alias(self,"original_add_child","add_child");Opal.def(self,'$add_child',$Tree_add_child$7=function $$add_child(object_record){var self=this;if(object_record==null){object_record=nil;};if($truthy(object_record['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(self.content)){return self.content.$add_child(object_record)}else{return self.$original_add_child(object_record)}}else{return nil};},$Tree_add_child$7.$$arity=-1);$alias(self,"original_children","children");Opal.def(self,'$children',$Tree_children$8=function $$children(){var self=this;if($truthy(self.content)){return self.content.$children()}else{return $hash2([],{})}},$Tree_children$8.$$arity=0);Opal.def(self,'$find_child',$Tree_find_child$9=function $$find_child(the_reference,interior){var $a,$$10,self=this,result=nil,uuid_check=nil,search_queue=nil,entry=nil;if(the_reference==null){the_reference=nil;};if(interior==null){interior=false;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_reference))){uuid_check=true}else{uuid_check=false};if(interior['$=='](true)){search_queue=self.$original_children().$values()}else{search_queue=self.$children().$values()};while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(uuid_check)){if(entry.$uuid()['$=='](the_reference)){result=entry;break;;}}else if(entry.$title()['$=='](the_reference)){result=entry;break;;};if($truthy(result)){}else{$send(entry.$children().$values(),'each',[],($$10=function(the_child){var self=$$10.$$s==null?this:$$10.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$10.$$s=self,$$10.$$arity=1,$$10))};};};return result;},$Tree_find_child$9.$$arity=-1);Opal.def(self,'$initialize',$Tree_initialize$11=function $$initialize(the_parent,the_options){var $iter=$Tree_initialize$11.$$p,$yield=$iter||nil,self=this;if($iter)$Tree_initialize$11.$$p=null;self.content=nil;self.selection=nil;self.processors=$hash2([],{});$send2(self,$find_super(self,'initialize',$Tree_initialize$11,false,true),'initialize',[the_parent,the_options],null);return self;},$Tree_initialize$11.$$arity=2);Opal.def(self,'$cascade',$Tree_cascade$12=function $$cascade(){var self=this,interior_component=nil,$writer=nil,the_object=nil;interior_component=self.$new_component("org.gxg.gui.list");$writer=[""+"content "+(self.uuid.$to_s())];$send(interior_component,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["white-space","width","height","list-style","margin","padding"],{"white-space":"nowrap","width":"auto","height":"auto","list-style":"none","margin":"0px","padding":"0px"})})];$send(interior_component,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.content=nil;self.$page().$build_components(self,[interior_component]);the_object=self.$page().$find_object_by(""+"content "+(self.uuid.$to_s()));if($truthy(the_object)){return(self.content=the_object)}else{return nil};},$Tree_cascade$12.$$arity=0);Opal.def(self,'$update_appearance',$Tree_update_appearance$13=function $$update_appearance(data){var self=this;if(data==null){data=nil;};return nil;},$Tree_update_appearance$13.$$arity=-1);Opal.def(self,'$set_processor',$Tree_set_processor$14=function $$set_processor(the_type){var $iter=$Tree_set_processor$14.$$p,block=$iter||nil,self=this,$writer=nil;if($iter)$Tree_set_processor$14.$$p=null;if($iter)$Tree_set_processor$14.$$p=null;;if(the_type==null){the_type=nil;};if($truthy(block['$respond_to?']("call"))){if($truthy(["select","expand","collapse"]['$include?'](the_type.$to_s().$to_sym()))){$writer=[the_type.$to_s().$to_sym(),block];$send(self.processors,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return self.$log_warn(""+"Unsupported processor type: "+(the_type.$to_s().$to_sym().$inspect()))}}else{return nil};},$Tree_set_processor$14.$$arity=-1);Opal.def(self,'$node_at_path',$Tree_node_at_path$15=function $$node_at_path(the_path){var $a,$$16,self=this,result=nil,search_queue=nil,entry=nil;if(the_path==null){the_path=nil;};result=nil;search_queue=self.$children().$values().$clone();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'TreeNode')))){if(entry.$node_path()['$=='](the_path)){result=entry;break;;}else{$send(entry.$nodes().$values(),'each',[],($$16=function(the_child){var self=$$16.$$s==null?this:$$16.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$16.$$s=self,$$16.$$arity=1,$$16))}};};return result;},$Tree_node_at_path$15.$$arity=-1);Opal.def(self,'$expand_path',$Tree_expand_path$17=function $$expand_path(the_path){var $iter=$Tree_expand_path$17.$$p,block=$iter||nil,$$18,self=this,path_stack=nil,path_array=nil;if($iter)$Tree_expand_path$17.$$p=null;if($iter)$Tree_expand_path$17.$$p=null;;if(the_path==null){the_path=nil;};if($truthy(the_path['$is_a?']($$$('::','String')))){path_stack=[];path_array=the_path.$split("/");(function(){var $brk=Opal.new_brk();try{return $send(path_array,'each',[],($$18=function(entry){var self=$$18.$$s==null?this:$$18.$$s,$$19,$$20,the_node=nil;if(entry==null){entry=nil;};if($truthy($rb_gt(entry.$size(),0))){path_stack['$<<'](entry);the_node=self.$node_at_path($rb_plus("/",path_stack.$join("/")));if($truthy(the_node['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'TreeNode')))){if(the_node.$gxg_get_state("expanded")['$=='](false)){the_node.$expand();$send($$$($$($nesting,'GxG'),'DISPATCHER'),'post_event',["display"],($$19=function(){var self=$$19.$$s==null?this:$$19.$$s;return $send(self,'expand_path',[the_path],block.$to_proc())},$$19.$$s=self,$$19.$$arity=0,$$19));Opal.brk(nil,$brk);};if(the_node.$node_path()['$=='](the_path)){if($truthy(block['$respond_to?']("call"))){return block.$call()}else{return nil}}else{return nil};}else{$send($$$($$($nesting,'GxG'),'DISPATCHER'),'post_event',["display"],($$20=function(){var self=$$20.$$s==null?this:$$20.$$s;return $send(self,'expand_path',[the_path],block.$to_proc())},$$20.$$s=self,$$20.$$arity=0,$$20));Opal.brk(nil,$brk);};}else{return nil};},$$18.$$s=self,$$18.$$brk=$brk,$$18.$$arity=1,$$18))}catch(err){if(err===$brk){return err.$v}else{throw err}}})();};return true;},$Tree_expand_path$17.$$arity=-1);Opal.def(self,'$selection',$Tree_selection$21=function $$selection(){var self=this;return self.selection},$Tree_selection$21.$$arity=0);Opal.def(self,'$select',$Tree_select$22=function $$select(the_node){var self=this;if(the_node==null){the_node=nil;};if($truthy(the_node['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'TreeNode')))){if($truthy(self.selection['$!='](the_node))){if($truthy(self.selection)){self.selection.$unhighlight()};self.selection=the_node;self.selection.$highlight();if($truthy(self.processors['$[]']("select")['$respond_to?']("call"))){return self.processors['$[]']("select").$call(self.selection)}else{return nil};}else{return nil}}else{return nil};},$Tree_select$22.$$arity=-1);Opal.def(self,'$expand',$Tree_expand$23=function $$expand(the_node){var self=this;if(the_node==null){the_node=nil;};if($truthy(the_node['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'TreeNode')))){if($truthy(self.processors['$[]']("expand")['$respond_to?']("call"))){return self.processors['$[]']("expand").$call(the_node)}else{return nil}}else{return nil};},$Tree_expand$23.$$arity=-1);return(Opal.def(self,'$collapse',$Tree_collapse$24=function $$collapse(the_node){var self=this;if(the_node==null){the_node=nil;};if($truthy(the_node['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'TreeNode')))){if($truthy(self.processors['$[]']("collapse")['$respond_to?']("call"))){return self.processors['$[]']("collapse").$call(the_node)}else{return nil}}else{return nil};},$Tree_collapse$24.$$arity=-1),nil)&&'collapse';})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("tree",$$$($$$($$$('::','GxG'),'Gui'),'Tree'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'TreeNode');var $nesting=[self].concat($parent_nesting),$TreeNode__before_create$25,$TreeNode_add_child$26,$TreeNode_nodes$27,$TreeNode_node_path$28,$TreeNode_find_child$30,$TreeNode_update_appearance$32,$TreeNode_data$33,$TreeNode_appearance$34,$TreeNode_set_appearance$35,$TreeNode_tree_node$36,$TreeNode_tree$37,$TreeNode_initialize$38,$TreeNode_cascade$39,$TreeNode_highlight$40,$TreeNode_unhighlight$41,$TreeNode_expand$42,$TreeNode_collapse$43,$TreeNode_enable$44,$TreeNode_disable$46;self.$$prototype.data=self.$$prototype.content=self.$$prototype.appearance=self.$$prototype.uuid=self.$$prototype.label=self.$$prototype.expander=nil;Opal.def(self,'$_before_create',$TreeNode__before_create$25=function $$_before_create(){var $iter=$TreeNode__before_create$25.$$p,$yield=$iter||nil,self=this;if($iter)$TreeNode__before_create$25.$$p=null;if($truthy(self.data['$is_a?']($$$('::','Hash')))){if($truthy(self.data['$[]']("title"))){self.title=self.data['$[]']("title")}};return $send2(self,$find_super(self,'_before_create',$TreeNode__before_create$25,false,true),'_before_create',[],null);},$TreeNode__before_create$25.$$arity=0);$alias(self,"original_add_child","add_child");Opal.def(self,'$add_child',$TreeNode_add_child$26=function $$add_child(object_record){var self=this;if(object_record==null){object_record=nil;};if($truthy(object_record['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(self.content)){return self.content.$add_child(object_record)}else{return self.$original_add_child(object_record)}}else{return nil};},$TreeNode_add_child$26.$$arity=-1);Opal.def(self,'$nodes',$TreeNode_nodes$27=function $$nodes(){var self=this;if($truthy(self.content)){return self.content.$children()}else{return $hash2([],{})}},$TreeNode_nodes$27.$$arity=0);Opal.def(self,'$node_path',$TreeNode_node_path$28=function $$node_path(){var $a,$$29,self=this,the_path=nil,lineage=nil,the_parent=nil;the_path="";lineage=[self];the_parent=self.$parent();while($truthy(the_parent['$!='](nil))){if($truthy(the_parent['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'TreeNode')))){lineage.$unshift(the_parent)};the_parent=the_parent.$parent();if($truthy(the_parent['$is_a?']($$$($$$($$($nesting,'GxG'),'Gui'),'Tree')))){the_parent=nil};};$send(lineage,'each',[],($$29=function(the_node){var self=$$29.$$s==null?this:$$29.$$s;if(the_node==null){the_node=nil;};return(the_path=$rb_plus(the_path,""+"/"+(the_node.$title())));},$$29.$$s=self,$$29.$$arity=1,$$29));return the_path;},$TreeNode_node_path$28.$$arity=0);Opal.def(self,'$find_child',$TreeNode_find_child$30=function $$find_child(the_reference){var $a,$$31,self=this,result=nil,uuid_check=nil,search_queue=nil,entry=nil;if(the_reference==null){the_reference=nil;};result=nil;if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_reference))){uuid_check=true}else{uuid_check=false};search_queue=self.$children().$values();while($truthy($rb_gt(search_queue.$size(),0))){entry=search_queue.$shift();if($truthy(entry)){if($truthy(uuid_check)){if(entry.$uuid()['$=='](the_reference)){result=entry;break;;}}else if(entry.$title()['$=='](the_reference)){result=entry;break;;};if($truthy(result)){}else{$send(entry.$children().$values(),'each',[],($$31=function(the_child){var self=$$31.$$s==null?this:$$31.$$s;if(the_child==null){the_child=nil;};return search_queue['$<<'](the_child);},$$31.$$s=self,$$31.$$arity=1,$$31))};};};return result;},$TreeNode_find_child$30.$$arity=-1);Opal.def(self,'$update_appearance',$TreeNode_update_appearance$32=function $$update_appearance(data){var self=this;if(data==null){data=nil;};if($truthy(self.appearance['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){return true}else{return false};},$TreeNode_update_appearance$32.$$arity=-1);Opal.def(self,'$data',$TreeNode_data$33=function $$data(){var self=this;return self.data},$TreeNode_data$33.$$arity=0);Opal.def(self,'$appearance',$TreeNode_appearance$34=function $$appearance(){var self=this;return self.appearance},$TreeNode_appearance$34.$$arity=0);Opal.def(self,'$set_appearance',$TreeNode_set_appearance$35=function $$set_appearance(the_record){var self=this;if(the_record==null){the_record=nil;};if($truthy(the_record['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.appearance=the_record;return self.$update_appearance();}else{return nil};},$TreeNode_set_appearance$35.$$arity=-1);Opal.def(self,'$tree_node',$TreeNode_tree_node$36=function $$tree_node(){var self=this;return self.$find_parent_type($$$($$$($$$('::','GxG'),'Gui'),'TreeNode'))},$TreeNode_tree_node$36.$$arity=0);Opal.def(self,'$tree',$TreeNode_tree$37=function $$tree(){var self=this;return self.$find_parent_type($$$($$$($$$('::','GxG'),'Gui'),'Tree'))},$TreeNode_tree$37.$$arity=0);Opal.def(self,'$initialize',$TreeNode_initialize$38=function $$initialize(the_parent,the_options){var $iter=$TreeNode_initialize$38.$$p,$yield=$iter||nil,self=this,$ret_or_1=nil,$writer=nil,$ret_or_2=nil,$ret_or_3=nil;if($iter)$TreeNode_initialize$38.$$p=null;self.content=nil;self.appearance=$hash2(["icon","label"],{"icon":self.$theme_icon("folder.svg"),"label":"Untitled"});if($truthy(the_options['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){self.data=(function(){if($truthy(($ret_or_1=the_options['$[]']("data")))){return $ret_or_1}else{return $hash2(["title","type","content"],{"title":"Untitled","type":"virtual_directory","content":$hash2([],{})})};return nil;})();$writer=["icon",(function(){if($truthy(($ret_or_2=the_options['$[]']("icon")))){return $ret_or_2}else{return self.$theme_icon("folder.svg")};return nil;})().$to_s()];$send(self.appearance,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["label",(function(){if($truthy(($ret_or_3=the_options['$[]']("label")))){return $ret_or_3}else{return self.data['$[]']("title")};return nil;})().$to_s()];$send(self.appearance,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};$send2(self,$find_super(self,'initialize',$TreeNode_initialize$38,false,true),'initialize',[the_parent,the_options],null);return self;},$TreeNode_initialize$38.$$arity=2);Opal.def(self,'$cascade',$TreeNode_cascade$39=function $$cascade(){var self=this,node_frame=nil,$writer=nil,frame_row_one=nil,expander=nil,node_expander_cell=nil,icon=nil,node_icon_cell=nil,the_title=nil,node_label_cell=nil,sublist=nil,subnodes_frame_cell=nil,frame_row_two=nil,the_object=nil;node_frame=self.$new_component("org.gxg.gui.block.table");$writer=["nodepath",self.$node_path()];$send(node_frame['$[]']("settings"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;frame_row_one=self.$new_component("org.gxg.gui.block.table");expander=self.$new_component("org.gxg.gui.image");$writer=[""+"expander "+(self.uuid.$to_s())];$send(expander,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["src","width","height","style"],{"src":self.$theme_widget("collapse.svg"),"width":32,"height":32,"style":$hash2(["clear","vertical-align"],{"clear":"both","vertical-align":"middle"})})];$send(expander,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_node = self.tree_node()\n"+" if the_node\n"+" unless the_node.get_state(:disabled) == true\n"+" if self.get_state(:expanded) == true\n"+" self.set_attribute(:src, theme_widget('collapse.svg'))\n"+" self.set_state(:expanded,false)\n"+" the_node.collapse()\n"+" else\n"+" self.set_attribute(:src, theme_widget('expand.svg'))\n"+" self.set_state(:expanded,true)\n"+" the_node.expand()\n"+" end\n"+" end\n"+" end\n"+" end\n"+" "];$send(expander,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;node_expander_cell=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();node_expander_cell=self.$new_component("org.gxg.gui.block.table.cell");$writer=["options",$hash2(["style"],{"style":$hash2(["float","width","vertical-align"],{"float":"left","width":"32px","vertical-align":"middle"})})];$send(node_expander_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;node_expander_cell['$[]']("content")['$<<'](expander);icon=self.$new_component("org.gxg.gui.block.table.cell");$writer=[""+"icon "+(self.uuid.$to_s())];$send(icon,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["src","style"],{"src":self.appearance['$[]']("icon"),"style":$hash2(["clear","width","height","vertical-align"],{"clear":"both","width":"32px","height":"32px","vertical-align":"middle"})})];$send(icon,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_node = self.tree_node()\n"+" if the_node\n"+" the_tree = the_node.tree()\n"+" if the_tree\n"+" the_tree.select(the_node)\n"+" end\n"+" end\n"+" end\n"+" "];$send(icon,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;node_icon_cell=$$$($$$($$$('::','GxG'),'Database'),'DetachedHash').$new();node_icon_cell=self.$new_component("org.gxg.gui.block.table.cell");$writer=["options",$hash2(["style"],{"style":$hash2(["float","width","vertical-align"],{"float":"left","width":"32px","vertical-align":"middle"})})];$send(node_icon_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;node_icon_cell['$[]']("content")['$<<'](icon);the_title=self.$new_component("org.gxg.gui.label");$writer=[""+"title "+(self.uuid.$to_s())];$send(the_title,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["content","style"],{"content":self.appearance['$[]']("label"),"style":$hash2(["float","font-size","vertical-align","text-align","margin","padding"],{"float":"left","font-size":"16px","vertical-align":"middle","text-align":"left","margin":"2px","padding":"2px"})})];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_node = self.tree_node()\n"+" if the_node\n"+" the_tree = the_node.tree()\n"+" if the_tree\n"+" the_tree.select(the_node)\n"+" end\n"+" end\n"+" end\n"+" "];$send(the_title,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;node_label_cell=self.$new_component("org.gxg.gui.block.table.cell");$writer=["options",$hash2(["style"],{"style":$hash2(["float","vertical-align"],{"float":"left","vertical-align":"middle"})})];$send(node_label_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;node_label_cell['$[]']("content")['$<<'](the_title);frame_row_one=self.$new_component("org.gxg.gui.block.table.row");$writer=["script",""+"\n"+" on(:mouseenter) do |event|\n"+" the_node = self.tree_node()\n"+" if the_node\n"+" the_tree = the_node.highlight()\n"+" end\n"+" end\n"+" on(:mouseleave) do |event|\n"+" the_node = self.tree_node()\n"+" if the_node\n"+" the_tree = the_node.unhighlight()\n"+" end\n"+" end\n"+" "];$send(frame_row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;frame_row_one['$[]']("content")['$<<'](node_expander_cell);frame_row_one['$[]']("content")['$<<'](node_icon_cell);frame_row_one['$[]']("content")['$<<'](node_label_cell);sublist=self.$new_component("org.gxg.gui.list");$writer=[""+"content "+(self.uuid.$to_s())];$send(sublist,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["width","height","style"],{"width":"100%","height":"100%","style":$hash2(["list-style"],{"list-style":"none"})})];$send(sublist,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;subnodes_frame_cell=self.$new_component("org.gxg.gui.block.table.cell");subnodes_frame_cell['$[]']("content")['$<<'](sublist);frame_row_two=self.$new_component("org.gxg.gui.block.table.row");frame_row_two['$[]']("content")['$<<'](subnodes_frame_cell);node_frame['$[]']("content")['$<<'](frame_row_one);node_frame['$[]']("content")['$<<'](frame_row_two);self.content=nil;self.$page().$build_components(self,[node_frame]);the_object=self.$page().$find_object_by(""+"content "+(self.uuid.$to_s()));if($truthy(the_object)){self.content=the_object};the_object=self.$page().$find_object_by(""+"expander "+(self.uuid.$to_s()));if($truthy(the_object)){self.expander=the_object};the_object=self.$page().$find_object_by(""+"icon "+(self.uuid.$to_s()));if($truthy(the_object)){self.icon=the_object};the_object=self.$page().$find_object_by(""+"title "+(self.uuid.$to_s()));if($truthy(the_object)){return(self.label=the_object)}else{return nil};},$TreeNode_cascade$39.$$arity=0);Opal.def(self,'$highlight',$TreeNode_highlight$40=function $$highlight(transition_parameters){var self=this;if(transition_parameters==null){transition_parameters=nil;};if($truthy(self.label)){return self.label.$merge_style($hash2(["background-color"],{"background-color":"#87acd5"}))}else{return nil};},$TreeNode_highlight$40.$$arity=-1);Opal.def(self,'$unhighlight',$TreeNode_unhighlight$41=function $$unhighlight(transition_parameters){var self=this;if(transition_parameters==null){transition_parameters=nil;};if($truthy(self.label)){return self.label.$merge_style($hash2(["background-color"],{"background-color":"#f2f2f2"}))}else{return nil};},$TreeNode_unhighlight$41.$$arity=-1);Opal.def(self,'$expand',$TreeNode_expand$42=function $$expand(transition_parameters){var self=this,the_tree=nil;if(transition_parameters==null){transition_parameters=nil;};self.content.$show(transition_parameters);self.$set_state("expanded",true);if($truthy(self.expander)){self.expander.$set_attribute("src",self.$page().$theme_widget("expand.svg"))};the_tree=self.$tree();if($truthy(the_tree)){return the_tree.$expand(self)}else{return nil};},$TreeNode_expand$42.$$arity=-1);Opal.def(self,'$collapse',$TreeNode_collapse$43=function $$collapse(transition_parameters){var self=this,the_tree=nil;if(transition_parameters==null){transition_parameters=nil;};self.content.$hide(transition_parameters);self.$set_state("expanded",false);if($truthy(self.expander)){self.expander.$set_attribute("src",self.$page().$theme_widget("collapse.svg"))};the_tree=self.$tree();if($truthy(the_tree)){return the_tree.$collapse(self)}else{return nil};},$TreeNode_collapse$43.$$arity=-1);Opal.def(self,'$enable',$TreeNode_enable$44=function $$enable(transition_parameters){var $$45,self=this;if(transition_parameters==null){transition_parameters=nil;};if($truthy(transition_parameters['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(transition_parameters['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){transition_parameters=transition_parameters.$unpersist()}}else{transition_parameters=$hash2(["origin","destination"],{"origin":$hash2(["opacity"],{"opacity":0.5}),"destination":$hash2(["opacity"],{"opacity":1.0})})};return $send(self.$children(),'each_pair',[],($$45=function(name,object){var self=$$45.$$s==null?this:$$45.$$s;if(self.uuid==null)self.uuid=nil;if(name==null){name=nil;};if(object==null){object=nil;};if(name['$=='](((""+"content ")+(self.uuid.$to_s())).$to_sym())){return nil}else{object.$set_state("disabled",false);return object.$animate(transition_parameters);};},$$45.$$s=self,$$45.$$arity=2,$$45));},$TreeNode_enable$44.$$arity=-1);return(Opal.def(self,'$disable',$TreeNode_disable$46=function $$disable(transition_parameters){var $$47,self=this;if(transition_parameters==null){transition_parameters=nil;};if($truthy(transition_parameters['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(transition_parameters['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){transition_parameters=transition_parameters.$unpersist()}}else{transition_parameters=$hash2(["origin","destination"],{"origin":$hash2(["opacity"],{"opacity":1.0}),"destination":$hash2(["opacity"],{"opacity":0.5})})};return $send(self.$children(),'each_pair',[],($$47=function(name,object){var self=$$47.$$s==null?this:$$47.$$s;if(self.uuid==null)self.uuid=nil;if(name==null){name=nil;};if(object==null){object=nil;};if(name['$=='](((""+"content ")+(self.uuid.$to_s())).$to_sym())){return nil}else{object.$animate(transition_parameters);return object.$set_state("disabled",true);};},$$47.$$s=self,$$47.$$arity=2,$$47));},$TreeNode_disable$46.$$arity=-1),nil)&&'disable';})($nesting[0],$$$($$$($$$('::','GxG'),'Gui'),'ListItem'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("tree_node",$$$($$$($$$('::','GxG'),'Gui'),'TreeNode'));(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Panel');var $nesting=[self].concat($parent_nesting);return nil})($nesting[0],$$$($$$($$$($$$('::','GxG'),'Gui'),'Vdom'),'BaseElement'),$nesting);$$$($$$('::','GxG'),'Gui').$register_component_class("panel",$$$($$$($$$('::','GxG'),'Gui'),'Panel'));return(function($base,$parent_nesting){var self=$module($base,'Vdom');var $nesting=[self].concat($parent_nesting);return(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Page');var $nesting=[self].concat($parent_nesting),$Page_upload_dialog$48,$Page_choice_dialog$49,$Page_vfs_dialog$50;Opal.def(self,'$upload_dialog',$Page_upload_dialog$48=function $$upload_dialog(the_application,details){var $iter=$Page_upload_dialog$48.$$p,block=$iter||nil,self=this,window_title=nil,$ret_or_4=nil,banner_text=nil,$ret_or_5=nil,destination_path=nil,$ret_or_6=nil,total_width=nil,form_padding=nil,form_margin=nil,inner_width=nil,total_height=nil,banner_font_size=nil,banner_height=nil,input_font_size=nil,form=nil,$writer=nil,file_input=nil,destination=nil,grid_container=nil,cancel_frame=nil,submit_frame=nil,cancel_button=nil,submit_button=nil,viewport=nil,dialog_source=nil,the_error=nil;if($iter)$Page_upload_dialog$48.$$p=null;if($iter)$Page_upload_dialog$48.$$p=null;;if(the_application==null){the_application=nil;};if(details==null){details=nil;};self.$layout_refresh();window_title=(function(){if($truthy(($ret_or_4=details))){return $ret_or_4}else{return $hash2(["title"],{"title":"Choose a file:"})};return nil;})()['$[]']("title").$to_s();banner_text=(function(){if($truthy(($ret_or_5=details))){return $ret_or_5}else{return $hash2(["banner"],{"banner":"Choose a file to upload"})};return nil;})()['$[]']("banner").$to_s();destination_path=(function(){if($truthy(($ret_or_6=details))){return $ret_or_6}else{return $hash2(["destination"],{"destination":nil})};return nil;})()['$[]']("destination").$to_s();total_width=$rb_times(self.$layout_content_area()['$[]']("page_width").$to_f(),0.25).$to_i();form_padding=20;form_margin=5;inner_width=$rb_minus(total_width,$rb_times($rb_plus(form_padding,form_margin),2));total_height=$rb_times($rb_plus(form_padding,form_margin),2);banner_font_size=16;if($truthy($rb_gt(banner_text.$to_s().$size(),40))){banner_height=$rb_times($rb_divide(banner_text.$size().$to_f(),40.0),banner_font_size.$to_f()).$round().$to_i()}else{banner_height=banner_font_size};input_font_size=16;if($truthy($rb_gt(destination_path.$size(),0))){form=self.$new_component("org.gxg.gui.form");$writer=["action","/file_upload"];$send(form['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["method","POST"];$send(form['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["enctype","multipart/form-data"];$send(form['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["style",$hash2(["background-color","padding","margin","width"],{"background-color":"#f2f2f2","padding":"20px","margin":"5px","width":"100%"})];$send(form['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;total_height=330;file_input=self.$new_component("org.gxg.gui.input.file");$writer=["file"];$send(file_input,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["name","file"];$send(file_input['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;form['$[]']("content")['$<<'](file_input);destination=self.$new_component("org.gxg.gui.input.hidden");$writer=["destination"];$send(destination,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["name","destination"];$send(destination['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["value",destination_path];$send(destination['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;form['$[]']("content")['$<<'](destination);grid_container=self.$new_component("org.gxg.gui.grid.container");cancel_frame=self.$new_component("org.gxg.gui.grid.x");submit_frame=self.$new_component("org.gxg.gui.grid.x");cancel_button=self.$new_component("org.gxg.gui.input.button");submit_button=self.$new_component("org.gxg.gui.input.button.submit");cancel_frame['$[]']("content")['$<<'](cancel_button);submit_frame['$[]']("content")['$<<'](submit_button);grid_container['$[]']("content")['$<<'](cancel_frame);grid_container['$[]']("content")['$<<'](submit_frame);form['$[]']("content")['$<<'](grid_container);$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" form = self.find_parent_type(::GxG::Gui::Form)\n"+" if the_window && form\n"+" the_window.respond({:action => :cancel})\n"+" end\n"+" end\n"+" "];$send(cancel_button,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" form = self.find_parent_type(::GxG::Gui::Form)\n"+" if the_window && form\n"+" page.set_busy true\n"+" ::GxG::CONNECTION.post(form) do |response|\n"+" page.set_busy false\n"+" the_window.respond({:action => :upload, :destination => form.form_data[:destination].to_s})\n"+" end\n"+" end\n"+" end\n"+" "];$send(submit_button,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;viewport=self.$new_component("org.gxg.gui.application.viewport");$writer=["gxg_selection_viewport"];$send(viewport,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["style",$hash2(["overflow","width","height"],{"overflow":"hidden","width":"100%","height":"100%"})];$send(viewport['$[]']("options"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;viewport['$[]']("content")['$<<'](form);dialog_source=self.$new_component("org.gxg.gui.window.dialog");$writer=[window_title];$send(dialog_source,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["window_title","states","width","height"],{"window_title":window_title,"states":$hash2(["hidden"],{"hidden":true}),"width":350,"height":total_height})];$send(dialog_source,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;dialog_source['$[]']("content")['$<<'](viewport);try{$send(self,'dialog_open',[dialog_source,the_application,details],block.$to_proc());return true;}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) +try{self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":details}));return false;}finally{Opal.pop_exception();}}else{throw $err;}};;}else{self.$log_error("You MUST provide a destination path");return false;};},$Page_upload_dialog$48.$$arity=-1);Opal.def(self,'$choice_dialog',$Page_choice_dialog$49=function $$choice_dialog(the_application,details){var $iter=$Page_choice_dialog$49.$$p,block=$iter||nil,self=this,window_title=nil,$ret_or_7=nil,banner_text=nil,$ret_or_8=nil,one_text=nil,$ret_or_9=nil,two_text=nil,$ret_or_10=nil,three_text=nil,$ret_or_11=nil,default_text=nil,$ret_or_12=nil,dialog_type=nil,$ret_or_13=nil,$ret_or_14=nil,total_width=nil,form_padding=nil,form_margin=nil,inner_width=nil,total_height=nil,banner_font_size=nil,banner_height=nil,input_font_size=nil,banner=nil,banner_cell=nil,text_input=nil,text_input_cell=nil,one_btn=nil,$writer=nil,one_btn_cell=nil,two_btn=nil,two_btn_cell=nil,three_btn=nil,three_btn_cell=nil,cancel_btn=nil,cancel_cell=nil,row_one=nil,row_two=nil,row_three=nil,table_one=nil,table_two=nil,table_three=nil,form=nil,$case=nil,action_btn=nil,action_btn_cell=nil,dialog_source=nil,the_error=nil;if($iter)$Page_choice_dialog$49.$$p=null;if($iter)$Page_choice_dialog$49.$$p=null;;if(the_application==null){the_application=nil;};if(details==null){details=nil;};self.$layout_refresh();window_title=(function(){if($truthy(($ret_or_7=details))){return $ret_or_7}else{return $hash2(["title"],{"title":"Choose"})};return nil;})()['$[]']("title").$to_s();banner_text=(function(){if($truthy(($ret_or_8=details))){return $ret_or_8}else{return $hash2(["banner"],{"banner":"(Please provide some text here)"})};return nil;})()['$[]']("banner").$to_s();one_text=(function(){if($truthy(($ret_or_9=details))){return $ret_or_9}else{return $hash2(["one"],{"one":""})};return nil;})()['$[]']("one").$to_s();two_text=(function(){if($truthy(($ret_or_10=details))){return $ret_or_10}else{return $hash2(["two"],{"two":""})};return nil;})()['$[]']("two").$to_s();three_text=(function(){if($truthy(($ret_or_11=details))){return $ret_or_11}else{return $hash2(["three"],{"three":""})};return nil;})()['$[]']("three").$to_s();default_text=(function(){if($truthy(($ret_or_12=details))){return $ret_or_12}else{return $hash2(["default"],{"default":""})};return nil;})()['$[]']("default").$to_s();dialog_type=(function(){if($truthy(($ret_or_13=(function(){if($truthy(($ret_or_14=details))){return $ret_or_14}else{return $hash2(["type"],{"type":"choose"})};return nil;})()['$[]']("type")))){return $ret_or_13}else{return "choose"};return nil;})();total_width=$rb_times(self.$layout_content_area()['$[]']("page_width").$to_f(),0.25).$to_i();form_padding=20;form_margin=5;inner_width=$rb_minus(total_width,$rb_times($rb_plus(form_padding,form_margin),2));total_height=$rb_times($rb_plus(form_padding,form_margin),2);banner_font_size=16;if($truthy($rb_gt(banner_text.$to_s().$size(),40))){banner_height=$rb_times($rb_divide(banner_text.$size().$to_f(),40.0),banner_font_size.$to_f()).$round().$to_i()}else{banner_height=banner_font_size};input_font_size=16;banner=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.text","options":$hash2(["content","style"],{"content":banner_text,"style":$hash2(["font-size","width"],{"font-size":""+(banner_font_size)+"px","width":"100%"})}),"content":[],"script":""});banner_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin","width","height","vertical-align"],{"padding":"0px","margin":"0px","width":"100%","height":banner_height,"vertical-align":"middle"})}),"content":[banner],"script":""});text_input=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.input.text","options":$hash2(["title","content","style"],{"title":"data","content":default_text,"style":$hash2(["background-color","font-size","width"],{"background-color":"#f2f2f2","font-size":""+(input_font_size)+"px","width":"100%"})}),"content":[],"script":""});text_input_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin","width","vertical-align"],{"padding":"0px","margin":"0px","width":"100%","vertical-align":"middle"})}),"content":[text_input],"script":""});one_btn=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.button","options":$hash2(["content","style"],{"content":one_text,"style":$hash2(["padding","width","height"],{"padding":"2px","width":"80px","height":"32px"})}),"content":[],"script":""});$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.respond({:action => :one})\n"+" end\n"+" end\n"+" "];$send(one_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;one_btn_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin","width","vertical-align"],{"padding":"0px","margin":"0px","width":"40%","vertical-align":"middle"})}),"content":[one_btn],"script":""});two_btn=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.button","options":$hash2(["content","style"],{"content":two_text,"style":$hash2(["padding","width","height"],{"padding":"2px","width":"80px","height":"32px"})}),"content":[],"script":""});$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.respond({:action => :two})\n"+" end\n"+" end\n"+" "];$send(two_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;two_btn_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin","width","vertical-align"],{"padding":"0px","margin":"0px","width":"40%","vertical-align":"middle"})}),"content":[two_btn],"script":""});three_btn=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.button","options":$hash2(["content","style"],{"content":three_text,"style":$hash2(["padding","width","height"],{"padding":"2px","width":"80px","height":"32px"})}),"content":[],"script":""});$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.respond({:action => :three})\n"+" end\n"+" end\n"+" "];$send(three_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;three_btn_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin","width","vertical-align"],{"padding":"0px","margin":"0px","width":"40%","vertical-align":"middle"})}),"content":[three_btn],"script":""});cancel_btn=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.button","options":$hash2(["content","style"],{"content":"Cancel","style":$hash2(["padding","width","height"],{"padding":"2px","width":"80px","height":"32px"})}),"content":[],"script":""});$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.respond({:action => :cancel})\n"+" end\n"+" end\n"+" "];$send(cancel_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;cancel_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin","vertical-align"],{"padding":"0px","margin":"0px","vertical-align":"middle"})}),"content":[cancel_btn],"script":""});row_one=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.row","options":$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"0px","margin":"0px","width":"100%"})}),"content":[banner_cell],"script":""});row_two=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.row","options":$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"0px","margin":"0px","width":"100%"})}),"content":[text_input_cell],"script":""});row_three=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.row","options":$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"0px","margin":"0px","width":"100%"})}),"content":[],"script":""});table_one=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table","options":$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"5px","margin":"0px","width":"100%"})}),"content":[row_one],"script":""});table_two=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table","options":$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"5px","margin":"0px","width":"100%"})}),"content":[row_two],"script":""});table_three=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table","options":$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"5px","margin":"0px","width":"100%"})}),"content":[row_three],"script":""});form=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.form","options":$hash2(["style"],{"style":$hash2(["background-color","padding","margin"],{"background-color":"#f2f2f2","padding":""+(form_padding)+"px","margin":""+(form_margin)+"px"})}),"content":[],"script":""});if($truthy($rb_gt(banner_text.$size(),0))){form['$[]']("content")['$<<'](table_one)};$case=dialog_type;if("choose"['$===']($case)){if($truthy($rb_gt(one_text.$size(),0))){row_three['$[]']("content")['$<<'](one_btn_cell)};if($truthy($rb_gt(two_text.$size(),0))){row_three['$[]']("content")['$<<'](two_btn_cell)};if($truthy($rb_gt(three_text.$size(),0))){row_three['$[]']("content")['$<<'](three_btn_cell)};} else if("alert"['$===']($case)){action_btn=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.button","options":$hash2(["content","style"],{"content":"OK","style":$hash2(["padding","width","height"],{"padding":"2px","width":"80px","height":"32px"})}),"content":[],"script":""});$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.respond({:action => :ok})\n"+" end\n"+" end\n"+" "];$send(action_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;action_btn_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin"],{"padding":"0px","margin":"0px"})}),"content":[action_btn],"script":""});row_three['$[]']("content")['$<<'](action_btn_cell);} else if("input"['$===']($case)){row_three['$[]']("content")['$<<'](cancel_cell);action_btn=$hash2(["component","options","content","script"],{"component":"button","options":$hash2(["content","style"],{"content":"OK","style":$hash2(["padding","width","height"],{"padding":"2px","width":"80px","height":"32px"})}),"content":[],"script":""});$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" form = self.find_parent_type(:form)\n"+" if the_window && form\n"+" the_window.respond({:action => :ok, :form => form.form_data()})\n"+" end\n"+" end\n"+" "];$send(action_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;action_btn_cell=$hash2(["component","options","content","script"],{"component":"org.gxg.gui.block.table.cell","options":$hash2(["style"],{"style":$hash2(["padding","margin"],{"padding":"0px","margin":"0px"})}),"content":[action_btn],"script":""});row_three['$[]']("content")['$<<'](action_btn_cell);form['$[]']("content")['$<<'](table_two);};form['$[]']("content")['$<<'](table_three);$writer=["width",""+(total_width)+"px"];$send(form['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy($rb_gt(banner_text.$to_s().$size(),0))){$writer=["width",""+(inner_width)+"px"];$send(form['$[]']("content")['$[]'](0)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",""+(banner_height)+"px"];$send(form['$[]']("content")['$[]'](0)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["padding","10px 0px 10px 0px"];$send(form['$[]']("content")['$[]'](0)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;total_height=$rb_plus(total_height,$rb_plus(banner_height,20));};if(dialog_type['$==']("input")){$writer=["width",""+(inner_width)+"px"];$send(form['$[]']("content")['$[]'](1)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height",""+(input_font_size)+"px"];$send(form['$[]']("content")['$[]'](1)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["padding","10px 0px 10px 0px"];$send(form['$[]']("content")['$[]'](1)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;total_height=$rb_plus(total_height,$rb_plus(input_font_size,20));$writer=["width",""+(inner_width)+"px"];$send(form['$[]']("content")['$[]'](2)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height","32px"];$send(form['$[]']("content")['$[]'](2)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["padding","10px 0px 10px 0px"];$send(form['$[]']("content")['$[]'](2)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;total_height=$rb_plus(total_height,52);}else{$writer=["width",""+(inner_width)+"px"];$send(form['$[]']("content")['$[]'](1)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["height","32px"];$send(form['$[]']("content")['$[]'](1)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["padding","10px 0px 10px 0px"];$send(form['$[]']("content")['$[]'](1)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;total_height=$rb_plus(total_height,52);};total_height=$rb_plus(total_height,32);$writer=["height",""+($rb_minus(total_height,$rb_times($rb_plus(form_padding,form_margin),2)))+"px"];$send(form['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$case=row_three['$[]']("content").$size();if((1)['$===']($case)){$writer=["padding",""+"5px 0px 5px "+($rb_minus($rb_divide(inner_width,2),25))+"px"];$send(row_three['$[]']("content")['$[]'](0)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];} else if((2)['$===']($case)){$writer=["padding",""+"5px 0px 5px "+($rb_minus($rb_divide(inner_width,4),12))+"px"];$send(row_three['$[]']("content")['$[]'](0)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["padding",""+"5px 0px 5px "+($rb_minus($rb_divide(inner_width,4),12))+"px"];$send(row_three['$[]']("content")['$[]'](1)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;} else if((3)['$===']($case)){$writer=["padding",""+"5px 0px 5px "+($rb_minus($rb_divide(inner_width,6),6))+"px"];$send(row_three['$[]']("content")['$[]'](0)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["padding",""+"5px 0px 5px "+($rb_minus($rb_divide(inner_width,6),6))+"px"];$send(row_three['$[]']("content")['$[]'](1)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["padding",""+"5px 0px 5px "+($rb_minus($rb_divide(inner_width,6),6))+"px"];$send(row_three['$[]']("content")['$[]'](2)['$[]']("options")['$[]']("style"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;};dialog_source=$hash2(["component","options","script","content"],{"component":"org.gxg.gui.window.dialog","options":$hash2(["window_title","states","width","height"],{"window_title":window_title,"states":$hash2(["hidden"],{"hidden":true}),"width":total_width,"height":total_height}),"script":"","content":[form]});$writer=["script",""+"\n"+" on(:keyup) do |event|\n"+" if event[:which] == 27\n"+" self.respond({:action => :cancel})\n"+" end\n"+" end\n"+" "];$send(dialog_source,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;try{$send(self,'dialog_open',[dialog_source,the_application,details],block.$to_proc());return true;}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) -try{self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":$hash2([],{})}));return false;}finally{Opal.pop_exception();}}else{throw $err;}};;},$Page_choice_dialog$43.$$arity=-1);return(Opal.def(self,'$vfs_dialog',$Page_vfs_dialog$44=function $$vfs_dialog(the_application,details){var $iter=$Page_vfs_dialog$44.$$p,block=$iter||nil,$$45,$$46,self=this,window_title=nil,action_title=nil,dialog_type=nil,$ret_or_15=nil,$case=nil,menu_item_script=nil,menu_bar=nil,$writer=nil,$ret_or_16=nil,menu_header=nil,menu=nil,menu_manifest=nil,menu_bar_cell=nil,list_item_script=nil,subitems=nil,subitems_container=nil,subitems_cell=nil,save_name=nil,save_name_cell=nil,action_btn=nil,action_cell=nil,cancel_btn=nil,cancel_cell=nil,row_one=nil,row_two=nil,row_three=nil,row_four=nil,table_one=nil,table_two=nil,table_three=nil,table_four=nil,form=nil,total_height=nil,$ret_or_17=nil,viewport=nil,dialog_source=nil,the_error=nil;if($iter)$Page_vfs_dialog$44.$$p=null;if($iter)$Page_vfs_dialog$44.$$p=null;;if(the_application==null){the_application=nil;};if(details==null){details=nil;};window_title="Unsupported Dialog Type";action_title="Unsupported";dialog_type=(function(){if($truthy(($ret_or_15=details))){return $ret_or_15}else{return $hash2(["type"],{"type":"folder"})};return nil;})()['$[]']("type");$case=dialog_type;if("save"['$===']($case)||"save"['$===']($case)){window_title="Save As ...";action_title="Save";} +try{self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":$hash2([],{})}));return false;}finally{Opal.pop_exception();}}else{throw $err;}};;},$Page_choice_dialog$49.$$arity=-1);return(Opal.def(self,'$vfs_dialog',$Page_vfs_dialog$50=function $$vfs_dialog(the_application,details){var $iter=$Page_vfs_dialog$50.$$p,block=$iter||nil,$$51,$$52,self=this,window_title=nil,action_title=nil,dialog_type=nil,$ret_or_15=nil,$case=nil,menu_item_script=nil,menu_bar=nil,$writer=nil,$ret_or_16=nil,menu_header=nil,menu=nil,menu_manifest=nil,menu_bar_cell=nil,list_item_script=nil,subitems=nil,subitems_container=nil,subitems_cell=nil,save_name=nil,save_name_cell=nil,action_btn=nil,action_cell=nil,cancel_btn=nil,cancel_cell=nil,row_one=nil,row_two=nil,row_three=nil,row_four=nil,table_one=nil,table_two=nil,table_three=nil,table_four=nil,form=nil,total_height=nil,$ret_or_17=nil,viewport=nil,dialog_source=nil,the_error=nil;if($iter)$Page_vfs_dialog$50.$$p=null;if($iter)$Page_vfs_dialog$50.$$p=null;;if(the_application==null){the_application=nil;};if(details==null){details=nil;};window_title="Unsupported Dialog Type";action_title="Unsupported";dialog_type=(function(){if($truthy(($ret_or_15=details))){return $ret_or_15}else{return $hash2(["type"],{"type":"folder"})};return nil;})()['$[]']("type");$case=dialog_type;if("save"['$===']($case)||"save"['$===']($case)){window_title="Save As ...";action_title="Save";} else if("folder"['$===']($case)||"folder"['$===']($case)){window_title="Choose Folder";action_title="Choose";} -else if("object"['$===']($case)||"object"['$===']($case)){window_title="Select Object";action_title="Select";};menu_item_script=""+"\n"+" def select(data=nil)\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.settings[:data] = @settings[:data]\n"+" menu_bar_header = page.find_object_by('gxg_path_menu_header')\n"+" if menu_bar_header\n"+" menu_bar_header.set_label(File.basename(@settings[:data]))\n"+" menu_bar_header.set_data(@settings[:data])\n"+" end\n"+" menu = page.find_object_by('gxg_path_menu')\n"+" if menu\n"+" menu.update_menu(@settings[:data])\n"+" end\n"+" sublist = page.find_object_by('gxg_path_subitems')\n"+" if sublist\n"+" sublist.update_appearance()\n"+" end\n"+" end\n"+" end\n"+" ";menu_bar=self.$new_component("org.gxg.gui.menu.bar");$writer=["gxg_path_menu_bar"];$send(menu_bar,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2(["path"],{"path":(function(){if($truthy(($ret_or_16=details['$[]']("path")))){return $ret_or_16}else{return "/"};return nil;})()})];$send(menu_bar,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;menu_header=self.$new_component("org.gxg.gui.menu.item");$writer=["gxg_path_menu_header"];$send(menu_header,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2(["label","data"],{"label":$$($nesting,'File').$basename(menu_bar['$[]']("settings")['$[]']("path")),"data":nil})];$send(menu_header,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;menu=self.$new_component("org.gxg.gui.menu");$writer=["gxg_path_menu"];$send(menu,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2(["item_script"],{"item_script":menu_item_script})];$send(menu,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def update_menu(the_path=nil)\n"+" if the_path.is_a?(::String)\n"+" build_list = []\n"+" menu[:content] = []\n"+" #\n"+" menu_manifest = []\n"+" (0..(the_path.split('/').size - 1)).each do |the_index|\n"+" menu_manifest << (the_path.split('/')[0..(the_index)].join('/'))\n"+" end\n"+" menu_manifest.reverse.[1..-1].each do |the_subpath|\n"+" the_item = ::GxG::Database::DetachedHash.new\n"+" the_item[:component] = 'menu_item'\n"+" the_item[:settings] = {:label => File.basename(the_subpath), :data => the_subpath}\n"+" the_item[:options] = {}\n"+" the_item[:script] = @settings[:item_script].to_s\n"+" the_item[:content] = []\n"+" build_list << the_item\n"+" end\n"+" children.values.reverse.each do |the_child|\n"+" the_child.destroy\n"+" end\n"+" if build_list.size > 0\n"+" page.build_components(self, build_list)\n"+" end\n"+" #\n"+" end\n"+" end\n"+" "];$send(menu,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;menu_manifest=[];$send(Opal.Range.$new(0,$rb_minus(menu_bar['$[]']("settings")['$[]']("path").$split("/").$size(),1),false),'each',[],($$45=function(the_index){var self=$$45.$$s==null?this:$$45.$$s;if(the_index==null){the_index=nil;};return menu_manifest['$<<'](menu_bar['$[]']("settings")['$[]']("path").$split("/")['$[]'](Opal.Range.$new(0,the_index,false)).$join("/"));},$$45.$$s=self,$$45.$$arity=1,$$45));$send(menu_manifest.$reverse()['$[]']($range(1,-1,false)),'each',[],($$46=function(the_path){var self=$$46.$$s==null?this:$$46.$$s,the_item=nil;if(the_path==null){the_path=nil;};the_item=self.$new_component("org.gxg.gui.menu.item");$writer=["settings",$hash2(["label","data"],{"label":$$($nesting,'File').$basename(the_path),"data":the_path})];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",menu_item_script];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return menu['$[]']("content")['$<<'](the_item);},$$46.$$s=self,$$46.$$arity=1,$$46));menu_header['$[]']("content")['$<<'](menu);menu_bar['$[]']("content")['$<<'](menu_header);menu_bar_cell=self.$new_component("org.gxg.gui.block.table.cell");$writer=["options",$hash2(["style"],{"style":$hash2(["border","padding","margin","width"],{"border":"1px solid #c2c2c2","padding":"0px","margin":"0px","width":"100%"})})];$send(menu_bar_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[menu_bar]];$send(menu_bar_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;list_item_script=""+"\n"+" def highlight()\n"+" self.merge_style({:'background-color' => '#c2c2c2'})\n"+" end\n"+" def unhighlight()\n"+" self.merge_style({:'background-color' => '#ffffff'})\n"+" end\n"+" def select()\n"+" # unhighlight all others\n"+" parent.children.values.each do |the_child|\n"+" the_child.unhighlight()\n"+" end\n"+" # set selection\n"+" self.highlight()\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.settings[:selection] = self\n"+" end\n"+" end\n"+" on(:mouseup) do |the_event|\n"+" self.select()\n"+" end\n"+" ";subitems=self.$new_component("org.gxg.gui.list");$writer=["gxg_path_subitems"];$send(subitems,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2(["list_item_script"],{"list_item_script":list_item_script})];$send(subitems,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["clear","list-style","padding","margin"],{"clear":"both","list-style":"none","padding":"0px","margin":"0px"})})];$send(subitems,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def add_list_item(the_icon=nil, the_path=nil, the_profile=nil)\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" #\n"+" the_item = ::GxG::Database::DetachedHash.new\n"+" the_item[:component] = 'list_tiem'\n"+" the_item[:settings] = {:label => File.basename(the_path), :data => the_path}\n"+" the_item[:options] = {}\n"+" the_item[:script] = @settings[:list_item_script].to_s\n"+" the_item[:content] = []\n"+" #\n"+" the_window.settings[:manifest][(the_item.uuid.to_s.to_sym)] = {:path => the_path, :profile => the_profile}\n"+" #\n"+" icon_item = ::GxG::Database::DetachedHash.new\n"+" icon_item[:component] = 'image'\n"+" icon_item[:settings] = {}\n"+" icon_item[:options] = {src => the_icon.to_s, :style => {:width => '16px', :height => '16px'}}\n"+" icon_item[:script] = '\n"+" on(:mouseup) do |the_event|\n"+" parent.select()\n"+" end\n"+" '\n"+" icon_item[:content] = []\n"+" #\n"+" label_item = ::GxG::Database::DetachedHash.new\n"+" label_item[:component] = 'label'\n"+" label_item[:settings] = {}\n"+" label_item[:options] = {:content => File.basename(the_path)}\n"+" label_item[:script] = '\n"+" on(:mouseup) do |the_event|\n"+" parent.select()\n"+" end\n"+" '\n"+" label_item[:content] = []\n"+" #\n"+" the_item[:content] << icon_item\n"+" the_item[:content] << label_item\n"+" page.build_components(self, [(the_item)])\n"+" true\n"+" else\n"+" false\n"+" end\n"+" end\n"+" #\n"+" def update_appearance()\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" dialog_type = (the_window.settings[:type] || :folder)\n"+" the_path = the_window.settings[:data]\n"+" if the_path.is_a?(::String)\n"+" #\n"+" the_window.settings[:selection] = nil\n"+" the_window.settings[:manifest] = {}\n"+" # Clear List\n"+" self.children.values.each do |the_child|\n"+" the_child.destroy\n"+" end\n"+" # Rebuild List\n"+" GxG::CONNECTION.entries({:location => (the_path)}) do |response|\n"+" if response.is_a?(::Hash)\n"+" response[:result].each do |the_profile|\n"+" # add list item\n"+" item_path = (the_path + '/' + the_profile[:title].to_s)\n"+" if dialog_type == :folder\n"+" if [:virtual_directory, :directory, :persisted_array].include?(the_profile[:type].to_s.to_sym)\n"+" self.add_list_item(self.theme_icon('folder.svg'), item_path, the_profile)\n"+" end\n"+" else\n"+" case (the_profile[:type].to_s.to_sym)\n"+" when :virtual_directory, :directory, :persisted_array\n"+" the_icon_path = self.theme_icon('folder.svg')\n"+" when :persisted_hash\n"+" the_icon_path = self.theme_icon('object.svg')\n"+" else\n"+" # Review: further qualify file type icons ??\n"+" the_icon_path = self.theme_icon('file.svg')\n"+" end\n"+" self.add_list_item(the_icon_path, item_path, the_profile)\n"+" end\n"+" #\n"+" end\n"+" #\n"+" end\n"+" end\n"+" #\n"+" end\n"+" end\n"+" end\n"+" "];$send(subitems,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$case=dialog_type;if("save"['$===']($case)){$writer=["script",$rb_plus($rb_plus(subitems['$[]']("script"),"\n"),""+"\n"+" self.set_select_responder do |the_uuid|\n"+" if @manifest[(the_uuid.to_s.to_sym)]\n"+" # nothing\n"+" end\n"+" end\n"+" self.set_open_responder do |the_uuid|\n"+" if @manifest[(the_uuid.to_s.to_sym)]\n"+" if [:virtual_directory, :directory, :persisted_array].include?(@manifest[(the_uuid.to_s.to_sym)][:profile][:type].to_s.to_sym)\n"+" # open folder\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" menu_bar = the_window.find_child('path_menu_bar')\n"+" if menu_bar\n"+" GxG::DISPATCHER.post_event(:root) do\n"+" menu_bar.path = @manifest[(the_uuid.to_s.to_sym)][:path]\n"+" end\n"+" end\n"+" end\n"+" end\n"+" end\n"+" end\n"+" ")];$send(subitems,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];} +else if("object"['$===']($case)||"object"['$===']($case)){window_title="Select Object";action_title="Select";};menu_item_script=""+"\n"+" def select(data=nil)\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.settings[:data] = @settings[:data]\n"+" menu_bar_header = page.find_object_by('gxg_path_menu_header')\n"+" if menu_bar_header\n"+" menu_bar_header.set_label(File.basename(@settings[:data]))\n"+" menu_bar_header.set_data(@settings[:data])\n"+" end\n"+" menu = page.find_object_by('gxg_path_menu')\n"+" if menu\n"+" menu.update_menu(@settings[:data])\n"+" end\n"+" sublist = page.find_object_by('gxg_path_subitems')\n"+" if sublist\n"+" sublist.update_appearance()\n"+" end\n"+" end\n"+" end\n"+" ";menu_bar=self.$new_component("org.gxg.gui.menu.bar");$writer=["gxg_path_menu_bar"];$send(menu_bar,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2(["path"],{"path":(function(){if($truthy(($ret_or_16=details['$[]']("path")))){return $ret_or_16}else{return "/"};return nil;})()})];$send(menu_bar,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;menu_header=self.$new_component("org.gxg.gui.menu.item");$writer=["gxg_path_menu_header"];$send(menu_header,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2(["label","data"],{"label":$$($nesting,'File').$basename(menu_bar['$[]']("settings")['$[]']("path")),"data":nil})];$send(menu_header,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;menu=self.$new_component("org.gxg.gui.menu");$writer=["gxg_path_menu"];$send(menu,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2(["item_script"],{"item_script":menu_item_script})];$send(menu,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def update_menu(the_path=nil)\n"+" if the_path.is_a?(::String)\n"+" build_list = []\n"+" menu[:content] = []\n"+" #\n"+" menu_manifest = []\n"+" (0..(the_path.split('/').size - 1)).each do |the_index|\n"+" menu_manifest << (the_path.split('/')[0..(the_index)].join('/'))\n"+" end\n"+" menu_manifest.reverse.[1..-1].each do |the_subpath|\n"+" the_item = ::GxG::Database::DetachedHash.new\n"+" the_item[:component] = 'menu_item'\n"+" the_item[:settings] = {:label => File.basename(the_subpath), :data => the_subpath}\n"+" the_item[:options] = {}\n"+" the_item[:script] = @settings[:item_script].to_s\n"+" the_item[:content] = []\n"+" build_list << the_item\n"+" end\n"+" children.values.reverse.each do |the_child|\n"+" the_child.destroy\n"+" end\n"+" if build_list.size > 0\n"+" page.build_components(self, build_list)\n"+" end\n"+" #\n"+" end\n"+" end\n"+" "];$send(menu,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;menu_manifest=[];$send(Opal.Range.$new(0,$rb_minus(menu_bar['$[]']("settings")['$[]']("path").$split("/").$size(),1),false),'each',[],($$51=function(the_index){var self=$$51.$$s==null?this:$$51.$$s;if(the_index==null){the_index=nil;};return menu_manifest['$<<'](menu_bar['$[]']("settings")['$[]']("path").$split("/")['$[]'](Opal.Range.$new(0,the_index,false)).$join("/"));},$$51.$$s=self,$$51.$$arity=1,$$51));$send(menu_manifest.$reverse()['$[]']($range(1,-1,false)),'each',[],($$52=function(the_path){var self=$$52.$$s==null?this:$$52.$$s,the_item=nil;if(the_path==null){the_path=nil;};the_item=self.$new_component("org.gxg.gui.menu.item");$writer=["settings",$hash2(["label","data"],{"label":$$($nesting,'File').$basename(the_path),"data":the_path})];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",menu_item_script];$send(the_item,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;return menu['$[]']("content")['$<<'](the_item);},$$52.$$s=self,$$52.$$arity=1,$$52));menu_header['$[]']("content")['$<<'](menu);menu_bar['$[]']("content")['$<<'](menu_header);menu_bar_cell=self.$new_component("org.gxg.gui.block.table.cell");$writer=["options",$hash2(["style"],{"style":$hash2(["border","padding","margin","width"],{"border":"1px solid #c2c2c2","padding":"0px","margin":"0px","width":"100%"})})];$send(menu_bar_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[menu_bar]];$send(menu_bar_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;list_item_script=""+"\n"+" def highlight()\n"+" self.merge_style({:'background-color' => '#c2c2c2'})\n"+" end\n"+" def unhighlight()\n"+" self.merge_style({:'background-color' => '#ffffff'})\n"+" end\n"+" def select()\n"+" # unhighlight all others\n"+" parent.children.values.each do |the_child|\n"+" the_child.unhighlight()\n"+" end\n"+" # set selection\n"+" self.highlight()\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.settings[:selection] = self\n"+" end\n"+" end\n"+" on(:mouseup) do |the_event|\n"+" self.select()\n"+" end\n"+" ";subitems=self.$new_component("org.gxg.gui.list");$writer=["gxg_path_subitems"];$send(subitems,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["settings",$hash2(["list_item_script"],{"list_item_script":list_item_script})];$send(subitems,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["clear","list-style","padding","margin"],{"clear":"both","list-style":"none","padding":"0px","margin":"0px"})})];$send(subitems,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" def add_list_item(the_icon=nil, the_path=nil, the_profile=nil)\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" #\n"+" the_item = ::GxG::Database::DetachedHash.new\n"+" the_item[:component] = 'list_tiem'\n"+" the_item[:settings] = {:label => File.basename(the_path), :data => the_path}\n"+" the_item[:options] = {}\n"+" the_item[:script] = @settings[:list_item_script].to_s\n"+" the_item[:content] = []\n"+" #\n"+" the_window.settings[:manifest][(the_item.uuid.to_s.to_sym)] = {:path => the_path, :profile => the_profile}\n"+" #\n"+" icon_item = ::GxG::Database::DetachedHash.new\n"+" icon_item[:component] = 'image'\n"+" icon_item[:settings] = {}\n"+" icon_item[:options] = {src => the_icon.to_s, :style => {:width => '16px', :height => '16px'}}\n"+" icon_item[:script] = '\n"+" on(:mouseup) do |the_event|\n"+" parent.select()\n"+" end\n"+" '\n"+" icon_item[:content] = []\n"+" #\n"+" label_item = ::GxG::Database::DetachedHash.new\n"+" label_item[:component] = 'label'\n"+" label_item[:settings] = {}\n"+" label_item[:options] = {:content => File.basename(the_path)}\n"+" label_item[:script] = '\n"+" on(:mouseup) do |the_event|\n"+" parent.select()\n"+" end\n"+" '\n"+" label_item[:content] = []\n"+" #\n"+" the_item[:content] << icon_item\n"+" the_item[:content] << label_item\n"+" page.build_components(self, [(the_item)])\n"+" true\n"+" else\n"+" false\n"+" end\n"+" end\n"+" #\n"+" def update_appearance(data=nil)\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" dialog_type = (the_window.settings[:type] || :folder)\n"+" the_path = the_window.settings[:data]\n"+" if the_path.is_a?(::String)\n"+" #\n"+" the_window.settings[:selection] = nil\n"+" the_window.settings[:manifest] = {}\n"+" # Clear List\n"+" self.children.values.each do |the_child|\n"+" the_child.destroy\n"+" end\n"+" # Rebuild List\n"+" GxG::CONNECTION.entries({:location => (the_path)}) do |response|\n"+" if response.is_a?(::Hash)\n"+" response[:result].each do |the_profile|\n"+" # add list item\n"+" item_path = (the_path + '/' + the_profile[:title].to_s)\n"+" if dialog_type == :folder\n"+" if [:virtual_directory, :directory, :persisted_array].include?(the_profile[:type].to_s.to_sym)\n"+" self.add_list_item(self.theme_icon('folder.svg'), item_path, the_profile)\n"+" end\n"+" else\n"+" case (the_profile[:type].to_s.to_sym)\n"+" when :virtual_directory, :directory, :persisted_array\n"+" the_icon_path = self.theme_icon('folder.svg')\n"+" when :persisted_hash\n"+" the_icon_path = self.theme_icon('object.svg')\n"+" else\n"+" # Review: further qualify file type icons ??\n"+" the_icon_path = self.theme_icon('file.svg')\n"+" end\n"+" self.add_list_item(the_icon_path, item_path, the_profile)\n"+" end\n"+" #\n"+" end\n"+" #\n"+" end\n"+" end\n"+" #\n"+" end\n"+" end\n"+" end\n"+" "];$send(subitems,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$case=dialog_type;if("save"['$===']($case)){$writer=["script",$rb_plus($rb_plus(subitems['$[]']("script"),"\n"),""+"\n"+" self.set_select_responder do |the_uuid|\n"+" if @manifest[(the_uuid.to_s.to_sym)]\n"+" # nothing\n"+" end\n"+" end\n"+" self.set_open_responder do |the_uuid|\n"+" if @manifest[(the_uuid.to_s.to_sym)]\n"+" if [:virtual_directory, :directory, :persisted_array].include?(@manifest[(the_uuid.to_s.to_sym)][:profile][:type].to_s.to_sym)\n"+" # open folder\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" menu_bar = the_window.find_child('path_menu_bar')\n"+" if menu_bar\n"+" GxG::DISPATCHER.post_event(:root) do\n"+" menu_bar.path = @manifest[(the_uuid.to_s.to_sym)][:path]\n"+" end\n"+" end\n"+" end\n"+" end\n"+" end\n"+" end\n"+" ")];$send(subitems,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];} else if("folder"['$===']($case)){$writer=["script",$rb_plus($rb_plus(subitems['$[]']("script"),"\n"),""+"\n"+" self.set_select_responder do |the_uuid|\n"+" if @manifest[(the_uuid.to_s.to_sym)]\n"+" # nothing\n"+" end\n"+" end\n"+" self.set_open_responder do |the_uuid|\n"+" if @manifest[(the_uuid.to_s.to_sym)]\n"+" if [:virtual_directory, :directory, :persisted_array].include?(@manifest[(the_uuid.to_s.to_sym)][:profile][:type].to_s.to_sym)\n"+" # open folder\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" menu_bar = the_window.find_child('path_menu_bar')\n"+" if menu_bar\n"+" GxG::DISPATCHER.post_event(:root) do\n"+" menu_bar.path = @manifest[(the_uuid.to_s.to_sym)][:path]\n"+" end\n"+" end\n"+" end\n"+" end\n"+" end\n"+" end\n"+" ")];$send(subitems,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];} else if("object"['$===']($case)){$writer=["script",$rb_plus($rb_plus(subitems['$[]']("script"),"\n"),""+"\n"+" self.set_select_responder do |the_uuid|\n"+" if @manifest[(the_uuid.to_s.to_sym)]\n"+" # if object selected enable Select button else disable it.\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" action_button = the_window.find_child('action_button')\n"+" if action_button\n"+" if [:file, :persisted_hash].include?(@manifest[(the_uuid.to_s.to_sym)][:profile][:type].to_s.to_sym)\n"+" action_button.enable()\n"+" else\n"+" action_button.disable()\n"+" end\n"+" end\n"+" end\n"+" end\n"+" end\n"+" self.set_open_responder do |the_uuid|\n"+" if @manifest[(the_uuid.to_s.to_sym)]\n"+" if [:virtual_directory, :directory, :persisted_array].include?(@manifest[(the_uuid.to_s.to_sym)][:profile][:type].to_s.to_sym)\n"+" # open folder\n"+" # first, disable Select button\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" menu_bar = the_window.find_child('path_menu_bar')\n"+" if menu_bar\n"+" GxG::DISPATCHER.post_event(:root) do\n"+" menu_bar.path = @manifest[(the_uuid.to_s.to_sym)][:profile][:path]\n"+" end\n"+" end\n"+" end\n"+" end\n"+" end\n"+" end\n"+" ")];$send(subitems,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};subitems_container=self.$new_component("org.gxg.gui.block");$writer=["options",$hash2(["style"],{"style":$hash2(["width","height","overflow-y"],{"width":"100%","height":"192px","overflow-y":"scroll"})})];$send(subitems_container,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[subitems]];$send(subitems_container,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;subitems_cell=self.$new_component("org.gxg.gui.block.table.cell");$writer=["options",$hash2(["style"],{"style":$hash2(["border","padding","margin","width"],{"border":"1px solid #c2c2c2","padding":"0px","margin":"0px","width":"100%"})})];$send(subitems_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[subitems_container]];$send(subitems_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;save_name=self.$new_component("org.gxg.gui.input.text");$writer=["gxg_save_name"];$send(save_name,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["background-color","font-size","width"],{"background-color":"#f2f2f2","font-size":"16px","width":"100%"})})];$send(save_name,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;save_name_cell=self.$new_component("org.gxg.gui.block.table.cell");$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"0px","margin":"0px","width":"100%"})})];$send(save_name_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[save_name]];$send(save_name_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;action_btn=self.$new_component("org.gxg.gui.input.button.submit");$writer=["gxg_action_button"];$send(action_btn,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["content","style"],{"content":action_title,"style":$hash2(["padding","width","height"],{"padding":"0px","width":"80px","height":"32px"})})];$send(action_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" form = self.find_parent_type(::GxG::Gui::Form)\n"+" if the_window && form\n"+" the_action = the_window.settings[:type].to_s.to_sym\n"+" the_path = the_window.settings[:data].to_s\n"+" if the_action == :save\n"+" the_path = (the_path + '/' + (form.form_data()[:gxg_save_name] || 'Untitled.data').to_s)\n"+" end\n"+" the_window.respond({:action => the_action, :path => the_path})\n"+" end\n"+" end\n"+" "];$send(action_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;action_cell=self.$new_component("org.gxg.gui.block.table.cell");$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"10px 0px 0px 35px","margin":"0px","width":"50%"})})];$send(action_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[action_btn]];$send(action_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;cancel_btn=self.$new_component("org.gxg.gui.input.button.submit");$writer=["gxg_cancel_button"];$send(cancel_btn,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["content","style"],{"content":"Cancel","style":$hash2(["padding","width","height"],{"padding":"2px","width":"80px","height":"32px"})})];$send(cancel_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["script",""+"\n"+" on(:mouseup) do |event|\n"+" the_window = self.find_parent_type(::GxG::Gui::DialogBox)\n"+" if the_window\n"+" the_window.respond({:action => :cancel})\n"+" end\n"+" end\n"+" "];$send(cancel_btn,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;cancel_cell=self.$new_component("org.gxg.gui.block.table.cell");$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"10px 0px 0px 35px","margin":"0px","width":"50%"})})];$send(cancel_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[cancel_btn]];$send(cancel_cell,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;row_one=self.$new_component("org.gxg.gui.block.table.row");$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"0px","margin":"0px","width":"100%"})})];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[menu_bar_cell]];$send(row_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;row_two=self.$new_component("org.gxg.gui.block.table.row");$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"0px","margin":"0px","width":"100%"})})];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[subitems_cell]];$send(row_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;row_three=self.$new_component("org.gxg.gui.block.table.row");$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"0px","margin":"0px","width":"100%"})})];$send(row_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[save_name_cell]];$send(row_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;row_four=self.$new_component("org.gxg.gui.block.table.row");$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","width"],{"padding":"0px","margin":"0px","width":"100%"})})];$send(row_four,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[cancel_cell,action_cell]];$send(row_four,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;table_one=self.$new_component("org.gxg.gui.block.table");$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","width","height"],{"padding":"0px","margin":"0px","width":"300px","height":"32px"})})];$send(table_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[row_one]];$send(table_one,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;table_two=self.$new_component("org.gxg.gui.block.table");$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","width","height"],{"padding":"0px","margin":"0px","width":"300px","height":"192px"})})];$send(table_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[row_two]];$send(table_two,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;table_three=self.$new_component("org.gxg.gui.block.table");$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","width","height"],{"padding":"0px","margin":"0px","width":"300px","height":"32px"})})];$send(table_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[row_three]];$send(table_three,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;table_four=self.$new_component("org.gxg.gui.block.table");$writer=["options",$hash2(["style"],{"style":$hash2(["padding","margin","width","height"],{"padding":"0px","margin":"0px","width":"300px","height":"32px"})})];$send(table_four,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[row_four]];$send(table_four,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;form=self.$new_component("org.gxg.gui.form");$writer=["options",$hash2(["style"],{"style":$hash2(["background-color","padding","margin","width"],{"background-color":"#f2f2f2","padding":"20px","margin":"5px","width":"100%"})})];$send(form,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[]];$send(form,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;total_height=330;form['$[]']("content")['$<<'](table_one);form['$[]']("content")['$<<'](table_two);if($truthy((function(){if($truthy(($ret_or_17=dialog_type['$==']("save")))){return $ret_or_17}else{return dialog_type['$==']("save")};return nil;})())){form['$[]']("content")['$<<'](table_three);total_height=$rb_plus(total_height,32);};form['$[]']("content")['$<<'](table_four);viewport=self.$new_component("org.gxg.gui.application.viewport");$writer=["gxg_selection_viewport"];$send(viewport,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["style"],{"style":$hash2(["overflow","width","height"],{"overflow":"hidden","width":"100%","height":"100%"})})];$send(viewport,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[form]];$send(viewport,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;dialog_source=self.$new_component("org.gxg.gui.window.dialog");$writer=[window_title];$send(dialog_source,'title=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["options",$hash2(["window_title","states","width","height"],{"window_title":window_title,"states":$hash2(["hidden"],{"hidden":true}),"width":350,"height":total_height})];$send(dialog_source,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["content",[viewport]];$send(dialog_source,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;try{$send(self,'dialog_open',[dialog_source,the_application,details],block.$to_proc());return true;}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) -try{self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":$hash2([],{})}));return false;}finally{Opal.pop_exception();}}else{throw $err;}};;},$Page_vfs_dialog$44.$$arity=-1),nil)&&'vfs_dialog';})($nesting[0],null,$nesting)})($nesting[0],$nesting);})($nesting[0],$nesting)})($nesting[0],$nesting)};Opal.modules["web/gxg_comm"]=function(Opal){function $rb_minus(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs-rhs:lhs['$-'](rhs);} +try{self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":$hash2([],{})}));return false;}finally{Opal.pop_exception();}}else{throw $err;}};;},$Page_vfs_dialog$50.$$arity=-1),nil)&&'vfs_dialog';})($nesting[0],null,$nesting)})($nesting[0],$nesting);})($nesting[0],$nesting)})($nesting[0],$nesting)};Opal.modules["web/gxg_comm"]=function(Opal){function $rb_minus(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs-rhs:lhs['$-'](rhs);} function $rb_gt(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs>rhs:lhs['$>'](rhs);} function $rb_lt(lhs,rhs){return(typeof(lhs)==='number'&&typeof(rhs)==='number')?lhs "Accounting Service Start", :usage => "{ :start => nil }"}) do ::GxG::SERVICES[:accounting].start + ::GxG::SERVICES[:accounting].publish_api end accounting_service.on(:stop, {:description => "Accounting Service Stop", :usage => "{ :stop => nil }"}) do ::GxG::SERVICES[:accounting].stop + ::GxG::SERVICES[:accounting].unpublish_api end accounting_service.on(:restart, {:description => "Accounting Service Restart", :usage => "{ :restart => nil }"}) do ::GxG::SERVICES[:accounting].restart end accounting_service.on(:pause, {:description => "Accounting Service Pause", :usage => "{ :pause => nil }"}) do ::GxG::SERVICES[:accounting].pause + ::GxG::SERVICES[:accounting].unpublish_api end accounting_service.on(:resume, {:description => "Accounting Service Resume", :usage => "{ :resume => nil }"}) do ::GxG::SERVICES[:accounting].resume + ::GxG::SERVICES[:accounting].publish_api end # ### Define Internal Service Control Events: accounting_service.on(:at_start, {:description => "Accounting Startup", :usage => "{ :at_start => (service-object) }"}) do |service, credential| diff --git a/Services/core.rb b/Services/core.rb index b87d754..46194e0 100755 --- a/Services/core.rb +++ b/Services/core.rb @@ -389,6 +389,17 @@ module GxG def fs_root() ::File.expand_path("#{::GxG::SYSTEM.gxg_root()}/#{self.vfs_root()}") end + # ### API Support + def publish_api() + if ::GxG::Services::service_available?(:www) + ::GxG::SERVICES[:www].call_event({:publish_api => {:service => self, :path => "/#{@provides.to_s}"}}, ::GxG::DB[:administrator]) + end + end + def unpublish_api() + if ::GxG::Services::service_available?(:www) + ::GxG::SERVICES[:www].call_event({:unpublish_api => {:path => "/#{@provides.to_s}"}}, ::GxG::DB[:administrator]) + end + end # ### Service Management def provides() @provides diff --git a/Services/exchange/exchange.rb b/Services/exchange/exchange.rb index 2c2a0b6..1a96efe 100644 --- a/Services/exchange/exchange.rb +++ b/Services/exchange/exchange.rb @@ -1079,18 +1079,22 @@ exchange_service.require_service(:accounting) # ### Define Public Command Interface: exchange_service.on(:start, {:description => "Exchange Service Start", :usage => "{ :start => nil }"}) do ::GxG::SERVICES[:exchange].start + ::GxG::SERVICES[:exchange].publish_api end exchange_service.on(:stop, {:description => "Exchange Service Stop", :usage => "{ :stop => nil }"}) do ::GxG::SERVICES[:exchange].stop + ::GxG::SERVICES[:exchange].unpublish_api end exchange_service.on(:restart, {:description => "Exchange Service Restart", :usage => "{ :restart => nil }"}) do ::GxG::SERVICES[:exchange].restart end exchange_service.on(:pause, {:description => "Exchange Service Pause", :usage => "{ :pause => nil }"}) do ::GxG::SERVICES[:exchange].pause + ::GxG::SERVICES[:exchange].unpublish_api end exchange_service.on(:resume, {:description => "Exchange Service Resume", :usage => "{ :resume => nil }"}) do ::GxG::SERVICES[:exchange].resume + ::GxG::SERVICES[:exchange].publish_api end # ### Define Internal Service Control Events: exchange_service.on(:at_start, {:description => "Exchange Startup", :usage => "{ :at_start => (service-object) }"}) do |service| diff --git a/Services/www/www.rb b/Services/www/www.rb index 9bedab6..7ff42ef 100644 --- a/Services/www/www.rb +++ b/Services/www/www.rb @@ -289,6 +289,18 @@ www_service.on(:at_stop, {:description => "WWW Stop", :usage => "{ :at_stop => ( # {:result => true} end +www_service.on(:publish_api, {:description => "Publish Service API", :usage => "{ :publish_api => {:service => (service-object), :path => '/path'} }", :public => false}) do |data, credential| + # + ::GxGwww::publish_api(data[:service], data[:path]) + # + {:result => true} +end +www_service.on(:unpublish_api, {:description => "Unpublish Service API", :usage => "{ :unpublish_api => {:path => '/path'} }", :public => false}) do |data, credential| + # + ::GxGwww::unpublish_api(data[:path]) + # + {:result => true} +end # ### Service Installation unless ::GxG::Services::service_available?(:www) # Set Configuration Defaults diff --git a/Services/www/www/gxg-www.rb b/Services/www/www/gxg-www.rb index 21e1244..ffee539 100644 --- a/Services/www/www/gxg-www.rb +++ b/Services/www/www/gxg-www.rb @@ -16,7 +16,194 @@ module GxGwww end the_value end + # ### API toolbox + API = {} + API_SESSIONS = {} + API_THREAD_SAFETY = ::Mutex.new + def self.publish_api(the_service=nil, the_path=nil) + if the_service && the_path + the_controller = ::GxGwww::APIController.new(the_service, the_path) + if the_controller + ::GxGwww::API_THREAD_SAFETY.synchronize { + ::GxGwww::API[(the_path.to_sym)] = the_controller + } + true + else + false + end + else + false + end + end # + def self.unpublish_api(the_path="/unknown") + if the_path + ::GxGwww::API_THREAD_SAFETY.synchronize { + ::GxGwww::API.delete(the_path.to_sym) + } + end + true + end + # + def self.api_login(session_id=nil, credential=:"00000000-0000-4000-0000-000000000000") + if session_id + ::GxGwww::API_THREAD_SAFETY.synchronize { + ::GxGwww::API_SESSIONS[(session_id.to_sym)] = credential + } + true + else + false + end + end + # + def self.api_logout(session_id=nil) + if session_id + ::GxGwww::API_THREAD_SAFETY.synchronize { + ::GxGwww::API_SESSIONS.delete(session_id.to_sym) + } + true + else + false + end + end + # + def self.api_credential(session_id=nil) + result = :"00000000-0000-4000-0000-000000000000" + if session_id + ::GxGwww::API_THREAD_SAFETY.synchronize { + result = (::GxGwww::API_SESSIONS[(session_id.to_sym)] || :"00000000-0000-4000-0000-000000000000") + } + end + result + end + # + class APIController + def initialize(the_service=nil, the_path="/unknown") + @service = the_service + @path = the_path + end + def service + @service + end + def path + @path + end + # + def process(the_method=nil, the_request=nil, the_session=nil) + credential = ::GxGwww::api_credential(the_session['session_id']) + # Pre-processing + response = nil + operation = nil + begin + if the_method + case the_method + when :get + if the_request["details"].to_s == "eyJpbnRyb2R1Y3Rpb24iOnRydWV9" + response = [200, {"content-type" => "application/text"}, ({:csrf => the_session["csrf"]}.gxg_export.to_json.encode64)] + else + operation = (::JSON::parse(URI.unescape(URI.unescape(the_request.params["details"].to_s.decode64.decrypt(the_session["csrf"]))), {:symbolize_names => true})) + unless operation.is_a?(::Hash) + response = [500, {"content-type" => "application/text"}, "Malformed query."] + end + end + when :put + if the_request.body.respond_to?(:rewind) && the_request.body.respond_to?(:read) + the_request.body.rewind + operation = (::JSON::parse(URI.unescape(URI.unescape(the_request.body.read().to_s.decode64.decrypt(the_session["csrf"]))), {:symbolize_names => true})) + unless operation.is_a?(::Hash) + response = [500, {"content-type" => "application/text"}, "Malformed payload."] + end + else + log_warn("Abnormal PUT Body #{the_request.body.inspect}") + response = [500, {"content-type" => "application/text"}, "Malformed payload."] + end + else + response = [500, {"content-type" => "application/text"}, "Provide a get or put method."] + end + else + response = [500, {"content-type" => "application/text"}, "No http method provided."] + end + rescue Exception => the_error + response = [500, {"content-type" => "application/text"}, the_error.to_s] + end + # Processing + unless response + response = [403, {"content-type" => "application/text"}, "You don't have permissions to do that."] + # Operation formatting + if operation.is_a?(::Hash) + operation = ::Hash::gxg_import(operation) + operation.search do |the_value, the_selector, the_container| + if the_value.is_a?(::Hash) + if the_value[:formats].is_a?(::Hash) && the_value[:records].is_a?(::Array) + imported_list = ::GxG::Database::Database::detached_package_import(the_value) + if imported_list.size > 1 + the_container[(the_selector)] = imported_list + else + the_container[(the_selector)] = imported_list[0] + end + end + end + end + end + # + if operation + case operation.keys[0].to_sym + when :upgrade_credential + new_credential = ::GxG::DB[:authority].user_credential(operation[:upgrade_credential][:username].to_s, operation[:upgrade_credential][:password].to_s) + if new_credential + response = [200, {"content-type" => "application/text"}, {:result => ::GxGwww::api_login(the_session['session_id'], new_credential), :error => nil}.gxg_export.to_json.encrypt(the_session["csrf"]).encode64] + else + response = [403, {"content-type" => "application/text"}, {:result => nil, :error => "Bad username or password."}.gxg_export.to_json.encrypt(the_session["csrf"]).encode64] + end + when :downgrade_credential + response = [200, {"content-type" => "application/text"}, {:result => ::GxGwww::api_logout(the_session['session_id']), :error => nil}.gxg_export.to_json.encrypt(the_session["csrf"]).encode64] + when :interface + response = [200, {"content-type" => "application/text"}, @service.interface(credential).gxg_export.to_json.encrypt(the_session["csrf"]).encode64] + else + begin + call_response = @service.call_event(operation, , credential) + if call_response.is_a?(::Hash) + call_response.search do |the_value, the_selector, the_container| + if the_value.is_any?(::GxG::Database::PersistedHash, ::GxG::Database::DetachedHash) + the_container[(the_selector)] = the_value.export_package() + end + end + end + response = [200, {"content-type" => "application/text"}, call_response.gxg_export.to_json.encrypt(the_session["csrf"]).encode64] + rescue Exception => the_error + response = [500, {"content-type" => "application/text"}, the_error.to_s] + end + end + # the_manifest = GxG::SERVICES[:www][:manifests][(the_session['session_id'])] + end + end + # + response + # API ???? + # @service.call_event(operation_envelope=nil, credential) + # GxG::SERVICES[:www][:manifests][(the_session['session_id'])] + # unless the_manifest + # the_manifest = ::GxGwww::Manifest.new({:credential => :'00000000-0000-4000-0000-000000000000'}) + # # manifest format: {:credential => :'00000000-0000-4000-0000-000000000000', :displays => {}, :timers => {}, :connectors => {}, :status => :none} + # GxG::SERVICES[:www][:manifests][(the_session['session_id'])] = the_manifest + # end + # operations = [] + # case the_method + # when :get + # if the_request.params["details"].to_s.size > 0 + # operations = (::JSON::parse(URI.unescape(URI.unescape(the_request.params["details"].to_s.decode64)), {:symbolize_names => true})) + # end + # when :put + # if the_request.body.respond_to?(:rewind) && the_request.body.respond_to?(:read) + # the_request.body.rewind + # operations = (::JSON::parse(URI.unescape(URI.unescape(the_request.body.read())), {:symbolize_names => true})) + # else + # log_warn("Abnormal PUT Body #{the_request.body.inspect}") + # end + # end + end + end + # ### Application Support module Applications MENU = [] def self.refresh_application_menu() @@ -956,30 +1143,47 @@ module GxGwww # puts "Got Request Path: #{request_path}" # ???? case the_method - when :get - if ["", "/", "/index"].include?(request_path) || ::GxG::SERVICES[:core][:resources].exist?("/Public/www/content/pages#{request_path}") - # Send bootstrap html page and wait for xhr requests - # content = GxGwww::CACHE.fetch("/page.html",the_session[:credential]) - response[0] = 200 - # response[1]["content-type"] = content[:content_type] - response[1]["content-type"] = "text/html" - # response[2] = content[:data] - response[2] = self.default_page_content() - else - # Asset :get request - if ::GxG::SERVICES[:core][:resources].exist?(("/Public/www" << request_path)) - content = GxGwww::CACHE.fetch(("/Public/www" << request_path), (the_session[:credential] || :"00000000-0000-4000-0000-000000000000"), true) - if content - response[0] = 200 - response[1]["content-type"] = content[:content_type] - response[1]["X-Content-Type-Options"] = "nosniff" - response[2] = content[:data] + when :get, :put + if request_path.to_s.downcase[(0..3)].include?("/api") + # Filter for API controller match + the_controller = nil + ::GxGwww::API_THREAD_SAFETY.synchronize { + ::GxGwww::API.each_pair do |the_path, the_handler| + if request_path.to_s[(4..-1)] == the_path.to_s + the_controller = the_handler + break + end + end + } + if the_controller + response = the_controller.process(the_method, the_request, the_session) else - log_warn "Failed to fetch: #{request_path}" + response = [404, {"content-type" => "application/text"}, "Endpoint Not Found"] + end + else + if ["", "/", "/index"].include?(request_path) || ::GxG::SERVICES[:core][:resources].exist?("/Public/www/content/pages#{request_path}") + # Send bootstrap html page and wait for xhr requests + # content = GxGwww::CACHE.fetch("/page.html",the_session[:credential]) + response[0] = 200 + # response[1]["content-type"] = content[:content_type] + response[1]["content-type"] = "text/html" + # response[2] = content[:data] + response[2] = self.default_page_content() + else + # Asset :get request + if ::GxG::SERVICES[:core][:resources].exist?(("/Public/www" << request_path)) + content = GxGwww::CACHE.fetch(("/Public/www" << request_path), (the_session[:credential] || :"00000000-0000-4000-0000-000000000000"), true) + if content + response[0] = 200 + response[1]["content-type"] = content[:content_type] + response[1]["X-Content-Type-Options"] = "nosniff" + response[2] = content[:data] + else + log_warn "Failed to fetch: #{request_path}" + end + end end - end end - when :put when :post # if the_request.path.include?("/display/") # if the_request.params["operation"] == "close" diff --git a/seeds/content_setup.rb b/seeds/content_setup.rb index b08d2a9..8255a04 100644 --- a/seeds/content_setup.rb +++ b/seeds/content_setup.rb @@ -326,7 +326,8 @@ module GxGwww :".tr"=>{:display=>"table-row", :margin=>0, :padding=>0}, :".td"=>{:display=>"table-cell", :margin=>0, :padding=>0}, :".default-background-color" => {:"background-color" => "#f2f2f2"}, - :".default-highlite-color" => {:"background-color" => "#87acd5"} + :".default-highlite-color" => {:"background-color" => "#87acd5"}, + :"menu-item-disabled" => {:color => "#655e7a"} } # if GxG::VFS.exist?("/Public/www/content/themes/setup") @@ -389,7 +390,8 @@ module GxGwww :".tr"=>{:display=>"table-row", :margin=>0, :padding=>0}, :".td"=>{:display=>"table-cell", :margin=>0, :padding=>0}, :".default-background-color" => {:"background-color" => "#f2f2f2"}, - :".default-highlite-color" => {:"background-color" => "#87acd5"} + :".default-highlite-color" => {:"background-color" => "#87acd5"}, + :"menu-item-disabled" => {:color => "#655e7a"} } # if GxG::VFS.exist?("/Public/www/content/themes/default") diff --git a/seeds/gxg-framework-current.gem b/seeds/gxg-framework-current.gem index 2feb6cf..67e2222 100644 Binary files a/seeds/gxg-framework-current.gem and b/seeds/gxg-framework-current.gem differ