chore: 添加多个图片和资源文件

添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
This commit is contained in:
2025-06-15 13:04:37 +08:00
parent 1e61dc3970
commit 7e47ce238b
13220 changed files with 1377028 additions and 0 deletions
+121
View File
@@ -0,0 +1,121 @@
var CreatedOKLodop7766=null;
//====判断是否需要安装CLodop云打印服务器:====
function needCLodop(){
try{
var ua=navigator.userAgent;
if (ua.match(/Windows\sPhone/i) !=null) return true;
if (ua.match(/iPhone|iPod/i) != null) return true;
if (ua.match(/Android/i) != null) return true;
if (ua.match(/Edge\D?\d+/i) != null) return true;
var verTrident=ua.match(/Trident\D?\d+/i);
var verIE=ua.match(/MSIE\D?\d+/i);
var verOPR=ua.match(/OPR\D?\d+/i);
var verFF=ua.match(/Firefox\D?\d+/i);
var x64=ua.match(/x64/i);
if ((verTrident==null)&&(verIE==null)&&(x64!==null))
return true; else
if ( verFF !== null) {
verFF = verFF[0].match(/\d+/);
if ((verFF[0]>= 41)||(x64!==null)) return true;
} else
if ( verOPR !== null) {
verOPR = verOPR[0].match(/\d+/);
if ( verOPR[0] >= 32 ) return true;
} else
if ((verTrident==null)&&(verIE==null)) {
var verChrome=ua.match(/Chrome\D?\d+/i);
if ( verChrome !== null ) {
verChrome = verChrome[0].match(/\d+/);
if (verChrome[0]>=41) return true;
};
};
return false;
} catch(err) {return true;};
};
//====页面引用CLodop云打印必须的JS文件:====
if (needCLodop()) {
var head = document.head || document.getElementsByTagName("head")[0] || document.documentElement;
var oscript = document.createElement("script");
oscript.src ="http://localhost:8000/CLodopfuncs.js?priority=1";
head.insertBefore( oscript,head.firstChild );
//引用双端口(8000和18000)避免其中某个被占用:
oscript = document.createElement("script");
oscript.src ="http://localhost:18000/CLodopfuncs.js?priority=0";
head.insertBefore( oscript,head.firstChild );
};
//====获取LODOP对象的主过程:====
function getLodop(oOBJECT,oEMBED){
var strHtmInstall="<br><font color='#FF00FF'>打印控件未安装!点击这里<a href='CLodop/install_lodop32.exe' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>";
var strHtmUpdate="<br><font color='#FF00FF'>打印控件需要升级!点击这里<a href='CLodop/install_lodop32.exe' target='_self'>执行升级</a>,升级后请重新进入。</font>";
var strHtm64_Install="<br><font color='#FF00FF'>打印控件未安装!点击这里<a href='CLodop/install_lodop64.exe' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>";
var strHtm64_Update="<br><font color='#FF00FF'>打印控件需要升级!点击这里<a href='CLodop/install_lodop64.exe' target='_self'>执行升级</a>,升级后请重新进入。</font>";
var strHtmFireFox="<br><br><font color='#FF00FF'>(注意:如曾安装过Lodop旧版附件npActiveXPLugin,请在【工具】->【附加组件】->【扩展】中先卸它)</font>";
var strHtmChrome="<br><br><font color='#FF00FF'>(如果此前正常,仅因浏览器升级或重安装而出问题,需重新执行以上安装)</font>";
var strCLodopInstall="<br><font color='#FF00FF'>CLodop云打印服务(localhost本地)未安装启动!点击这里<a href='CLodop/CLodop_Setup_for_Win32NT.exe' target='_self'>执行安装</a>,安装后请刷新页面。</font>";
var strCLodopUpdate="<br><font color='#FF00FF'>CLodop云打印服务需升级!点击这里<a href='CLodop/CLodop_Setup_for_Win32NT.exe' target='_self'>执行升级</a>,升级后请刷新页面。</font>";
var LODOP;
try{
var isIE = (navigator.userAgent.indexOf('MSIE')>=0) || (navigator.userAgent.indexOf('Trident')>=0);
if (needCLodop()) {
try{ LODOP=getCLodop();} catch(err) {};
if (!LODOP && document.readyState!=="complete") {alert("C-Lodop没准备好,请稍后再试!"); return;};
if (!LODOP) {
if (isIE) document.write(strCLodopInstall); else
document.body.innerHTML=strCLodopInstall+document.body.innerHTML;
return;
} else {
if (CLODOP.CVERSION<"3.0.3.7") {
if (isIE) document.write(strCLodopUpdate); else
document.body.innerHTML=strCLodopUpdate+document.body.innerHTML;
};
if (oEMBED && oEMBED.parentNode) oEMBED.parentNode.removeChild(oEMBED);
if (oOBJECT && oOBJECT.parentNode) oOBJECT.parentNode.removeChild(oOBJECT);
};
} else {
var is64IE = isIE && (navigator.userAgent.indexOf('x64')>=0);
//=====如果页面有Lodop就直接使用,没有则新建:==========
if (oOBJECT!=undefined || oEMBED!=undefined) {
if (isIE) LODOP=oOBJECT; else LODOP=oEMBED;
} else if (CreatedOKLodop7766==null){
LODOP=document.createElement("object");
LODOP.setAttribute("width",0);
LODOP.setAttribute("height",0);
LODOP.setAttribute("style","position:absolute;left:0px;top:-100px;width:0px;height:0px;");
if (isIE) LODOP.setAttribute("classid","clsid:2105C259-1E0C-4534-8141-A753534CB4CA");
else LODOP.setAttribute("type","application/x-print-lodop");
document.documentElement.appendChild(LODOP);
CreatedOKLodop7766=LODOP;
} else LODOP=CreatedOKLodop7766;
//=====Lodop插件未安装时提示下载地址:==========
if ((LODOP==null)||(typeof(LODOP.VERSION)=="undefined")) {
if (navigator.userAgent.indexOf('Chrome')>=0)
document.body.innerHTML=strHtmChrome+document.body.innerHTML;
if (navigator.userAgent.indexOf('Firefox')>=0)
document.body.innerHTML=strHtmFireFox+document.body.innerHTML;
if (is64IE) document.write(strHtm64_Install); else
if (isIE) document.write(strHtmInstall); else
document.body.innerHTML=strHtmInstall+document.body.innerHTML;
return LODOP;
};
};
if (LODOP.VERSION<"6.2.2.1") {
if (!needCLodop()){
if (is64IE) document.write(strHtm64_Update); else
if (isIE) document.write(strHtmUpdate); else
document.body.innerHTML=strHtmUpdate+document.body.innerHTML;
};
return LODOP;
};
//===如下空白位置适合调用统一功能(如注册语句、语言选择等):===
//===========================================================
return LODOP;
} catch(err) {alert("getLodop出错:"+err);};
};
+1
View File
File diff suppressed because one or more lines are too long
+2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

+167
View File
@@ -0,0 +1,167 @@
/*!
* jQuery JavaScript Library v1.4.4
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Thu Nov 11 19:04:53 2010 -0500
*/
(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h=
h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;k<J.length;k++){h=J[k];h.origType.replace(X,"")===a.type?f.push(h.selector):J.splice(k--,1)}f=c(a.target).closest(f,a.currentTarget);o=0;for(x=f.length;o<x;o++){r=f[o];for(k=0;k<J.length;k++){h=J[k];if(r.selector===h.selector&&(!A||A.test(h.namespace))){l=r.elem;e=null;if(h.preType==="mouseenter"||
h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==l)C.push({elem:l,handleObj:h,level:r.level})}}}o=0;for(x=C.length;o<x;o++){f=C[o];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La,
"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,
"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+
a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j,
s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,
j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},
toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false;
if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){H=false;v=v&&b.isArray(v)?v:[]}else v=v&&b.isPlainObject(v)?v:{};G[s]=b.extend(ga,v,z)}else if(z!==B)G[s]=z}return G};b.extend({noConflict:function(j){E.$=e;if(j)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(j){j===true&&b.readyWait--;
if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload",
b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&
l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H<G;){if(s.apply(j[H++],v)===false)break}else if(K)for(z in j){if(s.call(j[z],
z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=null){var z=b.type(j);j.length==null||z==="string"||z==="function"||z==="regexp"||b.isWindow(j)?M.call(v,j):b.merge(v,j)}return v},inArray:function(j,s){if(s.indexOf)return s.indexOf(j);for(var v=0,z=s.length;v<z;v++)if(s[v]===j)return v;return-1},merge:function(j,
s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v=
s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)||
[];return{browser:j[1]||"",version:j[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(j,s){R["[object "+s+"]"]=s.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(D)b.inArray=function(j,s){return D.call(s,j)};if(!/\s/.test("\u00a0")){k=/^[\s\xA0]+/;o=/[\s\xA0]+$/}f=b(t);if(t.addEventListener)u=function(){t.removeEventListener("DOMContentLoaded",u,
false);b.ready()};else if(t.attachEvent)u=function(){if(t.readyState==="complete"){t.detachEvent("onreadystatechange",u);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,
scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent=
false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom=
1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display=
"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h=
c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);
else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h<l;h++){f=e[h].name;if(f.indexOf("data-")===0){f=f.substr(5);ka(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this,
a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),x=[k[0],b];o.triggerHandler("setData"+k[1]+"!",x);c.data(this,a,b);o.triggerHandler("changeData"+k[1]+"!",x)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=
c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:href|src|style)$/,Ua=/^(?:button|input)$/i,Va=/^(?:button|input|object|select|textarea)$/i,Wa=/^a(?:rea)?$/i,ta=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",
colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===
1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "),
l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,l=c(this),k=b,o=a.split(ha);f=o[h++];){k=e?k:!l.hasClass(f);l[k?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,
"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";
if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r=
a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&
b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,
arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid=
d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h<A.length;h++){C=A[h];if(d.guid===C.guid){if(k||x.test(C.namespace)){e==null&&A.splice(h--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(A.length===0||e!=null&&A.length===1){if(!r.teardown||r.teardown.call(a,o)===false)c.removeEvent(a,f,w.handle);delete I[f]}}else for(h=0;h<A.length;h++){C=A[h];if(k||x.test(C.namespace)){c.event.remove(a,r,C.handler,h);A.splice(h--,1)}}}if(c.isEmptyObject(I)){if(b=
w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,J);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k===
"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+
d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f<l;f++){var k=d[f];if(b||e.test(k.namespace)){a.handler=k.handler;a.data=k.data;a.handleObj=k;k=k.handler.apply(this,h);if(k!==B){a.result=k;if(k===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||t;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=t.documentElement;d=t.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ca;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ca;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ca;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
xa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type===
"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]===
0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d=
1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var ya={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var l,k=0,o,x,r=h||this.selector;h=h?this:c(this.context);if(typeof d===
"object"&&!d.preventDefault){for(l in d)h[b](l,e,d[l],r);return this}if(c.isFunction(e)){f=e;e=B}for(d=(d||"").split(" ");(l=d[k++])!=null;){o=X.exec(l);x="";if(o){x=o[0];l=l.replace(X,"")}if(l==="hover")d.push("mouseenter"+x,"mouseleave"+x);else{o=l;if(l==="focus"||l==="blur"){d.push(ya[l]+x);l+=x}else l=(ya[l]||l)+x;if(b==="live"){x=0;for(var A=h.length;x<A;x++)c.event.add(h[x],"live."+Y(l,r),{data:e,selector:r,handler:f,origType:l,origHandler:f,preType:o})}else h.unbind("live."+Y(l,r),f)}}return this}});
c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1&&!q){y.sizcache=n;y.sizset=p}if(y.nodeName.toLowerCase()===i){F=y;break}y=y[g]}m[p]=F}}}function b(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1){if(!q){y.sizcache=n;y.sizset=p}if(typeof i!=="string"){if(y===i){F=true;break}}else if(k.filter(i,
[y]).length>0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3];
break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr,
q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h=
l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*"));
return{set:m,expr:g}};k.filter=function(g,i,n,m){for(var p,q,u=g,y=[],F=i,M=i&&i[0]&&k.isXML(i[0]);g&&i.length;){for(var N in o.filter)if((p=o.leftMatch[N].exec(g))!=null&&p[2]){var O,D,R=o.filter[N];D=p[1];q=false;p.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(F===y)y=[];if(o.preFilter[N])if(p=o.preFilter[N](p,F,n,y,m,M)){if(p===true)continue}else q=O=true;if(p)for(var j=0;(D=F[j])!=null;j++)if(D){O=R(D,p,j,F);var s=m^!!O;if(n&&O!=null)if(s)q=true;else F[j]=false;else if(s){y.push(D);q=true}}if(O!==
B){n||(F=y);g=g.replace(o.match[N],"");if(!q)return[];break}}}if(g===u)if(q==null)k.error(g);else break;u=g}return F};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var o=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,i){var n=typeof i==="string",m=n&&!/\W/.test(i);n=n&&!m;if(m)i=i.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=n||q&&q.nodeName.toLowerCase()===
i?q||false:q===i}n&&k.filter(i,g,true)},">":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p<q;p++){if(n=g[p]){n=n.parentNode;g[p]=n.nodeName.toLowerCase()===i?n:false}}else{for(;p<q;p++)if(n=g[p])g[p]=m?n.parentNode:n.parentNode===i;m&&k.filter(i,g,true)}},"":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=i=i.toLowerCase();q=a}q("parentNode",i,p,g,m,n)},"~":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=
i=i.toLowerCase();q=a}q("previousSibling",i,p,g,m,n)}},find:{ID:function(g,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){for(var n=[],m=i.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&n.push(m[p]);return n.length===0?null:n}},TAG:function(g,i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,n,m,p,q){g=" "+g[1].replace(/\\/g,
"")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return i<n[3]-0},gt:function(g,i,n){return i>n[3]-0},nth:function(g,i,n){return n[3]-
0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n<m;n++)if(i[n]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,i){var n=i[1],m=g;switch(n){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(n===
"first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":n=i[2];var p=i[3];if(n===1&&p===0)return true;var q=i[0],u=g.parentNode;if(u&&(u.sizcache!==q||!g.nodeIndex)){var y=0;for(m=u.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++y;u.sizcache=q}m=g.nodeIndex-p;return n===0?m===0:m%n===0&&m/n>=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]];
if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m,
g);else if(typeof g.length==="number")for(var p=g.length;n<p;n++)m.push(g[n]);else for(;g[n];n++)m.push(g[n]);return m}}var w,I;if(t.documentElement.compareDocumentPosition)w=function(g,i){if(g===i){h=true;return 0}if(!g.compareDocumentPosition||!i.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(i)&4?-1:1};else{w=function(g,i){var n,m,p=[],q=[];n=g.parentNode;m=i.parentNode;var u=n;if(g===i){h=true;return 0}else if(n===m)return I(g,i);else if(n){if(!m)return 1}else return-1;
for(;u;){p.unshift(u);u=u.parentNode}for(u=m;u;){q.unshift(u);u=u.parentNode}n=p.length;m=q.length;for(u=0;u<n&&u<m;u++)if(p[u]!==q[u])return I(p[u],q[u]);return u===n?I(g,q[u],-1):I(p[u],i,1)};I=function(g,i,n){if(g===i)return n;for(g=g.nextSibling;g;){if(g===i)return-1;g=g.nextSibling}return 1}}k.getText=function(g){for(var i="",n,m=0;g[m];m++){n=g[m];if(n.nodeType===3||n.nodeType===4)i+=n.nodeValue;else if(n.nodeType!==8)i+=k.getText(n.childNodes)}return i};(function(){var g=t.createElement("div"),
i="script"+(new Date).getTime(),n=t.documentElement;g.innerHTML="<a name='"+i+"'/>";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g);
n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&&
function(){var g=k,i=t.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F||
p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g=
t.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition?
function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n<u;n++)k(g,q[n],m);return k.filter(p,m)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=k.getText;c.isXMLDoc=k.isXML;
c.contains=k.contains})();var Za=/Until$/,$a=/^(?:parents|prevUntil|prevAll)/,ab=/,/,Na=/^.[^:#\[\.,]*$/,bb=Array.prototype.slice,cb=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var l=0;l<d;l++)if(b[l]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},
not:function(a){return this.pushStack(ma(this,a,false),"not",a)},filter:function(a){return this.pushStack(ma(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h=
h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(l?l.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&
e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={option:[1,
"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=
c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,l=a[0],k=[];if(!c.support.checkClone&&arguments.length===3&&typeof l==="string"&&Da.test(l))return this.each(function(){c(this).domManip(a,
b,d,true)});if(c.isFunction(l))return this.each(function(x){var r=c(this);a[0]=l.call(this,x,b?r.html():B);r.domManip(a,b,d)});if(this[0]){e=l&&l.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);h=e.fragment;if(f=h.childNodes.length===1?h=h.firstChild:h.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var o=this.length;f<o;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):
this[f]:this[f],f>0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",
prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f<h;f++){var l=(f>0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||
b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1></$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]==="<table>"&&!x?r.childNodes:[];for(o=k.length-
1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));
d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,
zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),
h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b);
if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=
d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left;
e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b===
"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("<div>").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&
!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},
getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",
script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||
!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache=
false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset;
A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type",
b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&&
c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d||
c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]=
encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",
[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),
e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});
if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",
3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",qa(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c.data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",
d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,
d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),l,k=this.nodeType===1,o=k&&c(this).is(":hidden"),x=this;for(l in a){var r=c.camelCase(l);if(l!==r){a[r]=a[l];delete a[l];l=r}if(a[l]==="hide"&&o||a[l]==="show"&&!o)return h.complete.call(this);if(k&&(l==="height"||l==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(qa(this.nodeName)===
"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[l])){(h.specialEasing=h.specialEasing||{})[l]=a[l][1];a[l]=a[l][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(A,C){var J=new c.fx(x,h,A);if(vb.test(C))J[C==="toggle"?o?"show":"hide":C](a);else{var w=wb.exec(C),I=J.cur()||0;if(w){var L=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(x,A,(L||1)+g);I=(L||
1)/J.cur()*I;c.style(x,A,I+g)}if(w[1])L=(w[1]==="-="?-1:1)*L+I;J.custom(I,L,g)}else J.custom(I,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)}
var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;
this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||
this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=
c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ba);ba=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===
b.elem}).length};var xb=/^t(?:able|d|h)$/i,Ia=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(l){c.offset.setOffset(this,a,l)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=fa(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(x){c.offset.setOffset(this,a,x)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b.ownerDocument,h=f.documentElement,l=f.body;d=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;
for(var k=b.offsetTop,o=b.offsetLeft;(b=b.parentNode)&&b!==l&&b!==h;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=f?f.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;o-=b.scrollLeft;if(b===e){k+=b.offsetTop;o+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&xb.test(b.nodeName))){k+=parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"){k+=
parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){k+=l.offsetTop;o+=l.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){k+=Math.max(h.scrollTop,l.scrollTop);o+=Math.max(h.scrollLeft,l.scrollLeft)}return{top:k,left:o}};c.offset={initialize:function(){var a=t.body,b=t.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",
height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a,
e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();
c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+
b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window);
@@ -0,0 +1,48 @@
.ac_results {
padding: 0px;
border: 1px solid black;
background-color: white;
overflow: hidden;
z-index: 99999;
}
.ac_results ul {
width: 100%;
list-style-position: outside;
list-style: none;
padding: 0;
margin: 0;
}
.ac_results li {
margin: 0px;
padding: 2px 5px;
cursor: default;
display: block;
/*
if width will be 100% horizontal scrollbar will apear
when scroll mode will be used
*/
/*width: 100%;*/
font: menu;
font-size: 12px;
/*
it is very important, if line-height not setted or setted
in relative units scroll will be broken in firefox
*/
line-height: 16px;
overflow: hidden;
}
.ac_loading {
background: white url('indicator.gif') right center no-repeat;
}
.ac_odd {
background-color: #eee;
}
.ac_over {
background-color: #0A246A;
color: white;
}
@@ -0,0 +1,759 @@
/*
* Autocomplete - jQuery plugin 1.0.2
*
* Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.autocomplete.js 5747 2008-06-25 18:30:55Z joern.zaefferer $
*
*/
;(function($) {
$.fn.extend({
autocomplete: function(urlOrData, options) {
var isUrl = typeof urlOrData == "string";
options = $.extend({}, $.Autocompleter.defaults, {
url: isUrl ? urlOrData : null,
data: isUrl ? null : urlOrData,
delay: isUrl ? $.Autocompleter.defaults.delay : 10,
max: options && !options.scroll ? 10 : 150
}, options);
// if highlight is set to false, replace it with a do-nothing function
options.highlight = options.highlight || function(value) { return value; };
// if the formatMatch option is not specified, then use formatItem for backwards compatibility
options.formatMatch = options.formatMatch || options.formatItem;
return this.each(function() {
new $.Autocompleter(this, options);
});
},
result: function(handler) {
return this.bind("result", handler);
},
search: function(handler) {
return this.trigger("search", [handler]);
},
flushCache: function() {
return this.trigger("flushCache");
},
setOptions: function(options){
return this.trigger("setOptions", [options]);
},
unautocomplete: function() {
return this.trigger("unautocomplete");
}
});
$.Autocompleter = function(input, options) {
var KEY = {
UP: 38,
DOWN: 40,
DEL: 46,
TAB: 9,
RETURN: 13,
ESC: 27,
COMMA: 188,
PAGEUP: 33,
PAGEDOWN: 34,
BACKSPACE: 8
};
// Create $ object for input element
var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
var timeout;
var previousValue = "";
var cache = $.Autocompleter.Cache(options);
var hasFocus = 0;
var lastKeyPressCode;
var config = {
mouseDownOnSelect: false
};
var select = $.Autocompleter.Select(options, input, selectCurrent, config);
var blockSubmit;
// prevent form submit in opera when selecting with return key
$.browser.opera && $(input.form).bind("submit.autocomplete", function() {
if (blockSubmit) {
blockSubmit = false;
return false;
}
});
// only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
$input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) {
// track last key pressed
lastKeyPressCode = event.keyCode;
switch(event.keyCode) {
case KEY.UP:
event.preventDefault();
if ( select.visible() ) {
select.prev();
} else {
onChange(0, true);
}
break;
case KEY.DOWN:
event.preventDefault();
if ( select.visible() ) {
select.next();
} else {
onChange(0, true);
}
break;
case KEY.PAGEUP:
event.preventDefault();
if ( select.visible() ) {
select.pageUp();
} else {
onChange(0, true);
}
break;
case KEY.PAGEDOWN:
event.preventDefault();
if ( select.visible() ) {
select.pageDown();
} else {
onChange(0, true);
}
break;
// matches also semicolon
case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:
case KEY.TAB:
case KEY.RETURN:
if( selectCurrent() ) {
// stop default to prevent a form submit, Opera needs special handling
event.preventDefault();
blockSubmit = true;
return false;
}
break;
case KEY.ESC:
select.hide();
break;
default:
clearTimeout(timeout);
timeout = setTimeout(onChange, options.delay);
break;
}
}).focus(function(){
// track whether the field has focus, we shouldn't process any
// results if the field no longer has focus
hasFocus++;
}).blur(function() {
hasFocus = 0;
if (!config.mouseDownOnSelect) {
hideResults();
}
}).click(function() {
// show select when clicking in a focused field
if ( hasFocus++ > 1 && !select.visible() ) {
onChange(0, true);
}
}).bind("search", function() {
// TODO why not just specifying both arguments?
var fn = (arguments.length > 1) ? arguments[1] : null;
function findValueCallback(q, data) {
var result;
if( data && data.length ) {
for (var i=0; i < data.length; i++) {
if( data[i].result.toLowerCase() == q.toLowerCase() ) {
result = data[i];
break;
}
}
}
if( typeof fn == "function" ) fn(result);
else $input.trigger("result", result && [result.data, result.value]);
}
$.each(trimWords($input.val()), function(i, value) {
request(value, findValueCallback, findValueCallback);
});
}).bind("flushCache", function() {
cache.flush();
}).bind("setOptions", function() {
$.extend(options, arguments[1]);
// if we've updated the data, repopulate
if ( "data" in arguments[1] )
cache.populate();
}).bind("unautocomplete", function() {
select.unbind();
$input.unbind();
$(input.form).unbind(".autocomplete");
});
function selectCurrent() {
var selected = select.selected();
if( !selected )
return false;
var v = selected.result;
previousValue = v;
if ( options.multiple ) {
var words = trimWords($input.val());
if ( words.length > 1 ) {
v = words.slice(0, words.length - 1).join( options.multipleSeparator ) + options.multipleSeparator + v;
}
v += options.multipleSeparator;
}
$input.val(v);
hideResultsNow();
$input.trigger("result", [selected.data, selected.value]);
return true;
}
function onChange(crap, skipPrevCheck) {
if( lastKeyPressCode == KEY.DEL ) {
select.hide();
return;
}
var currentValue = $input.val();
if ( !skipPrevCheck && currentValue == previousValue )
return;
previousValue = currentValue;
currentValue = lastWord(currentValue);
if ( currentValue.length >= options.minChars) {
$input.addClass(options.loadingClass);
if (!options.matchCase)
currentValue = currentValue.toLowerCase();
request(currentValue, receiveData, hideResultsNow);
} else {
stopLoading();
select.hide();
}
};
function trimWords(value) {
if ( !value ) {
return [""];
}
var words = value.split( options.multipleSeparator );
var result = [];
$.each(words, function(i, value) {
if ( $.trim(value) )
result[i] = $.trim(value);
});
return result;
}
function lastWord(value) {
if ( !options.multiple )
return value;
var words = trimWords(value);
return words[words.length - 1];
}
// fills in the input box w/the first match (assumed to be the best match)
// q: the term entered
// sValue: the first matching result
function autoFill(q, sValue){
// autofill in the complete box w/the first match as long as the user hasn't entered in more data
// if the last user key pressed was backspace, don't autofill
if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) {
// fill in the value (keep the case the user has typed)
$input.val($input.val() + sValue.substring(lastWord(previousValue).length));
// select the portion of the value not typed by the user (so the next character will erase)
$.Autocompleter.Selection(input, previousValue.length, previousValue.length + sValue.length);
}
};
function hideResults() {
clearTimeout(timeout);
timeout = setTimeout(hideResultsNow, 200);
};
function hideResultsNow() {
var wasVisible = select.visible();
select.hide();
clearTimeout(timeout);
stopLoading();
if (options.mustMatch) {
// call search and run callback
$input.search(
function (result){
// if no value found, clear the input box
if( !result ) {
if (options.multiple) {
var words = trimWords($input.val()).slice(0, -1);
$input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
}
else
$input.val( "" );
}
}
);
}
if (wasVisible)
// position cursor at end of input field
$.Autocompleter.Selection(input, input.value.length, input.value.length);
};
function receiveData(q, data) {
if ( data && data.length && hasFocus ) {
stopLoading();
select.display(data, q);
autoFill(q, data[0].value);
select.show();
} else {
hideResultsNow();
}
};
function request(term, success, failure) {
if (!options.matchCase)
term = term.toLowerCase();
var data = cache.load(term);
// recieve the cached data
if (data && data.length) {
success(term, data);
// if an AJAX url has been supplied, try loading the data now
} else if( (typeof options.url == "string") && (options.url.length > 0) ){
var extraParams = {
timestamp: +new Date()
};
$.each(options.extraParams, function(key, param) {
extraParams[key] = typeof param == "function" ? param() : param;
});
$.ajax({
// try to leverage ajaxQueue plugin to abort previous requests
mode: "abort",
// limit abortion to this input
port: "autocomplete" + input.name,
dataType: options.dataType,
url: options.url,
data: $.extend({
q: lastWord(term),
limit: options.max
}, extraParams),
success: function(data) {
var parsed = options.parse && options.parse(data) || parse(data);
cache.add(term, parsed);
success(term, parsed);
}
});
} else {
// if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
select.emptyList();
failure(term);
}
};
function parse(data) {
var parsed = [];
var rows = data.split("\n");
for (var i=0; i < rows.length; i++) {
var row = $.trim(rows[i]);
if (row) {
row = row.split("|");
parsed[parsed.length] = {
data: row,
value: row[0],
result: options.formatResult && options.formatResult(row, row[0]) || row[0]
};
}
}
return parsed;
};
function stopLoading() {
$input.removeClass(options.loadingClass);
};
};
$.Autocompleter.defaults = {
inputClass: "ac_input",
resultsClass: "ac_results",
loadingClass: "ac_loading",
minChars: 1,
delay: 400,
matchCase: false,
matchSubset: true,
matchContains: false,
cacheLength: 10,
max: 100,
mustMatch: false,
extraParams: {},
selectFirst: true,
formatItem: function(row) { return row[0]; },
formatMatch: null,
autoFill: false,
width: 0,
multiple: false,
multipleSeparator: ", ",
highlight: function(value, term) {
return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
},
scroll: true,
scrollHeight: 180
};
$.Autocompleter.Cache = function(options) {
var data = {};
var length = 0;
function matchSubset(s, sub) {
if (!options.matchCase)
s = s.toLowerCase();
var i = s.indexOf(sub);
if (i == -1) return false;
return i == 0 || options.matchContains;
};
function add(q, value) {
if (length > options.cacheLength){
flush();
}
if (!data[q]){
length++;
}
data[q] = value;
}
function populate(){
if( !options.data ) return false;
// track the matches
var stMatchSets = {},
nullData = 0;
// no url was specified, we need to adjust the cache length to make sure it fits the local data store
if( !options.url ) options.cacheLength = 1;
// track all options for minChars = 0
stMatchSets[""] = [];
// loop through the array and create a lookup structure
for ( var i = 0, ol = options.data.length; i < ol; i++ ) {
var rawValue = options.data[i];
// if rawValue is a string, make an array otherwise just reference the array
rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;
var value = options.formatMatch(rawValue, i+1, options.data.length);
if ( value === false )
continue;
var firstChar = value.charAt(0).toLowerCase();
// if no lookup array for this character exists, look it up now
if( !stMatchSets[firstChar] )
stMatchSets[firstChar] = [];
// if the match is a string
var row = {
value: value,
data: rawValue,
result: options.formatResult && options.formatResult(rawValue) || value
};
// push the current match into the set list
stMatchSets[firstChar].push(row);
// keep track of minChars zero items
if ( nullData++ < options.max ) {
stMatchSets[""].push(row);
}
};
// add the data items to the cache
$.each(stMatchSets, function(i, value) {
// increase the cache size
options.cacheLength++;
// add to the cache
add(i, value);
});
}
// populate any existing data
setTimeout(populate, 25);
function flush(){
data = {};
length = 0;
}
return {
flush: flush,
add: add,
populate: populate,
load: function(q) {
if (!options.cacheLength || !length)
return null;
/*
* if dealing w/local data and matchContains than we must make sure
* to loop through all the data collections looking for matches
*/
if( !options.url && options.matchContains ){
// track all matches
var csub = [];
// loop through all the data grids for matches
for( var k in data ){
// don't search through the stMatchSets[""] (minChars: 0) cache
// this prevents duplicates
if( k.length > 0 ){
var c = data[k];
$.each(c, function(i, x) {
// if we've got a match, add it to the array
if (matchSubset(x.value, q)) {
csub.push(x);
}
});
}
}
return csub;
} else
// if the exact item exists, use it
if (data[q]){
return data[q];
} else
if (options.matchSubset) {
for (var i = q.length - 1; i >= options.minChars; i--) {
var c = data[q.substr(0, i)];
if (c) {
var csub = [];
$.each(c, function(i, x) {
if (matchSubset(x.value, q)) {
csub[csub.length] = x;
}
});
return csub;
}
}
}
return null;
}
};
};
$.Autocompleter.Select = function (options, input, select, config) {
var CLASSES = {
ACTIVE: "ac_over"
};
var listItems,
active = -1,
data,
term = "",
needsInit = true,
element,
list;
// Create results
function init() {
if (!needsInit)
return;
element = $("<div/>")
.hide()
.addClass(options.resultsClass)
.css("position", "absolute")
.appendTo(document.body);
list = $("<ul/>").appendTo(element).mouseover( function(event) {
if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {
active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
$(target(event)).addClass(CLASSES.ACTIVE);
}
}).click(function(event) {
$(target(event)).addClass(CLASSES.ACTIVE);
select();
// TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
input.focus();
return false;
}).mousedown(function() {
config.mouseDownOnSelect = true;
}).mouseup(function() {
config.mouseDownOnSelect = false;
});
if( options.width > 0 )
element.css("width", options.width);
needsInit = false;
}
function target(event) {
var element = event.target;
while(element && element.tagName != "LI")
element = element.parentNode;
// more fun with IE, sometimes event.target is empty, just ignore it then
if(!element)
return [];
return element;
}
function moveSelect(step) {
listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
movePosition(step);
var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
if(options.scroll) {
var offset = 0;
listItems.slice(0, active).each(function() {
offset += this.offsetHeight;
});
if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) {
list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
} else if(offset < list.scrollTop()) {
list.scrollTop(offset);
}
}
};
function movePosition(step) {
active += step;
if (active < 0) {
active = listItems.size() - 1;
} else if (active >= listItems.size()) {
active = 0;
}
}
function limitNumberOfItems(available) {
return options.max && options.max < available
? options.max
: available;
}
function fillList() {
list.empty();
var max = limitNumberOfItems(data.length);
for (var i=0; i < max; i++) {
if (!data[i])
continue;
var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term);
if ( formatted === false )
continue;
var li = $("<li/>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0];
$.data(li, "ac_data", data[i]);
}
listItems = list.find("li");
if ( options.selectFirst ) {
listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
active = 0;
}
// apply bgiframe if available
if ( $.fn.bgiframe )
list.bgiframe();
}
return {
display: function(d, q) {
init();
data = d;
term = q;
fillList();
},
next: function() {
moveSelect(1);
},
prev: function() {
moveSelect(-1);
},
pageUp: function() {
if (active != 0 && active - 8 < 0) {
moveSelect( -active );
} else {
moveSelect(-8);
}
},
pageDown: function() {
if (active != listItems.size() - 1 && active + 8 > listItems.size()) {
moveSelect( listItems.size() - 1 - active );
} else {
moveSelect(8);
}
},
hide: function() {
element && element.hide();
listItems && listItems.removeClass(CLASSES.ACTIVE);
active = -1;
},
visible : function() {
return element && element.is(":visible");
},
current: function() {
return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]);
},
show: function() {
var offset = $(input).offset();
element.css({
width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(),
top: offset.top + input.offsetHeight,
left: offset.left
}).show();
if(options.scroll) {
list.scrollTop(0);
list.css({
maxHeight: options.scrollHeight,
overflow: 'auto'
});
if($.browser.msie && typeof document.body.style.maxHeight === "undefined") {
var listHeight = 0;
listItems.each(function() {
listHeight += this.offsetHeight;
});
var scrollbarsVisible = listHeight > options.scrollHeight;
list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight );
if (!scrollbarsVisible) {
// IE doesn't recalculate width when scrollbar disappears
listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) );
}
}
}
},
selected: function() {
var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
return selected && selected.length && $.data(selected[0], "ac_data");
},
emptyList: function (){
list && list.empty();
},
unbind: function() {
element && element.remove();
}
};
};
$.Autocompleter.Selection = function(field, start, end) {
if( field.createTextRange ){
var selRange = field.createTextRange();
selRange.collapse(true);
selRange.moveStart("character", start);
selRange.moveEnd("character", end);
selRange.select();
} else if( field.setSelectionRange ){
field.setSelectionRange(start, end);
} else {
if( field.selectionStart ){
field.selectionStart = start;
field.selectionEnd = end;
}
}
field.focus();
};
})(jQuery);
+7
View File
File diff suppressed because one or more lines are too long
+22
View File
File diff suppressed because one or more lines are too long
+67
View File
@@ -0,0 +1,67 @@
//地址跳转
function go_url(_m){
var url="./"+_m+".htm";
window.location.href=url;
return true;
}
//输出表单html
function trans_html_input(obj_input){
var html="";
for(var i=0;i<obj_input.length;i++){
if(obj_input[i].type=="radio"){
html+='<div class="layui-form-item">'+obj_input[i].title+'</div>';
html+='<div class="layui-form-item">';
var arr_tmp=obj_input[i].op.split("|");
for(var j=0;j<arr_tmp.length;j++){
html+='<input type="radio" name="'+obj_input[i].name+'" value="'+arr_tmp[j]+'" title="'+arr_tmp[j]+'"';
if(arr_tmp[j]==obj_input[i].value)
html+=' checked';
html+='>';
}
html+='</div>';
}
}
return html;
}
function in_array(arr,v){
var r=-1;
for(var i=0;i<arr.length;i++){
if(arr[i]==v){
r=i;
break;
}
}
return r;
}
function get_url_param(name){
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
var r = window.location.search.substr(1).match(reg); //匹配目标参数
if (r!=null) return unescape(r[2]);
return null; //返回参数值
}
function o_window(url,winName,width,height){
xposition=0; yposition=0;
if ((parseInt(navigator.appVersion) >= 4 )){
xposition = (screen.width - width) / 2;
yposition = (screen.height - height) / 2;
}
theproperty= "width=" + width + ","
+ "height=" + height + ","
+ "location=0,"
+ "menubar=0,"
+ "resizable=1,"
+ "scrollbars=yes,"
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + "," //仅适用于Netscape
+ "screeny=" + yposition + "," //仅适用于Netscape
+ "left=" + xposition + "," //IE
+ "top=" + yposition; //IE
window.open( url,winName,theproperty );
}
function deel_0(str,str1){
str=(str==0)?str1:str;
return str;
}
+13
View File
File diff suppressed because one or more lines are too long
+75
View File
@@ -0,0 +1,75 @@
// -----------------------------------------------------------------------
// Eros Fratini - eros@recoding.it
// jqprint 0.3
//
// - 19/06/2009 - some new implementations, added Opera support
// - 11/05/2009 - first sketch
//
// Printing plug-in for jQuery, evolution of jPrintArea: http://plugins.jquery.com/project/jPrintArea
// requires jQuery 1.3.x
//
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
//------------------------------------------------------------------------
(function($) {
var opt;
$.fn.jqprint = function (options) {
opt = $.extend({}, $.fn.jqprint.defaults, options);
var $element = (this instanceof jQuery) ? this : $(this);
if (opt.operaSupport && $.browser.opera)
{
var tab = window.open("","jqPrint-preview");
tab.document.open();
var doc = tab.document;
}
else
{
var $iframe = $("<iframe />");
if (!opt.debug) { $iframe.css({ position: "absolute", width: "0px", height: "0px", left: "-600px", top: "-600px" }); }
$iframe.appendTo("body");
var doc = $iframe[0].contentWindow.document;
}
if (opt.importCSS)
{
if ($("link[media=print]").length > 0)
{
$("link[media=print]").each( function() {
doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' media='print' />");
});
}
else
{
$("link").each( function() {
doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' />");
});
}
}
if (opt.printContainer) { doc.write($element.outer()); }
else { $element.each( function() { doc.write($(this).html()); }); }
doc.close();
(opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).focus();
setTimeout( function() { (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).print(); if (tab) { tab.close(); } }, 1000);
}
$.fn.jqprint.defaults = {
debug: false,
importCSS: true,
printContainer: true,
operaSupport: true
};
// Thanks to 9__, found at http://users.livejournal.com/9__/380664.html
jQuery.fn.outer = function() {
return $($('<div></div>').html(this.clone())).html();
}
})(jQuery);
+5
View File
File diff suppressed because one or more lines are too long
+11
View File
@@ -0,0 +1,11 @@
/*!
* jQuery UI Touch Punch 0.2.3
*
* Copyright 2011¨C2014, Dave Furfero
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Depends:
* jquery.ui.widget.js
* jquery.ui.mouse.js
*/
!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);
+110
View File
@@ -0,0 +1,110 @@
// Pannellum 2.5.6, https://github.com/mpetroff/pannellum
window.libpannellum=function(E,g,p){function Ba(K){function ja(a,e){return 1==a.level&&1!=e.level?-1:1==e.level&&1!=a.level?1:e.timestamp-a.timestamp}function Q(a,e){return a.level!=e.level?a.level-e.level:a.diff-e.diff}function ka(a,e,c,g,l,h){this.vertices=a;this.side=e;this.level=c;this.x=g;this.y=l;this.path=h.replace("%s",e).replace("%l",c).replace("%x",g).replace("%y",l)}function Ja(a,e,g,p,l){var h;var d=e.vertices;h=la(a,d.slice(0,3));var u=la(a,d.slice(3,6)),x=la(a,d.slice(6,9)),d=la(a,d.slice(9,
12)),t=h[0]+u[0]+x[0]+d[0];-4==t||4==t?h=!1:(t=h[1]+u[1]+x[1]+d[1],h=-4==t||4==t?!1:4!=h[2]+u[2]+x[2]+d[2]);if(h){h=e.vertices;u=h[0]+h[3]+h[6]+h[9];x=h[1]+h[4]+h[7]+h[10];d=h[2]+h[5]+h[8]+h[11];t=Math.sqrt(u*u+x*x+d*d);d=Math.asin(d/t);u=Math.atan2(x,u)-p;u+=u>Math.PI?-2*Math.PI:u<-Math.PI?2*Math.PI:0;u=Math.abs(u);e.diff=Math.acos(Math.sin(g)*Math.sin(d)+Math.cos(g)*Math.cos(d)*Math.cos(u));u=!1;for(x=0;x<c.nodeCache.length;x++)if(c.nodeCache[x].path==e.path){u=!0;c.nodeCache[x].timestamp=c.nodeCacheTimestamp++;
c.nodeCache[x].diff=e.diff;c.currentNodes.push(c.nodeCache[x]);break}u||(e.timestamp=c.nodeCacheTimestamp++,c.currentNodes.push(e),c.nodeCache.push(e));if(e.level<c.level){var d=m.cubeResolution*Math.pow(2,e.level-m.maxLevel),u=Math.ceil(d*m.invTileResolution)-1,x=d%m.tileResolution*2,k=2*d%m.tileResolution;0===k&&(k=m.tileResolution);0===x&&(x=2*m.tileResolution);t=0.5;if(e.x==u||e.y==u)t=1-m.tileResolution/(m.tileResolution+k);var y=1-t,d=[],s=t,z=t,D=t,I=y,A=y,B=y;if(k<m.tileResolution)if(e.x==
u&&e.y!=u){if(A=z=0.5,"d"==e.side||"u"==e.side)B=D=0.5}else e.x!=u&&e.y==u&&(I=s=0.5,"l"==e.side||"r"==e.side)&&(B=D=0.5);x<=m.tileResolution&&(e.x==u&&(s=0,I=1,"l"==e.side||"r"==e.side)&&(D=0,B=1),e.y==u&&(z=0,A=1,"d"==e.side||"u"==e.side)&&(D=0,B=1));k=[h[0],h[1],h[2],h[0]*s+h[3]*I,h[1]*t+h[4]*y,h[2]*D+h[5]*B,h[0]*s+h[6]*I,h[1]*z+h[7]*A,h[2]*D+h[8]*B,h[0]*t+h[9]*y,h[1]*z+h[10]*A,h[2]*D+h[11]*B];k=new ka(k,e.side,e.level+1,2*e.x,2*e.y,m.fullpath);d.push(k);e.x==u&&x<=m.tileResolution||(k=[h[0]*s+
h[3]*I,h[1]*t+h[4]*y,h[2]*D+h[5]*B,h[3],h[4],h[5],h[3]*t+h[6]*y,h[4]*z+h[7]*A,h[5]*D+h[8]*B,h[0]*s+h[6]*I,h[1]*z+h[7]*A,h[2]*D+h[8]*B],k=new ka(k,e.side,e.level+1,2*e.x+1,2*e.y,m.fullpath),d.push(k));e.x==u&&x<=m.tileResolution||e.y==u&&x<=m.tileResolution||(k=[h[0]*s+h[6]*I,h[1]*z+h[7]*A,h[2]*D+h[8]*B,h[3]*t+h[6]*y,h[4]*z+h[7]*A,h[5]*D+h[8]*B,h[6],h[7],h[8],h[9]*s+h[6]*I,h[10]*t+h[7]*y,h[11]*D+h[8]*B],k=new ka(k,e.side,e.level+1,2*e.x+1,2*e.y+1,m.fullpath),d.push(k));e.y==u&&x<=m.tileResolution||
(k=[h[0]*t+h[9]*y,h[1]*z+h[10]*A,h[2]*D+h[11]*B,h[0]*s+h[6]*I,h[1]*z+h[7]*A,h[2]*D+h[8]*B,h[9]*s+h[6]*I,h[10]*t+h[7]*y,h[11]*D+h[8]*B,h[9],h[10],h[11]],k=new ka(k,e.side,e.level+1,2*e.x,2*e.y+1,m.fullpath),d.push(k));for(e=0;e<d.length;e++)Ja(a,d[e],g,p,l)}}}function ta(){return[-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,1,-1,-1]}function ua(a,e,c){var g=Math.sin(e);e=Math.cos(e);
if("x"==c)return[a[0],e*a[1]+g*a[2],e*a[2]-g*a[1],a[3],e*a[4]+g*a[5],e*a[5]-g*a[4],a[6],e*a[7]+g*a[8],e*a[8]-g*a[7]];if("y"==c)return[e*a[0]-g*a[2],a[1],e*a[2]+g*a[0],e*a[3]-g*a[5],a[4],e*a[5]+g*a[3],e*a[6]-g*a[8],a[7],e*a[8]+g*a[6]];if("z"==c)return[e*a[0]+g*a[1],e*a[1]-g*a[0],a[2],e*a[3]+g*a[4],e*a[4]-g*a[3],a[5],e*a[6]+g*a[7],e*a[7]-g*a[6],a[8]]}function ma(a){return[a[0],a[4],a[8],a[12],a[1],a[5],a[9],a[13],a[2],a[6],a[10],a[14],a[3],a[7],a[11],a[15]]}function Ka(a){La(a,a.path+"."+m.extension,
function(e,c){a.texture=e;a.textureLoaded=c?2:1},va.crossOrigin)}function la(a,e){var c=[a[0]*e[0]+a[1]*e[1]+a[2]*e[2],a[4]*e[0]+a[5]*e[1]+a[6]*e[2],a[11]+a[8]*e[0]+a[9]*e[1]+a[10]*e[2],1/(a[12]*e[0]+a[13]*e[1]+a[14]*e[2])],g=c[0]*c[3],l=c[1]*c[3],c=c[2]*c[3],h=[0,0,0];-1>g&&(h[0]=-1);1<g&&(h[0]=1);-1>l&&(h[1]=-1);1<l&&(h[1]=1);if(-1>c||1<c)h[2]=1;return h}function Ea(){console.log("Reducing canvas size due to error 1286!");A.width=Math.round(A.width/2);A.height=Math.round(A.height/2)}var A=g.createElement("canvas");
A.style.width=A.style.height="100%";K.appendChild(A);var c,a,U,V,$,R,wa,ga,m,z,F,ca,Fa,Y,na,va;this.init=function(L,e,Ca,H,l,h,d,u){function x(a){if(E){var e=a*a*4,h=new Uint8ClampedArray(e),c=u.backgroundColor?u.backgroundColor:[0,0,0];c[0]*=255;c[1]*=255;c[2]*=255;for(var b=0;b<e;b++)h[b++]=c[0],h[b++]=c[1],h[b++]=c[2];a=new ImageData(h,a,a);for(t=0;6>t;t++)0==m[t].width&&(m[t]=a)}}e===p&&(e="equirectangular");if("equirectangular"!=e&&"cubemap"!=e&&"multires"!=e)throw console.log("Error: invalid image type specified!"),
{type:"config error"};z=e;m=L;F=Ca;va=u||{};if(c){U&&(a.detachShader(c,U),a.deleteShader(U));V&&(a.detachShader(c,V),a.deleteShader(V));a.bindBuffer(a.ARRAY_BUFFER,null);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,null);c.texture&&a.deleteTexture(c.texture);if(c.nodeCache)for(L=0;L<c.nodeCache.length;L++)a.deleteTexture(c.nodeCache[L].texture);a.deleteProgram(c);c=p}ga=p;var t,E=!1,y;if("cubemap"==z)for(t=0;6>t;t++)0<m[t].width?(y===p&&(y=m[t].width),y!=m[t].width&&console.log("Cube faces have inconsistent widths: "+
y+" vs. "+m[t].width)):E=!0;"cubemap"==z&&0!==(y&y-1)&&(navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)||navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 9_/)||navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 10_/)||navigator.userAgent.match(/Trident.*rv[ :]*11\./))||(a||(a=A.getContext("experimental-webgl",{alpha:!1,depth:!1})),a&&1286==a.getError()&&Ea());if(!a&&("multires"==z&&m.hasOwnProperty("fallbackPath")||"cubemap"==z)&&("WebkitAppearance"in
g.documentElement.style||navigator.userAgent.match(/Trident.*rv[ :]*11\./)||-1!==navigator.appVersion.indexOf("MSIE 10"))){R&&K.removeChild(R);R=g.createElement("div");R.className="pnlm-world";H=m.basePath?m.basePath+m.fallbackPath:m.fallbackPath;var Q="frblud".split(""),S=0;l=function(){var a=g.createElement("canvas");a.className="pnlm-face pnlm-"+Q[this.side]+"face";R.appendChild(a);var e=a.getContext("2d");a.style.width=this.width+4+"px";a.style.height=this.height+4+"px";a.width=this.width+4;a.height=
this.height+4;e.drawImage(this,2,2);var h=e.getImageData(0,0,a.width,a.height),c=h.data,b,d;for(b=2;b<a.width-2;b++)for(d=0;4>d;d++)c[4*(b+a.width)+d]=c[4*(b+2*a.width)+d],c[4*(b+a.width*(a.height-2))+d]=c[4*(b+a.width*(a.height-3))+d];for(b=2;b<a.height-2;b++)for(d=0;4>d;d++)c[4*(b*a.width+1)+d]=c[4*(b*a.width+2)+d],c[4*((b+1)*a.width-2)+d]=c[4*((b+1)*a.width-3)+d];for(d=0;4>d;d++)c[4*(a.width+1)+d]=c[4*(2*a.width+2)+d],c[4*(2*a.width-2)+d]=c[4*(3*a.width-3)+d],c[4*(a.width*(a.height-2)+1)+d]=c[4*
(a.width*(a.height-3)+2)+d],c[4*(a.width*(a.height-1)-2)+d]=c[4*(a.width*(a.height-2)-3)+d];for(b=1;b<a.width-1;b++)for(d=0;4>d;d++)c[4*b+d]=c[4*(b+a.width)+d],c[4*(b+a.width*(a.height-1))+d]=c[4*(b+a.width*(a.height-2))+d];for(b=1;b<a.height-1;b++)for(d=0;4>d;d++)c[b*a.width*4+d]=c[4*(b*a.width+1)+d],c[4*((b+1)*a.width-1)+d]=c[4*((b+1)*a.width-2)+d];for(d=0;4>d;d++)c[d]=c[4*(a.width+1)+d],c[4*(a.width-1)+d]=c[4*(2*a.width-2)+d],c[a.width*(a.height-1)*4+d]=c[4*(a.width*(a.height-2)+1)+d],c[4*(a.width*
a.height-1)+d]=c[4*(a.width*(a.height-1)-2)+d];e.putImageData(h,0,0);D.call(this)};var D=function(){0<this.width?($===p&&($=this.width),$!=this.width&&console.log("Fallback faces have inconsistent widths: "+$+" vs. "+this.width)):E=!0;S++;6==S&&($=this.width,K.appendChild(R),d())},E=!1;for(t=0;6>t;t++)h=new Image,h.crossOrigin=va.crossOrigin?va.crossOrigin:"anonymous",h.side=t,h.onload=l,h.onerror=D,h.src="multires"==z?H.replace("%s",Q[t])+"."+m.extension:m[t].src;x($)}else{if(!a)throw console.log("Error: no WebGL support detected!"),
{type:"no webgl"};"cubemap"==z&&x(y);m.fullpath=m.basePath?m.basePath+m.path:m.path;m.invTileResolution=1/m.tileResolution;L=ta();wa=[];for(t=0;6>t;t++)wa[t]=L.slice(12*t,12*t+12),L=ta();L=0;if("equirectangular"==z){if(L=a.getParameter(a.MAX_TEXTURE_SIZE),Math.max(m.width/2,m.height)>L)throw console.log("Error: The image is too big; it's "+m.width+"px wide, but this device's maximum supported size is "+2*L+"px."),{type:"webgl size error",width:m.width,maxWidth:2*L};}else if("cubemap"==z&&y>a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE))throw console.log("Error: The image is too big; it's "+
y+"px wide, but this device's maximum supported size is "+L+"px."),{type:"webgl size error",width:y,maxWidth:L};u===p||u.horizonPitch===p&&u.horizonRoll===p||(ga=[u.horizonPitch==p?0:u.horizonPitch,u.horizonRoll==p?0:u.horizonRoll]);y=a.TEXTURE_2D;a.viewport(0,0,a.drawingBufferWidth,a.drawingBufferHeight);a.getShaderPrecisionFormat&&(e=a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.HIGH_FLOAT))&&1>e.precision&&(oa=oa.replace("highp","mediump"));U=a.createShader(a.VERTEX_SHADER);e=s;"multires"==z&&
(e=k);a.shaderSource(U,e);a.compileShader(U);V=a.createShader(a.FRAGMENT_SHADER);e=pa;"cubemap"==z?(y=a.TEXTURE_CUBE_MAP,e=qa):"multires"==z&&(e=bb);a.shaderSource(V,e);a.compileShader(V);c=a.createProgram();a.attachShader(c,U);a.attachShader(c,V);a.linkProgram(c);a.getShaderParameter(U,a.COMPILE_STATUS)||console.log(a.getShaderInfoLog(U));a.getShaderParameter(V,a.COMPILE_STATUS)||console.log(a.getShaderInfoLog(V));a.getProgramParameter(c,a.LINK_STATUS)||console.log(a.getProgramInfoLog(c));a.useProgram(c);
c.drawInProgress=!1;e=u.backgroundColor?u.backgroundColor:[0,0,0];a.clearColor(e[0],e[1],e[2],1);a.clear(a.COLOR_BUFFER_BIT);c.texCoordLocation=a.getAttribLocation(c,"a_texCoord");a.enableVertexAttribArray(c.texCoordLocation);"multires"!=z?(ca||(ca=a.createBuffer()),a.bindBuffer(a.ARRAY_BUFFER,ca),a.bufferData(a.ARRAY_BUFFER,new Float32Array([-1,1,1,1,1,-1,-1,1,1,-1,-1,-1]),a.STATIC_DRAW),a.vertexAttribPointer(c.texCoordLocation,2,a.FLOAT,!1,0,0),c.aspectRatio=a.getUniformLocation(c,"u_aspectRatio"),
a.uniform1f(c.aspectRatio,a.drawingBufferWidth/a.drawingBufferHeight),c.psi=a.getUniformLocation(c,"u_psi"),c.theta=a.getUniformLocation(c,"u_theta"),c.f=a.getUniformLocation(c,"u_f"),c.h=a.getUniformLocation(c,"u_h"),c.v=a.getUniformLocation(c,"u_v"),c.vo=a.getUniformLocation(c,"u_vo"),c.rot=a.getUniformLocation(c,"u_rot"),a.uniform1f(c.h,H/(2*Math.PI)),a.uniform1f(c.v,l/Math.PI),a.uniform1f(c.vo,h/Math.PI*2),"equirectangular"==z&&(c.backgroundColor=a.getUniformLocation(c,"u_backgroundColor"),a.uniform4fv(c.backgroundColor,
e.concat([1]))),c.texture=a.createTexture(),a.bindTexture(y,c.texture),"cubemap"==z?(a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m[1]),a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_X,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m[3]),a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_Y,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m[4]),a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m[5]),a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_Z,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m[0]),a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_Z,
0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m[2])):m.width<=L?(a.uniform1i(a.getUniformLocation(c,"u_splitImage"),0),a.texImage2D(y,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m)):(a.uniform1i(a.getUniformLocation(c,"u_splitImage"),1),H=g.createElement("canvas"),H.width=m.width/2,H.height=m.height,H=H.getContext("2d"),H.drawImage(m,0,0),l=H.getImageData(0,0,m.width/2,m.height),a.texImage2D(y,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,l),c.texture2=a.createTexture(),a.activeTexture(a.TEXTURE1),a.bindTexture(y,c.texture2),a.uniform1i(a.getUniformLocation(c,
"u_image1"),1),H.drawImage(m,-m.width/2,0),l=H.getImageData(0,0,m.width/2,m.height),a.texImage2D(y,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,l),a.texParameteri(y,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(y,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(y,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(y,a.TEXTURE_MAG_FILTER,a.LINEAR),a.activeTexture(a.TEXTURE0)),a.texParameteri(y,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(y,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(y,a.TEXTURE_MIN_FILTER,
a.LINEAR),a.texParameteri(y,a.TEXTURE_MAG_FILTER,a.LINEAR)):(c.vertPosLocation=a.getAttribLocation(c,"a_vertCoord"),a.enableVertexAttribArray(c.vertPosLocation),Fa||(Fa=a.createBuffer()),Y||(Y=a.createBuffer()),na||(na=a.createBuffer()),a.bindBuffer(a.ARRAY_BUFFER,Y),a.bufferData(a.ARRAY_BUFFER,new Float32Array([0,0,1,0,1,1,0,1]),a.STATIC_DRAW),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,na),a.bufferData(a.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),a.STATIC_DRAW),c.perspUniform=a.getUniformLocation(c,
"u_perspMatrix"),c.cubeUniform=a.getUniformLocation(c,"u_cubeMatrix"),c.level=-1,c.currentNodes=[],c.nodeCache=[],c.nodeCacheTimestamp=0);H=a.getError();if(0!==H)throw console.log("Error: Something went wrong with WebGL!",H),{type:"webgl error"};d()}};this.destroy=function(){K!==p&&(A!==p&&K.contains(A)&&K.removeChild(A),R!==p&&K.contains(R)&&K.removeChild(R));if(a){var c=a.getExtension("WEBGL_lose_context");c&&c.loseContext()}};this.resize=function(){var g=E.devicePixelRatio||1;A.width=A.clientWidth*
g;A.height=A.clientHeight*g;a&&(1286==a.getError()&&Ea(),a.viewport(0,0,a.drawingBufferWidth,a.drawingBufferHeight),"multires"!=z&&a.uniform1f(c.aspectRatio,A.clientWidth/A.clientHeight))};this.resize();this.setPose=function(a,c){ga=[a,c]};this.render=function(g,e,k,s){var l,h=0;s===p&&(s={});s.roll&&(h=s.roll);if(ga!==p){l=ga[0];var d=ga[1],u=g,x=e,t=Math.cos(d)*Math.sin(g)*Math.sin(l)+Math.cos(g)*(Math.cos(l)*Math.cos(e)+Math.sin(d)*Math.sin(l)*Math.sin(e)),E=-Math.sin(g)*Math.sin(d)+Math.cos(g)*
Math.cos(d)*Math.sin(e);g=Math.cos(d)*Math.cos(l)*Math.sin(g)+Math.cos(g)*(-Math.cos(e)*Math.sin(l)+Math.cos(l)*Math.sin(d)*Math.sin(e));g=Math.asin(Math.max(Math.min(g,1),-1));e=Math.atan2(E,t);l=[Math.cos(u)*(Math.sin(d)*Math.sin(l)*Math.cos(x)-Math.cos(l)*Math.sin(x)),Math.cos(u)*Math.cos(d)*Math.cos(x),Math.cos(u)*(Math.cos(l)*Math.sin(d)*Math.cos(x)+Math.sin(x)*Math.sin(l))];d=[-Math.cos(g)*Math.sin(e),Math.cos(g)*Math.cos(e)];d=Math.acos(Math.max(Math.min((l[0]*d[0]+l[1]*d[1])/(Math.sqrt(l[0]*
l[0]+l[1]*l[1]+l[2]*l[2])*Math.sqrt(d[0]*d[0]+d[1]*d[1])),1),-1));0>l[2]&&(d=2*Math.PI-d);h+=d}if(a||"multires"!=z&&"cubemap"!=z){if("multires"!=z)k=2*Math.atan(Math.tan(0.5*k)/(a.drawingBufferWidth/a.drawingBufferHeight)),k=1/Math.tan(0.5*k),a.uniform1f(c.psi,e),a.uniform1f(c.theta,g),a.uniform1f(c.rot,h),a.uniform1f(c.f,k),!0===F&&"equirectangular"==z&&(a.bindTexture(a.TEXTURE_2D,c.texture),a.texImage2D(a.TEXTURE_2D,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m)),a.drawArrays(a.TRIANGLES,0,6);else{l=a.drawingBufferWidth/
a.drawingBufferHeight;d=2*Math.atan(Math.tan(k/2)*a.drawingBufferHeight/a.drawingBufferWidth);d=1/Math.tan(d/2);l=[d/l,0,0,0,0,d,0,0,0,0,100.1/-99.9,20/-99.9,0,0,-1,0];for(d=1;d<m.maxLevel&&a.drawingBufferWidth>m.tileResolution*Math.pow(2,d-1)*Math.tan(k/2)*0.707;)d++;c.level=d;d=[1,0,0,0,1,0,0,0,1];d=ua(d,-h,"z");d=ua(d,-g,"x");d=ua(d,e,"y");d=[d[0],d[1],d[2],0,d[3],d[4],d[5],0,d[6],d[7],d[8],0,0,0,0,1];a.uniformMatrix4fv(c.perspUniform,!1,new Float32Array(ma(l)));a.uniformMatrix4fv(c.cubeUniform,
!1,new Float32Array(ma(d)));h=[l[0]*d[0],l[0]*d[1],l[0]*d[2],0,l[5]*d[4],l[5]*d[5],l[5]*d[6],0,l[10]*d[8],l[10]*d[9],l[10]*d[10],l[11],-d[8],-d[9],-d[10],0];c.nodeCache.sort(ja);if(200<c.nodeCache.length&&c.nodeCache.length>c.currentNodes.length+50)for(l=c.nodeCache.splice(200,c.nodeCache.length-200),d=0;d<l.length;d++)a.deleteTexture(l[d].texture);c.currentNodes=[];d="fbudlr".split("");for(l=0;6>l;l++)u=new ka(wa[l],d[l],1,0,0,m.fullpath),Ja(h,u,g,e,k);c.currentNodes.sort(Q);for(g=S.length-1;0<=
g;g--)-1===c.currentNodes.indexOf(S[g].node)&&(S[g].node.textureLoad=!1,S.splice(g,1));if(0===S.length)for(g=0;g<c.currentNodes.length;g++)if(e=c.currentNodes[g],!e.texture&&!e.textureLoad){e.textureLoad=!0;setTimeout(Ka,0,e);break}if(!c.drawInProgress){c.drawInProgress=!0;a.clear(a.COLOR_BUFFER_BIT);for(g=0;g<c.currentNodes.length;g++)1<c.currentNodes[g].textureLoaded&&(a.bindBuffer(a.ARRAY_BUFFER,Fa),a.bufferData(a.ARRAY_BUFFER,new Float32Array(c.currentNodes[g].vertices),a.STATIC_DRAW),a.vertexAttribPointer(c.vertPosLocation,
3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,Y),a.vertexAttribPointer(c.texCoordLocation,2,a.FLOAT,!1,0,0),a.bindTexture(a.TEXTURE_2D,c.currentNodes[g].texture),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0));c.drawInProgress=!1}}if(s.returnImage!==p)return A.toDataURL("image/png")}else for(l=$/2,s={f:"translate3d(-"+(l+2)+"px, -"+(l+2)+"px, -"+l+"px)",b:"translate3d("+(l+2)+"px, -"+(l+2)+"px, "+l+"px) rotateX(180deg) rotateZ(180deg)",u:"translate3d(-"+(l+2)+"px, -"+l+"px, "+(l+2)+"px) rotateX(270deg)",
d:"translate3d(-"+(l+2)+"px, "+l+"px, -"+(l+2)+"px) rotateX(90deg)",l:"translate3d(-"+l+"px, -"+(l+2)+"px, "+(l+2)+"px) rotateX(180deg) rotateY(90deg) rotateZ(180deg)",r:"translate3d("+l+"px, -"+(l+2)+"px, -"+(l+2)+"px) rotateY(270deg)"},k=1/Math.tan(k/2),k=k*A.clientWidth/2+"px",e="perspective("+k+") translateZ("+k+") rotateX("+g+"rad) rotateY("+e+"rad) ",k=Object.keys(s),g=0;6>g;g++)if(h=R.querySelector(".pnlm-"+k[g]+"face"))h.style.webkitTransform=e+s[k[g]],h.style.transform=e+s[k[g]]};this.isLoading=
function(){if(a&&"multires"==z)for(var g=0;g<c.currentNodes.length;g++)if(!c.currentNodes[g].textureLoaded)return!0;return!1};this.getCanvas=function(){return A};var S=[],La=function(){function c(){var d=this;this.texture=this.callback=null;this.image=new Image;this.image.crossOrigin=l?l:"anonymous";var e=function(){if(0<d.image.width&&0<d.image.height){var c=d.image;a.bindTexture(a.TEXTURE_2D,d.texture);a.texImage2D(a.TEXTURE_2D,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,c);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,
a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.bindTexture(a.TEXTURE_2D,null);d.callback(d.texture,!0)}else d.callback(d.texture,!1);S.length?(c=S.shift(),d.loadTexture(c.src,c.texture,c.callback)):k[g++]=d};this.image.addEventListener("load",e);this.image.addEventListener("error",e)}function e(a,c,e,g){this.node=a;this.src=c;this.texture=e;this.callback=
g}var g=4,k={},l;c.prototype.loadTexture=function(a,c,e){this.texture=c;this.callback=e;this.image.src=a};for(var h=0;h<g;h++)k[h]=new c;return function(c,h,m,p){l=p;p=a.createTexture();g?k[--g].loadTexture(h,p,m):S.push(new e(c,h,p,m));return p}}()}var s="attribute vec2 a_texCoord;varying vec2 v_texCoord;void main() {gl_Position = vec4(a_texCoord, 0.0, 1.0);v_texCoord = a_texCoord;}",k="attribute vec3 a_vertCoord;attribute vec2 a_texCoord;uniform mat4 u_cubeMatrix;uniform mat4 u_perspMatrix;varying mediump vec2 v_texCoord;void main(void) {gl_Position = u_perspMatrix * u_cubeMatrix * vec4(a_vertCoord, 1.0);v_texCoord = a_texCoord;}",
oa="precision highp float;\nuniform float u_aspectRatio;\nuniform float u_psi;\nuniform float u_theta;\nuniform float u_f;\nuniform float u_h;\nuniform float u_v;\nuniform float u_vo;\nuniform float u_rot;\nconst float PI = 3.14159265358979323846264;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nuniform bool u_splitImage;\nuniform samplerCube u_imageCube;\nvarying vec2 v_texCoord;\nuniform vec4 u_backgroundColor;\nvoid main() {\nfloat x = v_texCoord.x * u_aspectRatio;\nfloat y = v_texCoord.y;\nfloat sinrot = sin(u_rot);\nfloat cosrot = cos(u_rot);\nfloat rot_x = x * cosrot - y * sinrot;\nfloat rot_y = x * sinrot + y * cosrot;\nfloat sintheta = sin(u_theta);\nfloat costheta = cos(u_theta);\nfloat a = u_f * costheta - rot_y * sintheta;\nfloat root = sqrt(rot_x * rot_x + a * a);\nfloat lambda = atan(rot_x / root, a / root) + u_psi;\nfloat phi = atan((rot_y * costheta + u_f * sintheta) / root);",
qa=oa+"float cosphi = cos(phi);\ngl_FragColor = textureCube(u_imageCube, vec3(cosphi*sin(lambda), sin(phi), cosphi*cos(lambda)));\n}",pa=oa+"lambda = mod(lambda + PI, PI * 2.0) - PI;\nvec2 coord = vec2(lambda / PI, phi / (PI / 2.0));\nif(coord.x < -u_h || coord.x > u_h || coord.y < -u_v + u_vo || coord.y > u_v + u_vo)\ngl_FragColor = u_backgroundColor;\nelse {\nif(u_splitImage) {\nif(coord.x < 0.0)\ngl_FragColor = texture2D(u_image0, vec2((coord.x + u_h) / u_h, (-coord.y + u_v + u_vo) / (u_v * 2.0)));\nelse\ngl_FragColor = texture2D(u_image1, vec2((coord.x + u_h) / u_h - 1.0, (-coord.y + u_v + u_vo) / (u_v * 2.0)));\n} else {\ngl_FragColor = texture2D(u_image0, vec2((coord.x + u_h) / (u_h * 2.0), (-coord.y + u_v + u_vo) / (u_v * 2.0)));\n}\n}\n}",
bb="varying mediump vec2 v_texCoord;uniform sampler2D u_sampler;void main(void) {gl_FragColor = texture2D(u_sampler, v_texCoord);}";return{renderer:function(g,k,p,s){return new Ba(g,k,p,s)}}}(window,document);
window.pannellum=function(E,g,p){function Ba(s,k){function oa(){var a=g.createElement("div");a.innerHTML="\x3c!--[if lte IE 9]><i></i><![endif]--\x3e";if(1==a.getElementsByTagName("i").length)K();else{ra=b.hfov;Ga=b.pitch;var f;if("cubemap"==b.type){P=[];for(a=0;6>a;a++)P.push(new Image),P[a].crossOrigin=b.crossOrigin;q.load.lbox.style.display="block";q.load.lbar.style.display="none"}else if("multires"==b.type)a=JSON.parse(JSON.stringify(b.multiRes)),b.basePath&&b.multiRes.basePath&&!/^(?:[a-z]+:)?\/\//i.test(b.multiRes.basePath)?
a.basePath=b.basePath+b.multiRes.basePath:b.multiRes.basePath?a.basePath=b.multiRes.basePath:b.basePath&&(a.basePath=b.basePath),P=a;else if(!0===b.dynamic)P=b.panorama;else{if(b.panorama===p){K(b.strings.noPanoramaError);return}P=new Image}if("cubemap"==b.type)for(var n=6,c=function(){n--;0===n&&pa()},d=function(a){var ea=g.createElement("a");ea.href=a.target.src;ea.textContent=ea.href;K(b.strings.fileAccessError.replace("%s",ea.outerHTML))},a=0;a<P.length;a++)f=b.cubeMap[a],"null"==f?(console.log("Will use background instead of missing cubemap face "+
a),c()):(b.basePath&&!qa(f)&&(f=b.basePath+f),P[a].onload=c,P[a].onerror=d,P[a].src=I(f));else if("multires"==b.type)pa();else if(f="",b.basePath&&(f=b.basePath),!0!==b.dynamic){f=qa(b.panorama)?b.panorama:f+b.panorama;P.onload=function(){E.URL.revokeObjectURL(this.src);pa()};var e=new XMLHttpRequest;e.onloadend=function(){if(200!=e.status){var a=g.createElement("a");a.href=f;a.textContent=a.href;K(b.strings.fileAccessError.replace("%s",a.outerHTML))}Ba(this.response);q.load.msg.innerHTML=""};e.onprogress=
function(a){if(a.lengthComputable){q.load.lbarFill.style.width=a.loaded/a.total*100+"%";var b,ea;1E6<a.total?(b="MB",ea=(a.loaded/1E6).toFixed(2),a=(a.total/1E6).toFixed(2)):1E3<a.total?(b="kB",ea=(a.loaded/1E3).toFixed(1),a=(a.total/1E3).toFixed(1)):(b="B",ea=a.loaded,a=a.total);q.load.msg.innerHTML=ea+" / "+a+" "+b}else q.load.lbox.style.display="block",q.load.lbar.style.display="none"};try{e.open("GET",f,!0)}catch(h){K(b.strings.malformedURLError)}e.responseType="blob";e.setRequestHeader("Accept",
"image/*,*/*;q=0.9");e.withCredentials="use-credentials"===b.crossOrigin;e.send()}b.draggable&&J.classList.add("pnlm-grab");J.classList.remove("pnlm-grabbing");Ma=!0===b.dynamicUpdate;b.dynamic&&Ma&&(P=b.panorama,pa())}}function qa(a){return/^(?:[a-z]+:)?\/\//i.test(a)||"/"==a[0]||"blob:"==a.slice(0,5)}function pa(){C||(C=new libpannellum.renderer(M));Sa||(Sa=!0,W.addEventListener("mousedown",ka,!1),g.addEventListener("mousemove",ua,!1),g.addEventListener("mouseup",ma,!1),b.mouseZoom&&(J.addEventListener("mousewheel",
U,!1),J.addEventListener("DOMMouseScroll",U,!1)),b.doubleClickZoom&&W.addEventListener("dblclick",Ja,!1),s.addEventListener("mozfullscreenchange",d,!1),s.addEventListener("webkitfullscreenchange",d,!1),s.addEventListener("msfullscreenchange",d,!1),s.addEventListener("fullscreenchange",d,!1),E.addEventListener("resize",z,!1),E.addEventListener("orientationchange",z,!1),b.disableKeyboardCtrl||(s.addEventListener("keydown",V,!1),s.addEventListener("keyup",R,!1),s.addEventListener("blur",$,!1)),g.addEventListener("mouseleave",
ma,!1),""===g.documentElement.style.pointerAction&&""===g.documentElement.style.touchAction?(W.addEventListener("pointerdown",A,!1),W.addEventListener("pointermove",c,!1),W.addEventListener("pointerup",a,!1),W.addEventListener("pointerleave",a,!1)):(W.addEventListener("touchstart",Ka,!1),W.addEventListener("touchmove",la,!1),W.addEventListener("touchend",Ea,!1)),E.navigator.pointerEnabled&&(s.style.touchAction="none"));va();x(b.hfov);setTimeout(function(){},500)}function Ba(a){var f=new FileReader;
f.addEventListener("loadend",function(){var n=f.result;if(navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)){var c=n.indexOf("\u00ff\u00c2");(0>c||65536<c)&&K(b.strings.iOS8WebGLError)}c=n.indexOf("<x:xmpmeta");if(-1<c&&!0!==b.ignoreGPanoXMP){var d=n.substring(c,n.indexOf("</x:xmpmeta>")+12),e=function(a){var b;0<=d.indexOf(a+'="')?(b=d.substring(d.indexOf(a+'="')+a.length+2),b=b.substring(0,b.indexOf('"'))):0<=d.indexOf(a+">")&&(b=d.substring(d.indexOf(a+">")+a.length+1),b=b.substring(0,
b.indexOf("<")));return b!==p?Number(b):null},n=e("GPano:FullPanoWidthPixels"),c=e("GPano:CroppedAreaImageWidthPixels"),g=e("GPano:FullPanoHeightPixels"),h=e("GPano:CroppedAreaImageHeightPixels"),l=e("GPano:CroppedAreaTopPixels"),k=e("GPano:PoseHeadingDegrees"),m=e("GPano:PosePitchDegrees"),e=e("GPano:PoseRollDegrees");null!==n&&null!==c&&null!==g&&null!==h&&null!==l&&(0>aa.indexOf("haov")&&(b.haov=c/n*360),0>aa.indexOf("vaov")&&(b.vaov=h/g*180),0>aa.indexOf("vOffset")&&(b.vOffset=-180*((l+h/2)/g-
0.5)),null!==k&&0>aa.indexOf("northOffset")&&(b.northOffset=k,!1!==b.compass&&(b.compass=!0)),null!==m&&null!==e&&(0>aa.indexOf("horizonPitch")&&(b.horizonPitch=m),0>aa.indexOf("horizonRoll")&&(b.horizonRoll=e)))}P.src=E.URL.createObjectURL(a)});f.readAsBinaryString!==p?f.readAsBinaryString(a):f.readAsText(a)}function K(a){a===p&&(a=b.strings.genericWebGLError);q.errorMsg.innerHTML="<p>"+a+"</p>";v.load.style.display="none";q.load.box.style.display="none";q.errorMsg.style.display="table";Na=!0;G=
p;M.style.display="none";B("error",a)}function ja(a){var b=Q(a);fa.style.left=b.x+"px";fa.style.top=b.y+"px";clearTimeout(ja.t1);clearTimeout(ja.t2);fa.style.display="block";fa.style.opacity=1;ja.t1=setTimeout(function(){fa.style.opacity=0},2E3);ja.t2=setTimeout(function(){fa.style.display="none"},2500);a.preventDefault()}function Q(a){var b=s.getBoundingClientRect(),n={};n.x=(a.clientX||a.pageX)-b.left;n.y=(a.clientY||a.pageY)-b.top;return n}function ka(a){a.preventDefault();s.focus();if(G&&b.draggable){var f=
Q(a);if(b.hotSpotDebug){var n=ta(a);console.log("Pitch: "+n[0]+", Yaw: "+n[1]+", Center Pitch: "+b.pitch+", Center Yaw: "+b.yaw+", HFOV: "+b.hfov)}t();Da();b.roll=0;w.hfov=0;ha=!0;N=Date.now();xa=f.x;ya=f.y;Oa=b.yaw;Pa=b.pitch;J.classList.add("pnlm-grabbing");J.classList.remove("pnlm-grab");B("mousedown",a);F()}}function Ja(a){b.minHfov===b.hfov?da.setHfov(ra,1E3):(a=ta(a),da.lookAt(a[0],a[1],b.minHfov,1E3))}function ta(a){var f=Q(a);a=C.getCanvas();var n=a.clientWidth,c=a.clientHeight;a=f.x/n*2-
1;var c=(1-f.y/c*2)*c/n,e=1/Math.tan(b.hfov*Math.PI/360),d=Math.sin(b.pitch*Math.PI/180),g=Math.cos(b.pitch*Math.PI/180),f=e*g-c*d,n=Math.sqrt(a*a+f*f),c=180*Math.atan((c*g+e*d)/n)/Math.PI;a=180*Math.atan2(a/n,f/n)/Math.PI+b.yaw;-180>a&&(a+=360);180<a&&(a-=360);return[c,a]}function ua(a){if(ha&&G){N=Date.now();var f=C.getCanvas(),n=f.clientWidth,f=f.clientHeight;a=Q(a);var c=180*(Math.atan(xa/n*2-1)-Math.atan(a.x/n*2-1))/Math.PI*b.hfov/90+Oa;w.yaw=(c-b.yaw)%360*0.2;b.yaw=c;n=360*Math.atan(Math.tan(b.hfov/
360*Math.PI)*f/n)/Math.PI;n=180*(Math.atan(a.y/f*2-1)-Math.atan(ya/f*2-1))/Math.PI*n/90+Pa;w.pitch=0.2*(n-b.pitch);b.pitch=n}}function ma(a){ha&&(ha=!1,15<Date.now()-N&&(w.pitch=w.yaw=0),J.classList.add("pnlm-grab"),J.classList.remove("pnlm-grabbing"),N=Date.now(),B("mouseup",a))}function Ka(a){if(G&&b.draggable){t();Da();b.roll=0;w.hfov=0;var f=Q(a.targetTouches[0]);xa=f.x;ya=f.y;if(2==a.targetTouches.length){var n=Q(a.targetTouches[1]);xa+=0.5*(n.x-f.x);ya+=0.5*(n.y-f.y);Ha=Math.sqrt((f.x-n.x)*
(f.x-n.x)+(f.y-n.y)*(f.y-n.y))}ha=!0;N=Date.now();Oa=b.yaw;Pa=b.pitch;B("touchstart",a);F()}}function la(a){if(b.draggable&&(a.preventDefault(),G&&(N=Date.now()),ha&&G)){var f=Q(a.targetTouches[0]),n=f.x,c=f.y;2==a.targetTouches.length&&-1!=Ha&&(a=Q(a.targetTouches[1]),n+=0.5*(a.x-f.x),c+=0.5*(a.y-f.y),f=Math.sqrt((f.x-a.x)*(f.x-a.x)+(f.y-a.y)*(f.y-a.y)),x(b.hfov+0.1*(Ha-f)),Ha=f);f=b.hfov/360*b.touchPanSpeedCoeffFactor;n=(xa-n)*f+Oa;w.yaw=(n-b.yaw)%360*0.2;b.yaw=n;c=(c-ya)*f+Pa;w.pitch=0.2*(c-b.pitch);
b.pitch=c}}function Ea(){ha=!1;150<Date.now()-N&&(w.pitch=w.yaw=0);Ha=-1;N=Date.now();B("touchend",event)}function A(a){"touch"==a.pointerType&&G&&b.draggable&&(ia.push(a.pointerId),za.push({clientX:a.clientX,clientY:a.clientY}),a.targetTouches=za,Ka(a),a.preventDefault())}function c(a){if("touch"==a.pointerType&&b.draggable)for(var f=0;f<ia.length;f++)if(a.pointerId==ia[f]){za[f].clientX=a.clientX;za[f].clientY=a.clientY;a.targetTouches=za;la(a);a.preventDefault();break}}function a(a){if("touch"==
a.pointerType){for(var b=!1,n=0;n<ia.length;n++)a.pointerId==ia[n]&&(ia[n]=p),ia[n]&&(b=!0);b||(ia=[],za=[],Ea());a.preventDefault()}}function U(a){G&&("fullscreenonly"!=b.mouseZoom||Aa)&&(a.preventDefault(),t(),N=Date.now(),a.wheelDeltaY?(x(b.hfov-0.05*a.wheelDeltaY),w.hfov=0>a.wheelDelta?1:-1):a.wheelDelta?(x(b.hfov-0.05*a.wheelDelta),w.hfov=0>a.wheelDelta?1:-1):a.detail&&(x(b.hfov+1.5*a.detail),w.hfov=0<a.detail?1:-1),F())}function V(a){t();N=Date.now();Da();b.roll=0;var f=a.which||a.keycode;0>
b.capturedKeyNumbers.indexOf(f)||(a.preventDefault(),27==f?Aa&&h():wa(f,!0))}function $(){for(var a=0;10>a;a++)r[a]=!1}function R(a){var f=a.which||a.keycode;0>b.capturedKeyNumbers.indexOf(f)||(a.preventDefault(),wa(f,!1))}function wa(a,b){var n=!1;switch(a){case 109:case 189:case 17:case 173:r[0]!=b&&(n=!0);r[0]=b;break;case 107:case 187:case 16:case 61:r[1]!=b&&(n=!0);r[1]=b;break;case 38:r[2]!=b&&(n=!0);r[2]=b;break;case 87:r[6]!=b&&(n=!0);r[6]=b;break;case 40:r[3]!=b&&(n=!0);r[3]=b;break;case 83:r[7]!=
b&&(n=!0);r[7]=b;break;case 37:r[4]!=b&&(n=!0);r[4]=b;break;case 65:r[8]!=b&&(n=!0);r[8]=b;break;case 39:r[5]!=b&&(n=!0);r[5]=b;break;case 68:r[9]!=b&&(n=!0),r[9]=b}n&&b&&(ba="undefined"!==typeof performance&&performance.now()?performance.now():Date.now(),F())}function ga(){if(G){var a=!1,f=b.pitch,n=b.yaw,c=b.hfov,e;e="undefined"!==typeof performance&&performance.now()?performance.now():Date.now();ba===p&&(ba=e);var d=(e-ba)*b.hfov/1700,d=Math.min(d,1);r[0]&&!0===b.keyboardZoom&&(x(b.hfov+(0.8*w.hfov+
0.5)*d),a=!0);r[1]&&!0===b.keyboardZoom&&(x(b.hfov+(0.8*w.hfov-0.2)*d),a=!0);if(r[2]||r[6])b.pitch+=(0.8*w.pitch+0.2)*d,a=!0;if(r[3]||r[7])b.pitch+=(0.8*w.pitch-0.2)*d,a=!0;if(r[4]||r[8])b.yaw+=(0.8*w.yaw-0.2)*d,a=!0;if(r[5]||r[9])b.yaw+=(0.8*w.yaw+0.2)*d,a=!0;a&&(N=Date.now());if(b.autoRotate){if(0.001<e-ba){var a=(e-ba)/1E3,g=(w.yaw/a*d-0.2*b.autoRotate)*a,g=(0<-b.autoRotate?1:-1)*Math.min(Math.abs(b.autoRotate*a),Math.abs(g));b.yaw+=g}b.autoRotateStopDelay&&(b.autoRotateStopDelay-=e-ba,0>=b.autoRotateStopDelay&&
(b.autoRotateStopDelay=!1,Z=b.autoRotate,b.autoRotate=0))}O.pitch&&(m("pitch"),f=b.pitch);O.yaw&&(m("yaw"),n=b.yaw);O.hfov&&(m("hfov"),c=b.hfov);0<d&&!b.autoRotate&&(a=1-b.friction,r[4]||r[5]||r[8]||r[9]||O.yaw||(b.yaw+=w.yaw*d*a),r[2]||r[3]||r[6]||r[7]||O.pitch||(b.pitch+=w.pitch*d*a),r[0]||r[1]||O.hfov||x(b.hfov+w.hfov*d*a));ba=e;0<d&&(w.yaw=0.8*w.yaw+(b.yaw-n)/d*0.2,w.pitch=0.8*w.pitch+(b.pitch-f)/d*0.2,w.hfov=0.8*w.hfov+(b.hfov-c)/d*0.2,f=b.autoRotate?Math.abs(b.autoRotate):5,w.yaw=Math.min(f,
Math.max(w.yaw,-f)),w.pitch=Math.min(f,Math.max(w.pitch,-f)),w.hfov=Math.min(f,Math.max(w.hfov,-f)));r[0]&&r[1]&&(w.hfov=0);(r[2]||r[6])&&(r[3]||r[7])&&(w.pitch=0);(r[4]||r[8])&&(r[5]||r[9])&&(w.yaw=0)}}function m(a){var f=O[a],n=Math.min(1,Math.max((Date.now()-f.startTime)/1E3/(f.duration/1E3),0)),n=f.startPosition+b.animationTimingFunction(n)*(f.endPosition-f.startPosition);if(f.endPosition>f.startPosition&&n>=f.endPosition||f.endPosition<f.startPosition&&n<=f.endPosition||f.endPosition===f.startPosition)n=
f.endPosition,w[a]=0,delete O[a];b[a]=n}function z(){d("resize")}function F(){Ta||(Ta=!0,ca())}function ca(){if(!Za)if(Fa(),Qa&&clearTimeout(Qa),ha||!0===X)requestAnimationFrame(ca);else if(r[0]||r[1]||r[2]||r[3]||r[4]||r[5]||r[6]||r[7]||r[8]||r[9]||b.autoRotate||O.pitch||O.yaw||O.hfov||0.01<Math.abs(w.yaw)||0.01<Math.abs(w.pitch)||0.01<Math.abs(w.hfov))ga(),0<=b.autoRotateInactivityDelay&&Z&&Date.now()-N>b.autoRotateInactivityDelay&&!b.autoRotate&&(b.autoRotate=Z,da.lookAt(Ga,p,ra,3E3)),requestAnimationFrame(ca);
else if(C&&(C.isLoading()||!0===b.dynamic&&Ma))requestAnimationFrame(ca);else{B("animatefinished",{pitch:da.getPitch(),yaw:da.getYaw(),hfov:da.getHfov()});Ta=!1;ba=p;var a=b.autoRotateInactivityDelay-(Date.now()-N);0<a?Qa=setTimeout(function(){b.autoRotate=Z;da.lookAt(Ga,p,ra,3E3);F()},a):0<=b.autoRotateInactivityDelay&&Z&&(b.autoRotate=Z,da.lookAt(Ga,p,ra,3E3),F())}}function Fa(){var a;if(G){var f=C.getCanvas();!1!==b.autoRotate&&(360<b.yaw?b.yaw-=360:-360>b.yaw&&(b.yaw+=360));a=b.yaw;var n=0;if(b.avoidShowingBackground){var c=
b.hfov/2,d=180*Math.atan2(Math.tan(c/180*Math.PI),f.width/f.height)/Math.PI;b.vaov>b.haov?Math.min(Math.cos((b.pitch-c)/180*Math.PI),Math.cos((b.pitch+c)/180*Math.PI)):n=c*(1-Math.min(Math.cos((b.pitch-d)/180*Math.PI),Math.cos((b.pitch+d)/180*Math.PI)))}var c=b.maxYaw-b.minYaw,d=-180,e=180;360>c&&(d=b.minYaw+b.hfov/2+n,e=b.maxYaw-b.hfov/2-n,c<b.hfov&&(d=e=(d+e)/2),b.yaw=Math.max(d,Math.min(e,b.yaw)));!1===b.autoRotate&&(360<b.yaw?b.yaw-=360:-360>b.yaw&&(b.yaw+=360));!1!==b.autoRotate&&a!=b.yaw&&ba!==
p&&(b.autoRotate*=-1);a=2*Math.atan(Math.tan(b.hfov/180*Math.PI*0.5)/(f.width/f.height))/Math.PI*180;f=b.minPitch+a/2;n=b.maxPitch-a/2;b.maxPitch-b.minPitch<a&&(f=n=(f+n)/2);isNaN(f)&&(f=-90);isNaN(n)&&(n=90);b.pitch=Math.max(f,Math.min(n,b.pitch));C.render(b.pitch*Math.PI/180,b.yaw*Math.PI/180,b.hfov*Math.PI/180,{roll:b.roll*Math.PI/180});b.hotSpots.forEach(Ca);b.compass&&(Ia.style.transform="rotate("+(-b.yaw-b.northOffset)+"deg)",Ia.style.webkitTransform="rotate("+(-b.yaw-b.northOffset)+"deg)")}}
function Y(a,b,c,d){this.w=a;this.x=b;this.y=c;this.z=d}function na(a){var f;f=a.alpha;var c=a.beta;a=a.gamma;c=[c?c*Math.PI/180/2:0,a?a*Math.PI/180/2:0,f?f*Math.PI/180/2:0];f=[Math.cos(c[0]),Math.cos(c[1]),Math.cos(c[2])];c=[Math.sin(c[0]),Math.sin(c[1]),Math.sin(c[2])];f=new Y(f[0]*f[1]*f[2]-c[0]*c[1]*c[2],c[0]*f[1]*f[2]-f[0]*c[1]*c[2],f[0]*c[1]*f[2]+c[0]*f[1]*c[2],f[0]*f[1]*c[2]+c[0]*c[1]*f[2]);f=f.multiply(new Y(Math.sqrt(0.5),-Math.sqrt(0.5),0,0));c=E.orientation?-E.orientation*Math.PI/180/2:
0;f=f.multiply(new Y(Math.cos(c),0,-Math.sin(c),0)).toEulerAngles();"number"==typeof X&&10>X?X+=1:10===X?($a=f[2]/Math.PI*180+b.yaw,X=!0,requestAnimationFrame(ca)):(b.pitch=f[0]/Math.PI*180,b.roll=-f[1]/Math.PI*180,b.yaw=-f[2]/Math.PI*180+$a)}function va(){try{var a={};b.horizonPitch!==p&&(a.horizonPitch=b.horizonPitch*Math.PI/180);b.horizonRoll!==p&&(a.horizonRoll=b.horizonRoll*Math.PI/180);b.backgroundColor!==p&&(a.backgroundColor=b.backgroundColor);C.init(P,b.type,b.dynamic,b.haov*Math.PI/180,
b.vaov*Math.PI/180,b.vOffset*Math.PI/180,S,a);!0!==b.dynamic&&(P=p)}catch(f){if("webgl error"==f.type||"no webgl"==f.type)K();else if("webgl size error"==f.type)K(b.strings.textureSizeError.replace("%s",f.width).replace("%s",f.maxWidth));else throw K(b.strings.unknownError),f;}}function S(){if(b.sceneFadeDuration&&C.fadeImg!==p){C.fadeImg.style.opacity=0;var a=C.fadeImg;delete C.fadeImg;setTimeout(function(){M.removeChild(a);B("scenechangefadedone")},b.sceneFadeDuration)}Ia.style.display=b.compass?
"inline":"none";L();q.load.box.style.display="none";sa!==p&&(M.removeChild(sa),sa=p);G=!0;B("load");F()}function La(a){a.pitch=Number(a.pitch)||0;a.yaw=Number(a.yaw)||0;var f=g.createElement("div");f.className="pnlm-hotspot-base";f.className=a.cssClass?f.className+(" "+a.cssClass):f.className+(" pnlm-hotspot pnlm-sprite pnlm-"+D(a.type));var c=g.createElement("span");a.text&&(c.innerHTML=D(a.text));var d;if(a.video){d=g.createElement("video");var e=a.video;b.basePath&&!qa(e)&&(e=b.basePath+e);d.src=
I(e);d.controls=!0;d.style.width=a.width+"px";M.appendChild(f);c.appendChild(d)}else if(a.image){e=a.image;b.basePath&&!qa(e)&&(e=b.basePath+e);d=g.createElement("a");d.href=I(a.URL?a.URL:e,!0);d.target="_blank";c.appendChild(d);var h=g.createElement("img");h.src=I(e);h.style.width=a.width+"px";h.style.paddingTop="5px";M.appendChild(f);d.appendChild(h);c.style.maxWidth="initial"}else if(a.URL){d=g.createElement("a");d.href=I(a.URL,!0);if(a.attributes)for(e in a.attributes)d.setAttribute(e,a.attributes[e]);
else d.target="_blank";M.appendChild(d);f.className+=" pnlm-pointer";c.className+=" pnlm-pointer";d.appendChild(f)}else a.sceneId&&(f.onclick=f.ontouchend=function(){f.clicked||(f.clicked=!0,y(a.sceneId,a.targetPitch,a.targetYaw,a.targetHfov));return!1},f.className+=" pnlm-pointer",c.className+=" pnlm-pointer"),M.appendChild(f);if(a.createTooltipFunc)a.createTooltipFunc(f,a.createTooltipArgs);else if(a.text||a.video||a.image)f.classList.add("pnlm-tooltip"),f.appendChild(c),c.style.width=c.scrollWidth-
20+"px",c.style.marginLeft=-(c.scrollWidth-f.offsetWidth)/2+"px",c.style.marginTop=-c.scrollHeight-12+"px";a.clickHandlerFunc&&(f.addEventListener("click",function(b){a.clickHandlerFunc(b,a.clickHandlerArgs)},"false"),f.className+=" pnlm-pointer",c.className+=" pnlm-pointer");a.div=f}function L(){Ua||(b.hotSpots?(b.hotSpots=b.hotSpots.sort(function(a,b){return a.pitch<b.pitch}),b.hotSpots.forEach(La)):b.hotSpots=[],Ua=!0,b.hotSpots.forEach(Ca))}function e(){var a=b.hotSpots;Ua=!1;delete b.hotSpots;
if(a)for(var f=0;f<a.length;f++){var c=a[f].div;if(c){for(;c.parentNode&&c.parentNode!=M;)c=c.parentNode;M.removeChild(c)}delete a[f].div}}function Ca(a){var f=Math.sin(a.pitch*Math.PI/180),c=Math.cos(a.pitch*Math.PI/180),d=Math.sin(b.pitch*Math.PI/180),e=Math.cos(b.pitch*Math.PI/180),g=Math.cos((-a.yaw+b.yaw)*Math.PI/180),h=f*d+c*g*e;if(90>=a.yaw&&-90<a.yaw&&0>=h||(90<a.yaw||-90>=a.yaw)&&0>=h)a.div.style.visibility="hidden";else{var l=Math.sin((-a.yaw+b.yaw)*Math.PI/180),k=Math.tan(b.hfov*Math.PI/
360);a.div.style.visibility="visible";var m=C.getCanvas(),p=m.clientWidth,m=m.clientHeight,f=[-p/k*l*c/h/2,-p/k*(f*e-c*g*d)/h/2],c=Math.sin(b.roll*Math.PI/180),d=Math.cos(b.roll*Math.PI/180),f=[f[0]*d-f[1]*c,f[0]*c+f[1]*d];f[0]+=(p-a.div.offsetWidth)/2;f[1]+=(m-a.div.offsetHeight)/2;p="translate("+f[0]+"px, "+f[1]+"px) translateZ(9999px) rotate("+b.roll+"deg)";a.scale&&(p+=" scale("+ra/b.hfov/h+")");a.div.style.webkitTransform=p;a.div.style.MozTransform=p;a.div.style.transform=p}}function H(a){b=
{};var f,c,d="haov vaov vOffset northOffset horizonPitch horizonRoll".split(" ");aa=[];for(f in Va)Va.hasOwnProperty(f)&&(b[f]=Va[f]);for(f in k.default)if(k.default.hasOwnProperty(f))if("strings"==f)for(c in k.default.strings)k.default.strings.hasOwnProperty(c)&&(b.strings[c]=D(k.default.strings[c]));else b[f]=k.default[f],0<=d.indexOf(f)&&aa.push(f);if(null!==a&&""!==a&&k.scenes&&k.scenes[a]){var e=k.scenes[a];for(f in e)if(e.hasOwnProperty(f))if("strings"==f)for(c in e.strings)e.strings.hasOwnProperty(c)&&
(b.strings[c]=D(e.strings[c]));else b[f]=e[f],0<=d.indexOf(f)&&aa.push(f);b.scene=a}for(f in k)if(k.hasOwnProperty(f))if("strings"==f)for(c in k.strings)k.strings.hasOwnProperty(c)&&(b.strings[c]=D(k.strings[c]));else b[f]=k[f],0<=d.indexOf(f)&&aa.push(f)}function l(a){if((a=a?a:!1)&&"preview"in b){var c=b.preview;b.basePath&&!qa(c)&&(c=b.basePath+c);sa=g.createElement("div");sa.className="pnlm-preview-img";sa.style.backgroundImage="url('"+I(c).replace(/"/g,"%22").replace(/'/g,"%27")+"')";M.appendChild(sa)}var c=
b.title,d=b.author;a&&("previewTitle"in b&&(b.title=b.previewTitle),"previewAuthor"in b&&(b.author=b.previewAuthor));b.hasOwnProperty("title")||(q.title.innerHTML="");b.hasOwnProperty("author")||(q.author.innerHTML="");b.hasOwnProperty("title")||b.hasOwnProperty("author")||(q.container.style.display="none");v.load.innerHTML="<p>"+b.strings.loadButtonLabel+"</p>";q.load.boxp.innerHTML=b.strings.loadingLabel;for(var e in b)if(b.hasOwnProperty(e))switch(e){case "title":q.title.innerHTML=D(b[e]);q.container.style.display=
"inline";break;case "author":var h=D(b[e]);b.authorURL&&(h=g.createElement("a"),h.href=I(b.authorURL,!0),h.target="_blank",h.innerHTML=D(b[e]),h=h.outerHTML);q.author.innerHTML=b.strings.bylineLabel.replace("%s",h);q.container.style.display="inline";break;case "fallback":h=g.createElement("a");h.href=I(b[e],!0);h.target="_blank";h.textContent="Click here to view this panorama in an alternative viewer.";var k=g.createElement("p");k.textContent="Your browser does not support WebGL.";k.appendChild(g.createElement("br"));
k.appendChild(h);q.errorMsg.innerHTML="";q.errorMsg.appendChild(k);break;case "hfov":x(Number(b[e]));break;case "autoLoad":!0===b[e]&&C===p&&(q.load.box.style.display="inline",v.load.style.display="none",oa());break;case "showZoomCtrl":v.zoom.style.display=b[e]&&!1!=b.showControls?"block":"none";break;case "showFullscreenCtrl":v.fullscreen.style.display=b[e]&&!1!=b.showControls&&("fullscreen"in g||"mozFullScreen"in g||"webkitIsFullScreen"in g||"msFullscreenElement"in g)?"block":"none";break;case "hotSpotDebug":Wa.style.display=
b[e]?"block":"none";break;case "showControls":b[e]||(v.orientation.style.display="none",v.zoom.style.display="none",v.fullscreen.style.display="none");break;case "orientationOnByDefault":b[e]&&Ra()}a&&(c?b.title=c:delete b.title,d?b.author=d:delete b.author)}function h(){if(G&&!Na)if(Aa)g.exitFullscreen?g.exitFullscreen():g.mozCancelFullScreen?g.mozCancelFullScreen():g.webkitCancelFullScreen?g.webkitCancelFullScreen():g.msExitFullscreen&&g.msExitFullscreen();else try{s.requestFullscreen?s.requestFullscreen():
s.mozRequestFullScreen?s.mozRequestFullScreen():s.msRequestFullscreen?s.msRequestFullscreen():s.webkitRequestFullScreen()}catch(a){}}function d(a){g.fullscreenElement||g.fullscreen||g.mozFullScreen||g.webkitIsFullScreen||g.msFullscreenElement?(v.fullscreen.classList.add("pnlm-fullscreen-toggle-button-active"),Aa=!0):(v.fullscreen.classList.remove("pnlm-fullscreen-toggle-button-active"),Aa=!1);"resize"!==a&&B("fullscreenchange",Aa);C.resize();x(b.hfov);F()}function u(a){var c=b.minHfov;"multires"==
b.type&&C&&!b.multiResMinHfov&&(c=Math.min(c,C.getCanvas().width/(b.multiRes.cubeResolution/90*0.9)));if(c>b.maxHfov)return console.log("HFOV bounds do not make sense (minHfov > maxHfov)."),b.hfov;var d=b.hfov,d=a<c?c:a>b.maxHfov?b.maxHfov:a;b.avoidShowingBackground&&C&&(a=C.getCanvas(),d=Math.min(d,360*Math.atan(Math.tan((b.maxPitch-b.minPitch)/360*Math.PI)/a.height*a.width)/Math.PI));return d}function x(a){b.hfov=u(a);B("zoomchange",b.hfov)}function t(){O={};Z=b.autoRotate?b.autoRotate:Z;b.autoRotate=
!1}function Ya(){Na&&(q.load.box.style.display="none",q.errorMsg.style.display="none",Na=!1,M.style.display="block",B("errorcleared"));G=!1;v.load.style.display="none";q.load.box.style.display="inline";oa()}function y(a,c,d,h,g){G||(g=!0);G=!1;O={};var m,q;if(b.sceneFadeDuration&&!g&&(m=C.render(b.pitch*Math.PI/180,b.yaw*Math.PI/180,b.hfov*Math.PI/180,{returnImage:!0}),m!==p)){g=new Image;g.className="pnlm-fade-img";g.style.transition="opacity "+b.sceneFadeDuration/1E3+"s";g.style.width="100%";g.style.height=
"100%";g.onload=function(){y(a,c,d,h,!0)};g.src=m;M.appendChild(g);C.fadeImg=g;return}g="same"===c?b.pitch:c;m="same"===d?b.yaw:"sameAzimuth"===d?b.yaw+(b.northOffset||0)-(k.scenes[a].northOffset||0):d;q="same"===h?b.hfov:h;e();H(a);w.yaw=w.pitch=w.hfov=0;l();g!==p&&(b.pitch=g);m!==p&&(b.yaw=m);q!==p&&(b.hfov=q);B("scenechange",a);Ya()}function Da(){E.removeEventListener("deviceorientation",na);v.orientation.classList.remove("pnlm-orientation-button-active");X=!1}function Ra(){"function"===typeof DeviceMotionEvent.requestPermission?
DeviceOrientationEvent.requestPermission().then(function(a){"granted"==a&&(X=1,E.addEventListener("deviceorientation",na),v.orientation.classList.add("pnlm-orientation-button-active"))}):(X=1,E.addEventListener("deviceorientation",na),v.orientation.classList.add("pnlm-orientation-button-active"))}function D(a){return k.escapeHTML?String(a).split(/&/g).join("&amp;").split('"').join("&quot;").split("'").join("&#39;").split("<").join("&lt;").split(">").join("&gt;").split("/").join("&#x2f;").split("\n").join("<br>"):
String(a).split("\n").join("<br>")}function I(a,b){try{var c=decodeURIComponent(ab(a)).replace(/[^\w:]/g,"").toLowerCase()}catch(d){return"about:blank"}return 0===c.indexOf("javascript:")||0===c.indexOf("vbscript:")?(console.log("Script URL removed."),"about:blank"):b&&0===c.indexOf("data:")?(console.log("Data URI removed from link."),"about:blank"):a}function ab(a){return a.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,function(a,b){b=b.toLowerCase();return"colon"===b?":":"#"===b.charAt(0)?
"x"===b.charAt(1)?String.fromCharCode(parseInt(b.substring(2),16)):String.fromCharCode(+b.substring(1)):""})}function B(a){if(a in T)for(var b=T[a].length;0<b;b--)T[a][T[a].length-b].apply(null,[].slice.call(arguments,1))}var da=this,b,C,sa,ha=!1,N=Date.now(),xa=0,ya=0,Ha=-1,Oa=0,Pa=0,r=Array(10),Aa=!1,G,Na=!1,Sa=!1,P,ba,w={yaw:0,pitch:0,hfov:0},Ta=!1,X=!1,$a=0,Qa,Z=0,ra,Ga,O={},T={},aa=[],Ma=!1,Ua=!1,Za=!1,Va={hfov:100,minHfov:50,multiResMinHfov:!1,maxHfov:120,pitch:0,minPitch:p,maxPitch:p,yaw:0,
minYaw:-180,maxYaw:180,roll:0,haov:360,vaov:180,vOffset:0,autoRotate:!1,autoRotateInactivityDelay:-1,autoRotateStopDelay:p,type:"equirectangular",northOffset:0,showFullscreenCtrl:!0,dynamic:!1,dynamicUpdate:!1,doubleClickZoom:!0,keyboardZoom:!0,mouseZoom:!0,showZoomCtrl:!0,autoLoad:!1,showControls:!0,orientationOnByDefault:!1,hotSpotDebug:!1,backgroundColor:[0,0,0],avoidShowingBackground:!1,animationTimingFunction:function(a){return 0.5>a?2*a*a:-1+(4-2*a)*a},draggable:!0,disableKeyboardCtrl:!1,crossOrigin:"anonymous",
touchPanSpeedCoeffFactor:1,capturedKeyNumbers:[16,17,27,37,38,39,40,61,65,68,83,87,107,109,173,187,189],friction:0.15,strings:{loadButtonLabel:"Click to<br>Load<br>Panorama",loadingLabel:"Loading...",bylineLabel:"by %s",noPanoramaError:"No panorama image was specified.",fileAccessError:"The file %s could not be accessed.",malformedURLError:"There is something wrong with the panorama URL.",iOS8WebGLError:"Due to iOS 8's broken WebGL implementation, only progressive encoded JPEGs work for your device (this panorama uses standard encoding).",
genericWebGLError:"Your browser does not have the necessary WebGL support to display this panorama.",textureSizeError:"This panorama is too big for your device! It's %spx wide, but your device only supports images up to %spx wide. Try another device. (If you're the author, try scaling down the image.)",unknownError:"Unknown error. Check developer console."}};s="string"===typeof s?g.getElementById(s):s;s.classList.add("pnlm-container");s.tabIndex=0;var J=g.createElement("div");J.className="pnlm-ui";
s.appendChild(J);var M=g.createElement("div");M.className="pnlm-render-container";s.appendChild(M);var W=g.createElement("div");W.className="pnlm-dragfix";J.appendChild(W);var fa=g.createElement("span");fa.className="pnlm-about-msg";fa.innerHTML='<a href="https://pannellum.org/" target="_blank">Pannellum</a> 2.5.6';J.appendChild(fa);W.addEventListener("contextmenu",ja);var q={},Wa=g.createElement("div");Wa.className="pnlm-sprite pnlm-hot-spot-debug-indicator";J.appendChild(Wa);q.container=g.createElement("div");
q.container.className="pnlm-panorama-info";q.title=g.createElement("div");q.title.className="pnlm-title-box";q.container.appendChild(q.title);q.author=g.createElement("div");q.author.className="pnlm-author-box";q.container.appendChild(q.author);J.appendChild(q.container);q.load={};q.load.box=g.createElement("div");q.load.box.className="pnlm-load-box";q.load.boxp=g.createElement("p");q.load.box.appendChild(q.load.boxp);q.load.lbox=g.createElement("div");q.load.lbox.className="pnlm-lbox";q.load.lbox.innerHTML=
'<div class="pnlm-loading"></div>';q.load.box.appendChild(q.load.lbox);q.load.lbar=g.createElement("div");q.load.lbar.className="pnlm-lbar";q.load.lbarFill=g.createElement("div");q.load.lbarFill.className="pnlm-lbar-fill";q.load.lbar.appendChild(q.load.lbarFill);q.load.box.appendChild(q.load.lbar);q.load.msg=g.createElement("p");q.load.msg.className="pnlm-lmsg";q.load.box.appendChild(q.load.msg);J.appendChild(q.load.box);q.errorMsg=g.createElement("div");q.errorMsg.className="pnlm-error-msg pnlm-info-box";
J.appendChild(q.errorMsg);var v={};v.container=g.createElement("div");v.container.className="pnlm-controls-container";J.appendChild(v.container);v.load=g.createElement("div");v.load.className="pnlm-load-button";v.load.addEventListener("click",function(){l();Ya()});J.appendChild(v.load);v.zoom=g.createElement("div");v.zoom.className="pnlm-zoom-controls pnlm-controls";v.zoomIn=g.createElement("div");v.zoomIn.className="pnlm-zoom-in pnlm-sprite pnlm-control";v.zoomIn.addEventListener("click",function(){G&&
(x(b.hfov-5),F())});v.zoom.appendChild(v.zoomIn);v.zoomOut=g.createElement("div");v.zoomOut.className="pnlm-zoom-out pnlm-sprite pnlm-control";v.zoomOut.addEventListener("click",function(){G&&(x(b.hfov+5),F())});v.zoom.appendChild(v.zoomOut);v.container.appendChild(v.zoom);v.fullscreen=g.createElement("div");v.fullscreen.addEventListener("click",h);v.fullscreen.className="pnlm-fullscreen-toggle-button pnlm-sprite pnlm-fullscreen-toggle-button-inactive pnlm-controls pnlm-control";(g.fullscreenEnabled||
g.mozFullScreenEnabled||g.webkitFullscreenEnabled||g.msFullscreenEnabled)&&v.container.appendChild(v.fullscreen);v.orientation=g.createElement("div");v.orientation.addEventListener("click",function(a){X?Da():Ra()});v.orientation.addEventListener("mousedown",function(a){a.stopPropagation()});v.orientation.addEventListener("touchstart",function(a){a.stopPropagation()});v.orientation.addEventListener("pointerdown",function(a){a.stopPropagation()});v.orientation.className="pnlm-orientation-button pnlm-orientation-button-inactive pnlm-sprite pnlm-controls pnlm-control";
var Xa=!1;E.DeviceOrientationEvent&&"https:"==location.protocol&&0<=navigator.userAgent.toLowerCase().indexOf("mobi")&&(v.container.appendChild(v.orientation),Xa=!0);var Ia=g.createElement("div");Ia.className="pnlm-compass pnlm-controls pnlm-control";J.appendChild(Ia);k.firstScene?H(k.firstScene):k.default&&k.default.firstScene?H(k.default.firstScene):H(null);l(!0);var ia=[],za=[];Y.prototype.multiply=function(a){return new Y(this.w*a.w-this.x*a.x-this.y*a.y-this.z*a.z,this.x*a.w+this.w*a.x+this.y*
a.z-this.z*a.y,this.y*a.w+this.w*a.y+this.z*a.x-this.x*a.z,this.z*a.w+this.w*a.z+this.x*a.y-this.y*a.x)};Y.prototype.toEulerAngles=function(){var a=Math.atan2(2*(this.w*this.x+this.y*this.z),1-2*(this.x*this.x+this.y*this.y)),b=Math.asin(2*(this.w*this.y-this.z*this.x)),c=Math.atan2(2*(this.w*this.z+this.x*this.y),1-2*(this.y*this.y+this.z*this.z));return[a,b,c]};this.isLoaded=function(){return Boolean(G)};this.getPitch=function(){return b.pitch};this.setPitch=function(a,c,d,e){N=Date.now();if(1E-6>=
Math.abs(a-b.pitch))return"function"==typeof d&&d(e),this;(c=c==p?1E3:Number(c))?(O.pitch={startTime:Date.now(),startPosition:b.pitch,endPosition:a,duration:c},"function"==typeof d&&setTimeout(function(){d(e)},c)):b.pitch=a;F();return this};this.getPitchBounds=function(){return[b.minPitch,b.maxPitch]};this.setPitchBounds=function(a){b.minPitch=Math.max(-90,Math.min(a[0],90));b.maxPitch=Math.max(-90,Math.min(a[1],90));return this};this.getYaw=function(){return(b.yaw+540)%360-180};this.setYaw=function(a,
c,d,e){N=Date.now();if(1E-6>=Math.abs(a-b.yaw))return"function"==typeof d&&d(e),this;c=c==p?1E3:Number(c);a=(a+180)%360-180;c?(180<b.yaw-a?a+=360:180<a-b.yaw&&(a-=360),O.yaw={startTime:Date.now(),startPosition:b.yaw,endPosition:a,duration:c},"function"==typeof d&&setTimeout(function(){d(e)},c)):b.yaw=a;F();return this};this.getYawBounds=function(){return[b.minYaw,b.maxYaw]};this.setYawBounds=function(a){b.minYaw=Math.max(-360,Math.min(a[0],360));b.maxYaw=Math.max(-360,Math.min(a[1],360));return this};
this.getHfov=function(){return b.hfov};this.setHfov=function(a,c,d,e){N=Date.now();if(1E-6>=Math.abs(a-b.hfov))return"function"==typeof d&&d(e),this;(c=c==p?1E3:Number(c))?(O.hfov={startTime:Date.now(),startPosition:b.hfov,endPosition:u(a),duration:c},"function"==typeof d&&setTimeout(function(){d(e)},c)):x(a);F();return this};this.getHfovBounds=function(){return[b.minHfov,b.maxHfov]};this.setHfovBounds=function(a){b.minHfov=Math.max(0,a[0]);b.maxHfov=Math.max(0,a[1]);return this};this.lookAt=function(a,
c,d,e,g,h){e=e==p?1E3:Number(e);a!==p&&1E-6<Math.abs(a-b.pitch)&&(this.setPitch(a,e,g,h),g=p);c!==p&&1E-6<Math.abs(c-b.yaw)&&(this.setYaw(c,e,g,h),g=p);d!==p&&1E-6<Math.abs(d-b.hfov)&&(this.setHfov(d,e,g,h),g=p);"function"==typeof g&&g(h);return this};this.getNorthOffset=function(){return b.northOffset};this.setNorthOffset=function(a){b.northOffset=Math.min(360,Math.max(0,a));F();return this};this.getHorizonRoll=function(){return b.horizonRoll};this.setHorizonRoll=function(a){b.horizonRoll=Math.min(90,
Math.max(-90,a));C.setPose(b.horizonPitch*Math.PI/180,b.horizonRoll*Math.PI/180);F();return this};this.getHorizonPitch=function(){return b.horizonPitch};this.setHorizonPitch=function(a){b.horizonPitch=Math.min(90,Math.max(-90,a));C.setPose(b.horizonPitch*Math.PI/180,b.horizonRoll*Math.PI/180);F();return this};this.startAutoRotate=function(a,c){a=a||Z||1;c=c===p?Ga:c;b.autoRotate=a;da.lookAt(c,p,ra,3E3);F();return this};this.stopAutoRotate=function(){Z=b.autoRotate?b.autoRotate:Z;b.autoRotate=!1;b.autoRotateInactivityDelay=
-1;return this};this.stopMovement=function(){t();w={yaw:0,pitch:0,hfov:0}};this.getRenderer=function(){return C};this.setUpdate=function(a){Ma=!0===a;C===p?pa():F();return this};this.mouseEventToCoords=function(a){return ta(a)};this.loadScene=function(a,b,c,d){!1!==G&&y(a,b,c,d);return this};this.getScene=function(){return b.scene};this.addScene=function(a,b){k.scenes[a]=b;return this};this.removeScene=function(a){if(b.scene===a||!k.scenes.hasOwnProperty(a))return!1;delete k.scenes[a];return!0};this.toggleFullscreen=
function(){h();return this};this.getConfig=function(){return b};this.getContainer=function(){return s};this.addHotSpot=function(a,c){if(c===p&&b.scene===p)b.hotSpots.push(a);else{var d=c!==p?c:b.scene;if(k.scenes.hasOwnProperty(d))k.scenes[d].hasOwnProperty("hotSpots")||(k.scenes[d].hotSpots=[],d==b.scene&&(b.hotSpots=k.scenes[d].hotSpots)),k.scenes[d].hotSpots.push(a);else throw"Invalid scene ID!";}if(c===p||b.scene==c)La(a),G&&Ca(a);return this};this.removeHotSpot=function(a,c){if(c===p||b.scene==
c){if(!b.hotSpots)return!1;for(var d=0;d<b.hotSpots.length;d++)if(b.hotSpots[d].hasOwnProperty("id")&&b.hotSpots[d].id===a){for(var e=b.hotSpots[d].div;e.parentNode!=M;)e=e.parentNode;M.removeChild(e);delete b.hotSpots[d].div;b.hotSpots.splice(d,1);return!0}}else if(k.scenes.hasOwnProperty(c)){if(!k.scenes[c].hasOwnProperty("hotSpots"))return!1;for(d=0;d<k.scenes[c].hotSpots.length;d++)if(k.scenes[c].hotSpots[d].hasOwnProperty("id")&&k.scenes[c].hotSpots[d].id===a)return k.scenes[c].hotSpots.splice(d,
1),!0}else return!1};this.resize=function(){C&&z()};this.isLoaded=function(){return G};this.isOrientationSupported=function(){return Xa||!1};this.stopOrientation=function(){Da()};this.startOrientation=function(){Xa&&Ra()};this.isOrientationActive=function(){return Boolean(X)};this.on=function(a,b){T[a]=T[a]||[];T[a].push(b);return this};this.off=function(a,b){if(!a)return T={},this;if(b){var c=T[a].indexOf(b);0<=c&&T[a].splice(c,1);0==T[a].length&&delete T[a]}else delete T[a];return this};this.destroy=
function(){Za=!0;clearTimeout(Qa);C&&C.destroy();Sa&&(g.removeEventListener("mousemove",ua,!1),g.removeEventListener("mouseup",ma,!1),s.removeEventListener("mozfullscreenchange",d,!1),s.removeEventListener("webkitfullscreenchange",d,!1),s.removeEventListener("msfullscreenchange",d,!1),s.removeEventListener("fullscreenchange",d,!1),E.removeEventListener("resize",z,!1),E.removeEventListener("orientationchange",z,!1),s.removeEventListener("keydown",V,!1),s.removeEventListener("keyup",R,!1),s.removeEventListener("blur",
$,!1),g.removeEventListener("mouseleave",ma,!1));s.innerHTML="";s.classList.remove("pnlm-container")}}return{viewer:function(g,k){return new Ba(g,k)}}}(window,document);
+114
View File
@@ -0,0 +1,114 @@
.pvtUi { color: #333; }
table.pvtTable {
font-size: 8pt;
text-align: left;
border-collapse: collapse;
}
table.pvtTable thead tr th, table.pvtTable tbody tr th {
background-color: #e6EEEE;
border: 1px solid #CDCDCD;
font-size: 8pt;
padding: 5px;
}
table.pvtTable .pvtColLabel {text-align: center;}
table.pvtTable .pvtTotalLabel {text-align: right;}
table.pvtTable tbody tr td {
color: #3D3D3D;
padding: 5px;
background-color: #FFF;
border: 1px solid #CDCDCD;
vertical-align: top;
text-align: right;
}
.pvtTotal, .pvtGrandTotal { font-weight: bold; }
.pvtVals { text-align: center; white-space: nowrap;}
.pvtRowOrder, .pvtColOrder {
cursor:pointer;
width: 15px;
margin-left: 5px;
display: inline-block; }
.pvtAggregator { margin-bottom: 5px ;}
.pvtAxisContainer, .pvtVals {
border: 1px solid gray;
background: #EEE;
padding: 5px;
min-width: 20px;
min-height: 20px;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-khtml-user-select: none;
-ms-user-select: none;
}
.pvtAxisContainer li {
padding: 8px 6px;
list-style-type: none;
cursor:move;
}
.pvtAxisContainer li.pvtPlaceholder {
-webkit-border-radius: 5px;
padding: 3px 15px;
-moz-border-radius: 5px;
border-radius: 5px;
border: 1px dashed #aaa;
}
.pvtAxisContainer li span.pvtAttr {
-webkit-text-size-adjust: 100%;
background: #F3F3F3;
border: 1px solid #DEDEDE;
padding: 2px 5px;
white-space:nowrap;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.pvtTriangle {
cursor:pointer;
color: grey;
}
.pvtHorizList li { display: inline; }
.pvtVertList { vertical-align: top; }
.pvtFilteredAttribute { font-style: italic }
.pvtFilterBox{
z-index: 100;
width: 300px;
border: 1px solid gray;
background-color: #fff;
position: absolute;
text-align: center;
}
.pvtFilterBox h4{ margin: 15px; }
.pvtFilterBox p { margin: 10px auto; }
.pvtFilterBox label { font-weight: normal; }
.pvtFilterBox input[type='checkbox'] { margin-right: 10px; margin-left: 10px; }
.pvtFilterBox input[type='text'] { width: 230px; }
.pvtFilterBox .count { color: gray; font-weight: normal; margin-left: 3px;}
.pvtCheckContainer{
text-align: left;
font-size: 14px;
white-space: nowrap;
overflow-y: scroll;
width: 100%;
max-height: 250px;
border-top: 1px solid lightgrey;
border-bottom: 1px solid lightgrey;
}
.pvtCheckContainer p{ margin: 5px; }
.pvtRendererArea { padding: 5px;}
+1853
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+10
View File
File diff suppressed because one or more lines are too long
+18
View File
@@ -0,0 +1,18 @@
2020.06.03
修改了view.js
原1233~1235
addListener(document, EVENT_POINTER_MOVE, this.onPointerMove = this.pointermove.bind(this));
addListener(document, EVENT_POINTER_UP, this.onPointerUp = this.pointerup.bind(this));
addListener(document, EVENT_KEY_DOWN, this.onKeyDown = this.keydown.bind(this));
改:
addListener(canvas, EVENT_POINTER_MOVE, this.onPointerMove = this.pointermove.bind(this));
addListener(canvas, EVENT_POINTER_UP, this.onPointerUp = this.pointerup.bind(this));
addListener(canvas, EVENT_KEY_DOWN, this.onKeyDown = this.keydown.bind(this));
原1257~1259
removeListener(document, EVENT_POINTER_MOVE, this.onPointerMove);
removeListener(document, EVENT_POINTER_UP, this.onPointerUp);
removeListener(document, EVENT_KEY_DOWN, this.onKeyDown);
改:
removeListener(canvas, EVENT_POINTER_MOVE, this.onPointerMove);
removeListener(canvas, EVENT_POINTER_UP, this.onPointerUp);
removeListener(canvas, EVENT_KEY_DOWN, this.onKeyDown);
File diff suppressed because it is too large Load Diff
+42
View File
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<title>WebDataRocks</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link href="webdatarocks.min.css" rel="stylesheet" />
<script src="webdatarocks.toolbar.min.js"></script>
<script src="webdatarocks.js"></script>
</head>
<body>
<div id="wdr-component"></div>
<script>
var pivot = new WebDataRocks({
container: "#wdr-component",
toolbar: true,
beforetoolbarcreated: customizeToolbar,
// report: {
// filename: "admin.csv",
// },
global: {
localization: "./zh.json"
}
});
function customizeToolbar(toolbar) {
var tabs = toolbar.getTabs(); // get all tabs from the toolbar
toolbar.getTabs = function() {
tabs[0].menu=undefined;
tabs[0].id="reflash";
tabs[0].title="更新数据";
tabs[0].icon='<svg t="1629769424436" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3255" width="36" height="36"><path d="M917.8 111.2l-84.6 84.6-2.5-7.4C743.5 106.3 641.5 64 517.1 64s-231.5 42.3-318.6 129.4C111.3 280.5 69 387.5 69 511.9S111.3 740.8 198.4 828c87.1 87.1 194.1 132 318.6 132s229-44.9 316-132c47.2-44.8 79.7-94.6 102-151.8l-208.9-79.7c-10 24.9-29.8 49.8-49.8 72.2-44.8 44.9-97.1 67.3-159.2 67.3s-114.5-22.4-159.3-67.2c-42.3-42.3-64.7-94.5-64.7-156.8s22.4-114.5 64.7-159.3c44.8-42.3 97.1-64.7 159.3-64.7 59.7 0 112 19.9 154.3 59.7l14.9-12.5-14.9 12.5 4.9 4.9-84.6 84.6c-7.4 4.9-7.4 10-10 14.9-2.5 7.5-2.5 10 0 12.5 2.5 4.9 4.9 7.4 10 7.4l333.5 2.5c2.5 0 7.5-2.5 12.5-2.5 4.9-4.9 7.5-10 12.5-14.9 2.5-4.9 4.9-10 4.9-12.5l-4.9-333.5v-2.5c0-4.9-2.5-4.9-4.9-7.4 0 0-2.5 0-2.5-2.5-2.5 0-4.9 2.5-10 2.5-5.1 2.6-12.6 5.1-15 10z" p-id="3256"></path></svg>';
tabs[0].handler=function(){
pivot.updateData({filename: 'admin.csv'});
}
return tabs;
}
}
</script>
</body>
</html>
@@ -0,0 +1,41 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="webdatarocks-icons" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe900;" glyph-name="arrow-down" d="M798.133 371.467c-16.533 16.533-43.733 16.533-60.267 0l-183.2-183.2v579.733c0 23.467-19.2 42.667-42.667 42.667s-42.667-19.2-42.667-42.667v-579.733l-183.2 183.2c-16.533 16.533-43.733 16.533-60.267 0s-16.533-43.733 0-60.267l256-256c0.533-0.533 1.067-1.067 1.6-1.6 0 0 0 0 0 0s0.267-0.267 0.267-0.267c0 0 0 0 0.267-0.267 0 0 0 0 0.267-0.267 0 0 0.267-0.267 0.267-0.267s0 0 0 0 0.267-0.267 0.267-0.267c0 0 0 0 0 0 3.2-2.667 6.4-4.533 9.867-6.133 0 0 0 0 0.267 0 0 0 0 0 0.267 0 4.533-1.867 9.6-3.2 14.933-3.467 0 0 0 0 0 0 0.267 0 0.267 0 0.533 0 0 0 0 0 0 0s0.267 0 0.267 0c0 0 0.267 0 0.267 0s0.267 0 0.267 0 0.267 0 0.533 0 0.267 0 0.533 0c0 0 0.267 0 0.267 0s0.267 0 0.267 0c0 0 0.267 0 0.267 0s0 0 0 0c0.267 0 0.267 0 0.533 0 0 0 0 0 0 0 5.333 0.267 10.4 1.333 14.933 3.467 0 0 0 0 0 0s0.267 0 0.267 0c0 0 0.267 0 0.267 0s0 0 0 0c3.2 1.333 6.133 3.2 9.067 5.6 0 0 0 0 0 0s0.267 0.267 0.267 0.267c0 0 0 0 0 0s0.267 0.267 0.267 0.267c0 0 0 0 0.267 0.267 0 0 0 0 0.267 0.267 0 0 0.267 0.267 0.267 0.267s0 0 0 0c0.8 0.533 1.333 1.333 2.133 2.133l255.733 255.733c17.333 16.8 17.333 44 0.533 60.533z" />
<glyph unicode="&#xe901;" glyph-name="check" d="M883.467 712.8c-16.533 16.533-43.733 16.533-60.267 0l-439.2-439.2-183.2 183.2c-16.533 16.533-43.733 16.533-60.267 0s-16.533-43.733 0-60.267l213.333-213.333c8.267-8.267 19.2-12.533 30.133-12.533s21.867 4.267 30.133 12.533l469.333 469.333c16.8 16.533 16.8 43.733 0 60.267z" />
<glyph unicode="&#xe902;" glyph-name="chevron-down" d="M798.133 584.8c-16.533 16.533-43.733 16.533-60.267 0l-225.867-225.867-225.867 225.867c-16.533 16.533-43.733 16.533-60.267 0s-16.533-43.733 0-60.267l256-256c8.267-8.267 19.2-12.533 30.133-12.533s21.867 4.267 30.133 12.533l256 256c16.8 16.533 16.8 43.733 0 60.267z" />
<glyph unicode="&#xe903;" glyph-name="chevron-right" d="M670.133 456.8l-256 256c-16.533 16.533-43.733 16.533-60.267 0s-16.533-43.733 0-60.267l225.867-225.867-225.867-225.867c-16.533-16.533-16.533-43.733 0-60.267 8.267-8.267 19.2-12.533 30.133-12.533s21.867 4.267 30.133 12.533l256 256c16.8 16.533 16.8 43.733 0 60.267z" />
<glyph unicode="&#xe904;" glyph-name="chevron-up" d="M798.133 328.8l-256 256c-16.533 16.533-43.733 16.533-60.267 0l-256-256c-16.533-16.533-16.533-43.733 0-60.267s43.733-16.533 60.267 0l225.867 225.867 225.867-225.867c8.267-8.267 19.2-12.533 30.133-12.533s21.867 4.267 30.133 12.533c16.8 16.533 16.8 43.733 0 60.267z" />
<glyph unicode="&#xe907;" glyph-name="menu" d="M896 469.334h-768c-23.467 0-42.667-19.2-42.667-42.667s19.2-42.667 42.667-42.667h768c23.467 0 42.667 19.2 42.667 42.667s-19.2 42.667-42.667 42.667zM128 640h768c23.467 0 42.667 19.2 42.667 42.667s-19.2 42.667-42.667 42.667h-768c-23.467 0-42.667-19.2-42.667-42.667s19.2-42.667 42.667-42.667zM896 213.334h-768c-23.467 0-42.667-19.2-42.667-42.667s19.2-42.667 42.667-42.667h768c23.467 0 42.667 19.2 42.667 42.667s-19.2 42.667-42.667 42.667z" />
<glyph unicode="&#xe908;" glyph-name="x" d="M572.267 426.667l225.867 225.867c16.533 16.533 16.533 43.733 0 60.267s-43.733 16.533-60.267 0l-225.867-225.867-225.867 225.867c-16.533 16.533-43.733 16.533-60.267 0s-16.533-43.733 0-60.267l225.867-225.867-225.867-225.867c-16.533-16.533-16.533-43.733 0-60.267 8.267-8.267 19.2-12.533 30.133-12.533s21.867 4.267 30.133 12.533l225.867 225.867 225.867-225.867c8.267-8.267 19.2-12.533 30.133-12.533s21.867 4.267 30.133 12.533c16.533 16.533 16.533 43.733 0 60.267l-225.867 225.867z" />
<glyph unicode="&#xe909;" glyph-name="act_add" d="M512 789.333c-188.513 0-341.333-152.82-341.333-341.333s152.82-341.333 341.333-341.333c188.513 0 341.333 152.82 341.333 341.333s-152.82 341.333-341.333 341.333zM682.667 411.477h-134.144v-134.144h-73.045v134.144h-134.144v73.045h134.144v134.144h73.045v-134.144h134.144z" />
<glyph unicode="&#xe90a;" glyph-name="act_calc" d="M763.221 806.4h-502.443c-31.123-0.941-55.995-26.396-55.995-57.661 0-0.489 0.006-0.976 0.018-1.462l-0.001-598.627c-0.011-0.414-0.017-0.901-0.017-1.39 0-31.264 24.872-56.72 55.909-57.659l502.529-0.002c31.123 0.941 55.995 26.396 55.995 57.661 0 0.489-0.006 0.976-0.018 1.462l0.001 598.627c0.011 0.414 0.017 0.901 0.017 1.39 0 31.264-24.872 56.72-55.909 57.659zM387.755 189.611c0.003-0.106 0.004-0.231 0.004-0.356 0-8.621-6.801-15.654-15.33-16.027l-79.906-0.001c-8.563 0.374-15.364 7.407-15.364 16.028 0 0.125 0.001 0.25 0.004 0.374v82.584c-0.003 0.106-0.004 0.231-0.004 0.356 0 8.621 6.801 15.654 15.33 16.027l78.199 0.001c8.563-0.374 15.364-7.407 15.364-16.028 0-0.125-0.001-0.25-0.004-0.374zM387.755 372.565c0.003-0.106 0.004-0.231 0.004-0.356 0-8.621-6.801-15.654-15.33-16.027l-79.906-0.001c-8.563 0.374-15.364 7.407-15.364 16.028 0 0.125 0.001 0.25 0.004 0.374v82.584c-0.003 0.106-0.004 0.231-0.004 0.356 0 8.621 6.801 15.654 15.33 16.027l78.199 0.001c8.563-0.374 15.364-7.407 15.364-16.028 0-0.125-0.001-0.25-0.004-0.374zM568.32 189.611c0.003-0.106 0.004-0.231 0.004-0.356 0-8.621-6.801-15.654-15.33-16.027l-79.906-0.001c-8.563 0.374-15.364 7.407-15.364 16.028 0 0.125 0.001 0.25 0.004 0.374v82.584c-0.003 0.106-0.004 0.231-0.004 0.356 0 8.621 6.801 15.654 15.33 16.027l78.199 0.001c8.563-0.374 15.364-7.407 15.364-16.028 0-0.125-0.001-0.25-0.004-0.374zM568.32 372.565c0.003-0.106 0.004-0.231 0.004-0.356 0-8.621-6.801-15.654-15.33-16.027l-79.906-0.001c-8.563 0.374-15.364 7.407-15.364 16.028 0 0.125 0.001 0.25 0.004 0.374v82.584c-0.003 0.106-0.004 0.231-0.004 0.356 0 8.621 6.801 15.654 15.33 16.027l78.199 0.001c8.563-0.374 15.364-7.407 15.364-16.028 0-0.125-0.001-0.25-0.004-0.374zM748.885 189.611c0.003-0.106 0.004-0.231 0.004-0.356 0-8.621-6.801-15.654-15.33-16.027l-80.247-0.001c-8.563 0.374-15.364 7.407-15.364 16.028 0 0.125 0.001 0.25 0.004 0.374v82.584c-0.003 0.106-0.004 0.231-0.004 0.356 0 8.621 6.801 15.654 15.33 16.027l78.199 0.001c8.563-0.374 15.364-7.407 15.364-16.028 0-0.125-0.001-0.25-0.004-0.374zM748.885 372.565c0.003-0.106 0.004-0.231 0.004-0.356 0-8.621-6.801-15.654-15.33-16.027l-80.247-0.001c-8.563 0.374-15.364 7.407-15.364 16.028 0 0.125 0.001 0.25 0.004 0.374v82.584c-0.003 0.106-0.004 0.231-0.004 0.356 0 8.621 6.801 15.654 15.33 16.027l78.199 0.001c8.563-0.374 15.364-7.407 15.364-16.028 0-0.125-0.001-0.25-0.004-0.374zM748.885 570.539c0.003-0.106 0.004-0.231 0.004-0.356 0-8.621-6.801-15.654-15.33-16.027l-441.036-0.001c-8.563 0.374-15.364 7.407-15.364 16.028 0 0.125 0.001 0.25 0.004 0.374v147.779c-0.003 0.106-0.004 0.231-0.004 0.356 0 8.621 6.801 15.654 15.33 16.027l438.988 0.001c8.563-0.374 15.364-7.407 15.364-16.028 0-0.125-0.001-0.25-0.004-0.374z" />
<glyph unicode="&#xe90e;" glyph-name="act_filter" d="M844.8 806.4h-665.6l256-358.4v-358.4l153.6 153.6v204.8z" />
<glyph unicode="&#xe90f;" glyph-name="act_font" d="M415.744 259.584h192.171l34.133-118.784h143.019l-197.291 614.4h-151.893l-196.949-614.4h142.336zM512 588.971v0l63.488-217.429h-128.341z" />
<glyph unicode="&#xe910;" glyph-name="act_move" d="M307.2 627.2h409.6v-51.2h-409.6v51.2zM307.2 473.6h409.6v-51.2h-409.6v51.2zM307.2 320h409.6v-51.2h-409.6v51.2z" />
<glyph unicode="&#xe913;" glyph-name="act_search" d="M647.089 366.868h-28.751l-10.634 10.634c35.681 39.692 57.503 92.468 57.503 150.34 0 0.315-0.001 0.631-0.002 0.946 0 129.155-104.74 233.896-233.944 233.896s-233.945-104.741-233.945-233.945c0-129.204 104.741-233.945 233.945-233.945 0.266-0.001 0.582-0.002 0.897-0.002 57.872 0 110.647 21.822 150.547 57.686l10.427-10.817v-28.751l179.988-179.988 53.957 53.957zM430.868 366.868c-89.399 0-161.871 72.472-161.871 161.871s72.472 161.871 161.871 161.871c89.399 0 161.871-72.472 161.871-161.871 0-0.117 0-0.256 0-0.394 0-89.181-72.296-161.477-161.477-161.477-0.139 0-0.277 0-0.416 0.001z" />
<glyph unicode="&#xe914;" glyph-name="act_sigma" d="M256 684.308h512v-111.458h-90.978v32.689h-226.462l146.511-157.538-146.511-157.538h226.855v30.72h90.585v-109.489h-512l222.523 236.308z" />
<glyph unicode="&#xe915;" glyph-name="act_table_settings" d="M158.208 325.12l67.072-112.64c6.119-9.974 16.963-16.526 29.338-16.526 3.788 0 7.433 0.614 10.84 1.748l-0.242-0.070 98.816 32.256c7.52-4.955 16.404-10.063 25.589-14.659l1.547-0.701 18.432-98.816c3.403-15.046 16.659-26.113 32.499-26.113 0.095 0 0.189 0 0.283 0.001h134.642c0.080-0.001 0.174-0.001 0.269-0.001 15.84 0 29.096 11.067 32.457 25.89l0.042 0.223 20.48 99.328c10.742 5.309 19.626 10.417 28.174 15.996l-1.038-0.636 98.816-32.256c3.165-1.064 6.81-1.678 10.598-1.678 12.375 0 23.219 6.552 29.253 16.377l0.085 0.149 67.072 112.64c2.846 4.665 4.531 10.308 4.531 16.345 0 9.904-4.536 18.749-11.643 24.57l-0.056 0.045-75.776 66.048c0 5.12 0 10.24 0 15.36s0 10.24 0 15.36l78.848 66.56c7.164 5.866 11.699 14.711 11.699 24.615 0 6.037-1.685 11.68-4.611 16.485l0.079-0.14-67.584 112.64c-6.165 9.733-16.877 16.101-29.076 16.101-3.885 0-7.62-0.646-11.102-1.836l0.241 0.072-98.816-32.256c-7.518 4.952-16.401 10.061-25.586 14.657l-1.55 0.703-18.432 99.328c-3.358 15.105-16.642 26.23-32.525 26.23-0.987 0-1.964-0.043-2.928-0.127l0.125 0.009h-134.144c-0.84 0.075-1.816 0.118-2.803 0.118-15.882 0-29.166-11.126-32.483-26.009l-0.041-0.222-20.48-99.328c-10.748-5.315-19.631-10.423-28.182-16l1.046 0.64-96.768 32.768c-3.241 1.119-6.975 1.765-10.86 1.765-12.199 0-22.911-6.368-28.993-15.96l-67.155-113.292c-2.846-4.665-4.531-10.308-4.531-16.345 0-9.904 4.536-18.749 11.643-24.57l0.056-0.045 78.336-66.56c0-5.12 0-10.24 0-15.36s0-10.24 0-15.36l-78.848-66.56c-6.964-5.862-11.359-14.585-11.359-24.333 0-6.153 1.75-11.897 4.781-16.761l-0.078 0.134zM512 578.56c70.322-2.276 126.464-59.83 126.464-130.496 0-72.106-58.454-130.56-130.56-130.56-72.084 0-130.523 58.417-130.56 130.492v0.004c1.144 72.358 60.070 130.576 132.592 130.576 0.726 0 1.45-0.006 2.173-0.017l-0.109 0.001z" />
<glyph unicode="&#xe948;" glyph-name="notif_info" d="M588.8 704c0-42.415-34.385-76.8-76.8-76.8s-76.8 34.385-76.8 76.8c0 42.415 34.385 76.8 76.8 76.8s76.8-34.385 76.8-76.8zM460.8 550.4h102.4v-435.2h-102.4v435.2z" />
<glyph unicode="&#xe949;" glyph-name="notif_warning" d="M563.2 179.2c0-28.277-22.923-51.2-51.2-51.2s-51.2 22.923-51.2 51.2c0 28.277 22.923 51.2 51.2 51.2s51.2-22.923 51.2-51.2zM435.2 768l25.6-435.2h102.4l25.6 435.2h-153.6z" />
<glyph unicode="&#xe94e;" glyph-name="preloader" d="M512.235 21.333c-141.739 0-274.133 71.851-352.768 187.477v-174.869h-34.155v256h256.149v-34.133h-211.008c69.077-122.56 200.384-200.384 341.781-200.384 211.221 0 387.2 171.819 392.277 382.997l34.155-0.768c-5.547-229.589-196.843-416.32-426.432-416.32zM85.675 441.088l17.067 0.256-17.173 1.92c-0.149 1.557-0.235 3.115-0.235 4.736 0 235.264 191.531 426.667 426.901 426.667 146.688 0 281.195-74.923 358.976-195.541v170.987h34.155v-256.021h-256.171v34.176h212.053c-67.179 129.835-201.408 212.309-349.013 212.309-216.555 0-392.747-176.128-392.747-392.555l0.32-6.421-34.133-0.512z" />
<glyph unicode="&#xe950;" glyph-name="kpi_status_good" d="M512 960c-282.773 0-512-229.227-512-512s229.227-512 512-512 512 229.227 512 512-229.227 512-512 512z" />
<glyph unicode="&#xe951;" glyph-name="kpi_status_bad" d="M512 960c-282.773 0-512-229.227-512-512s229.227-512 512-512 512 229.227 512 512-229.227 512-512 512zM512 64c-212.075 0-384 171.925-384 384s171.925 384 384 384c212.075 0 384-171.925 384-384s-171.925-384-384-384z" />
<glyph unicode="&#xe952;" glyph-name="kpi_status_ok" d="M512 960c-282.773 0-512-229.227-512-512s229.227-512 512-512 512 229.227 512 512-229.227 512-512 512zM128 448c0 212.075 171.925 384 384 384v-768c-212.075 0-384 171.925-384 384z" />
<glyph unicode="&#xe953;" glyph-name="kpi_status_rising" d="M512 960c-282.667 0-512-229.333-512-512s229.333-512 512-512 512 229.333 512 512-229.333 512-512 512zM128 448c0 212.053 171.947 384 384 384v-384h-384z" />
<glyph unicode="&#xe954;" glyph-name="kpi_status_risk" d="M512 960c-282.667 0-512-229.333-512-512s229.333-512 512-512 512 229.333 512 512-229.333 512-512 512zM512 64c-212.053 0-384 171.947-384 384s171.947 384 384 384v-384h384c0-212.053-171.947-384-384-384z" />
<glyph unicode="&#xe97b;" glyph-name="spinner2" d="M1024 448c-1.278 66.862-15.784 133.516-42.576 194.462-26.704 61-65.462 116.258-113.042 161.92-47.552 45.696-103.944 81.82-164.984 105.652-61.004 23.924-126.596 35.352-191.398 33.966-64.81-1.282-129.332-15.374-188.334-41.356-59.048-25.896-112.542-63.47-156.734-109.576-44.224-46.082-79.16-100.708-102.186-159.798-23.114-59.062-34.128-122.52-32.746-185.27 1.286-62.76 14.964-125.148 40.134-182.206 25.088-57.1 61.476-108.828 106.11-151.548 44.61-42.754 97.472-76.504 154.614-98.72 57.118-22.304 118.446-32.902 179.142-31.526 60.708 1.29 120.962 14.554 176.076 38.914 55.15 24.282 105.116 59.48 146.366 102.644 41.282 43.14 73.844 94.236 95.254 149.43 13.034 33.458 21.88 68.4 26.542 103.798 1.246-0.072 2.498-0.12 3.762-0.12 35.346 0 64 28.652 64 64 0 1.796-0.094 3.572-0.238 5.332h0.238zM922.306 278.052c-23.472-53.202-57.484-101.4-99.178-141.18-41.67-39.81-91-71.186-144.244-91.79-53.228-20.678-110.29-30.452-166.884-29.082-56.604 1.298-112.596 13.736-163.82 36.474-51.25 22.666-97.684 55.49-135.994 95.712-38.338 40.198-68.528 87.764-88.322 139.058-19.87 51.284-29.228 106.214-27.864 160.756 1.302 54.552 13.328 108.412 35.254 157.69 21.858 49.3 53.498 93.97 92.246 130.81 38.73 36.868 84.53 65.87 133.874 84.856 49.338 19.060 102.136 28.006 154.626 26.644 52.5-1.306 104.228-12.918 151.562-34.034 47.352-21.050 90.256-51.502 125.624-88.782 35.396-37.258 63.21-81.294 81.39-128.688 18.248-47.392 26.782-98.058 25.424-148.496h0.238c-0.144-1.76-0.238-3.536-0.238-5.332 0-33.012 24.992-60.174 57.086-63.624-6.224-34.822-16.53-68.818-30.78-100.992z" />
<glyph unicode="&#xe994;" glyph-name="cog" d="M933.79 349.75c-53.726 93.054-21.416 212.304 72.152 266.488l-100.626 174.292c-28.75-16.854-62.176-26.518-97.846-26.518-107.536 0-194.708 87.746-194.708 195.99h-201.258c0.266-33.41-8.074-67.282-25.958-98.252-53.724-93.056-173.156-124.702-266.862-70.758l-100.624-174.292c28.97-16.472 54.050-40.588 71.886-71.478 53.638-92.908 21.512-211.92-71.708-266.224l100.626-174.292c28.65 16.696 61.916 26.254 97.4 26.254 107.196 0 194.144-87.192 194.7-194.958h201.254c-0.086 33.074 8.272 66.57 25.966 97.218 53.636 92.906 172.776 124.594 266.414 71.012l100.626 174.29c-28.78 16.466-53.692 40.498-71.434 71.228zM512 240.668c-114.508 0-207.336 92.824-207.336 207.334 0 114.508 92.826 207.334 207.336 207.334 114.508 0 207.332-92.826 207.332-207.334-0.002-114.51-92.824-207.334-207.332-207.334z" />
<glyph unicode="&#xea0c;" glyph-name="info" d="M448 656c0 26.4 21.6 48 48 48h32c26.4 0 48-21.6 48-48v-32c0-26.4-21.6-48-48-48h-32c-26.4 0-48 21.6-48 48v32zM640 192h-256v64h64v192h-64v64h192v-256h64zM512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 32c-229.75 0-416 186.25-416 416s186.25 416 416 416 416-186.25 416-416-186.25-416-416-416z" />
<glyph unicode="&#xea3a;" glyph-name="arrow-up2" d="M877.254 557.254l-320 320c-24.992 24.994-65.514 24.994-90.508 0l-320-320c-24.994-24.994-24.994-65.516 0-90.51 24.994-24.996 65.516-24.996 90.51 0l210.744 210.746v-613.49c0-35.346 28.654-64 64-64s64 28.654 64 64v613.49l210.746-210.746c12.496-12.496 28.876-18.744 45.254-18.744s32.758 6.248 45.254 18.746c24.994 24.994 24.994 65.514 0 90.508z" />
<glyph unicode="&#xea3b;" glyph-name="arrow-up-right2" d="M237.254 82.746l530.746 530.744v-229.49c0-35.346 28.654-64 64-64s64 28.654 64 64v384c0 25.884-15.594 49.222-39.508 59.126-7.924 3.284-16.242 4.84-24.492 4.838v0.036h-384c-35.346 0-64-28.654-64-64 0-35.348 28.654-64 64-64h229.49l-530.744-530.746c-12.498-12.496-18.746-28.876-18.746-45.254s6.248-32.758 18.746-45.254c24.992-24.994 65.516-24.994 90.508 0z" />
<glyph unicode="&#xea3c;" glyph-name="arrow-right2" d="M621.254 82.746l320 320c24.994 24.992 24.994 65.516 0 90.51l-320 320c-24.994 24.992-65.516 24.992-90.51 0-24.994-24.994-24.994-65.516 0-90.51l210.746-210.746h-613.49c-35.346 0-64-28.654-64-64s28.654-64 64-64h613.49l-210.746-210.746c-12.496-12.496-18.744-28.876-18.744-45.254s6.248-32.758 18.744-45.254c24.994-24.994 65.516-24.994 90.51 0z" />
<glyph unicode="&#xea3d;" glyph-name="arrow-down-right2" d="M146.746 722.746l530.742-530.746h-229.488c-35.346 0-64-28.654-64-64s28.654-64 64-64h384c25.884 0 49.222 15.594 59.126 39.508 3.284 7.924 4.84 16.242 4.838 24.492h0.036v384c0 35.346-28.654 64-64 64-35.348 0-64-28.654-64-64v-229.49l-530.746 530.744c-12.496 12.498-28.874 18.746-45.254 18.746s-32.758-6.248-45.254-18.746c-24.994-24.992-24.994-65.516 0-90.508z" />
<glyph unicode="&#xea3e;" glyph-name="arrow-down22" d="M877.254 338.746l-320-320c-24.992-24.994-65.514-24.994-90.508 0l-320 320c-24.994 24.994-24.994 65.516 0 90.51 24.994 24.996 65.516 24.996 90.51 0l210.744-210.746v613.49c0 35.346 28.654 64 64 64s64-28.654 64-64v-613.49l210.746 210.746c12.496 12.496 28.876 18.744 45.254 18.744s32.758-6.248 45.254-18.746c24.994-24.994 24.994-65.514 0-90.508z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because it is too large Load Diff
@@ -0,0 +1,117 @@
@import "..\webdatarocks-base.less";
@font-family: Arial, sans-serif;
@font-size: 12px;
@font-size-mobile: 14px;
/* ===== theme colors ===== */
/* ===== not used in webdatarocks-base.less directly; used in this file to define bg, border and other colors ===== */
@theme-color: #868e94;
@theme-color-dark: #d5d5d5;
@theme-color-superdark: #868e94;
@theme-color-midlight: #303030; //not used
@theme-color-light: #303030; //not used
@theme-color-superlight: #303030;
@theme-color-supersuperlight: #424242;
/* ===== basic grey colors, common for all themes ===== */
@theme-base-color: #999;
@theme-base-color-dark: #555;
@theme-base-color-superdark: #3c3c3c;
@theme-base-color-midlight: @theme-color;
@theme-base-color-light: @theme-color;
@theme-base-color-superlight: #f7f7f7;
@theme-base-color-supersuperlight: #fbfbfb;
/* ===== text colors ===== */
@theme-text-color: #f2f2f2;
@theme-text-color-inverted: #212121;
@theme-text-color-midlight: @theme-text-color;
@theme-text-color-light: #d5d5d5;
@theme-text-color-superlight: #cecece;
@toolbar-text-color: #bababa;
/* ===== background colors ===== */
@background-base-color: #212121;
@background-ui-element-base-color: #212121;
@ui-background-dark: @theme-color;
@ui-background: @theme-color;
@ui-background-light: @theme-color-superlight;
@ui-background-superlight: #303030;
/* ===== border colors ===== */
@ui-border-color-dark: @theme-color;
@ui-border-color: @theme-color;//#999;
@ui-border-color-light: #424242;//@theme-color-light;//#d5d5d5;
@ui-border-color-superlight: @theme-color-superlight;
@ui-border-dark: 1px solid @ui-border-color;
@ui-border: 1px solid @ui-border-color;
@ui-border-light: 1px solid @ui-border-color-light;
@ui-border-superlight: 1px solid @ui-border-color-superlight;
/* ===== grid ===== */
@grid-sheet-header-text-color: @theme-color;
@grid-sheet-header-color: #303030;
@grid-sheet-header-border-color: #424242;
@grid-sheet-header-border: 1px solid @grid-sheet-header-border-color;
@grid-icon-color: @theme-text-color-midlight;
@grid-table-header-text-color: @theme-text-color-midlight;
@grid-table-header-color: @theme-color-supersuperlight;
@grid-table-header-border-color: #424242;
@grid-table-header-border: 1px solid @grid-table-header-border-color;
@grid-filter-color: #515151;
@grid-filter-color-hover: @theme-color;
@grid-filter-text-color: #f2f2f2;
@grid-filter-subtext-color: @grid-filter-text-color;
@grid-filter-icon-color: @grid-filter-text-color;
@grid-cell-color: @background-base-color;
@grid-cell-text-color: @theme-text-color;
@grid-cell-border-color: #303030;
@grid-cell-border: 1px solid @grid-cell-border-color;
@grid-drilldown-link-text-color: #bababa;
@grid-selection-canvas-color: rgba(134, 142, 148, 0.2);
@grid-selection-canvas-border: 2px solid @theme-base-color-light;
@grid-auto-calculation-bar: #515151;
/* ===== ui ===== */
@ui-component-border: @ui-border-light;
@ui-pop-up-border: @ui-border-light;
@ui-element-border-color: @ui-border-color-light;
@ui-element-border: @ui-border-light;
@ui-element-inner-border: @ui-border-light;
@ui-element-text-color: @theme-text-color;
@ui-element-font-size: 14px;
@ui-btn-color-dark-hover: #d5d5d5;
@ui-btn-color-hover: #424242;
@ui-btn-color-light-hover: #424242;
@ui-btn-font-size: 14px;
@ui-btn-text-color: @theme-color-dark;
@ui-btn-dark-text-color: @theme-text-color-inverted;
@ui-btn-light-text-color: @theme-text-color;
@ui-btn-toggle-text-color: @theme-color;
@ui-btn-toggle-selected-text-color: @theme-text-color;
@ui-btn-toggle-dark-text-color: @ui-element-text-color;
@ui-btn-toggle-dark-selected-text-color: @theme-text-color-inverted;
@ui-btn-calc-text-color: @theme-text-color-inverted;
@ui-icon-color: #bababa;
@ui-icon-color-dark: @theme-color-dark;
@ui-label-color-dark: @theme-color-dark;
@ui-label-color: @theme-text-color;
@ui-label-color-light: @theme-text-color;
@ui-label-font-size: 14px;
@ui-text-area-color: @theme-text-color-inverted;
@ui-title-color: @theme-text-color;
@ui-title-font-size: 24px;
@ui-title-font-size-smaller: 18px;
@ui-subtitle-color: @ui-label-color-light;
@ui-subtitle-font-size: @ui-label-font-size;
@ui-prompt-color: @theme-text-color-superlight;
@ui-prompt-icon-color: @ui-border-color-superlight;
File diff suppressed because one or more lines are too long
@@ -0,0 +1,118 @@
@import "..\webdatarocks-base.less";
@font-family: Arial, sans-serif;
@font-size: 12px;
@font-size-mobile: 14px;
/* ===== theme colors ===== */
/* ===== not used in webdatarocks-base.less directly; used in this file to define bg, border and other colors ===== */
@theme-color: #999;
@theme-color-dark: #555;
@theme-color-superdark: #3c3c3c;
@theme-color-midlight: #d5d5d5;//cdcdcd;
@theme-color-light: #DBDBDB;//#ebebeb;
@theme-color-superlight: #f1f1f1;
@theme-color-supersuperlight: #fbfbfb;
/* ===== basic grey colors, common for all themes ===== */
@theme-base-color: #999;
@theme-base-color-dark: #555;
@theme-base-color-superdark: #3c3c3c;
@theme-base-color-midlight: #d5d5d5;//cdcdcd;
@theme-base-color-light: #DBDBDB;//#ebebeb;
@theme-base-color-superlight: #f1f1f1;
@theme-base-color-supersuperlight: #fbfbfb;
/* ===== text colors ===== */
@theme-text-color: #111;
@theme-text-color-inverted: #fff;
@theme-text-color-midlight: #555;
@theme-text-color-light: #999;
@theme-text-color-superlight: #cecece;
@toolbar-text-color: #888;
/* ===== background colors ===== */
@background-base-color: #fff;
@background-ui-element-base-color: #fff;
@ui-background-dark: @theme-color-dark;
@ui-background: @theme-color;
@ui-background-light: @theme-color-superlight;
@ui-background-superlight: @theme-color-supersuperlight;
/* ===== border colors ===== */
@ui-border-color-dark: @theme-color-dark;
@ui-border-color: @theme-color;
@ui-border-color-light: @theme-color-midlight;
@ui-border-color-superlight: @theme-color-light;
@ui-border-dark: 1px solid @ui-border-color-dark;
@ui-border: 1px solid @ui-border-color;
@ui-border-light: 1px solid @ui-border-color-light;
@ui-border-superlight: 1px solid @ui-border-color-superlight;
/* ===== grid ===== */
@grid-sheet-header-text-color: @theme-color;
@grid-sheet-header-color: @theme-color-superlight;
@grid-sheet-header-border-color: @theme-color-light;
@grid-sheet-header-border: 1px solid @grid-sheet-header-border-color;
@grid-icon-color: @theme-color;
@grid-table-header-text-color: @theme-text-color;
@grid-table-header-color: @theme-color-superlight;
@grid-table-header-border-color: @theme-color-light;
@grid-table-header-border: 1px solid @grid-table-header-border-color;
@grid-filter-color: @theme-color-light;
@grid-filter-color-hover: darken(@grid-filter-color, 5%);
@grid-filter-text-color: @theme-text-color;
@grid-filter-subtext-color: #888;
@grid-filter-icon-color: @grid-icon-color;
@grid-cell-color: @background-base-color;
@grid-cell-text-color: @theme-text-color;
@grid-cell-border-color: @theme-color-light;
@grid-cell-border: 1px solid @grid-cell-border-color;
@grid-drilldown-link-text-color: #888;
@grid-selection-canvas-color: rgba(66, 133, 244, 0.1);
@grid-selection-canvas-border: 1px solid @grid-accent-color;
@grid-accent-color: #4285f4;
@grid-auto-calculation-bar: #888888;
/* ===== ui ===== */
@ui-component-border: @ui-border-light;
@ui-pop-up-border: @ui-border-light;
@ui-element-border-color: @ui-border-color-light;
@ui-element-border: @ui-border-light;
@ui-element-inner-border: @ui-border-superlight;
@ui-element-text-color: @theme-text-color;
@ui-element-font-size: 14px;
@ui-btn-color: @theme-color-light;
@ui-btn-color-hover: lighten(@ui-btn-color, 3%);
@ui-btn-color-light-hover: @ui-background-superlight;
@ui-btn-color-dark-hover: lighten(@ui-background-dark, 5%);// @theme-color-superdark;
@ui-btn-font-size: 14px;
@ui-btn-text-color: @theme-color-dark;
@ui-btn-dark-text-color: @theme-text-color-inverted;
@ui-btn-light-text-color: @theme-text-color-midlight;
@ui-btn-toggle-text-color: @theme-text-color-light;
@ui-btn-toggle-selected-text-color: @ui-element-text-color;
@ui-btn-toggle-dark-text-color: @ui-element-text-color;
@ui-btn-toggle-dark-selected-text-color: @theme-text-color-inverted;
@ui-btn-calc-text-color: @theme-text-color-inverted;
@ui-icon-color: @theme-color;
@ui-icon-color-dark: @theme-color-dark;
@ui-label-color-dark: @theme-color-dark;
@ui-label-color: @theme-text-color;
@ui-label-color-light: @theme-text-color-light;
@ui-label-font-size: 14px;
@ui-text-area-color: @ui-element-text-color;
@ui-title-color: @theme-text-color;
@ui-title-font-size: 24px;
@ui-title-font-size-smaller: 18px;
@ui-subtitle-color: @ui-label-color-light;
@ui-subtitle-font-size: @ui-label-font-size;
@ui-prompt-color: @theme-text-color-superlight;
@ui-prompt-icon-color: @ui-border-color-superlight;
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,117 @@
@import "..\webdatarocks-base.less";
@font-family: Arial, sans-serif;
@font-size: 12px;
@font-size-mobile: 14px;
/* ===== theme colors ===== */
/* ===== not used in webdatarocks-base.less directly; used in this file to define bg, border and other colors ===== */
@theme-color: #03A9F4;
@theme-color-dark: #039BE5;
@theme-color-superdark: #0288D1;
@theme-color-midlight: #03A9F4; //not used
@theme-color-light: #03A9F4; //not used
@theme-color-superlight: #E1F5FE;
@theme-color-supersuperlight: #F3FAFD;
/* ===== basic grey colors, common for all themes ===== */
@theme-base-color: #999;
@theme-base-color-dark: #555;
@theme-base-color-superdark: #3c3c3c;
@theme-base-color-midlight: #d5d5d5;//cdcdcd;
@theme-base-color-light: #e9e9e9;//#ebebeb;
@theme-base-color-superlight: #f7f7f7;
@theme-base-color-supersuperlight: #fbfbfb;
/* ===== text colors ===== */
@theme-text-color: #111;
@theme-text-color-inverted: #fff;
@theme-text-color-midlight: #888;
@theme-text-color-light: @theme-text-color;//#999;
@theme-text-color-superlight: #cecece;
@toolbar-text-color: #888;
/* ===== background colors ===== */
@background-base-color: #fff;
@background-ui-element-base-color: #fff;
@ui-background-dark: @theme-color-dark;
@ui-background: @theme-color;
@ui-background-light: @theme-color-superlight;
@ui-background-superlight: @theme-color-supersuperlight;
/* ===== border colors ===== */
@ui-border-color-dark: @theme-color-dark;
@ui-border-color: @theme-color;//#999;
@ui-border-color-light: #f0f0f0;//@theme-color-light;//#d5d5d5;
@ui-border-color-superlight: @theme-color-superlight;
@ui-border-dark: 1px solid @ui-border-color-dark;
@ui-border: 1px solid @ui-border-color;
@ui-border-light: 1px solid @ui-border-color-light;
@ui-border-superlight: 1px solid @ui-border-color-superlight;
/* ===== grid ===== */
@grid-sheet-header-text-color: #999;
@grid-sheet-header-color: #fff;
@grid-sheet-header-border-color: #f0f0f0;
@grid-sheet-header-border: 1px solid @grid-sheet-header-border-color;
@grid-icon-color: @theme-color;
@grid-table-header-text-color: @theme-text-color-midlight;
@grid-table-header-color: @theme-color-supersuperlight;
@grid-table-header-border-color: #f0f0f0;
@grid-table-header-border: 1px solid @grid-table-header-border-color;
@grid-filter-color: @theme-color;
@grid-filter-color-hover: @theme-color-dark;
@grid-filter-text-color: #fff;
@grid-filter-subtext-color: @grid-filter-text-color;
@grid-filter-icon-color: @grid-filter-text-color;
@grid-cell-color: @background-base-color;
@grid-cell-text-color: @theme-text-color;
@grid-cell-border-color: #f0f0f0;
@grid-cell-border: 1px solid @grid-cell-border-color;
@grid-drilldown-link-text-color: #888;
@grid-selection-canvas-color: rgba(121, 204, 255, 0.2);
@grid-selection-canvas-border: 2px solid @theme-base-color-light;
@grid-auto-calculation-bar: #51c5fd;
/* ===== ui ===== */
@ui-component-border: @ui-border-light;
@ui-pop-up-border: @ui-border-light;
@ui-element-border-color: @ui-border-color-light;
@ui-element-border: @ui-border-light;
@ui-element-inner-border: @ui-border-light;
@ui-element-text-color: @theme-text-color;
@ui-element-font-size: 14px;
@ui-btn-color: @ui-background-light;
@ui-btn-color-hover: lighten(@ui-btn-color, 3%);
@ui-btn-color-light-hover: @ui-background-superlight;
@ui-btn-color-dark-color-hover: @theme-color-superdark;
@ui-btn-font-size: 14px;
@ui-btn-text-color: @theme-color-dark;
@ui-btn-dark-text-color: @theme-text-color-inverted;
@ui-btn-light-text-color: @theme-text-color-light;
@ui-btn-toggle-text-color: @theme-text-color-light;
@ui-btn-toggle-selected-text-color: @ui-element-text-color;
@ui-btn-toggle-dark-text-color: @ui-element-text-color;
@ui-btn-toggle-dark-selected-text-color: @theme-text-color-inverted;
@ui-btn-calc-text-color: @theme-text-color-inverted;
@ui-icon-color: @theme-color;
@ui-icon-color-dark: @theme-color-dark;
@ui-label-color-dark: @theme-color-dark;
@ui-label-color: @theme-text-color;
@ui-label-color-light: @theme-text-color-light;
@ui-label-font-size: 14px;
@ui-text-area-color: @ui-element-text-color;
@ui-title-color: @theme-text-color;
@ui-title-font-size: 24px;
@ui-title-font-size-smaller: 18px;
@ui-subtitle-color: @ui-label-color-light;
@ui-subtitle-font-size: @ui-label-font-size;
@ui-prompt-color: @theme-text-color-superlight;
@ui-prompt-icon-color: @ui-border-color-superlight;
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,124 @@
@import "..\webdatarocks-base.less";
@font-family: Arial, sans-serif;
@font-size: 12px;
@font-size-mobile: 14px;
/* ===== theme colors ===== */
/* ===== not used in webdatarocks-base.less directly; used in this file to define bg, border and other colors ===== */
@theme-color: #E64A19;
@theme-color-dark: #D84315;
@theme-color-superdark: #BF360C;
@theme-color-midlight: #FF9E80;
@theme-color-light: #FFCCBC;
@theme-color-superlight: #FBE9E7;
@theme-color-supersuperlight: #FBE9E7;
/* ===== basic grey colors, common for all themes ===== */
@theme-base-color: #999;
@theme-base-color-dark: #555;
@theme-base-color-superdark: #3c3c3c;
@theme-base-color-midlight: #d5d5d5;//cdcdcd;
@theme-base-color-light: #e9e9e9;//#ebebeb;
@theme-base-color-superlight: #f7f7f7;
@theme-base-color-supersuperlight: #fbfbfb;
/* ===== text colors ===== */
@theme-text-color: #111;
@theme-text-color-inverted: #fff;
@theme-text-color-midlight: #888;
@theme-text-color-light: @theme-text-color;//#999;
@theme-text-color-superlight: #cecece;
@toolbar-text-color: #888;
/* ===== background colors ===== */
@background-base-color: #fff;
@background-ui-element-base-color: #fff;
@ui-background-dark: @theme-color-dark;
@ui-background: @theme-color;
@ui-background-light: @theme-color-superlight;
@ui-background-superlight: @theme-color-supersuperlight;
/* ===== border colors ===== */
@ui-border-color-dark: @theme-color-dark;
@ui-border-color: @theme-color;//#999;
@ui-border-color-light: #f0f0f0;//@theme-color-light;//#d5d5d5;
@ui-border-color-superlight: @theme-color-superlight;
@ui-border-dark: 1px solid @ui-border-color-dark;
@ui-border: 1px solid @ui-border-color;
@ui-border-light: 1px solid @ui-border-color-light;
@ui-border-superlight: 1px solid @ui-border-color-superlight;
/* ===== grid ===== */
@grid-sheet-header-text-color: #999;
@grid-sheet-header-color: #fff;
@grid-sheet-header-border-color: #f0f0f0;
@grid-sheet-header-border: 1px solid @grid-sheet-header-border-color;
@grid-icon-color: @theme-color;
@grid-table-header-text-color: @theme-text-color;
@grid-table-header-color: @theme-color-supersuperlight;
@grid-table-header-border-color: #f0f0f0;
@grid-table-header-border: 1px solid @grid-table-header-border-color;
@grid-filter-color: @theme-color-superlight;
@grid-filter-color-hover: @theme-color-light;
@grid-filter-text-color: @theme-text-color;
@grid-filter-subtext-color: @grid-filter-text-color;
@grid-filter-icon-color: @theme-color;
@grid-cell-color: @background-base-color;
@grid-cell-text-color: @theme-text-color;
@grid-cell-border-color: #f0f0f0;
@grid-cell-border: 1px solid @grid-cell-border-color;
@grid-drilldown-link-text-color: #888;
@grid-selection-canvas-color: rgba(255, 245, 106, 0.2);
@grid-selection-canvas-border: 1px solid @theme-base-color-light;
@grid-auto-calculation-bar: #f08463;
/* ===== ui ===== */
@ui-component-border: @ui-border-light;
@ui-pop-up-border: @ui-border-light;
@ui-element-border-color: @ui-border-color-light;
@ui-element-border: @ui-border-light;
@ui-element-inner-border: @ui-border-light;
@ui-element-text-color: @theme-text-color;
@ui-element-font-size: 14px;
@ui-btn-dark-color-hover: @theme-color-superdark;
@ui-btn-color-hover: @ui-background-light;//#f2f2f2;
@ui-btn-color-light-hover: @ui-background-superlight;
@ui-btn-font-size: 14px;
@ui-btn-text-color: @theme-color-dark;
@ui-btn-dark-text-color: @theme-text-color-inverted;
@ui-btn-light-text-color: @theme-text-color-light;
@ui-btn-toggle-text-color: @theme-text-color-light;
@ui-btn-toggle-selected-text-color: @ui-element-text-color;
@ui-btn-toggle-dark-text-color: @ui-element-text-color;
@ui-btn-toggle-dark-selected-text-color: @theme-text-color-inverted;
@ui-btn-calc-text-color: @theme-text-color-inverted;
@ui-icon-color: @theme-color;
@ui-icon-color-dark: @theme-color-dark;
@ui-label-color-dark: @theme-color-dark;
@ui-label-color: @theme-text-color;
@ui-label-color-light: @theme-text-color-light;
@ui-label-font-size: 14px;
@ui-text-area-color: @ui-element-text-color;
@ui-title-color: @theme-text-color;
@ui-title-font-size: 24px;
@ui-title-font-size-smaller: 18px;
@ui-subtitle-color: @ui-label-color-light;
@ui-subtitle-font-size: @ui-label-font-size;
@ui-prompt-color: @theme-text-color-superlight;
@ui-prompt-icon-color: @ui-border-color-superlight;
#fm-pivot-view .fm-grid-layout div.fm-header {
border-right: 1px solid @theme-color-supersuperlight;
border-bottom: 1px solid @theme-color-supersuperlight;
}
/*#fm-pivot-view .fm-grid-layout div.fm-header-c.fm-empty {
background-color: @grid-cell-color;
}*/
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,117 @@
@import "..\webdatarocks-base.less";
@font-family: Arial, sans-serif;
@font-size: 12px;
@font-size-mobile: 14px;
/* ===== theme colors ===== */
/* ===== not used in webdatarocks-base.less directly; used in this file to define bg, border and other colors ===== */
@theme-color: #009688;
@theme-color-dark: #00897B;
@theme-color-superdark: #00796B;
@theme-color-midlight: #009688; //not used
@theme-color-light: #009688; //not used
@theme-color-superlight: #E0F2F1;
@theme-color-supersuperlight: #f1fbfa;
/* ===== basic grey colors, common for all themes ===== */
@theme-base-color: #999;
@theme-base-color-dark: #555;
@theme-base-color-superdark: #3c3c3c;
@theme-base-color-midlight: #d5d5d5;//cdcdcd;
@theme-base-color-light: #e9e9e9;//#ebebeb;
@theme-base-color-superlight: #f7f7f7;
@theme-base-color-supersuperlight: #fbfbfb;
/* ===== text colors ===== */
@theme-text-color: #111;
@theme-text-color-inverted: #fff;
@theme-text-color-midlight: #888;
@theme-text-color-light: @theme-text-color;//#999;
@theme-text-color-superlight: #cecece;
@toolbar-text-color: #888;
/* ===== background colors ===== */
@background-base-color: #fff;
@background-ui-element-base-color: #fff;
@ui-background-dark: @theme-color-dark;
@ui-background: @theme-color;
@ui-background-light: @theme-color-superlight;
@ui-background-superlight: @theme-color-supersuperlight;
/* ===== border colors ===== */
@ui-border-color-dark: @theme-color-dark;
@ui-border-color: @theme-color;//#999;
@ui-border-color-light: #f0f0f0;//@theme-color-light;//#d5d5d5;
@ui-border-color-superlight: @theme-color-superlight;
@ui-border-dark: 1px solid @ui-border-color-dark;
@ui-border: 1px solid @ui-border-color;
@ui-border-light: 1px solid @ui-border-color-light;
@ui-border-superlight: 1px solid @ui-border-color-superlight;
/* ===== grid ===== */
@grid-sheet-header-text-color: #999;
@grid-sheet-header-color: #fff;
@grid-sheet-header-border-color: #f0f0f0;
@grid-sheet-header-border: 1px solid @grid-sheet-header-border-color;
@grid-icon-color: @theme-color;
@grid-table-header-text-color: @theme-text-color-midlight;
@grid-table-header-color: @theme-color-supersuperlight;
@grid-table-header-border-color: #f0f0f0;
@grid-table-header-border: 1px solid @grid-table-header-border-color;
@grid-filter-color: @theme-color;
@grid-filter-color-hover: @theme-color-dark;
@grid-filter-text-color: #fff;
@grid-filter-subtext-color: @grid-filter-text-color;
@grid-filter-icon-color: @grid-filter-text-color;
@grid-cell-color: @background-base-color;
@grid-cell-text-color: @theme-text-color;
@grid-cell-border-color: #f0f0f0;
@grid-cell-border: 1px solid @grid-cell-border-color;
@grid-drilldown-link-text-color: #888;
@grid-selection-canvas-color: rgba(255, 245, 106, 0.2);
@grid-selection-canvas-border: 1px solid @theme-base-color-light;
@grid-auto-calculation-bar: #009688;
/* ===== ui ===== */
@ui-component-border: @ui-border-light;
@ui-pop-up-border: @ui-border-light;
@ui-element-border-color: @ui-border-color-light;
@ui-element-border: @ui-border-light;
@ui-element-inner-border: @ui-border-light;
@ui-element-text-color: @theme-text-color;
@ui-element-font-size: 14px;
@ui-btn-color: @ui-background-light;
@ui-btn-color-hover: lighten(@ui-btn-color, 3%);
@ui-btn-color-light-hover: @ui-background-superlight;
@ui-btn-color-dark-color-hover: @theme-color-superdark;
@ui-btn-font-size: 14px;
@ui-btn-text-color: @theme-color-dark;
@ui-btn-dark-text-color: @theme-text-color-inverted;
@ui-btn-light-text-color: @theme-text-color-light;
@ui-btn-toggle-text-color: @theme-text-color-light;
@ui-btn-toggle-selected-text-color: @ui-element-text-color;
@ui-btn-toggle-dark-text-color: @ui-element-text-color;
@ui-btn-toggle-dark-selected-text-color: @theme-text-color-inverted;
@ui-btn-calc-text-color: @theme-text-color-inverted;
@ui-icon-color: @theme-color;
@ui-icon-color-dark: @theme-color-dark;
@ui-label-color-dark: @theme-color-dark;
@ui-label-color: @theme-text-color;
@ui-label-color-light: @theme-text-color-light;
@ui-label-font-size: 14px;
@ui-text-area-color: @ui-element-text-color;
@ui-title-color: @theme-text-color;
@ui-title-font-size: 24px;
@ui-title-font-size-smaller: 18px;
@ui-subtitle-color: @ui-label-color-light;
@ui-subtitle-font-size: @ui-label-font-size;
@ui-prompt-color: @theme-text-color-superlight;
@ui-prompt-icon-color: @ui-border-color-superlight;
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,144 @@
/**
* WebDataRocks Reporting v1.3.3 (http://www.webdatarocks.com/)
* Copyright 2020 WebDataRocks. All rights reserved.
*/
(function () {
WebDataRocksAmcharts = {};
WebDataRocksAmcharts.getData = function (options, callbackHandler, updateHandler) {
//define slice to select the data you would like to show (different from data that webdatarocks instance is showing)
//leave it undefined to get the data that webdatarocks instance is showing
var slice = options.slice;
//please use prepareDataFunction if you need to prepare the data another way
var _prepareDataFunction = options.prepareDataFunction;
var _updateHandler;
if (updateHandler != null) {
_updateHandler = function (data) {
if (_prepareDataFunction != undefined) {
updateHandler(_prepareDataFunction(data), data);
} else {
updateHandler(prepareData(data), data);
}
};
}
this.instance.getData({
slice: slice
}, function (data) {
if (_prepareDataFunction != undefined) {
callbackHandler(_prepareDataFunction(data), data);
} else {
callbackHandler(prepareData(data), data);
}
}, _updateHandler
);
}
WebDataRocksAmcharts.getNumberFormatPattern = function (format) {
var str = "###";
if (format == null) return str;
var thousandsSeparator = (format["thousandsSeparator"] != undefined && format["thousandsSeparator"] != "");
if (thousandsSeparator) {
str = "#," + str;
}
var maxDecimalPlaces = (format["maxDecimalPlaces"] != undefined && format["maxDecimalPlaces"] > 0);
var decimalPlaces = (format["decimalPlaces"] != undefined && format["decimalPlaces"] > 0);
if (decimalPlaces) {
str = str + ".";
var numberOfDecimals = (maxDecimalPlaces && format["maxDecimalPlaces"] < format["decimalPlaces"]) ? format["maxDecimalPlaces"] : format["decimalPlaces"];
for (var i = 0; i < numberOfDecimals; i++) {
str = str + "0";
}
} else if (maxDecimalPlaces) {
str = str + ".";
for (var i = 0; i < format["maxDecimalPlaces"]; i++) {
str = str + "#";
}
}
if (format["isPercent"] == true) {
str = str + "%";
} else if (format["currencySymbol"] != undefined && format["currencySymbol"] != "") {
str = (format["currencySymbolAlign"] == "left" || (format["isPercent"] == true && format["currencySymbol"] == "%"))
? format["currencySymbol"] + str
: str + format["currencySymbol"];
}
return str;
}
WebDataRocksAmcharts.getCategoryName = function (rawData) {
var categoryName;
if (rawData.meta && rawData.meta["rAmount"] > 0) {
categoryName = rawData.meta["r0Name"];
} else if (rawData.meta && rawData.meta["cAmount"] > 0) {
categoryName = rawData.meta["c0Name"];
}
return categoryName;
}
WebDataRocksAmcharts.getMeasureNameByIndex = function (rawData, measureIndex) {
return (rawData.meta && rawData.meta["vAmount"] > 0) ? rawData.meta["v" + measureIndex + "Name"] : undefined;
}
WebDataRocksAmcharts.getNumberOfMeasures = function (rawData) {
return (rawData.meta) ? rawData.meta["vAmount"] : undefined;
}
function prepareData(data) {
var output = {};
output.options = prepareChartInfo(data);
prepareSeries(output, data);
return output;
}
function prepareChartInfo(data) {
var output = {
title: (data.meta && data.meta.caption) ? data.meta.caption : ""
};
return output;
}
function prepareSeries(output, data) {
var records = [];
var basedOnRows = false;
var basedOnColumns = false;
for (var i = 0; i < data.data.length; i++) {
if (i == 0) {
var headerRow = {};
if (data.meta["rAmount"] > 0) {
headerRow["r0Name"] = data.meta["r0Name"];
basedOnRows = true;
} else if (data.meta["cAmount"] > 0) {
headerRow["c0Name"] = data.meta["c0Name"];
basedOnColumns = true;
}
for (var j = 0; j < data.meta["vAmount"]; j++) {
headerRow["v" + j + "Name"] = data.meta["v" + j + "Name"];
}
}
var record = data.data[i];
var recordIsNotAFact = false;
var _record = {};
if (basedOnRows) {
if (record["r0"] == undefined || record["r1"] != undefined || record["c0"] != undefined || record["v0"] == undefined) continue;
_record[headerRow["r0Name"]] = record["r0"];
}
if (basedOnColumns) {
if (record["c0"] == undefined || record["c1"] != undefined || record["r0"] != undefined || record["v0"] == undefined) continue;
_record[headerRow["c0Name"]] = record["c0"];
}
for (var j = 0; j < data.meta["vAmount"]; j++) {
if (record["v" + j] == undefined) {
recordIsNotAFact = true;
continue;
}
_record[headerRow["v" + j + "Name"]] = !isNaN(record["v" + j]) ? record["v" + j] : 0;
}
if (recordIsNotAFact) continue;
records.push(_record);
}
output.data = records;
}
})();
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,519 @@
/**
* WebDataRocks Reporting v1.3.3 (http://www.webdatarocks.com/)
* Copyright 2020 WebDataRocks. All rights reserved.
*/
(function () {
WebDataRocksFusioncharts = {};
WebDataRocksFusioncharts.getData = function (options, callbackHandler, updateHandler) {
var type = options.type;
var _options = {
type: options.type
}
//define slice to select the data you would like to show (different from data that webdatarocks instance is showing)
//leave it undefined to get the data that webdatarocks instance is showing
var slice = options.slice;
//in case WebDataRocksFusioncharts does not include the type of chart you need
//or you need to preprocess the data in a different way
//please use prepareDataFunction
var _prepareDataFunction = options.prepareDataFunction;
var _updateHandler;
if (updateHandler != null) {
_updateHandler = function (data) {
if (_prepareDataFunction != undefined) {
updateHandler(_prepareDataFunction(data, _options), data);
} else {
updateHandler(prepareData(data, _options.type), data);
}
};
}
this.instance.getData({
slice: slice
}, function (data) {
if (_prepareDataFunction != undefined) {
callbackHandler(_prepareDataFunction(data, _options), data);
} else {
callbackHandler(prepareData(data, _options.type), data);
}
}, _updateHandler
);
}
WebDataRocksFusioncharts.getNumberFormat = function (fmt) {
var format = {};
if (fmt != null) {
var thousandsSeparator = (fmt["thousandsSeparator"] != undefined && fmt["thousandsSeparator"] != "");
if (thousandsSeparator) {
format.thousandSeparator = fmt["thousandsSeparator"];
}
var decimalSeparator = (fmt["decimalSeparator"] != undefined && fmt["decimalSeparator"] != "");
if (decimalSeparator) {
format.decimalSeparator = fmt["decimalSeparator"];
}
var decimalPlaces = (fmt["decimalPlaces"] != undefined && fmt["decimalPlaces"] != -1);
if (decimalPlaces) {
format.decimals = fmt["decimalPlaces"];
format.forceDecimals = "1";
}
var currencySymbol = fmt["currencySymbol"] != undefined && fmt["currencySymbol"] != "";
if (currencySymbol) {
if (fmt["currencySymbolAlign"] == "left") {
format.numberPrefix = fmt["currencySymbol"];
} else if (fmt["currencySymbolAlign"] == "right") {
format.numberSuffix = fmt["currencySymbol"];
}
}
}
return format;
}
function prepareData(data, type) {
switch (type) {
case "column2d":
case "column3d":
case "line":
case "area2d":
case "bar2d":
case "bar3d":
case "pie2d":
case "pie3d":
case "doughnut2d":
case "doughnut3d":
case "pareto2d":
case "pareto3d":
case "spline":
case "splinearea":
return prepareSingleSeriesChart(data, type);
case "mscolumn2d":
case "mscolumn3d":
case "mscolumn3dlinedy":
case "msline":
case "msbar2d":
case "msbar3d":
case "msarea":
case "marimekko":
case "stackedcolumn2d":
case "stackedcolumn3d":
case "stackedbar2d":
case "stackedbar2d":
case "stackedarea2d":
case "msspline":
case "mssplinearea":
case "radar":
return prepareMultiSeriesChart(data, type);
case "maps/worldwithcountries":
return prepareMap(data, type);
default:
return data;
}
}
function prepareSingleSeriesChart(data, type) {
var output = prepareChartInfo(data, type);
output.data = [];
for (var i = 0; i < data.data.length; i++) {
var elem = {};
var record = data.data[i];
if (data.meta["rAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined || record["c0"] != undefined || record["v0"] == undefined) continue;
elem["label"] = record["r0"];
elem["value"] = record["v0"];
} else if (data.meta["cAmount"] > 0) {
if (record["c0"] == undefined || record["c1"] != undefined || record["r0"] != undefined || record["v0"] == undefined) continue;
elem["label"] = record["c0"];
elem["value"] = record["v0"];
} else {
if (record["v0"] == undefined) continue;
elem["value"] = record["v0"];
}
output.data.push(elem);
}
return output;
}
function prepareMultiSeriesChart(data, type) {
var output = prepareChartInfo(data, type);
output.categories = [];
output.dataset = [];
var categories = {};
var series = {};
for (var i = 0; i < data.data.length; i++) {
var record = data.data[i];
if (data.meta["rAmount"] > 0 && data.meta["cAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined || record["v0"] == undefined) continue;
if (categories[record["r0"]] == undefined) categories[record["r0"]] = { "label": record["r0"] };
if (record["c0"] == undefined || record["c1"] != undefined) continue;
if (series[record["c0"]] == undefined) series[record["c0"]] = [];
series[record["c0"]].push({ "value": [record["v0"]] });
} else if (data.meta["rAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined || record["v0"] == undefined) continue;
if (categories[record["r0"]] == undefined) categories[record["r0"]] = { "label": record["r0"] };
if (series[""] == undefined) series[""] = [];
series[""].push({ "value": [record["v0"]] });
} else if (data.meta["cAmount"] > 0) {
if (record["c0"] == undefined || record["c1"] != undefined || record["v0"] == undefined) continue;
if (categories[record["c0"]] == undefined) categories[record["c0"]] = { "label": record["c0"] };
if (series[""] == undefined) series[""] = [];
series[""].push({ "value": [record["v0"]] });
}
}
var cats = [];
for (var category in categories) {
cats.push(categories[category]);
}
output.categories.push({ "category": cats });
for (var seriesname in series) {
output.dataset.push({ "seriesname": seriesname, "data": series[seriesname] });
}
return output;
}
function prepareChartInfo(data, type) {
var output = {
chart: {}
};
output.chart.caption = data.meta.caption;
//number formatting
var format = WebDataRocksFusioncharts.getNumberFormat(data.meta.formats[0]);
for (var prop in format) {
output.chart[prop] = format[prop];
}
//for the 2nd y axis
if (data.meta.formats.length > 1) {
var format2 = WebDataRocksFusioncharts.getNumberFormat(data.meta.formats[1]);
for (var prop in format2) {
output.chart["s" + prop] = format2[prop];
}
}
switch (type) {
case "pie2d":
case "pie3d":
case "doughnut2d":
case "doughnut3d":
case "radar":
break;
case "pareto2d":
case "pareto3d":
output.chart.pYAxisName = data.meta.v0Name;
break;
default:
output.chart.xAxisName = (data.meta.r0Name != undefined) ? data.meta.r0Name : ((data.meta.c0Name != undefined) ? data.meta.c0Name : "");
output.chart.yAxisName = data.meta.v0Name;
}
return output;
}
function prepareMap(data, type) {
var output = prepareMapInfo(data, type);
output.data = [];
var minValue;
var maxValue;
for (var i = 0; i < data.data.length; i++) {
var record = data.data[i];
if (data.meta["rAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined || record["c0"] != undefined || record["v0"] == undefined) continue;
output.data.push({
"id": toMapID(record["r0"]),
"value": record["v0"]
});
minValue = (minValue == undefined || record["v0"] < minValue) ? record["v0"] : minValue;
maxValue = (maxValue == undefined || record["v0"] > maxValue) ? record["v0"] : maxValue;
} else if (data.meta["cAmount"] > 0) {
if (record["c0"] == undefined || record["c1"] != undefined || record["r0"] != undefined || record["v0"] == undefined) continue;
output.data.push({
"id": toMapID(record["c0"]),
"value": record["v0"]
});
minValue = (minValue == undefined || record["v0"] < minValue) ? record["v0"] : minValue;
maxValue = (maxValue == undefined || record["v0"] > maxValue) ? record["v0"] : maxValue;
}
}
output.extradata = {
"minValue": minValue,
"maxValue": maxValue
};
return output;
}
function prepareMapInfo(data, type) {
var output = {
chart: {}
};
output.chart.caption = data.meta.caption;
//number formatting
var format = WebDataRocksFusioncharts.getNumberFormat(data.meta.formats[0]);
for (var prop in format) {
output.chart[prop] = format[prop];
}
return output;
}
function toMapID(label) {
var countries = {
"Antigua and Barbuda": "01",
"Bahamas": "02",
"Barbados": "03",
"Belize": "04",
"Canada": "05",
"Costa Rica": "06",
"Cuba": "07",
"Dominica": "08",
"Dominican Republic": "09",
"El Salvador": "10",
"Grenada": "11",
"Guatemala": "12",
"Haiti": "13",
"Honduras": "14",
"Jamaica": "15",
"Mexico": "16",
"Nicaragua": "17",
"Panama": "18",
"St.Kitts & Nevis": "19",
"St.Lucia": "20",
"St.Vincent & the Grenadines": "21",
"Trinidad & Tobago": "22",
"United States": "23",
"Greenland": "24",
"Argentina": "25",
"Bolivia": "26",
"Brazil": "27",
"Chile": "28",
"Colombia": "29",
"Ecuador": "30",
"Falkland Islands": "31",
"French Guiana": "32",
"Guyana": "33",
"Paraguay": "34",
"Peru": "35",
"Suriname": "36",
"Uruguay": "37",
"Venezuela": "38",
"Algeria": "39",
"Angola": "40",
"Benin": "41",
"Botswana": "42",
"Burkina Faso": "43",
"Burundi": "44",
"Cameroon": "45",
"Cape Verde": "46",
"Central African Republic": "47",
"Chad": "48",
"Comoros": "49",
"Cote divoire": "50",
"Democratic Republic of the Congo": "51",
"Djibouti": "52",
"Egypt": "53",
"Equatorial Guinea": "54",
"Eritrea": "55",
"Ethiopia": "56",
"Gabon": "57",
"Ghana": "58",
"Guinea": "59",
"Guinea-Bissau": "60",
"Kenya": "61",
"Lesotho": "62",
"Liberia": "63",
"Libya": "64",
"Madagascar": "65",
"Malawi": "66",
"Mali": "67",
"Mauritania": "68",
"Morocco": "69",
"Mozambique": "70",
"Namibia": "71",
"Niger": "72",
"Nigeria": "73",
"Rwanda": "74",
"Sao Tome and Principe": "75",
"Senegal": "76",
"Seychelles": "77",
"Sierra Leone": "78",
"Somalia": "79",
"South Africa": "80",
"Sudan": "81",
"Swaziland": "82",
"Tanzania": "83",
"Togo": "84",
"Tunisia": "85",
"Uganda": "86",
"Western Sahara": "87",
"Zambia": "88",
"Zimbabwe": "89",
"Gambia": "90",
"Congo": "91",
"Mauritius": "92",
"Afghanistan": "93",
"Armenia": "94",
"Azerbaijan": "95",
"Bangladesh": "96",
"Bhutan": "97",
"Brunei": "98",
"Burma (Myanmar)": "99",
"Cambodia": "100",
"China": "101",
"East Timor": "102",
"Georgia": "103",
"India": "104",
"Indonesia": "105",
"Iran": "106",
"Japan": "107",
"Kazakhstan": "108",
"Korea (north)": "109",
"Korea (south)": "110",
"Kyrgyzstan": "111",
"Laos": "112",
"Malaysia": "113",
"Mongolia": "114",
"Nepal": "115",
"Pakistan": "116",
"Philippines": "117",
"Russia": "118",
"Singapore": "119",
"Sri Lanka": "120",
"Tajikistan": "121",
"Thailand": "122",
"Turkmenistan": "123",
"Uzbekistan": "124",
"Vietnam": "125",
"Taiwan": "126",
"Hong Kong": "127",
"Macau": "128",
"Albania": "129",
"Andorra": "130",
"Austria": "131",
"Belarus": "132",
"Belgium": "133",
"Bosnia and Herzegovina": "134",
"Bulgaria": "135",
"Croatia": "136",
"Czech Republic": "137",
"Denmark": "138",
"Estonia": "139",
"Finland": "140",
"France": "141",
"Germany": "142",
"Greece": "143",
"Hungary": "144",
"Iceland": "145",
"Ireland": "146",
"Italy": "147",
"Latvia": "148",
"Liechtenstein": "149",
"Lithuania": "150",
"Luxembourg": "151",
"Macedonia": "152",
"Malta": "153",
"Moldova": "154",
"Monaco": "155",
"Montenegro": "156",
"Netherlands": "157",
"Norway": "158",
"Poland": "159",
"Portugal": "160",
"Romania": "161",
"San Marino": "162",
"Serbia": "163",
"Slovakia": "164",
"Slovenia": "165",
"Spain": "166",
"Sweden": "167",
"Switzerland": "168",
"Ukraine": "169",
"United Kingdom": "170",
"Vatican City": "171",
"Cyprus": "172",
"Turkey": "173",
"Australia": "175",
"Fiji": "176",
"Kiribati": "177",
"Marshall Islands": "178",
"Micronesia": "179",
"Nauru": "180",
"New Zealand": "181",
"Palau": "182",
"Papua New Guinea": "183",
"Samoa": "184",
"Solomon Islands": "185",
"Tonga": "186",
"Tuvalu": "187",
"Vanuatu": "188",
"New Caledonia": "189",
"Bahrain": "190",
"Iraq": "191",
"Israel": "192",
"Jordan": "193",
"Kuwait": "194",
"Lebanon": "195",
"Oman": "196",
"Qatar": "197",
"Saudi Arabia": "198",
"Syria": "199",
"United Arab Emirates": "200",
"Yemen": "201",
"Puerto Rico": "202",
"Cayman Islands": "203",
"South Sudan": "204",
"Kosovo": "205",
"Aruba": "206",
"Anguilla": "207",
"American Samoa": "208",
"Bermuda": "209",
"Christmas Island": "210",
"Cocos (Keeling) Islands": "211",
"Cook Islands": "212",
"Faroe Islands": "213",
"French Polynesia": "214",
"Gaza Strip": "215",
"Gibraltar": "216",
"Guadeloupe": "217",
"Guam": "218",
"Guernsey": "219",
"Jersey": "220",
"Kingman Reef": "221",
"Maldives": "222",
"Isle of Man": "223",
"Martinique": "224",
"Mayotte": "225",
"Montserrat": "226",
"BES Islands": "227",
"Curacao": "228",
"Sint Maarten": "229",
"Niue": "230",
"Norfolk Island": "231",
"Northern Mariana Islands": "232",
"Pitcairn Islands": "233",
"Reunion": "234",
"Saint Helena": "235",
"Saint Pierre and Miquelon": "236",
"Turks and Caicos Islands": "237",
"Virgin Islands (UK)": "238",
"Virgin Islands (US)": "239",
"West Bank": "240",
"Wallis and Futuna": "241"
};
if (countries[label] == undefined) {
if (label == "Moldova Republic of") label = "Moldova";
if (label == "United Kingdom (Scotland)") label = "United Kingdom";
if (label == "Korea, Democratic People's Republic of") label = "Korea (north)";
if (label == "Russian Federation") label = "Russia";
}
return (countries[label] != undefined) ? countries[label] : "";
}
})();
@@ -0,0 +1,212 @@
/**
* WebDataRocks Reporting v1.3.3 (http://www.webdatarocks.com/)
* Copyright 2020 WebDataRocks. All rights reserved.
*/
(function () {
WebDataRocksGooglecharts = {};
WebDataRocksGooglecharts.getData = function (options, callbackHandler, updateHandler) {
var type = options.type;
//define slice to select the data you would like to show (different from data that webdatarocks instance is showing)
//leave it undefined to get the data that webdatarocks instance is showing
var slice = options.slice;
//in case WebDataRocksGooglecharts does not include the type of chart you need
//or you need to preprocess the data in a different way
//please use prepareDataFunction
var _prepareDataFunction = options.prepareDataFunction;
var _updateHandler;
if (updateHandler != null) {
_updateHandler = function (data) {
if (_prepareDataFunction != undefined) {
updateHandler(_prepareDataFunction(data), data);
} else {
updateHandler(prepareData(data, type), data);
}
};
}
this.instance.getData({
slice: slice
}, function (data) {
if (_prepareDataFunction != undefined) {
callbackHandler(_prepareDataFunction(data), data);
} else {
callbackHandler(prepareData(data, type), data);
}
}, _updateHandler
);
}
WebDataRocksGooglecharts.getNumberFormat = function (format) {
if (format == null) return {};
var googleFormat = {
decimalSymbol: format["decimalSeparator"]
};
if (format["decimalPlaces"] != undefined && format["decimalPlaces"] != -1) {
googleFormat.fractionDigits = format["decimalPlaces"];
}
if (format["thousandsSeparator"] != undefined && format["thousandsSeparator"] != "") {
googleFormat.groupingSymbol = format["thousandsSeparator"];
}
if (format["currencySymbol"] != undefined && format["currencySymbol"] != "") {
if (format["currencySymbolAlign"] == "left" || (format["isPercent"] == true && format["currencySymbol"] == "%")) {
googleFormat.prefix = format["currencySymbol"];
} else {
googleFormat.suffix = format["currencySymbol"];
}
} else if (format["isPercent"] == true) {
googleFormat.suffix = "%";
}
return googleFormat;
}
WebDataRocksGooglecharts.getNumberFormatPattern = function (format) {
var str = "###";
if (format == null) return str;
var thousandsSeparator = (format["thousandsSeparator"] != undefined && format["thousandsSeparator"] != "");
if (thousandsSeparator) {
str = "#," + str;
}
var decimalPlaces = (format["decimalPlaces"] != undefined && format["decimalPlaces"] > 0);
if (decimalPlaces) {
str = str + format["decimalSeparator"];
for (var i = 0; i < format["decimalPlaces"]; i++) {
str = str + "#";
}
}
if (format["currencySymbol"] != undefined && format["currencySymbol"] != "") {
str = (format["currencySymbolAlign"] == "left" || (format["isPercent"] == true && format["currencySymbol"] == "%"))
? format["currencySymbol"] + str
: str + format["currencySymbol"];
} else if (format["isPercent"] == true) {
str = str + "%";
}
return str;
}
function prepareData(data, type) {
var output = {};
output.options = prepareChartInfo(data);
switch (type) {
case "area":
case "bar":
case "column":
case "line":
case "pie":
prepareSingleSeries(output, data);
break;
case "sankey":
default:
prepareSeries(output, data);
}
return output;
}
function prepareChartInfo(data) {
var output = {
title: data.meta.caption,
/*hAxis: {
title: (data.meta.r0Name != undefined) ? data.meta.r0Name : ((data.meta.c0Name != undefined) ? data.meta.c0Name : "")
},
vAxis: {
title: data.meta.v0Name
}*/
};
return output;
}
function prepareSingleSeries(output, data) {
var table = [];
var basedOnRows = false;
var basedOnColumns = false;
for (var i = 0; i < data.data.length; i++) {
if (i == 0) {
var headerRow = [];
if (data.meta["rAmount"] > 0) {
headerRow.push(data.meta["r0Name"]);
basedOnRows = true;
} else if (data.meta["cAmount"] > 0) {
headerRow.push(data.meta["c0Name"]);
basedOnColumns = true;
}
for (var j = 0; j < data.meta["vAmount"]; j++) {
headerRow.push(data.meta["v" + j + "Name"]);
}
table.push(headerRow);
}
var record = data.data[i];
var recordIsNotAFact = false;
var _record = [];
if (basedOnRows) {
if (record["r0"] == undefined || record["r1"] != undefined || record["c0"] != undefined || record["v0"] == undefined) continue;
_record.push(record["r0"]);
}
if (basedOnColumns) {
if (record["c0"] == undefined || record["c1"] != undefined || record["r0"] != undefined || record["v0"] == undefined) continue;
_record.push(record["c0"]);
}
for (var j = 0; j < data.meta["vAmount"]; j++) {
if (record["v" + j] == undefined) {
recordIsNotAFact = true;
continue;
}
_record.push(!isNaN(record["v" + j]) ? record["v" + j] : 0);
}
if (recordIsNotAFact) continue;
table.push(_record);
}
output.data = table;
}
function prepareSeries(output, data) {
var table = [];
for (var i = 0; i < data.data.length; i++) {
if (i == 0) {
var headerRow = [];
for (var j = 0; j < data.meta["rAmount"]; j++) {
headerRow.push(data.meta["r" + j + "Name"]);
}
for (var j = 0; j < data.meta["cAmount"]; j++) {
headerRow.push(data.meta["c" + j + "Name"]);
}
for (var j = 0; j < data.meta["vAmount"]; j++) {
headerRow.push(data.meta["v" + j + "Name"]);
}
table.push(headerRow);
}
var record = data.data[i];
var recordIsNotAFact = false;
var _record = [];
for (var j = 0; j < data.meta["rAmount"]; j++) {
if (record["r" + j] == undefined) {
recordIsNotAFact = true;
continue;
}
_record.push(record["r" + j]);
}
for (var j = 0; j < data.meta["cAmount"]; j++) {
if (record["c" + j] == undefined) {
recordIsNotAFact = true;
continue;
}
_record.push(record["c" + j]);
}
for (var j = 0; j < data.meta["vAmount"]; j++) {
if (record["v" + j] == undefined) {
recordIsNotAFact = true;
continue;
}
_record.push(!isNaN(record["v" + j]) ? record["v" + j] : 0);
}
if (recordIsNotAFact) continue;
table.push(_record);
}
output.data = table;
}
})();
@@ -0,0 +1,533 @@
/**
* WebDataRocks Reporting v1.3.3 (http://www.webdatarocks.com/)
* Copyright 2020 WebDataRocks. All rights reserved.
*/
(function () {
WebDataRocksHighcharts = {};
WebDataRocksHighcharts.getData = function (options, callbackHandler, updateHandler) {
var _options = {
type: options.type,
xAxisType: (options.xAxisType == "datetime") ? options.xAxisType : "",
valuesOnly: (options.valuesOnly != undefined && options.valuesOnly == true) ? true : false,
withDrilldown: (options.withDrilldown != undefined && options.withDrilldown == true) ? true : false
}
//define slice to select the data you would like to show (different from data that webdatarocks instance is showing)
//leave it undefined to get the data that webdatarocks instance is showing
var slice = options.slice;
//in case WebDataRocksHighcharts does not include the type of chart you need
//or you need to preprocess the data in a different way
//please use prepareDataFunction
var _prepareDataFunction = options.prepareDataFunction;
var _updateHandler;
if (updateHandler != null) {
_updateHandler = function (data) {
if (_prepareDataFunction != undefined) {
updateHandler(_prepareDataFunction(data, _options), data);
} else {
_options.withDrilldown = options.withDrilldown && data.meta["rAmount"] > 0 && data.meta["cAmount"] > 0; //not enough data
updateHandler(prepareData(data, _options), data);
}
};
}
this.instance.getData({
slice: slice
}, function (data) {
if (_prepareDataFunction != undefined) {
callbackHandler(_prepareDataFunction(data, _options), data);
} else {
_options.withDrilldown = options.withDrilldown && data.meta["rAmount"] > 0 && data.meta["cAmount"] > 0; //not enough data
callbackHandler(prepareData(data, _options), data);
}
}, _updateHandler
);
}
WebDataRocksHighcharts.getAxisFormat = function (format) {
return getFormatedString("value", format);
}
WebDataRocksHighcharts.getPointXFormat = function (format) {
return getFormatedString("point.x", format);
}
WebDataRocksHighcharts.getPointYFormat = function (format) {
return getFormatedString("point.y", format);
}
WebDataRocksHighcharts.getPointZFormat = function (format) {
return getFormatedString("point.z", format);
}
function getFormatedString(val, format) {
var str = val;
if (format == null) return str;
var thousandsSeparator = (format["thousandsSeparator"] != undefined && format["thousandsSeparator"] != "");
var decimalPlaces = (format["decimalPlaces"] != undefined && format["decimalPlaces"] != -1);
if (thousandsSeparator || decimalPlaces) {
str = thousandsSeparator
? str + ":,." + (decimalPlaces ? format["decimalPlaces"] : "") + "f"
: str + ":." + (decimalPlaces ? format["decimalPlaces"] : "") + "f";
}
str = "{" + str + "}";
if (format["currencySymbol"] != undefined && format["currencySymbol"] != "") {
str = (format["currencySymbolAlign"] == "left")
? format["currencySymbol"] + str
: str + format["currencySymbol"];
}
return str;
}
function prepareData(data, options) {
switch (options.type) {
case "area":
case "areaspline":
case "bar":
case "column":
case "waterfall":
return prepareDataWithCategories(data, options);
case "funnel":
case "pie":
case "pyramid":
return prepareDataForPie(data, options);
case "arearange":
case "areasplinerange":
case "columnrange":
case "errorbar":
return prepareDataRange(data, options);
case "bubble":
return prepareDataForBubble(data, options);
case "scatter":
options.valuesOnly = true;
case "polygon":
case "spline":
default:
//line chart
if (options.valuesOnly == true) {
return prepareDataWithNumbers(data, options);
} else {
return prepareDataWithCategories(data, options);
}
//not included
//case "boxplot":
//case "gauge":
//case "solidgauge":
//case "heatmap":
//case "treemap":
}
}
function prepareDataWithCategories(data, options) {
var output = prepareChartInfo(data, options);
if (options.withDrilldown) {
prepareSeriesWithDrilldown(output, data);
} else {
if (options.xAxisType == "datetime") {
prepareSeriesDatetime(output, data);
} else {
prepareSeries(output, data);
}
}
return output;
}
function prepareDataForPie(data, options) {
var output = prepareChartInfo(data, options);
if (options.withDrilldown) {
prepareSeriesWithDrilldown(output, data);
} else {
prepareSeriesWithY(output, data);
}
return output;
}
function prepareDataWithNumbers(data, options) {
var output = prepareChartInfo(data, options);
prepareSeriesXYNumeric(output, data);
return output;
}
function prepareDataRange(data, options) {
var output = prepareChartInfo(data, options);
prepareSeriesRange(output, data);
return output;
}
function prepareDataForBubble(data, options) {
var output = prepareChartInfo(data, options);
if (options.valuesOnly == true) {
prepareSeriesXYZNumeric(output, data);
} else {
prepareSeriesXYZ(output, data);
}
return output;
}
function prepareChartInfo(data, options) {
var output = {
title: {
text: data.meta.caption
}
};
if (options.type != undefined) output.chart = { type: options.type };
if (options.valuesOnly == true) {
output.xAxis = {
title: {
text: data.meta.v0Name
}
};
output.yAxis = {
title: {
text: (data.meta.v1Name != undefined) ? data.meta.v1Name : ""
}
};
} else {
output.xAxis = {
title: {
text: (data.meta.r0Name != undefined) ? data.meta.r0Name : ((data.meta.c0Name != undefined) ? data.meta.c0Name : "")
}
};
output.yAxis = [];
var yAxesAmount = (options.valuesOnly == true || options.withDrilldown == true
|| options.type == "arearange" || options.type == "areasplinerange"
|| options.type == "columnrange" || options.type == "errorbar"
|| options.type == "bubble")
? 1 : data.meta.vAmount;
for (var i = 0; i < yAxesAmount; i++) {
output.yAxis.push({
title: {
text: data.meta["v" + i + "Name"]
},
opposite: (i > 0)
});
}
}
if (options.xAxisType == "datetime") {
output.xAxis.type = "datetime";
}
if (options.withDrilldown) {
output.xAxis.type = "category";
}
return output;
}
function prepareSeries(output, data) {
var categories = [];
var series = {};
var _yName;
var _seriesName;
var value;
var _seriesBasedOnC = false;
for (var i = 0; i < data.data.length; i++) {
var record = data.data[i];
if (data.meta["rAmount"] > 0 && data.meta["cAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined) continue;
if (categories.indexOf(record["r0"]) == -1) categories.push(record["r0"]);
if (record["c0"] == undefined || record["c1"] != undefined) continue;
_seriesBasedOnC = true;
} else if (data.meta["rAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined) continue;
if (categories.indexOf(record["r0"]) == -1) categories.push(record["r0"]);
} else if (data.meta["cAmount"] > 0) {
if (record["c0"] == undefined || record["c1"] != undefined) continue;
if (categories.indexOf(record["c0"]) == -1) categories.push(record["c0"]);
}
for (var j = 0; j < data.meta.vAmount; j++) {
_yName = data.meta["v" + j + "Name"];
_seriesName = _seriesBasedOnC ? record["c0"] : _yName;
if (series[_yName] == undefined) {
series[_yName] = {};
}
if (series[_yName][_seriesName] == undefined) {
series[_yName][_seriesName] = [];
}
value = isNaN(record["v" + j]) ? null : record["v" + j];
series[_yName][_seriesName].push(value);
}
}
output.xAxis.categories = categories;
output.series = [];
var yn = 0;
for (var yAxis in series) {
var _series = series[yAxis];
for (var seriesname in _series) {
var s = {
name: (data.meta["rAmount"] > 0 && data.meta["cAmount"] > 0 && data.meta["vAmount"] > 1)
? yAxis + " - " + seriesname
: seriesname,
data: _series[seriesname]
};
if (output.yAxis.length > 1) {
s.yAxis = yn;
}
output.series.push(s);
}
if (output.yAxis.length > 1) {
yn++;
}
}
}
function prepareSeriesDatetime(output, data) {
var categories = [];
var series = {};
var _yName;
var _seriesName;
var value;
var _seriesBasedOnC = false;
for (var i = 0; i < data.data.length; i++) {
var record = data.data[i];
if (data.meta["rAmount"] > 0 && data.meta["cAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined) continue;
if (categories.indexOf(record["r0"]) == -1) categories.push(record["r0"]);
if (record["c0"] == undefined || record["c1"] != undefined) continue;
_seriesBasedOnC = true;
} else if (data.meta["rAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined) continue;
if (categories.indexOf(record["r0"]) == -1) categories.push(record["r0"]);
} else if (data.meta["cAmount"] > 0) {
if (record["c0"] == undefined || record["c1"] != undefined) continue;
if (categories.indexOf(record["c0"]) == -1) categories.push(record["c0"]);
}
for (var j = 0; j < data.meta.vAmount; j++) {
_yName = data.meta["v" + j + "Name"];
_seriesName = _seriesBasedOnC ? record["c0"] : _yName;
if (series[_yName] == undefined) {
series[_yName] = {};
}
if (series[_yName][_seriesName] == undefined) {
series[_yName][_seriesName] = [];
}
value = isNaN(record["v" + j]) ? null : record["v" + j];
series[_yName][_seriesName].push([(record["r0"] != undefined ? record["r0"] : record["c0"]), value]);
}
}
//output.xAxis.categories = categories;
output.series = [];
var yn = 0;
for (var yAxis in series) {
var _series = series[yAxis];
for (var seriesname in _series) {
var s = {
name: (data.meta["rAmount"] > 0 && data.meta["cAmount"] > 0 && data.meta["vAmount"] > 1)
? yAxis + " - " + seriesname
: seriesname,
data: _series[seriesname]
};
if (output.yAxis.length > 1) {
s.yAxis = yn;
}
output.series.push(s);
}
if (output.yAxis.length > 1) {
yn++;
}
}
}
function prepareSeriesWithY(output, data) {
var series = {};
var value;
for (var i = 0; i < data.data.length; i++) {
var record = data.data[i];
if (data.meta["rAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined || record["c0"] != undefined) continue;
if (series[data.meta.v0Name] == undefined) series[data.meta.v0Name] = [];
value = isNaN(record["v0"]) ? null : record["v0"];
series[data.meta.v0Name].push({ name: record["r0"], y: value });
} else if (data.meta["cAmount"] > 0) {
if (record["c0"] == undefined || record["c1"] != undefined || record["r0"] != undefined) continue;
if (series[data.meta.v0Name] == undefined) series[data.meta.v0Name] = [];
value = isNaN(record["v0"]) ? null : record["v0"];
series[data.meta.v0Name].push({ name: record["c0"], y: value });
}
}
output.series = [];
for (var seriesname in series) {
output.series.push({ "name": seriesname, "data": series[seriesname] });
}
}
function prepareSeriesXYNumeric(output, data) {
output.series = [];
if (data.meta.v1Name == undefined) return; //not enough data
var series = {};
var xValue;
var yValue;
for (var i = 0; i < data.data.length; i++) {
var record = data.data[i];
if (data.meta["rAmount"] > 0 && data.meta["cAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined || record["c0"] == undefined || record["c1"] != undefined) continue;
if (series[record["c0"]] == undefined) series[record["c0"]] = [];
xValue = isNaN(record["v0"]) ? null : record["v0"];
yValue = isNaN(record["v1"]) ? null : record["v1"];
series[record["c0"]].push({ name: record["r0"], x: xValue, y: yValue });
} else if (data.meta["rAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined) continue;
if (series[data.meta.v1Name] == undefined) series[data.meta.v1Name] = [];
xValue = isNaN(record["v0"]) ? null : record["v0"];
yValue = isNaN(record["v1"]) ? null : record["v1"];
series[data.meta.v1Name].push({ name: record["r0"], x: xValue, y: yValue });
} else if (data.meta["cAmount"] > 0) {
if (record["c0"] == undefined || record["c1"] != undefined) continue;
if (series[data.meta.v1Name] == undefined) series[data.meta.v1Name] = [];
xValue = isNaN(record["v0"]) ? null : record["v0"];
yValue = isNaN(record["v1"]) ? null : record["v1"];
series[data.meta.v1Name].push({ name: record["c0"], x: xValue, y: yValue });
}
}
for (var seriesname in series) {
output.series.push({ "name": seriesname, "data": series[seriesname] });
}
}
function prepareSeriesXYZNumeric(output, data) {
output.series = [];
if (data.meta.v2Name == undefined) return; //not enough data
var series = {};
var xValue;
var yValue;
var zValue;
for (var i = 0; i < data.data.length; i++) {
var record = data.data[i];
if (data.meta["rAmount"] > 0 && data.meta["cAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined || record["c0"] == undefined || record["c1"] != undefined) continue;
if (series[record["c0"]] == undefined) series[record["c0"]] = [];
xValue = isNaN(record["v0"]) ? null : record["v0"];
yValue = isNaN(record["v1"]) ? null : record["v1"];
zValue = isNaN(record["v2"]) ? null : record["v2"];
series[record["c0"]].push({ name: record["r0"], x: xValue, y: yValue, z: zValue });
} else if (data.meta["rAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined || record["c0"] != undefined) continue;
if (series[data.meta.v2Name] == undefined) series[data.meta.v2Name] = [];
xValue = isNaN(record["v0"]) ? null : record["v0"];
yValue = isNaN(record["v1"]) ? null : record["v1"];
zValue = isNaN(record["v2"]) ? null : record["v2"];
series[data.meta.v2Name].push({ name: record["r0"], x: xValue, y: yValue, z: zValue });
} else if (data.meta["cAmount"] > 0) {
if (record["c0"] == undefined || record["c1"] != undefined || record["r0"] != undefined) continue;
if (series[data.meta.v2Name] == undefined) series[data.meta.v2Name] = [];
xValue = isNaN(record["v0"]) ? null : record["v0"];
yValue = isNaN(record["v1"]) ? null : record["v1"];
zValue = isNaN(record["v2"]) ? null : record["v2"];
series[data.meta.v2Name].push({ name: record["c0"], x: xValue, y: yValue, z: zValue });
}
}
for (var seriesname in series) {
output.series.push({ "name": seriesname, "data": series[seriesname] });
}
}
function prepareSeriesXYZ(output, data) {
output.series = [];
if (data.meta.v1Name == undefined) return; //not enough data
var categories = [];
var series = {};
var yValue;
var zValue;
for (var i = 0; i < data.data.length; i++) {
var record = data.data[i];
if (data.meta["rAmount"] > 0 && data.meta["cAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined) continue;
if (categories.indexOf(record["r0"]) == -1) categories.push(record["r0"]);
if (record["c0"] == undefined || record["c1"] != undefined) continue;
if (series[record["c0"]] == undefined) series[record["c0"]] = [];
yValue = isNaN(record["v0"]) ? null : record["v0"];
zValue = isNaN(record["v1"]) ? null : record["v1"];
series[record["c0"]].push([record["r0"], yValue, zValue]);
} else if (data.meta["rAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined || record["c0"] != undefined) continue;
if (series[data.meta.v1Name] == undefined) series[data.meta.v1Name] = [];
yValue = isNaN(record["v0"]) ? null : record["v0"];
zValue = isNaN(record["v1"]) ? null : record["v1"];
series[data.meta.v1Name].push([record["r0"], yValue, zValue]);
} else if (data.meta["cAmount"] > 0) {
if (record["c0"] == undefined || record["c1"] != undefined || record["r0"] != undefined) continue;
if (series[data.meta.v1Name] == undefined) series[data.meta.v1Name] = [];
yValue = isNaN(record["v0"]) ? null : record["v0"];
zValue = isNaN(record["v1"]) ? null : record["v1"];
series[data.meta.v1Name].push([record["c0"], yValue, zValue]);
}
}
output.xAxis.categories = categories;
for (var seriesname in series) {
output.series.push({ "name": seriesname, "data": series[seriesname] });
}
}
function prepareSeriesWithDrilldown(output, data) {//can drill be for more than one level?
var mainSeries = {};
var series = {};
var value;
for (var i = 0; i < data.data.length; i++) {
var record = data.data[i];
if (data.meta["rAmount"] > 0 && data.meta["cAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined) continue;
if (mainSeries[data.meta["r0Name"]] == undefined) mainSeries[data.meta["r0Name"]] = [];
if (record["c0"] == undefined) {
value = isNaN(record["v0"]) ? null : record["v0"];
mainSeries[data.meta["r0Name"]].push({ name: record["r0"], y: value, drilldown: record["r0"] });
}
if (record["c0"] == undefined || record["c1"] != undefined) continue;
if (series[record["r0"]] == undefined) series[record["r0"]] = [];
value = isNaN(record["v0"]) ? null : record["v0"];
series[record["r0"]].push([record["c0"], value]);
}
}
output.series = [];
for (var mainseriesname in mainSeries) {
output.series.push({ "name": mainseriesname, colorByPoint: true, "data": mainSeries[mainseriesname] });
}
output.drilldown = {};
output.drilldown.series = [];
for (var seriesname in series) {
output.drilldown.series.push({ "name": seriesname, "id": seriesname, "data": series[seriesname] });
}
}
function prepareSeriesRange(output, data) {
var categories = [];
var series = {};
var low;
var high;
for (var i = 0; i < data.data.length; i++) {
var record = data.data[i];
if (data.meta["rAmount"] > 0) {
if (record["r0"] == undefined || record["r1"] != undefined || record["c0"] != undefined) continue;
if (categories.indexOf(record["r0"]) == -1) categories.push(record["r0"]);
} else if (data.meta["cAmount"] > 0) {
if (record["c0"] == undefined || record["c1"] != undefined || record["r0"] != undefined) continue;
if (categories.indexOf(record["c0"]) == -1) categories.push(record["c0"]);
}
if (series[data.meta.v0Name] == undefined) series[data.meta.v0Name] = [];
low = isNaN(record["v0"]) ? null : record["v0"];
high = (data.meta.v1Name != undefined)
? isNaN(record["v1"]) ? null : record["v1"]
: low;
series[data.meta.v0Name].push([low, high]);
}
output.xAxis.categories = categories;
output.series = [];
for (var seriesname in series) {
output.series.push({ "name": seriesname, "data": series[seriesname] });
}
}
})();
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+125
View File
@@ -0,0 +1,125 @@
var WebDataRocksToolbar=function(a,b,d,f,m){this.pivot=b;this.pivotContainer=a;this.width="number"==typeof f||0>f.indexOf("px")&&0>f.indexOf("%")?f+"px":f;this.Labels=m};
WebDataRocksToolbar.prototype.getTabs=function(){var a=[],b=this.Labels;a.push({title:b.connect,id:"wdr-tab-connect",icon:this.icons.connect,menu:[{title:b.connect_local_csv,id:"wdr-tab-connect-local-csv",handler:this.connectLocalCSVHandler,mobile:!1,icon:this.icons.connect_csv},{title:b.connect_local_json,id:"wdr-tab-connect-local-json",handler:this.connectLocalJSONHandler,mobile:!1,icon:this.icons.connect_json},{title:this.osUtils.isMobile?b.connect_remote_csv_mobile:b.connect_remote_csv,id:"wdr-tab-connect-remote-csv",
handler:this.connectRemoteCSV,icon:this.icons.connect_csv},{title:this.osUtils.isMobile?b.connect_remote_json_mobile:b.connect_remote_json,id:"wdr-tab-connect-remote-json",handler:this.connectRemoteJSON,icon:this.icons.connect_json}]});a.push({title:b.open,id:"wdr-tab-open",icon:this.icons.open,menu:[{title:b.local_report,id:"wdr-tab-open-local-report",handler:this.openLocalReport,mobile:!1,icon:this.icons.open_local},{title:this.osUtils.isMobile?b.remote_report_mobile:b.remote_report,id:"wdr-tab-open-remote-report",
handler:this.openRemoteReport,icon:this.icons.open_remote}]});a.push({title:b.save,id:"wdr-tab-save",handler:this.saveHandler,mobile:!1,icon:this.icons.save});a.push({title:b.export,id:"wdr-tab-export",mobile:!1,icon:this.icons.export,menu:[{title:b.export_print,id:"wdr-tab-export-print",handler:this.printHandler,icon:this.icons.export_print},{title:b.export_html,id:"wdr-tab-export-html",handler:this.exportHandler,args:"html",icon:this.icons.export_html},{title:b.export_excel,id:"wdr-tab-export-excel",
handler:this.exportHandler,args:"excel",icon:this.icons.export_excel},{title:b.export_pdf,id:"wdr-tab-export-pdf",handler:this.exportHandler,args:"pdf",icon:this.icons.export_pdf}]});a.push({title:b.format,id:"wdr-tab-format",icon:this.icons.format,rightGroup:!0,menu:[{title:this.osUtils.isMobile?b.format_cells_mobile:b.format_cells,id:"wdr-tab-format-cells",handler:this.formatCellsHandler,icon:this.icons.format_number},{title:this.osUtils.isMobile?b.conditional_formatting_mobile:b.conditional_formatting,
id:"wdr-tab-format-conditional",handler:this.conditionalFormattingHandler,icon:this.icons.format_conditional}]});a.push({title:b.options,id:"wdr-tab-options",handler:this.optionsHandler,icon:this.icons.options,rightGroup:!0});a.push({title:b.fields,id:"wdr-tab-fields",handler:this.fieldsHandler,icon:this.icons.fields,rightGroup:!0});void 0!=document.addEventListener&&a.push({title:b.fullscreen,id:"wdr-tab-fullscreen",handler:this.fullscreenHandler,mobile:!1,icon:this.icons.fullscreen,rightGroup:!0});
return a};WebDataRocksToolbar.prototype.create=function(){this.popupManager=new WebDataRocksToolbar.PopupManager(this);this.dataProvider=this.getTabs();this.init()};
WebDataRocksToolbar.prototype.applyToolbarLayoutClasses=function(){if(!this.osUtils.isMobile){var a=this,b=function(){if(a.toolbarWrapper){var b=a.toolbarWrapper.getBoundingClientRect().width;a.toolbarWrapper.classList.remove("wdr-layout-500");a.toolbarWrapper.classList.remove("wdr-layout-360");a.toolbarWrapper.classList.remove("wdr-layout-300");500>b&&a.toolbarWrapper.classList.add("wdr-layout-500");360>b&&a.toolbarWrapper.classList.add("wdr-layout-360");300>b&&a.toolbarWrapper.classList.add("wdr-layout-300")}};
b();window.addEventListener("resize",b)}};
WebDataRocksToolbar.prototype.init=function(){this.container=this.pivotContainer;this.container.style.position=""==this.container.style.position?"relative":this.container.style.position;this.toolbarWrapper=document.createElement("div");this.toolbarWrapper.id="wdr-toolbar-wrapper";this.toolbarWrapper.style.width=this.width;this.osUtils.isMobile&&this.addClass(this.toolbarWrapper,"wdr-mobile");this.addClass(this.toolbarWrapper,"wdr-toolbar-ui");this.toolbarWrapper.style.width=this.width;var a=document.createElement("ul");
a.id="wdr-toolbar";var b=document.createElement("div");b.classList.add("wdr-toolbar-group-right");a.appendChild(b);for(var d=0;d<this.dataProvider.length;d++)if(!this.isDisabled(this.dataProvider[d]))if(this.osUtils.isMobile&&null!=this.dataProvider[d].menu&&!0!=this.dataProvider[d].collapse)for(var f=0;f<this.dataProvider[d].menu.length;f++)this.isDisabled(this.dataProvider[d].menu[f])||a.appendChild(this.createTab(this.dataProvider[d].menu[f]));else f=this.dataProvider[d].divider?this.createDivider(this.dataProvider[d]):
this.createTab(this.dataProvider[d]),b&&this.dataProvider[d].rightGroup?b.appendChild(f):a.appendChild(f);this.toolbarWrapper.appendChild(a);this.container.insertBefore(this.toolbarWrapper,this.container.firstChild);this.updateLabels(this.Labels);this.applyToolbarLayoutClasses()};
WebDataRocksToolbar.prototype.updateLabels=function(a){a=this.Labels=a;this.setText(document.querySelector("#wdr-tab-connect > a > span"),a.connect);this.setText(document.querySelector("#wdr-tab-connect-local-csv > a > span"),a.connect_local_csv);this.setText(document.querySelector("#wdr-tab-connect-local-json > a > span"),a.connect_local_json);this.setText(document.querySelector("#wdr-tab-connect-remote-csv > a > span"),this.osUtils.isMobile?a.connect_remote_csv_mobile:a.connect_remote_csv);this.setText(document.querySelector("#wdr-tab-open > a > span"),
a.open);this.setText(document.querySelector("#wdr-tab-open-local-report > a > span"),a.local_report);this.setText(document.querySelector("#wdr-tab-open-remote-report > a > span"),this.osUtils.isMobile?a.remote_report_mobile:a.remote_report);this.setText(document.querySelector("#wdr-tab-save > a > span"),a.save);this.setText(document.querySelector("#wdr-tab-format > a > span"),a.format);this.setText(document.querySelector("#wdr-tab-format-cells > a > span"),this.osUtils.isMobile?a.format_cells_mobile:
a.format_cells);this.setText(document.querySelector("#wdr-tab-format-conditional > a > span"),this.osUtils.isMobile?a.conditional_formatting_mobile:a.conditional_formatting);this.setText(document.querySelector("#wdr-tab-options > a > span"),a.options);this.setText(document.querySelector("#wdr-tab-fullscreen > a > span"),a.fullscreen);this.setText(document.querySelector("#wdr-tab-export > a > span"),a.export);this.setText(document.querySelector("#wdr-tab-export-print > a > span"),a.export_print);this.setText(document.querySelector("#wdr-tab-export-html > a > span"),
a.export_html);this.setText(document.querySelector("#wdr-tab-export-excel > a > span"),a.export_excel);this.setText(document.querySelector("#wdr-tab-export-pdf > a > span"),a.export_pdf);this.setText(document.querySelector("#wdr-tab-fields > a > span"),a.fields)};
WebDataRocksToolbar.prototype.icons={connect:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="-305.5 396.5 36 36"><title>menu_connect</title><path fill="#555" d="M-274.5 425.409s-.988.277-1.422.761l-3.536-1.783c.189-.509.258-1.066.07-1.572l3.719-1.76a2.36 2.36 0 0 0 3.317.147 2.341 2.341 0 0 0 .157-3.3 2.335 2.335 0 0 0-4.055 1.582c-.009.122-.008.237.001.358l-3.896 1.884a2.281 2.281 0 0 0-1.359-.451 2.338 2.338 0 0 0-2.177 2.481 2.33 2.33 0 0 0 2.177 2.179c.491 0 .967-.156 1.359-.451l3.921 1.892a2.317 2.317 0 0 0 1.981 2.604 2.316 2.316 0 0 0 2.604-1.981c.171-1.269-1-2.432-2.262-2.603a8.794 8.794 0 0 0-.6-.026v.039zM-301.592 413.883c-.008.105-.908.222.092.326v6.836c0 2.587 5.827 5.455 13.177 5.455h1.081c-1.146-3 .303-6.854 3.299-8.155-1.448.172-2.868.069-4.334.069-7.056.009-12.775-2.093-13.315-4.531z"/><path fill="#555" d="M-288.5 416.217c7.377 0 13-2.097 13-4.683v-6.853c0-2.586-5.647-4.682-13-4.682-7.352 0-13 2.104-13 4.69v6.853c0 2.586 5.648 4.675 13 4.675zm.177-15.268c5.903 0 10.691 1.661 10.691 3.741s-4.796 3.741-10.691 3.741c-5.894 0-10.683-1.67-10.683-3.741 0-2.072 4.79-3.741 10.683-3.741z"/></svg>',connect_csv:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><path d="M11 24l6 0V27h-6V24z"/><path d="M12.8 22L12.8 22l1.2-2.5L15.1 22h1.9l-2-3.9L16.9 14h-1.8l-1 2.5L12.9 14h-1.8l1.9 3.9L11 22H12.8z"/><path d="M19 19h6v3h-6V19z"/><path d="M19 14h6v3L19 17V14z"/><path d="M19 24h6v3h-6V24z"/><path d="M23 4H7v28h22V11L23 4zM8 31V5h14v7h6v19H8L8 31z"/></svg>',
connect_json:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><path d="M23 4H7v28h22V11L23 4zM8 31V5h14v7h6v19H8L8 31z"/><path d="M19 24c0 0.6-0.4 1-1 1 -0.6 0-1-0.4-1-1v-2c0-0.6 0.4-1 1-1 0.6 0 1 0.4 1 1V24zM21 18v-2c0-0.6-0.4 0-1 0 -0.6 0-1-0.4-1-1 0-0.6 0.4-1 1-1 1.7 0 3 0.3 3 2v2c0 1.1 0.9 2 2 2 0.6 0 1 0.4 1 1 0 0.6-0.4 1-1 1 -1.1 0-2 0.9-2 2v2c0 1.7-1.3 2-3 2 -0.6 0-1-0.4-1-1s0.4-1 1-1c0.6 0 1 0.6 1 0v-2c0-1.2 0.5-2.3 1.4-3C21.5 20.3 21 19.2 21 18zM11 20c1.1 0 2-0.9 2-2v-2c0-1.7 1.3-2 3-2 0.6 0 1 0.4 1 1 0 0.6-0.4 1-1 1 -0.6 0-1-0.6-1 0v2c0 1.2-0.5 2.3-1.4 3 0.8 0.7 1.4 1.8 1.4 3v2c0 0.6 0.4 0 1 0 0.6 0 1 0.4 1 1s-0.4 1-1 1c-1.7 0-3-0.3-3-2v-2c0-1.1-0.9-2-2-2 -0.6 0-1-0.4-1-1C10 20.4 10.4 20 11 20z"/><path d="M18 17c0.6 0 1 0.4 1 1s-0.4 1-1 1 -1-0.4-1-1S17.4 17 18 17z"/></svg>',
open:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="-305.5 396.5 36 36"><title>menu_open</title><path fill="#555" d="M-279.351 408.5h8.976c.064 0 .126-.067.167-.025.021.052.021.055 0 .107l-2.053 20.701c-.01.117-.104.217-.219.217h-30.102c-.116 0-.21-.104-.221-.22l-1.989-16.009c-.022-.041-.022.124 0 .083.042-.054.115.146.178.146h21.198c.87 0 1.665-.726 2.053-1.499l1.812-3.446a.414.414 0 0 1 .2-.055zm-4.052 2.473c.084-.011.162-.052.194-.126l1.813-3.288c.408-.754 1.196-1.059 2.054-1.059h7.842v-2.637c0-1.102-.83-2.166-1.929-2.25-.053 0-.183-.113-.235-.113h-18.328c-.104 0-.188.006-.241-.09.01-1.1-.858-1.91-1.958-1.91h-6.902c-1.226 0-2.406.864-2.406 2.089v9.426l20.096-.042z"/></svg>',
open_local:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><style>.a{fill:none;}</style><path d="M30.9 10.6C30.8 10.4 30.2 10 30 10h-1V8c0-0.4-0.6-1-1-1H15l-1-2H8C7.6 5 7 5.6 7 6v4H6c-0.2 0-0.8 0.4-0.9 0.6 -0.1 0.1-0.2 0.3-0.1 0.5l2.1 19.5C7.2 30.8 7.7 31 8 31h20c0.3 0 0.8-0.2 0.9-0.5l2.1-19.5C31 10.9 31 10.7 30.9 10.6zM28 30H8L6 11h24L28 30z"/><line x1="11" y1="23" x2="11" y2="23" class="a"/><line x1="25" y1="23" x2="25" y2="23" class="a"/><polygon points="11 15 11 23 17 23 17 25 14 25 14 26 22 26 22 25 19 25 19 23 25 23 25 15 "/></svg>',
open_remote:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><path d="M30.9 10.6C30.8 10.4 30.2 10 30 10h-1V8c0-0.4-0.6-1-1-1H15l-1-2H8C7.6 5 7 5.6 7 6v4H6c-0.2 0-0.8 0.4-0.9 0.6 -0.1 0.1-0.2 0.3-0.1 0.5l2.1 19.5C7.2 30.8 7.7 31 8 31h20c0.3 0 0.8-0.2 0.9-0.5l2.1-19.5C31 10.9 31 10.7 30.9 10.6zM28 30H8L6 11h24L28 30z"/><path d="M24.8 18.1l-0.8 1.5c-0.2 0.2-0.5 0.2-0.8 0 -1.3-1.2-3.2-1.9-5.3-1.9 -2.1 0-4 0.7-5.3 1.9 -0.2 0.2-0.5 0.2-0.8 0l-0.8-1.5c-0.1-0.1-0.2-0.2-0.2-0.3 0-0.1 0.1-0.2 0.2-0.3 1.7-1.5 4.1-2.5 6.8-2.5 2.7 0 5.1 0.9 6.8 2.5 0.1 0 0.2 0.2 0.2 0.3C25 17.9 24.9 18 24.8 18.1zM18 19.6c1.5 0 2.8 0.5 3.8 1.4 0.2 0.2 0.2 0.5 0 0.7l-0.8 1.5c-0.2 0.2-0.5 0.2-0.8 0 -0.6-0.5-1.4-0.8-2.3-0.8 -0.9 0-1.7 0.3-2.3 0.8 -0.2 0.2-0.5 0.2-0.8 0l-0.8-1.5c-0.2-0.2-0.2-0.5 0-0.7C15.2 20.1 16.5 19.6 18 19.6zM18 23.4c0.8 0 1.4 0.6 1.4 1.3 0 0.7-0.6 1.3-1.4 1.3 -0.8 0-1.4-0.6-1.4-1.3C16.6 24 17.2 23.4 18 23.4z"/></svg>',
save:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="-17.5 774.5 36 36"><title>menu_save</title><g fill="#555"><path d="M15.191 783.284l-5.457-5.467a1.101 1.101 0 0 0-.781-.317h-.835c-.2 0-.618.163-.618.363v8.889c0 .618-.245.748-.853.748H-5.638c-.617 0-.862-.14-.862-.748v-8.889c0-.2-.409-.363-.609-.363h-6.283c-.618 0-1.108.499-1.108 1.107v27.785c0 .617.5 1.107 1.108 1.107h27.784c.618 0 1.108-.499 1.108-1.107v-22.337c0-.29-.109-.562-.309-.771zM8.98 801.463c0 .618-.499 1.037-1.107 1.037H-6.873c-.617 0-.627-.357-.627-.966v-8.626c0-.617.019-1.408.627-1.408H7.882c.618 0 1.108.613 1.108 1.223l-.01 8.74z"/><path d="M-4.167 784.5h9.361c.2 0 .306.228.306.028v-6.665c0-.2-.106-.363-.306-.363h-9.361c-.2 0-.333.163-.333.363v6.665c0 .191.124-.028.333-.028zm5.667-4.294c0-.618.392-1.108 1-1.108.618 0 1 .5 1 1.108v1.97c0 .618-.392 1.108-1 1.108-.618 0-1-.5-1-1.108v-1.97zM4.168 796.5h-7.31c-.617 0-1.108.393-1.108 1s.5 1 1.108 1h7.31c.617 0 1.107-.393 1.107-1s-.498-1-1.107-1z"/></g></svg>',
export:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="-17.5 774.5 36 36"><title>menu_export</title><g fill="#555"><path d="M15.446 795.615l-4.289-6.461c-.346-.515-.803-.654-1.428-.654H7.788c-.186 0-.346-.029-.363.156-.008.076.017.07.059.137l4.76 7.108c.042.06.034.337-.017.38-.025.025-.067.219-.102.219H6.699c-.194 0-.354-.063-.363.125-.305 3.23-3.174 5.495-6.407 5.192-2.81-.263-5.039-2.329-5.3-5.14-.009-.195-.168-.178-.363-.178h-5.401c-.076 0-.144-.281-.144-.357 0-.025.008-.157.017-.175l4.76-7.203c.102-.16.05-.245-.109-.347-.06-.035-.118.082-.187.082h-1.94c-.616 0-1.199.145-1.553.658l-4.664 6.547c-.203.304-.545.586-.545.95v9.216c1 .911 1.267 1.646 2.187 1.629h27.625c.903.009 1.188-.709 1.188-1.611v-9.233c1-.373.157-.735-.054-1.04z"/><path d="M-3.674 783.5H-2.5v10.2c1 1.4 1.764 2.464 3.165 2.371 1.274-.083 1.835-1.097 2.835-2.371v-10.2h1.207c.346 0 .641-.04.65-.387.008-.151-.042-.193-.144-.311l-4.186-5.11c-.228-.287-.642-.302-.929-.073-.042.034-.076.081-.101.115l-4.135 5.172c-.22.271-.187.447.084.668.11.085.244-.074.38-.074z"/></g></svg>',
export_print:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="-17.5 774.5 36 36"><title>dd_save_print</title><path fill="#555" d="M-5.5 798.685v3.815h11v-7h-11v3.185zm2-1.185h7v1h-7v-1zm0 2h7v1h-7v-1zM5.5 786.308V782.5h-11v7h11z"/><path fill="#555" d="M8.94 786.5H7.5v4h-14v-4h-1.44c-1.493 0-2.56 1.064-2.56 2.558v6.87c0 1.493 1.067 2.572 2.56 2.572h1.44v-4h14v4h1.44c1.493 0 2.56-1.064 2.56-2.557v-6.878c0-1.501-1.074-2.565-2.56-2.565z"/></svg>',export_excel:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><path d="M24.4 15h-3.8L18 18.6 15.3 15h-3.8l4.5 5.2L11 27h7.3L18 25h-2l2-3L21.1 27H25l-5.1-6.8L24.4 15z"/><path d="M23 4H7v28h22V11L23 4zM8 31V5h14v7h6v19H8L8 31z"/></svg>',
export_html:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><path d="M25.7 20.8l-2.3-2.5c-0.2-0.2-0.4-0.3-0.6-0.3 -0.2 0-0.4 0.1-0.6 0.3 -0.3 0.4-0.3 1 0 1.4l1.7 1.9 -1.7 1.9c-0.2 0.2-0.3 0.4-0.3 0.7 0 0.3 0.1 0.5 0.3 0.7 0.2 0.2 0.4 0.3 0.6 0.3 0.2 0 0.4-0.1 0.6-0.3l2.3-2.5C26.1 21.8 26.1 21.2 25.7 20.8z"/><path d="M14 24c0-0.3-0.1-0.5-0.3-0.7l-1.7-1.9 1.7-1.9c0.3-0.4 0.3-1 0-1.4 -0.2-0.2-0.4-0.3-0.6-0.3 -0.2 0-0.4 0.1-0.6 0.3l-2.3 2.5c-0.3 0.4-0.3 1 0 1.4l2.3 2.5c0.2 0.2 0.4 0.3 0.6 0.3 0.2 0 0.4-0.1 0.6-0.3C13.9 24.5 14 24.3 14 24z"/><path d="M20.4 15.1c-0.1 0-0.2-0.1-0.3-0.1 -0.4 0-0.8 0.3-0.9 0.6l-4.1 11.1c-0.1 0.2-0.1 0.5 0 0.7 0.1 0.2 0.3 0.4 0.5 0.5C15.7 28 15.8 28 16 28c0.4 0 0.8-0.3 0.9-0.6l4.1-11.1C21.1 15.8 20.9 15.2 20.4 15.1z"/><path d="M23 4H7v28h22V11L23 4zM8 31V5h14v7h6v19H8L8 31z"/></svg>',
export_pdf:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><path d="M17.2 17.1L17.2 17.1C17.3 17.1 17.3 17.1 17.2 17.1c0.1-0.5 0.2-0.7 0.2-1V15.8c0.1-0.6 0.1-1 0-1.1 0 0 0 0 0-0.1l-0.1-0.1 0 0 0 0c0 0 0 0.1-0.1 0.1C16.9 15.2 16.9 16 17.2 17.1L17.2 17.1zM13.8 24.8c-0.2 0.1-0.4 0.2-0.6 0.3 -0.8 0.7-1.3 1.5-1.5 1.8l0 0 0 0 0 0C12.5 26.9 13.1 26.2 13.8 24.8 13.9 24.8 13.9 24.8 13.8 24.8 13.9 24.8 13.8 24.8 13.8 24.8zM24.1 23.1c-0.1-0.1-0.6-0.5-2.1-0.5 -0.1 0-0.1 0-0.2 0l0 0c0 0 0 0 0 0.1 0.8 0.3 1.6 0.6 2.1 0.6 0.1 0 0.1 0 0.2 0l0 0h0.1c0 0 0 0 0-0.1l0 0C24.2 23.3 24.1 23.3 24.1 23.1zM24.6 24c-0.2 0.1-0.6 0.2-1 0.2 -0.9 0-2.2-0.2-3.4-0.8 -1.9 0.2-3.4 0.5-4.5 0.9 -0.1 0-0.1 0-0.2 0.1 -1.3 2.4-2.5 3.5-3.4 3.5 -0.2 0-0.3 0-0.4-0.1l-0.6-0.3v-0.1c-0.1-0.2-0.1-0.3-0.1-0.6 0.1-0.6 0.8-1.6 2.1-2.4 0.2-0.1 0.6-0.3 1-0.6 0.3-0.6 0.7-1.2 1.1-2 0.6-1.1 0.9-2.3 1.2-3.3l0 0c-0.4-1.4-0.7-2.1-0.2-3.7 0.1-0.5 0.4-0.9 0.9-0.9h0.2c0.2 0 0.4 0.1 0.7 0.2 0.8 0.8 0.4 2.6 0 4.1 0 0.1 0 0.1 0 0.1 0.4 1.2 1.1 2.3 1.8 2.9 0.3 0.2 0.6 0.5 1 0.7 0.6 0 1-0.1 1.5-0.1 1.3 0 2.2 0.2 2.6 0.8 0.1 0.2 0.1 0.5 0.1 0.7C24.9 23.5 24.8 23.8 24.6 24zM17.3 19.6c-0.2 0.8-0.7 1.7-1.1 2.7 -0.2 0.5-0.4 0.8-0.7 1.2h0.1 0.1l0 0c1.5-0.6 2.8-0.9 3.7-1 -0.2-0.1-0.3-0.2-0.4-0.3C18.4 21.6 17.7 20.7 17.3 19.6z"/><path d="M23 4H7v28h22V11L23 4zM8 31V5h14v7h6v19H8L8 31z"/></svg>',
format:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="-17.5 774.5 36 36"><title>menu_format</title><g fill="#555"><path d="M15.144 781.92a7.62 7.62 0 0 0-4.238-4.157 4.634 4.634 0 0 0-1.201-.254.99.99 0 0 0-.906.36l-10.797 10.829c-1.462 1.462-2.916 2.908-4.37 4.378a1.347 1.347 0 0 0-.326.596c-.481 2.197-.939 4.402-1.413 6.607a.639.639 0 0 0 .792.793l6.551-1.381c.253-.049.49-.171.67-.359 5.063-5.08 10.127-10.144 15.19-15.207.237-.229.384-.548.4-.882a8.491 8.491 0 0 0-.352-1.323zm-16.825 16.652l-2.54.531a2.367 2.367 0 0 0-1.911-1.87c.18-.906.384-1.813.571-2.729a2.05 2.05 0 0 1 1.078.229 6.007 6.007 0 0 1 2.671 2.605c.139.318.245.653.311.996 0 .157 0 .157-.18.238z"/><path d="M6.568 804.5H-11.5v-18h7.761l1.83-2.118 1.593-1.882h-12.455c-.947 0-1.729 1.241-1.729 2.18v21.097c0 .947.77 1.724 1.726 1.724H8.283c.947 0 2.217-.769 2.217-1.724v-12.488l-4 3.438v7.773h.068z"/></g></svg>',
format_number:'<svg xmlns="http://www.w3.org/2000/svg" width="52" height="36" viewBox="0 0 52 36"><path d="M31 19.2v-3.4l2.5-0.4c0.2-0.7 0.5-1.4 0.9-2.1l-1.4-2 2.4-2.4 2 1.4c0.7-0.4 1.4-0.7 2.1-0.9l0.4-2.5h3.4l0.4 2.5c0.7 0.2 1.4 0.5 2.1 0.9l2-1.4 2.4 2.4 -1.4 2c0.4 0.7 0.7 1.4 0.9 2.1L52 15.8v3.4l-2.5 0.4c-0.2 0.7-0.5 1.4-0.9 2.1l1.4 2 -2.4 2.4 -2-1.5c-0.7 0.4-1.4 0.7-2.1 0.9l-0.4 2.5h-3.4l-0.4-2.5c-0.7-0.2-1.4-0.5-2.1-0.9l-2 1.5 -2.4-2.4 1.4-2c-0.4-0.7-0.7-1.4-0.9-2.1L31 19.2zM41.5 21c1.9 0 3.5-1.6 3.5-3.5 0-1.9-1.6-3.5-3.5-3.5 -1.9 0-3.5 1.6-3.5 3.5C38 19.4 39.6 21 41.5 21z"/><path d="M38 30H1V6h36V5H0v26h38V30L38 30z"/><path d="M9.4 21.1c-0.3 0.3-0.7 0.4-1.2 0.4 -0.5 0-0.9-0.2-1.2-0.5s-0.4-0.8-0.4-1.4H5c0 0.9 0.2 1.7 0.7 2.2 0.5 0.6 1.2 0.9 2 1v1.3h1.1v-1.4c0.8-0.1 1.5-0.4 1.9-0.9 0.5-0.5 0.7-1.1 0.7-1.9 0-0.4-0.1-0.8-0.2-1.1 -0.1-0.3-0.3-0.6-0.5-0.8 -0.2-0.2-0.5-0.4-0.8-0.6 -0.3-0.2-0.8-0.4-1.4-0.6 -0.6-0.2-1-0.4-1.2-0.7s-0.4-0.6-0.4-1c0-0.4 0.1-0.8 0.4-1 0.2-0.2 0.6-0.4 1-0.4 0.4 0 0.8 0.2 1 0.5 0.3 0.3 0.4 0.8 0.4 1.4h1.6c0-0.9-0.2-1.6-0.6-2.2 -0.4-0.6-1-0.9-1.8-1v-1.5H7.9v1.5C7.1 12.6 6.5 12.9 6 13.4s-0.7 1.1-0.7 1.9c0 1.1 0.5 2 1.6 2.6 0.3 0.2 0.8 0.4 1.3 0.6 0.6 0.2 1 0.4 1.2 0.7s0.4 0.6 0.4 1C9.8 20.5 9.7 20.8 9.4 21.1z"/><path d="M16.3 12.6h-0.2l-3.8 1.5v1.4l2.4-0.8v8.1h1.6V12.6z"/><path d="M19.9 23.8c0.2-0.5 0.4-1 0.4-1.5l0-1.2h-1.5v1.3c0 0.3-0.1 0.6-0.2 1 -0.1 0.3-0.3 0.7-0.5 1.1l0.9 0.5C19.3 24.7 19.6 24.3 19.9 23.8z"/><path d="M27 16.7c0-1.4-0.3-2.5-0.8-3.2s-1.3-1.1-2.4-1.1c-1.1 0-1.9 0.4-2.4 1.1 -0.5 0.7-0.8 1.8-0.8 3.3v1.8c0 1.4 0.3 2.5 0.8 3.2s1.3 1.1 2.4 1.1c1.1 0 1.9-0.4 2.4-1.1 0.5-0.7 0.8-1.8 0.8-3.3V16.7zM25.4 18.9c0 0.9-0.1 1.6-0.4 2 -0.2 0.4-0.6 0.6-1.2 0.6 -0.5 0-0.9-0.2-1.2-0.7 -0.3-0.5-0.4-1.2-0.4-2.1v-2.3c0-0.9 0.1-1.5 0.4-2 0.3-0.4 0.6-0.6 1.2-0.6 0.5 0 0.9 0.2 1.2 0.7 0.3 0.4 0.4 1.1 0.4 2.1V18.9z"/></svg>',
format_conditional:'<svg xmlns="http://www.w3.org/2000/svg" width="52" height="36" viewBox="0 0 52 36"><polygon points="38 5 0 5 0 31 26 31 26 30 1 30 1 6 37 6 37 10 38 10 "/><path d="M9 13H8.6L5 14.4v1.4l2-0.8V23h2V13z"/><path d="M17 22h-4l2.4-2.9c0.6-0.7 1-1.3 1.3-1.8 0.3-0.5 0.4-1.1 0.4-1.5 0-0.8-0.3-1.5-0.8-2 -0.5-0.5-1.2-0.7-2.2-0.7 -0.6 0-1.2 0.1-1.7 0.4s-0.9 0.6-1.1 1C11.1 14.9 11 16 11 16h1.6c0 0 0.1-0.9 0.4-1.3s0.7-0.4 1.2-0.4c0.4 0 0.8 0.2 1 0.5 0.3 0.3 0.4 0.7 0.4 1.1 0 0.4-0.1 0.7-0.3 1.1 -0.2 0.4-0.6 0.8-1.1 1.3L11 21.9V23h6V22z"/><path d="M21 19h0.8c0.6 0 1-0.1 1.3 0.2 0.3 0.3 0.4 0.6 0.4 1.1 0 0.5-0.1 0.8-0.4 1.1 -0.3 0.3-0.6 0.4-1.1 0.4 -0.5 0-0.8-0.3-1.1-0.5C20.6 20.9 20.5 21 20.5 20h-1.5c0 1 0.3 1.6 0.8 2.1s1.3 0.8 2.1 0.8c0.9 0 1.6-0.2 2.2-0.7 0.6-0.5 0.8-1.2 0.8-2.1 0-0.5-0.1-1-0.4-1.4 -0.3-0.4-0.6-0.7-1.1-0.9 0.4-0.2 0.7-0.5 1-0.9 0.3-0.4 0.4-0.8 0.4-1.2 0-0.9-0.3-1.5-0.8-2 -0.5-0.5-1.2-0.7-2.1-0.7 -0.5 0-1 0.1-1.5 0.3 -0.4 0.2-0.8 0.7-1 1.1S19.1 15 19.1 16h1.5c0-1 0.1-0.9 0.4-1.1 0.3-0.3 0.6-0.5 1-0.5 0.5 0 0.8 0.1 1 0.3s0.3 0.6 0.3 1.1c0 0.5-0.1 0.7-0.4 1C22.7 17 22.3 17 21.9 17H21V19z"/><path d="M47.8 7C50.1 7 52 8.9 52 11.2c0 1-0.3 1.8-0.8 2.5l-1.7 1.7L43.6 9.5l1.7-1.7C46 7.3 46.8 7 47.8 7zM30.7 22.4L29 30l7.6-1.7 11.6-11.6 -5.9-5.9L30.7 22.4zM42 17.9l-5.1 5.1 -0.9-0.9 5.1-5L42 17.9z"/></svg>',
options:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="-17.5 774.5 36 36"><title>menu_options</title><path fill="#555" d="M11.363 789.058l-.76-1.838a33.692 33.692 0 0 0 1.601-4.223l-2.327-2.328a31.444 31.444 0 0 0-4.142 1.691l-1.829-.76a32.88 32.88 0 0 0-1.83-4.101h-3.291a32.106 32.106 0 0 0-1.731 4.133l-1.83.76a33.556 33.556 0 0 0-4.206-1.609l-2.328 2.32a31.563 31.563 0 0 0 1.69 4.141l-.759 1.838a34.366 34.366 0 0 0-4.117 1.838v3.3a32.519 32.519 0 0 0 4.117 1.731l.759 1.829a33.633 33.633 0 0 0-1.608 4.223l2.327 2.328a32.986 32.986 0 0 0 4.133-1.699l1.83.76a31.481 31.481 0 0 0 1.862 4.108h3.291a32.194 32.194 0 0 0 1.732-4.133l1.837-.76a33.57 33.57 0 0 0 4.207 1.609l2.327-2.328a31.481 31.481 0 0 0-1.69-4.141l.76-1.838a32.532 32.532 0 0 0 4.108-1.829v-3.3a30.142 30.142 0 0 0-4.133-1.722zM.5 799.202a6.706 6.706 0 1 1 6.706-6.706A6.71 6.71 0 0 1 .5 799.202z"/></svg>',
fields:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="-17.5 774.5 36 36"><title>menu_fields</title><g fill="#555"><path d="M11.351 787.279c1.112.367 2.027 1.221 2.55 2.221H13.5v-10.627c0-.744-.089-1.357-.825-1.373h-26.339c-.736.008-.836.612-.836 1.349v21.656c0 .735.093.995.836.995h10.836c-.008 0 .205-1.314.629-2.025-.073-.098-.123.025-.18.025H-12.5v-6h10.563l.83-1.699c.4-.76 1.606-1.258 1.606-1.667V785.5h10.843l.009 1.779zM-1.5 791.5h-11v-6h11v6z"/><path d="M15.805 801.444l-1.602-1.308c0-.237.082-.49.082-.817a2.483 2.483 0 0 0-.082-.817l1.602-1.389a.399.399 0 0 0 .082-.49l-1.528-2.86a.364.364 0 0 0-.278-.123.678.678 0 0 0-.18 0l-1.912.866a6.95 6.95 0 0 0-1.299-.817l-.311-1.989c-.017-.195-.188-.199-.384-.199H6.93c-.147 0-.384.037-.384.199l-.311 2.053c-.458.229-.899.468-1.299.786l-1.912-.834c-.041-.008-.09-.016-.131-.008a.356.356 0 0 0-.319.192l-1.528 2.817c-.082.164-.082.408.082.489l1.749 1.308c0 .237-.082.489-.082.816a2.48 2.48 0 0 0 .082.817l-1.602 1.356a.399.399 0 0 0-.082.49l1.528 2.86a.364.364 0 0 0 .278.123.678.678 0 0 0 .18 0l1.912-.817c.4.318.842.597 1.299.817l.311 2.116a.322.322 0 0 0 .221.4c.033.008.065.017.09.017h3.065c.147 0 .384-.164.384-.327l.311-2.215c.466-.212.907-.49 1.299-.817l1.831.817a.441.441 0 0 0 .54-.163l1.528-2.86c.056-.08-.018-.326-.165-.489zm-7.306.744a2.865 2.865 0 0 1-3.064-2.664c-.114-1.585 1.079-2.95 2.664-3.064a2.867 2.867 0 0 1 3.072 2.868 2.804 2.804 0 0 1-2.672 2.86z"/></g></svg>',
fullscreen:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="-17.5 774.5 36 36"><title>menu_fullscreen_open</title><g fill="#555"><path d="M-7.5 779.976V777.5h-7v7h3v-2.752l3.758 4.067 1.74-1.846-4.342-4.003 2.844.01zM-7.742 799.096l-3.758 4.101V800.5h-3v7h7v-2h-2.618l-.049-.371 4.124-4.054-1.699-1.979zM8.746 785.913l3.754-4.092v2.679h3v-7h-7v2h2.602l.082.381-4.126 4.041 1.688 1.991zM13.5 800.5v2.598l-.382.074-4.058-4.003-1.882 1.575 4.006 3.756H8.5v3h7v-7h-2zM-4 786.5h9c1.104 0 2.5.908 2.5 2.011v7.996c0 1.103-1.396 1.993-2.5 1.993h-9c-1.104 0-2.5-.891-2.5-1.993v-8.005c0-1.103 1.396-2.002 2.5-2.002z"/></g></svg>'};
WebDataRocksToolbar.prototype.connectLocalCSVHandler=function(){this.pivot.connectTo({dataSourceType:"csv",browseForFile:!0})};WebDataRocksToolbar.prototype.connectLocalJSONHandler=function(){this.pivot.connectTo({dataSourceType:"json",browseForFile:!0})};WebDataRocksToolbar.prototype.connectRemoteCSV=function(){this.showConnectToRemoteCSVDialog()};WebDataRocksToolbar.prototype.connectRemoteJSON=function(){this.showConnectToRemoteJSONDialog()};WebDataRocksToolbar.prototype.openLocalReport=function(){this.pivot.open()};
WebDataRocksToolbar.prototype.openRemoteReport=function(){this.showOpenRemoteReportDialog()};WebDataRocksToolbar.prototype.saveHandler=function(){this.pivot.save("report.json","file")};WebDataRocksToolbar.prototype.formatCellsHandler=function(){this.showFormatCellsDialog()};WebDataRocksToolbar.prototype.conditionalFormattingHandler=function(){this.showConditionalFormattingDialog()};WebDataRocksToolbar.prototype.optionsHandler=function(){this.showOptionsDialog()};
WebDataRocksToolbar.prototype.fieldsHandler=function(){this.pivot.openFieldsList()};WebDataRocksToolbar.prototype.printHandler=function(){this.pivot.print()};WebDataRocksToolbar.prototype.exportHandler=function(a){"pdf"==a?this.showExportPdfDialog():this.pivot.exportTo(a)};WebDataRocksToolbar.prototype.fullscreenHandler=function(){this.toggleFullscreen()};WebDataRocksToolbar.prototype.defaults={};
WebDataRocksToolbar.prototype.showConnectToRemoteCSVDialog=function(){var a=this,b=this.Labels,d=this.popupManager.createPopup();d.content.classList.add("wdr-popup-w500");d.setTitle(b.open_remote_csv);d.setToolbar([{id:"wdr-btn-open",label:b.open,handler:function(){0<f.value.length&&a.pivot.connectTo({filename:f.value,dataSourceType:"csv"})},isPositive:!0},{id:"wdr-btn-cancel",label:b.cancel}]);var b=document.createElement("div"),f=document.createElement("input");f.id="wdr-inp-file-url";f.type="text";
f.value="https://cdn.webdatarocks.com/data/data.csv";b.appendChild(f);d.setContent(b);this.popupManager.addPopup(d.content)};
WebDataRocksToolbar.prototype.showConnectToRemoteJSONDialog=function(){var a=this,b=this.Labels,d=this.popupManager.createPopup();d.content.classList.add("wdr-popup-w500");d.setTitle(b.open_remote_json);d.setToolbar([{id:"wdr-btn-open",label:b.open,handler:function(){0<f.value.length&&a.pivot.connectTo({filename:f.value,dataSourceType:"json"})},isPositive:!0},{id:"wdr-btn-cancel",label:b.cancel}]);var b=document.createElement("div"),f=document.createElement("input");f.id="wdr-inp-file-url";f.type=
"text";f.value="https://cdn.webdatarocks.com/data/data.json";b.appendChild(f);d.setContent(b);this.popupManager.addPopup(d.content)};
WebDataRocksToolbar.prototype.showOpenRemoteReportDialog=function(){var a=this,b=this.Labels,d=this.popupManager.createPopup();d.content.classList.add("wdr-popup-w500");d.setTitle(b.open_remote_report);d.setToolbar([{id:"wdr-btn-open",label:b.open,handler:function(){0<f.value.length&&a.pivot.load(f.value)},isPositive:!0},{id:"wdr-btn-cancel",label:b.cancel}]);var b=document.createElement("div"),f=document.createElement("input");f.type="text";var m=a.pivot.getOptions()||{};f.value=m.grid&&"flat"==
m.grid.type?"https://cdn.webdatarocks.com/reports/report-flat.json":"https://cdn.webdatarocks.com/reports/report.json";b.appendChild(f);d.setContent(b);this.popupManager.addPopup(d.content)};
WebDataRocksToolbar.prototype.showFormatCellsDialog=function(){var a=this,b=this.Labels,d=function(){n.disabled=h.disabled=w.disabled=p.disabled=q.disabled=r.disabled=s.disabled=t.disabled="empty"==e.value;var b=a.pivot.getFormat(e.value);n.value="left"==b.textAlign||"right"==b.textAlign?b.textAlign:"right";h.value=b.thousandsSeparator;w.value=b.decimalSeparator;p.value=b.decimalPlaces;q.value=b.currencySymbol;r.value=b.currencySymbolAlign;s.value=b.nullValue;t.value=!0==b.isPercent?!0:!1},f=this.popupManager.createPopup();
f.content.id="wdr-popup-format-cells";f.setTitle(this.osUtils.isMobile?b.format:b.format_cells);f.setToolbar([{id:"wdr-btn-apply",label:b.apply,handler:function(){var b={};""==e.value&&(b.name="");b.textAlign=n.value;b.thousandsSeparator=h.value;b.decimalSeparator=w.value;b.decimalPlaces=p.value;b.currencySymbol=q.value;b.currencySymbolAlign=r.value;b.nullValue=s.value;b.isPercent="true"==t.value?!0:!1;a.pivot.setFormat(b,""==e.value?null:e.value);a.pivot.refresh()},isPositive:!0},{id:"wdr-btn-cancel",
label:b.cancel}],!0);var m=document.createElement("div"),g=document.createElement("div");g.classList.add("wdr-inp-group");m.appendChild(g);var c=document.createElement("div");c.classList.add("wdr-inp-row");c.classList.add("wdr-ir-horizontal");g.appendChild(c);var k=document.createElement("label");k.classList.add("wdr-uc");a.setText(k,b.choose_value);c.appendChild(k);var l=a.createSelect(),e=l.select;e.onchange=d;e.options[0]=new Option(b.choose_value,"empty");e.options[0].disabled=!0;e.options[1]=
new Option(b.all_values,"");c.appendChild(l);c=document.createElement("div");c.classList.add("wdr-inp-row");c.classList.add("wdr-ir-horizontal");g.appendChild(c);g=document.createElement("div");g.classList.add("wdr-inp-group");m.appendChild(g);c=document.createElement("div");c.classList.add("wdr-inp-row");c.classList.add("wdr-ir-horizontal");g.appendChild(c);k=document.createElement("label");a.setText(k,b.text_align);c.appendChild(k);var l=a.createSelect(),n=l.select;n.options[0]=new Option(b.align_left,
"left");n.options[1]=new Option(b.align_right,"right");c.appendChild(l);c=document.createElement("div");c.classList.add("wdr-inp-row");c.classList.add("wdr-ir-horizontal");g.appendChild(c);k=document.createElement("label");a.setText(k,b.thousand_separator);c.appendChild(k);var l=a.createSelect(),h=l.select;h.options[0]=new Option(b.none,"");h.options[1]=new Option(b.space," ");h.options[2]=new Option(",",",");h.options[3]=new Option(".",".");c.appendChild(l);c=document.createElement("div");c.classList.add("wdr-inp-row");
c.classList.add("wdr-ir-horizontal");g.appendChild(c);k=document.createElement("label");a.setText(k,b.decimal_separator);c.appendChild(k);var l=a.createSelect(),w=l.select;w.options[0]=new Option(".",".");w.options[1]=new Option(",",",");c.appendChild(l);c=document.createElement("div");c.classList.add("wdr-inp-row");c.classList.add("wdr-ir-horizontal");g.appendChild(c);k=document.createElement("label");a.setText(k,b.decimal_places);c.appendChild(k);for(var l=a.createSelect(),p=l.select,k=0;11>k;k++)p.options[k]=
new Option(0===k?b.none:k-1,k-1);c.appendChild(l);c=document.createElement("div");c.classList.add("wdr-inp-row");c.classList.add("wdr-ir-horizontal");g.appendChild(c);k=document.createElement("label");a.setText(k,b.currency_symbol);c.appendChild(k);var q=document.createElement("input");q.classList.add("wdr-inp");q.type="text";c.appendChild(q);c=document.createElement("div");c.classList.add("wdr-inp-row");c.classList.add("wdr-ir-horizontal");g.appendChild(c);k=document.createElement("label");a.setText(k,
b.currency_align);c.appendChild(k);var l=a.createSelect(),r=l.select;r.options[0]=new Option(b.align_left,"left");r.options[1]=new Option(b.align_right,"right");c.appendChild(l);c=document.createElement("div");c.classList.add("wdr-inp-row");c.classList.add("wdr-ir-horizontal");g.appendChild(c);k=document.createElement("label");a.setText(k,b.null_value);c.appendChild(k);var s=document.createElement("input");s.classList.add("wdr-inp");s.type="text";c.appendChild(s);c=document.createElement("div");c.classList.add("wdr-inp-row");
c.classList.add("wdr-ir-horizontal");g.appendChild(c);k=document.createElement("label");a.setText(k,b.is_percent);c.appendChild(k);var l=a.createSelect(),t=l.select;t.options[0]=new Option(b.true_value,!0);t.options[1]=new Option(b.false_value,!1);c.appendChild(l);f.setContent(m);this.popupManager.addPopup(f.content);b=a.pivot.getMeasures();for(k=0;k<b.length;k++)e.options[k+2]=new Option(b[k].caption,b[k].uniqueName);d()};
WebDataRocksToolbar.prototype.showConditionalFormattingDialog=function(){var a=this,b=this.Labels,d=this.pivot.getAllConditions(),f=function(a){for(var b=a.match(/\W\d+\.*\d*/g),c=[],d=!1,f="",g=0;g<a.length;g++)'"'==a[g]||"'"==a[g]?(d?c.push(f):f="",d=!d):d&&(f+=a[g]);a=a.match(/<=|>=|<|>|=|=|!=|isNaN/g);return null==b&&null==c?{}:{value1:null!=b?b[0].replace(/\s/,""):c[0],value2:null!=b&&1<b.length?b[1].replace(/\s/,""):"",sign:a?a.join(""):""}},m=this.popupManager.createPopup();m.content.id="wdr-popup-conditional";
m.setTitle(this.osUtils.isMobile?b.conditional:b.conditional_formatting);m.setToolbar([{id:"wdr-btn-apply",label:b.apply,handler:function(){a.pivot.removeAllConditions();for(var b=0;b<d.length;b++){var c;c=d[b].sign;var e=d[b].value1,f=d[b].value2,g="",m=null==f||0==f.length,p="><"===c,q="isNaN"===c;(null==e||0==e.length)&&!q||p&&m||(p&&!m?g="AND(#value > "+e+", #value < "+f+")":q?g="isNaN(#value)":(isNaN(parseFloat(e))&&(e="'"+e+"'"),g="#value "+c+" "+e));c=g;if(null==c)return;d[b].formula=c;a.pivot.addCondition(d[b])}a.pivot.refresh()},
isPositive:!0},{id:"wdr-btn-cancel",label:b.cancel}],!0);var g=document.createElement("a");g.id="wdr-add-btn";g.setAttribute("href","javascript:void(0)");g.classList.add("wdr-ui-btn");g.classList.add("wdr-ui-btn-light");g.classList.add("wdr-button-add");g.onclick=function(){var b={sign:"<",value1:"0",measures:a.pivot.getMeasures(),format:{fontFamily:"Arial",fontSize:"12px",color:"#000000",backgroundColor:"#FFFFFF"}};d.push(b);c.appendChild(a.createConditionalFormattingItem(b,d));a.popupManager.centerPopup(m.content)};
g.setAttribute("title",b.add_condition);b=document.createElement("span");b.classList.add("wdr-icon");b.classList.add("wdr-icon-act_add");g.appendChild(b);m.toolbar.insertBefore(g,m.toolbar.firstChild);var c=document.createElement("div");c.classList.add("wdr-popup-content");c.onclick=function(b){b.target.classList.contains("wdr-cr-delete")&&a.popupManager.centerPopup(m.content)};for(g=0;g<d.length;g++)b=f(d[g].formula),d[g].value1=b.value1,d[g].value2=b.value2,d[g].sign=b.sign,d[g].measures=a.pivot.getMeasures(),
c.appendChild(a.createConditionalFormattingItem(d[g],d));m.setContent(c);this.popupManager.addPopup(m.content)};WebDataRocksToolbar.prototype.defaults.fontSizes="8px 9px 10px 11px 12px 13px 14px".split(" ");WebDataRocksToolbar.prototype.defaults.fonts="Arial;Lucida Sans Unicode;Verdana;Courier New;Palatino Linotype;Tahoma;Impact;Trebuchet MS;Georgia;Times New Roman".split(";");
WebDataRocksToolbar.prototype.defaults.conditions=[{label:"less_than",sign:"<"},{label:"less_than_or_equal",sign:"<="},{label:"greater_than",sign:">"},{label:"greater_than_or_equal",sign:">="},{label:"equal_to",sign:"="},{label:"not_equal_to",sign:"!="},{label:"between",sign:"><"},{label:"is_empty",sign:"isNaN"}];
WebDataRocksToolbar.prototype.createConditionalFormattingItem=function(a,b){var d=this,f=this.Labels,m=function(a,b){h[0]=new Option(f.all_values,"");for(var c=d.pivot.getOptions()||{},c=c.grid&&"flat"==c.grid.type,e=0;e<a.length;e++)c&&7==a[e].type||(h[h.options.length]=new Option(a[e].caption,a[e].uniqueName));null!=b?h.value=b:h.selectedIndex=0},g=function(){"sign"in a&&"><"===a.sign?(p.classList.remove("wdr-width120"),p.classList.add("wdr-width50"),p.style.display="inline-block",r.value="value2"in
a?a.value2:"0",r.style.display="inline-block",q.style.display="inline-block"):("sign"in a&&"isNaN"===a.sign?p.style.display="none":(p.classList.add("wdr-width120"),p.classList.remove("wdr-width50"),p.style.display="inline-block"),r.style.display="none",q.style.display="none")},c=function(){var b=a.format;null!=b&&(v.style.backgroundColor=b.backgroundColor||"#fff",v.style.color=b.color||"#000",v.style.fontFamily=b.fontFamily||"Arial",v.style.fontSize=b.fontSize||"12px")},k=document.createElement("div");
k.classList.add("wdr-condition-row");var l=document.createElement("div");l.classList.add("wdr-wrap-relative");k.appendChild(l);var e=document.createElement("span");e.classList.add("wdr-cr-delete");e.classList.add("wdr-icon");e.classList.add("wdr-icon-act_trash");e.onclick=function(){var c=b.indexOf(a);-1<c&&b.splice(c,1);k.parentNode.removeChild(k)};l.appendChild(e);e=document.createElement("div");e.classList.add("wdr-cr-inner");l.appendChild(e);var n=document.createElement("div");n.classList.add("wdr-cr-lbl");
n.classList.add("wdr-width50");d.setText(n,f.value+":");e.appendChild(n);n=d.createSelect();n.id="wdr-values";var h=n.select;"measures"in a?(m(a.measures,a.measure),h.disabled=0===a.measures.length):h.disabled=!0;h.onchange=function(){a.measure=h.value};e.appendChild(n);n=d.createSelect();n.id="wdr-conditions";var w=n.select;(function(a){for(var b=0;b<d.defaults.conditions.length;b++)w[b]=new Option(f[d.defaults.conditions[b].label],d.defaults.conditions[b].sign);null!=a?w.value=a:w.selectedIndex=
0})("sign"in a?a.sign:null);w.onchange=function(){a.sign=w.value;"sign"in a&&"><"===a.sign?a.value2=0:("sign"in a&&"isNaN"===a.sign&&delete a.value1,delete a.value2);g()};e.appendChild(n);var p=document.createElement("input");p.classList.add("wdr-number-inp");p.classList.add("wdr-width50");p.type="number";p.value="value1"in a?a.value1:"0";p.onchange=function(){a.value1=0==p.value.length?"0":p.value};e.appendChild(p);var q=document.createElement("span");q.id="wdr-and-label";q.classList.add("wdr-width20");
d.setText(q,f.and_symbole);e.appendChild(q);var r=document.createElement("input");r.classList.add("wdr-number-inp");r.classList.add("wdr-width50");r.type="number";r.value="value2"in a?a.value2:"0";r.onchange=function(){a.value2=0==r.value.length?"0":r.value};e.appendChild(r);g();e=document.createElement("div");e.classList.add("wdr-cr-inner");l.appendChild(e);n=document.createElement("div");n.classList.add("wdr-cr-lbl");n.classList.add("wdr-width50");d.setText(n,f.format+":");e.appendChild(n);n=d.createSelect();
n.id="wdr-font-family";var s=n.select;(function(a){for(var b=0;b<d.defaults.fonts.length;b++)s[b]=new Option(d.defaults.fonts[b],d.defaults.fonts[b]);s.value=null==a?"Arial":a})(a.hasOwnProperty("format")&&a.format.hasOwnProperty("fontFamily")?a.format.fontFamily:null);s.onchange=function(){null!=a.format&&(a.format.fontFamily=s.value,c())};e.appendChild(n);n=d.createSelect();n.id="wdr-font-size";var t=n.select;(function(a){for(var b=0;b<d.defaults.fontSizes.length;b++)t[b]=new Option(d.defaults.fontSizes[b],
d.defaults.fontSizes[b]);t.value=null==a?"12px":a})(a.hasOwnProperty("format")&&a.format.hasOwnProperty("fontSize")?a.format.fontSize:null);t.onchange=function(){null!=a.format&&(a.format.fontSize=t.value,c())};e.appendChild(n);var u=new WebDataRocksToolbar.ColorPicker(this,k);u.setColor(a.hasOwnProperty("format")&&a.format.hasOwnProperty("backgroundColor")?a.format.backgroundColor:"0xFFFFFF","bg");u.setColor(a.hasOwnProperty("format")&&a.format.hasOwnProperty("color")?a.format.color:"0x000000","font");
u.changeHandler=function(){null!=a.format&&(v.style.color=u.fontColor||"#000",v.style.backgroundColor=u.backgroundColor||"#fff")};u.applyHandler=function(){null!=a.format&&(a.format.color=u.fontColor,a.format.backgroundColor=u.backgroundColor,c())};u.cancelHandler=function(){null!=a.format&&(u.setColor(a.format.hasOwnProperty("backgroundColor")?a.format.backgroundColor:"0xFFFFFF","bg"),u.setColor(a.format.hasOwnProperty("color")?a.format.color:"0x000000","font"));c()};e.appendChild(u.element);var v=
document.createElement("input");v.id="wdr-sample";v.classList.add("wdr-inp");v.type="number";v.value="73.93";v.style.pointerEvents="none";e.appendChild(v);c();return k};
WebDataRocksToolbar.prototype.showOptionsDialog=function(){var a=this,b=this.Labels,d=this.popupManager.createPopup();d.content.id="wdr-popup-options";d.setTitle(this.osUtils.isMobile?b.options:b.layout_options);d.setToolbar([{id:"wdr-btn-apply",label:b.apply,handler:function(){var b;n.checked?b="off":w.checked?b="on":p.checked?b="rows":q.checked&&(b="columns");var c;u.checked?c="off":v.checked?c="on":x.checked?c="rows":y.checked&&(c="columns");var d="compact";s&&s.checked?d="classic":t&&t.checked&&
(d="flat");var e=a.pivot.getOptions(),e={grid:{showGrandTotals:b,showTotals:c,type:d}};a.pivot.setOptions(e);a.pivot.refresh()},isPositive:!0},{id:"wdr-btn-cancel",label:b.cancel}],!0);var f=document.createElement("div");f.classList.add("wdr-popup-content");var m=document.createElement("div");m.classList.add("wdr-ui-row");f.appendChild(m);var g=document.createElement("div");g.classList.add("wdr-ui-col-2");m.appendChild(g);var c=document.createElement("div");c.classList.add("wdr-title-2");a.setText(c,
b.grand_totals);g.appendChild(c);var k="wdr-grand-totals-"+Date.now(),c=document.createElement("ul");c.classList.add("wdr-radiobtn-list");g.appendChild(c);var l=document.createElement("li"),e=document.createElement("div");e.classList.add("wdr-radio-wrap");var n=document.createElement("input");n.type="radio";n.name=k;n.id="wdr-gt-1";n.value="off";e.appendChild(n);var h=document.createElement("label");h.setAttribute("for","wdr-gt-1");a.setText(h,b.grand_totals_off);e.appendChild(h);l.appendChild(e);
c.appendChild(l);l=document.createElement("li");e=document.createElement("div");e.classList.add("wdr-radio-wrap");var w=document.createElement("input");w.type="radio";w.name=k;w.id="wdr-gt-2";w.value="on";e.appendChild(w);h=document.createElement("label");h.setAttribute("for","wdr-gt-2");a.setText(h,b.grand_totals_on);e.appendChild(h);l.appendChild(e);c.appendChild(l);l=document.createElement("li");e=document.createElement("div");e.classList.add("wdr-radio-wrap");var p=document.createElement("input");
p.type="radio";p.name=k;p.id="wdr-gt-3";p.value="rows";e.appendChild(p);h=document.createElement("label");h.setAttribute("for","wdr-gt-3");a.setText(h,b.grand_totals_on_rows);e.appendChild(h);l.appendChild(e);c.appendChild(l);l=document.createElement("li");e=document.createElement("div");e.classList.add("wdr-radio-wrap");var q=document.createElement("input");q.type="radio";q.name=k;q.id="wdr-gt-4";q.value="rows";e.appendChild(q);h=document.createElement("label");h.setAttribute("for","wdr-gt-4");a.setText(h,
b.grand_totals_on_columns);e.appendChild(h);l.appendChild(e);c.appendChild(l);c=document.createElement("div");c.classList.add("wdr-title-2");a.setText(c,b.layout);g.appendChild(c);var r="wdr-layout-"+Date.now(),c=document.createElement("ul");c.classList.add("wdr-radiobtn-list");g.appendChild(c);l=document.createElement("li");e=document.createElement("div");e.classList.add("wdr-radio-wrap");k=document.createElement("input");k.type="radio";k.name=r;k.id="wdr-lt-1";k.value="compact";e.appendChild(k);
h=document.createElement("label");h.setAttribute("for","wdr-lt-1");a.setText(h,b.compact_view);e.appendChild(h);l.appendChild(e);c.appendChild(l);l=document.createElement("li");e=document.createElement("div");e.classList.add("wdr-radio-wrap");var s=document.createElement("input");s.type="radio";s.name=r;s.id="wdr-lt-2";s.value="classic";e.appendChild(s);h=document.createElement("label");h.setAttribute("for","wdr-lt-2");a.setText(h,b.classic_view);e.appendChild(h);l.appendChild(e);c.appendChild(l);
g=a.pivot.getReport({withDefaults:!0,withGlobals:!0});l=document.createElement("li");e=document.createElement("div");e.classList.add("wdr-radio-wrap");var t=document.createElement("input");t.type="radio";t.name=r;t.id="wdr-lt-3";t.value="flat";e.appendChild(t);h=document.createElement("label");h.setAttribute("for","wdr-lt-3");a.setText(h,b.flat_view);e.appendChild(h);l.appendChild(e);c.appendChild(l);g=document.createElement("div");g.classList.add("wdr-ui-col-2");m.appendChild(g);c=document.createElement("div");
c.classList.add("wdr-title-2");a.setText(c,b.subtotals);g.appendChild(c);m="wdr-subtotals-"+Date.now();c=document.createElement("ul");c.classList.add("wdr-radiobtn-list");g.appendChild(c);l=document.createElement("li");e=document.createElement("div");e.classList.add("wdr-radio-wrap");var u=document.createElement("input");u.type="radio";u.name=m;u.id="wdr-st-1";u.value="off";e.appendChild(u);h=document.createElement("label");h.setAttribute("for","wdr-st-1");a.setText(h,b.subtotals_off);e.appendChild(h);
l.appendChild(e);c.appendChild(l);l=document.createElement("li");e=document.createElement("div");e.classList.add("wdr-radio-wrap");var v=document.createElement("input");v.type="radio";v.name=m;v.id="wdr-st-2";v.value="on";e.appendChild(v);h=document.createElement("label");h.setAttribute("for","wdr-st-2");a.setText(h,b.subtotals_on);e.appendChild(h);l.appendChild(e);c.appendChild(l);l=document.createElement("li");e=document.createElement("div");e.classList.add("wdr-radio-wrap");var x=document.createElement("input");
x.type="radio";x.name=m;x.id="wdr-st-3";x.value="rows";e.appendChild(x);h=document.createElement("label");h.setAttribute("for","wdr-st-3");a.setText(h,b.subtotals_on_rows);e.appendChild(h);l.appendChild(e);c.appendChild(l);l=document.createElement("li");e=document.createElement("div");e.classList.add("wdr-radio-wrap");var y=document.createElement("input");y.type="radio";y.name=m;y.id="wdr-st-4";y.value="columns";e.appendChild(y);h=document.createElement("label");h.setAttribute("for","wdr-st-4");a.setText(h,
b.subtotals_on_columns);e.appendChild(h);l.appendChild(e);c.appendChild(l);d.setContent(f);this.popupManager.addPopup(d.content);g=a.pivot.getOptions()||{};b=g.grid||{};"off"==b.showGrandTotals||!1==b.showGrandTotals?n.checked=!0:"on"==b.showGrandTotals||!0==b.showGrandTotals?w.checked=!0:"rows"==b.showGrandTotals?p.checked=!0:"columns"==b.showGrandTotals&&(q.checked=!0);"off"==b.showTotals?u.checked=!0:"on"==b.showTotals?v.checked=!0:"rows"==b.showTotals?x.checked=!0:"columns"==b.showTotals&&(y.checked=
!0);"flat"==b.type&&t?t.checked=!0:"classic"==b.type&&s?s.checked=!0:k&&(k.checked=!0)};
WebDataRocksToolbar.prototype.showExportPdfDialog=function(){var a=this,b=this.Labels,d=this.popupManager.createPopup();d.setTitle(b.choose_page_orientation);d.setToolbar([{id:"wdr-btn-apply",label:b.apply,handler:function(){var b="portrait";k.checked&&(b="landscape");a.pivot.exportTo("pdf",{pageOrientation:b})},isPositive:!0},{id:"wdr-btn-cancel",label:b.cancel}]);var f=document.createElement("div"),m=document.createElement("ul");m.classList.add("wdr-radiobtn-list");f.appendChild(m);var g=document.createElement("li");
m.appendChild(g);var c=document.createElement("div");c.classList.add("wdr-radio-wrap");g.appendChild(c);g=document.createElement("input");g.id="wdr-portrait-radio";g.type="radio";g.name="wdr-pdf-orientation";g.checked=!0;c.appendChild(g);g=document.createElement("label");g.setAttribute("for","wdr-portrait-radio");a.setText(g,b.portrait);c.appendChild(g);g=document.createElement("li");m.appendChild(g);c=document.createElement("div");c.classList.add("wdr-radio-wrap");g.appendChild(c);var k=document.createElement("input");
k.id="wdr-landscape-radio";k.type="radio";k.name="wdr-pdf-orientation";c.appendChild(k);g=document.createElement("label");g.setAttribute("for","wdr-landscape-radio");a.setText(g,b.landscape);c.appendChild(g);d.setContent(f);this.popupManager.addPopup(d.content)};WebDataRocksToolbar.prototype.toggleFullscreen=function(){this.isFullscreen()?this.exitFullscreen():this.enterFullscreen(this.container)};
WebDataRocksToolbar.prototype.isFullscreen=function(){return document.fullScreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement};
WebDataRocksToolbar.prototype.enterFullscreen=function(a){if(a.requestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen&&window==top){this.containerStyle={width:this.container.style.width,height:this.container.style.height,position:this.container.style.position,top:this.container.style.top,bottom:this.container.style.bottom,left:this.container.style.left,right:this.container.style.right,marginTop:this.container.style.marginTop,marginLeft:this.container.style.left,
toolbarWidth:this.toolbarWrapper.style.width};this.container.style.width="100%";this.container.style.height="100%";this.container.style.position="fixed";this.container.style.top="0px";this.container.style.left="0px";this.toolbarWrapper.style.width="100%";if(a.requestFullscreen)a.requestFullscreen();else if(a.webkitRequestFullScreen){var b=navigator.userAgent;-1<b.indexOf("Safari")&&-1==b.indexOf("Chrome")?a.webkitRequestFullScreen():a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}else a.mozRequestFullScreen?
a.mozRequestFullScreen():a.msRequestFullscreen&&(window==top?a.msRequestFullscreen():alert("Fullscreen mode in IE 11 is not currently supported while Pivot embeded in iframe."));a.addEventListener("fullscreenchange",function(){window.screenTop||window.screenY||this.isFullscreen()||this.exitFullscreen()}.bind(this),!1);a.addEventListener("webkitfullscreenchange",function(){window.screenTop||window.screenY||this.isFullscreen()||this.exitFullscreen()}.bind(this),!1);a.addEventListener("mozfullscreenchange",
function(){window.fullScreen||window.innerWidth==screen.width&&window.innerHeight==screen.height||this.exitFullscreen()}.bind(this),!1)}};
WebDataRocksToolbar.prototype.exitFullscreen=function(){this.container.style.width=this.containerStyle.width;this.container.style.height=this.containerStyle.height;this.container.style.position=this.containerStyle.position;this.container.style.top=this.containerStyle.top;this.container.style.left=this.containerStyle.left;this.container.style.marginTop=this.containerStyle.marginTop;this.container.style.marginLeft=this.containerStyle.marginLeft;this.toolbarWrapper.style.width=this.containerStyle.toolbarWidth;
document.exitFullscreen?document.exitFullscreen():document.cancelFullscreen?document.cancelFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullScreen?document.webkitExitFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()};WebDataRocksToolbar.prototype.nullOrUndefined=function(a){return"undefined"===typeof a||null===a};
WebDataRocksToolbar.prototype.hasClass=function(a,b){return a.className.match(RegExp("(\\s|^)"+b+"(\\s|$)"))};WebDataRocksToolbar.prototype.addClass=function(a,b){this.hasClass(a,b)||(a.className+=" "+b)};WebDataRocksToolbar.prototype.removeClass=function(a,b){this.hasClass(a,b)&&(a.className=a.className.replace(RegExp("(\\s|^)"+b+"(\\s|$)")," "))};WebDataRocksToolbar.prototype.setText=function(a,b){a&&(void 0!==a.innerText&&(a.innerText=b),void 0!==a.textContent&&(a.textContent=b))};
WebDataRocksToolbar.prototype.createSelect=function(){var a=document.createElement("div");a.classList.add("wdr-select");var b=document.createElement("select");a.appendChild(b);a.select=b;return a};WebDataRocksToolbar.prototype.createDivider=function(a){a=document.createElement("li");a.className="wdr-divider";return a};
WebDataRocksToolbar.prototype.createTab=function(a){var b=document.createElement("li");b.id=a.id;var d=document.createElement("a");a.hasOwnProperty("class_attr")&&d.setAttribute("class",a.class_attr);d.setAttribute("href","javascript:void(0)");if(a.icon){var f=document.createElement("div");f.classList.add("wdr-svg-icon");f.innerHTML=a.icon;d.appendChild(f)}f=document.createElement("span");this.setText(f,a.title);d.appendChild(f);var m=this,f="function"==typeof a.handler?a.handler:this[a.handler];
this.nullOrUndefined(f)||(d.onclick=function(a,b){return function(){a.call(m,b)}}(f,a.args));this.nullOrUndefined(this[a.onShowHandler])||(d.onmouseover=function(a){return function(){a.call(m)}}(this[a.onShowHandler]));b.onmouseover=function(){m.showDropdown(this)};b.onmouseout=function(){m.hideDropdown(this)};b.appendChild(d);null==a.menu||this.osUtils.isMobile&&!0!=a.collapse||b.appendChild(this.createTabMenu(a.menu));return b};
WebDataRocksToolbar.prototype.showDropdown=function(a){var b=a.querySelectorAll(".wdr-dropdown")[0];b&&(b.style.display="block",b.getBoundingClientRect().right>this.toolbarWrapper.getBoundingClientRect().right&&(b.style.right=0,this.addClass(a,"wdr-align-rigth")))};WebDataRocksToolbar.prototype.hideDropdown=function(a){var b=a.querySelectorAll(".wdr-dropdown")[0];b&&(b.style.display="none",b.style.right=null,this.removeClass(a,"wdr-align-rigth"))};
WebDataRocksToolbar.prototype.createTabMenu=function(a){var b=document.createElement("div");b.className="wdr-dropdown wdr-shadow-container";var d=document.createElement("ul");d.className="wdr-dropdown-content";for(var f=0;f<a.length;f++)this.isDisabled(a[f])||d.appendChild(a[f].divider?this.createMenuDivider():this.createTab(a[f]));b.appendChild(d);return b};WebDataRocksToolbar.prototype.createMenuDivider=function(){var a=document.createElement("li");a.className="wdr-v-divider";return a};
WebDataRocksToolbar.prototype.isDisabled=function(a){return this.nullOrUndefined(a)?!0:!1===a.ios&&this.osUtils.isIOS||!1===a.android&&this.osUtils.isAndroid||!1===a.mobile&&this.osUtils.isMobile};WebDataRocksToolbar.prototype.getElementById=function(a,b){var d=function(a,b){for(var g=0;g<a.childNodes.length;g++){var c=a.childNodes[g];if(c.id==b)return c;c=d(c,b);if(null!=c)return c}return null};return d(b||this.toolbarWrapper,a)};
WebDataRocksToolbar.prototype.osUtils={isIOS:navigator.userAgent.match(/iPhone|iPad|iPod/i)||navigator.platform.match(/iPhone|iPad|iPod/i)?!0:!1,isMac:/Mac/i.test(navigator.platform),isAndroid:navigator.userAgent.match(/Android/i)?!0:!1,isBlackBerry:/BlackBerry/i.test(navigator.platform),isMobile:navigator.userAgent.match(/iPhone|iPad|iPod/i)||navigator.platform.match(/iPhone|iPad|iPod/i)||navigator.userAgent.match(/Android/i)||/BlackBerry/i.test(navigator.platform)};
WebDataRocksToolbar.PopupManager=function(a){this.toolbar=a;this.activePopup=null};WebDataRocksToolbar.PopupManager.prototype.createPopup=function(){return new WebDataRocksToolbar.PopupManager.PopupWindow(this)};
WebDataRocksToolbar.PopupManager.prototype.addPopup=function(a){if(null!=a){this.removePopup();this.modalOverlay=this.createModalOverlay();this.activePopup=a;this.toolbar.toolbarWrapper.appendChild(a);this.toolbar.toolbarWrapper.appendChild(this.modalOverlay);this.addLayoutClasses(a);this.centerPopup(a);var b=this;a.resizeHandler=function(){a&&(b.addLayoutClasses(a),b.centerPopup(a))};window.addEventListener("resize",a.resizeHandler)}};
WebDataRocksToolbar.PopupManager.prototype.addLayoutClasses=function(a){a.classList.remove("wdr-layout-tablet");a.classList.remove("wdr-layout-mobile");a.classList.remove("wdr-layout-mobile-small");var b=this.getBoundingRect(this.toolbar.container);768>b.width&&a.classList.add("wdr-layout-tablet");580>b.width&&a.classList.add("wdr-layout-mobile");460>b.width&&a.classList.add("wdr-layout-mobile-small")};
WebDataRocksToolbar.PopupManager.prototype.centerPopup=function(a){var b=this.getBoundingRect(this.toolbar.container),d=this.getBoundingRect(a),f=this.getBoundingRect(this.toolbar.toolbarWrapper);a.style.zIndex=parseInt(this.modalOverlay.style.zIndex)+1;this.modalOverlay.style.height=b.height+"px";a.style.left=Math.max(0,(f.width-d.width)/2)+"px";a.style.top=Math.max(0,(b.height-d.height)/2)+"px"};
WebDataRocksToolbar.PopupManager.prototype.removePopup=function(a){a=a||this.activePopup;null!=this.modalOverlay&&(this.toolbar.toolbarWrapper.removeChild(this.modalOverlay),this.modalOverlay=null);null!=a&&(this.toolbar.toolbarWrapper.removeChild(a),this.activePopup=null,window.removeEventListener("resize",a.resizeHandler))};
WebDataRocksToolbar.PopupManager.prototype.getBoundingRect=function(a){var b=a.getBoundingClientRect();return{left:b.left,right:b.right,top:b.top,bottom:b.bottom,width:b.width||a.clientWidth,height:b.height||a.clientHeight}};WebDataRocksToolbar.PopupManager.prototype.createModalOverlay=function(){var a=document.createElement("div");a.className="wdr-modal-overlay";a.id="wdr-popUp-modal-overlay";var b=this;a.addEventListener("click",function(a){b.removePopup(b.activePopup)});return a};
WebDataRocksToolbar.PopupManager.PopupWindow=function(a){this.popupManager=a;var b=document.createElement("div");b.className="wdr-panel-content";var d=document.createElement("div");d.className="wdr-title-bar";var f=document.createElement("div");f.className="wdr-title-text";var m=document.createElement("div");m.className="wdr-toolbox";m.style.clear="both";this.content=document.createElement("div");this.content.className="wdr-popup wdr-panel wdr-toolbar-ui wdr-ui";this.content.appendChild(b);b.appendChild(d);
d.appendChild(f);this.setTitle=function(a){WebDataRocksToolbar.prototype.setText(f,a)};this.setContent=function(a){b.insertBefore(a,d.nextSibling)};var g=this;this.setToolbar=function(a,k){m.innerHTML="";for(var l=a.length-1;0<=l;l--){var e=document.createElement("a");e.setAttribute("href","javascript:void(0)");e.className="wdr-ui-btn"+(a[l].isPositive?" wdr-ui-btn-dark":"");a[l].id&&(e.id=a[l].id);WebDataRocksToolbar.prototype.setText(e,a[l].label);e.onclick=function(a){return function(){null!=a&&
a.call();g.popupManager.removePopup()}}(a[l].handler);!0===a[l].disabled?WebDataRocksToolbar.prototype.addClass(e,"wdr-ui-disabled"):WebDataRocksToolbar.prototype.removeClass(e,"wdr-ui-disabled");a[l].isPositive&&(WebDataRocksToolbar.prototype.osUtils.isMac||WebDataRocksToolbar.prototype.osUtils.isIOS)?m.appendChild(e):m.insertBefore(e,m.firstChild)}k?(m.classList.add("wdr-ui-col"),d.appendChild(m),d.classList.add("wdr-ui-row"),f.classList.add("wdr-ui-col")):b.appendChild(m)};this.toolbar=m;this.titleBar=
d;this.title=f;return this};
WebDataRocksToolbar.ColorPicker=function(a,b){function d(a){a=a.target.getAttribute("data-c");h.drawShades(h.colors[a]);h.setColor(a,h.currentType,!0)}function f(a){a=a.target.getAttribute("data-c");h.setColor(a,h.currentType,!0)}function m(a){h.currentType=a;k.classList.remove("wdr-current");l.classList.remove("wdr-current");"bg"==a?(l.classList.add("wdr-current"),h.setColor(h.backgroundColor,a,!1)):(k.classList.add("wdr-current"),h.setColor(h.fontColor,a,!1))}function g(){h.closePopup();h.cancelHandler&&
h.cancelHandler()}this.toolbar=a;this.element=document.createElement("div");this.element.classList.add("wdr-colorpick-wrap");this.element.classList.add("wdr-width40");this.colorPickerButton=document.createElement("div");this.colorPickerButton.classList.add("wdr-colorpick-btn");this.element.appendChild(this.colorPickerButton);this.colorPickerIcon=document.createElement("span");this.colorPickerIcon.classList.add("wdr-icon");this.colorPickerIcon.classList.add("wdr-icon-act_font");this.colorPickerButton.appendChild(this.colorPickerIcon);
this.popup=document.createElement("div");this.popup.classList.add("wdr-colorpick-popup");this.popup.onclick=function(a){a.stopPropagation()};b.appendChild(this.popup);var c=document.createElement("div");c.classList.add("wdr-color-targ-switch");this.popup.appendChild(c);var k=document.createElement("a");k.classList.add("wdr-cts-item");k.classList.add("wdr-current");k.href="javascript:void(0);";k.innerHTML=a.Labels.cp_text;k.onclick=function(){m("font")};c.appendChild(k);var l=document.createElement("a");
l.classList.add("wdr-cts-item");l.innerHTML=a.Labels.cp_highlight;l.href="javascript:void(0);";l.onclick=function(){m("bg")};c.appendChild(l);c=document.createElement("div");c.classList.add("wdr-cp-sett-row");this.popup.appendChild(c);this.colorInput=document.createElement("input");this.colorInput.type="text";this.colorInput.classList.add("wdr-inp");this.colorInput.classList.add("wdr-width140");this.colorInput.classList.add("wdr-tac");this.colorInput.onchange=function(){var a=h.colorInput.value;h.isColor(a)&&
h.setColor(a,h.currentType,!0)};c.appendChild(this.colorInput);this.colorPreview=document.createElement("div");this.colorPreview.classList.add("wdr-cp-curr-color");this.colorPreview.classList.add("wdr-width140");c.appendChild(this.colorPreview);this.mainColors=document.createElement("div");this.mainColors.classList.add("wdr-row-9colors");this.popup.appendChild(this.mainColors);for(var e in this.colors){c=document.createElement("div");c.classList.add("wdr-r9c-item");c.style.backgroundColor=e;c.setAttribute("data-c",
e);c.addEventListener("click",d);this.mainColors.appendChild(c);var n=document.createElement("span");n.classList.add("wdr-cp-currentmark");n.classList.add("wdr-icon");n.classList.add("wdr-icon-act_check");c.appendChild(n);n=document.createElement("span");n.classList.add("wdr-r9c-arrow");n.style.borderTopColor=e;c.appendChild(n)}this.shadeColors=document.createElement("div");this.shadeColors.classList.add("wdr-row-4colors");this.popup.appendChild(this.shadeColors);for(e=0;8>e;e++)c=document.createElement("div"),
c.classList.add("wdr-r4c-item"),c.addEventListener("click",f),this.shadeColors.appendChild(c),n=document.createElement("span"),n.classList.add("wdr-cp-currentmark"),n.classList.add("wdr-icon"),n.classList.add("wdr-icon-act_check"),c.appendChild(n);this.drawShades(this.colors["#000000"]);c=document.createElement("div");c.classList.add("wdr-cp-btns-row");this.popup.appendChild(c);e=document.createElement("a");e.innerHTML=a.Labels.apply;e.classList.add("wdr-ui-btn");e.classList.add("wdr-ui-btn-dark");
e.addEventListener("click",function(){h.closePopup();h.applyHandler&&h.applyHandler()});n=document.createElement("a");n.innerHTML=a.Labels.cancel;n.classList.add("wdr-ui-btn");n.addEventListener("click",g);WebDataRocksToolbar.prototype.osUtils.isMac||WebDataRocksToolbar.prototype.osUtils.isIOS?(c.appendChild(n),c.appendChild(e)):(c.appendChild(e),c.appendChild(n));this.currentType="font";this.colorPickerButton.addEventListener("click",function(a){a.stopPropagation();h.isOpened()?h.closePopup():h.openPopup()});
document.body.addEventListener("click",function(a){g()});var h=this};
WebDataRocksToolbar.ColorPicker.prototype.colors={"#000000":"#000000 #212121 #424242 #616161 #757575 #9E9E9E #BDBDBD #FFFFFF".split(" "),"#F44336":"#D32F2F #E53935 #F44336 #EF5350 #E57373 #EF9A9A #FFCDD2 #FFEBEE".split(" "),"#FF9800":"#F57C00 #FB8C00 #FF9800 #FFA726 #FFB74D #FFCC80 #FFE0B2 #FFF3E0".split(" "),"#FFEB3B":"#FBC02D #FDD835 #FFEB3B #FFEE58 #FFF176 #FFF59D #FFF9C4 #FFFDE7".split(" "),"#8BC34A":"#689F38 #7CB342 #8BC34A #9CCC65 #AED581 #C5E1A5 #DCEDC8 #F1F8E9".split(" "),"#009688":"#00796B #00897B #009688 #26A69A #4DB6AC #80CBC4 #B2DFDB #E0F2F1".split(" "),
"#03A9F4":"#0288D1 #039BE5 #03A9F4 #29B6F6 #4FC3F7 #81D4FA #B3E5FC #E1F5FE".split(" "),"#3F51B5":"#303F9F #3949AB #3F51B5 #5C6BC0 #7986CB #9FA8DA #C5CAE9 #E8EAF6".split(" "),"#9C27B0":"#7B1FA2 #8E24AA #9C27B0 #AB47BC #BA68C8 #CE93D8 #E1BEE7 #F3E5F5".split(" ")};WebDataRocksToolbar.ColorPicker.prototype.isOpened=function(){return this.popup.parentElement&&this.popup.parentElement.classList.contains("wdr-popup-opened")};
WebDataRocksToolbar.ColorPicker.prototype.drawShades=function(a){if(a)for(var b=this.shadeColors.children,d=0;d<b.length;d++){var f=b[d];f.setAttribute("data-c",a[d]);f.style.backgroundColor=a[d];f.style.borderRight="#FFFFFF"==a[d]?"1px solid #d5d5d5":"none";f.style.borderBottom="#FFFFFF"==a[d]?"1px solid #d5d5d5":"none"}};
WebDataRocksToolbar.ColorPicker.prototype.setColor=function(a,b,d){"string"===typeof a&&0==a.indexOf("0x")&&(a="#"+a.substr(2));"bg"==b?(this.backgroundColor=a,this.colorPickerButton.style.backgroundColor=a):(this.fontColor=a,this.colorPickerIcon.style.color=a);this.colorInput.value=a;this.colorPreview.style.backgroundColor=a;this.drawSelected();d&&this.changeHandler&&this.changeHandler()};
WebDataRocksToolbar.ColorPicker.prototype.drawSelected=function(){var a="bg"==this.currentType?this.backgroundColor:this.fontColor,b=this.findMain(a);this.drawShades(this.colors[b]);for(var d=this.mainColors.children,f=0;f<d.length;f++)d[f].classList.remove("wdr-current");(b=this.mainColors.querySelector("[data-c='"+b+"']"))&&b.classList.add("wdr-current");d=this.shadeColors.children;for(f=0;f<d.length;f++)d[f].classList.remove("wdr-current");(a=this.shadeColors.querySelector("[data-c='"+a+"']"))&&
a.classList.add("wdr-current")};WebDataRocksToolbar.ColorPicker.prototype.findMain=function(a){"string"===typeof a&&0==a.indexOf("0x")&&(a="#"+a.substr(2));for(var b in this.colors)if(0<=this.colors[b].indexOf(a))return b};WebDataRocksToolbar.ColorPicker.prototype.isColor=function(a){return a.match(/^#?[0-9A-Fa-f]{6}$/g)};WebDataRocksToolbar.ColorPicker.prototype.closePopup=function(){this.popup.parentElement&&this.popup.parentElement.classList.remove("wdr-popup-opened")};
WebDataRocksToolbar.ColorPicker.prototype.openPopup=function(){for(var a=this.toolbar.toolbarWrapper.querySelectorAll(".wdr-colorpick-popup"),b=0;b<a.length;b++)a[b].parentElement.classList.remove("wdr-popup-opened");this.popup.parentElement&&(a=this.toolbar.toolbarWrapper.querySelector("#wdr-popup-conditional .wdr-panel-content"),b=this.getWhere(this.colorPickerButton,a),0>this.getWhere(this.colorPickerButton,document.body).top-this.popup.clientHeight?(this.popup.classList.remove("wdr-arrow-down"),
this.popup.classList.add("wdr-arrow-up"),this.popup.style.top=this.colorPickerButton.clientHeight+b.top+11+"px",this.popup.style.bottom=""):(this.popup.classList.add("wdr-arrow-down"),this.popup.classList.remove("wdr-arrow-up"),this.popup.style.bottom=a.clientHeight-b.top+5+"px",this.popup.style.top=""),this.popup.style.left=b.left+this.colorPickerButton.clientWidth/2+2+"px",this.popup.parentElement.classList.add("wdr-popup-opened"))};
WebDataRocksToolbar.ColorPicker.prototype.getWhere=function(a,b){var d=0,f=0,m=0,g=0;if(a.offsetParent){for(var d=a.offsetLeft,f=a.offsetTop,c=a;(c=c.parentNode)&&c!=b;)m=c.scrollTop?c.scrollTop:0,g=0,d-=g,f-=m;for(;(a=a.offsetParent)&&a!=b;)d+=a.offsetLeft,f+=a.offsetTop}return{top:f+0,left:d+0}};
+388
View File
@@ -0,0 +1,388 @@
{
"fieldsList": {
"flatHierarchyBox": "选择和重排列",
"hierarchyBox": "拖拽大小",
"filterBox": "删除并重排报表筛选",
"rowBox": "删除并重排行",
"columnBox": "删除并重排列",
"measureBox": "删除并重排值",
"values": "值",
"addCalculatedMeasure": "增加计算值",
"expandAll": "展开所有",
"collapseAll": "折叠所有",
"formulasGroupName": "计算后的值",
"allFields": "所有字段",
"rows": "行",
"columns": "列",
"filters": "报表筛选",
"dropField": "从这里移除字段",
"title": "字段",
"subtitle": "拖拽和移除字段来重排"
},
"filter": {
"all": "所有",
"multipleItems": "多项",
"selectAll": "选择所有",
"selectAllResults": "选择所有结果",
"top": "顶部",
"bottom": "底部",
"ascSort": "A-Z升序",
"descSort": "Z-A降序",
"topX": "前10",
"clearTopX": "清除",
"measuresPrompt": "选择值",
"search": "搜索",
"amountSelected": "{1}中已选择{0}项",
"amountFound": "{1}中发现{0}项已选择",
"sort": "排序:",
"addGroup": "增加组",
"groupName": "组1",
"ungroup": "取消组"
},
"drillThrough": {
"title": "详情",
"row": "行: <b>{0}</b>",
"column": "列: <b>{0}</b>",
"value": "{0}: <b>{1}</b>"
},
"calculatedView": {
"title": "已计算值",
"measureBox": "拖拽值到公式",
"measureName": "值名称",
"formula": "公式",
"formulaPrompt": "拖拽值并在此编辑公式",
"calculateIndividualValues": "计算自定义值",
"removeValue": "移除",
"removeValueTitle": "移除 {0}?",
"removeValueMessage": "您确定要移除该已计算值吗?",
"header": "增加已计算值",
"allValues": "所有值"
},
"grid": {
"total": "小计",
"totals": "合计",
"grandTotal": "总计",
"blankMember": "(空)",
"dateInvalidCaption": "无效日期",
"reportInformation": "模板信息"
},
"tooltips": {
"row": "行:",
"column": "列:",
"headerResize": "拖拽调整",
"headerFit": "双击适应",
"filterIcon": "单击筛选",
"filtered": "已筛选",
"expandIcon": "单击展开",
"collapseIcon": "单击折叠",
"drillDown": "单击向下钻取",
"drillUp": "单击向上钻取",
"sortIcon": "单击降序",
"sortedDescIcon": "单击升序",
"sortedAscIcon": "单击降序",
"close": "单击关闭"
},
"aggregations": {
"sum": {
"caption": "求和",
"totalCaption": "{0}求和",
"grandTotalCaption": "{0}求和总计"
},
"count": {
"caption": "计数",
"totalCaption": "{0}计数",
"grandTotalCaption": "{0}计数总计"
},
"distinctCount": {
"caption": "计数(去重)",
"totalCaption": "{0}计数(去重)",
"grandTotalCaption": "{0}计数(去重)总计"
},
"difference": {
"caption": "差值",
"totalCaption": "{0}差值",
"grandTotalCaption": "{0}差值总计"
},
"percentDifference": {
"caption": "%差值",
"totalCaption": "{0}%差值",
"grandTotalCaption": "{0}%差值总计"
},
"average": {
"caption": "平均值",
"totalCaption": "{0}平均值",
"grandTotalCaption": "{0}平均值总计"
},
"product": {
"caption": "乘积",
"totalCaption": "{0}乘积",
"grandTotalCaption": "{0}乘积总计"
},
"min": {
"caption": "最小值",
"totalCaption": "{0}最小值",
"grandTotalCaption": "{0}最小值总计"
},
"max": {
"caption": "最大值",
"totalCaption": "{0}最大值",
"grandTotalCaption": "{0}最大值总计"
},
"percent": {
"caption": "总计(%)",
"totalCaption": "{0}总计(%)",
"grandTotalCaption": "{0}总计(%)和"
},
"percentOfColumn": {
"caption": "列(%)",
"totalCaption": "{0}列(%)",
"grandTotalCaption": "{0}列(%)总计"
},
"percentOfRow": {
"caption": "行(%)",
"totalCaption": "{0}行(%)",
"grandTotalCaption": "{0}行(%)总计"
},
"index": {
"caption": "指数",
"totalCaption": "{0}指数",
"grandTotalCaption": "{0}指数总计"
},
"none": {
"caption": "不计算"
}
},
"messages": {
"error": "错误!",
"warning": "警告!",
"limitation": "有限制!",
"browse": "浏览",
"confirmation": "确认",
"reportFileType": "Flexmonster模板文件",
"loading": "正在加载...",
"loadingConfiguration": "",
"loadingData": "正在加载数据...",
"waiting": "响应中请等待{0}秒.",
"progress": "{0}K",
"progressUnknown": "已加载{0}K",
"analyzing": "分析数据中...",
"analyzingProgress": "{0} records of {1} ({2}%)",
"analyzingRecords": "{0}% 记录",
"saving": "保存中...",
"loadingDimensions": "维度加载中...",
"loadingHierarchies": "层级加载中...",
"loadingMeasures": "度量加载中...",
"loadingKPIs": "KPI加载中...",
"loadingMembers": "成员加载中...",
"loadingLevels": "等级加载中...",
"loadingProperties": "属性加载中...",
"fullscreen": "在全屏模式下打开报表?",
"exportComplete": "导出数据已创建,请单击\"保存\"按钮保存数据.",
"exportProgress": "导出正在处理中...",
"exportError": "导出失败,发生意外错误.",
"generatingPDF": "正在生成PDF",
"pleaseWait": "请稍等.",
"pagesWereGenerated": "页面已生成.",
"uploading": "上传中...",
"cantSaveFile": "不能保存文件.",
"cantSaveToClipboard": "错误:无法写入剪切板.",
"saveReportToFile": "模板已准备保存到文件,请单击\"保存\"按钮保存模板.",
"loadReportFromFile": "选择模板文件加载.",
"inputNewName": "输入新名称",
"inputReportName": "输入新模板名称",
"invalidDataSource": "无效的数据源或目录.请检查. <br/><br/><u><a href='https://www.flexmonster.com/doc/typical-errors/#invalid-datasource' target='_blank'>阅读关于这个错误的更多信息</a></u>",
"dataStreamError": "加载'{0}'时发生数据流错误.<br/><br/><u><a href='https://www.flexmonster.com/doc/typical-errors/#stream-error' target='_blank'>阅读关于这个错误的更多信息</a></u>",
"unableToOpenFile": "不能打开文件:{0}.<br/><br/>似乎这个文件不存在或资源中缺少'Access-Control-Allow-Origin'请求头.<br/><br/><u><a href='https://www.flexmonster.com/doc/typical-errors/#unable-to-open-file' target='_blank'>阅读关于这个错误的更多信息</a></u>",
"unableTwoFileBrowsingSessions": "浏览文件的面板已打开.",
"inappropriateFileFormat": "数据文件格式不匹配.",
"invalidJSONdata": "JSON数据无效.",
"wrongFormulaFormat": "错误的公式格式,请检查.",
"excelCsvChartsExportError": "图表无法导出到Microsoft Excel或CSV.",
"excelPdfExportLimitation": "当前版本无法导出到Microsoft Excel或PDF.",
"excelExportLimitation": "当前版本无法导出.",
"noDataAvailable": "数据源为空,请检查CSV文件.",
"saveDataToFile": "数据已准备保存到文件,请单击\"保存\"按钮保存文件.",
"dataWasUpdated": "数据源已在服务器上更新。要刷新模板吗?",
"ocsvIncompatible": "不能读取数据源.似乎OCSV文件使用新版本压缩过,请更正{0}或更新的版本的组件.",
"unknownError": "发生未知错误.",
"invalidReportFormat": "无效的模板格式或文件拒绝访问.",
"csvHeaderParsingError": "CSV页眉解析错误.",
"tooManyColumnsInClassicMode": "经典方式下列太多.请把视图切换到简洁方式.",
"cantExpand": "有些字段无法展开.请缩小数据范围.",
"cantExpandTitle": "数据集太大."
},
"buttons": {
"ok": "好",
"apply": "应用",
"cancel": "取消",
"save": "保存",
"clear": "清除",
"select": "选择",
"yes": "是",
"no": "否"
},
"contextMenu": {
"clearSorting": "清除排序",
"collapse": "折叠",
"drillThrough": "钻取",
"expand": "展开",
"openFilter": "打开筛选",
"sortColumnAsc": "列升序",
"sortColumnDesc": "列降序",
"sortRowAsc": "行升序",
"sortRowDesc": "行降序"
},
"date": {
"year": "年",
"quarter": "季",
"month": "月",
"day": "天"
},
"quarters": {
"q1": "一季度",
"q2": "二季度",
"q3": "三季度",
"q4": "四季度"
},
"months": {
"january": "一月",
"february": "二月",
"march": "三月",
"april": "四月",
"may": "五月",
"june": "六月",
"july": "七月",
"august": "八月",
"september": "九月",
"october": "十月",
"november": "十一月",
"december": "十二月"
},
"monthsShort": {
"january": "Jan",
"february": "Feb",
"march": "Mar",
"april": "Apr",
"may": "May",
"june": "Jun",
"july": "Jul",
"august": "Aug",
"september": "Sep",
"october": "Oct",
"november": "Nov",
"december": "Dec"
},
"weekdays": {
"first": "周日",
"second": "周一",
"third": "周二",
"fourth": "周三",
"fifth": "周四",
"sixth": "周五",
"seventh": "周六"
},
"weekdaysShort": {
"first": "Sun",
"second": "Mon",
"third": "Tue",
"fourth": "Wed",
"fifth": "Thu",
"sixth": "Fri",
"seventh": "Sat"
},
"toolbar": {
"connect": "连接",
"connect_local_csv": "连接本地CSV文件",
"connect_local_ocsv": "连接本地OCSV文件",
"connect_local_json": "连接本地JSON文件",
"connect_remote_csv": "连接远程CSV文件",
"connect_remote_csv_mobile": "CSV",
"connect_remote_json": "连接远程JSON文件",
"connect_remote_json_mobile": "JSON",
"open": "打开",
"local_report": "本地模板",
"remote_report": "远程模板",
"remote_report_mobile": "模板",
"save": "保存",
"save_json": null,
"load_json": "JSON模板",
"grid": "网格",
"grid_flat": "扁平",
"grid_classic": "经典",
"grid_compact": "简洁",
"format": "格式化",
"format_cells": "格式化单元格",
"format_cells_mobile": "格式化",
"conditional_formatting": "条件格式化",
"conditional_formatting_mobile": "条件",
"options": "选项",
"fullscreen": "全屏显示",
"minimize": "最小化",
"export": "导出",
"export_print": "打印",
"export_html": "按HTML导出",
"export_excel": "按Excel导出",
"export_pdf": "按PDF导出",
"fields": "字段",
"ok": "好",
"apply": "应用",
"done": "完成",
"cancel": "取消",
"value": "值",
"delete": "删除",
"if": "如果",
"then": "那么",
"open_remote_csv": "打开远程CSV文件",
"open_remote_json": "打开远程JSON文件",
"csv": "CSV",
"open_remote_report": "打开远程模板",
"choose_value": "选择值",
"text_align": "文字居中",
"align_left": "居左",
"align_right": "居右",
"none": "不设置",
"space": "(空格)",
"thousand_separator": "千位分隔符",
"decimal_separator": "小数分隔符",
"decimal_places": "小数位数",
"currency_symbol": "货币符号",
"currency_align": "货币对齐",
"null_value": "空值",
"is_percent": "百分比格式",
"true_value": "是",
"false_value": "否",
"conditional": "条件",
"add_condition": "增加条件",
"less_than": "小于",
"less_than_or_equal": "小于等于",
"greater_than": "大于",
"greater_than_or_equal": "大于等于",
"equal_to": "等于",
"not_equal_to": "不等于",
"between": "介于两者之间",
"is_empty": "空值",
"all_values": "所有值",
"and": "和",
"and_symbole": "&",
"cp_text": "文本",
"cp_highlight": "高亮",
"layout_options": "布局项",
"layout": "布局",
"compact_view": "简洁方式",
"classic_view": "经典方式",
"flat_view": "扁平方式",
"grand_totals": "总计",
"grand_totals_off": "不显示总计",
"grand_totals_on": "显示总计",
"grand_totals_on_rows": "仅在行显示总计",
"grand_totals_on_columns": "仅在列显示总计",
"subtotals": "小计",
"subtotals_off": "不显示小计",
"subtotals_on": "显示小计",
"subtotals_on_rows": "仅在行显示小计",
"subtotals_on_columns": "仅在列显示小计",
"choose_page_orientation": "选择页面方向",
"landscape": "横向",
"portrait": "纵向"
}
}
+33
View File
@@ -0,0 +1,33 @@
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;}
body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #f0f6e4 \9;}
h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, sans-serif;padding-bottom: 5px;}
h1 {font-size: 24px;line-height: 34px;text-align: center;}
h2 {font-size: 14px;line-height: 24px;padding-top: 5px;}
h6 {font-weight: normal;font-size: 12px;letter-spacing: 1px;line-height: 24px;text-align: center;}
a {color:#3C6E31;text-decoration: underline;}
a:hover {background-color:#3C6E31;color:white;}
input.radio {margin: 0 2px 0 8px;}
input.radio.first {margin-left:0;}
input.empty {color: lightgray;}
code {color: #2f332a;}
.highlight_red {color:#A60000;}
.highlight_green {color:#A7F43D;}
li {list-style: circle;font-size: 12px;}
li.title {list-style: none;}
ul.list {margin-left: 17px;}
div.content_wrap {width: 600px;height:380px;}
div.content_wrap div.left{float: left;width: 250px;}
div.content_wrap div.right{float: right;width: 340px;}
div.zTreeDemoBackground {width:250px;height:362px;text-align:left;}
ul.ztree {margin-top: 10px;border: 1px solid #617775;background: #f0f6e4;width:220px;height:360px;overflow-y:scroll;overflow-x:auto;}
ul.log {border: 1px solid #617775;background: #f0f6e4;width:300px;height:170px;overflow: hidden;}
ul.log.small {height:45px;}
ul.log li {color: #666666;list-style: none;padding-left: 10px;}
ul.log li.dark {background-color: #E3E3E3;}
/* ruler */
div.ruler {height:20px; width:220px; background-color:#f0f6e4;border: 1px solid #333; margin-bottom: 5px; cursor: pointer}
div.ruler div.cursor {height:20px; width:30px; background-color:#3C6E31; color:white; text-align: right; padding-right: 5px; cursor: pointer}
Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@@ -0,0 +1,97 @@
/*-------------------------------------
zTree Style
version: 3.2
author: Hunter.z
email: hunter.z@263.net
website: http://code.google.com/p/jquerytree/
-------------------------------------*/
.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
.ztree {margin:0; padding:5px; color:#333}
.ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap; outline:0}
.ztree li ul{ margin:0; padding:0 0 0 18px}
.ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;}
.ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; height:17px; color:#333; background-color: transparent;
text-decoration:none; vertical-align:top; display: inline-block}
.ztree li a:hover {text-decoration:underline}
.ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid;
opacity:0.8; filter:alpha(opacity=80)}
.ztree li a.tmpTargetNode_prev {}
.ztree li a.tmpTargetNode_next {}
.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
font-size:12px; border:1px #7EC4CC solid; *border:0px}
.ztree li span {line-height:16px; margin-right:2px}
.ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle;
border:0 none; cursor: pointer;outline:none;
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
.ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto}
.ztree li span.button.chk.checkbox_false_full {background-position:0 0}
.ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px}
.ztree li span.button.chk.checkbox_false_part {background-position:0 -28px}
.ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px}
.ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px}
.ztree li span.button.chk.checkbox_true_full {background-position:-14px 0}
.ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px}
.ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px}
.ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px}
.ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px}
.ztree li span.button.chk.radio_false_full {background-position:-28px 0}
.ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px}
.ztree li span.button.chk.radio_false_part {background-position:-28px -28px}
.ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px}
.ztree li span.button.chk.radio_false_disable {background-position:-28px -56px}
.ztree li span.button.chk.radio_true_full {background-position:-42px 0}
.ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px}
.ztree li span.button.chk.radio_true_part {background-position:-42px -28px}
.ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px}
.ztree li span.button.chk.radio_true_disable {background-position:-42px -56px}
.ztree li span.button.switch {width:18px; height:18px}
.ztree li span.button.root_open{background-position:-92px -54px}
.ztree li span.button.root_close{background-position:-74px -54px}
.ztree li span.button.roots_open{background-position:-92px 0}
.ztree li span.button.roots_close{background-position:-74px 0}
.ztree li span.button.center_open{background-position:-92px -18px}
.ztree li span.button.center_close{background-position:-74px -18px}
.ztree li span.button.bottom_open{background-position:-92px -36px}
.ztree li span.button.bottom_close{background-position:-74px -36px}
.ztree li span.button.noline_open{background-position:-92px -72px}
.ztree li span.button.noline_close{background-position:-74px -72px}
.ztree li span.button.root_docu{ background:none;}
.ztree li span.button.roots_docu{background-position:-56px 0}
.ztree li span.button.center_docu{background-position:-56px -18px}
.ztree li span.button.bottom_docu{background-position:-56px -36px}
.ztree li span.button.noline_docu{ background:none;}
.ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
/* level style*/
/*.ztree li span.button.level0 {
display:none;
}
.ztree li ul.level0 {
padding:0;
background:none;
}*/
File diff suppressed because it is too large Load Diff
+59
View File
@@ -0,0 +1,59 @@
/*
* JQuery zTree core 3.0 beta
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2011-09-01
*/
(function(l){var D,E,F,G,H,I,o=[],J=[],q=[],M=0,K={treeId:"",treeObj:null,view:{autoCancelSelected:!0,showLine:!0,showIcon:!0,showTitle:!0,selectedMulti:!0,expandSpeed:"fast",addDiyDom:null,dblClickExpand:!0,fontCss:{}},data:{key:{name:"name",childs:"childs",title:"name"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,type:"post",dataType:"text",url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeRightClick:null,
beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null}},r=[function(b){var a=b.treeObj,c=f.event;a.unbind(c.NODECREATED);a.bind(c.NODECREATED,function(a,c,g){k.apply(b.callback.onNodeCreated,[a,c,g])});a.unbind(c.CLICK);a.bind(c.CLICK,function(a,c,g,i){k.apply(b.callback.onClick,[a,c,g,i])});a.unbind(c.EXPAND);a.bind(c.EXPAND,
function(a,c,g){k.apply(b.callback.onExpand,[a,c,g])});a.unbind(c.COLLAPSE);a.bind(c.COLLAPSE,function(a,c,g){k.apply(b.callback.onCollapse,[a,c,g])});a.unbind(c.ASYNC_SUCCESS);a.bind(c.ASYNC_SUCCESS,function(a,c,g,i){k.apply(b.callback.onAsyncSuccess,[a,c,g,i])});a.unbind(c.ASYNC_ERROR);a.bind(c.ASYNC_ERROR,function(a,c,g,i,h,f){k.apply(b.callback.onAsyncError,[a,c,g,i,h,f])})}],p=[function(b){var a=h.getCache(b);a||(a={},h.setCache(b,a));a.nodes=[];a.doms=[]}],v=[function(b,a,c,d,e,g){if(c){var i=
b.data.key.childs;c.level=a;c.tId=b.treeId+"_"+ ++M;c.parentTId=d?d.tId:null;if(c[i]&&c[i].length>0){if(typeof c.open=="string")c.open=k.eqs(c.open,"true");c.open=!!c.open;c.isParent=!0}else{c.open=!1;if(typeof c.isParent=="string")c.isParent=k.eqs(c.isParent,"true");c.isParent=!!c.isParent}c.isFirstNode=e;c.isLastNode=g;c.getParentNode=function(){return h.getNodeCache(b,c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b,c)};c.isAjaxing=
!1;h.fixPIdKeyValue(b,c)}}],w=[function(b){var a=b.target,c=o[b.data.treeId],d="",e=null,g="",i="",j=null,l=null,m=null;if(k.eqs(b.type,"mousedown"))i="mousedown";else if(k.eqs(b.type,"mouseup"))i="mouseup";else if(k.eqs(b.type,"contextmenu"))i="contextmenu";else if(k.eqs(b.type,"click"))if(k.eqs(a.tagName,"button")&&a.blur(),k.eqs(a.tagName,"button")&&a.getAttribute("treeNode"+f.id.SWITCH)!==null)d=a.parentNode.id,g="switchNode";else{if(m=k.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+f.id.A}]))d=
m.parentNode.id,g="clickNode"}else if(k.eqs(b.type,"dblclick")&&(i="dblclick",m=k.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+f.id.A}])))d=m.parentNode.id,g="switchNode";if(i.length>0&&d.length==0&&(m=k.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+f.id.A}])))d=m.parentNode.id;if(d.length>0)switch(e=h.getNodeCache(c,d),g){case "switchNode":k.eqs(b.type,"click")||k.eqs(b.type,"dblclick")&&k.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand)?j=D:g="";break;case "clickNode":j=E}switch(i){case "mousedown":l=
F;break;case "mouseup":l=G;break;case "dblclick":l=H;break;case "contextmenu":l=I}return{stop:!1,node:e,nodeEventType:g,nodeEventCallback:j,treeEventType:i,treeEventCallback:l}}],x=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a.childs=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[]}],y=[],z=[],A=[],B=[],C=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[a.tId]=a},addAfterA:function(b){z.push(b)},addBeforeA:function(b){y.push(b)},addInnerAfterA:function(b){B.push(b)},
addInnerBeforeA:function(b){A.push(b)},addInitBind:function(b){r.push(b)},addInitCache:function(b){p.push(b)},addInitNode:function(b){v.push(b)},addInitProxy:function(b){w.push(b)},addInitRoot:function(b){x.push(b)},addNodesData:function(b,a,c){var d=b.data.key.childs;a[d]||(a[d]=[]);if(a[d].length>0)a[d][a[d].length-1].isLastNode=!1,j.setNodeLineIcos(b,a[d][a[d].length-1]);a.isParent=!0;a[d]=a[d].concat(c)},addSelectedNode:function(b,a){var c=h.getRoot(b);h.isSelectedNode(b,a)||c.curSelectedList.push(a)},
addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){C.push(b)},exSetting:function(b){l.extend(!0,K,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]=a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=0,e=z.length;d<e;d++)z[d].apply(this,arguments)},getBeforeA:function(b,a,c){for(var d=0,e=y.length;d<e;d++)y[d].apply(this,
arguments)},getInnerAfterA:function(b,a,c){for(var d=0,e=B.length;d<e;d++)B[d].apply(this,arguments)},getInnerBeforeA:function(b,a,c){for(var d=0,e=A.length;d<e;d++)A[d].apply(this,arguments)},getCache:function(b){return q[b.treeId]},getNextNode:function(b,a){if(!a)return null;var c=b.data.key.childs,d=a.parentTId?a.getParentNode():h.getRoot(b);if(!a.isLastNode)if(a.isFirstNode)return d[c][1];else for(var e=1,g=d[c].length-1;e<g;e++)if(d[c][e]===a)return d[c][e+1];return null},getNodeByParam:function(b,
a,c,d){if(!a||!c)return null;for(var e=b.data.key.childs,g=0,i=a.length;g<i;g++){if(a[g][c]==d)return a[g];var f=h.getNodeByParam(b,a[g][e],c,d);if(f)return f}return null},getNodeCache:function(b,a){if(!a)return null;var c=q[b.treeId].nodes[a];return c?c:null},getNodes:function(b){return h.getRoot(b)[b.data.key.childs]},getNodesByParam:function(b,a,c,d){if(!a||!c)return[];for(var e=b.data.key.childs,g=[],i=0,f=a.length;i<f;i++)a[i][c]==d&&g.push(a[i]),g=g.concat(h.getNodesByParam(b,a[i][e],c,d));
return g},getNodesByParamFuzzy:function(b,a,c,d){if(!a||!c)return[];for(var e=b.data.key.childs,g=[],i=0,f=a.length;i<f;i++)typeof a[i][c]=="string"&&a[i][c].indexOf(d)>-1&&g.push(a[i]),g=g.concat(h.getNodesByParamFuzzy(b,a[i][e],c,d));return g},getPreNode:function(b,a){if(!a)return null;var c=b.data.key.childs,d=a.parentTId?a.getParentNode():h.getRoot(b);if(!a.isFirstNode)if(a.isLastNode)return d[c][d[c].length-2];else for(var e=1,g=d[c].length-1;e<g;e++)if(d[c][e]===a)return d[c][e-1];return null},
getRoot:function(b){return b?J[b.treeId]:null},getSetting:function(b){return o[b]},getSettings:function(){return o},getZTreeTools:function(b){return(b=this.getRoot(this.getSetting(b)))?b.treeTools:null},initCache:function(b){for(var a=0,c=p.length;a<c;a++)p[a].apply(this,arguments)},initNode:function(b,a,c,d,e,g){for(var i=0,f=v.length;i<f;i++)v[i].apply(this,arguments)},initRoot:function(b){for(var a=0,c=x.length;a<c;a++)x[a].apply(this,arguments)},isSelectedNode:function(b,a){for(var c=h.getRoot(b),
d=0,e=c.curSelectedList.length;d<e;d++)if(a===c.curSelectedList[d])return!0;return!1},removeNodeCache:function(b,a){var c=b.data.key.childs;if(a[c])for(var d=0,e=a[c].length;d<e;d++)arguments.callee(b,a[c][d]);delete h.getCache(b).nodes[a.tId]},removeSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,e=c.curSelectedList.length;d<e;d++)if(a===c.curSelectedList[d]||!h.getNodeCache(b,c.curSelectedList[d].tId))c.curSelectedList.splice(d,1),d--,e--},setCache:function(b,a){q[b.treeId]=a},setRoot:function(b,
a){J[b.treeId]=a},setZTreeTools:function(b,a){for(var c=0,d=C.length;c<d;c++)C[c].apply(this,arguments)},transformToArrayFormat:function(b,a){if(!a)return[];var c=b.data.key.childs,d=[];if(k.isArray(a))for(var e=0,g=a.length;e<g;e++)d.push(a[e]),a[e][c]&&(d=d.concat(h.transformToArrayFormat(b,a[e][c])));else d.push(a),a[c]&&(d=d.concat(h.transformToArrayFormat(b,a[c])));return d},transformTozTreeFormat:function(b,a){var c,d,e=b.data.simpleData.idKey,g=b.data.simpleData.pIdKey,i=b.data.key.childs;
if(!e||e==""||!a)return[];if(k.isArray(a)){var f=[],h=[];for(c=0,d=a.length;c<d;c++)h[a[c][e]]=a[c];for(c=0,d=a.length;c<d;c++)h[a[c][g]]?(h[a[c][g]][i]||(h[a[c][g]][i]=[]),h[a[c][g]][i].push(a[c])):f.push(a[c]);return f}else return[a]}},m={bindEvent:function(b){for(var a=0,c=r.length;a<c;a++)r[a].apply(this,arguments)},bindTree:function(b){var a={treeId:b.treeId},b=b.treeObj;b.unbind("click",m.proxy);b.bind("click",a,m.proxy);b.unbind("dblclick",m.proxy);b.bind("dblclick",a,m.proxy);b.unbind("mouseover",
m.proxy);b.bind("mouseover",a,m.proxy);b.unbind("mouseout",m.proxy);b.bind("mouseout",a,m.proxy);b.unbind("mousedown",m.proxy);b.bind("mousedown",a,m.proxy);b.unbind("mouseup",m.proxy);b.bind("mouseup",a,m.proxy);b.unbind("contextmenu",m.proxy);b.bind("contextmenu",a,m.proxy)},doProxy:function(b){for(var a=[],c=0,d=w.length;c<d;c++){var e=w[c].apply(this,arguments);a.push(e);if(e.stop)break}return a},proxy:function(b){var a=h.getSetting(b.data.treeId);if(!k.uCanDo(a,b))return!0;for(var c=m.doProxy(b),
d=!0,e=!1,g=0,i=c.length;g<i;g++){var f=c[g];f.nodeEventCallback&&(e=!0,d=f.nodeEventCallback.apply(f,[b,f.node])&&d);f.treeEventCallback&&(e=!0,d=f.treeEventCallback.apply(f,[b,f.node])&&d)}e&&k.noSel(a);return d}};D=function(b,a){var c=o[b.data.treeId];if(a.open){if(k.apply(c.callback.beforeCollapse,[c.treeId,a],!0)==!1)return!0}else if(k.apply(c.callback.beforeExpand,[c.treeId,a],!0)==!1)return!0;h.getRoot(c).expandTriggerFlag=!0;j.switchNode(c,a);return!0};E=function(b,a){var c=o[b.data.treeId],
d=c.view.autoCancelSelected&&b.ctrlKey&&h.isSelectedNode(c,a)?0:c.view.autoCancelSelected&&b.ctrlKey&&c.view.selectedMulti?2:1;if(k.apply(c.callback.beforeClick,[c.treeId,a,d],!0)==!1)return!0;d===0?j.cancelPreSelectedNode(c,a):j.selectNode(c,a,d===2);c.treeObj.trigger(f.event.CLICK,[c.treeId,a,d]);return!0};F=function(b,a){var c=o[b.data.treeId];k.apply(c.callback.beforeMouseDown,[c.treeId,a],!0)&&k.apply(c.callback.onMouseDown,[b,c.treeId,a]);return!0};G=function(b,a){var c=o[b.data.treeId];k.apply(c.callback.beforeMouseUp,
[c.treeId,a],!0)&&k.apply(c.callback.onMouseUp,[b,c.treeId,a]);return!0};H=function(b,a){var c=o[b.data.treeId];k.apply(c.callback.beforeDblClick,[c.treeId,a],!0)&&k.apply(c.callback.onDblClick,[b,c.treeId,a]);return!0};I=function(b,a){var c=o[b.data.treeId];k.apply(c.callback.beforeRightClick,[c.treeId,a],!0)&&k.apply(c.callback.onRightClick,[b,c.treeId,a]);return typeof c.callback.onRightClick!="function"};var k={apply:function(b,a,c){return typeof b=="function"?b.apply(L,a):c},clone:function(b){var a;
if(b instanceof Array){a=[];for(var c=b.length;c--;)a[c]=arguments.callee(b[c]);return a}else if(typeof b=="function")return b;else if(b instanceof Object){a={};for(c in b)a[c]=arguments.callee(b[c]);return a}else return b},eqs:function(b,a){return b.toLowerCase()===a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)==="[object Array]"},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,e=c.length;a.tagName&&d<e;d++)if(k.eqs(a.tagName,c[d].tagName)&&
a.getAttribute(c[d].attrName)!==null)return a;a=a.parentNode}return null},noSel:function(b){if(h.getRoot(b).noSelection)try{window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()}catch(a){}},uCanDo:function(){return!0}},j={addNodes:function(b,a,c,d){if(!b.data.keep.leaf||!a||a.isParent)if(k.isArray(c)||(c=[c]),b.data.simpleData.enable&&(c=h.transformTozTreeFormat(b,c)),a){var e=l("#"+a.tId+f.id.SWITCH),g=l("#"+a.tId+f.id.ICON),i=l("#"+a.tId+f.id.UL);if(!a.open)j.replaceSwitchClass(e,
f.folder.CLOSE),j.replaceIcoClass(a,g,f.folder.CLOSE),a.open=!1,i.css({display:"none"});h.addNodesData(b,a,c);j.createNodes(b,a.level+1,c,a);d||j.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c),j.createNodes(b,0,c,null)},appendNodes:function(b,a,c,d,e,g){if(!c)return[];for(var i=[],l=b.data.key.childs,m=b.data.key.name,o=b.data.key.title,s=0,N=c.length;s<N;s++){var n=c[s],u=(d?d:h.getRoot(b))[l].length==c.length&&s==0,t=s==c.length-1;e&&(h.initNode(b,a,n,d,u,t,g),h.addNodeCache(b,
n));u=[];n[l]&&n[l].length>0&&(u=j.appendNodes(b,a+1,n[l],n,e,g&&n.open));if(g){var t=j.makeNodeUrl(b,n),q=j.makeNodeFontCss(b,n),r=[],p;for(p in q)r.push(p,":",q[p],";");i.push("<li id='",n.tId,"' class='level",n.level,"' treenode>","<button type='button' id='",n.tId,f.id.SWITCH,"' title='' class='",j.makeNodeLineClass(b,n),"' treeNode",f.id.SWITCH,"></button>");h.getBeforeA(b,n,i);i.push("<a id='",n.tId,f.id.A,"' class='level",n.level,"' treeNode",f.id.A,' onclick="',n.click||"",'" ',t!=null&&t.length>
0?"href='"+t+"'":""," target='",j.makeNodeTarget(n),"' style='",r.join(""),"'");k.apply(b.view.showTitle,[b.treeId,n],b.view.showTitle)&&i.push("title='",n[o].replace(/'/g,"&#39;"),"'");i.push(">");h.getInnerBeforeA(b,n,i);i.push("<button type='button' id='",n.tId,f.id.ICON,"' title='' treeNode",f.id.ICON," class='",j.makeNodeIcoClass(b,n),"' style='",j.makeNodeIcoStyle(b,n),"'></button><span id='",n.tId,f.id.SPAN,"'>",n[m].replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"</span>");
h.getInnerAfterA(b,n,i);i.push("</a>");h.getAfterA(b,n,i);n.isParent&&n.open&&j.makeUlHtml(b,n,i,u.join(""));i.push("</li>");h.addCreatedNode(b,n)}}return i},appendParentULDom:function(b,a){var c=[],d=l("#"+a.tId),e=l("#"+a.tId+f.id.UL),g=j.appendNodes(b,a.level+1,a[b.data.key.childs],a,!1,!0);j.makeUlHtml(b,a,c,g.join(""));!d.get(0)&&a.parentTId&&(j.appendParentULDom(b,a.getParentNode()),d=l("#"+a.tId));e.get(0)&&e.remove();d.append(c.join(""));j.createNodeCallback(b)},asyncNode:function(b,a,c,d){var e,
g;if(a&&!a.isParent)return k.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(k.apply(b.callback.beforeAsync,[b.treeId,a],!0)==!1)return k.apply(d),!1;if(a)a.isAjaxing=!0,l("#"+a.tId+f.id.ICON).attr({style:"","class":"ico_loading"});var i="";for(e=0,g=b.async.autoParam.length;a&&e<g;e++){var h=b.async.autoParam[e].split("="),m=h;h.length>1&&(m=h[1],h=h[0]);i+=(i.length>0?"&":"")+m+"="+a[h]}if(k.isArray(b.asyncParamOther))for(e=0,g=b.asyncParamOther.length;e<g;e+=2)i+=(i.length>0?"&":"")+b.async.otherParam[e]+
"="+b.async.otherParam[e+1];else for(var o in b.async.otherParam)i+=(i.length>0?"&":"")+o+"="+b.async.otherParam[o];l.ajax({type:b.async.type,url:k.apply(b.async.url,[b.treeId,a],b.async.url),data:i,dataType:b.async.dataType,success:function(e){var g=[];try{g=!e||e.length==0?[]:typeof e=="string"?eval("("+e+")"):e}catch(i){}if(a)a.isAjaxing=null;j.setNodeLineIcos(b,a);g&&g!=""?(g=k.apply(b.async.dataFilter,[b.treeId,a,g],g),j.addNodes(b,a,k.clone(g),!!c)):j.addNodes(b,a,[],!!c);b.treeObj.trigger(f.event.ASYNC_SUCCESS,
[b.treeId,a,e]);k.apply(d)},error:function(c,d,e){j.setNodeLineIcos(b,a);if(a)a.isAjaxing=null;b.treeObj.trigger(f.event.ASYNC_ERROR,[b.treeId,a,c,d,e])}});return!0},cancelPreSelectedNode:function(b,a){for(var c=h.getRoot(b).curSelectedList,d=c.length-1;d>=0;d--)if(!a||a===c[d])if(l("#"+c[d].tId+f.id.A).removeClass(f.node.CURSELECTED),j.setNodeName(b,c[d]),a){h.removeSelectedNode(b,a);break}if(!a)h.getRoot(b).curSelectedList=[]},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=
h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();k.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(f.event.NODECREATED,[b.treeId,c])}},createNodes:function(b,a,c,d){if(c&&c.length!=0){var e=h.getRoot(b),g=b.data.key.childs,g=!d||d.open||!!l("#"+d[g][0].tId).get(0);e.createdNodes=[];a=j.appendNodes(b,a,c,d,!0,g);d?(d=l("#"+d.tId+f.id.UL),d.get(0)&&d.append(a.join(""))):b.treeObj.append(a.join(""));j.createNodeCallback(b)}},expandCollapseNode:function(b,
a,c,d,e){var g=h.getRoot(b),i=b.data.key.childs;if(a){if(g.expandTriggerFlag){var m=e,e=function(){m&&m();a.open?b.treeObj.trigger(f.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(f.event.COLLAPSE,[b.treeId,a])};g.expandTriggerFlag=!1}if(a.open==c)k.apply(e,[]);else{!a.open&&a.isParent&&(!l("#"+a.tId+f.id.UL).get(0)||a[i]&&a[i].length>0&&!l("#"+a[i][0].tId).get(0))&&j.appendParentULDom(b,a);var c=l("#"+a.tId+f.id.UL),g=l("#"+a.tId+f.id.SWITCH),o=l("#"+a.tId+f.id.ICON);a.isParent?(a.open=!a.open,a.iconOpen&&
a.iconClose&&o.attr("style",j.makeNodeIcoStyle(b,a)),a.open?(j.replaceSwitchClass(g,f.folder.OPEN),j.replaceIcoClass(a,o,f.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),k.apply(e,[])):a[i]&&a[i].length>0?c.slideDown(b.view.expandSpeed,e):(c.show(),k.apply(e,[]))):(j.replaceSwitchClass(g,f.folder.CLOSE),j.replaceIcoClass(a,o,f.folder.CLOSE),d==!1||b.view.expandSpeed==""?(c.hide(),k.apply(e,[])):c.slideUp(b.view.expandSpeed,e))):k.apply(e,[])}}else k.apply(e,[])},expandCollapseParentNode:function(b,
a,c,d,e){a&&(a.parentTId?(j.expandCollapseNode(b,a,c,d),a.parentTId&&j.expandCollapseParentNode(b,a.getParentNode(),c,d,e)):j.expandCollapseNode(b,a,c,d,e))},expandCollapseSonNode:function(b,a,c,d,e){var g=h.getRoot(b),i=b.data.key.childs,g=a?a[i]:g[i],i=a?!1:d,f=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var k=0,l=g.length;k<l;k++)g[k]&&j.expandCollapseSonNode(b,g[k],c,i);h.getRoot(b).expandTriggerFlag=f;j.expandCollapseNode(b,a,c,d,e)},makeNodeFontCss:function(b,a){var c=
k.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?f.folder.OPEN:f.folder.CLOSE):c.push(f.folder.DOCU));return c.join("_")},makeNodeIcoStyle:function(b,a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&&a.iconClose?a.open?a.iconOpen:a.iconClose:a.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!k.apply(b.view.showIcon,
[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(f.line.ROOT):a.level==0&&a.isFirstNode?c.push(f.line.ROOTS):a.isLastNode?c.push(f.line.BOTTOM):c.push(f.line.CENTER):c.push(f.line.NOLINE);a.isParent?c.push(a.open?f.folder.OPEN:f.folder.CLOSE):c.push(f.folder.DOCU);return"level"+a.level+" switch "+c.join("_")},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,
a){return a.url?a.url:null},makeUlHtml:function(b,a,c,d){c.push("<ul id='",a.tId,f.id.UL,"' class='level",a.level," ",j.makeUlLineClass(b,a),"' style='display:",a.open?"block":"none","'>");c.push(d);c.push("</ul>")},makeUlLineClass:function(b,a){return b.view.showLine&&!a.isLastNode?f.line.LINE:""},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case f.folder.OPEN:case f.folder.CLOSE:case f.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},
replaceSwitchClass:function(b,a){if(b){var c=b.attr("class");if(c!=void 0){c=c.split("_");switch(a){case f.line.ROOT:case f.line.ROOTS:case f.line.CENTER:case f.line.BOTTOM:case f.line.NOLINE:c[0]=a;break;case f.folder.OPEN:case f.folder.CLOSE:case f.folder.DOCU:c[1]=a}b.attr("class",c.join("_"))}}},selectNode:function(b,a,c){c||j.cancelPreSelectedNode(b);l("#"+a.tId+f.id.A).addClass(f.node.CURSELECTED);h.addSelectedNode(b,a)},setNodeFontCss:function(b,a){var c=l("#"+a.tId+f.id.A),d=j.makeNodeFontCss(b,
a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c=l("#"+a.tId+f.id.SWITCH),d=l("#"+a.tId+f.id.UL),e=l("#"+a.tId+f.id.ICON),g=j.makeUlLineClass(b,a);g.length==0?d.removeClass(f.line.LINE):d.addClass(g);c.attr("class",j.makeNodeLineClass(b,a));e.removeAttr("style");e.attr("style",j.makeNodeIcoStyle(b,a));e.attr("class",j.makeNodeIcoClass(b,a))}},setNodeName:function(b,a){var c=b.data.key.name,d=b.data.key.title,e=l("#"+a.tId+f.id.SPAN);e.empty();e.text(a[c]);k.apply(b.view.showTitle,[b.treeId,
a],b.view.showTitle)&&l("#"+a.tId+f.id.A).attr("title",a[d])},setNodeTarget:function(b){l("#"+b.tId+f.id.A).attr("target",j.makeNodeTarget(b))},setNodeUrl:function(b,a){var c=l("#"+a.tId+f.id.A),d=j.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){var c=b.data.key.childs;a.open||a&&a[c]&&a[c].length>0?j.expandCollapseNode(b,a,!a.open):b.async.enable?j.asyncNode(b,a)||j.expandCollapseNode(b,a,!a.open):a&&j.expandCollapseNode(b,a,!a.open)}};l.fn.zTree=
{consts:{event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:k,view:j,event:m,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?
b:null},init:function(b,a,c){var d=k.clone(K);l.extend(!0,d,a);d.treeId=b.attr("id");d.treeObj=b;d.treeObj.empty();o[d.treeId]=d;if(l.browser.msie&&parseInt(l.browser.version)<7)d.view.expandSpeed="";h.initRoot(d);b=h.getRoot(d);a=d.data.key.childs;c=c?k.clone(k.isArray(c)?c:[c]):[];b[a]=d.data.simpleData.enable?h.transformTozTreeFormat(d,c):c;h.initCache(d);m.bindTree(d);m.bindEvent(d);b[a]&&b[a].length>0?j.createNodes(d,0,b[a]):d.async.enable&&d.async.url&&d.async.url!==""&&j.asyncNode(d);c={setting:d,
cancelSelectedNode:function(a){j.cancelPreSelectedNode(this.setting,a)},expandAll:function(a){if(a!==!0&&a!==!1){for(var a=null,b=h.getNodes(this.setting),c=0,d=b.length;c<d;c++)if(b[c].isParent){a=!b[c].open;break}if(a==null)return a}j.expandCollapseSonNode(this.setting,null,a,!0);return a},expandNode:function(a,b,c,m){if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if(b&&k.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(!b&&k.apply(d.callback.beforeCollapse,[d.treeId,
a],!0)==!1)return null;b&&a.parentTId&&j.expandCollapseParentNode(this.setting,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=!0;c?j.expandCollapseSonNode(this.setting,a,b,!0,function(){m!==!1&&l("#"+a.tId+f.id.ICON).focus().blur()}):(a.open=!b,j.switchNode(this.setting,a),m!==!1&&l("#"+a.tId+f.id.ICON).focus().blur());return b},getNodes:function(){return h.getNodes(this.setting)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(this.setting,c?c[this.setting.data.key.childs]:
h.getNodes(this.setting),a,b)},getNodeByTId:function(a){return h.getNodeCache(this.setting,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(this.setting,c?c[this.setting.data.key.childs]:h.getNodes(this.setting),a,b)},getNodesByParamFuzzy:function(a,b,c){return!a?null:h.getNodesByParamFuzzy(this.setting,c?c[this.setting.data.key.childs]:h.getNodes(this.setting),a,b)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.childs,c=a.parentTId?a.getParentNode():h.getRoot(this.setting),
f=0,j=c[b].length;f<j;f++)if(c[b][f]==a)return f;return-1},getSelectedNodes:function(){for(var a=[],b=h.getRoot(this.setting).curSelectedList,c=0,d=b.length;c<d;c++)a.push(b[c]);return a},isSelectedNode:function(a){return h.isSelectedNode(this.setting,a)},reAsyncChildNodes:function(a,b,c){if(this.setting.async.enable){var d=!a;d&&(a=h.getRoot(this.setting));b=="refresh"&&(a[this.setting.data.key.childs]=[],d?this.setting.treeObj.empty():l("#"+a.tId+f.id.UL).empty());j.asyncNode(this.setting,d?null:
a,!!c)}},refresh:function(){this.setting.treeObj.empty();var a=h.getRoot(this.setting),b=a[this.setting.data.key.childs];h.initRoot(this.setting);a[this.setting.data.key.childs]=b;h.initCache(this.setting);j.createNodes(this.setting,0,a[this.setting.data.key.childs])},selectNode:function(a,b){a&&k.uCanDo(this.setting)&&(b=d.view.selectedMulti&&b,a.parentTId?j.expandCollapseParentNode(this.setting,a.getParentNode(),!0,!1,function(){l("#"+a.tId+f.id.ICON).focus().blur()}):l("#"+a.tId+f.id.ICON).focus().blur(),
j.selectNode(this.setting,a,b))},transformTozTreeNodes:function(a){return h.transformTozTreeFormat(this.setting,a)},transformToArray:function(a){return h.transformToArrayFormat(this.setting,a)},updateNode:function(a){a&&l("#"+a.tId).get(0)&&k.uCanDo(this.setting)&&(j.setNodeName(this.setting,a),j.setNodeTarget(a),j.setNodeUrl(this.setting,a),j.setNodeLineIcos(this.setting,a),j.setNodeFontCss(this.setting,a))}};b.treeTools=c;h.setZTreeTools(d,c);return c}};var L=l.fn.zTree,f=L.consts})(jQuery);
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,517 @@
/*
* JQuery zTree excheck 3.0 beta
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2011-09-01
*/
(function($){
//default consts of excheck
var _consts = {
event: {
CHECK: "ztree_check"
},
id: {
CHECK: "_check"
},
checkbox: {
STYLE: "checkbox",
DEFAULT: "chk",
FALSE: "false",
TRUE: "true",
FULL: "full",
PART: "part",
FOCUS: "focus"
},
radio: {
STYLE: "radio",
TYPE_ALL: "all",
TYPE_LEVEL: "level"
}
},
//default setting of excheck
_setting = {
check: {
enable: false,
chkStyle: _consts.checkbox.STYLE,
radioType: _consts.radio.TYPE_LEVEL,
chkboxType: {
"Y": "ps",
"N": "ps"
}
},
data: {
key: {
checked: "checked"
}
},
callback: {
beforeCheck:null,
onCheck:null
}
},
//default root of excheck
_initRoot = function (setting) {
var r = data.getRoot(setting);
r.radioCheckedList = [];
},
//default cache of excheck
_initCache = function(treeId) {},
//default bind event of excheck
_bindEvent = function(setting) {
var o = setting.treeObj,
c = consts.event;
o.unbind(c.CHECK);
o.bind(c.CHECK, function (event, treeId, node) {
tools.apply(setting.callback.onCheck, [event, treeId, node]);
});
},
//default event proxy of excheck
_eventProxy = function(e) {
var target = e.target,
setting = data.getSetting(e.data.treeId),
tId = "", node = null,
nodeEventType = "", treeEventType = "",
nodeEventCallback = null, treeEventCallback = null;
if (tools.eqs(e.type, "mouseover")) {
if (setting.check.enable && tools.eqs(target.tagName, "button") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "mouseoverCheck";
}
} else if (tools.eqs(e.type, "mouseout")) {
if (setting.check.enable && tools.eqs(target.tagName, "button") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "mouseoutCheck";
}
} else if (tools.eqs(e.type, "click")) {
if (setting.check.enable && tools.eqs(target.tagName, "button") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "checkNode";
}
}
if (tId.length>0) {
node = data.getNodeCache(setting, tId);
switch (nodeEventType) {
case "checkNode" :
nodeEventCallback = _handler.onCheckNode;
break;
case "mouseoverCheck" :
nodeEventCallback = _handler.onMouseoverCheck;
break;
case "mouseoutCheck" :
nodeEventCallback = _handler.onMouseoutCheck;
break;
}
}
var proxyResult = {
stop: false,
node: node,
nodeEventType: nodeEventType,
nodeEventCallback: nodeEventCallback,
treeEventType: treeEventType,
treeEventCallback: treeEventCallback
};
return proxyResult
},
//default init node of excheck
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return;
var checkedKey = setting.data.key.checked;
if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true");
n[checkedKey] = !!n[checkedKey];
n.checkedOld = n[checkedKey];
n.nocheck = !!n.nocheck;
n.check_Child_State = -1;
n.check_Focus = false;
n.getCheckStatus = function() {return data.getCheckStatus(setting, n);};
},
//add dom for check
_beforeA = function(setting, node, html) {
var checkedKey = setting.data.key.checked;
if (setting.check.enable) {
data.makeChkFlag(setting, node);
if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && node[checkedKey] ) {
var r = data.getRoot(setting);
r.radioCheckedList.push(node);
}
html.push("<button type='button' ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK," onfocus='this.blur();' ",(node.nocheck === true?"style='display:none;'":""),"></button>");
}
},
//update zTreeObj, add method of check
_zTreeTools = function(setting, zTreeTools) {
zTreeTools.checkNode = function(node, checked, checkTypeFlag) {
var checkedKey = this.setting.data.key.checked;
if (node[checkedKey] === !!checked && !checkTypeFlag) {
return;
} else if (tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {
return;
}
if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {
node[checkedKey] = !!checked;
var checkObj = $("#" + node.tId + consts.id.CHECK);
if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
view.setChkClass(this.setting, checkObj, node);
view.repairParentChkClassWithSelf(this.setting, node);
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
}
}
zTreeTools.checkAllNodes = function(checked) {
view.repairAllChk(this.setting, !!checked);
}
zTreeTools.getCheckedNodes = function(checked) {
var childsKey = this.setting.data.key.childs;
checked = (checked !== false);
return data.getTreeCheckedNodes(this.setting, data.getRoot(setting)[childsKey], checked);
}
zTreeTools.getChangeCheckedNodes = function() {
var childsKey = this.setting.data.key.childs;
return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(setting)[childsKey]);
}
var _updateNode = zTreeTools.updateNode;
zTreeTools.updateNode = function(node, checkTypeFlag) {
if (_updateNode) _updateNode.apply(zTreeTools, arguments);
if (!node || !this.setting.check.enable) return;
var nObj = $("#" + node.tId);
if (nObj.get(0) && tools.uCanDo(this.setting)) {
var checkObj = $("#" + node.tId + consts.id.CHECK);
if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
view.setChkClass(this.setting, checkObj, node);
view.repairParentChkClassWithSelf(this.setting, node);
}
}
},
//method of operate data
_data = {
getRadioCheckedList: function(setting) {
var checkedList = data.getRoot(setting).radioCheckedList;
for (var i=0, j=checkedList.length; i<j; i++) {
if(!data.getNodeCache(setting, checkedList[i].tId)) {
checkedList.splice(i, 1);
i--; j--;
}
}
return checkedList;
},
getCheckStatus: function(setting, node) {
if (!setting.check.enable || node.nocheck) return null;
var checkedKey = setting.data.key.checked,
r = {
checked: node[checkedKey],
half: (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))
};
return r;
},
getTreeCheckedNodes: function(setting, nodes, checked, results) {
if (!nodes) return [];
var childsKey = setting.data.key.childs,
checkedKey = setting.data.key.checked;
results = !results ? [] : results;
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i].nocheck !== true && nodes[i][checkedKey] == checked) {
results.push(nodes[i]);
}
data.getTreeCheckedNodes(setting, nodes[i][childsKey], checked, results);
}
return results;
},
getTreeChangeCheckedNodes: function(setting, nodes, results) {
if (!nodes) return [];
var childsKey = setting.data.key.childs,
checkedKey = setting.data.key.checked;
results = !results ? [] : results;
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i].nocheck !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {
results.push(nodes[i]);
}
data.getTreeChangeCheckedNodes(setting, nodes[i][childsKey], results);
}
return results;
},
makeChkFlag: function(setting, node) {
if (!node) return;
var childsKey = setting.data.key.childs,
checkedKey = setting.data.key.checked,
chkFlag = -1;
if (node[childsKey]) {
for (var i = 0, l = node[childsKey].length; i < l; i++) {
var cNode = node[childsKey][i];
var tmp = -1;
if (setting.check.chkStyle == consts.radio.STYLE) {
if (cNode.nocheck === true) {
tmp = cNode.check_Child_State;
} else if (cNode.nocheck !== true && cNode[checkedKey]) {
tmp = 2;
} else {
tmp = cNode.check_Child_State > 0 ? 2:0;
}
if (tmp == 2) {
chkFlag = 2; break;
} else if (tmp == 0){
chkFlag = 0;
}
} else if (setting.check.chkStyle == consts.checkbox.STYLE) {
if (cNode.nocheck === true) {
tmp = cNode.check_Child_State;
} else if (cNode.nocheck !== true && cNode[checkedKey] ) {
tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;
} else {
tmp = (cNode.check_Child_State > 0) ? 1 : 0;
}
if (tmp === 1) {
chkFlag = 1; break;
} else if (tmp === 2 && i > 0 && tmp !== chkFlag) {
chkFlag = 1; break;
} else if (chkFlag === 2 && tmp > -1 && tmp < 2) {
chkFlag = 1; break;
} else if (tmp > -1) {
chkFlag = tmp;
}
}
}
}
node.check_Child_State = chkFlag;
}
},
//method of event proxy
_event = {
},
//method of event handler
_handler = {
onCheckNode: function (event, node) {
var setting = data.getSetting(event.data.treeId),
checkedKey = setting.data.key.checked;
if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;
node[checkedKey] = !node[checkedKey];
view.checkNodeRelation(setting, node);
var checkObj = $("#" + node.tId + consts.id.CHECK);
view.setChkClass(setting, checkObj, node);
view.repairParentChkClassWithSelf(setting, node);
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
return true;
},
onMouseoverCheck: function(event, node) {
var setting = data.getSetting(event.data.treeId),
checkObj = $("#" + node.tId + consts.id.CHECK);
node.check_Focus = true;
view.setChkClass(setting, checkObj, node);
return true;
},
onMouseoutCheck: function(event, node) {
var setting = data.getSetting(event.data.treeId),
checkObj = $("#" + node.tId + consts.id.CHECK);
node.check_Focus = false;
view.setChkClass(setting, checkObj, node);
return true;
}
},
//method of tools for zTree
_tools = {
},
//method of operate ztree dom
_view = {
checkNodeRelation: function(setting, node) {
var pNode, i, l,
childsKey = setting.data.key.childs,
checkedKey = setting.data.key.checked,
r = consts.radio;
if (setting.check.chkStyle == r.STYLE) {
var checkedList = data.getRadioCheckedList(setting);
if (node[checkedKey]) {
if (setting.check.radioType == r.TYPE_ALL) {
for (i = checkedList.length-1; i >= 0; i--) {
pNode = checkedList[i];
pNode[checkedKey] = false;
checkedList.splice(i, 1);
view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
if (pNode.parentTId != node.parentTId) {
view.repairParentChkClassWithSelf(setting, pNode);
}
}
checkedList.push(node);
} else {
var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);
for (i = 0, l = parentNode[childsKey].length; i < l; i++) {
pNode = parentNode[childsKey][i];
if (pNode[checkedKey] && pNode != node) {
pNode[checkedKey] = false;
view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
}
}
}
} else if (setting.check.radioType == r.TYPE_ALL) {
for (i = 0, l = checkedList.length; i < l; i++) {
if (node == checkedList[i]) {
checkedList.splice(i, 1);
break;
}
}
}
} else {
if (node[checkedKey] && (!node[childsKey] || node[childsKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) {
view.setSonNodeCheckBox(setting, node, true);
}
if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) {
view.setParentNodeCheckBox(setting, node, true);
}
if (!node[checkedKey] && (!node[childsKey] || node[childsKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) {
view.setSonNodeCheckBox(setting, node, false);
}
if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) {
view.setParentNodeCheckBox(setting, node, false);
}
}
},
makeChkClass: function(setting, node) {
var checkedKey = setting.data.key.checked,
c = consts.checkbox, r = consts.radio,
fullStyle = "";
if (setting.check.chkStyle == r.STYLE) {
fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;
} else {
fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART);
}
var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle;
chkName = node.check_Focus ? chkName + "_" + c.FOCUS : chkName;
return c.DEFAULT + " " + chkName;
},
repairAllChk: function(setting, checked) {
if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {
var checkedKey = setting.data.key.checked,
childsKey = setting.data.key.childs,
root = data.getRoot(setting);
for (var i = 0, l = root[childsKey].length; i<l ; i++) {
var node = root[childsKey][i];
if (node.nocheck !== true) {
node[checkedKey] = checked;
}
view.setSonNodeCheckBox(setting, node, checked);
}
}
},
repairChkClass: function(setting, node) {
if (!node) return;
data.makeChkFlag(setting, node);
var checkObj = $("#" + node.tId + consts.id.CHECK);
view.setChkClass(setting, checkObj, node);
},
repairParentChkClass: function(setting, node) {
if (!node || !node.parentTId) return;
var pNode = node.getParentNode();
view.repairChkClass(setting, pNode);
view.repairParentChkClass(setting, pNode);
},
repairParentChkClassWithSelf: function(setting, node) {
if (!node) return;
var childsKey = setting.data.key.childs;
if (node[childsKey] && node[childsKey].length > 0) {
view.repairParentChkClass(setting, node[childsKey][0]);
} else {
view.repairParentChkClass(setting, node);
}
},
setChkClass: function(setting, obj, node) {
if (!obj) return;
if (node.nocheck === true) {
obj.hide();
} else {
obj.show();
}
obj.removeClass();
obj.addClass(view.makeChkClass(setting, node));
},
setParentNodeCheckBox: function(setting, node, value) {
var childsKey = setting.data.key.childs,
checkedKey = setting.data.key.checked,
checkObj = $("#" + node.tId + consts.id.CHECK);
data.makeChkFlag(setting, node);
if (node.nocheck !== true) {
node[checkedKey] = value;
view.setChkClass(setting, checkObj, node);
}
if (node.parentTId) {
var pSign = true;
if (!value) {
var pNodes = node.getParentNode()[childsKey];
for (var i = 0, l = pNodes.length; i < l; i++) {
if ((pNodes[i].nocheck !== true && pNodes[i][checkedKey])
|| (pNodes[i].nocheck === true && pNodes[i].check_Child_State > 0)) {
pSign = false;
break;
}
}
}
if (pSign) {
view.setParentNodeCheckBox(setting, node.getParentNode(), value);
}
}
},
setSonNodeCheckBox: function(setting, node, value) {
if (!node) return;
var childsKey = setting.data.key.childs,
checkedKey = setting.data.key.checked,
checkObj = $("#" + node.tId + consts.id.CHECK);
if (node != data.getRoot(setting)) {
if (node.nocheck !== true) {
node[checkedKey] = value;
node.check_Child_State = value ? 2 : 0;
} else {
node.check_Child_State = -1;
}
view.setChkClass(setting, checkObj, node);
}
if (!node[childsKey]) return;
for (var i = 0, l = node[childsKey].length; i < l; i++) {
if (node[childsKey][i]) view.setSonNodeCheckBox(setting, node[childsKey][i], value);
}
}
},
_z = {
tools: _tools,
view: _view,
event: _event,
data: _data
};
$.extend(true, $.fn.zTree.consts, _consts);
$.extend(true, $.fn.zTree._z, _z);
var zt = $.fn.zTree,
tools = zt._z.tools,
consts = zt.consts,
view = zt._z.view,
data = zt._z.data,
event = zt._z.event;
data.exSetting(_setting);
data.addInitBind(_bindEvent);
data.addInitCache(_initCache);
data.addInitNode(_initNode);
data.addInitProxy(_eventProxy);
data.addInitRoot(_initRoot);
data.addBeforeA(_beforeA);
data.addZTreeTools(_zTreeTools);
var _createNodes = view.createNodes;
view.createNodes = function(setting, level, nodes, parentNode) {
if (_createNodes) _createNodes.apply(view, arguments);
if (!nodes) return;
view.repairParentChkClassWithSelf(setting, parentNode);
}
})(jQuery);
+29
View File
@@ -0,0 +1,29 @@
/*
* JQuery zTree excheck 3.0 beta
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2011-09-01
*/
(function(j){var o,p,q,n={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},s={check:{enable:!1,chkStyle:n.checkbox.STYLE,radioType:n.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}};o=function(c,a){var b=e.getSetting(c.data.treeId),d=b.data.key.checked;if(m.apply(b.callback.beforeCheck,
[b.treeId,a],!0)==!1)return!0;a[d]=!a[d];g.checkNodeRelation(b,a);d=j("#"+a.tId+i.id.CHECK);g.setChkClass(b,d,a);g.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(i.event.CHECK,[b.treeId,a]);return!0};p=function(c,a){var b=e.getSetting(c.data.treeId),d=j("#"+a.tId+i.id.CHECK);a.check_Focus=!0;g.setChkClass(b,d,a);return!0};q=function(c,a){var b=e.getSetting(c.data.treeId),d=j("#"+a.tId+i.id.CHECK);a.check_Focus=!1;g.setChkClass(b,d,a);return!0};j.extend(!0,j.fn.zTree.consts,n);j.extend(!0,j.fn.zTree._z,
{tools:{},view:{checkNodeRelation:function(c,a){var b,d,h,f=c.data.key.childs,k=c.data.key.checked;b=i.radio;if(c.check.chkStyle==b.STYLE){var l=e.getRadioCheckedList(c);if(a[k])if(c.check.radioType==b.TYPE_ALL){for(d=l.length-1;d>=0;d--)b=l[d],b[k]=!1,l.splice(d,1),g.setChkClass(c,j("#"+b.tId+i.id.CHECK),b),b.parentTId!=a.parentTId&&g.repairParentChkClassWithSelf(c,b);l.push(a)}else{l=a.parentTId?a.getParentNode():e.getRoot(c);for(d=0,h=l[f].length;d<h;d++)b=l[f][d],b[k]&&b!=a&&(b[k]=!1,g.setChkClass(c,
j("#"+b.tId+i.id.CHECK),b))}else if(c.check.radioType==b.TYPE_ALL)for(d=0,h=l.length;d<h;d++)if(a==l[d]){l.splice(d,1);break}}else a[k]&&(!a[f]||a[f].length==0||c.check.chkboxType.Y.indexOf("s")>-1)&&g.setSonNodeCheckBox(c,a,!0),a[k]&&c.check.chkboxType.Y.indexOf("p")>-1&&g.setParentNodeCheckBox(c,a,!0),!a[k]&&(!a[f]||a[f].length==0||c.check.chkboxType.N.indexOf("s")>-1)&&g.setSonNodeCheckBox(c,a,!1),!a[k]&&c.check.chkboxType.N.indexOf("p")>-1&&g.setParentNodeCheckBox(c,a,!1)},makeChkClass:function(c,
a){var b=c.data.key.checked,d=i.checkbox,h="",h=c.check.chkStyle==i.radio.STYLE?a.check_Child_State<1?d.FULL:d.PART:a[b]?a.check_Child_State===2||a.check_Child_State===-1?d.FULL:d.PART:a.check_Child_State<1?d.FULL:d.PART,b=c.check.chkStyle+"_"+(a[b]?d.TRUE:d.FALSE)+"_"+h,b=a.check_Focus?b+"_"+d.FOCUS:b;return d.DEFAULT+" "+b},repairAllChk:function(c,a){if(c.check.enable&&c.check.chkStyle===i.checkbox.STYLE)for(var b=c.data.key.checked,d=c.data.key.childs,h=e.getRoot(c),f=0,k=h[d].length;f<k;f++){var l=
h[d][f];l.nocheck!==!0&&(l[b]=a);g.setSonNodeCheckBox(c,l,a)}},repairChkClass:function(c,a){if(a){e.makeChkFlag(c,a);var b=j("#"+a.tId+i.id.CHECK);g.setChkClass(c,b,a)}},repairParentChkClass:function(c,a){if(a&&a.parentTId){var b=a.getParentNode();g.repairChkClass(c,b);g.repairParentChkClass(c,b)}},repairParentChkClassWithSelf:function(c,a){if(a){var b=c.data.key.childs;a[b]&&a[b].length>0?g.repairParentChkClass(c,a[b][0]):g.repairParentChkClass(c,a)}},setChkClass:function(c,a,b){a&&(b.nocheck===
!0?a.hide():a.show(),a.removeClass(),a.addClass(g.makeChkClass(c,b)))},setParentNodeCheckBox:function(c,a,b){var d=c.data.key.childs,h=c.data.key.checked,f=j("#"+a.tId+i.id.CHECK);e.makeChkFlag(c,a);a.nocheck!==!0&&(a[h]=b,g.setChkClass(c,f,a));if(a.parentTId){f=!0;if(!b)for(var d=a.getParentNode()[d],k=0,l=d.length;k<l;k++)if(d[k].nocheck!==!0&&d[k][h]||d[k].nocheck===!0&&d[k].check_Child_State>0){f=!1;break}f&&g.setParentNodeCheckBox(c,a.getParentNode(),b)}},setSonNodeCheckBox:function(c,a,b){if(a){var d=
c.data.key.childs,h=c.data.key.checked,f=j("#"+a.tId+i.id.CHECK);if(a!=e.getRoot(c))a.nocheck!==!0?(a[h]=b,a.check_Child_State=b?2:0):a.check_Child_State=-1,g.setChkClass(c,f,a);if(a[d]){h=0;for(f=a[d].length;h<f;h++)a[d][h]&&g.setSonNodeCheckBox(c,a[d][h],b)}}}},event:{},data:{getRadioCheckedList:function(c){for(var a=e.getRoot(c).radioCheckedList,b=0,d=a.length;b<d;b++)e.getNodeCache(c,a[b].tId)||(a.splice(b,1),b--,d--);return a},getCheckStatus:function(c,a){if(!c.check.enable||a.nocheck)return null;
var b=c.data.key.checked;return{checked:a[b],half:c.check.chkStyle==i.radio.STYLE?a.check_Child_State===2:a[b]?a.check_Child_State>-1&&a.check_Child_State<2:a.check_Child_State>0}},getTreeCheckedNodes:function(c,a,b,d){if(!a)return[];for(var h=c.data.key.childs,f=c.data.key.checked,d=!d?[]:d,k=0,g=a.length;k<g;k++)a[k].nocheck!==!0&&a[k][f]==b&&d.push(a[k]),e.getTreeCheckedNodes(c,a[k][h],b,d);return d},getTreeChangeCheckedNodes:function(c,a,b){if(!a)return[];for(var d=c.data.key.childs,h=c.data.key.checked,
b=!b?[]:b,f=0,g=a.length;f<g;f++)a[f].nocheck!==!0&&a[f][h]!=a[f].checkedOld&&b.push(a[f]),e.getTreeChangeCheckedNodes(c,a[f][d],b);return b},makeChkFlag:function(c,a){if(a){var b=c.data.key.childs,d=c.data.key.checked,h=-1;if(a[b])for(var f=0,g=a[b].length;f<g;f++){var e=a[b][f],j=-1;if(c.check.chkStyle==i.radio.STYLE)if(j=e.nocheck===!0?e.check_Child_State:e.nocheck!==!0&&e[d]?2:e.check_Child_State>0?2:0,j==2){h=2;break}else j==0&&(h=0);else if(c.check.chkStyle==i.checkbox.STYLE)if(j=e.nocheck===
!0?e.check_Child_State:e.nocheck!==!0&&e[d]?e.check_Child_State===-1||e.check_Child_State===2?2:1:e.check_Child_State>0?1:0,j===1){h=1;break}else if(j===2&&f>0&&j!==h){h=1;break}else if(h===2&&j>-1&&j<2){h=1;break}else j>-1&&(h=j)}a.check_Child_State=h}}}});var n=j.fn.zTree,m=n._z.tools,i=n.consts,g=n._z.view,e=n._z.data;e.exSetting(s);e.addInitBind(function(c){var a=c.treeObj,b=i.event;a.unbind(b.CHECK);a.bind(b.CHECK,function(a,b,f){m.apply(c.callback.onCheck,[a,b,f])})});e.addInitCache(function(){});
e.addInitNode(function(c,a,b){if(b)a=c.data.key.checked,typeof b[a]=="string"&&(b[a]=m.eqs(b[a],"true")),b[a]=!!b[a],b.checkedOld=b[a],b.nocheck=!!b.nocheck,b.check_Child_State=-1,b.check_Focus=!1,b.getCheckStatus=function(){return e.getCheckStatus(c,b)}});e.addInitProxy(function(c){var a=c.target,b=e.getSetting(c.data.treeId),d="",h=null,f="",g=null;if(m.eqs(c.type,"mouseover")){if(b.check.enable&&m.eqs(a.tagName,"button")&&a.getAttribute("treeNode"+i.id.CHECK)!==null)d=a.parentNode.id,f="mouseoverCheck"}else if(m.eqs(c.type,
"mouseout")){if(b.check.enable&&m.eqs(a.tagName,"button")&&a.getAttribute("treeNode"+i.id.CHECK)!==null)d=a.parentNode.id,f="mouseoutCheck"}else if(m.eqs(c.type,"click")&&b.check.enable&&m.eqs(a.tagName,"button")&&a.getAttribute("treeNode"+i.id.CHECK)!==null)d=a.parentNode.id,f="checkNode";if(d.length>0)switch(h=e.getNodeCache(b,d),f){case "checkNode":g=o;break;case "mouseoverCheck":g=p;break;case "mouseoutCheck":g=q}return{stop:!1,node:h,nodeEventType:f,nodeEventCallback:g,treeEventType:"",treeEventCallback:null}});
e.addInitRoot(function(c){e.getRoot(c).radioCheckedList=[]});e.addBeforeA(function(c,a,b){var d=c.data.key.checked;c.check.enable&&(e.makeChkFlag(c,a),c.check.chkStyle==i.radio.STYLE&&c.check.radioType==i.radio.TYPE_ALL&&a[d]&&e.getRoot(c).radioCheckedList.push(a),b.push("<button type='button' ID='",a.tId,i.id.CHECK,"' class='",g.makeChkClass(c,a),"' treeNode",i.id.CHECK," onfocus='this.blur();' ",a.nocheck===!0?"style='display:none;'":"","></button>"))});e.addZTreeTools(function(c,a){a.checkNode=
function(a,b,f){var e=this.setting.data.key.checked;if((a[e]!==!!b||f)&&m.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0)!=!1&&m.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==!0)a[e]=!!b,b=j("#"+a.tId+i.id.CHECK),(f||this.setting.check.chkStyle===i.radio.STYLE)&&g.checkNodeRelation(this.setting,a),g.setChkClass(this.setting,b,a),g.repairParentChkClassWithSelf(this.setting,a),c.treeObj.trigger(i.event.CHECK,[c.treeId,a])};a.checkAllNodes=function(a){g.repairAllChk(this.setting,
!!a)};a.getCheckedNodes=function(a){var b=this.setting.data.key.childs;return e.getTreeCheckedNodes(this.setting,e.getRoot(c)[b],a!==!1)};a.getChangeCheckedNodes=function(){var a=this.setting.data.key.childs;return e.getTreeChangeCheckedNodes(this.setting,e.getRoot(c)[a])};var b=a.updateNode;a.updateNode=function(c,e){b&&b.apply(a,arguments);if(c&&this.setting.check.enable&&j("#"+c.tId).get(0)&&m.uCanDo(this.setting)){var f=j("#"+c.tId+i.id.CHECK);(e==!0||this.setting.check.chkStyle===i.radio.STYLE)&&
g.checkNodeRelation(this.setting,c);g.setChkClass(this.setting,f,c);g.repairParentChkClassWithSelf(this.setting,c)}}});var r=g.createNodes;g.createNodes=function(c,a,b,d){r&&r.apply(g,arguments);b&&g.repairParentChkClassWithSelf(c,d)}})(jQuery);
@@ -0,0 +1,598 @@
/*
* JQuery zTree excheck 3.2
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2012-05-13
*/
(function($){
//default consts of excheck
var _consts = {
event: {
CHECK: "ztree_check"
},
id: {
CHECK: "_check"
},
checkbox: {
STYLE: "checkbox",
DEFAULT: "chk",
DISABLED: "disable",
FALSE: "false",
TRUE: "true",
FULL: "full",
PART: "part",
FOCUS: "focus"
},
radio: {
STYLE: "radio",
TYPE_ALL: "all",
TYPE_LEVEL: "level"
}
},
//default setting of excheck
_setting = {
check: {
enable: false,
autoCheckTrigger: false,
chkStyle: _consts.checkbox.STYLE,
nocheckInherit: false,
radioType: _consts.radio.TYPE_LEVEL,
chkboxType: {
"Y": "ps",
"N": "ps"
}
},
data: {
key: {
checked: "checked"
}
},
callback: {
beforeCheck:null,
onCheck:null
}
},
//default root of excheck
_initRoot = function (setting) {
var r = data.getRoot(setting);
r.radioCheckedList = [];
},
//default cache of excheck
_initCache = function(treeId) {},
//default bind event of excheck
_bindEvent = function(setting) {
var o = setting.treeObj,
c = consts.event;
o.unbind(c.CHECK);
o.bind(c.CHECK, function (event, treeId, node) {
tools.apply(setting.callback.onCheck, [event, treeId, node]);
});
},
//default event proxy of excheck
_eventProxy = function(e) {
var target = e.target,
setting = data.getSetting(e.data.treeId),
tId = "", node = null,
nodeEventType = "", treeEventType = "",
nodeEventCallback = null, treeEventCallback = null;
if (tools.eqs(e.type, "mouseover")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "mouseoverCheck";
}
} else if (tools.eqs(e.type, "mouseout")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "mouseoutCheck";
}
} else if (tools.eqs(e.type, "click")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
tId = target.parentNode.id;
nodeEventType = "checkNode";
}
}
if (tId.length>0) {
node = data.getNodeCache(setting, tId);
switch (nodeEventType) {
case "checkNode" :
nodeEventCallback = _handler.onCheckNode;
break;
case "mouseoverCheck" :
nodeEventCallback = _handler.onMouseoverCheck;
break;
case "mouseoutCheck" :
nodeEventCallback = _handler.onMouseoutCheck;
break;
}
}
var proxyResult = {
stop: false,
node: node,
nodeEventType: nodeEventType,
nodeEventCallback: nodeEventCallback,
treeEventType: treeEventType,
treeEventCallback: treeEventCallback
};
return proxyResult
},
//default init node of excheck
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return;
var checkedKey = setting.data.key.checked;
if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true");
n[checkedKey] = !!n[checkedKey];
n.checkedOld = n[checkedKey];
n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);
n.chkDisabled = !!n.chkDisabled || (parentNode && !!parentNode.chkDisabled);
if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true");
n.halfCheck = !!n.halfCheck;
n.check_Child_State = -1;
n.check_Focus = false;
n.getCheckStatus = function() {return data.getCheckStatus(setting, n);};
if (isLastNode) {
data.makeChkFlag(setting, parentNode);
}
},
//add dom for check
_beforeA = function(setting, node, html) {
var checkedKey = setting.data.key.checked;
if (setting.check.enable) {
data.makeChkFlag(setting, node);
if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && node[checkedKey] ) {
var r = data.getRoot(setting);
r.radioCheckedList.push(node);
}
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>");
}
},
//update zTreeObj, add method of check
_zTreeTools = function(setting, zTreeTools) {
zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
var checkedKey = this.setting.data.key.checked;
if (node.chkDisabled === true) return;
if (checked !== true && checked !== false) {
checked = !node[checkedKey];
}
callbackFlag = !!callbackFlag;
if (node[checkedKey] === checked && !checkTypeFlag) {
return;
} else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {
return;
}
if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {
node[checkedKey] = checked;
var checkObj = $("#" + node.tId + consts.id.CHECK);
if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
view.setChkClass(this.setting, checkObj, node);
view.repairParentChkClassWithSelf(this.setting, node);
if (callbackFlag) {
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
}
}
}
zTreeTools.checkAllNodes = function(checked) {
view.repairAllChk(this.setting, !!checked);
}
zTreeTools.getCheckedNodes = function(checked) {
var childKey = this.setting.data.key.children;
checked = (checked !== false);
return data.getTreeCheckedNodes(this.setting, data.getRoot(setting)[childKey], checked);
}
zTreeTools.getChangeCheckedNodes = function() {
var childKey = this.setting.data.key.children;
return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(setting)[childKey]);
}
zTreeTools.setChkDisabled = function(node, disabled) {
disabled = !!disabled;
view.repairSonChkDisabled(this.setting, node, disabled);
if (!disabled) view.repairParentChkDisabled(this.setting, node, disabled);
}
var _updateNode = zTreeTools.updateNode;
zTreeTools.updateNode = function(node, checkTypeFlag) {
if (_updateNode) _updateNode.apply(zTreeTools, arguments);
if (!node || !this.setting.check.enable) return;
var nObj = $("#" + node.tId);
if (nObj.get(0) && tools.uCanDo(this.setting)) {
var checkObj = $("#" + node.tId + consts.id.CHECK);
if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
view.setChkClass(this.setting, checkObj, node);
view.repairParentChkClassWithSelf(this.setting, node);
}
}
},
//method of operate data
_data = {
getRadioCheckedList: function(setting) {
var checkedList = data.getRoot(setting).radioCheckedList;
for (var i=0, j=checkedList.length; i<j; i++) {
if(!data.getNodeCache(setting, checkedList[i].tId)) {
checkedList.splice(i, 1);
i--; j--;
}
}
return checkedList;
},
getCheckStatus: function(setting, node) {
if (!setting.check.enable || node.nocheck) return null;
var checkedKey = setting.data.key.checked,
r = {
checked: node[checkedKey],
half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))
};
return r;
},
getTreeCheckedNodes: function(setting, nodes, checked, results) {
if (!nodes) return [];
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked;
results = !results ? [] : results;
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i].nocheck !== true && nodes[i][checkedKey] == checked) {
results.push(nodes[i]);
}
data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results);
}
return results;
},
getTreeChangeCheckedNodes: function(setting, nodes, results) {
if (!nodes) return [];
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked;
results = !results ? [] : results;
for (var i = 0, l = nodes.length; i < l; i++) {
if (nodes[i].nocheck !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {
results.push(nodes[i]);
}
data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results);
}
return results;
},
makeChkFlag: function(setting, node) {
if (!node) return;
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
chkFlag = -1;
if (node[childKey]) {
var start = false;
for (var i = 0, l = node[childKey].length; i < l; i++) {
var cNode = node[childKey][i];
var tmp = -1;
if (setting.check.chkStyle == consts.radio.STYLE) {
if (cNode.nocheck === true) {
tmp = cNode.check_Child_State;
} else if (cNode.halfCheck === true) {
tmp = 2;
} else if (cNode.nocheck !== true && cNode[checkedKey]) {
tmp = 2;
} else {
tmp = cNode.check_Child_State > 0 ? 2:0;
}
if (tmp == 2) {
chkFlag = 2; break;
} else if (tmp == 0){
chkFlag = 0;
}
} else if (setting.check.chkStyle == consts.checkbox.STYLE) {
if (cNode.nocheck === true) {
tmp = cNode.check_Child_State;
} else if (cNode.halfCheck === true) {
tmp = 1;
} else if (cNode.nocheck !== true && cNode[checkedKey] ) {
tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;
} else {
tmp = (cNode.check_Child_State > 0) ? 1 : 0;
}
if (tmp === 1) {
chkFlag = 1; break;
} else if (tmp === 2 && start && tmp !== chkFlag) {
chkFlag = 1; break;
} else if (chkFlag === 2 && tmp > -1 && tmp < 2) {
chkFlag = 1; break;
} else if (tmp > -1) {
chkFlag = tmp;
}
if (!start) start = (cNode.nocheck !== true);
}
}
}
node.check_Child_State = chkFlag;
}
},
//method of event proxy
_event = {
},
//method of event handler
_handler = {
onCheckNode: function (event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkedKey = setting.data.key.checked;
if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;
node[checkedKey] = !node[checkedKey];
view.checkNodeRelation(setting, node);
var checkObj = $("#" + node.tId + consts.id.CHECK);
view.setChkClass(setting, checkObj, node);
view.repairParentChkClassWithSelf(setting, node);
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
return true;
},
onMouseoverCheck: function(event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkObj = $("#" + node.tId + consts.id.CHECK);
node.check_Focus = true;
view.setChkClass(setting, checkObj, node);
return true;
},
onMouseoutCheck: function(event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkObj = $("#" + node.tId + consts.id.CHECK);
node.check_Focus = false;
view.setChkClass(setting, checkObj, node);
return true;
}
},
//method of tools for zTree
_tools = {
},
//method of operate ztree dom
_view = {
checkNodeRelation: function(setting, node) {
var pNode, i, l,
childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
r = consts.radio;
if (setting.check.chkStyle == r.STYLE) {
var checkedList = data.getRadioCheckedList(setting);
if (node[checkedKey]) {
if (setting.check.radioType == r.TYPE_ALL) {
for (i = checkedList.length-1; i >= 0; i--) {
pNode = checkedList[i];
pNode[checkedKey] = false;
checkedList.splice(i, 1);
view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
if (pNode.parentTId != node.parentTId) {
view.repairParentChkClassWithSelf(setting, pNode);
}
}
checkedList.push(node);
} else {
var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);
for (i = 0, l = parentNode[childKey].length; i < l; i++) {
pNode = parentNode[childKey][i];
if (pNode[checkedKey] && pNode != node) {
pNode[checkedKey] = false;
view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
}
}
}
} else if (setting.check.radioType == r.TYPE_ALL) {
for (i = 0, l = checkedList.length; i < l; i++) {
if (node == checkedList[i]) {
checkedList.splice(i, 1);
break;
}
}
}
} else {
if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) {
view.setSonNodeCheckBox(setting, node, true);
}
if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) {
view.setSonNodeCheckBox(setting, node, false);
}
if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) {
view.setParentNodeCheckBox(setting, node, true);
}
if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) {
view.setParentNodeCheckBox(setting, node, false);
}
}
},
makeChkClass: function(setting, node) {
var checkedKey = setting.data.key.checked,
c = consts.checkbox, r = consts.radio,
fullStyle = "";
if (node.chkDisabled === true) {
fullStyle = c.DISABLED;
} else if (node.halfCheck) {
fullStyle = c.PART;
} else if (setting.check.chkStyle == r.STYLE) {
fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;
} else {
fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART);
}
var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle;
chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName;
return "button " + c.DEFAULT + " " + chkName;
},
repairAllChk: function(setting, checked) {
if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {
var checkedKey = setting.data.key.checked,
childKey = setting.data.key.children,
root = data.getRoot(setting);
for (var i = 0, l = root[childKey].length; i<l ; i++) {
var node = root[childKey][i];
if (node.nocheck !== true) {
node[checkedKey] = checked;
}
view.setSonNodeCheckBox(setting, node, checked);
}
}
},
repairChkClass: function(setting, node) {
if (!node) return;
data.makeChkFlag(setting, node);
var checkObj = $("#" + node.tId + consts.id.CHECK);
view.setChkClass(setting, checkObj, node);
},
repairParentChkClass: function(setting, node) {
if (!node || !node.parentTId) return;
var pNode = node.getParentNode();
view.repairChkClass(setting, pNode);
view.repairParentChkClass(setting, pNode);
},
repairParentChkClassWithSelf: function(setting, node) {
if (!node) return;
var childKey = setting.data.key.children;
if (node[childKey] && node[childKey].length > 0) {
view.repairParentChkClass(setting, node[childKey][0]);
} else {
view.repairParentChkClass(setting, node);
}
},
repairSonChkDisabled: function(setting, node, chkDisabled) {
if (!node) return;
var childKey = setting.data.key.children;
if (node.chkDisabled != chkDisabled) {
node.chkDisabled = chkDisabled;
if (node.nocheck !== true) view.repairChkClass(setting, node);
}
if (node[childKey]) {
for (var i = 0, l = node[childKey].length; i < l; i++) {
var sNode = node[childKey][i];
view.repairSonChkDisabled(setting, sNode, chkDisabled);
}
}
},
repairParentChkDisabled: function(setting, node, chkDisabled) {
if (!node) return;
if (node.chkDisabled != chkDisabled) {
node.chkDisabled = chkDisabled;
if (node.nocheck !== true) view.repairChkClass(setting, node);
}
view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled);
},
setChkClass: function(setting, obj, node) {
if (!obj) return;
if (node.nocheck === true) {
obj.hide();
} else {
obj.show();
}
obj.removeClass();
obj.addClass(view.makeChkClass(setting, node));
},
setParentNodeCheckBox: function(setting, node, value, srcNode) {
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
checkObj = $("#" + node.tId + consts.id.CHECK);
if (!srcNode) srcNode = node;
data.makeChkFlag(setting, node);
if (node.nocheck !== true && node.chkDisabled !== true) {
node[checkedKey] = value;
view.setChkClass(setting, checkObj, node);
if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true) {
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
}
}
if (node.parentTId) {
var pSign = true;
if (!value) {
var pNodes = node.getParentNode()[childKey];
for (var i = 0, l = pNodes.length; i < l; i++) {
if ((pNodes[i].nocheck !== true && pNodes[i][checkedKey])
|| (pNodes[i].nocheck === true && pNodes[i].check_Child_State > 0)) {
pSign = false;
break;
}
}
}
if (pSign) {
view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode);
}
}
},
setSonNodeCheckBox: function(setting, node, value, srcNode) {
if (!node) return;
var childKey = setting.data.key.children,
checkedKey = setting.data.key.checked,
checkObj = $("#" + node.tId + consts.id.CHECK);
if (!srcNode) srcNode = node;
var hasDisable = false;
if (node[childKey]) {
for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) {
var sNode = node[childKey][i];
view.setSonNodeCheckBox(setting, sNode, value, srcNode);
if (sNode.chkDisabled === true) hasDisable = true;
}
}
if (node != data.getRoot(setting) && node.chkDisabled !== true) {
if (hasDisable && node.nocheck !== true) {
data.makeChkFlag(setting, node);
}
if (node.nocheck !== true) {
node[checkedKey] = value;
if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1;
} else {
node.check_Child_State = -1;
}
view.setChkClass(setting, checkObj, node);
if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true) {
setting.treeObj.trigger(consts.event.CHECK, [setting.treeId, node]);
}
}
}
},
_z = {
tools: _tools,
view: _view,
event: _event,
data: _data
};
$.extend(true, $.fn.zTree.consts, _consts);
$.extend(true, $.fn.zTree._z, _z);
var zt = $.fn.zTree,
tools = zt._z.tools,
consts = zt.consts,
view = zt._z.view,
data = zt._z.data,
event = zt._z.event;
data.exSetting(_setting);
data.addInitBind(_bindEvent);
data.addInitCache(_initCache);
data.addInitNode(_initNode);
data.addInitProxy(_eventProxy);
data.addInitRoot(_initRoot);
data.addBeforeA(_beforeA);
data.addZTreeTools(_zTreeTools);
var _createNodes = view.createNodes;
view.createNodes = function(setting, level, nodes, parentNode) {
if (_createNodes) _createNodes.apply(view, arguments);
if (!nodes) return;
view.repairParentChkClassWithSelf(setting, parentNode);
}
var _removeNode = view.removeNode;
view.removeNode = function(setting, node) {
var parentNode = node.getParentNode();
if (_removeNode) _removeNode.apply(view, arguments);
if (!node || !parentNode) return;
view.repairChkClass(setting, parentNode);
view.repairParentChkClass(setting, parentNode);
}
})(jQuery);
File diff suppressed because it is too large Load Diff
+53
View File
@@ -0,0 +1,53 @@
/*
* JQuery zTree exedit 3.0 beta
* http://code.google.com/p/jquerytree/
*
* Copyright (c) 2010 Hunter.z (baby666.cn)
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2011-09-01
*/
(function(l){var C={onHoverOverNode:function(b,a){var c=o.getSetting(b.data.treeId),d=o.getRoot(c);if(d.curHoverNode!=a)C.onHoverOutNode(b);d.curHoverNode=a;g.addHoverDom(c,a)},onHoverOutNode:function(b){var b=o.getSetting(b.data.treeId),a=o.getRoot(b);if(a.curHoverNode&&!o.isSelectedNode(b,a.curHoverNode))g.removeTreeDom(b,a.curHoverNode),a.curHoverNode=null},onMousedownNode:function(b,a){function c(b){if(!j.uCanDo(f))return!0;if(A.dragFlag==0&&Math.abs(H-b.clientX)<f.edit.drag.minMoveSize&&Math.abs(I-
b.clientY)<f.edit.drag.minMoveSize)return!0;var a,c,e,h,i;i=f.data.key.childs;j.noSel(f);l("body").css("cursor","pointer");if(A.dragFlag==0){if(j.apply(f.callback.beforeDrag,[f.treeId,n],!0)==!1)return m(b),!0;for(a=0,c=n.length;a<c;a++){if(a==0)A.dragNodeShowBefore=[];e=n[a];e.isParent&&e.open?(g.expandCollapseNode(f,e,!e.open),A.dragNodeShowBefore[e.tId]=!0):A.dragNodeShowBefore[e.tId]=!1}A.dragFlag=1;A.showHoverDom=!1;j.showIfameMask(f,!0);e=!0;h=-1;if(n.length>1){var t=n[0].parentTId?n[0].getParentNode()[i]:
o.getNodes(f);i=[];for(a=0,c=t.length;a<c;a++)if(A.dragNodeShowBefore[t[a].tId]!==void 0&&(e&&h>-1&&h+1!==a&&(e=!1),i.push(t[a]),h=a),n.length===i.length){n=i;break}}e&&(C=n[0].getPreNode(),K=n[n.length-1].getNextNode());x=l("<ul class='zTreeDragUL'></ul>");for(a=0,c=n.length;a<c;a++)if(e=n[a],e.editNameFlag=!1,g.selectNode(f,e,a>0),g.removeTreeDom(f,e),h=l("<li id='"+e.tId+"_tmp'></li>"),h.append(l("#"+e.tId+d.id.A).clone()),h.css("padding","0"),h.children("#"+e.tId+d.id.A).removeClass(d.node.CURSELECTED),
x.append(h),a==f.edit.drag.maxShowNodeNum-1){h=l("<li id='"+e.tId+"_moretmp'><a> ... </a></li>");x.append(h);break}x.attr("id",n[0].tId+d.id.UL+"_tmp");x.addClass(f.treeObj.attr("class"));x.appendTo("body");v=l("<button class='tmpzTreeMove_arrow'></button>");v.attr("id","zTreeMove_arrow_tmp");v.appendTo("body");f.treeObj.trigger(d.event.DRAG,[f.treeId,n])}if(A.dragFlag==1&&v.attr("id")!=b.target.id){p&&(p.removeClass(d.node.TMPTARGET_TREE),w&&l("#"+w+d.id.A,p).removeClass(d.node.TMPTARGET_NODE));
w=p=null;D=!1;k=f;e=o.getSettings();for(var r in e)if(e[r].edit.enable&&e[r].treeId!=f.treeId&&(b.target.id==e[r].treeId||l(b.target).parents("#"+e[r].treeId).length>0))D=!0,k=e[r];r=y.scrollTop();h=y.scrollLeft();i=k.treeObj.offset();a=k.treeObj.get(0).scrollHeight;e=k.treeObj.get(0).scrollWidth;c=b.clientY+r-i.top;var E=k.treeObj.height()+i.top-b.clientY-r,F=b.clientX+h-i.left,q=k.treeObj.width()+i.left-b.clientX-h;i=c<f.edit.drag.borderMax&&c>f.edit.drag.borderMin;var t=E<f.edit.drag.borderMax&&
E>f.edit.drag.borderMin,s=F<f.edit.drag.borderMax&&F>f.edit.drag.borderMin,O=q<f.edit.drag.borderMax&&q>f.edit.drag.borderMin,E=c>f.edit.drag.borderMin&&E>f.edit.drag.borderMin&&F>f.edit.drag.borderMin&&q>f.edit.drag.borderMin,F=i&&k.treeObj.scrollTop()<=0,q=t&&k.treeObj.scrollTop()+k.treeObj.height()+10>=a,J=s&&k.treeObj.scrollLeft()<=0,P=O&&k.treeObj.scrollLeft()+k.treeObj.width()+10>=e;if(b.target.id&&k.treeObj.find("#"+b.target.id).length>0){for(var B=b.target;B&&B.tagName&&!j.eqs(B.tagName,"li")&&
B.id!=k.treeId;)B=B.parentNode;var L=!0;for(a=0,c=n.length;a<c;a++)if(e=n[a],B.id===e.tId){L=!1;break}else if(l("#"+e.tId).find("#"+B.id).length>0){L=!1;break}if(L&&b.target.id&&(b.target.id==B.id+d.id.A||l(b.target).parents("#"+B.id+d.id.A).length>0))p=l(B),w=B.id}e=n[0];if(E&&(b.target.id==k.treeId||l(b.target).parents("#"+k.treeId).length>0)){if(!p&&(b.target.id==k.treeId||F||q||J||P)&&(D||!D&&e.parentTId))p=k.treeObj;i?k.treeObj.scrollTop(k.treeObj.scrollTop()-10):t&&k.treeObj.scrollTop(k.treeObj.scrollTop()+
10);s?k.treeObj.scrollLeft(k.treeObj.scrollLeft()-10):O&&k.treeObj.scrollLeft(k.treeObj.scrollLeft()+10);p&&p!=k.treeObj&&p.offset().left<k.treeObj.offset().left&&k.treeObj.scrollLeft(k.treeObj.scrollLeft()+p.offset().left-k.treeObj.offset().left)}x.css({top:b.clientY+r+3+"px",left:b.clientX+h+3+"px"});h=a=0;if(p&&p.attr("id")!=k.treeId){var z=w==null?null:o.getNodeCache(k,w);c=b.ctrlKey&&f.edit.drag.isMove&&f.edit.drag.isCopy||!f.edit.drag.isMove&&f.edit.drag.isCopy;a=!!(C&&w===C.tId);i=!!(K&&w===
K.tId);h=e.parentTId&&e.parentTId==w;e=(c||!i)&&j.apply(k.edit.drag.prev,[k.treeId,z],!!k.edit.drag.prev);a=(c||!a)&&j.apply(k.edit.drag.next,[k.treeId,z],!!k.edit.drag.next);i=(c||!h)&&!(k.data.keep.leaf&&!z.isParent)&&j.apply(k.edit.drag.inner,[k.treeId,z],!!k.edit.drag.inner);if(!e&&!a&&!i){if(p=null,w="",u=d.move.TYPE_INNER,v.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null}else{c=l("#"+w+d.id.A,p);c.addClass(d.node.TMPTARGET_NODE);
h=e?i?0.25:a?0.5:1:-1;i=a?i?0.75:e?0.5:0:-1;b=(b.clientY+r-c.offset().top)/c.height();(h==1||b<=h&&b>=-0.2)&&e?(a=1-v.width(),h=0-v.height()/2,u=d.move.TYPE_PREV):(i==0||b>=i&&b<=1.2)&&a?(a=1-v.width(),h=c.height()-v.height()/2,u=d.move.TYPE_NEXT):(a=5-v.width(),h=0,u=d.move.TYPE_INNER);v.css({display:"block",top:c.offset().top+h+"px",left:c.offset().left+a+"px"});if(M!=w||N!=u)G=(new Date).getTime();if(z&&z.isParent&&u==d.move.TYPE_INNER&&(b=!0,window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId!==
z.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===z.tId&&(b=!1),b))window.zTreeMoveTimer=setTimeout(function(){u==d.move.TYPE_INNER&&z&&z.isParent&&!z.open&&(new Date).getTime()-G>k.edit.drag.autoOpenTime&&j.apply(k.callback.beforeDragOpen,[k.treeId,z],!0)&&g.switchNode(k,z)},k.edit.drag.autoOpenTime+50),window.zTreeMoveTargetNodeTId=z.tId}}else if(u=d.move.TYPE_INNER,p&&j.apply(k.edit.drag.inner,[k.treeId,z],!!k.edit.drag.inner)?
p.addClass(d.node.TMPTARGET_TREE):p=null,v.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;M=w;N=u}return!1}function m(b){if(window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;N=M=null;y.unbind("mousemove",c);y.unbind("mouseup",m);y.unbind("selectstart",e);l("body").css("cursor","auto");p&&(p.removeClass(d.node.TMPTARGET_TREE),w&&l("#"+w+d.id.A,p).removeClass(d.node.TMPTARGET_NODE));j.showIfameMask(f,
!1);A.showHoverDom=!0;if(A.dragFlag!=0){A.dragFlag=0;var a,h,i,q=f.data.key.childs;for(a=0,h=n.length;a<h;a++)i=n[a],i.isParent&&A.dragNodeShowBefore[i.tId]&&!i.open&&(g.expandCollapseNode(f,i,!i.open),delete A.dragNodeShowBefore[i.tId]);x&&x.remove();v&&v.remove();var s=b.ctrlKey&&f.edit.drag.isMove&&f.edit.drag.isCopy||!f.edit.drag.isMove&&f.edit.drag.isCopy;!s&&p&&w&&n[0].parentTId&&w==n[0].parentTId&&u==d.move.TYPE_INNER&&(p=null);if(p){var t=w==null?null:o.getNodeCache(k,w);if(j.apply(f.callback.beforeDrop,
[k.treeId,n,t,u],!0)!=!1){var r=s?j.clone(n):n,b=function(){if(D){if(!s)for(var b=0,a=n.length;b<a;b++)g.removeNode(f,n[b]);if(u==d.move.TYPE_INNER)g.addNodes(k,t,r);else if(g.addNodes(k,t.getParentNode(),r),u==d.move.TYPE_PREV)for(b=0,a=r.length;b<a;b++)g.moveNode(k,t,r[b],u,!1);else for(b=-1,a=r.length-1;b<a;a--)g.moveNode(k,t,r[a],u,!1)}else if(s&&u==d.move.TYPE_INNER)g.addNodes(k,t,r);else if(s&&g.addNodes(k,t.getParentNode(),r),u==d.move.TYPE_PREV)for(b=0,a=r.length;b<a;b++)g.moveNode(k,t,r[b],
u,!1);else for(b=-1,a=r.length-1;b<a;a--)g.moveNode(k,t,r[a],u,!1);for(b=0,a=r.length;b<a;b++)g.selectNode(k,r[b],b>0);l("#"+r[0].tId+d.id.ICON).focus().blur()};u==d.move.TYPE_INNER&&k.async.enable&&t&&t.isParent&&(!t[q]||t[q].length===0)?g.asyncNode(k,t,!1,b):b();f.treeObj.trigger(d.event.DROP,[k.treeId,r,t,u])}}else{for(a=0,h=n.length;a<h;a++)g.selectNode(k,n[a],a>0);f.treeObj.trigger(d.event.DROP,[f.treeId,null,null,null])}}}function e(){return!1}var h,i,f=o.getSetting(b.data.treeId),A=o.getRoot(f);
if(b.button==2||!f.edit.enable||!f.edit.drag.isCopy&&!f.edit.drag.isMove)return!0;var s=b.target,q=o.getRoot(f).curSelectedList,n=[];if(o.isSelectedNode(f,a))for(h=0,i=q.length;h<i;h++){if(q[h].editNameFlag&&j.eqs(s.tagName,"input")&&s.getAttribute("treeNode"+d.id.INPUT)!==null)return!0;n.push(q[h]);if(n[0].parentTId!==q[h].parentTId){n=[a];break}}else n=[a];var y=l(document),x,v,p,D=!1,k=f,C,K,M=null,N=null,w=null,u=d.move.TYPE_INNER,H=b.clientX,I=b.clientY,G=(new Date).getTime();y.bind("mousemove",
c);y.bind("mouseup",m);y.bind("selectstart",e);return!0}},s={tools:{getAbs:function(b){b=b.getBoundingClientRect();return[b.left,b.top]},inputFocus:function(b){b.get(0)&&(b.focus(),j.setCursorPosition(b.get(0),b.val().length))},setCursorPosition:function(b,a){if(b.setSelectionRange)b.focus(),b.setSelectionRange(a,a);else if(b.createTextRange){var c=b.createTextRange();c.collapse(!0);c.moveEnd("character",a);c.moveStart("character",a);c.select()}},showIfameMask:function(b,a){for(var c=o.getRoot(b);c.dragMaskList.length>
0;)c.dragMaskList[0].remove(),c.dragMaskList.shift();if(a)for(var d=l("iframe"),e=0,h=d.length;e<h;e++){var g=d.get(e),f=j.getAbs(g),g=l("<div id='zTreeMask_"+e+"' class='zTreeMask' style='background-color:yellow;opacity: 0.3;filter: alpha(opacity=30); top:"+f[1]+"px; left:"+f[0]+"px; width:"+g.offsetWidth+"px; height:"+g.offsetHeight+"px;'></div>");g.appendTo("body");c.dragMaskList.push(g)}}},view:{addEditBtn:function(b,a){if(!(a.editNameFlag||l("#"+a.tId+d.id.EDIT).length>0)&&j.apply(b.edit.showRenameBtn,
[b.treeId,a],b.edit.showRenameBtn)){var c=l("#"+a.tId+d.id.A),m="<button type='button' class='edit' id='"+a.tId+d.id.EDIT+"' title='"+j.apply(b.edit.renameTitle,[b.treeId,a],b.edit.renameTitle)+"' treeNode"+d.id.EDIT+" onfocus='this.blur();' style='display:none;'></button>";c.append(m);l("#"+a.tId+d.id.EDIT).bind("click",function(){if(!j.uCanDo(b))return!0;g.editNode(b,a);return!1}).show()}},addRemoveBtn:function(b,a){if(!(a.editNameFlag||l("#"+a.tId+d.id.REMOVE).length>0)&&j.apply(b.edit.showRemoveBtn,
[b.treeId,a],b.edit.showRemoveBtn)){var c=l("#"+a.tId+d.id.A),m="<button type='button' class='remove' id='"+a.tId+d.id.REMOVE+"' title='"+j.apply(b.edit.removeTitle,[b.treeId,a],b.edit.removeTitle)+"' treeNode"+d.id.REMOVE+" onfocus='this.blur();' style='display:none;'></button>";c.append(m);l("#"+a.tId+d.id.REMOVE).bind("click",function(){if(!j.uCanDo(b)||j.apply(b.callback.beforeRemove,[b.treeId,a],!0)==!1)return!0;g.removeNode(b,a);b.treeObj.trigger(d.event.REMOVE,[b.treeId,a]);return!1}).bind("mousedown",
function(){return!0}).show()}},addHoverDom:function(b,a){if(o.getRoot(b).showHoverDom)a.isHover=!0,b.edit.enable&&(g.addEditBtn(b,a),g.addRemoveBtn(b,a)),j.apply(b.view.addHoverDom,[b.treeId,a])},cancelCurEditNode:function(b,a){var c=o.getRoot(b),m=b.data.key.name,e=c.curEditNode;if(e){var h=c.curEditInput,a=a?a:h.val();if(a!==e[m])if(j.apply(b.callback.beforeRename,[b.treeId,e,a],!0)===!1)return e.editNameStatus=!0,j.inputFocus(h),!1;else e[m]=a?a:h.val(),b.treeObj.trigger(d.event.RENAME,[b.treeId,
e]);l("#"+e.tId+d.id.A).removeClass(d.node.CURSELECTED_EDIT);h.unbind();g.setNodeName(b,e);e.editNameFlag=!1;c.curEditNode=null;c.curEditInput=null;g.selectNode(b,e,!1)}return c.noSelection=!0},editNode:function(b,a){var c=o.getRoot(b);if(!o.isSelectedNode(b,a)||!(c.curEditNode==a&&a.editNameFlag)){var m=b.data.key.name;a.editNameFlag=!0;g.removeTreeDom(b,a);g.cancelCurEditNode(b);g.selectNode(b,a,!1);l("#"+a.tId+d.id.SPAN).html("<input type=text class='rename' id='"+a.tId+d.id.INPUT+"' treeNode"+
d.id.INPUT+" >");var e=l("#"+a.tId+d.id.INPUT);e.attr("value",a[m]);j.inputFocus(e);e.bind("blur",function(){g.cancelCurEditNode(b)}).bind("keyup",function(c){c.keyCode=="13"?g.cancelCurEditNode(b):c.keyCode=="27"&&g.cancelCurEditNode(b,a[m])}).bind("click",function(){return!1}).bind("dblclick",function(){return!1});l("#"+a.tId+d.id.A).addClass(d.node.CURSELECTED_EDIT);c.curEditInput=e;c.noSelection=!1;c.curEditNode=a}},moveNode:function(b,a,c,m,e,h){var i=o.getRoot(b),f=b.data.key.childs;if(a!=c&&
(!b.data.keep.leaf||!a||a.isParent||m!=d.move.TYPE_INNER)){var j=c.parentTId?c.getParentNode():i,s=a===null||a==i;s&&a===null&&(a=i);if(s)m=d.move.TYPE_INNER;i=a.parentTId?a.getParentNode():i;if(m!=d.move.TYPE_PREV&&m!=d.move.TYPE_NEXT)m=d.move.TYPE_INNER;var q,n;s?n=q=b.treeObj:h||(m==d.move.TYPE_INNER?g.expandCollapseNode(b,a,!0,!1):g.expandCollapseNode(b,a.getParentNode(),!0,!1),q=l("#"+a.tId),n=l("#"+a.tId+d.id.UL));var y=l("#"+c.tId).remove();n&&m==d.move.TYPE_INNER?n.append(y):q&&m==d.move.TYPE_PREV?
q.before(y):q&&m==d.move.TYPE_NEXT&&q.after(y);var x=-1,v=0,p=null;q=null;var C=c.level;if(c.isFirstNode){if(x=0,j[f].length>1)p=j[f][1],p.isFirstNode=!0}else if(c.isLastNode)x=j[f].length-1,p=j[f][x-1],p.isLastNode=!0;else for(n=0,y=j[f].length;n<y;n++)if(j[f][n].tId==c.tId){x=n;break}x>=0&&j[f].splice(x,1);if(m!=d.move.TYPE_INNER)for(n=0,y=i[f].length;n<y;n++)i[f][n].tId==a.tId&&(v=n);if(m==d.move.TYPE_INNER){s?c.parentTId=null:(a.isParent=!0,a.open=!1,c.parentTId=a.tId);a[f]||(a[f]=[]);if(a[f].length>
0)q=a[f][a[f].length-1],q.isLastNode=!1;a[f].splice(a[f].length,0,c);c.isLastNode=!0;c.isFirstNode=a[f].length==1}else a.isFirstNode&&m==d.move.TYPE_PREV?(i[f].splice(v,0,c),q=a,q.isFirstNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!0,c.isLastNode=!1):a.isLastNode&&m==d.move.TYPE_NEXT?(i[f].splice(v+1,0,c),q=a,q.isLastNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!0):(m==d.move.TYPE_PREV?i[f].splice(v,0,c):i[f].splice(v+1,0,c),c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=
!1);o.fixPIdKeyValue(b,c);o.setSonNodeLevel(b,c.getParentNode(),c);g.setNodeLineIcos(b,c);g.repairNodeLevelClass(b,c,C);!b.data.keep.parent&&j[f].length<1?(j.isParent=!1,j.open=!1,a=l("#"+j.tId+d.id.UL),m=l("#"+j.tId+d.id.SWITCH),f=l("#"+j.tId+d.id.ICON),g.replaceSwitchClass(m,d.folder.DOCU),g.replaceIcoClass(j,f,d.folder.DOCU),a.css("display","none")):p&&g.setNodeLineIcos(b,p);q&&g.setNodeLineIcos(b,q);b.checkable&&(g.repairChkClass(b,j),g.repairParentChkClassWithSelf(b,j),j!=c.parent&&g.repairParentChkClassWithSelf(b,
c));h||g.expandCollapseParentNode(b,c.getParentNode(),!0,e)}},removeChilds:function(b,a){if(a){var c=b.data.key.childs,m=a[c];if(m){l("#"+a.tId+d.id.UL).remove();for(var e=0,h=m.length;e<h;e++)o.removeNodeCache(b,m[e]);o.removeSelectedNode(b);delete a[c];if(!b.data.keep.parent)a.isParent=!1,a.open=!1,c=l("#"+a.tId+d.id.SWITCH),m=l("#"+a.tId+d.id.ICON),g.replaceSwitchClass(c,d.folder.DOCU),g.replaceIcoClass(a,m,d.folder.DOCU)}}},removeEditBtn:function(b){l("#"+b.tId+d.id.EDIT).unbind().remove()},removeNode:function(b,
a){var c=o.getRoot(b),m=b.data.key.childs,e=a.parentTId?a.getParentNode():c;if(c.curEditNode===a)c.curEditNode=null;l("#"+a.tId).remove();o.removeNodeCache(b,a);o.removeSelectedNode(b,a);for(var h=0,i=e[m].length;h<i;h++)if(e[m][h].tId==a.tId){e[m].splice(h,1);break}if(!b.data.keep.parent&&e[m].length<1)e.isParent=!1,e.open=!1,h=l("#"+e.tId+d.id.UL),i=l("#"+e.tId+d.id.SWITCH),c=l("#"+e.tId+d.id.ICON),g.replaceSwitchClass(i,d.folder.DOCU),g.replaceIcoClass(e,c,d.folder.DOCU),h.css("display","none");
else if(b.view.showLine&&e[m].length>0){var f=e[m][e[m].length-1];f.isLastNode=!0;f.isFirstNode=e[m].length==1;h=l("#"+f.tId+d.id.UL);i=l("#"+f.tId+d.id.SWITCH);l("#"+f.tId+d.id.ICON);e==c?e[m].length==1?g.replaceSwitchClass(i,d.line.ROOT):(e=l("#"+e[m][0].tId+d.id.SWITCH),g.replaceSwitchClass(e,d.line.ROOTS),g.replaceSwitchClass(i,d.line.BOTTOM)):g.replaceSwitchClass(i,d.line.BOTTOM);h.removeClass(d.line.LINE)}},removeRemoveBtn:function(b){l("#"+b.tId+d.id.REMOVE).unbind().remove()},removeTreeDom:function(b,
a){a.isHover=!1;g.removeEditBtn(a);g.removeRemoveBtn(a);j.apply(b.view.removeHoverDom,[b.treeId,a])},repairNodeLevelClass:function(b,a,c){if(c!==a.level){var b=l("#"+a.tId),m=l("#"+a.tId+d.id.A),e=l("#"+a.tId+d.id.UL),c="level"+c,a="level"+a.level;b.removeClass(c);b.addClass(a);m.removeClass(c);m.addClass(a);e.removeClass(c);e.addClass(a)}}},event:s,data:{setSonNodeLevel:function(b,a,c){if(c){var d=b.data.key.childs;c.level=a?a.level+1:0;if(c[d])for(var a=0,e=c[d].length;a<e;a++)c[d][a]&&o.setSonNodeLevel(b,
c,c[d][a])}}}};l.extend(!0,l.fn.zTree.consts,{event:{DRAG:"ztree_drag",DROP:"ztree_drop",REMOVE:"ztree_remove",RENAME:"ztree_rename"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}});l.extend(!0,l.fn.zTree._z,s);var s=l.fn.zTree,j=s._z.tools,d=s.consts,g=s._z.view,o=s._z.data,s=s._z.event;o.exSetting({edit:{enable:!1,showRemoveBtn:!0,
showRenameBtn:!0,removeTitle:"remove",renameTitle:"rename",drag:{isCopy:!0,isMove:!0,prev:!0,next:!0,inner:!0,minMoveSize:5,borderMax:10,borderMin:-5,maxShowNodeNum:5,autoOpenTime:500}},view:{addHoverDom:null,removeHoverDom:null},callback:{beforeDrag:null,beforeDragOpen:null,beforeDrop:null,beforeRemove:null,beforeRename:null,onDrag:null,onDrop:null,onRemove:null,onRename:null}});o.addInitBind(function(b){var a=b.treeObj,c=d.event;a.unbind(c.RENAME);a.bind(c.RENAME,function(a,c,d){j.apply(b.callback.onRename,
[a,c,d])});a.unbind(c.REMOVE);a.bind(c.REMOVE,function(a,c,d){j.apply(b.callback.onRemove,[a,c,d])});a.unbind(c.DRAG);a.bind(c.DRAG,function(a,c,d){j.apply(b.callback.onDrag,[a,c,d])});a.unbind(c.DROP);a.bind(c.DROP,function(a,c,d,g,f){j.apply(b.callback.onDrop,[a,c,d,g,f])})});o.addInitCache(function(){});o.addInitNode(function(b,a,c){if(c)c.isHover=!1,c.editNameFlag=!1});o.addInitProxy(function(b){var a=b.target,c=o.getSetting(b.data.treeId),g=b.relatedTarget,e="",h=null,i="",f=null,l=null;if(j.eqs(b.type,
"mouseover")){if(l=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+d.id.A}]))e=l.parentNode.id,i="hoverOverNode"}else if(j.eqs(b.type,"mouseout"))l=j.getMDom(c,g,[{tagName:"a",attrName:"treeNode"+d.id.A}]),l||(e="remove",i="hoverOutNode");else if(j.eqs(b.type,"mousedown")&&(l=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+d.id.A}])))e=l.parentNode.id,i="mousedownNode";if(e.length>0)switch(h=o.getNodeCache(c,e),i){case "mousedownNode":f=C.onMousedownNode;break;case "hoverOverNode":f=C.onHoverOverNode;
break;case "hoverOutNode":f=C.onHoverOutNode}return{stop:!1,node:h,nodeEventType:i,nodeEventCallback:f,treeEventType:"",treeEventCallback:null}});o.addInitRoot(function(b){b=o.getRoot(b);b.curEditNode=null;b.curEditInput=null;b.curHoverNode=null;b.dragFlag=0;b.dragNodeShowBefore=[];b.dragMaskList=[];b.showHoverDom=!0});o.addZTreeTools(function(b,a){a.addNodes=function(a,d,e){function h(){g.addNodes(b,a,f,e==!0)}if(!d)return null;a||(a=null);if(a&&!a.isParent&&b.data.keep.leaf)return null;var i=b.data.key.childs,
f=j.clone(j.isArray(d)?d:[d]);this.setting.async.enable&&a&&a.isParent&&(!a[i]||a[i].length===0)?g.asyncNode(b,a,e,h):h();return f};a.cancelEditName=function(a){var d=o.getRoot(b),e=b.data.key.name,h=d.curEditNode;d.curEditNode&&g.cancelCurEditNode(b,a?a:h[e])};a.copyNode=function(a,m,e,h){if(!m)return null;if(a&&!a.isParent&&b.data.keep.leaf&&e===d.move.TYPE_INNER)return null;var i=b.data.key.childs,f=j.clone(m);if(!a)a=null,e=d.move.TYPE_INNER;e==d.move.TYPE_INNER?(m=function(){g.addNodes(b,a,[f],
h)},b.async.enable&&a&&a.isParent&&(!a[i]||a[i].length===0)?g.asyncNode(b,a,h,m):m()):(g.addNodes(b,a.parentNode,[f],h),g.moveNode(b,a,f,e,!1,h));return f};a.editName=function(a){a&&a.tId&&a===o.getNodeCache(b,a.tId)&&j.uCanDo(b)&&(g.expandCollapseParentNode(b,a,!0),g.editNode(b,a))};a.moveNode=function(a,m,e,h){function i(){g.moveNode(b,a,m,e,!1,h)}if(!m)return m;if(a&&!a.isParent&&b.data.keep.leaf&&e===d.move.TYPE_INNER)return null;else if(a&&(m.parentTId==a.tId&&e==d.move.TYPE_INNER||l("#"+m.tId).find("#"+
a.tId).length>0))return null;else a||(a=null);var f=b.data.key.childs;b.async.enable&&a&&a.isParent&&(!a[f]||a[f].length===0)?g.asyncNode(b,a,h,i):i();return m};a.removeNode=function(a){a&&j.apply(b.callback.beforeRemove,[b.treeId,a],!0)!=!1&&(g.removeNode(b,a),this.setting.treeObj.trigger(d.event.REMOVE,[b.treeId,a]))};a.removeChilds=function(a){if(!a)return null;var d=a[b.data.key.childs];g.removeChilds(b,a);return d?d:null};a.setEditable=function(a){b.edit.enable=a;return this.refresh()}});var H=
g.cancelPreSelectedNode;g.cancelPreSelectedNode=function(b,a){for(var c=o.getRoot(b).curSelectedList,d=0,e=c.length;d<e;d++)if(!a||a===c[d])if(g.removeTreeDom(b,c[d]),a)break;H&&H.apply(g,arguments)};var I=g.createNodes;g.createNodes=function(b,a,c,d){I&&I.apply(g,arguments);c&&g.repairParentChkClassWithSelf(b,d)};g.makeNodeUrl=function(b,a){return a.url&&!b.edit.enable?a.url:null};var G=g.selectNode;g.selectNode=function(b,a,c){var d=o.getRoot(b);if(o.isSelectedNode(b,a)&&d.curEditNode==a&&a.editNameFlag)return!1;
G&&G.apply(g,arguments);g.addHoverDom(b,a);return!0};var J=j.uCanDo;j.uCanDo=function(b,a){var c=o.getRoot(b);return a&&(j.eqs(a.type,"mouseover")||j.eqs(a.type,"mouseout")||j.eqs(a.type,"mousedown")||j.eqs(a.type,"mouseup"))?!0:!c.curEditNode&&(J?J.apply(g,arguments):!0)}})(jQuery);