require.def("tabs/domTab",["domplate/domplate","domplate/tabView","core/lib","i18n!nls/domTab","domplate/toolbar","tabs/search","core/dragdrop","domplate/domTree","core/cookies","domplate/tableView","core/trace","json-query/JSONQuery"],function(Domplate,TabView,Lib,Strings,Toolbar,Search,DragDrop,DomTree,Cookies,TableView,Trace){with(Domplate){var jsonQueryOption="searchJsonQuery";function DomTab(){this.toolbar=new Toolbar,this.toolbar.addButtons(this.getToolbarButtons()),this.tableView=!1}DomTab.prototype=domplate(TabView.Tab.prototype,{id:"DOM",label:Strings.domTabLabel,separator:DIV({"class":"separator"}),tabBodyTag:DIV({"class":"tab$tab.id\\Body tabBody",_repObject:"$tab"},DIV({"class":"domToolbar"}),DIV({"class":"domContent"})),domBox:TABLE({"class":"domBox",cellpadding:0,cellspacing:0},TBODY(TR(TD({"class":"content"},DIV({"class":"title"},"$title")),TD({"class":"splitter"}),TD({"class":"results"},DIV({"class":"resultsDefaultContent"},Strings.searchResultsDefaultText))))),queryResultsViewType:DIV({"class":"queryResultsViewType"},INPUT({"class":"type",type:"checkbox",onclick:"$onTableView"}),SPAN({"class":"label"},Strings.queryResultsTableView)),onUpdateBody:function(a,b){this.toolbar.render(Lib.$(b,"domToolbar"));if(Lib.isIE){var c=Lib.getElementByClass(b,"searchBox"),d=Lib.getElementByClass(c,"searchInput");d.setAttribute("disabled","true"),d.setAttribute("title",Strings.searchDisabledForIE);var e=Lib.getElementByClass(c,"arrow");e.setAttribute("disabled","true")}this.updateSearchResultsUI()},getToolbarButtons:function(){var a=[];a.push({id:"search",tag:Search.Box.tag,initialize:Search.Box.initialize});return a},createSearchObject:function(a){var b=Lib.getElementsByClass(this._body,"domTable");b=Lib.cloneArray(b);var c=b.map(function(a){return a.repObject.input});return new Search.ObjectSearch(a,c,!1,!1)},getSearchOptions:function(){var a=[];a.push({label:Strings.searchOptionJsonQuery,checked:Cookies.getBooleanCookie(jsonQueryOption),command:Lib.bindFixed(this.onOption,this,jsonQueryOption)});return a},onOption:function(a){Search.Box.onOption(a),this.updateSearchResultsUI()},updateSearchResultsUI:function(){var a=Cookies.getBooleanCookie(jsonQueryOption),b=Lib.getElementsByClass(this._body,"domBox");for(var c=0;c0&&(this.currSearch=this.createSearchObject(a));return!1},evalJsonQuery:function(a,b){if(b!=13)return!0;var c=Lib.getElementsByClass(this._body,"domBox");for(var d=0;d