Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
public.component.assets.e-all-min-ie.js Maven / Gradle / Ivy
/* * jQuery JavaScript Library v1.11.2 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-12-17T15:27Z */(function(b,a){if(typeof module==="object"&&typeof module.exports==="object"){module.exports=b.document?a(b,true):function(c){if(!c.document){throw new Error("jQuery requires a window with a document")}return a(c)}}else{a(b)}}(typeof window!=="undefined"?window:this,function(a4,au){var aO=[];var O=aO.slice;var ay=aO.concat;var w=aO.push;var bT=aO.indexOf;var ab={};var x=ab.toString;var J=ab.hasOwnProperty;var C={};var ah="1.11.2",bH=function(e,i){return new bH.fn.init(e,i)},D=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,bR=/^-ms-/,aV=/-([\da-z])/gi,N=function(e,i){return i.toUpperCase()};bH.fn=bH.prototype={jquery:ah,constructor:bH,selector:"",length:0,toArray:function(){return O.call(this)},get:function(e){return e!=null?(e<0?this[e+this.length]:this[e]):O.call(this)},pushStack:function(e){var i=bH.merge(this.constructor(),e);i.prevObject=this;i.context=this.context;return i},each:function(i,e){return bH.each(this,i,e)},map:function(e){return this.pushStack(bH.map(this,function(b6,b5){return e.call(b6,b5,b6)}))},slice:function(){return this.pushStack(O.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(b6){var e=this.length,b5=+b6+(b6<0?e:0);return this.pushStack(b5>=0&&b5=0},isEmptyObject:function(i){var e;for(e in i){return false}return true},isPlainObject:function(b6){var i;if(!b6||bH.type(b6)!=="object"||b6.nodeType||bH.isWindow(b6)){return false}try{if(b6.constructor&&!J.call(b6,"constructor")&&!J.call(b6.constructor.prototype,"isPrototypeOf")){return false}}catch(b5){return false}if(C.ownLast){for(i in b6){return J.call(b6,i)}}for(i in b6){}return i===undefined||J.call(b6,i)},type:function(e){if(e==null){return e+""}return typeof e==="object"||typeof e==="function"?ab[x.call(e)]||"object":typeof e},globalEval:function(e){if(e&&bH.trim(e)){(a4.execScript||function(i){a4["eval"].call(a4,i)})(e)}},camelCase:function(e){return e.replace(bR,"ms-").replace(aV,N)},nodeName:function(i,e){return i.nodeName&&i.nodeName.toLowerCase()===e.toLowerCase()},each:function(b9,ca,b5){var b8,b6=0,b7=b9.length,e=ac(b9);if(b5){if(e){for(;b60&&(i-1) in b5}var m=/* * Sizzle CSS Selector Engine v2.2.0-pre * http://sizzlejs.com/ * * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-12-16 */(function(dd){var cx,dg,cm,cG,cJ,ch,cV,df,dl,cH,cW,cY,cB,cn,c7,c2,de,cd,cE,c9="sizzle"+1*new Date(),cI=dd.document,dh=0,c3=0,b8=cz(),c8=cz(),cF=cz(),cD=function(i,e){if(i===e){cW=true}return 0},cP=1<<31,cN=({}).hasOwnProperty,db=[],dc=db.pop,cL=db.push,b6=db.push,cl=db.slice,cc=function(dp,dn){var dm=0,e=dp.length;for(;dm+~]|"+co+")"+co+"*"),cs=new RegExp("="+co+"*([^\\]'\"]*?)"+co+"*\\]","g"),cR=new RegExp(cj),cT=new RegExp("^"+cK+"$"),c1={ID:new RegExp("^#("+b5+")"),CLASS:new RegExp("^\\.("+b5+")"),TAG:new RegExp("^("+b5.replace("w","w*")+")"),ATTR:new RegExp("^"+c5),PSEUDO:new RegExp("^"+cj),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+co+"*(even|odd|(([+-]|)(\\d*)n|)"+co+"*(?:([+-]|)"+co+"*(\\d+)|))"+co+"*\\)|)","i"),bool:new RegExp("^(?:"+b7+")$","i"),needsContext:new RegExp("^"+co+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+co+"*((?:-\\d)?\\d*)"+co+"*\\)|)(?=[^-]|$)","i")},cb=/^(?:input|select|textarea|button)$/i,ck=/^h\d$/i,cO=/^[^{]+\{\s*\[native \w/,cQ=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,c0=/[+~]/,cM=/'|\\/g,cr=new RegExp("\\\\([\\da-f]{1,6}"+co+"?|("+co+")|.)","ig"),c4=function(e,dn,i){var dm="0x"+dn-65536;return dm!==dm||i?dn:dm<0?String.fromCharCode(dm+65536):String.fromCharCode(dm>>10|55296,dm&1023|56320)},dk=function(){cY()};try{b6.apply((db=cl.call(cI.childNodes)),cI.childNodes);db[cI.childNodes.length].nodeType}catch(cC){b6={apply:db.length?function(i,e){cL.apply(i,cl.call(e))}:function(dp,dn){var e=dp.length,dm=0;while((dp[e++]=dn[dm++])){}dp.length=e-1}}}function cv(du,dm,dy,dA){var dz,dr,ds,dw,dx,dq,dp,e,dn,dv;if((dm?dm.ownerDocument||dm:cI)!==cB){cY(dm)}dm=dm||cB;dy=dy||[];dw=dm.nodeType;if(typeof du!=="string"||!du||dw!==1&&dw!==9&&dw!==11){return dy}if(!dA&&c7){if(dw!==11&&(dz=cQ.exec(du))){if((ds=dz[1])){if(dw===9){dr=dm.getElementById(ds);if(dr&&dr.parentNode){if(dr.id===ds){dy.push(dr);return dy}}else{return dy}}else{if(dm.ownerDocument&&(dr=dm.ownerDocument.getElementById(ds))&&cE(dm,dr)&&dr.id===ds){dy.push(dr);return dy}}}else{if(dz[2]){b6.apply(dy,dm.getElementsByTagName(du));return dy}else{if((ds=dz[3])&&dg.getElementsByClassName){b6.apply(dy,dm.getElementsByClassName(ds));return dy}}}}if(dg.qsa&&(!c2||!c2.test(du))){e=dp=c9;dn=dm;dv=dw!==1&&du;if(dw===1&&dm.nodeName.toLowerCase()!=="object"){dq=ch(du);if((dp=dm.getAttribute("id"))){e=dp.replace(cM,"\\$&")}else{dm.setAttribute("id",e)}e="[id='"+e+"'] ";dx=dq.length;while(dx--){dq[dx]=e+cg(dq[dx])}dn=c0.test(du)&&cS(dm.parentNode)||dm;dv=dq.join(",")}if(dv){try{b6.apply(dy,dn.querySelectorAll(dv));return dy}catch(dt){}finally{if(!dp){dm.removeAttribute("id")}}}}}return df(du.replace(cq,"$1"),dm,dy,dA)}function cz(){var i=[];function e(dm,dn){if(i.push(dm+" ")>cm.cacheLength){delete e[i.shift()]}return(e[dm+" "]=dn)}return e}function ci(e){e[c9]=true;return e}function ce(i){var dn=cB.createElement("div");try{return !!i(dn)}catch(dm){return false}finally{if(dn.parentNode){dn.parentNode.removeChild(dn)}dn=null}}function di(dm,dp){var e=dm.split("|"),dn=dm.length;while(dn--){cm.attrHandle[e[dn]]=dp}}function b9(i,e){var dn=e&&i,dm=dn&&i.nodeType===1&&e.nodeType===1&&(~e.sourceIndex||cP)-(~i.sourceIndex||cP);if(dm){return dm}if(dn){while((dn=dn.nextSibling)){if(dn===e){return -1}}}return i?1:-1}function cw(e){return function(dm){var i=dm.nodeName.toLowerCase();return i==="input"&&dm.type===e}}function ca(e){return function(dm){var i=dm.nodeName.toLowerCase();return(i==="input"||i==="button")&&dm.type===e}}function c6(e){return ci(function(i){i=+i;return ci(function(dm,dr){var dp,dn=e([],dm.length,i),dq=dn.length;while(dq--){if(dm[(dp=dn[dq])]){dm[dp]=!(dr[dp]=dm[dp])}}})})}function cS(e){return e&&typeof e.getElementsByTagName!=="undefined"&&e}dg=cv.support={};cJ=cv.isXML=function(e){var i=e&&(e.ownerDocument||e).documentElement;return i?i.nodeName!=="HTML":false};cY=cv.setDocument=function(dm){var e,i,dn=dm?dm.ownerDocument||dm:cI;if(dn===cB||dn.nodeType!==9||!dn.documentElement){return cB}cB=dn;cn=dn.documentElement;i=dn.defaultView;if(i&&i!==i.top){if(i.addEventListener){i.addEventListener("unload",dk,false)}else{if(i.attachEvent){i.attachEvent("onunload",dk)}}}c7=!cJ(dn);dg.attributes=ce(function(dp){dp.className="i";return !dp.getAttribute("className")});dg.getElementsByTagName=ce(function(dp){dp.appendChild(dn.createComment(""));return !dp.getElementsByTagName("*").length});dg.getElementsByClassName=cO.test(dn.getElementsByClassName);dg.getById=ce(function(dp){cn.appendChild(dp).id=c9;return !dn.getElementsByName||!dn.getElementsByName(c9).length});if(dg.getById){cm.find.ID=function(dr,dq){if(typeof dq.getElementById!=="undefined"&&c7){var dp=dq.getElementById(dr);return dp&&dp.parentNode?[dp]:[]}};cm.filter.ID=function(dq){var dp=dq.replace(cr,c4);return function(dr){return dr.getAttribute("id")===dp}}}else{delete cm.find.ID;cm.filter.ID=function(dq){var dp=dq.replace(cr,c4);return function(ds){var dr=typeof ds.getAttributeNode!=="undefined"&&ds.getAttributeNode("id");return dr&&dr.value===dp}}}cm.find.TAG=dg.getElementsByTagName?function(dp,dq){if(typeof dq.getElementsByTagName!=="undefined"){return dq.getElementsByTagName(dp)}else{if(dg.qsa){return dq.querySelectorAll(dp)}}}:function(dp,dt){var du,ds=[],dr=0,dq=dt.getElementsByTagName(dp);if(dp==="*"){while((du=dq[dr++])){if(du.nodeType===1){ds.push(du)}}return ds}return dq};cm.find.CLASS=dg.getElementsByClassName&&function(dq,dp){if(c7){return dp.getElementsByClassName(dq)}};de=[];c2=[];if((dg.qsa=cO.test(dn.querySelectorAll))){ce(function(dp){cn.appendChild(dp).innerHTML=" ";if(dp.querySelectorAll("[msallowcapture^='']").length){c2.push("[*^$]="+co+"*(?:''|\"\")")}if(!dp.querySelectorAll("[selected]").length){c2.push("\\["+co+"*(?:value|"+b7+")")}if(!dp.querySelectorAll("[id~="+c9+"-]").length){c2.push("~=")}if(!dp.querySelectorAll(":checked").length){c2.push(":checked")}if(!dp.querySelectorAll("a#"+c9+"+*").length){c2.push(".#.+[+~]")}});ce(function(dq){var dp=dn.createElement("input");dp.setAttribute("type","hidden");dq.appendChild(dp).setAttribute("name","D");if(dq.querySelectorAll("[name=d]").length){c2.push("name"+co+"*[*^$|!~]?=")}if(!dq.querySelectorAll(":enabled").length){c2.push(":enabled",":disabled")}dq.querySelectorAll("*,:x");c2.push(",.*:")})}if((dg.matchesSelector=cO.test((cd=cn.matches||cn.webkitMatchesSelector||cn.mozMatchesSelector||cn.oMatchesSelector||cn.msMatchesSelector)))){ce(function(dp){dg.disconnectedMatch=cd.call(dp,"div");cd.call(dp,"[s!='']:x");de.push("!=",cj)})}c2=c2.length&&new RegExp(c2.join("|"));de=de.length&&new RegExp(de.join("|"));e=cO.test(cn.compareDocumentPosition);cE=e||cO.test(cn.contains)?function(dq,dp){var ds=dq.nodeType===9?dq.documentElement:dq,dr=dp&&dp.parentNode;return dq===dr||!!(dr&&dr.nodeType===1&&(ds.contains?ds.contains(dr):dq.compareDocumentPosition&&dq.compareDocumentPosition(dr)&16))}:function(dq,dp){if(dp){while((dp=dp.parentNode)){if(dp===dq){return true}}}return false};cD=e?function(dq,dp){if(dq===dp){cW=true;return 0}var dr=!dq.compareDocumentPosition-!dp.compareDocumentPosition;if(dr){return dr}dr=(dq.ownerDocument||dq)===(dp.ownerDocument||dp)?dq.compareDocumentPosition(dp):1;if(dr&1||(!dg.sortDetached&&dp.compareDocumentPosition(dq)===dr)){if(dq===dn||dq.ownerDocument===cI&&cE(cI,dq)){return -1}if(dp===dn||dp.ownerDocument===cI&&cE(cI,dp)){return 1}return cH?(cc(cH,dq)-cc(cH,dp)):0}return dr&4?-1:1}:function(dq,dp){if(dq===dp){cW=true;return 0}var dw,dt=0,dv=dq.parentNode,ds=dp.parentNode,dr=[dq],du=[dp];if(!dv||!ds){return dq===dn?-1:dp===dn?1:dv?-1:ds?1:cH?(cc(cH,dq)-cc(cH,dp)):0}else{if(dv===ds){return b9(dq,dp)}}dw=dq;while((dw=dw.parentNode)){dr.unshift(dw)}dw=dp;while((dw=dw.parentNode)){du.unshift(dw)}while(dr[dt]===du[dt]){dt++}return dt?b9(dr[dt],du[dt]):dr[dt]===cI?-1:du[dt]===cI?1:0};return dn};cv.matches=function(i,e){return cv(i,null,null,e)};cv.matchesSelector=function(dm,dp){if((dm.ownerDocument||dm)!==cB){cY(dm)}dp=dp.replace(cs,"='$1']");if(dg.matchesSelector&&c7&&(!de||!de.test(dp))&&(!c2||!c2.test(dp))){try{var i=cd.call(dm,dp);if(i||dg.disconnectedMatch||dm.document&&dm.document.nodeType!==11){return i}}catch(dn){}}return cv(dp,cB,null,[dm]).length>0};cv.contains=function(e,i){if((e.ownerDocument||e)!==cB){cY(e)}return cE(e,i)};cv.attr=function(dm,e){if((dm.ownerDocument||dm)!==cB){cY(dm)}var i=cm.attrHandle[e.toLowerCase()],dn=i&&cN.call(cm.attrHandle,e.toLowerCase())?i(dm,e,!c7):undefined;return dn!==undefined?dn:dg.attributes||!c7?dm.getAttribute(e):(dn=dm.getAttributeNode(e))&&dn.specified?dn.value:null};cv.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};cv.uniqueSort=function(dn){var dp,dq=[],e=0,dm=0;cW=!dg.detectDuplicates;cH=!dg.sortStable&&dn.slice(0);dn.sort(cD);if(cW){while((dp=dn[dm++])){if(dp===dn[dm]){e=dq.push(dm)}}while(e--){dn.splice(dq[e],1)}}cH=null;return dn};cG=cv.getText=function(dq){var dp,dm="",dn=0,e=dq.nodeType;if(!e){while((dp=dq[dn++])){dm+=cG(dp)}}else{if(e===1||e===9||e===11){if(typeof dq.textContent==="string"){return dq.textContent}else{for(dq=dq.firstChild;dq;dq=dq.nextSibling){dm+=cG(dq)}}}else{if(e===3||e===4){return dq.nodeValue}}}return dm};cm=cv.selectors={cacheLength:50,createPseudo:ci,match:c1,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(cr,c4);e[3]=(e[3]||e[4]||e[5]||"").replace(cr,c4);if(e[2]==="~="){e[3]=" "+e[3]+" "}return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if(e[1].slice(0,3)==="nth"){if(!e[3]){cv.error(e[0])}e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd"));e[5]=+((e[7]+e[8])||e[3]==="odd")}else{if(e[3]){cv.error(e[0])}}return e},PSEUDO:function(i){var e,dm=!i[6]&&i[2];if(c1.CHILD.test(i[0])){return null}if(i[3]){i[2]=i[4]||i[5]||""}else{if(dm&&cR.test(dm)&&(e=ch(dm,true))&&(e=dm.indexOf(")",dm.length-e)-dm.length)){i[0]=i[0].slice(0,e);i[2]=dm.slice(0,e)}}return i.slice(0,3)}},filter:{TAG:function(i){var e=i.replace(cr,c4).toLowerCase();return i==="*"?function(){return true}:function(dm){return dm.nodeName&&dm.nodeName.toLowerCase()===e}},CLASS:function(e){var i=b8[e+" "];return i||(i=new RegExp("(^|"+co+")"+e+"("+co+"|$)"))&&b8(e,function(dm){return i.test(typeof dm.className==="string"&&dm.className||typeof dm.getAttribute!=="undefined"&&dm.getAttribute("class")||"")})},ATTR:function(dm,i,e){return function(dp){var dn=cv.attr(dp,dm);if(dn==null){return i==="!="}if(!i){return true}dn+="";return i==="="?dn===e:i==="!="?dn!==e:i==="^="?e&&dn.indexOf(e)===0:i==="*="?e&&dn.indexOf(e)>-1:i==="$="?e&&dn.slice(-e.length)===e:i==="~="?(" "+dn.replace(ct," ")+" ").indexOf(e)>-1:i==="|="?dn===e||dn.slice(0,e.length+1)===e+"-":false}},CHILD:function(i,dp,dn,dq,dm){var ds=i.slice(0,3)!=="nth",e=i.slice(-4)!=="last",dr=dp==="of-type";return dq===1&&dm===0?function(dt){return !!dt.parentNode}:function(dz,dx,dC){var dt,dF,dA,dE,dB,dw,dy=ds!==e?"nextSibling":"previousSibling",dD=dz.parentNode,dv=dr&&dz.nodeName.toLowerCase(),du=!dC&&!dr;if(dD){if(ds){while(dy){dA=dz;while((dA=dA[dy])){if(dr?dA.nodeName.toLowerCase()===dv:dA.nodeType===1){return false}}dw=dy=i==="only"&&!dw&&"nextSibling"}return true}dw=[e?dD.firstChild:dD.lastChild];if(e&&du){dF=dD[c9]||(dD[c9]={});dt=dF[i]||[];dB=dt[0]===dh&&dt[1];dE=dt[0]===dh&&dt[2];dA=dB&&dD.childNodes[dB];while((dA=++dB&&dA&&dA[dy]||(dE=dB=0)||dw.pop())){if(dA.nodeType===1&&++dE&&dA===dz){dF[i]=[dh,dB,dE];break}}}else{if(du&&(dt=(dz[c9]||(dz[c9]={}))[i])&&dt[0]===dh){dE=dt[1]}else{while((dA=++dB&&dA&&dA[dy]||(dE=dB=0)||dw.pop())){if((dr?dA.nodeName.toLowerCase()===dv:dA.nodeType===1)&&++dE){if(du){(dA[c9]||(dA[c9]={}))[i]=[dh,dE]}if(dA===dz){break}}}}}dE-=dm;return dE===dq||(dE%dq===0&&dE/dq>=0)}}},PSEUDO:function(dn,dm){var e,i=cm.pseudos[dn]||cm.setFilters[dn.toLowerCase()]||cv.error("unsupported pseudo: "+dn);if(i[c9]){return i(dm)}if(i.length>1){e=[dn,dn,"",dm];return cm.setFilters.hasOwnProperty(dn.toLowerCase())?ci(function(dr,dt){var dq,dp=i(dr,dm),ds=dp.length;while(ds--){dq=cc(dr,dp[ds]);dr[dq]=!(dt[dq]=dp[ds])}}):function(dp){return i(dp,0,e)}}return i}},pseudos:{not:ci(function(e){var i=[],dm=[],dn=cV(e.replace(cq,"$1"));return dn[c9]?ci(function(dq,dv,dt,dr){var du,dp=dn(dq,null,dr,[]),ds=dq.length;while(ds--){if((du=dp[ds])){dq[ds]=!(dv[ds]=du)}}}):function(dr,dq,dp){i[0]=dr;dn(i,null,dp,dm);i[0]=null;return !dm.pop()}}),has:ci(function(e){return function(i){return cv(e,i).length>0}}),contains:ci(function(e){e=e.replace(cr,c4);return function(i){return(i.textContent||i.innerText||cG(i)).indexOf(e)>-1}}),lang:ci(function(e){if(!cT.test(e||"")){cv.error("unsupported lang: "+e)}e=e.replace(cr,c4).toLowerCase();return function(dm){var i;do{if((i=c7?dm.lang:dm.getAttribute("xml:lang")||dm.getAttribute("lang"))){i=i.toLowerCase();return i===e||i.indexOf(e+"-")===0}}while((dm=dm.parentNode)&&dm.nodeType===1);return false}}),target:function(e){var i=dd.location&&dd.location.hash;return i&&i.slice(1)===e.id},root:function(e){return e===cn},focus:function(e){return e===cB.activeElement&&(!cB.hasFocus||cB.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===false},disabled:function(e){return e.disabled===true},checked:function(e){var i=e.nodeName.toLowerCase();return(i==="input"&&!!e.checked)||(i==="option"&&!!e.selected)},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling){if(e.nodeType<6){return false}}return true},parent:function(e){return !cm.pseudos.empty(e)},header:function(e){return ck.test(e.nodeName)},input:function(e){return cb.test(e.nodeName)},button:function(i){var e=i.nodeName.toLowerCase();return e==="input"&&i.type==="button"||e==="button"},text:function(i){var e;return i.nodeName.toLowerCase()==="input"&&i.type==="text"&&((e=i.getAttribute("type"))==null||e.toLowerCase()==="text")},first:c6(function(){return[0]}),last:c6(function(e,i){return[i-1]}),eq:c6(function(e,dm,i){return[i<0?i+dm:i]}),even:c6(function(e,dn){var dm=0;for(;dm=0;){e.push(dm)}return e}),gt:c6(function(e,dp,dn){var dm=dn<0?dn+dp:dn;for(;++dm1?function(dq,dp,dm){var dn=e.length;while(dn--){if(!e[dn](dq,dp,dm)){return false}}return true}:e[0]}function cy(dm,dq,dp){var dn=0,e=dq.length;for(;dn-1){dB[dD]=!(dy[dD]=dv)}}}}else{dx=cZ(dx===dy?dx.splice(ds,dx.length):dx);if(dq){dq(null,dy,dx,dA)}else{b6.apply(dy,dx)}}})}function da(ds){var dm,dq,dn,dr=ds.length,dv=cm.relative[ds[0].type],dw=dv||cm.relative[" "],dp=dv?1:0,dt=cp(function(i){return i===dm},dw,true),du=cp(function(i){return cc(dm,i)>-1},dw,true),e=[function(dz,dy,dx){var i=(!dv&&(dx||dy!==dl))||((dm=dy).nodeType?dt(dz,dy,dx):du(dz,dy,dx));dm=null;return i}];for(;dp1&&dj(e),dp>1&&cg(ds.slice(0,dp-1).concat({value:ds[dp-2].type===" "?"*":""})).replace(cq,"$1"),dq,dp0,dp=dn.length>0,i=function(dz,dt,dy,dx,dC){var du,dv,dA,dE=0,dw="0",dq=dz&&[],dF=[],dD=dl,ds=dz||dp&&cm.find.TAG("*",dC),dr=(dh+=dD==null?1:Math.random()||0.1),dB=ds.length;if(dC){dl=dt!==cB&&dt}for(;dw!==dB&&(du=ds[dw])!=null;dw++){if(dp&&du){dv=0;while((dA=dn[dv++])){if(dA(du,dt,dy)){dx.push(du);break}}if(dC){dh=dr}}if(e){if((du=!dA&&du)){dE--}if(dz){dq.push(du)}}}dE+=dw;if(e&&dw!==dE){dv=0;while((dA=dm[dv++])){dA(dq,dF,dt,dy)}if(dz){if(dE>0){while(dw--){if(!(dq[dw]||dF[dw])){dF[dw]=dc.call(dx)}}}dF=cZ(dF)}b6.apply(dx,dF);if(dC&&!dz&&dF.length>0&&(dE+dm.length)>1){cv.uniqueSort(dx)}}if(dC){dh=dr;dl=dD}return dq};return e?ci(i):i}cV=cv.compile=function(e,dn){var dp,dm=[],dr=[],dq=cF[e+" "];if(!dq){if(!dn){dn=ch(e)}dp=dn.length;while(dp--){dq=da(dn[dp]);if(dq[c9]){dm.push(dq)}else{dr.push(dq)}}dq=cF(e,cX(dr,dm));dq.selector=e}return dq};df=cv.select=function(dn,e,dp,ds){var dq,dv,dm,dw,dt,du=typeof dn==="function"&&dn,dr=!ds&&ch((dn=du.selector||dn));dp=dp||[];if(dr.length===1){dv=dr[0]=dr[0].slice(0);if(dv.length>2&&(dm=dv[0]).type==="ID"&&dg.getById&&e.nodeType===9&&c7&&cm.relative[dv[1].type]){e=(cm.find.ID(dm.matches[0].replace(cr,c4),e)||[])[0];if(!e){return dp}else{if(du){e=e.parentNode}}dn=dn.slice(dv.shift().value.length)}dq=c1.needsContext.test(dn)?0:dv.length;while(dq--){dm=dv[dq];if(cm.relative[(dw=dm.type)]){break}if((dt=cm.find[dw])){if((ds=dt(dm.matches[0].replace(cr,c4),c0.test(dv[0].type)&&cS(e.parentNode)||e))){dv.splice(dq,1);dn=ds.length&&cg(dv);if(!dn){b6.apply(dp,ds);return dp}break}}}}(du||cV(dn,dr))(ds,e,!c7,dp,c0.test(dn)&&cS(e.parentNode)||e);return dp};dg.sortStable=c9.split("").sort(cD).join("")===c9;dg.detectDuplicates=!!cW;cY();dg.sortDetached=ce(function(e){return e.compareDocumentPosition(cB.createElement("div"))&1});if(!ce(function(e){e.innerHTML=" ";return e.firstChild.getAttribute("href")==="#"})){di("type|href|height|width",function(i,e,dm){if(!dm){return i.getAttribute(e,e.toLowerCase()==="type"?1:2)}})}if(!dg.attributes||!ce(function(e){e.innerHTML=" ";e.firstChild.setAttribute("value","");return e.firstChild.getAttribute("value")===""})){di("value",function(i,e,dm){if(!dm&&i.nodeName.toLowerCase()==="input"){return i.defaultValue}})}if(!ce(function(e){return e.getAttribute("disabled")==null})){di(b7,function(i,e,dn){var dm;if(!dn){return i[e]===true?e.toLowerCase():(dm=i.getAttributeNode(e))&&dm.specified?dm.value:null}})}return cv})(a4);bH.find=m;bH.expr=m.selectors;bH.expr[":"]=bH.expr.pseudos;bH.unique=m.uniqueSort;bH.text=m.getText;bH.isXMLDoc=m.isXML;bH.contains=m.contains;var z=bH.expr.match.needsContext;var a=(/^<(\w+)\s*\/?>(?:<\/\1>|)$/);var aK=/^.[^:#\[\.,]*$/;function aQ(b5,e,i){if(bH.isFunction(e)){return bH.grep(b5,function(b7,b6){return !!e.call(b7,b6,b7)!==i})}if(e.nodeType){return bH.grep(b5,function(b6){return(b6===e)!==i})}if(typeof e==="string"){if(aK.test(e)){return bH.filter(e,b5,i)}e=bH.filter(e,b5)}return bH.grep(b5,function(b6){return(bH.inArray(b6,e)>=0)!==i})}bH.filter=function(b6,e,b5){var i=e[0];if(b5){b6=":not("+b6+")"}return e.length===1&&i.nodeType===1?bH.find.matchesSelector(i,b6)?[i]:[]:bH.find.matches(b6,bH.grep(e,function(b7){return b7.nodeType===1}))};bH.fn.extend({find:function(b5){var b8,b7=[],b6=this,e=b6.length;if(typeof b5!=="string"){return this.pushStack(bH(b5).filter(function(){for(b8=0;b81?bH.unique(b7):b7);b7.selector=this.selector?this.selector+" "+b5:b5;return b7},filter:function(e){return this.pushStack(aQ(this,e||[],false))},not:function(e){return this.pushStack(aQ(this,e||[],true))},is:function(e){return !!aQ(this,typeof e==="string"&&z.test(e)?bH(e):e||[],false).length}});var y,n=a4.document,bs=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,bU=bH.fn.init=function(e,b5){var i,b6;if(!e){return this}if(typeof e==="string"){if(e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3){i=[null,e,null]}else{i=bs.exec(e)}if(i&&(i[1]||!b5)){if(i[1]){b5=b5 instanceof bH?b5[0]:b5;bH.merge(this,bH.parseHTML(i[1],b5&&b5.nodeType?b5.ownerDocument||b5:n,true));if(a.test(i[1])&&bH.isPlainObject(b5)){for(i in b5){if(bH.isFunction(this[i])){this[i](b5[i])}else{this.attr(i,b5[i])}}}return this}else{b6=n.getElementById(i[2]);if(b6&&b6.parentNode){if(b6.id!==i[2]){return y.find(e)}this.length=1;this[0]=b6}this.context=n;this.selector=e;return this}}else{if(!b5||b5.jquery){return(b5||y).find(e)}else{return this.constructor(b5).find(e)}}}else{if(e.nodeType){this.context=this[0]=e;this.length=1;return this}else{if(bH.isFunction(e)){return typeof y.ready!=="undefined"?y.ready(e):e(bH)}}}if(e.selector!==undefined){this.selector=e.selector;this.context=e.context}return bH.makeArray(e,this)};bU.prototype=bH.fn;y=bH(n);var bu=/^(?:parents|prev(?:Until|All))/,by={children:true,contents:true,next:true,prev:true};bH.extend({dir:function(b5,i,b7){var e=[],b6=b5[i];while(b6&&b6.nodeType!==9&&(b7===undefined||b6.nodeType!==1||!bH(b6).is(b7))){if(b6.nodeType===1){e.push(b6)}b6=b6[i]}return e},sibling:function(b5,i){var e=[];for(;b5;b5=b5.nextSibling){if(b5.nodeType===1&&b5!==i){e.push(b5)}}return e}});bH.fn.extend({has:function(b7){var b6,b5=bH(b7,this),e=b5.length;return this.filter(function(){for(b6=0;b6-1:b9.nodeType===1&&bH.find.matchesSelector(b9,b8))){e.push(b9);break}}}return this.pushStack(e.length>1?bH.unique(e):e)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1}if(typeof e==="string"){return bH.inArray(this[0],bH(e))}return bH.inArray(e.jquery?e[0]:e,this)},add:function(e,i){return this.pushStack(bH.unique(bH.merge(this.get(),bH(e,i))))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});function aX(i,e){do{i=i[e]}while(i&&i.nodeType!==1);return i}bH.each({parent:function(i){var e=i.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return bH.dir(e,"parentNode")},parentsUntil:function(b5,e,b6){return bH.dir(b5,"parentNode",b6)},next:function(e){return aX(e,"nextSibling")},prev:function(e){return aX(e,"previousSibling")},nextAll:function(e){return bH.dir(e,"nextSibling")},prevAll:function(e){return bH.dir(e,"previousSibling")},nextUntil:function(b5,e,b6){return bH.dir(b5,"nextSibling",b6)},prevUntil:function(b5,e,b6){return bH.dir(b5,"previousSibling",b6)},siblings:function(e){return bH.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return bH.sibling(e.firstChild)},contents:function(e){return bH.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:bH.merge([],e.childNodes)}},function(e,i){bH.fn[e]=function(b7,b5){var b6=bH.map(this,i,b7);if(e.slice(-5)!=="Until"){b5=b7}if(b5&&typeof b5==="string"){b6=bH.filter(b5,b6)}if(this.length>1){if(!by[e]){b6=bH.unique(b6)}if(bu.test(e)){b6=b6.reverse()}}return this.pushStack(b6)}});var aE=(/\S+/g);var b1={};function ae(i){var e=b1[i]={};bH.each(i.match(aE)||[],function(b6,b5){e[b5]=true});return e}bH.Callbacks=function(cd){cd=typeof cd==="string"?(b1[cd]||ae(cd)):bH.extend({},cd);var b7,b6,e,b8,b9,b5,ca=[],cb=!cd.once&&[],i=function(ce){b6=cd.memory&&ce;e=true;b9=b5||0;b5=0;b8=ca.length;b7=true;for(;ca&&b9-1){ca.splice(cf,1);if(b7){if(cf<=b8){b8--}if(cf<=b9){b9--}}}})}return this},has:function(ce){return ce?bH.inArray(ce,ca)>-1:!!(ca&&ca.length)},empty:function(){ca=[];b8=0;return this},disable:function(){ca=cb=b6=undefined;return this},disabled:function(){return !ca},lock:function(){cb=undefined;if(!b6){cc.disable()}return this},locked:function(){return !cb},fireWith:function(cf,ce){if(ca&&(!e||cb)){ce=ce||[];ce=[cf,ce.slice?ce.slice():ce];if(b7){cb.push(ce)}else{i(ce)}}return this},fire:function(){cc.fireWith(this,arguments);return this},fired:function(){return !!e}};return cc};bH.extend({Deferred:function(b5){var i=[["resolve","done",bH.Callbacks("once memory"),"resolved"],["reject","fail",bH.Callbacks("once memory"),"rejected"],["notify","progress",bH.Callbacks("memory")]],b6="pending",b7={state:function(){return b6},always:function(){e.done(arguments).fail(arguments);return this},then:function(){var b8=arguments;return bH.Deferred(function(b9){bH.each(i,function(cb,ca){var cc=bH.isFunction(b8[cb])&&b8[cb];e[ca[1]](function(){var cd=cc&&cc.apply(this,arguments);if(cd&&bH.isFunction(cd.promise)){cd.promise().done(b9.resolve).fail(b9.reject).progress(b9.notify)}else{b9[ca[0]+"With"](this===b7?b9.promise():this,cc?[cd]:arguments)}})});b8=null}).promise()},promise:function(b8){return b8!=null?bH.extend(b8,b7):b7}},e={};b7.pipe=b7.then;bH.each(i,function(b9,b8){var cb=b8[2],ca=b8[3];b7[b8[1]]=cb.add;if(ca){cb.add(function(){b6=ca},i[b9^1][2].disable,i[2][2].lock)}e[b8[0]]=function(){e[b8[0]+"With"](this===e?b7:this,arguments);return this};e[b8[0]+"With"]=cb.fireWith});b7.promise(e);if(b5){b5.call(e,e)}return e},when:function(b8){var b6=0,ca=O.call(arguments),e=ca.length,b5=e!==1||(b8&&bH.isFunction(b8.promise))?e:0,cd=b5===1?b8:bH.Deferred(),b7=function(cf,cg,ce){return function(i){cg[cf]=this;ce[cf]=arguments.length>1?O.call(arguments):i;if(ce===cc){cd.notifyWith(cg,ce)}else{if(!(--b5)){cd.resolveWith(cg,ce)}}}},cc,b9,cb;if(e>1){cc=new Array(e);b9=new Array(e);cb=new Array(e);for(;b60){return}aj.resolveWith(n,[bH]);if(bH.fn.triggerHandler){bH(n).triggerHandler("ready");bH(n).off("ready")}}});function bl(){if(n.addEventListener){n.removeEventListener("DOMContentLoaded",bY,false);a4.removeEventListener("load",bY,false)}else{n.detachEvent("onreadystatechange",bY);a4.detachEvent("onload",bY)}}function bY(){if(n.addEventListener||event.type==="load"||n.readyState==="complete"){bl();bH.ready()}}bH.ready.promise=function(b7){if(!aj){aj=bH.Deferred();if(n.readyState==="complete"){setTimeout(bH.ready)}else{if(n.addEventListener){n.addEventListener("DOMContentLoaded",bY,false);a4.addEventListener("load",bY,false)}else{n.attachEvent("onreadystatechange",bY);a4.attachEvent("onload",bY);var b6=false;try{b6=a4.frameElement==null&&n.documentElement}catch(b5){}if(b6&&b6.doScroll){(function i(){if(!bH.isReady){try{b6.doScroll("left")}catch(b8){return setTimeout(i,50)}bl();bH.ready()}})()}}}}return aj.promise(b7)};var aB=typeof undefined;var bg;for(bg in bH(C)){break}C.ownLast=bg!=="0";C.inlineBlockNeedsLayout=false;bH(function(){var b5,b6,e,i;e=n.getElementsByTagName("body")[0];if(!e||!e.style){return}b6=n.createElement("div");i=n.createElement("div");i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px";e.appendChild(i).appendChild(b6);if(typeof b6.style.zoom!==aB){b6.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";C.inlineBlockNeedsLayout=b5=b6.offsetWidth===3;if(b5){e.style.zoom=1}}e.removeChild(i)});(function(){var b5=n.createElement("div");if(C.deleteExpando==null){C.deleteExpando=true;try{delete b5.test}catch(i){C.deleteExpando=false}}b5=null})();bH.acceptData=function(b5){var i=bH.noData[(b5.nodeName+" ").toLowerCase()],e=+b5.nodeType||1;return e!==1&&e!==9?false:!i||i!==true&&b5.getAttribute("classid")===i};var bx=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,aP=/([A-Z])/g;function bz(b6,b5,b7){if(b7===undefined&&b6.nodeType===1){var i="data-"+b5.replace(aP,"-$1").toLowerCase();b7=b6.getAttribute(i);if(typeof b7==="string"){try{b7=b7==="true"?true:b7==="false"?false:b7==="null"?null:+b7+""===b7?+b7:bx.test(b7)?bH.parseJSON(b7):b7}catch(b8){}bH.data(b6,b5,b7)}else{b7=undefined}}return b7}function P(i){var e;for(e in i){if(e==="data"&&bH.isEmptyObject(i[e])){continue}if(e!=="toJSON"){return false}}return true}function bb(b6,i,b8,b7){if(!bH.acceptData(b6)){return}var ca,b9,cb=bH.expando,cc=b6.nodeType,e=cc?bH.cache:b6,b5=cc?b6[cb]:b6[cb]&&cb;if((!b5||!e[b5]||(!b7&&!e[b5].data))&&b8===undefined&&typeof i==="string"){return}if(!b5){if(cc){b5=b6[cb]=aO.pop()||bH.guid++}else{b5=cb}}if(!e[b5]){e[b5]=cc?{}:{toJSON:bH.noop}}if(typeof i==="object"||typeof i==="function"){if(b7){e[b5]=bH.extend(e[b5],i)}else{e[b5].data=bH.extend(e[b5].data,i)}}b9=e[b5];if(!b7){if(!b9.data){b9.data={}}b9=b9.data}if(b8!==undefined){b9[bH.camelCase(i)]=b8}if(typeof i==="string"){ca=b9[i];if(ca==null){ca=b9[bH.camelCase(i)]}}else{ca=b9}return ca}function aa(b8,b6,e){if(!bH.acceptData(b8)){return}var ca,b7,b9=b8.nodeType,b5=b9?bH.cache:b8,cb=b9?b8[bH.expando]:bH.expando;if(!b5[cb]){return}if(b6){ca=e?b5[cb]:b5[cb].data;if(ca){if(!bH.isArray(b6)){if(b6 in ca){b6=[b6]}else{b6=bH.camelCase(b6);if(b6 in ca){b6=[b6]}else{b6=b6.split(" ")}}}else{b6=b6.concat(bH.map(b6,bH.camelCase))}b7=b6.length;while(b7--){delete ca[b6[b7]]}if(e?!P(ca):!bH.isEmptyObject(ca)){return}}}if(!e){delete b5[cb].data;if(!P(b5[cb])){return}}if(b9){bH.cleanData([b8],true)}else{if(C.deleteExpando||b5!=b5.window){delete b5[cb]}else{b5[cb]=null}}}bH.extend({cache:{},noData:{"applet ":true,"embed ":true,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){e=e.nodeType?bH.cache[e[bH.expando]]:e[bH.expando];return !!e&&!P(e)},data:function(i,e,b5){return bb(i,e,b5)},removeData:function(i,e){return aa(i,e)},_data:function(i,e,b5){return bb(i,e,b5,true)},_removeData:function(i,e){return aa(i,e,true)}});bH.fn.extend({data:function(b7,ca){var b6,b5,b9,b8=this[0],e=b8&&b8.attributes;if(b7===undefined){if(this.length){b9=bH.data(b8);if(b8.nodeType===1&&!bH._data(b8,"parsedAttrs")){b6=e.length;while(b6--){if(e[b6]){b5=e[b6].name;if(b5.indexOf("data-")===0){b5=bH.camelCase(b5.slice(5));bz(b8,b5,b9[b5])}}}bH._data(b8,"parsedAttrs",true)}}return b9}if(typeof b7==="object"){return this.each(function(){bH.data(this,b7)})}return arguments.length>1?this.each(function(){bH.data(this,b7,ca)}):b8?bz(b8,b7,bH.data(b8,b7)):undefined},removeData:function(e){return this.each(function(){bH.removeData(this,e)})}});bH.extend({queue:function(b5,i,b6){var e;if(b5){i=(i||"fx")+"queue";e=bH._data(b5,i);if(b6){if(!e||bH.isArray(b6)){e=bH._data(b5,i,bH.makeArray(b6))}else{e.push(b6)}}return e||[]}},dequeue:function(b8,b7){b7=b7||"fx";var i=bH.queue(b8,b7),b9=i.length,b6=i.shift(),e=bH._queueHooks(b8,b7),b5=function(){bH.dequeue(b8,b7)};if(b6==="inprogress"){b6=i.shift();b9--}if(b6){if(b7==="fx"){i.unshift("inprogress")}delete e.stop;b6.call(b8,b5,e)}if(!b9&&e){e.empty.fire()}},_queueHooks:function(b5,i){var e=i+"queueHooks";return bH._data(b5,e)||bH._data(b5,e,{empty:bH.Callbacks("once memory").add(function(){bH._removeData(b5,i+"queue");bH._removeData(b5,e)})})}});bH.fn.extend({queue:function(e,i){var b5=2;if(typeof e!=="string"){i=e;e="fx";b5--}if(arguments.lengtha ";C.leadingWhitespace=b7.firstChild.nodeType===3;C.tbody=!b7.getElementsByTagName("tbody").length;C.htmlSerialize=!!b7.getElementsByTagName("link").length;C.html5Clone=n.createElement("nav").cloneNode(true).outerHTML!=="<:nav>";i.type="checkbox";i.checked=true;b5.appendChild(i);C.appendChecked=i.checked;b7.innerHTML="";C.noCloneChecked=!!b7.cloneNode(true).lastChild.defaultValue;b5.appendChild(b7);b7.innerHTML=" ";C.checkClone=b7.cloneNode(true).cloneNode(true).lastChild.checked;C.noCloneEvent=true;if(b7.attachEvent){b7.attachEvent("onclick",function(){C.noCloneEvent=false});b7.cloneNode(true).click()}if(C.deleteExpando==null){C.deleteExpando=true;try{delete b7.test}catch(b6){C.deleteExpando=false}}})();(function(){var b5,e,b6=n.createElement("div");for(b5 in {submit:true,change:true,focusin:true}){e="on"+b5;if(!(C[b5+"Bubbles"]=e in a4)){b6.setAttribute(e,"t");C[b5+"Bubbles"]=b6.attributes[e].expando===false}}b6=null})();var bF=/^(?:input|select|textarea)$/i,a5=/^key/,bL=/^(?:mouse|pointer|contextmenu)|click/,bB=/^(?:focusinfocus|focusoutblur)$/,bw=/^([^.]*)(?:\.(.+)|)$/;function T(){return true}function Y(){return false}function al(){try{return n.activeElement}catch(e){}}bH.event={global:{},add:function(b7,cc,ch,b9,b8){var ca,ci,cj,b5,ce,cb,cg,b6,cf,e,i,cd=bH._data(b7);if(!cd){return}if(ch.handler){b5=ch;ch=b5.handler;b8=b5.selector}if(!ch.guid){ch.guid=bH.guid++}if(!(ci=cd.events)){ci=cd.events={}}if(!(cb=cd.handle)){cb=cd.handle=function(ck){return typeof bH!==aB&&(!ck||bH.event.triggered!==ck.type)?bH.event.dispatch.apply(cb.elem,arguments):undefined};cb.elem=b7}cc=(cc||"").match(aE)||[""];cj=cc.length;while(cj--){ca=bw.exec(cc[cj])||[];cf=i=ca[1];e=(ca[2]||"").split(".").sort();if(!cf){continue}ce=bH.event.special[cf]||{};cf=(b8?ce.delegateType:ce.bindType)||cf;ce=bH.event.special[cf]||{};cg=bH.extend({type:cf,origType:i,data:b9,handler:ch,guid:ch.guid,selector:b8,needsContext:b8&&bH.expr.match.needsContext.test(b8),namespace:e.join(".")},b5);if(!(b6=ci[cf])){b6=ci[cf]=[];b6.delegateCount=0;if(!ce.setup||ce.setup.call(b7,b9,e,cb)===false){if(b7.addEventListener){b7.addEventListener(cf,cb,false)}else{if(b7.attachEvent){b7.attachEvent("on"+cf,cb)}}}}if(ce.add){ce.add.call(b7,cg);if(!cg.handler.guid){cg.handler.guid=ch.guid}}if(b8){b6.splice(b6.delegateCount++,0,cg)}else{b6.push(cg)}bH.event.global[cf]=true}b7=null},remove:function(b6,cc,cj,b7,cb){var b9,cg,ca,b8,ci,ch,ce,b5,cf,e,i,cd=bH.hasData(b6)&&bH._data(b6);if(!cd||!(ch=cd.events)){return}cc=(cc||"").match(aE)||[""];ci=cc.length;while(ci--){ca=bw.exec(cc[ci])||[];cf=i=ca[1];e=(ca[2]||"").split(".").sort();if(!cf){for(cf in ch){bH.event.remove(b6,cf+cc[ci],cj,b7,true)}continue}ce=bH.event.special[cf]||{};cf=(b7?ce.delegateType:ce.bindType)||cf;b5=ch[cf]||[];ca=ca[2]&&new RegExp("(^|\\.)"+e.join("\\.(?:.*\\.|)")+"(\\.|$)");b8=b9=b5.length;while(b9--){cg=b5[b9];if((cb||i===cg.origType)&&(!cj||cj.guid===cg.guid)&&(!ca||ca.test(cg.namespace))&&(!b7||b7===cg.selector||b7==="**"&&cg.selector)){b5.splice(b9,1);if(cg.selector){b5.delegateCount--}if(ce.remove){ce.remove.call(b6,cg)}}}if(b8&&!b5.length){if(!ce.teardown||ce.teardown.call(b6,e,cd.handle)===false){bH.removeEvent(b6,cf,cd.handle)}delete ch[cf]}}if(bH.isEmptyObject(ch)){delete cd.handle;bH._removeData(b6,"events")}},trigger:function(b5,cc,b8,cj){var cd,b7,ch,ci,cf,cb,ca,b9=[b8||n],cg=J.call(b5,"type")?b5.type:b5,b6=J.call(b5,"namespace")?b5.namespace.split("."):[];ch=cb=b8=b8||n;if(b8.nodeType===3||b8.nodeType===8){return}if(bB.test(cg+bH.event.triggered)){return}if(cg.indexOf(".")>=0){b6=cg.split(".");cg=b6.shift();b6.sort()}b7=cg.indexOf(":")<0&&"on"+cg;b5=b5[bH.expando]?b5:new bH.Event(cg,typeof b5==="object"&&b5);b5.isTrigger=cj?2:3;b5.namespace=b6.join(".");b5.namespace_re=b5.namespace?new RegExp("(^|\\.)"+b6.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;b5.result=undefined;if(!b5.target){b5.target=b8}cc=cc==null?[b5]:bH.makeArray(cc,[b5]);cf=bH.event.special[cg]||{};if(!cj&&cf.trigger&&cf.trigger.apply(b8,cc)===false){return}if(!cj&&!cf.noBubble&&!bH.isWindow(b8)){ci=cf.delegateType||cg;if(!bB.test(ci+cg)){ch=ch.parentNode}for(;ch;ch=ch.parentNode){b9.push(ch);cb=ch}if(cb===(b8.ownerDocument||n)){b9.push(cb.defaultView||cb.parentWindow||a4)}}ca=0;while((ch=b9[ca++])&&!b5.isPropagationStopped()){b5.type=ca>1?ci:cf.bindType||cg;cd=(bH._data(ch,"events")||{})[b5.type]&&bH._data(ch,"handle");if(cd){cd.apply(ch,cc)}cd=b7&&ch[b7];if(cd&&cd.apply&&bH.acceptData(ch)){b5.result=cd.apply(ch,cc);if(b5.result===false){b5.preventDefault()}}}b5.type=cg;if(!cj&&!b5.isDefaultPrevented()){if((!cf._default||cf._default.apply(b9.pop(),cc)===false)&&bH.acceptData(b8)){if(b7&&b8[cg]&&!bH.isWindow(b8)){cb=b8[b7];if(cb){b8[b7]=null}bH.event.triggered=cg;try{b8[cg]()}catch(ce){}bH.event.triggered=undefined;if(cb){b8[b7]=cb}}}}return b5.result},dispatch:function(e){e=bH.event.fix(e);var b8,b9,cd,b5,b7,cc=[],cb=O.call(arguments),b6=(bH._data(this,"events")||{})[e.type]||[],ca=bH.event.special[e.type]||{};cb[0]=e;e.delegateTarget=this;if(ca.preDispatch&&ca.preDispatch.call(this,e)===false){return}cc=bH.event.handlers.call(this,e,b6);b8=0;while((b5=cc[b8++])&&!e.isPropagationStopped()){e.currentTarget=b5.elem;b7=0;while((cd=b5.handlers[b7++])&&!e.isImmediatePropagationStopped()){if(!e.namespace_re||e.namespace_re.test(cd.namespace)){e.handleObj=cd;e.data=cd.data;b9=((bH.event.special[cd.origType]||{}).handle||cd.handler).apply(b5.elem,cb);if(b9!==undefined){if((e.result=b9)===false){e.preventDefault();e.stopPropagation()}}}}}if(ca.postDispatch){ca.postDispatch.call(this,e)}return e.result},handlers:function(e,b6){var b5,cb,b9,b8,ca=[],b7=b6.delegateCount,cc=e.target;if(b7&&cc.nodeType&&(!e.button||e.type!=="click")){for(;cc!=this;cc=cc.parentNode||this){if(cc.nodeType===1&&(cc.disabled!==true||e.type!=="click")){b9=[];for(b8=0;b8=0:bH.find(b5,this,null,[cc]).length}if(b9[b5]){b9.push(cb)}}if(b9.length){ca.push({elem:cc,handlers:b9})}}}}if(b7 ]","i"),b4=/^\s+/,aG=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,o=/<([\w:]+)/,bZ=/\s*$/g,V={option:[1,""," "],legend:[1,""," "],area:[1,""," "],param:[1,""," "],thead:[1,""],tr:[2,""],col:[2,""],td:[3,""],_default:C.htmlSerialize?[0,"",""]:[1,"X","
"]},aS=A(n),k=aS.appendChild(n.createElement("div"));V.optgroup=V.option;V.tbody=V.tfoot=V.colgroup=V.caption=V.thead;V.th=V.td;function l(b7,e){var b5,b8,b6=0,b9=typeof b7.getElementsByTagName!==aB?b7.getElementsByTagName(e||"*"):typeof b7.querySelectorAll!==aB?b7.querySelectorAll(e||"*"):undefined;if(!b9){for(b9=[],b5=b7.childNodes||b7;(b8=b5[b6])!=null;b6++){if(!e||bH.nodeName(b8,e)){b9.push(b8)}else{bH.merge(b9,l(b8,e))}}}return e===undefined||e&&bH.nodeName(b7,e)?bH.merge([b7],b9):b9}function bX(e){if(aL.test(e.type)){e.defaultChecked=e.checked}}function a2(i,e){return bH.nodeName(i,"table")&&bH.nodeName(e.nodeType!==11?e:e.firstChild,"tr")?i.getElementsByTagName("tbody")[0]||i.appendChild(i.ownerDocument.createElement("tbody")):i}function t(e){e.type=(bH.find.attr(e,"type")!==null)+"/"+e.type;return e}function be(i){var e=aq.exec(i.type);if(e){i.type=e[1]}else{i.removeAttribute("type")}return i}function bt(e,b6){var b7,b5=0;for(;(b7=e[b5])!=null;b5++){bH._data(b7,"globalEval",!b6||bH._data(b6[b5],"globalEval"))}}function ar(cb,b5){if(b5.nodeType!==1||!bH.hasData(cb)){return}var b8,b7,e,ca=bH._data(cb),b9=bH._data(b5,ca),b6=ca.events;if(b6){delete b9.handle;b9.events={};for(b8 in b6){for(b7=0,e=b6[b8].length;b7")){cc=b5.cloneNode(true)}else{k.innerHTML=b5.outerHTML;k.removeChild(cc=k.firstChild)}if((!C.noCloneEvent||!C.noCloneChecked)&&(b5.nodeType===1||b5.nodeType===11)&&!bH.isXMLDoc(b5)){b9=l(cc);ca=l(b5);for(b8=0;(b6=ca[b8])!=null;++b8){if(b9[b8]){S(b6,b9[b8])}}}if(b7){if(e){ca=ca||l(b5);b9=b9||l(cc);for(b8=0;(b6=ca[b8])!=null;b8++){ar(b6,b9[b8])}}else{ar(b5,cc)}}b9=l(cc,"script");if(b9.length>0){bt(b9,!cb&&l(b5,"script"))}b9=ca=b6=null;return cc},buildFragment:function(b5,b7,cc,ch){var cd,b9,cb,cg,ci,cf,b6,ca=b5.length,b8=A(b7),e=[],ce=0;for(;ce$2>")+b6[2];cd=b6[0];while(cd--){cg=cg.lastChild}if(!C.leadingWhitespace&&b4.test(b9)){e.push(b7.createTextNode(b4.exec(b9)[0]))}if(!C.tbody){b9=ci==="table"&&!bZ.test(b9)?cg.firstChild:b6[1]===""&&!bZ.test(b9)?cg:0;cd=b9&&b9.childNodes.length;while(cd--){if(bH.nodeName((cf=b9.childNodes[cd]),"tbody")&&!cf.childNodes.length){b9.removeChild(cf)}}}bH.merge(e,cg.childNodes);cg.textContent="";while(cg.firstChild){cg.removeChild(cg.firstChild)}cg=b8.lastChild}}}}if(cg){b8.removeChild(cg)}if(!C.appendChecked){bH.grep(l(e,"input"),bX)}ce=0;while((b9=e[ce++])){if(ch&&bH.inArray(b9,ch)!==-1){continue}cb=bH.contains(b9.ownerDocument,b9);cg=l(b8.appendChild(b9),"script");if(cb){bt(cg)}if(cc){cd=0;while((b9=cg[cd++])){if(bA.test(b9.type||"")){cc.push(b9)}}}}cg=null;return b8},cleanData:function(b5,cd){var b7,cc,b6,b8,b9=0,ce=bH.expando,e=bH.cache,ca=C.deleteExpando,cb=bH.event.special;for(;(b7=b5[b9])!=null;b9++){if(cd||bH.acceptData(b7)){b6=b7[ce];b8=b6&&e[b6];if(b8){if(b8.events){for(cc in b8.events){if(cb[cc]){bH.event.remove(b7,cc)}else{bH.removeEvent(b7,cc,b8.handle)}}}if(e[b6]){delete e[b6];if(ca){delete b7[ce]}else{if(typeof b7.removeAttribute!==aB){b7.removeAttribute(ce)}else{b7[ce]=null}}aO.push(b6)}}}}}});bH.fn.extend({text:function(e){return aA(this,function(i){return i===undefined?bH.text(this):this.empty().append((this[0]&&this[0].ownerDocument||n).createTextNode(i))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var i=a2(this,e);i.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var i=a2(this,e);i.insertBefore(e,i.firstChild)}})},before:function(){return this.domManip(arguments,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this)}})},after:function(){return this.domManip(arguments,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this.nextSibling)}})},remove:function(e,b8){var b7,b5=e?bH.filter(e,this):this,b6=0;for(;(b7=b5[b6])!=null;b6++){if(!b8&&b7.nodeType===1){bH.cleanData(l(b7))}if(b7.parentNode){if(b8&&bH.contains(b7.ownerDocument,b7)){bt(l(b7,"script"))}b7.parentNode.removeChild(b7)}}return this},empty:function(){var b5,e=0;for(;(b5=this[e])!=null;e++){if(b5.nodeType===1){bH.cleanData(l(b5,false))}while(b5.firstChild){b5.removeChild(b5.firstChild)}if(b5.options&&bH.nodeName(b5,"select")){b5.options.length=0}}return this},clone:function(i,e){i=i==null?false:i;e=e==null?i:e;return this.map(function(){return bH.clone(this,i,e)})},html:function(e){return aA(this,function(b8){var b7=this[0]||{},b6=0,b5=this.length;if(b8===undefined){return b7.nodeType===1?b7.innerHTML.replace(aC,""):undefined}if(typeof b8==="string"&&!am.test(b8)&&(C.htmlSerialize||!L.test(b8))&&(C.leadingWhitespace||!b4.test(b8))&&!V[(o.exec(b8)||["",""])[1].toLowerCase()]){b8=b8.replace(aG,"<$1>$2>");try{for(;b61&&typeof cd==="string"&&!C.checkClone&&bV.test(cd))){return this.each(function(ci){var i=ce.eq(ci);if(b5){cc[0]=cd.call(this,ci,i.html())}i.domManip(cc,ch)})}if(b7){cb=bH.buildFragment(cc,this[0].ownerDocument,false,this);ca=cb.firstChild;if(cb.childNodes.length===1){cb=ca}if(ca){b8=bH.map(l(cb,"script"),t);e=b8.length;for(;b9 ")).appendTo(i.documentElement);i=(aH[0].contentWindow||aH[0].contentDocument).document;i.write();i.close();e=a3(b5,i);aH.detach()}bk[b5]=e}return e}(function(){var e;C.shrinkWrapBlocks=function(){if(e!=null){return e}e=false;var b6,i,b5;i=n.getElementsByTagName("body")[0];if(!i||!i.style){return}b6=n.createElement("div");b5=n.createElement("div");b5.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px";i.appendChild(b5).appendChild(b6);if(typeof b6.style.zoom!==aB){b6.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1";b6.appendChild(n.createElement("div")).style.width="5px";e=b6.offsetWidth!==3}i.removeChild(b5);return e}})();var aY=(/^margin/);var X=new RegExp("^("+aD+")(?!px)[a-z%]+$","i");var bp,F,bn=/^(top|right|bottom|left)$/;if(a4.getComputedStyle){bp=function(e){if(e.ownerDocument.defaultView.opener){return e.ownerDocument.defaultView.getComputedStyle(e,null)}return a4.getComputedStyle(e,null)};F=function(ca,i,b9){var b7,b6,b8,e,b5=ca.style;b9=b9||bp(ca);e=b9?b9.getPropertyValue(i)||b9[i]:undefined;if(b9){if(e===""&&!bH.contains(ca.ownerDocument,ca)){e=bH.style(ca,i)}if(X.test(e)&&aY.test(i)){b7=b5.width;b6=b5.minWidth;b8=b5.maxWidth;b5.minWidth=b5.maxWidth=b5.width=e;e=b9.width;b5.width=b7;b5.minWidth=b6;b5.maxWidth=b8}}return e===undefined?e:e+""}}else{if(n.documentElement.currentStyle){bp=function(e){return e.currentStyle};F=function(b9,b6,b8){var ca,i,e,b5,b7=b9.style;b8=b8||bp(b9);b5=b8?b8[b6]:undefined;if(b5==null&&b7&&b7[b6]){b5=b7[b6]}if(X.test(b5)&&!bn.test(b6)){ca=b7.left;i=b9.runtimeStyle;e=i&&i.left;if(e){i.left=b9.currentStyle.left}b7.left=b6==="fontSize"?"1em":b5;b5=b7.pixelLeft+"px";b7.left=ca;if(e){i.left=e}}return b5===undefined?b5:b5+""||"auto"}}}function a6(e,i){return{get:function(){var b5=e();if(b5==null){return}if(b5){delete this.get;return}return(this.get=i).apply(this,arguments)}}}(function(){var ca,b8,b6,b9,b5,b7,i;ca=n.createElement("div");ca.innerHTML=" a ";b6=ca.getElementsByTagName("a")[0];b8=b6&&b6.style;if(!b8){return}b8.cssText="float:left;opacity:.5";C.opacity=b8.opacity==="0.5";C.cssFloat=!!b8.cssFloat;ca.style.backgroundClip="content-box";ca.cloneNode(true).style.backgroundClip="";C.clearCloneStyle=ca.style.backgroundClip==="content-box";C.boxSizing=b8.boxSizing===""||b8.MozBoxSizing===""||b8.WebkitBoxSizing==="";bH.extend(C,{reliableHiddenOffsets:function(){if(b7==null){e()}return b7},boxSizingReliable:function(){if(b5==null){e()}return b5},pixelPosition:function(){if(b9==null){e()}return b9},reliableMarginRight:function(){if(i==null){e()}return i}});function e(){var ce,cb,cc,cd;cb=n.getElementsByTagName("body")[0];if(!cb||!cb.style){return}ce=n.createElement("div");cc=n.createElement("div");cc.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px";cb.appendChild(cc).appendChild(ce);ce.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute";b9=b5=false;i=true;if(a4.getComputedStyle){b9=(a4.getComputedStyle(ce,null)||{}).top!=="1%";b5=(a4.getComputedStyle(ce,null)||{width:"4px"}).width==="4px";cd=ce.appendChild(n.createElement("div"));cd.style.cssText=ce.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0";cd.style.marginRight=cd.style.width="0";ce.style.width="1px";i=!parseFloat((a4.getComputedStyle(cd,null)||{}).marginRight);ce.removeChild(cd)}ce.innerHTML="";cd=ce.getElementsByTagName("td");cd[0].style.cssText="margin:0;border:0;padding:0;display:none";b7=cd[0].offsetHeight===0;if(b7){cd[0].style.display="";cd[1].style.display="none";b7=cd[0].offsetHeight===0}cb.removeChild(cc)}})();bH.swap=function(b8,b7,b9,b6){var b5,i,e={};for(i in b7){e[i]=b8.style[i];b8.style[i]=b7[i]}b5=b9.apply(b8,b6||[]);for(i in b7){b8.style[i]=e[i]}return b5};var bi=/alpha\([^)]*\)/i,aT=/opacity\s*=\s*([^)]*)/,G=/^(none|table(?!-c[ea]).+)/,ba=new RegExp("^("+aD+")(.*)$","i"),U=new RegExp("^([+-])=("+aD+")","i"),bd={position:"absolute",visibility:"hidden",display:"block"},bC={letterSpacing:"0",fontWeight:"400"},av=["Webkit","O","Moz","ms"];function c(b7,b5){if(b5 in b7){return b5}var b8=b5.charAt(0).toUpperCase()+b5.slice(1),e=b5,b6=av.length;while(b6--){b5=av[b6]+b8;if(b5 in b7){return b5}}return e}function r(b9,e){var ca,b7,b8,i=[],b5=0,b6=b9.length;for(;b5=1||b8==="")&&bH.trim(b5.replace(bi,""))===""&&b6.removeAttribute){b6.removeAttribute("filter");if(b8===""||i&&!i.filter){return}}b6.filter=bi.test(b5)?b5.replace(bi,e):b5+" "+e}}}bH.cssHooks.marginRight=a6(C.reliableMarginRight,function(i,e){if(e){return bH.swap(i,{display:"inline-block"},F,[i,"marginRight"])}});bH.each({margin:"",padding:"",border:"Width"},function(e,i){bH.cssHooks[e+i]={expand:function(b7){var b6=0,b5={},b8=typeof b7==="string"?b7.split(" "):[b7];for(;b6<4;b6++){b5[e+bS[b6]+i]=b8[b6]||b8[b6-2]||b8[0]}return b5}};if(!aY.test(e)){bH.cssHooks[e+i].set=aM}});bH.fn.extend({css:function(e,i){return aA(this,function(b9,b6,ca){var b8,b5,cb={},b7=0;if(bH.isArray(b6)){b8=bp(b9);b5=b6.length;for(;b71)},show:function(){return r(this,true)},hide:function(){return r(this)},toggle:function(e){if(typeof e==="boolean"){return e?this.show():this.hide()}return this.each(function(){if(R(this)){bH(this).show()}else{bH(this).hide()}})}});function I(b5,i,b7,e,b6){return new I.prototype.init(b5,i,b7,e,b6)}bH.Tween=I;I.prototype={constructor:I,init:function(b6,i,b8,e,b7,b5){this.elem=b6;this.prop=b8;this.easing=b7||"swing";this.options=i;this.start=this.now=this.cur();this.end=e;this.unit=b5||(bH.cssNumber[b8]?"":"px")},cur:function(){var e=I.propHooks[this.prop];return e&&e.get?e.get(this):I.propHooks._default.get(this)},run:function(b5){var i,e=I.propHooks[this.prop];if(this.options.duration){this.pos=i=bH.easing[this.easing](b5,this.options.duration*b5,0,1,this.options.duration)}else{this.pos=i=b5}this.now=(this.end-this.start)*i+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(e&&e.set){e.set(this)}else{I.propHooks._default.set(this)}return this}};I.prototype.init.prototype=I.prototype;I.propHooks={_default:{get:function(i){var e;if(i.elem[i.prop]!=null&&(!i.elem.style||i.elem.style[i.prop]==null)){return i.elem[i.prop]}e=bH.css(i.elem,i.prop,"");return !e||e==="auto"?0:e},set:function(e){if(bH.fx.step[e.prop]){bH.fx.step[e.prop](e)}else{if(e.elem.style&&(e.elem.style[bH.cssProps[e.prop]]!=null||bH.cssHooks[e.prop])){bH.style(e.elem,e.prop,e.now+e.unit)}else{e.elem[e.prop]=e.now}}}}};I.propHooks.scrollTop=I.propHooks.scrollLeft={set:function(e){if(e.elem.nodeType&&e.elem.parentNode){e.elem[e.prop]=e.now}}};bH.easing={linear:function(e){return e},swing:function(e){return 0.5-Math.cos(e*Math.PI)/2}};bH.fx=I.prototype.init;bH.fx.step={};var M,ad,bQ=/^(?:toggle|show|hide)$/,bI=new RegExp("^(?:([+-])=|)("+aD+")([a-z%]*)$","i"),bO=/queueHooks$/,aF=[h],a1={"*":[function(e,b9){var cb=this.createTween(e,b9),b7=cb.cur(),b6=bI.exec(b9),ca=b6&&b6[3]||(bH.cssNumber[e]?"":"px"),i=(bH.cssNumber[e]||ca!=="px"&&+b7)&&bI.exec(bH.css(cb.elem,e)),b5=1,b8=20;if(i&&i[3]!==ca){ca=ca||i[3];b6=b6||[];i=+b7||1;do{b5=b5||".5";i=i/b5;bH.style(cb.elem,e,i+ca)}while(b5!==(b5=cb.cur()/b7)&&b5!==1&&--b8)}if(b6){i=cb.start=+i||+b7||0;cb.unit=ca;cb.end=b6[1]?i+(b6[1]+1)*b6[2]:+b6[2]}return cb}]};function bm(){setTimeout(function(){M=undefined});return(M=bH.now())}function bG(b6,b8){var b7,e={height:b6},b5=0;b8=b8?1:0;for(;b5<4;b5+=2-b8){b7=bS[b5];e["margin"+b7]=e["padding"+b7]=b6}if(b8){e.opacity=e.width=b6}return e}function bc(b7,b9,b6){var i,b8=(a1[b9]||[]).concat(a1["*"]),e=0,b5=b8.length;for(;ea ";i=b7.getElementsByTagName("a")[0];e=n.createElement("select");b6=e.appendChild(n.createElement("option"));b5=b7.getElementsByTagName("input")[0];i.style.cssText="top:1px";C.getSetAttribute=b7.className!=="t";C.style=/top/.test(i.getAttribute("style"));C.hrefNormalized=i.getAttribute("href")==="/a";C.checkOn=!!b5.value;C.optSelected=b6.selected;C.enctype=!!n.createElement("form").enctype;e.disabled=true;C.optDisabled=!b6.disabled;b5=n.createElement("input");b5.setAttribute("value","");C.input=b5.getAttribute("value")==="";b5.value="t";b5.setAttribute("type","radio");C.radioValue=b5.value==="t"})();var ak=/\r/g;bH.fn.extend({val:function(b6){var e,i,b7,b5=this[0];if(!arguments.length){if(b5){e=bH.valHooks[b5.type]||bH.valHooks[b5.nodeName.toLowerCase()];if(e&&"get" in e&&(i=e.get(b5,"value"))!==undefined){return i}i=b5.value;return typeof i==="string"?i.replace(ak,""):i==null?"":i}return}b7=bH.isFunction(b6);return this.each(function(b8){var b9;if(this.nodeType!==1){return}if(b7){b9=b6.call(this,b8,bH(this).val())}else{b9=b6}if(b9==null){b9=""}else{if(typeof b9==="number"){b9+=""}else{if(bH.isArray(b9)){b9=bH.map(b9,function(ca){return ca==null?"":ca+""})}}}e=bH.valHooks[this.type]||bH.valHooks[this.nodeName.toLowerCase()];if(!e||!("set" in e)||e.set(this,b9,"value")===undefined){this.value=b9}})}});bH.extend({valHooks:{option:{get:function(e){var i=bH.find.attr(e,"value");return i!=null?i:bH.trim(bH.text(e))}},select:{get:function(e){var ca,b6,cc=e.options,b8=e.selectedIndex,b7=e.type==="select-one"||b8<0,cb=b7?null:[],b9=b7?b8+1:cc.length,b5=b8<0?b9:b7?b8:0;for(;b5=0){try{b8.selected=cb=true}catch(b5){b8.scrollHeight}}else{b8.selected=false}}if(!cb){b9.selectedIndex=-1}return b6}}}});bH.each(["radio","checkbox"],function(){bH.valHooks[this]={set:function(e,i){if(bH.isArray(i)){return(e.checked=bH.inArray(bH(e).val(),i)>=0)}}};if(!C.checkOn){bH.valHooks[this].get=function(e){return e.getAttribute("value")===null?"on":e.value}}});var a9,b2,bN=bH.expr.attrHandle,ap=/^(?:checked|selected)$/i,bM=C.getSetAttribute,bE=C.input;bH.fn.extend({attr:function(e,i){return aA(this,bH.attr,e,i,arguments.length>1)},removeAttr:function(e){return this.each(function(){bH.removeAttr(this,e)})}});bH.extend({attr:function(b7,b6,b8){var e,b5,i=b7.nodeType;if(!b7||i===3||i===8||i===2){return}if(typeof b7.getAttribute===aB){return bH.prop(b7,b6,b8)}if(i!==1||!bH.isXMLDoc(b7)){b6=b6.toLowerCase();e=bH.attrHooks[b6]||(bH.expr.match.bool.test(b6)?b2:a9)}if(b8!==undefined){if(b8===null){bH.removeAttr(b7,b6)}else{if(e&&"set" in e&&(b5=e.set(b7,b8,b6))!==undefined){return b5}else{b7.setAttribute(b6,b8+"");return b8}}}else{if(e&&"get" in e&&(b5=e.get(b7,b6))!==null){return b5}else{b5=bH.find.attr(b7,b6);return b5==null?undefined:b5}}},removeAttr:function(b6,b8){var e,b7,b5=0,b9=b8&&b8.match(aE);if(b9&&b6.nodeType===1){while((e=b9[b5++])){b7=bH.propFix[e]||e;if(bH.expr.match.bool.test(e)){if(bE&&bM||!ap.test(e)){b6[b7]=false}else{b6[bH.camelCase("default-"+e)]=b6[b7]=false}}else{bH.attr(b6,e,"")}b6.removeAttribute(bM?e:b7)}}},attrHooks:{type:{set:function(e,i){if(!C.radioValue&&i==="radio"&&bH.nodeName(e,"input")){var b5=e.value;e.setAttribute("type",i);if(b5){e.value=b5}return i}}}}});b2={set:function(i,b5,e){if(b5===false){bH.removeAttr(i,e)}else{if(bE&&bM||!ap.test(e)){i.setAttribute(!bM&&bH.propFix[e]||e,e)}else{i[bH.camelCase("default-"+e)]=i[e]=true}}return e}};bH.each(bH.expr.match.bool.source.match(/\w+/g),function(b6,b5){var e=bN[b5]||bH.find.attr;bN[b5]=bE&&bM||!ap.test(b5)?function(b8,b7,ca){var i,b9;if(!ca){b9=bN[b7];bN[b7]=i;i=e(b8,b7,ca)!=null?b7.toLowerCase():null;bN[b7]=b9}return i}:function(b7,i,b8){if(!b8){return b7[bH.camelCase("default-"+i)]?i.toLowerCase():null}}});if(!bE||!bM){bH.attrHooks.value={set:function(i,b5,e){if(bH.nodeName(i,"input")){i.defaultValue=b5}else{return a9&&a9.set(i,b5,e)}}}}if(!bM){a9={set:function(b5,b6,i){var e=b5.getAttributeNode(i);if(!e){b5.setAttributeNode((e=b5.ownerDocument.createAttribute(i)))}e.value=b6+="";if(i==="value"||b6===b5.getAttribute(i)){return b6}}};bN.id=bN.name=bN.coords=function(b5,i,b6){var e;if(!b6){return(e=b5.getAttributeNode(i))&&e.value!==""?e.value:null}};bH.valHooks.button={get:function(b5,i){var e=b5.getAttributeNode(i);if(e&&e.specified){return e.value}},set:a9.set};bH.attrHooks.contenteditable={set:function(i,b5,e){a9.set(i,b5===""?false:b5,e)}};bH.each(["width","height"],function(b5,e){bH.attrHooks[e]={set:function(i,b6){if(b6===""){i.setAttribute(e,"auto");return b6}}}})}if(!C.style){bH.attrHooks.style={get:function(e){return e.style.cssText||undefined},set:function(e,i){return(e.style.cssText=i+"")}}}var aI=/^(?:input|select|textarea|button|object)$/i,E=/^(?:a|area)$/i;bH.fn.extend({prop:function(e,i){return aA(this,bH.prop,e,i,arguments.length>1)},removeProp:function(e){e=bH.propFix[e]||e;return this.each(function(){try{this[e]=undefined;delete this[e]}catch(i){}})}});bH.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(b8,b6,b9){var b5,e,b7,i=b8.nodeType;if(!b8||i===3||i===8||i===2){return}b7=i!==1||!bH.isXMLDoc(b8);if(b7){b6=bH.propFix[b6]||b6;e=bH.propHooks[b6]}if(b9!==undefined){return e&&"set" in e&&(b5=e.set(b8,b9,b6))!==undefined?b5:(b8[b6]=b9)}else{return e&&"get" in e&&(b5=e.get(b8,b6))!==null?b5:b8[b6]}},propHooks:{tabIndex:{get:function(i){var e=bH.find.attr(i,"tabindex");return e?parseInt(e,10):aI.test(i.nodeName)||E.test(i.nodeName)&&i.href?0:-1}}}});if(!C.hrefNormalized){bH.each(["href","src"],function(b5,e){bH.propHooks[e]={get:function(i){return i.getAttribute(e,4)}}})}if(!C.optSelected){bH.propHooks.selected={get:function(i){var e=i.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}return null}}}bH.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){bH.propFix[this.toLowerCase()]=this});if(!C.enctype){bH.propFix.enctype="encoding"}var bK=/[\t\r\n\f]/g;bH.fn.extend({addClass:function(cc){var b6,b5,cd,ca,b7,e,b8=0,b9=this.length,cb=typeof cc==="string"&&cc;if(bH.isFunction(cc)){return this.each(function(i){bH(this).addClass(cc.call(this,i,this.className))})}if(cb){b6=(cc||"").match(aE)||[];for(;b8=0){cd=cd.replace(" "+ca+" "," ")}}e=cc?bH.trim(cd):"";if(b5.className!==e){b5.className=e}}}}return this},toggleClass:function(b5,e){var i=typeof b5;if(typeof e==="boolean"&&i==="string"){return e?this.addClass(b5):this.removeClass(b5)}if(bH.isFunction(b5)){return this.each(function(b6){bH(this).toggleClass(b5.call(this,b6,this.className,e),e)})}return this.each(function(){if(i==="string"){var b8,b7=0,b6=bH(this),b9=b5.match(aE)||[];while((b8=b9[b7++])){if(b6.hasClass(b8)){b6.removeClass(b8)}else{b6.addClass(b8)}}}else{if(i===aB||i==="boolean"){if(this.className){bH._data(this,"__className__",this.className)}this.className=this.className||b5===false?"":bH._data(this,"__className__")||""}}})},hasClass:function(e){var b7=" "+e+" ",b6=0,b5=this.length;for(;b6=0){return true}}return false}});bH.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 contextmenu").split(" "),function(b5,e){bH.fn[e]=function(b6,i){return arguments.length>0?this.on(e,null,b6,i):this.trigger(e)}});bH.fn.extend({hover:function(e,i){return this.mouseenter(e).mouseleave(i||e)},bind:function(e,b5,i){return this.on(e,null,b5,i)},unbind:function(e,i){return this.off(e,null,i)},delegate:function(e,i,b6,b5){return this.on(i,e,b6,b5)},undelegate:function(e,i,b5){return arguments.length===1?this.off(e,"**"):this.off(i,e||"**",b5)}});var bo=bH.now();var bP=(/\?/);var a0=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;bH.parseJSON=function(e){if(a4.JSON&&a4.JSON.parse){return a4.JSON.parse(e+"")}var b6,b5=null,i=bH.trim(e+"");return i&&!bH.trim(i.replace(a0,function(b9,b7,b8,ca){if(b6&&b7){b5=0}if(b5===0){return b9}b6=b8||b7;b5+=!ca-!b8;return""}))?(Function("return "+i))():bH.error("Invalid JSON: "+e)};bH.parseXML=function(b6){var i,b5;if(!b6||typeof b6!=="string"){return null}try{if(a4.DOMParser){b5=new DOMParser();i=b5.parseFromString(b6,"text/xml")}else{i=new ActiveXObject("Microsoft.XMLDOM");i.async="false";i.loadXML(b6)}}catch(b7){i=undefined}if(!i||!i.documentElement||i.getElementsByTagName("parsererror").length){bH.error("Invalid XML: "+b6)}return i};var b3,Z,ao=/#.*$/,Q=/([?&])_=[^&]*/,ag=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,B=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,q=/^(?:GET|HEAD)$/,aJ=/^\/\//,aU=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,v={},a8={},aW="*/".concat("*");try{Z=location.href}catch(bh){Z=n.createElement("a");Z.href="";Z=Z.href}b3=aU.exec(Z.toLowerCase())||[];function bJ(e){return function(b8,b9){if(typeof b8!=="string"){b9=b8;b8="*"}var b5,b6=0,b7=b8.toLowerCase().match(aE)||[];if(bH.isFunction(b9)){while((b5=b7[b6++])){if(b5.charAt(0)==="+"){b5=b5.slice(1)||"*";(e[b5]=e[b5]||[]).unshift(b9)}else{(e[b5]=e[b5]||[]).push(b9)}}}}}function p(e,b5,b9,b6){var i={},b7=(e===a8);function b8(ca){var cb;i[ca]=true;bH.each(e[ca]||[],function(cd,cc){var ce=cc(b5,b9,b6);if(typeof ce==="string"&&!b7&&!i[ce]){b5.dataTypes.unshift(ce);b8(ce);return false}else{if(b7){return !(cb=ce)}}});return cb}return b8(b5.dataTypes[0])||!i["*"]&&b8("*")}function s(b5,b6){var e,i,b7=bH.ajaxSettings.flatOptions||{};for(i in b6){if(b6[i]!==undefined){(b7[i]?b5:(e||(e={})))[i]=b6[i]}}if(e){bH.extend(true,b5,e)}return b5}function g(cb,ca,b7){var e,b6,b5,b8,i=cb.contents,b9=cb.dataTypes;while(b9[0]==="*"){b9.shift();if(b6===undefined){b6=cb.mimeType||ca.getResponseHeader("Content-Type")}}if(b6){for(b8 in i){if(i[b8]&&i[b8].test(b6)){b9.unshift(b8);break}}}if(b9[0] in b7){b5=b9[0]}else{for(b8 in b7){if(!b9[0]||cb.converters[b8+" "+b9[0]]){b5=b8;break}if(!e){e=b8}}b5=b5||e}if(b5){if(b5!==b9[0]){b9.unshift(b5)}return b7[b5]}}function af(cf,b7,cc,b5){var i,ca,cd,b8,b6,ce={},cb=cf.dataTypes.slice();if(cb[1]){for(cd in cf.converters){ce[cd.toLowerCase()]=cf.converters[cd]}}ca=cb.shift();while(ca){if(cf.responseFields[ca]){cc[cf.responseFields[ca]]=b7}if(!b6&&b5&&cf.dataFilter){b7=cf.dataFilter(b7,cf.dataType)}b6=ca;ca=cb.shift();if(ca){if(ca==="*"){ca=b6}else{if(b6!=="*"&&b6!==ca){cd=ce[b6+" "+ca]||ce["* "+ca];if(!cd){for(i in ce){b8=i.split(" ");if(b8[1]===ca){cd=ce[b6+" "+b8[0]]||ce["* "+b8[0]];if(cd){if(cd===true){cd=ce[i]}else{if(ce[i]!==true){ca=b8[0];cb.unshift(b8[1])}}break}}}}if(cd!==true){if(cd&&cf["throws"]){b7=cd(b7)}else{try{b7=cd(b7)}catch(b9){return{state:"parsererror",error:cd?b9:"No conversion from "+b6+" to "+ca}}}}}}}}return{state:"success",data:b7}}bH.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Z,type:"GET",isLocal:B.test(b3[1]),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":aW,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":bH.parseJSON,"text xml":bH.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(i,e){return e?s(s(i,bH.ajaxSettings),e):s(bH.ajaxSettings,i)},ajaxPrefilter:bJ(v),ajaxTransport:bJ(a8),ajax:function(b9,b6){if(typeof b9==="object"){b6=b9;b9=undefined}b6=b6||{};var ci,ck,ca,cp,ce,b5,cl,b7,cd=bH.ajaxSetup({},b6),cr=cd.context||cd,cg=cd.context&&(cr.nodeType||cr.jquery)?bH(cr):bH.event,cq=bH.Deferred(),cn=bH.Callbacks("once memory"),cb=cd.statusCode||{},ch={},co={},b8=0,cc="canceled",cj={readyState:0,getResponseHeader:function(i){var e;if(b8===2){if(!b7){b7={};while((e=ag.exec(cp))){b7[e[1].toLowerCase()]=e[2]}}e=b7[i.toLowerCase()]}return e==null?null:e},getAllResponseHeaders:function(){return b8===2?cp:null},setRequestHeader:function(i,cs){var e=i.toLowerCase();if(!b8){i=co[e]=co[e]||i;ch[i]=cs}return this},overrideMimeType:function(e){if(!b8){cd.mimeType=e}return this},statusCode:function(i){var e;if(i){if(b8<2){for(e in i){cb[e]=[cb[e],i[e]]}}else{cj.always(i[cj.status])}}return this},abort:function(i){var e=i||cc;if(cl){cl.abort(e)}cf(0,e);return this}};cq.promise(cj).complete=cn.add;cj.success=cj.done;cj.error=cj.fail;cd.url=((b9||cd.url||Z)+"").replace(ao,"").replace(aJ,b3[1]+"//");cd.type=b6.method||b6.type||cd.method||cd.type;cd.dataTypes=bH.trim(cd.dataType||"*").toLowerCase().match(aE)||[""];if(cd.crossDomain==null){ci=aU.exec(cd.url.toLowerCase());cd.crossDomain=!!(ci&&(ci[1]!==b3[1]||ci[2]!==b3[2]||(ci[3]||(ci[1]==="http:"?"80":"443"))!==(b3[3]||(b3[1]==="http:"?"80":"443"))))}if(cd.data&&cd.processData&&typeof cd.data!=="string"){cd.data=bH.param(cd.data,cd.traditional)}p(v,cd,b6,cj);if(b8===2){return cj}b5=bH.event&&cd.global;if(b5&&bH.active++===0){bH.event.trigger("ajaxStart")}cd.type=cd.type.toUpperCase();cd.hasContent=!q.test(cd.type);ca=cd.url;if(!cd.hasContent){if(cd.data){ca=(cd.url+=(bP.test(ca)?"&":"?")+cd.data);delete cd.data}if(cd.cache===false){cd.url=Q.test(ca)?ca.replace(Q,"$1_="+bo++):ca+(bP.test(ca)?"&":"?")+"_="+bo++}}if(cd.ifModified){if(bH.lastModified[ca]){cj.setRequestHeader("If-Modified-Since",bH.lastModified[ca])}if(bH.etag[ca]){cj.setRequestHeader("If-None-Match",bH.etag[ca])}}if(cd.data&&cd.hasContent&&cd.contentType!==false||b6.contentType){cj.setRequestHeader("Content-Type",cd.contentType)}cj.setRequestHeader("Accept",cd.dataTypes[0]&&cd.accepts[cd.dataTypes[0]]?cd.accepts[cd.dataTypes[0]]+(cd.dataTypes[0]!=="*"?", "+aW+"; q=0.01":""):cd.accepts["*"]);for(ck in cd.headers){cj.setRequestHeader(ck,cd.headers[ck])}if(cd.beforeSend&&(cd.beforeSend.call(cr,cj,cd)===false||b8===2)){return cj.abort()}cc="abort";for(ck in {success:1,error:1,complete:1}){cj[ck](cd[ck])}cl=p(a8,cd,b6,cj);if(!cl){cf(-1,"No Transport")}else{cj.readyState=1;if(b5){cg.trigger("ajaxSend",[cj,cd])}if(cd.async&&cd.timeout>0){ce=setTimeout(function(){cj.abort("timeout")},cd.timeout)}try{b8=1;cl.send(ch,cf)}catch(cm){if(b8<2){cf(-1,cm)}else{throw cm}}}function cf(cv,i,cw,ct){var e,cz,cx,cu,cy,cs=i;if(b8===2){return}b8=2;if(ce){clearTimeout(ce)}cl=undefined;cp=ct||"";cj.readyState=cv>0?4:0;e=cv>=200&&cv<300||cv===304;if(cw){cu=g(cd,cj,cw)}cu=af(cd,cu,cj,e);if(e){if(cd.ifModified){cy=cj.getResponseHeader("Last-Modified");if(cy){bH.lastModified[ca]=cy}cy=cj.getResponseHeader("etag");if(cy){bH.etag[ca]=cy}}if(cv===204||cd.type==="HEAD"){cs="nocontent"}else{if(cv===304){cs="notmodified"}else{cs=cu.state;cz=cu.data;cx=cu.error;e=!cx}}}else{cx=cs;if(cv||!cs){cs="error";if(cv<0){cv=0}}}cj.status=cv;cj.statusText=(i||cs)+"";if(e){cq.resolveWith(cr,[cz,cs,cj])}else{cq.rejectWith(cr,[cj,cs,cx])}cj.statusCode(cb);cb=undefined;if(b5){cg.trigger(e?"ajaxSuccess":"ajaxError",[cj,cd,e?cz:cx])}cn.fireWith(cr,[cj,cs]);if(b5){cg.trigger("ajaxComplete",[cj,cd]);if(!(--bH.active)){bH.event.trigger("ajaxStop")}}}return cj},getJSON:function(e,i,b5){return bH.get(e,i,b5,"json")},getScript:function(e,i){return bH.get(e,undefined,i,"script")}});bH.each(["get","post"],function(e,b5){bH[b5]=function(i,b7,b8,b6){if(bH.isFunction(b7)){b6=b6||b8;b8=b7;b7=undefined}return bH.ajax({url:i,type:b5,dataType:b6,data:b7,success:b8})}});bH._evalUrl=function(e){return bH.ajax({url:e,type:"GET",dataType:"script",async:false,global:false,"throws":true})};bH.fn.extend({wrapAll:function(e){if(bH.isFunction(e)){return this.each(function(b5){bH(this).wrapAll(e.call(this,b5))})}if(this[0]){var i=bH(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){i.insertBefore(this[0])}i.map(function(){var b5=this;while(b5.firstChild&&b5.firstChild.nodeType===1){b5=b5.firstChild}return b5}).append(this)}return this},wrapInner:function(e){if(bH.isFunction(e)){return this.each(function(b5){bH(this).wrapInner(e.call(this,b5))})}return this.each(function(){var i=bH(this),b5=i.contents();if(b5.length){b5.wrapAll(e)}else{i.append(e)}})},wrap:function(e){var i=bH.isFunction(e);return this.each(function(b5){bH(this).wrapAll(i?e.call(this,b5):e)})},unwrap:function(){return this.parent().each(function(){if(!bH.nodeName(this,"body")){bH(this).replaceWith(this.childNodes)}}).end()}});bH.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||(!C.reliableHiddenOffsets()&&((e.style&&e.style.display)||bH.css(e,"display"))==="none")};bH.expr.filters.visible=function(e){return !bH.expr.filters.hidden(e)};var bv=/%20/g,aR=/\[\]$/,W=/\r?\n/g,b=/^(?:submit|button|image|reset|file)$/i,at=/^(?:input|select|textarea|keygen)/i;function j(b5,b7,i,b6){var e;if(bH.isArray(b7)){bH.each(b7,function(b9,b8){if(i||aR.test(b5)){b6(b5,b8)}else{j(b5+"["+(typeof b8==="object"?b9:"")+"]",b8,i,b6)}})}else{if(!i&&bH.type(b7)==="object"){for(e in b7){j(b5+"["+e+"]",b7[e],i,b6)}}else{b6(b5,b7)}}}bH.param=function(e,b5){var b6,i=[],b7=function(b8,b9){b9=bH.isFunction(b9)?b9():(b9==null?"":b9);i[i.length]=encodeURIComponent(b8)+"="+encodeURIComponent(b9)};if(b5===undefined){b5=bH.ajaxSettings&&bH.ajaxSettings.traditional}if(bH.isArray(e)||(e.jquery&&!bH.isPlainObject(e))){bH.each(e,function(){b7(this.name,this.value)})}else{for(b6 in e){j(b6,e[b6],b5,b7)}}return i.join("&").replace(bv,"+")};bH.fn.extend({serialize:function(){return bH.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=bH.prop(this,"elements");return e?bH.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!bH(this).is(":disabled")&&at.test(this.nodeName)&&!b.test(e)&&(this.checked||!aL.test(e))}).map(function(e,b5){var b6=bH(this).val();return b6==null?null:bH.isArray(b6)?bH.map(b6,function(i){return{name:b5.name,value:i.replace(W,"\r\n")}}):{name:b5.name,value:b6.replace(W,"\r\n")}}).get()}});bH.ajaxSettings.xhr=a4.ActiveXObject!==undefined?function(){return !this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&bD()||bf()}:bD;var az=0,ai={},ax=bH.ajaxSettings.xhr();if(a4.attachEvent){a4.attachEvent("onunload",function(){for(var e in ai){ai[e](undefined,true)}})}C.cors=!!ax&&("withCredentials" in ax);ax=C.ajax=!!ax;if(ax){bH.ajaxTransport(function(e){if(!e.crossDomain||C.cors){var i;return{send:function(b8,b5){var b6,b7=e.xhr(),b9=++az;b7.open(e.type,e.url,e.async,e.username,e.password);if(e.xhrFields){for(b6 in e.xhrFields){b7[b6]=e.xhrFields[b6]}}if(e.mimeType&&b7.overrideMimeType){b7.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!b8["X-Requested-With"]){b8["X-Requested-With"]="XMLHttpRequest"}for(b6 in b8){if(b8[b6]!==undefined){b7.setRequestHeader(b6,b8[b6]+"")}}b7.send((e.hasContent&&e.data)||null);i=function(cc,cb){var ca,cf,cd;if(i&&(cb||b7.readyState===4)){delete ai[b9];i=undefined;b7.onreadystatechange=bH.noop;if(cb){if(b7.readyState!==4){b7.abort()}}else{cd={};ca=b7.status;if(typeof b7.responseText==="string"){cd.text=b7.responseText}try{cf=b7.statusText}catch(ce){cf=""}if(!ca&&e.isLocal&&!e.crossDomain){ca=cd.text?200:404}else{if(ca===1223){ca=204}}}}if(cd){b5(ca,cf,cd,b7.getAllResponseHeaders())}};if(!e.async){i()}else{if(b7.readyState===4){setTimeout(i)}else{b7.onreadystatechange=ai[b9]=i}}},abort:function(){if(i){i(undefined,true)}}}}})}function bD(){try{return new a4.XMLHttpRequest()}catch(i){}}function bf(){try{return new a4.ActiveXObject("Microsoft.XMLHTTP")}catch(i){}}bH.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){bH.globalEval(e);return e}}});bH.ajaxPrefilter("script",function(e){if(e.cache===undefined){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});bH.ajaxTransport("script",function(b5){if(b5.crossDomain){var e,i=n.head||bH("head")[0]||n.documentElement;return{send:function(b6,b7){e=n.createElement("script");e.async=true;if(b5.scriptCharset){e.charset=b5.scriptCharset}e.src=b5.url;e.onload=e.onreadystatechange=function(b9,b8){if(b8||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(e.parentNode){e.parentNode.removeChild(e)}e=null;if(!b8){b7(200,"success")}}};i.insertBefore(e,i.firstChild)},abort:function(){if(e){e.onload(undefined,true)}}}}});var br=[],a7=/(=)\?(?=&|$)|\?\?/;bH.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=br.pop()||(bH.expando+"_"+(bo++));this[e]=true;return e}});bH.ajaxPrefilter("json jsonp",function(b6,e,b7){var b9,i,b5,b8=b6.jsonp!==false&&(a7.test(b6.url)?"url":typeof b6.data==="string"&&!(b6.contentType||"").indexOf("application/x-www-form-urlencoded")&&a7.test(b6.data)&&"data");if(b8||b6.dataTypes[0]==="jsonp"){b9=b6.jsonpCallback=bH.isFunction(b6.jsonpCallback)?b6.jsonpCallback():b6.jsonpCallback;if(b8){b6[b8]=b6[b8].replace(a7,"$1"+b9)}else{if(b6.jsonp!==false){b6.url+=(bP.test(b6.url)?"&":"?")+b6.jsonp+"="+b9}}b6.converters["script json"]=function(){if(!b5){bH.error(b9+" was not called")}return b5[0]};b6.dataTypes[0]="json";i=a4[b9];a4[b9]=function(){b5=arguments};b7.always(function(){a4[b9]=i;if(b6[b9]){b6.jsonpCallback=e.jsonpCallback;br.push(b9)}if(b5&&bH.isFunction(i)){i(b5[0])}b5=i=undefined});return"script"}});bH.parseHTML=function(b7,b5,b6){if(!b7||typeof b7!=="string"){return null}if(typeof b5==="boolean"){b6=b5;b5=false}b5=b5||n;var i=a.exec(b7),e=!b6&&[];if(i){return[b5.createElement(i[1])]}i=bH.buildFragment([b7],b5,e);if(e&&e.length){bH(e).remove()}return bH.merge([],i.childNodes)};var b0=bH.fn.load;bH.fn.load=function(b6,b9,ca){if(typeof b6!=="string"&&b0){return b0.apply(this,arguments)}var e,b5,b7,i=this,b8=b6.indexOf(" ");if(b8>=0){e=bH.trim(b6.slice(b8,b6.length));b6=b6.slice(0,b8)}if(bH.isFunction(b9)){ca=b9;b9=undefined}else{if(b9&&typeof b9==="object"){b7="POST"}}if(i.length>0){bH.ajax({url:b6,type:b7,dataType:"html",data:b9}).done(function(cb){b5=arguments;i.html(e?bH("").append(bH.parseHTML(cb)).find(e):cb)}).complete(ca&&function(cc,cb){i.each(ca,b5||[cc.responseText,cb,cc])})}return this};bH.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,b5){bH.fn[b5]=function(i){return this.on(b5,i)}});bH.expr.filters.animated=function(e){return bH.grep(bH.timers,function(i){return e===i.elem}).length};var bW=a4.document.documentElement;function bq(e){return bH.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}bH.offset={setOffset:function(b6,cg,ca){var cc,b9,e,b7,b5,ce,cf,cb=bH.css(b6,"position"),b8=bH(b6),cd={};if(cb==="static"){b6.style.position="relative"}b5=b8.offset();e=bH.css(b6,"top");ce=bH.css(b6,"left");cf=(cb==="absolute"||cb==="fixed")&&bH.inArray("auto",[e,ce])>-1;if(cf){cc=b8.position();b7=cc.top;b9=cc.left}else{b7=parseFloat(e)||0;b9=parseFloat(ce)||0}if(bH.isFunction(cg)){cg=cg.call(b6,ca,b5)}if(cg.top!=null){cd.top=(cg.top-b5.top)+b7}if(cg.left!=null){cd.left=(cg.left-b5.left)+b9}if("using" in cg){cg.using.call(b6,cd)}else{b8.css(cd)}}};bH.fn.extend({offset:function(i){if(arguments.length){return i===undefined?this:this.each(function(b9){bH.offset.setOffset(this,i,b9)})}var e,b8,b6={top:0,left:0},b5=this[0],b7=b5&&b5.ownerDocument;if(!b7){return}e=b7.documentElement;if(!bH.contains(e,b5)){return b6}if(typeof b5.getBoundingClientRect!==aB){b6=b5.getBoundingClientRect()}b8=bq(b7);return{top:b6.top+(b8.pageYOffset||e.scrollTop)-(e.clientTop||0),left:b6.left+(b8.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},position:function(){if(!this[0]){return}var b5,b6,e={top:0,left:0},i=this[0];if(bH.css(i,"position")==="fixed"){b6=i.getBoundingClientRect()}else{b5=this.offsetParent();b6=this.offset();if(!bH.nodeName(b5[0],"html")){e=b5.offset()}e.top+=bH.css(b5[0],"borderTopWidth",true);e.left+=bH.css(b5[0],"borderLeftWidth",true)}return{top:b6.top-e.top-bH.css(i,"marginTop",true),left:b6.left-e.left-bH.css(i,"marginLeft",true)}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||bW;while(e&&(!bH.nodeName(e,"html")&&bH.css(e,"position")==="static")){e=e.offsetParent}return e||bW})}});bH.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b5,i){var e=/Y/.test(i);bH.fn[b5]=function(b6){return aA(this,function(b7,ca,b9){var b8=bq(b7);if(b9===undefined){return b8?(i in b8)?b8[i]:b8.document.documentElement[ca]:b7[ca]}if(b8){b8.scrollTo(!e?b9:bH(b8).scrollLeft(),e?b9:bH(b8).scrollTop())}else{b7[ca]=b9}},b5,b6,arguments.length,null)}});bH.each(["top","left"],function(e,b5){bH.cssHooks[b5]=a6(C.pixelPosition,function(b6,i){if(i){i=F(b6,b5);return X.test(i)?bH(b6).position()[b5]+"px":i}})});bH.each({Height:"height",Width:"width"},function(e,i){bH.each({padding:"inner"+e,content:i,"":"outer"+e},function(b5,b6){bH.fn[b6]=function(ca,b9){var b8=arguments.length&&(b5||typeof ca!=="boolean"),b7=b5||(ca===true||b9===true?"margin":"border");return aA(this,function(cc,cb,cd){var ce;if(bH.isWindow(cc)){return cc.document.documentElement["client"+e]}if(cc.nodeType===9){ce=cc.documentElement;return Math.max(cc.body["scroll"+e],ce["scroll"+e],cc.body["offset"+e],ce["offset"+e],ce["client"+e])}return cd===undefined?bH.css(cc,cb,b7):bH.style(cc,cb,cd,b7)},i,b8?ca:undefined,b8,null)}})});bH.fn.size=function(){return this.length};bH.fn.andSelf=bH.fn.addBack;if(typeof define==="function"&&define.amd){define("jquery",[],function(){return bH})}var bj=a4.jQuery,H=a4.$;bH.noConflict=function(e){if(a4.$===bH){a4.$=H}if(e&&a4.jQuery===bH){a4.jQuery=bj}return bH};if(typeof au===aB){a4.jQuery=a4.$=bH}return bH}));if(!("ace" in window)){window.ace={}}ace.config={cookie_expiry:604800,cookie_path:"",storage_method:2};if(!("vars" in window.ace)){window.ace.vars={}}ace.vars.very_old_ie=!("querySelector" in document.documentElement);ace.settings={is:function(b,a){return(ace.data.get("settings",b+"-"+a)==1)},exists:function(b,a){return(ace.data.get("settings",b+"-"+a)!==null)},set:function(b,a){ace.data.set("settings",b+"-"+a,1)},unset:function(b,a){ace.data.set("settings",b+"-"+a,-1)},remove:function(b,a){ace.data.remove("settings",b+"-"+a)},navbar_fixed:function(c,a,d,b){if(ace.vars.very_old_ie){return false}var c=c||"#navbar";if(typeof c==="string"){c=document.querySelector(c)}if(!c){return false}a=a||false;d=d&&true;if(!a&&b!==false){var f=null;if(ace.settings.is("sidebar","fixed")||((f=document.getElementById("sidebar"))&&ace.hasClass(f,"sidebar-fixed"))){ace.settings.sidebar_fixed(f,false,d)}}if(a){if(!ace.hasClass(c,"navbar-fixed-top")){ace.addClass(c,"navbar-fixed-top")}if(d!==false){ace.settings.set("navbar","fixed")}}else{ace.removeClass(c,"navbar-fixed-top");if(d!==false){ace.settings.unset("navbar","fixed")}}try{document.getElementById("ace-settings-navbar").checked=a}catch(g){}if(window.jQuery){jQuery(document).trigger("settings.ace",["navbar_fixed",a,c])}},sidebar_fixed:function(g,a,d,c){if(ace.vars.very_old_ie){return false}var g=g||"#sidebar";if(typeof g==="string"){g=document.querySelector(g)}if(!g){return false}a=a||false;d=d&&true;if(!a&&c!==false){var b=null;if(ace.settings.is("breadcrumbs","fixed")||((b=document.getElementById("breadcrumbs"))&&ace.hasClass(b,"breadcrumbs-fixed"))){ace.settings.breadcrumbs_fixed(b,false,d)}}if(a&&c!==false&&!ace.settings.is("navbar","fixed")){ace.settings.navbar_fixed(null,true,d)}if(a){if(!ace.hasClass(g,"sidebar-fixed")){ace.addClass(g,"sidebar-fixed");var f=document.getElementById("menu-toggler");if(f){ace.addClass(f,"fixed")}}if(d!==false){ace.settings.set("sidebar","fixed")}}else{ace.removeClass(g,"sidebar-fixed");var f=document.getElementById("menu-toggler");if(f){ace.removeClass(f,"fixed")}if(d!==false){ace.settings.unset("sidebar","fixed")}}try{document.getElementById("ace-settings-sidebar").checked=a}catch(h){}if(window.jQuery){jQuery(document).trigger("settings.ace",["sidebar_fixed",a,g])}},breadcrumbs_fixed:function(b,a,d,c){if(ace.vars.very_old_ie){return false}var b=b||"#breadcrumbs";if(typeof b==="string"){b=document.querySelector(b)}if(!b){return false}a=a||false;d=d&&true;if(a&&c!==false&&!ace.settings.is("sidebar","fixed")){ace.settings.sidebar_fixed(null,true,d)}if(a){if(!ace.hasClass(b,"breadcrumbs-fixed")){ace.addClass(b,"breadcrumbs-fixed")}if(d!==false){ace.settings.set("breadcrumbs","fixed")}}else{ace.removeClass(b,"breadcrumbs-fixed");if(d!==false){ace.settings.unset("breadcrumbs","fixed")}}try{document.getElementById("ace-settings-breadcrumbs").checked=a}catch(f){}if(window.jQuery){jQuery(document).trigger("settings.ace",["breadcrumbs_fixed",a,b])}},main_container_fixed:function(c,a,d){if(ace.vars.very_old_ie){return false}a=a||false;d=d&&true;var c=c||"#main-container";if(typeof c==="string"){c=document.querySelector(c)}if(!c){return false}var b=document.getElementById("navbar-container");if(a){if(!ace.hasClass(c,"container")){ace.addClass(c,"container")}if(b&&!ace.hasClass(b,"container")){ace.addClass(b,"container")}if(d!==false){ace.settings.set("main-container","fixed")}}else{ace.removeClass(c,"container");if(b){ace.removeClass(b,"container")}if(d!==false){ace.settings.unset("main-container","fixed")}}try{document.getElementById("ace-settings-add-container").checked=a}catch(g){}if(navigator.userAgent.match(/webkit/i)){var f=document.getElementById("sidebar");ace.toggleClass(f,"menu-min");setTimeout(function(){ace.toggleClass(f,"menu-min")},0)}if(window.jQuery){jQuery(document).trigger("settings.ace",["main_container_fixed",a,c])}},sidebar_collapsed:function(f,g,e){if(ace.vars.very_old_ie){return false}var f=f||"#sidebar";if(typeof f==="string"){f=document.querySelector(f)}if(!f){return false}g=g||false;if(g){ace.addClass(f,"menu-min");if(e!==false){ace.settings.set("sidebar","collapsed")}}else{ace.removeClass(f,"menu-min");if(e!==false){ace.settings.unset("sidebar","collapsed")}}if(window.jQuery){jQuery(document).trigger("settings.ace",["sidebar_collapsed",g,f])}if(!window.jQuery){var d=document.querySelector('.sidebar-collapse[data-target="#'+(f.getAttribute("id")||"")+'"]');if(!d){d=f.querySelector(".sidebar-collapse")}if(!d){return}var c=d.querySelector("[data-icon1][data-icon2]"),b,a;if(!c){return}b=c.getAttribute("data-icon1");a=c.getAttribute("data-icon2");if(g){ace.removeClass(c,b);ace.addClass(c,a)}else{ace.removeClass(c,a);ace.addClass(c,b)}}}};ace.settings.check=function(c,e){if(!ace.settings.exists(c,e)){return}var a=ace.settings.is(c,e);var b={"navbar-fixed":"navbar-fixed-top","sidebar-fixed":"sidebar-fixed","breadcrumbs-fixed":"breadcrumbs-fixed","sidebar-collapsed":"menu-min","main-container-fixed":"container"};var d=document.getElementById(c);if(a!=ace.hasClass(d,b[c+"-"+e])){ace.settings[c.replace("-","_")+"_"+e](null,a)}};ace.data_storage=function(e,c){var b="ace_";var d=null;var a=0;if((e==1||e===c)&&"localStorage" in window&&window.localStorage!==null){d=ace.storage;a=1}else{if(d==null&&(e==2||e===c)&&"cookie" in document&&document.cookie!==null){d=ace.cookie;a=2}}this.set=function(h,g,i,j,l){if(!d){return}if(i===l){i=g;g=h;if(i==null){d.remove(b+g)}else{if(a==1){d.set(b+g,i)}else{if(a==2){d.set(b+g,i,ace.config.cookie_expiry,j||ace.config.cookie_path)}}}}else{if(a==1){if(i==null){d.remove(b+h+"_"+g)}else{d.set(b+h+"_"+g,i)}}else{if(a==2){var k=d.get(b+h);var f=k?JSON.parse(k):{};if(i==null){delete f[g];if(ace.sizeof(f)==0){d.remove(b+h);return}}else{f[g]=i}d.set(b+h,JSON.stringify(f),ace.config.cookie_expiry,j||ace.config.cookie_path)}}}};this.get=function(h,g,j){if(!d){return null}if(g===j){g=h;return d.get(b+g)}else{if(a==1){return d.get(b+h+"_"+g)}else{if(a==2){var i=d.get(b+h);var f=i?JSON.parse(i):{};return g in f?f[g]:null}}}};this.remove=function(g,f,h){if(!d){return}if(f===h){f=g;this.set(f,null)}else{this.set(g,f,null)}}};ace.cookie={get:function(c){var d=document.cookie,g,f=c+"=",a;if(!d){return}a=d.indexOf("; "+f);if(a==-1){a=d.indexOf(f);if(a!=0){return null}}else{a+=2}g=d.indexOf(";",a);if(g==-1){g=d.length}return decodeURIComponent(d.substring(a+f.length,g))},set:function(b,e,a,g,c,f){var h=new Date();if(typeof(a)=="object"&&a.toGMTString){a=a.toGMTString()}else{if(parseInt(a,10)){h.setTime(h.getTime()+(parseInt(a,10)*1000));a=h.toGMTString()}else{a=""}}document.cookie=b+"="+encodeURIComponent(e)+((a)?"; expires="+a:"")+((g)?"; path="+g:"")+((c)?"; domain="+c:"")+((f)?"; secure":"")},remove:function(a,b){this.set(a,"",-1000,b)}};ace.storage={get:function(a){return window.localStorage.getItem(a)},set:function(a,b){window.localStorage.setItem(a,b)},remove:function(a){window.localStorage.removeItem(a)}};ace.sizeof=function(c){var b=0;for(var a in c){if(c.hasOwnProperty(a)){b++}}return b};ace.hasClass=function(b,a){return(" "+b.className+" ").indexOf(" "+a+" ")>-1};ace.addClass=function(c,b){if(!ace.hasClass(c,b)){var a=c.className;c.className=a+(a.length?" ":"")+b}};ace.removeClass=function(b,a){ace.replaceClass(b,a)};ace.replaceClass=function(c,b,d){var a=new RegExp(("(^|\\s)"+b+"(\\s|$)"),"i");c.className=c.className.replace(a,function(e,g,f){return d?(g+d+f):" "}).replace(/^\s+|\s+$/g,"")};ace.toggleClass=function(b,a){if(ace.hasClass(b,a)){ace.removeClass(b,a)}else{ace.addClass(b,a)}};ace.isHTTMlElement=function(a){return window.HTMLElement?a instanceof HTMLElement:("nodeType" in a?a.nodeType==1:false)};ace.data=new ace.data_storage(ace.config.storage_method);(function(){function d(o,k){var p;k=k||{};this.trackingClick=false;this.trackingClickStart=0;this.targetElement=null;this.touchStartX=0;this.touchStartY=0;this.lastTouchIdentifier=0;this.touchBoundary=k.touchBoundary||10;this.layer=o;this.tapDelay=k.tapDelay||200;this.tapTimeout=k.tapTimeout||700;if(d.notNeeded(o)){return}function q(l,i){return function(){return l.apply(i,arguments)}}var j=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"];var n=this;for(var m=0,h=j.length;m
=0;var b=navigator.userAgent.indexOf("Android")>0&&!c;var g=/iP(ad|hone|od)/.test(navigator.userAgent)&&!c;var e=g&&(/OS 4_\d(_\d)?/).test(navigator.userAgent);var f=g&&(/OS [6-7]_\d/).test(navigator.userAgent);var a=navigator.userAgent.indexOf("BB10")>0;d.prototype.needsClick=function(h){switch(h.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(h.disabled){return true}break;case"input":if((g&&h.type==="file")||h.disabled){return true}break;case"label":case"iframe":case"video":return true}return(/\bneedsclick\b/).test(h.className)};d.prototype.needsFocus=function(h){switch(h.nodeName.toLowerCase()){case"textarea":return true;case"select":return !b;case"input":switch(h.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return false}return !h.disabled&&!h.readOnly;default:return(/\bneedsfocus\b/).test(h.className)}};d.prototype.sendClick=function(i,j){var h,k;if(document.activeElement&&document.activeElement!==i){document.activeElement.blur()}k=j.changedTouches[0];h=document.createEvent("MouseEvents");h.initMouseEvent(this.determineEventType(i),true,true,window,1,k.screenX,k.screenY,k.clientX,k.clientY,false,false,false,false,0,null);h.forwardedTouchEvent=true;i.dispatchEvent(h)};d.prototype.determineEventType=function(h){if(b&&h.tagName.toLowerCase()==="select"){return"mousedown"}return"click"};d.prototype.focus=function(h){var i;if(g&&h.setSelectionRange&&h.type.indexOf("date")!==0&&h.type!=="time"&&h.type!=="month"){i=h.value.length;h.setSelectionRange(i,i)}else{h.focus()}};d.prototype.updateScrollParent=function(i){var j,h;j=i.fastClickScrollParent;if(!j||!j.contains(i)){h=i;do{if(h.scrollHeight>h.offsetHeight){j=h;i.fastClickScrollParent=h;break}h=h.parentElement}while(h)}if(j){j.fastClickLastScrollTop=j.scrollTop}};d.prototype.getTargetElementFromEventTarget=function(h){if(h.nodeType===Node.TEXT_NODE){return h.parentNode}return h};d.prototype.onTouchStart=function(j){var h,k,i;if(j.targetTouches.length>1){return true}h=this.getTargetElementFromEventTarget(j.target);k=j.targetTouches[0];if(g){i=window.getSelection();if(i.rangeCount&&!i.isCollapsed){return true}if(!e){if(k.identifier&&k.identifier===this.lastTouchIdentifier){j.preventDefault();return false}this.lastTouchIdentifier=k.identifier;this.updateScrollParent(h)}}this.trackingClick=true;this.trackingClickStart=j.timeStamp;this.targetElement=h;this.touchStartX=k.pageX;this.touchStartY=k.pageY;if((j.timeStamp-this.lastClickTime)i||Math.abs(j.pageY-this.touchStartY)>i){return true}return false};d.prototype.onTouchMove=function(h){if(!this.trackingClick){return true}if(this.targetElement!==this.getTargetElementFromEventTarget(h.target)||this.touchHasMoved(h)){this.trackingClick=false;this.targetElement=null}return true};d.prototype.findControl=function(h){if(h.control!==undefined){return h.control}if(h.htmlFor){return document.getElementById(h.htmlFor)}return h.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")};d.prototype.onTouchEnd=function(j){var l,k,i,n,m,h=this.targetElement;if(!this.trackingClick){return true}if((j.timeStamp-this.lastClickTime)this.tapTimeout){return true}this.cancelNextClick=false;this.lastClickTime=j.timeStamp;k=this.trackingClickStart;this.trackingClick=false;this.trackingClickStart=0;if(f){m=j.changedTouches[0];h=document.elementFromPoint(m.pageX-window.pageXOffset,m.pageY-window.pageYOffset)||h;h.fastClickScrollParent=this.targetElement.fastClickScrollParent}i=h.tagName.toLowerCase();if(i==="label"){l=this.findControl(h);if(l){this.focus(h);if(b){return false}h=l}}else{if(this.needsFocus(h)){if((j.timeStamp-k)>100||(g&&window.top!==window&&i==="input")){this.targetElement=null;return false}this.focus(h);this.sendClick(h,j);if(!g||i!=="select"){this.targetElement=null;j.preventDefault()}return false}}if(g&&!e){n=h.fastClickScrollParent;if(n&&n.fastClickLastScrollTop!==n.scrollTop){return true}}if(!this.needsClick(h)){j.preventDefault();this.sendClick(h,j)}return false};d.prototype.onTouchCancel=function(){this.trackingClick=false;this.targetElement=null};d.prototype.onMouse=function(h){if(!this.targetElement){return true}if(h.forwardedTouchEvent){return true}if(!h.cancelable){return true}if(!this.needsClick(this.targetElement)||this.cancelNextClick){if(h.stopImmediatePropagation){h.stopImmediatePropagation()}else{h.propagationStopped=true}h.stopPropagation();h.preventDefault();return false}return true};d.prototype.onClick=function(h){var i;if(this.trackingClick){this.targetElement=null;this.trackingClick=false;return true}if(h.target.type==="submit"&&h.detail===0){return true}i=this.onMouse(h);if(!i){this.targetElement=null}return i};d.prototype.destroy=function(){var h=this.layer;if(b){h.removeEventListener("mouseover",this.onMouse,true);h.removeEventListener("mousedown",this.onMouse,true);h.removeEventListener("mouseup",this.onMouse,true)}h.removeEventListener("click",this.onClick,true);h.removeEventListener("touchstart",this.onTouchStart,false);h.removeEventListener("touchmove",this.onTouchMove,false);h.removeEventListener("touchend",this.onTouchEnd,false);h.removeEventListener("touchcancel",this.onTouchCancel,false)};d.notNeeded=function(i){var h;var l;var k;var j;if(typeof window.ontouchstart==="undefined"){return true}l=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1];if(l){if(b){h=document.querySelector("meta[name=viewport]");if(h){if(h.content.indexOf("user-scalable=no")!==-1){return true}if(l>31&&document.documentElement.scrollWidth<=window.outerWidth){return true}}}else{return true}}if(a){k=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/);if(k[1]>=10&&k[2]>=3){h=document.querySelector("meta[name=viewport]");if(h){if(h.content.indexOf("user-scalable=no")!==-1){return true}if(document.documentElement.scrollWidth<=window.outerWidth){return true}}}}if(i.style.msTouchAction==="none"||i.style.touchAction==="manipulation"){return true}j=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1];if(j>=27){h=document.querySelector("meta[name=viewport]");if(h&&(h.content.indexOf("user-scalable=no")!==-1||document.documentElement.scrollWidth<=window.outerWidth)){return true}}if(i.style.touchAction==="none"||i.style.touchAction==="manipulation"){return true}return false};d.attach=function(i,h){return new d(i,h)};if(typeof define==="function"&&typeof define.amd==="object"&&define.amd){define(function(){return d})}else{if(typeof module!=="undefined"&&module.exports){module.exports=d.attach;module.exports.FastClick=d}else{window.FastClick=d}}}());/* * Bootstrap v3.3.5 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. * Licensed under the MIT license */if(typeof jQuery==="undefined"){throw new Error("Bootstrap's JavaScript requires jQuery")}+function(b){var a=b.fn.jquery.split(" ")[0].split(".");if((a[0]<2&&a[1]<9)||(a[0]==1&&a[1]==9&&a[2]<1)){throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}}(jQuery);+function(b){function a(){var e=document.createElement("bootstrap");var d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in d){if(e.style[c]!==undefined){return{end:d[c]}}}return false}b.fn.emulateTransitionEnd=function(e){var d=false;var c=this;b(this).one("bsTransitionEnd",function(){d=true});var f=function(){if(!d){b(c).trigger(b.support.transition.end)}};setTimeout(f,e);return this};b(function(){b.support.transition=a();if(!b.support.transition){return}b.event.special.bsTransitionEnd={bindType:b.support.transition.end,delegateType:b.support.transition.end,handle:function(c){if(b(c.target).is(this)){return c.handleObj.handler.apply(this,arguments)}}}})}(jQuery);+function(e){var d='[data-dismiss="alert"]';var b=function(f){e(f).on("click",d,this.close)};b.VERSION="3.3.5";b.TRANSITION_DURATION=150;b.prototype.close=function(j){var i=e(this);var g=i.attr("data-target");if(!g){g=i.attr("href");g=g&&g.replace(/.*(?=#[^\s]*$)/,"")}var h=e(g);if(j){j.preventDefault()}if(!h.length){h=i.closest(".alert")}h.trigger(j=e.Event("close.bs.alert"));if(j.isDefaultPrevented()){return}h.removeClass("in");function f(){h.detach().trigger("closed.bs.alert").remove()}e.support.transition&&h.hasClass("fade")?h.one("bsTransitionEnd",f).emulateTransitionEnd(b.TRANSITION_DURATION):f()};function c(f){return this.each(function(){var h=e(this);var g=h.data("bs.alert");if(!g){h.data("bs.alert",(g=new b(this)))}if(typeof f=="string"){g[f].call(h)}})}var a=e.fn.alert;e.fn.alert=c;e.fn.alert.Constructor=b;e.fn.alert.noConflict=function(){e.fn.alert=a;return this};e(document).on("click.bs.alert.data-api",d,b.prototype.close)}(jQuery);+function(d){var b=function(f,e){this.$element=d(f);this.options=d.extend({},b.DEFAULTS,e);this.isLoading=false};b.VERSION="3.3.5";b.DEFAULTS={loadingText:"loading..."};b.prototype.setState=function(g){var i="disabled";var e=this.$element;var h=e.is("input")?"val":"html";var f=e.data();g+="Text";if(f.resetText==null){e.data("resetText",e[h]())}setTimeout(d.proxy(function(){e[h](f[g]==null?this.options[g]:f[g]);if(g=="loadingText"){this.isLoading=true;e.addClass(i).attr(i,i)}else{if(this.isLoading){this.isLoading=false;e.removeClass(i).removeAttr(i)}}},this),0)};b.prototype.toggle=function(){var f=true;var e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var g=this.$element.find("input");if(g.prop("type")=="radio"){if(g.prop("checked")){f=false}e.find(".active").removeClass("active");this.$element.addClass("active")}else{if(g.prop("type")=="checkbox"){if((g.prop("checked"))!==this.$element.hasClass("active")){f=false}this.$element.toggleClass("active")}}g.prop("checked",this.$element.hasClass("active"));if(f){g.trigger("change")}}else{this.$element.attr("aria-pressed",!this.$element.hasClass("active"));this.$element.toggleClass("active")}};function c(e){return this.each(function(){var h=d(this);var g=h.data("bs.button");var f=typeof e=="object"&&e;if(!g){h.data("bs.button",(g=new b(this,f)))}if(e=="toggle"){g.toggle()}else{if(e){g.setState(e)}}})}var a=d.fn.button;d.fn.button=c;d.fn.button.Constructor=b;d.fn.button.noConflict=function(){d.fn.button=a;return this};d(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(g){var f=d(g.target);if(!f.hasClass("btn")){f=f.closest(".btn")}c.call(f,"toggle");if(!(d(g.target).is('input[type="radio"]')||d(g.target).is('input[type="checkbox"]'))){g.preventDefault()}}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(f){d(f.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(f.type))})}(jQuery);+function(c){var d=function(g,f){this.$element=c(g);this.$indicators=this.$element.find(".carousel-indicators");this.options=f;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",c.proxy(this.keydown,this));this.options.pause=="hover"&&!("ontouchstart" in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",c.proxy(this.pause,this)).on("mouseleave.bs.carousel",c.proxy(this.cycle,this))};d.VERSION="3.3.5";d.TRANSITION_DURATION=600;d.DEFAULTS={interval:5000,pause:"hover",wrap:true,keyboard:true};d.prototype.keydown=function(f){if(/input|textarea/i.test(f.target.tagName)){return}switch(f.which){case 37:this.prev();break;case 39:this.next();break;default:return}f.preventDefault()};d.prototype.cycle=function(f){f||(this.paused=false);this.interval&&clearInterval(this.interval);this.options.interval&&!this.paused&&(this.interval=setInterval(c.proxy(this.next,this),this.options.interval));return this};d.prototype.getItemIndex=function(f){this.$items=f.parent().children(".item");return this.$items.index(f||this.$active)};d.prototype.getItemForDirection=function(j,i){var f=this.getItemIndex(i);var g=(j=="prev"&&f===0)||(j=="next"&&f==(this.$items.length-1));if(g&&!this.options.wrap){return i}var k=j=="prev"?-1:1;var h=(f+k)%this.$items.length;return this.$items.eq(h)};d.prototype.to=function(h){var g=this;var f=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(h>(this.$items.length-1)||h<0){return}if(this.sliding){return this.$element.one("slid.bs.carousel",function(){g.to(h)})}if(f==h){return this.pause().cycle()}return this.slide(h>f?"next":"prev",this.$items.eq(h))};d.prototype.pause=function(f){f||(this.paused=true);if(this.$element.find(".next, .prev").length&&c.support.transition){this.$element.trigger(c.support.transition.end);this.cycle(true)}this.interval=clearInterval(this.interval);return this};d.prototype.next=function(){if(this.sliding){return}return this.slide("next")};d.prototype.prev=function(){if(this.sliding){return}return this.slide("prev")};d.prototype.slide=function(m,i){var p=this.$element.find(".item.active");var g=i||this.getItemForDirection(m,p);var k=this.interval;var n=m=="next"?"left":"right";var j=this;if(g.hasClass("active")){return(this.sliding=false)}var l=g[0];var f=c.Event("slide.bs.carousel",{relatedTarget:l,direction:n});this.$element.trigger(f);if(f.isDefaultPrevented()){return}this.sliding=true;k&&this.pause();if(this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=c(this.$indicators.children()[this.getItemIndex(g)]);h&&h.addClass("active")}var o=c.Event("slid.bs.carousel",{relatedTarget:l,direction:n});if(c.support.transition&&this.$element.hasClass("slide")){g.addClass(m);g[0].offsetWidth;p.addClass(n);g.addClass(n);p.one("bsTransitionEnd",function(){g.removeClass([m,n].join(" ")).addClass("active");p.removeClass(["active",n].join(" "));j.sliding=false;setTimeout(function(){j.$element.trigger(o)},0)}).emulateTransitionEnd(d.TRANSITION_DURATION)}else{p.removeClass("active");g.addClass("active");this.sliding=false;this.$element.trigger(o)}k&&this.cycle();return this};function b(f){return this.each(function(){var j=c(this);var i=j.data("bs.carousel");var g=c.extend({},d.DEFAULTS,j.data(),typeof f=="object"&&f);var h=typeof f=="string"?f:g.slide;if(!i){j.data("bs.carousel",(i=new d(this,g)))}if(typeof f=="number"){i.to(f)}else{if(h){i[h]()}else{if(g.interval){i.pause().cycle()}}}})}var a=c.fn.carousel;c.fn.carousel=b;c.fn.carousel.Constructor=d;c.fn.carousel.noConflict=function(){c.fn.carousel=a;return this};var e=function(k){var g;var j=c(this);var f=c(j.attr("data-target")||(g=j.attr("href"))&&g.replace(/.*(?=#[^\s]+$)/,""));if(!f.hasClass("carousel")){return}var h=c.extend({},f.data(),j.data());var i=j.attr("data-slide-to");if(i){h.interval=false}b.call(f,h);if(i){f.data("bs.carousel").to(i)}k.preventDefault()};c(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e);c(window).on("load",function(){c('[data-ride="carousel"]').each(function(){var f=c(this);b.call(f,f.data())})})}(jQuery);+function(d){var e=function(g,f){this.$element=d(g);this.options=d.extend({},e.DEFAULTS,f);this.$trigger=d('[data-toggle="collapse"][href="#'+g.id+'"],[data-toggle="collapse"][data-target="#'+g.id+'"]');this.transitioning=null;if(this.options.parent){this.$parent=this.getParent()}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger)}if(this.options.toggle){this.toggle()}};e.VERSION="3.3.5";e.TRANSITION_DURATION=350;e.DEFAULTS={toggle:true};e.prototype.dimension=function(){var f=this.$element.hasClass("width");return f?"width":"height"};e.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in")){return}var h;var j=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(j&&j.length){h=j.data("bs.collapse");if(h&&h.transitioning){return}}var g=d.Event("show.bs.collapse");this.$element.trigger(g);if(g.isDefaultPrevented()){return}if(j&&j.length){b.call(j,"hide");h||j.data("bs.collapse",null)}var k=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[k](0).attr("aria-expanded",true);this.$trigger.removeClass("collapsed").attr("aria-expanded",true);this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[k]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")};if(!d.support.transition){return f.call(this)}var i=d.camelCase(["scroll",k].join("-"));this.$element.one("bsTransitionEnd",d.proxy(f,this)).emulateTransitionEnd(e.TRANSITION_DURATION)[k](this.$element[0][i])};e.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in")){return}var g=d.Event("hide.bs.collapse");this.$element.trigger(g);if(g.isDefaultPrevented()){return}var h=this.dimension();this.$element[h](this.$element[h]())[0].offsetHeight;this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",false);this.$trigger.addClass("collapsed").attr("aria-expanded",false);this.transitioning=1;var f=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!d.support.transition){return f.call(this)}this.$element[h](0).one("bsTransitionEnd",d.proxy(f,this)).emulateTransitionEnd(e.TRANSITION_DURATION)};e.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};e.prototype.getParent=function(){return d(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(d.proxy(function(h,g){var f=d(g);this.addAriaAndCollapsedClass(c(f),f)},this)).end()};e.prototype.addAriaAndCollapsedClass=function(g,f){var h=g.hasClass("in");g.attr("aria-expanded",h);f.toggleClass("collapsed",!h).attr("aria-expanded",h)};function c(f){var g;var h=f.attr("data-target")||(g=f.attr("href"))&&g.replace(/.*(?=#[^\s]+$)/,"");return d(h)}function b(f){return this.each(function(){var i=d(this);var h=i.data("bs.collapse");var g=d.extend({},e.DEFAULTS,i.data(),typeof f=="object"&&f);if(!h&&g.toggle&&/show|hide/.test(f)){g.toggle=false}if(!h){i.data("bs.collapse",(h=new e(this,g)))}if(typeof f=="string"){h[f]()}})}var a=d.fn.collapse;d.fn.collapse=b;d.fn.collapse.Constructor=e;d.fn.collapse.noConflict=function(){d.fn.collapse=a;return this};d(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(j){var i=d(this);if(!i.attr("data-target")){j.preventDefault()}var f=c(i);var h=f.data("bs.collapse");var g=h?"toggle":i.data();b.call(f,g)})}(jQuery);+function(h){var e=".dropdown-backdrop";var b='[data-toggle="dropdown"]';var a=function(i){h(i).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.5";function f(k){var i=k.attr("data-target");if(!i){i=k.attr("href");i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")}var j=i&&h(i);return j&&j.length?j:k.parent()}function d(i){if(i&&i.which===3){return}h(e).remove();h(b).each(function(){var l=h(this);var k=f(l);var j={relatedTarget:this};if(!k.hasClass("open")){return}if(i&&i.type=="click"&&/input|textarea/i.test(i.target.tagName)&&h.contains(k[0],i.target)){return}k.trigger(i=h.Event("hide.bs.dropdown",j));if(i.isDefaultPrevented()){return}l.attr("aria-expanded","false");k.removeClass("open").trigger("hidden.bs.dropdown",j)})}a.prototype.toggle=function(m){var l=h(this);if(l.is(".disabled, :disabled")){return}var k=f(l);var j=k.hasClass("open");d();if(!j){if("ontouchstart" in document.documentElement&&!k.closest(".navbar-nav").length){h(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(h(this)).on("click",d)}var i={relatedTarget:this};k.trigger(m=h.Event("show.bs.dropdown",i));if(m.isDefaultPrevented()){return}l.trigger("focus").attr("aria-expanded","true");k.toggleClass("open").trigger("shown.bs.dropdown",i)}return false};a.prototype.keydown=function(m){if(!/(38|40|27|32)/.test(m.which)||/input|textarea/i.test(m.target.tagName)){return}var l=h(this);m.preventDefault();m.stopPropagation();if(l.is(".disabled, :disabled")){return}var k=f(l);var j=k.hasClass("open");if(!j&&m.which!=27||j&&m.which==27){if(m.which==27){k.find(b).trigger("focus")}return l.trigger("click")}var n=" li:not(.disabled):visible a";var o=k.find(".dropdown-menu"+n);if(!o.length){return}var i=o.index(m.target);if(m.which==38&&i>0){i--}if(m.which==40&&idocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})};b.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};b.prototype.checkScrollbar=function(){var f=window.innerWidth;if(!f){var e=document.documentElement.getBoundingClientRect();f=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:false,container:false,viewport:{selector:"body",padding:0}};c.prototype.init=function(l,j,g){this.enabled=true;this.type=l;this.$element=d(j);this.options=this.getOptions(g);this.$viewport=this.options.viewport&&d(d.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):(this.options.viewport.selector||this.options.viewport));this.inState={click:false,hover:false,focus:false};if(this.$element[0] instanceof document.constructor&&!this.options.selector){throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!")}var k=this.options.trigger.split(" ");for(var h=k.length;h--;){var f=k[h];if(f=="click"){this.$element.on("click."+this.type,this.options.selector,d.proxy(this.toggle,this))}else{if(f!="manual"){var m=f=="hover"?"mouseenter":"focusin";var e=f=="hover"?"mouseleave":"focusout";this.$element.on(m+"."+this.type,this.options.selector,d.proxy(this.enter,this));this.$element.on(e+"."+this.type,this.options.selector,d.proxy(this.leave,this))}}}this.options.selector?(this._options=d.extend({},this.options,{trigger:"manual",selector:""})):this.fixTitle()};c.prototype.getDefaults=function(){return c.DEFAULTS};c.prototype.getOptions=function(e){e=d.extend({},this.getDefaults(),this.$element.data(),e);if(e.delay&&typeof e.delay=="number"){e.delay={show:e.delay,hide:e.delay}}return e};c.prototype.getDelegateOptions=function(){var e={};var f=this.getDefaults();this._options&&d.each(this._options,function(g,h){if(f[g]!=h){e[g]=h}});return e};c.prototype.enter=function(f){var e=f instanceof this.constructor?f:d(f.currentTarget).data("bs."+this.type);if(!e){e=new this.constructor(f.currentTarget,this.getDelegateOptions());d(f.currentTarget).data("bs."+this.type,e)}if(f instanceof d.Event){e.inState[f.type=="focusin"?"focus":"hover"]=true}if(e.tip().hasClass("in")||e.hoverState=="in"){e.hoverState="in";return}clearTimeout(e.timeout);e.hoverState="in";if(!e.options.delay||!e.options.delay.show){return e.show()}e.timeout=setTimeout(function(){if(e.hoverState=="in"){e.show()}},e.options.delay.show)};c.prototype.isInStateTrue=function(){for(var e in this.inState){if(this.inState[e]){return true}}return false};c.prototype.leave=function(f){var e=f instanceof this.constructor?f:d(f.currentTarget).data("bs."+this.type);if(!e){e=new this.constructor(f.currentTarget,this.getDelegateOptions());d(f.currentTarget).data("bs."+this.type,e)}if(f instanceof d.Event){e.inState[f.type=="focusout"?"focus":"hover"]=false}if(e.isInStateTrue()){return}clearTimeout(e.timeout);e.hoverState="out";if(!e.options.delay||!e.options.delay.hide){return e.hide()}e.timeout=setTimeout(function(){if(e.hoverState=="out"){e.hide()}},e.options.delay.hide)};c.prototype.show=function(){var o=d.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(o);var p=d.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(o.isDefaultPrevented()||!p){return}var n=this;var l=this.tip();var h=this.getUID(this.type);this.setContent();l.attr("id",h);this.$element.attr("aria-describedby",h);if(this.options.animation){l.addClass("fade")}var k=typeof this.options.placement=="function"?this.options.placement.call(this,l[0],this.$element[0]):this.options.placement;var s=/\s?auto?\s?/i;var t=s.test(k);if(t){k=k.replace(s,"")||"top"}l.detach().css({top:0,left:0,display:"block"}).addClass(k).data("bs."+this.type,this);this.options.container?l.appendTo(this.options.container):l.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var q=this.getPosition();var f=l[0].offsetWidth;var m=l[0].offsetHeight;if(t){var j=k;var r=this.getPosition(this.$viewport);k=k=="bottom"&&q.bottom+m>r.bottom?"top":k=="top"&&q.top-mr.width?"left":k=="left"&&q.left-fl.top+l.height){m.top=l.top+l.height-i}}}else{var o=k.left-g;var f=k.left+g+e;if(ol.right){m.left=l.left+l.width-f}}}return m};c.prototype.getTitle=function(){var g;var e=this.$element;var f=this.options;g=e.attr("data-original-title")||(typeof f.title=="function"?f.title.call(e[0]):f.title);return g};c.prototype.getUID=function(e){do{e+=~~(Math.random()*1000000)}while(document.getElementById(e));return e};c.prototype.tip=function(){if(!this.$tip){this.$tip=d(this.options.template);if(this.$tip.length!=1){throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!")}}return this.$tip};c.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow"))};c.prototype.enable=function(){this.enabled=true};c.prototype.disable=function(){this.enabled=false};c.prototype.toggleEnabled=function(){this.enabled=!this.enabled};c.prototype.toggle=function(g){var f=this;if(g){f=d(g.currentTarget).data("bs."+this.type);if(!f){f=new this.constructor(g.currentTarget,this.getDelegateOptions());d(g.currentTarget).data("bs."+this.type,f)}}if(g){f.inState.click=!f.inState.click;if(f.isInStateTrue()){f.enter(f)}else{f.leave(f)}}else{f.tip().hasClass("in")?f.leave(f):f.enter(f)}};c.prototype.destroy=function(){var e=this;clearTimeout(this.timeout);this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type);if(e.$tip){e.$tip.detach()}e.$tip=null;e.$arrow=null;e.$viewport=null})};function b(e){return this.each(function(){var h=d(this);var g=h.data("bs.tooltip");var f=typeof e=="object"&&e;if(!g&&/destroy|hide/.test(e)){return}if(!g){h.data("bs.tooltip",(g=new c(this,f)))}if(typeof e=="string"){g[e]()}})}var a=d.fn.tooltip;d.fn.tooltip=b;d.fn.tooltip.Constructor=c;d.fn.tooltip.noConflict=function(){d.fn.tooltip=a;return this}}(jQuery);+function(d){var c=function(f,e){this.init("popover",f,e)};if(!d.fn.tooltip){throw new Error("Popover requires tooltip.js")}c.VERSION="3.3.5";c.DEFAULTS=d.extend({},d.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''});c.prototype=d.extend({},d.fn.tooltip.Constructor.prototype);c.prototype.constructor=c;c.prototype.getDefaults=function(){return c.DEFAULTS};c.prototype.setContent=function(){var g=this.tip();var f=this.getTitle();var e=this.getContent();g.find(".popover-title")[this.options.html?"html":"text"](f);g.find(".popover-content").children().detach().end()[this.options.html?(typeof e=="string"?"html":"append"):"text"](e);g.removeClass("fade top bottom left right in");if(!g.find(".popover-title").html()){g.find(".popover-title").hide()}};c.prototype.hasContent=function(){return this.getTitle()||this.getContent()};c.prototype.getContent=function(){var e=this.$element;var f=this.options;return e.attr("data-content")||(typeof f.content=="function"?f.content.call(e[0]):f.content)};c.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find(".arrow"))};function b(e){return this.each(function(){var h=d(this);var g=h.data("bs.popover");var f=typeof e=="object"&&e;if(!g&&/destroy|hide/.test(e)){return}if(!g){h.data("bs.popover",(g=new c(this,f)))}if(typeof e=="string"){g[e]()}})}var a=d.fn.popover;d.fn.popover=b;d.fn.popover.Constructor=c;d.fn.popover.noConflict=function(){d.fn.popover=a;return this}}(jQuery);+function(d){function c(f,e){this.$body=d(document.body);this.$scrollElement=d(f).is(document.body)?d(window):d(f);this.options=d.extend({},c.DEFAULTS,e);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",d.proxy(this.process,this));this.refresh();this.process()}c.VERSION="3.3.5";c.DEFAULTS={offset:10};c.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};c.prototype.refresh=function(){var g=this;var e="offset";var f=0;this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();if(!d.isWindow(this.$scrollElement[0])){e="position";f=this.$scrollElement.scrollTop()}this.$body.find(this.selector).map(function(){var i=d(this);var h=i.data("target")||i.attr("href");var j=/^#./.test(h)&&d(h);return(j&&j.length&&j.is(":visible")&&[[j[e]().top+f,h]])||null}).sort(function(i,h){return i[0]-h[0]}).each(function(){g.offsets.push(this[0]);g.targets.push(this[1])})};c.prototype.process=function(){var k=this.$scrollElement.scrollTop()+this.options.offset;var g=this.getScrollHeight();var j=this.options.offset+g-this.$scrollElement.height();var h=this.offsets;var e=this.targets;var l=this.activeTarget;var f;if(this.scrollHeight!=g){this.refresh()}if(k>=j){return l!=(f=e[e.length-1])&&this.activate(f)}if(l&&k=h[f]&&(h[f+1]===undefined||k .active");var j=k&&d.support.transition&&(f.length&&f.hasClass("fade")||!!g.find("> .fade").length);function i(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",false);h.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",true);if(j){h[0].offsetWidth;h.addClass("in")}else{h.removeClass("fade")}if(h.parent(".dropdown-menu").length){h.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",true)}k&&k()}f.length&&j?f.one("bsTransitionEnd",i).emulateTransitionEnd(b.TRANSITION_DURATION):i();f.removeClass("in")};function c(f){return this.each(function(){var h=d(this);var g=h.data("bs.tab");if(!g){h.data("bs.tab",(g=new b(this)))}if(typeof f=="string"){g[f]()}})}var a=d.fn.tab;d.fn.tab=c;d.fn.tab.Constructor=b;d.fn.tab.noConflict=function(){d.fn.tab=a;return this};var e=function(f){f.preventDefault();c.call(d(this),"show")};d(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery);+function(d){var c=function(f,e){this.options=d.extend({},c.DEFAULTS,e);this.$target=d(this.options.target).on("scroll.bs.affix.data-api",d.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",d.proxy(this.checkPositionWithEventLoop,this));this.$element=d(f);this.affixed=null;this.unpin=null;this.pinnedOffset=null;this.checkPosition()};c.VERSION="3.3.5";c.RESET="affix affix-top affix-bottom";c.DEFAULTS={offset:0,target:window};c.prototype.getState=function(n,m,f,g){var e=this.$target.scrollTop();var i=this.$element.offset();var j=this.$target.height();if(f!=null&&this.affixed=="top"){return e=n-g)){return"bottom"}return false};c.prototype.getPinnedOffset=function(){if(this.pinnedOffset){return this.pinnedOffset}this.$element.removeClass(c.RESET).addClass("affix");var f=this.$target.scrollTop();var e=this.$element.offset();return(this.pinnedOffset=e.top-f)};c.prototype.checkPositionWithEventLoop=function(){setTimeout(d.proxy(this.checkPosition,this),1)};c.prototype.checkPosition=function(){if(!this.$element.is(":visible")){return}var f=this.$element.height();var l=this.options.offset;var j=l.top;var h=l.bottom;var i=Math.max(d(document).height(),d(document.body).height());if(typeof l!="object"){h=j=l}if(typeof j=="function"){j=l.top(this.$element)}if(typeof h=="function"){h=l.bottom(this.$element)}var g=this.getState(i,f,j,h);if(this.affixed!=g){if(this.unpin!=null){this.$element.css("top","")}var m="affix"+(g?"-"+g:"");var k=d.Event(m+".bs.affix");this.$element.trigger(k);if(k.isDefaultPrevented()){return}this.affixed=g;this.unpin=g=="bottom"?this.getPinnedOffset():null;this.$element.removeClass(c.RESET).addClass(m).trigger(m.replace("affix","affixed")+".bs.affix")}if(g=="bottom"){this.$element.offset({top:i-f-h})}};function b(e){return this.each(function(){var h=d(this);var g=h.data("bs.affix");var f=typeof e=="object"&&e;if(!g){h.data("bs.affix",(g=new c(this,f)))}if(typeof e=="string"){g[e]()}})}var a=d.fn.affix;d.fn.affix=b;d.fn.affix.Constructor=c;d.fn.affix.noConflict=function(){d.fn.affix=a;return this};d(window).on("load",function(){d('[data-spy="affix"]').each(function(){var f=d(this);var e=f.data();e.offset=e.offset||{};if(e.offsetBottom!=null){e.offset.bottom=e.offsetBottom}if(e.offsetTop!=null){e.offset.top=e.offsetTop}b.call(f,e)})})}(jQuery);(function(a,b){if(typeof define==="function"&&define.amd){define(["jquery"],b)}else{if(typeof exports==="object"){module.exports=b(require("jquery"))}else{a.bootbox=b(a.jQuery)}}}(this,function init(i,c){var m={dialog:"",header:"",footer:"",closeButton:"× ",form:"",inputs:{text:" ",textarea:"",email:" ",select:" ",checkbox:"
",date:" ",time:" ",number:" ",password:" "}};var f={locale:"en",backdrop:true,animate:true,className:null,closeButton:true,show:true,container:"body"};var h={};function p(r){var q=a[f.locale];return q?q[r]:a.en[r]}function d(s,r,t){s.stopPropagation();s.preventDefault();var q=i.isFunction(t)&&t(s)===false;if(!q){r.modal("hide")}}function j(s){var q,r=0;for(q in s){r++}return r}function k(s,r){var q=0;i.each(s,function(t,u){r(t,u,q++)})}function b(q){var s;var r;if(typeof q!=="object"){throw new Error("Please supply an object of options")}if(!q.message){throw new Error("Please specify a message")}q=i.extend({},f,q);if(!q.buttons){q.buttons={}}q.backdrop=q.backdrop?"static":false;s=q.buttons;r=j(s);k(s,function(v,u,t){if(i.isFunction(u)){u=s[v]={callback:u}}if(i.type(u)!=="object"){throw new Error("button with key "+v+" must be an object")}if(!u.label){u.label=v}if(!u.className){if(r<=2&&t===r-1){u.className="btn-primary"}else{u.className="btn-default"}}});return q}function g(r,s){var t=r.length;var q={};if(t<1||t>2){throw new Error("Invalid argument length")}if(t===2||typeof r[0]==="string"){q[s[0]]=r[0];q[s[1]]=r[1]}else{q=r[0]}return q}function l(s,q,r){return i.extend(true,{},s,g(q,r))}function e(t,u,s,r){var q={className:"bootbox-"+t,buttons:o.apply(null,u)};return n(l(q,r,s),u)}function o(){var u={};for(var s=0,q=arguments.length;s ").attr("label",A.group)}B=r[A.group]}B.append(""+A.text+" ")});k(r,function(z,A){w.append(A)});w.val(y.value);break;case"checkbox":var x=i.isArray(y.value)?y.value:[y.value];u=y.inputOptions||[];if(!u.length){throw new Error("prompt with checkbox requires options")}if(!u[0].value||!u[0].text){throw new Error("given options in wrong format")}w=i("
");k(u,function(z,A){var B=i(m.inputs[y.inputType]);B.find("input").attr("value",A.value);B.find("label").append(A.text);k(x,function(C,D){if(D===A.value){B.find("input").prop("checked",true)}});w.append(B)});break}if(y.placeholder){w.attr("placeholder",y.placeholder)}if(y.pattern){w.attr("pattern",y.pattern)}q.append(w);q.on("submit",function(z){z.preventDefault();z.stopPropagation();v.find(".btn-primary").click()});v=h.dialog(y);v.off("shown.bs.modal");v.on("shown.bs.modal",function(){w.focus()});if(s===true){v.modal("show")}return v};h.dialog=function(t){t=b(t);var u=i(m.dialog);var r=u.find(".modal-dialog");var q=u.find(".modal-body");var x=t.buttons;var v="";var w={onEscape:t.onEscape};k(x,function(z,y){v+=""+y.label+" ";w[z]=y.callback});q.find(".bootbox-body").html(t.message);if(t.animate===true){u.addClass("fade")}if(t.className){u.addClass(t.className)}if(t.size==="large"){r.addClass("modal-lg")}if(t.size==="small"){r.addClass("modal-sm")}if(t.title){q.before(m.header)}if(t.closeButton){var s=i(m.closeButton);if(t.title){u.find(".modal-header").prepend(s)}else{s.css("margin-top","-10px").prependTo(q)}}if(t.title){u.find(".modal-title").html(t.title)}if(v.length){q.after(m.footer);u.find(".modal-footer").html(v)}u.on("hidden.bs.modal",function(y){if(y.target===this){u.remove()}});u.on("shown.bs.modal",function(){u.find(".btn-primary:first").focus()});u.on("escape.close.bb",function(y){if(w.onEscape){d(y,u,w.onEscape)}});u.on("click",".modal-footer button",function(z){var y=i(this).data("bb-handler");d(z,u,w[y])});u.on("click",".bootbox-close-button",function(y){d(y,u,w.onEscape)});u.on("keyup",function(y){if(y.which===27){u.trigger("escape.close.bb")}});i(t.container).append(u);u.modal({backdrop:t.backdrop,keyboard:false,show:false});if(t.show){u.modal("show")}return u};h.setDefaults=function(){var q={};if(arguments.length===2){q[arguments[0]]=arguments[1]}else{q=arguments[0]}i.extend(f,q)};h.hideAll=function(){i(".bootbox").modal("hide");return h};var a={br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},cs:{OK:"OK",CANCEL:"Zrušit",CONFIRM:"Potvrdit"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},el:{OK:"Εντάξει",CANCEL:"Ακύρωση",CONFIRM:"Επιβεβαίωση"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},et:{OK:"OK",CANCEL:"Katkesta",CONFIRM:"OK"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"אישור",CANCEL:"ביטול",CONFIRM:"אישור"},id:{OK:"OK",CANCEL:"Batal",CONFIRM:"OK"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},ja:{OK:"OK",CANCEL:"キャンセル",CONFIRM:"確認"},lt:{OK:"Gerai",CANCEL:"Atšaukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"Apstiprināt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},pt:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Confirmar"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},tr:{OK:"Tamam",CANCEL:"İptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};h.init=function(q){return init(q||i)};return h}));/* * jQuery Placeholder Plugin v2.3.1 * https://github.com/mathiasbynens/jquery-placeholder * * Copyright 2011, 2015 Mathias Bynens * Released under the MIT license */(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{if(typeof module==="object"&&module.exports){a(require("jquery"))}else{a(jQuery)}}}(function(g){var n=false;var b=Object.prototype.toString.call(window.operamini)==="[object OperaMini]";var a="placeholder" in document.createElement("input")&&!b&&!n;var h="placeholder" in document.createElement("textarea")&&!b&&!n;var f=g.valHooks;var c=g.propHooks;var l;var k;var e={};if(a&&h){k=g.fn.placeholder=function(){return this};k.input=true;k.textarea=true}else{k=g.fn.placeholder=function(o){var p={customClass:"placeholder"};e=g.extend({},p,o);return this.filter((a?"textarea":":input")+"["+(n?"placeholder-x":"placeholder")+"]").not("."+e.customClass).not(":radio, :checkbox, [type=hidden]").bind({"focus.placeholder":d,"blur.placeholder":i}).data("placeholder-enabled",true).trigger("blur.placeholder")};k.input=a;k.textarea=h;l={get:function(p){var o=g(p);var q=o.data("placeholder-password");if(q){return q[0].value}return o.data("placeholder-enabled")&&o.hasClass(e.customClass)?"":p.value},set:function(p,r){var o=g(p);var s;var q;if(r!==""){s=o.data("placeholder-textinput");q=o.data("placeholder-password");if(s){d.call(s[0],true,r)||(p.value=r);s[0].value=r}else{if(q){d.call(p,true,r)||(q[0].value=r);p.value=r}}}if(!o.data("placeholder-enabled")){p.value=r;return o}if(r===""){p.value=r;if(p!=m()){i.call(p)}}else{if(o.hasClass(e.customClass)){d.call(p)}p.value=r}return o}};if(!a){f.input=l;c.value=l}if(!h){f.textarea=l;c.value=l}g(function(){g(document).delegate("form","submit.placeholder",function(){var o=g("."+e.customClass,this).each(function(){d.call(this,true,"")});setTimeout(function(){o.each(i)},10)})});g(window).bind("beforeunload.placeholder",function(){var p=true;try{if(document.activeElement.toString()==="javascript:void(0)"){p=false}}catch(o){}if(p){g("."+e.customClass).each(function(){this.value=""})}})}function j(p){var o={};var q=/^jQuery\d+$/;g.each(p.attributes,function(s,r){if(r.specified&&!q.test(r.name)){o[r.name]=r.value}});return o}function d(p,q){var o=this;var r=g(this);if(o.value===r.attr((n?"placeholder-x":"placeholder"))&&r.hasClass(e.customClass)){o.value="";r.removeClass(e.customClass);if(r.data("placeholder-password")){r=r.hide().nextAll('input[type="password"]:first').show().attr("id",r.removeAttr("id").data("placeholder-id"));if(p===true){r[0].value=q;return q}r.focus()}else{o==m()&&o.select()}}}function i(q){var u;var o=this;var t=g(this);var s=o.id;if(q&&q.type==="blur"&&t.hasClass(e.customClass)){return}if(o.value===""){if(o.type==="password"){if(!t.data("placeholder-textinput")){try{u=t.clone().prop({type:"text"})}catch(r){u=g(" ").attr(g.extend(j(this),{type:"text"}))}u.removeAttr("name").data({"placeholder-enabled":true,"placeholder-password":t,"placeholder-id":s}).bind("focus.placeholder",d);t.data({"placeholder-textinput":u,"placeholder-id":s}).before(u)}o.value="";t=t.removeAttr("id").hide().prevAll('input[type="text"]:first').attr("id",t.data("placeholder-id")).show()}else{var p=t.data("placeholder-password");if(p){p[0].value="";t.attr("id",t.data("placeholder-id")).show().nextAll('input[type="password"]:last').hide().removeAttr("id")}}t.addClass(e.customClass);t[0].value=t.attr((n?"placeholder-x":"placeholder"))}else{t.removeClass(e.customClass)}}function m(){try{return document.activeElement}catch(o){}}}));(function(b){var a={i18nValue:function(d,e){if(this[e]){for(var c=0;c0){for(var f=0;f0){c=d.join(",");var e="dicts";if(g){e=g+"/dicts"}b.ajax({url:e,data:{groups:c,lang:j},success:function(i){if(i.success){b.extend(a,i.data)}},error:function(i){b.loy.alert("Fetch dictionary data is error ","error")},complete:function(i){k()}})}else{k()}};b.loy.dictList=function(c){return a[c]};b.loy.buildSelectOptions=function(d,j,c,n){var h=a[j];var m=[];if(h){b("#"+d,n).html("");m.push(' ');for(var g=0;g'+e+"")}}b("#"+d,n).html(m.join(" "));b("#"+d,n).chosen({allow_single_deselect:true,placeholder_text_single:c})};b.loy.showSysMsg=function(f){b("#systemMsgDiv").show();b("#systemMsgSpan").html(f);var c=b(window).height();var e=b(window).scrollTop();var d=c+e-150;b("#systemMsgDiv").css("top",d+"px").css("position","absolute").css("right","5px");setTimeout(function(){b("#systemMsgDiv").hide()},1500)};b.loy.alert=function(d,c){bootbox.dialog({title:b.i18n.prop("info"),message:d,buttons:{ok:{label:b.i18n.prop("close"),className:"btn-sm btn-danger"}}})};b.loy.confirm=function(d,c){bootbox.confirm({buttons:{cancel:{className:"btn-default"},confirm:{className:"btn btn-success"},},message:d,callback:function(e){if(e){if(c){c(e)}}else{}},title:b.i18n.prop("confirm_info")})};b.loy.i18n=function(d){var c;if(d){c=d}else{c=b(document)}b("*[i18n]",c).each(function(){var g=b(this);var e=g.attr("i18n");var f=b.i18n.prop(e);g.html(f)})}})(jQuery);(function(a){a.loy=a.extend({},a.loy);a.loy.i18n=function(d,f,e,b){b=a.extend({},b);var c={name:d,path:"",mode:"both",language:f,cache:false,encoding:"UTF-8",callback:function(){a("*[i18n]",e).each(function(){var i=a(this);var g=i.attr("i18n");var h=a.i18n.prop(g);if(i.attr("placeholder")){i.attr("placeholder",h)}else{i.html(h)}});if(b.custCallback){b.custCallback()}}};b=a.extend(c,b);jQuery.i18n.properties(b)}})(jQuery);(function(b){var a={async:true,cache:false,dataType:"json",timeout:60000,type:"POST",url:"",shade:true,showErrorMsg:true,showSuccess:false,beforeSend:function(c){c.setRequestHeader("ajax",true)}};b.loy=b.extend({},b.loy);b.loy.statusErrorShow=function(c){if(c==401){top.location.href="login";return}if(c==403){b.loy.alert(b.i18n.prop("no_permission"),"error");return}b.loy.alert(b.i18n.prop("system_error"),"error");return};b.loy.ajax=function(d){d=b.extend({},a,d);if(!d.url||d.url.length==0){b.loy.alert("url can't null ","error");return}if(d.dataType=="json"){var c=d.error;var e=d.success;d.error=function(f,h,g){if(c){c.call()}if(h=="timeout"){b.loy.alert(b.i18n.prop("request_timeout"));return}b.loy.statusErrorShow(f.status)};d.success=function(g,h,f){if(d.dataType=="json"){if(f&&f.statusText==""){if(d.showErrorMsg){b.loy.alert(b.i18n.prop("check_network"),"error");return}}if(!g){if(c){c.call(this,g);if(d.showErrorMsg){b.loy.alert(b.i18n.prop("data_format_error"),"error")}}}if(g==undefined){if(d.shade){closeMaskDiv()}b.loy.alert(b.i18n.prop("data_format_error"),"error");return}if(!g.success){if(g.errorCode&&g.errorCode=="not_login"){top.location.href=g.loginUrl;return}}if(!g.success){if(c){c.call(this,g)}if(g.msg&&g.msg.length>0){if(d.showErrorMsg){b.loy.alert(g.msg,"error")}}else{if(d.showErrorMsg){b.loy.alert(b.i18n.prop("system_error"),"error")}}}else{if(d.showSuccess){b.loy.showSysMsg(b.i18n.prop("operate_success"))}if(e){e.call(this,g)}}}};b.ajax(d)}}})(jQuery);(function(b,c){if(!("ace" in window)){window.ace={}}if(!("helper" in window.ace)){window.ace.helper={}}if(!("vars" in window.ace)){window.ace.vars={}}window.ace.vars.icon=" ace-icon ";window.ace.vars[".icon"]=".ace-icon";ace.vars.touch=("ontouchstart" in document.documentElement);ace.click_event=ace.vars.touch&&b.fn.tap?"tap":"click";var a=navigator.userAgent;ace.vars.webkit=!!a.match(/AppleWebKit/i);ace.vars.safari=!!a.match(/Safari/i)&&!a.match(/Chrome/i);ace.vars.android=ace.vars.safari&&!!a.match(/Android/i);ace.vars.ios_safari=!!a.match(/OS ([4-9])(_\d)+ like Mac OS X/i)&&!a.match(/CriOS/i);ace.vars.ie=window.navigator.msPointerEnabled||(document.all&&document.querySelector);ace.vars.old_ie=document.all&&!document.addEventListener;ace.vars.very_old_ie=document.all&&!document.querySelector;ace.vars.firefox="MozAppearance" in document.documentElement.style;ace.vars.non_auto_fixed=ace.vars.android||ace.vars.ios_safari})(jQuery);ace.helper.redraw=function(b,c){var a=b.style.display;b.style.display="none";b.offsetHeight;if(c!==true){b.style.display=a}else{setTimeout(function(){b.style.display=a},10)}};ace.helper.boolAttr=function(b,a){return b.getAttribute(a)==="true"};ace.helper.intAttr=function(b,a){return parseInt(b.getAttribute(a))||0};ace.helper.scrollTop=function(){return document.scrollTop||document.documentElement.scrollTop||document.body.scrollTop};ace.helper.winHeight=function(){return window.innerHeight||document.documentElement.clientHeight};ace.helper.camelCase=function(a){return a.replace(/-([\da-z])/gi,function(b,c){return c?c.toUpperCase():""})};ace.helper.removeStyle="removeProperty" in document.documentElement.style?function(a,b){a.style.removeProperty(b)}:function(a,b){a.style[ace.helper.camelCase(b)]=""};ace.helper.hasClass="classList" in document.documentElement?function(b,a){return b.classList.contains(a)}:function(b,a){return b.className.indexOf(a)>-1};jQuery(function(g){a();e();c();k();b();d();h();l();f();i();j();function a(){if(ace.vars.non_auto_fixed){g("body").addClass("mob-safari")}ace.vars.transition=!!g.support.transition.end}function e(){var m=g(".sidebar");if(g.fn.ace_sidebar){m.ace_sidebar()}if(g.fn.ace_sidebar_scroll){m.ace_sidebar_scroll({scroll_to_active:true,include_shortcuts:true,include_toggle:false||ace.vars.safari||ace.vars.ios_safari,smooth_scroll:150,outside:false})}if(g.fn.ace_sidebar_hover){m.ace_sidebar_hover({sub_hover_delay:750,sub_scroll_style:"no-track scroll-thin scroll-margin scroll-visible"})}}function c(){if(g.fn.ace_ajax){g("[data-ajax-content=true]").ace_ajax({close_active:true,content_url:function(n){var m=document.location.pathname;if(m.match(/home.html/)){return m.replace(/home.html/,n)}return m+"?"+n.replace(/\//,"=")},default_url:""})}}function k(){var m=!!g.fn.ace_scroll;if(m){g(".dropdown-content").ace_scroll({reset:false,mouseWheelLock:true})}if(m&&!ace.vars.old_ie){g(window).on("resize.reset_scroll",function(){g(".ace-scroll:not(.scroll-disabled)").not(":hidden").ace_scroll("reset")});if(m){g(document).on("settings.ace.reset_scroll",function(o,n){if(n=="sidebar_collapsed"){g(".ace-scroll:not(.scroll-disabled)").not(":hidden").ace_scroll("reset")}})}}}function b(){g(document).on("click.dropdown.pos",'.dropdown-toggle[data-position="auto"]',function(){var n=g(this).offset();var m=g(this.parentNode);if(parseInt(n.top+g(this).height())+50>(ace.helper.scrollTop()+ace.helper.winHeight()-m.find(".dropdown-menu").eq(0).height())){m.addClass("dropup")}else{m.removeClass("dropup")}})}function d(){g('.ace-nav [class*="icon-animated-"]').closest("a").one("click",function(){var n=g(this).find('[class*="icon-animated-"]').eq(0);var m=n.attr("class").match(/icon\-animated\-([\d\w]+)/);n.removeClass(m[0])});g(document).on("click",".dropdown-navbar .nav-tabs",function(p){p.stopPropagation();var o,m;var n=p.target;if((o=g(p.target).closest("[data-toggle=tab]"))&&o.length>0){o.tab("show");p.preventDefault();g(window).triggerHandler("resize.navbar.dropdown")}})}function h(){g(".sidebar .nav-list .badge[title],.sidebar .nav-list .badge[title]").each(function(){var m=g(this).attr("class").match(/tooltip\-(?:\w+)/);m=m?m[0]:"tooltip-error";g(this).tooltip({placement:function(n,o){var p=g(o).offset();if(parseInt(p.left)
'})})}function l(){var n=g(".btn-scroll-up");if(n.length>0){var m=false;g(window).on("scroll.scroll_btn",function(){var o=ace.helper.scrollTop();var p=ace.helper.winHeight();var q=document.body.scrollHeight;if(o>parseInt(p/4)||(o>0&&q>=p&&p+o>=q-1)){if(!m){n.addClass("display");m=true}}else{if(m){n.removeClass("display");m=false}}}).triggerHandler("scroll.scroll_btn");n.on(ace.click_event,function(){var o=Math.min(500,Math.max(100,parseInt(ace.helper.scrollTop()/3)));g("html,body").animate({scrollTop:0},o);return false})}}function f(){if(ace.vars.webkit){var m=g(".ace-nav").get(0);if(m){g(window).on("resize.webkit_fix",function(){ace.helper.redraw(m)})}}if(ace.vars.ios_safari){g(document).on("ace.settings.ios_fix",function(p,o,n){if(o!="navbar_fixed"){return}g(document).off("focus.ios_fix blur.ios_fix","input,textarea,.wysiwyg-editor");if(n==true){g(document).on("focus.ios_fix","input,textarea,.wysiwyg-editor",function(){g(window).on("scroll.ios_fix",function(){var q=g("#navbar").get(0);if(q){ace.helper.redraw(q)}})}).on("blur.ios_fix","input,textarea,.wysiwyg-editor",function(){g(window).off("scroll.ios_fix")})}}).triggerHandler("ace.settings.ios_fix",["navbar_fixed",g("#navbar").css("position")=="fixed"])}}function i(){g(document).on("hide.bs.collapse show.bs.collapse",function(o){var n=o.target.getAttribute("id");var m=g('a[href*="#'+n+'"]');if(m.length==0){m=g('a[data-target*="#'+n+'"]')}if(m.length==0){return}m.find(ace.vars[".icon"]).each(function(){var q=g(this);var p;var r=null;var s=null;if((r=q.attr("data-icon-show"))){s=q.attr("data-icon-hide")}else{if(p=q.attr("class").match(/fa\-(.*)\-(up|down)/)){r="fa-"+p[1]+"-down";s="fa-"+p[1]+"-up"}}if(r){if(o.type=="show"){q.removeClass(r).addClass(s)}else{q.removeClass(s).addClass(r)}return false}})})}function j(){if(ace.vars.old_ie){return}g(".ace-nav > li").on("shown.bs.dropdown.navbar",function(o){n.call(this)}).on("hidden.bs.dropdown.navbar",function(o){g(window).off("resize.navbar.dropdown");m.call(this)});function n(){var B=g(this).find("> .dropdown-menu");if(B.css("position")=="fixed"){var F=parseInt(g(window).width());var D=F>320?60:(F>240?40:30);var G=parseInt(F)-D;var w=parseInt(g(window).height())-30;var A=parseInt(Math.min(G,320));B.css("width",A);var r=false;var u=0;var o=B.find(".tab-pane.active .dropdown-content.ace-scroll");if(o.length==0){o=B.find(".dropdown-content.ace-scroll")}else{r=true}var t=o.closest(".dropdown-menu");var E=B[0].scrollHeight;if(o.length==1){var C=o.find(".scroll-content")[0];if(C){E=C.scrollHeight}u+=t.find(".dropdown-header").outerHeight();u+=t.find(".dropdown-footer").outerHeight();var q=t.closest(".tab-content");if(q.length!=0){u+=q.siblings(".nav-tabs").eq(0).height()}}var z=parseInt(Math.min(w,480,E+u));var s=parseInt(Math.abs((G+D-A)/2));var x=parseInt(Math.abs((w+30-z)/2));var v=parseInt(B.css("z-index"))||0;B.css({height:z,left:s,right:"auto",top:x-(!r?1:3)});if(o.length==1){if(!ace.vars.touch){o.ace_scroll("update",{size:z-u}).ace_scroll("enable").ace_scroll("reset")}else{o.ace_scroll("disable").css("max-height",z-u).addClass("overflow-scroll")}}B.css("height",z+(!r?2:7));if(B.hasClass("user-menu")){B.css("height","");var p=g(this).find(".user-info");if(p.length==1&&p.css("position")=="fixed"){p.css({left:s,right:"auto",top:x,width:A-2,"max-width":A-2,"z-index":v+1})}else{p.css({left:"",right:"",top:"",width:"","max-width":"","z-index":""})}}g(this).closest(".navbar.navbar-fixed-top").css("z-index",v)}else{if(B.length!=0){m.call(this,B)}}var y=this;g(window).off("resize.navbar.dropdown").one("resize.navbar.dropdown",function(){g(y).triggerHandler("shown.bs.dropdown.navbar")})}function m(p){p=p||g(this).find("> .dropdown-menu");if(p.length>0){p.css({width:"",height:"",left:"",right:"",top:""}).find(".dropdown-content").each(function(){if(ace.vars.touch){g(this).css("max-height","").removeClass("overflow-scroll")}var q=parseInt(g(this).attr("data-size")||0)||g.fn.ace_scroll.defaults.size;g(this).ace_scroll("update",{size:q}).ace_scroll("enable").ace_scroll("reset")});if(p.hasClass("user-menu")){var o=g(this).find(".user-info").css({left:"",right:"",top:"",width:"","max-width":"","z-index":""})}}g(this).closest(".navbar").css("z-index","")}}});(function(b,d){var c={};function a(o,j){var p=b(o);var q=this;var t=j.content_url||false;var l=j.default_url||false;var e=j.loading_icon||"fa-spinner fa-2x orange";var s=j.loading_text||"";var k=j.update_breadcrumbs||j.update_breadcrumbs===d;var i=j.update_title||j.update_breadcrumbs===d;var m=j.update_active||j.update_breadcrumbs===d;var r=j.close_active||false;var v=j.max_load_wait||false;var g=false;this.loadUrl=function(x){if(HomeGlobal.messageFinish){HomeGlobal.aceAjaxObject=null;var w=false;x=x.replace(/^(\#\!)?\#/,"");if(typeof t==="function"){w=t(x)}if(typeof w==="string"){this.getUrl(w,x,false)}}else{HomeGlobal.aceAjaxObject=q;HomeGlobal.callbackAceAjax(x)}};this.getUrl=function(w,z,y){if(g){return}var x;p.trigger(x=b.Event("ajaxloadstart"),{url:w,hash:z});if(x.isDefaultPrevented()){return}q.startLoading();b.ajax({url:w,beforeSend:function(A){A.setRequestHeader("ajax",true)}}).error(function(A){b.loy.statusErrorShow(A.status);p.trigger("ajaxloaderror",{url:w,hash:z});q.stopLoading(true)}).done(function(A){p.trigger("ajaxloaddone",{url:w,hash:z});var D=null,B="";if(typeof m==="function"){D=m.call(null,z,w)}else{if(m===true){D=b('a[data-url="'+z+'"]');if(D.length>0){var E=D.closest(".nav");if(E.length>0){E.find(".active").each(function(){var F="active";if(b(this).hasClass("hover")||r){F+=" open"}b(this).removeClass(F);if(r){b(this).find(" > .submenu").css("display","")}});var C=D.closest("li").addClass("active").parents(".nav li").addClass("active open");E.closest(".sidebar[data-sidebar-scroll=true]").each(function(){var F=b(this);F.ace_sidebar_scroll("reset");if(y){F.ace_sidebar_scroll("scroll_to_active")}})}}}}if(typeof k==="function"){B=k.call(null,z,w,D)}else{if(k===true&&D!=null&&D.length>0){B=n(D)}}A=String(A).replace(/<(title|link)([\s\>])/gi,'/gi,"
");p.empty().html(A);p.css("opacity",0.6);setTimeout(function(){b("head").find("link.ace-ajax-stylesheet").remove();var H=["link.ace-main-stylesheet","link#main-ace-style",'link[href*="/ace.min.css"]','link[href*="/ace.css"]'];var G=[];for(var F=0;F0){break}}p.find(".ajax-append-link").each(function(J){var I=b(this);if(I.attr("href")){var K=jQuery(" ",{type:"text/css",rel:"stylesheet","class":"ace-ajax-stylesheet"});if(G.length>0){K.insertBefore(G)}else{K.appendTo("head")}K.attr("href",I.attr("href"))}I.remove()})},10);if(typeof i==="function"){i.call(null,z,w,B)}else{if(i===true){u(B)}}if(!y){b("html,body").animate({scrollTop:0},250)}p.trigger("ajaxloadcomplete",{url:w,hash:z});q.stopLoading()})};var f=null;this.startLoading=function(){if(g){return}g=true;p.css("opacity",0.25).prevAll(".ajax-loading-overlay").remove();b(' '+s+"
").insertBefore(o);if(v!==false){f=setTimeout(function(){f=null;if(!g){return}var w;p.trigger(w=b.Event("ajaxloadlong"));if(w.isDefaultPrevented()){return}q.stopLoading(true)},v*1000)}};this.stopLoading=function(w){if(w===true){g=false;p.css("opacity",1).prevAll(".ajax-loading-overlay").remove();if(f!=null){clearTimeout(f);f=null}}else{p.css("opacity",0.75);p.one("ajaxscriptsloaded",function(){q.stopLoading(true)})}};function n(z){var w="";var x=b(".breadcrumb");if(x.length>0&&x.is(":visible")){x.find("> li:not(:first-child)").remove();var y=0;z.parents(".nav li").each(function(){var C=b(this).find("> a");var D=C.clone();D.find("i,.fa,.glyphicon,.ace-icon,.menu-icon,.badge,.label").remove();var E=D.text();D.remove();var B=C.attr("href");if(y==0){var A=b(' ').appendTo(x);A.text(E);w=E}else{var A=b(" ").insertAfter(x.find("> li:first-child"));A.find("a").attr("href",B).text(E)}y++})}return w}function u(x){var y=p.find(".ajax-append-title");if(y.length>0){document.title=y.text();y.remove()}else{if(x.length>0){var w=b.trim(String(document.title).replace(/^(.*)[\-]/,""));if(w){w=" - "+w}x=b.trim(x)+w}}}this.loadScripts=function(w,x){b.ajaxPrefilter("script",function(y){y.cache=true});setTimeout(function(){function C(){if(typeof x==="function"){x()}b('.btn-group[data-toggle="buttons"] > .btn').button();p.trigger("ajaxscriptsloaded")}var D=0;var y=0;for(var z=0;z=D&&g){C()}else{B(E)}})}else{B(E)}}if(D>0){A()}else{C()}},10)};b(window).off("hashchange.ace_ajax").on("hashchange.ace_ajax",function(y,x){var w=b.trim(window.location.hash);if(!w||w.length==0){return}q.loadUrl(w)}).trigger("hashchange.ace_ajax",[true]);var h=b.trim(window.location.hash);if(!h&&l){window.location.hash=l}}b.fn.aceAjax=b.fn.ace_ajax=function(g,i,f){var h;var e=this.each(function(){var l=b(this);var k=l.data("ace_ajax");var j=typeof g==="object"&&g;if(!k){l.data("ace_ajax",(k=new a(this,j)))}if(typeof g==="string"&&typeof k[g]==="function"){if(f!=d){h=k[g](i,f)}else{h=k[g](i)}}});return(h===d)?e:h}})(window.jQuery);(function(d,g){var r="«";var a="»";var l=d(window);function o(){return new Date(Date.UTC.apply(Date,arguments))}function c(){var s=new Date();return o(s.getFullYear(),s.getMonth(),s.getDate())}function m(s){return function(){return this[s].apply(this,arguments)}}var n=(function(){var s={get:function(t){return this.slice(t)[0]},contains:function(w){var v=w&&w.valueOf();for(var u=0,t=this.length;uy){A=y-G-w}}}var s=this.o.orientation.y,u,z;if(s==="auto"){u=-x+B.top-C;z=x+t-(B.top+F+C);if(Math.max(u,z)===z){s="top"}else{s="bottom"}}this.picker.addClass("datepicker-orient-"+s);if(s==="top"){D+=F}else{D-=C+parseInt(this.picker.css("padding-top"))}this.picker.css({top:D,left:A,zIndex:E})},_allow_update:true,update:function(){if(!this._allow_update){return}var t=this.dates.copy(),u=[],s=false;if(arguments.length){d.each(arguments,d.proxy(function(w,v){if(v instanceof Date){v=this._local_to_utc(v)}u.push(v)},this));s=true}else{u=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val();if(u&&this.o.multidate){u=u.split(this.o.multidateSeparator)}else{u=[u]}delete this.element.data().date}u=d.map(u,d.proxy(function(v){return h.parseDate(v,this.o.format,this.o.language)},this));u=d.grep(u,d.proxy(function(v){return(vthis.o.endDate||!v)},this),true);this.dates.replace(u);if(this.dates.length){this.viewDate=new Date(this.dates.get(-1))}else{if(this.viewDatethis.o.endDate){this.viewDate=new Date(this.o.endDate)}}}if(s){this.setValue()}else{if(u.length){if(String(t)!==String(this.dates)){this._trigger("changeDate")}}}if(!this.dates.length&&t.length){this._trigger("clearDate")}this.fill()},fillDow:function(){var t=this.o.weekStart,u="";if(this.o.calendarWeeks){var s=' ';u+=s;this.picker.find(".datepicker-days thead tr:first-child").prepend(s)}while(t'+f[this.o.language].daysMin[(t++)%7]+""}u+=" ";this.picker.find(".datepicker-days thead").append(u)},fillMonths:function(){var t="",s=0;while(s<12){t+=''+f[this.o.language].monthsShort[s++]+" "}this.picker.find(".datepicker-months td").html(t)},setRange:function(s){if(!s||!s.length){delete this.range}else{this.range=d.map(s,function(t){return t.valueOf()})}this.fill()},getClassNames:function(u){var s=[],v=this.viewDate.getUTCFullYear(),w=this.viewDate.getUTCMonth(),t=new Date();if(u.getUTCFullYear()v||(u.getUTCFullYear()===v&&u.getUTCMonth()>w)){s.push("new")}}if(this.focusDate&&u.valueOf()===this.focusDate.valueOf()){s.push("focused")}if(this.o.todayHighlight&&u.getUTCFullYear()===t.getFullYear()&&u.getUTCMonth()===t.getMonth()&&u.getUTCDate()===t.getDate()){s.push("today")}if(this.dates.contains(u)!==-1){s.push("active")}if(u.valueOf()this.o.endDate||d.inArray(u.getUTCDay(),this.o.daysOfWeekDisabled)!==-1){s.push("disabled")}if(this.range){if(u>this.range[0]&&u");if(this.o.calendarWeeks){var t=new Date(+Q+(this.o.weekStart-Q.getUTCDay()-7)%7*86400000),x=new Date(Number(t)+(7+4-t.getUTCDay())%7*86400000),v=new Date(Number(v=o(x.getUTCFullYear(),0,1))+(7+4-v.getUTCDay())%7*86400000),D=(x-v)/86400000/7+1;B.push(''+D+" ")}}F=this.getClassNames(Q);F.push("day");if(this.o.beforeShowDay!==d.noop){var E=this.o.beforeShowDay(this._utc_to_local(Q));if(E===g){E={}}else{if(typeof(E)==="boolean"){E={enabled:E}}else{if(typeof(E)==="string"){E={classes:E}}}}if(E.enabled===false){F.push("disabled")}if(E.classes){F=F.concat(E.classes.split(/\s+/))}if(E.tooltip){w=E.tooltip}}F=d.unique(F);B.push('"+Q.getUTCDate()+" ");if(Q.getUTCDay()===this.o.weekEnd){B.push("")}Q.setUTCDate(Q.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(B.join(""));var y=this.picker.find(".datepicker-months").find("th:eq(1)").text(C).end().find("span").removeClass("active");d.each(this.dates,function(R,S){if(S.getUTCFullYear()===C){y.eq(S.getUTCMonth()).addClass("active")}});if(Cz){y.addClass("disabled")}if(C===H){y.slice(0,L).addClass("disabled")}if(C===z){y.slice(I+1).addClass("disabled")}B="";C=parseInt(C/10,10)*10;var P=this.picker.find(".datepicker-years").find("th:eq(1)").text(C+"-"+(C+9)).end().find("td");C-=1;var G=d.map(this.dates,function(R){return R.getUTCFullYear()}),M;for(var J=-1;J<11;J++){M=["year"];if(J===-1){M.push("old")}else{if(J===10){M.push("new")}}if(d.inArray(C,G)!==-1){M.push("active")}if(Cz){M.push("disabled")}B+=''+C+" ";C+=1}P.html(B)},updateNavArrows:function(){if(!this._allow_update){return}var u=new Date(this.viewDate),s=u.getUTCFullYear(),t=u.getUTCMonth();switch(this.viewMode){case 0:if(this.o.startDate!==-Infinity&&s<=this.o.startDate.getUTCFullYear()&&t<=this.o.startDate.getUTCMonth()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.o.endDate!==Infinity&&s>=this.o.endDate.getUTCFullYear()&&t>=this.o.endDate.getUTCMonth()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 1:case 2:if(this.o.startDate!==-Infinity&&s<=this.o.startDate.getUTCFullYear()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.o.endDate!==Infinity&&s>=this.o.endDate.getUTCFullYear()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break}},click:function(w){w.preventDefault();var x=d(w.target).closest("span, td, th"),z,y,A;if(x.length===1){switch(x[0].nodeName.toLowerCase()){case"th":switch(x[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var s=h.modes[this.viewMode].navStep*(x[0].className==="prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,s);this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,s);if(this.viewMode===1){this._trigger("changeYear",this.viewDate)}break}this.fill();break;case"today":var t=new Date();t=o(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0);this.showMode(-2);var u=this.o.todayBtn==="linked"?null:"view";this._setDate(t,u);break;case"clear":var v;if(this.isInput){v=this.element}else{if(this.component){v=this.element.find("input")}}if(v){v.val("").change()}this.update();this._trigger("changeDate");if(this.o.autoclose){this.hide()}break}break;case"span":if(!x.is(".disabled")){this.viewDate.setUTCDate(1);if(x.is(".month")){A=1;y=x.parent().find("span").index(x);z=this.viewDate.getUTCFullYear();this.viewDate.setUTCMonth(y);this._trigger("changeMonth",this.viewDate);if(this.o.minViewMode===1){this._setDate(o(z,y,A))}}else{A=1;y=0;z=parseInt(x.text(),10)||0;this.viewDate.setUTCFullYear(z);this._trigger("changeYear",this.viewDate);if(this.o.minViewMode===2){this._setDate(o(z,y,A))}}this.showMode(-1);this.fill()}break;case"td":if(x.is(".day")&&!x.is(".disabled")){A=parseInt(x.text(),10)||1;z=this.viewDate.getUTCFullYear();y=this.viewDate.getUTCMonth();if(x.is(".old")){if(y===0){y=11;z-=1}else{y-=1}}else{if(x.is(".new")){if(y===11){y=0;z+=1}else{y+=1}}}this._setDate(o(z,y,A))}break}}if(this.picker.is(":visible")&&this._focused_from){d(this._focused_from).focus()}delete this._focused_from},_toggle_multidate:function(t){var s=this.dates.contains(t);if(!t){this.dates.clear()}else{if(s!==-1){this.dates.remove(s)}else{this.dates.push(t)}}if(typeof this.o.multidate==="number"){while(this.dates.length>this.o.multidate){this.dates.remove(0)}}},_setDate:function(s,u){if(!u||u==="date"){this._toggle_multidate(s&&new Date(s))}if(!u||u==="view"){this.viewDate=s&&new Date(s)}this.fill();this.setValue();this._trigger("changeDate");var t;if(this.isInput){t=this.element}else{if(this.component){t=this.element.find("input")}}if(t){t.change()}if(this.o.autoclose&&(!u||u==="date")){this.hide()}},moveMonth:function(s,t){if(!s){return g}if(!t){return s}var w=new Date(s.valueOf()),A=w.getUTCDate(),x=w.getUTCMonth(),v=Math.abs(t),z,y;t=t>0?1:-1;if(v===1){y=t===-1?function(){return w.getUTCMonth()===x}:function(){return w.getUTCMonth()!==z};z=x+t;w.setUTCMonth(z);if(z<0||z>11){z=(z+12)%12}}else{for(var u=0;u=this.o.startDate&&s<=this.o.endDate},keydown:function(y){if(this.picker.is(":not(:visible)")){if(y.keyCode===27){this.show()}return}var u=false,t,s,w,x=this.focusDate||this.viewDate;switch(y.keyCode){case 27:if(this.focusDate){this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.fill()}else{this.hide()}y.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation){break}t=y.keyCode===37?-1:1;if(y.ctrlKey){s=this.moveYear(this.dates.get(-1)||c(),t);w=this.moveYear(x,t);this._trigger("changeYear",this.viewDate)}else{if(y.shiftKey){s=this.moveMonth(this.dates.get(-1)||c(),t);w=this.moveMonth(x,t);this._trigger("changeMonth",this.viewDate)}else{s=new Date(this.dates.get(-1)||c());s.setUTCDate(s.getUTCDate()+t);w=new Date(x);w.setUTCDate(x.getUTCDate()+t)}}if(this.dateWithinRange(s)){this.focusDate=this.viewDate=w;this.setValue();this.fill();y.preventDefault()}break;case 38:case 40:if(!this.o.keyboardNavigation){break}t=y.keyCode===38?-1:1;if(y.ctrlKey){s=this.moveYear(this.dates.get(-1)||c(),t);w=this.moveYear(x,t);this._trigger("changeYear",this.viewDate)}else{if(y.shiftKey){s=this.moveMonth(this.dates.get(-1)||c(),t);w=this.moveMonth(x,t);this._trigger("changeMonth",this.viewDate)}else{s=new Date(this.dates.get(-1)||c());s.setUTCDate(s.getUTCDate()+t*7);w=new Date(x);w.setUTCDate(x.getUTCDate()+t*7)}}if(this.dateWithinRange(s)){this.focusDate=this.viewDate=w;this.setValue();this.fill();y.preventDefault()}break;case 32:break;case 13:x=this.focusDate||this.dates.get(-1)||this.viewDate;this._toggle_multidate(x);u=true;this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.setValue();this.fill();if(this.picker.is(":visible")){y.preventDefault();if(this.o.autoclose){this.hide()}}break;case 9:this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.fill();this.hide();break}if(u){if(this.dates.length){this._trigger("changeDate")}else{this._trigger("clearDate")}var v;if(this.isInput){v=this.element}else{if(this.component){v=this.element.find("input")}}if(v){v.change()}}},showMode:function(s){if(s){this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+s))}this.picker.find(">div").hide().filter(".datepicker-"+h.modes[this.viewMode].clsName).css("display","block");this.updateNavArrows()}};var j=function(t,s){this.element=d(t);this.inputs=d.map(s.inputs,function(u){return u.jquery?u[0]:u});delete s.inputs;d(this.inputs).datepicker(s).bind("changeDate",d.proxy(this.dateUpdated,this));this.pickers=d.map(this.inputs,function(u){return d(u).data("datepicker")});this.updateDates()};j.prototype={updateDates:function(){this.dates=d.map(this.pickers,function(s){return s.getUTCDate()});this.updateRanges()},updateRanges:function(){var s=d.map(this.dates,function(t){return t.valueOf()});d.each(this.pickers,function(t,u){u.setRange(s)})},dateUpdated:function(v){if(this.updating){return}this.updating=true;var w=d(v.target).data("datepicker"),u=w.getUTCDate(),t=d.inArray(v.target,this.inputs),s=this.inputs.length;if(t===-1){return}d.each(this.pickers,function(x,y){if(!y.getUTCDate()){y.setUTCDate(u)}});if(u=0&&uthis.dates[t]){while(tthis.dates[t]){this.pickers[t++].setUTCDate(u)}}}this.updateDates();delete this.updating},remove:function(){d.map(this.pickers,function(s){s.remove()});delete this.element.data().datepicker}};function k(v,y){var x=d(v).data(),s={},w,u=new RegExp("^"+y.toLowerCase()+"([A-Z])");y=new RegExp("^"+y.toLowerCase());function z(B,A){return A.toLowerCase()}for(var t in x){if(y.test(t)){w=t.replace(u,z);s[w]=x[t]}}return s}function p(u){var s={};if(!f[u]){u=u.split("-")[0];if(!f[u]){return}}var t=f[u];d.each(e,function(w,v){if(v in t){s[v]=t[v]}});return s}var b=d.fn.datepicker;d.fn.datepicker=function(u){var s=Array.apply(null,arguments);s.shift();var t;this.each(function(){var C=d(this),A=C.data("datepicker"),w=typeof u==="object"&&u;if(!A){var y=k(this,"date"),v=d.extend({},i,y,w),x=p(v.language),z=d.extend({},i,x,y,w);if(C.is(".input-daterange")||z.inputs){var B={inputs:z.inputs||C.find("input").toArray()};C.data("datepicker",(A=new j(this,d.extend(z,B))))}else{C.data("datepicker",(A=new q(this,z)))}}if(typeof u==="string"&&typeof A[u]==="function"){t=A[u].apply(A,s);if(t!==g){return false}}});if(t!==g){return t}else{return this}};var i=d.fn.datepicker.defaults={autoclose:false,beforeShowDay:d.noop,calendarWeeks:false,clearBtn:false,daysOfWeekDisabled:[],endDate:Infinity,forceParse:true,format:"mm/dd/yyyy",keyboardNavigation:true,language:"en",minViewMode:0,multidate:false,multidateSeparator:",",orientation:"auto",rtl:false,startDate:-Infinity,startView:0,todayBtn:false,todayHighlight:false,weekStart:0};var e=d.fn.datepicker.locale_opts=["format","rtl","weekStart"];d.fn.datepicker.Constructor=q;var f=d.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}};var h={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(s){return(((s%4===0)&&(s%100!==0))||(s%400===0))},getDaysInMonth:function(s,t){return[31,(h.isLeapYear(s)?29:28),31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(u){var s=u.replace(this.validParts,"\0").split("\0"),t=u.match(this.validParts);if(!s||!s.length||!t||t.length===0){throw new Error("Invalid date format.")}return{separators:s,parts:t}},parseDate:function(J,G,D){if(!J){return g}if(J instanceof Date){return J}if(typeof G==="string"){G=h.parseFormat(G)}var v=/([\-+]\d+)([dmwy])/,B=J.match(/([\-+]\d+)([dmwy])/g),C,A,F;if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(J)){J=new Date();for(F=0;F'+r+' '+a+" ",contTemplate:' ',footTemplate:' '};h.template=''+h.headTemplate+" "+h.footTemplate+'
'+h.headTemplate+h.contTemplate+h.footTemplate+'
'+h.headTemplate+h.contTemplate+h.footTemplate+"
";d.fn.datepicker.DPGlobal=h;d.fn.datepicker.noConflict=function(){d.fn.datepicker=b;return this};d(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var s=d(this);if(s.data("datepicker")){return}t.preventDefault();s.datepicker("show")});d(function(){d('[data-provide="datepicker-inline"]').datepicker()})}(window.jQuery));(function(b){b.gritter={};b.gritter.options={position:"",class_name:"",fade_in_speed:"medium",fade_out_speed:1000,time:6000};b.gritter.add=function(f){try{return a.add(f||{})}catch(d){var c="Gritter Error: "+d;(typeof(console)!="undefined"&&console.error)?console.error(c,f):alert(c)}};b.gritter.remove=function(d,c){a.removeSpecific(d,c||{})};b.gritter.removeAll=function(c){a.stop(c||{})};var a={position:"",fade_in_speed:"",fade_out_speed:"",time:"",_custom_timer:0,_item_count:0,_is_setup:0,_tpl_close:'
',_tpl_title:'[[title]] ',_tpl_item:'',_tpl_wrap:'
',add:function(g){if(typeof(g)=="string"){g={text:g}}if(g.text===null){throw'You must supply "text" parameter.'}if(!this._is_setup){this._runSetup()}var k=g.title,n=g.text,e=g.image||"",l=g.sticky||false,m=g.class_name||b.gritter.options.class_name,j=b.gritter.options.position,d=g.time||"";this._verifyWrapper();this._item_count++;var f=this._item_count,i=this._tpl_item;b(["before_open","after_open","before_close","after_close"]).each(function(p,q){a["_"+q+"_"+f]=(b.isFunction(g[q]))?g[q]:function(){}});this._custom_timer=0;if(d){this._custom_timer=d}var c=(e!="")?' ':"",h=(e!="")?"gritter-with-image":"gritter-without-image";if(k){k=this._str_replace("[[title]]",k,this._tpl_title)}else{k=""}i=this._str_replace(["[[title]]","[[text]]","[[close]]","[[image]]","[[number]]","[[class_name]]","[[item_class]]"],[k,n,this._tpl_close,c,this._item_count,h,m],i);if(this["_before_open_"+f]()===false){return false}b("#gritter-notice-wrapper").addClass(j).append(i);var o=b("#gritter-item-"+this._item_count);o.fadeIn(this.fade_in_speed,function(){a["_after_open_"+f](b(this))});if(!l){this._setFadeTimer(o,f)}b(o).bind("mouseenter mouseleave",function(p){if(p.type=="mouseenter"){if(!l){a._restoreItemIfFading(b(this),f)}}else{if(!l){a._setFadeTimer(b(this),f)}}a._hoverState(b(this),p.type)});b(o).find(".gritter-close").click(function(){a.removeSpecific(f,{},null,true)});return f},_countRemoveWrapper:function(c,d,f){d.remove();this["_after_close_"+c](d,f);if(b(".gritter-item-wrapper").length==0){b("#gritter-notice-wrapper").remove()}},_fade:function(g,d,j,f){var j=j||{},i=(typeof(j.fade)!="undefined")?j.fade:true,c=j.speed||this.fade_out_speed,h=f;this["_before_close_"+d](g,h);if(f){g.unbind("mouseenter mouseleave")}if(i){g.animate({opacity:0},c,function(){g.animate({height:0},300,function(){a._countRemoveWrapper(d,g,h)})})}else{this._countRemoveWrapper(d,g)}},_hoverState:function(d,c){if(c=="mouseenter"){d.addClass("hover");d.find(".gritter-close").show()}else{d.removeClass("hover");d.find(".gritter-close").hide()}},removeSpecific:function(c,g,f,d){if(!f){var f=b("#gritter-item-"+c)}this._fade(f,c,g||{},d)},_restoreItemIfFading:function(d,c){clearTimeout(this["_int_id_"+c]);d.stop().css({opacity:"",height:""})},_runSetup:function(){for(opt in b.gritter.options){this[opt]=b.gritter.options[opt]}this._is_setup=1},_setFadeTimer:function(f,d){var c=(this._custom_timer)?this._custom_timer:this.time;this["_int_id_"+d]=setTimeout(function(){a._fade(f,d)},c)},stop:function(e){var c=(b.isFunction(e.before_close))?e.before_close:function(){};var f=(b.isFunction(e.after_close))?e.after_close:function(){};var d=b("#gritter-notice-wrapper");c(d);d.fadeOut(function(){b(this).remove();f()})},_str_replace:function(v,e,o,n){var k=0,h=0,t="",m="",g=0,q=0,l=[].concat(v),c=[].concat(e),u=o,d=c instanceof Array,p=u instanceof Array;u=[].concat(u);if(n){this.window[n]=0}for(k=0,g=u.length;k").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&")},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&").replace(/\"/g,""").replace(/ /g,">")},format:function(format){var args=$.makeArray(arguments).slice(1);if(format==null){format=""}return format.replace(/\{(\d+)\}/g,function(m,i){return args[i]})},msie:navigator.appName==="Microsoft Internet Explorer",msiever:function(){var rv=-1;var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(re.exec(ua)!=null){rv=parseFloat(RegExp.$1)}return rv},getCellIndex:function(cell){var c=$(cell);if(c.is("tr")){return -1}c=(!c.is("td")&&!c.is("th")?c.closest("td,th"):c)[0];if($.jgrid.msie){return $.inArray(c,c.parentNode.cells)}return c.cellIndex},stripHtml:function(v){v=String(v);var regexp=/<("[^"]*"|'[^']*'|[^'">])*>/gi;if(v){v=v.replace(regexp,"");return(v&&v!==" "&&v!==" ")?v.replace(/\"/g,"'"):""}return v},stripPref:function(pref,id){var obj=$.type(pref);if(obj==="string"||obj==="number"){pref=String(pref);id=pref!==""?String(id).replace(String(pref),""):id}return id},parse:function(jsonString){var js=jsonString;if(js.substr(0,9)==="while(1);"){js=js.substr(9)}if(js.substr(0,2)==="/*"){js=js.substr(2,js.length-4)}if(!js){js="{}"}return($.jgrid.useJSON===true&&typeof JSON==="object"&&typeof JSON.parse==="function")?JSON.parse(js):eval("("+js+")")},parseDate:function(format,date,newformat,opts){var token=/\\.|[dDjlNSwzWFmMntLoYyaABgGhHisueIOPTZcrU]/g,timezone=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,timezoneClip=/[^-+\dA-Z]/g,msDateRegExp=new RegExp("^/Date\\((([-+])?[0-9]+)(([-+])([0-9]{2})([0-9]{2}))?\\)/$"),msMatch=((typeof date==="string")?date.match(msDateRegExp):null),pad=function(value,length){value=String(value);length=parseInt(length,10)||2;while(value.length11){date[k]=dM+1-12;ts.m=date[k]}}if(format[k]==="a"){dM=$.inArray(date[k],opts.AmPm);if(dM!==-1&&dM<2&&date[k]===opts.AmPm[dM]){date[k]=dM;ts.h=h12to24(date[k],ts.h)}}if(format[k]==="A"){dM=$.inArray(date[k],opts.AmPm);if(dM!==-1&&dM>1&&date[k]===opts.AmPm[dM]){date[k]=dM-2;ts.h=h12to24(date[k],ts.h)}}if(format[k]==="g"){ts.h=parseInt(date[k],10)}if(date[k]!==undefined){ts[format[k].toLowerCase()]=parseInt(date[k],10)}}if(ts.f){ts.m=ts.f}if(ts.m===0&&ts.y===0&&ts.d===0){return" "}ts.m=parseInt(ts.m,10)-1;var ty=ts.y;if(ty>=70&&ty<=99){ts.y=1900+ts.y}else{if(ty>=0&&ty<=69){ts.y=2000+ts.y}}timestamp=new Date(ts.y,ts.m,ts.d,ts.h,ts.i,ts.s,ts.u);if(offset>0){timestamp.setTime(Number(Number(timestamp)+(offset*60*1000)))}}}}}else{timestamp=new Date(ts.y,ts.m,ts.d,ts.h,ts.i,ts.s,ts.u)}if(opts.userLocalTime&&offset===0){offset-=(new Date()).getTimezoneOffset();if(offset>0){timestamp.setTime(Number(Number(timestamp)+(offset*60*1000)))}}if(newformat===undefined){return timestamp}if(opts.masks.hasOwnProperty(newformat)){newformat=opts.masks[newformat]}else{if(!newformat){newformat="Y-m-d"}}var G=timestamp.getHours(),i=timestamp.getMinutes(),j=timestamp.getDate(),n=timestamp.getMonth()+1,o=timestamp.getTimezoneOffset(),s=timestamp.getSeconds(),u=timestamp.getMilliseconds(),w=timestamp.getDay(),Y=timestamp.getFullYear(),N=(w+6)%7+1,z=(new Date(Y,n-1,j)-new Date(Y,0,1))/86400000,flags={d:pad(j),D:opts.dayNames[w],j:j,l:opts.dayNames[w+7],N:N,S:opts.S(j),w:w,z:z,W:N<5?Math.floor((z+N-1)/7)+1:Math.floor((z+N-1)/7)||((new Date(Y-1,0,1).getDay()+6)%7<4?53:52),F:opts.monthNames[n-1+12],m:pad(n),M:opts.monthNames[n-1],n:n,t:"?",L:"?",o:"?",Y:Y,y:String(Y).substring(2),a:G<12?opts.AmPm[0]:opts.AmPm[1],A:G<12?opts.AmPm[2]:opts.AmPm[3],B:"?",g:G%12||12,G:G,h:pad(G%12||12),H:pad(G),i:pad(i),s:pad(s),u:u,e:"?",I:"?",O:(o>0?"-":"+")+pad(Math.floor(Math.abs(o)/60)*100+Math.abs(o)%60,4),P:"?",T:(String(timestamp).match(timezone)||[""]).pop().replace(timezoneClip,""),Z:"?",c:"?",r:"?",U:Math.floor(timestamp/1000)};return newformat.replace(token,function($0){return flags.hasOwnProperty($0)?flags[$0]:$0.substring(1)})},jqID:function(sid){return String(sid).replace(/[!"#$%&'()*+,.\/:; <=>?@\[\\\]\^`{|}~]/g,"\\$&")},guid:1,uidPref:"jqg",randId:function(prefix){return(prefix||$.jgrid.uidPref)+($.jgrid.guid++)},getAccessor:function(obj,expr){var ret,p,prm=[],i;if(typeof expr==="function"){return expr(obj)}ret=obj[expr];if(ret===undefined){try{if(typeof expr==="string"){prm=expr.split(".")}i=prm.length;if(i){ret=obj;while(ret&&i--){p=prm.shift();ret=ret[p]}}}catch(e){}}return ret},getXmlData:function(obj,expr,returnObj){var ret,m=typeof expr==="string"?expr.match(/^(.*)\[(\w+)\]$/):null;if(typeof expr==="function"){return expr(obj)}if(m&&m[2]){return m[1]?$(m[1],obj).attr(m[2]):$(obj).attr(m[2])}ret=$(expr,obj);if(returnObj){return ret}return ret.length>0?$(ret).text():undefined},cellWidth:function(){var $testDiv=$(""),testCell=$testDiv.appendTo("body").find("td").width();$testDiv.remove();return Math.abs(testCell-5)>0.1},cell_width:true,ajaxOptions:{},from:function(source){var QueryObject=function(d,q){if(typeof d==="string"){d=$.data(d)}var self=this,_data=d,_usecase=true,_trim=false,_query=q,_stripNum=/[\$,%]/g,_lastCommand=null,_lastField=null,_orDepth=0,_negate=false,_queuedOperator="",_sorting=[],_useProperties=true;if(typeof d==="object"&&d.push){if(d.length>0){if(typeof d[0]!=="object"){_useProperties=false}else{_useProperties=true}}}else{throw"data provides is not an array"}this._hasData=function(){return _data===null?false:_data.length===0?false:true};this._getStr=function(s){var phrase=[];if(_trim){phrase.push("jQuery.trim(")}phrase.push("String("+s+")");if(_trim){phrase.push(")")}if(!_usecase){phrase.push(".toLowerCase()")}return phrase.join("")};this._strComp=function(val){if(typeof val==="string"){return".toString()"}return""};this._group=function(f,u){return({field:f.toString(),unique:u,items:[]})};this._toStr=function(phrase){if(_trim){phrase=$.trim(phrase)}phrase=phrase.toString().replace(/\\/g,"\\\\").replace(/\"/g,'\\"');return _usecase?phrase:phrase.toLowerCase()};this._funcLoop=function(func){var results=[];$.each(_data,function(i,v){results.push(func(v))});return results};this._append=function(s){var i;if(_query===null){_query=""}else{_query+=_queuedOperator===""?" && ":_queuedOperator}for(i=0;i<_orDepth;i++){_query+="("}if(_negate){_query+="!"}_query+="("+s+")";_negate=false;_queuedOperator="";_orDepth=0};this._setCommand=function(f,c){_lastCommand=f;_lastField=c};this._resetNegate=function(){_negate=false};this._repeatCommand=function(f,v){if(_lastCommand===null){return self}if(f!==null&&v!==null){return _lastCommand(f,v)}if(_lastField===null){return _lastCommand(f)}if(!_useProperties){return _lastCommand(f)}return _lastCommand(_lastField,f)};this._equals=function(a,b){return(self._compare(a,b,1)===0)};this._compare=function(a,b,d){var toString=Object.prototype.toString;if(d===undefined){d=1}if(a===undefined){a=null}if(b===undefined){b=null}if(a===null&&b===null){return 0}if(a===null&&b!==null){return 1}if(a!==null&&b===null){return -1}if(toString.call(a)==="[object Date]"&&toString.call(b)==="[object Date]"){if(ab){return d}return 0}if(!_usecase&&typeof a!=="number"&&typeof b!=="number"){a=String(a);b=String(b)}if(ab){return d}return 0};this._performSort=function(){if(_sorting.length===0){return}_data=self._doSort(_data,0)};this._doSort=function(d,q){var by=_sorting[q].by,dir=_sorting[q].dir,type=_sorting[q].type,dfmt=_sorting[q].datefmt,sfunc=_sorting[q].sfunc;if(q===_sorting.length-1){return self._getOrder(d,by,dir,type,dfmt,sfunc)}q++;var values=self._getGroup(d,by,dir,type,dfmt),results=[],i,j,sorted;for(i=0;i0};this.andNot=function(f,v,x){_negate=!_negate;return self.and(f,v,x)};this.orNot=function(f,v,x){_negate=!_negate;return self.or(f,v,x)};this.not=function(f,v,x){return self.andNot(f,v,x)};this.and=function(f,v,x){_queuedOperator=" && ";if(f===undefined){return self}return self._repeatCommand(f,v,x)};this.or=function(f,v,x){_queuedOperator=" || ";if(f===undefined){return self}return self._repeatCommand(f,v,x)};this.orBegin=function(){_orDepth++;return self};this.orEnd=function(){if(_query!==null){_query+=")"}return self};this.isNot=function(f){_negate=!_negate;return self.is(f)};this.is=function(f){self._append("this."+f);self._resetNegate();return self};this._compareValues=function(func,f,v,how,t){var fld;if(_useProperties){fld="jQuery.jgrid.getAccessor(this,'"+f+"')"}else{fld="this"}if(v===undefined){v=null}var val=v,swst=t.stype===undefined?"text":t.stype;if(v!==null){switch(swst){case"int":case"integer":val=(isNaN(Number(val))||val==="")?"0":val;fld="parseInt("+fld+",10)";val="parseInt("+val+",10)";break;case"float":case"number":case"numeric":val=String(val).replace(_stripNum,"");val=(isNaN(Number(val))||val==="")?"0":val;fld="parseFloat("+fld+")";val="parseFloat("+val+")";break;case"date":case"datetime":val=String($.jgrid.parseDate(t.newfmt||"Y-m-d",val).getTime());fld='jQuery.jgrid.parseDate("'+t.srcfmt+'",'+fld+").getTime()";break;default:fld=self._getStr(fld);val=self._getStr('"'+self._toStr(val)+'"')}}self._append(fld+" "+how+" "+val);self._setCommand(func,f);self._resetNegate();return self};this.equals=function(f,v,t){return self._compareValues(self.equals,f,v,"==",t)};this.notEquals=function(f,v,t){return self._compareValues(self.equals,f,v,"!==",t)};this.isNull=function(f,v,t){return self._compareValues(self.equals,f,null,"===",t)};this.greater=function(f,v,t){return self._compareValues(self.greater,f,v,">",t)};this.less=function(f,v,t){return self._compareValues(self.less,f,v,"<",t)};this.greaterOrEquals=function(f,v,t){return self._compareValues(self.greaterOrEquals,f,v,">=",t)};this.lessOrEquals=function(f,v,t){return self._compareValues(self.lessOrEquals,f,v,"<=",t)};this.startsWith=function(f,v){var val=(v==null)?f:v,length=_trim?$.trim(val.toString()).length:val.toString().length;if(_useProperties){self._append(self._getStr("jQuery.jgrid.getAccessor(this,'"+f+"')")+".substr(0,"+length+") == "+self._getStr('"'+self._toStr(v)+'"'))}else{if(v!=null){length=_trim?$.trim(v.toString()).length:v.toString().length}self._append(self._getStr("this")+".substr(0,"+length+") == "+self._getStr('"'+self._toStr(f)+'"'))}self._setCommand(self.startsWith,f);self._resetNegate();return self};this.endsWith=function(f,v){var val=(v==null)?f:v,length=_trim?$.trim(val.toString()).length:val.toString().length;if(_useProperties){self._append(self._getStr("jQuery.jgrid.getAccessor(this,'"+f+"')")+".substr("+self._getStr("jQuery.jgrid.getAccessor(this,'"+f+"')")+".length-"+length+","+length+') == "'+self._toStr(v)+'"')}else{self._append(self._getStr("this")+".substr("+self._getStr("this")+'.length-"'+self._toStr(f)+'".length,"'+self._toStr(f)+'".length) == "'+self._toStr(f)+'"')}self._setCommand(self.endsWith,f);self._resetNegate();return self};this.contains=function(f,v){if(_useProperties){self._append(self._getStr("jQuery.jgrid.getAccessor(this,'"+f+"')")+'.indexOf("'+self._toStr(v)+'",0) > -1')}else{self._append(self._getStr("this")+'.indexOf("'+self._toStr(f)+'",0) > -1')}self._setCommand(self.contains,f);self._resetNegate();return self};this.groupBy=function(by,dir,type,datefmt){if(!self._hasData()){return null}return self._getGroup(_data,by,dir,type,datefmt)};this.orderBy=function(by,dir,stype,dfmt,sfunc){dir=dir==null?"a":$.trim(dir.toString().toLowerCase());if(stype==null){stype="text"}if(dfmt==null){dfmt="Y-m-d"}if(sfunc==null){sfunc=false}if(dir==="desc"||dir==="descending"){dir="d"}if(dir==="asc"||dir==="ascending"){dir="a"}_sorting.push({by:by,dir:dir,type:stype,datefmt:dfmt,sfunc:sfunc});return self};return self};return new QueryObject(source,null)},getMethod:function(name){return this.getAccessor($.fn.jqGrid,name)},extend:function(methods){$.extend($.fn.jqGrid,methods);if(!this.no_legacy_api){$.fn.extend(methods)}}});$.fn.jqGrid=function(pin){if(typeof pin==="string"){var fn=$.jgrid.getMethod(pin);if(!fn){throw ("jqGrid - No such method: "+pin)}var args=$.makeArray(arguments).slice(1);return fn.apply(this,args)}return this.each(function(){if(this.grid){return}var localData;if(pin!=null&&pin.data!==undefined){localData=pin.data;pin.data=[]}var p=$.extend(true,{url:"",height:150,page:1,rowNum:20,rowTotal:null,records:0,pager:"",pgbuttons:true,pginput:true,colModel:[],rowList:[],colNames:[],sortorder:"asc",sortname:"",datatype:"xml",mtype:"GET",altRows:false,selarrrow:[],savedRow:[],shrinkToFit:true,xmlReader:{},jsonReader:{},subGrid:false,subGridModel:[],reccount:0,lastpage:0,lastsort:0,selrow:null,beforeSelectRow:null,onSelectRow:null,onSortCol:null,ondblClickRow:null,onRightClickRow:null,onPaging:null,onSelectAll:null,onInitGrid:null,loadComplete:null,gridComplete:null,loadError:null,loadBeforeSend:null,afterInsertRow:null,beforeRequest:null,beforeProcessing:null,onHeaderClick:null,viewrecords:false,loadonce:false,multiselect:false,multikey:false,editurl:null,search:false,caption:"",hidegrid:true,hiddengrid:false,postData:{},userData:{},treeGrid:false,treeGridModel:"nested",treeReader:{},treeANode:-1,ExpandColumn:null,tree_root_level:0,prmNames:{page:"page",rows:"rows",sort:"sidx",order:"sord",search:"_search",nd:"nd",id:"id",oper:"oper",editoper:"edit",addoper:"add",deloper:"del",subgridid:"id",npage:null,totalrows:"totalrows"},forceFit:false,gridstate:"visible",cellEdit:false,cellsubmit:"remote",nv:0,loadui:"enable",toolbar:[false,""],scroll:false,multiboxonly:false,deselectAfterSort:true,scrollrows:false,autowidth:false,scrollOffset:18,cellLayout:5,subGridWidth:20,multiselectWidth:20,gridview:false,rownumWidth:25,rownumbers:false,pagerpos:"center",recordpos:"right",footerrow:false,userDataOnFooter:false,hoverrows:true,altclass:"ui-priority-secondary",viewsortcols:[false,"vertical",true],resizeclass:"",autoencode:false,remapColumns:[],ajaxGridOptions:{},direction:"ltr",toppager:false,headertitles:false,scrollTimeout:40,data:[],_index:{},grouping:false,groupingView:{groupField:[],groupOrder:[],groupText:[],groupColumnShow:[],groupSummary:[],showSummaryOnHide:false,sortitems:[],sortnames:[],summary:[],summaryval:[],plusicon:"ui-icon-circlesmall-plus",minusicon:"ui-icon-circlesmall-minus",displayField:[],groupSummaryPos:[],formatDisplayField:[],_locgr:false},ignoreCase:false,cmTemplate:{},idPrefix:"",multiSort:false,minColWidth:33},$.jgrid.defaults,pin||{});if(localData!==undefined){p.data=localData;pin.data=localData}var ts=this,grid={headers:[],cols:[],footers:[],dragStart:function(i,x,y){var gridLeftPos=$(this.bDiv).offset().left;this.resizing={idx:i,startX:x.pageX,sOL:x.pageX-gridLeftPos};this.hDiv.style.cursor="col-resize";this.curGbox=$("#rs_m"+$.jgrid.jqID(p.id),"#gbox_"+$.jgrid.jqID(p.id));this.curGbox.css({display:"block",left:x.pageX-gridLeftPos,top:y[1],height:y[2]});$(ts).triggerHandler("jqGridResizeStart",[x,i]);if($.isFunction(p.resizeStart)){p.resizeStart.call(ts,x,i)}document.onselectstart=function(){return false}},dragMove:function(x){if(this.resizing){var diff=x.pageX-this.resizing.startX,h=this.headers[this.resizing.idx],newWidth=p.direction==="ltr"?h.width+diff:h.width-diff,hn,nWn;if(newWidth>33){this.curGbox.css({left:this.resizing.sOL+diff});if(p.forceFit===true){hn=this.headers[this.resizing.idx+p.nv];nWn=p.direction==="ltr"?hn.width-diff:hn.width+diff;if(nWn>p.minColWidth){h.newWidth=newWidth;hn.newWidth=nWn}}else{this.newWidth=p.direction==="ltr"?p.tblwidth+diff:p.tblwidth-diff;h.newWidth=newWidth}}}},dragEnd:function(){this.hDiv.style.cursor="default";if(this.resizing){var idx=this.resizing.idx,nw=this.headers[idx].newWidth||this.headers[idx].width;nw=parseInt(nw,10);this.resizing=false;$("#rs_m"+$.jgrid.jqID(p.id)).css("display","none");p.colModel[idx].width=nw;this.headers[idx].width=nw;this.headers[idx].el.style.width=nw+"px";this.cols[idx].style.width=nw+"px";if(this.footers.length>0){this.footers[idx].style.width=nw+"px"}if(p.forceFit===true){nw=this.headers[idx+p.nv].newWidth||this.headers[idx+p.nv].width;this.headers[idx+p.nv].width=nw;this.headers[idx+p.nv].el.style.width=nw+"px";this.cols[idx+p.nv].style.width=nw+"px";if(this.footers.length>0){this.footers[idx+p.nv].style.width=nw+"px"}p.colModel[idx+p.nv].width=nw}else{p.tblwidth=this.newWidth||p.tblwidth;$("table:first",this.bDiv).css("width",p.tblwidth+"px");$("table:first",this.hDiv).css("width",p.tblwidth+"px");this.hDiv.scrollLeft=this.bDiv.scrollLeft;if(p.footerrow){$("table:first",this.sDiv).css("width",p.tblwidth+"px");this.sDiv.scrollLeft=this.bDiv.scrollLeft}}$(ts).triggerHandler("jqGridResizeStop",[nw,idx]);if($.isFunction(p.resizeStop)){p.resizeStop.call(ts,nw,idx)}}this.curGbox=null;document.onselectstart=function(){return true}},populateVisible:function(){if(grid.timer){clearTimeout(grid.timer)}grid.timer=null;var dh=$(grid.bDiv).height();if(!dh){return}var table=$("table:first",grid.bDiv);var rows,rh;if(table[0].rows.length){try{rows=table[0].rows[1];rh=rows?$(rows).outerHeight()||grid.prevRowHeight:grid.prevRowHeight}catch(pv){rh=grid.prevRowHeight}}if(!rh){return}grid.prevRowHeight=rh;var rn=p.rowNum;var scrollTop=grid.scrollTop=grid.bDiv.scrollTop;var ttop=Math.round(table.position().top)-scrollTop;var tbot=ttop+table.height();var div=rh*rn;var page,npage,empty;if(tbot=0||npage<2||p.scroll===true){page=(Math.round((tbot+scrollTop)/div)||0)+1;ttop=-1}else{ttop=1}}if(ttop>0){page=(parseInt(scrollTop/div,10)||0)+1;npage=(parseInt((scrollTop+dh)/div,10)||0)+2-page;empty=true}if(npage){if(p.lastpage&&(page>p.lastpage||p.lastpage===1||(page===p.page&&page===p.lastpage))){return}if(grid.hDiv.loading){grid.timer=setTimeout(grid.populateVisible,p.scrollTimeout)}else{p.page=page;if(empty){grid.selectionPreserver(table[0]);grid.emptyRows.call(table[0],false,false)}grid.populate(npage)}}},scrollGrid:function(e){if(p.scroll){var scrollTop=grid.bDiv.scrollTop;if(grid.scrollTop===undefined){grid.scrollTop=0}if(scrollTop!==grid.scrollTop){grid.scrollTop=scrollTop;if(grid.timer){clearTimeout(grid.timer)}grid.timer=setTimeout(grid.populateVisible,p.scrollTimeout)}}grid.hDiv.scrollLeft=grid.bDiv.scrollLeft;if(p.footerrow){grid.sDiv.scrollLeft=grid.bDiv.scrollLeft}if(e){e.stopPropagation()}},selectionPreserver:function(ts){var p=ts.p,sr=p.selrow,sra=p.selarrrow?$.makeArray(p.selarrrow):null,left=ts.grid.bDiv.scrollLeft,restoreSelection=function(){var i;p.selrow=null;p.selarrrow=[];if(p.multiselect&&sra&&sra.length>0){for(i=0;i"),isMSIE=$.jgrid.msie;ts.p.direction=$.trim(ts.p.direction.toLowerCase());if($.inArray(ts.p.direction,["ltr","rtl"])===-1){ts.p.direction="ltr"}dir=ts.p.direction;$(gv).insertBefore(this);$(this).removeClass("scroll").appendTo(gv);var eg=$("
");$(eg).attr({id:"gbox_"+this.id,dir:dir}).insertBefore(gv);$(gv).attr("id","gview_"+this.id).appendTo(eg);$("
").insertBefore(gv);$(""+this.p.loadtext+"
").insertBefore(gv);$(this).attr({cellspacing:"0",cellpadding:"0",border:"0",role:"presentation","aria-multiselectable":!!this.p.multiselect,"aria-labelledby":"gbox_"+this.id});var sortkeys=["shiftKey","altKey","ctrlKey"],intNum=function(val,defval){val=parseInt(val,10);if(isNaN(val)){return defval||0}return val},formatCol=function(pos,rowInd,tv,rawObject,rowId,rdata){var cm=ts.p.colModel[pos],cellAttrFunc,ral=cm.align,result='style="',clas=cm.classes,nm=cm.name,celp,acp=[];if(ral){result+="text-align:"+ral+";"}if(cm.hidden===true){result+="display:none;"}if(rowInd===0){result+="width: "+grid.headers[pos].width+"px;"}else{if($.isFunction(cm.cellattr)||(typeof cm.cellattr==="string"&&$.jgrid.cellattr!=null&&$.isFunction($.jgrid.cellattr[cm.cellattr]))){cellAttrFunc=$.isFunction(cm.cellattr)?cm.cellattr:$.jgrid.cellattr[cm.cellattr];celp=cellAttrFunc.call(ts,rowId,tv,rawObject,cm,rdata);if(celp&&typeof celp==="string"){celp=celp.replace(/style/i,"style").replace(/title/i,"title");if(celp.indexOf("title")>-1){cm.title=false}if(celp.indexOf("class")>-1){clas=undefined}acp=celp.replace(/\-style/g,"-sti").split(/style/);if(acp.length===2){acp[1]=$.trim(acp[1].replace(/\-sti/g,"-style").replace("=",""));if(acp[1].indexOf("'")===0||acp[1].indexOf('"')===0){acp[1]=acp[1].substring(1)}result+=acp[1].replace(/'/gi,'"')}else{result+='"'}}}}if(!acp.length){acp[0]="";result+='"'}result+=(clas!==undefined?(' class="'+clas+'"'):"")+((cm.title&&tv)?(' title="'+$.jgrid.stripHtml(tv)+'"'):"");result+=' aria-describedby="'+ts.p.id+"_"+nm+'"';return result+acp[0]},cellVal=function(val){return val==null||val===""?" ":(ts.p.autoencode?$.jgrid.htmlEncode(val):String(val))},formatter=function(rowId,cellval,colpos,rwdat,_act){var cm=ts.p.colModel[colpos],v;if(cm.formatter!==undefined){rowId=String(ts.p.idPrefix)!==""?$.jgrid.stripPref(ts.p.idPrefix,rowId):rowId;var opts={rowId:rowId,colModel:cm,gid:ts.p.id,pos:colpos};if($.isFunction(cm.formatter)){v=cm.formatter.call(ts,cellval,opts,rwdat,_act)}else{if($.fmatter){v=$.fn.fmatter.call(ts,cm.formatter,cellval,opts,rwdat,_act)}else{v=cellVal(cellval)}}}else{v=cellVal(cellval)}return v},addCell=function(rowId,cell,pos,irow,srvr,rdata){var v,prp;v=formatter(rowId,cell,pos,srvr,"add");prp=formatCol(pos,irow,v,srvr,rowId,rdata);return'"+v+" "},addMulti=function(rowid,pos,irow,checked){var v=' ",prp=formatCol(pos,irow,"",null,rowid,true);return'"+v+" "},addRowNum=function(pos,irow,pG,rN){var v=(parseInt(pG,10)-1)*parseInt(rN,10)+1+irow,prp=formatCol(pos,irow,v,null,irow,true);return'"+v+" "},reader=function(datatype){var field,f=[],j=0,i;for(i=0;i0?this.rows[0]:null;$(this.firstChild).empty().append(firstrow)}if(scroll&&this.p.scroll){$(this.grid.bDiv.firstChild).css({height:"auto"});$(this.grid.bDiv.firstChild.firstChild).css({height:0,display:"none"});if(this.grid.bDiv.scrollTop!==0){this.grid.bDiv.scrollTop=0}}if(locdata===true&&this.p.treeGrid){this.p.data=[];this.p._index={}}},normalizeData=function(){var p=ts.p,data=p.data,dataLength=data.length,i,j,cur,idn,idr,ccur,v,rd,localReader=p.localReader,colModel=p.colModel,cellName=localReader.cell,iOffset=(p.multiselect===true?1:0)+(p.subGrid===true?1:0)+(p.rownumbers===true?1:0),br=p.scroll?$.jgrid.randId():1,arrayReader,objectReader,rowReader;if(p.datatype!=="local"||localReader.repeatitems!==true){return}arrayReader=orderedCols(iOffset);objectReader=reader("local");idn=p.keyIndex===false?($.isFunction(localReader.id)?localReader.id.call(ts,data):localReader.id):p.keyIndex;for(i=0;i"},addXmlData=function(xml,t,rcnt,more,adjust){var startReq=new Date(),locdata=(ts.p.datatype!=="local"&&ts.p.loadonce)||ts.p.datatype==="xmlstring",xmlid="_id_",xmlRd=ts.p.xmlReader,frd=ts.p.datatype==="local"?"local":"xml";if(locdata){ts.p.data=[];ts.p._index={};ts.p.localReader.id=xmlid}ts.p.reccount=0;if($.isXMLDoc(xml)){if(ts.p.treeANode===-1&&!ts.p.scroll){emptyRows.call(ts,false,true);rcnt=1}else{rcnt=rcnt>1?rcnt:1}}else{return}var self=$(ts),i,fpos,ir=0,v,gi=ts.p.multiselect===true?1:0,si=0,addSubGridCell,ni=ts.p.rownumbers===true?1:0,idn,getId,f=[],F,rd={},xmlr,rid,rowData=[],cn=(ts.p.altRows===true)?ts.p.altclass:"",cn1;if(ts.p.subGrid===true){si=1;addSubGridCell=$.jgrid.getMethod("addSubGridCell")}if(!xmlRd.repeatitems){f=reader(frd)}if(ts.p.keyName===false){idn=$.isFunction(xmlRd.id)?xmlRd.id.call(ts,xml):xmlRd.id}else{idn=ts.p.keyName}if(String(idn).indexOf("[")===-1){if(f.length){getId=function(trow,k){return $(idn,trow).text()||k}}else{getId=function(trow,k){return $(xmlRd.cell,trow).eq(idn).text()||k}}}else{getId=function(trow,k){return trow.getAttribute(idn.replace(/[\[\]]/g,""))||k}}ts.p.userData={};ts.p.page=intNum($.jgrid.getXmlData(xml,xmlRd.page),ts.p.page);ts.p.lastpage=intNum($.jgrid.getXmlData(xml,xmlRd.total),1);ts.p.records=intNum($.jgrid.getXmlData(xml,xmlRd.records));if($.isFunction(xmlRd.userdata)){ts.p.userData=xmlRd.userdata.call(ts,xml)||{}}else{$.jgrid.getXmlData(xml,xmlRd.userdata,true).each(function(){ts.p.userData[this.getAttribute("name")]=$(this).text()})}var gxml=$.jgrid.getXmlData(xml,xmlRd.root,true);gxml=$.jgrid.getXmlData(gxml,xmlRd.row,true);if(!gxml){gxml=[]}var gl=gxml.length,j=0,grpdata=[],rn=parseInt(ts.p.rowNum,10),br=ts.p.scroll?$.jgrid.randId():1,altr;if(gl>0&&ts.p.page<=0){ts.p.page=1}if(gxml&&gl){if(adjust){rn*=adjust+1}var afterInsRow=$.isFunction(ts.p.afterInsertRow),hiderow=false,groupingPrepare;if(ts.p.grouping){hiderow=ts.p.groupingView.groupCollapse===true;groupingPrepare=$.jgrid.getMethod("groupingPrepare")}while(j");if(ts.p.grouping){grpdata.push(rowData);if(!ts.p.groupingView._locgr){groupingPrepare.call(self,rd,j)}rowData=[]}if(locdata||ts.p.treeGrid===true){rd[xmlid]=$.jgrid.stripPref(ts.p.idPrefix,rid);ts.p.data.push(rd);ts.p._index[rd[xmlid]]=ts.p.data.length-1}if(ts.p.gridview===false){$("tbody:first",t).append(rowData.join(""));self.triggerHandler("jqGridAfterInsertRow",[rid,rd,xmlr]);if(afterInsRow){ts.p.afterInsertRow.call(ts,rid,rd,xmlr)}rowData=[]}rd={};ir++;j++;if(ir===rn){break}}}if(ts.p.gridview===true){fpos=ts.p.treeANode>-1?ts.p.treeANode:0;if(ts.p.grouping){if(!locdata){self.jqGrid("groupingRender",grpdata,ts.p.colModel.length,ts.p.page,rn);grpdata=null}}else{if(ts.p.treeGrid===true&&fpos>0){$(ts.rows[fpos]).after(rowData.join(""))}else{ts.firstElementChild.innerHTML+=rowData.join("");ts.grid.cols=ts.rows[0].cells}}}if(ts.p.subGrid===true){try{self.jqGrid("addSubGrid",gi+ni)}catch(_){}}ts.p.totaltime=new Date()-startReq;if(ir>0){if(ts.p.records===0){ts.p.records=gl}}rowData=null;if(ts.p.treeGrid===true){try{self.jqGrid("setTreeNode",fpos+1,ir+fpos+1)}catch(e){}}ts.p.reccount=ir;ts.p.treeANode=-1;if(ts.p.userDataOnFooter){self.jqGrid("footerData","set",ts.p.userData,true)}if(locdata){ts.p.records=gl;ts.p.lastpage=Math.ceil(gl/rn)}if(!more){ts.updatepager(false,true)}if(locdata){while(ir1?rcnt:1}}else{return}var dReader,locid="_id_",frd,locdata=(ts.p.datatype!=="local"&&ts.p.loadonce)||ts.p.datatype==="jsonstring";if(locdata){ts.p.data=[];ts.p._index={};ts.p.localReader.id=locid}ts.p.reccount=0;if(ts.p.datatype==="local"){dReader=ts.p.localReader;frd="local"}else{dReader=ts.p.jsonReader;frd="json"}var self=$(ts),ir=0,v,i,j,f=[],cur,gi=ts.p.multiselect?1:0,si=ts.p.subGrid===true?1:0,addSubGridCell,ni=ts.p.rownumbers===true?1:0,arrayReader=orderedCols(gi+si+ni),objectReader=reader(frd),rowReader,len,drows,idn,rd={},fpos,idr,rowData=[],cn=(ts.p.altRows===true)?ts.p.altclass:"",cn1;ts.p.page=intNum($.jgrid.getAccessor(data,dReader.page),ts.p.page);ts.p.lastpage=intNum($.jgrid.getAccessor(data,dReader.total),1);ts.p.records=intNum($.jgrid.getAccessor(data,dReader.records));ts.p.userData=$.jgrid.getAccessor(data,dReader.userdata)||{};if(si){addSubGridCell=$.jgrid.getMethod("addSubGridCell")}if(ts.p.keyName===false){idn=$.isFunction(dReader.id)?dReader.id.call(ts,data):dReader.id}else{idn=ts.p.keyName}drows=$.jgrid.getAccessor(data,dReader.root);if(drows==null&&$.isArray(data)){drows=data}if(!drows){drows=[]}len=drows.length;i=0;if(len>0&&ts.p.page<=0){ts.p.page=1}var rn=parseInt(ts.p.rowNum,10),br=ts.p.scroll?$.jgrid.randId():1,altr,selected=false,selr;if(adjust){rn*=adjust+1}if(ts.p.datatype==="local"&&!ts.p.deselectAfterSort){selected=true}var afterInsRow=$.isFunction(ts.p.afterInsertRow),grpdata=[],hiderow=false,groupingPrepare;if(ts.p.grouping){hiderow=ts.p.groupingView.groupCollapse===true;groupingPrepare=$.jgrid.getMethod("groupingPrepare")}while(i");if(ts.p.grouping){grpdata.push(rowData);if(!ts.p.groupingView._locgr){groupingPrepare.call(self,rd,i)}rowData=[]}if(locdata||ts.p.treeGrid===true){rd[locid]=$.jgrid.stripPref(ts.p.idPrefix,idr);ts.p.data.push(rd);ts.p._index[rd[locid]]=ts.p.data.length-1}if(ts.p.gridview===false){$("#"+$.jgrid.jqID(ts.p.id)+" tbody:first").append(rowData.join(""));self.triggerHandler("jqGridAfterInsertRow",[idr,rd,cur]);if(afterInsRow){ts.p.afterInsertRow.call(ts,idr,rd,cur)}rowData=[]}rd={};ir++;i++;if(ir===rn){break}}if(ts.p.gridview===true){fpos=ts.p.treeANode>-1?ts.p.treeANode:0;if(ts.p.grouping){if(!locdata){self.jqGrid("groupingRender",grpdata,ts.p.colModel.length,ts.p.page,rn);grpdata=null}}else{if(ts.p.treeGrid===true&&fpos>0){$(ts.rows[fpos]).after(rowData.join(""))}else{ts.firstElementChild.innerHTML+=rowData.join("");ts.grid.cols=ts.rows[0].cells}}}if(ts.p.subGrid===true){try{self.jqGrid("addSubGrid",gi+ni)}catch(_){}}ts.p.totaltime=new Date()-startReq;if(ir>0){if(ts.p.records===0){ts.p.records=len}}rowData=null;if(ts.p.treeGrid===true){try{self.jqGrid("setTreeNode",fpos+1,ir+fpos+1)}catch(e){}}ts.p.reccount=ir;ts.p.treeANode=-1;if(ts.p.userDataOnFooter){self.jqGrid("footerData","set",ts.p.userData,true)}if(locdata){ts.p.records=len;ts.p.lastpage=Math.ceil(len/rn)}if(!more){ts.updatepager(false,true)}if(locdata){while(ir0&&gor){query.or()}try{tojLinq(group.groups[index])}catch(e){alert(e)}s++}if(gor){query.orEnd()}}if(group.rules!=null){try{ror=group.rules.length&&group.groupOp.toString().toUpperCase()==="OR";if(ror){query.orBegin()}for(index=0;index0&&opr&&opr==="OR"){query=query.or()}query=compareFnMap[rule.op](query,opr)(rule.field,rule.data,cmtypes[rule.field])}s++}if(ror){query.orEnd()}}catch(g){alert(g)}}}if(ts.p.search===true){var srules=ts.p.postData.filters;if(srules){if(typeof srules==="string"){srules=$.jgrid.parse(srules)}tojLinq(srules)}else{try{query=compareFnMap[ts.p.postData.searchOper](query)(ts.p.postData.searchField,ts.p.postData.searchString,cmtypes[ts.p.postData.searchField])}catch(se){}}}if(ts.p.grouping){for(gin=0;gin tr:gt(0)",ts.grid.bDiv);base=to-rows.length;ts.p.reccount=rows.length;var rh=rows.outerHeight()||ts.grid.prevRowHeight;if(rh){var top=base*rh;var height=parseInt(ts.p.records,10)*rh;$(">div:first",ts.grid.bDiv).css({height:height}).children("div:first").css({height:top,display:top?"":"none"});if(ts.grid.bDiv.scrollTop==0&&ts.p.page>1){ts.grid.bDiv.scrollTop=ts.p.rowNum*(ts.p.page-1)*rh}}ts.grid.bDiv.scrollLeft=ts.grid.hDiv.scrollLeft}pgboxes=ts.p.pager||"";pgboxes+=ts.p.toppager?(pgboxes?","+ts.p.toppager:ts.p.toppager):"";if(pgboxes){fmt=$.jgrid.formatter.integer||{};cp=intNum(ts.p.page);last=intNum(ts.p.lastpage);$(".selbox",pgboxes)[this.p.useProp?"prop":"attr"]("disabled",false);if(ts.p.pginput===true){$(".ui-pg-input",pgboxes).val(ts.p.page);sppg=ts.p.toppager?"#sp_1"+tspg+",#sp_1"+tspg_t:"#sp_1"+tspg;$(sppg).html($.fmatter?$.fmatter.util.NumberFormat(ts.p.lastpage,fmt):ts.p.lastpage)}if(ts.p.viewrecords){if(ts.p.reccount===0){$(".ui-paging-info",pgboxes).html(ts.p.emptyrecords)}else{from=base+1;tot=ts.p.records;if($.fmatter){from=$.fmatter.util.NumberFormat(from,fmt);to=$.fmatter.util.NumberFormat(to,fmt);tot=$.fmatter.util.NumberFormat(tot,fmt)}$(".ui-paging-info",pgboxes).html($.jgrid.format(ts.p.recordtext,from,to,tot))}}if(ts.p.pgbuttons===true){if(cp<=0){cp=last=0}if(cp===1||cp===0){$("#first"+tspg+", #prev"+tspg).addClass("ui-state-disabled").removeClass("ui-state-hover");if(ts.p.toppager){$("#first_t"+tspg_t+", #prev_t"+tspg_t).addClass("ui-state-disabled").removeClass("ui-state-hover")}}else{$("#first"+tspg+", #prev"+tspg).removeClass("ui-state-disabled");if(ts.p.toppager){$("#first_t"+tspg_t+", #prev_t"+tspg_t).removeClass("ui-state-disabled")}}if(cp===last||cp===0){$("#next"+tspg+", #last"+tspg).addClass("ui-state-disabled").removeClass("ui-state-hover");if(ts.p.toppager){$("#next_t"+tspg_t+", #last_t"+tspg_t).addClass("ui-state-disabled").removeClass("ui-state-hover")}}else{$("#next"+tspg+", #last"+tspg).removeClass("ui-state-disabled");if(ts.p.toppager){$("#next_t"+tspg_t+", #last_t"+tspg_t).removeClass("ui-state-disabled")}}}}if(rn===true&&ts.p.rownumbers===true){$(">td.jqgrid-rownum",ts.rows).each(function(i){$(this).html(base+1+i)})}if(dnd&&ts.p.jqgdnd){$(ts).jqGrid("gridDnD","updateDnD")}$(ts).triggerHandler("jqGridGridComplete");if($.isFunction(ts.p.gridComplete)){ts.p.gridComplete.call(ts)}$(ts).triggerHandler("jqGridAfterGridComplete")},beginReq=function(){ts.grid.hDiv.loading=true;if(ts.p.hiddengrid){return}$(ts).jqGrid("progressBar",{method:"show",loadtype:ts.p.loadui,htmlcontent:ts.p.loadtext})},endReq=function(){ts.grid.hDiv.loading=false;$(ts).jqGrid("progressBar",{method:"hide",loadtype:ts.p.loadui})},populate=function(npage){if(!ts.grid.hDiv.loading){var pvis=ts.p.scroll&&npage===false,prm={},dt,dstr,pN=ts.p.prmNames;if(ts.p.page<=0){ts.p.page=Math.min(1,ts.p.lastpage)}if(pN.search!==null){prm[pN.search]=ts.p.search}if(pN.nd!==null){prm[pN.nd]=new Date().getTime()}if(pN.rows!==null){prm[pN.rows]=ts.p.rowNum}if(pN.page!==null){prm[pN.page]=ts.p.page}if(pN.sort!==null){prm[pN.sort]=ts.p.sortname}if(pN.order!==null){prm[pN.order]=ts.p.sortorder}if(ts.p.rowTotal!==null&&pN.totalrows!==null){prm[pN.totalrows]=ts.p.rowTotal}var lcf=$.isFunction(ts.p.loadComplete),lc=lcf?ts.p.loadComplete:null;var adjust=0;npage=npage||1;if(npage>1){if(pN.npage!==null){prm[pN.npage]=npage;adjust=npage-1;npage=1}else{lc=function(req){ts.p.page++;ts.grid.hDiv.loading=false;if(lcf){ts.p.loadComplete.call(ts,req)}populate(npage-1)}}}else{if(pN.npage!==null){delete ts.p.postData[pN.npage]}}if(ts.p.grouping){$(ts).jqGrid("groupingSetup");var grp=ts.p.groupingView,gi,gs="";for(gi=0;gi1,adjust)}else{addJSONData(data,ts.grid.bDiv,rcnt,npage>1,adjust)}$(ts).triggerHandler("jqGridLoadComplete",[data]);if(lc){lc.call(ts,data)}$(ts).triggerHandler("jqGridAfterLoadComplete",[data]);if(pvis){ts.grid.populateVisible()}if(ts.p.loadonce||ts.p.treeGrid){ts.p.datatype="local"}data=null;if(npage===1){endReq()}},error:function(xhr,st,err){if($.isFunction(ts.p.loadError)){ts.p.loadError.call(ts,xhr,st,err)}if(npage===1){endReq()}xhr=null},beforeSend:function(xhr,settings){var gotoreq=true;if($.isFunction(ts.p.loadBeforeSend)){gotoreq=ts.p.loadBeforeSend.call(ts,xhr,settings)}if(gotoreq===undefined){gotoreq=true}if(gotoreq===false){return false}beginReq()}},$.jgrid.ajaxOptions,ts.p.ajaxGridOptions));break;case"xmlstring":beginReq();dstr=typeof ts.p.datastr!=="string"?ts.p.datastr:$.parseXML(ts.p.datastr);addXmlData(dstr,ts.grid.bDiv);$(ts).triggerHandler("jqGridLoadComplete",[dstr]);if(lcf){ts.p.loadComplete.call(ts,dstr)}$(ts).triggerHandler("jqGridAfterLoadComplete",[dstr]);ts.p.datatype="local";ts.p.datastr=null;endReq();break;case"jsonstring":beginReq();if(typeof ts.p.datastr==="string"){dstr=$.jgrid.parse(ts.p.datastr)}else{dstr=ts.p.datastr}addJSONData(dstr,ts.grid.bDiv);$(ts).triggerHandler("jqGridLoadComplete",[dstr]);if(lcf){ts.p.loadComplete.call(ts,dstr)}$(ts).triggerHandler("jqGridAfterLoadComplete",[dstr]);ts.p.datatype="local";ts.p.datastr=null;endReq();break;case"local":case"clientside":beginReq();ts.p.datatype="local";var req=addLocalData();addJSONData(req,ts.grid.bDiv,rcnt,npage>1,adjust);$(ts).triggerHandler("jqGridLoadComplete",[req]);if(lc){lc.call(ts,req)}$(ts).triggerHandler("jqGridAfterLoadComplete",[req]);if(pvis){ts.grid.populateVisible()}endReq();break}}},setHeadCheckBox=function(checked){$("#cb_"+$.jgrid.jqID(ts.p.id),ts.grid.hDiv)[ts.p.useProp?"prop":"attr"]("checked",checked);var fid=ts.p.frozenColumns?ts.p.id+"_frozen":"";if(fid){$("#cb_"+$.jgrid.jqID(ts.p.id),ts.grid.fhDiv)[ts.p.useProp?"prop":"attr"]("checked",checked)}},setPager=function(pgid,tp){var sep=" ",pginp="",pgl="",str="",pgcnt,lft,cent,rgt,twd,tdw,i,clearVals=function(onpaging){var ret;if($.isFunction(ts.p.onPaging)){ret=ts.p.onPaging.call(ts,onpaging)}if(ret==="stop"){return false}ts.p.selrow=null;if(ts.p.multiselect){ts.p.selarrrow=[];setHeadCheckBox(false)}ts.p.savedRow=[];return true};pgid=pgid.substr(1);tp+="_"+pgid;pgcnt="pg_"+pgid;lft=pgid+"_left";cent=pgid+"_center";rgt=pgid+"_right";$("#"+$.jgrid.jqID(pgid)).append("").attr("dir","ltr");if(ts.p.rowList.length>0){str="";str+="";var strnm;for(i=0;i"+strnm[1]+""}str+=" "}if(dir==="rtl"){pgl+=str}if(ts.p.pginput===true){pginp=""+$.jgrid.format(ts.p.pgtext||""," "," ")+" "}if(ts.p.pgbuttons===true){var po=["first"+tp,"prev"+tp,"next"+tp,"last"+tp];if(dir==="rtl"){po.reverse()}pgl+=" ";pgl+=" ";pgl+=pginp!==""?sep+pginp+sep:"";pgl+=" ";pgl+=" "}else{if(pginp!==""){pgl+=pginp}}if(dir==="ltr"){pgl+=str}pgl+="
";if(ts.p.viewrecords===true){$("td#"+pgid+"_"+ts.p.recordpos,"#"+pgcnt).append("
")}$("td#"+pgid+"_"+ts.p.pagerpos,"#"+pgcnt).append(pgl);tdw=$(".ui-jqgrid").css("font-size")||"11px";$(document.body).append("
");twd=$(pgl).clone().appendTo("#testpg").width();$("#testpg").remove();if(twd>0){if(pginp!==""){twd+=50}$("td#"+pgid+"_"+ts.p.pagerpos,"#"+pgcnt).width(twd)}ts.p._nvtd=[];ts.p._nvtd[0]=twd?Math.floor((ts.p.width-twd)/2):Math.floor(ts.p.width/3);ts.p._nvtd[1]=0;pgl=null;$(".ui-pg-selbox","#"+pgcnt).bind("change",function(){if(!clearVals("records")){return false}ts.p.page=Math.round(ts.p.rowNum*(ts.p.page-1)/this.value-0.5)+1;ts.p.rowNum=this.value;if(ts.p.pager){$(".ui-pg-selbox",ts.p.pager).val(this.value)}if(ts.p.toppager){$(".ui-pg-selbox",ts.p.toppager).val(this.value)}populate();return false});if(ts.p.pgbuttons===true){$(".ui-pg-button","#"+pgcnt).hover(function(){if($(this).hasClass("ui-state-disabled")){this.style.cursor="default"}else{$(this).addClass("ui-state-hover");this.style.cursor="pointer"}},function(){if(!$(this).hasClass("ui-state-disabled")){$(this).removeClass("ui-state-hover");this.style.cursor="default"}});$("#first"+$.jgrid.jqID(tp)+", #prev"+$.jgrid.jqID(tp)+", #next"+$.jgrid.jqID(tp)+", #last"+$.jgrid.jqID(tp)).click(function(){if($(this).hasClass("ui-state-disabled")){return false}var cp=intNum(ts.p.page,1),last=intNum(ts.p.lastpage,1),selclick=false,fp=true,pp=true,np=true,lp=true;if(last===0||last===1){fp=false;pp=false;np=false;lp=false}else{if(last>1&&cp>=1){if(cp===1){fp=false;pp=false}else{if(cp===last){np=false;lp=false}}}else{if(last>1&&cp===0){np=false;lp=false;cp=last-1}}}if(!clearVals(this.id)){return false}if(this.id==="first"+tp&&fp){ts.p.page=1;selclick=true}if(this.id==="prev"+tp&&pp){ts.p.page=(cp-1);selclick=true}if(this.id==="next"+tp&&np){ts.p.page=(cp+1);selclick=true}if(this.id==="last"+tp&&lp){ts.p.page=last;selclick=true}if(selclick){populate()}return false})}if(ts.p.pginput===true){$("input.ui-pg-input","#"+pgcnt).keypress(function(e){var key=e.charCode||e.keyCode||0;if(key===13){if(!clearVals("user")){return false}$(this).val(intNum($(this).val(),1));ts.p.page=($(this).val()>0)?$(this).val():ts.p.page;populate();return false}return this})}},multiSort=function(iCol,obj){var splas,sort="",cm=ts.p.colModel,fs=false,ls,selTh=ts.p.frozenColumns?obj:ts.grid.headers[iCol].el,so="";$("span.ui-grid-ico-sort",selTh).addClass("ui-state-disabled");$(selTh).attr("aria-selected","false");if(cm[iCol].lso){if(cm[iCol].lso==="asc"){cm[iCol].lso+="-desc";so="desc"}else{if(cm[iCol].lso==="desc"){cm[iCol].lso+="-asc";so="asc"}else{if(cm[iCol].lso==="asc-desc"||cm[iCol].lso==="desc-asc"){cm[iCol].lso=""}}}}else{cm[iCol].lso=so=cm[iCol].firstsortorder||"asc"}if(so){$("span.s-ico",selTh).show();$("span.ui-icon-"+so,selTh).removeClass("ui-state-disabled");$(selTh).attr("aria-selected","true")}else{if(!ts.p.viewsortcols[0]){$("span.s-ico",selTh).hide()}}ts.p.sortorder="";$.each(cm,function(i){if(this.lso){if(i>0&&fs){sort+=", "}splas=this.lso.split("-");sort+=cm[i].index||cm[i].name;sort+=" "+splas[splas.length-1];fs=true;ts.p.sortorder=splas[splas.length-1]}});ls=sort.lastIndexOf(ts.p.sortorder);sort=sort.substring(0,ls);ts.p.sortname=sort},sortData=function(index,idxcol,reload,sor,obj){if(!ts.p.colModel[idxcol].sortable){return}if(ts.p.savedRow.length>0){return}if(!reload){if(ts.p.lastsort===idxcol&&ts.p.sortname!==""){if(ts.p.sortorder==="asc"){ts.p.sortorder="desc"}else{if(ts.p.sortorder==="desc"){ts.p.sortorder="asc"}}}else{ts.p.sortorder=ts.p.colModel[idxcol].firstsortorder||"asc"}ts.p.page=1}if(ts.p.multiSort){multiSort(idxcol,obj)}else{if(sor){if(ts.p.lastsort===idxcol&&ts.p.sortorder===sor&&!reload){return}ts.p.sortorder=sor}var previousSelectedTh=ts.grid.headers[ts.p.lastsort].el,newSelectedTh=ts.p.frozenColumns?obj:ts.grid.headers[idxcol].el;$("span.ui-grid-ico-sort",previousSelectedTh).addClass("ui-state-disabled");$(previousSelectedTh).attr("aria-selected","false");if(ts.p.frozenColumns){ts.grid.fhDiv.find("span.ui-grid-ico-sort").addClass("ui-state-disabled");ts.grid.fhDiv.find("th").attr("aria-selected","false")}$("span.ui-icon-"+ts.p.sortorder,newSelectedTh).removeClass("ui-state-disabled");$(newSelectedTh).attr("aria-selected","true");if(!ts.p.viewsortcols[0]){if(ts.p.lastsort!==idxcol){if(ts.p.frozenColumns){ts.grid.fhDiv.find("span.s-ico").hide()}$("span.s-ico",previousSelectedTh).hide();$("span.s-ico",newSelectedTh).show()}else{if(ts.p.sortname===""){$("span.s-ico",newSelectedTh).show()}}}index=index.substring(5+ts.p.id.length+1);ts.p.sortname=ts.p.colModel[idxcol].index||index}if($(ts).triggerHandler("jqGridSortCol",[ts.p.sortname,idxcol,ts.p.sortorder])==="stop"){ts.p.lastsort=idxcol;return}if($.isFunction(ts.p.onSortCol)){if(ts.p.onSortCol.call(ts,ts.p.sortname,idxcol,ts.p.sortorder)==="stop"){ts.p.lastsort=idxcol;return}}if(ts.p.datatype==="local"){if(ts.p.deselectAfterSort){$(ts).jqGrid("resetSelection")}}else{ts.p.selrow=null;if(ts.p.multiselect){setHeadCheckBox(false)}ts.p.selarrrow=[];ts.p.savedRow=[]}if(ts.p.scroll){var sscroll=ts.grid.bDiv.scrollLeft;emptyRows.call(ts,true,false);ts.grid.hDiv.scrollLeft=sscroll}if(ts.p.subGrid&&ts.p.datatype==="local"){$("td.sgexpanded","#"+$.jgrid.jqID(ts.p.id)).each(function(){$(this).trigger("click")})}populate();ts.p.lastsort=idxcol;if(ts.p.sortname!==index&&idxcol){ts.p.lastsort=idxcol}},setColWidth=function(){var initwidth=0,brd=$.jgrid.cell_width?0:intNum(ts.p.cellLayout,0),vc=0,lvc,scw=intNum(ts.p.scrollOffset,0),cw,hs=false,aw,gw=0,cr;$.each(ts.p.colModel,function(){if(this.hidden===undefined){this.hidden=false}if(ts.p.grouping&&ts.p.autowidth){var ind=$.inArray(this.name,ts.p.groupingView.groupField);if(ind>=0&&ts.p.groupingView.groupColumnShow.length>ind){this.hidden=!ts.p.groupingView.groupColumnShow[ind]}}this.widthOrg=cw=intNum(this.width,0);if(this.hidden===false){initwidth+=cw+brd;if(this.fixed){gw+=cw+brd}else{vc++}}});if(isNaN(ts.p.width)){ts.p.width=initwidth+((ts.p.shrinkToFit===false&&!isNaN(ts.p.height))?scw:0)}grid.width=ts.p.width;ts.p.tblwidth=initwidth;if(ts.p.shrinkToFit===false&&ts.p.forceFit===true){ts.p.forceFit=false}if(ts.p.shrinkToFit===true&&vc>0){aw=grid.width-brd*vc-gw;if(!isNaN(ts.p.height)){aw-=scw;hs=true}initwidth=0;$.each(ts.p.colModel,function(i){if(this.hidden===false&&!this.fixed){cw=Math.round(aw*this.width/(ts.p.tblwidth-brd*vc-gw));this.width=cw;initwidth+=cw;lvc=i}});cr=0;if(hs){if(grid.width-gw-(initwidth+brd*vc)!==scw){cr=grid.width-gw-(initwidth+brd*vc)-scw}}else{if(!hs&&Math.abs(grid.width-gw-(initwidth+brd*vc))!==1){cr=grid.width-gw-(initwidth+brd*vc)}}ts.p.colModel[lvc].width+=cr;ts.p.tblwidth=initwidth+cr+brd*vc+gw;if(ts.p.tblwidth>ts.p.width){ts.p.colModel[lvc].width-=(ts.p.tblwidth-parseInt(ts.p.width,10));ts.p.tblwidth=ts.p.width}}},nextVisible=function(iCol){var ret=iCol,j=iCol,i;for(i=iCol+1;i ");this.p.colModel.unshift({name:"cb",width:$.jgrid.cell_width?ts.p.multiselectWidth+ts.p.cellLayout:ts.p.multiselectWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:"center",fixed:true})}if(this.p.rownumbers){this.p.colNames.unshift("");this.p.colModel.unshift({name:"rn",width:ts.p.rownumWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:"center",fixed:true})}ts.p.xmlReader=$.extend(true,{root:"rows",row:"row",page:"rows>page",total:"rows>total",records:"rows>records",repeatitems:true,cell:"cell",id:"[id]",userdata:"userdata",subgrid:{root:"rows",row:"row",repeatitems:true,cell:"cell"}},ts.p.xmlReader);ts.p.jsonReader=$.extend(true,{root:"rows",page:"page",total:"total",records:"records",repeatitems:true,cell:"cell",id:"id",userdata:"userdata",subgrid:{root:"rows",repeatitems:true,cell:"cell"}},ts.p.jsonReader);ts.p.localReader=$.extend(true,{root:"rows",page:"page",total:"total",records:"records",repeatitems:false,cell:"cell",id:"id",userdata:"userdata",subgrid:{root:"rows",repeatitems:true,cell:"cell"}},ts.p.localReader);if(ts.p.scroll){ts.p.pgbuttons=false;ts.p.pginput=false;ts.p.rowList=[]}if(ts.p.data.length){normalizeData();refreshIndex()}var thead="",tdc,idn,w,res,sort,td,ptr,tbody,imgs,iac="",idc="",sortarr=[],sortord=[],sotmp=[];if(ts.p.shrinkToFit===true&&ts.p.forceFit===true){for(i=ts.p.colModel.length-1;i>=0;i--){if(!ts.p.colModel[i].hidden){ts.p.colModel[i].resizable=false;break}}}if(ts.p.viewsortcols[1]==="horizontal"){iac=" ui-i-asc";idc=" ui-i-desc"}tdc=isMSIE?"class='ui-th-div-ie'":"";imgs=" ";imgs+=" ";if(ts.p.multiSort){sortarr=ts.p.sortname.split(",");for(i=0;i";idn=ts.p.colModel[i].index||ts.p.colModel[i].name;thead+=""+ts.p.colNames[i];if(!ts.p.colModel[i].width){ts.p.colModel[i].width=150}else{ts.p.colModel[i].width=parseInt(ts.p.colModel[i].width,10)}if(typeof ts.p.colModel[i].title!=="boolean"){ts.p.colModel[i].title=true}ts.p.colModel[i].lso="";if(idn===ts.p.sortname){ts.p.lastsort=i}if(ts.p.multiSort){sotmp=$.inArray(idn,sortarr);if(sotmp!==-1){ts.p.colModel[i].lso=sortord[sotmp]}}thead+=imgs+"
"}thead+=" ";imgs=null;$(this).append(thead);$("thead tr:first th",this).hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")});if(this.p.multiselect){var emp=[],chk;$("#cb_"+$.jgrid.jqID(ts.p.id),this).bind("click",function(){ts.p.selarrrow=[];var froz=ts.p.frozenColumns===true?ts.p.id+"_frozen":"";if(this.checked){$(ts.rows).each(function(i){if(i>0){if(!$(this).hasClass("ui-subgrid")&&!$(this).hasClass("jqgroup")&&!$(this).hasClass("ui-state-disabled")&&!$(this).hasClass("jqfoot")){$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id))[ts.p.useProp?"prop":"attr"]("checked",true);$(this).addClass("ui-state-highlight").attr("aria-selected","true");ts.p.selarrrow.push(this.id);ts.p.selrow=this.id;if(froz){$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id),ts.grid.fbDiv)[ts.p.useProp?"prop":"attr"]("checked",true);$("#"+$.jgrid.jqID(this.id),ts.grid.fbDiv).addClass("ui-state-highlight")}}}});chk=true;emp=[]}else{$(ts.rows).each(function(i){if(i>0){if(!$(this).hasClass("ui-subgrid")&&!$(this).hasClass("jqgroup")&&!$(this).hasClass("ui-state-disabled")&&!$(this).hasClass("jqfoot")){$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id))[ts.p.useProp?"prop":"attr"]("checked",false);$(this).removeClass("ui-state-highlight").attr("aria-selected","false");emp.push(this.id);if(froz){$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id),ts.grid.fbDiv)[ts.p.useProp?"prop":"attr"]("checked",false);$("#"+$.jgrid.jqID(this.id),ts.grid.fbDiv).removeClass("ui-state-highlight")}}}});ts.p.selrow=null;chk=false}$(ts).triggerHandler("jqGridSelectAll",[chk?ts.p.selarrrow:emp,chk]);if($.isFunction(ts.p.onSelectAll)){ts.p.onSelectAll.call(ts,chk?ts.p.selarrrow:emp,chk)}})}if(ts.p.autowidth===true){var pw=$(eg).innerWidth();ts.p.width=pw>0?pw:"nw"}setColWidth();$(eg).css("width",grid.width+"px").append("
");$(gv).css("width",grid.width+"px");thead=$("thead:first",ts).get(0);var tfoot="";if(ts.p.footerrow){tfoot+="";ts.p.disableClick=false;$("th",thr).each(function(j){w=ts.p.colModel[j].width;if(ts.p.colModel[j].resizable===undefined){ts.p.colModel[j].resizable=true}if(ts.p.colModel[j].resizable){res=document.createElement("span");$(res).html(" ").addClass("ui-jqgrid-resize ui-jqgrid-resize-"+dir).css("cursor","col-resize");$(this).addClass(ts.p.resizeclass)}else{res=""}$(this).css("width",w+"px").prepend(res);res=null;var hdcol="";if(ts.p.colModel[j].hidden){$(this).css("display","none");hdcol="display:none;"}firstr+=" ";grid.headers[j]={width:w,el:this};sort=ts.p.colModel[j].sortable;if(typeof sort!=="boolean"){ts.p.colModel[j].sortable=true;sort=true}var nm=ts.p.colModel[j].name;if(!(nm==="cb"||nm==="subgrid"||nm==="rn")){if(ts.p.viewsortcols[2]){$(">div",this).addClass("ui-jqgrid-sortable")}}if(sort){if(ts.p.multiSort){if(ts.p.viewsortcols[0]){$("div span.s-ico",this).show();if(ts.p.colModel[j].lso){$("div span.ui-icon-"+ts.p.colModel[j].lso,this).removeClass("ui-state-disabled")}}else{if(ts.p.colModel[j].lso){$("div span.s-ico",this).show();$("div span.ui-icon-"+ts.p.colModel[j].lso,this).removeClass("ui-state-disabled")}}}else{if(ts.p.viewsortcols[0]){$("div span.s-ico",this).show();if(j===ts.p.lastsort){$("div span.ui-icon-"+ts.p.sortorder,this).removeClass("ui-state-disabled")}}else{if(j===ts.p.lastsort&&ts.p.sortname!==""){$("div span.s-ico",this).show();$("div span.ui-icon-"+ts.p.sortorder,this).removeClass("ui-state-disabled")}}}}if(ts.p.footerrow){tfoot+=" "}}).mousedown(function(e){if($(e.target).closest("th>span.ui-jqgrid-resize").length!==1){return}var ci=getColumnHeaderIndex(this);if(ts.p.forceFit===true){ts.p.nv=nextVisible(ci)}grid.dragStart(ci,e,getOffset(ci));return false}).click(function(e){if(ts.p.disableClick){ts.p.disableClick=false;return false}var s="th>div.ui-jqgrid-sortable",r,d;if(!ts.p.viewsortcols[2]){s="th>div>span>span.ui-grid-ico-sort"}var t=$(e.target).closest(s);if(t.length!==1){return}var ci;if(ts.p.frozenColumns){var tid=$(this)[0].id.substring(ts.p.id.length+1);$(ts.p.colModel).each(function(i){if(this.name===tid){ci=i;return false}})}else{ci=getColumnHeaderIndex(this)}if(!ts.p.viewsortcols[2]){r=true;d=t.attr("sort")}if(ci!=null){sortData($("div",this)[0].id,ci,r,d,this)}return false});if(ts.p.sortable&&$.fn.sortable){try{$(ts).jqGrid("sortableColumns",thr)}catch(e){}}if(ts.p.footerrow){tfoot+="
"}firstr+="";tbody=document.createElement("tbody");this.appendChild(tbody);$(this).addClass("ui-jqgrid-btable").append(firstr);firstr=null;var hTable=$("").append(thead),hg=(ts.p.caption&&ts.p.hiddengrid===true)?true:false,hb=$("
");thead=null;grid.hDiv=document.createElement("div");$(grid.hDiv).css({width:grid.width+"px"}).addClass("ui-state-default ui-jqgrid-hdiv").append(hb);$(hb).append(hTable);hTable=null;if(hg){$(grid.hDiv).hide()}if(ts.p.pager){if(typeof ts.p.pager==="string"){if(ts.p.pager.substr(0,1)!=="#"){ts.p.pager="#"+ts.p.pager}}else{ts.p.pager="#"+$(ts.p.pager).attr("id")}$(ts.p.pager).css({width:grid.width+"px"}).addClass("ui-state-default ui-jqgrid-pager ui-corner-bottom").appendTo(eg);if(hg){$(ts.p.pager).hide()}setPager(ts.p.pager,"")}if(ts.p.cellEdit===false&&ts.p.hoverrows===true){$(ts).bind("mouseover",function(e){ptr=$(e.target).closest("tr.jqgrow");if($(ptr).attr("class")!=="ui-subgrid"){$(ptr).addClass("ui-state-hover")}}).bind("mouseout",function(e){ptr=$(e.target).closest("tr.jqgrow");$(ptr).removeClass("ui-state-hover")})}var ri,ci,tdHtml;$(ts).before(grid.hDiv).click(function(e){td=e.target;ptr=$(td,ts.rows).closest("tr.jqgrow");if($(ptr).length===0||ptr[0].className.indexOf("ui-state-disabled")>-1||($(td,ts).closest("table.ui-jqgrid-btable").attr("id")||"").replace("_frozen","")!==ts.id){return this}var scb=$(td).hasClass("cbox"),cSel=$(ts).triggerHandler("jqGridBeforeSelectRow",[ptr[0].id,e]);cSel=(cSel===false||cSel==="stop")?false:true;if($.isFunction(ts.p.beforeSelectRow)){var allowRowSelect=ts.p.beforeSelectRow.call(ts,ptr[0].id,e);if(allowRowSelect===false||allowRowSelect==="stop"){cSel=false}}if(td.tagName==="A"||((td.tagName==="INPUT"||td.tagName==="TEXTAREA"||td.tagName==="OPTION"||td.tagName==="SELECT")&&!scb)){return}ri=ptr[0].id;td=$(td).closest("tr.jqgrow>td");if(td.length>0){ci=$.jgrid.getCellIndex(td);tdHtml=$(td).closest("td,th").html();$(ts).triggerHandler("jqGridCellSelect",[ri,ci,tdHtml,e]);if($.isFunction(ts.p.onCellSelect)){ts.p.onCellSelect.call(ts,ri,ci,tdHtml,e)}}if(ts.p.cellEdit===true){if(ts.p.multiselect&&scb&&cSel){$(ts).jqGrid("setSelection",ri,true,e)}else{if(td.length>0){ri=ptr[0].rowIndex;try{$(ts).jqGrid("editCell",ri,ci,true)}catch(_){}}}}if(!cSel){return}if(!ts.p.multikey){if(ts.p.multiselect&&ts.p.multiboxonly){if(scb){$(ts).jqGrid("setSelection",ri,true,e)}else{var frz=ts.p.frozenColumns?ts.p.id+"_frozen":"";$(ts.p.selarrrow).each(function(i,n){var trid=$(ts).jqGrid("getGridRowById",n);if(trid){$(trid).removeClass("ui-state-highlight")}$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(n))[ts.p.useProp?"prop":"attr"]("checked",false);if(frz){$("#"+$.jgrid.jqID(n),"#"+$.jgrid.jqID(frz)).removeClass("ui-state-highlight");$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(n),"#"+$.jgrid.jqID(frz))[ts.p.useProp?"prop":"attr"]("checked",false)}});ts.p.selarrrow=[];$(ts).jqGrid("setSelection",ri,true,e)}}else{$(ts).jqGrid("setSelection",ri,true,e)}}else{if(e[ts.p.multikey]){$(ts).jqGrid("setSelection",ri,true,e)}else{if(ts.p.multiselect&&scb){scb=$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+ri).is(":checked");$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+ri)[ts.p.useProp?"prop":"attr"]("checked",scb)}}}}).bind("reloadGrid",function(e,opts){if(ts.p.treeGrid===true){ts.p.datatype=ts.p.treedatatype}if(opts&&opts.current){ts.grid.selectionPreserver(ts)}if(ts.p.datatype==="local"){$(ts).jqGrid("resetSelection");if(ts.p.data.length){normalizeData();refreshIndex()}}else{if(!ts.p.treeGrid){ts.p.selrow=null;if(ts.p.multiselect){ts.p.selarrrow=[];setHeadCheckBox(false)}ts.p.savedRow=[]}}if(ts.p.scroll){emptyRows.call(ts,true,false)}if(opts&&opts.page){var page=opts.page;if(page>ts.p.lastpage){page=ts.p.lastpage}if(page<1){page=1}ts.p.page=page;if(ts.grid.prevRowHeight){ts.grid.bDiv.scrollTop=(page-1)*ts.grid.prevRowHeight*ts.p.rowNum}else{ts.grid.bDiv.scrollTop=0}}if(ts.grid.prevRowHeight&&ts.p.scroll){delete ts.p.lastpage;ts.grid.populateVisible()}else{ts.grid.populate()}if(ts.p._inlinenav===true){$(ts).jqGrid("showAddEditButtons")}return false}).dblclick(function(e){td=e.target;ptr=$(td,ts.rows).closest("tr.jqgrow");if($(ptr).length===0){return}ri=ptr[0].rowIndex;ci=$.jgrid.getCellIndex(td);var dbcr=$(ts).triggerHandler("jqGridDblClickRow",[$(ptr).attr("id"),ri,ci,e]);if(dbcr!=null){return dbcr}if($.isFunction(ts.p.ondblClickRow)){dbcr=ts.p.ondblClickRow.call(ts,$(ptr).attr("id"),ri,ci,e);if(dbcr!=null){return dbcr}}}).bind("contextmenu",function(e){td=e.target;ptr=$(td,ts.rows).closest("tr.jqgrow");if($(ptr).length===0){return}if(!ts.p.multiselect){$(ts).jqGrid("setSelection",ptr[0].id,true,e)}ri=ptr[0].rowIndex;ci=$.jgrid.getCellIndex(td);var rcr=$(ts).triggerHandler("jqGridRightClickRow",[$(ptr).attr("id"),ri,ci,e]);if(rcr!=null){return rcr}if($.isFunction(ts.p.onRightClickRow)){rcr=ts.p.onRightClickRow.call(ts,$(ptr).attr("id"),ri,ci,e);if(rcr!=null){return rcr}}});grid.bDiv=document.createElement("div");if(isMSIE){if(String(ts.p.height).toLowerCase()==="auto"){ts.p.height="100%"}}$(grid.bDiv).append($('
').append("
").append(this)).addClass("ui-jqgrid-bdiv").css({height:ts.p.height+(isNaN(ts.p.height)?"":"px"),width:(grid.width)+"px"}).scroll(grid.scrollGrid);$("table:first",grid.bDiv).css({width:ts.p.tblwidth+"px"});if(!$.support.tbody){if($("tbody",this).length===2){$("tbody:gt(0)",this).remove()}}if(ts.p.multikey){if($.jgrid.msie){$(grid.bDiv).bind("selectstart",function(){return false})}else{$(grid.bDiv).bind("mousedown",function(){return false})}}if(hg){$(grid.bDiv).hide()}grid.cDiv=document.createElement("div");var arf=ts.p.hidegrid===true?$("").hover(function(){arf.addClass("ui-state-hover")},function(){arf.removeClass("ui-state-hover")}).append(" ").css((dir==="rtl"?"left":"right"),"0px"):"";$(grid.cDiv).append(arf).append(""+ts.p.caption+" ").addClass("ui-jqgrid-titlebar ui-jqgrid-caption"+(dir==="rtl"?"-rtl":"")+" ui-widget-header ui-corner-top ui-helper-clearfix");$(grid.cDiv).insertBefore(grid.hDiv);if(ts.p.toolbar[0]){grid.uDiv=document.createElement("div");if(ts.p.toolbar[1]==="top"){$(grid.uDiv).insertBefore(grid.hDiv)}else{if(ts.p.toolbar[1]==="bottom"){$(grid.uDiv).insertAfter(grid.hDiv)}}if(ts.p.toolbar[1]==="both"){grid.ubDiv=document.createElement("div");$(grid.uDiv).addClass("ui-userdata ui-state-default").attr("id","t_"+this.id).insertBefore(grid.hDiv);$(grid.ubDiv).addClass("ui-userdata ui-state-default").attr("id","tb_"+this.id).insertAfter(grid.hDiv);if(hg){$(grid.ubDiv).hide()}}else{$(grid.uDiv).width(grid.width).addClass("ui-userdata ui-state-default").attr("id","t_"+this.id)}if(hg){$(grid.uDiv).hide()}}if(ts.p.toppager){ts.p.toppager=$.jgrid.jqID(ts.p.id)+"_toppager";grid.topDiv=$("")[0];ts.p.toppager="#"+ts.p.toppager;$(grid.topDiv).addClass("ui-state-default ui-jqgrid-toppager").width(grid.width).insertBefore(grid.hDiv);setPager(ts.p.toppager,"_t")}if(ts.p.footerrow){grid.sDiv=$("
")[0];hb=$("
");$(grid.sDiv).append(hb).width(grid.width).insertAfter(grid.hDiv);$(hb).append(tfoot);grid.footers=$(".ui-jqgrid-ftable",grid.sDiv)[0].rows[0].cells;if(ts.p.rownumbers){grid.footers[0].className="ui-state-default jqgrid-rownum"}if(hg){$(grid.sDiv).hide()}}hb=null;if(ts.p.caption){var tdt=ts.p.datatype;if(ts.p.hidegrid===true){$(".ui-jqgrid-titlebar-close",grid.cDiv).click(function(e){var onHdCl=$.isFunction(ts.p.onHeaderClick),elems=".ui-jqgrid-bdiv, .ui-jqgrid-hdiv, .ui-jqgrid-pager, .ui-jqgrid-sdiv",counter,self=this;if(ts.p.toolbar[0]===true){if(ts.p.toolbar[1]==="both"){elems+=", #"+$(grid.ubDiv).attr("id")}elems+=", #"+$(grid.uDiv).attr("id")}counter=$(elems,"#gview_"+$.jgrid.jqID(ts.p.id)).length;if(ts.p.gridstate==="visible"){$(elems,"#gbox_"+$.jgrid.jqID(ts.p.id)).slideUp("fast",function(){counter--;if(counter===0){$("span",self).removeClass("ui-icon-circle-triangle-n").addClass("ui-icon-circle-triangle-s");ts.p.gridstate="hidden";if($("#gbox_"+$.jgrid.jqID(ts.p.id)).hasClass("ui-resizable")){$(".ui-resizable-handle","#gbox_"+$.jgrid.jqID(ts.p.id)).hide()}$(ts).triggerHandler("jqGridHeaderClick",[ts.p.gridstate,e]);if(onHdCl){if(!hg){ts.p.onHeaderClick.call(ts,ts.p.gridstate,e)}}}})}else{if(ts.p.gridstate==="hidden"){$(elems,"#gbox_"+$.jgrid.jqID(ts.p.id)).slideDown("fast",function(){counter--;if(counter===0){$("span",self).removeClass("ui-icon-circle-triangle-s").addClass("ui-icon-circle-triangle-n");if(hg){ts.p.datatype=tdt;populate();hg=false}ts.p.gridstate="visible";if($("#gbox_"+$.jgrid.jqID(ts.p.id)).hasClass("ui-resizable")){$(".ui-resizable-handle","#gbox_"+$.jgrid.jqID(ts.p.id)).show()}$(ts).triggerHandler("jqGridHeaderClick",[ts.p.gridstate,e]);if(onHdCl){if(!hg){ts.p.onHeaderClick.call(ts,ts.p.gridstate,e)}}}})}}return false});if(hg){ts.p.datatype="local";$(".ui-jqgrid-titlebar-close",grid.cDiv).trigger("click")}}}else{$(grid.cDiv).hide();if(!ts.p.toppager){$(grid.hDiv).addClass("ui-corner-top")}}$(grid.hDiv).after(grid.bDiv).mousemove(function(e){if(grid.resizing){grid.dragMove(e);return false}});$(".ui-jqgrid-labels",grid.hDiv).bind("selectstart",function(){return false});$(document).bind("mouseup.jqGrid"+ts.p.id,function(){if(grid.resizing){grid.dragEnd();return false}return true});ts.formatCol=formatCol;ts.sortData=sortData;ts.updatepager=updatepager;ts.refreshIndex=refreshIndex;ts.setHeadCheckBox=setHeadCheckBox;ts.constructTr=constructTr;ts.formatter=function(rowId,cellval,colpos,rwdat,act){return formatter(rowId,cellval,colpos,rwdat,act)};$.extend(grid,{populate:populate,emptyRows:emptyRows,beginReq:beginReq,endReq:endReq});this.grid=grid;ts.addXmlData=function(d){addXmlData(d,ts.grid.bDiv)};ts.addJSONData=function(d){addJSONData(d,ts.grid.bDiv)};this.grid.cols=this.rows[0].cells;$(ts).triggerHandler("jqGridInitGrid");if($.isFunction(ts.p.onInitGrid)){ts.p.onInitGrid.call(ts)}populate();ts.p.hiddengrid=false})};$.jgrid.extend({getGridParam:function(pName){var $t=this[0];if(!$t||!$t.grid){return}if(!pName){return $t.p}return $t.p[pName]!==undefined?$t.p[pName]:null},setGridParam:function(newParams,overwrite){return this.each(function(){if(overwrite==null){overwrite=false}if(this.grid&&typeof newParams==="object"){if(overwrite===true){var params=$.extend({},this.p,newParams);this.p=params}else{$.extend(true,this.p,newParams)}}})},getGridRowById:function(rowid){var row;this.each(function(){try{var i=this.rows.length;while(i--){if(rowid.toString()===this.rows[i].id){row=this.rows[i];break}}}catch(e){row=$(this.grid.bDiv).find("#"+$.jgrid.jqID(rowid))}});return row},getDataIDs:function(){var ids=[],i=0,len,j=0;this.each(function(){len=this.rows.length;if(len&&len>0){while(i-1){return}function scrGrid(iR){var ch=$($t.grid.bDiv)[0].clientHeight,st=$($t.grid.bDiv)[0].scrollTop,rpos=$($t.rows[iR]).position().top,rh=$t.rows[iR].clientHeight;if(rpos+rh>=ch+st){$($t.grid.bDiv)[0].scrollTop=rpos-(ch+st)+rh+st}else{if(rpos=0){scrGrid(ner)}}if($t.p.frozenColumns===true){fid=$t.p.id+"_frozen"}if(!$t.p.multiselect){if(pt.className!=="ui-subgrid"){if($t.p.selrow!==pt.id){csr=$($t).jqGrid("getGridRowById",$t.p.selrow);if(csr){$(csr).removeClass("ui-state-highlight").attr({"aria-selected":"false",tabindex:"-1"})}$(pt).addClass("ui-state-highlight").attr({"aria-selected":"true",tabindex:"0"});if(fid){$("#"+$.jgrid.jqID($t.p.selrow),"#"+$.jgrid.jqID(fid)).removeClass("ui-state-highlight");$("#"+$.jgrid.jqID(selection),"#"+$.jgrid.jqID(fid)).addClass("ui-state-highlight")}stat=true}else{stat=false}$t.p.selrow=pt.id;if(onsr){$($t).triggerHandler("jqGridSelectRow",[pt.id,stat,e]);if($t.p.onSelectRow){$t.p.onSelectRow.call($t,pt.id,stat,e)}}}}else{$t.setHeadCheckBox(false);$t.p.selrow=pt.id;ia=$.inArray($t.p.selrow,$t.p.selarrrow);if(ia===-1){if(pt.className!=="ui-subgrid"){$(pt).addClass("ui-state-highlight").attr("aria-selected","true")}stat=true;$t.p.selarrrow.push($t.p.selrow)}else{if(pt.className!=="ui-subgrid"){$(pt).removeClass("ui-state-highlight").attr("aria-selected","false")}stat=false;$t.p.selarrrow.splice(ia,1);tpsr=$t.p.selarrrow[0];$t.p.selrow=(tpsr===undefined)?null:tpsr}$("#jqg_"+$.jgrid.jqID($t.p.id)+"_"+$.jgrid.jqID(pt.id))[$t.p.useProp?"prop":"attr"]("checked",stat);if(fid){if(ia===-1){$("#"+$.jgrid.jqID(selection),"#"+$.jgrid.jqID(fid)).addClass("ui-state-highlight")}else{$("#"+$.jgrid.jqID(selection),"#"+$.jgrid.jqID(fid)).removeClass("ui-state-highlight")}$("#jqg_"+$.jgrid.jqID($t.p.id)+"_"+$.jgrid.jqID(selection),"#"+$.jgrid.jqID(fid))[$t.p.useProp?"prop":"attr"]("checked",stat)}if(onsr){$($t).triggerHandler("jqGridSelectRow",[pt.id,stat,e]);if($t.p.onSelectRow){$t.p.onSelectRow.call($t,pt.id,stat,e)}}}})},resetSelection:function(rowid){return this.each(function(){var t=this,sr,fid;if(t.p.frozenColumns===true){fid=t.p.id+"_frozen"}if(rowid!==undefined){sr=rowid===t.p.selrow?t.p.selrow:rowid;$("#"+$.jgrid.jqID(t.p.id)+" tbody:first tr#"+$.jgrid.jqID(sr)).removeClass("ui-state-highlight").attr("aria-selected","false");if(fid){$("#"+$.jgrid.jqID(sr),"#"+$.jgrid.jqID(fid)).removeClass("ui-state-highlight")}if(t.p.multiselect){$("#jqg_"+$.jgrid.jqID(t.p.id)+"_"+$.jgrid.jqID(sr),"#"+$.jgrid.jqID(t.p.id))[t.p.useProp?"prop":"attr"]("checked",false);if(fid){$("#jqg_"+$.jgrid.jqID(t.p.id)+"_"+$.jgrid.jqID(sr),"#"+$.jgrid.jqID(fid))[t.p.useProp?"prop":"attr"]("checked",false)}t.setHeadCheckBox(false);var ia=$.inArray($.jgrid.jqID(sr),t.p.selarrrow);if(ia!==-1){t.p.selarrrow.splice(ia,1)}}sr=null}else{if(!t.p.multiselect){if(t.p.selrow){$("#"+$.jgrid.jqID(t.p.id)+" tbody:first tr#"+$.jgrid.jqID(t.p.selrow)).removeClass("ui-state-highlight").attr("aria-selected","false");if(fid){$("#"+$.jgrid.jqID(t.p.selrow),"#"+$.jgrid.jqID(fid)).removeClass("ui-state-highlight")}t.p.selrow=null}}else{$(t.p.selarrrow).each(function(i,n){$($(t).jqGrid("getGridRowById",n)).removeClass("ui-state-highlight").attr("aria-selected","false");$("#jqg_"+$.jgrid.jqID(t.p.id)+"_"+$.jgrid.jqID(n))[t.p.useProp?"prop":"attr"]("checked",false);if(fid){$("#"+$.jgrid.jqID(n),"#"+$.jgrid.jqID(fid)).removeClass("ui-state-highlight");$("#jqg_"+$.jgrid.jqID(t.p.id)+"_"+$.jgrid.jqID(n),"#"+$.jgrid.jqID(fid))[t.p.useProp?"prop":"attr"]("checked",false)}});t.setHeadCheckBox(false);t.p.selarrrow=[];t.p.selrow=null}}if(t.p.cellEdit===true){if(parseInt(t.p.iCol,10)>=0&&parseInt(t.p.iRow,10)>=0){$("td:eq("+t.p.iCol+")",t.rows[t.p.iRow]).removeClass("edit-cell ui-state-highlight");$(t.rows[t.p.iRow]).removeClass("selected-row ui-state-hover")}}t.p.savedRow=[]})},getRowData:function(rowid){var res={},resall,getall=false,len,j=0;this.each(function(){var $t=this,nm,ind;if(rowid===undefined){getall=true;resall=[];len=$t.rows.length}else{ind=$($t).jqGrid("getGridRowById",rowid);if(!ind){return res}len=2}while(j0){$t.p.selrow=$t.p.selarrrow[$t.p.selarrrow.length-1]}else{$t.p.selrow=null}if($t.p.datatype==="local"){var id=$.jgrid.stripPref($t.p.idPrefix,rowid),pos=$t.p._index[id];if(pos!==undefined){$t.p.data.splice(pos,1);$t.refreshIndex()}}if($t.p.altRows===true&&success){var cn=$t.p.altclass;$($t.rows).each(function(i){if(i%2===1){$(this).addClass(cn)}else{$(this).removeClass(cn)}})}});return success},setRowData:function(rowid,data,cssp){var nm,success=true,title;this.each(function(){if(!this.grid){return false}var t=this,vl,ind,cp=typeof cssp,lcdata={};ind=$(this).jqGrid("getGridRowById",rowid);if(!ind){return false}if(data){try{$(this.p.colModel).each(function(i){nm=this.name;var dval=$.jgrid.getAccessor(data,nm);if(dval!==undefined){lcdata[nm]=this.formatter&&typeof this.formatter==="string"&&this.formatter==="date"?$.unformat.date.call(t,dval,this):dval;vl=t.formatter(rowid,lcdata[nm],i,data,"edit");title=this.title?{title:$.jgrid.stripHtml(vl)}:{};if(t.p.treeGrid===true&&nm===t.p.ExpandColumn){$("td[role='gridcell']:eq("+i+") > span:first",ind).html(vl).attr(title)}else{$("td[role='gridcell']:eq("+i+")",ind).html(vl).attr(title)}}});if(t.p.datatype==="local"){var id=$.jgrid.stripPref(t.p.idPrefix,rowid),pos=t.p._index[id],key;if(t.p.treeGrid){for(key in t.p.treeReader){if(t.p.treeReader.hasOwnProperty(key)){delete lcdata[t.p.treeReader[key]]}}}if(pos!==undefined){t.p.data[pos]=$.extend(true,t.p.data[pos],lcdata)}lcdata=null}}catch(e){success=false}}if(success){if(cp==="string"){$(ind).addClass(cssp)}else{if(cssp!==null&&cp==="object"){$(ind).css(cssp)}}$(t).triggerHandler("jqGridAfterGridComplete")}});return success},addRowData:function(rowid,rdata,pos,src){if(["first","last","before","after"].indexOf(pos)==-1){pos="last"}var success=false,nm,row,gi,si,ni,sind,i,v,prp="",aradd,cnm,cn,data,cm,id;if(rdata){if($.isArray(rdata)){aradd=true;cnm=rowid}else{rdata=[rdata];aradd=false}this.each(function(){var t=this,datalen=rdata.length;ni=t.p.rownumbers===true?1:0;gi=t.p.multiselect===true?1:0;si=t.p.subGrid===true?1:0;if(!aradd){if(rowid!==undefined){rowid=String(rowid)}else{rowid=$.jgrid.randId();if(t.p.keyName!==false){cnm=t.p.keyName;if(rdata[0][cnm]!==undefined){rowid=rdata[0][cnm]}}}}cn=t.p.altclass;var k=0,cna="",lcdata={},air=$.isFunction(t.p.afterInsertRow)?true:false;while(k0"}if(gi){v=' ';prp=t.formatCol(ni,1,"",null,rowid,true);row[row.length]='"+v+" "}if(si){row[row.length]=$(t).jqGrid("addSubGridCell",gi+ni,1)}for(i=gi+si+ni;i"+v+""}row.unshift(t.constructTr(rowid,false,cna,lcdata,data,false));row[row.length]="";if(t.rows.length===0){$("table:first",t.grid.bDiv).append(row.join(""))}else{switch(pos){case"last":$(t.rows[t.rows.length-1]).after(row.join(""));sind=t.rows.length-1;break;case"first":$(t.rows[0]).after(row.join(""));sind=1;break;case"after":sind=$(t).jqGrid("getGridRowById",src);if(sind){if($(t.rows[sind.rowIndex+1]).hasClass("ui-subgrid")){$(t.rows[sind.rowIndex+1]).after(row)}else{$(sind).after(row.join(""))}sind=sind.rowIndex+1}break;case"before":sind=$(t).jqGrid("getGridRowById",src);if(sind){$(sind).before(row.join(""));sind=sind.rowIndex-1}break}}if(t.p.subGrid===true){$(t).jqGrid("addSubGrid",gi+ni,sind)}t.p.records++;t.p.reccount++;$(t).triggerHandler("jqGridAfterInsertRow",[rowid,data,data]);if(air){t.p.afterInsertRow.call(t,rowid,data,data)}k++;if(t.p.datatype==="local"){lcdata[t.p.localReader.id]=id;t.p._index[id]=t.p.data.length;t.p.data.push(lcdata);lcdata={}}}if(t.p.altRows===true&&!aradd){if(pos==="last"){if((t.rows.length-1)%2===1){$(t.rows[t.rows.length-1]).addClass(cn)}}else{$(t.rows).each(function(i){if(i%2===1){$(this).addClass(cn)}else{$(this).removeClass(cn)}})}}t.updatepager(true,true);success=true})}return success},footerData:function(action,data,format){var nm,success=false,res={},title;function isEmpty(obj){var i;for(i in obj){if(obj.hasOwnProperty(i)){return false}}return true}if(action==undefined){action="get"}if(typeof format!=="boolean"){format=true}action=action.toLowerCase();this.each(function(){var t=this,vl;if(!t.grid||!t.p.footerrow){return false}if(action==="set"){if(isEmpty(data)){return false}}success=true;$(this.p.colModel).each(function(i){nm=this.name;if(action==="set"){if(data[nm]!==undefined){vl=format?t.formatter("",data[nm],i,data,"edit"):data[nm];title=this.title?{title:$.jgrid.stripHtml(vl)}:{};$("tr.footrow td:eq("+i+")",t.grid.sDiv).html(vl).attr(title);success=true}}else{if(action==="get"){res[nm]=$("tr.footrow td:eq("+i+")",t.grid.sDiv).html()}}})});return action==="get"?res:success},showHideCol:function(colname,show){return this.each(function(){var $t=this,fndh=false,brd=$.jgrid.cell_width?0:$t.p.cellLayout,cw;if(!$t.grid){return}if(typeof colname==="string"){colname=[colname]}show=show!=="none"?"":"none";var sw=show===""?true:false,gh=$t.p.groupHeader&&(typeof $t.p.groupHeader==="object"||$.isFunction($t.p.groupHeader));if(gh){$($t).jqGrid("destroyGroupHeader",false)}$(this.p.colModel).each(function(i){if($.inArray(this.name,colname)!==-1&&this.hidden===sw){if($t.p.frozenColumns===true&&this.frozen===true){return true}$("tr[role=row]",$t.grid.hDiv).each(function(){$(this.cells[i]).css("display",show)});$($t.rows).each(function(){if(!$(this).hasClass("jqgroup")){$(this.cells[i]).css("display",show)}});if($t.p.footerrow){$("tr.footrow td:eq("+i+")",$t.grid.sDiv).css("display",show)}cw=parseInt(this.width,10);if(show==="none"){$t.p.tblwidth-=cw+brd}else{$t.p.tblwidth+=cw+brd}this.hidden=!sw;fndh=true;$($t).triggerHandler("jqGridShowHideCol",[sw,this.name,i])}});if(fndh===true){if($t.p.shrinkToFit===true&&!isNaN($t.p.height)){$t.p.tblwidth+=parseInt($t.p.scrollOffset,10)}$($t).jqGrid("setGridWidth",$t.p.shrinkToFit===true?$t.p.tblwidth:$t.p.width)}if(gh){$($t).jqGrid("setGroupHeaders",$t.p.groupHeader)}})},hideCol:function(colname){return this.each(function(){$(this).jqGrid("showHideCol",colname,"none")})},showCol:function(colname){return this.each(function(){$(this).jqGrid("showHideCol",colname,"")})},remapColumns:function(permutation,updateCells,keepHeader){function resortArray(a){var ac;if(a.length){ac=$.makeArray(a)}else{ac=$.extend({},a)}$.each(permutation,function(i){a[i]=ac[this]})}var ts=this.get(0);function resortRows(parent,clobj){$(">tr"+(clobj||""),parent).each(function(){var row=this;var elems=$.makeArray(row.cells);$.each(permutation,function(){var e=elems[this];if(e){row.appendChild(e)}})})}resortArray(ts.p.colModel);resortArray(ts.p.colNames);resortArray(ts.grid.headers);resortRows($("thead:first",ts.grid.hDiv),keepHeader&&":not(.ui-jqgrid-labels)");if(updateCells){resortRows($("#"+$.jgrid.jqID(ts.p.id)+" tbody:first"),".jqgfirstrow, tr.jqgrow, tr.jqfoot")}if(ts.p.footerrow){resortRows($("tbody:first",ts.grid.sDiv))}if(ts.p.remapColumns){if(!ts.p.remapColumns.length){ts.p.remapColumns=$.makeArray(permutation)}else{resortArray(ts.p.remapColumns)}}ts.p.lastsort=$.inArray(ts.p.lastsort,permutation);if(ts.p.treeGrid){ts.p.expColInd=$.inArray(ts.p.expColInd,permutation)}$(ts).triggerHandler("jqGridRemapColumns",[permutation,updateCells,keepHeader])},setGridWidth:function(nwidth,shrink){return this.each(function(){if(!this.grid){return}var $t=this,cw,initwidth=0,brd=$.jgrid.cell_width?0:$t.p.cellLayout,lvc,vc=0,hs=false,scw=$t.p.scrollOffset,aw,gw=0,cr;if(typeof shrink!=="boolean"){shrink=$t.p.shrinkToFit}if(isNaN(nwidth)){return}nwidth=parseInt(nwidth,10);$t.grid.width=$t.p.width=nwidth;$("#gbox_"+$.jgrid.jqID($t.p.id)).css("width",nwidth+"px");$("#gview_"+$.jgrid.jqID($t.p.id)).css("width",nwidth+"px");$($t.grid.bDiv).css("width",nwidth+1+"px");$($t.grid.hDiv).css("width",nwidth+1+"px");if($t.p.pager){$($t.p.pager).css("width",nwidth+"px")}if($t.p.toppager){$($t.p.toppager).css("width",nwidth+"px")}if($t.p.toolbar[0]===true){$($t.grid.uDiv).css("width",nwidth+"px");if($t.p.toolbar[1]==="both"){$($t.grid.ubDiv).css("width",nwidth+"px")}}if($t.p.footerrow){$($t.grid.sDiv).css("width",nwidth+"px")}if(shrink===false&&$t.p.forceFit===true){$t.p.forceFit=false}if(shrink===true){$.each($t.p.colModel,function(){if(this.hidden===false){cw=this.widthOrg;initwidth+=cw+brd;if(this.fixed){gw+=cw+brd}else{vc++}}});if(vc===0){return}$t.p.tblwidth=initwidth;aw=nwidth-brd*vc-gw;if(!isNaN($t.p.height)){if($($t.grid.bDiv)[0].clientHeight<$($t.grid.bDiv)[0].scrollHeight||$t.rows.length===1){hs=true;aw-=scw}}initwidth=0;var cle=$t.grid.cols.length>0;$.each($t.p.colModel,function(i){if(this.hidden===false&&!this.fixed){cw=this.widthOrg;cw=Math.round(aw*cw/($t.p.tblwidth-brd*vc-gw));if(cw<0){return}this.width=cw;initwidth+=cw;$t.grid.headers[i].width=cw;$t.grid.headers[i].el.style.width=cw+"px";if($t.p.footerrow){$t.grid.footers[i].style.width=cw+"px"}if(cle){$t.grid.cols[i].style.width=cw+"px"}lvc=i}});if(!lvc){return}cr=0;if(hs){if(nwidth-gw-(initwidth+brd*vc)!==scw){cr=nwidth-gw-(initwidth+brd*vc)-scw}}else{if(Math.abs(nwidth-gw-(initwidth+brd*vc))!==1){cr=nwidth-gw-(initwidth+brd*vc)}}$t.p.colModel[lvc].width+=cr;$t.p.tblwidth=initwidth+cr+brd*vc+gw;if($t.p.tblwidth>nwidth){var delta=$t.p.tblwidth-parseInt(nwidth,10);$t.p.tblwidth=nwidth;cw=$t.p.colModel[lvc].width=$t.p.colModel[lvc].width-delta}else{cw=$t.p.colModel[lvc].width}$t.grid.headers[lvc].width=cw;$t.grid.headers[lvc].el.style.width=cw+"px";if(cle){$t.grid.cols[lvc].style.width=cw+"px"}if($t.p.footerrow){$t.grid.footers[lvc].style.width=cw+"px"}}if($t.p.tblwidth){$("table:first",$t.grid.bDiv).css("width",$t.p.tblwidth+"px");$("table:first",$t.grid.hDiv).css("width",$t.p.tblwidth+"px");$t.grid.hDiv.scrollLeft=$t.grid.bDiv.scrollLeft;if($t.p.footerrow){$("table:first",$t.grid.sDiv).css("width",$t.p.tblwidth+"px")}}})},setGridHeight:function(nh){return this.each(function(){var $t=this;if(!$t.grid){return}var bDiv=$($t.grid.bDiv);bDiv.css({height:nh+(isNaN(nh)?"":"px")});if($t.p.frozenColumns===true){$("#"+$.jgrid.jqID($t.p.id)+"_frozen").parent().height(bDiv.height()-16)}$t.p.height=nh;if($t.p.scroll){$t.grid.populateVisible()}})},setCaption:function(newcap){return this.each(function(){this.p.caption=newcap;$("span.ui-jqgrid-title, span.ui-jqgrid-title-rtl",this.grid.cDiv).html(newcap);$(this.grid.cDiv).show();$(this.grid.hDiv).removeClass("ui-corner-top")})},setLabel:function(colname,nData,prop,attrp){return this.each(function(){var $t=this,pos=-1;if(!$t.grid){return}if(colname!==undefined){$($t.p.colModel).each(function(i){if(this.name===colname){pos=i;return false}})}else{return}if(pos>=0){var thecol=$("tr.ui-jqgrid-labels th:eq("+pos+")",$t.grid.hDiv);if(nData){var ico=$(".s-ico",thecol);$("[id^=jqgh_]",thecol).empty().html(nData).append(ico);$t.p.colNames[pos]=nData}if(prop){if(typeof prop==="string"){$(thecol).addClass(prop)}else{$(thecol).css(prop)}}if(typeof attrp==="object"){$(thecol).attr(attrp)}}})},setCell:function(rowid,colname,nData,cssp,attrp,forceupd){return this.each(function(){var $t=this,pos=-1,v,title;if(!$t.grid){return}if(isNaN(colname)){$($t.p.colModel).each(function(i){if(this.name===colname){pos=i;return false}})}else{pos=parseInt(colname,10)}if(pos>=0){var ind=$($t).jqGrid("getGridRowById",rowid);if(ind){var tcell=$("td:eq("+pos+")",ind),cl=0,rawdat=[];if(nData!==""||forceupd===true){while(cl0){$("span",$(tcell)).html(v).attr(title)}else{$(tcell).html(v).attr(title)}if($t.p.datatype==="local"){var cm=$t.p.colModel[pos],index;nData=cm.formatter&&typeof cm.formatter==="string"&&cm.formatter==="date"?$.unformat.date.call($t,nData,cm):nData;index=$t.p._index[$.jgrid.stripPref($t.p.idPrefix,rowid)];if(index!==undefined){$t.p.data[index][cm.name]=nData}}}if(typeof cssp==="string"){$(tcell).addClass(cssp)}else{if(cssp){$(tcell).css(cssp)}}if(typeof attrp==="object"){$(tcell).attr(attrp)}}}})},getCell:function(rowid,col){var ret=false;this.each(function(){var $t=this,pos=-1;if(!$t.grid){return}if(isNaN(col)){$($t.p.colModel).each(function(i){if(this.name===col){pos=i;return false}})}else{pos=parseInt(col,10)}if(pos>=0){var ind=$($t).jqGrid("getGridRowById",rowid);if(ind){try{ret=$.unformat.call($t,$("td:eq("+pos+")",ind),{rowId:ind.id,colModel:$t.p.colModel[pos]},pos)}catch(e){ret=$.jgrid.htmlDecode($("td:eq("+pos+")",ind).html())}}}});return ret},getCol:function(col,obj,mathopr){var ret=[],val,sum=0,min,max,v;obj=typeof obj!=="boolean"?false:obj;if(mathopr===undefined){mathopr=false}this.each(function(){var $t=this,pos=-1;if(!$t.grid){return}if(isNaN(col)){$($t.p.colModel).each(function(i){if(this.name===col){pos=i;return false}})}else{pos=parseInt(col,10)}if(pos>=0){var ln=$t.rows.length,i=0,dlen=0;if(ln&&ln>0){while(i=0){ret=this.p.data[ind]}}});return ret},progressBar:function(p){p=$.extend({htmlcontent:"",method:"hide",loadtype:"disable"},p||{});return this.each(function(){var sh=p.method==="show"?true:false;if(p.htmlcontent!==""){$("#load_"+$.jgrid.jqID(this.p.id)).html(p.htmlcontent)}switch(p.loadtype){case"disable":break;case"enable":$("#load_"+$.jgrid.jqID(this.p.id)).toggle(sh);break;case"block":$("#lui_"+$.jgrid.jqID(this.p.id)).toggle(sh);$("#load_"+$.jgrid.jqID(this.p.id)).toggle(sh);break}})}})})(jQuery);(function(a){a.jgrid.extend({editCell:function(d,c,b){return this.each(function(){var i=this,m,j,g,k;if(!i.grid||i.p.cellEdit!==true){return}c=parseInt(c,10);i.p.selrow=i.rows[d].id;if(!i.p.knv){a(i).jqGrid("GridNav")}if(i.p.savedRow.length>0){if(b===true){if(d==i.p.iRow&&c==i.p.iCol){return}}a(i).jqGrid("saveCell",i.p.savedRow[0].id,i.p.savedRow[0].ic)}else{window.setTimeout(function(){a("#"+a.jgrid.jqID(i.p.knv)).attr("tabindex","-1").focus()},1)}k=i.p.colModel[c];m=k.name;if(m==="subgrid"||m==="cb"||m==="rn"){return}g=a("td:eq("+c+")",i.rows[d]);if(k.editable===true&&b===true&&!g.hasClass("not-editable-cell")){if(parseInt(i.p.iCol,10)>=0&&parseInt(i.p.iRow,10)>=0){a("td:eq("+i.p.iCol+")",i.rows[i.p.iRow]).removeClass("edit-cell ui-state-highlight");a(i.rows[i.p.iRow]).removeClass("selected-row ui-state-hover")}a(g).addClass("edit-cell ui-state-highlight");a(i.rows[d]).addClass("selected-row ui-state-hover");try{j=a.unformat.call(i,g,{rowId:i.rows[d].id,colModel:k},c)}catch(l){j=(k.edittype&&k.edittype==="textarea")?a(g).text():a(g).html()}if(i.p.autoencode){j=a.jgrid.htmlDecode(j)}if(!k.edittype){k.edittype="text"}i.p.savedRow.push({id:d,ic:c,name:m,v:j});if(j===" "||j===" "||(j.length===1&&j.charCodeAt(0)===160)){j=""}if(a.isFunction(i.p.formatCell)){var h=i.p.formatCell.call(i,i.rows[d].id,m,j,d,c);if(h!==undefined){j=h}}a(i).triggerHandler("jqGridBeforeEditCell",[i.rows[d].id,m,j,d,c]);if(a.isFunction(i.p.beforeEditCell)){i.p.beforeEditCell.call(i,i.rows[d].id,m,j,d,c)}var f=a.extend({},k.editoptions||{},{id:d+"_"+m,name:m,rowId:i.rows[d].id});var e=a.jgrid.createEl.call(i,k.edittype,f,j,true,a.extend({},a.jgrid.ajaxOptions,i.p.ajaxSelectOptions||{}));a(g).html("").append(e).attr("tabindex","0");a.jgrid.bindEv.call(i,e,f);window.setTimeout(function(){a(e).focus()},1);a("input, select, textarea",g).bind("keydown",function(n){if(n.keyCode===27){if(a("input.hasDatepicker",g).length>0){if(a(".ui-datepicker").is(":hidden")){a(i).jqGrid("restoreCell",d,c)}else{a("input.hasDatepicker",g).datepicker("hide")}}else{a(i).jqGrid("restoreCell",d,c)}}if(n.keyCode===13&&!n.shiftKey){a(i).jqGrid("saveCell",d,c);return false}if(n.keyCode===9){if(!i.grid.hDiv.loading){if(n.shiftKey){a(i).jqGrid("prevCell",d,c)}else{a(i).jqGrid("nextCell",d,c)}}else{return false}}n.stopPropagation()});a(i).triggerHandler("jqGridAfterEditCell",[i.rows[d].id,m,j,d,c]);if(a.isFunction(i.p.afterEditCell)){i.p.afterEditCell.call(i,i.rows[d].id,m,j,d,c)}}else{if(parseInt(i.p.iCol,10)>=0&&parseInt(i.p.iRow,10)>=0){a("td:eq("+i.p.iCol+")",i.rows[i.p.iRow]).removeClass("edit-cell ui-state-highlight");a(i.rows[i.p.iRow]).removeClass("selected-row ui-state-hover")}g.addClass("edit-cell ui-state-highlight");a(i.rows[d]).addClass("selected-row ui-state-hover");j=g.html().replace(/\ \;/ig,"");a(i).triggerHandler("jqGridSelectCell",[i.rows[d].id,m,j,d,c]);if(a.isFunction(i.p.onSelectCell)){i.p.onSelectCell.call(i,i.rows[d].id,m,j,d,c)}}i.p.iCol=c;i.p.iRow=d})},saveCell:function(c,b){return this.each(function(){var u=this,h;if(!u.grid||u.p.cellEdit!==true){return}if(u.p.savedRow.length>=1){h=0}else{h=null}if(h!==null){var p=a("td:eq("+b+")",u.rows[c]),n,d,j=u.p.colModel[b],f=j.name,i=a.jgrid.jqID(f);switch(j.edittype){case"select":if(!j.editoptions.multiple){n=a("#"+c+"_"+i+" option:selected",u.rows[c]).val();d=a("#"+c+"_"+i+" option:selected",u.rows[c]).text()}else{var t=a("#"+c+"_"+i,u.rows[c]),s=[];n=a(t).val();if(n){n.join(",")}else{n=""}a("option:selected",t).each(function(e,v){s[e]=a(v).text()});d=s.join(",")}if(j.formatter){d=n}break;case"checkbox":var q=["Yes","No"];if(j.editoptions){q=j.editoptions.value.split(":")}n=a("#"+c+"_"+i,u.rows[c]).is(":checked")?q[0]:q[1];d=n;break;case"password":case"text":case"textarea":case"button":n=a("#"+c+"_"+i,u.rows[c]).val();d=n;break;case"custom":try{if(j.editoptions&&a.isFunction(j.editoptions.custom_value)){n=j.editoptions.custom_value.call(u,a(".customelement",p),"get");if(n===undefined){throw"e2"}else{d=n}}else{throw"e1"}}catch(w){if(w==="e1"){a.jgrid.info_dialog(a.jgrid.errors.errcap,"function 'custom_value' "+a.jgrid.edit.msg.nodefined,a.jgrid.edit.bClose)}if(w==="e2"){a.jgrid.info_dialog(a.jgrid.errors.errcap,"function 'custom_value' "+a.jgrid.edit.msg.novalue,a.jgrid.edit.bClose)}else{a.jgrid.info_dialog(a.jgrid.errors.errcap,w.message,a.jgrid.edit.bClose)}}break}if(d!==u.p.savedRow[h].v){var y=a(u).triggerHandler("jqGridBeforeSaveCell",[u.rows[c].id,f,n,c,b]);if(y){n=y;d=y}if(a.isFunction(u.p.beforeSaveCell)){var r=u.p.beforeSaveCell.call(u,u.rows[c].id,f,n,c,b);if(r){n=r;d=r}}var g=a.jgrid.checkValues.call(u,n,b);if(g[0]===true){var l=a(u).triggerHandler("jqGridBeforeSubmitCell",[u.rows[c].id,f,n,c,b])||{};if(a.isFunction(u.p.beforeSubmitCell)){l=u.p.beforeSubmitCell.call(u,u.rows[c].id,f,n,c,b);if(!l){l={}}}if(a("input.hasDatepicker",p).length>0){a("input.hasDatepicker",p).datepicker("hide")}if(u.p.cellsubmit==="remote"){if(u.p.cellurl){var x={};if(u.p.autoencode){n=a.jgrid.htmlEncode(n)}x[f]=n;var o,m,k;k=u.p.prmNames;o=k.id;m=k.oper;x[o]=a.jgrid.stripPref(u.p.idPrefix,u.rows[c].id);x[m]=k.editoper;x=a.extend(l,x);a(u).jqGrid("progressBar",{method:"show",loadtype:u.p.loadui,htmlcontent:a.jgrid.defaults.savetext||"Saving..."});u.grid.hDiv.loading=true;a.ajax(a.extend({url:u.p.cellurl,data:a.isFunction(u.p.serializeCellData)?u.p.serializeCellData.call(u,x):x,type:"POST",complete:function(e,z){a(u).jqGrid("progressBar",{method:"hide",loadtype:u.p.loadui});u.grid.hDiv.loading=false;if(z==="success"){var v=a(u).triggerHandler("jqGridAfterSubmitCell",[u,e,x.id,f,n,c,b])||[true,""];if(v[0]===true&&a.isFunction(u.p.afterSubmitCell)){v=u.p.afterSubmitCell.call(u,e,x.id,f,n,c,b)}if(v[0]===true){a(p).empty();a(u).jqGrid("setCell",u.rows[c].id,b,d,false,false,true);a(p).addClass("dirty-cell");a(u.rows[c]).addClass("edited");a(u).triggerHandler("jqGridAfterSaveCell",[u.rows[c].id,f,n,c,b]);if(a.isFunction(u.p.afterSaveCell)){u.p.afterSaveCell.call(u,u.rows[c].id,f,n,c,b)}u.p.savedRow.splice(0,1)}else{a.jgrid.info_dialog(a.jgrid.errors.errcap,v[1],a.jgrid.edit.bClose);a(u).jqGrid("restoreCell",c,b)}}},error:function(e,v,z){a("#lui_"+a.jgrid.jqID(u.p.id)).hide();u.grid.hDiv.loading=false;a(u).triggerHandler("jqGridErrorCell",[e,v,z]);if(a.isFunction(u.p.errorCell)){u.p.errorCell.call(u,e,v,z);a(u).jqGrid("restoreCell",c,b)}else{a.jgrid.info_dialog(a.jgrid.errors.errcap,e.status+" : "+e.statusText+" "+v,a.jgrid.edit.bClose);a(u).jqGrid("restoreCell",c,b)}}},a.jgrid.ajaxOptions,u.p.ajaxCellOptions||{}))}else{try{a.jgrid.info_dialog(a.jgrid.errors.errcap,a.jgrid.errors.nourl,a.jgrid.edit.bClose);a(u).jqGrid("restoreCell",c,b)}catch(w){}}}if(u.p.cellsubmit==="clientArray"){a(p).empty();a(u).jqGrid("setCell",u.rows[c].id,b,d,false,false,true);a(p).addClass("dirty-cell");a(u.rows[c]).addClass("edited");a(u).triggerHandler("jqGridAfterSaveCell",[u.rows[c].id,f,n,c,b]);if(a.isFunction(u.p.afterSaveCell)){u.p.afterSaveCell.call(u,u.rows[c].id,f,n,c,b)}u.p.savedRow.splice(0,1)}}else{try{window.setTimeout(function(){a.jgrid.info_dialog(a.jgrid.errors.errcap,n+" "+g[1],a.jgrid.edit.bClose)},100);a(u).jqGrid("restoreCell",c,b)}catch(w){}}}else{a(u).jqGrid("restoreCell",c,b)}}window.setTimeout(function(){a("#"+a.jgrid.jqID(u.p.knv)).attr("tabindex","-1").focus()},0)})},restoreCell:function(c,b){return this.each(function(){var h=this,d;if(!h.grid||h.p.cellEdit!==true){return}if(h.p.savedRow.length>=1){d=0}else{d=null}if(d!==null){var g=a("td:eq("+b+")",h.rows[c]);if(a.isFunction(a.fn.datepicker)){try{a("input.hasDatepicker",g).datepicker("hide")}catch(f){}}a(g).empty().attr("tabindex","-1");a(h).jqGrid("setCell",h.rows[c].id,b,h.p.savedRow[d].v,false,false,true);a(h).triggerHandler("jqGridAfterRestoreCell",[h.rows[c].id,h.p.savedRow[d].v,c,b]);if(a.isFunction(h.p.afterRestoreCell)){h.p.afterRestoreCell.call(h,h.rows[c].id,h.p.savedRow[d].v,c,b)}h.p.savedRow.splice(0,1)}window.setTimeout(function(){a("#"+h.p.knv).attr("tabindex","-1").focus()},0)})},nextCell:function(c,b){return this.each(function(){var f=this,e=false,d;if(!f.grid||f.p.cellEdit!==true){return}for(d=b+1;d0){a(f).jqGrid("saveCell",c,b)}}})},prevCell:function(c,b){return this.each(function(){var f=this,e=false,d;if(!f.grid||f.p.cellEdit!==true){return}for(d=b-1;d>=0;d--){if(f.p.colModel[d].editable===true){e=d;break}}if(e!==false){a(f).jqGrid("editCell",c,e,true)}else{if(f.p.savedRow.length>0){a(f).jqGrid("saveCell",c,b)}}})},GridNav:function(){return this.each(function(){var g=this;if(!g.grid||g.p.cellEdit!==true){return}g.p.knv=g.p.id+"_kn";var f=a(""),d,c;function e(p,n,o){if(o.substr(0,1)==="v"){var h=a(g.grid.bDiv)[0].clientHeight,q=a(g.grid.bDiv)[0].scrollTop,r=g.rows[p].offsetTop+g.rows[p].clientHeight,l=g.rows[p].offsetTop;if(o==="vd"){if(r>=h){a(g.grid.bDiv)[0].scrollTop=a(g.grid.bDiv)[0].scrollTop+g.rows[p].clientHeight}}if(o==="vu"){if(l=k+parseInt(j,10)){a(g.grid.bDiv)[0].scrollLeft=a(g.grid.bDiv)[0].scrollLeft+g.rows[p].cells[n].clientWidth}else{if(m=0;j--){if(g.p.colModel[j].hidden!==true){k=j;break}}}if(h==="rgt"){k=l-1;for(j=l;j0){e(g.p.iRow-1,g.p.iCol,"vu");a(g).jqGrid("editCell",g.p.iRow-1,g.p.iCol,false)}break;case 40:if(g.p.iRow+1<=g.rows.length-1){e(g.p.iRow+1,g.p.iCol,"vd");a(g).jqGrid("editCell",g.p.iRow+1,g.p.iCol,false)}break;case 37:if(g.p.iCol-1>=0){d=b(g.p.iCol-1,"lft");e(g.p.iRow,d,"h");a(g).jqGrid("editCell",g.p.iRow,d,false)}break;case 39:if(g.p.iCol+1<=g.p.colModel.length-1){d=b(g.p.iCol+1,"rgt");e(g.p.iRow,d,"h");a(g).jqGrid("editCell",g.p.iRow,d,false)}break;case 13:if(parseInt(g.p.iCol,10)>=0&&parseInt(g.p.iRow,10)>=0){a(g).jqGrid("editCell",g.p.iRow,g.p.iCol,true)}break;default:return true}return false})})},getChangedCells:function(c){var b=[];if(!c){c="all"}this.each(function(){var e=this,d;if(!e.grid||e.p.cellEdit!==true){return}a(e.rows).each(function(f){var g={};if(a(this).hasClass("edited")){a("td",this).each(function(h){d=e.p.colModel[h].name;if(d!=="cb"&&d!=="subgrid"){if(c==="dirty"){if(a(this).hasClass("dirty-cell")){try{g[d]=a.unformat.call(e,this,{rowId:e.rows[f].id,colModel:e.p.colModel[h]},h)}catch(j){g[d]=a.jgrid.htmlDecode(a(this).html())}}}else{try{g[d]=a.unformat.call(e,this,{rowId:e.rows[f].id,colModel:e.p.colModel[h]},h)}catch(j){g[d]=a.jgrid.htmlDecode(a(this).html())}}}});g.id=this.id;b.push(g)}})});return b}})})(jQuery);(function(a){a.extend(a.jgrid,{showModal:function(b){b.w.show()},closeModal:function(b){b.w.hide().attr("aria-hidden","true");if(b.o){b.o.remove()}},hideModal:function(c,j){j=a.extend({jqm:true,gb:"",removemodal:false,formprop:false,form:""},j||{});var h=j.gb&&typeof j.gb==="string"&&j.gb.substr(0,6)==="#gbox_"?a("#"+j.gb.substr(6))[0]:false;if(j.onClose){var g=h?j.onClose.call(h,c):j.onClose(c);if(typeof g==="boolean"&&!g){return}}if(j.formprop&&h&&j.form){var b=a(c)[0].style.height;if(b.indexOf("px")>-1){b=parseFloat(b)}var f,d;if(j.form==="edit"){f="#"+a.jgrid.jqID("FrmGrid_"+j.gb.substr(6));d="formProp"}else{if(j.form==="view"){f="#"+a.jgrid.jqID("ViewGrid_"+j.gb.substr(6));d="viewProp"}}a(h).data(d,{top:parseFloat(a(c).css("top")),left:parseFloat(a(c).css("left")),width:a(c).width(),height:b,dataheight:a(f).height(),datawidth:a(f).width()})}if(a.fn.jqm&&j.jqm===true){a(c).attr("aria-hidden","true").jqmHide()}else{if(j.gb!==""){try{a(".jqgrid-overlay:first",j.gb).hide()}catch(i){}}a(c).hide().attr("aria-hidden","true")}if(j.removemodal){a(c).remove()}},findPos:function(c){var d=0,b=0;if(c.offsetParent){do{d+=c.offsetLeft;b+=c.offsetTop}while(c=c.offsetParent)}return[d,b]},createModal:function(i,q,m,b,v,c,h){m=a.extend(true,{},a.jgrid.jqModal||{},m);var k=document.createElement("div"),s,l=this;h=a.extend({},h||{});s=a(m.gbox).attr("dir")==="rtl"?true:false;k.className="ui-widget ui-widget-content ui-corner-all ui-jqdialog";k.id=i.themodal;var u=document.createElement("div");u.className="ui-jqdialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix";u.id=i.modalhead;a(u).append(""+m.caption+" ");var n=a(" ").hover(function(){n.addClass("ui-state-hover")},function(){n.removeClass("ui-state-hover")}).append(" ");a(u).append(n);if(s){k.dir="rtl";a(".ui-jqdialog-title",u).css("float","right");a(".ui-jqdialog-titlebar-close",u).css("left",0.3+"em")}else{k.dir="ltr";a(".ui-jqdialog-title",u).css("float","left");a(".ui-jqdialog-titlebar-close",u).css("right",0.3+"em")}var w=document.createElement("div");a(w).addClass("ui-jqdialog-content ui-widget-content").attr("id",i.modalcontent);a(w).append(q);k.appendChild(w);a(k).prepend(u);if(c===true){a("body").append(k)}else{if(typeof c==="string"){a(c).append(k)}else{a(k).insertBefore(b)}}a(k).css(h);if(m.jqModal===undefined){m.jqModal=true}var o={};if(a.fn.jqm&&m.jqModal===true){if(m.left===0&&m.top===0&&m.overlay){var d=[];d=a.jgrid.findPos(v);m.left=d[0]+4;m.top=d[1]+4}o.top=m.top+"px";o.left=m.left}else{if(m.left!==0||m.top!==0){o.left=m.left;o.top=m.top+"px"}}a("a.ui-jqdialog-titlebar-close",u).click(function(){var e=a("#"+a.jgrid.jqID(i.themodal)).data("onClose")||m.onClose;var p=a("#"+a.jgrid.jqID(i.themodal)).data("gbox")||m.gbox;l.hideModal("#"+a.jgrid.jqID(i.themodal),{gb:p,jqm:m.jqModal,onClose:e,removemodal:m.removemodal||false,formprop:!m.recreateForm||false,form:m.form||""});return false});if(m.width===0||!m.width){m.width=300}if(m.height===0||!m.height){m.height=200}if(!m.zIndex){var f=a(b).parents("*[role=dialog]").filter(":first").css("z-index");if(f){m.zIndex=parseInt(f,10)+2}else{m.zIndex=950}}var g=0;if(s&&o.left&&!c){g=a(m.gbox).width()-(!isNaN(m.width)?parseInt(m.width,10):0)-8;o.left=parseInt(o.left,10)+parseInt(g,10)}if(o.left){o.left+="px"}a(k).css(a.extend({width:isNaN(m.width)?"auto":m.width+"px",height:isNaN(m.height)?"auto":m.height+"px",zIndex:m.zIndex,overflow:"hidden"},o)).attr({tabIndex:"-1",role:"dialog","aria-labelledby":i.modalhead,"aria-hidden":"true"});if(m.drag===undefined){m.drag=true}if(m.resize===undefined){m.resize=true}if(m.drag){a(u).css("cursor","move");if(a.fn.jqDrag){a(k).jqDrag(u)}else{try{a(k).draggable({handle:a("#"+a.jgrid.jqID(u.id))})}catch(t){}}}if(m.resize){if(a.fn.jqResize){a(k).append("
");a("#"+a.jgrid.jqID(i.themodal)).jqResize(".jqResize",i.scrollelm?"#"+a.jgrid.jqID(i.scrollelm):false)}else{try{a(k).resizable({handles:"se, sw",alsoResize:i.scrollelm?"#"+a.jgrid.jqID(i.scrollelm):false})}catch(j){}}}if(m.closeOnEscape===true){a(k).keydown(function(r){if(r.which===27){var p=a("#"+a.jgrid.jqID(i.themodal)).data("onClose")||m.onClose;l.hideModal("#"+a.jgrid.jqID(i.themodal),{gb:m.gbox,jqm:m.jqModal,onClose:p,removemodal:m.removemodal||false,formprop:!m.recreateForm||false,form:m.form||""})}})}},viewModal:function(b,d){d=a.extend({toTop:true,overlay:10,modal:false,overlayClass:"ui-widget-overlay",onShow:a.jgrid.showModal,onHide:a.jgrid.closeModal,gbox:"",jqm:true,jqM:true},d||{});if(a.fn.jqm&&d.jqm===true){if(d.jqM){a(b).attr("aria-hidden","false").jqm(d).jqmShow()}else{a(b).attr("aria-hidden","false").jqmShow()}}else{if(d.gbox!==""){a(".jqgrid-overlay:first",d.gbox).show();a(b).data("gbox",d.gbox)}a(b).show().attr("aria-hidden","false");try{a(":input:visible",b)[0].focus()}catch(c){}}},info_dialog:function(q,k,c,p){var n={width:290,height:"auto",dataheight:"auto",drag:true,resize:false,left:250,top:170,zIndex:1000,jqModal:true,modal:false,closeOnEscape:true,align:"center",buttonalign:"center",buttons:[]};a.extend(true,n,a.jgrid.jqModal||{},{caption:""+q+" "},p||{});var f=n.jqModal,r=this;if(a.fn.jqm&&!f){f=false}var h="",g;if(n.buttons.length>0){for(g=0;g"+n.buttons[g].text+""}}var l=isNaN(n.dataheight)?n.dataheight:n.dataheight+"px",o="text-align:"+n.align+";";var b="";b+="
"+k+"
";b+=c?"
":h!==""?"
"+h+"
":"";b+="
";try{if(a("#info_dialog").attr("aria-hidden")==="false"){a.jgrid.hideModal("#info_dialog",{jqm:f})}a("#info_dialog").remove()}catch(j){}a.jgrid.createModal({themodal:"info_dialog",modalhead:"info_head",modalcontent:"info_content",scrollelm:"infocnt"},b,n,"","",true);if(h){a.each(n.buttons,function(e){a("#"+a.jgrid.jqID(this.id),"#info_id").bind("click",function(){n.buttons[e].onClick.call(a("#info_dialog"));return false})})}a("#closedialog","#info_id").click(function(){r.hideModal("#info_dialog",{jqm:f,onClose:a("#info_dialog").data("onClose")||n.onClose,gb:a("#info_dialog").data("gbox")||n.gbox});return false});a(".fm-button","#info_dialog").hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});if(a.isFunction(n.beforeOpen)){n.beforeOpen()}a.jgrid.viewModal("#info_dialog",{onHide:function(e){e.w.hide().remove();if(e.o){e.o.remove()}},modal:n.modal,jqm:f});if(a.isFunction(n.afterOpen)){n.afterOpen()}try{a("#info_dialog").focus()}catch(d){}},bindEv:function(c,b){var d=this;if(a.isFunction(b.dataInit)){b.dataInit.call(d,c,b)}if(b.dataEvents){a.each(b.dataEvents,function(){if(this.data!==undefined){a(c).bind(this.type,this.data,this.fn)}else{a(c).bind(this.type,this.fn)}})}},createEl:function(f,h,x,m,v){var w="",r=this;function t(D,C,i){var e=["dataInit","dataEvents","dataUrl","buildSelect","sopt","searchhidden","defaultValue","attr","custom_element","custom_value"];if(i!==undefined&&a.isArray(i)){a.merge(e,i)}a.each(C,function(E,F){if(a.inArray(E,e)===-1){a(D).attr(E,F)}});if(!C.hasOwnProperty("id")){a(D).attr("id",a.jgrid.randId())}}switch(f){case"textarea":w=document.createElement("textarea");if(m){if(!h.cols){a(w).css({width:"98%"})}}else{if(!h.cols){h.cols=20}}if(!h.rows){h.rows=2}if(x===" "||x===" "||(x.length===1&&x.charCodeAt(0)===160)){x=""}w.value=x;t(w,h);a(w).attr({role:"textbox",multiline:"true"});break;case"checkbox":w=document.createElement("input");w.type="checkbox";if(!h.value){var B=(x+"").toLowerCase();if(B.search(/(false|f|0|no|n|off|undefined)/i)<0&&B!==""){w.checked=true;w.defaultChecked=true;w.value=x}else{w.value="on"}a(w).attr("offval","off")}else{var p=h.value.split(":");if(x===p[0]){w.checked=true;w.defaultChecked=true}w.value=p[0];a(w).attr("offval",p[1])}t(w,h,["value"]);a(w).attr("role","checkbox");break;case"select":w=document.createElement("select");w.setAttribute("role","select");var d,j=[];if(h.multiple===true){d=true;w.multiple="multiple";a(w).attr("aria-multiselectable","true")}else{d=false}if(h.dataUrl!==undefined){var l=null,g=h.postData||v.postData;try{l=h.rowId}catch(u){}if(r.p&&r.p.idPrefix){l=a.jgrid.stripPref(r.p.idPrefix,l)}a.ajax(a.extend({url:a.isFunction(h.dataUrl)?h.dataUrl.call(r,l,x,String(h.name)):h.dataUrl,type:"GET",dataType:"html",data:a.isFunction(g)?g.call(r,l,x,String(h.name)):g,context:{elem:w,options:h,vl:x},success:function(G){var i=[],F=this.elem,E=this.vl,C=a.extend({},this.options),D=C.multiple===true,e=a.isFunction(C.buildSelect)?C.buildSelect.call(r,G):G;if(typeof e==="string"){e=a(a.trim(e)).html()}if(e){a(F).append(e);t(F,C,g?["postData"]:undefined);if(C.size===undefined){C.size=D?3:1}if(D){i=E.split(",");i=a.map(i,function(H){return a.trim(H)})}else{i[0]=a.trim(E)}setTimeout(function(){a("option",F).each(function(H){if(H===0&&F.multiple){this.selected=false}a(this).attr("role","option");if(a.inArray(a.trim(a(this).text()),i)>-1||a.inArray(a.trim(a(this).val()),i)>-1){this.selected="selected"}})},0)}}},v||{}))}else{if(h.value){var q;if(h.size===undefined){h.size=d?3:1}if(d){j=x.split(",");j=a.map(j,function(e){return a.trim(e)})}if(typeof h.value==="function"){h.value=h.value()}var s,o,k,n=h.separator===undefined?":":h.separator,y=h.delimiter===undefined?";":h.delimiter;if(typeof h.value==="string"){s=h.value.split(y);for(q=0;q2){o[1]=a.map(o,function(i,e){if(e>0){return i}}).join(n)}k=document.createElement("option");k.setAttribute("role","option");k.value=o[0];k.innerHTML=o[1];w.appendChild(k);if(!d&&(a.trim(o[0])===a.trim(x)||a.trim(o[1])===a.trim(x))){k.selected="selected"}if(d&&(a.inArray(a.trim(o[1]),j)>-1||a.inArray(a.trim(o[0]),j)>-1)){k.selected="selected"}}}else{if(typeof h.value==="object"){var c=h.value,A;for(A in c){if(c.hasOwnProperty(A)){k=document.createElement("option");k.setAttribute("role","option");k.value=A;k.innerHTML=c[A];w.appendChild(k);if(!d&&(a.trim(A)===a.trim(x)||a.trim(c[A])===a.trim(x))){k.selected="selected"}if(d&&(a.inArray(a.trim(c[A]),j)>-1||a.inArray(a.trim(A),j)>-1)){k.selected="selected"}}}}}t(w,h,["value"])}}break;case"text":case"password":case"button":var z;if(f==="button"){z="button"}else{z="textbox"}w=document.createElement("input");w.type=f;w.value=x;t(w,h);if(f!=="button"){if(m){if(!h.size){a(w).css({width:"98%"})}}else{if(!h.size){h.size=20}}}a(w).attr("role",z);break;case"image":case"file":w=document.createElement("input");w.type=f;t(w,h);break;case"custom":w=document.createElement("span");try{if(a.isFunction(h.custom_element)){var b=h.custom_element.call(r,x,h);if(b){b=a(b).addClass("customelement").attr({id:h.id,name:h.name});a(w).empty().append(b)}else{throw"e2"}}else{throw"e1"}}catch(u){if(u==="e1"){a.jgrid.info_dialog(a.jgrid.errors.errcap,"function 'custom_element' "+a.jgrid.edit.msg.nodefined,a.jgrid.edit.bClose)}if(u==="e2"){a.jgrid.info_dialog(a.jgrid.errors.errcap,"function 'custom_element' "+a.jgrid.edit.msg.novalue,a.jgrid.edit.bClose)}else{a.jgrid.info_dialog(a.jgrid.errors.errcap,typeof u==="string"?u:u.message,a.jgrid.edit.bClose)}}break}return w},checkDate:function(n,d){var l=function(i){return(((i%4===0)&&(i%100!==0||(i%400===0)))?29:28)},f={},p;n=n.toLowerCase();if(n.indexOf("/")!==-1){p="/"}else{if(n.indexOf("-")!==-1){p="-"}else{if(n.indexOf(".")!==-1){p="."}else{p="/"}}}n=n.split(p);d=d.split(p);if(d.length!==3){return false}var g=-1,o,h=-1,e=-1,k;for(k=0;k12){return false}if(h===-1){return false}m=f[n[h]].toString();if(m.length<1||f[n[h]]<1||f[n[h]]>31||(f[n[e]]===2&&f[n[h]]>l(f[n[g]]))||f[n[h]]>b[f[n[e]]]){return false}return true},isEmpty:function(b){if(b.match(/^\s+$/)||b===""){return true}return false},checkTime:function(d){var c=/^(\d{1,2}):(\d{2})([apAP][Mm])?$/,b;if(!a.jgrid.isEmpty(d)){b=d.match(c);if(b){if(b[3]){if(b[1]<1||b[1]>12){return false}}else{if(b[1]>23){return false}}if(b[2]>59){return false}}else{return false}}return true},checkValues:function(c,n,p,h){var f,j,q,d,l,k=this,o=k.p.colModel;if(p===undefined){if(typeof n==="string"){for(j=0,l=o.length;j=0){f=o[n].editrules}}}else{f=p;q=h===undefined?"_":h}if(f){if(!q){q=k.p.colNames!=null?k.p.colNames[n]:o[n].label}if(f.required===true){if(a.jgrid.isEmpty(c)){return[false,q+": "+a.jgrid.edit.msg.required,""]}}var e=f.required===false?false:true;if(f.number===true){if(!(e===false&&a.jgrid.isEmpty(c))){if(isNaN(c)){return[false,q+": "+a.jgrid.edit.msg.number,""]}}}if(f.minValue!==undefined&&!isNaN(f.minValue)){if(parseFloat(c)parseFloat(f.maxValue)){return[false,q+": "+a.jgrid.edit.msg.maxValue+" "+f.maxValue,""]}}var b;if(f.email===true){if(!(e===false&&a.jgrid.isEmpty(c))){b=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i;if(!b.test(c)){return[false,q+": "+a.jgrid.edit.msg.email,""]}}}if(f.integer===true){if(!(e===false&&a.jgrid.isEmpty(c))){if(isNaN(c)){return[false,q+": "+a.jgrid.edit.msg.integer,""]}if((c%1!==0)||(c.indexOf(".")!==-1)){return[false,q+": "+a.jgrid.edit.msg.integer,""]}}}if(f.date===true){if(!(e===false&&a.jgrid.isEmpty(c))){if(o[n].formatoptions&&o[n].formatoptions.newformat){d=o[n].formatoptions.newformat;if(a.jgrid.formatter.date.masks.hasOwnProperty(d)){d=a.jgrid.formatter.date.masks[d]}}else{d=o[n].datefmt||"Y-m-d"}if(!a.jgrid.checkDate(d,c)){return[false,q+": "+a.jgrid.edit.msg.date+" - "+d,""]}}}if(f.time===true){if(!(e===false&&a.jgrid.isEmpty(c))){if(!a.jgrid.checkTime(c)){return[false,q+": "+a.jgrid.edit.msg.date+" - hh:mm (am/pm)",""]}}}if(f.url===true){if(!(e===false&&a.jgrid.isEmpty(c))){b=/^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@`~=%!]*)(\.\w{2,})?)*\/?)/i;if(!b.test(c)){return[false,q+": "+a.jgrid.edit.msg.url,""]}}}if(f.custom===true){if(!(e===false&&a.jgrid.isEmpty(c))){if(a.isFunction(f.custom_func)){var m=f.custom_func.call(k,c,q,n);return a.isArray(m)?m:[false,a.jgrid.edit.msg.customarray,""]}return[false,a.jgrid.edit.msg.customfcheck,""]}}}return[true,"",""]}})})(jQuery);(function(a){a.jgrid.extend({getColProp:function(d){var b={},f=this[0];if(!f.grid){return false}var e=f.p.colModel,c;for(c=0;c",ge:">=",bw:"^",bn:"!^","in":"=",ni:"!=",ew:"|",en:"!@",cn:"~",nc:"!~",nu:"#",nn:"!#"}},a.jgrid.search,b||{});return this.each(function(){var i=this;if(this.ftoolbar){return}var c=function(){var o={},n=0,t,u,k={},l;a.each(i.p.colModel,function(){var j=a("#gs_"+a.jgrid.jqID(this.name),(this.frozen===true&&i.p.frozenColumns===true)?i.grid.fhDiv:i.grid.hDiv);u=this.index||this.name;if(b.searchOperators){l=j.parent().prev().children("a").attr("soper")||b.defaultSearch}else{l=(this.searchoptions&&this.searchoptions.sopt)?this.searchoptions.sopt[0]:this.stype==="select"?"eq":b.defaultSearch}t=this.stype==="custom"&&a.isFunction(this.searchoptions.custom_value)&&j.length>0&&j[0].nodeName.toUpperCase()==="SPAN"?this.searchoptions.custom_value.call(i,j.children(".customelement:first"),"get"):j.val();if(t||l==="nu"||l==="nn"){o[u]=t;k[u]=l;n++}else{try{delete i.p.postData[u]}catch(v){}}});var r=n>0?true:false;if(b.stringResult===true||i.p.datatype==="local"||b.searchOperators===true){var s='{"groupOp":"'+b.groupOp+'","rules":[';var q=0;a.each(o,function(j,v){if(q>0){s+=","}s+='{"field":"'+j+'",';s+='"op":"'+k[j]+'",';v+="";s+='"data":"'+v.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"}';q++});s+="]}";a.extend(i.p.postData,{filters:s});a.each(["searchField","searchString","searchOper"],function(j,v){if(i.p.postData.hasOwnProperty(v)){delete i.p.postData[v]}})}else{a.extend(i.p.postData,o)}var p;if(i.p.searchurl){p=i.p.url;a(i).jqGrid("setGridParam",{url:i.p.searchurl})}var m=a(i).triggerHandler("jqGridToolbarBeforeSearch")==="stop"?true:false;if(!m&&a.isFunction(b.beforeSearch)){m=b.beforeSearch.call(i)}if(!m){a(i).jqGrid("setGridParam",{search:r}).trigger("reloadGrid",[{page:1}])}if(p){a(i).jqGrid("setGridParam",{url:p})}a(i).triggerHandler("jqGridToolbarAfterSearch");if(a.isFunction(b.afterSearch)){b.afterSearch.call(i)}},h=function(k){var m={},l=0,s;k=(typeof k!=="boolean")?true:k;a.each(i.p.colModel,function(){var t,j=a("#gs_"+a.jgrid.jqID(this.name),(this.frozen===true&&i.p.frozenColumns===true)?i.grid.fhDiv:i.grid.hDiv);if(this.searchoptions&&this.searchoptions.defaultValue!==undefined){t=this.searchoptions.defaultValue}s=this.index||this.name;switch(this.stype){case"select":j.find("option").each(function(v){if(v===0){this.selected=true}if(a(this).val()===t){this.selected=true;return false}});if(t!==undefined){m[s]=t;l++}else{try{delete i.p.postData[s]}catch(u){}}break;case"text":j.val(t||"");if(t!==undefined){m[s]=t;l++}else{try{delete i.p.postData[s]}catch(w){}}break;case"custom":if(a.isFunction(this.searchoptions.custom_value)&&j.length>0&&j[0].nodeName.toUpperCase()==="SPAN"){this.searchoptions.custom_value.call(i,j.children(".customelement:first"),"set",t||"")}break}});var p=l>0?true:false;i.p.resetsearch=true;if(b.stringResult===true||i.p.datatype==="local"){var q='{"groupOp":"'+b.groupOp+'","rules":[';var o=0;a.each(m,function(j,t){if(o>0){q+=","}q+='{"field":"'+j+'",';q+='"op":"eq",';t+="";q+='"data":"'+t.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"}';o++});q+="]}";a.extend(i.p.postData,{filters:q});a.each(["searchField","searchString","searchOper"],function(j,t){if(i.p.postData.hasOwnProperty(t)){delete i.p.postData[t]}})}else{a.extend(i.p.postData,m)}var n;if(i.p.searchurl){n=i.p.url;a(i).jqGrid("setGridParam",{url:i.p.searchurl})}var r=a(i).triggerHandler("jqGridToolbarBeforeClear")==="stop"?true:false;if(!r&&a.isFunction(b.beforeClear)){r=b.beforeClear.call(i)}if(!r){if(k){a(i).jqGrid("setGridParam",{search:p}).trigger("reloadGrid",[{page:1}])}}if(n){a(i).jqGrid("setGridParam",{url:n})}a(i).triggerHandler("jqGridToolbarAfterClear");if(a.isFunction(b.afterClear)){b.afterClear()}},e=function(){var j=a("tr.ui-search-toolbar",i.grid.hDiv),k=i.p.frozenColumns===true?a("tr.ui-search-toolbar",i.grid.fhDiv):false;if(j.css("display")==="none"){j.show();if(k){k.show()}}else{j.hide();if(k){k.hide()}}},g=function(k,j,t){a("#sopt_menu").remove();j=parseInt(j,10);t=parseInt(t,10)+18;var p=a(".ui-jqgrid-view").css("font-size")||"11px";var s='";a("body").append(s);a("#sopt_menu").addClass("ui-menu ui-widget ui-widget-content ui-corner-all");a("#sopt_menu > li > a").hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).click(function(z){var y=a(this).attr("value"),A=a(this).attr("oper");a(i).triggerHandler("jqGridToolbarSelectOper",[y,A,k]);a("#sopt_menu").hide();a(k).text(A).attr("soper",y);if(b.autosearch===true){var x=a(k).parent().next().children()[0];if(a(x).val()||y==="nu"||y==="nn"){c()}}})};var f=a(" ");var d;a.each(i.p.colModel,function(t){var q=this,y,p,u,x="",H="=",C,B,n=a(" "),s=a("
"),o=a("");if(this.hidden===true){a(n).css("display","none")}this.search=this.search===false?false:true;if(this.stype===undefined){this.stype="text"}y=a.extend({},this.searchoptions||{});if(this.search){if(b.searchOperators){C=(y.sopt)?y.sopt[0]:q.stype==="select"?"eq":b.defaultSearch;for(B=0;B"+H+""}a("td:eq(0)",o).attr("colindex",t).append(x);if(y.clearSearch===undefined){y.clearSearch=true}if(y.clearSearch){var r=b.resetTitle||"Clear Search Value";a("td:eq(2)",o).append(""+b.resetIcon+" ")}else{a("td:eq(2)",o).hide()}switch(this.stype){case"select":p=this.surl||y.dataUrl;if(p){u=s;a(u).append(o);a.ajax(a.extend({url:p,dataType:"html",success:function(k){if(y.buildSelect!==undefined){var J=y.buildSelect(k);if(J){a("td:eq(1)",o).append(J)}}else{a("td:eq(1)",o).append(k)}if(y.defaultValue!==undefined){a("select",u).val(y.defaultValue)}a("select",u).attr({name:q.index||q.name,id:"gs_"+q.name});if(y.attr){a("select",u).attr(y.attr)}a("select",u).css({width:"100%"});a.jgrid.bindEv.call(i,a("select",u)[0],y);if(b.autosearch===true){a("select",u).change(function(){c();return false})}k=null}},a.jgrid.ajaxOptions,i.p.ajaxSelectOptions||{}))}else{var l,v,G;if(q.searchoptions){l=q.searchoptions.value===undefined?"":q.searchoptions.value;v=q.searchoptions.separator===undefined?":":q.searchoptions.separator;G=q.searchoptions.delimiter===undefined?";":q.searchoptions.delimiter}else{if(q.editoptions){l=q.editoptions.value===undefined?"":q.editoptions.value;v=q.editoptions.separator===undefined?":":q.editoptions.separator;G=q.editoptions.delimiter===undefined?";":q.editoptions.delimiter}}if(l){var E=document.createElement("select");E.style.width="100%";a(E).attr({name:q.index||q.name,id:"gs_"+q.name});var w,m,I,A;if(typeof l==="string"){C=l.split(G);for(A=0;A ");a(s).append(o);if(y.attr){a("input",s).attr(y.attr)}a.jgrid.bindEv.call(i,a("input",s)[0],y);if(b.autosearch===true){if(b.searchOnEnter){a("input",s).keypress(function(J){var k=J.charCode||J.keyCode||0;if(k===13){c();return false}return this})}else{a("input",s).keydown(function(J){var k=J.which;switch(k){case 13:return false;case 9:case 16:case 37:case 38:case 39:case 40:case 27:break;default:if(d){clearTimeout(d)}d=setTimeout(function(){c()},b.autosearchDelay)}})}}break;case"custom":a("td:eq(1)",o).append(" ");a(s).append(o);try{if(a.isFunction(y.custom_element)){var j=y.custom_element.call(i,y.defaultValue!==undefined?y.defaultValue:"",y);if(j){j=a(j).addClass("customelement");a(s).find("span[name='"+(q.index||q.name)+"']").append(j)}else{throw"e2"}}else{throw"e1"}}catch(D){if(D==="e1"){a.jgrid.info_dialog(a.jgrid.errors.errcap,"function 'custom_element' "+a.jgrid.edit.msg.nodefined,a.jgrid.edit.bClose)}if(D==="e2"){a.jgrid.info_dialog(a.jgrid.errors.errcap,"function 'custom_element' "+a.jgrid.edit.msg.novalue,a.jgrid.edit.bClose)}else{a.jgrid.info_dialog(a.jgrid.errors.errcap,typeof D==="string"?D:D.message,a.jgrid.edit.bClose)}}break}}a(n).append(s);a(f).append(n);if(!b.searchOperators){a("td:eq(0)",o).hide()}});a("table thead",i.grid.hDiv).append(f);if(b.searchOperators){a(".soptclass",f).click(function(l){var m=a(this).offset(),k=(m.left),j=(m.top);g(this,k,j);l.stopPropagation()});a("body").on("click",function(j){if(j.target.className!=="soptclass"){a("#sopt_menu").hide()}})}a(".clearsearchclass",f).click(function(m){var n=a(this).parents("tr:first"),l=parseInt(a("td.ui-search-oper",n).attr("colindex"),10),j=a.extend({},i.p.colModel[l].searchoptions||{}),k=j.defaultValue?j.defaultValue:"";if(i.p.colModel[l].stype==="select"){if(k){a("td.ui-search-input select",n).val(k)}else{a("td.ui-search-input select",n)[0].selectedIndex=0}}else{a("td.ui-search-input input",n).val(k)}if(b.autosearch===true){c()}});this.ftoolbar=true;this.triggerToolbar=c;this.clearToolbar=h;this.toggleToolbar=e})},destroyFilterToolbar:function(){return this.each(function(){if(!this.ftoolbar){return}this.triggerToolbar=null;this.clearToolbar=null;this.toggleToolbar=null;this.ftoolbar=false;a(this.grid.hDiv).find("table thead tr.ui-search-toolbar").remove()})},destroyGroupHeader:function(b){if(b===undefined){b=true}return this.each(function(){var h=this,m,j,f,d,p,e,c=h.grid,n=a("table.ui-jqgrid-htable thead",c.hDiv),o=h.p.colModel,k;if(!c){return}a(this).unbind(".setGroupHeaders");m=a("",{role:"row"}).addClass("ui-jqgrid-labels");d=c.headers;for(j=0,f=d.length;j0){e[0].style.height=""}p.children("div")[0].style.top=""}a(n).children("tr.ui-jqgrid-labels").remove();a(n).prepend(m);if(b===true){a(h).jqGrid("setGridParam",{groupHeader:null})}})},setGroupHeaders:function(b){b=a.extend({useColSpanStyle:false,groupHeaders:[]},b||{});return this.each(function(){this.p.groupHeader=b;var c=this,y,u,v=0,A,o,j,f,h,g,z,q,p,t,n=c.p.colModel,r=n.length,d=c.grid.headers,x=a("table.ui-jqgrid-htable",c.grid.hDiv),e=x.children("thead").children("tr.ui-jqgrid-labels:last").addClass("jqg-second-row-header"),m=x.children("thead"),s,l=x.find(".jqg-first-row-header");if(l[0]===undefined){l=a("",{role:"row","aria-hidden":"true"}).addClass("jqg-first-row-header").css("height","auto")}else{l.empty()}var k,w=function(E,C){var D=C.length,B;for(B=0;B",{role:"row"}).addClass("ui-jqgrid-labels jqg-third-row-header");for(y=0;y",{role:"gridcell"}).css(h).addClass("ui-first-th-"+c.p.direction).appendTo(l);j.style.width="";g=w(u.name,b.groupHeaders);if(g>=0){z=b.groupHeaders[g];q=z.numberOfColumns;p=z.titleText;for(t=0,g=0;g").attr({role:"columnheader"}).addClass("ui-state-default ui-th-column-header ui-th-"+c.p.direction).css({height:"22px","border-top":"0 none"}).html(p);if(t>0){o.attr("colspan",String(t))}if(c.p.headertitles){o.attr("title",o.text())}if(t===0){o.hide()}f.before(o);A.append(j);v=q-1}else{if(v===0){if(b.useColSpanStyle){f.attr("rowspan","2")}else{a("",{role:"columnheader"}).addClass("ui-state-default ui-th-column-header ui-th-"+c.p.direction).css({display:u.hidden?"none":"","border-top":"0 none"}).insertBefore(f);A.append(j)}}else{A.append(j);v--}}}s=a(c).children("thead");s.prepend(l);A.insertAfter(e);x.append(s);if(b.useColSpanStyle){x.find("span.ui-jqgrid-resize").each(function(){var i=a(this).parent();if(i.is(":visible")){this.style.cssText="height: "+i.height()+"px !important; cursor: col-resize;"}});x.find("div.ui-jqgrid-sortable").each(function(){var i=a(this),B=i.parent();if(B.is(":visible")&&B.is(":has(span.ui-jqgrid-resize)")){i.css("top",(B.height()-i.outerHeight())/2+"px")}})}k=s.find("tr.jqg-first-row-header");a(c).bind("jqGridResizeStop.setGroupHeaders",function(C,B,i){k.find("th").eq(i).width(B)})})},setFrozenColumns:function(){return this.each(function(){if(!this.grid){return}var h=this,q=h.p.colModel,j=0,l=q.length,o=-1,b=false;if(h.p.subGrid===true||h.p.treeGrid===true||h.p.cellEdit===true||h.p.sortable||h.p.scroll){return}if(h.p.rownumbers){j++}if(h.p.multiselect){j++}while(j=0&&b){var m=h.p.caption?a(h.grid.cDiv).outerHeight():0,n=a(".ui-jqgrid-htable","#gview_"+a.jgrid.jqID(h.p.id)).height();if(h.p.toppager){m=m+a(h.grid.topDiv).outerHeight()}if(h.p.toolbar[0]===true){if(h.p.toolbar[1]!=="bottom"){m=m+a(h.grid.uDiv).outerHeight()}}h.grid.fhDiv=a('
');h.grid.fbDiv=a('
');a("#gview_"+a.jgrid.jqID(h.p.id)).append(h.grid.fhDiv);var f=a(".ui-jqgrid-htable","#gview_"+a.jgrid.jqID(h.p.id)).clone(true);if(h.p.groupHeader){a("tr.jqg-first-row-header, tr.jqg-third-row-header",f).each(function(){a("th:gt("+o+")",this).remove()});var c=-1,e=-1,k,g;a("tr.jqg-second-row-header th",f).each(function(){k=parseInt(a(this).attr("colspan"),10);g=parseInt(a(this).attr("rowspan"),10);if(g){c++;e++}if(k){c=c+k;e++}if(c===o){return false}});if(c!==o){e=o}a("tr.jqg-second-row-header",f).each(function(){a("th:gt("+e+")",this).remove()})}else{a("tr",f).each(function(){a("th:gt("+o+")",this).remove()})}a(f).width(1);a(h.grid.fhDiv).append(f).mousemove(function(i){if(h.grid.resizing){h.grid.dragMove(i);return false}});if(h.p.footerrow){var d=a(".ui-jqgrid-bdiv","#gview_"+a.jgrid.jqID(h.p.id)).height();h.grid.fsDiv=a('
');a("#gview_"+a.jgrid.jqID(h.p.id)).append(h.grid.fsDiv);var p=a(".ui-jqgrid-ftable","#gview_"+a.jgrid.jqID(h.p.id)).clone(true);a("tr",p).each(function(){a("td:gt("+o+")",this).remove()});a(p).width(1);a(h.grid.fsDiv).append(p)}a(h).bind("jqGridResizeStop.setFrozenColumns",function(u,i,s){var t=a(".ui-jqgrid-htable",h.grid.fhDiv);a("th:eq("+s+")",t).width(i);var r=a(".ui-jqgrid-btable",h.grid.fbDiv);a("tr:first td:eq("+s+")",r).width(i);if(h.p.footerrow){var v=a(".ui-jqgrid-ftable",h.grid.fsDiv);a("tr:first td:eq("+s+")",v).width(i)}});a(h).bind("jqGridSortCol.setFrozenColumns",function(u,r,t){var i=a("tr.ui-jqgrid-labels:last th:eq("+h.p.lastsort+")",h.grid.fhDiv),s=a("tr.ui-jqgrid-labels:last th:eq("+t+")",h.grid.fhDiv);a("span.ui-grid-ico-sort",i).addClass("ui-state-disabled");a(i).attr("aria-selected","false");a("span.ui-icon-"+h.p.sortorder,s).removeClass("ui-state-disabled");a(s).attr("aria-selected","true");if(!h.p.viewsortcols[0]){if(h.p.lastsort!==t){a("span.s-ico",i).hide();a("span.s-ico",s).show()}}});a("#gview_"+a.jgrid.jqID(h.p.id)).append(h.grid.fbDiv);a(h.grid.bDiv).scroll(function(){a(h.grid.fbDiv).scrollTop(a(this).scrollTop())});if(h.p.hoverrows===true){a("#"+a.jgrid.jqID(h.p.id)).unbind("mouseover").unbind("mouseout")}a(h).bind("jqGridAfterGridComplete.setFrozenColumns",function(){a("#"+a.jgrid.jqID(h.p.id)+"_frozen").remove();a(h.grid.fbDiv).height(a(h.grid.bDiv).height()-16);var i=a("#"+a.jgrid.jqID(h.p.id)).clone(true);a("tr[role=row]",i).each(function(){a("td[role=gridcell]:gt("+o+")",this).remove()});a(i).width(1).attr("id",h.p.id+"_frozen");a(h.grid.fbDiv).append(i);if(h.p.hoverrows===true){a("tr.jqgrow",i).hover(function(){a(this).addClass("ui-state-hover");a("#"+a.jgrid.jqID(this.id),"#"+a.jgrid.jqID(h.p.id)).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover");a("#"+a.jgrid.jqID(this.id),"#"+a.jgrid.jqID(h.p.id)).removeClass("ui-state-hover")});a("tr.jqgrow","#"+a.jgrid.jqID(h.p.id)).hover(function(){a(this).addClass("ui-state-hover");a("#"+a.jgrid.jqID(this.id),"#"+a.jgrid.jqID(h.p.id)+"_frozen").addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover");a("#"+a.jgrid.jqID(this.id),"#"+a.jgrid.jqID(h.p.id)+"_frozen").removeClass("ui-state-hover")})}i=null});if(!h.grid.hDiv.loading){a(h).triggerHandler("jqGridAfterGridComplete")}h.p.frozenColumns=true}})},destroyFrozenColumns:function(){return this.each(function(){if(!this.grid){return}if(this.p.frozenColumns===true){var c=this;a(c.grid.fhDiv).remove();a(c.grid.fbDiv).remove();c.grid.fhDiv=null;c.grid.fbDiv=null;if(c.p.footerrow){a(c.grid.fsDiv).remove();c.grid.fsDiv=null}a(this).unbind(".setFrozenColumns");if(c.p.hoverrows===true){var b;a("#"+a.jgrid.jqID(c.p.id)).bind("mouseover",function(d){b=a(d.target).closest("tr.jqgrow");if(a(b).attr("class")!=="ui-subgrid"){a(b).addClass("ui-state-hover")}}).bind("mouseout",function(d){b=a(d.target).closest("tr.jqgrow");a(b).removeClass("ui-state-hover")})}this.p.frozenColumns=false}})}})})(jQuery);(function(a){a.fn.jqFilter=function(b){if(typeof b==="string"){var d=a.fn.jqFilter[b];if(!d){throw ("jqFilter - No such method: "+b)}var c=a.makeArray(arguments).slice(1);return d.apply(this,c)}var e=a.extend(true,{filter:null,columns:[],onChange:null,afterRedraw:null,checkValues:null,error:false,errmsg:"",errorcheck:true,showQuery:true,sopt:null,ops:[],operands:null,numopts:["eq","ne","lt","le","gt","ge","nu","nn","in","ni"],stropts:["eq","ne","bw","bn","ew","en","cn","nc","nu","nn","in","ni"],strarr:["text","string","blob"],groupOps:[{op:"AND",text:"AND"},{op:"OR",text:"OR"}],groupButton:true,ruleButtons:true,direction:"ltr"},a.jgrid.filter,b||{});return this.each(function(){if(this.filter){return}this.p=e;if(this.p.filter===null||this.p.filter===undefined){this.p.filter={groupOp:this.p.groupOps[0].op,rules:[],groups:[]}}var j,f=this.p.columns.length,g,k=/msie/i.test(navigator.userAgent)&&!window.opera;this.p.initFilter=a.extend(true,{},this.p.filter);if(!f){return}for(j=0;j
")}var l=function(){return a("#"+a.jgrid.jqID(e.id))[0]||null};var h=function(o,i){var m=[true,""],p=l();if(a.isFunction(i.searchrules)){m=i.searchrules.call(p,o,i)}else{if(a.jgrid&&a.jgrid.checkValues){try{m=a.jgrid.checkValues.call(p,o,-1,i.searchrules,i.label)}catch(n){}}}if(m&&m.length&&m[0]===false){e.error=!m[0];e.errmsg=m[1]}};this.onchange=function(){this.p.error=false;this.p.errmsg="";return a.isFunction(this.p.onChange)?this.p.onChange.call(this,this.p):false};this.reDraw=function(){a("table.group:first",this).remove();var i=this.createTableForGroup(e.filter,null);a(this).append(i);if(a.isFunction(this.p.afterRedraw)){this.p.afterRedraw.call(this,this.p)}};this.createTableForGroup=function(p,A){var o=this,y;var z=a(""),w="left";if(this.p.direction==="rtl"){w="right";z.attr("dir","rtl")}if(A===null){z.append(" ")}var m=a(" ");z.append(m);var n=a(" ");m.append(n);if(this.p.ruleButtons===true){var t=a(" ");n.append(t);var v="",u;for(y=0;y"+o.p.groupOps[y].text+""}t.append(v).bind("change",function(){p.groupOp=a(t).val();o.onchange()})}var D=" ";if(this.p.groupButton){D=a(" ");D.bind("click",function(){if(p.groups===undefined){p.groups=[]}p.groups.push({groupOp:e.groupOps[0].op,rules:[],groups:[]});o.reDraw();o.onchange();return false})}n.append(D);if(this.p.ruleButtons===true){var r=a(" "),q;r.bind("click",function(){if(p.rules===undefined){p.rules=[]}for(y=0;y ");n.append(s);s.bind("click",function(){for(y=0;y");z.append(x);var B=a(" ");x.append(B);var C=a(" ");C.append(this.createTableForGroup(p.groups[y],p));x.append(C)}}if(p.groupOp===undefined){p.groupOp=o.p.groupOps[0].op}if(p.rules!==undefined){for(y=0;y"),H,z,p,y,C="",B;n.append(" ");var q=a(" ");n.append(q);var J=a(" "),A,E=[];q.append(J);J.bind("change",function(){v.field=a(J).val();p=a(this).parents("tr:first");for(H=0;H"+w.p.ops[A].text+"";M++}}a(".selectopts",p).empty().append(L);a(".selectopts",p)[0].selectedIndex=0;if(a.jgrid.msie&&a.jgrid.msiever()<9){var i=parseInt(a("select.selectopts",p)[0].offsetWidth,10)+1;a(".selectopts",p).width(i);a(".selectopts",p).css("width","auto")}a(".data",p).empty().append(N);a.jgrid.bindEv.call(I,N,y.searchoptions);a(".input-elm",p).bind("change",function(P){var O=P.target;v.data=O.nodeName.toUpperCase()==="SPAN"&&y.searchoptions&&a.isFunction(y.searchoptions.custom_value)?y.searchoptions.custom_value.call(I,a(O).children(".customelement:first"),"get"):O.value;w.onchange()});setTimeout(function(){v.data=a(N).val();w.onchange()},0)});var F=0;for(H=0;H"+w.p.columns[H].label+""}}J.append(C);var D=a(" ");n.append(D);y=e.columns[F];y.searchoptions.id=a.jgrid.randId();if(k&&y.inputtype==="text"){if(!y.searchoptions.size){y.searchoptions.size=10}}var o=a.jgrid.createEl.call(I,y.inputtype,y.searchoptions,v.data,true,w.p.ajaxSelectOptions||{},true);if(v.op==="nu"||v.op==="nn"){a(o).attr("readonly","true");a(o).attr("disabled","true")}var m=a(" ");D.append(m);m.bind("change",function(){v.op=a(m).val();p=a(this).parents("tr:first");var i=a(".input-elm",p)[0];if(v.op==="nu"||v.op==="nn"){v.data="";if(i.tagName.toUpperCase()!=="SELECT"){i.value=""}i.setAttribute("readonly","true");i.setAttribute("disabled","true")}else{if(i.tagName.toUpperCase()==="SELECT"){v.data=i.value}i.removeAttribute("readonly");i.removeAttribute("disabled")}w.onchange()});if(y.searchoptions.sopt){z=y.searchoptions.sopt}else{if(w.p.sopt){z=w.p.sopt}else{if(a.inArray(y.searchtype,w.p.strarr)!==-1){z=w.p.stropts}else{z=w.p.numopts}}}C="";a.each(w.p.ops,function(){E.push(this.oper)});for(H=0;H"+w.p.ops[A].text+""}}m.append(C);var s=a(" ");n.append(s);s.append(o);a.jgrid.bindEv.call(I,o,y.searchoptions);a(o).addClass("input-elm").bind("change",function(){v.data=y.inputtype==="custom"?y.searchoptions.custom_value.call(I,a(this).children(".customelement:first"),"get"):a(this).val();w.onchange()});var u=a(" ");n.append(u);if(this.p.ruleButtons===true){var r=a(" ");u.append(r);r.bind("click",function(){for(H=0;H1){m+=" "+o.groupOp+" "}try{m+=this.getStringForGroup(o.groups[i])}catch(p){alert(p)}}}if(o.rules!==undefined){try{for(i=0;i1){m+=" "+o.groupOp+" "}m+=this.getStringForRule(o.rules[i])}}catch(n){alert(n)}}m+=")";if(m==="()"){return""}return m};this.getStringForRule=function(r){var o="",t="",q,n,p,s,m=["int","integer","float","number","currency"];for(q=0;q1){if(q.groupOp==="OR"){p+=" || "}else{p+=" && "}}p+=i(q.groups[o])}}if(q.rules!==undefined){for(o=0;o1){if(q.groupOp==="OR"){p+=" || "}else{p+=" && "}}p+=n(q.rules[o])}}p+=")";if(p==="()"){return""}return p}return i(this.p.filter)};this.reDraw();if(this.p.showQuery){this.onchange()}this.filter=true})};a.extend(a.fn.jqFilter,{toSQLString:function(){var b="";this.each(function(){b=this.toUserFriendlyString()});return b},filterData:function(){var b;this.each(function(){b=this.p.filter});return b},getParameter:function(b){if(b!==undefined){if(this.p.hasOwnProperty(b)){return this.p[b]}}return this.p},resetFilter:function(){return this.each(function(){this.resetFilter()})},addFilter:function(b){if(typeof b==="string"){b=a.jgrid.parse(b)}this.each(function(){this.p.filter=b;this.reDraw();this.onchange()})}})})(jQuery);(function(b){var a={};b.jgrid.extend({searchGrid:function(c){c=b.extend(true,{recreateFilter:false,drag:true,sField:"searchField",sValue:"searchString",sOper:"searchOper",sFilter:"filters",loadDefaults:true,beforeShowSearch:null,afterShowSearch:null,onInitializeSearch:null,afterRedraw:null,afterChange:null,closeAfterSearch:false,closeAfterReset:false,closeOnEscape:false,searchOnEnter:false,multipleSearch:false,multipleGroup:false,top:0,left:0,jqModal:true,modal:false,resize:true,width:450,height:"auto",dataheight:"auto",showQuery:false,errorcheck:true,sopt:null,stringResult:undefined,onClose:null,onSearch:null,onReset:null,toTop:true,overlay:30,columns:[],tmplNames:null,tmplFilters:null,tmplLabel:" Template: ",showOnLoad:false,layer:null,operands:{eq:"=",ne:"<>",lt:"<",le:"<=",gt:">",ge:">=",bw:"LIKE",bn:"NOT LIKE","in":"IN",ni:"NOT IN",ew:"LIKE",en:"NOT LIKE",cn:"LIKE",nc:"NOT LIKE",nu:"IS NULL",nn:"ISNOT NULL"}},b.jgrid.search,c||{});return this.each(function(){var u=this;if(!u.grid){return}var d="fbox_"+u.p.id,i=true,n=true,f={themodal:"searchmod"+d,modalhead:"searchhd"+d,modalcontent:"searchcnt"+d,scrollelm:d},g=u.p.postData[c.sFilter],l;if(typeof g==="string"){g=b.jgrid.parse(g)}if(c.recreateFilter===true){b("#"+b.jgrid.jqID(f.themodal)).remove()}function h(y){i=b(u).triggerHandler("jqGridFilterBeforeShow",[y]);if(i===undefined){i=true}if(i&&b.isFunction(c.beforeShowSearch)){i=c.beforeShowSearch.call(u,y)}if(i){b.jgrid.viewModal("#"+b.jgrid.jqID(f.themodal),{gbox:"#gbox_"+b.jgrid.jqID(d),jqm:c.jqModal,modal:c.modal,overlay:c.overlay,toTop:c.toTop});b(u).triggerHandler("jqGridFilterAfterShow",[y]);if(b.isFunction(c.afterShowSearch)){c.afterShowSearch.call(u,y)}}}if(b("#"+b.jgrid.jqID(f.themodal))[0]!==undefined){h(b("#fbox_"+b.jgrid.jqID(+u.p.id)))}else{var v=b("").insertBefore("#gview_"+b.jgrid.jqID(u.p.id)),t="left",j="";if(u.p.direction==="rtl"){t="right";j=" style='text-align:left'";v.attr("dir","rtl")}var e=b.extend([],u.p.colModel),q=" "+c.Find+" ",x=" "+c.Reset+" ",s="",k="",o,p=false,w,r=-1;if(c.showQuery){s="Query "}if(!c.columns.length){b.each(e,function(z,C){if(!C.label){C.label=u.p.colNames[z]}if(!p){var y=(C.search===undefined)?true:C.search,B=(C.hidden===true),A=(C.searchoptions&&C.searchoptions.searchhidden===true);if((A&&y)||(y&&!B)){p=true;o=C.index||C.name;r=z}}})}else{e=c.columns;r=0;o=e[0].index||e[0].name}if((!g&&o)||c.multipleSearch===false){var m="eq";if(r>=0&&e[r].searchoptions&&e[r].searchoptions.sopt){m=e[r].searchoptions.sopt[0]}else{if(c.sopt&&c.sopt.length){m=c.sopt[0]}}g={groupOp:"AND",rules:[{field:o,op:m,data:""}]}}p=false;if(c.tmplNames&&c.tmplNames.length){p=true;k=c.tmplLabel;k+="";k+="Default ";b.each(c.tmplNames,function(y,z){k+=""+z+" "});k+=" "}w="";d=b.jgrid.jqID(d);b("#"+d).jqFilter({columns:e,filter:c.loadDefaults?g:null,showQuery:c.showQuery,errorcheck:c.errorcheck,sopt:c.sopt,groupButton:c.multipleGroup,ruleButtons:c.multipleSearch,afterRedraw:c.afterRedraw,ops:c.odata,operands:c.operands,ajaxSelectOptions:u.p.ajaxSelectOptions,groupOps:c.groupOps,onChange:function(){if(this.p.showQuery){b(".query",this).html(this.toUserFriendlyString())}if(b.isFunction(c.afterChange)){c.afterChange.call(u,b("#"+d),c)}},direction:u.p.direction,id:u.p.id});v.append(w);if(p&&c.tmplFilters&&c.tmplFilters.length){b(".ui-template",v).bind("change",function(){var y=b(this).val();if(y==="default"){b("#"+d).jqFilter("addFilter",g)}else{b("#"+d).jqFilter("addFilter",c.tmplFilters[parseInt(y,10)])}return false})}if(c.multipleGroup===true){c.multipleSearch=true}b(u).triggerHandler("jqGridFilterInitialize",[b("#"+d)]);if(b.isFunction(c.onInitializeSearch)){c.onInitializeSearch.call(u,b("#"+d))}c.gbox="#gbox_"+d;if(c.layer){b.jgrid.createModal(f,v,c,"#gview_"+b.jgrid.jqID(u.p.id),b("#gbox_"+b.jgrid.jqID(u.p.id))[0],"#"+b.jgrid.jqID(c.layer),{position:"relative"})}else{b.jgrid.createModal(f,v,c,"#gview_"+b.jgrid.jqID(u.p.id),b("#gbox_"+b.jgrid.jqID(u.p.id))[0])}if(c.searchOnEnter||c.closeOnEscape){b("#"+b.jgrid.jqID(f.themodal)).keydown(function(z){var y=b(z.target);if(c.searchOnEnter&&z.which===13&&!y.hasClass("add-group")&&!y.hasClass("add-rule")&&!y.hasClass("delete-group")&&!y.hasClass("delete-rule")&&(!y.hasClass("fm-button")||!y.is("[id$=_query]"))){b("#"+d+"_search").click();return false}if(c.closeOnEscape&&z.which===27){b("#"+b.jgrid.jqID(f.modalhead)).find(".ui-jqdialog-titlebar-close").click();return false}})}if(s){b("#"+d+"_query").bind("click",function(){b(".queryresult",v).toggle();return false})}if(c.stringResult===undefined){c.stringResult=c.multipleSearch}b("#"+d+"_search").bind("click",function(){var z={},y,A;l=b("#"+d);l.find(".input-elm:focus").change();A=l.jqFilter("filterData");if(c.errorcheck){l[0].hideError();if(!c.showQuery){l.jqFilter("toSQLString")}if(l[0].p.error){l[0].showError();return false}}if(c.stringResult){try{y=xmlJsonClass.toJson(A,"","",false)}catch(C){try{y=JSON.stringify(A)}catch(B){}}if(typeof y==="string"){z[c.sFilter]=y;b.each([c.sField,c.sValue,c.sOper],function(){z[this]=""})}}else{if(c.multipleSearch){z[c.sFilter]=A;b.each([c.sField,c.sValue,c.sOper],function(){z[this]=""})}else{z[c.sField]=A.rules[0].field;z[c.sValue]=A.rules[0].data;z[c.sOper]=A.rules[0].op;z[c.sFilter]=""}}u.p.search=true;b.extend(u.p.postData,z);n=b(u).triggerHandler("jqGridFilterSearch");if(n===undefined){n=true}if(n&&b.isFunction(c.onSearch)){n=c.onSearch.call(u,u.p.filters)}if(n!==false){b(u).trigger("reloadGrid",[{page:1}])}if(c.closeAfterSearch){b.jgrid.hideModal("#"+b.jgrid.jqID(f.themodal),{gb:"#gbox_"+b.jgrid.jqID(u.p.id),jqm:c.jqModal,onClose:c.onClose})}return false});b("#"+d+"_reset").bind("click",function(){var y={},z=b("#"+d);u.p.search=false;u.p.resetsearch=true;if(c.multipleSearch===false){y[c.sField]=y[c.sValue]=y[c.sOper]=""}else{y[c.sFilter]=""}z[0].resetFilter();if(p){b(".ui-template",v).val("default")}b.extend(u.p.postData,y);n=b(u).triggerHandler("jqGridFilterReset");if(n===undefined){n=true}if(n&&b.isFunction(c.onReset)){n=c.onReset.call(u)}if(n!==false){b(u).trigger("reloadGrid",[{page:1}])}if(c.closeAfterReset){b.jgrid.hideModal("#"+b.jgrid.jqID(f.themodal),{gb:"#gbox_"+b.jgrid.jqID(u.p.id),jqm:c.jqModal,onClose:c.onClose})}return false});h(b("#"+d));b(".fm-button:not(.ui-state-disabled)",v).hover(function(){b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")})}})},editGridRow:function(c,d){d=b.extend(true,{top:0,left:0,width:300,datawidth:"auto",height:"auto",dataheight:"auto",modal:false,overlay:30,drag:true,resize:true,url:null,mtype:"POST",clearAfterAdd:true,closeAfterEdit:false,reloadAfterSubmit:true,onInitializeForm:null,beforeInitData:null,beforeShowForm:null,afterShowForm:null,beforeSubmit:null,afterSubmit:null,onclickSubmit:null,afterComplete:null,onclickPgButtons:null,afterclickPgButtons:null,editData:{},recreateForm:false,jqModal:true,closeOnEscape:false,addedrow:"first",topinfo:"",bottominfo:"",saveicon:[],closeicon:[],savekey:[false,13],navkeys:[false,38,40],checkOnSubmit:false,checkOnUpdate:false,_savedData:{},processing:false,onClose:null,ajaxEditOptions:{},serializeEditData:null,viewPagerButtons:true,overlayClass:"ui-widget-overlay",removemodal:true,form:"edit"},b.jgrid.edit,d||{});a[b(this)[0].p.id]=d;return this.each(function(){var e=this;if(!e.grid||!c){return}var B=e.p.id,y="FrmGrid_"+B,S="TblGrid_"+B,v="#"+b.jgrid.jqID(S),j={themodal:"editmod"+B,modalhead:"edithd"+B,modalcontent:"editcnt"+B,scrollelm:y},C=b.isFunction(a[e.p.id].beforeShowForm)?a[e.p.id].beforeShowForm:false,K=b.isFunction(a[e.p.id].afterShowForm)?a[e.p.id].afterShowForm:false,J=b.isFunction(a[e.p.id].beforeInitData)?a[e.p.id].beforeInitData:false,p=b.isFunction(a[e.p.id].onInitializeForm)?a[e.p.id].onInitializeForm:false,V=true,F=1,r=0,D,A,E;y=b.jgrid.jqID(y);if(c==="new"){c="_empty";E="add";d.caption=a[e.p.id].addCaption}else{d.caption=a[e.p.id].editCaption;E="edit"}if(!d.recreateForm){if(b(e).data("formProp")){b.extend(a[b(this)[0].p.id],b(e).data("formProp"))}}var m=true;if(d.checkOnUpdate&&d.jqModal&&!d.modal){m=false}function U(){b(v+" > tbody > tr > td .FormElement").each(function(){var ab=b(".customelement",this);if(ab.length){var Z=ab[0],X=b(Z).attr("name");b.each(e.p.colModel,function(){if(this.name===X&&this.editoptions&&b.isFunction(this.editoptions.custom_value)){try{D[X]=this.editoptions.custom_value.call(e,b("#"+b.jgrid.jqID(X),v),"get");if(D[X]===undefined){throw"e1"}}catch(ac){if(ac==="e1"){b.jgrid.info_dialog(b.jgrid.errors.errcap,"function 'custom_value' "+b.jgrid.edit.msg.novalue,b.jgrid.edit.bClose)}else{b.jgrid.info_dialog(b.jgrid.errors.errcap,ac.message,b.jgrid.edit.bClose)}}return true}})}else{switch(b(this).get(0).type){case"checkbox":if(b(this).is(":checked")){D[this.name]=b(this).val()}else{var Y=b(this).attr("offval");D[this.name]=Y}break;case"select-one":D[this.name]=b("option:selected",this).val();break;case"select-multiple":D[this.name]=b(this).val();if(D[this.name]){D[this.name]=D[this.name].join(",")}else{D[this.name]=""}var aa=[];b("option:selected",this).each(function(ac,ad){aa[ac]=b(ad).text()});break;case"password":case"text":case"textarea":case"button":D[this.name]=b(this).val();break}if(e.p.autoencode){D[this.name]=b.jgrid.htmlEncode(D[this.name])}}});return true}function t(Z,ag,ad,ab){var an,ah,Y,ac=0,af,am,X,aj=[],aa=false,ai=" ",al="",ae;for(ae=1;ae<=ab;ae++){al+=ai}if(Z!=="_empty"){aa=b(ag).jqGrid("getInd",Z)}b(ag.p.colModel).each(function(aq){an=this.name;if(this.editrules&&this.editrules.edithidden===true){ah=false}else{ah=this.hidden===true?true:false}am=ah?"style='display:none'":"";if(an!=="cb"&&an!=="subgrid"&&this.editable===true&&an!=="rn"){if(aa===false){af=""}else{if(an===ag.p.ExpandColumn&&ag.p.treeGrid===true){af=b("td[role='gridcell']:eq("+aq+")",ag.rows[aa]).text()}else{try{af=b.unformat.call(ag,b("td[role='gridcell']:eq("+aq+")",ag.rows[aa]),{rowId:Z,colModel:this},aq)}catch(ao){af=(this.edittype&&this.edittype==="textarea")?b("td[role='gridcell']:eq("+aq+")",ag.rows[aa]).text():b("td[role='gridcell']:eq("+aq+")",ag.rows[aa]).html()}if(!af||af===" "||af===" "||(af.length===1&&af.charCodeAt(0)===160)){af=""}}}var ap=b.extend({},this.editoptions||{},{id:an,name:an,rowId:Z}),av=b.extend({},{elmprefix:"",elmsuffix:"",rowabove:false,rowcontent:""},this.formoptions||{}),ar=parseInt(av.rowpos,10)||ac+1,au=parseInt((parseInt(av.colpos,10)||1)*2,10);if(Z==="_empty"&&ap.defaultValue){af=b.isFunction(ap.defaultValue)?ap.defaultValue.call(e):ap.defaultValue}if(!this.edittype){this.edittype="text"}if(e.p.autoencode){af=b.jgrid.htmlDecode(af)}X=b.jgrid.createEl.call(e,this.edittype,ap,af,false,b.extend({},b.jgrid.ajaxOptions,ag.p.ajaxSelectOptions||{}));if(a[e.p.id].checkOnSubmit||a[e.p.id].checkOnUpdate){a[e.p.id]._savedData[an]=af}b(X).addClass("FormElement");if(b.inArray(this.edittype,["text","textarea","password","select"])>-1){b(X).addClass("ui-widget-content ui-corner-all")}Y=b(ad).find("tr[rowpos="+ar+"]");if(av.rowabove){var at=b(""+av.rowcontent+" ");b(ad).append(at);at[0].rp=ar}if(Y.length===0){Y=b(" ").addClass("FormData").attr("id","tr_"+an);b(Y).append(al);b(ad).append(Y);Y[0].rp=ar}b("td:eq("+(au-2)+")",Y[0]).html(av.label===undefined?ag.p.colNames[aq]:av.label);b("td:eq("+(au-1)+")",Y[0]).append(av.elmprefix).append(X).append(av.elmsuffix);if(this.edittype==="custom"&&b.isFunction(ap.custom_value)){ap.custom_value.call(e,b("#"+an,"#"+y),"set",af)}b.jgrid.bindEv.call(e,X,ap);aj[ac]=aq;ac++}});if(ac>0){var ak=b(" ");ak[0].rp=ac+999;b(ad).append(ak);if(a[e.p.id].checkOnSubmit||a[e.p.id].checkOnUpdate){a[e.p.id]._savedData[ag.p.id+"_id"]=Z}}return aj}function q(X,ae,aa){var ai,ab=0,af,ad,Y,ac,ag;if(a[e.p.id].checkOnSubmit||a[e.p.id].checkOnUpdate){a[e.p.id]._savedData={};a[e.p.id]._savedData[ae.p.id+"_id"]=X}var ah=ae.p.colModel;if(X==="_empty"){b(ah).each(function(){ai=this.name;Y=b.extend({},this.editoptions||{});ad=b("#"+b.jgrid.jqID(ai),"#"+aa);if(ad&&ad.length&&ad[0]!==null){ac="";if(this.edittype==="custom"&&b.isFunction(Y.custom_value)){Y.custom_value.call(e,b("#"+ai,"#"+aa),"set",ac)}else{if(Y.defaultValue){ac=b.isFunction(Y.defaultValue)?Y.defaultValue.call(e):Y.defaultValue;if(ad[0].type==="checkbox"){ag=ac.toLowerCase();if(ag.search(/(false|f|0|no|n|off|undefined)/i)<0&&ag!==""){ad[0].checked=true;ad[0].defaultChecked=true;ad[0].value=ac}else{ad[0].checked=false;ad[0].defaultChecked=false}}else{ad.val(ac)}}else{if(ad[0].type==="checkbox"){ad[0].checked=false;ad[0].defaultChecked=false;ac=b(ad).attr("offval")}else{if(ad[0].type&&ad[0].type.substr(0,6)==="select"){ad[0].selectedIndex=0}else{ad.val(ac)}}}}if(a[e.p.id].checkOnSubmit===true||a[e.p.id].checkOnUpdate){a[e.p.id]._savedData[ai]=ac}}});b("#id_g","#"+aa).val(X);return}var Z=b(ae).jqGrid("getInd",X,true);if(!Z){return}b('td[role="gridcell"]',Z).each(function(am){ai=ah[am].name;if(ai!=="cb"&&ai!=="subgrid"&&ai!=="rn"&&ah[am].editable===true){if(ai===ae.p.ExpandColumn&&ae.p.treeGrid===true){af=b(this).text()}else{try{af=b.unformat.call(ae,b(this),{rowId:X,colModel:ah[am]},am)}catch(al){af=ah[am].edittype==="textarea"?b(this).text():b(this).html()}}if(e.p.autoencode){af=b.jgrid.htmlDecode(af)}if(a[e.p.id].checkOnSubmit===true||a[e.p.id].checkOnUpdate){a[e.p.id]._savedData[ai]=af}ai=b.jgrid.jqID(ai);switch(ah[am].edittype){case"password":case"text":case"button":case"image":case"textarea":if(af===" "||af===" "||(af.length===1&&af.charCodeAt(0)===160)){af=""}b("#"+ai,"#"+aa).val(af);break;case"select":var ak=af.split(",");ak=b.map(ak,function(ao){return b.trim(ao)});b("#"+ai+" option","#"+aa).each(function(){if(!ah[am].editoptions.multiple&&(b.trim(af)===b.trim(b(this).text())||ak[0]===b.trim(b(this).text())||ak[0]===b.trim(b(this).val()))){this.selected=true}else{if(ah[am].editoptions.multiple){if(b.inArray(b.trim(b(this).text()),ak)>-1||b.inArray(b.trim(b(this).val()),ak)>-1){this.selected=true}else{this.selected=false}}else{this.selected=false}}});break;case"checkbox":af=String(af);if(ah[am].editoptions&&ah[am].editoptions.value){var aj=ah[am].editoptions.value.split(":");if(aj[0]===af){b("#"+ai,"#"+aa)[e.p.useProp?"prop":"attr"]({checked:true,defaultChecked:true})}else{b("#"+ai,"#"+aa)[e.p.useProp?"prop":"attr"]({checked:false,defaultChecked:false})}}else{af=af.toLowerCase();if(af.search(/(false|f|0|no|n|off|undefined)/i)<0&&af!==""){b("#"+ai,"#"+aa)[e.p.useProp?"prop":"attr"]("checked",true);b("#"+ai,"#"+aa)[e.p.useProp?"prop":"attr"]("defaultChecked",true)}else{b("#"+ai,"#"+aa)[e.p.useProp?"prop":"attr"]("checked",false);b("#"+ai,"#"+aa)[e.p.useProp?"prop":"attr"]("defaultChecked",false)}}break;case"custom":try{if(ah[am].editoptions&&b.isFunction(ah[am].editoptions.custom_value)){ah[am].editoptions.custom_value.call(e,b("#"+ai,"#"+aa),"set",af)}else{throw"e1"}}catch(an){if(an==="e1"){b.jgrid.info_dialog(b.jgrid.errors.errcap,"function 'custom_value' "+b.jgrid.edit.msg.nodefined,b.jgrid.edit.bClose)}else{b.jgrid.info_dialog(b.jgrid.errors.errcap,an.message,b.jgrid.edit.bClose)}}break}ab++}});if(ab>0){b("#id_g",v).val(X)}}function Q(){b.each(e.p.colModel,function(X,Y){if(Y.editoptions&&Y.editoptions.NullIfEmpty===true){if(D.hasOwnProperty(Y.name)&&D[Y.name]===""){D[Y.name]="null"}}})}function k(){var ai,ah=[true,"",""],X={},ad=e.p.prmNames,ag,ab,al,ae,ac,Y;var af=b(e).triggerHandler("jqGridAddEditBeforeCheckValues",[b("#"+y),E]);if(af&&typeof af==="object"){D=af}if(b.isFunction(a[e.p.id].beforeCheckValues)){af=a[e.p.id].beforeCheckValues.call(e,D,b("#"+y),E);if(af&&typeof af==="object"){D=af}}for(al in D){if(D.hasOwnProperty(al)){ah=b.jgrid.checkValues.call(e,D[al],al);if(ah[0]===false){break}}}Q();if(ah[0]){X=b(e).triggerHandler("jqGridAddEditClickSubmit",[a[e.p.id],D,E]);if(X===undefined&&b.isFunction(a[e.p.id].onclickSubmit)){X=a[e.p.id].onclickSubmit.call(e,a[e.p.id],D,E)||{}}ah=b(e).triggerHandler("jqGridAddEditBeforeSubmit",[D,b("#"+y),E]);if(ah===undefined){ah=[true,"",""]}if(ah[0]&&b.isFunction(a[e.p.id].beforeSubmit)){ah=a[e.p.id].beforeSubmit.call(e,D,b("#"+y),E)}}if(ah[0]&&!a[e.p.id].processing){a[e.p.id].processing=true;b("#sData",v+"_2").addClass("ui-state-active");Y=a[e.p.id].url||b(e).jqGrid("getGridParam","editurl");ab=ad.oper;ag=Y==="clientArray"?e.p.keyName:ad.id;D[ab]=(b.trim(D[e.p.id+"_id"])==="_empty")?ad.addoper:ad.editoper;if(D[ab]!==ad.addoper){D[ag]=D[e.p.id+"_id"]}else{if(D[ag]===undefined){D[ag]=D[e.p.id+"_id"]}}delete D[e.p.id+"_id"];D=b.extend(D,a[e.p.id].editData,X);if(e.p.treeGrid===true){if(D[ab]===ad.addoper){ae=b(e).jqGrid("getGridParam","selrow");var Z=e.p.treeGridModel==="adjacency"?e.p.treeReader.parent_id_field:"parent_id";D[Z]=ae}for(ac in e.p.treeReader){if(e.p.treeReader.hasOwnProperty(ac)){var ak=e.p.treeReader[ac];if(D.hasOwnProperty(ak)){if(D[ab]===ad.addoper&&ac==="parent_id_field"){continue}delete D[ak]}}}}D[ag]=b.jgrid.stripPref(e.p.idPrefix,D[ag]);var aa=b.extend({url:Y,type:a[e.p.id].mtype,data:b.isFunction(a[e.p.id].serializeEditData)?a[e.p.id].serializeEditData.call(e,D):D,complete:function(ao,am){var an;b("#sData",v+"_2").removeClass("ui-state-active");D[ag]=e.p.idPrefix+D[ag];if(ao.status>=300&&ao.status!==304){ah[0]=false;ah[1]=b(e).triggerHandler("jqGridAddEditErrorTextFormat",[ao,E]);if(b.isFunction(a[e.p.id].errorTextFormat)){ah[1]=a[e.p.id].errorTextFormat.call(e,ao,E)}else{ah[1]=am+" Status: '"+ao.statusText+"'. Error code: "+ao.status}}else{ah=b(e).triggerHandler("jqGridAddEditAfterSubmit",[ao,D,E]);if(ah===undefined){ah=[true,"",""]}if(ah[0]&&b.isFunction(a[e.p.id].afterSubmit)){ah=a[e.p.id].afterSubmit.call(e,ao,D,E)}}if(ah[0]===false){b("#FormError>td",v).html(ah[1]);b("#FormError",v).show()}else{if(e.p.autoencode){b.each(D,function(ar,aq){D[ar]=b.jgrid.htmlDecode(aq)})}if(D[ab]===ad.addoper){if(!ah[2]){ah[2]=b.jgrid.randId()}if(D[ag]==null||D[ag]==="_empty"){D[ag]=ah[2]}else{ah[2]=D[ag]}if(a[e.p.id].reloadAfterSubmit){b(e).trigger("reloadGrid")}else{if(e.p.treeGrid===true){b(e).jqGrid("addChildNode",ah[2],ae,D)}else{b(e).jqGrid("addRowData",ah[2],D,d.addedrow)}}if(a[e.p.id].closeAfterAdd){if(e.p.treeGrid!==true){b(e).jqGrid("setSelection",ah[2])}b.jgrid.hideModal("#"+b.jgrid.jqID(j.themodal),{gb:"#gbox_"+b.jgrid.jqID(B),jqm:d.jqModal,onClose:a[e.p.id].onClose,removemodal:a[e.p.id].removemodal,formprop:!a[e.p.id].recreateForm,form:a[e.p.id].form})}else{if(a[e.p.id].clearAfterAdd){q("_empty",e,y)}}}else{if(a[e.p.id].reloadAfterSubmit){b(e).trigger("reloadGrid");if(!a[e.p.id].closeAfterEdit){setTimeout(function(){b(e).jqGrid("setSelection",D[ag])},1000)}}else{if(e.p.treeGrid===true){b(e).jqGrid("setTreeRow",D[ag],D)}else{b(e).jqGrid("setRowData",D[ag],D)}}if(a[e.p.id].closeAfterEdit){b.jgrid.hideModal("#"+b.jgrid.jqID(j.themodal),{gb:"#gbox_"+b.jgrid.jqID(B),jqm:d.jqModal,onClose:a[e.p.id].onClose,removemodal:a[e.p.id].removemodal,formprop:!a[e.p.id].recreateForm,form:a[e.p.id].form})}}if(b.isFunction(a[e.p.id].afterComplete)){ai=ao;setTimeout(function(){b(e).triggerHandler("jqGridAddEditAfterComplete",[ai,D,b("#"+y),E]);a[e.p.id].afterComplete.call(e,ai,D,b("#"+y),E);ai=null},500)}if(a[e.p.id].checkOnSubmit||a[e.p.id].checkOnUpdate){b("#"+y).data("disabled",false);if(a[e.p.id]._savedData[e.p.id+"_id"]!=="_empty"){for(an in a[e.p.id]._savedData){if(a[e.p.id]._savedData.hasOwnProperty(an)&&D[an]){a[e.p.id]._savedData[an]=D[an]}}}}}a[e.p.id].processing=false;try{b(":input:visible","#"+y)[0].focus()}catch(ap){}}},b.jgrid.ajaxOptions,a[e.p.id].ajaxEditOptions);if(!aa.url&&!a[e.p.id].useDataProxy){if(b.isFunction(e.p.dataProxy)){a[e.p.id].useDataProxy=true}else{ah[0]=false;ah[1]+=" "+b.jgrid.errors.nourl}}if(ah[0]){if(a[e.p.id].useDataProxy){var aj=e.p.dataProxy.call(e,aa,"set_"+e.p.id);if(aj===undefined){aj=[true,""]}if(aj[0]===false){ah[0]=false;ah[1]=aj[1]||"Error deleting the selected row!"}else{if(aa.data.oper===ad.addoper&&a[e.p.id].closeAfterAdd){b.jgrid.hideModal("#"+b.jgrid.jqID(j.themodal),{gb:"#gbox_"+b.jgrid.jqID(B),jqm:d.jqModal,onClose:a[e.p.id].onClose,removemodal:a[e.p.id].removemodal,formprop:!a[e.p.id].recreateForm,form:a[e.p.id].form})}if(aa.data.oper===ad.editoper&&a[e.p.id].closeAfterEdit){b.jgrid.hideModal("#"+b.jgrid.jqID(j.themodal),{gb:"#gbox_"+b.jgrid.jqID(B),jqm:d.jqModal,onClose:a[e.p.id].onClose,removemodal:a[e.p.id].removemodal,formprop:!a[e.p.id].recreateForm,form:a[e.p.id].form})}}}else{if(aa.url==="clientArray"){a[e.p.id].reloadAfterSubmit=false;D=aa.data;aa.complete({status:200,statusText:""},"")}else{b.ajax(aa)}}}}if(ah[0]===false){b("#FormError>td",v).html(ah[1]);b("#FormError",v).show()}}function H(aa,X){var Y=false,Z;for(Z in aa){if(aa.hasOwnProperty(Z)&&aa[Z]!=X[Z]){Y=true;break}}return Y}function h(){var X=true;b("#FormError",v).hide();if(a[e.p.id].checkOnUpdate){D={};U();A=H(D,a[e.p.id]._savedData);if(A){b("#"+y).data("disabled",true);b(".confirm","#"+j.themodal).show();X=false}}return X}function T(){var X;if(c!=="_empty"&&e.p.savedRow!==undefined&&e.p.savedRow.length>0&&b.isFunction(b.fn.jqGrid.restoreRow)){for(X=0;X").data("disabled",false),z=b("");b(e.p.colModel).each(function(){var X=this.formoptions;F=Math.max(F,X?X.colpos||0:0);r=Math.max(r,X?X.rowpos||0:0)});b(P).append(z);var I=b(" ");I[0].rp=0;b(z).append(I);I=b(""+a[e.p.id].topinfo+" ");I[0].rp=0;b(z).append(I);V=b(e).triggerHandler("jqGridAddEditBeforeInitData",[P,E]);if(V===undefined){V=true}if(V&&J){V=J.call(e,P,E)}if(V===false){return}T();var f=e.p.direction==="rtl"?true:false,O=f?"nData":"pData",R=f?"pData":"nData";t(c,e,z,F);var l=" ",n=" ",i=""+d.bSubmit+" ",u=""+d.bCancel+" ";var M=""+(f?n+l:l+n)+" "+i+u+" ";M+=""+a[e.p.id].bottominfo+" ";M+="
";if(r>0){var x=[];b.each(b(z)[0].rows,function(X,Y){x[X]=Y});x.sort(function(Y,X){if(Y.rp>X.rp){return 1}if(Y.rp").append(P).append(M);b.jgrid.createModal(j,L,a[b(this)[0].p.id],"#gview_"+b.jgrid.jqID(e.p.id),b("#gbox_"+b.jgrid.jqID(e.p.id))[0]);if(f){b("#pData, #nData",v+"_2").css("float","right");b(".EditButton",v+"_2").css("text-align","left")}if(a[e.p.id].topinfo){b(".tinfo",v).show()}if(a[e.p.id].bottominfo){b(".binfo",v+"_2").show()}L=null;M=null;b("#"+b.jgrid.jqID(j.themodal)).keydown(function(X){var Y=X.target;if(b("#"+y).data("disabled")===true){return false}if(a[e.p.id].savekey[0]===true&&X.which===a[e.p.id].savekey[1]){if(Y.tagName!=="TEXTAREA"){b("#sData",v+"_2").trigger("click");return false}}if(X.which===27){if(!h()){return false}if(o){b.jgrid.hideModal("#"+b.jgrid.jqID(j.themodal),{gb:d.gbox,jqm:d.jqModal,onClose:a[e.p.id].onClose,removemodal:a[e.p.id].removemodal,formprop:!a[e.p.id].recreateForm,form:a[e.p.id].form})}return false}if(a[e.p.id].navkeys[0]===true){if(b("#id_g",v).val()==="_empty"){return true}if(X.which===a[e.p.id].navkeys[1]){b("#pData",v+"_2").trigger("click");return false}if(X.which===a[e.p.id].navkeys[2]){b("#nData",v+"_2").trigger("click");return false}}});if(d.checkOnUpdate){b("a.ui-jqdialog-titlebar-close span","#"+b.jgrid.jqID(j.themodal)).removeClass("jqmClose");b("a.ui-jqdialog-titlebar-close","#"+b.jgrid.jqID(j.themodal)).unbind("click").click(function(){if(!h()){return false}b.jgrid.hideModal("#"+b.jgrid.jqID(j.themodal),{gb:"#gbox_"+b.jgrid.jqID(B),jqm:d.jqModal,onClose:a[e.p.id].onClose,removemodal:a[e.p.id].removemodal,formprop:!a[e.p.id].recreateForm,form:a[e.p.id].form});return false})}d.saveicon=b.extend([true,"left","ui-icon-disk"],d.saveicon);d.closeicon=b.extend([true,"left","ui-icon-close"],d.closeicon);if(d.saveicon[0]===true){b("#sData",v+"_2").addClass(d.saveicon[1]==="right"?"fm-button-icon-right":"fm-button-icon-left").append(" ")}if(d.closeicon[0]===true){b("#cData",v+"_2").addClass(d.closeicon[1]==="right"?"fm-button-icon-right":"fm-button-icon-left").append(" ")}if(a[e.p.id].checkOnSubmit||a[e.p.id].checkOnUpdate){i=""+d.bYes+" ";n=""+d.bNo+" ";u=""+d.bExit+" ";var w=d.zIndex||999;w++;b("
"+d.saveData+" "+i+n+u+"
").insertAfter("#"+y);b("#sNew","#"+b.jgrid.jqID(j.themodal)).click(function(){k();b("#"+y).data("disabled",false);b(".confirm","#"+b.jgrid.jqID(j.themodal)).hide();return false});b("#nNew","#"+b.jgrid.jqID(j.themodal)).click(function(){b(".confirm","#"+b.jgrid.jqID(j.themodal)).hide();b("#"+y).data("disabled",false);setTimeout(function(){b(":input:visible","#"+y)[0].focus()},0);return false});b("#cNew","#"+b.jgrid.jqID(j.themodal)).click(function(){b(".confirm","#"+b.jgrid.jqID(j.themodal)).hide();b("#"+y).data("disabled",false);b.jgrid.hideModal("#"+b.jgrid.jqID(j.themodal),{gb:"#gbox_"+b.jgrid.jqID(B),jqm:d.jqModal,onClose:a[e.p.id].onClose,removemodal:a[e.p.id].removemodal,formprop:!a[e.p.id].recreateForm,form:a[e.p.id].form});return false})}b(e).triggerHandler("jqGridAddEditInitializeForm",[b("#"+y),E]);if(p){p.call(e,b("#"+y),E)}if(c==="_empty"||!a[e.p.id].viewPagerButtons){b("#pData,#nData",v+"_2").hide()}else{b("#pData,#nData",v+"_2").show()}b(e).triggerHandler("jqGridAddEditBeforeShowForm",[b("#"+y),E]);if(C){C.call(e,b("#"+y),E)}b("#"+b.jgrid.jqID(j.themodal)).data("onClose",a[e.p.id].onClose);b.jgrid.viewModal("#"+b.jgrid.jqID(j.themodal),{gbox:"#gbox_"+b.jgrid.jqID(B),jqm:d.jqModal,overlay:d.overlay,modal:d.modal,overlayClass:d.overlayClass,onHide:function(Y){var X=b("#editmod"+B)[0].style.height;if(X.indexOf("px")>-1){X=parseFloat(X)}b(e).data("formProp",{top:parseFloat(b(Y.w).css("top")),left:parseFloat(b(Y.w).css("left")),width:b(Y.w).width(),height:X,dataheight:b("#"+y).height(),datawidth:b("#"+y).width()});Y.w.remove();if(Y.o){Y.o.remove()}}});if(!m){b("."+b.jgrid.jqID(d.overlayClass)).click(function(){if(!h()){return false}b.jgrid.hideModal("#"+b.jgrid.jqID(j.themodal),{gb:"#gbox_"+b.jgrid.jqID(B),jqm:d.jqModal,onClose:a[e.p.id].onClose,removemodal:a[e.p.id].removemodal,formprop:!a[e.p.id].recreateForm,form:a[e.p.id].form});return false})}b(".fm-button","#"+b.jgrid.jqID(j.themodal)).hover(function(){b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")});b("#sData",v+"_2").click(function(){D={};b("#FormError",v).hide();U();if(D[e.p.id+"_id"]==="_empty"){k()}else{if(d.checkOnSubmit===true){A=H(D,a[e.p.id]._savedData);if(A){b("#"+y).data("disabled",true);b(".confirm","#"+b.jgrid.jqID(j.themodal)).show()}else{k()}}else{k()}}return false});b("#cData",v+"_2").click(function(){if(!h()){return false}b.jgrid.hideModal("#"+b.jgrid.jqID(j.themodal),{gb:"#gbox_"+b.jgrid.jqID(B),jqm:d.jqModal,onClose:a[e.p.id].onClose,removemodal:a[e.p.id].removemodal,formprop:!a[e.p.id].recreateForm,form:a[e.p.id].form});return false});b("#nData",v+"_2").click(function(){if(!h()){return false}b("#FormError",v).hide();var Y=W();Y[0]=parseInt(Y[0],10);if(Y[0]!==-1&&Y[1][Y[0]+1]){b(e).triggerHandler("jqGridAddEditClickPgButtons",["next",b("#"+y),Y[1][Y[0]]]);var X;if(b.isFunction(d.onclickPgButtons)){X=d.onclickPgButtons.call(e,"next",b("#"+y),Y[1][Y[0]]);if(X!==undefined&&X===false){return false}}if(b("#"+b.jgrid.jqID(Y[1][Y[0]+1])).hasClass("ui-state-disabled")){return false}q(Y[1][Y[0]+1],e,y);b(e).jqGrid("setSelection",Y[1][Y[0]+1]);b(e).triggerHandler("jqGridAddEditAfterClickPgButtons",["next",b("#"+y),Y[1][Y[0]]]);if(b.isFunction(d.afterclickPgButtons)){d.afterclickPgButtons.call(e,"next",b("#"+y),Y[1][Y[0]+1])}G(Y[0]+1,Y)}return false});b("#pData",v+"_2").click(function(){if(!h()){return false}b("#FormError",v).hide();var Y=W();if(Y[0]!==-1&&Y[1][Y[0]-1]){b(e).triggerHandler("jqGridAddEditClickPgButtons",["prev",b("#"+y),Y[1][Y[0]]]);var X;if(b.isFunction(d.onclickPgButtons)){X=d.onclickPgButtons.call(e,"prev",b("#"+y),Y[1][Y[0]]);if(X!==undefined&&X===false){return false}}if(b("#"+b.jgrid.jqID(Y[1][Y[0]-1])).hasClass("ui-state-disabled")){return false}q(Y[1][Y[0]-1],e,y);b(e).jqGrid("setSelection",Y[1][Y[0]-1]);b(e).triggerHandler("jqGridAddEditAfterClickPgButtons",["prev",b("#"+y),Y[1][Y[0]]]);if(b.isFunction(d.afterclickPgButtons)){d.afterclickPgButtons.call(e,"prev",b("#"+y),Y[1][Y[0]-1])}G(Y[0]-1,Y)}return false});b(e).triggerHandler("jqGridAddEditAfterShowForm",[b("#"+y),E]);if(K){K.call(e,b("#"+y),E)}var N=W();G(N[0],N)})},viewGridRow:function(c,d){d=b.extend(true,{top:0,left:0,width:0,datawidth:"auto",height:"auto",dataheight:"auto",modal:false,overlay:30,drag:true,resize:true,jqModal:true,closeOnEscape:false,labelswidth:"30%",closeicon:[],navkeys:[false,38,40],onClose:null,beforeShowForm:null,beforeInitData:null,viewPagerButtons:true,recreateForm:false,removemodal:true,form:"view"},b.jgrid.view,d||{});a[b(this)[0].p.id]=d;return this.each(function(){var y=this;if(!y.grid||!c){return}var s=y.p.id,C="ViewGrid_"+b.jgrid.jqID(s),u="ViewTbl_"+b.jgrid.jqID(s),v="ViewGrid_"+s,o="ViewTbl_"+s,j={themodal:"viewmod"+s,modalhead:"viewhd"+s,modalcontent:"viewcnt"+s,scrollelm:C},B=b.isFunction(a[y.p.id].beforeInitData)?a[y.p.id].beforeInitData:false,m=true,h=1,g=0;if(!d.recreateForm){if(b(y).data("viewProp")){b.extend(a[b(this)[0].p.id],b(y).data("viewProp"))}}function k(){if(a[y.p.id].closeOnEscape===true||a[y.p.id].navkeys[0]===true){setTimeout(function(){b(".ui-jqdialog-titlebar-close","#"+b.jgrid.jqID(j.modalhead)).attr("tabindex","-1").focus()},0)}}function p(M,S,Q,Y){var I,L,T,W=0,ab,ac,aa=[],R=false,X,N=" ",P="",J=" ",O=["integer","number","currency"],V=0,U=0,K,H,Z;for(X=1;X<=Y;X++){P+=X===1?N:J}b(S.p.colModel).each(function(){if(this.editrules&&this.editrules.edithidden===true){L=false}else{L=this.hidden===true?true:false}if(!L&&this.align==="right"){if(this.formatter&&b.inArray(this.formatter,O)!==-1){V=Math.max(V,parseInt(this.width,10))}else{U=Math.max(U,parseInt(this.width,10))}}});K=V!==0?V:U!==0?U:0;R=b(S).jqGrid("getInd",M);b(S.p.colModel).each(function(ae){I=this.name;H=false;if(this.editrules&&this.editrules.edithidden===true){L=false}else{L=this.hidden===true?true:false}ac=L?"style='display:none'":"";Z=(typeof this.viewable!=="boolean")?true:this.viewable;if(I!=="cb"&&I!=="subgrid"&&I!=="rn"&&Z){if(R===false){ab=""}else{if(I===S.p.ExpandColumn&&S.p.treeGrid===true){ab=b("td:eq("+ae+")",S.rows[R]).text()}else{ab=b("td:eq("+ae+")",S.rows[R]).html()}}H=this.align==="right"&&K!==0?true:false;var ai=b.extend({},{rowabove:false,rowcontent:""},this.formoptions||{}),af=parseInt(ai.rowpos,10)||W+1,ah=parseInt((parseInt(ai.colpos,10)||1)*2,10);if(ai.rowabove){var ag=b(""+ai.rowcontent+" ");b(Q).append(ag);ag[0].rp=af}T=b(Q).find("tr[rowpos="+af+"]");if(T.length===0){T=b(" ").addClass("FormData").attr("id","trv_"+I);b(T).append(P);b(Q).append(T);T[0].rp=af}b("td:eq("+(ah-2)+")",T[0]).html(""+(ai.label===undefined?S.p.colNames[ae]:ai.label)+" ");b("td:eq("+(ah-1)+")",T[0]).append(""+ab+" ").attr("id","v_"+I);if(H){b("td:eq("+(ah-1)+") span",T[0]).css({"text-align":"right",width:K+"px"})}aa[W]=ae;W++}});if(W>0){var ad=b(" ");ad[0].rp=W+99;b(Q).append(ad)}return aa}function n(K,M){var H,N,J=0,I,L;L=b(M).jqGrid("getInd",K,true);if(!L){return}b("td",L).each(function(O){H=M.p.colModel[O].name;if(M.p.colModel[O].editrules&&M.p.colModel[O].editrules.edithidden===true){N=false}else{N=M.p.colModel[O].hidden===true?true:false}if(H!=="cb"&&H!=="subgrid"&&H!=="rn"){if(H===M.p.ExpandColumn&&M.p.treeGrid===true){I=b(this).text()}else{I=b(this).html()}H=b.jgrid.jqID("v_"+H);b("#"+H+" span","#"+u).html(I);if(N){b("#"+H,"#"+u).parents("tr:first").hide()}J++}});if(J>0){b("#id_g","#"+u).val(K)}}function q(I,H){var J=H[1].length-1;if(I===0){b("#pData","#"+u+"_2").addClass("ui-state-disabled")}else{if(H[1][I-1]!==undefined&&b("#"+b.jgrid.jqID(H[1][I-1])).hasClass("ui-state-disabled")){b("#pData",u+"_2").addClass("ui-state-disabled")}else{b("#pData","#"+u+"_2").removeClass("ui-state-disabled")}}if(I===J){b("#nData","#"+u+"_2").addClass("ui-state-disabled")}else{if(H[1][I+1]!==undefined&&b("#"+b.jgrid.jqID(H[1][I+1])).hasClass("ui-state-disabled")){b("#nData",u+"_2").addClass("ui-state-disabled")}else{b("#nData","#"+u+"_2").removeClass("ui-state-disabled")}}}function i(){var I=b(y).jqGrid("getDataIDs"),H=b("#id_g","#"+u).val(),J=b.inArray(H,I);return[J,I]}var A=isNaN(a[b(this)[0].p.id].dataheight)?a[b(this)[0].p.id].dataheight:a[b(this)[0].p.id].dataheight+"px",t=isNaN(a[b(this)[0].p.id].datawidth)?a[b(this)[0].p.id].datawidth:a[b(this)[0].p.id].datawidth+"px",E=b(""),l=b("");b(y.p.colModel).each(function(){var H=this.formoptions;h=Math.max(h,H?H.colpos||0:0);g=Math.max(g,H?H.rowpos||0:0)});b(E).append(l);if(B){m=B.call(y,E);if(m===undefined){m=true}}if(m===false){return}p(c,y,l,h);var z=y.p.direction==="rtl"?true:false,G=z?"nData":"pData",f=z?"pData":"nData",w=" ",x=" ",F=""+d.bClose+" ";if(g>0){var e=[];b.each(b(l)[0].rows,function(H,I){e[H]=I});e.sort(function(I,H){if(I.rp>H.rp){return 1}if(I.rp").append(E).append("");b.jgrid.createModal(j,D,d,"#gview_"+b.jgrid.jqID(y.p.id),b("#gview_"+b.jgrid.jqID(y.p.id))[0]);if(z){b("#pData, #nData","#"+u+"_2").css("float","right");b(".EditButton","#"+u+"_2").css("text-align","left")}if(!d.viewPagerButtons){b("#pData, #nData","#"+u+"_2").hide()}D=null;b("#"+j.themodal).keydown(function(H){if(H.which===27){if(a[y.p.id].closeOnEscape){b.jgrid.hideModal("#"+b.jgrid.jqID(j.themodal),{gb:d.gbox,jqm:d.jqModal,onClose:d.onClose,removemodal:a[y.p.id].removemodal,formprop:!a[y.p.id].recreateForm,form:a[y.p.id].form})}return false}if(d.navkeys[0]===true){if(H.which===d.navkeys[1]){b("#pData","#"+u+"_2").trigger("click");return false}if(H.which===d.navkeys[2]){b("#nData","#"+u+"_2").trigger("click");return false}}});d.closeicon=b.extend([true,"left","ui-icon-close"],d.closeicon);if(d.closeicon[0]===true){b("#cData","#"+u+"_2").addClass(d.closeicon[1]==="right"?"fm-button-icon-right":"fm-button-icon-left").append(" ")}if(b.isFunction(d.beforeShowForm)){d.beforeShowForm.call(y,b("#"+C))}b.jgrid.viewModal("#"+b.jgrid.jqID(j.themodal),{gbox:"#gbox_"+b.jgrid.jqID(s),jqm:d.jqModal,overlay:d.overlay,modal:d.modal,onHide:function(H){b(y).data("viewProp",{top:parseFloat(b(H.w).css("top")),left:parseFloat(b(H.w).css("left")),width:b(H.w).width(),height:b(H.w).height(),dataheight:b("#"+C).height(),datawidth:b("#"+C).width()});H.w.remove();if(H.o){H.o.remove()}}});b(".fm-button:not(.ui-state-disabled)","#"+u+"_2").hover(function(){b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")});k();b("#cData","#"+u+"_2").click(function(){b.jgrid.hideModal("#"+b.jgrid.jqID(j.themodal),{gb:"#gbox_"+b.jgrid.jqID(s),jqm:d.jqModal,onClose:d.onClose,removemodal:a[y.p.id].removemodal,formprop:!a[y.p.id].recreateForm,form:a[y.p.id].form});return false});b("#nData","#"+u+"_2").click(function(){b("#FormError","#"+u).hide();var H=i();H[0]=parseInt(H[0],10);if(H[0]!==-1&&H[1][H[0]+1]){if(b.isFunction(d.onclickPgButtons)){d.onclickPgButtons.call(y,"next",b("#"+C),H[1][H[0]])}n(H[1][H[0]+1],y);b(y).jqGrid("setSelection",H[1][H[0]+1]);if(b.isFunction(d.afterclickPgButtons)){d.afterclickPgButtons.call(y,"next",b("#"+C),H[1][H[0]+1])}q(H[0]+1,H)}k();return false});b("#pData","#"+u+"_2").click(function(){b("#FormError","#"+u).hide();var H=i();if(H[0]!==-1&&H[1][H[0]-1]){if(b.isFunction(d.onclickPgButtons)){d.onclickPgButtons.call(y,"prev",b("#"+C),H[1][H[0]])}n(H[1][H[0]-1],y);b(y).jqGrid("setSelection",H[1][H[0]-1]);if(b.isFunction(d.afterclickPgButtons)){d.afterclickPgButtons.call(y,"prev",b("#"+C),H[1][H[0]-1])}q(H[0]-1,H)}k();return false});var r=i();q(r[0],r)})},delGridRow:function(c,d){d=b.extend(true,{top:0,left:0,width:240,height:"auto",dataheight:"auto",modal:false,overlay:30,drag:true,resize:true,url:"",mtype:"POST",reloadAfterSubmit:true,beforeShowForm:null,beforeInitData:null,afterShowForm:null,beforeSubmit:null,onclickSubmit:null,afterSubmit:null,jqModal:true,closeOnEscape:false,delData:{},delicon:[],cancelicon:[],onClose:null,ajaxDelOptions:{},processing:false,serializeDelData:null,useDataProxy:false},b.jgrid.del,d||{});a[b(this)[0].p.id]=d;return this.each(function(){var s=this;if(!s.grid){return}if(!c){return}var w=b.isFunction(a[s.p.id].beforeShowForm),j=b.isFunction(a[s.p.id].afterShowForm),u=b.isFunction(a[s.p.id].beforeInitData)?a[s.p.id].beforeInitData:false,k=s.p.id,m={},i=true,g="DelTbl_"+b.jgrid.jqID(k),r,p,l,n,e="DelTbl_"+k,f={themodal:"delmod"+k,modalhead:"delhd"+k,modalcontent:"delcnt"+k,scrollelm:g};if(b.isArray(c)){c=c.join()}if(b("#"+b.jgrid.jqID(f.themodal))[0]!==undefined){if(u){i=u.call(s,b("#"+g));if(i===undefined){i=true}}if(i===false){return}b("#DelData>td","#"+g).text(c);b("#DelError","#"+g).hide();if(a[s.p.id].processing===true){a[s.p.id].processing=false;b("#dData","#"+g).removeClass("ui-state-active")}if(w){a[s.p.id].beforeShowForm.call(s,b("#"+g))}b.jgrid.viewModal("#"+b.jgrid.jqID(f.themodal),{gbox:"#gbox_"+b.jgrid.jqID(k),jqm:a[s.p.id].jqModal,jqM:false,overlay:a[s.p.id].overlay,modal:a[s.p.id].modal});if(j){a[s.p.id].afterShowForm.call(s,b("#"+g))}}else{var t=isNaN(a[s.p.id].dataheight)?a[s.p.id].dataheight:a[s.p.id].dataheight+"px",o=isNaN(d.datawidth)?d.datawidth:d.datawidth+"px",h="";var q=""+d.bSubmit+" ",v=""+d.bCancel+" ";h+="";d.gbox="#gbox_"+b.jgrid.jqID(k);b.jgrid.createModal(f,h,d,"#gview_"+b.jgrid.jqID(s.p.id),b("#gview_"+b.jgrid.jqID(s.p.id))[0]);if(u){i=u.call(s,b(h));if(i===undefined){i=true}}if(i===false){return}b(".fm-button","#"+g+"_2").hover(function(){b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")});d.delicon=b.extend([true,"left","ui-icon-scissors"],a[s.p.id].delicon);d.cancelicon=b.extend([true,"left","ui-icon-cancel"],a[s.p.id].cancelicon);if(d.delicon[0]===true){b("#dData","#"+g+"_2").addClass(d.delicon[1]==="right"?"fm-button-icon-right":"fm-button-icon-left").append(" ")}if(d.cancelicon[0]===true){b("#eData","#"+g+"_2").addClass(d.cancelicon[1]==="right"?"fm-button-icon-right":"fm-button-icon-left").append(" ")}b("#dData","#"+g+"_2").click(function(){var z=[true,""],B,A=b("#DelData>td","#"+g).text();m={};if(b.isFunction(a[s.p.id].onclickSubmit)){m=a[s.p.id].onclickSubmit.call(s,a[s.p.id],A)||{}}if(b.isFunction(a[s.p.id].beforeSubmit)){z=a[s.p.id].beforeSubmit.call(s,A)}if(z[0]&&!a[s.p.id].processing){a[s.p.id].processing=true;l=s.p.prmNames;r=b.extend({},a[s.p.id].delData,m);n=l.oper;r[n]=l.deloper;p=l.id;A=String(A).split(",");if(!A.length){return false}for(B in A){if(A.hasOwnProperty(B)){A[B]=b.jgrid.stripPref(s.p.idPrefix,A[B])}}r[p]=A.join();b(this).addClass("ui-state-active");var x=b.extend({url:a[s.p.id].url||b(s).jqGrid("getGridParam","editurl"),type:a[s.p.id].mtype,data:b.isFunction(a[s.p.id].serializeDelData)?a[s.p.id].serializeDelData.call(s,r):r,complete:function(E,C){var D;b("#dData","#"+g+"_2").removeClass("ui-state-active");if(E.status>=300&&E.status!==304){z[0]=false;if(b.isFunction(a[s.p.id].errorTextFormat)){z[1]=a[s.p.id].errorTextFormat.call(s,E)}else{z[1]=C+" Status: '"+E.statusText+"'. Error code: "+E.status}}else{if(b.isFunction(a[s.p.id].afterSubmit)){z=a[s.p.id].afterSubmit.call(s,E,r)}}if(z[0]===false){b("#DelError>td","#"+g).html(z[1]);b("#DelError","#"+g).show()}else{if(a[s.p.id].reloadAfterSubmit&&s.p.datatype!=="local"){b(s).trigger("reloadGrid")}else{if(s.p.treeGrid===true){try{b(s).jqGrid("delTreeNode",s.p.idPrefix+A[0])}catch(F){}}else{for(D=0;Dtd","#"+g).html(z[1]);b("#DelError","#"+g).show()}return false});b("#eData","#"+g+"_2").click(function(){b.jgrid.hideModal("#"+b.jgrid.jqID(f.themodal),{gb:"#gbox_"+b.jgrid.jqID(k),jqm:a[s.p.id].jqModal,onClose:a[s.p.id].onClose});return false});if(w){a[s.p.id].beforeShowForm.call(s,b("#"+g))}b.jgrid.viewModal("#"+b.jgrid.jqID(f.themodal),{gbox:"#gbox_"+b.jgrid.jqID(k),jqm:a[s.p.id].jqModal,overlay:a[s.p.id].overlay,modal:a[s.p.id].modal});if(j){a[s.p.id].afterShowForm.call(s,b("#"+g))}}if(a[s.p.id].closeOnEscape===true){setTimeout(function(){b(".ui-jqdialog-titlebar-close","#"+b.jgrid.jqID(f.modalhead)).attr("tabindex","-1").focus()},0)}})},navGrid:function(f,h,e,g,d,c,i){h=b.extend({edit:true,editicon:"ui-icon-pencil",add:true,addicon:"ui-icon-plus",del:true,delicon:"ui-icon-trash",search:true,searchicon:"ui-icon-search",refresh:true,refreshicon:"ui-icon-refresh",refreshstate:"firstpage",view:false,viewicon:"ui-icon-document",position:"left",closeOnEscape:true,beforeRefresh:null,afterRefresh:null,cloneToTop:false,alertwidth:200,alertheight:"auto",alerttop:null,alertleft:null,alertzIndex:null},b.jgrid.nav,h||{});return this.each(function(){if(this.nav){return}var j={themodal:"alertmod_"+this.p.id,modalhead:"alerthd_"+this.p.id,modalcontent:"alertcnt_"+this.p.id},m=this,p,k;if(!m.grid||typeof f!=="string"){return}if(b("#"+j.themodal)[0]===undefined){if(!h.alerttop&&!h.alertleft){if(window.innerWidth!==undefined){h.alertleft=window.innerWidth;h.alerttop=window.innerHeight}else{if(document.documentElement!==undefined&&document.documentElement.clientWidth!==undefined&&document.documentElement.clientWidth!==0){h.alertleft=document.documentElement.clientWidth;h.alerttop=document.documentElement.clientHeight}else{h.alertleft=1024;h.alerttop=768}}h.alertleft=h.alertleft/2-parseInt(h.alertwidth,10)/2;h.alerttop=h.alerttop/2-25}b.jgrid.createModal(j,""+h.alerttext+"
",{gbox:"#gbox_"+b.jgrid.jqID(m.p.id),jqModal:true,drag:true,resize:true,caption:h.alertcap,top:h.alerttop,left:h.alertleft,width:h.alertwidth,height:h.alertheight,closeOnEscape:h.closeOnEscape,zIndex:h.alertzIndex},"#gview_"+b.jgrid.jqID(m.p.id),b("#gbox_"+b.jgrid.jqID(m.p.id))[0],true)}var q=1,n,o=function(){if(!b(this).hasClass("ui-state-disabled")){b(this).addClass("ui-state-hover")}},r=function(){b(this).removeClass("ui-state-hover")};if(h.cloneToTop&&m.p.toppager){q=2}for(n=0;n "),v=" ",l,t;if(n===0){l=f;t=m.p.id;if(l===m.p.toppager){t+="_top";q=1}}else{l=m.p.toppager;t=m.p.id+"_top"}if(m.p.direction==="rtl"){b(u).attr("dir","rtl").css("float","right")}if(h.add){g=g||{};s=b(" ");b(s).append(" "+h.addtext+"
");b("tr",u).append(s);b(s,u).attr({title:h.addtitle||"",id:g.id||"add_"+t}).click(function(){if(!b(this).hasClass("ui-state-disabled")){if(b.isFunction(h.addfunc)){h.addfunc.call(m)}else{b(m).jqGrid("editGridRow","new",g)}}return false}).hover(o,r);s=null}if(h.edit){s=b(" ");e=e||{};b(s).append(" "+h.edittext+"
");b("tr",u).append(s);b(s,u).attr({title:h.edittitle||"",id:e.id||"edit_"+t}).click(function(){if(!b(this).hasClass("ui-state-disabled")){var w=m.p.selrow;if(w){if(b.isFunction(h.editfunc)){h.editfunc.call(m,w)}else{b(m).jqGrid("editGridRow",w,e)}}else{b.jgrid.viewModal("#"+j.themodal,{gbox:"#gbox_"+b.jgrid.jqID(m.p.id),jqm:true});b("#jqg_alrt").focus()}}return false}).hover(o,r);s=null}if(h.view){s=b(" ");i=i||{};b(s).append(" "+h.viewtext+"
");b("tr",u).append(s);b(s,u).attr({title:h.viewtitle||"",id:i.id||"view_"+t}).click(function(){if(!b(this).hasClass("ui-state-disabled")){var w=m.p.selrow;if(w){if(b.isFunction(h.viewfunc)){h.viewfunc.call(m,w)}else{b(m).jqGrid("viewGridRow",w,i)}}else{b.jgrid.viewModal("#"+j.themodal,{gbox:"#gbox_"+b.jgrid.jqID(m.p.id),jqm:true});b("#jqg_alrt").focus()}}return false}).hover(o,r);s=null}if(h.del){s=b(" ");d=d||{};b(s).append(" "+h.deltext+"
");b("tr",u).append(s);b(s,u).attr({title:h.deltitle||"",id:d.id||"del_"+t}).click(function(){if(!b(this).hasClass("ui-state-disabled")){var w;if(m.p.multiselect){w=m.p.selarrrow;if(w.length===0){w=null}}else{w=m.p.selrow}if(w){if(b.isFunction(h.delfunc)){h.delfunc.call(m,w)}else{b(m).jqGrid("delGridRow",w,d)}}else{b.jgrid.viewModal("#"+j.themodal,{gbox:"#gbox_"+b.jgrid.jqID(m.p.id),jqm:true});b("#jqg_alrt").focus()}}return false}).hover(o,r);s=null}if(h.add||h.edit||h.del||h.view){b("tr",u).append(v)}if(h.search){s=b(" ");c=c||{};b(s).append(" "+h.searchtext+"
");b("tr",u).append(s);b(s,u).attr({title:h.searchtitle||"",id:c.id||"search_"+t}).click(function(){if(!b(this).hasClass("ui-state-disabled")){if(b.isFunction(h.searchfunc)){h.searchfunc.call(m,c)}else{b(m).jqGrid("searchGrid",c)}}return false}).hover(o,r);if(c.showOnLoad&&c.showOnLoad===true){b(s,u).click()}s=null}if(h.refresh){s=b(" ");b(s).append(" "+h.refreshtext+"
");b("tr",u).append(s);b(s,u).attr({title:h.refreshtitle||"",id:"refresh_"+t}).click(function(){if(!b(this).hasClass("ui-state-disabled")){if(b.isFunction(h.beforeRefresh)){h.beforeRefresh.call(m)}m.p.search=false;m.p.resetsearch=true;try{if(h.refreshstate!=="currentfilter"){var x=m.p.id;m.p.postData.filters="";try{b("#fbox_"+b.jgrid.jqID(x)).jqFilter("resetFilter")}catch(w){}if(b.isFunction(m.clearToolbar)){m.clearToolbar.call(m,false)}}}catch(y){}switch(h.refreshstate){case"firstpage":b(m).trigger("reloadGrid",[{page:1}]);break;case"current":case"currentfilter":b(m).trigger("reloadGrid",[{current:true}]);break}if(b.isFunction(h.afterRefresh)){h.afterRefresh.call(m)}}return false}).hover(o,r);s=null}k=b(".ui-jqgrid").css("font-size")||"11px";b("body").append("
");p=b(u).clone().appendTo("#testpg2").width();b("#testpg2").remove();b(l+"_"+h.position,l).append(u);if(m.p._nvtd){if(p>m.p._nvtd[0]){b(l+"_"+h.position,l).width(p);m.p._nvtd[0]=p}m.p._nvtd[1]=p}k=null;p=null;u=null;this.nav=true}})},navButtonAdd:function(c,d){d=b.extend({caption:"newButton",title:"",buttonicon:"ui-icon-newwin",onClickButton:null,position:"last",cursor:"pointer"},d||{});return this.each(function(){if(!this.grid){return}if(typeof c==="string"&&c.indexOf("#")!==0){c="#"+b.jgrid.jqID(c)}var e=b(".navtable",c)[0],g=this;if(e){if(d.id&&b("#"+b.jgrid.jqID(d.id),e)[0]!==undefined){return}var f=b(" ");if(d.buttonicon.toString().toUpperCase()==="NONE"){b(f).addClass("ui-pg-button ui-corner-all").append(""+d.caption+"
")}else{b(f).addClass("ui-pg-button ui-corner-all").append(" "+d.caption+"
")}if(d.id){b(f).attr("id",d.id)}if(d.position==="first"){if(e.rows[0].cells.length===0){b("tr",e).append(f)}else{b("tr td:eq(0)",e).before(f)}}else{b("tr",e).append(f)}b(f,e).attr("title",d.title||"").click(function(h){if(!b(this).hasClass("ui-state-disabled")){if(b.isFunction(d.onClickButton)){d.onClickButton.call(g,h)}}return false}).hover(function(){if(!b(this).hasClass("ui-state-disabled")){b(this).addClass("ui-state-hover")}},function(){b(this).removeClass("ui-state-hover")})}})},navSeparatorAdd:function(c,d){d=b.extend({sepclass:"ui-separator",sepcontent:"",position:"last"},d||{});return this.each(function(){if(!this.grid){return}if(typeof c==="string"&&c.indexOf("#")!==0){c="#"+b.jgrid.jqID(c)}var f=b(".navtable",c)[0];if(f){var e=" "+d.sepcontent+" ";if(d.position==="first"){if(f.rows[0].cells.length===0){b("tr",f).append(e)}else{b("tr td:eq(0)",f).before(e)}}else{b("tr",f).append(e)}}})},GridToForm:function(c,d){return this.each(function(){var g=this,e;if(!g.grid){return}var f=b(g).jqGrid("getRowData",c);if(f){for(e in f){if(f.hasOwnProperty(e)){if(b("[name="+b.jgrid.jqID(e)+"]",d).is("input:radio")||b("[name="+b.jgrid.jqID(e)+"]",d).is("input:checkbox")){b("[name="+b.jgrid.jqID(e)+"]",d).each(function(){if(b(this).val()==f[e]){b(this)[g.p.useProp?"prop":"attr"]("checked",true)}else{b(this)[g.p.useProp?"prop":"attr"]("checked",false)}})}else{b("[name="+b.jgrid.jqID(e)+"]",d).val(f[e])}}}}})},FormToGrid:function(d,e,f,c){return this.each(function(){var i=this;if(!i.grid){return}if(!f){f="set"}if(!c){c="first"}var g=b(e).serializeArray();var h={};b.each(g,function(j,k){h[k.name]=k.value});if(f==="add"){b(i).jqGrid("addRowData",d,h,c)}else{if(f==="set"){b(i).jqGrid("setRowData",d,h)}}})}})})(jQuery);(function(a){a.extend(a.jgrid,{template:function(e){var c=a.makeArray(arguments).slice(1),b,d=c.length;if(e==null){e=""}return e.replace(/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,function(f,j){if(!isNaN(parseInt(j,10))){return c[parseInt(j,10)]}for(b=0;b0?u[0]:undefined},k,e,i=false,g=j.p.frozenColumns?j.p.id+"_frozen":false,s=g?a("#"+a.jgrid.jqID(b),"#"+a.jgrid.jqID(g)):false,d=(s&&s.length)?s[0].nextSibling:null;if(p.hasClass(h)){if(q.showSummaryOnHide){if(c){while(c){k=t(c.className);if(k!==undefined&&k<=l){break}a(c).hide();c=c.nextSibling;if(g){a(d).hide();d=d.nextSibling}}}}else{if(c){while(c){k=t(c.className);if(k!==undefined&&k<=l){break}a(c).hide();c=c.nextSibling;if(g){a(d).hide();d=d.nextSibling}}}}p.removeClass(h).addClass(n);i=true}else{if(c){e=undefined;while(c){k=t(c.className);if(e===undefined){e=k===undefined}if(k!==undefined){if(k<=l){break}if(k===l+1){a(c).show().find(">td>span.tree-wrap-"+j.p.direction).removeClass(h).addClass(n);if(g){a(d).show().find(">td>span.tree-wrap-"+j.p.direction).removeClass(h).addClass(n)}}}else{if(e){a(c).show();if(g){a(d).show()}}}c=c.nextSibling;if(g){d=d.nextSibling}}}p.removeClass(n).addClass(h)}a(j).triggerHandler("jqGridGroupingClickGroup",[b,i]);if(a.isFunction(j.p.onClickGroup)){j.p.onClickGroup.call(j,b,i)}});return false},groupingRender:function(d,e,c,b){return this.each(function(){var j=this,s=j.p.groupingView,n="",o="",p,r,l=s.groupCollapse?s.plusicon:s.minusicon,f,m=[],k=s.groupField.length;l+=" tree-wrap-"+j.p.direction;a.each(j.p.colModel,function(u,w){var v;for(v=0;v=0;w--){if(u[w].idx===z-y){v=u[w];break}}}}return v}function h(w,B,E,z){var x=t(w,B,E),C=j.p.colModel,A,D=x.cnt,y="",v;for(v=z;v ",F="{0}";a.each(x.summary,function(){if(this.nm===C[v].name){if(C[v].summaryTpl){F=C[v].summaryTpl}if(typeof this.st==="string"&&this.st.toLowerCase()==="avg"){if(this.sd&&this.vd){this.v=(this.v/this.vd)}else{if(this.v&&D>0){this.v=(this.v/D)}}}try{this.groupCount=x.cnt;this.groupIndex=x.dataIndex;this.groupValue=x.value;A=j.formatter("",this.v,v,this)}catch(G){A=this.v}u=""+a.jgrid.format(F,A)+" ";return false}});y+=u}return y}var q=a.makeArray(s.groupSummary),g;q.reverse();g=j.p.multiselect?' colspan="2"':"";a.each(s.groups,function(z,w){if(s._locgr){if(!(w.startRow+w.cnt>(c-1)*b&&w.startRow";try{if(a.isArray(s.formatDisplayField)&&a.isFunction(s.formatDisplayField[w.idx])){w.displayValue=s.formatDisplayField[w.idx].call(j,w.displayValue,w.value,j.p.colModel[m[w.idx]],w.idx,s);f=w.displayValue}else{f=j.formatter(p,w.displayValue,m[w.idx],w.value)}}catch(F){f=w.displayValue}if(s.groupSummaryPos[w.idx]==="header"){n+='0?' style="display:none;" ':" ")+'role="row" class= "ui-widget-content jqgroup ui-row-'+j.p.direction+" "+r+'">"+o+a.jgrid.template(s.groupText[w.idx],f,w.cnt,w.summary)+" ";n+=h(z,0,s.groups,s.groupColumnShow[w.idx]===false?(g===""?2:3):((g==="")?1:2));n+=" "}else{n+='0?' style="display:none;" ':" ")+'role="row" class= "ui-widget-content jqgroup ui-row-'+j.p.direction+" "+r+'">'+o+a.jgrid.template(s.groupText[w.idx],f,w.cnt,w.summary)+" "}var B=k-1===w.idx;if(B){var C=s.groups[z+1],u,E,y=0,v=w.startRow,x=C!==undefined?C.startRow:s.groups[z].startRow+s.groups[z].cnt;if(s._locgr){y=(c-1)*b;if(y>w.startRow){v=y}}for(u=v;u