📄 1533466593-widgets.js
字号:
var w_ea=false;function w_S(a){try{throw a;}catch(b){w_fa(b)}}function w_fa(a,b){var c="Javascript exception: "+(b?b:"")+" "+a;if(w_aa()){c+=" "+a.name+": "+a.message+" ("+a.number+")"}var d="";if(typeof a=="string"){d=a+"\n"}else{for(var e in a){try{d+=e+": "+a[e]+"\n"}catch(f){}}}d+=w_ca(w_fa.caller);w_Aa(c+"\n"+d,1)}var w_Ya=/function (\w+)/;function w_ya(a){var b=w_Ya.exec(String(a));if(b){return b[1]}return""}function w_ca(a){try{if(!w_aa()&&!(w_Q("safari")||w_Q("konqueror"))&&w_Q("mozilla")){return Error().stack}if(!a)return"";var b="- "+w_ya(a)+"(";for(var c=0;c<a.arguments.length;c++){if(c>0)b+=", ";var d=String(a.arguments[c]);if(d.length>40){d=d.substr(0,40)+"..."}b+=d}b+=")\n";b+=w_ca(a.caller);return b}catch(e){return"[Cannot get stack trace]: "+e+"\n"}}var w_Ba;var w_v=null,w_1=false;function w_za(){if((w_v==null||w_v.closed)&&!w_1){try{w_1=true;w_v=window.open("","debug","width=700,height=500,toolbar=no,resizable=yes,scrollbars=yes,left=16,top=16,screenx=16,screeny=16");w_v.blur();w_v.document.open();w_1=false;var a="<font color=#ff0000><b>To turn off this debugging window,hit 'D' inside the main caribou window, then close this window.</b></font><br>";w_da(a)}catch(b){}}}function w_Aa(a,b){if(!w_ea){if(typeof w_k!="undefined"){w_k(w_ja(a))}return}try{var c=(new Date).getTime()-w_Ba,d="["+c+"] "+w_ja(a).replace(/\n/g,"<br>")+"<br>";if(b==1){d="<font color=#ff0000><b>Error: "+d+"</b></font>";w_v.focus()}}catch(e){}w_da(d)}function w_da(a){if(!w_ea){return}try{w_za();w_v.document.write(a);w_v.scrollTo(0,1000000)}catch(b){}};function w_Q(a){if(a in w__){return w__[a]}return w__[a]=navigator.userAgent.toLowerCase().indexOf(a)!=-1}var w__={};function w_aa(){return w_Q("msie")&&!window.opera}function w_3a(a){if(typeof Error!="undefined"){throw new Error(a||"Assertion Failed");}else{throw a;}}function w_Ha(a){if(a===undefined)a="Assertion failed";if(typeof w_S!="undefined")w_S(a+"\n");w_3a(a)}function w_P(a,b){if(!a){if(b===undefined)b="Assertion failed";w_Ha(b)}}function w_ra(a,b){a.style.display=b?"":"none"}function w_Na(a,b){a.style.display=b?"block":"none"}function w_Oa(a,b){a.style.display=b?"inline":"none"}function w_l(a,b){if(a==null||a.className==null)return false;if(a.className==b){return true}var c=a.className.split(" ");for(var d=0;d<c.length;d++){if(c[d]==b){return true}}return false}function w_q(a,b){if(w_l(a,b))return;a.className+=" "+b}function w_y(a,b){if(a.className==null)return;if(a.className==b){a.className="";return}var c=a.className.split(" "),d=[],e=false;for(var f=0;f<c.length;f++){if(c[f]!=b){if(c[f]){d.push(c[f])}}else{e=true}}if(e){a.className=d.join(" ")}}function w_3(a,b){var c=[];for(var d=a.firstChild;d;d=d.nextSibling){w_$(d,b,c)}return c}function w_$(a,b,c){if(b.select(a)){c.push(a)}for(var d=a.firstChild;d;d=d.nextSibling){w_$(d,b,c)}}var w_Ua=/&/g,w_1a=/</g,w_0a=/>/g;function w_ja(a){if(!a)return"";return a.replace(w_Ua,"&").replace(w_1a,"<").replace(w_0a,">").replace(w_2a,""")}var w_2a=/\"/g;function w_Wa(a){return document.getElementById(a)}function w_Xa(a){return document.all[a]}var w_Va=document.getElementById?w_Wa:w_Xa;function w_k(a){try{if(window.parent!=window&&window.parent.log){window.parent.log(window.name+"::"+a);return}}catch(b){}var c=w_Va("log");if(c){var d="<p class=logentry><span class=logdate>"+new Date+"</span><span class=logmsg>"+a+"</span></p>";c.innerHTML=d+c.innerHTML}else{window.status=a}};function w_g(){}w_g.raise=function(a){if(typeof Error!="undefined"){throw new Error(a||"Assertion Failed");}else{throw a;}};w_g.fail=function(a){if(a===undefined)a="Assertion failed";if(!(w_S===undefined))w_S(a+"\n");w_g.raise(a)};w_g.isTrue=function(a,b){if(!a){if(b===undefined)b="Assertion failed";w_g.fail(b)}};w_g.equals=function(a,b,c){if(a!=b){if(c===undefined){c="AS_Assert.equals failed: <"+a+"> != <"+b+">"}w_g.fail(c)}};w_g.typeOf=function(a,b,c){if(typeof a==b)return;if(a||a==""){try{if(b==w_g.TYPE_MAP[typeof a]||a instanceof b){return}}catch(d){}}if(c===undefined){if(typeof b=="function"){var e=b.toString().match(/^\s*function\s+([^\s\{]+)/);if(e)b=e[1]}c="AS_Assert.typeOf failed: <"+a+"> not typeof "+b}w_g.fail(c)};w_g.TYPE_MAP={string:String,number:Number,"boolean":Boolean};w_g.numArgs=function(a,b){var c=w_g.numArgs.caller;if(c&&c.arguments.length!=a){if(b===undefined){b=c.name+" expected "+a+" arguments but received "+c.arguments.length}w_g.fail(b)}};var w_Z;function w_Ra(){var a=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];if(typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var b=0;b<a.length;b++){var c=a[b];try{new ActiveXObject(c);w_Z=c;break}catch(d){}}if(!w_Z){throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed.");}}}w_Ra();function w_Qa(){if(w_Z){return new ActiveXObject(w_Z)}else{return new XMLHttpRequest}}function w_Sa(a,b,c,d){a.open("POST",b,true);a.onreadystatechange=d;a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.setRequestHeader("Content-Length",c.length);w_Ta(a,c)}function w_Ta(a,b){try{a.send(b)}catch(c){w_k("XMLHttpSend failed "+c.toString()+"<br>"+c.stack);throw c;}};var w__a=0,w_9=0;if("undefined"==typeof w_k){w_k=function(){}}function w_ia(a){var b=-1;try{b=a.status}catch(c){}return b}function w_Ia(a){var b=null;try{b=a.statusText}catch(c){}return b}function w_Ja(a,b,c,d){if(a.readyState==4){try{var e=true;if(d){try{e=!(false===d(a))}catch(f){w_k("Message ("+b+") handling failed: "+f);throw f;}}var g=w_ia(a);if(200===g){w_k("Message ("+b+") received after "+((new Date).getTime()-c)+" ms");try{var h=(new Date).getTime();if(e&&a.responseText.length){eval(a.responseText)}w_k("Message ("+b+") processing took "+((new Date).getTime()-h)+" ms")}catch(f){w_k("Message ("+b+") processing failed: "+f);alert(f+"\n"+f.stack+"\n\n"+a.responseText);throw f;}}else if(204==g){w_k("Message ("+b+") received after "+((new Date).getTime()-c)+" ms")}else{w_k("Message ("+b+") failed with response "+g+" "+w_Ia(a)+" after "+((new Date).getTime()-c)+" ms.")}}finally{--w_9}}}function w_Ka(a,b,c){var d="";if(b){var e="";for(var f=0;f<b.length;){var g=b[f++],h=b[f++];d+=e+encodeURIComponent(g);e="&";if(null!==h&&undefined!==h){d+="="+encodeURIComponent(h.toString())}}}var i=++w__a,j=w_Qa(),k=(new Date).getTime(),n=function(){w_Ja(j,i,k,c)},l=a;for(var m=l.length+1;(m=l.lastIndexOf("&",m-1))>=0;){l=l.substring(0,m)+"&"+l.substring(m+1)}w_k("Message ("+i+") sent: POST <tt>"+l+"</tt>.");++w_9;w_Sa(j,a,d,n)};var w_Za=this;if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[],d,e;if(!a)a=w_Za;var f=b||[];for(var g=0;g<f.length;g++){c[g]="args["+g+"]"}e="oScope.__applyTemp__.peek()("+c.join(",")+");";if(!a.__applyTemp__){a.__applyTemp__=[]}a.__applyTemp__.push(this);d=eval(e);a.__applyTemp__.pop();return d}}if(!Array.prototype.push){Array.prototype.push=function(a){for(var b=0;b<arguments.length;b++){this[this.length]=arguments[b]}return this.length}}if(!Array.prototype.pop){Array.prototype.pop=function(){if(!this.length){return}var a=this[this.length-1];this.length--;return a}}Array.prototype.peek=function(){return this[this.length-1]};if(!Array.prototype.shift){Array.prototype.shift=function(){if(this.length==0){return}var a=this[0];for(var b=0;b<this.length-1;b++){this[b]=this[b+1]}this.length--;return a}}if(!Array.prototype.unshift){Array.prototype.unshift=function(a){var b=arguments.length;for(var c=this.length-1;c>=0;c--){this[c+b]=this[c]}for(var d=0;d<b;d++){this[d]=arguments[d]}return this.length}}if(!Array.prototype.forEach){Array.prototype.forEach=function(a,b){for(var c=0;c<this.length;c++){a.call(b,this[c],c,this)}}}function w_L(a,b){var c=a.Hb||[];c=c.concat(Array.prototype.slice.call(arguments,2));if(typeof a.rb!="undefined"){b=a.rb}if(typeof a.qb!="undefined"){a=a.qb}var d=function(){var e=c.concat(Array.prototype.slice.call(arguments));return a.apply(b,e)};d.Hb=c;d.rb=b;d.qb=a;return d}Function.prototype.bind=function(a){return w_L.apply(null,[this,a].concat(Array.prototype.slice.call(arguments,1)))};Function.prototype.inherits=function(a){var b=function(){};b.prototype=a.prototype;this.Vb=a.prototype;this.prototype=new b};function w_j(a,b,c,d,e,f){this.instanceId=a;this.sectionId=b;this.markups=c;if(d){this.rootElement=d}if(e){this.data=e}if(f){this.q=f;if(!w_j.IsValidDisplayMode(f)){throw"bad display mode: "+f;}}else{this.q=w_j.DISPLAY_MODE_NONE}this.isNew=false}w_j.IsValidDisplayMode=function(a){return a==w_j.DISPLAY_MODE_SNIPPET||a==w_j.DISPLAY_MODE_FULL||a==w_j.DISPLAY_MODE_LAYOUT||a==w_j.DISPLAY_MODE_NONE};w_j.DISPLAY_MODE_FULL="displayModeFull";w_j.DISPLAY_MODE_SNIPPET="displayModeSnippet";w_j.DISPLAY_MODE_LAYOUT="displayModeLayout";w_j.DISPLAY_MODE_NONE="displayModeNone";function w_b(a){this.Jb=true;this.ya=new w_t(this);this.e=a;this.s=null}w_b.DATA_NAMESPACE_PREFIX="data";w_b.ACTION_NAMESPACE_PREFIX="b";w_b.INTERPRET_ATTR_NAMESPACE_PREFIX="expr";w_b.prototype.Da=function(){var a=this.e.rootElement;a.innerHTML="";if(this.z()==w_j.DISPLAY_MODE_LAYOUT){a.appendChild(this.L("layout"))}else{a.appendChild(this.L("main"))}return a};w_b.prototype.ib=function(a){this.s=a};w_b.prototype.j=function(){return this.e};w_b.prototype.m=function(a){return document.getElementById(this.e.instanceId+"_"+a)};w_b.prototype.A=function(a){var b=this.m(a);if(!b){throw"did not find element for id "+a;}return b};w_b.prototype.i=function(){return this.e.data};w_b.prototype.ia=function(a){return this.e.data=a};w_b.prototype.Va=function(){return this.e.isNew};w_b.prototype.hb=function(a){return this.e.isNew=a};w_b.prototype.L=function(a,b){var c=b;if(!c){c=this.i()}if(!c){c={}}var d=new w_i;d.w("widget",this.Ka());d.za(c);var e=this.Z(a,d,w_i.DEFAULT_DICTIONARY_KEY);return this.Y(e,document)};w_b.prototype.Ka=function(){var a={};a.type=this.s.d();a.instanceId=this.e.instanceId;a.sectionId=this.e.sectionId;a.actionUrl=w_.qa;var b=w_.sb+"&widgetType="+this.s.d()+"&widgetId="+this.e.instanceId+"&action="+w_.EDIT_WIDGET_ACTION;a.quickEditUrl=b;return a};w_b.prototype.Z=function(a,b,c){var d=this.Pa(a);w_g.isTrue(d!=null,"Markup chunk not found for "+a);var e=d.varName?d.varName:"",f=b.i(c);w_g.isTrue(f!=null,"No data found for call: "+c);b.w(e,f);var g=this.D(d.rootNode,b);b.fa(e);return g};w_b.prototype.D=function(a,b){w_g.isTrue(a!=null,"Null node");var c=a;if(a.attributes){var d=[],e=[];for(var f=0;f<a.attributes.length;f++){var g=a.attributes.item(f),h=this.Za(g,b);if(g!=h){e[e.length]=g.nodeName;d[d.length]=h}}for(var f=0;f<e.length;f++){a.attributes.removeNamedItem(e[f])}for(var f=0;f<d.length;f++){a.attributes.setNamedItem(d[f])}}if(a.nodeType==1){if(a.prefix==w_b.ACTION_NAMESPACE_PREFIX){c=this.Ta(a,b)}else if(a.prefix==w_b.DATA_NAMESPACE_PREFIX){c=this.Sa(a,b)}}if(a.hasChildNodes()){var i=a.ownerDocument.createDocumentFragment();while(a.hasChildNodes()){var j=a.firstChild,k=this.D(j,b);i.appendChild(k);if(j!=k){a.removeChild(j)}}c.appendChild(i)}return c};w_b.prototype.Za=function(a,b){if(a.prefix==w_b.INTERPRET_ATTR_NAMESPACE_PREFIX){var c=a.ownerDocument.createAttribute(a.localName||a.baseName),d=this.ya.U(a.nodeValue,b);c.nodeValue=d;return c}return a};w_b.prototype.Ta=function(a,b){var c=a.localName||a.baseName,d=this.ha(c,a,b);return this.ob(d)};w_b.prototype.ob=function(a){var b=a;if(!a){return document.createDocumentFragment()}if(!a.nodeType){b=document.createTextNode(a)}if(b.nodeType==3){var c=document.createDocumentFragment();c.appendChild(b);b=c}return b};w_b.prototype.I=function(a,b){var c=this.F(a);return b.i(c[1])};w_b.prototype.Sa=function(a,b){w_g.isTrue(a!=null,"Null element");w_g.isTrue(b!=null,"Null data");if(a.prefix!=w_b.DATA_NAMESPACE_PREFIX){return a}var c=this.I(a.tagName,b),d=""+(c==null?"":c),e=document.createElement("span");e.innerHTML=d;var f=this.C(e);return this.Y(f,a.ownerDocument,true)};w_b.prototype.F=function(a){var b=a.split(":",2);if(b.length==1){b.unshift("")}b[0]=b[0].toLowerCase();return b};w_b.prototype.ha=function(a,b,c){var d="_WidgetBinding_"+a;if(this.ya[d]){return this.ya[d](b,c)}if(this.s[d]){return this.s[d](b,c)}w_g.isTrue(false,"could not find binding "+a);return null};w_b.prototype.Ya=function(a){if(a==null)return null;var b;if(window.ActiveXObject){b=new ActiveXObject("Microsoft.XMLDOM");b.async="false";if(!b.loadXML(a)){throw new Error(b.parseError);}}else if(window.DOMParser){var c=new DOMParser;b=c.parseFromString(a,"text/xml");if(b.documentElement.nodeName=="parsererror"){throw new Error(b.documentElement.textContent);}}else{w_g.raise("Unable to find XML parser")}return b.documentElement};w_b.prototype.C=function(a){var b=a.ownerDocument.createDocumentFragment();while(a.hasChildNodes()){b.appendChild(a.firstChild)}return b};w_b.prototype.Y=function(a,b,c){w_g.isTrue(a!=null);if(b.importNode){return b.importNode(a,true)}if(!c){var d=b.createElement("span"),e=a.innerHTML||a.xml;d.innerHTML=e;return this.C(d)}var f=function(g){var h;if(g.nodeType==1){if(g.nodeName=="SCRIPT")return document.createTextNode("");h=b.createElement(g.nodeName);if(g.style){h.setAttribute("style",g.style.cssText)}if(g.currentStyle.height){h.setAttribute("height",g.currentStyle.height)}if(g.currentStyle.width){h.setAttribute("width",g.currentStyle.width)}for(var i=0;i<g.attributes.length;i++){var j=g.attributes[i];if(j.value&&j.value!="null"&&j.value!="false"&&j.value!="0"){h.setAttribute(j.name,j.value)}}}else if(g.nodeType==3){h=b.createTextNode(g.nodeValue)}else if(g.nodeType==11){h=b.createDocumentFragment()}else{w_g.raise("unexpected node type "+g.nodeType)}if(g.hasChildNodes()){for(var i=0;i<g.childNodes.length;i++){h.appendChild(f(g.childNodes[i]))}}return h};return f(a)};w_b.prototype.p=function(a,b){var c=this.s,d=function(e){if(c.ActionCallback)return c.ActionCallback(e);else return true};w_.p(a,b,this.e.instanceId,this.s.d(),d)};w_b.prototype.z=function(){return this.e.q};w_b.prototype.Pa=function(a){if(!a)return null;var b=w_.xa[a];if(!b){b=this.e.markups[a]}if(!b)return null;if(!b.parsedTemplate||!b.parsedTemplate.ownerDocument){this.Xa(b)}if(!b.parsedTemplate){w_g.raise("Parsing failed for "+a)}b.rootNode=b.parsedTemplate.cloneNode(true);return b};w_b.prototype.Xa=function(a){if(!a)return null;var b="<?xml version='1.0'?><markuproot xmlns:"+w_b.DATA_NAMESPACE_PREFIX+"='urn:ns1' xmlns:"+w_b.ACTION_NAMESPACE_PREFIX+"='urn:ns2' xmlns:"+w_b.INTERPRET_ATTR_NAMESPACE_PREFIX+"='urn:ns3' xmlns='http://www.w3.org/1999/xhtml'>"+a.template+"</markuproot>\n",c=this.Ya(b);a.parsedTemplate=this.C(c);return a};w_b.ConfigureWidget=function(a,b){if(!b){b="config"}var c=document.forms[b].widgetId.value,d=document.forms[b].widgetType.value,e=w_e.ProcessForm(document.forms[b],a);if(e.success){w_.SaveWidget(e.values,c,d)}};function w_(){}w_.Init=function(a,b,c){w_.v={};w_.sb=a;w_.qa=b;w_.Ub=c;w_.ub=null;if(!w_.xa){w_.xa={}}};w_.TrapClicks=function(a){var b;try{b=a.document.getElementsByTagName("A")}catch(c){return}for(var d=0;d<b.length;d++){b[d].onclick=w_.B}var e=a.document.getElementsByTagName("FORM");for(var d=0;d<e.length;d++){e[d].onsubmit=w_.B}for(var d=0;d<a.frames.length;d++){w_.TrapClicks(a.frames[d])}};w_._SetupPreview=function(){w_.TrapClicks(window)};w_.NEW_WIDGET_WINDOW_NAME="chooseWidget";w_.CHOOSE_WIDGET_ACTION="chooseWidget";w_.EDIT_WIDGET_ACTION="editWidget";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -