//>>built
require({cache:{"url:dojox/atom/widget/templates/FeedViewerGrouping.html":'\x3ctr dojoAttachPoint\x3d"groupingNode" class\x3d"feedViewerGrouping"\x3e\n\t\x3ctd colspan\x3d"2" dojoAttachPoint\x3d"titleNode" class\x3d"feedViewerGroupingTitle"\x3e\n\t\x3c/td\x3e\n\x3c/tr\x3e',"url:dojox/atom/widget/templates/FeedViewer.html":'\x3cdiv class\x3d"feedViewerContainer" dojoAttachPoint\x3d"feedViewerContainerNode"\x3e\n\t\x3ctable cellspacing\x3d"0" cellpadding\x3d"0" class\x3d"feedViewerTable"\x3e\n\t\t\x3ctbody dojoAttachPoint\x3d"feedViewerTableBody" class\x3d"feedViewerTableBody"\x3e\n\t\t\x3c/tbody\x3e\n\t\x3c/table\x3e\n\x3c/div\x3e\n',
"url:dojox/atom/widget/templates/FeedViewerEntry.html":'\x3ctr class\x3d"feedViewerEntry" dojoAttachPoint\x3d"entryNode" dojoAttachEvent\x3d"onclick:onClick"\x3e\n    \x3ctd class\x3d"feedViewerEntryUpdated" dojoAttachPoint\x3d"timeNode"\x3e\n    \x3c/td\x3e\n    \x3ctd\x3e\n        \x3ctable border\x3d"0" width\x3d"100%" dojoAttachPoint\x3d"titleRow"\x3e\n            \x3ctr padding\x3d"0" border\x3d"0"\x3e\n                \x3ctd class\x3d"feedViewerEntryTitle" dojoAttachPoint\x3d"titleNode"\x3e\n                \x3c/td\x3e\n                \x3ctd class\x3d"feedViewerEntryDelete" align\x3d"right"\x3e\n                    \x3cspan dojoAttachPoint\x3d"deleteButton" dojoAttachEvent\x3d"onclick:deleteEntry" class\x3d"feedViewerDeleteButton" style\x3d"display:none;"\x3e[delete]\x3c/span\x3e\n                \x3c/td\x3e\n            \x3ctr\x3e\n        \x3c/table\x3e\n    \x3c/td\x3e\n\x3c/tr\x3e'}});
define("dojox/atom/widget/FeedViewer","dojo/_base/kernel dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/declare dojo/dom-class dijit/_Widget dijit/_Templated dijit/_Container ../io/Connection dojo/text!./templates/FeedViewer.html dojo/text!./templates/FeedViewerEntry.html dojo/text!./templates/FeedViewerGrouping.html dojo/i18n!./nls/FeedViewerEntry".split(" "),function(g,n,t,F,p,h,q,r,w,x,y,z,A,B){g.experimental("dojox.atom.widget.FeedViewer");var k=p("dojox.atom.widget.FeedViewer",
[q,r,w],{feedViewerTableBody:null,feedViewerTable:null,entrySelectionTopic:"",url:"",xmethod:!1,localSaveOnly:!1,templateString:y,_feed:null,_currentSelection:null,_includeFilters:null,alertsEnabled:!1,postCreate:function(){this._includeFilters=[];""!==this.entrySelectionTopic&&(this._subscriptions=[g.subscribe(this.entrySelectionTopic,this,"_handleEvent")]);this.atomIO=new x;this.childWidgets=[]},startup:function(){this.containerNode=this.feedViewerTableBody;var a=this.getDescendants(),b;for(b in a){var c=
a[b];c&&c.isFilter&&(this._includeFilters.push(new k.CategoryIncludeFilter(c.scheme,c.term,c.label)),c.destroy())}""!==this.url&&this.setFeedFromUrl(this.url)},clear:function(){this.destroyDescendants()},setFeedFromUrl:function(a){if(""!==a){if(this._isRelativeURL(a)){var b="";b="/"!==a.charAt(0)?this._calculateBaseURL(window.location.href,!0):this._calculateBaseURL(window.location.href,!1);this.url=b+a}this.atomIO.getFeed(a,n.hitch(this,this.setFeed))}},setFeed:function(a){this._feed=a;this.clear();
var b=function(l){l=l.split(",");l.pop();return l.join(",")},c=a.entries.sort(n.hitch(this,function(l,C){var u=this._displayDateForEntry(l),v=this._displayDateForEntry(C);return u>v?-1:u<v?1:0}));if(a){a=null;for(var d=0;d<c.length;d++){var e=c[d];if(this._isFilterAccepted(e)){var f=this._displayDateForEntry(e),m="";null!==f&&(m=b(f.toLocaleString()),""===m&&(m=""+(f.getMonth()+1)+"/"+f.getDate()+"/"+f.getFullYear()));if(null===a||a!=m)this.appendGrouping(m),a=m;this.appendEntry(e)}}}},_displayDateForEntry:function(a){return a.updated?
a.updated:a.modified?a.modified:a.issued?a.issued:new Date},appendGrouping:function(a){var b=new D({});b.setText(a);this.addChild(b);this.childWidgets.push(b)},appendEntry:function(a){var b=new E({xmethod:this.xmethod});b.setTitle(a.title.value);b.setTime(this._displayDateForEntry(a).toLocaleTimeString());b.entrySelectionTopic=this.entrySelectionTopic;b.feed=this;this.addChild(b);this.childWidgets.push(b);this.connect(b,"onClick","_rowSelected");a.domNode=b.entryNode;a._entryWidget=b;b.entry=a},deleteEntry:function(a){this.localSaveOnly?
this._removeEntry(a,!0):this.atomIO.deleteEntry(a.entry,n.hitch(this,this._removeEntry,a),null,this.xmethod);g.publish(this.entrySelectionTopic,[{action:"delete",source:this,entry:a.entry}])},_removeEntry:function(a,b){if(b){var c=t.indexOf(this.childWidgets,a),d=this.childWidgets[c-1];c=this.childWidgets[c+1];d.isInstanceOf(widget.FeedViewerGrouping)&&(void 0===c||c.isInstanceOf(widget.FeedViewerGrouping))&&d.destroy();a.destroy()}},_rowSelected:function(a){for(a=a.target;a&&!h.contains(a,"feedViewerEntry");)a=
a.parentNode;for(var b=0;b<this._feed.entries.length;b++){var c=this._feed.entries[b];if(a===c.domNode&&this._currentSelection!==c){h.add(c.domNode,"feedViewerEntrySelected");h.remove(c._entryWidget.timeNode,"feedViewerEntryUpdated");h.add(c._entryWidget.timeNode,"feedViewerEntryUpdatedSelected");this.onEntrySelected(c);""!==this.entrySelectionTopic&&g.publish(this.entrySelectionTopic,[{action:"set",source:this,feed:this._feed,entry:c}]);this._isEditable(c)&&c._entryWidget.enableDelete();this._deselectCurrentSelection();
this._currentSelection=c;break}else if(a===c.domNode&&this._currentSelection===c){g.publish(this.entrySelectionTopic,[{action:"delete",source:this,entry:c}]);this._deselectCurrentSelection();break}}},_deselectCurrentSelection:function(){this._currentSelection&&(h.add(this._currentSelection._entryWidget.timeNode,"feedViewerEntryUpdated"),h.remove(this._currentSelection.domNode,"feedViewerEntrySelected"),h.remove(this._currentSelection._entryWidget.timeNode,"feedViewerEntryUpdatedSelected"),this._currentSelection._entryWidget.disableDelete(),
this._currentSelection=null)},_isEditable:function(a){var b=!1;if(a&&null!==a&&a.links&&null!==a.links)for(var c in a.links)if(a.links[c].rel&&"edit"==a.links[c].rel){b=!0;break}return b},onEntrySelected:function(a){},_isRelativeURL:function(a){var b=function(e){var f=!1;0===e.indexOf("file://")&&(f=!0);return f},c=function(e){var f=!1;0===e.indexOf("http://")&&(f=!0);return f},d=!1;null!==a&&(b(a)||c(a)||(d=!0));return d},_calculateBaseURL:function(a,b){var c=null;if(null!==a){var d=a.indexOf("?");
-1!=d&&(a=a.substring(0,d));if(b)d=a.lastIndexOf("/"),c=0<d&&d<a.length&&d!==a.length-1?a.substring(0,d+1):a;else if(d=a.indexOf("://"),0<d){d+=3;c=a.substring(0,d);var e=a.substring(d,a.length);d=e.indexOf("/");c=d<e.length&&0<d?c+e.substring(0,d):c+e}}return c},_isFilterAccepted:function(a){var b=!1;if(this._includeFilters&&0<this._includeFilters.length)for(var c=0;c<this._includeFilters.length;c++){if(this._includeFilters[c].match(a)){b=!0;break}}else b=!0;return b},addCategoryIncludeFilter:function(a){if(a){var b=
a.scheme,c=a.term;a=a.label;var d=!0;b||(b=null);c||(b=null);a||(b=null);if(this._includeFilters&&0<this._includeFilters.length)for(var e=0;e<this._includeFilters.length;e++){var f=this._includeFilters[e];if(f.term===c&&f.scheme===b&&f.label===a){d=!1;break}}d&&this._includeFilters.push(widget.FeedViewer.CategoryIncludeFilter(b,c,a))}},removeCategoryIncludeFilter:function(a){if(a){var b=a.scheme,c=a.term;a=a.label;b||(b=null);c||(b=null);a||(b=null);var d=[];if(this._includeFilters&&0<this._includeFilters.length){for(var e=
0;e<this._includeFilters.length;e++){var f=this._includeFilters[e];f.term===c&&f.scheme===b&&f.label===a||d.push(f)}this._includeFilters=d}}},_handleEvent:function(a){a.source!=this&&("update"==a.action&&a.entry?(this.localSaveOnly||this.atomIO.updateEntry(a.entry,n.hitch(a.source,a.callback),null,!0),this._currentSelection._entryWidget.setTime(this._displayDateForEntry(a.entry).toLocaleTimeString()),this._currentSelection._entryWidget.setTitle(a.entry.title.value)):"post"==a.action&&a.entry&&(this.localSaveOnly?
this._addEntry(a.entry):this.atomIO.addEntry(a.entry,this.url,n.hitch(this,this._addEntry))))},_addEntry:function(a){this._feed.addEntry(a);this.setFeed(this._feed);g.publish(this.entrySelectionTopic,[{action:"set",source:this,feed:this._feed,entry:a}])},destroy:function(){this.clear();t.forEach(this._subscriptions,g.unsubscribe)}}),E=k.FeedViewerEntry=p("dojox.atom.widget.FeedViewerEntry",[q,r],{templateString:z,entryNode:null,timeNode:null,deleteButton:null,entry:null,feed:null,postCreate:function(){this.deleteButton.innerHTML=
B.deleteButton},setTitle:function(a){this.titleNode.lastChild&&this.titleNode.removeChild(this.titleNode.lastChild);var b=document.createElement("div");b.innerHTML=a;this.titleNode.appendChild(b)},setTime:function(a){this.timeNode.lastChild&&this.timeNode.removeChild(this.timeNode.lastChild);a=document.createTextNode(a);this.timeNode.appendChild(a)},enableDelete:function(){null!==this.deleteButton&&(this.deleteButton.style.display="inline")},disableDelete:function(){null!==this.deleteButton&&(this.deleteButton.style.display=
"none")},deleteEntry:function(a){a.preventDefault();a.stopPropagation();this.feed.deleteEntry(this)},onClick:function(a){}}),D=k.FeedViewerGrouping=p("dojox.atom.widget.FeedViewerGrouping",[q,r],{templateString:A,groupingNode:null,titleNode:null,setText:function(a){this.titleNode.lastChild&&this.titleNode.removeChild(this.titleNode.lastChild);a=document.createTextNode(a);this.titleNode.appendChild(a)}});k.AtomEntryCategoryFilter=p("dojox.atom.widget.AtomEntryCategoryFilter",null,{scheme:"",term:"",
label:"",isFilter:!0});k.CategoryIncludeFilter=p("dojox.atom.widget.FeedViewer.CategoryIncludeFilter",null,{constructor:function(a,b,c){this.scheme=a;this.term=b;this.label=c},match:function(a){var b=!1;if(null!==a&&(a=a.categories,null!==a))for(var c=0;c<a.length;c++){var d=a[c];if(""!==this.scheme&&this.scheme!==d.scheme)break;if(""!==this.term&&this.term!==d.term)break;if(""!==this.label&&this.label!==d.label)break;b=!0}return b}});return k});