har 0.0.1.dev
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/.rspec +1 -0
- data/Gemfile +4 -0
- data/LICENSE +24 -0
- data/README.mdown +36 -0
- data/Rakefile +28 -0
- data/bin/har +4 -0
- data/har.gemspec +27 -0
- data/lib/har.rb +32 -0
- data/lib/har/archive.rb +135 -0
- data/lib/har/page.rb +19 -0
- data/lib/har/schema_type.rb +78 -0
- data/lib/har/schemas/browserType +19 -0
- data/lib/har/schemas/cacheEntryType +25 -0
- data/lib/har/schemas/cacheType +15 -0
- data/lib/har/schemas/contentType +26 -0
- data/lib/har/schemas/cookieType +32 -0
- data/lib/har/schemas/creatorType +18 -0
- data/lib/har/schemas/entryType +46 -0
- data/lib/har/schemas/logType +40 -0
- data/lib/har/schemas/pageTimingsType +17 -0
- data/lib/har/schemas/pageType +29 -0
- data/lib/har/schemas/postDataType +38 -0
- data/lib/har/schemas/recordType +17 -0
- data/lib/har/schemas/requestType +53 -0
- data/lib/har/schemas/responseType +51 -0
- data/lib/har/schemas/timingsType +43 -0
- data/lib/har/serializable.rb +22 -0
- data/lib/har/version.rb +3 -0
- data/lib/har/viewer.rb +99 -0
- data/lib/har/viewer/css/SyntaxHighlighter.css +1 -0
- data/lib/har/viewer/css/aboutTab.css +1 -0
- data/lib/har/viewer/css/domTab.css +1 -0
- data/lib/har/viewer/css/domTree.css +1 -0
- data/lib/har/viewer/css/harPreview.css +1 -0
- data/lib/har/viewer/css/harView.css +1 -0
- data/lib/har/viewer/css/harViewer.css +1 -0
- data/lib/har/viewer/css/homeTab.css +1 -0
- data/lib/har/viewer/css/images/ajax-loader.gif +0 -0
- data/lib/har/viewer/css/images/bg-button.gif +0 -0
- data/lib/har/viewer/css/images/blank.gif +0 -0
- data/lib/har/viewer/css/images/button-background.png +0 -0
- data/lib/har/viewer/css/images/checkmark.gif +0 -0
- data/lib/har/viewer/css/images/checkmark.png +0 -0
- data/lib/har/viewer/css/images/close-sprites.png +0 -0
- data/lib/har/viewer/css/images/contextMenuTarget.png +0 -0
- data/lib/har/viewer/css/images/contextMenuTargetHover.png +0 -0
- data/lib/har/viewer/css/images/download-sprites.png +0 -0
- data/lib/har/viewer/css/images/downloadButtons-aero.png +0 -0
- data/lib/har/viewer/css/images/group.gif +0 -0
- data/lib/har/viewer/css/images/loading_16.gif +0 -0
- data/lib/har/viewer/css/images/menu/Thumbs.db +0 -0
- data/lib/har/viewer/css/images/menu/shadowAlpha.png +0 -0
- data/lib/har/viewer/css/images/menu/tabMenuCheckbox.png +0 -0
- data/lib/har/viewer/css/images/menu/tabMenuPin.png +0 -0
- data/lib/har/viewer/css/images/menu/tabMenuRadio.png +0 -0
- data/lib/har/viewer/css/images/netBarBlocking.gif +0 -0
- data/lib/har/viewer/css/images/netBarBlocking2.gif +0 -0
- data/lib/har/viewer/css/images/netBarCached.gif +0 -0
- data/lib/har/viewer/css/images/netBarConnecting.gif +0 -0
- data/lib/har/viewer/css/images/netBarLoaded.gif +0 -0
- data/lib/har/viewer/css/images/netBarReceiving.gif +0 -0
- data/lib/har/viewer/css/images/netBarResolving.gif +0 -0
- data/lib/har/viewer/css/images/netBarResponded.gif +0 -0
- data/lib/har/viewer/css/images/netBarSending.gif +0 -0
- data/lib/har/viewer/css/images/netBarWaiting.gif +0 -0
- data/lib/har/viewer/css/images/page-timeline.png +0 -0
- data/lib/har/viewer/css/images/save.png +0 -0
- data/lib/har/viewer/css/images/spriteArrows.gif +0 -0
- data/lib/har/viewer/css/images/spriteArrows.png +0 -0
- data/lib/har/viewer/css/images/tabEnabled.png +0 -0
- data/lib/har/viewer/css/images/timeline-sprites.png +0 -0
- data/lib/har/viewer/css/images/tooltipConnectorUp.png +0 -0
- data/lib/har/viewer/css/images/twisty-sprites.png +0 -0
- data/lib/har/viewer/css/images/twistyClosed.png +0 -0
- data/lib/har/viewer/css/images/twistyOpen.png +0 -0
- data/lib/har/viewer/css/infoTip.css +1 -0
- data/lib/har/viewer/css/pageList.css +1 -0
- data/lib/har/viewer/css/pageStats.css +1 -0
- data/lib/har/viewer/css/pageTimeline.css +1 -0
- data/lib/har/viewer/css/popupMenu.css +1 -0
- data/lib/har/viewer/css/previewTab.css +1 -0
- data/lib/har/viewer/css/requestBody.css +1 -0
- data/lib/har/viewer/css/requestList.css +1 -0
- data/lib/har/viewer/css/schemaTab.css +1 -0
- data/lib/har/viewer/css/tabView.css +1 -0
- data/lib/har/viewer/css/toolTip.css +1 -0
- data/lib/har/viewer/css/toolbar.css +1 -0
- data/lib/har/viewer/css/xhrSpy.css +1 -0
- data/lib/har/viewer/index.html +13 -0
- data/lib/har/viewer/scripts/app.build.js +0 -0
- data/lib/har/viewer/scripts/core/cookies.js +2 -0
- data/lib/har/viewer/scripts/core/lib.js +23 -0
- data/lib/har/viewer/scripts/core/trace.js +26 -0
- data/lib/har/viewer/scripts/domplate/domTree.js +5 -0
- data/lib/har/viewer/scripts/domplate/domplate.js +263 -0
- data/lib/har/viewer/scripts/domplate/infoTip.js +4 -0
- data/lib/har/viewer/scripts/domplate/popupMenu.js +14 -0
- data/lib/har/viewer/scripts/domplate/tabView.js +6 -0
- data/lib/har/viewer/scripts/domplate/toolTip.js +3 -0
- data/lib/har/viewer/scripts/domplate/toolbar.js +3 -0
- data/lib/har/viewer/scripts/downloadify/LICENSE.txt +22 -0
- data/lib/har/viewer/scripts/downloadify/README.textile +89 -0
- data/lib/har/viewer/scripts/downloadify/js/downloadify.min.js +6 -0
- data/lib/har/viewer/scripts/downloadify/js/swfobject.js +18 -0
- data/lib/har/viewer/scripts/downloadify/media/downloadify.swf +0 -0
- data/lib/har/viewer/scripts/downloadify/src/Downloadify.as +162 -0
- data/lib/har/viewer/scripts/downloadify/src/downloadify.js +6 -0
- data/lib/har/viewer/scripts/excanvas/excanvas.js +21 -0
- data/lib/har/viewer/scripts/harPreview.js +149 -0
- data/lib/har/viewer/scripts/harViewer.js +244 -0
- data/lib/har/viewer/scripts/jquery-plugins/jquery.json.js +6 -0
- data/lib/har/viewer/scripts/nls/harViewer.js +1 -0
- data/lib/har/viewer/scripts/nls/homeTab.js +1 -0
- data/lib/har/viewer/scripts/nls/pageStats.js +2 -0
- data/lib/har/viewer/scripts/nls/pageTimeline.js +1 -0
- data/lib/har/viewer/scripts/nls/previewTab.js +1 -0
- data/lib/har/viewer/scripts/nls/requestBody.js +1 -0
- data/lib/har/viewer/scripts/nls/requestList.js +2 -0
- data/lib/har/viewer/scripts/preview/harModel.js +7 -0
- data/lib/har/viewer/scripts/preview/harSchema.js +308 -0
- data/lib/har/viewer/scripts/preview/jsonSchema.js +7 -0
- data/lib/har/viewer/scripts/preview/pageList.js +4 -0
- data/lib/har/viewer/scripts/preview/ref.js +5 -0
- data/lib/har/viewer/scripts/preview/requestBody.js +11 -0
- data/lib/har/viewer/scripts/preview/requestList.js +27 -0
- data/lib/har/viewer/scripts/requireplugins-jquery-1.4.2.js +204 -0
- data/lib/har/viewer/scripts/syntax-highlighter/README.txt +9 -0
- data/lib/har/viewer/scripts/syntax-highlighter/shCore.js +20 -0
- data/lib/har/viewer/scripts/tabs/aboutTab.html +93 -0
- data/lib/har/viewer/scripts/tabs/aboutTab.js +2 -0
- data/lib/har/viewer/scripts/tabs/domTab.js +1 -0
- data/lib/har/viewer/scripts/tabs/homeTab.html +34 -0
- data/lib/har/viewer/scripts/tabs/homeTab.js +5 -0
- data/lib/har/viewer/scripts/tabs/pageStats.js +14 -0
- data/lib/har/viewer/scripts/tabs/pageTimeline.js +10 -0
- data/lib/har/viewer/scripts/tabs/previewTab.js +6 -0
- data/lib/har/viewer/scripts/tabs/schemaTab.js +2 -0
- data/lib/har/viewer/scripts/xhr-spy/spy.js +2 -0
- data/lib/har/viewer/scripts/xhr-spy/spy.php +13 -0
- data/lib/har/viewer/scripts/xhr-spy/xhr.js +6 -0
- data/lib/har/viewer/scripts/xhr-spy/xhrSpyBookmarklet.js +1 -0
- data/schema.json +201 -0
- data/spec/fixtures/entry1.json +124 -0
- data/spec/fixtures/hars/bad.har +2563 -0
- data/spec/fixtures/hars/browser-blocking-time.har +2567 -0
- data/spec/fixtures/hars/google.com.har +612 -0
- data/spec/fixtures/hars/inline-scripts-block.har +1066 -0
- data/spec/fixtures/hars/softwareishard.com.har +5323 -0
- data/spec/har/archive_spec.rb +130 -0
- data/spec/har/entry_spec.rb +16 -0
- data/spec/har/page_spec.rb +24 -0
- data/spec/har/viewer_spec.rb +17 -0
- data/spec/spec_helper.rb +34 -0
- metadata +283 -0
@@ -0,0 +1,4 @@
|
|
1
|
+
require.def("domplate/infoTip",["domplate/domplate","core/lib","core/trace"],function(e,b){with(e){e=b.extend({listeners:[],maxWidth:100,maxHeight:80,infoTipMargin:10,infoTipWindowPadding:25,tags:domplate({infoTipTag:DIV({"class":"infoTip"})}),initialize:function(){if(!$.browser.msie){var a=$("body");a.bind("mouseover",b.bind(this.onMouseMove,this));a.bind("mouseout",b.bind(this.onMouseOut,this));a.bind("mousemove",b.bind(this.onMouseMove,this));return this.infoTip=this.tags.infoTipTag.append({},
|
2
|
+
b.getBody(document))}},showInfoTip:function(a,c,f,g,d,i){var h=b.getOverflowParent(c);if(b.dispatch2(this.listeners,"showInfoTip",[a,c,f+(h?h.scrollLeft:0),g,d,i])){d=a.ownerDocument.documentElement;c=d.clientWidth;d=d.clientHeight;if(f+a.offsetWidth+this.infoTipMargin>c-this.infoTipWindowPadding){a.style.left="auto";a.style.right=c-f+this.infoTipMargin+"px"}else{a.style.left=f+this.infoTipMargin+"px";a.style.right="auto"}a.style.top=g+a.offsetHeight+this.infoTipMargin>d?Math.max(0,d-(a.offsetHeight+
|
3
|
+
this.infoTipMargin))+"px":g+this.infoTipMargin+"px";a.style.bottom="auto";a.setAttribute("active","true")}else this.hideInfoTip(a)},hideInfoTip:function(a){a&&a.removeAttribute("active")},onMouseOut:function(a){a.relatedTarget||this.hideInfoTip(this.infoTip)},onMouseMove:function(a){this.infoTip.setAttribute("multiline",false);this.showInfoTip(this.infoTip,a.target,a.clientX,a.clientY,a.rangeParent,a.rangeOffset)},populateTimingInfoTip:function(a,c){this.tags.colorTag.replace({rgbValue:c},a);return true},
|
4
|
+
addListener:function(a){this.listeners.push(a)},removeListener:function(a){b.remove(this.listeners,a)}});e.initialize();return e}});
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require.def("domplate/popupMenu",["domplate/domplate","core/lib","core/trace"],function(h,c){with(h){var k={controllers:[],controllerContext:{label:"controller context"},initialize:function(a){this.controllers=[];this.controllerContext=a||this.controllerContext},shutdown:function(){this.removeControllers()},addController:function(){for(var a=0,b;b=arguments[a];a++){if(typeof b[0]=="string")b[0]=$$(b[0],this.controllerContext);var d=b[2];b[2]=c.bind(d,this);b[3]=d;this.controllers.push(b);c.addEventListener.apply(this,
|
2
|
+
b)}},removeController:function(){for(var a=0,b;b=arguments[a];a++)for(var d=0,f;f=this.controllers[d];d++)b[0]==f[0]&&b[1]==f[1]&&b[2]==f[3]&&c.removeEventListener.apply(this,f)},removeControllers:function(){for(var a=0,b;b=this.controllers[a];a++)c.removeEventListener.apply(this,b)}};h={"class":"$item.className",type:"$item.type",value:"$item.value",_command:"$item.command"};if(c.isIE6)h.href="javascript:void(0)";var m=domplate({tag:DIV({"class":"popupMenu popupMenuShadow"},DIV({"class":"popupMenuContent popupMenuShadowContent"},
|
3
|
+
FOR("item","$object.items|memberIterator",TAG("$item.tag",{item:"$item"})))),itemTag:A(h,"$item.label"),checkBoxTag:A(c.extend(h,{checked:"$item.checked"}),"$item.label"),radioButtonTag:A(c.extend(h,{selected:"$item.selected"}),"$item.label"),groupTag:A(c.extend(h,{child:"$item.child"}),"$item.label"),shortcutTag:A(h,"$item.label",SPAN({"class":"popupMenuShortcutKey"},"$item.key")),separatorTag:SPAN({"class":"popupMenuSeparator"}),memberIterator:function(a){for(var b=[],d=0,f=a.length;d<f;d++){var e=
|
4
|
+
a[d];if(typeof e=="string"&&e.indexOf("-")==0)b.push({tag:this.separatorTag});else{e=c.extend(e,{});e.type=e.type||"";e.value=e.value||"";var i=e.type;e.tag=this.itemTag;var g=e.className||"";g+="popupMenuOption ";if(i=="checkbox"){g+="popupMenuCheckBox ";e.tag=this.checkBoxTag}else if(i=="radio"){g+="popupMenuRadioButton ";e.tag=this.radioButtonTag}else if(i=="group"){g+="popupMenuGroup ";e.tag=this.groupTag}else if(i=="shortcut"){g+="popupMenuShortcut ";e.tag=this.shortcutTag}if(e.checked)g+="popupMenuChecked ";
|
5
|
+
else if(e.selected)g+="popupMenuRadioSelected ";if(e.disabled)g+="popupMenuDisabled ";e.className=g;e.label=e.label;b.push(e)}}return b}}),j=function(a){if(!a.element){if(a.getItems)a.items=a.getItems();var b=c.getBody(document);a.element=m.tag.append({object:a},b,m)}c.append(this,a);if(typeof this.element=="string"){this.id=this.element;this.element=$(this.id)}else if(this.id)this.element.id=this.id;this.elementStyle=this.element.style;this.isVisible=false;this.handleMouseDown=c.bind(this.handleMouseDown,
|
6
|
+
this);this.handleMouseOver=c.bind(this.handleMouseOver,this);this.handleMouseOut=c.bind(this.handleMouseOut,this);this.handleWindowMouseDown=c.bind(this.handleWindowMouseDown,this)},l={};j.prototype=c.extend(k,{initialize:function(){k.initialize.call(this);this.addController([this.element,"mousedown",this.handleMouseDown],[this.element,"mouseover",this.handleMouseOver])},destroy:function(){this.hide();if(this.parentMenu)this.parentMenu.childMenu=null;this.element.parentNode.removeChild(this.element);
|
7
|
+
this.parentTarget=this.parentMenu=this.elementStyle=this.element=null},shutdown:function(){k.shutdown.call(this)},showPopup:function(a){var b=c.isIE6?1:-4;a=c.getElementBox(a);var d={top:0,left:0};this.show(a.left+b-d.left,a.top+a.height-5-d.top)},show:function(a,b){this.initialize();if(!this.isVisible){a=a||0;b=b||0;if(this.parentMenu){var d=this.parentMenu.childMenu;d&&d!=this&&d.destroy();this.parentMenu.childMenu=this}else c.addEventListener(document,"mousedown",this.handleWindowMouseDown);this.elementStyle.display=
|
8
|
+
"block";this.elementStyle.visibility="hidden";d=c.getWindowSize();a=Math.min(a,d.width-this.element.clientWidth-10);a=Math.max(a,0);b=Math.min(b,d.height-this.element.clientHeight-10);b=Math.max(b,0);this.elementStyle.left=a+"px";this.elementStyle.top=b+"px";this.elementStyle.visibility="visible";this.isVisible=true;c.isFunction(this.onShow)&&this.onShow.apply(this,arguments)}},hide:function(){this.clearHideTimeout();this.clearShowChildTimeout();if(this.isVisible){this.elementStyle.display="none";
|
9
|
+
if(this.childMenu){this.childMenu.destroy();this.childMenu=null}this.parentTarget&&c.removeClass(this.parentTarget,"popupMenuGroupSelected");this.isVisible=false;this.shutdown();c.isFunction(this.onHide)&&this.onHide.apply(this,arguments)}},showChildMenu:function(a){var b=a.getAttribute("child"),d=this;a=a;this.showChildTimeout=window.setTimeout(function(){var f=c.getElementBox(a),e=l.hasOwnProperty(b)?l[b]:{element:$(b)};(new j(c.extend(e,{parentMenu:d,parentTarget:a}))).show(f.left+f.width+(c.isIE6?
|
10
|
+
-1:-6),f.top-6);c.setClass(a,"popupMenuGroupSelected")},350)},clearHideTimeout:function(){if(this.hideTimeout){window.clearTimeout(this.hideTimeout);delete this.hideTimeout}},clearShowChildTimeout:function(){if(this.showChildTimeout){window.clearTimeout(this.showChildTimeout);this.showChildTimeout=null}},handleMouseDown:function(a){c.cancelEvent(a,true);for(var b=this;b.parentMenu;)b=b.parentMenu;a=a.target||a.srcElement;a=c.getAncestorByClass(a,"popupMenuOption");if(!a||c.hasClass(a,"popupMenuGroup"))return false;
|
11
|
+
if(a&&!c.hasClass(a,"popupMenuDisabled")){var d=a.getAttribute("type");if(d=="checkbox"){a.getAttribute("checked");var f=a.getAttribute("value"),e=c.hasClass(a,"popupMenuChecked");if(e){c.removeClass(a,"popupMenuChecked");a.setAttribute("checked","")}else{c.setClass(a,"popupMenuChecked");a.setAttribute("checked","true")}c.isFunction(this.onCheck)&&this.onCheck.call(this,a,f,!e)}if(d=="radiobutton"){d=c.getElementsByClass(a.parentNode,"popupMenuRadioSelected");f=a.getAttribute("group");e=0;for(var i=
|
12
|
+
d.length;e<i;e++){radio=d[e];if(radio.getAttribute("group")==f){c.removeClass(radio,"popupMenuRadioSelected");radio.setAttribute("selected","")}}c.setClass(a,"popupMenuRadioSelected");a.setAttribute("selected","true")}d=null;f=a.command;if(c.isFunction(f))d=f;else if(typeof f=="string")d=this[f];f=true;if(d)f=d.call(this,a)!==false;f&&b.hide()}return false},handleWindowMouseDown:function(a){a=a.target||a.srcElement;a=c.getAncestorByClass(a,"popupMenu");if(!a){c.removeEventListener(document,"mousedown",
|
13
|
+
this.handleWindowMouseDown);this.destroy()}},handleMouseOver:function(a){this.clearHideTimeout();this.clearShowChildTimeout();a=a.target||a.srcElement;if(a=c.getAncestorByClass(a,"popupMenuOption")){var b=this.childMenu;if(b){c.removeClass(b.parentTarget,"popupMenuGroupSelected");if(b.parentTarget!=a&&b.isVisible){b.clearHideTimeout();b.hideTimeout=window.setTimeout(function(){b.destroy()},300)}}c.hasClass(a,"popupMenuGroup")&&this.showChildMenu(a)}}});c.append(j,{register:function(a){l[a.id]=a},
|
14
|
+
check:function(a){c.setClass(a,"popupMenuChecked");a.setAttribute("checked","true")},uncheck:function(a){c.removeClass(a,"popupMenuChecked");a.setAttribute("checked","")},disable:function(a){c.setClass(a,"popupMenuDisabled")},enable:function(a){c.removeClass(a,"popupMenuDisabled")}});return j}});
|
@@ -0,0 +1,6 @@
|
|
1
|
+
require.def("domplate/tabView",["domplate/domplate","core/lib","core/trace"],function(e,c,h){with(e){var f=domplate({tag:TABLE({"class":"tabView",cellpadding:0,cellspacing:0,_repObject:"$tabView"},TBODY(TR({"class":"tabViewRow"},TD({"class":"tabViewCol",valign:"top"},TAG("$tabList",{tabView:"$tabView"}))))),tabList:DIV({"class":"tabViewBody",onclick:"$onClickTab"},DIV({"class":"$tabView.id\\Bar tabBar"}),DIV({"class":"$tabView.id\\Bodies tabBodies"})),tabHeaderTag:A({"class":"$tab.id\\Tab tab",view:"$tab.id",
|
2
|
+
_repObject:"$tab"},"$tab.label"),tabBodyTag:DIV({"class":"tab$tab.id\\Body tabBody",_repObject:"$tab"}),hideTab:function(){return false},onClickTab:function(a){a=$.event.fix(a||window.event);this.getTabView(a.target).onClickTab(a)},getTabView:function(a){return c.getAncestorByClass(a,"tabView").repObject}});e=function(a){this.id=a;this.tabs=[];this.listeners=[]};e.prototype={appendTab:function(a){this.tabs.push(a);a.tabView=this;return a},getTab:function(a){return(a=c.getElementByClass(this.element,
|
3
|
+
a+"Tab"))?a.repObject:null},selectTabByName:function(a){(a=c.getElementByClass(this.element,a+"Tab"))&&this.selectTab(a)},addListener:function(a){this.listeners.push(a)},removeListener:function(a){c.remove(this.listeners,a)},onClickTab:function(a){(a=c.getAncestorByClass(a.target,"tab"))&&this.selectTab(a)},selectTab:function(a){if(c.hasClass(a,"tab"))if(!c.hasClass(a,"selected")){var d=a.getAttribute("view");if(d){var b=c.getAncestorByClass(a,"tabViewBody");if(b.selectedTab){b.selectedTab.removeAttribute("selected");
|
4
|
+
b.selectedBody.removeAttribute("selected");c.removeClass(b.selectedTab,"selected");c.removeClass(b.selectedBody,"selected")}var g=c.getElementByClass(b,"tab"+d+"Body");g||h.error("TabView.selectTab; Missing tab body",a);b.selectedTab=a;b.selectedBody=g;b.selectedTab.setAttribute("selected","true");b.selectedBody.setAttribute("selected","true");c.setClass(b.selectedBody,"selected");c.setClass(b.selectedTab,"selected");this.updateTabBody(b,d)}}},updateTabBody:function(a){a=a.selectedTab.repObject;if(!a._body._updated){a._body._updated=
|
5
|
+
true;a.bodyTag&&a.bodyTag.replace({tab:a},a._body);a&&a.onUpdateBody&&a.onUpdateBody(this,a._body);for(var d=0;d<this.listeners.length;d++){var b=this.listeners[d];b.onUpdateBody&&b.onUpdateBody(this,a._body)}}},render:function(a){this.element=f.tag.replace({tabView:this},a,f);c.setClass(this.element,this.id);for(var d in this.tabs){var b=this.tabs[d],g=b.tabHeaderTag?b.tabHeaderTag:f.tabHeaderTag,i=b.tabBodyTag?b.tabBodyTag:f.tabBodyTag;try{b._header=g.append({tab:b},c.$(a,"tabBar"));b._body=i.append({tab:b},
|
6
|
+
c.$(a,"tabBodies"))}catch(j){h.exception("TabView.appendTab; Exception ",j)}}return this.element}};e.Tab=function(){};e.Tab.prototype={invalidate:function(){this._updated=false},select:function(){this.tabView.selectTabByName(this.id)}};return e}});
|
@@ -0,0 +1,3 @@
|
|
1
|
+
require.def("domplate/toolTip",["domplate/domplate","core/lib","core/trace"],function(d,a){with(d){var e=null;d=function(){this.element=null};d.prototype=domplate({tag:DIV({"class":"toolTip"},DIV()),show:function(c,b){e&&e.hide();this.target=c;this.addListeners();c=a.getBody(document);this.element=this.tag.append({options:b},c,this);b=a.getElementBox(this.target);this.element.style.top=b.top+b.height+"px";this.element.style.left=b.left+b.width+"px";this.element.style.display="block";e=this;return this.element},
|
2
|
+
hide:function(){if(this.element){this.removeListeners();this.element.parentNode.removeChild(this.element);e=this.element=null}},addListeners:function(){this.onMouseEvent=a.bind(this.onMouseEvent,this);$(document).bind("mousemove mouseover mousedown click mouseout",this.onMouseEvent,true)},removeListeners:function(){$(document).unbind("mousemove mouseover mousedown click mouseout",this.onMouseEvent,this,true)},onMouseEvent:function(c){var b=a.fixEvent(c);if(!a.getAncestorByClass(b.target,"toolTip")){var g=
|
3
|
+
c.clientX,h=c.clientY,f=a.getElementBox(this.element);if(c.type!="click"&&c.type!="mousedown")f=a.inflateRect(f,10,10);a.pointInRect(f,g,h)||a.isAncestor(b.target,this.target)||this.hide();a.cancelEvent(b)}}});return d}});
|
@@ -0,0 +1,3 @@
|
|
1
|
+
require.def("domplate/toolbar",["domplate/domplate","core/lib","core/trace"],function(c,e){with(c){var d=domplate({tag:DIV({"class":"toolbar",onclick:"$onClick"}),buttonTag:SPAN({"class":"$button.className toolbarButton",title:"$button.tooltiptext",$text:"$button|hasLabel",onclick:"$button|getCommand"},"$button|getLabel"),separatorTag:SPAN({"class":"toolbarSeparator",style:"color: gray;"},"|"),hasLabel:function(a){return a.label?true:false},getLabel:function(a){return a.label?a.label:""},getCommand:function(a){return a.command?
|
2
|
+
a.command:function(){}},onClick:function(a){a=$.event.fix(a||window.event);e.cancelEvent(a)}});c=function(){this.buttons=[]};c.prototype={addButton:function(a){a.tooltiptext||(tooltiptext="");this.buttons.push(a)},getButton:function(a){for(var b=0;b<this.buttons.length;b++)if(this.buttons[b].id==a)return this.buttons[b]},render:function(a){if(this.element)a=this.element.parentNode;this.element=d.tag.replace({},a);for(a=0;a<this.buttons.length;a++){var b=this.buttons[a];(b.tag?b.tag:d.buttonTag).append({button:b},
|
3
|
+
this.element);a<this.buttons.length-1&&d.separatorTag.append({},this.element)}return this.element}};return c}});
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Downloadify: Client Side File Creation
|
2
|
+
JavaScript + Flash Library
|
3
|
+
|
4
|
+
Copyright (c) 2009 Douglas C. Neiner
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
8
|
+
in the Software without restriction, including without limitation the rights
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
11
|
+
furnished to do so, subject to the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
14
|
+
all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
THE SOFTWARE.
|
@@ -0,0 +1,89 @@
|
|
1
|
+
h2. Downloadify: Client Side File Creation
|
2
|
+
|
3
|
+
*_Important! The swf has been compiled for online use only. Testing from the file path (i.e. file:// ) will not work as it will violate the security sandbox._*
|
4
|
+
|
5
|
+
h3. Overview
|
6
|
+
|
7
|
+
This library is a tiny JavaScript + Flash library that allows you to generate text files on the fly, in the browser, without server interaction. Web applications that allow you to generate vCards, color palettes, custom code, etc would benefit from using this library. In addition to increasing speed (no round trip to the server) this solution can reduce the database and server load of existing web applications. _This is not a library to 'force download' a file from a server. It does not interact with a server at all._
|
8
|
+
|
9
|
+
h3. Demo
|
10
|
+
|
11
|
+
A "very simple demo is available":http://pixelgraphics.us/downloadify/test.html that lets you supply your own content and filename and test out saving, canceling, and the error functionality when the file is blank.
|
12
|
+
|
13
|
+
For a real world usage, see "Starter for jQuery":http://starter.pixelgraphics.us . To quickly demo the usage, just click "Load Example Data" then click Download. After the initial page load, no further contact is made with the server. Everything happens on the client side.
|
14
|
+
|
15
|
+
h3. Download
|
16
|
+
|
17
|
+
Please download from the "Downloads":http://github.com/dcneiner/Downloadify/downloads section of this project.
|
18
|
+
|
19
|
+
h3. Support
|
20
|
+
|
21
|
+
For support, please use the "Issues":http://github.com/dcneiner/Downloadify/issues section of this project. You can also try to hit me up on "Twitter at @dougneiner":http://twitter.com/dougneiner but I might just ask you to file an issue. :)
|
22
|
+
|
23
|
+
h3. Dependencies
|
24
|
+
|
25
|
+
_The end user must have Flash 10 or higher installed for this plugin to work. As of September 2009, it was at a 93% saturation, so most users should already have it installed._
|
26
|
+
|
27
|
+
Downloadify is only dependent on "SWFObject 2.0":http://code.google.com/p/swfobject/ which is included with the download. It is compatible with any JavaScript framework but has a special <tt>$().downloadify()</tt> plugin for use with jQuery if jQuery is present when the library is loaded.
|
28
|
+
|
29
|
+
h3. Usage
|
30
|
+
|
31
|
+
*Any JavaScript framework*:
|
32
|
+
|
33
|
+
Downloadify.create( id_or_DOM_element, options );
|
34
|
+
|
35
|
+
*jQuery*:
|
36
|
+
|
37
|
+
$("#element").downloadify( options );
|
38
|
+
|
39
|
+
h3. Options
|
40
|
+
|
41
|
+
Unless you are using the jQuery plugin included with Downloadify, you must supply all required options with your call to the <tt>Downloadify.create</tt> function.
|
42
|
+
|
43
|
+
*Defaults and Required Options*
|
44
|
+
|
45
|
+
* <tt>swf</tt>: <tt>'media/downloadify.swf'</tt> <span style="color:red">*Required*</span> <br />_Path to the SWF File. Can be relative from the page, or an absolute path._
|
46
|
+
* <tt>downloadImage</tt>: <tt>'images/download.png'</tt> <span style="color:red">*Required*</span> <br />_Path to the Button Image. Can be relative from the page or an absolute path._
|
47
|
+
* <tt>width</tt>: 175 <span style="color:red">*Required*</span> <br />_Width of the button (and the flash movie)_
|
48
|
+
* <tt>height</tt>: 55 <span style="color:red">*Required*</span> <br />_Height of the button. This will be 1/4 the height of the image._
|
49
|
+
* <tt>filename</tt>: <span style="color:red">*Required*</span><br /> _Can be a String or a function callback. If a function, the return value of the function will be used as the filename._
|
50
|
+
* <tt>data</tt>: <span style="color:red">*Required*</span><br /> _Can be a String or a function callback. If a function, the return value of the function will be used as the file data._
|
51
|
+
* <tt>transparent</tt>: false <br />_Set this to true to use wmode=transparent on the flash movie._
|
52
|
+
* <tt>append</tt>: false <br />_By default the contents of the targeted DOM element are removed. Set this to true to keep the contents and append the button._
|
53
|
+
|
54
|
+
*Event Callbacks*
|
55
|
+
|
56
|
+
No data is passed into these functions, they are simply called.
|
57
|
+
|
58
|
+
* <tt>onError</tt>: _Called when the Download button is clicked but your <tt>data</tt> callback returns <tt>""</tt>._
|
59
|
+
* <tt>onCancel</tt>: _Called when the Download button is clicked but the user then cancels without saving._
|
60
|
+
* <tt>onComplete</tt>: _Called when the Download button is clicked and the file is saved to the user's computer._
|
61
|
+
|
62
|
+
h3. Setting Up the Image
|
63
|
+
|
64
|
+
Downloadify supports (i.e. requires) three button states with limited support for a fourth. The states are:
|
65
|
+
|
66
|
+
* *Normal*
|
67
|
+
* *Over* ( When the mouse hovers over the button )
|
68
|
+
* *Down* ( When the button is pressed )
|
69
|
+
* *Disabled* ( Limited support, when .disable() is called on the Downloadify.Container object )
|
70
|
+
|
71
|
+
In trying to keep this plugin as simple as possible, all four states are always assumed to be present. You should prepare your button image as a single image the width you want your button, and four times the height of the button. All four states should then live in that one image in the same order as the previous list from top to bottom.
|
72
|
+
|
73
|
+
h3. Potential Issues
|
74
|
+
|
75
|
+
When working with different button images, you may find Flash has cached your image. This is the desired behavior on a live site, but not during development. To get around this, simply supply a ?rev=1 or ?rev=2 etc on the end of your downloadImage url.
|
76
|
+
|
77
|
+
h3. Compiling Notes
|
78
|
+
|
79
|
+
I develop locally using Xcode and the Flex 4 SDK Beta 2. Please do not submit request on how to setup a local testing environment. If you are interested in my Xcode project files, send me a message.
|
80
|
+
|
81
|
+
h3. License: MIT
|
82
|
+
|
83
|
+
Copyright (c) 2009 Douglas C. Neiner
|
84
|
+
|
85
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
86
|
+
|
87
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
88
|
+
|
89
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,6 @@
|
|
1
|
+
(function(){Downloadify=window.Downloadify={queue:{},uid:(new Date).getTime(),getTextForSave:function(b){if(b=Downloadify.queue[b])return b.getData();return""},getFileNameForSave:function(b){if(b=Downloadify.queue[b])return b.getFilename();return""},saveComplete:function(b){(b=Downloadify.queue[b])&&b.complete();return true},saveCancel:function(b){(b=Downloadify.queue[b])&&b.cancel();return true},saveError:function(b){(b=Downloadify.queue[b])&&b.error();return true},addToQueue:function(b){Downloadify.queue[b.queue_name]=
|
2
|
+
b},getUID:function(b){if(b.id=="")b.id="downloadify_"+Downloadify.uid++;return b.id}};Downloadify.create=function(b,c){b=typeof b=="string"?document.getElementById(b):b;return new Downloadify.Container(b,c)};Downloadify.Container=function(b,c){function d(){a.options=c;if(!a.options.append)a.el.innerHTML="";a.flashContainer=document.createElement("span");a.el.appendChild(a.flashContainer);a.queue_name=Downloadify.getUID(a.flashContainer);if(typeof a.options.filename==="function")a.filenameCallback=
|
3
|
+
a.options.filename;else if(a.options.filename)a.filename=a.options.filename;if(typeof a.options.data==="function")a.dataCallback=a.options.data;else if(a.options.data)a.data=a.options.data;var e={queue_name:a.queue_name,width:a.options.width,height:a.options.height},f={allowScriptAccess:"always"},g={id:a.flashContainer.id,name:a.flashContainer.id};if(a.options.enabled===false)a.enabled=false;if(a.options.transparent===true)f.wmode="transparent";if(a.options.downloadImage)e.downloadImage=a.options.downloadImage;
|
4
|
+
swfobject.embedSWF(a.options.swf,a.flashContainer.id,a.options.width,a.options.height,"10",null,e,f,g);Downloadify.addToQueue(a)}var a=this;a.el=b;a.enabled=true;a.dataCallback=null;a.filenameCallback=null;a.data=null;a.filename=null;a.enable=function(){document.getElementById(a.flashContainer.id).setEnabled(true);a.enabled=true};a.disable=function(){document.getElementById(a.flashContainer.id).setEnabled(false);a.enabled=false};a.getData=function(){if(!a.enabled)return"";return a.dataCallback?a.dataCallback():
|
5
|
+
a.data?a.data:""};a.getFilename=function(){return a.filenameCallback?a.filenameCallback():a.filename?a.filename:""};a.complete=function(){typeof a.options.onComplete==="function"&&a.options.onComplete()};a.cancel=function(){typeof a.options.onCancel==="function"&&a.options.onCancel()};a.error=function(){typeof a.options.onError==="function"&&a.options.onError()};d()};Downloadify.defaultOptions={swf:"media/downloadify.swf",downloadImage:"images/download.png",width:100,height:30,transparent:true,append:false}})();
|
6
|
+
typeof jQuery!="undefined"&&function(b){b.fn.downloadify=function(c){return this.each(function(){c=b.extend({},Downloadify.defaultOptions,c);var d=Downloadify.create(this,c);b(this).data("Downloadify",d)})}}(jQuery);
|
@@ -0,0 +1,18 @@
|
|
1
|
+
var swfobject=function(){function W(){if(A.readyState=="complete"){A.parentNode.removeChild(A);D()}}function D(){if(!E){if(e.ie&&e.win){var a=q("span");try{var b=h.getElementsByTagName("body")[0].appendChild(a);b.parentNode.removeChild(b)}catch(c){return}}E=true;if(F){clearInterval(F);F=null}a=G.length;for(b=0;b<a;b++)G[b]()}}function H(a){if(E)a();else G[G.length]=a}function P(a){if(typeof m.addEventListener!=l)m.addEventListener("load",a,false);else if(typeof h.addEventListener!=l)h.addEventListener("load",
|
2
|
+
a,false);else if(typeof m.attachEvent!=l)I(m,"onload",a);else if(typeof m.onload=="function"){var b=m.onload;m.onload=function(){b();a()}}else m.onload=a}function X(){for(var a=r.length,b=0;b<a;b++){var c=r[b].id;if(e.pv[0]>0){var d=n(c);if(d){r[b].width=d.getAttribute("width")?d.getAttribute("width"):"0";r[b].height=d.getAttribute("height")?d.getAttribute("height"):"0";if(B(r[b].swfVersion)){e.webkit&&e.webkit<312&&Y(d);u(c,true)}else r[b].expressInstall&&!v&&B("6.0.65")&&(e.win||e.mac)?Q(r[b]):
|
3
|
+
Z(d)}}else u(c,true)}}function Y(a){var b=a.getElementsByTagName(s)[0];if(b){var c=q("embed"),d=b.attributes;if(d)for(var f=d.length,i=0;i<f;i++)d[i].nodeName=="DATA"?c.setAttribute("src",d[i].nodeValue):c.setAttribute(d[i].nodeName,d[i].nodeValue);if(b=b.childNodes){d=b.length;for(f=0;f<d;f++)b[f].nodeType==1&&b[f].nodeName=="PARAM"&&c.setAttribute(b[f].getAttribute("name"),b[f].getAttribute("value"))}a.parentNode.replaceChild(c,a)}}function Q(a){v=true;var b=n(a.id);if(b){if(a.altContentId){var c=
|
4
|
+
n(a.altContentId);if(c){w=c;J=a.altContentId}}else w=N(b);if(!/%$/.test(a.width)&&parseInt(a.width,10)<310)a.width="310";if(!/%$/.test(a.height)&&parseInt(a.height,10)<137)a.height="137";h.title=h.title.slice(0,47)+" - Flash Player Installation";c="MMredirectURL="+m.location+"&MMplayerType="+(e.ie&&e.win?"ActiveX":"PlugIn")+"&MMdoctitle="+h.title;var d=a.id;if(e.ie&&e.win&&b.readyState!=4){var f=q("div");d+="SWFObjectNew";f.setAttribute("id",d);b.parentNode.insertBefore(f,b);b.style.display="none";
|
5
|
+
I(m,"onload",function(){b.parentNode.removeChild(b)})}O({data:a.expressInstall,id:R,width:a.width,height:a.height},{flashvars:c},d)}}function Z(a){if(e.ie&&e.win&&a.readyState!=4){var b=q("div");a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(N(a),b);a.style.display="none";I(m,"onload",function(){a.parentNode.removeChild(a)})}else a.parentNode.replaceChild(N(a),a)}function N(a){var b=q("div");if(e.win&&e.ie)b.innerHTML=a.innerHTML;else if(a=a.getElementsByTagName(s)[0])if(a=a.childNodes)for(var c=
|
6
|
+
a.length,d=0;d<c;d++)!(a[d].nodeType==1&&a[d].nodeName=="PARAM")&&a[d].nodeType!=8&&b.appendChild(a[d].cloneNode(true));return b}function O(a,b,c){var d,f=n(c);if(f){if(typeof a.id==l)a.id=c;if(e.ie&&e.win){var i="";for(var j in a)if(a[j]!=Object.prototype[j])if(j.toLowerCase()=="data")b.movie=a[j];else if(j.toLowerCase()=="styleclass")i+=' class="'+a[j]+'"';else if(j.toLowerCase()!="classid")i+=" "+j+'="'+a[j]+'"';j="";for(var g in b)if(b[g]!=Object.prototype[g])j+='<param name="'+g+'" value="'+
|
7
|
+
b[g]+'" />';f.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+i+">"+j+"</object>";K[K.length]=a.id;d=n(a.id)}else if(e.webkit&&e.webkit<312){g=q("embed");g.setAttribute("type",L);for(i in a)if(a[i]!=Object.prototype[i])if(i.toLowerCase()=="data")g.setAttribute("src",a[i]);else if(i.toLowerCase()=="styleclass")g.setAttribute("class",a[i]);else i.toLowerCase()!="classid"&&g.setAttribute(i,a[i]);for(var o in b)b[o]!=Object.prototype[o]&&o.toLowerCase()!="movie"&&g.setAttribute(o,
|
8
|
+
b[o]);f.parentNode.replaceChild(g,f);d=g}else{g=q(s);g.setAttribute("type",L);for(var k in a)if(a[k]!=Object.prototype[k])if(k.toLowerCase()=="styleclass")g.setAttribute("class",a[k]);else k.toLowerCase()!="classid"&&g.setAttribute(k,a[k]);for(var p in b)b[p]!=Object.prototype[p]&&p.toLowerCase()!="movie"&&$(g,p,b[p]);f.parentNode.replaceChild(g,f);d=g}}return d}function $(a,b,c){var d=q("param");d.setAttribute("name",b);d.setAttribute("value",c);a.appendChild(d)}function S(a){var b=n(a);if(b&&(b.nodeName==
|
9
|
+
"OBJECT"||b.nodeName=="EMBED"))if(e.ie&&e.win)b.readyState==4?T(a):m.attachEvent("onload",function(){T(a)});else b.parentNode.removeChild(b)}function T(a){if(a=n(a)){for(var b in a)if(typeof a[b]=="function")a[b]=null;a.parentNode.removeChild(a)}}function n(a){var b=null;try{b=h.getElementById(a)}catch(c){}return b}function q(a){return h.createElement(a)}function I(a,b,c){a.attachEvent(b,c);x[x.length]=[a,b,c]}function B(a){var b=e.pv;a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||
|
10
|
+
0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?true:false}function U(a,b){if(!(e.ie&&e.mac)){var c=h.getElementsByTagName("head")[0],d=q("style");d.setAttribute("type","text/css");d.setAttribute("media","screen");!(e.ie&&e.win)&&typeof h.createTextNode!=l&&d.appendChild(h.createTextNode(a+" {"+b+"}"));c.appendChild(d);if(e.ie&&e.win&&typeof h.styleSheets!=l&&h.styleSheets.length>0){c=h.styleSheets[h.styleSheets.length-1];typeof c.addRule==s&&
|
11
|
+
c.addRule(a,b)}}}function u(a,b){b=b?"visible":"hidden";if(E&&n(a))n(a).style.visibility=b;else U("#"+a,"visibility:"+b)}function V(a){return/[\\\"<>\.;]/.exec(a)!=null?encodeURIComponent(a):a}var l="undefined",s="object",L="application/x-shockwave-flash",R="SWFObjectExprInst",m=window,h=document,t=navigator,G=[],r=[],K=[],x=[],A,F=null,w=null,J=null,E=false,v=false,e=function(){var a=typeof h.getElementById!=l&&typeof h.getElementsByTagName!=l&&typeof h.createElement!=l,b=[0,0,0],c=null;if(typeof t.plugins!=
|
12
|
+
l&&typeof t.plugins["Shockwave Flash"]==s){if((c=t.plugins["Shockwave Flash"].description)&&!(typeof t.mimeTypes!=l&&t.mimeTypes[L]&&!t.mimeTypes[L].enabledPlugin)){c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1");b[0]=parseInt(c.replace(/^(.*)\..*$/,"$1"),10);b[1]=parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10);b[2]=/r/.test(c)?parseInt(c.replace(/^.*r(.*)$/,"$1"),10):0}}else if(typeof m.ActiveXObject!=l){var d=null,f=false;try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(i){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
|
13
|
+
b=[6,0,21];d.AllowScriptAccess="always"}catch(j){if(b[0]==6)f=true}if(!f)try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(g){}}if(!f&&d)try{if(c=d.GetVariable("$version")){c=c.split(" ")[1].split(",");b=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]}}catch(o){}}f=t.userAgent.toLowerCase();var k=t.platform.toLowerCase();c=/webkit/.test(f)?parseFloat(f.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;d=k?/win/.test(k):/win/.test(f);f=k?/mac/.test(k):/mac/.test(f);return{w3cdom:a,
|
14
|
+
pv:b,webkit:c,ie:false,win:d,mac:f}}();(function(){if(e.w3cdom){H(X);if(e.ie&&e.win)try{h.write("<script id=__ie_ondomload defer=true src=//:><\/script>");(A=n("__ie_ondomload"))&&I(A,"onreadystatechange",W)}catch(a){}if(e.webkit&&typeof h.readyState!=l)F=setInterval(function(){/loaded|complete/.test(h.readyState)&&D()},10);typeof h.addEventListener!=l&&h.addEventListener("DOMContentLoaded",D,null);P(D)}})();(function(){e.ie&&e.win&&window.attachEvent("onunload",function(){for(var a=x.length,b=0;b<
|
15
|
+
a;b++)x[b][0].detachEvent(x[b][1],x[b][2]);a=K.length;for(b=0;b<a;b++)S(K[b]);for(var c in e)e[c]=null;e=null;for(var d in swfobject)swfobject[d]=null;swfobject=null})})();return{registerObject:function(a,b,c){if(!(!e.w3cdom||!a||!b)){var d={};d.id=a;d.swfVersion=b;d.expressInstall=c?c:false;r[r.length]=d;u(a,false)}},getObjectById:function(a){var b=null;if(e.w3cdom)if(a=n(a)){var c=a.getElementsByTagName(s)[0];if(!c||c&&typeof a.SetVariable!=l)b=a;else if(typeof c.SetVariable!=l)b=c}return b},embedSWF:function(a,
|
16
|
+
b,c,d,f,i,j,g,o){if(!(!e.w3cdom||!a||!b||!c||!d||!f)){c+="";d+="";if(B(f)){u(b,false);var k={};if(o&&typeof o===s)for(var p in o)if(o[p]!=Object.prototype[p])k[p]=o[p];k.data=a;k.width=c;k.height=d;var C={};if(g&&typeof g===s)for(var M in g)if(g[M]!=Object.prototype[M])C[M]=g[M];if(j&&typeof j===s)for(var y in j)if(j[y]!=Object.prototype[y])if(typeof C.flashvars!=l)C.flashvars+="&"+y+"="+j[y];else C.flashvars=y+"="+j[y];H(function(){O(k,C,b);k.id==b&&u(b,true)})}else if(i&&!v&&B("6.0.65")&&(e.win||
|
17
|
+
e.mac)){v=true;u(b,false);H(function(){var z={};z.id=z.altContentId=b;z.width=c;z.height=d;z.expressInstall=i;Q(z)})}}},getFlashPlayerVersion:function(){return{major:e.pv[0],minor:e.pv[1],release:e.pv[2]}},hasFlashPlayerVersion:B,createSWF:function(a,b,c){if(e.w3cdom)return O(a,b,c)},removeSWF:function(a){e.w3cdom&&S(a)},createCSS:function(a,b){e.w3cdom&&U(a,b)},addDomLoadEvent:H,addLoadEvent:P,getQueryParamValue:function(a){var b=h.location.search||h.location.hash;if(a==null)return V(b);if(b){b=
|
18
|
+
b.substring(1).split("&");for(var c=0;c<b.length;c++)if(b[c].substring(0,b[c].indexOf("="))==a)return V(b[c].substring(b[c].indexOf("=")+1))}return""},expressInstallCallback:function(){if(v&&w){var a=n(R);if(a){a.parentNode.replaceChild(w,a);if(J){u(J,true);if(e.ie&&e.win)w.style.display="block"}J=w=null;v=false}}}}}();
|
Binary file
|
@@ -0,0 +1,162 @@
|
|
1
|
+
/*
|
2
|
+
Downloadify: Client Side File Creation
|
3
|
+
JavaScript + Flash Library
|
4
|
+
|
5
|
+
Copyright (c) 2009 Douglas C. Neiner
|
6
|
+
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
9
|
+
in the Software without restriction, including without limitation the rights
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
12
|
+
furnished to do so, subject to the following conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be included in
|
15
|
+
all copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
THE SOFTWARE.
|
24
|
+
*/
|
25
|
+
package {
|
26
|
+
import flash.system.Security;
|
27
|
+
import flash.events.Event;
|
28
|
+
import flash.events.MouseEvent;
|
29
|
+
import flash.net.FileReference;
|
30
|
+
import flash.net.FileFilter;
|
31
|
+
import flash.net.URLRequest;
|
32
|
+
import flash.display.*;
|
33
|
+
import flash.external.ExternalInterface;
|
34
|
+
|
35
|
+
[SWF(backgroundColor="#CCCCCC")]
|
36
|
+
[SWF(backgroundAlpha=0)]
|
37
|
+
public class Downloadify extends Sprite {
|
38
|
+
|
39
|
+
private var options:Object;
|
40
|
+
private var file:FileReference = new FileReference();
|
41
|
+
private var queue_name:String = "";
|
42
|
+
|
43
|
+
private var _width:Number = 0;
|
44
|
+
private var _height:Number = 0;
|
45
|
+
|
46
|
+
private var enabled:Boolean = true;
|
47
|
+
private var over:Boolean = false;
|
48
|
+
private var down:Boolean = false;
|
49
|
+
|
50
|
+
private var buttonImage:String = "images/download.png";
|
51
|
+
|
52
|
+
private var button:Loader;
|
53
|
+
|
54
|
+
public function Downloadify() {
|
55
|
+
Security.allowDomain('*');
|
56
|
+
|
57
|
+
stage.align = StageAlign.TOP_LEFT;
|
58
|
+
stage.scaleMode = StageScaleMode.NO_SCALE;
|
59
|
+
|
60
|
+
options = this.root.loaderInfo.parameters;
|
61
|
+
|
62
|
+
queue_name = options.queue_name.toString();
|
63
|
+
|
64
|
+
_width = options.width;
|
65
|
+
_height = options.height;
|
66
|
+
|
67
|
+
if(options.downloadImage){
|
68
|
+
buttonImage = options.downloadImage;
|
69
|
+
}
|
70
|
+
|
71
|
+
setupDefaultButton();
|
72
|
+
addChild(button);
|
73
|
+
|
74
|
+
this.buttonMode = true;
|
75
|
+
|
76
|
+
this.addEventListener(MouseEvent.CLICK, onMouseClickEvent);
|
77
|
+
this.addEventListener(MouseEvent.ROLL_OVER , onMouseEnter);
|
78
|
+
this.addEventListener(MouseEvent.ROLL_OUT , onMouseLeave);
|
79
|
+
this.addEventListener(MouseEvent.MOUSE_DOWN , onMouseDown);
|
80
|
+
this.addEventListener(MouseEvent.MOUSE_UP , onMouseUp);
|
81
|
+
|
82
|
+
ExternalInterface.addCallback('setEnabled', setEnabled);
|
83
|
+
|
84
|
+
file.addEventListener(Event.COMPLETE, onSaveComplete);
|
85
|
+
file.addEventListener(Event.CANCEL, onSaveCancel);
|
86
|
+
}
|
87
|
+
|
88
|
+
private function setEnabled(isEnabled:Boolean):Boolean {
|
89
|
+
enabled = isEnabled;
|
90
|
+
if(enabled === true){
|
91
|
+
button.y = 0;
|
92
|
+
this.buttonMode = true;
|
93
|
+
} else {
|
94
|
+
button.y = (-3 * _height);
|
95
|
+
this.buttonMode = false;
|
96
|
+
}
|
97
|
+
return enabled;
|
98
|
+
}
|
99
|
+
|
100
|
+
private function setupDefaultButton():void {
|
101
|
+
button = new Loader();
|
102
|
+
var urlReq:URLRequest = new URLRequest(buttonImage);
|
103
|
+
button.load(urlReq);
|
104
|
+
button.x = 0;
|
105
|
+
button.y = 0;
|
106
|
+
}
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
protected function onMouseEnter(event:Event):void {
|
111
|
+
if(enabled === true){
|
112
|
+
if(down === false) button.y = (-1 * _height);
|
113
|
+
over = true;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
protected function onMouseLeave(event:Event):void {
|
117
|
+
if(enabled === true){
|
118
|
+
if(down === false) button.y = 0;
|
119
|
+
over = false;
|
120
|
+
}
|
121
|
+
}
|
122
|
+
protected function onMouseDown(event:Event):void {
|
123
|
+
if(enabled === true){
|
124
|
+
button.y = button.y = (-2 * _height);
|
125
|
+
down = true;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
protected function onMouseUp(event:Event):void {
|
129
|
+
if(enabled === true){
|
130
|
+
if(over === false){
|
131
|
+
button.y = 0;
|
132
|
+
} else {
|
133
|
+
button.y = (-1 * _height);
|
134
|
+
}
|
135
|
+
down = false;
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
139
|
+
protected function onMouseClickEvent(event:Event):void{
|
140
|
+
var data:String = ExternalInterface.call('Downloadify.getTextForSave',queue_name);
|
141
|
+
var filename:String = ExternalInterface.call('Downloadify.getFileNameForSave',queue_name);
|
142
|
+
if (data !== "") {
|
143
|
+
file.save(data, filename);
|
144
|
+
} else {
|
145
|
+
onSaveError();
|
146
|
+
}
|
147
|
+
}
|
148
|
+
|
149
|
+
protected function onSaveComplete(event:Event):void{
|
150
|
+
ExternalInterface.call('Downloadify.saveComplete',queue_name);
|
151
|
+
}
|
152
|
+
|
153
|
+
protected function onSaveCancel(event:Event):void{
|
154
|
+
ExternalInterface.call('Downloadify.saveCancel',queue_name);
|
155
|
+
}
|
156
|
+
|
157
|
+
protected function onSaveError():void{
|
158
|
+
ExternalInterface.call('Downloadify.saveError',queue_name);
|
159
|
+
}
|
160
|
+
|
161
|
+
}
|
162
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
(function(){Downloadify=window.Downloadify={queue:{},uid:(new Date).getTime(),getTextForSave:function(b){if(b=Downloadify.queue[b])return b.getData();return""},getFileNameForSave:function(b){if(b=Downloadify.queue[b])return b.getFilename();return""},saveComplete:function(b){(b=Downloadify.queue[b])&&b.complete();return true},saveCancel:function(b){(b=Downloadify.queue[b])&&b.cancel();return true},saveError:function(b){(b=Downloadify.queue[b])&&b.error();return true},addToQueue:function(b){Downloadify.queue[b.queue_name]=
|
2
|
+
b},getUID:function(b){if(b.id=="")b.id="downloadify_"+Downloadify.uid++;return b.id}};Downloadify.create=function(b,c){b=typeof b=="string"?document.getElementById(b):b;return new Downloadify.Container(b,c)};Downloadify.Container=function(b,c){var a=this;a.el=b;a.enabled=true;a.dataCallback=null;a.filenameCallback=null;a.data=null;a.filename=null;a.enable=function(){document.getElementById(a.flashContainer.id).setEnabled(true);a.enabled=true};a.disable=function(){document.getElementById(a.flashContainer.id).setEnabled(false);
|
3
|
+
a.enabled=false};a.getData=function(){if(!a.enabled)return"";return a.dataCallback?a.dataCallback():a.data?a.data:""};a.getFilename=function(){return a.filenameCallback?a.filenameCallback():a.filename?a.filename:""};a.complete=function(){typeof a.options.onComplete==="function"&&a.options.onComplete()};a.cancel=function(){typeof a.options.onCancel==="function"&&a.options.onCancel()};a.error=function(){typeof a.options.onError==="function"&&a.options.onError()};(function(){a.options=c;if(!a.options.append)a.el.innerHTML=
|
4
|
+
"";a.flashContainer=document.createElement("span");a.el.appendChild(a.flashContainer);a.queue_name=Downloadify.getUID(a.flashContainer);if(typeof a.options.filename==="function")a.filenameCallback=a.options.filename;else if(a.options.filename)a.filename=a.options.filename;if(typeof a.options.data==="function")a.dataCallback=a.options.data;else if(a.options.data)a.data=a.options.data;var d={queue_name:a.queue_name,width:a.options.width,height:a.options.height},e={allowScriptAccess:"always"},f={id:a.flashContainer.id,
|
5
|
+
name:a.flashContainer.id};if(a.options.enabled===false)a.enabled=false;if(a.options.transparent===true)e.wmode="transparent";if(a.options.downloadImage)d.downloadImage=a.options.downloadImage;swfobject.embedSWF(a.options.swf,a.flashContainer.id,a.options.width,a.options.height,"10",null,d,e,f);Downloadify.addToQueue(a)})()};Downloadify.defaultOptions={swf:"media/downloadify.swf",downloadImage:"images/download.png",width:100,height:30,transparent:true,append:false}})();
|
6
|
+
typeof jQuery!="undefined"&&function(b){b.fn.downloadify=function(c){return this.each(function(){c=b.extend({},Downloadify.defaultOptions,c);var a=Downloadify.create(this,c);b(this).data("Downloadify",a)})}}(jQuery);
|
@@ -0,0 +1,21 @@
|
|
1
|
+
document.createElement("canvas").getContext||function(){function K(){return this.context_||(this.context_=new z(this))}function L(a,b){var c=D.call(arguments,2);return function(){return a.apply(b,c.concat(D.call(arguments)))}}function M(a){var b=a.srcElement;switch(a.propertyName){case "width":b.style.width=b.attributes.width.nodeValue+"px";b.getContext().clearRect();break;case "height":b.style.height=b.attributes.height.nodeValue+"px";b.getContext().clearRect();break}}function N(a){a=a.srcElement;
|
2
|
+
if(a.firstChild){a.firstChild.style.width=a.clientWidth+"px";a.firstChild.style.height=a.clientHeight+"px"}}function A(){return[[1,0,0],[0,1,0],[0,0,1]]}function s(a,b){for(var c=A(),d=0;d<3;d++)for(var e=0;e<3;e++){for(var h=0,g=0;g<3;g++)h+=a[d][g]*b[g][e];c[d][e]=h}return c}function E(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=a.shadowOffsetX;b.shadowOffsetY=
|
3
|
+
a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.globalAlpha=a.globalAlpha;b.arcScaleX_=a.arcScaleX_;b.arcScaleY_=a.arcScaleY_;b.lineScale_=a.lineScale_}function F(a){var b,c=1;a=String(a);if(a.substring(0,3)=="rgb"){b=a.indexOf("(",3);var d=a.indexOf(")",b+1);d=a.substring(b+1,d).split(",");b="#";for(var e=0;e<3;e++)b+=G[Number(d[e])];if(d.length==4&&a.substr(3,1)=="a")c=d[3]}else b=a;return{color:b,alpha:c}}function O(a){switch(a){case "butt":return"flat";case "round":return"round";case "square":default:return"square"}}
|
4
|
+
function z(a){this.m_=A();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=k*1;this.globalAlpha=1;this.canvas=a;var b=a.ownerDocument.createElement("div");b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px";b.style.overflow="hidden";b.style.position="absolute";a.appendChild(b);this.element_=b;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}function H(a,b,c,d){a.currentPath_.push({type:"bezierCurveTo",
|
5
|
+
cp1x:b.x,cp1y:b.y,cp2x:c.x,cp2y:c.y,x:d.x,y:d.y});a.currentX_=d.x;a.currentY_=d.y}function P(a){for(var b=0;b<3;b++)for(var c=0;c<2;c++)if(!isFinite(a[b][c])||isNaN(a[b][c]))return false;return true}function t(a,b,c){if(P(b)){a.m_=b;if(c)a.lineScale_=Q(R(b[0][0]*b[1][1]-b[0][1]*b[1][0]))}}function w(a){this.type_=a;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}function I(){}var n=Math,j=n.round,B=n.sin,C=n.cos,R=n.abs,Q=n.sqrt,k=10,r=k/2,D=Array.prototype.slice,J={init:function(a){if(/MSIE/.test(navigator.userAgent)&&
|
6
|
+
!window.opera){a=a||document;a.createElement("canvas");a.attachEvent("onreadystatechange",L(this.init_,this,a))}},init_:function(a){a.namespaces.g_vml_||a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");a.namespaces.g_o_||a.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!a.styleSheets.ex_canvas_){var b=a.createStyleSheet();b.owningElement.id="ex_canvas_";b.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}a=
|
7
|
+
a.getElementsByTagName("canvas");for(b=0;b<a.length;b++)this.initElement(a[b])},initElement:function(a){if(!a.getContext){a.getContext=K;a.innerHTML="";a.attachEvent("onpropertychange",M);a.attachEvent("onresize",N);var b=a.attributes;if(b.width&&b.width.specified)a.style.width=b.width.nodeValue+"px";else a.width=a.clientWidth;if(b.height&&b.height.specified)a.style.height=b.height.nodeValue+"px";else a.height=a.clientHeight}return a}};J.init();for(var G=[],i=0;i<16;i++)for(var x=0;x<16;x++)G[i*16+
|
8
|
+
x]=i.toString(16)+x.toString(16);i=z.prototype;i.clearRect=function(){this.element_.innerHTML=""};i.beginPath=function(){this.currentPath_=[]};i.moveTo=function(a,b){a=this.getCoords_(a,b);this.currentPath_.push({type:"moveTo",x:a.x,y:a.y});this.currentX_=a.x;this.currentY_=a.y};i.lineTo=function(a,b){a=this.getCoords_(a,b);this.currentPath_.push({type:"lineTo",x:a.x,y:a.y});this.currentX_=a.x;this.currentY_=a.y};i.bezierCurveTo=function(a,b,c,d,e,h){e=this.getCoords_(e,h);a=this.getCoords_(a,b);
|
9
|
+
c=this.getCoords_(c,d);H(this,a,c,e)};i.quadraticCurveTo=function(a,b,c,d){a=this.getCoords_(a,b);c=this.getCoords_(c,d);d={x:this.currentX_+2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)};H(this,d,{x:d.x+(c.x-this.currentX_)/3,y:d.y+(c.y-this.currentY_)/3},c)};i.arc=function(a,b,c,d,e,h){c*=k;var g=h?"at":"wa",f=a+C(d)*c-r,l=b+B(d)*c-r;d=a+C(e)*c-r;e=b+B(e)*c-r;if(f==d&&!h)f+=0.125;a=this.getCoords_(a,b);f=this.getCoords_(f,l);d=this.getCoords_(d,e);this.currentPath_.push({type:g,
|
10
|
+
x:a.x,y:a.y,radius:c,xStart:f.x,yStart:f.y,xEnd:d.x,yEnd:d.y})};i.rect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath()};i.strokeRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.stroke();this.currentPath_=e};i.fillRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+
|
11
|
+
c,b+d);this.lineTo(a,b+d);this.closePath();this.fill();this.currentPath_=e};i.createLinearGradient=function(a,b,c,d){var e=new w("gradient");e.x0_=a;e.y0_=b;e.x1_=c;e.y1_=d;return e};i.createRadialGradient=function(a,b,c,d,e,h){var g=new w("gradientradial");g.x0_=a;g.y0_=b;g.r0_=c;g.x1_=d;g.y1_=e;g.r1_=h;return g};i.drawImage=function(a){var b,c,d,e,h,g,f,l;d=a.runtimeStyle.width;e=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var o=a.width,p=a.height;a.runtimeStyle.width=
|
12
|
+
d;a.runtimeStyle.height=e;if(arguments.length==3){b=arguments[1];c=arguments[2];h=g=0;f=d=o;l=e=p}else if(arguments.length==5){b=arguments[1];c=arguments[2];d=arguments[3];e=arguments[4];h=g=0;f=o;l=p}else if(arguments.length==9){h=arguments[1];g=arguments[2];f=arguments[3];l=arguments[4];b=arguments[5];c=arguments[6];d=arguments[7];e=arguments[8]}else throw Error("Invalid number of arguments");var m=this.getCoords_(b,c),q=[];q.push(" <g_vml_:group",' coordsize="',k*10,",",k*10,'"',' coordorigin="0,0"',
|
13
|
+
' style="width:',10,"px;height:",10,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var u=[];u.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",j(m.x/k),",","Dy=",j(m.y/k),"");var v=this.getCoords_(b+d,c),y=this.getCoords_(b,c+e);b=this.getCoords_(b+d,c+e);m.x=n.max(m.x,v.x,y.x,b.x);m.y=n.max(m.y,v.y,y.y,b.y);q.push("padding:0 ",j(m.x/k),"px ",j(m.y/k),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",u.join(""),", sizingmethod='clip');")}else q.push("top:",
|
14
|
+
j(m.y/k),"px;left:",j(m.x/k),"px;");q.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',k*d,"px;"," height:",k*e,'px;"',' cropleft="',h/o,'"',' croptop="',g/p,'"',' cropright="',(o-h-f)/o,'"',' cropbottom="',(p-g-l)/p,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",q.join(""))};i.stroke=function(a){var b=[],c=F(a?this.fillStyle:this.strokeStyle),d=c.color;c=c.alpha*this.globalAlpha;b.push("<g_vml_:shape",' filled="',!!a,'"',' style="position:absolute;width:',10,
|
15
|
+
"px;height:",10,'px;"',' coordorigin="0 0" coordsize="',k*10," ",k*10,'"',' stroked="',!a,'"',' path="');for(var e={x:null,y:null},h={x:null,y:null},g=0;g<this.currentPath_.length;g++){var f=this.currentPath_[g];switch(f.type){case "moveTo":b.push(" m ",j(f.x),",",j(f.y));break;case "lineTo":b.push(" l ",j(f.x),",",j(f.y));break;case "close":b.push(" x ");f=null;break;case "bezierCurveTo":b.push(" c ",j(f.cp1x),",",j(f.cp1y),",",j(f.cp2x),",",j(f.cp2y),",",j(f.x),",",j(f.y));break;case "at":case "wa":b.push(" ",
|
16
|
+
f.type," ",j(f.x-this.arcScaleX_*f.radius),",",j(f.y-this.arcScaleY_*f.radius)," ",j(f.x+this.arcScaleX_*f.radius),",",j(f.y+this.arcScaleY_*f.radius)," ",j(f.xStart),",",j(f.yStart)," ",j(f.xEnd),",",j(f.yEnd));break}if(f){if(e.x==null||f.x<e.x)e.x=f.x;if(h.x==null||f.x>h.x)h.x=f.x;if(e.y==null||f.y<e.y)e.y=f.y;if(h.y==null||f.y>h.y)h.y=f.y}}b.push(' ">');if(a)if(typeof this.fillStyle=="object"){d=this.fillStyle;f=0;a={x:0,y:0};c=0;var l=1;if(d.type_=="gradient"){f=d.x1_/this.arcScaleX_;e=d.y1_/
|
17
|
+
this.arcScaleY_;g=this.getCoords_(d.x0_/this.arcScaleX_,d.y0_/this.arcScaleY_);f=this.getCoords_(f,e);f=Math.atan2(f.x-g.x,f.y-g.y)*180/Math.PI;if(f<0)f+=360;if(f<1.0E-6)f=0}else{g=this.getCoords_(d.x0_,d.y0_);c=h.x-e.x;l=h.y-e.y;a={x:(g.x-e.x)/c,y:(g.y-e.y)/l};c/=this.arcScaleX_*k;l/=this.arcScaleY_*k;g=n.max(c,l);c=2*d.r0_/g;l=2*d.r1_/g-c}e=d.colors_;e.sort(function(y,S){return y.offset-S.offset});h=e.length;var o=e[0].color,p=e[h-1].color,m=e[0].alpha*this.globalAlpha,q=e[h-1].alpha*this.globalAlpha,
|
18
|
+
u=[];for(g=0;g<h;g++){var v=e[g];u.push(v.offset*l+c+" "+v.color)}b.push('<g_vml_:fill type="',d.type_,'"',' method="none" focus="100%"',' color="',o,'"',' color2="',p,'"',' colors="',u.join(","),'"',' opacity="',q,'"',' g_o_:opacity2="',m,'"',' angle="',f,'"',' focusposition="',a.x,",",a.y,'" />')}else b.push('<g_vml_:fill color="',d,'" opacity="',c,'" />');else{a=this.lineScale_*this.lineWidth;if(a<1)c*=a;b.push("<g_vml_:stroke",' opacity="',c,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',
|
19
|
+
this.miterLimit,'"',' endcap="',O(this.lineCap),'"',' weight="',a,'px"',' color="',d,'" />')}b.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",b.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(a,b){var c=this.m_;return{x:k*(a*c[0][0]+b*c[1][0]+c[2][0])-r,y:k*(a*c[0][1]+b*c[1][1]+c[2][1])-r}};i.save=function(){var a={};E(this,a);this.aStack_.push(a);this.mStack_.push(this.m_);this.m_=s(A(),this.m_)};
|
20
|
+
i.restore=function(){E(this.aStack_.pop(),this);this.m_=this.mStack_.pop()};i.translate=function(a,b){t(this,s([[1,0,0],[0,1,0],[a,b,1]],this.m_),false)};i.rotate=function(a){var b=C(a);a=B(a);t(this,s([[b,a,0],[-a,b,0],[0,0,1]],this.m_),false)};i.scale=function(a,b){this.arcScaleX_*=a;this.arcScaleY_*=b;t(this,s([[a,0,0],[0,b,0],[0,0,1]],this.m_),true)};i.transform=function(a,b,c,d,e,h){t(this,s([[a,b,0],[c,d,0],[e,h,1]],this.m_),true)};i.setTransform=function(a,b,c,d,e,h){t(this,[[a,b,0],[c,d,0],
|
21
|
+
[e,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new I};w.prototype.addColorStop=function(a,b){b=F(b);this.colors_.push({offset:a,color:b.color,alpha:b.alpha})};G_vmlCanvasManager=J;CanvasRenderingContext2D=z;CanvasGradient=w;CanvasPattern=I}();
|
@@ -0,0 +1,149 @@
|
|
1
|
+
require.pause();
|
2
|
+
require.def("preview/pageList",["domplate/domplate","core/lib","core/trace","preview/requestList"],function(n,b,h,m){with(n){n=function(j){this.input=j};n.prototype=domplate({tableTag:TABLE({"class":"pageTable",cellpadding:0,cellspacing:0,onclick:"$onClick",_repObject:"$input"},TBODY(TAG("$rowTag",{groups:"$input.log.pages"}))),rowTag:FOR("group","$groups",TR({"class":"pageRow",_repObject:"$group"},TD({"class":"groupName pageCol"},SPAN({"class":"pageName"},"$group|getPageTitle")))),bodyTag:TR({"class":"pageInfoRow",
|
3
|
+
style:"height:auto;"},TD({"class":"pageInfoCol"})),getPageTitle:function(j){return b.cropString(j.title,100)},getPageID:function(j){return"["+j.id+"]"},onClick:function(j){var a=$.event.fix(j||window.event);if(b.isLeftClick(j))if(a=b.getAncestorByClass(a.target,"pageRow")){this.toggleRow(a);b.cancelEvent(j)}},toggleRow:function(j,a){if(!(b.hasClass(j,"opened")&&a)){b.toggleClass(j,"opened");if(b.hasClass(j,"opened")){a=this.bodyTag.insertRows({},j)[0];(new m(this.input)).render(a.firstChild,j.repObject)}else{a=
|
4
|
+
j.nextSibling;j.parentNode.removeChild(a)}}},expandAll:function(j){for(j=j.firstChild.firstChild;j;){hasClass(j,"pageRow")&&this.toggleRow(j,true);j=j.nextSibling}},getPageRow:function(j){for(var a=b.getElementsByClass(this.element.parentNode,"pageRow"),c=0;c<a.length;c++){var e=a[c];if(e.repObject==j)return e}},togglePage:function(j){this.toggleRow(this.getPageRow(j))},expandPage:function(j){this.toggleRow(this.getPageRow(j),true)},collapsePage:function(j){j=this.getPageRow(j);b.hasClass(j,"opened")&&
|
5
|
+
this.toggleRow(j)},append:function(j){(new m(this.input)).render(j,null);var a=this.input.log.pages;if(a&&a.length){j=this.tableTag.append({input:this.input},j,this);j.firstChild.childNodes.length==1&&j.parentNode.childNodes.length==1&&this.toggleRow(j.firstChild.firstChild)}},render:function(j){this.append(j)}});return n}});require.def("harPreview",["preview/pageList","preview/harModel"],function(n,b){b.Loader.run(function(h){h=b.parse(h,true);(new n(h)).render(document.getElementById("content"))})});
|
6
|
+
require.def("core/lib",["core/trace"],function(n){var b={},h=navigator.userAgent.toLowerCase();b.isFirefox=/firefox/.test(h);b.isOpera=/opera/.test(h);b.isSafari=/webkit/.test(h);b.isIE=/msie/.test(h)&&!/opera/.test(h);b.isIE6=/msie 6/i.test(navigator.appVersion);b.browserVersion=(h.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1];b.isIElt8=b.isIE&&b.browserVersion-0<8;b.extend=function(a,c){var e={};b.append(e,a);b.append(e,c);return e};b.append=function(a,c){for(var e in c)a[e]=c[e];return a};
|
7
|
+
b.bind=function(){var a=b.cloneArray(arguments),c=a.shift(),e=a.shift();return function(){return c.apply(e,b.arrayInsert(b.cloneArray(a),0,arguments))}};b.bindFixed=function(){var a=b.cloneArray(arguments),c=a.shift(),e=a.shift();return function(){return c.apply(e,a)}};b.dispatch=function(a,c,e){for(var f=0;a&&f<a.length;f++){var l=a[f];if(l[c])try{l[c].apply(l,e)}catch(k){n.exception(k)}}};b.dispatch2=function(a,c,e){for(var f=0;f<a.length;f++){var l=a[f];if(l[c])try{var k=l[c].apply(l,e);if(k)return k}catch(d){n.exception(d)}}};
|
8
|
+
var m=Object.prototype.toString,j=/^\s*function(\s+[\w_$][\w\d_$]*)?\s*\(/;b.isArray=function(a){return m.call(a)==="[object Array]"};b.isFunction=function(a){if(!a)return false;return m.call(a)==="[object Function]"||b.isIE&&typeof a!="string"&&j.test(""+a)};b.isAncestor=function(a,c){for(a=a;a;a=a.parentNode)if(a==c)return true;return false};b.fixEvent=function(a){return $.event.fix(a||window.event)};b.fireEvent=function(a,c){if(document.createEvent){var e=document.createEvent("Events");e.initEvent(c,
|
9
|
+
true,false);return!a.dispatchEvent(e)}};b.cancelEvent=function(a){a=b.fixEvent(a);a.stopPropagation();a.preventDefault()};b.addEventListener=function(a,c,e,f){f=f||false;a.addEventListener?a.addEventListener(c,e,f):a.attachEvent("on"+c,e)};b.removeEventListener=function(a,c,e,f){f=f||false;a.removeEventListener?a.removeEventListener(c,e,f):a.detachEvent("on"+c,e)};b.isLeftClick=function(a){return a.button==0&&b.noKeyModifiers(a)};b.noKeyModifiers=function(a){return!a.ctrlKey&&!a.shiftKey&&!a.altKey&&
|
10
|
+
!a.metaKey};b.isControlClick=function(a){return a.button==0&&b.isControl(a)};b.isShiftClick=function(a){return a.button==0&&b.isShift(a)};b.isControl=function(a){return(a.metaKey||a.ctrlKey)&&!a.shiftKey&&!a.altKey};b.isAlt=function(a){return a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey};b.isAltClick=function(a){return a.button==0&&b.isAlt(a)};b.isControlShift=function(a){return(a.metaKey||a.ctrlKey)&&a.shiftKey&&!a.altKey};b.isShift=function(a){return a.shiftKey&&!a.metaKey&&!a.ctrlKey&&!a.altKey};
|
11
|
+
b.inflateRect=function(a,c,e){return{top:a.top-e,left:a.left-c,height:a.height+2*e,width:a.width+2*c}};b.pointInRect=function(a,c,e){return e>=a.top&&e<=a.top+a.height&&c>=a.left&&c<=a.left+a.width};b.cloneArray=function(a,c){var e=[];if(c)for(var f=0;f<a.length;++f)e.push(c(a[f]));else for(f=0;f<a.length;++f)e.push(a[f]);return e};b.arrayInsert=function(a,c,e){for(var f=0;f<e.length;++f)a.splice(f+c,0,e[f]);return a};b.remove=function(a,c){for(var e=0;e<a.length;++e)if(a[e]==c){a.splice(e,1);break}};
|
12
|
+
b.formatSize=function(a){var c=1;c=c>2?2:c;c=c<-1?-1:c;if(c==-1)return a+" B";c=Math.pow(10,c);return a==-1||a==undefined?"?":a==0?"0":a<1024?a+" B":a<1048576?Math.round(a/1024*c)/c+" KB":Math.round(a/1048576*c)/c+" MB"};b.formatTime=function(a){return a==-1?"-":a<1E3?a+"ms":a<6E4?Math.ceil(a/10)/100+"s":Math.ceil(a/6E4*100)/100+"m"};b.formatNumber=function(a){a+="";var c=a.split(".");a=c[0];c=c.length>1?"."+c[1]:"";for(var e=/(\d+)(\d{3})/;e.test(a);)a=a.replace(e,"$1,$2");return a+c};b.formatString=
|
13
|
+
function(a){var c=b.cloneArray(arguments);a=c.shift();for(var e=0;e<c.length;e++){var f=c[e].toString();a=a.replace("%S",f)}return a};b.parseISO8601=function(a){return(a=b.fromISOString(a))?a.getTime():null};b.fromISOString=function(a){if(!a)return null;a=a.toString().match(new RegExp(/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/));if(!a)return null;var c=new Date;c.setUTCDate(1);c.setUTCFullYear(parseInt(a[1],10));c.setUTCMonth(parseInt(a[3],10)-
|
14
|
+
1);c.setUTCDate(parseInt(a[5],10));c.setUTCHours(parseInt(a[7],10));c.setUTCMinutes(parseInt(a[9],10));c.setUTCSeconds(parseInt(a[11],10));a[12]?c.setUTCMilliseconds(parseFloat(a[12])*1E3):c.setUTCMilliseconds(0);if(a[13]!="Z"){var e=a[15]*60+parseInt(a[17],10);e*=a[14]=="-"?-1:1;c.setTime(c.getTime()-e*60*1E3)}return c};b.getFileName=function(a){return b.splitURLBase(a).name};b.getFileExtension=function(a){if(!a)return null;var c=a.indexOf("?");if(c!=-1)a=a.substr(0,c);c=a.lastIndexOf(".");return a.substr(c+
|
15
|
+
1)};b.splitURLBase=function(a){if(b.isDataURL(a))return b.splitDataURL(a);return b.splitURLTrue(a)};b.isDataURL=function(a){return a&&a.substr(0,5)=="data:"};b.splitDataURL=function(a){var c=a.indexOf(":",3);if(c!=4)return false;var e=a.indexOf(",",c+1);if(e<c)return false;var f={encodedContent:a.substr(e+1)};a=a.substr(c+1,e).split(";");for(c=0;c<a.length;c++){e=a[c].split("=");if(e.length==2)f[e[0]]=e[1]}if(f.hasOwnProperty("fileName")){a=decodeURIComponent(f.fileName);a=b.splitURLTrue(a);if(f.hasOwnProperty("baseLineNumber")){f.path=
|
16
|
+
a.path;f.line=f.baseLineNumber;a=decodeURIComponent(f.encodedContent.substr(0,200)).replace(/\s*$/,"");f.name="eval->"+a}else{f.name=a.name;f.path=a.path}}else{f.hasOwnProperty("path")||(f.path="data:");f.hasOwnProperty("name")||(f.name=decodeURIComponent(f.encodedContent.substr(0,200)).replace(/\s*$/,""))}return f};b.splitURLTrue=function(a){var c=/:\/{1,3}(.*?)\/([^\/]*?)\/?($|\?.*)/.exec(a);return c?c[2]?{path:c[1],name:c[2]+c[3]}:{path:c[1],name:c[1]}:{name:a,path:a}};b.getURLParameter=function(a){for(var c=
|
17
|
+
window.location.search.substring(1).split("&"),e=0;e<c.length;e++){var f=c[e].split("=");if(f[0]==a)return unescape(f[1])}return null};b.getURLParameters=function(a){for(var c=[],e=window.location.search.substring(1).split("&"),f=0;f<e.length;f++){var l=e[f].split("=");l[0]==a&&c.push(unescape(l[1]))}return c};b.parseURLParams=function(a){var c=a?a.indexOf("?"):-1;if(c==-1)return[];a=a.substr(c+1);c=a.lastIndexOf("#");if(c!=-1)a=a.substr(0,c);if(!a)return[];return b.parseURLEncodedText(a)};b.parseURLEncodedText=
|
18
|
+
function(a,c){function e(p){try{return decodeURIComponent(p)}catch(q){return decodeURIComponent(unescape(p))}}var f=[];if(a=="")return f;a=a.replace(/\+/g," ");a=a.split("&");for(var l=0;l<a.length;++l)try{var k=a[l].indexOf("=");if(k!=-1){var d=a[l].substring(0,k),g=a[l].substring(k+1);if(g.length>25E3&&!c)g=b.$STR("LargeData");f.push({name:e(d),value:e(g)})}else{d=a[l];f.push({name:e(d),value:""})}}catch(o){}f.sort(function(p,q){return p.name<=q.name?-1:1});return f};b.getBody=function(a){if(a.body)return a.body;
|
19
|
+
if(a=a.getElementsByTagName("body")[0])return a;return null};b.getHead=function(a){return a.getElementsByTagName("head")[0]};b.getAncestorByClass=function(a,c){for(a=a;a;a=a.parentNode)if(b.hasClass(a,c))return a;return null};b.$=function(){return b.getElementByClass.apply(this,arguments)};b.getElementByClass=function(a){if(!a)return null;var c=b.cloneArray(arguments);c.splice(0,1);for(var e=a.firstChild;e;e=e.nextSibling){var f=b.cloneArray(c);f.unshift(e);if(b.hasClass.apply(this,f))return e;else if(f=
|
20
|
+
b.getElementByClass.apply(this,f))return f}return null};b.getElementsByClass=function(a){function c(l,k,d){for(l=l.firstChild;l;l=l.nextSibling){var g=b.cloneArray(k);g.unshift(l);b.hasClass.apply(null,g)&&d.push(l);c(l,k,d)}}var e=[],f=b.cloneArray(arguments);f.shift();c(a,f,e);return e};b.getChildByClass=function(a){for(var c=1;c<arguments.length;++c){var e=arguments[c],f=a.firstChild;for(a=null;f;f=f.nextSibling)if(b.hasClass(f,e)){a=f;break}}return a};b.eraseNode=function(a){for(;a.lastChild;)a.removeChild(a.lastChild)};
|
21
|
+
b.clearNode=function(a){a.innerHTML=""};b.hasClass=function(a,c){if(!a||a.nodeType!=1)return false;else{for(var e=1;e<arguments.length;++e){c=arguments[e];var f=a.className;if(!f||f.indexOf(c+" ")==-1)return false}return true}};b.setClass=function(a,c){if(a&&!b.hasClass(a,c))a.className+=" "+c+" "};b.removeClass=function(a,c){if(a&&a.className){var e=a.className.indexOf(c);if(e>=0){c=c.length;a.className=a.className.substr(0,e-1)+a.className.substr(e+c)}}};b.toggleClass=function(a,c){if(b.hasClass(a,
|
22
|
+
c)){b.removeClass(a,c);return false}else{b.setClass(a,c);return true}};b.trim=function(a){return a.replace(/^\s*|\s*$/g,"")};b.wrapText=function(a,c){var e=/[^A-Za-z_$0-9'"-]/,f=[];a=b.splitLines(a);for(var l=0;l<a.length;++l){for(var k=a[l];k.length>100;){var d=e.exec(k.substr(100,100));d=100+(d?d.index:0);var g=k.substr(0,d);k=k.substr(d);c||f.push("<pre>");f.push(c?g:b.escapeHTML(g));c||f.push("</pre>")}c||f.push("<pre>");f.push(c?k:b.escapeHTML(k));c||f.push("</pre>")}return f.join(c?"\n":"")};
|
23
|
+
b.insertWrappedText=function(a,c,e){c.innerHTML="<pre>"+b.wrapText(a,e)+"</pre>"};b.splitLines=function(a){var c=/\r\n|\r|\n/;if(a){if(a.split)return a.split(c)}else return[];return(a+"").split(c)};b.getPrettyDomain=function(a){return(a=/[^:]+:\/{1,3}(www\.)?([^\/]+)/.exec(a))?a[2]:""};b.escapeHTML=function(a){function c(e){switch(e){case "<":return"<";case ">":return">";case "&":return"&";case "'":return"'";case '"':return"""}return"?"}return String(a).replace(/[<>&"']/g,c)};b.cropString=
|
24
|
+
function(a,c){a+="";var e=c?c/2:50;return a.length>c?b.escapeNewLines(a.substr(0,e)+"..."+a.substr(a.length-e)):b.escapeNewLines(a)};b.escapeNewLines=function(a){return a.replace(/\r/g,"\\r").replace(/\n/g,"\\n")};b.cloneJSON=function(a){if(a==null||typeof a!="object")return a;try{var c=a.constructor();for(var e in a)c[e]=cloneJSON(a[e]);return c}catch(f){n.exception(a)}return null};b.getOverflowParent=function(a){for(a=a.parentNode;a;a=a.offsetParent)if(a.scrollHeight>a.offsetHeight)return a};b.getElementBox=
|
25
|
+
function(a){var c={};if(a.getBoundingClientRect){a=a.getBoundingClientRect();var e=b.isIE?document.body.clientTop||document.documentElement.clientTop:0,f=b.getWindowScrollPosition();c.top=Math.round(a.top-e+f.top);c.left=Math.round(a.left-e+f.left);c.height=Math.round(a.bottom-a.top);c.width=Math.round(a.right-a.left)}else{e=b.getElementPosition(a);c.top=e.top;c.left=e.left;c.height=a.offsetHeight;c.width=a.offsetWidth}return c};b.getElementPosition=function(a){var c=0,e=0;do{c+=a.offsetLeft;e+=a.offsetTop}while(a=
|
26
|
+
a.offsetParent);return{left:c,top:e}};b.getWindowSize=function(){var a=0,c=0,e;if(typeof window.innerWidth=="number"){a=window.innerWidth;c=window.innerHeight}else if((e=document.documentElement)&&(e.clientHeight||e.clientWidth)){a=e.clientWidth;c=e.clientHeight}else if((e=document.body)&&(e.clientHeight||e.clientWidth)){a=e.clientWidth;c=e.clientHeight}return{width:a,height:c}};b.getWindowScrollSize=function(){var a=0,c=0,e;if(!b.isIEQuiksMode&&(e=document.documentElement)&&(e.scrollHeight||e.scrollWidth)){a=
|
27
|
+
e.scrollWidth;c=e.scrollHeight}if((e=document.body)&&(e.scrollHeight||e.scrollWidth)&&(e.scrollWidth>a||e.scrollHeight>c)){a=e.scrollWidth;c=e.scrollHeight}return{width:a,height:c}};b.getWindowScrollPosition=function(){var a=0,c=0,e;if(typeof window.pageYOffset=="number"){a=window.pageYOffset;c=window.pageXOffset}else if((e=document.body)&&(e.scrollTop||e.scrollLeft)){a=e.scrollTop;c=e.scrollLeft}else if((e=document.documentElement)&&(e.scrollTop||e.scrollLeft)){a=e.scrollTop;c=e.scrollLeft}return{top:a,
|
28
|
+
left:c}};b.addStyleSheet=function(a,c){if(!a.getElementById(c)){var e=a.createElement("link");e.type="text/css";e.rel="stylesheet";e.href=c;e.setAttribute("id",c);b.getHead(a).appendChild(e)}};return b});
|
29
|
+
require.def("i18n!nls/requestList",{root:{fromCache:"From Cache",menuBreakLayout:"Break Timeline Layout",menuOpenRequestInWindow:"Open Request in New Window",menuOpenResponseInWindow:"Open Response in New Window",request:"Request",requests:"Requests",tooltipSize:"%S (%S bytes)",tooltipZippedSize:"%S (%S bytes) - compressed",tooltipUnzippedSize:"%S (%S bytes) - uncompressed","request.Started":"Started","request.phase.Resolving":"DNS Lookup","request.phase.Connecting":"Connecting","request.phase.Blocking":"Blocking",
|
30
|
+
"request.phase.Sending":"Sending","request.phase.Waiting":"Waiting","request.phase.Receiving":"Receiving",ContentLoad:"DOM Loaded",WindowLoad:"Page Loaded","page.event.Load":"Page Loaded",menuBreakTimeline:"Break Timeline Layout",menuOpenRequest:"Open Request in New Window",menuOpenResponse:"Open Response in New Window"}});
|
31
|
+
require.def("preview/requestList",["domplate/domplate","core/lib","i18n!nls/requestList","preview/harModel","core/cookies","preview/requestBody","domplate/infoTip","domplate/popupMenu"],function(n,b,h,m,j,a,c,e){with(n){n=function(d){this.input=d;c.addListener(this)};n.prototype=domplate({tableTag:TABLE({"class":"netTable",cellpadding:0,cellspacing:0,onclick:"$onClick"},TBODY(TR(TD({width:"20%"}),TD({width:"10%"}),TD({width:"10%"}),TD({width:"10%"}),TD({width:"50%"}),TD({width:"15px"})))),fileTag:FOR("file",
|
32
|
+
"$files",TR({"class":"netRow loaded",$hasHeaders:"$file|hasResponseHeaders",$responseError:"$file|isError",$fromCache:"$file|isFromCache"},TD({"class":"netHrefCol netCol"},DIV({"class":"netHrefLabel netLabel",style:"margin-left: $file|getIndent\\px"},"$file|getHref"),DIV({"class":"netFullHrefLabel netHrefLabel netLabel",style:"margin-left: $file|getIndent\\px"},"$file|getFullHref")),TD({"class":"netStatusCol netCol"},DIV({"class":"netStatusLabel netLabel"},"$file|getStatus")),TD({"class":"netDomainCol netCol"},
|
33
|
+
DIV({"class":"netDomainLabel netLabel"},"$file|getDomain")),TD({"class":"netSizeCol netCol"},DIV({"class":"netSizeLabel netLabel"},"$file|getSize")),TD({"class":"netTimeCol netCol"},DIV({"class":"netTimelineBar"}," ",DIV({"class":"netResolvingBar netBar",style:"left: $file.offset"}),DIV({"class":"netConnectingBar netBar",style:"left: $file.offset"}),DIV({"class":"netBlockingBar netBar",style:"left: $file.offset"}),DIV({"class":"netSendingBar netBar",style:"left: $file.offset"}),DIV({"class":"netWaitingBar netBar",
|
34
|
+
style:"left: $file.offset"}),DIV({"class":"netContentLoadBar netBar",style:"left: $file.offset"}),DIV({"class":"netWindowLoadBar netBar",style:"left: $file.offset"}),DIV({"class":"netReceivingBar netBar",style:"left: $file.offset; width: $file.width"},SPAN({"class":"netTimeLabel"},"$file|getElapsedTime")))),TD({"class":"netOptionsCol netCol"},DIV({"class":"netOptionsLabel netLabel",onclick:"$onOpenOptions"})))),headTag:TR({"class":"netHeadRow"},TD({"class":"netHeadCol",colspan:6},DIV({"class":"netHeadLabel"},
|
35
|
+
"$doc.rootFile.href"))),netInfoTag:TR({"class":"netInfoRow"},TD({"class":"netInfoCol",colspan:6})),summaryTag:TR({"class":"netRow netSummaryRow"},TD({"class":"netCol",colspan:3},DIV({"class":"netCountLabel netSummaryLabel"},"-")),TD({"class":"netTotalSizeCol netCol"},DIV({"class":"netTotalSizeLabel netSummaryLabel"},"0KB")),TD({"class":"netTotalTimeCol netCol"},DIV({"class":"",style:"width: 100%"},DIV({"class":"netCacheSizeLabel netSummaryLabel"},"(",SPAN("0KB"),SPAN(" "+h.fromCache),")"),DIV({"class":"netTimeBar"},
|
36
|
+
SPAN({"class":"netTotalTimeLabel netSummaryLabel"},"0ms")))),TD({"class":"netCol"})),getIndent:function(){return 0},isError:function(d){d=Math.floor(d.response.status/100);return d==4||d==5},isFromCache:function(d){return d.cache&&d.cache.afterRequest},getHref:function(d){return d.request.method+" "+b.getFileName(this.getFullHref(d))},getFullHref:function(d){return d.request.url},getStatus:function(d){return(d.response.status>0?d.response.status+" ":"")+d.response.statusText},getDomain:function(d){return b.getPrettyDomain(d.request.url)},
|
37
|
+
getSize:function(d){var g=d.response.bodySize;return this.formatSize(g&&g!=-1?g:d.response.content.size)},hasResponseHeaders:function(){return true},formatSize:function(d){return b.formatSize(d)},getElapsedTime:function(d){return b.formatTime(d.time)},onClick:function(d){var g=$.event.fix(d||window.event);if(b.isLeftClick(d))if(g=b.getAncestorByClass(g.target,"netRow")){this.toggleHeadersRow(g);b.cancelEvent(d)}},toggleHeadersRow:function(d){if(b.hasClass(d,"hasHeaders")){var g=d.repObject;b.toggleClass(d,
|
38
|
+
"opened");if(b.hasClass(d,"opened")){var o=this.netInfoTag.insertRows({},d)[0];o.repObject=g;(new a).render(o.firstChild,g)}else{o=d.nextSibling;b.getElementByClass(o,"netInfoBody");d.parentNode.removeChild(o)}}},onOpenOptions:function(d){var g=$.event.fix(d||window.event);b.cancelEvent(d);if(b.isLeftClick(d)){d=g.target;g=this.getOptionsMenuItems(b.getAncestorByClass(d,"netRow"));(new e({id:"requestContextMenu",items:g})).showPopup(d)}},getOptionsMenuItems:function(d){var g=d.repObject;return[{label:h.menuBreakTimeline,
|
39
|
+
type:"checkbox",disabled:false,checked:d.phase.files[0]==g,command:b.bind(this.breakLayout,this,d)},"-",{label:h.menuOpenRequest,command:b.bind(this.openRequest,this,g)},{label:h.menuOpenResponse,disabled:!g.response.content.text,command:b.bind(this.openResponse,this,g)}]},openRequest:function(d,g){window.open(g.request.url)},openResponse:function(d,g){d=g.response.content.mimeType;var o=g.response.content.encoding;window.open("data:"+(d?d:"")+";"+(o?o:"")+","+g.response.content.text)},breakLayout:function(d,
|
40
|
+
g){d=g.repObject;g.breakLayout=g.phase.files[0]!=d;g=b.getAncestorByClass(g,"netTable");d=m.getParentPage(this.input,d);this.updateLayout(g,d)},updateLayout:function(d,g){var o=m.getPageEntries(this.input,g);this.table=d;d=this.firstRow=this.table.firstChild.firstChild.nextSibling;this.phases=[];var p=j.getCookie("phaseInterval");p||(p=1E3);var q=null,t=g?b.parseISO8601(g.startedDateTime):null,s=0,r=0;if(g&&g.pageTimings){r=g.pageTimings;s=r.onLoad>0?r.onLoad:0;r=r.onContentLoad>0?r.onContentLoad:
|
41
|
+
0}for(var v=0;v<o.length;v++){var u=o[v];if(b.hasClass(d,"netInfoRow"))d=d.nextSibling;d.repObject=u;t||(t=b.parseISO8601(u.startedDateTime));var x=b.parseISO8601(u.startedDateTime),w=q?b.parseISO8601(q.getLastStartTime()):0;w=x-w>=p&&x>t+s;if(typeof d.breakLayout=="boolean")if(!q||d.breakLayout)q=this.startPhase(u);else q.addFile(u);else if(!q||w)q=this.startPhase(u);else q.addFile(u);if(q.startTime==undefined||q.startTime>x)q.startTime=x;if(q.endTime==undefined||q.endTime<x+u.time)q.endTime=x+u.time;
|
42
|
+
if(u.phase==this.phases[0]&&q.endTime<t+s)q.endTime=t+s;if(u.phase==this.phases[0]&&q.endTime<t+r)q.endTime=t+r;d=d.nextSibling}this.updateTimeline(g);this.updateSummaries(g)},startPhase:function(d){d=new f(d);this.phases.push(d);return d},calculateFileTimes:function(d,g,o){if(o!=g.phase){o=g.phase;this.phaseStartTime=o.startTime;this.phaseEndTime=o.endTime;this.phaseElapsed=this.phaseEndTime-o.startTime}var p=g.timings.dns<0?0:g.timings.dns,q=p+(g.timings.connect<0?0:g.timings.connect),t=q+(g.timings.blocked<
|
43
|
+
0?0:g.timings.blocked),s=t+(g.timings.send<0?0:g.timings.send),r=s+(g.timings.wait<0?0:g.timings.wait),v=r+(g.timings.receive<0?0:g.timings.receive);this.barOffset=((b.parseISO8601(g.startedDateTime)-this.phaseStartTime)/this.phaseElapsed*100).toFixed(3);this.barResolvingWidth=(p/this.phaseElapsed*100).toFixed(3);this.barConnectingWidth=(q/this.phaseElapsed*100).toFixed(3);this.barBlockingWidth=(t/this.phaseElapsed*100).toFixed(3);this.barSendingWidth=(s/this.phaseElapsed*100).toFixed(3);this.barWaitingWidth=
|
44
|
+
(r/this.phaseElapsed*100).toFixed(3);this.barReceivingWidth=(v/this.phaseElapsed*100).toFixed(3);if(d){p=b.parseISO8601(d.startedDateTime);q=d.pageTimings.onContentLoad;if(g.phase==this.phases[0]&&q>0)this.contentLoadBarOffset=((p+q-o.startTime)/this.phaseElapsed*100).toFixed(3);d=d.pageTimings.onLoad;if(g.phase==this.phases[0]&&d>0)this.windowLoadBarOffset=((p+d-o.startTime)/this.phaseElapsed*100).toFixed(3)}return o},updateTimeline:function(d){for(var g,o=this.firstRow;o;o=o.nextSibling){var p=
|
45
|
+
o.repObject;if(p)if(!b.hasClass(o,"netInfoRow")){g=this.calculateFileTimes(d,p,g);o.phase=p.phase;delete p.phase;p=b.getElementByClass(o,"netResolvingBar");var q=p.nextSibling,t=q.nextSibling,s=t.nextSibling,r=s.nextSibling,v=r.nextSibling,u=v.nextSibling,x=u.nextSibling;p.style.left=q.style.left=t.style.left=s.style.left=r.style.left=x.style.left=this.barOffset+"%";p.style.width=this.barResolvingWidth+"%";q.style.width=this.barConnectingWidth+"%";t.style.width=this.barBlockingWidth+"%";s.style.width=
|
46
|
+
this.barSendingWidth+"%";r.style.width=this.barWaitingWidth+"%";x.style.width=this.barReceivingWidth+"%";if(this.contentLoadBarOffset){v.style.left=this.contentLoadBarOffset+"%";v.style.display="block";this.contentLoadBarOffset=null}if(this.windowLoadBarOffset){u.style.left=this.windowLoadBarOffset+"%";u.style.display="block";this.windowLoadBarOffset=null}}}},updateSummaries:function(d){for(var g=this.phases,o=0,p=0,q=0,t=0,s=0;s<g.length;++s){var r=g[s];r.invalidPhase=false;r=this.summarizePhase(r);
|
47
|
+
o+=r.fileCount;p+=r.totalSize;q+=r.cachedSize;t+=r.totalTime}if(g=this.summaryRow){b.getElementByClass(g,"netCountLabel").firstChild.nodeValue=this.formatRequestCount(o);o=b.getElementByClass(g,"netTotalSizeLabel");o.setAttribute("totalSize",p);o.firstChild.nodeValue=b.formatSize(p);p=b.getElementByClass(g,"netCacheSizeLabel");p.setAttribute("collapsed",q==0);p.childNodes[1].firstChild.nodeValue=b.formatSize(q);q=b.getElementByClass(g,"netTotalTimeLabel");t=b.formatTime(t);if(d&&d.pageTimings.onLoad>
|
48
|
+
0)t+=" (onload: "+b.formatTime(d.pageTimings.onLoad)+")";q.innerHTML=t}},formatRequestCount:function(d){return d+" "+(d==1?h.request:h.requests)},summarizePhase:function(d){var g=0,o=0,p="all";if(p=="all")p=null;for(var q=0,t=0,s=0,r=0;r<d.files.length;r++){var v=d.files[r],u=b.parseISO8601(v.startedDateTime);if(!p||v.category==p){++q;var x=v.response.bodySize;x=x&&x!=-1?x:v.response.content.size;o+=x;if(v.response.status==304)g+=x;if(!t||u<t)t=u;v=u+v.time;if(v>s)s=v}}return{cachedSize:g,totalSize:o,
|
49
|
+
totalTime:s-t,fileCount:q}},showInfoTip:function(d,g){var o=b.getAncestorByClass(g,"netRow");if(o)if(b.getAncestorByClass(g,"netBar")){d.setAttribute("multiline",true);this.infoTipURL=g=o.repObject.startedDateTime+"-nettime";return this.populateTimeInfoTip(d,o)}else if(b.hasClass(g,"netSizeLabel")){this.infoTipURL=g=o.repObject.startedDateTime+"-netsize";return this.populateSizeInfoTip(d,o)}},populateTimeInfoTip:function(d,g){l.render(this.input,g,d);return true},populateSizeInfoTip:function(d,g){k.render(this.input,
|
50
|
+
g,d);return true},render:function(d,g){var o=m.getPageEntries(this.input,g);if(o.length){this.table=this.tableTag.replace({},d,this);this.summaryRow=this.summaryTag.insertRows({},this.table.firstChild)[0];this.fileTag.insertRows({files:o},this.table.firstChild.lastChild.previousSibling,this);this.updateLayout(this.table,g)}}});var f=function(d){this.files=[];this.addFile(d)};f.prototype={addFile:function(d){this.files.push(d);d.phase=this},getLastStartTime:function(){return this.files[this.files.length-
|
51
|
+
1].startedDateTime}};var l=domplate({tableTag:TABLE({"class":"timeInfoTip"},TBODY()),timingsTag:FOR("time","$timings",TR({"class":"timeInfoTipRow",$collapsed:"$time|hideBar"},TD({"class":"$time|getBarClass timeInfoTipBar",$loaded:"$time.loaded",$fromCache:"$time.fromCache"}),TD({"class":"timeInfoTipCell startTime"},"$time.start|formatStartTime"),TD({"class":"timeInfoTipCell elapsedTime"},"$time.elapsed|formatTime"),TD("$time|getLabel"))),startTimeTag:TR(TD(),TD("$startTime.time|formatStartTime"),
|
52
|
+
TD({colspan:2},"$startTime|getLabel")),separatorTag:TR(TD({colspan:4,height:"10px"})),eventsTag:FOR("event","$events",TR({"class":"timeInfoTipEventRow"},TD({"class":"timeInfoTipBar",align:"center"},DIV({"class":"$event|getBarClass timeInfoTipEventBar"})),TD("$event.start|formatStartTime"),TD({colspan:2},"$event|getLabel"))),hideBar:function(d){return!d.elapsed&&d.bar=="request.phase.Blocking"},getBarClass:function(d){return"net"+d.bar.substr(d.bar.lastIndexOf(".")+1)+"Bar"},formatTime:function(d){return b.formatTime(d)},
|
53
|
+
formatStartTime:function(d){var g=d>0,o=b.formatTime(Math.abs(d));if(!d)return o;return(g>0?"+":"-")+o},getLabel:function(d){return h[d.bar]},render:function(d,g,o){var p=g.repObject;var q=(d=m.getParentPage(d,p))?b.parseISO8601(d.startedDateTime):null,t=b.parseISO8601(p.startedDateTime);o=l.tableTag.replace({},o);var s={};s.time=t-g.phase.startTime;s.bar="request.Started";this.startTimeTag.insertRows({startTime:s},o.firstChild);this.separatorTag.insertRows({},o.firstChild);g=0;s=[];var r=p.timings.dns,
|
54
|
+
v=p.timings.connect,u=p.timings.blocked,x=p.timings.send,w=p.timings.wait,y=p.timings.receive;r>=0&&s.push({bar:"request.phase.Resolving",elapsed:r,start:g});if(v>=0)s.push({bar:"request.phase.Connecting",elapsed:v,start:g+=r<0?0:r});if(u>=0)s.push({bar:"request.phase.Blocking",elapsed:u,start:g+=v<0?0:v});if(x>=0)s.push({bar:"request.phase.Sending",elapsed:x,start:g+=u<0?0:u});if(w>=0)s.push({bar:"request.phase.Waiting",elapsed:w,start:g+=x<0?0:x});if(y>=0)s.push({bar:"request.phase.Receiving",elapsed:y,
|
55
|
+
start:g+(w<0?0:w),loaded:p.loaded,fromCache:p.fromCache});this.timingsTag.insertRows({timings:s},o.firstChild);p=[];d&&d.pageTimings.onContentLoad>0&&p.push({bar:"ContentLoad",start:q+d.pageTimings.onContentLoad-t});d&&d.pageTimings.onLoad>0&&p.push({bar:"WindowLoad",start:q+d.pageTimings.onLoad-t});if(p.length){this.separatorTag.insertRows({},o.firstChild);this.eventsTag.insertRows({events:p},o.firstChild);return true}}}),k=domplate({tag:DIV({"class":"sizeInfoTip"},"$file|getSize"),zippedTag:DIV(DIV({"class":"sizeInfoTip"},
|
56
|
+
"$file|getBodySize"),DIV({"class":"sizeInfoTip"},"$file|getContentSize")),getSize:function(d){d=d.response.bodySize;return b.formatString(h.tooltipSize,[b.formatSize(d),d.size<0?"?":b.formatNumber(d)])},getBodySize:function(d){d=d.response.bodySize;return b.formatString(h.tooltipZippedSize,[b.formatSize(d),d.size<0?"?":b.formatNumber(d)])},getContentSize:function(d){d=d.response.content.size;return b.formatString(h.tooltipUnzippedSize,[b.formatSize(d),d.size<0?"?":b.formatNumber(d)])},render:function(d,
|
57
|
+
g,o){d=g.repObject;if(d.response.bodySize==d.response.content.size)return this.tag.replace({file:d},o);return this.zippedTag.replace({file:d},o)}});return n}});
|
58
|
+
require.def("preview/jsonSchema",[],function(){return{validate:function(n,b){return this._validate(n,b,false)},checkPropertyChange:function(n,b,h){return this._validate(n,b,h||"property")},_validate:function(n,b,h){function m(c,e,f,l){function k(q){a.push({property:f,message:q})}function d(q,t){if(q){if(typeof q=="string"&&q!="any"&&(q=="null"?t!==null:typeof t!=q)&&!(t instanceof Array&&q=="array")&&!(q=="integer"&&t%1===0))return[{property:f,message:typeof t+" value found, but a "+q+" is required"}];
|
59
|
+
if(q instanceof Array){for(var s=[],r=0;r<q.length;r++)if(!(s=d(q[r],t)).length)break;if(s.length)return s}else if(typeof q=="object"){s=a;a=[];m(t,q,f);q=a;a=s;return q}}return[]}var g;f+=f?typeof l=="number"?"["+l+"]":typeof l=="undefined"?"":"."+l:l;if((typeof e!="object"||e instanceof Array)&&(f||typeof e!="function")){if(typeof e=="function")c instanceof e||k("is not an instance of the class/constructor "+e.name);else e&&k("Invalid schema/property definition "+e);return null}h&&e.readonly&&k("is a readonly field, it can not be changed");
|
60
|
+
e["extends"]&&m(c,e["extends"],f,l);if(c===undefined)e.optional||k("is missing and it is not optional");else{a=a.concat(d(e.type,c));e.disallow&&!d(e.disallow,c).length&&k(" disallowed value was matched");if(c!==null){if(c instanceof Array){if(e.items)if(e.items instanceof Array){l=0;for(g=c.length;l<g;l++)a.concat(m(c[l],e.items[l],f,l))}else{l=0;for(g=c.length;l<g;l++)a.concat(m(c[l],e.items,f,l))}e.minItems&&c.length<e.minItems&&k("There must be a minimum of "+e.minItems+" in the array");e.maxItems&&
|
61
|
+
c.length>e.maxItems&&k("There must be a maximum of "+e.maxItems+" in the array")}else e.properties&&a.concat(j(c,e.properties,f,e.additionalProperties));e.pattern&&typeof c=="string"&&!c.match(e.pattern)&&k("does not match the regex pattern "+e.pattern);e.maxLength&&typeof c=="string"&&c.length>e.maxLength&&k("may only be "+e.maxLength+" characters long");e.minLength&&typeof c=="string"&&c.length<e.minLength&&k("must be at least "+e.minLength+" characters long");typeof e.minimum!==undefined&&typeof c==
|
62
|
+
typeof e.minimum&&e.minimum>c&&k("must have a minimum value of "+e.minimum);typeof e.maximum!==undefined&&typeof c==typeof e.maximum&&e.maximum<c&&k("must have a maximum value of "+e.maximum);if(e["enum"]){l=e["enum"];g=l.length;for(var o,p=0;p<g;p++)if(l[p]===c){o=1;break}o||k("does not have a value in the enumeration "+l.join(", "))}typeof e.maxDecimal=="number"&&c.toString().match(new RegExp("\\.[0-9]{"+(e.maxDecimal+1)+",}"))&&k("may only have "+e.maxDecimal+" digits of decimal places")}}return null}
|
63
|
+
function j(c,e,f,l){if(typeof e=="object"){if(typeof c!="object"||c instanceof Array)a.push({property:f,message:"an object is required"});for(var k in e)if(e.hasOwnProperty(k)&&!(k.charAt(0)=="_"&&k.charAt(1)=="_")){var d=c[k];m(d,e[k],f,k)}}for(k in c){c.hasOwnProperty(k)&&!(k.charAt(0)=="_"&&k.charAt(1)=="_")&&e&&!e[k]&&l===false&&a.push({property:f,message:typeof d+"The property "+k+" is not defined in the schema and the schema does not allow additional properties"});(d=e&&e[k]&&e[k].requires)&&
|
64
|
+
!(d in c)&&a.push({property:f,message:"the presence of the property "+k+" requires that "+d+" also be present"});d=c[k];e&&typeof e=="object"&&!(k in e)&&m(d,l,f,k);if(!h&&d&&d.$schema)a=a.concat(m(d,d.$schema,f,k))}return a}var a=[];if(b)m(n,b,"",h||"");!h&&n&&n.$schema&&m(n,n.$schema,"","");return{valid:!a.length,errors:a}}}});
|
65
|
+
require.def("preview/harModel",["core/lib","preview/jsonSchema","preview/ref","preview/harSchema","core/cookies","core/trace","jquery-plugins/jquery.json"],function(n,b,h,m,j,a){function c(){this.input=null}function e(){var f={};for(var l in this)if(l!="toJSON")f[l]=this[l];if(!this.text)return f;f.text=Array.map(this.text,function(k){var d=k.charCodeAt(0);if(d>=32&&d<127||d==10||d==13)return k.charAt(0);for(k=d.toString(16).toUpperCase();k.length<4;)k="0"+k;return"\\u"+k}).join("");return f}c.prototype=
|
66
|
+
{append:function(f){if(f){if(this.input)if(f.log.pages)for(var l=0;l<f.log.pages.length;l++)this.importPage(f.log.pages[l],f.log.entries);else{a.error("Import of additional data without a page is not yet supported.");return null}else this.input=f;return this.input}else a.error("HarModel.append; Trying to append null input!")},getPages:function(){if(!this.input)return[];return this.input.log.pages?this.input.log.pages:[]},getFirstPage:function(){var f=this.getPages();return f.length>0?f[0]:null},getPageEntries:function(f){return c.getPageEntries(this.input,
|
67
|
+
f)},getAllEntries:function(){return this.input?this.input.log.entries:[]},getParentPage:function(f){return c.getParentPage(this.input,f)},importPage:function(f,l){var k=this.getUniquePageID(f.id),d=f.id;f.id=k;this.input.log.pages.push(f);for(f=0;f<l.length;f++){var g=l[f];if(g.pageref==d){g.pageref=k;this.input.log.entries.push(g)}}},getUniquePageID:function(f){for(var l=this.input.log.pages,k={},d=0;d<l.length;d++)k[l[d].id]=true;if(!k[f])return f;for(l=1;;){d=f+l;if(!k[d])return d;l++}},toJSON:function(f){if(!f)f=
|
68
|
+
this.input;if(!f)return"";f=this.input.log.entries;for(var l=0;l<f.length;l++){var k=f[l];if(k.response.content.text)k.response.content.toJSON=e}return $.jSONToString(this.input,null,"\t").replace(/\\\\u/g,"\\u")},getSize:function(f){if(!f)f=this.input;if(!f)return 0;return dojo.toJson(f,true).length}};c.parse=function(f,l){var k=f;try{if(typeof f==="string")k=jQuery.toJSON(f)}catch(d){console.exception("HarModel.parse; EXCEPTION",d);throw{errors:[{message:"Failed to parse JSON",property:"JSON evaluation"}]};
|
69
|
+
}if(!l)return k;f=h.resolveJson(m);f=b.validate(k,f.logType);if(f.valid)return k;throw f;};c.getPageEntries=function(f,l){var k=[];f=f.log.entries;if(!f)return k;for(var d=0;d<f.length;d++){var g=f[d];!g.pageref&&!l&&k.push(g);l&&g.pageref==l.id&&k.push(g)}return k};c.getParentPage=function(f,l){f=f.log.pages;if(!f)return null;for(var k=0;k<f.length;k++)if(f[k].id==l.pageref)return f[k];return null};c.Loader={run:function(f,l){var k=n.getURLParameter("baseUrl");if(k&&k[k.length-1]!="/")k+="/";var d=
|
70
|
+
n.getURLParameters("path"),g=n.getURLParameter("callback"),o=n.getURLParameter("inputUrl"),p=[];for(var q in d)p.push(k?k+d[q]:d[q]);o&&p.push(o);if((k||o)&&p.length>0)return this.loadRemoteArchive(p,g,f,l);if(k=n.getURLParameter("path"))return this.loadLocalArchive(k,f,l)},loadExample:function(f){var l=document.location.href,k=l.indexOf("?");document.location=l.substr(0,k)+"?path="+f;j.setCookie("timeline",true);j.setCookie("stats",true)},loadLocalArchive:function(f,l,k){$.ajax({url:f,context:this,
|
71
|
+
success:function(d){l(d)},error:function(d,g){k(d,g)}});return true},loadRemoteArchive:function(f,l,k,d){if(!f.length)return false;var g=f.shift();l||(l="onInputData");$.ajax({url:g,context:this,dataType:"jsonp",jsonp:"callback",jsonpCallback:l,success:function(o){k(o);if(f.length){var p=this;setTimeout(function(){p.loadRemoteArchive(f,l,k,d)},300)}},error:function(o,p){d(o,p)}});return true}};return c});
|
72
|
+
require.def("preview/ref",["core/lib"],function(n){return{resolveJson:function(b,h){function m(p,q,t,s,r){var v,u;t=j in p?p[j]:t;if(t!==undefined)t=(a+t).replace(d,"$2$3");r=r||p;if(t!==undefined){if(c)p.__id=t;if(h.schemas&&!(p instanceof Array)&&(u=t.match(/^(.+\/)[^\.\[]*$/)))s=h.schemas[u[1]];if(e[t]&&p instanceof Array==e[t]instanceof Array){r=e[t];delete r.$ref;v=true}else if(u=s&&s.prototype){o.prototype=u;r=new o}e[t]=r;if(f)f[t]=h.time}s=s&&s.properties;var x=p.length;for(var w in p){if(w==
|
73
|
+
x)break;if(p.hasOwnProperty(w)){u=p[w];var y=s&&s[w];if(y&&y.format=="date-time"&&typeof u=="string")u=n.fromISOString(u);else if(typeof u=="object"&&u&&!(u instanceof Date))if(l=u.$ref){delete p[w];var z=l.replace(/(#)([^\.\[])/,"$1.$2").match(/(^([^\[]*\/)?[^#\.\[]*)#?([\.\[].*)?/);if(l=z[1]=="$"||z[1]=="this"||z[1]==""?b:e[(a+z[1]).replace(d,"$2$3")])z[3]&&z[3].replace(/(\[([^\]]+)\])|(\.?([^\.\[]+))/g,function(E,F,B,G,D){l=l&&l[B?B.replace(/[\"\'\\]/,""):D]});if(l)u=l;else if(q){u=m(u,false,u.$ref,
|
74
|
+
y);u._loadObject=h.loader}else{var C;C||k.push(r);C=true}}else q||(u=m(u,k==p,t&&g(t,w),y,r!=p&&typeof r[w]=="object"&&r[w]));p[w]=u;if(r!=p&&!r.__isDirty){y=r[w];r[w]=u;v&&u!==y&&!r._loadObject&&!(u instanceof Date&&y instanceof Date&&u.getTime()==y.getTime())&&!(typeof u=="function"&&typeof y=="function"&&u.toString()==y.toString())&&e.onUpdate&&e.onUpdate(r,w,y,u)}}}if(v)for(w in r){if(!r.__isDirty&&r.hasOwnProperty(w)&&!p.hasOwnProperty(w)&&w!="__id"&&w!="__clientId"&&!(r instanceof Array&&isNaN(w))){e.onUpdate&&
|
75
|
+
w!="_loadObject"&&w!="_idAttr"&&e.onUpdate(r,w,r[w],undefined);for(delete r[w];r instanceof Array&&r.length&&r[r.length-1]===undefined;)r.length--}}else e.onLoad&&e.onLoad(r);return r}h=h||{};var j=h.idAttribute||"id",a=h.idPrefix||"",c=h.assignAbsoluteIds,e=h.index||{},f=h.timeStamps,l,k=[],d=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/,g=this._addProp,o=function(){};if(b&&typeof b=="object"){b=m(b,false,h.defaultId);m(k,false)}return b},_addProp:function(b,h){return b+(b.match(/#/)?b.length==
|
76
|
+
1?"":".":"#")+h}}});
|
77
|
+
require.def("preview/harSchema",[],function(){function n(){}var b=/^(\d{4})(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/,h={pageType:{id:"pageType",description:"Exported web page",optional:true,properties:{startedDateTime:{type:"string",format:"date-time",pattern:b},id:{type:"string",unique:true},title:{type:"string"},pageTimings:{$ref:"pageTimingsType"},comment:{type:"string",optional:true}}}};b={entryType:{id:"entryType",description:"Request and Response related info",optional:true,
|
78
|
+
properties:{pageref:{type:"string",optional:true},startedDateTime:{type:"string",format:"date-time",pattern:b},time:{type:"integer",min:0},request:{$ref:"requestType"},response:{$ref:"responseType"},cache:{$ref:"cacheType"},timings:{$ref:"timingsType"},serverIPAddress:{type:"string",optional:true},connection:{type:"string",optional:true},comment:{type:"string",optional:true}}}};n.prototype={registerType:function(){var j=function(a,c){for(name in c)if(c.hasOwnProperty(name)&&name!="prototype")a[name]=
|
79
|
+
c[name]};for(i=0;i<arguments.length;i+=1)j(this,arguments[i])}};var m=new n;m.registerType({logType:{id:"logType",description:"HTTP Archive structure.",type:"object",properties:{log:{type:"object",properties:{version:{type:"string"},creator:{$ref:"creatorType"},browser:{$ref:"browserType"},pages:{type:"array",optional:true,items:{$ref:"pageType"}},entries:{type:"array",items:{$ref:"entryType"}},comment:{type:"string",optional:true}}}}}},{creatorType:{id:"creatorType",description:"Name and version info of the log creator app.",
|
80
|
+
type:"object",properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string",optional:true}}}},{browserType:{id:"browserType",description:"Name and version info of used browser.",type:"object",optional:true,properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string",optional:true}}}},h,{pageTimingsType:{id:"pageTimingsType",description:"Timing info about page load",properties:{onContentLoad:{type:"number",optional:true,min:-1},onLoad:{type:"number",optional:true,
|
81
|
+
min:-1},comment:{type:"string",optional:true}}}},b,{requestType:{id:"requestType",description:"Monitored request",properties:{method:{type:"string"},url:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookieType"}},headers:{type:"array",items:{$ref:"recordType"}},queryString:{type:"array",items:{$ref:"recordType"}},postData:{$ref:"postDataType"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string",optional:true}}}},{recordType:{id:"recordType",
|
82
|
+
description:"Helper name-value pair structure.",properties:{name:{type:"string"},value:{type:"string"},comment:{type:"string",optional:true}}}},{responseType:{id:"responseType",description:"Monitored Response.",properties:{status:{type:"integer"},statusText:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookieType"}},headers:{type:"array",items:{$ref:"recordType"}},content:{$ref:"contentType"},redirectURL:{type:"string"},headersSize:{type:"integer"},bodySize:{type:"integer"},
|
83
|
+
comment:{type:"string",optional:true}}}},{postDataType:{id:"postDataType",description:"Posted data info.",optional:true,properties:{mimeType:{type:"string"},text:{type:"string",optional:true},params:{type:"array",optional:true,properties:{name:{type:"string"},value:{type:"string",optional:true},fileName:{type:"string",optional:true},contentType:{type:"string",optional:true},comment:{type:"string",optional:true}}},comment:{type:"string",optional:true}}}},{contentType:{id:"contentType",description:"Response content",
|
84
|
+
properties:{size:{type:"integer"},compression:{type:"integer",optional:true},mimeType:{type:"string"},text:{type:"string",optional:true},encoding:{type:"string",optional:true},comment:{type:"string",optional:true}}}},{cacheType:{id:"cacheType",description:"Info about a response coming from the cache.",properties:{beforeRequest:{$ref:"cacheEntryType"},afterRequest:{$ref:"cacheEntryType"},comment:{type:"string",optional:true}}}},{cacheEntryType:{id:"cacheEntryType",optional:true,description:"Info about cache entry.",
|
85
|
+
properties:{expires:{type:"string",optional:"true"},lastAccess:{type:"string"},eTag:{type:"string"},hitCount:{type:"integer"},comment:{type:"string",optional:true}}}},{timingsType:{id:"timingsType",description:"Info about request-response timing.",properties:{dns:{type:"integer",min:-1},connect:{type:"integer",min:-1},blocked:{type:"integer",min:-1},send:{type:"integer",min:-1},wait:{type:"integer",min:-1},receive:{type:"integer",min:-1},ssl:{type:"integer",optional:true,min:-1},comment:{type:"string",
|
86
|
+
optional:true}}}});return m});
|
87
|
+
require.def("core/cookies",["core/lib"],function(n){return{getCookie:function(b){for(var h=document.cookie.split(";"),m=0;m<h.length;m++){var j=h[m].split("=");if(n.trim(j[0])==b)return j[1].length?unescape(n.trim(j[1])):null}},setCookie:function(b,h,m,j,a,c){var e=new Date;e.setTime(e.getTime());if(m)m=m*1E3*60*60*24;e=new Date(e.getTime()+m);document.cookie=b+"="+escape(h)+(m?";expires="+e.toGMTString():"")+(j?";path="+j:"")+(a?";domain="+a:"")+(c?";secure":"")},removeCookie:function(b,h,m){if(this.getCookie(b))document.cookie=
|
88
|
+
b+"="+(h?";path="+h:"")+(m?";domain="+m:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}}});require.def("i18n!nls/requestBody",{root:{RequestHeaders:"Request Headers",ResponseHeaders:"Response Headers",RequestCookies:"Request Cookies",ResponseCookies:"Response Cookies",URLParameters:"Params",Headers:"Headers",Post:"Post",Put:"Put",Cookies:"Cookies",Response:"Response",Cache:"Cache",HTML:"HTML"}});
|
89
|
+
require.def("preview/requestBody",["domplate/domplate","i18n!nls/requestBody","core/lib","domplate/tabView","syntax-highlighter/shCore"],function(n,b,h,m,j){with(n){n=function(){};n.prototype=domplate({render:function(d,g){var o=new m("requestBody");o.appendTab(new a(g));g.request.queryString&&g.request.queryString.length&&o.appendTab(new e(g));g.request.postData&&o.appendTab(new f(g,g.request.method));g.response.content.size>0&&o.appendTab(new c(g));this.showCache(g)&&o.appendTab(new l(g));this.showHtml(g)&&
|
90
|
+
o.appendTab(new k(g));d=o.render(d);o.selectTabByName("Headers");return d},showCache:function(d){if(!d.cache)return false;if(!d.cache.afterRequest)return false;if(d.category=="image")return false;return true},showHtml:function(d){return d.response.content.mimeType=="text/html"||d.mimeType=="application/xhtml+xml"}});var a=function(d){this.file=d};a.prototype=domplate(m.Tab.prototype,{id:"Headers",label:b.Headers,bodyTag:TABLE({"class":"netInfoHeadersText netInfoText netInfoHeadersTable",cellpadding:0,
|
91
|
+
cellspacing:0},TBODY(TR({"class":"netInfoResponseHeadersTitle"},TD({colspan:2},DIV({"class":"netInfoHeadersGroup"},b.ResponseHeaders))),TR({"class":"netInfoRequestHeadersTitle"},TD({colspan:2},DIV({"class":"netInfoHeadersGroup"},b.RequestHeaders))))),headerDataTag:FOR("param","$headers",TR(TD({"class":"netInfoParamName"},"$param.name"),TD({"class":"netInfoParamValue"},PRE("$param|getParamValue")))),getParamValue:function(d){return h.wrapText(d.value,true)},onUpdateBody:function(d,g){this.file.response.headers&&
|
92
|
+
this.insertHeaderRows(g,this.file.response.headers,"Headers","ResponseHeaders");this.file.request.headers&&this.insertHeaderRows(g,this.file.request.headers,"Headers","RequestHeaders")},insertHeaderRows:function(d,g,o,p){o=h.getElementByClass(d,"netInfo"+o+"Table");p=h.getElementByClass(o,"netInfo"+p+"Title");if(g.length){this.headerDataTag.insertRows({headers:g},p?p:d);h.removeClass(p,"collapsed")}else h.setClass(p,"collapsed")}});var c=function(d){this.file=d};c.prototype=domplate(m.Tab.prototype,
|
93
|
+
{id:"Response",label:b.Response,bodyTag:DIV({"class":"netInfoResponseText netInfoText"},PRE({"class":"javascript:nocontrols:nogutter:",name:"code"})),onUpdateBody:function(d,g){d=h.getElementByClass(g,"netInfoResponseText");if(this.file.category=="image"){h.clearNode(d);g=g.ownerDocument.createElement("img");g.src=this.file.href;d.appendChild(g,d)}else{h.clearNode(d.firstChild);g=this.file.response.content.text;var o=this.file.response.content.mimeType;if(o=="application/javascript"||o=="text/javascript"||
|
94
|
+
o=="application/x-javascript"||o=="text/ecmascript"||o=="application/ecmascript"){d.firstChild.innerHTML=g;j.SyntaxHighlighter.HighlightAll(d.firstChild)}else h.insertWrappedText(g,d.firstChild)}}});var e=function(d){this.file=d};e.prototype=domplate(a.prototype,{id:"Params",label:b.URLParameters,bodyTag:TABLE({"class":"netInfoParamsText netInfoText netInfoParamsTable",cellpadding:0,cellspacing:0},TBODY()),onUpdateBody:function(d,g){this.file.request.queryString&&this.insertHeaderRows(h.getElementByClass(g,
|
95
|
+
"netInfoParamsText"),this.file.request.queryString,"Params")}});var f=function(d,g){g=g.charAt(0).toUpperCase()+g.slice(1).toLowerCase();this.file=d;this.id=g;this.label=b[g]};f.prototype=domplate(a.prototype,{bodyTag:DIV({"class":"netInfo$tab.id\\Text netInfoText"},TABLE({"class":"netInfo$tab.id\\Table",cellpadding:0,cellspacing:0},TBODY())),onUpdateBody:function(d,g){if(d=this.file.request.postData){g=h.getElementByClass(g,"netInfo"+this.id+"Text");d.mimeType=="application/x-www-form-urlencoded"?
|
96
|
+
this.insertHeaderRows(g,d.params,this.id):h.insertWrappedText(d.text,g)}}});(function(d){this.file=d}).prototype=domplate(a.prototype,{id:"Cookies",label:b.Cookies,bodyTag:DIV({"class":"netInfoCookiesText netInfoText"},TABLE({"class":"netInfoCookiesTable",cellpadding:0,cellspacing:0},TBODY(TR({"class":"netInfoResponseCookiesTitle"},TD({colspan:2},DIV({"class":"netInfoCookiesGroup"},b.ResponseCookies))),TR({"class":"netInfoRequestCookiesTitle"},TD({colspan:2},DIV({"class":"netInfoCookiesGroup"},b.RequestCookies)))))),
|
97
|
+
onUpdateBody:function(d,g){if(file.response.cookies){d=h.getElementByClass(g,"netInfoParamsText");this.insertHeaderRows(d,file.response.cookies,"Cookies","ResponseCookies")}if(file.request.cookies){d=h.getElementByClass(g,"netInfoParamsText");this.insertHeaderRows(d,file.request.cookies,"Cookies","RequestCookies")}}});var l=function(d){this.file=d};l.prototype=domplate(a.prototype,{id:"Cache",label:b.Cache,bodyTag:DIV({"class":"netInfoCacheText netInfoText"},TABLE({"class":"netInfoCacheTable",cellpadding:0,
|
98
|
+
cellspacing:0},TBODY())),onUpdateBody:function(d,g){if(this.file.cache&&this.file.cache.afterRequest){d=this.file.cache.afterRequest;var o=[];for(var p in d)o.push({name:p,value:d[p]});this.insertHeaderRows(g,o,"Cache")}}});var k=function(d){this.file=d};k.prototype=domplate(a.prototype,{id:"HTML",label:b.HTML,bodyTag:DIV({"class":"netInfoHtmlText netInfoText"},IFRAME({"class":"netInfoHtmlPreview"})),onUpdateBody:function(d,g){h.getElementByClass(g,"netInfoHtmlPreview").contentWindow.document.body.innerHTML=
|
99
|
+
this.file.response.content.text}});return n}});
|
100
|
+
require.def("domplate/tabView",["domplate/domplate","core/lib","core/trace"],function(n,b,h){with(n){var m=domplate({tag:TABLE({"class":"tabView",cellpadding:0,cellspacing:0,_repObject:"$tabView"},TBODY(TR({"class":"tabViewRow"},TD({"class":"tabViewCol",valign:"top"},TAG("$tabList",{tabView:"$tabView"}))))),tabList:DIV({"class":"tabViewBody",onclick:"$onClickTab"},DIV({"class":"$tabView.id\\Bar tabBar"}),DIV({"class":"$tabView.id\\Bodies tabBodies"})),tabHeaderTag:A({"class":"$tab.id\\Tab tab",view:"$tab.id",
|
101
|
+
_repObject:"$tab"},"$tab.label"),tabBodyTag:DIV({"class":"tab$tab.id\\Body tabBody",_repObject:"$tab"}),hideTab:function(){return false},onClickTab:function(j){j=$.event.fix(j||window.event);this.getTabView(j.target).onClickTab(j)},getTabView:function(j){return b.getAncestorByClass(j,"tabView").repObject}});n=function(j){this.id=j;this.tabs=[];this.listeners=[]};n.prototype={appendTab:function(j){this.tabs.push(j);j.tabView=this;return j},getTab:function(j){return(j=b.getElementByClass(this.element,
|
102
|
+
j+"Tab"))?j.repObject:null},selectTabByName:function(j){(j=b.getElementByClass(this.element,j+"Tab"))&&this.selectTab(j)},addListener:function(j){this.listeners.push(j)},removeListener:function(j){b.remove(this.listeners,j)},onClickTab:function(j){(j=b.getAncestorByClass(j.target,"tab"))&&this.selectTab(j)},selectTab:function(j){if(b.hasClass(j,"tab"))if(!b.hasClass(j,"selected")){var a=j.getAttribute("view");if(a){var c=b.getAncestorByClass(j,"tabViewBody");if(c.selectedTab){c.selectedTab.removeAttribute("selected");
|
103
|
+
c.selectedBody.removeAttribute("selected");b.removeClass(c.selectedTab,"selected");b.removeClass(c.selectedBody,"selected")}var e=b.getElementByClass(c,"tab"+a+"Body");e||h.error("TabView.selectTab; Missing tab body",j);c.selectedTab=j;c.selectedBody=e;c.selectedTab.setAttribute("selected","true");c.selectedBody.setAttribute("selected","true");b.setClass(c.selectedBody,"selected");b.setClass(c.selectedTab,"selected");this.updateTabBody(c,a)}}},updateTabBody:function(j){j=j.selectedTab.repObject;if(!j._body._updated){j._body._updated=
|
104
|
+
true;j.bodyTag&&j.bodyTag.replace({tab:j},j._body);j&&j.onUpdateBody&&j.onUpdateBody(this,j._body);for(var a=0;a<this.listeners.length;a++){var c=this.listeners[a];c.onUpdateBody&&c.onUpdateBody(this,j._body)}}},render:function(j){this.element=m.tag.replace({tabView:this},j,m);b.setClass(this.element,this.id);for(var a in this.tabs){var c=this.tabs[a],e=c.tabHeaderTag?c.tabHeaderTag:m.tabHeaderTag,f=c.tabBodyTag?c.tabBodyTag:m.tabBodyTag;try{c._header=e.append({tab:c},b.$(j,"tabBar"));c._body=f.append({tab:c},
|
105
|
+
b.$(j,"tabBodies"))}catch(l){h.exception("TabView.appendTab; Exception ",l)}}return this.element}};n.Tab=function(){};n.Tab.prototype={invalidate:function(){this._updated=false},select:function(){this.tabView.selectTabByName(this.id)}};return n}});
|
106
|
+
require.def("syntax-highlighter/shCore",[],function(){var n={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Strings:{AboutDialog:'<html><head><title>About...</title></head><body class="dp-about"><table cellspacing="0"><tr><td class="copy"><p class="title">dp.SyntaxHighlighter</div><div class="para">Version: {V}</p><p><a href="http://www.dreamprojections.com/syntaxhighlighter/?ref=about" target="_blank">http://www.dreamprojections.com/syntaxhighlighter</a></p>©2004-2007 Alex Gorbatchev.</td></tr><tr><td class="footer"><input type="button" class="close" value="OK" onClick="window.close()"/></td></tr></table></body></html>'},ClipboardSwf:null,
|
107
|
+
Version:"1.5.1"}};n.SyntaxHighlighter=n.sh;n.sh.Toolbar.Commands={ExpandSource:{label:"+ expand source",check:function(b){return b.collapse},func:function(b,h){b.parentNode.removeChild(b);h.div.className=h.div.className.replace("collapsed","")}},ViewSource:{label:"view plain",func:function(b,h){b=n.sh.Utils.FixForBlogger(h.originalCode).replace(/</g,"<");h=window.open("","_blank","width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=0");h.document.write('<textarea style="width:99%;height:99%">'+
|
108
|
+
b+"</textarea>");h.document.close()}},CopyToClipboard:{label:"copy to clipboard",check:function(){return window.clipboardData!=null||n.sh.ClipboardSwf!=null},func:function(b,h){b=n.sh.Utils.FixForBlogger(h.originalCode).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&");if(window.clipboardData)window.clipboardData.setData("text",b);else if(n.sh.ClipboardSwf!=null){var m=h.flashCopier;if(m==null){m=document.createElement("div");h.flashCopier=m;h.div.appendChild(m)}m.innerHTML='<embed src="'+
|
109
|
+
n.sh.ClipboardSwf+'" FlashVars="clipboard='+encodeURIComponent(b)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>'}alert("The code is in your clipboard now")}},PrintSource:{label:"print",func:function(b,h){b=document.createElement("IFRAME");var m=null;b.style.cssText="position:absolute;width:0px;height:0px;left:-500px;top:-500px;";document.body.appendChild(b);m=b.contentWindow.document;n.sh.Utils.CopyStyles(m,window.document);m.write('<div class="'+h.div.className.replace("collapsed",
|
110
|
+
"")+' printing">'+h.div.innerHTML+"</div>");m.close();b.contentWindow.focus();b.contentWindow.print();alert("Printing...");document.body.removeChild(b)}},About:{label:"?",func:function(){var b=window.open("","_blank","dialog,width=300,height=150,scrollbars=0"),h=b.document;n.sh.Utils.CopyStyles(h,window.document);h.write(n.sh.Strings.AboutDialog.replace("{V}",n.sh.Version));h.close();b.focus()}}};n.sh.Toolbar.Create=function(b){var h=document.createElement("DIV");h.className="tools";for(var m in n.sh.Toolbar.Commands){var j=
|
111
|
+
n.sh.Toolbar.Commands[m];j.check!=null&&!j.check(b)||(h.innerHTML+='<a href="#" onclick="dp.sh.Toolbar.Command(\''+m+"',this);return false;\">"+j.label+"</a>")}return h};n.sh.Toolbar.Command=function(b,h){for(var m=h;m!=null&&m.className.indexOf("dp-highlighter")==-1;)m=m.parentNode;m!=null&&n.sh.Toolbar.Commands[b].func(h,m.highlighter)};n.sh.Utils.CopyStyles=function(b,h){h=h.getElementsByTagName("link");for(var m=0;m<h.length;m++)h[m].rel.toLowerCase()=="stylesheet"&&b.write('<link type="text/css" rel="stylesheet" href="'+
|
112
|
+
h[m].href+'"></link>')};n.sh.Utils.FixForBlogger=function(b){return n.sh.isBloggerMode==true?b.replace(/<br\s*\/?>|<br\s*\/?>/gi,"\n"):b};n.sh.RegexLib={MultiLineCComments:new RegExp("/\\*[\\s\\S]*?\\*/","gm"),SingleLineCComments:new RegExp("//.*$","gm"),SingleLinePerlComments:new RegExp("#.*$","gm"),DoubleQuotedString:new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"',"g"),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'","g")};n.sh.Match=function(b,h,m){this.value=b;this.index=h;this.length=
|
113
|
+
b.length;this.css=m};n.sh.Highlighter=function(){this.noGutter=false;this.addControls=true;this.collapse=false;this.tabsToSpaces=true;this.wrapColumn=80;this.showColumns=true};n.sh.Highlighter.SortCallback=function(b,h){if(b.index<h.index)return-1;else if(b.index>h.index)return 1;else if(b.length<h.length)return-1;else if(b.length>h.length)return 1;return 0};n.sh.Highlighter.prototype.CreateElement=function(b){b=document.createElement(b);b.highlighter=this;return b};n.sh.Highlighter.prototype.GetMatches=
|
114
|
+
function(b,h){for(var m=null;(m=b.exec(this.code))!=null;)this.matches[this.matches.length]=new n.sh.Match(m[0],m.index,h)};n.sh.Highlighter.prototype.AddBit=function(b,h){if(!(b==null||b.length==0)){var m=this.CreateElement("SPAN");b=b.replace(/ /g," ");b=b.replace(/</g,"<");b=b.replace(/\n/gm," <br>");if(h!=null)if(/br/gi.test(b)){b=b.split(" <br>");for(var j=0;j<b.length;j++){m=this.CreateElement("SPAN");m.className=h;m.innerHTML=b[j];this.div.appendChild(m);j+1<b.length&&this.div.appendChild(this.CreateElement("BR"))}}else{m.className=
|
115
|
+
h;m.innerHTML=b;this.div.appendChild(m)}else{m.innerHTML=b;this.div.appendChild(m)}}};n.sh.Highlighter.prototype.IsInside=function(b){if(b==null||b.length==0)return false;for(var h=0;h<this.matches.length;h++){var m=this.matches[h];if(m!=null)if(b.index>m.index&&b.index<m.index+m.length)return true}return false};n.sh.Highlighter.prototype.ProcessRegexList=function(){for(var b=0;b<this.regexList.length;b++)this.GetMatches(this.regexList[b].regex,this.regexList[b].css)};n.sh.Highlighter.prototype.ProcessSmartTabs=
|
116
|
+
function(b){function h(e,f,l){var k=e.substr(0,f);e=e.substr(f+1,e.length);f="";for(var d=0;d<l;d++)f+=" ";return k+f+e}function m(e,f){if(e.indexOf(a)==-1)return e;for(var l=0;(l=e.indexOf(a))!=-1;)e=h(e,l,f-l%f);return e}b=b.split("\n");for(var j="",a="\t",c=0;c<b.length;c++)j+=m(b[c],4)+"\n";return j};n.sh.Highlighter.prototype.SwitchToList=function(){var b=this.div.innerHTML.replace(/<(br)\/?>/gi,"\n").split("\n");this.addControls==true&&this.bar.appendChild(n.sh.Toolbar.Create(this));if(this.showColumns){for(var h=
|
117
|
+
this.CreateElement("div"),m=this.CreateElement("div"),j=1;j<=150;)if(j%10==0){h.innerHTML+=j;j+=(j+"").length}else{h.innerHTML+="·";j++}m.className="columns";m.appendChild(h);this.bar.appendChild(m)}j=0;for(h=this.firstLine;j<b.length-1;j++,h++){m=this.CreateElement("LI");var a=this.CreateElement("SPAN");m.className=j%2==0?"alt":"";a.innerHTML=b[j]+" ";m.appendChild(a);this.ol.appendChild(m)}this.div.innerHTML=""};n.sh.Highlighter.prototype.Highlight=function(b){function h(f){return f.replace(/^\s*(.*?)[\s\n]*$/g,
|
118
|
+
"$1")}function m(f){return f.replace(/\n*$/,"").replace(/^\n*/,"")}function j(f){f=n.sh.Utils.FixForBlogger(f).split("\n");for(var l=new RegExp("^\\s*","g"),k=1E3,d=0;d<f.length&&k>0;d++)if(h(f[d]).length!=0){var g=l.exec(f[d]);if(g!=null&&g.length>0)k=Math.min(g[0].length,k)}if(k>0)for(d=0;d<f.length;d++)f[d]=f[d].substr(k);return f.join("\n")}function a(f,l,k){return f.substr(l,k-l)}var c=0;if(b==null)b="";this.originalCode=b;this.code=m(j(b));this.div=this.CreateElement("DIV");this.bar=this.CreateElement("DIV");
|
119
|
+
this.ol=this.CreateElement("OL");this.matches=[];this.div.className="dp-highlighter";this.div.highlighter=this;this.bar.className="bar";this.ol.start=this.firstLine;if(this.CssClass!=null)this.ol.className=this.CssClass;if(this.collapse)this.div.className+=" collapsed";if(this.noGutter)this.div.className+=" nogutter";if(this.tabsToSpaces==true)this.code=this.ProcessSmartTabs(this.code);this.ProcessRegexList();if(this.matches.length==0)this.AddBit(this.code,null);else{this.matches=this.matches.sort(n.sh.Highlighter.SortCallback);
|
120
|
+
for(b=0;b<this.matches.length;b++)if(this.IsInside(this.matches[b]))this.matches[b]=null;for(b=0;b<this.matches.length;b++){var e=this.matches[b];if(!(e==null||e.length==0)){this.AddBit(a(this.code,c,e.index),null);this.AddBit(e.value,e.css);c=e.index+e.length}}this.AddBit(this.code.substr(c),null)}this.SwitchToList();this.div.appendChild(this.bar);this.div.appendChild(this.ol)};n.sh.Highlighter.prototype.GetKeywords=function(b){return"\\b"+b.replace(/ /g,"\\b|\\b")+"\\b"};n.sh.BloggerMode=function(){n.sh.isBloggerMode=
|
121
|
+
true};n.sh.HighlightAll=function(b,h,m,j,a,c){function e(){for(var v=arguments,u=0;u<v.length;u++)if(v[u]!=null){if(typeof v[u]=="string"&&v[u]!="")return v[u]+"";if(typeof v[u]=="object"&&v[u].value!="")return v[u].value+""}return null}function f(v,u){for(var x=0;x<u.length;x++)if(u[x]==v)return true;return false}function l(v,u,x){v=new RegExp("^"+v+"\\[(\\w+)\\]$","gi");for(var w=null,y=0;y<u.length;y++)if((w=v.exec(u[y]))!=null)return w[1];return x}function k(v,u,x){x=document.getElementsByTagName(x);
|
122
|
+
for(var w=0;w<x.length;w++)x[w].getAttribute("name")==u&&v.push(x[w])}var d=[],g=null,o={};if(typeof b=="string"){k(d,b,"pre");k(d,b,"textarea")}else d.push(b);if(d.length!=0){for(var p in n.sh.Brushes){g=n.sh.Brushes[p].Aliases;if(g!=null)for(b=0;b<g.length;b++)o[g[b]]=p}for(b=0;b<d.length;b++){p=d[b];var q=e(p.attributes["class"],p.className,p.attributes.language,p.language);g="";if(q!=null){q=q.split(":");g=q[0].toLowerCase();if(o[g]!=null){g=new n.sh.Brushes[o[g]];p.style.display="none";g.noGutter=
|
123
|
+
h==null?f("nogutter",q):!h;g.addControls=m==null?!f("nocontrols",q):m;g.collapse=j==null?f("collapse",q):j;g.showColumns=c==null?f("showcolumns",q):c;var t=document.getElementsByTagName("head")[0];if(g.Style&&t){var s=document.createElement("style");s.setAttribute("type","text/css");if(s.styleSheet)s.styleSheet.cssText=g.Style;else{var r=document.createTextNode(g.Style);s.appendChild(r)}t.appendChild(s)}g.firstLine=a==null?parseInt(l("firstline",q,1)):a;g.Highlight(p.innerHTML);g.source=p;p.parentNode.insertBefore(g.div,
|
124
|
+
p)}}}}};n.sh.Brushes.JScript=function(){this.regexList=[{regex:n.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:n.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:n.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:n.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords("abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with"),
|
125
|
+
"gm"),css:"keyword"}];this.CssClass="dp-c"};n.sh.Brushes.JScript.prototype=new n.sh.Highlighter;n.sh.Brushes.JScript.Aliases=["js","jscript","javascript"];return n});
|
126
|
+
require.def("domplate/infoTip",["domplate/domplate","core/lib","core/trace"],function(n,b){with(n){n=b.extend({listeners:[],maxWidth:100,maxHeight:80,infoTipMargin:10,infoTipWindowPadding:25,tags:domplate({infoTipTag:DIV({"class":"infoTip"})}),initialize:function(){if(!$.browser.msie){var h=$("body");h.bind("mouseover",b.bind(this.onMouseMove,this));h.bind("mouseout",b.bind(this.onMouseOut,this));h.bind("mousemove",b.bind(this.onMouseMove,this));return this.infoTip=this.tags.infoTipTag.append({},
|
127
|
+
b.getBody(document))}},showInfoTip:function(h,m,j,a,c,e){var f=b.getOverflowParent(m);if(b.dispatch2(this.listeners,"showInfoTip",[h,m,j+(f?f.scrollLeft:0),a,c,e])){c=h.ownerDocument.documentElement;m=c.clientWidth;c=c.clientHeight;if(j+h.offsetWidth+this.infoTipMargin>m-this.infoTipWindowPadding){h.style.left="auto";h.style.right=m-j+this.infoTipMargin+"px"}else{h.style.left=j+this.infoTipMargin+"px";h.style.right="auto"}h.style.top=a+h.offsetHeight+this.infoTipMargin>c?Math.max(0,c-(h.offsetHeight+
|
128
|
+
this.infoTipMargin))+"px":a+this.infoTipMargin+"px";h.style.bottom="auto";h.setAttribute("active","true")}else this.hideInfoTip(h)},hideInfoTip:function(h){h&&h.removeAttribute("active")},onMouseOut:function(h){h.relatedTarget||this.hideInfoTip(this.infoTip)},onMouseMove:function(h){this.infoTip.setAttribute("multiline",false);this.showInfoTip(this.infoTip,h.target,h.clientX,h.clientY,h.rangeParent,h.rangeOffset)},populateTimingInfoTip:function(h,m){this.tags.colorTag.replace({rgbValue:m},h);return true},
|
129
|
+
addListener:function(h){this.listeners.push(h)},removeListener:function(h){b.remove(this.listeners,h)}});n.initialize();return n}});
|
130
|
+
require.def("domplate/popupMenu",["domplate/domplate","core/lib","core/trace"],function(n,b){with(n){var h={controllers:[],controllerContext:{label:"controller context"},initialize:function(c){this.controllers=[];this.controllerContext=c||this.controllerContext},shutdown:function(){this.removeControllers()},addController:function(){for(var c=0,e;e=arguments[c];c++){if(typeof e[0]=="string")e[0]=$$(e[0],this.controllerContext);var f=e[2];e[2]=b.bind(f,this);e[3]=f;this.controllers.push(e);b.addEventListener.apply(this,
|
131
|
+
e)}},removeController:function(){for(var c=0,e;e=arguments[c];c++)for(var f=0,l;l=this.controllers[f];f++)e[0]==l[0]&&e[1]==l[1]&&e[2]==l[3]&&b.removeEventListener.apply(this,l)},removeControllers:function(){for(var c=0,e;e=this.controllers[c];c++)b.removeEventListener.apply(this,e)}};n={"class":"$item.className",type:"$item.type",value:"$item.value",_command:"$item.command"};if(b.isIE6)n.href="javascript:void(0)";var m=domplate({tag:DIV({"class":"popupMenu popupMenuShadow"},DIV({"class":"popupMenuContent popupMenuShadowContent"},
|
132
|
+
FOR("item","$object.items|memberIterator",TAG("$item.tag",{item:"$item"})))),itemTag:A(n,"$item.label"),checkBoxTag:A(b.extend(n,{checked:"$item.checked"}),"$item.label"),radioButtonTag:A(b.extend(n,{selected:"$item.selected"}),"$item.label"),groupTag:A(b.extend(n,{child:"$item.child"}),"$item.label"),shortcutTag:A(n,"$item.label",SPAN({"class":"popupMenuShortcutKey"},"$item.key")),separatorTag:SPAN({"class":"popupMenuSeparator"}),memberIterator:function(c){for(var e=[],f=0,l=c.length;f<l;f++){var k=
|
133
|
+
c[f];if(typeof k=="string"&&k.indexOf("-")==0)e.push({tag:this.separatorTag});else{k=b.extend(k,{});k.type=k.type||"";k.value=k.value||"";var d=k.type;k.tag=this.itemTag;var g=k.className||"";g+="popupMenuOption ";if(d=="checkbox"){g+="popupMenuCheckBox ";k.tag=this.checkBoxTag}else if(d=="radio"){g+="popupMenuRadioButton ";k.tag=this.radioButtonTag}else if(d=="group"){g+="popupMenuGroup ";k.tag=this.groupTag}else if(d=="shortcut"){g+="popupMenuShortcut ";k.tag=this.shortcutTag}if(k.checked)g+="popupMenuChecked ";
|
134
|
+
else if(k.selected)g+="popupMenuRadioSelected ";if(k.disabled)g+="popupMenuDisabled ";k.className=g;k.label=k.label;e.push(k)}}return e}}),j=function(c){if(!c.element){if(c.getItems)c.items=c.getItems();var e=b.getBody(document);c.element=m.tag.append({object:c},e,m)}b.append(this,c);if(typeof this.element=="string"){this.id=this.element;this.element=$(this.id)}else if(this.id)this.element.id=this.id;this.elementStyle=this.element.style;this.isVisible=false;this.handleMouseDown=b.bind(this.handleMouseDown,
|
135
|
+
this);this.handleMouseOver=b.bind(this.handleMouseOver,this);this.handleMouseOut=b.bind(this.handleMouseOut,this);this.handleWindowMouseDown=b.bind(this.handleWindowMouseDown,this)},a={};j.prototype=b.extend(h,{initialize:function(){h.initialize.call(this);this.addController([this.element,"mousedown",this.handleMouseDown],[this.element,"mouseover",this.handleMouseOver])},destroy:function(){this.hide();if(this.parentMenu)this.parentMenu.childMenu=null;this.element.parentNode.removeChild(this.element);
|
136
|
+
this.parentTarget=this.parentMenu=this.elementStyle=this.element=null},shutdown:function(){h.shutdown.call(this)},showPopup:function(c){var e=b.isIE6?1:-4;c=b.getElementBox(c);var f={top:0,left:0};this.show(c.left+e-f.left,c.top+c.height-5-f.top)},show:function(c,e){this.initialize();if(!this.isVisible){c=c||0;e=e||0;if(this.parentMenu){var f=this.parentMenu.childMenu;f&&f!=this&&f.destroy();this.parentMenu.childMenu=this}else b.addEventListener(document,"mousedown",this.handleWindowMouseDown);this.elementStyle.display=
|
137
|
+
"block";this.elementStyle.visibility="hidden";f=b.getWindowSize();c=Math.min(c,f.width-this.element.clientWidth-10);c=Math.max(c,0);e=Math.min(e,f.height-this.element.clientHeight-10);e=Math.max(e,0);this.elementStyle.left=c+"px";this.elementStyle.top=e+"px";this.elementStyle.visibility="visible";this.isVisible=true;b.isFunction(this.onShow)&&this.onShow.apply(this,arguments)}},hide:function(){this.clearHideTimeout();this.clearShowChildTimeout();if(this.isVisible){this.elementStyle.display="none";
|
138
|
+
if(this.childMenu){this.childMenu.destroy();this.childMenu=null}this.parentTarget&&b.removeClass(this.parentTarget,"popupMenuGroupSelected");this.isVisible=false;this.shutdown();b.isFunction(this.onHide)&&this.onHide.apply(this,arguments)}},showChildMenu:function(c){var e=c.getAttribute("child"),f=this;c=c;this.showChildTimeout=window.setTimeout(function(){var l=b.getElementBox(c),k=a.hasOwnProperty(e)?a[e]:{element:$(e)};(new j(b.extend(k,{parentMenu:f,parentTarget:c}))).show(l.left+l.width+(b.isIE6?
|
139
|
+
-1:-6),l.top-6);b.setClass(c,"popupMenuGroupSelected")},350)},clearHideTimeout:function(){if(this.hideTimeout){window.clearTimeout(this.hideTimeout);delete this.hideTimeout}},clearShowChildTimeout:function(){if(this.showChildTimeout){window.clearTimeout(this.showChildTimeout);this.showChildTimeout=null}},handleMouseDown:function(c){b.cancelEvent(c,true);for(var e=this;e.parentMenu;)e=e.parentMenu;c=c.target||c.srcElement;c=b.getAncestorByClass(c,"popupMenuOption");if(!c||b.hasClass(c,"popupMenuGroup"))return false;
|
140
|
+
if(c&&!b.hasClass(c,"popupMenuDisabled")){var f=c.getAttribute("type");if(f=="checkbox"){c.getAttribute("checked");var l=c.getAttribute("value"),k=b.hasClass(c,"popupMenuChecked");if(k){b.removeClass(c,"popupMenuChecked");c.setAttribute("checked","")}else{b.setClass(c,"popupMenuChecked");c.setAttribute("checked","true")}b.isFunction(this.onCheck)&&this.onCheck.call(this,c,l,!k)}if(f=="radiobutton"){f=b.getElementsByClass(c.parentNode,"popupMenuRadioSelected");l=c.getAttribute("group");k=0;for(var d=
|
141
|
+
f.length;k<d;k++){radio=f[k];if(radio.getAttribute("group")==l){b.removeClass(radio,"popupMenuRadioSelected");radio.setAttribute("selected","")}}b.setClass(c,"popupMenuRadioSelected");c.setAttribute("selected","true")}f=null;l=c.command;if(b.isFunction(l))f=l;else if(typeof l=="string")f=this[l];l=true;if(f)l=f.call(this,c)!==false;l&&e.hide()}return false},handleWindowMouseDown:function(c){c=c.target||c.srcElement;c=b.getAncestorByClass(c,"popupMenu");if(!c){b.removeEventListener(document,"mousedown",
|
142
|
+
this.handleWindowMouseDown);this.destroy()}},handleMouseOver:function(c){this.clearHideTimeout();this.clearShowChildTimeout();c=c.target||c.srcElement;if(c=b.getAncestorByClass(c,"popupMenuOption")){var e=this.childMenu;if(e){b.removeClass(e.parentTarget,"popupMenuGroupSelected");if(e.parentTarget!=c&&e.isVisible){e.clearHideTimeout();e.hideTimeout=window.setTimeout(function(){e.destroy()},300)}}b.hasClass(c,"popupMenuGroup")&&this.showChildMenu(c)}}});b.append(j,{register:function(c){a[c.id]=c},
|
143
|
+
check:function(c){b.setClass(c,"popupMenuChecked");c.setAttribute("checked","true")},uncheck:function(c){b.removeClass(c,"popupMenuChecked");c.setAttribute("checked","")},disable:function(c){b.setClass(c,"popupMenuDisabled")},enable:function(c){b.removeClass(c,"popupMenuDisabled")}});return j}});
|
144
|
+
(function(n){if(!b)var b={};(function(){function h(d){return d<10?"0"+d:d}function m(d){c.lastIndex=0;return c.test(d)?'"'+d.replace(c,function(g){var o=l[g];return typeof o==="string"?o:"\\u"+("0000"+g.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+d+'"'}function j(d,g){var o,p,q=e,t,s=g[d];if(s&&typeof s==="object"&&typeof s.toJSON==="function")s=s.toJSON(d);if(typeof k==="function")s=k.call(g,d,s);switch(typeof s){case "string":return m(s);case "number":return isFinite(s)?String(s):"null";case "boolean":case "null":return String(s);
|
145
|
+
case "object":if(!s)return"null";e+=f;t=[];if(Object.prototype.toString.apply(s)==="[object Array]"){p=s.length;for(d=0;d<p;d+=1)t[d]=j(d,s)||"null";g=t.length===0?"[]":e?"[\n"+e+t.join(",\n"+e)+"\n"+q+"]":"["+t.join(",")+"]";e=q;return g}if(k&&typeof k==="object"){p=k.length;for(d=0;d<p;d+=1){o=k[d];if(typeof o==="string")if(g=j(o,s))t.push(m(o)+(e?": ":":")+g)}}else for(o in s)if(Object.hasOwnProperty.call(s,o))if(g=j(o,s))t.push(m(o)+(e?": ":":")+g);g=t.length===0?"{}":e?"{\n"+e+t.join(",\n"+e)+
|
146
|
+
"\n"+q+"}":"{"+t.join(",")+"}";e=q;return g}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+h(this.getUTCMonth()+1)+"-"+h(this.getUTCDate())+"T"+h(this.getUTCHours())+":"+h(this.getUTCMinutes())+":"+h(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var a=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
147
|
+
c=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e,f,l={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;if(typeof b.stringify!=="function")b.stringify=function(d,g,o){var p;f=e="";if(typeof o==="number")for(p=0;p<o;p+=1)f+=" ";else if(typeof o==="string")f=o;if((k=g)&&typeof g!=="function"&&(typeof g!=="object"||typeof g.length!=="number"))throw new Error("JSON.stringify");return j("",
|
148
|
+
{"":d})};if(typeof b.parse!=="function")b.parse=function(d,g){function o(p,q){var t,s,r=p[q];if(r&&typeof r==="object")for(t in r)if(Object.hasOwnProperty.call(r,t)){s=o(r,t);if(s!==undefined)r[t]=s;else delete r[t]}return g.call(p,q,r)}a.lastIndex=0;if(a.test(d))d=d.replace(a,function(p){return"\\u"+("0000"+p.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(d.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
|
149
|
+
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){d=eval("("+d+")");return typeof g==="function"?o({"":d},""):d}throw new SyntaxError("JSON.parse");}})();n.toJSON=function(h,m){if(typeof m=="undefined")m=null;return b.parse(h,m)};n.jSONToString=function(h,m,j){if(typeof m=="undefined")m=null;if(typeof j=="undefined")j=null;return b.stringify(h,m,j)}})(jQuery);require.def("jquery-plugins/jquery.json",function(){});require.resume();
|